diff --git a/.dockerignore b/.dockerignore index 80659ed..00967e9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,9 @@ # Skip unncecessary folders -node_modules/** -.github/** -docker/** +**/.git +**/.github +**/node_modules +**/docker +**/lib # Skip unnecessary files **/*.md diff --git a/docker/Dockerfile b/docker/Dockerfile index 6e8dd75..be6f594 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -23,6 +23,9 @@ RUN npm run build FROM ghcr.io/logto-io/logto:1.3.1 as runner +# Set Node.js environment +ENV NODE_ENV=production + # Set working directory WORKDIR /etc/logto @@ -30,12 +33,17 @@ WORKDIR /etc/logto RUN apk update && \ apk add --no-cache bash ca-certificates -# Copy files from builder -COPY --from=builder /home/node/app /etc/logto/packages/connectors/connector-telegram - # Add entrypoint script COPY docker/entrypoint.sh /etc/logto/entrypoint.sh +# Copy files from builder +COPY --from=builder /home/node/app/package*.json /home/node/app/*.svg /etc/logto/packages/connectors/connector-telegram/ +COPY --from=builder /home/node/app/lib/ /etc/logto/packages/connectors/connector-telegram/lib/ + +# Install dependencies +RUN cd /etc/logto/packages/connectors/connector-telegram/ && \ + npm ci + # Make entrypoint script executable RUN chmod +x entrypoint.sh && \ # Create symlink from packages/core/connectors to packages/connectors diff --git a/package-lock.json b/package-lock.json index 0586a2f..0497962 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cheqd/connector-telegram", - "version": "1.1.0-develop.2", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cheqd/connector-telegram", - "version": "1.1.0-develop.2", + "version": "1.1.0", "license": "Apache-2.0", "dependencies": { "@logto/connector-kit": "1.1.1", @@ -45,9 +45,6 @@ "semantic-release": "^21.0.2", "supertest": "^6.3.3", "typescript": "^5.0.4" - }, - "engines": { - "node": "^16.13.0 || ^18.12.0" } }, "node_modules/@ampproject/remapping": { @@ -1458,9 +1455,9 @@ } }, "node_modules/@pkgr/utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.0.tgz", - "integrity": "sha512-2OCURAmRtdlL8iUDTypMrrxfwe8frXTeXaxGsVOaYtc/wrUyk8Z/0OBetM7cdlsy7ZFWlMX72VogKeh+A4Xcjw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.1.tgz", + "integrity": "sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", @@ -3986,9 +3983,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.402", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.402.tgz", - "integrity": "sha512-gWYvJSkohOiBE6ecVYXkrDgNaUjo47QEKK0kQzmWyhkH+yoYiG44bwuicTGNSIQRG3WDMsWVZJLRnJnLNkbWvA==", + "version": "1.4.405", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.405.tgz", + "integrity": "sha512-JdDgnwU69FMZURoesf9gNOej2Cms1XJFfLk24y1IBtnAdhTcJY/mXnokmpmxHN59PcykBP4bgUU98vLY44Lhuw==", "dev": true }, "node_modules/emittery": { @@ -4010,9 +4007,9 @@ "dev": true }, "node_modules/enhanced-resolve": { - "version": "5.14.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.0.tgz", - "integrity": "sha512-+DCows0XNwLDcUhbFJPdlQEVnT2zXlCv7hPxemTz86/O+B/hCQ+mb7ydkPKiflpVraqLPCAfu7lDy+hBXueojw==", + "version": "5.14.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz", + "integrity": "sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -8510,9 +8507,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.11.tgz", - "integrity": "sha512-+M0PwXeU80kRohZ3aT4J/OnR+l9/KD2nVLNNoRgFtnf+umQVFdGBAO2N8+nCnEi0xlh/Wk3zOGC+vNNx+uM79Q==", + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", + "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", "dev": true }, "node_modules/normalize-package-data": { @@ -14176,9 +14173,9 @@ } }, "node_modules/terser": { - "version": "5.17.5", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.5.tgz", - "integrity": "sha512-NqFkzBX34WExkCbk3K5urmNCpEWqMPZnwGI1pMHwqvJ/zDlXC75u3NI7BrzoR8/pryy8Abx2e1i8ChrWkhH1Hg==", + "version": "5.17.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.6.tgz", + "integrity": "sha512-V8QHcs8YuyLkLHsJO5ucyff1ykrLVsR4dNnS//L5Y3NiSXpbK1J+WMVUs67eI0KTxs9JtHhgEQpXQVHlHI92DQ==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.2", @@ -14798,12 +14795,13 @@ "dev": true }, "node_modules/yaml": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.2.2.tgz", - "integrity": "sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.0.tgz", + "integrity": "sha512-8/1wgzdKc7bc9E6my5wZjmdavHLvO/QOmLG1FBugblEvY4IXrLjlViIOmL24HthU042lWTDRO90Fz1Yp66UnMw==", "dev": true, "engines": { - "node": ">= 14" + "node": ">= 14", + "npm": ">= 7" } }, "node_modules/yargs": { diff --git a/package.json b/package.json index 4c5b85d..d3ac306 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,11 @@ "exports": "./lib/index.js", "type": "module", "files": [ - "lib" + "lib", + "**/*.svg", + "LICENSE", + "package.json", + "README.md" ], "scripts": { "precommit": "lint-staged", @@ -70,9 +74,6 @@ "supertest": "^6.3.3", "typescript": "^5.0.4" }, - "engines": { - "node": "^16.13.0 || ^18.12.0" - }, "eslintConfig": { "extends": "@silverhand" },