diff --git a/package-lock.json b/package-lock.json index 1059df6..6127fac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,25 +11,25 @@ "dependencies": { "@oclif/core": "^4.0.17", "@salesforce/core": "^8.2.8", - "@salesforce/sf-plugins-core": "^11.2.4", + "@salesforce/sf-plugins-core": "^11.2.7", "chalk": "^5.3.0", "cosmiconfig": "^9.0.0", "fs-extra": "^11.2.0", "glob": "^11.0.0", - "lightning-flow-scanner-core": "3.22.0", + "lightning-flow-scanner-core": "3.22.6", "tslib": "^2", "xml2js": "^0.6.2" }, "devDependencies": { - "@oclif/plugin-help": "^6.2.7", - "@oclif/test": "^4.0.7", + "@oclif/plugin-help": "^6.2.8", + "@oclif/test": "^4.0.8", "@salesforce/dev-config": "^4.3.1", - "@salesforce/ts-sinon": "^1.4.23", + "@salesforce/ts-sinon": "^1.4.24", "@sinonjs/fake-timers": "^11.2.2", "@types/chai": "^4", "@types/jsforce": "^1.11.5", "@types/mocha": "^10.0.7", - "@types/node": "^22.0.2", + "@types/node": "^22.1.0", "@types/sinonjs__fake-timers": "^8.1.5", "@typescript-eslint/eslint-plugin": "^8.0.0", "@typescript-eslint/parser": "^8.0.0", @@ -39,7 +39,7 @@ "globby": "^14.0.2", "mocha": "^10.7.0", "nyc": "^17", - "oclif": "^4.14.12", + "oclif": "^4.14.14", "prettier": "^3.3.3", "ts-node": "^10.9.2", "typescript": "^5.5.4" @@ -289,18 +289,18 @@ } }, "node_modules/@aws-sdk/client-cloudfront": { - "version": "3.622.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudfront/-/client-cloudfront-3.622.0.tgz", - "integrity": "sha512-CGMfUrBA7fVn8MrUT8IPWCA27jK97a/2KzMQHFHktxhdfI8HzTrwkABS/Q5nB5iwCL1QL+eAmFhrk8ELt9SDMA==", + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudfront/-/client-cloudfront-3.623.0.tgz", + "integrity": "sha512-GHgbPGatostx+yffLN1xOgPl+hvB0mQFUv48/Iv0qnifWBdXvzp1Kv+eXQ6EdK7FtoIsW39yEQONP8EFrNYQmQ==", "dev": true, "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.622.0", - "@aws-sdk/client-sts": "3.622.0", - "@aws-sdk/core": "3.622.0", - "@aws-sdk/credential-provider-node": "3.622.0", + "@aws-sdk/client-sso-oidc": "3.623.0", + "@aws-sdk/client-sts": "3.623.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/credential-provider-node": "3.623.0", "@aws-sdk/middleware-host-header": "3.620.0", "@aws-sdk/middleware-logger": "3.609.0", "@aws-sdk/middleware-recursion-detection": "3.620.0", @@ -344,6 +344,252 @@ "node": ">=16.0.0" } }, + "node_modules/@aws-sdk/client-cloudfront/node_modules/@aws-sdk/client-sso": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.623.0.tgz", + "integrity": "sha512-oEACriysQMnHIVcNp7TD6D1nzgiHfYK0tmMBMbUxgoFuCBkW9g9QYvspHN+S9KgoePfMEXHuPUe9mtG9AH9XeA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-cloudfront/node_modules/@aws-sdk/client-sso-oidc": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.623.0.tgz", + "integrity": "sha512-lMFEXCa6ES/FGV7hpyrppT1PiAkqQb51AbG0zVU3TIgI2IO4XX02uzMUXImRSRqRpGymRCbJCaCs9LtKvS/37Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/credential-provider-node": "3.623.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.623.0" + } + }, + "node_modules/@aws-sdk/client-cloudfront/node_modules/@aws-sdk/client-sts": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.623.0.tgz", + "integrity": "sha512-iJNdx76SOw0YjHAUv8aj3HXzSu3TKI7qSGuR+OGATwA/kpJZDd+4+WYBdGtr8YK+hPrGGqhfecuCkEg805O5iA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/client-sso-oidc": "3.623.0", + "@aws-sdk/core": "3.623.0", + "@aws-sdk/credential-provider-node": "3.623.0", + "@aws-sdk/middleware-host-header": "3.620.0", + "@aws-sdk/middleware-logger": "3.609.0", + "@aws-sdk/middleware-recursion-detection": "3.620.0", + "@aws-sdk/middleware-user-agent": "3.620.0", + "@aws-sdk/region-config-resolver": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@aws-sdk/util-endpoints": "3.614.0", + "@aws-sdk/util-user-agent-browser": "3.609.0", + "@aws-sdk/util-user-agent-node": "3.614.0", + "@smithy/config-resolver": "^3.0.5", + "@smithy/core": "^2.3.2", + "@smithy/fetch-http-handler": "^3.2.4", + "@smithy/hash-node": "^3.0.3", + "@smithy/invalid-dependency": "^3.0.3", + "@smithy/middleware-content-length": "^3.0.5", + "@smithy/middleware-endpoint": "^3.1.0", + "@smithy/middleware-retry": "^3.0.14", + "@smithy/middleware-serde": "^3.0.3", + "@smithy/middleware-stack": "^3.0.3", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/node-http-handler": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/url-parser": "^3.0.3", + "@smithy/util-base64": "^3.0.0", + "@smithy/util-body-length-browser": "^3.0.0", + "@smithy/util-body-length-node": "^3.0.0", + "@smithy/util-defaults-mode-browser": "^3.0.14", + "@smithy/util-defaults-mode-node": "^3.0.14", + "@smithy/util-endpoints": "^2.0.5", + "@smithy/util-middleware": "^3.0.3", + "@smithy/util-retry": "^3.0.3", + "@smithy/util-utf8": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-cloudfront/node_modules/@aws-sdk/core": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.623.0.tgz", + "integrity": "sha512-8Toq3X6trX/67obSdh4K0MFQY4f132bEbr1i0YPDWk/O3KdBt12mLC/sW3aVRnlIs110XMuX9yrWWqJ8fDW10g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@smithy/core": "^2.3.2", + "@smithy/node-config-provider": "^3.1.4", + "@smithy/protocol-http": "^4.1.0", + "@smithy/signature-v4": "^4.1.0", + "@smithy/smithy-client": "^3.1.12", + "@smithy/types": "^3.3.0", + "@smithy/util-middleware": "^3.0.3", + "fast-xml-parser": "4.4.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-cloudfront/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.623.0.tgz", + "integrity": "sha512-kvXA1SwGneqGzFwRZNpESitnmaENHGFFuuTvgGwtMe7mzXWuA/LkXdbiHmdyAzOo0iByKTCD8uetuwh3CXy4Pw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.622.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.623.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-sts": "^3.623.0" + } + }, + "node_modules/@aws-sdk/client-cloudfront/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.623.0.tgz", + "integrity": "sha512-qDwCOkhbu5PfaQHyuQ+h57HEx3+eFhKdtIw7aISziWkGdFrMe07yIBd7TJqGe4nxXnRF1pfkg05xeOlMId997g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.620.1", + "@aws-sdk/credential-provider-http": "3.622.0", + "@aws-sdk/credential-provider-ini": "3.623.0", + "@aws-sdk/credential-provider-process": "3.620.1", + "@aws-sdk/credential-provider-sso": "3.623.0", + "@aws-sdk/credential-provider-web-identity": "3.621.0", + "@aws-sdk/types": "3.609.0", + "@smithy/credential-provider-imds": "^3.2.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@aws-sdk/client-cloudfront/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.623.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.623.0.tgz", + "integrity": "sha512-70LZhUb3l7cttEsg4A0S4Jq3qrCT/v5Jfyl8F7w1YZJt5zr3oPPcvDJxo/UYckFz4G4/5BhGa99jK8wMlNE9QA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/client-sso": "3.623.0", + "@aws-sdk/token-providers": "3.614.0", + "@aws-sdk/types": "3.609.0", + "@smithy/property-provider": "^3.1.3", + "@smithy/shared-ini-file-loader": "^3.1.4", + "@smithy/types": "^3.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/@aws-sdk/client-s3": { "version": "3.622.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.622.0.tgz", @@ -2154,9 +2400,9 @@ } }, "node_modules/@oclif/plugin-help": { - "version": "6.2.7", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-6.2.7.tgz", - "integrity": "sha512-gwrCZW0EjbMe6iIXrkXWpIcfoqo+uMvWRudV3nkwa7ARL2U2GWy8RQ3+bqXvqByauRUcbgv3D6+38lSWqmMwtA==", + "version": "6.2.8", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-6.2.8.tgz", + "integrity": "sha512-QRpFYlBeJffl4cXGBi8e+EfGogDmU7y8do1ZHxmPKZ5eZ0mfeKiqq2WA9dwRMZJriy1qSaGsbkOYgYQWlOYhSg==", "dev": true, "license": "MIT", "dependencies": { @@ -2207,12 +2453,13 @@ } }, "node_modules/@oclif/test": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/@oclif/test/-/test-4.0.7.tgz", - "integrity": "sha512-yrWzyaagzv2XfJmdQi3V7S8dxlzjz36al8KdFKI7xQo+XAVyiUK4HaqxL71XYCPSa75Y9faWqCMyt+JgLMtW2w==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@oclif/test/-/test-4.0.8.tgz", + "integrity": "sha512-1UDwN2zrNRquQiWfn5wcokeQOOlJMrrn5KPufcrXzrh5otX9C/rkAGyQsJnEisbruPjOO541hzdybUzvK7Kvwg==", "dev": true, + "license": "MIT", "dependencies": { - "ansis": "^3.3.1", + "ansis": "^3.3.2", "debug": "^4.3.6" }, "engines": { @@ -2340,11 +2587,12 @@ "license": "BSD-3-Clause" }, "node_modules/@salesforce/kit": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@salesforce/kit/-/kit-3.1.6.tgz", - "integrity": "sha512-zAYPmCSAvdonDOnL5AzuVRVv0sRMlQd6gi12HDE1964VqSjt5pzlLU90thh3Qq4A1Wxbdu0FbHYx9BvZ4fWPvQ==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@salesforce/kit/-/kit-3.2.1.tgz", + "integrity": "sha512-LrZH2F06XPLUTMXC3av6A0VDAJykUqRtYB6tTjAKzwS1gCnp6BEn6VyjZNg0Fg/Kfp6OTrMxiIgbUFsNehEV7A==", + "license": "BSD-3-Clause", "dependencies": { - "@salesforce/ts-types": "^2.0.10" + "@salesforce/ts-types": "^2.0.12" } }, "node_modules/@salesforce/schemas": { @@ -2353,17 +2601,17 @@ "integrity": "sha512-LiN37zG5ODT6z70sL1fxF7BQwtCX9JOWofSU8iliSNIM+WDEeinnoFtVqPInRSNt8I0RiJxIKCrqstsmQRBNvA==" }, "node_modules/@salesforce/sf-plugins-core": { - "version": "11.2.4", - "resolved": "https://registry.npmjs.org/@salesforce/sf-plugins-core/-/sf-plugins-core-11.2.4.tgz", - "integrity": "sha512-gA4gQGfvQaW1CVodwGRHCfhWTo6zrOZq83Ygy/sVmz0KzffBvs6axUnKns9NMHUAGabwVZVY6bbnLJeFvCRWeg==", + "version": "11.2.7", + "resolved": "https://registry.npmjs.org/@salesforce/sf-plugins-core/-/sf-plugins-core-11.2.7.tgz", + "integrity": "sha512-ulpWOBrWb2c7II+Uvy4kackD+JG2QscnLD9Cmrdjcvd7e0+4vdl5kQViCKTVjvCjJRwOsdhXE5jpS4yBmx15BA==", "license": "BSD-3-Clause", "dependencies": { - "@inquirer/confirm": "^3.1.17", + "@inquirer/confirm": "^3.1.20", "@inquirer/password": "^2.1.18", "@oclif/core": "^4.0.15", "@salesforce/core": "^8.2.7", - "@salesforce/kit": "^3.1.6", - "@salesforce/ts-types": "^2.0.11", + "@salesforce/kit": "^3.2.1", + "@salesforce/ts-types": "^2.0.12", "ansis": "^3.3.2", "cli-progress": "^3.12.0", "natural-orderby": "^3.0.2", @@ -2474,13 +2722,13 @@ } }, "node_modules/@salesforce/ts-sinon": { - "version": "1.4.23", - "resolved": "https://registry.npmjs.org/@salesforce/ts-sinon/-/ts-sinon-1.4.23.tgz", - "integrity": "sha512-ij05LLVsxMpK9HPWF0i2Vow/oz/zw3MDtdzYDH4IRPEw9mwiq7/QW5V84dYD7D7NvFSAa5Leo2yeFie2d0yUdA==", + "version": "1.4.24", + "resolved": "https://registry.npmjs.org/@salesforce/ts-sinon/-/ts-sinon-1.4.24.tgz", + "integrity": "sha512-oTl/WRM958XMtgTNYDSjF86zpvBuHhIiQmI+T0N9Y+KCZ3Ext9gV4gQ5Xd1bBPiht+yv4k0sW5jq/QZPYr6Cyw==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "@salesforce/ts-types": "^2.0.10", + "@salesforce/ts-types": "^2.0.12", "sinon": "^5.1.1", "tslib": "^2.6.3" } @@ -3389,12 +3637,12 @@ } }, "node_modules/@types/node": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.2.tgz", - "integrity": "sha512-yPL6DyFwY5PiMVEwymNeqUTKsDczQBJ/5T7W/46RwLU/VH+AA8aT5TZkvBviLKLbbm0hlfftEkGrNzfRk/fofQ==", + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", + "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", "license": "MIT", "dependencies": { - "undici-types": "~6.11.1" + "undici-types": "~6.13.0" } }, "node_modules/@types/path-browserify": { @@ -6289,9 +6537,9 @@ } }, "node_modules/lightning-flow-scanner-core": { - "version": "3.22.0", - "resolved": "https://registry.npmjs.org/lightning-flow-scanner-core/-/lightning-flow-scanner-core-3.22.0.tgz", - "integrity": "sha512-5YKWfEzy8CwHoDyzHHWylHvoCfc1/fdEpdkUx6hCqYsRT/Lapgh7GvgozJmMd+Kx8mcvoQfIG9kiVdVu94eDEg==", + "version": "3.22.6", + "resolved": "https://registry.npmjs.org/lightning-flow-scanner-core/-/lightning-flow-scanner-core-3.22.6.tgz", + "integrity": "sha512-G17SbMXCBy6DNfFdWr/7b60sfgLptl8PQppAWvFcgORO7epjhAh4ZTe0JW+8qyo3TZE9UfW8gs7UY7LtblRLAQ==", "license": "MIT", "dependencies": { "@types/path-browserify": "^1.0.2", @@ -6299,7 +6547,7 @@ "xmlbuilder2": "^3.1.1" }, "engines": { - "node": "^18 || ^20" + "node": "^18 || ^20 || ^22" } }, "node_modules/lilconfig": { @@ -7024,18 +7272,19 @@ } }, "node_modules/oclif": { - "version": "4.14.12", - "resolved": "https://registry.npmjs.org/oclif/-/oclif-4.14.12.tgz", - "integrity": "sha512-1stR9IK4LyAL2RvP/idZpM9qJJ1gStt6bpjrvN3Sl+ncLX/ocOMoYLw8mEDh3DzgNYXajaN4aCYPaaRISuN+Jw==", + "version": "4.14.14", + "resolved": "https://registry.npmjs.org/oclif/-/oclif-4.14.14.tgz", + "integrity": "sha512-8F/phSm4qr3588WYDhmjOnafjb8/cb+C1vrghJ7vew4xz5h2IrftQLvqq8UjhE7QPcm9xSlODleO5YCNPB+4cg==", "dev": true, + "license": "MIT", "dependencies": { - "@aws-sdk/client-cloudfront": "^3.609.0", + "@aws-sdk/client-cloudfront": "^3.623.0", "@aws-sdk/client-s3": "^3.614.0", "@inquirer/confirm": "^3.1.16", "@inquirer/input": "^2.2.4", "@inquirer/select": "^2.3.10", "@oclif/core": "^4", - "@oclif/plugin-help": "^6.2.2", + "@oclif/plugin-help": "^6.2.7", "@oclif/plugin-not-found": "^3.2.14", "@oclif/plugin-warn-if-update-available": "^3.0.19", "async-retry": "^1.3.3", @@ -8550,9 +8799,9 @@ } }, "node_modules/undici-types": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz", - "integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz", + "integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==", "license": "MIT" }, "node_modules/unicorn-magic": { diff --git a/package.json b/package.json index 3c75fda..ba16d7e 100644 --- a/package.json +++ b/package.json @@ -5,25 +5,25 @@ "dependencies": { "@oclif/core": "^4.0.17", "@salesforce/core": "^8.2.8", - "@salesforce/sf-plugins-core": "^11.2.4", + "@salesforce/sf-plugins-core": "^11.2.7", "chalk": "^5.3.0", "cosmiconfig": "^9.0.0", "fs-extra": "^11.2.0", "glob": "^11.0.0", - "lightning-flow-scanner-core": "3.22.0", + "lightning-flow-scanner-core": "3.22.6", "tslib": "^2", "xml2js": "^0.6.2" }, "devDependencies": { - "@oclif/plugin-help": "^6.2.7", - "@oclif/test": "^4.0.7", + "@oclif/plugin-help": "^6.2.8", + "@oclif/test": "^4.0.8", "@salesforce/dev-config": "^4.3.1", - "@salesforce/ts-sinon": "^1.4.23", + "@salesforce/ts-sinon": "^1.4.24", "@sinonjs/fake-timers": "^11.2.2", "@types/chai": "^4", "@types/jsforce": "^1.11.5", "@types/mocha": "^10.0.7", - "@types/node": "^22.0.2", + "@types/node": "^22.1.0", "@types/sinonjs__fake-timers": "^8.1.5", "@typescript-eslint/eslint-plugin": "^8.0.0", "@typescript-eslint/parser": "^8.0.0", @@ -33,7 +33,7 @@ "globby": "^14.0.2", "mocha": "^10.7.0", "nyc": "^17", - "oclif": "^4.14.12", + "oclif": "^4.14.14", "prettier": "^3.3.3", "ts-node": "^10.9.2", "typescript": "^5.5.4" diff --git a/src/commands/flow/scan.ts b/src/commands/flow/scan.ts index ce6ded1..1e8b2db 100644 --- a/src/commands/flow/scan.ts +++ b/src/commands/flow/scan.ts @@ -1,6 +1,6 @@ import { SfCommand, Flags } from "@salesforce/sf-plugins-core"; import { Messages, SfError } from "@salesforce/core"; -import * as core from "lightning-flow-scanner-core/out/index.js"; +import * as core from "lightning-flow-scanner-core"; import * as fse from "fs-extra"; import { FindFlows } from "../../libs/FindFlows.js"; import { Violation } from "../../models/Violation.js"; @@ -20,7 +20,7 @@ export type ScanResult = { message: string; }; results: Violation[]; -} +}; export default class Scan extends SfCommand { public static description = messages.getMessage("commandDescription"); @@ -29,8 +29,8 @@ export default class Scan extends SfCommand { "sfdx flow:scan --failon warning", "sfdx flow:scan -c path/to/config.json", "sfdx flow:scan -c path/to/config.json --failon warning", - "sfdx flow:scan -d path/to/flows/directory" - ] + "sfdx flow:scan -d path/to/flows/directory", + ]; protected static requiresUsername = false; protected static supportsDevhubUsername = false; @@ -55,9 +55,10 @@ export default class Scan extends SfCommand { }), failon: Flags.option({ char: "f", - description: "Threshold failure level (error, warning, note, or never) defining when the command return code will be 1", + description: + "Threshold failure level (error, warning, note, or never) defining when the command return code will be 1", options: ["error", "warning", "note", "never"] as const, - default: "error" + default: "error", })(), retrieve: Flags.boolean({ char: "r", @@ -70,17 +71,18 @@ export default class Scan extends SfCommand { required: false, }), targetusername: Flags.string({ - char: 'u', - description: 'Retrieve the latest metadata from the target before the scan.', + char: "u", + description: + "Retrieve the latest metadata from the target before the scan.", required: false, - charAliases: ['o'] - }) + charAliases: ["o"], + }), }; public async run(): Promise { const { flags } = await this.parse(Scan); this.failOn = flags.failon || "error"; - this.spinner.start('Loading Lightning Flow Scanner'); + this.spinner.start("Loading Lightning Flow Scanner"); await this.loadScannerOptions(flags.config); if (flags.targetusername) { await this.retrieveFlowsFromOrg(flags.targetusername); @@ -91,9 +93,12 @@ export default class Scan extends SfCommand { // core.Flow const parsedFlows = await core.parse(flowFiles); - const scanResults: core.ScanResult[] = (this.userConfig && Object.keys(this.userConfig).length > 0) ? core.scan(parsedFlows, this.userConfig) : core.scan(parsedFlows); + const scanResults: core.ScanResult[] = + this.userConfig && Object.keys(this.userConfig).length > 0 + ? core.scan(parsedFlows, this.userConfig) + : core.scan(parsedFlows); this.spinner.stop(`Scan complete`); - this.log(''); + this.log(""); // Build results const results = this.buildResults(scanResults); @@ -106,38 +111,59 @@ export default class Scan extends SfCommand { } for (const resultKey in resultsByFlow) { const matchingScanResult = scanResults.find((res) => { - return res.flow.label === resultKey + return res.flow.label === resultKey; }); - this.styledHeader("Flow: " + chalk.yellow(resultKey) + " " + chalk.red("(" + resultsByFlow[resultKey].length + " results)")); - this.log(chalk.italic('Type: ' + matchingScanResult.flow.type)); - this.log(''); + this.styledHeader( + "Flow: " + + chalk.yellow(resultKey) + + " " + + chalk.red("(" + resultsByFlow[resultKey].length + " results)"), + ); + this.log(chalk.italic("Type: " + matchingScanResult.flow.type)); + this.log(""); // todo flow uri //this.table(resultsByFlow[resultKey], ['rule', 'type', 'name', 'severity']); this.table(resultsByFlow[resultKey], { - rule: { header: 'RULE' }, - type: { header: 'TYPE' }, - name: { header: 'NAME' }, - severity: { header: 'SEVERITY' } - }) - this.log(''); + rule: { header: "RULE" }, + type: { header: "TYPE" }, + name: { header: "NAME" }, + severity: { header: "SEVERITY" }, + }); + this.log(""); } } - this.styledHeader("Total: " + - chalk.red(results.length + - " Results") + " in " + - chalk.yellow(scanResults.length + - " Flows") + "."); + this.styledHeader( + "Total: " + + chalk.red(results.length + " Results") + + " in " + + chalk.yellow(scanResults.length + " Flows") + + ".", + ); // Display number of errors by severity - for (const severity of ["error","warning","note"]) { + for (const severity of ["error", "warning", "note"]) { const severityCounter = this.errorCounters[severity] || 0; this.log(`- ${severity}: ${severityCounter}`); } // TODO CALL TO ACTION - this.log(''); - this.log(chalk.bold(chalk.italic(chalk.yellowBright('Be a part of our mission to champion Flow Best Practices by starring us on GitHub:')))); - this.log(chalk.italic(chalk.blueBright(chalk.underline("https://github.com/Lightning-Flow-Scanner")))); + this.log(""); + this.log( + chalk.bold( + chalk.italic( + chalk.yellowBright( + "Be a part of our mission to champion Flow Best Practices by starring us on GitHub:", + ), + ), + ), + ); + this.log( + chalk.italic( + chalk.blueBright( + chalk.underline("https://github.com/Lightning-Flow-Scanner"), + ), + ), + ); const status = this.getStatus(); // Set status code = 1 if there are errors, that will make cli exit with code 1 when not in --json mode @@ -145,11 +171,15 @@ export default class Scan extends SfCommand { process.exitCode = status; } const summary = { - flowsNumber: scanResults.length, 'results': results.length, 'message': "A total of " + + flowsNumber: scanResults.length, + results: results.length, + message: + "A total of " + results.length + " results have been found in " + scanResults.length + - " flows.", errorLevelsDetails: {} + " flows.", + errorLevelsDetails: {}, }; return { summary, status: status, results }; } @@ -160,14 +190,12 @@ export default class Scan extends SfCommand { if (directory && sourcepath) { this.spinner.stop("Error"); throw new SfError( - "You can only specify one of either directory or sourcepath, not both." + "You can only specify one of either directory or sourcepath, not both.", ); } else if (directory) { flowFiles = FindFlows(directory); } else if (sourcepath) { - flowFiles = sourcepath - .split(",") - .filter((f) => fse.exists(f)); + flowFiles = sourcepath.split(",").filter((f) => fse.exists(f)); } else { flowFiles = FindFlows("."); } @@ -176,22 +204,22 @@ export default class Scan extends SfCommand { private getStatus() { let status = 0; - if (this.failOn === 'never') { + if (this.failOn === "never") { status = 0; - } - else { + } else { if (this.failOn === "error" && this.errorCounters["error"] > 0) { status = 1; - } - else if (this.failOn === 'warning' && ( - this.errorCounters["error"] > 0 - || this.errorCounters["warning"] > 0)) { + } else if ( + this.failOn === "warning" && + (this.errorCounters["error"] > 0 || this.errorCounters["warning"] > 0) + ) { status = 1; - } - else if (this.failOn === 'note' && - (this.errorCounters["error"] > 0 - || this.errorCounters["warning"] > 0 - || this.errorCounters["note"] > 0)) { + } else if ( + this.failOn === "note" && + (this.errorCounters["error"] > 0 || + this.errorCounters["warning"] > 0 || + this.errorCounters["note"] > 0) + ) { status = 1; } } @@ -206,21 +234,23 @@ export default class Scan extends SfCommand { for (const ruleResult of scanResult.ruleResults as core.RuleResult[]) { const ruleDescription = ruleResult.ruleDefinition.description; const rule = ruleResult.ruleDefinition.label; - if (ruleResult.occurs && ruleResult.details && ruleResult.details.length > 0) { - const severity = ruleResult.severity || "error" - for (const result of (ruleResult.details as core.ResultDetails[])) { - const detailObj = Object.assign( - result, - { - ruleDescription, - rule, - flowName, - flowType, - severity - } - ); + if ( + ruleResult.occurs && + ruleResult.details && + ruleResult.details.length > 0 + ) { + const severity = ruleResult.severity || "error"; + for (const result of ruleResult.details as core.ResultDetails[]) { + const detailObj = Object.assign(result, { + ruleDescription, + rule, + flowName, + flowType, + severity, + }); errors.push(detailObj); - this.errorCounters[severity] = (this.errorCounters[severity] || 0) + 1; + this.errorCounters[severity] = + (this.errorCounters[severity] || 0) + 1; } } } @@ -252,7 +282,6 @@ export default class Scan extends SfCommand { const explorerSearchRes = await explorer.search(); this.userConfig = explorerSearchRes?.config ?? undefined; } - } private async retrieveFlowsFromOrg(targetusername: string) { @@ -273,7 +302,7 @@ export default class Scan extends SfCommand { messages.getMessage("errorRetrievingMetadata"), "", [], - 1 + 1, ); } else { this.spinner.stop(chalk.greenBright("Retrieve Completed ✔.")); diff --git a/src/libs/XMLParser.ts b/src/libs/XMLParser.ts index 96ef39a..dfdd631 100644 --- a/src/libs/XMLParser.ts +++ b/src/libs/XMLParser.ts @@ -1,16 +1,15 @@ -import { Parser } from 'xml2js'; -import * as core from "lightning-flow-scanner-core/out/index.js"; +import { Parser } from "xml2js"; +import * as core from "lightning-flow-scanner-core"; -export class XMLParser{ +export class XMLParser { + private parser: Parser; - private parser : Parser; - - constructor(){ + constructor() { this.parser = new Parser(); } - public execute(xml): Promise<{ Flow : core.Flow }>{ - return new Promise<{ Flow : core.Flow }>((resolve, reject) => { + public execute(xml): Promise<{ Flow: core.Flow }> { + return new Promise<{ Flow: core.Flow }>((resolve, reject) => { this.parser.parseString(xml, (err, result) => { if (err) { reject(err);