From 4e7f624a24583fb1edd8b14b4a23cd5f4867f4f8 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Mon, 18 Mar 2024 18:38:23 +0530 Subject: [PATCH 1/6] added logger for errors for multiple files errors, version bump --- package-lock.json | 204 ++++++++++++------ packages/contentstack-migration/package.json | 4 +- .../src/utils/error-helper.js | 33 ++- .../src/utils/migration-logger.js | 28 +++ packages/contentstack/package.json | 2 +- pnpm-lock.yaml | 2 +- 6 files changed, 201 insertions(+), 72 deletions(-) create mode 100644 packages/contentstack-migration/src/utils/migration-logger.js diff --git a/package-lock.json b/package-lock.json index 27ece7d6b4..bebe4d4273 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2068,9 +2068,9 @@ } }, "node_modules/@oclif/plugin-plugins": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.3.3.tgz", - "integrity": "sha512-XRwm2mnbOHPmin5bI4bzjD9imGy+HpCN7eQlTM+akcAHPHcMueyo8O/BHzCeeiS+mNMFYxvc5/6p/YH5A7/94w==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.3.6.tgz", + "integrity": "sha512-a8GPZBnoVCBjlCEPgp8R93S9HyxSlGnoCvb6NIhqpVe4bk4DhxB9TongCWWaBvdUqovTbhgOfwxRB06oSe2plA==", "hasShrinkwrap": true, "dependencies": { "@oclif/core": "^3.23.0", @@ -6613,9 +6613,9 @@ } }, "node_modules/@slack/logger/node_modules/@types/node": { - "version": "20.11.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz", - "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "dependencies": { "undici-types": "~5.26.4" } @@ -7713,9 +7713,9 @@ } }, "node_modules/adm-zip": { - "version": "0.5.11", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.11.tgz", - "integrity": "sha512-bSG/kcTQRVyCZ3aOWt3nu/KGIxkfSNi7MXzgKr/MHfKbqPakFESQvaujpUaAG8OQuSroxYMY5vLMpdE6+oND2Q==", + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.12.tgz", + "integrity": "sha512-6TVU49mK6KZb4qG6xWaaM4C7sA/sgUMLy/JYMOzkcp3BvVLpW0fXDFQiIzAuxFCt/2+xD7fNIiPFAoLZPhVNLQ==", "engines": { "node": ">=6.0" } @@ -8238,9 +8238,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1574.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1574.0.tgz", - "integrity": "sha512-AC3VptGeggp7AFGj66PIt9GrnLyDBo7Owb5TmbGDe2OIvgeHH3nBD4S3wRZQ9u3Ea6iREnalXxQ2n5rflCeG9g==", + "version": "2.1579.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1579.0.tgz", + "integrity": "sha512-TYv/bK2kVT/dfrpjAPL6sEhku4uH9EB18gRa6p9gi0fPtmhe49HrYoN2xmPNSqLPj4/CtSXmZhg91Ny1DhG8/Q==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -8269,11 +8269,11 @@ } }, "node_modules/axios": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", - "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -8479,12 +8479,15 @@ } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/binaryextensions": { @@ -8981,9 +8984,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001597", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001597.tgz", - "integrity": "sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==", + "version": "1.0.30001599", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001599.tgz", + "integrity": "sha512-LRAQHZ4yT1+f9LemSMeqdMpMxZcc4RMWdj4tiFe3G8tNkWK+E58g+/tzotb5cU6TbcVJLr4fySiAW7XmxQvZQA==", "dev": true, "funding": [ { @@ -9974,6 +9977,54 @@ "node": ">=12" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/date-fns": { "version": "1.30.1", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", @@ -10456,9 +10507,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.699", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.699.tgz", - "integrity": "sha512-I7q3BbQi6e4tJJN5CRcyvxhK0iJb34TV8eJQcgh+fR2fQ8miMgZcEInckCo1U9exDHbfz7DLDnFn8oqH/VcRKw==", + "version": "1.4.708", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.708.tgz", + "integrity": "sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==", "dev": true }, "node_modules/elegant-spinner": { @@ -10596,16 +10647,20 @@ } }, "node_modules/es-abstract": { - "version": "1.22.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", - "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", + "version": "1.23.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.2.tgz", + "integrity": "sha512-60s3Xv2T2p1ICykc7c+DNDPLDMm9t4QxCOUU0K9JxiLjM3C1zB9YVdN7tjxrFd4+AkZ8CdX1ovUga4P2+1e+/w==", "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", "es-define-property": "^1.0.0", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", @@ -10616,10 +10671,11 @@ "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.1", + "hasown": "^2.0.2", "internal-slot": "^1.0.7", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.3", @@ -10630,17 +10686,17 @@ "object-keys": "^1.1.1", "object.assign": "^4.1.5", "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.0", + "safe-array-concat": "^1.1.2", "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", "string.prototype.trimstart": "^1.0.7", "typed-array-buffer": "^1.0.2", "typed-array-byte-length": "^1.0.1", "typed-array-byte-offset": "^1.0.2", "typed-array-length": "^1.0.5", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.14" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -10697,6 +10753,17 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", @@ -10870,9 +10937,9 @@ } }, "node_modules/eslint-config-oclif-typescript": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eslint-config-oclif-typescript/-/eslint-config-oclif-typescript-3.1.2.tgz", - "integrity": "sha512-6dk2DBzI5UGAg5Pl7b1k3a6d2/UQNO/uEJm92EEJp09fX3+HOy1Rj2BzcOxNKgLjdBV021HXgj5X/c1r1GS3jQ==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/eslint-config-oclif-typescript/-/eslint-config-oclif-typescript-3.1.3.tgz", + "integrity": "sha512-lRSkiSd2AGu/D0EgK5Bz/u92c2t5nK2lAgPPPlAGHUXEL2IhjR+KNWf2REZReMD4IzAGVbCKlVqDNTDybJ11qg==", "dev": true, "dependencies": { "@typescript-eslint/eslint-plugin": "^6.21.0", @@ -10882,7 +10949,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-mocha": "^10.4.1", "eslint-plugin-n": "^15", - "eslint-plugin-perfectionist": "^2.6.0" + "eslint-plugin-perfectionist": "^2.7.0" }, "engines": { "node": ">=18.0.0" @@ -11506,9 +11573,9 @@ } }, "node_modules/eslint-plugin-perfectionist": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-2.6.0.tgz", - "integrity": "sha512-hee0Fu5825v+WTIhrRIJdWO8biUgm9O+c4Q1AEXIIGsXDHrLv5cdXfVUdnQcYgGtI/4X+tdFu69iVofHCIkvtw==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-2.7.0.tgz", + "integrity": "sha512-RpSMc0T0DT9DlOj4APzwlAjCqQMxFdsIYlupe73eDkKLn1mMK7fVw2z3nj2y822szKOpvHA7bDa56ySOlr4GXw==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^6.13.0", @@ -12566,9 +12633,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -14518,6 +14585,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -22383,13 +22464,14 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -22399,13 +22481,13 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -25494,7 +25576,7 @@ "@contentstack/cli-command": "~1.2.17", "@contentstack/cli-config": "~1.6.3", "@contentstack/cli-launch": "~1.0.17", - "@contentstack/cli-migration": "~1.5.0", + "@contentstack/cli-migration": "~1.5.2", "@contentstack/cli-utilities": "~1.6.0", "@contentstack/management": "~1.15.3", "@oclif/core": "^2.9.3", @@ -25604,9 +25686,9 @@ "dev": true }, "packages/contentstack-audit/node_modules/@types/node": { - "version": "20.11.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.27.tgz", - "integrity": "sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -27427,7 +27509,7 @@ }, "packages/contentstack-migration": { "name": "@contentstack/cli-migration", - "version": "1.5.1", + "version": "1.5.2", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", @@ -27622,4 +27704,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/packages/contentstack-migration/package.json b/packages/contentstack-migration/package.json index aae748882a..a1ccf29819 100644 --- a/packages/contentstack-migration/package.json +++ b/packages/contentstack-migration/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/cli-migration", - "version": "1.5.1", + "version": "1.5.2", "author": "@contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { @@ -66,4 +66,4 @@ "cm:migration": "O-MGRTN" } } -} +} \ No newline at end of file diff --git a/packages/contentstack-migration/src/utils/error-helper.js b/packages/contentstack-migration/src/utils/error-helper.js index f1048eb743..c1832ec15c 100644 --- a/packages/contentstack-migration/src/utils/error-helper.js +++ b/packages/contentstack-migration/src/utils/error-helper.js @@ -1,8 +1,10 @@ const { highlight } = require('cardinal'); const { keys } = Object; const chalk = require('chalk'); -const isEmpty = require('lodash/isEmpty') - +const isEmpty = require('lodash/isEmpty'); +const MigrationLogger = require('./migration-logger'); +const fs = require('fs'); +const logger = new MigrationLogger(process.cwd()); const { readFile } = require('./fs-helper'); const groupBy = require('./group-by'); @@ -19,41 +21,58 @@ const getLineWithContext = (lines, lineNumber, context) => { }; }; +function removeSpecialCharacter(str) { + return str.replace(/\u001b\[\d+m/g, ''); +} + module.exports = (errors) => { const errorsByFile = groupBy(errors, 'file'); const messages = []; for (const file of keys(errorsByFile)) { + const errorLogs = {}; + errorLogs[file] = {}; const fileContents = readFile(file); const highlightedCode = highlight(fileContents, { linenos: true }); const lines = highlightedCode.split('\n'); const fileErrorsMessage = chalk`{red Errors in ${file}}\n\n`; + errorLogs[file].fileErrorsMessage = fileErrorsMessage.replace(/\u001b\[\d+m/g, ''); const errorMessages = errorsByFile[file] .map((error) => { const callsite = error.meta.callsite; const context = 2; - const { before, line, after } = getLineWithContext(lines, callsite.line, context); + let { before, line, after } = getLineWithContext(lines, callsite.line, context); const beforeLines = before.map((_line) => chalk`${_line}\n`); const afterLines = after.map((_line) => chalk`${_line}\n`); const highlightedLine = chalk`{bold ${line}}\n`; + before = removeSpecialCharacter(before.join('\n')); + after = removeSpecialCharacter(after.join('\n')); + line = removeSpecialCharacter(line); + errorLogs[file].lines = { before, line, after }; + const formattedCode = beforeLines + highlightedLine + afterLines; if (error.payload.apiError) { - return chalk`{red Line ${String(callsite.line)}:} {bold ${error.payload.apiError.message}}\n${formattedCode}`; + errorLogs[file].apiError = true; + errorLogs[file].errorCode = error.payload.apiError.errorCode; + errorLogs[file].errors = error.payload.apiError.errors; } - if (error.message) { - return chalk`{red Line ${String(callsite.line)}:} {bold ${error.message}}\n${formattedCode}`; + if (error.message && !error.payload.apiError) { + errorLogs[file].apiError = false; + errorLogs[file].error = error.message; } - return chalk`{red Line ${String(callsite.line)}:} {bold something went wrong here.}\n${formattedCode}`; }) .join('\n'); messages.push(`${fileErrorsMessage}${errorMessages}`); + logger.log('error', errorLogs); } if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) { console.error('Migration error---', errors); + logger.log('error', errors); } else { + logger.log('error', { error: messages.join('\n') }); console.log(messages.join('\n')); } // eslint-disable-next-line diff --git a/packages/contentstack-migration/src/utils/migration-logger.js b/packages/contentstack-migration/src/utils/migration-logger.js new file mode 100644 index 0000000000..76068082f7 --- /dev/null +++ b/packages/contentstack-migration/src/utils/migration-logger.js @@ -0,0 +1,28 @@ +const winston = require('winston'); +const path = require('path'); +module.exports = class MigrationLogger { + constructor(filePath) { + this.filePath = path.join(filePath, 'migration-logs'); + this.logger = winston.createLogger({ + levels: { info: 1, error: 2 }, + transports: [ + new winston.transports.File({ + level: 'error', + filename: path.join(this.filePath, 'error.logs'), + format: winston.format.combine(winston.format.timestamp(), winston.format.json()), + }), + new winston.transports.File({ + level: 'info', + filename: path.join(this.filePath, 'info.logs'), + format: winston.format.combine(winston.format.timestamp(), winston.format.json()), + }), + ], + }); + } + log(level, message) { + if (level === 'info') { + this.logger.log('info', message); + } + this.logger.log('error', message); + } +}; diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 5f08ac8688..172727fc10 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -36,7 +36,7 @@ "@contentstack/cli-command": "~1.2.17", "@contentstack/cli-config": "~1.6.3", "@contentstack/cli-launch": "~1.0.17", - "@contentstack/cli-migration": "~1.5.0", + "@contentstack/cli-migration": "~1.5.2", "@contentstack/cli-utilities": "~1.6.0", "@contentstack/management": "~1.15.3", "@oclif/core": "^2.9.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e4234954c6..1d6bb5521e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: '@contentstack/cli-command': ~1.2.17 '@contentstack/cli-config': ~1.6.3 '@contentstack/cli-launch': ~1.0.17 - '@contentstack/cli-migration': ~1.5.0 + '@contentstack/cli-migration': ~1.5.2 '@contentstack/cli-utilities': ~1.6.0 '@contentstack/management': ~1.15.3 '@oclif/core': ^2.9.3 From 3f3091a48562feb19255c177b8b428f929b2caf5 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Mon, 18 Mar 2024 19:29:48 +0530 Subject: [PATCH 2/6] removed loggerService from script --- .../src/utils/entry-create-script.ts | 26 ++----------------- .../src/utils/entry-create-update-script.ts | 18 ++----------- .../src/utils/entry-update-script.ts | 18 ++----------- 3 files changed, 6 insertions(+), 56 deletions(-) diff --git a/packages/contentstack-branches/src/utils/entry-create-script.ts b/packages/contentstack-branches/src/utils/entry-create-script.ts index f3388ead13..df58d050ae 100644 --- a/packages/contentstack-branches/src/utils/entry-create-script.ts +++ b/packages/contentstack-branches/src/utils/entry-create-script.ts @@ -9,7 +9,6 @@ export function entryCreateScript(contentType) { const omit = require('lodash/omit'); const compact = require('lodash/compact') const isPlainObject = require('lodash/isPlainObject'); - const {cliux, LoggerService} = require('@contentstack/cli-utilities') module.exports = async ({ migration, stackSDKInstance, managementAPIClient, config, branch, apiKey }) => { const keysToRemove = [ 'content_type_uid', @@ -41,7 +40,6 @@ export function entryCreateScript(contentType) { let assetRefPath = {}; let downloadedAssets = []; let parent=[]; - let logger; function getValueByPath(obj, path) { return path.split('[').reduce((o, key) => o && o[key.replace(/\]$/, '')], obj); @@ -470,10 +468,6 @@ export function entryCreateScript(contentType) { successTitle: 'Entries Created Successfully', failedTitle: 'Failed to create entries', task: async () => { - //logger file - if(!fs.existsSync(path.join(filePath, 'entry-migration'))){ - logger = new LoggerService(filePath, 'entry-migration'); - } const compareBranchEntries = await managementAPIClient .stack({ api_key: stackSDKInstance.api_key, branch_uid: compareBranch }) @@ -521,15 +515,7 @@ export function entryCreateScript(contentType) { async function updateEntry(entry, entryDetails) { Object.assign(entry, { ...entryDetails }); await entry.update().catch(err => { - let errorMsg = 'Entry update failed for uid: ' + entry?.uid + ', title: ' + entry?.title + '. '; - if(err?.errors?.title){ - errorMsg += 'title'+ err?.errors?.title; - }else if(err?.errors?.entry){ - errorMsg += err?.errors?.entry; - }else{ - errorMsg += (err?.entry?.errorMessage || err?.errorMessage || err?.message) ?? 'Something went wrong!'; - } - logger.error(errorMsg) + throw err; }); } @@ -563,15 +549,7 @@ export function entryCreateScript(contentType) { if(entryDetails !== undefined){ entryDetails = updateAssetDetailsInEntries(entryDetails); let createdEntry = await stackSDKInstance.contentType('${contentType}').entry().create({ entry: entryDetails }).catch(err => { - let errorMsg = 'Entry creation failed for contentType: ' + contentType + ', title: ' + entryDetails?.title + '. '; - if(err?.errors?.title){ - errorMsg += err?.errors?.title; - }else if(err?.errors?.entry){ - errorMsg += err?.errors?.entry; - }else{ - errorMsg += (err?.entry?.errorMessage || err?.errorMessage || err?.message) ?? 'Something went wrong!'; - } - logger.error(errorMsg) + throw err }); if(createdEntry){ if (flag.references) { diff --git a/packages/contentstack-branches/src/utils/entry-create-update-script.ts b/packages/contentstack-branches/src/utils/entry-create-update-script.ts index fe52aaedac..0f11a210c3 100644 --- a/packages/contentstack-branches/src/utils/entry-create-update-script.ts +++ b/packages/contentstack-branches/src/utils/entry-create-update-script.ts @@ -9,7 +9,6 @@ export function entryCreateUpdateScript(contentType) { const omit = require('lodash/omit'); const compact = require('lodash/compact') const isPlainObject = require('lodash/isPlainObject'); - const {cliux, LoggerService} = require('@contentstack/cli-utilities') module.exports = async ({ migration, stackSDKInstance, managementAPIClient, config, branch, apiKey }) => { const keysToRemove = [ 'content_type_uid', @@ -42,7 +41,6 @@ export function entryCreateUpdateScript(contentType) { let assetUrlMapper = {}; let assetRefPath = {}; let parent=[]; - let logger; function converter(data) { let arr = []; @@ -485,10 +483,6 @@ export function entryCreateUpdateScript(contentType) { successMessage: 'Entries Updated Successfully', failedMessage: 'Failed to update entries', task: async () => { - //logger file - if(!fs.existsSync(path.join(filePath, 'entry-migration'))){ - logger = new LoggerService(filePath, 'entry-migration'); - } let compareBranchEntries = await managementAPIClient .stack({ api_key: stackSDKInstance.api_key, branch_uid: compareBranch }) .contentType('${contentType}') @@ -540,15 +534,7 @@ export function entryCreateUpdateScript(contentType) { if (entry) { Object.assign(entry, { ...entryDetails }); await entry.update().catch(err => { - let errorMsg = 'Entry update failed for uid: ' + entry?.uid + ', title: ' + entry?.title + '.'; - if(err?.errors?.title){ - errorMsg += err?.errors?.title; - }else if(err?.errors?.entry){ - errorMsg += err?.errors?.entry; - }else{ - errorMsg += (err?.entry?.errorMessage || err?.errorMessage || err?.message) ?? 'Something went wrong!'; - } - logger.error(errorMsg) + throw err }); } } @@ -623,7 +609,7 @@ export function entryCreateUpdateScript(contentType) { .entry() .create({ entry: entryDetails }) .catch(err => { - (err?.errorMessage || err?.message) ? err?.errorMessage || err?.message : 'Something went wrong!' + throw err; }) if(createdEntry){ diff --git a/packages/contentstack-branches/src/utils/entry-update-script.ts b/packages/contentstack-branches/src/utils/entry-update-script.ts index 59222ac58d..7e35198709 100644 --- a/packages/contentstack-branches/src/utils/entry-update-script.ts +++ b/packages/contentstack-branches/src/utils/entry-update-script.ts @@ -9,7 +9,6 @@ export function entryUpdateScript(contentType) { const omit = require('lodash/omit'); const compact = require('lodash/compact') const isPlainObject = require('lodash/isPlainObject'); - const {cliux, LoggerService} = require('@contentstack/cli-utilities') module.exports = async ({ migration, stackSDKInstance, managementAPIClient, config, branch, apiKey }) => { const keysToRemove = [ 'content_type_uid', @@ -42,7 +41,6 @@ export function entryUpdateScript(contentType) { let assetUrlMapper = {}; let assetRefPath = {}; let parent=[]; - let logger; function converter(data) { let arr = []; @@ -484,10 +482,6 @@ export function entryUpdateScript(contentType) { successMessage: 'Entries Updated Successfully', failedMessage: 'Failed to update entries', task: async () => { - //logger file - if(!fs.existsSync(path.join(filePath, 'entry-migration'))){ - logger = new LoggerService(filePath, 'entry-migration'); - } let compareBranchEntries = await managementAPIClient .stack({ api_key: stackSDKInstance.api_key, branch_uid: compareBranch }) @@ -539,15 +533,7 @@ export function entryUpdateScript(contentType) { async function updateEntry(entry, entryDetails) { Object.assign(entry, { ...entryDetails }); await entry.update().catch(err => { - let errorMsg = 'Entry update failed for uid: ' + entry?.uid + ', title: ' + entry?.title + '.'; - if(err?.errors?.title){ - errorMsg += err?.errors?.title; - }else if(err?.errors?.entry){ - errorMsg += err?.errors?.entry; - }else{ - errorMsg += (err?.entry?.errorMessage || err?.errorMessage || err?.message) ?? 'Something went wrong!'; - } - logger.error(errorMsg) + throw err }); } @@ -620,7 +606,7 @@ export function entryUpdateScript(contentType) { .entry() .create({ entry: entryDetails }) .catch(err => { - (err?.errorMessage || err?.message) ? err?.errorMessage || err?.message : 'Something went wrong!' + throw err; }) if(createdEntry){ From 59a409aef79109b843bba5aa1e89cf26a6351e8e Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 20 Mar 2024 18:32:23 +0530 Subject: [PATCH 3/6] Added error logs only and for the api errors showing only the selected fields, removed the error handler and updated the entry migration script --- .../src/utils/asset-folder-create-script.ts | 4 +- .../src/utils/entry-create-script.ts | 18 ++-- .../src/commands/cm/stacks/migration.js | 24 ++--- .../src/utils/error-handler.js | 26 +++-- .../src/utils/error-helper.js | 98 ++++++++++--------- .../src/utils/logger.js | 8 +- .../src/utils/migration-logger.js | 10 +- 7 files changed, 90 insertions(+), 98 deletions(-) diff --git a/packages/contentstack-branches/src/utils/asset-folder-create-script.ts b/packages/contentstack-branches/src/utils/asset-folder-create-script.ts index 30ad3ec1fe..a0c97bfd1c 100644 --- a/packages/contentstack-branches/src/utils/asset-folder-create-script.ts +++ b/packages/contentstack-branches/src/utils/asset-folder-create-script.ts @@ -114,9 +114,9 @@ export function assetFolderCreateScript(contentType) { const createAssetTask = () => { return { - title: 'Create Assets Folder', + title: 'Check and create asset folder in base branch', successTitle: 'Assets folder Created Successfully', - failedTitle: 'Failed to create assets folder', + failedTitle: 'Failed to create assets folder in base branch', task: async () => { try { const baseAssetsFolderCount = await getAssetCount(branch, true); diff --git a/packages/contentstack-branches/src/utils/entry-create-script.ts b/packages/contentstack-branches/src/utils/entry-create-script.ts index df58d050ae..8e17010add 100644 --- a/packages/contentstack-branches/src/utils/entry-create-script.ts +++ b/packages/contentstack-branches/src/utils/entry-create-script.ts @@ -544,21 +544,21 @@ export function entryCreateScript(contentType) { } try { - compareFilteredProperties.length !== 0 && - compareFilteredProperties.forEach(async (entryDetails) => { - if(entryDetails !== undefined){ + if (compareFilteredProperties.length !== 0) { + for (let i = 0; i < compareFilteredProperties.length; i++) { + let entryDetails = compareFilteredProperties[i]; + if (entryDetails !== undefined) { entryDetails = updateAssetDetailsInEntries(entryDetails); - let createdEntry = await stackSDKInstance.contentType('${contentType}').entry().create({ entry: entryDetails }).catch(err => { - throw err - }); - if(createdEntry){ + let createdEntry = await stackSDKInstance.contentType('${contentType}').entry().create({ entry: entryDetails }) + if (createdEntry) { if (flag.references) { await updateReferences(entryDetails, createdEntry, references); } - await updateEntry(createdEntry, entryDetails); + await updateEntry(createdEntry, entryDetails) } } - }); + } + } } catch (error) { throw error; } diff --git a/packages/contentstack-migration/src/commands/cm/stacks/migration.js b/packages/contentstack-migration/src/commands/cm/stacks/migration.js index 293a110512..fd17a7b6f5 100644 --- a/packages/contentstack-migration/src/commands/cm/stacks/migration.js +++ b/packages/contentstack-migration/src/commands/cm/stacks/migration.js @@ -12,6 +12,7 @@ const { Parser } = require('../../../modules'); const { ActionList } = require('../../../actions'); const fs = require('fs'); const chalk = require('chalk'); +const isEmpty = require('lodash/isEmpty'); const { printFlagDeprecation, managementSDKClient, @@ -24,8 +25,6 @@ const { ApiError, SchemaValidator, MigrationError, FieldValidator } = require('. // Utils const { map: _map, constants, safePromise, errorHelper } = require('../../../utils'); -const { success } = require('../../../utils/logger'); - // Properties const { get, set, getMapInstance, resetMapInstance } = _map; const { @@ -134,6 +133,10 @@ class MigrationCommand extends Command { } else { await this.execSingleFile(filePath, mapInstance); } + const errLogPath = `${process.cwd()}/migration-logs`; + if (fs.existsSync(errLogPath) && !isEmpty(`${errLogPath}/error.logs`)) { + this.log(`The log has been stored at: `, errLogPath); + } } async execSingleFile(filePath, mapInstance) { @@ -160,21 +163,11 @@ class MigrationCommand extends Command { const listr = new Listr(tasks); - await listr.run().catch((error) => { - this.handleErrors(error); - // When the process is child, send error message to parent - if (process.send) process.send({ errorOccurred: true }); - }); + await listr.run(); requests.splice(0, requests.length); } catch (error) { - // errorHandler(null, null, null, error) - if (error.message) { - this.log(error.message); - } else if (error.errorMessage) { - this.log(error.errorMessage); - } else { - this.log(error); - } + errorHelper(error, filePath); + if (process.send) process.send({ errorOccurred: true }); } } @@ -186,7 +179,6 @@ class MigrationCommand extends Command { for (const element of files) { const file = element; if (extname(file) === '.js') { - success(chalk`{white Executing file:} {grey {bold ${file}}}`); // eslint-disable-next-line no-await-in-loop await this.execSingleFile(pathValidator(resolve(filePath, file)), mapInstance); } diff --git a/packages/contentstack-migration/src/utils/error-handler.js b/packages/contentstack-migration/src/utils/error-handler.js index e79710354e..9d42b3693f 100644 --- a/packages/contentstack-migration/src/utils/error-handler.js +++ b/packages/contentstack-migration/src/utils/error-handler.js @@ -1,21 +1,19 @@ 'use strict'; -const { error } = require('./logger'); const { errorMessageHandler } = require('./constants'); module.exports = (data, type, method, err) => { - if (data && type && method) { - error(`Error occurred while ${errorMessageHandler[method]} ${type}: ${data}.`); - } - - if (err.errorMessage) { - error(err.errorMessage); - } - if (err instanceof Error && err && err.message && err.stack) { - error(err.message); - // error(err.stack) - } else { - error(err); - } + // NOTE: Commenting this code as the API errors are handled through error-helper.js also + // if (data && type && method) { + // logger.log('error', { error: `Error occurred while ${errorMessageHandler[method]} ${type}: ${data}.` }); + // } + // if (err.errorMessage) { + // logger.log('error', { errorAPI: err.errorMessage }); + // } + // if (err instanceof Error && err && err.message && err.stack) { + // logger.log('error', { error: err.message }); + // } else { + // logger.log('error', { error: err }); + // } // throw new Error(err); }; diff --git a/packages/contentstack-migration/src/utils/error-helper.js b/packages/contentstack-migration/src/utils/error-helper.js index c1832ec15c..6117725f68 100644 --- a/packages/contentstack-migration/src/utils/error-helper.js +++ b/packages/contentstack-migration/src/utils/error-helper.js @@ -4,7 +4,6 @@ const chalk = require('chalk'); const isEmpty = require('lodash/isEmpty'); const MigrationLogger = require('./migration-logger'); const fs = require('fs'); -const logger = new MigrationLogger(process.cwd()); const { readFile } = require('./fs-helper'); const groupBy = require('./group-by'); @@ -25,56 +24,67 @@ function removeSpecialCharacter(str) { return str.replace(/\u001b\[\d+m/g, ''); } -module.exports = (errors) => { +module.exports = (errors, filePath) => { + const logger = new MigrationLogger(process.cwd()); + const errorsByFile = groupBy(errors, 'file'); const messages = []; - for (const file of keys(errorsByFile)) { - const errorLogs = {}; - errorLogs[file] = {}; - const fileContents = readFile(file); - const highlightedCode = highlight(fileContents, { linenos: true }); - const lines = highlightedCode.split('\n'); + if (filePath) { + if (errors.request) { + errors.data = errors.request?.data; + delete errors.request; + } + if (errors.message) { + delete errors.message; + } + logger.log('error', { [filePath]: errors }); + } else { + for (const file of keys(errorsByFile)) { + const errorLogs = {}; + errorLogs[file] = {}; + const fileContents = readFile(file); + const highlightedCode = highlight(fileContents, { linenos: true }); + const lines = highlightedCode.split('\n'); - const fileErrorsMessage = chalk`{red Errors in ${file}}\n\n`; - errorLogs[file].fileErrorsMessage = fileErrorsMessage.replace(/\u001b\[\d+m/g, ''); - const errorMessages = errorsByFile[file] - .map((error) => { - const callsite = error.meta.callsite; - const context = 2; - let { before, line, after } = getLineWithContext(lines, callsite.line, context); + const fileErrorsMessage = chalk`{red Errors in ${file}}\n\n`; + errorLogs[file].fileErrorsMessage = fileErrorsMessage.replace(/\u001b\[\d+m/g, ''); + const errorMessages = errorsByFile[file] + .map((error) => { + const callsite = error.meta.callsite; + const context = 2; + let { before, line, after } = getLineWithContext(lines, callsite.line, context); - const beforeLines = before.map((_line) => chalk`${_line}\n`); - const afterLines = after.map((_line) => chalk`${_line}\n`); - const highlightedLine = chalk`{bold ${line}}\n`; + const beforeLines = before.map((_line) => chalk`${_line}\n`); + const afterLines = after.map((_line) => chalk`${_line}\n`); + const highlightedLine = chalk`{bold ${line}}\n`; - before = removeSpecialCharacter(before.join('\n')); - after = removeSpecialCharacter(after.join('\n')); - line = removeSpecialCharacter(line); - errorLogs[file].lines = { before, line, after }; + before = removeSpecialCharacter(before.join('\n')); + after = removeSpecialCharacter(after.join('\n')); + line = removeSpecialCharacter(line); + errorLogs[file].lines = { before, line, after }; - const formattedCode = beforeLines + highlightedLine + afterLines; - if (error.payload.apiError) { - errorLogs[file].apiError = true; - errorLogs[file].errorCode = error.payload.apiError.errorCode; - errorLogs[file].errors = error.payload.apiError.errors; - } - if (error.message && !error.payload.apiError) { - errorLogs[file].apiError = false; - errorLogs[file].error = error.message; - } - }) - .join('\n'); + const formattedCode = beforeLines + highlightedLine + afterLines; + if (error.payload?.apiError) { + errorLogs[file].apiError = true; + errorLogs[file].errorCode = error.payload.apiError.errorCode; + errorLogs[file].errors = error.payload.apiError.errors; + } + if (error.message && !error.payload.apiError) { + errorLogs[file].apiError = false; + errorLogs[file].error = error.message; + } + }) + .join('\n'); - messages.push(`${fileErrorsMessage}${errorMessages}`); - logger.log('error', errorLogs); - } - if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) { - console.error('Migration error---', errors); - logger.log('error', errors); - } else { - logger.log('error', { error: messages.join('\n') }); - console.log(messages.join('\n')); + messages.push(`${fileErrorsMessage}${errorMessages}`); + logger.log('error', errorLogs); + } + if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) { + logger.log('error', errors); + } else { + logger.log('error', { error: messages.join('\n') }); + } } // eslint-disable-next-line - console.log(chalk`{bold.red Migration unsuccessful}`); + // console.log(chalk`{bold.red Migration unsuccessful}`); }; diff --git a/packages/contentstack-migration/src/utils/logger.js b/packages/contentstack-migration/src/utils/logger.js index f2c1ea57dc..d6f96953c1 100644 --- a/packages/contentstack-migration/src/utils/logger.js +++ b/packages/contentstack-migration/src/utils/logger.js @@ -36,7 +36,7 @@ function init(logFileName) { const logPath = pathValidator(join(logsDir, logFileName + '.log')); const logger = createLogger({ format: combine(colorize(), label({ label: 'Migration' }), customFormat), - transports: [new transports.File({ filename: logPath }), new transports.Console()], + transports: [new transports.File({ filename: logPath })], }); let args; @@ -54,9 +54,9 @@ function init(logFileName) { logString && logger.log('warn', logString); }, error: function () { - args = slice.call(arguments); - logString = getString(args); - logString && logger.log('error', logString); + // args = slice.call(arguments); + // logString = getString(args); + // logString && logger.log('error', logString); }, debug: function () { args = slice.call(arguments); diff --git a/packages/contentstack-migration/src/utils/migration-logger.js b/packages/contentstack-migration/src/utils/migration-logger.js index 76068082f7..0417f1e637 100644 --- a/packages/contentstack-migration/src/utils/migration-logger.js +++ b/packages/contentstack-migration/src/utils/migration-logger.js @@ -4,25 +4,17 @@ module.exports = class MigrationLogger { constructor(filePath) { this.filePath = path.join(filePath, 'migration-logs'); this.logger = winston.createLogger({ - levels: { info: 1, error: 2 }, + levels: { error: 1 }, transports: [ new winston.transports.File({ level: 'error', filename: path.join(this.filePath, 'error.logs'), format: winston.format.combine(winston.format.timestamp(), winston.format.json()), }), - new winston.transports.File({ - level: 'info', - filename: path.join(this.filePath, 'info.logs'), - format: winston.format.combine(winston.format.timestamp(), winston.format.json()), - }), ], }); } log(level, message) { - if (level === 'info') { - this.logger.log('info', message); - } this.logger.log('error', message); } }; From 011336ea93dded7576502dbfcc10b1090d971c83 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Thu, 21 Mar 2024 12:32:36 +0530 Subject: [PATCH 4/6] branches version bump --- package-lock.json | 922 ++++++++++-------- packages/contentstack-branches/package.json | 4 +- .../src/utils/error-helper.js | 1 + packages/contentstack/package.json | 2 +- pnpm-lock.yaml | 2 +- 5 files changed, 524 insertions(+), 407 deletions(-) diff --git a/package-lock.json b/package-lock.json index bebe4d4273..481ae29974 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41,9 +41,9 @@ } }, "node_modules/@apollo/client": { - "version": "3.9.7", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.9.7.tgz", - "integrity": "sha512-OEEwt55bkFhqihCT5d75KUxZt50JZ9MuIYwG7VZlyPPIAb9K+qzVWlXWlf3tB5DaV43yXkUSLQfNpdIBFOB55Q==", + "version": "3.9.8", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.9.8.tgz", + "integrity": "sha512-ausPftEb2xAUkZqz+VkSSIhNxKraShJXdV2/NJ7JbHAAciGsFlapGtZ++b7lF0/+3Jp/p34g/i6dvO8b4WjQig==", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/caches": "^1.0.0", @@ -83,113 +83,42 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/compat-data": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", - "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.1.tgz", + "integrity": "sha512-Pc65opHDliVpRHuKfzI+gSA4zcgr65O4cl64fFJIWEEh8JoHIHh0Oez1Eo8Arz8zq/JhgKodQaxEwUPRtZylVA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", - "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.3.tgz", + "integrity": "sha512-5FcvN1JHw2sHJChotgx8Ek0lyuh4kCKelgMTTqhYJJtloNvUfpAFMeNQUtdlIaktwrSV9LtCdqwk48wL2wBacQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", + "@babel/code-frame": "^7.24.2", + "@babel/generator": "^7.24.1", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.24.0", - "@babel/parser": "^7.24.0", + "@babel/helpers": "^7.24.1", + "@babel/parser": "^7.24.1", "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.0", + "@babel/traverse": "^7.24.1", "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -215,9 +144,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.23.10", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.23.10.tgz", - "integrity": "sha512-3wSYDPZVnhseRnxRJH6ZVTNknBz76AEnyC+AYYhasjP3Yy23qz0ERR7Fcd2SHmYuSFJ2kY9gaaDd3vyqU09eSw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.1.tgz", + "integrity": "sha512-d5guuzMlPeDfZIbpQ8+g1NaCNuAGBBGNECh0HVqz1sjOeVLh2CEaifuOysCH18URW6R7pqXINvf5PaR/dC6jLQ==", "dev": true, "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", @@ -251,14 +180,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.1.tgz", + "integrity": "sha512-DfCRfZsBcrPEHUfuBMgbJ1Ut01Y/itOs+hY2nFLgqsqXd52/iSiVq5TITtUasIUgm+IIKdY2/1I7auiQOEeC9A==", "dev": true, "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.0", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -325,12 +254,12 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", - "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "version": "7.24.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.3.tgz", + "integrity": "sha512-viKb0F9f2s0BCS22QSF308z/+1YWKV/76mwt61NBzS5izMzDPwdq1pTrzf+Li3npBWX9KdQbkeCt1jSAM7lZqg==", "dev": true, "dependencies": { - "@babel/types": "^7.22.15" + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -389,9 +318,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", + "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -416,13 +345,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", - "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.1.tgz", + "integrity": "sha512-BpU09QqEe6ZCHuIHFphEFgvNSrubve1FtyMton26ekZ85gRGi6LrTF7zArARp2YvyFxloeiRmtSCq5sjh1WqIg==", "dev": true, "dependencies": { "@babel/template": "^7.24.0", - "@babel/traverse": "^7.24.0", + "@babel/traverse": "^7.24.1", "@babel/types": "^7.24.0" }, "engines": { @@ -430,14 +359,15 @@ } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -515,9 +445,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", - "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.1.tgz", + "integrity": "sha512-Zo9c7N3xdOIQrNip7Lc9wvRPzlRtovHVE4lkz8WEDr7uYh/GMQhSiIgFxGIArRHYdJE5kxtZjAf8rT0xhdLCzg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -587,12 +517,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", - "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz", + "integrity": "sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -689,12 +619,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.23.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", - "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz", + "integrity": "sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.22.5" + "@babel/helper-plugin-utils": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -704,9 +634,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", - "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.1.tgz", + "integrity": "sha512-+BIznRzyqBf+2wCTxcKE3wDjfGeCoVE61KSHGpkzqrLi8qxqFwBeUFyId2cxkTmm55fzDGnm0+yCxaxygrLUnQ==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -730,18 +660,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", - "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", + "version": "7.24.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.1.tgz", + "integrity": "sha512-xuU6o9m68KeqZbQuDt2TcKSxUw/mrsvavlEqQ1leZ/B+C9tk6E4sRWy97WaXgvq5E+nU3cXMxv3WKOCanVMCmQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", + "@babel/code-frame": "^7.24.1", + "@babel/generator": "^7.24.1", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.0", + "@babel/parser": "^7.24.1", "@babel/types": "^7.24.0", "debug": "^4.3.1", "globals": "^11.1.0" @@ -2068,15 +1998,15 @@ } }, "node_modules/@oclif/plugin-plugins": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.3.6.tgz", - "integrity": "sha512-a8GPZBnoVCBjlCEPgp8R93S9HyxSlGnoCvb6NIhqpVe4bk4DhxB9TongCWWaBvdUqovTbhgOfwxRB06oSe2plA==", + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.3.8.tgz", + "integrity": "sha512-QU0a4VFmA+Wb/kIUsBKw14KMbH4bHdz5ejwvqql89DumtsUzPOekSHgEzODC2ESZnDWx+h5pD9NPg4lAMPMbxQ==", "hasShrinkwrap": true, "dependencies": { - "@oclif/core": "^3.23.0", + "@oclif/core": "^3.25.2", "chalk": "^5.3.0", "debug": "^4.3.4", - "npm": "10.5.0", + "npm": "10.2.4", "npm-run-path": "^4.0.1", "semver": "^7.6.0", "shelljs": "^0.8.5", @@ -2123,9 +2053,9 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/@oclif/core": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-3.23.0.tgz", - "integrity": "sha512-giQ/8Ft8yXWg4IyPVtynPb7ihoQsa3A/1Q53UIJIhh+8k+EedE3lJ01yn6sq6Ha35IGqsG1WhkeHzlJIuldEaw==", + "version": "3.25.2", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-3.25.2.tgz", + "integrity": "sha512-OkW/cNa/3DhoCz2YlSpymVe8DXqkoRaLY4SPTVqNVzR4R1dFBE5KoCtuwKwnhxYLCRCqaViPgRnB5K26f0MnjA==", "license": "MIT", "dependencies": { "@types/cli-progress": "^3.11.5", @@ -2242,9 +2172,9 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/@types/cli-progress/node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "20.11.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", + "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", "license": "MIT", "dependencies": { "undici-types": "~5.26.4" @@ -2938,9 +2868,9 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/npm/-/npm-10.5.0.tgz", - "integrity": "sha512-Ejxwvfh9YnWVU2yA5FzoYLTW52vxHCz+MHrOFg9Cc8IFgF/6f5AGPAvb5WTay5DIUP1NIfN3VBZ0cLlGO0Ys+A==", + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/npm/-/npm-10.2.4.tgz", + "integrity": "sha512-umEuYneVEYO9KoEEI8n2sSGmNQeqco/3BSeacRlqIkCzw4E7XGtYSWMeJobxzr6hZ2n9cM+u5TsMTcC5bAgoWA==", "bundleDependencies": [ "@isaacs/string-locale-compare", "@npmcli/arborist", @@ -3004,6 +2934,7 @@ "semver", "spdx-expression-parse", "ssri", + "strip-ansi", "supports-color", "tar", "text-table", @@ -3028,12 +2959,12 @@ "@npmcli/fs": "^3.1.0", "@npmcli/map-workspaces": "^3.0.4", "@npmcli/package-json": "^5.0.0", - "@npmcli/promise-spawn": "^7.0.1", - "@npmcli/run-script": "^7.0.4", - "@sigstore/tuf": "^2.3.1", + "@npmcli/promise-spawn": "^7.0.0", + "@npmcli/run-script": "^7.0.2", + "@sigstore/tuf": "^2.2.0", "abbrev": "^2.0.0", "archy": "~1.0.0", - "cacache": "^18.0.2", + "cacache": "^18.0.0", "chalk": "^5.3.0", "ci-info": "^4.0.0", "cli-columns": "^4.0.0", @@ -3047,7 +2978,7 @@ "ini": "^4.1.1", "init-package-json": "^6.0.0", "is-cidr": "^5.0.3", - "json-parse-even-better-errors": "^3.0.1", + "json-parse-even-better-errors": "^3.0.0", "libnpmaccess": "^8.0.1", "libnpmdiff": "^6.0.3", "libnpmexec": "^7.0.4", @@ -3076,14 +3007,15 @@ "npm-user-validate": "^2.0.0", "npmlog": "^7.0.1", "p-map": "^4.0.0", - "pacote": "^17.0.6", + "pacote": "^17.0.4", "parse-conflict-json": "^3.0.1", "proc-log": "^3.0.0", "qrcode-terminal": "^0.12.0", "read": "^2.1.0", - "semver": "^7.6.0", + "semver": "^7.5.4", "spdx-expression-parse": "^3.0.1", "ssri": "^10.0.5", + "strip-ansi": "^7.1.0", "supports-color": "^9.4.0", "tar": "^6.2.0", "text-table": "~0.2.0", @@ -3138,17 +3070,6 @@ "node": ">=12" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "inBundle": true, @@ -3170,27 +3091,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", "inBundle": true, "license": "ISC" }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@npmcli/agent": { - "version": "2.2.1", + "version": "2.2.0", "inBundle": true, "license": "ISC", "dependencies": { @@ -3205,7 +3112,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@npmcli/arborist": { - "version": "7.4.0", + "version": "7.2.1", "inBundle": true, "license": "ISC", "dependencies": { @@ -3217,7 +3124,7 @@ "@npmcli/name-from-folder": "^2.0.0", "@npmcli/node-gyp": "^3.0.0", "@npmcli/package-json": "^5.0.0", - "@npmcli/query": "^3.1.0", + "@npmcli/query": "^3.0.1", "@npmcli/run-script": "^7.0.2", "bin-links": "^4.0.1", "cacache": "^18.0.0", @@ -3236,7 +3143,7 @@ "parse-conflict-json": "^3.0.0", "proc-log": "^3.0.0", "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^3.0.1", + "promise-call-limit": "^1.0.2", "read-package-json-fast": "^3.0.2", "semver": "^7.3.7", "ssri": "^10.0.5", @@ -3251,7 +3158,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@npmcli/config": { - "version": "8.2.0", + "version": "8.0.2", "inBundle": true, "license": "ISC", "dependencies": { @@ -3305,7 +3212,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@npmcli/git": { - "version": "5.0.4", + "version": "5.0.3", "inBundle": true, "license": "ISC", "dependencies": { @@ -3399,7 +3306,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@npmcli/promise-spawn": { - "version": "7.0.1", + "version": "7.0.0", "inBundle": true, "license": "ISC", "dependencies": { @@ -3410,7 +3317,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@npmcli/query": { - "version": "3.1.0", + "version": "3.0.1", "inBundle": true, "license": "ISC", "dependencies": { @@ -3421,14 +3328,14 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@npmcli/run-script": { - "version": "7.0.4", + "version": "7.0.2", "inBundle": true, "license": "ISC", "dependencies": { "@npmcli/node-gyp": "^3.0.0", - "@npmcli/package-json": "^5.0.0", "@npmcli/promise-spawn": "^7.0.0", "node-gyp": "^10.0.0", + "read-package-json-fast": "^3.0.0", "which": "^4.0.0" }, "engines": { @@ -3445,26 +3352,18 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@sigstore/bundle": { - "version": "2.2.0", + "version": "2.1.0", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@sigstore/protobuf-specs": "^0.3.0" + "@sigstore/protobuf-specs": "^0.2.1" }, "engines": { "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@sigstore/core": { - "version": "1.0.0", - "inBundle": true, - "license": "Apache-2.0", - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@sigstore/protobuf-specs": { - "version": "0.3.0", + "version": "0.2.1", "inBundle": true, "license": "Apache-2.0", "engines": { @@ -3472,13 +3371,12 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@sigstore/sign": { - "version": "2.2.3", + "version": "2.2.0", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.2.0", - "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.0", + "@sigstore/bundle": "^2.1.0", + "@sigstore/protobuf-specs": "^0.2.1", "make-fetch-happen": "^13.0.0" }, "engines": { @@ -3486,25 +3384,12 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@sigstore/tuf": { - "version": "2.3.1", - "inBundle": true, - "license": "Apache-2.0", - "dependencies": { - "@sigstore/protobuf-specs": "^0.3.0", - "tuf-js": "^2.2.0" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/@sigstore/verify": { - "version": "1.1.0", + "version": "2.2.0", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.2.0", - "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.0" + "@sigstore/protobuf-specs": "^0.2.1", + "tuf-js": "^2.1.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -3538,6 +3423,17 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/abort-controller": { + "version": "3.0.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/agent-base": { "version": "7.1.0", "inBundle": true, @@ -3562,11 +3458,14 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ansi-regex": { - "version": "5.0.1", + "version": "6.0.1", "inBundle": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ansi-styles": { @@ -3591,9 +3490,13 @@ "license": "MIT" }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/are-we-there-yet": { - "version": "4.0.2", + "version": "4.0.1", "inBundle": true, "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^4.1.0" + }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -3603,6 +3506,25 @@ "inBundle": true, "license": "MIT" }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/base64-js": { + "version": "1.5.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/bin-links": { "version": "4.0.3", "inBundle": true, @@ -3633,6 +3555,29 @@ "balanced-match": "^1.0.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/buffer": { + "version": "6.0.3", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/builtins": { "version": "5.0.1", "inBundle": true, @@ -3642,7 +3587,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/cacache": { - "version": "18.0.2", + "version": "18.0.0", "inBundle": true, "license": "ISC", "dependencies": { @@ -3651,7 +3596,7 @@ "glob": "^10.2.2", "lru-cache": "^10.0.1", "minipass": "^7.0.3", - "minipass-collect": "^2.0.1", + "minipass-collect": "^1.0.2", "minipass-flush": "^1.0.5", "minipass-pipeline": "^1.2.4", "p-map": "^4.0.0", @@ -3727,6 +3672,25 @@ "node": ">= 10" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/cli-columns/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/cli-columns/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/cli-table3": { "version": "0.6.3", "inBundle": true, @@ -3793,6 +3757,25 @@ "node": ">=8.0.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/columnify/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/columnify/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/common-ancestor-path": { "version": "1.0.1", "inBundle": true, @@ -3873,8 +3856,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/delegates": { + "version": "1.0.0", + "inBundle": true, + "license": "MIT" + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/diff": { - "version": "5.2.0", + "version": "5.1.0", "inBundle": true, "license": "BSD-3-Clause", "engines": { @@ -3913,6 +3901,22 @@ "inBundle": true, "license": "MIT" }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/event-target-shim": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/events": { + "version": "3.3.0", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/exponential-backoff": { "version": "3.1.1", "inBundle": true, @@ -3978,6 +3982,25 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/gauge/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/gauge/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/glob": { "version": "10.3.10", "inBundle": true, @@ -4010,7 +4033,7 @@ "license": "ISC" }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/hasown": { - "version": "2.0.1", + "version": "2.0.0", "inBundle": true, "license": "MIT", "dependencies": { @@ -4037,7 +4060,7 @@ "license": "BSD-2-Clause" }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/http-proxy-agent": { - "version": "7.0.2", + "version": "7.0.0", "inBundle": true, "license": "MIT", "dependencies": { @@ -4049,7 +4072,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/https-proxy-agent": { - "version": "7.0.4", + "version": "7.0.2", "inBundle": true, "license": "MIT", "dependencies": { @@ -4072,8 +4095,27 @@ "node": ">=0.10.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ieee754": { + "version": "1.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "BSD-3-Clause" + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ignore-walk": { - "version": "6.0.4", + "version": "6.0.3", "inBundle": true, "license": "ISC", "dependencies": { @@ -4124,22 +4166,10 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ip-address": { - "version": "9.0.5", - "inBundle": true, - "license": "MIT", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ip": { + "version": "2.0.0", "inBundle": true, - "license": "BSD-3-Clause" + "license": "MIT" }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/ip-regex": { "version": "5.0.0", @@ -4209,13 +4239,8 @@ "@pkgjs/parseargs": "^0.11.0" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/jsbn": { - "version": "1.1.0", - "inBundle": true, - "license": "MIT" - }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/json-parse-even-better-errors": { - "version": "3.0.1", + "version": "3.0.0", "inBundle": true, "license": "MIT", "engines": { @@ -4249,7 +4274,7 @@ "license": "MIT" }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmaccess": { - "version": "8.0.2", + "version": "8.0.1", "inBundle": true, "license": "ISC", "dependencies": { @@ -4261,7 +4286,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmdiff": { - "version": "6.0.7", + "version": "6.0.3", "inBundle": true, "license": "ISC", "dependencies": { @@ -4280,7 +4305,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmexec": { - "version": "7.0.8", + "version": "7.0.4", "inBundle": true, "license": "ISC", "dependencies": { @@ -4301,7 +4326,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmfund": { - "version": "5.0.5", + "version": "5.0.1", "inBundle": true, "license": "ISC", "dependencies": { @@ -4312,7 +4337,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmhook": { - "version": "10.0.1", + "version": "10.0.0", "inBundle": true, "license": "ISC", "dependencies": { @@ -4324,7 +4349,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmorg": { - "version": "6.0.2", + "version": "6.0.1", "inBundle": true, "license": "ISC", "dependencies": { @@ -4336,7 +4361,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmpack": { - "version": "6.0.7", + "version": "6.0.3", "inBundle": true, "license": "ISC", "dependencies": { @@ -4350,7 +4375,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmpublish": { - "version": "9.0.4", + "version": "9.0.2", "inBundle": true, "license": "ISC", "dependencies": { @@ -4360,7 +4385,7 @@ "npm-registry-fetch": "^16.0.0", "proc-log": "^3.0.0", "semver": "^7.3.7", - "sigstore": "^2.2.0", + "sigstore": "^2.1.0", "ssri": "^10.0.5" }, "engines": { @@ -4368,7 +4393,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmsearch": { - "version": "7.0.1", + "version": "7.0.0", "inBundle": true, "license": "ISC", "dependencies": { @@ -4379,7 +4404,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmteam": { - "version": "6.0.1", + "version": "6.0.0", "inBundle": true, "license": "ISC", "dependencies": { @@ -4391,7 +4416,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/libnpmversion": { - "version": "5.0.2", + "version": "5.0.1", "inBundle": true, "license": "ISC", "dependencies": { @@ -4406,9 +4431,12 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/lru-cache": { - "version": "10.2.0", + "version": "10.0.2", "inBundle": true, "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, "engines": { "node": "14 || >=16.14" } @@ -4457,14 +4485,25 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/minipass-collect": { - "version": "2.0.1", + "version": "1.0.2", "inBundle": true, "license": "ISC", "dependencies": { - "minipass": "^7.0.3" + "minipass": "^3.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">= 8" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/minipass-collect/node_modules/minipass": { + "version": "3.3.6", + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/minipass-fetch": { @@ -4728,11 +4767,11 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/npm-packlist": { - "version": "8.0.2", + "version": "8.0.0", "inBundle": true, "license": "ISC", "dependencies": { - "ignore-walk": "^6.0.4" + "ignore-walk": "^6.0.0" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" @@ -4818,7 +4857,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/pacote": { - "version": "17.0.6", + "version": "17.0.4", "inBundle": true, "license": "ISC", "dependencies": { @@ -4837,7 +4876,7 @@ "promise-retry": "^2.0.1", "read-package-json": "^7.0.0", "read-package-json-fast": "^3.0.0", - "sigstore": "^2.2.0", + "sigstore": "^2.0.0", "ssri": "^10.0.0", "tar": "^6.1.11" }, @@ -4885,7 +4924,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/postcss-selector-parser": { - "version": "6.0.15", + "version": "6.0.13", "inBundle": true, "license": "MIT", "dependencies": { @@ -4904,6 +4943,14 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/process": { + "version": "0.11.10", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/promise-all-reject-late": { "version": "1.0.1", "inBundle": true, @@ -4913,7 +4960,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/promise-call-limit": { - "version": "3.0.1", + "version": "1.0.2", "inBundle": true, "license": "ISC", "funding": { @@ -5000,6 +5047,21 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/readable-stream": { + "version": "4.4.2", + "inBundle": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/retry": { "version": "0.12.0", "inBundle": true, @@ -5008,6 +5070,25 @@ "node": ">= 4" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/safe-buffer": { + "version": "5.2.1", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "inBundle": true, + "license": "MIT" + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/safer-buffer": { "version": "2.1.2", "inBundle": true, @@ -5015,7 +5096,7 @@ "optional": true }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/semver": { - "version": "7.6.0", + "version": "7.5.4", "inBundle": true, "license": "ISC", "dependencies": { @@ -5075,16 +5156,14 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/sigstore": { - "version": "2.2.2", + "version": "2.1.0", "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@sigstore/bundle": "^2.2.0", - "@sigstore/core": "^1.0.0", - "@sigstore/protobuf-specs": "^0.3.0", - "@sigstore/sign": "^2.2.3", - "@sigstore/tuf": "^2.3.1", - "@sigstore/verify": "^1.1.0" + "@sigstore/bundle": "^2.1.0", + "@sigstore/protobuf-specs": "^0.2.1", + "@sigstore/sign": "^2.1.0", + "@sigstore/tuf": "^2.1.0" }, "engines": { "node": "^16.14.0 || >=18.0.0" @@ -5100,15 +5179,15 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/socks": { - "version": "2.8.0", + "version": "2.7.1", "inBundle": true, "license": "MIT", "dependencies": { - "ip-address": "^9.0.5", + "ip": "^2.0.0", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 16.0.0", + "node": ">= 10.13.0", "npm": ">= 3.0.0" } }, @@ -5135,7 +5214,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/spdx-exceptions": { - "version": "2.5.0", + "version": "2.3.0", "inBundle": true, "license": "CC-BY-3.0" }, @@ -5149,7 +5228,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/spdx-license-ids": { - "version": "3.0.17", + "version": "3.0.16", "inBundle": true, "license": "CC0-1.0" }, @@ -5164,6 +5243,14 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/string_decoder": { + "version": "1.3.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/string-width": { "version": "4.2.3", "inBundle": true, @@ -5191,7 +5278,34 @@ "node": ">=8" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/strip-ansi": { + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/string-width/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/string-width/node_modules/strip-ansi": { "version": "6.0.1", "inBundle": true, "license": "MIT", @@ -5202,6 +5316,20 @@ "node": ">=8" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/strip-ansi": { + "version": "7.1.0", + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", @@ -5214,6 +5342,14 @@ "node": ">=8" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/supports-color": { "version": "9.4.0", "inBundle": true, @@ -5290,7 +5426,7 @@ } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/tuf-js": { - "version": "2.2.0", + "version": "2.1.0", "inBundle": true, "license": "MIT", "dependencies": { @@ -5425,6 +5561,14 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { "version": "4.3.0", "inBundle": true, @@ -5439,15 +5583,15 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex": { + "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { "version": "6.0.1", "inBundle": true, "license": "MIT", - "engines": { - "node": ">=12" + "dependencies": { + "ansi-regex": "^5.0.1" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "engines": { + "node": ">=8" } }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/wrap-ansi/node_modules/emoji-regex": { @@ -5471,20 +5615,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "inBundle": true, - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/@oclif/plugin-plugins/node_modules/npm/node_modules/write-file-atomic": { "version": "5.0.1", "inBundle": true, @@ -6613,9 +6743,9 @@ } }, "node_modules/@slack/logger/node_modules/@types/node": { - "version": "20.11.28", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", - "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", "dependencies": { "undici-types": "~5.26.4" } @@ -6650,9 +6780,9 @@ } }, "node_modules/@slack/socket-mode": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@slack/socket-mode/-/socket-mode-1.3.3.tgz", - "integrity": "sha512-vN3zG4woRtf2Ut6rZgRW6G/Oe56uLMlnz39I08Q7DOvVfB+1MmDbNv0PNOiFgujdKXJR+bXF41/F/VvryXcqlw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@slack/socket-mode/-/socket-mode-1.3.4.tgz", + "integrity": "sha512-CBH5hrLgdSRUoEztKSgLk7wKLkZHXovFUNMTIRDBK6+w5tQNBFmiDL9Iovj3sJTu1lwRRdQKKzeMx/oyuoOf1A==", "dependencies": { "@slack/logger": "^3.0.0", "@slack/web-api": "^6.11.2", @@ -6931,9 +7061,9 @@ } }, "node_modules/@types/chai": { - "version": "4.3.12", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.12.tgz", - "integrity": "sha512-zNKDHG/1yxm8Il6uCCVsm+dRdEsJlFoDu73X17y09bId6UwoYww+vFBsAcRzl8knM1sab3Dp1VRikFQwDOtDDw==" + "version": "4.3.14", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.14.tgz", + "integrity": "sha512-Wj71sXE4Q4AkGdG9Tvq1u/fquNz9EdG4LIJMwVVII7ashjD/8cf8fyIfJAjRr6YcsXnSE8cOGQPq1gqeR8z+3w==" }, "node_modules/@types/cli-progress": { "version": "3.11.5", @@ -7233,9 +7363,9 @@ "integrity": "sha512-wA0UT0HeT2fGHzIFV9kWpYz5mdoyLxKrTgMdZQM++5h6pYAFH73HXcQhefg24nD1yivUFEn5KU+EF4b+CXJ4Wg==" }, "node_modules/@types/qs": { - "version": "6.9.12", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.12.tgz", - "integrity": "sha512-bZcOkJ6uWrL0Qb2NAWKa7TBU+mJHPzhx9jjLL1KHF+XpzEcR7EXHvjbHlGtR/IsP1vyPrehuS6XqkmaePy//mg==" + "version": "6.9.14", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", + "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==" }, "node_modules/@types/range-parser": { "version": "1.2.7", @@ -8004,15 +8134,16 @@ "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -8030,35 +8161,17 @@ "node": ">=8" } }, - "node_modules/array.prototype.filter": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array.prototype.filter/-/array.prototype.filter-1.0.3.tgz", - "integrity": "sha512-VizNcj/RGJiUyQBgzwxzE5oHdeuXY5hSbbmKMlphj1cy1Vl7Pn2asCGbSrru6hSQjmCzqTBPVWAF/whmEOVHbw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-array-method-boxes-properly": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.4.tgz", - "integrity": "sha512-hzvSHUshSpCflDR1QMUBLHGHP1VIEBegT4pix9H/Z92Xw3ySoy6c2qh7lJWTJnRJ8JCZ9bJNCgTyYaJGcJu6xQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", + "es-abstract": "^1.23.2", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "es-shim-unscopables": "^1.0.2" }, "engines": { @@ -8105,14 +8218,15 @@ } }, "node_modules/array.prototype.map": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.6.tgz", - "integrity": "sha512-nK1psgF2cXqP3wSyCSq0Hc7zwNq3sfljQqaG27r/7a7ooNUnn5nGq6yYWyks9jMO5EoFQ0ax80hSg6oXSRNXaw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.7.tgz", + "integrity": "sha512-XpcFfLoBEAhezrrNw1V+yLXkE7M6uR7xJEsxbG6c/V9v043qurwVJB9r9UTnoSioFDoz1i1VOydpWGmJpfVZbg==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", "es-array-method-boxes-properly": "^1.0.0", + "es-object-atoms": "^1.0.0", "is-string": "^1.0.7" }, "engines": { @@ -8238,9 +8352,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1579.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1579.0.tgz", - "integrity": "sha512-TYv/bK2kVT/dfrpjAPL6sEhku4uH9EB18gRa6p9gi0fPtmhe49HrYoN2xmPNSqLPj4/CtSXmZhg91Ny1DhG8/Q==", + "version": "2.1582.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1582.0.tgz", + "integrity": "sha512-oPSk5e1D0oegX3lC+pUIKmI5e4depLi0+9fU7C73KDq65nq8NmdehpbytPHGPqfftqfa3FTEXb2yUPA4A9wM9w==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -9828,9 +9942,9 @@ "dev": true }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", + "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", "engines": { "node": ">= 0.6" } @@ -10507,9 +10621,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.708", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.708.tgz", - "integrity": "sha512-iWgEEvREL4GTXXHKohhh33+6Y8XkPI5eHihDmm8zUk5Zo7HICEW+wI/j5kJ2tbuNUCXJ/sNXa03ajW635DiJXA==", + "version": "1.4.713", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.713.tgz", + "integrity": "sha512-vDarADhwntXiULEdmWd77g2dV6FrNGa8ecAC29MZ4TwPut2fvosD0/5sJd1qWNNe8HcJFAC+F5Lf9jW1NPtWmw==", "dev": true }, "node_modules/elegant-spinner": { @@ -12113,16 +12227,16 @@ "dev": true }, "node_modules/express": { - "version": "4.18.3", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", - "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.19.1.tgz", + "integrity": "sha512-K4w1/Bp7y8iSiVObmCrtq8Cs79XjJc/RU2YYkZQ7wpUu5ZyZ7MtPHkqoMz4pf+mgXfNvo2qft8D9OnrH2ABk9w==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.6.0", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", @@ -19194,14 +19308,15 @@ } }, "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -19211,27 +19326,28 @@ } }, "node_modules/object.groupby": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.2.tgz", - "integrity": "sha512-bzBq58S+x+uo0VjurFT0UktpKHOZmv4/xePiOA1nbB9pMqpGK7rUPNgf+1YC+7mE+0HzhTMqNUuCqvKhj6FnBw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", "dev": true, "dependencies": { - "array.prototype.filter": "^1.0.3", - "call-bind": "^1.0.5", + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.0.0" + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -20434,9 +20550,9 @@ } }, "node_modules/pure-rand": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz", - "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", "dev": true, "funding": [ { @@ -25565,7 +25681,7 @@ "@contentstack/cli-audit": "~1.5.1", "@contentstack/cli-auth": "~1.3.17", "@contentstack/cli-cm-bootstrap": "~1.9.0", - "@contentstack/cli-cm-branches": "~1.0.23", + "@contentstack/cli-cm-branches": "~1.0.24", "@contentstack/cli-cm-bulk-publish": "~1.4.3", "@contentstack/cli-cm-clone": "~1.10.3", "@contentstack/cli-cm-export": "~1.11.1", @@ -25686,9 +25802,9 @@ "dev": true }, "packages/contentstack-audit/node_modules/@types/node": { - "version": "20.11.28", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz", - "integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==", + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -25860,9 +25976,9 @@ } }, "packages/contentstack-audit/node_modules/typescript": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", + "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -26012,7 +26128,7 @@ }, "packages/contentstack-branches": { "name": "@contentstack/cli-cm-branches", - "version": "1.0.23", + "version": "1.0.24", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", @@ -27295,9 +27411,9 @@ "dev": true }, "packages/contentstack-launch/node_modules/@types/node": { - "version": "16.18.89", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.89.tgz", - "integrity": "sha512-QlrE8QI5z62nfnkiUZysUsAaxWaTMoGqFVcB3PvK1WxJ0c699bacErV4Fabe9Hki6ZnaHalgzihLbTl2d34XfQ==", + "version": "16.18.91", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.91.tgz", + "integrity": "sha512-h8Q4klc8xzc9kJKr7UYNtJde5TU2qEePVyH3WyzJaUC+3ptyc5kPQbWOIUcn8ZsG5+KSkq+P0py0kC0VqxgAXw==", "dev": true }, "packages/contentstack-launch/node_modules/acorn": { diff --git a/packages/contentstack-branches/package.json b/packages/contentstack-branches/package.json index e44875a087..d21b85f260 100644 --- a/packages/contentstack-branches/package.json +++ b/packages/contentstack-branches/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-branches", "description": "Contentstack CLI plugin to do branches operations", - "version": "1.0.23", + "version": "1.0.24", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { @@ -95,4 +95,4 @@ } }, "repository": "https://github.com/contentstack/cli" -} +} \ No newline at end of file diff --git a/packages/contentstack-migration/src/utils/error-helper.js b/packages/contentstack-migration/src/utils/error-helper.js index 6117725f68..47a748d183 100644 --- a/packages/contentstack-migration/src/utils/error-helper.js +++ b/packages/contentstack-migration/src/utils/error-helper.js @@ -81,6 +81,7 @@ module.exports = (errors, filePath) => { } if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) { logger.log('error', errors); + console.log(chalk`{bold.red Migration unsuccessful}`); } else { logger.log('error', { error: messages.join('\n') }); } diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 172727fc10..dc91fc8e98 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -25,7 +25,7 @@ "@contentstack/cli-audit": "~1.5.1", "@contentstack/cli-auth": "~1.3.17", "@contentstack/cli-cm-bootstrap": "~1.9.0", - "@contentstack/cli-cm-branches": "~1.0.23", + "@contentstack/cli-cm-branches": "~1.0.24", "@contentstack/cli-cm-bulk-publish": "~1.4.3", "@contentstack/cli-cm-export": "~1.11.1", "@contentstack/cli-cm-clone": "~1.10.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d6bb5521e..61d66c7bc6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: '@contentstack/cli-audit': ~1.5.1 '@contentstack/cli-auth': ~1.3.17 '@contentstack/cli-cm-bootstrap': ~1.9.0 - '@contentstack/cli-cm-branches': ~1.0.23 + '@contentstack/cli-cm-branches': ~1.0.24 '@contentstack/cli-cm-bulk-publish': ~1.4.3 '@contentstack/cli-cm-clone': ~1.10.3 '@contentstack/cli-cm-export': ~1.11.1 From d85bcbdf1967a6e250a49af7c79d2b3d8f19680f Mon Sep 17 00:00:00 2001 From: raj pandey Date: Thu, 21 Mar 2024 13:07:35 +0530 Subject: [PATCH 5/6] removal of redundant catch blocks --- .../contentstack-branches/src/utils/entry-create-script.ts | 4 +--- .../src/utils/entry-create-update-script.ts | 7 +------ .../contentstack-branches/src/utils/entry-update-script.ts | 7 +------ 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/contentstack-branches/src/utils/entry-create-script.ts b/packages/contentstack-branches/src/utils/entry-create-script.ts index 8e17010add..f97f3b3309 100644 --- a/packages/contentstack-branches/src/utils/entry-create-script.ts +++ b/packages/contentstack-branches/src/utils/entry-create-script.ts @@ -514,9 +514,7 @@ export function entryCreateScript(contentType) { async function updateEntry(entry, entryDetails) { Object.assign(entry, { ...entryDetails }); - await entry.update().catch(err => { - throw err; - }); + await entry.update() } async function updateReferences(entryDetails, baseEntry, references) { diff --git a/packages/contentstack-branches/src/utils/entry-create-update-script.ts b/packages/contentstack-branches/src/utils/entry-create-update-script.ts index 0f11a210c3..564ad5c776 100644 --- a/packages/contentstack-branches/src/utils/entry-create-update-script.ts +++ b/packages/contentstack-branches/src/utils/entry-create-update-script.ts @@ -533,9 +533,7 @@ export function entryCreateUpdateScript(contentType) { async function updateEntry(entry, entryDetails) { if (entry) { Object.assign(entry, { ...entryDetails }); - await entry.update().catch(err => { - throw err - }); + await entry.update(); } } @@ -608,9 +606,6 @@ export function entryCreateUpdateScript(contentType) { .contentType('${contentType}') .entry() .create({ entry: entryDetails }) - .catch(err => { - throw err; - }) if(createdEntry){ if (flag.references) { diff --git a/packages/contentstack-branches/src/utils/entry-update-script.ts b/packages/contentstack-branches/src/utils/entry-update-script.ts index 7e35198709..d99f5c79d3 100644 --- a/packages/contentstack-branches/src/utils/entry-update-script.ts +++ b/packages/contentstack-branches/src/utils/entry-update-script.ts @@ -532,9 +532,7 @@ export function entryUpdateScript(contentType) { async function updateEntry(entry, entryDetails) { Object.assign(entry, { ...entryDetails }); - await entry.update().catch(err => { - throw err - }); + await entry.update(); } async function updateReferences(entryDetails, baseEntry, references) { @@ -605,9 +603,6 @@ export function entryUpdateScript(contentType) { .contentType('${contentType}') .entry() .create({ entry: entryDetails }) - .catch(err => { - throw err; - }) if(createdEntry){ if (flag.references) { From 829550ac69566bc678f958f941960f122d281dc6 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Thu, 21 Mar 2024 19:00:07 +0530 Subject: [PATCH 6/6] PR comment fixes --- .../src/commands/cm/stacks/migration.js | 2 +- .../src/utils/error-handler.js | 19 ------------------- .../contentstack-migration/src/utils/index.js | 1 - 3 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 packages/contentstack-migration/src/utils/error-handler.js diff --git a/packages/contentstack-migration/src/commands/cm/stacks/migration.js b/packages/contentstack-migration/src/commands/cm/stacks/migration.js index fd17a7b6f5..cf591102bb 100644 --- a/packages/contentstack-migration/src/commands/cm/stacks/migration.js +++ b/packages/contentstack-migration/src/commands/cm/stacks/migration.js @@ -134,7 +134,7 @@ class MigrationCommand extends Command { await this.execSingleFile(filePath, mapInstance); } const errLogPath = `${process.cwd()}/migration-logs`; - if (fs.existsSync(errLogPath) && !isEmpty(`${errLogPath}/error.logs`)) { + if (fs.existsSync(errLogPath)) { this.log(`The log has been stored at: `, errLogPath); } } diff --git a/packages/contentstack-migration/src/utils/error-handler.js b/packages/contentstack-migration/src/utils/error-handler.js deleted file mode 100644 index 9d42b3693f..0000000000 --- a/packages/contentstack-migration/src/utils/error-handler.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -const { errorMessageHandler } = require('./constants'); - -module.exports = (data, type, method, err) => { - // NOTE: Commenting this code as the API errors are handled through error-helper.js also - // if (data && type && method) { - // logger.log('error', { error: `Error occurred while ${errorMessageHandler[method]} ${type}: ${data}.` }); - // } - // if (err.errorMessage) { - // logger.log('error', { errorAPI: err.errorMessage }); - // } - // if (err instanceof Error && err && err.message && err.stack) { - // logger.log('error', { error: err.message }); - // } else { - // logger.log('error', { error: err }); - // } - // throw new Error(err); -}; diff --git a/packages/contentstack-migration/src/utils/index.js b/packages/contentstack-migration/src/utils/index.js index dd3ea9763a..18553758e4 100644 --- a/packages/contentstack-migration/src/utils/index.js +++ b/packages/contentstack-migration/src/utils/index.js @@ -11,7 +11,6 @@ module.exports = { safePromise: require('./safe-promise'), getConfig: require('./get-config'), successHandler: require('./success-handler'), - errorHandler: require('./error-handler'), getCallsite: require('./callsite'), errorHelper: require('./error-helper'), groupBy: require('./group-by'),