diff --git a/package-lock.json b/package-lock.json index 4b3158357..60df1f3a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -57,7 +57,7 @@ "jest": "^29.7.0", "jest-mock": "^29.7.0", "js-yaml": "^4.1.0", - "json-colorizer": "^2.2.2", + "json-colorizer": "^3.0.1", "lodash": "^4.17.21", "markdown-diff": "^2.0.0", "markdown-table-ts": "^1.0.3", @@ -7494,6 +7494,11 @@ "simple-swizzle": "^0.2.2" } }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==" + }, "node_modules/colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", @@ -11651,76 +11656,11 @@ "dev": true }, "node_modules/json-colorizer": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/json-colorizer/-/json-colorizer-2.2.2.tgz", - "integrity": "sha512-56oZtwV1piXrQnRNTtJeqRv+B9Y/dXAYLqBBaYl/COcUdoZxgLBLAO88+CnkbT6MxNs0c5E9mPBIb2sFcNz3vw==", - "dependencies": { - "chalk": "^2.4.1", - "lodash.get": "^4.4.2" - } - }, - "node_modules/json-colorizer/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==", - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-colorizer/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==", - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-colorizer/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==", - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/json-colorizer/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==" - }, - "node_modules/json-colorizer/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==", - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/json-colorizer/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==", - "engines": { - "node": ">=4" - } - }, - "node_modules/json-colorizer/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==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-colorizer/-/json-colorizer-3.0.1.tgz", + "integrity": "sha512-4YyRAbD6eHeRnJD9vo0zjiU5fyY9QR6T+iYuH5DpO0XPThKWozpD4MaeY/8nLZIkHC3yEQMFLL+6P94E+JekDw==", "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "colorette": "^2.0.20" } }, "node_modules/json-diff": { @@ -11930,7 +11870,8 @@ "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==" + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "dev": true }, "node_modules/lodash.memoize": { "version": "4.1.2", diff --git a/package.json b/package.json index 4538d9039..42896dc06 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "jest": "^29.7.0", "jest-mock": "^29.7.0", "js-yaml": "^4.1.0", - "json-colorizer": "^2.2.2", + "json-colorizer": "^3.0.1", "lodash": "^4.17.21", "markdown-diff": "^2.0.0", "markdown-table-ts": "^1.0.3", diff --git a/src/commands/emasser/delete/artifacts.ts b/src/commands/emasser/delete/artifacts.ts index f3c1de31f..1256c2920 100644 --- a/src/commands/emasser/delete/artifacts.ts +++ b/src/commands/emasser/delete/artifacts.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/delete/milestones.ts b/src/commands/emasser/delete/milestones.ts index 20c4a49fd..b8867ed34 100644 --- a/src/commands/emasser/delete/milestones.ts +++ b/src/commands/emasser/delete/milestones.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/delete/poams.ts b/src/commands/emasser/delete/poams.ts index 2643d6d21..72fadb55e 100644 --- a/src/commands/emasser/delete/poams.ts +++ b/src/commands/emasser/delete/poams.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/get/artifacts.ts b/src/commands/emasser/get/artifacts.ts index f850ad6e3..c85e9671b 100644 --- a/src/commands/emasser/get/artifacts.ts +++ b/src/commands/emasser/get/artifacts.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Args, Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {ArtifactsApi, ArtifactsExportApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/cac.ts b/src/commands/emasser/get/cac.ts index 3b5929e5d..48d0784b5 100644 --- a/src/commands/emasser/get/cac.ts +++ b/src/commands/emasser/get/cac.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {CACApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/cmmc.ts b/src/commands/emasser/get/cmmc.ts index c8fc259b9..e680136b1 100644 --- a/src/commands/emasser/get/cmmc.ts +++ b/src/commands/emasser/get/cmmc.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {CMMCAssessmentsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/controls.ts b/src/commands/emasser/get/controls.ts index bc84ff2da..f7d917836 100644 --- a/src/commands/emasser/get/controls.ts +++ b/src/commands/emasser/get/controls.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {ControlsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/dashboards.ts b/src/commands/emasser/get/dashboards.ts index bc30a3f0a..b5c95c561 100644 --- a/src/commands/emasser/get/dashboards.ts +++ b/src/commands/emasser/get/dashboards.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Args, Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {DashboardsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/milestones.ts b/src/commands/emasser/get/milestones.ts index c285a1c33..356d98d1e 100644 --- a/src/commands/emasser/get/milestones.ts +++ b/src/commands/emasser/get/milestones.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Args, Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {MilestonesApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/pac.ts b/src/commands/emasser/get/pac.ts index 7ff11d504..9ddedd798 100644 --- a/src/commands/emasser/get/pac.ts +++ b/src/commands/emasser/get/pac.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {PACApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/poams.ts b/src/commands/emasser/get/poams.ts index 535c609df..93b1afe61 100644 --- a/src/commands/emasser/get/poams.ts +++ b/src/commands/emasser/get/poams.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Args, Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {POAMApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/roles.ts b/src/commands/emasser/get/roles.ts index 008aecaed..38fc5280a 100644 --- a/src/commands/emasser/get/roles.ts +++ b/src/commands/emasser/get/roles.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Args, Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {SystemRolesApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/system.ts b/src/commands/emasser/get/system.ts index f720d9970..c098ac9bc 100644 --- a/src/commands/emasser/get/system.ts +++ b/src/commands/emasser/get/system.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {SystemsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/systems.ts b/src/commands/emasser/get/systems.ts index 330536bae..943dce59c 100644 --- a/src/commands/emasser/get/systems.ts +++ b/src/commands/emasser/get/systems.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {SystemsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/test_connection.ts b/src/commands/emasser/get/test_connection.ts index e80e9692c..ad7eb2980 100644 --- a/src/commands/emasser/get/test_connection.ts +++ b/src/commands/emasser/get/test_connection.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {TestApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/test_results.ts b/src/commands/emasser/get/test_results.ts index 4a7ed11ee..519294774 100644 --- a/src/commands/emasser/get/test_results.ts +++ b/src/commands/emasser/get/test_results.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {TestResultsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/workflow_definitions.ts b/src/commands/emasser/get/workflow_definitions.ts index 8d929120f..7f2f275dc 100644 --- a/src/commands/emasser/get/workflow_definitions.ts +++ b/src/commands/emasser/get/workflow_definitions.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {WorkflowDefinitionsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/get/workflow_instances.ts b/src/commands/emasser/get/workflow_instances.ts index e3ca0cde7..debea7189 100644 --- a/src/commands/emasser/get/workflow_instances.ts +++ b/src/commands/emasser/get/workflow_instances.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Args, Command, Flags} from '@oclif/core' import {ApiConnection} from '../../../utils/emasser/apiConnection' import {WorkflowInstancesApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/post/artifacts.ts b/src/commands/emasser/post/artifacts.ts index c44322547..e4edc94f2 100644 --- a/src/commands/emasser/post/artifacts.ts +++ b/src/commands/emasser/post/artifacts.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Zip} from 'zip-lib' import {Command, Flags} from '@oclif/core' import {ArtifactsApi} from '@mitre/emass_client' diff --git a/src/commands/emasser/post/cac.ts b/src/commands/emasser/post/cac.ts index 5969f627f..d8b1bac20 100644 --- a/src/commands/emasser/post/cac.ts +++ b/src/commands/emasser/post/cac.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/post/cloud_resources.ts b/src/commands/emasser/post/cloud_resources.ts index 84a667841..42f9cfb36 100644 --- a/src/commands/emasser/post/cloud_resources.ts +++ b/src/commands/emasser/post/cloud_resources.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {CloudResourceResultsApi} from '@mitre/emass_client' import {CloudResourcesResponsePost} from '@mitre/emass_client/dist/api' diff --git a/src/commands/emasser/post/container_scans.ts b/src/commands/emasser/post/container_scans.ts index 2ccdaebe0..257ecbfdb 100644 --- a/src/commands/emasser/post/container_scans.ts +++ b/src/commands/emasser/post/container_scans.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ContainersApi} from '@mitre/emass_client' import {ContainersResponsePost} from '@mitre/emass_client/dist/api' diff --git a/src/commands/emasser/post/milestones.ts b/src/commands/emasser/post/milestones.ts index a83e275eb..dba92bcc8 100644 --- a/src/commands/emasser/post/milestones.ts +++ b/src/commands/emasser/post/milestones.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/post/pac.ts b/src/commands/emasser/post/pac.ts index 909b9ba80..ef764a38b 100644 --- a/src/commands/emasser/post/pac.ts +++ b/src/commands/emasser/post/pac.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/post/poams.ts b/src/commands/emasser/post/poams.ts index 5542e7865..c034cce4d 100644 --- a/src/commands/emasser/post/poams.ts +++ b/src/commands/emasser/post/poams.ts @@ -1,7 +1,7 @@ import fs from 'fs' import _ from 'lodash' import {readFile} from 'fs/promises' -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/post/register.ts b/src/commands/emasser/post/register.ts index ed8924e42..8333d973a 100644 --- a/src/commands/emasser/post/register.ts +++ b/src/commands/emasser/post/register.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {RegistrationApi} from '@mitre/emass_client' import {Register} from '@mitre/emass_client/dist/api' diff --git a/src/commands/emasser/post/static_code_scans.ts b/src/commands/emasser/post/static_code_scans.ts index 271076a67..9c872cbae 100644 --- a/src/commands/emasser/post/static_code_scans.ts +++ b/src/commands/emasser/post/static_code_scans.ts @@ -1,7 +1,7 @@ import fs from 'fs' import _ from 'lodash' import {readFile} from 'fs/promises' -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/post/test_results.ts b/src/commands/emasser/post/test_results.ts index 613fd00af..c9b6aeb89 100644 --- a/src/commands/emasser/post/test_results.ts +++ b/src/commands/emasser/post/test_results.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/put/artifacts.ts b/src/commands/emasser/put/artifacts.ts index 97e5af53c..7a2cb22e4 100644 --- a/src/commands/emasser/put/artifacts.ts +++ b/src/commands/emasser/put/artifacts.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {ArtifactsApi} from '@mitre/emass_client' import {ArtifactsResponsePutPost} from '@mitre/emass_client/dist/api' // skipcq: JS-R1000 diff --git a/src/commands/emasser/put/controls.ts b/src/commands/emasser/put/controls.ts index a11cbbcb0..b87f68200 100644 --- a/src/commands/emasser/put/controls.ts +++ b/src/commands/emasser/put/controls.ts @@ -1,7 +1,7 @@ import fs from 'fs' import _ from 'lodash' import {readFile} from 'fs/promises' -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/put/milestones.ts b/src/commands/emasser/put/milestones.ts index 28f794b9f..26aed63d8 100644 --- a/src/commands/emasser/put/milestones.ts +++ b/src/commands/emasser/put/milestones.ts @@ -1,4 +1,4 @@ -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError' diff --git a/src/commands/emasser/put/poams.ts b/src/commands/emasser/put/poams.ts index d1ea0f9d3..81461ea85 100644 --- a/src/commands/emasser/put/poams.ts +++ b/src/commands/emasser/put/poams.ts @@ -1,7 +1,7 @@ import fs from 'fs' import _ from 'lodash' import {readFile} from 'fs/promises' -import colorize from 'json-colorizer' +import {colorize} from 'json-colorizer' import {Command, Flags} from '@oclif/core' import {outputError} from '../../../utils/emasser/outputError'