From b8b8048030bad877fafcc0945ce8594461c277a5 Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Mon, 5 Jan 2026 13:29:17 +0530 Subject: [PATCH 01/16] fix snyk issues --- package-lock.json | 554 ++++++++++++++++++++++++---------------------- package.json | 4 +- 2 files changed, 288 insertions(+), 270 deletions(-) diff --git a/package-lock.json b/package-lock.json index ba1ec61..7536632 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.8", + "version": "0.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.8", + "version": "0.0.9", "license": "MIT", "dependencies": { "@contentstack/datasync-filesystem-sdk": "^1.5.1", @@ -15,7 +15,7 @@ "chokidar": "^4.0.3", "contentstack": "^3.24.1", "debug": "~3.2.7", - "express": "^4.22.1", + "express": "^5.2.1", "express-rate-limit": "^7.1.5", "http-errors": "~2.0.0", "morgan": "~1.10.1", @@ -117,13 +117,13 @@ "license": "MIT" }, "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", "license": "MIT", "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" }, "engines": { "node": ">= 0.6" @@ -212,12 +212,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" - }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -259,51 +253,47 @@ "node": ">= 0.8" } }, - "node_modules/basic-auth/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, "node_modules/body-parser": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", - "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz", + "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", "license": "MIT", "dependencies": { - "bytes": "~3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "~1.2.0", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "on-finished": "~2.4.1", - "qs": "~6.14.0", - "raw-body": "~2.5.3", - "type-is": "~1.6.18", - "unpipe": "~1.0.0" + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" }, "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -463,15 +453,16 @@ "license": "MIT" }, "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/content-type": { @@ -508,10 +499,13 @@ } }, "node_modules/cookie-signature": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", - "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", - "license": "MIT" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } }, "node_modules/cross-spawn": { "version": "6.0.6", @@ -555,16 +549,6 @@ "node": ">= 0.8" } }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -816,9 +800,9 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -891,45 +875,42 @@ } }, "node_modules/express": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", - "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "~1.20.3", - "content-disposition": "~0.5.4", - "content-type": "~1.0.4", - "cookie": "~0.7.1", - "cookie-signature": "~1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.3.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", - "proxy-addr": "~2.0.7", - "qs": "~6.14.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "~0.19.0", - "serve-static": "~1.16.2", - "setprototypeof": "1.2.0", - "statuses": "~2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" }, "funding": { "type": "opencollective", @@ -952,20 +933,22 @@ } }, "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -981,6 +964,19 @@ "node": ">=4" } }, + "node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -1029,38 +1025,43 @@ } }, "node_modules/finalhandler": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", - "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", "license": "MIT", "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "statuses": "~2.0.2", - "unpipe": "~1.0.0" + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" }, "engines": { - "node": ">= 0.8" + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/flat-cache": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", @@ -1093,12 +1094,12 @@ } }, "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/fs.realpath": { @@ -1275,15 +1276,19 @@ } }, "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz", + "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", "license": "MIT", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/ignore": { @@ -1408,6 +1413,12 @@ "node": ">=4" } }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1501,12 +1512,12 @@ } }, "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 0.8" } }, "node_modules/memory-pager": { @@ -1516,54 +1527,40 @@ "license": "MIT" }, "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", "license": "MIT", "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" + "node": ">=18" }, - "engines": { - "node": ">=4" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "license": "MIT", "dependencies": { - "mime-db": "1.52.0" + "mime-db": "^1.54.0" }, "engines": { - "node": ">= 0.6" + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/mimic-fn": { @@ -1734,9 +1731,9 @@ "license": "MIT" }, "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -1817,7 +1814,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -1924,10 +1920,14 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", - "license": "MIT" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } }, "node_modules/picocolors": { "version": "1.1.1", @@ -1987,9 +1987,9 @@ } }, "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -2011,18 +2011,18 @@ } }, "node_modules/raw-body": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", - "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", "license": "MIT", "dependencies": { "bytes": "~3.1.2", "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", + "iconv-lite": "~0.7.0", "unpipe": "~1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.10" } }, "node_modules/readdirp": { @@ -2086,6 +2086,39 @@ "rimraf": "bin.js" } }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/router/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -2110,23 +2143,9 @@ } }, "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "license": "MIT" }, "node_modules/safer-buffer": { @@ -2146,57 +2165,65 @@ } }, "node_modules/send": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", - "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", "license": "MIT", "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.1", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "~2.4.1", - "range-parser": "~1.2.1", - "statuses": "~2.0.2" + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/serve-static": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", - "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", "license": "MIT", "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "~0.19.1" + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/setprototypeof": { @@ -2526,13 +2553,14 @@ } }, "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", "license": "MIT", "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" }, "engines": { "node": ">= 0.6" @@ -2572,15 +2600,6 @@ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", "license": "ISC" }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -2639,7 +2658,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, "license": "ISC" }, "node_modules/write": { diff --git a/package.json b/package.json index 4e95c40..b43ae5d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.8", + "version": "0.0.9", "private": true, "scripts": { "start": "node ./bin/www", @@ -13,7 +13,7 @@ "chokidar": "^4.0.3", "contentstack": "^3.24.1", "debug": "~3.2.7", - "express": "^4.22.1", + "express": "^5.2.1", "express-rate-limit": "^7.1.5", "http-errors": "~2.0.0", "morgan": "~1.10.1", From 8ed584b7e7543fdcb02aa4b2c7db9793cd484fca Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Tue, 3 Feb 2026 13:30:44 +0530 Subject: [PATCH 02/16] remove unused dependency --- package-lock.json | 91 ++++++++++++++++------------------------------- package.json | 5 ++- 2 files changed, 33 insertions(+), 63 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7536632..f31109e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,18 +1,17 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.9", + "version": "0.0.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.9", + "version": "0.0.10", "license": "MIT", "dependencies": { - "@contentstack/datasync-filesystem-sdk": "^1.5.1", + "@contentstack/datasync-filesystem-sdk": "1.5.1", "@contentstack/datasync-mongodb-sdk": "^1.0.12", "async": "^3.2.6", - "chokidar": "^4.0.3", "contentstack": "^3.24.1", "debug": "~3.2.7", "express": "^5.2.1", @@ -28,13 +27,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz", - "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.27.1", + "@babel/helper-validator-identifier": "^7.28.5", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -66,13 +65,13 @@ } }, "node_modules/@contentstack/datasync-mongodb-sdk": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@contentstack/datasync-mongodb-sdk/-/datasync-mongodb-sdk-1.0.12.tgz", - "integrity": "sha512-/P7FoW1Q9K8YCiMZFH2C57ut6euBUm3cBHlLZBprfmTTvOH0E+oHNIurGoU0aNQq1Op3cBtCkEOtEy1T+Lo5Fw==", + "version": "1.0.14", + "resolved": "https://registry.npmjs.org/@contentstack/datasync-mongodb-sdk/-/datasync-mongodb-sdk-1.0.14.tgz", + "integrity": "sha512-AfSvriKQC4mo+VqoH21Wa8U6q5r4qoP0scuiMt46EXjaYAzAqBYGd+jj4cyZA1FXZjPEocOVSYUZJN/qVkrAmw==", "license": "MIT", "dependencies": { - "lodash": "^4.17.21", - "mongodb": "^6.12.0", + "lodash": "^4.17.23", + "mongodb": "^6.21.0", "npm-pack": "^1.0.0", "sift": "^17.1.3" }, @@ -81,15 +80,15 @@ } }, "node_modules/@contentstack/utils": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.6.3.tgz", - "integrity": "sha512-FU1hFks9vnJ5e9cwBTPgnf3obx/fuKh+c3Gtc71mq1Mrub3/z4rJZJWLJ2kublVKnXWnhz+Yt66rshxO/TT9IQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.7.0.tgz", + "integrity": "sha512-wNWNt+wkoGJzCr5ZhAMKWJ5ND5xbD7N3t++Y6s1O+FB+AFzJszqCT740j6VqwjhQzw5sGfHoGjHIvlQA9dCcBw==", "license": "MIT" }, "node_modules/@mongodb-js/saslprep": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.4.tgz", - "integrity": "sha512-p7X/ytJDIdwUfFL/CLOhKgdfJe1Fa8uw9seJYvdOmnP9JBWGWHW69HkOixXS6Wy9yvGf1MbhcS6lVmrhy4jm2g==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.5.tgz", + "integrity": "sha512-k64Lbyb7ycCSXHSLzxVdb2xsKGPMvYZfCICXvDsI8Z65CeWQzTEKS4YmGbnqw+U9RBvLPTsB6UCmwkgsDTGWIw==", "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" @@ -254,9 +253,9 @@ } }, "node_modules/body-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz", - "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", "license": "MIT", "dependencies": { "bytes": "^3.1.2", @@ -265,7 +264,7 @@ "http-errors": "^2.0.0", "iconv-lite": "^0.7.0", "on-finished": "^2.4.1", - "qs": "^6.14.0", + "qs": "^6.14.1", "raw-body": "^3.0.1", "type-is": "^2.0.1" }, @@ -384,21 +383,6 @@ "dev": true, "license": "MIT" }, - "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -475,9 +459,9 @@ } }, "node_modules/contentstack": { - "version": "3.26.3", - "resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.26.3.tgz", - "integrity": "sha512-mN1/Z8YV1HoIw03oEgnoHlaX/ueOLZH4unbf3zJt6uOJSO51gDFfOQEnKsTfUfWkyks9xUmED3WzPMxpnxdqcQ==", + "version": "3.26.4", + "resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.26.4.tgz", + "integrity": "sha512-NUe1Yz+NwmNJHTbSMr0tJ4YrerhHSaHPgptXFGxhTQkHG1d/2JDmjGeKocpA5ffO/x9JhgJmzrki+V4BsyQN4A==", "license": "MIT", "dependencies": { "@contentstack/utils": "^1.4.1", @@ -1276,9 +1260,9 @@ } }, "node_modules/iconv-lite": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz", - "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -1497,9 +1481,9 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "license": "MIT" }, "node_modules/math-intrinsics": { @@ -2025,19 +2009,6 @@ "node": ">= 0.10" } }, - "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", diff --git a/package.json b/package.json index b43ae5d..c9aa97e 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,15 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.9", + "version": "0.0.10", "private": true, "scripts": { "start": "node ./bin/www", "pre-commit": "husky install && husky && chmod +x .husky/pre-commit" }, "dependencies": { - "@contentstack/datasync-filesystem-sdk": "^1.5.1", + "@contentstack/datasync-filesystem-sdk": "1.5.1", "@contentstack/datasync-mongodb-sdk": "^1.0.12", "async": "^3.2.6", - "chokidar": "^4.0.3", "contentstack": "^3.24.1", "debug": "~3.2.7", "express": "^5.2.1", From 5dd050fb23ca500dbe754cd5f9e9ead019221d20 Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Thu, 5 Feb 2026 12:43:25 +0530 Subject: [PATCH 03/16] upgrade dependencies --- package-lock.json | 14 +++++++------- package.json | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index f31109e..757e808 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "0.0.10", "license": "MIT", "dependencies": { - "@contentstack/datasync-filesystem-sdk": "1.5.1", - "@contentstack/datasync-mongodb-sdk": "^1.0.12", + "@contentstack/datasync-filesystem-sdk": "1.5.2", + "@contentstack/datasync-mongodb-sdk": "^1.0.14", "async": "^3.2.6", "contentstack": "^3.24.1", "debug": "~3.2.7", @@ -52,13 +52,13 @@ } }, "node_modules/@contentstack/datasync-filesystem-sdk": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@contentstack/datasync-filesystem-sdk/-/datasync-filesystem-sdk-1.5.1.tgz", - "integrity": "sha512-MSEhH/AAUtDjRxE+yrEDsAZCi/zZPQjz0n2Z0dLxEq7BKTa3FCB5sevwsEX9tnhp0lzFUSz4x5g+3xt43XbhxA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@contentstack/datasync-filesystem-sdk/-/datasync-filesystem-sdk-1.5.2.tgz", + "integrity": "sha512-crX+FW4UPdYYl6cxvqDyCf2UTrEhHB4MKMXDsN22sWnlzBzD+tBPZwzD8Ytf/Z04NfoVYjR6UBDEVQC6faQkEA==", "license": "MIT", "dependencies": { "json-mask": "2.0.0", - "lodash": "^4.17.21", + "lodash": "^4.17.23", "mkdirp": "^3.0.1", "npm-pack": "^1.0.0", "sift": "17.1.3" @@ -1150,7 +1150,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index c9aa97e..efa5228 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "pre-commit": "husky install && husky && chmod +x .husky/pre-commit" }, "dependencies": { - "@contentstack/datasync-filesystem-sdk": "1.5.1", - "@contentstack/datasync-mongodb-sdk": "^1.0.12", + "@contentstack/datasync-filesystem-sdk": "1.5.2", + "@contentstack/datasync-mongodb-sdk": "^1.0.14", "async": "^3.2.6", "contentstack": "^3.24.1", "debug": "~3.2.7", From 5c7592176cbcc067a53065e56ff090706bcc1b80 Mon Sep 17 00:00:00 2001 From: dhaval Date: Tue, 3 Mar 2026 00:11:28 +0530 Subject: [PATCH 04/16] Update sca-scan.yml --- .github/workflows/sca-scan.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/sca-scan.yml b/.github/workflows/sca-scan.yml index f09161f..2307d48 100644 --- a/.github/workflows/sca-scan.yml +++ b/.github/workflows/sca-scan.yml @@ -13,3 +13,6 @@ jobs: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} with: args: --all-projects --fail-on=all + json: true + continue-on-error: true + - uses: contentstack/sca-policy@main From 2241d5110b717d091e8aa355a8d024e700283469 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 26 Mar 2026 11:23:00 +0530 Subject: [PATCH 05/16] snyk fix: Fix Allocation of Resources Without Limits or Throttling --- package-lock.json | 40 ++++++++++++++++++++-------------------- package.json | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 757e808..b523273 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.10", + "version": "0.0.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.10", + "version": "0.0.11", "license": "MIT", "dependencies": { "@contentstack/datasync-filesystem-sdk": "1.5.2", @@ -80,15 +80,15 @@ } }, "node_modules/@contentstack/utils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.7.0.tgz", - "integrity": "sha512-wNWNt+wkoGJzCr5ZhAMKWJ5ND5xbD7N3t++Y6s1O+FB+AFzJszqCT740j6VqwjhQzw5sGfHoGjHIvlQA9dCcBw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.8.0.tgz", + "integrity": "sha512-pqCFbn2dynSCW6LUD2AH74LIy32dxxe52OL+HpUxNVXV5doFyClkFjP9toqdAZ81VbCEaOc4WK+VS/RdtMpxDA==", "license": "MIT" }, "node_modules/@mongodb-js/saslprep": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.5.tgz", - "integrity": "sha512-k64Lbyb7ycCSXHSLzxVdb2xsKGPMvYZfCICXvDsI8Z65CeWQzTEKS4YmGbnqw+U9RBvLPTsB6UCmwkgsDTGWIw==", + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.6.tgz", + "integrity": "sha512-y+x3H1xBZd38n10NZF/rEBlvDOOMQ6LKUTHqr8R9VkJ+mmQOYtJFxIlkkK8fZrtOiL6VixbOBWMbZGBdal3Z1g==", "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" @@ -152,9 +152,9 @@ } }, "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", "dev": true, "license": "MIT", "dependencies": { @@ -459,9 +459,9 @@ } }, "node_modules/contentstack": { - "version": "3.26.4", - "resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.26.4.tgz", - "integrity": "sha512-NUe1Yz+NwmNJHTbSMr0tJ4YrerhHSaHPgptXFGxhTQkHG1d/2JDmjGeKocpA5ffO/x9JhgJmzrki+V4BsyQN4A==", + "version": "3.27.0", + "resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.27.0.tgz", + "integrity": "sha512-2ZzVk1dO4AhgaiuPjLIzeDnQky/ElI02E4+tntX7xXQXgPEDWgogghoRMT0y0dFBcZthrZe1QChwYA9aCRSGpA==", "license": "MIT", "dependencies": { "@contentstack/utils": "^1.4.1", @@ -1558,9 +1558,9 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -1971,9 +1971,9 @@ } }, "node_modules/qs": { - "version": "6.14.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", - "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" diff --git a/package.json b/package.json index efa5228..8ccb2a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.10", + "version": "0.0.11", "private": true, "scripts": { "start": "node ./bin/www", From 8c4c2a41a61d5f1b254967d902ccb56be84810a4 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 26 Mar 2026 11:23:06 +0530 Subject: [PATCH 06/16] Add GitHub workflows for branch checks and version bump validation --- .github/workflows/check-branch.yml | 20 ++++++ .github/workflows/check-version-bump.yml | 89 ++++++++++++++++++++++++ .github/workflows/release.yml | 50 ------------- .husky/post-checkout | 40 +++++++++++ 4 files changed, 149 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/check-branch.yml create mode 100644 .github/workflows/check-version-bump.yml delete mode 100644 .github/workflows/release.yml create mode 100755 .husky/post-checkout diff --git a/.github/workflows/check-branch.yml b/.github/workflows/check-branch.yml new file mode 100644 index 0000000..421c253 --- /dev/null +++ b/.github/workflows/check-branch.yml @@ -0,0 +1,20 @@ +name: 'Check Branch' + +on: + pull_request: + +jobs: + check_branch: + runs-on: ubuntu-latest + steps: + - name: Comment PR + if: github.base_ref == 'master' && github.head_ref != 'development' + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the development branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch. + - name: Check branch + if: github.base_ref == 'master' && github.head_ref != 'development' + run: | + echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the development branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch." + exit 1 \ No newline at end of file diff --git a/.github/workflows/check-version-bump.yml b/.github/workflows/check-version-bump.yml new file mode 100644 index 0000000..b6afb9e --- /dev/null +++ b/.github/workflows/check-version-bump.yml @@ -0,0 +1,89 @@ +# Catches when developers forget to add a version bump for their changes. +# App code changes (app.js, bin/, config/, routes/, views/, etc.) require package.json + CHANGELOG.md. +# Skips for: test-only, docs, .github (workflows/config), dependency-only bumps without app edits. +name: Check Version Bump + +on: + pull_request: + +jobs: + version-bump: + name: Version & Changelog bump + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Detect changed files and version bump + id: detect + run: | + if git rev-parse HEAD^2 >/dev/null 2>&1; then + FILES=$(git diff --name-only HEAD^1 HEAD^2) + else + FILES=$(git diff --name-only HEAD~1 HEAD) + fi + VERSION_FILES_CHANGED=false + echo "$FILES" | grep -qx 'package.json' && VERSION_FILES_CHANGED=true + echo "$FILES" | grep -qx 'CHANGELOG.md' && VERSION_FILES_CHANGED=true + echo "version_files_changed=$VERSION_FILES_CHANGED" >> $GITHUB_OUTPUT + # App source paths for this boilerplate (no lib/webpack/dist); .github/ and test/ do not count + CODE_CHANGED=false + echo "$FILES" | grep -qE '^app\.js$|^bin/|^config/|^middlewares/|^models/|^public/|^routes/|^views/|^schemaNentries/' && CODE_CHANGED=true + echo "$FILES" | grep -qx 'package.json' && CODE_CHANGED=true + echo "code_changed=$CODE_CHANGED" >> $GITHUB_OUTPUT + + - name: Skip when only test/docs/.github changed + if: steps.detect.outputs.code_changed != 'true' + run: | + echo "No release-affecting files changed (e.g. only test/docs/.github). Skipping version-bump check." + exit 0 + + - name: Fail when version bump was missed + if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed != 'true' + run: | + echo "::error::This PR has code changes but no version bump. Please bump the version in package.json and add an entry in CHANGELOG.md." + exit 1 + + - name: Setup Node + if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed == 'true' + uses: actions/setup-node@v4 + with: + node-version: '22.x' + + - name: Check version bump + if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed == 'true' + run: | + set -e + PKG_VERSION=$(node -p "require('./package.json').version.replace(/^v/, '')") + if [ -z "$PKG_VERSION" ]; then + echo "::error::Could not read version from package.json" + exit 1 + fi + git fetch --tags --force 2>/dev/null || true + LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || true) + if [ -z "$LATEST_TAG" ]; then + echo "No existing tags found. Skipping version-bump check (first release)." + exit 0 + fi + LATEST_VERSION="${LATEST_TAG#v}" + LATEST_VERSION="${LATEST_VERSION%%-*}" + if [ "$(printf '%s\n' "$LATEST_VERSION" "$PKG_VERSION" | sort -V | tail -1)" != "$PKG_VERSION" ]; then + echo "::error::Version bump required: package.json version ($PKG_VERSION) is not greater than latest tag ($LATEST_TAG). Please bump the version in package.json." + exit 1 + fi + if [ "$PKG_VERSION" = "$LATEST_VERSION" ]; then + echo "::error::Version bump required: package.json version ($PKG_VERSION) equals latest tag ($LATEST_TAG). Please bump the version in package.json." + exit 1 + fi + CHANGELOG_VERSION=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' CHANGELOG.md | head -1) + if [ -z "$CHANGELOG_VERSION" ]; then + echo "::error::Could not find a version entry in CHANGELOG.md (expected line like '## [v1.0.0](...)')." + exit 1 + fi + if [ "$CHANGELOG_VERSION" != "$PKG_VERSION" ]; then + echo "::error::CHANGELOG version mismatch: CHANGELOG.md top version ($CHANGELOG_VERSION) does not match package.json version ($PKG_VERSION). Please add or update the CHANGELOG entry for $PKG_VERSION." + exit 1 + fi + echo "Version bump check passed: package.json and CHANGELOG.md are at $PKG_VERSION (latest tag: $LATEST_TAG)." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 9ed98f5..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Release - -on: - push: - branches: [master] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "22.x" - - run: npm install - - - name: get-package-details - id: package - uses: codex-team/action-nodejs-package-info@v1.1 - - name: install npm packall - run: npm install npm-pack-all - - - run: node node_modules/.bin/npm-pack-all - - uses: Klemensas/action-autotag@stable - id: update_tag - with: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - tag_prefix: "v" - - name: Create Release - if: steps.update_tag.outputs.tagname - uses: actions/create-release@v1 - id: create_release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ steps.update_tag.outputs.tagname }} - release_name: Release ${{ steps.update_tag.outputs.tagname }} - draft: false # Default value, but nice to set explicitly - prerelease: false # Default value, but nice to set explicitly - - name: Upload Release Asset - if: steps.update_tag.outputs.tagname - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz - asset_name: ${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz - asset_content_type: application/tgz \ No newline at end of file diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100755 index 0000000..cb6b9f2 --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,40 @@ +#!/usr/bin/env sh +# When switching to a branch that doesn't exist on remote (e.g. newly created), +# pull and merge origin/main or origin/master into current branch. Does not push. + +# Only run on branch checkout (not file checkout) +if [ "$3" != "1" ]; then + exit 0 +fi + +# Skip if we don't have a remote +if ! git rev-parse --verify origin 2>/dev/null; then + exit 0 +fi + +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +# Skip main/master/development - no need to merge base into these +case "$CURRENT_BRANCH" in + main|master|development) exit 0 ;; +esac + +# Only run when current branch does not exist on origin (treat as new local branch) +if git ls-remote --heads origin "$CURRENT_BRANCH" 2>/dev/null | grep -q .; then + echo "post-checkout: $CURRENT_BRANCH exists on origin, skipping merge." + exit 0 +fi + +# Prefer main, fallback to master +if git rev-parse --verify origin/main 2>/dev/null; then + BASE=origin/main +elif git rev-parse --verify origin/master 2>/dev/null; then + BASE=origin/master +else + exit 0 +fi + +echo "New branch detected: merging latest $BASE into $CURRENT_BRANCH (local only, not pushing)..." +git fetch origin +git merge "$BASE" --no-edit --no-ff +echo "Done. Merge is local only; push when ready." From dd95d27ecc0187d7caf22e83cd179f2b1b58133d Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 26 Mar 2026 11:25:30 +0530 Subject: [PATCH 07/16] remove check branch workflow --- .github/workflows/check-branch.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/check-branch.yml diff --git a/.github/workflows/check-branch.yml b/.github/workflows/check-branch.yml deleted file mode 100644 index 421c253..0000000 --- a/.github/workflows/check-branch.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: 'Check Branch' - -on: - pull_request: - -jobs: - check_branch: - runs-on: ubuntu-latest - steps: - - name: Comment PR - if: github.base_ref == 'master' && github.head_ref != 'development' - uses: thollander/actions-comment-pull-request@v2 - with: - message: | - We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the development branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch. - - name: Check branch - if: github.base_ref == 'master' && github.head_ref != 'development' - run: | - echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the development branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch." - exit 1 \ No newline at end of file From c0786d6abe29896b535274d9221abf60df5e2474 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 26 Mar 2026 11:27:43 +0530 Subject: [PATCH 08/16] Update post-checkout hook to skip 'development' branch check --- .husky/post-checkout | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.husky/post-checkout b/.husky/post-checkout index cb6b9f2..302fdc6 100755 --- a/.husky/post-checkout +++ b/.husky/post-checkout @@ -14,9 +14,9 @@ fi CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) -# Skip main/master/development - no need to merge base into these +# Skip main/master - no need to merge base into these case "$CURRENT_BRANCH" in - main|master|development) exit 0 ;; + main|master) exit 0 ;; esac # Only run when current branch does not exist on origin (treat as new local branch) From 2b180ad5b8fef95bb39429282043428016cf1ae3 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 26 Mar 2026 11:31:49 +0530 Subject: [PATCH 09/16] Refine version bump workflow to focus solely on package.json; removed CHANGELOG.md checks and updated error messages for clarity. --- .github/workflows/check-version-bump.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/check-version-bump.yml b/.github/workflows/check-version-bump.yml index b6afb9e..31bdf66 100644 --- a/.github/workflows/check-version-bump.yml +++ b/.github/workflows/check-version-bump.yml @@ -1,5 +1,5 @@ -# Catches when developers forget to add a version bump for their changes. -# App code changes (app.js, bin/, config/, routes/, views/, etc.) require package.json + CHANGELOG.md. +# Catches when developers forget to bump package.json for release-affecting changes. +# App code changes (app.js, bin/, config/, routes/, views/, etc.) require a version bump vs latest tag. # Skips for: test-only, docs, .github (workflows/config), dependency-only bumps without app edits. name: Check Version Bump @@ -8,7 +8,7 @@ on: jobs: version-bump: - name: Version & Changelog bump + name: Version bump runs-on: ubuntu-latest steps: - name: Checkout @@ -26,7 +26,6 @@ jobs: fi VERSION_FILES_CHANGED=false echo "$FILES" | grep -qx 'package.json' && VERSION_FILES_CHANGED=true - echo "$FILES" | grep -qx 'CHANGELOG.md' && VERSION_FILES_CHANGED=true echo "version_files_changed=$VERSION_FILES_CHANGED" >> $GITHUB_OUTPUT # App source paths for this boilerplate (no lib/webpack/dist); .github/ and test/ do not count CODE_CHANGED=false @@ -43,7 +42,7 @@ jobs: - name: Fail when version bump was missed if: steps.detect.outputs.code_changed == 'true' && steps.detect.outputs.version_files_changed != 'true' run: | - echo "::error::This PR has code changes but no version bump. Please bump the version in package.json and add an entry in CHANGELOG.md." + echo "::error::This PR has code changes but no version bump. Please bump the version in package.json." exit 1 - name: Setup Node @@ -77,13 +76,4 @@ jobs: echo "::error::Version bump required: package.json version ($PKG_VERSION) equals latest tag ($LATEST_TAG). Please bump the version in package.json." exit 1 fi - CHANGELOG_VERSION=$(sed -nE 's/^## \[v?([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' CHANGELOG.md | head -1) - if [ -z "$CHANGELOG_VERSION" ]; then - echo "::error::Could not find a version entry in CHANGELOG.md (expected line like '## [v1.0.0](...)')." - exit 1 - fi - if [ "$CHANGELOG_VERSION" != "$PKG_VERSION" ]; then - echo "::error::CHANGELOG version mismatch: CHANGELOG.md top version ($CHANGELOG_VERSION) does not match package.json version ($PKG_VERSION). Please add or update the CHANGELOG entry for $PKG_VERSION." - exit 1 - fi - echo "Version bump check passed: package.json and CHANGELOG.md are at $PKG_VERSION (latest tag: $LATEST_TAG)." + echo "Version bump check passed: package.json is at $PKG_VERSION (latest tag: $LATEST_TAG)." From 3f187ae9d18aa0da1e8cd135f08655241f810633 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Thu, 2 Apr 2026 14:18:30 +0530 Subject: [PATCH 10/16] fix snyk issues --- package-lock.json | 28 ++++++++++++++-------------- package.json | 7 +++++-- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index b523273..556029a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.11", + "version": "0.0.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.11", + "version": "0.0.12", "license": "MIT", "dependencies": { "@contentstack/datasync-filesystem-sdk": "1.5.2", @@ -80,9 +80,9 @@ } }, "node_modules/@contentstack/utils": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.8.0.tgz", - "integrity": "sha512-pqCFbn2dynSCW6LUD2AH74LIy32dxxe52OL+HpUxNVXV5doFyClkFjP9toqdAZ81VbCEaOc4WK+VS/RdtMpxDA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.9.0.tgz", + "integrity": "sha512-4U2YN/twGP1yJj4nA1KQ/VhS67iTUFSgN8W8HNQDQ0PQEkPiqWdouS0Bv1AvggthKbBYYU0vfMqsoU8J++J7rA==", "license": "MIT" }, "node_modules/@mongodb-js/saslprep": { @@ -294,9 +294,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -1481,9 +1481,9 @@ } }, "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, "node_modules/math-intrinsics": { @@ -1904,9 +1904,9 @@ } }, "node_modules/path-to-regexp": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", - "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", + "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", "license": "MIT", "funding": { "type": "opencollective", diff --git a/package.json b/package.json index 8ccb2a6..3493597 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.11", + "version": "0.0.12", "private": true, "scripts": { "start": "node ./bin/www", @@ -28,5 +28,8 @@ "url": "https://github.com/contentstack/datasync-nodejs-website-boilerplate" }, "author": "Contentstack LLC ", - "license": "MIT" + "license": "MIT", + "overrides": { + "lodash": "^4.18.1" + } } From b0b730f58a4cbe80403fdbde7fdf57fc0d14bbfa Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Fri, 10 Apr 2026 12:59:02 +0530 Subject: [PATCH 11/16] Add AGENTS.md, skills README, and individual skill guides. --- .cursor/rules/README.md | 5 ++++ AGENTS.md | 48 ++++++++++++++++++++++++++++++++ skills/README.md | 13 +++++++++ skills/code-review/SKILL.md | 19 +++++++++++++ skills/datasync-website/SKILL.md | 22 +++++++++++++++ skills/dev-workflow/SKILL.md | 20 +++++++++++++ skills/javascript-style/SKILL.md | 18 ++++++++++++ skills/testing/SKILL.md | 18 ++++++++++++ 8 files changed, 163 insertions(+) create mode 100644 .cursor/rules/README.md create mode 100644 AGENTS.md create mode 100644 skills/README.md create mode 100644 skills/code-review/SKILL.md create mode 100644 skills/datasync-website/SKILL.md create mode 100644 skills/dev-workflow/SKILL.md create mode 100644 skills/javascript-style/SKILL.md create mode 100644 skills/testing/SKILL.md diff --git a/.cursor/rules/README.md b/.cursor/rules/README.md new file mode 100644 index 0000000..f5c1f87 --- /dev/null +++ b/.cursor/rules/README.md @@ -0,0 +1,5 @@ +# Cursor (optional) + +**Cursor** users: start at **[AGENTS.md](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`**. + +This folder only points contributors to **`AGENTS.md`** so editor-specific config does not duplicate the canonical docs. diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..2dafdca --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,48 @@ +# Contentstack DataSync Node.js Website Boilerplate – Agent guide + +**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**. + +## What this repo is + +| Field | Detail | +|--------|--------| +| **Name:** | [contentstack/datasync-nodejs-website-boilerplate](https://github.com/contentstack/datasync-nodejs-website-boilerplate) | +| **Purpose:** | Express app that serves a site from Contentstack DataSync–backed content (filesystem or MongoDB SDK), with Nunjucks views and synced data under the configured content store. | +| **Out of scope (if any):** | Not the DataSync sync pipeline itself (webhook listener, manager); this repo is the website layer on top of synced data. | + +## Tech stack (at a glance) + +| Area | Details | +|------|---------| +| Language | JavaScript (Node.js), CommonJS. Conventions: `skills/javascript-style/SKILL.md`. | +| Build | No compile step; run from source. Install dependencies with npm. | +| Tests | No automated test script in `package.json` today. | +| Lint / coverage | ESLint 5 with `.eslintrc.js` (strict rule set). No coverage tool configured. | +| Other | Express 5, Nunjucks, `@contentstack/datasync-filesystem-sdk` / `@contentstack/datasync-mongodb-sdk`, `contentstack` npm package. Optional: Husky hooks (Snyk, Talisman). | + +## Commands (quick reference) + +| Command type | Command | +|--------------|---------| +| Install deps | `npm install` | +| Run locally | `npm start` (uses `bin/www`; `NODE_ENV` selects `config/.js`, default `development`) | +| Lint | `npx eslint .` | +| Husky setup | `npm run pre-commit` | + +CI and automation: [.github/workflows/check-version-bump.yml](.github/workflows/check-version-bump.yml), [.github/workflows/sca-scan.yml](.github/workflows/sca-scan.yml), [.github/workflows/policy-scan.yml](.github/workflows/policy-scan.yml), [.github/workflows/codeql-analysis.yml](.github/workflows/codeql-analysis.yml), [.github/workflows/issues-jira.yml](.github/workflows/issues-jira.yml). + +## Where the documentation lives: skills + +| Skill | Path | What it covers | +|-------|------|----------------| +| Development workflow | `skills/dev-workflow/SKILL.md` | Install, run, hooks, CI expectations, version bumps on PRs | +| JavaScript style | `skills/javascript-style/SKILL.md` | CommonJS patterns, ESLint, matching existing file style | +| DataSync website app | `skills/datasync-website/SKILL.md` | Express entry points, Stack/content store, config and routes | +| Testing | `skills/testing/SKILL.md` | Current test posture; adding tests safely | +| Code review | `skills/code-review/SKILL.md` | PR checklist aligned with this repo | + +An index with “when to use” hints is in `skills/README.md`. + +## Using Cursor (optional) + +If you use **Cursor**, `.cursor/rules/README.md` only points to **`AGENTS.md`**—same docs as everyone else. diff --git a/skills/README.md b/skills/README.md new file mode 100644 index 0000000..44cb854 --- /dev/null +++ b/skills/README.md @@ -0,0 +1,13 @@ +# Skills – Contentstack DataSync Node.js Website Boilerplate + +Source of truth for detailed guidance. Read `AGENTS.md` first, then open the skill that matches your task. + +| Skill folder | Use when | +|--------------|----------| +| `dev-workflow` | Local setup, scripts, Husky/Snyk/Talisman, CI and version-bump rules | +| `javascript-style` | CommonJS, ESLint, and staying consistent with nearby code | +| `datasync-website` | Express app structure, DataSync Stack, config, routes, views, synced content paths | +| `testing` | Adding or running automated tests; credentials and fixtures | +| `code-review` | Preparing or reviewing PRs for this repository | + +Each folder contains `SKILL.md` with YAML frontmatter (`name`, `description`). diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md new file mode 100644 index 0000000..a240aa0 --- /dev/null +++ b/skills/code-review/SKILL.md @@ -0,0 +1,19 @@ +--- +name: code-review +description: PR checklist for this boilerplate—version bumps, security hooks, and consistency with Express/DataSync patterns. +--- + +# Code review – Contentstack DataSync Node.js Website Boilerplate + +## When to use + +- Authoring or reviewing a pull request +- Verifying release readiness for a change that touches app code + +## Instructions + +- **Version bump:** If the PR changes release-affecting files (paths are defined in `.github/workflows/check-version-bump.yml`), `package.json` version must increase and exceed the latest tag. +- **Security / hooks:** Contributors with Husky enabled should pass Snyk and Talisman locally unless bypass is justified; align dependency changes with `.github/workflows/sca-scan.yml` expectations where relevant. +- **Code quality:** ESLint should pass on touched files; new code should match existing patterns in the same directory (CommonJS, existing error handling). +- **Product behavior:** DataSync connection and routes should remain coherent—config changes should be documented for operators (ports, `contentStore`, locales). +- **Ownership:** See `CODEOWNERS` for required reviewers. diff --git a/skills/datasync-website/SKILL.md b/skills/datasync-website/SKILL.md new file mode 100644 index 0000000..4ef3968 --- /dev/null +++ b/skills/datasync-website/SKILL.md @@ -0,0 +1,22 @@ +--- +name: datasync-website +description: Express entry points, Contentstack DataSync Stack, environment config, routes, and where synced content lives in this boilerplate. +--- + +# DataSync website app – Contentstack DataSync Node.js Website Boilerplate + +## When to use + +- Adding or changing pages, routes, middleware, or views +- Connecting or switching DataSync content stores (filesystem vs MongoDB SDK) +- Locating API keys, tokens, ports, or locale settings + +## Instructions + +- **HTTP entry:** `bin/www` creates the server from `app.js` (`module.exports = app`). `app.js` registers Nunjucks (`views/`), static assets under `/static` from `public/`, rate limiting, JSON/urlencoded parsers, and `./routes`. +- **Contentstack Stack:** `models/contentstack.js` uses `require(config.sdk)` to load `Contentstack`, then `Contentstack.Stack(config)` and `Stack.connect(config.contentStore)`. The `sdk` string in `config/.js` must match an installed module name. Export is the connected `Stack` for use in routes. +- **Environment config:** Edit `config/development.js`, `config/staging.js`, or `config/production.js` for `contentstack.apikey`, `deliveryToken`, `contentStore` (e.g. `baseDir: './_contents'` for filesystem), `locales`, and `port`. Do not commit real secrets; use local overrides or secret injection patterns your team agrees on. +- **Routing:** `routes/index.js` mounts `middlewares` and `routes/home.js`. Locale and partials live under `middlewares/` (`locales.js`, `partials.js`). +- **Synced content:** Default filesystem layout uses `_contents` under the project (see `contentStore.baseDir` in config). `schemaNentries/` holds schema-related assets for the sample—treat as part of release-affecting paths when the version-bump workflow applies. +- **Dependencies:** See `package.json` for `@contentstack/datasync-filesystem-sdk`, `@contentstack/datasync-mongodb-sdk`, `contentstack`, `express`, `nunjucks`, etc. +- **Product docs:** [Contentstack DataSync](https://www.contentstack.com/docs/guide/synchronization/contentstack-datasync). diff --git a/skills/dev-workflow/SKILL.md b/skills/dev-workflow/SKILL.md new file mode 100644 index 0000000..a07b4d8 --- /dev/null +++ b/skills/dev-workflow/SKILL.md @@ -0,0 +1,20 @@ +--- +name: dev-workflow +description: Local setup, npm scripts, Husky and security hooks, CI expectations, and PR version-bump rules for this boilerplate. +--- + +# Development workflow – Contentstack DataSync Node.js Website Boilerplate + +## When to use + +- Setting up the project or onboarding someone new +- Changing how commits or CI behave +- Opening a PR that touches application code (version bump may be required) + +## Instructions + +- **Dependencies:** Run `npm install` at the repo root. There is no separate build or bundle step. +- **Run the server:** `npm start` executes `node ./bin/www`. Port and stack config come from `config/.js` (default `development` if `NODE_ENV` is unset). +- **Lint:** `npx eslint .` uses `.eslintrc.js`. There is no `lint` npm script; invoke ESLint directly. +- **Husky:** `npm run pre-commit` installs Husky and marks `.husky/pre-commit` executable. The pre-commit hook runs **Snyk** (`snyk test --all-projects`) and **Talisman**; both CLIs must be installed locally. Set `SKIP_HOOK=1` to bypass (document why if you use this in automation). +- **PR version bump:** [.github/workflows/check-version-bump.yml](../../.github/workflows/check-version-bump.yml) requires `package.json` to change when certain paths change (e.g. `app.js`, `bin/`, `config/`, `middlewares/`, `models/`, `public/`, `routes/`, `views/`, `schemaNentries/`) and the new version must be greater than the latest git tag. Doc-only or `.github`-only changes skip the check per that workflow. diff --git a/skills/javascript-style/SKILL.md b/skills/javascript-style/SKILL.md new file mode 100644 index 0000000..e24dc5f --- /dev/null +++ b/skills/javascript-style/SKILL.md @@ -0,0 +1,18 @@ +--- +name: javascript-style +description: JavaScript and CommonJS conventions, ESLint usage, and matching existing file style in this Node.js boilerplate. +--- + +# JavaScript style – Contentstack DataSync Node.js Website Boilerplate + +## When to use + +- Writing or editing `.js` files under `app.js`, `bin/`, `config/`, `middlewares/`, `models/`, `routes/`, or `public/js/` +- Choosing `var` vs `const`/`let` or module layout in a file that mixes styles + +## Instructions + +- **Modules:** Use CommonJS (`require`, `module.exports`) consistently with the file you are editing. New code in files that already use `const`/`let` should use the same; older files under `config/` and `models/` often use `var`—do not rewrite wholesale for style alone. +- **Lint:** Run `npx eslint .`; rules live in `.eslintrc.js` (extends `eslint:recommended` with many explicit rules, including single quotes and JSDoc-related rules where enabled). +- **Paths:** Prefer `path.join(__dirname, ...)` for filesystem paths when the surrounding code does. +- **Formatting:** `.jsbeautifyrc` applies to JS/HTML formatting where your editor uses it; keep line length and indentation consistent with existing files. diff --git a/skills/testing/SKILL.md b/skills/testing/SKILL.md new file mode 100644 index 0000000..d33986d --- /dev/null +++ b/skills/testing/SKILL.md @@ -0,0 +1,18 @@ +--- +name: testing +description: Automated testing posture for this repo (currently minimal) and how to add tests without leaking credentials. +--- + +# Testing – Contentstack DataSync Node.js Website Boilerplate + +## When to use + +- Adding unit, integration, or E2E tests +- Deciding where test files live and how CI should run them +- Handling API keys and tokens in test fixtures + +## Instructions + +- **Today:** `package.json` has no `test` script and the repository does not ship a standard `test/` tree. Validate changes by running the app (`npm start`) and ESLint (`npx eslint .`) as appropriate. +- **Adding a runner:** Prefer adding a `test` script (e.g. Node’s built-in runner, or Mocha/Jest if the team standardizes) and document the command in `AGENTS.md` when it lands. Keep test-only changes in paths that your CI treats as non–release-affecting where applicable (see version-bump workflow). +- **Credentials:** Never commit real Contentstack keys or tokens. Use environment variables or ignored local config for integration tests; mirror patterns from `config/*.js` with placeholders only in committed files. From 4d737002e24ddd31146fe42c732a31f5d56d8a87 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Wed, 20 May 2026 15:07:44 +0530 Subject: [PATCH 12/16] Update package versions --- .github/workflows/back-merge-pr.yml | 54 +++++++++++++++++ .github/workflows/release.yml | 50 ++++++++++++++++ package-lock.json | 89 +++++++++++++++++------------ package.json | 5 +- 4 files changed, 160 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/back-merge-pr.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/back-merge-pr.yml b/.github/workflows/back-merge-pr.yml new file mode 100644 index 0000000..02b378c --- /dev/null +++ b/.github/workflows/back-merge-pr.yml @@ -0,0 +1,54 @@ +name: Back-merge master to development + +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: read + pull-requests: write + +jobs: + open-back-merge-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Open back-merge PR if needed + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + BASE_BRANCH="development" + SOURCE_BRANCH="master" + + git fetch origin "$BASE_BRANCH" "$SOURCE_BRANCH" + + if ! git show-ref --verify --quiet "refs/remotes/origin/$BASE_BRANCH"; then + echo "Base branch '$BASE_BRANCH' does not exist on origin; skipping." + exit 0 + fi + + SOURCE_SHA=$(git rev-parse "origin/$SOURCE_BRANCH") + BASE_SHA=$(git rev-parse "origin/$BASE_BRANCH") + + if [ "$SOURCE_SHA" = "$BASE_SHA" ]; then + echo "$SOURCE_BRANCH and $BASE_BRANCH are at the same commit; nothing to back-merge." + exit 0 + fi + + EXISTING=$(gh pr list --repo "${{ github.repository }}" --base "$BASE_BRANCH" --head "$SOURCE_BRANCH" --state open --json number --jq 'length') + + if [ "$EXISTING" -gt 0 ]; then + echo "An open PR from $SOURCE_BRANCH to $BASE_BRANCH already exists; skipping." + exit 0 + fi + + gh pr create --repo "${{ github.repository }}" --base "$BASE_BRANCH" --head "$SOURCE_BRANCH" --title "chore: back-merge $SOURCE_BRANCH into $BASE_BRANCH" --body "Automated back-merge after changes landed on \\`$SOURCE_BRANCH\\`. Review and merge to keep \\`$BASE_BRANCH\\` in sync." + + echo "Created back-merge PR $SOURCE_BRANCH -> $BASE_BRANCH." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..438078c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: Release + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "18.x" + - run: npm install + + - name: get-package-details + id: package + uses: codex-team/action-nodejs-package-info@v1.1 + - name: install npm packall + run: npm install npm-pack-all + + - run: node node_modules/.bin/npm-pack-all + - uses: Klemensas/action-autotag@stable + id: update_tag + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + tag_prefix: "v" + - name: Create Release + if: steps.update_tag.outputs.tagname + uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ steps.update_tag.outputs.tagname }} + release_name: Release ${{ steps.update_tag.outputs.tagname }} + draft: false # Default value, but nice to set explicitly + prerelease: false # Default value, but nice to set explicitly + - name: Upload Release Asset + if: steps.update_tag.outputs.tagname + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing its ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz + asset_name: ${{ steps.package.outputs.name }}-${{ steps.package.outputs.version }}.tgz + asset_content_type: application/tgz \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 556029a..f6805d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.12", + "version": "0.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.12", + "version": "0.0.13", "license": "MIT", "dependencies": { "@contentstack/datasync-filesystem-sdk": "1.5.2", @@ -65,12 +65,12 @@ } }, "node_modules/@contentstack/datasync-mongodb-sdk": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@contentstack/datasync-mongodb-sdk/-/datasync-mongodb-sdk-1.0.14.tgz", - "integrity": "sha512-AfSvriKQC4mo+VqoH21Wa8U6q5r4qoP0scuiMt46EXjaYAzAqBYGd+jj4cyZA1FXZjPEocOVSYUZJN/qVkrAmw==", + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@contentstack/datasync-mongodb-sdk/-/datasync-mongodb-sdk-1.0.15.tgz", + "integrity": "sha512-eup74aFdC0GuHi7hycRyvIJ9a0fVYl555ynKLGbxg0DNtDbgJloIpkpODLtJD9vPe8CJnbdFI4LNNVIEbyrAkQ==", "license": "MIT", "dependencies": { - "lodash": "^4.17.23", + "lodash": "^4.18.1", "mongodb": "^6.21.0", "npm-pack": "^1.0.0", "sift": "^17.1.3" @@ -80,15 +80,15 @@ } }, "node_modules/@contentstack/utils": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.9.0.tgz", - "integrity": "sha512-4U2YN/twGP1yJj4nA1KQ/VhS67iTUFSgN8W8HNQDQ0PQEkPiqWdouS0Bv1AvggthKbBYYU0vfMqsoU8J++J7rA==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.9.1.tgz", + "integrity": "sha512-THZM0rNuq0uOSKkKnvzp8lsPDvvdKIvJIcMa9JBv4foL9rC8RWkWffa2yMyb+9m/5HZrdAmpEWdubkGwARa8WQ==", "license": "MIT" }, "node_modules/@mongodb-js/saslprep": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.6.tgz", - "integrity": "sha512-y+x3H1xBZd38n10NZF/rEBlvDOOMQ6LKUTHqr8R9VkJ+mmQOYtJFxIlkkK8fZrtOiL6VixbOBWMbZGBdal3Z1g==", + "version": "1.4.11", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.4.11.tgz", + "integrity": "sha512-o9rAHc0IpIjuPSxRutWpE1F62x7n+4mVS4rCNHkzhIUMQcc18bb6xEq5wd2NdN0WjepIyXIppRshYI2kQDOZVA==", "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" @@ -152,9 +152,9 @@ } }, "node_modules/ajv": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", - "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -294,9 +294,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", - "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "dev": true, "license": "MIT", "dependencies": { @@ -437,9 +437,9 @@ "license": "MIT" }, "node_modules/content-disposition": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", - "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz", + "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==", "license": "MIT", "engines": { "node": ">=18" @@ -1213,9 +1213,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -1971,9 +1971,9 @@ } }, "node_modules/qs": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", - "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", + "version": "6.15.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.2.tgz", + "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -2246,13 +2246,13 @@ } }, "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" + "object-inspect": "^1.13.4" }, "engines": { "node": ">= 0.4" @@ -2524,17 +2524,34 @@ } }, "node_modules/type-is": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz", + "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==", "license": "MIT", "dependencies": { - "content-type": "^1.0.5", + "content-type": "^2.0.0", "media-typer": "^1.1.0", "mime-types": "^3.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/type-is/node_modules/content-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz", + "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/unpipe": { diff --git a/package.json b/package.json index 3493597..b4a03c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.12", + "version": "0.0.13", "private": true, "scripts": { "start": "node ./bin/www", @@ -30,6 +30,7 @@ "author": "Contentstack LLC ", "license": "MIT", "overrides": { - "lodash": "^4.18.1" + "lodash": "^4.18.1", + "qs": "^6.15.2" } } From a5a2bc3cb108486f7f83b242af4bdb04114d2f2e Mon Sep 17 00:00:00 2001 From: Aravind Kumar Date: Fri, 19 Jun 2026 13:01:49 +0530 Subject: [PATCH 13/16] issues-jira.yml --- .github/workflows/issues-jira.yml | 121 +++++++++++++++++++++++++----- 1 file changed, 104 insertions(+), 17 deletions(-) diff --git a/.github/workflows/issues-jira.yml b/.github/workflows/issues-jira.yml index 7bf0469..5f65d0b 100644 --- a/.github/workflows/issues-jira.yml +++ b/.github/workflows/issues-jira.yml @@ -2,30 +2,117 @@ name: Create Jira Ticket for Github Issue on: issues: - types: [opened] + types: [opened, reopened] jobs: issue-jira: runs-on: ubuntu-latest steps: + - name: Create Jira Issue + id: create_jira + uses: actions/github-script@v9 + with: + script: | + const baseUrl = process.env.JIRA_BASE_URL; + const userEmail = process.env.JIRA_USER_EMAIL; + const jiraToken = process.env.JIRA_API_TOKEN; + const jiraProject = process.env.JIRA_PROJECT; + const jiraIssueType = process.env.JIRA_ISSUE_TYPE; + const jiraFields = JSON.parse(process.env.ISSUES_JIRA_FIELDS); + + let requestBody = JSON.stringify({ + fields: { + ...jiraFields, + "project": { + "key": jiraProject + }, + "issuetype": { + "name": jiraIssueType + }, + "summary": "Github | Issue | ${{ github.event.repository.name }} | ${{ github.event.issue.title }}", + "description": { + "version": 1, + "type": "doc", + "content": [ + { + "type": "paragraph", + "content": [ + { + "type": "text", + "text": "Github Issue", + "marks": [ + { + "type": "strong" + } + ] + }, + { + "type": "text", + "text": ": " + }, + { + "type": "text", + "text": "${{ github.event.issue.html_url }}", + "marks": [ + { + "type": "link", + "attrs": { + "href": "${{ github.event.issue.html_url }}" + } + } + ] + } + ] + }, + { + "type": "paragraph", + "content": [ + { + "type": "text", + "text": "Description", + "marks": [ + { + "type": "strong" + } + ] + }, + { + "type": "text", + "text": ":" + } + ] + }, + { + "type": "codeBlock", + "content": [ + { + "type": "text", + "text": `${{ github.event.issue.body }}` + } + ] + } + ] + } + } + }); - - name: Login to Jira - uses: atlassian/gajira-login@master + const response = await fetch(`${baseUrl}/rest/api/3/issue`, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Authorization': `Basic ${btoa(userEmail + ":" + jiraToken)}` + }, + body: requestBody + }); + if (!response.ok) { + throw new Error(`JIRA API error! Status: ${response.status}`); + } + const data = await response.json(); + console.log('Jira Issue Created:', data.key); env: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} - - - name: Create Jira Issue - id: create_jira - uses: atlassian/gajira-create@master - with: - project: ${{ secrets.JIRA_PROJECT }} - issuetype: ${{ secrets.JIRA_ISSUE_TYPE }} - summary: Github | Issue | ${{ github.event.repository.name }} | ${{ github.event.issue.title }} - description: | - *GitHub Issue:* ${{ github.event.issue.html_url }} - - *Description:* - ${{ github.event.issue.body }} - fields: "${{ secrets.ISSUES_JIRA_FIELDS }}" \ No newline at end of file + JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }} + JIRA_ISSUE_TYPE: ${{ secrets.JIRA_ISSUE_TYPE }} + ISSUES_JIRA_FIELDS: "${{ secrets.ISSUES_JIRA_FIELDS }}" From 6a9e03603c044edd921311d42fe36a5fd9af228b Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Wed, 24 Jun 2026 14:26:37 +0530 Subject: [PATCH 14/16] Fix: Upgrade dependencies --- package-lock.json | 93 +++++++++++++++++++++++++++-------------------- package.json | 10 ++--- 2 files changed, 58 insertions(+), 45 deletions(-) diff --git a/package-lock.json b/package-lock.json index f6805d1..2a3c6f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.13", + "version": "0.0.14", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.13", + "version": "0.0.14", "license": "MIT", "dependencies": { - "@contentstack/datasync-filesystem-sdk": "1.5.2", - "@contentstack/datasync-mongodb-sdk": "^1.0.14", + "@contentstack/datasync-filesystem-sdk": "1.5.3", + "@contentstack/datasync-mongodb-sdk": "^1.0.15", "async": "^3.2.6", - "contentstack": "^3.24.1", + "contentstack": "^3.27.0", "debug": "~3.2.7", "express": "^5.2.1", - "express-rate-limit": "^7.1.5", + "express-rate-limit": "^7.5.1", "http-errors": "~2.0.0", "morgan": "~1.10.1", "nunjucks": "^3.2.4", @@ -27,13 +27,13 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", - "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.28.5", + "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" }, @@ -42,9 +42,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.28.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", - "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", "dev": true, "license": "MIT", "engines": { @@ -52,13 +52,13 @@ } }, "node_modules/@contentstack/datasync-filesystem-sdk": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@contentstack/datasync-filesystem-sdk/-/datasync-filesystem-sdk-1.5.2.tgz", - "integrity": "sha512-crX+FW4UPdYYl6cxvqDyCf2UTrEhHB4MKMXDsN22sWnlzBzD+tBPZwzD8Ytf/Z04NfoVYjR6UBDEVQC6faQkEA==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@contentstack/datasync-filesystem-sdk/-/datasync-filesystem-sdk-1.5.3.tgz", + "integrity": "sha512-ll1lzRZEgAdVqentnYEfR83QMURe+QC8wKPIQFSoHL4IhM3Za/JjtshvdxFCLUrbyo24e7hEEqNT2bO6VHiKag==", "license": "MIT", "dependencies": { "json-mask": "2.0.0", - "lodash": "^4.17.23", + "lodash": "^4.18.1", "mkdirp": "^3.0.1", "npm-pack": "^1.0.0", "sift": "17.1.3" @@ -253,20 +253,20 @@ } }, "node_modules/body-parser": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", - "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz", + "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==", "license": "MIT", "dependencies": { "bytes": "^3.1.2", - "content-type": "^1.0.5", + "content-type": "^2.0.0", "debug": "^4.4.3", - "http-errors": "^2.0.0", - "iconv-lite": "^0.7.0", + "http-errors": "^2.0.1", + "iconv-lite": "^0.7.2", "on-finished": "^2.4.1", - "qs": "^6.14.1", - "raw-body": "^3.0.1", - "type-is": "^2.0.1" + "qs": "^6.15.2", + "raw-body": "^3.0.2", + "type-is": "^2.1.0" }, "engines": { "node": ">=18" @@ -276,6 +276,19 @@ "url": "https://opencollective.com/express" } }, + "node_modules/body-parser/node_modules/content-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz", + "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/body-parser/node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -294,9 +307,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", - "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz", + "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==", "dev": true, "license": "MIT", "dependencies": { @@ -601,9 +614,9 @@ } }, "node_modules/es-object-atoms": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" @@ -1213,9 +1226,9 @@ } }, "node_modules/hasown": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", - "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -2227,14 +2240,14 @@ } }, "node_modules/side-channel": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", + "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "object-inspect": "^1.13.3", - "side-channel-list": "^1.0.0", + "object-inspect": "^1.13.4", + "side-channel-list": "^1.0.1", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" }, diff --git a/package.json b/package.json index b4a03c2..f1d9ae2 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,19 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.13", + "version": "0.0.14", "private": true, "scripts": { "start": "node ./bin/www", "pre-commit": "husky install && husky && chmod +x .husky/pre-commit" }, "dependencies": { - "@contentstack/datasync-filesystem-sdk": "1.5.2", - "@contentstack/datasync-mongodb-sdk": "^1.0.14", + "@contentstack/datasync-filesystem-sdk": "1.5.3", + "@contentstack/datasync-mongodb-sdk": "^1.0.15", "async": "^3.2.6", - "contentstack": "^3.24.1", + "contentstack": "^3.27.0", "debug": "~3.2.7", "express": "^5.2.1", - "express-rate-limit": "^7.1.5", + "express-rate-limit": "^7.5.1", "http-errors": "~2.0.0", "morgan": "~1.10.1", "nunjucks": "^3.2.4", From e10a01c9f54317f6224686fdf4134e64087356b3 Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Wed, 24 Jun 2026 14:33:30 +0530 Subject: [PATCH 15/16] version bump --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2a3c6f0..f392ea5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.14", + "version": "0.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.14", + "version": "0.0.13", "license": "MIT", "dependencies": { "@contentstack/datasync-filesystem-sdk": "1.5.3", diff --git a/package.json b/package.json index f1d9ae2..e6d5c36 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "datasync-nodejs-sdk-boilerplate", - "version": "0.0.14", + "version": "0.0.13", "private": true, "scripts": { "start": "node ./bin/www", From c86365b250c35f1972aeeb74a9703af7e84c9aef Mon Sep 17 00:00:00 2001 From: harshitha-cstk Date: Wed, 24 Jun 2026 14:41:39 +0530 Subject: [PATCH 16/16] upgrade dependency --- package-lock.json | 26 +++++++++----------------- package.json | 2 +- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index f392ea5..4bf1231 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "express": "^5.2.1", "express-rate-limit": "^7.5.1", "http-errors": "~2.0.0", - "morgan": "~1.10.1", + "morgan": "~1.11.0", "nunjucks": "^3.2.4", "path": "^0.12.7" }, @@ -1665,19 +1665,23 @@ } }, "node_modules/morgan": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.1.tgz", - "integrity": "sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.11.0.tgz", + "integrity": "sha512-zSkVu3t18r39pw4ixfBKvfZi3y2UOqr7d4WYwcj3m8nXpEQK4rPO6GLzs/CExoRgmX3y9EjmmcXqv6jq0SK46g==", "license": "MIT", "dependencies": { "basic-auth": "~2.0.1", "debug": "2.6.9", "depd": "~2.0.0", - "on-finished": "~2.3.0", + "on-finished": "~2.4.1", "on-headers": "~1.1.0" }, "engines": { "node": ">= 0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/morgan/node_modules/debug": { @@ -1695,18 +1699,6 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, - "node_modules/morgan/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", diff --git a/package.json b/package.json index e6d5c36..a852ae9 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "express": "^5.2.1", "express-rate-limit": "^7.5.1", "http-errors": "~2.0.0", - "morgan": "~1.10.1", + "morgan": "~1.11.0", "nunjucks": "^3.2.4", "path": "^0.12.7" },