diff --git a/package-lock.json b/package-lock.json index f86189fc35..20d0192895 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,13 +28,13 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -174,9 +174,9 @@ } }, "node_modules/@babel/core": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz", - "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -184,11 +184,11 @@ "@babel/generator": "^7.23.6", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.7", - "@babel/parser": "^7.23.6", - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -354,9 +354,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -414,14 +414,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.8.tgz", - "integrity": "sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.7", - "@babel/types": "^7.23.6" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -513,9 +513,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz", - "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -702,9 +702,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.8", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz", - "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -714,23 +714,23 @@ } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.23.5", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz", - "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", @@ -739,8 +739,8 @@ "@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.23.6", - "@babel/types": "^7.23.6", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -758,9 +758,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz", - "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", @@ -1634,14 +1634,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -1656,9 +1656,9 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -1670,9 +1670,9 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.21", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz", - "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==", + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.24.tgz", + "integrity": "sha512-+VaWXDa6+l6MhflBvVXjIEAzb59nQ2JUK3bwRp2zRpPtU+8TFRy9Gg/5oIcNlkEL5PGlBFGfemUVvIgLnTzq7Q==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -2076,9 +2076,9 @@ } }, "node_modules/@oclif/plugin-plugins": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.1.17.tgz", - "integrity": "sha512-dI/6OyK/IQtnZ1gYI3bMpFuPVf7qqFymY/rK6u6uVNCp6JPM30krViSNfbVi57u0XCs6OLSYSJpyjwg5SXvObw==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.2.6.tgz", + "integrity": "sha512-HdPWRQYI4wsTcqRJFvEGFalgX1q7y0oeCKdZtMI6Wl1PsALloYlbbQ1rl1jqk3YFbHjyEWud34gccOdXLl3UAA==", "dependencies": { "@oclif/core": "^3.10.2", "chalk": "^5.3.0", @@ -2837,6 +2837,14 @@ "npm": ">= 8.6.0" } }, + "node_modules/@slack/logger/node_modules/@types/node": { + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/@slack/oauth": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/@slack/oauth/-/oauth-2.6.2.tgz", @@ -4466,9 +4474,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1536.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1536.0.tgz", - "integrity": "sha512-Kwl5xKti6qURwKkasZPA9d4q72tcNt0e3ZZ2ikjZvWbfWcIuuLN0GpUTarU8UpV4EiEw3W5z5G3jyHy8JLNyLw==", + "version": "2.1569.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1569.0.tgz", + "integrity": "sha512-9puKjesHKOjAYPqFurW/9nv3qhQ+STu3bVa5PN158SCeZPE6NsxZIWnHLglJvKU7N8UXJo1aJHmKDUGrsS7rXw==", "dev": true, "dependencies": { "buffer": "4.9.2", @@ -4783,12 +4791,12 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -4796,7 +4804,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -6554,9 +6562,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.632", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.632.tgz", - "integrity": "sha512-JGmudTwg7yxMYvR/gWbalqqQiyu7WTFv2Xu3vw4cJHXPFxNgAk0oy8UHaer8nLF4lZJa+rNoj6GsrKIVJTV6Tw==", + "version": "1.4.689", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.689.tgz", + "integrity": "sha512-GatzRKnGPS1go29ep25reM94xxd1Wj8ritU0yRhCJ/tr1Bg8gKnm6R9O/yPOhGQBoLMZ9ezfrpghNaTw97C/PQ==", "dev": true }, "node_modules/elegant-spinner": { @@ -6692,31 +6700,33 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "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==", + "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", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.2", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "hasown": "^2.0.0", "internal-slot": "^1.0.5", "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", @@ -6729,10 +6739,10 @@ "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "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.13" }, @@ -8064,13 +8074,13 @@ "dev": true }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.18.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", + "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -20129,13 +20139,17 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -23962,10 +23976,10 @@ }, "packages/contentstack": { "name": "@contentstack/cli", - "version": "1.15.0", + "version": "1.15.1", "license": "MIT", "dependencies": { - "@contentstack/cli-audit": "~1.4.0", + "@contentstack/cli-audit": "~1.4.1", "@contentstack/cli-auth": "~1.3.17", "@contentstack/cli-cm-bootstrap": "~1.9.0", "@contentstack/cli-cm-branches": "~1.0.22", @@ -23973,7 +23987,7 @@ "@contentstack/cli-cm-clone": "~1.10.1", "@contentstack/cli-cm-export": "~1.11.0", "@contentstack/cli-cm-export-to-csv": "~1.7.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", @@ -24030,7 +24044,7 @@ }, "packages/contentstack-audit": { "name": "@contentstack/cli-audit", - "version": "1.4.0", + "version": "1.4.1", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", @@ -24088,6 +24102,15 @@ "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true }, + "packages/contentstack-audit/node_modules/@types/node": { + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, "packages/contentstack-audit/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -24515,7 +24538,7 @@ "dependencies": { "@colors/colors": "^1.5.0", "@contentstack/cli-cm-export": "~1.11.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "async": "^3.2.4", @@ -25495,10 +25518,10 @@ }, "packages/contentstack-import": { "name": "@contentstack/cli-cm-import", - "version": "1.14.0", + "version": "1.14.1", "license": "MIT", "dependencies": { - "@contentstack/cli-audit": "~1.4.0", + "@contentstack/cli-audit": "~1.4.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "@contentstack/management": "~1.15.3", @@ -25724,9 +25747,9 @@ "dev": true }, "packages/contentstack-launch/node_modules/@types/node": { - "version": "16.18.71", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.71.tgz", - "integrity": "sha512-ARO+458bNJQeNEFuPyT6W+q9ULotmsQzhV3XABsFSxEvRMUYENcBsNAHWYPlahU+UHa5gCVwyKT1Z3f1Wwr26Q==", + "version": "16.18.86", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.86.tgz", + "integrity": "sha512-QMvdZf+ZTSiv7gspwhqbfB7Y5DmbYgCsUnakS8Ul9uRbJQehDKaM7SL+GbcDS003Lh7VK4YlelHsRm9HCv26eA==", "dev": true }, "packages/contentstack-launch/node_modules/acorn": { @@ -25974,7 +25997,7 @@ "version": "1.7.1", "license": "MIT", "dependencies": { - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "inquirer": "8.2.4", diff --git a/packages/contentstack-audit/package.json b/packages/contentstack-audit/package.json index a046c729a3..e28891ab3e 100644 --- a/packages/contentstack-audit/package.json +++ b/packages/contentstack-audit/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/cli-audit", - "version": "1.4.0", + "version": "1.4.1", "description": "Contentstack audit plugin", "author": "Contentstack CLI", "homepage": "https://github.com/contentstack/cli", diff --git a/packages/contentstack-audit/src/audit-base-command.ts b/packages/contentstack-audit/src/audit-base-command.ts index 2674927a53..e2f19b6aa8 100644 --- a/packages/contentstack-audit/src/audit-base-command.ts +++ b/packages/contentstack-audit/src/audit-base-command.ts @@ -83,7 +83,13 @@ export abstract class AuditBaseCommand extends BaseCommand): string { - if (!msg) return ''; + const transfer = memoize(function (msg: string, args: Record) { + if (!msg) return ''; + + for (const key of Object.keys(args)) { + const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + msg = msg.replace(new RegExp(`{${escapedKey}}`, 'g'), args[key] || escapedKey); + } - for (const key of Object.keys(args)) { - const escapedKey = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - msg = msg.replace(new RegExp(`{${escapedKey}}`, 'g'), args[key]); - } + return msg; + }); - return msg; + return transfer(msg, args); } export default messages; diff --git a/packages/contentstack-audit/src/modules/entries.ts b/packages/contentstack-audit/src/modules/entries.ts index a54185af8c..87082a369c 100644 --- a/packages/contentstack-audit/src/modules/entries.ts +++ b/packages/contentstack-audit/src/modules/entries.ts @@ -35,6 +35,7 @@ import { ExtensionOrAppFieldDataType, EntryExtensionOrAppFieldDataType, } from '../types'; +import { print } from '../util'; import GlobalField from './global-fields'; import { MarketplaceAppsInstallationData } from '../types/extension'; @@ -106,14 +107,13 @@ export default class Entries { } this.lookForReference([{ locale: code, uid, name: title }], ctSchema, this.entries[entryUid]); - this.log( - $t(auditMsg.SCAN_ENTRY_SUCCESS_MSG, { - title, - local: code, - module: this.config.moduleConfig.entries.name, - }), - 'info', - ); + const message = $t(auditMsg.SCAN_ENTRY_SUCCESS_MSG, { + title, + local: code, + module: this.config.moduleConfig.entries.name, + }); + this.log(message, 'hidden'); + print([{ message: `info: ${message}`, color: 'green' }]); } if (this.fix) { @@ -122,7 +122,7 @@ export default class Entries { } } } - this.log('', 'info'); // Adding empty line + // this.log('', 'info'); // Adding empty line this.removeEmptyVal(); diff --git a/packages/contentstack-audit/src/types/utils.ts b/packages/contentstack-audit/src/types/utils.ts index c0940db196..b7a09306c5 100644 --- a/packages/contentstack-audit/src/types/utils.ts +++ b/packages/contentstack-audit/src/types/utils.ts @@ -5,7 +5,8 @@ import config from "../config"; type LogFn = ( message: string | any, - logType?: LoggerType | PrintOptions | undefined + logType?: LoggerType | PrintOptions | undefined, + skipCredentialCheck?: boolean, ) => void; type ExitFn = (code?: number | undefined) => void; @@ -20,7 +21,7 @@ type ConfigType = { Record; export { LogFn, ExitFn, Partial, ConfigType }; -export type LoggerType = "info" | "warn" | "error" | "debug"; +export type LoggerType = "info" | "warn" | "error" | "debug" | 'hidden'; export type PrintType = { message: string; diff --git a/packages/contentstack-audit/src/util/log.ts b/packages/contentstack-audit/src/util/log.ts index 6414297788..8518d88530 100755 --- a/packages/contentstack-audit/src/util/log.ts +++ b/packages/contentstack-audit/src/util/log.ts @@ -27,6 +27,7 @@ export default class Logger { private infoLogger!: winston.Logger; private errorLogger!: winston.Logger; private config!: Record; + private hiddenInfoLogger!: winston.Logger; get loggerOptions(): winston.transports.FileTransportOptions { return { @@ -41,6 +42,7 @@ export default class Logger { this.config = config; this.infoLogger = this.getLoggerInstance('info'); this.errorLogger = this.getLoggerInstance('error'); + this.hiddenInfoLogger = this.getLoggerInstance('hidden'); } /** @@ -55,24 +57,30 @@ export default class Logger { const consoleOptions: winston.transports.ConsoleTransportOptions = { format: winston.format.combine(winston.format.simple(), winston.format.colorize({ all: true })), }; + const isHidden = logType === 'hidden'; + logType = logType === 'hidden' ? 'info' : logType; if (logType === 'error') { consoleOptions.level = logType; } - const filename = normalize(resolve(this.config.basePath, 'logs', `${logType}.log`)).replace( - /^(\.\.(\/|\\|$))+/, - '', - ); + const filename = normalize( + resolve(this.config.basePath, 'logs', `${logType}.log`), + ).replace(/^(\.\.(\/|\\|$))+/, ''); + const transports: winston.transport[] = [ + new winston.transports.File({ + ...this.loggerOptions, + level: logType, + filename, + }), + ]; + + if (!isHidden) { + transports.push(new winston.transports.Console(consoleOptions)); + } + const loggerOptions: winston.LoggerOptions = { - transports: [ - new winston.transports.File({ - ...this.loggerOptions, - level: logType, - filename, - }), - new winston.transports.Console(consoleOptions), - ], + transports, levels: customLevels.levels, }; @@ -91,8 +99,12 @@ export default class Logger { * @param {LoggerType | PrintOptions | undefined} [logType] - The `logType` parameter is an optional * parameter that specifies the type of log. It can be one of the following values: */ - log(message: string | any, logType?: LoggerType | PrintOptions | undefined): void { - const logString = this.returnString(message); + log( + message: string | any, + logType?: LoggerType | PrintOptions | undefined, + skipCredentialCheck: boolean = false, + ): void { + const logString = skipCredentialCheck ? message : this.returnString(message); switch (logType) { case 'info': @@ -103,6 +115,9 @@ export default class Logger { case 'error': this.errorLogger.error(logString); break; + case 'hidden': + this.hiddenInfoLogger.log('info', logString); + break; default: ux.print(logString, logType || {}); break; diff --git a/packages/contentstack-audit/test/unit/util/log.test.ts b/packages/contentstack-audit/test/unit/util/log.test.ts index 527c8abd0f..03cd2bb19f 100644 --- a/packages/contentstack-audit/test/unit/util/log.test.ts +++ b/packages/contentstack-audit/test/unit/util/log.test.ts @@ -26,7 +26,7 @@ describe('Log utility', () => { const logSpy = sinon.spy(winston, 'createLogger'); const logger = new Logger({ basePath: resolve(__dirname, '..', 'mock') }); - expect(logSpy.callCount).to.be.equals(2); + expect(logSpy.callCount).to.be.equals(3); expect(Object.getPrototypeOf(logger)).has.ownProperty('log'); }); }); diff --git a/packages/contentstack-clone/package.json b/packages/contentstack-clone/package.json index 58ad391724..da3149642e 100644 --- a/packages/contentstack-clone/package.json +++ b/packages/contentstack-clone/package.json @@ -7,7 +7,7 @@ "dependencies": { "@colors/colors": "^1.5.0", "@contentstack/cli-cm-export": "~1.11.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "async": "^3.2.4", diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index 84de150149..e598338abf 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -1,11 +1,11 @@ { "name": "@contentstack/cli-cm-import", "description": "Contentstack CLI plugin to import content into stack", - "version": "1.14.0", + "version": "1.14.1", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-audit": "~1.4.0", + "@contentstack/cli-audit": "~1.4.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "@contentstack/management": "~1.15.3", diff --git a/packages/contentstack-import/src/config/index.ts b/packages/contentstack-import/src/config/index.ts index 3ce1294bae..a2a754daa3 100644 --- a/packages/contentstack-import/src/config/index.ts +++ b/packages/contentstack-import/src/config/index.ts @@ -148,7 +148,7 @@ const config: DefaultConfig = { taxonomies: { dirName: 'taxonomies', fileName: 'taxonomies.json', - } + }, }, languagesCode: [ 'af-za', @@ -388,6 +388,13 @@ const config: DefaultConfig = { // useBackedupDir: '', // backupConcurrency: 10, onlyTSModules: ['taxonomies'], + auditConfig: { + noLog: false, // Skip logs printing on terminal + skipConfirm: true, // Skip confirmation if any + returnResponse: true, // On process completion should return config used in the command + noTerminalOutput: false, // Skip final audit table output on terminal + config: { basePath: '' }, // To overwrite any build-in config. And this config is equal to --config flag. + } }; export default config; diff --git a/packages/contentstack-import/src/import/module-importer.ts b/packages/contentstack-import/src/import/module-importer.ts index 476d0949e8..599e41447f 100755 --- a/packages/contentstack-import/src/import/module-importer.ts +++ b/packages/contentstack-import/src/import/module-importer.ts @@ -115,13 +115,9 @@ class ModuleImporter { */ async auditImportData(logger: Logger) { const basePath = resolve(this.importConfig.backupDir, 'logs', 'audit'); - const auditConfig = { - noLog: false, // Skip logs printing on terminal - skipConfirm: true, // Skip confirmation if any - returnResponse: true, // On process completion should return config used in the command - noTerminalOutput: false, // Skip final audit table output on terminal - config: { basePath }, // To overwrite any build-in config. This config is equal to --config flag. - }; + const auditConfig = this.importConfig.auditConfig + auditConfig.config.basePath = basePath; + try { const args = [ '--data-dir', diff --git a/packages/contentstack-import/src/types/default-config.ts b/packages/contentstack-import/src/types/default-config.ts index 0b5358e647..17a7168a23 100644 --- a/packages/contentstack-import/src/types/default-config.ts +++ b/packages/contentstack-import/src/types/default-config.ts @@ -147,4 +147,13 @@ export default interface DefaultConfig { createBackupDir?: string; overwriteSupportedModules: string[]; onlyTSModules: string[]; + auditConfig?: { + noLog?: boolean; // Skip logs printing on terminal + skipConfirm?: boolean; // Skip confirmation if any + returnResponse?: boolean; // On process completion should return config used in the command + noTerminalOutput?: boolean; // Skip final audit table output on terminal + config?: { + basePath?: string + } & Record; // To overwrite any build-in config. And this config is equal to --config flag. + }; } diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index 67f53fd701..a4996b8a01 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -5,7 +5,7 @@ "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "inquirer": "8.2.4", diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 97feb74e86..2ccb594154 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli", "description": "Command-line tool (CLI) to interact with Contentstack", - "version": "1.15.0", + "version": "1.15.1", "author": "Contentstack", "bin": { "csdx": "./bin/run" @@ -22,7 +22,7 @@ "prepack": "pnpm compile && oclif manifest && oclif readme" }, "dependencies": { - "@contentstack/cli-audit": "~1.4.0", + "@contentstack/cli-audit": "~1.4.1", "@contentstack/cli-auth": "~1.3.17", "@contentstack/cli-cm-bootstrap": "~1.9.0", "@contentstack/cli-cm-branches": "~1.0.22", @@ -30,7 +30,7 @@ "@contentstack/cli-cm-export": "~1.11.0", "@contentstack/cli-cm-clone": "~1.10.1", "@contentstack/cli-cm-export-to-csv": "~1.7.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44755646b8..4603dbc348 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: packages/contentstack: specifiers: - '@contentstack/cli-audit': ~1.4.0 + '@contentstack/cli-audit': ~1.4.1 '@contentstack/cli-auth': ~1.3.17 '@contentstack/cli-cm-bootstrap': ~1.9.0 '@contentstack/cli-cm-branches': ~1.0.22 @@ -18,7 +18,7 @@ importers: '@contentstack/cli-cm-clone': ~1.10.1 '@contentstack/cli-cm-export': ~1.11.0 '@contentstack/cli-cm-export-to-csv': ~1.7.0 - '@contentstack/cli-cm-import': ~1.14.0 + '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-cm-migrate-rte': ~1.4.15 '@contentstack/cli-cm-seed': ~1.7.1 '@contentstack/cli-command': ~1.2.17 @@ -424,7 +424,7 @@ importers: specifiers: '@colors/colors': ^1.5.0 '@contentstack/cli-cm-export': ~1.11.0 - '@contentstack/cli-cm-import': ~1.14.0 + '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.12 '@oclif/test': ^2.5.6 @@ -730,7 +730,7 @@ importers: packages/contentstack-import: specifiers: - '@contentstack/cli-audit': ~1.4.0 + '@contentstack/cli-audit': ~1.4.1 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.12 '@contentstack/management': ~1.15.3 @@ -990,7 +990,7 @@ importers: packages/contentstack-seed: specifiers: - '@contentstack/cli-cm-import': ~1.14.0 + '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.12 '@oclif/plugin-help': ^5.1.19