@asyncapi/cli 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/create-template/templates/default/package-lock.json +4 -3
- package/lib/apps/api/app.d.ts +15 -0
- package/lib/apps/api/app.js +89 -0
- package/lib/apps/api/configs/development.json +16 -0
- package/lib/apps/api/configs/production.json +16 -0
- package/lib/apps/api/configs/test.json +16 -0
- package/lib/apps/api/constants.d.ts +1 -0
- package/lib/apps/api/constants.js +4 -0
- package/lib/apps/api/controllers/bundle.controller.d.ts +7 -0
- package/lib/apps/api/controllers/bundle.controller.js +44 -0
- package/lib/apps/api/controllers/convert.controller.d.ts +11 -0
- package/lib/apps/api/controllers/convert.controller.js +69 -0
- package/lib/apps/api/controllers/diff.controller.d.ts +7 -0
- package/lib/apps/api/controllers/diff.controller.js +42 -0
- package/lib/apps/api/controllers/docs.controller.d.ts +6 -0
- package/lib/apps/api/controllers/docs.controller.js +24 -0
- package/lib/apps/api/controllers/generate.controller.d.ts +22 -0
- package/lib/apps/api/controllers/generate.controller.js +176 -0
- package/lib/apps/api/controllers/help.controller.d.ts +6 -0
- package/lib/apps/api/controllers/help.controller.js +101 -0
- package/lib/apps/api/controllers/parse.controller.d.ts +10 -0
- package/lib/apps/api/controllers/parse.controller.js +35 -0
- package/lib/apps/api/controllers/validate.controller.d.ts +10 -0
- package/lib/apps/api/controllers/validate.controller.js +50 -0
- package/lib/apps/api/exceptions/problem.exception.d.ts +14 -0
- package/lib/apps/api/exceptions/problem.exception.js +10 -0
- package/lib/apps/api/index.d.ts +9 -0
- package/lib/apps/api/index.js +21 -0
- package/lib/apps/api/middlewares/problem.middleware.d.ts +6 -0
- package/lib/apps/api/middlewares/problem.middleware.js +27 -0
- package/lib/apps/api/middlewares/validation.middleware.d.ts +12 -0
- package/lib/apps/api/middlewares/validation.middleware.js +236 -0
- package/lib/apps/api/server.d.ts +3 -0
- package/lib/apps/api/server.js +19 -0
- package/lib/{commands → apps/cli/commands}/bundle.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/bundle.js +3 -3
- package/lib/{commands → apps/cli/commands}/config/analytics.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/analytics.js +4 -3
- package/lib/{commands → apps/cli/commands}/config/context/add.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/add.js +12 -6
- package/lib/{commands → apps/cli/commands}/config/context/current.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/current.js +4 -4
- package/lib/{commands → apps/cli/commands}/config/context/edit.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/edit.js +12 -6
- package/lib/{commands → apps/cli/commands}/config/context/index.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/index.js +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/init.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/init.js +7 -4
- package/lib/{commands → apps/cli/commands}/config/context/list.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/list.js +4 -4
- package/lib/{commands → apps/cli/commands}/config/context/remove.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/remove.js +8 -5
- package/lib/{commands → apps/cli/commands}/config/context/use.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/context/use.js +8 -5
- package/lib/{commands → apps/cli/commands}/config/index.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/index.js +1 -1
- package/lib/{commands → apps/cli/commands}/config/versions.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/config/versions.js +2 -2
- package/lib/{commands → apps/cli/commands}/convert.d.ts +2 -7
- package/lib/apps/cli/commands/convert.js +85 -0
- package/lib/{commands → apps/cli/commands}/diff.d.ts +11 -2
- package/lib/{commands → apps/cli/commands}/diff.js +85 -31
- package/lib/{commands → apps/cli/commands}/format.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/format.js +4 -4
- package/lib/{commands → apps/cli/commands}/generate/fromTemplate.d.ts +4 -5
- package/lib/{commands → apps/cli/commands}/generate/fromTemplate.js +89 -122
- package/lib/{commands → apps/cli/commands}/generate/index.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/generate/index.js +1 -1
- package/lib/{commands → apps/cli/commands}/generate/models.d.ts +6 -1
- package/lib/{commands → apps/cli/commands}/generate/models.js +48 -9
- package/lib/{commands → apps/cli/commands}/new/file.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/new/file.js +11 -8
- package/lib/{commands → apps/cli/commands}/new/glee.d.ts +2 -2
- package/lib/{commands → apps/cli/commands}/new/glee.js +4 -4
- package/lib/{commands → apps/cli/commands}/new/index.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/new/index.js +1 -1
- package/lib/{commands → apps/cli/commands}/new/template.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/new/template.js +10 -8
- package/lib/{commands → apps/cli/commands}/optimize.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/optimize.js +71 -30
- package/lib/{commands → apps/cli/commands}/pretty.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/pretty.js +8 -5
- package/lib/apps/cli/commands/start/api.d.ts +11 -0
- package/lib/apps/cli/commands/start/api.js +23 -0
- package/lib/{commands → apps/cli/commands}/start/index.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/start/index.js +1 -1
- package/lib/{commands → apps/cli/commands}/start/preview.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/start/preview.js +9 -6
- package/lib/{commands → apps/cli/commands}/start/studio.d.ts +1 -1
- package/lib/{commands → apps/cli/commands}/start/studio.js +10 -7
- package/lib/{commands → apps/cli/commands}/validate.d.ts +4 -2
- package/lib/apps/cli/commands/validate.js +94 -0
- package/lib/{core → apps/cli/internal}/base.d.ts +1 -1
- package/lib/{core → apps/cli/internal}/base.js +12 -4
- package/lib/apps/cli/internal/flags/bundle.flags.js +26 -0
- package/lib/apps/cli/internal/flags/config/analytics.flags.js +24 -0
- package/lib/{core → apps/cli/internal}/flags/config/context.flags.js +1 -1
- package/lib/{core → apps/cli/internal}/flags/convert.flags.js +9 -2
- package/lib/{core → apps/cli/internal}/flags/diff.flags.d.ts +1 -1
- package/lib/{core → apps/cli/internal}/flags/diff.flags.js +3 -3
- package/lib/{core → apps/cli/internal}/flags/generate/fromTemplate.flags.js +12 -12
- package/lib/{core → apps/cli/internal}/flags/generate/models.flags.js +2 -2
- package/lib/{core → apps/cli/internal}/flags/global.flags.js +1 -1
- package/lib/{core → apps/cli/internal}/flags/new/file.flags.js +7 -2
- package/lib/{core → apps/cli/internal}/flags/optimize.flags.js +24 -4
- package/lib/apps/cli/internal/flags/parser.flags.d.ts +10 -0
- package/lib/apps/cli/internal/flags/parser.flags.js +28 -0
- package/lib/{core → apps/cli/internal}/flags/proxy.flags.js +3 -3
- package/lib/apps/cli/internal/flags/start/api.flags.d.ts +5 -0
- package/lib/apps/cli/internal/flags/start/api.flags.js +20 -0
- package/lib/apps/cli/internal/flags/start/preview.flags.js +31 -0
- package/lib/{core → apps/cli/internal}/flags/start/studio.flags.js +9 -2
- package/lib/{core → apps/cli/internal}/flags/validate.flags.d.ts +1 -1
- package/lib/{core → apps/cli/internal}/flags/validate.flags.js +2 -2
- package/lib/{core → apps/cli/internal}/globals.d.ts +1 -1
- package/lib/{core → apps/cli/internal}/globals.js +2 -4
- package/lib/{core → apps/cli/internal}/hooks/command_not_found/myhook.js +14 -4
- package/lib/{core → domains}/models/Context.js +1 -1
- package/lib/{core → domains}/models/Preview.js +35 -19
- package/lib/{core → domains}/models/SpecificationFile.d.ts +2 -2
- package/lib/{core → domains}/models/SpecificationFile.js +8 -5
- package/lib/{core → domains}/models/Studio.js +4 -4
- package/lib/domains/services/archiver.service.d.ts +17 -0
- package/lib/domains/services/archiver.service.js +53 -0
- package/lib/domains/services/base.service.d.ts +6 -0
- package/lib/domains/services/base.service.js +26 -0
- package/lib/domains/services/convert.service.d.ts +12 -0
- package/lib/domains/services/convert.service.js +65 -0
- package/lib/domains/services/generator.service.d.ts +15 -0
- package/lib/domains/services/generator.service.js +95 -0
- package/lib/domains/services/validation.service.d.ts +54 -0
- package/lib/domains/services/validation.service.js +288 -0
- package/lib/{core/errors → errors}/specification-file.js +1 -1
- package/lib/{core/errors → errors}/validation-error.js +6 -5
- package/lib/interfaces/index.d.ts +87 -0
- package/lib/interfaces/index.js +7 -0
- package/lib/utils/ajv.d.ts +2 -0
- package/lib/utils/ajv.js +18 -0
- package/lib/utils/app-openapi.d.ts +4 -0
- package/lib/utils/app-openapi.js +28 -0
- package/lib/{core/utils/generator.js → utils/fileWatcher.js} +8 -2
- package/lib/utils/logger.d.ts +6 -0
- package/lib/utils/logger.js +33 -0
- package/lib/utils/retrieve-language.d.ts +1 -0
- package/lib/utils/retrieve-language.js +9 -0
- package/lib/utils/temp-dir.d.ts +2 -0
- package/lib/utils/temp-dir.js +25 -0
- package/oclif.manifest.json +109 -1
- package/package.json +37 -10
- package/scripts/releasePackagesRename.js +16 -8
- package/lib/commands/convert.js +0 -132
- package/lib/commands/validate.js +0 -47
- package/lib/core/flags/bundle.flags.js +0 -14
- package/lib/core/flags/config/analytics.flags.js +0 -13
- package/lib/core/flags/start/preview.flags.js +0 -15
- package/lib/core/parser.d.ts +0 -35
- package/lib/core/parser.js +0 -230
- /package/lib/{core → apps/cli/internal}/flags/bundle.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/config/analytics.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/config/context.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/convert.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/format.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/format.flags.js +0 -0
- /package/lib/{core → apps/cli/internal}/flags/generate/fromTemplate.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/generate/models.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/global.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/new/file.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/new/glee.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/new/glee.flags.js +0 -0
- /package/lib/{core → apps/cli/internal}/flags/new/template.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/new/template.flags.js +0 -0
- /package/lib/{core → apps/cli/internal}/flags/optimize.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/pretty.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/pretty.flags.js +0 -0
- /package/lib/{core → apps/cli/internal}/flags/proxy.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/start/preview.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/flags/start/studio.flags.d.ts +0 -0
- /package/lib/{core → apps/cli/internal}/hooks/command_not_found/myhook.d.ts +0 -0
- /package/lib/{core → domains}/models/Context.d.ts +0 -0
- /package/lib/{core → domains}/models/Preview.d.ts +0 -0
- /package/lib/{core → domains}/models/Studio.d.ts +0 -0
- /package/lib/{core/errors → errors}/context-error.d.ts +0 -0
- /package/lib/{core/errors → errors}/context-error.js +0 -0
- /package/lib/{core/errors → errors}/diff-error.d.ts +0 -0
- /package/lib/{core/errors → errors}/diff-error.js +0 -0
- /package/lib/{core/errors → errors}/generator-error.d.ts +0 -0
- /package/lib/{core/errors → errors}/generator-error.js +0 -0
- /package/lib/{core/errors → errors}/specification-file.d.ts +0 -0
- /package/lib/{core/errors → errors}/validation-error.d.ts +0 -0
- /package/lib/{core/utils/generator.d.ts → utils/fileWatcher.d.ts} +0 -0
- /package/lib/{core/utils → utils}/scoreCalculator.d.ts +0 -0
- /package/lib/{core/utils → utils}/scoreCalculator.js +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
6
|
-
const Context_1 = require("
|
|
7
|
-
const context_error_1 = require("
|
|
8
|
-
const context_flags_1 = require("../../../
|
|
5
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
6
|
+
const Context_1 = require("../../../../../domains/models/Context");
|
|
7
|
+
const context_error_1 = require("../../../../../errors/context-error");
|
|
8
|
+
const context_flags_1 = require("../../../internal/flags/config/context.flags");
|
|
9
9
|
const picocolors_1 = require("picocolors");
|
|
10
10
|
class ContextAdd extends base_1.default {
|
|
11
11
|
run() {
|
|
@@ -34,7 +34,13 @@ class ContextAdd extends base_1.default {
|
|
|
34
34
|
ContextAdd.description = 'Add a context to the store';
|
|
35
35
|
ContextAdd.flags = (0, context_flags_1.addFlags)();
|
|
36
36
|
ContextAdd.args = {
|
|
37
|
-
'context-name': core_1.Args.string({
|
|
38
|
-
|
|
37
|
+
'context-name': core_1.Args.string({
|
|
38
|
+
description: 'context name',
|
|
39
|
+
required: true,
|
|
40
|
+
}),
|
|
41
|
+
'spec-file-path': core_1.Args.string({
|
|
42
|
+
description: 'file path of the spec file',
|
|
43
|
+
required: true,
|
|
44
|
+
}),
|
|
39
45
|
};
|
|
40
46
|
exports.default = ContextAdd;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
5
|
-
const Context_1 = require("
|
|
6
|
-
const context_error_1 = require("
|
|
7
|
-
const global_flags_1 = require("../../../
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
5
|
+
const Context_1 = require("../../../../../domains/models/Context");
|
|
6
|
+
const context_error_1 = require("../../../../../errors/context-error");
|
|
7
|
+
const global_flags_1 = require("../../../internal/flags/global.flags");
|
|
8
8
|
const picocolors_1 = require("picocolors");
|
|
9
9
|
class ContextCurrent extends base_1.default {
|
|
10
10
|
run() {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
6
|
-
const Context_1 = require("
|
|
7
|
-
const context_error_1 = require("
|
|
8
|
-
const global_flags_1 = require("../../../
|
|
5
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
6
|
+
const Context_1 = require("../../../../../domains/models/Context");
|
|
7
|
+
const context_error_1 = require("../../../../../errors/context-error");
|
|
8
|
+
const global_flags_1 = require("../../../internal/flags/global.flags");
|
|
9
9
|
const picocolors_1 = require("picocolors");
|
|
10
10
|
class ContextEdit extends base_1.default {
|
|
11
11
|
run() {
|
|
@@ -32,7 +32,13 @@ class ContextEdit extends base_1.default {
|
|
|
32
32
|
ContextEdit.description = 'Edit a context in the store';
|
|
33
33
|
ContextEdit.flags = (0, global_flags_1.helpFlag)();
|
|
34
34
|
ContextEdit.args = {
|
|
35
|
-
'context-name': core_1.Args.string({
|
|
36
|
-
|
|
35
|
+
'context-name': core_1.Args.string({
|
|
36
|
+
description: 'context name',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
39
|
+
'new-spec-file-path': core_1.Args.string({
|
|
40
|
+
description: 'file path of the spec file',
|
|
41
|
+
required: true,
|
|
42
|
+
}),
|
|
37
43
|
};
|
|
38
44
|
exports.default = ContextEdit;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
5
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
6
6
|
class Context extends base_1.default {
|
|
7
7
|
run() {
|
|
8
8
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
6
|
-
const Context_1 = require("
|
|
7
|
-
const global_flags_1 = require("../../../
|
|
5
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
6
|
+
const Context_1 = require("../../../../../domains/models/Context");
|
|
7
|
+
const global_flags_1 = require("../../../internal/flags/global.flags");
|
|
8
8
|
const picocolors_1 = require("picocolors");
|
|
9
9
|
class ContextInit extends base_1.default {
|
|
10
10
|
run() {
|
|
@@ -23,6 +23,9 @@ ContextInit.contextFilePathMessage = `Specify directory in which context file sh
|
|
|
23
23
|
- root of current repository : ${(0, picocolors_1.blueBright)('asyncapi config context init ./ ')}
|
|
24
24
|
- user's home directory : ${(0, picocolors_1.blueBright)('asyncapi config context init ~`')}`;
|
|
25
25
|
ContextInit.args = {
|
|
26
|
-
'context-file-path': core_1.Args.string({
|
|
26
|
+
'context-file-path': core_1.Args.string({
|
|
27
|
+
description: `${ContextInit.contextFilePathMessage}`,
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
27
30
|
};
|
|
28
31
|
exports.default = ContextInit;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
5
|
-
const Context_1 = require("
|
|
6
|
-
const context_error_1 = require("
|
|
7
|
-
const global_flags_1 = require("../../../
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
5
|
+
const Context_1 = require("../../../../../domains/models/Context");
|
|
6
|
+
const context_error_1 = require("../../../../../errors/context-error");
|
|
7
|
+
const global_flags_1 = require("../../../internal/flags/global.flags");
|
|
8
8
|
const picocolors_1 = require("picocolors");
|
|
9
9
|
class ContextList extends base_1.default {
|
|
10
10
|
run() {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
6
|
-
const Context_1 = require("
|
|
7
|
-
const context_error_1 = require("
|
|
8
|
-
const global_flags_1 = require("../../../
|
|
5
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
6
|
+
const Context_1 = require("../../../../../domains/models/Context");
|
|
7
|
+
const context_error_1 = require("../../../../../errors/context-error");
|
|
8
|
+
const global_flags_1 = require("../../../internal/flags/global.flags");
|
|
9
9
|
const picocolors_1 = require("picocolors");
|
|
10
10
|
class ContextRemove extends base_1.default {
|
|
11
11
|
run() {
|
|
@@ -31,6 +31,9 @@ class ContextRemove extends base_1.default {
|
|
|
31
31
|
ContextRemove.description = 'Delete a context from the store';
|
|
32
32
|
ContextRemove.flags = (0, global_flags_1.helpFlag)();
|
|
33
33
|
ContextRemove.args = {
|
|
34
|
-
'context-name': core_1.Args.string({
|
|
34
|
+
'context-name': core_1.Args.string({
|
|
35
|
+
description: 'Name of the context to delete',
|
|
36
|
+
required: true,
|
|
37
|
+
}),
|
|
35
38
|
};
|
|
36
39
|
exports.default = ContextRemove;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
-
const base_1 = tslib_1.__importDefault(require("../../../
|
|
6
|
-
const Context_1 = require("
|
|
7
|
-
const context_error_1 = require("
|
|
8
|
-
const global_flags_1 = require("../../../
|
|
5
|
+
const base_1 = tslib_1.__importDefault(require("../../../internal/base"));
|
|
6
|
+
const Context_1 = require("../../../../../domains/models/Context");
|
|
7
|
+
const context_error_1 = require("../../../../../errors/context-error");
|
|
8
|
+
const global_flags_1 = require("../../../internal/flags/global.flags");
|
|
9
9
|
const picocolors_1 = require("picocolors");
|
|
10
10
|
class ContextUse extends base_1.default {
|
|
11
11
|
run() {
|
|
@@ -32,6 +32,9 @@ class ContextUse extends base_1.default {
|
|
|
32
32
|
ContextUse.description = 'Set a context as current';
|
|
33
33
|
ContextUse.flags = (0, global_flags_1.helpFlag)();
|
|
34
34
|
ContextUse.args = {
|
|
35
|
-
'context-name': core_1.Args.string({
|
|
35
|
+
'context-name': core_1.Args.string({
|
|
36
|
+
description: 'name of the saved context',
|
|
37
|
+
required: true,
|
|
38
|
+
}),
|
|
36
39
|
};
|
|
37
40
|
exports.default = ContextUse;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const base_1 = tslib_1.__importDefault(require("../../
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../internal/base"));
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
class Config extends base_1.default {
|
|
7
7
|
run() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const base_1 = tslib_1.__importDefault(require("../../
|
|
5
|
-
const global_flags_1 = require("../../
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../internal/base"));
|
|
5
|
+
const global_flags_1 = require("../../internal/flags/global.flags");
|
|
6
6
|
const picocolors_1 = require("picocolors");
|
|
7
7
|
class Versions extends base_1.default {
|
|
8
8
|
run() {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import Command from '../
|
|
1
|
+
import Command from '../internal/base';
|
|
2
2
|
export default class Convert extends Command {
|
|
3
3
|
static specFile: any;
|
|
4
4
|
static metricsMetadata: any;
|
|
5
5
|
static description: string;
|
|
6
|
+
private conversionService;
|
|
6
7
|
static flags: {
|
|
7
8
|
proxyHost: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
9
|
proxyPort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -16,11 +17,5 @@ export default class Convert extends Command {
|
|
|
16
17
|
'spec-file': import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
17
18
|
};
|
|
18
19
|
run(): Promise<void>;
|
|
19
|
-
private handleConversion;
|
|
20
|
-
private convertOpenAPI;
|
|
21
|
-
private convertAsyncAPI;
|
|
22
|
-
private convertPostman;
|
|
23
|
-
private formatConvertedFile;
|
|
24
|
-
private handleOutput;
|
|
25
20
|
private handleError;
|
|
26
21
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const base_1 = tslib_1.__importDefault(require("../internal/base"));
|
|
6
|
+
const validation_error_1 = require("../../../errors/validation-error");
|
|
7
|
+
const SpecificationFile_1 = require("../../../domains/models/SpecificationFile");
|
|
8
|
+
const specification_file_1 = require("../../../errors/specification-file");
|
|
9
|
+
const picocolors_1 = require("picocolors");
|
|
10
|
+
const proxy_flags_1 = require("../internal/flags/proxy.flags");
|
|
11
|
+
const specs_1 = tslib_1.__importDefault(require("@asyncapi/specs"));
|
|
12
|
+
const convert_flags_1 = require("../internal/flags/convert.flags");
|
|
13
|
+
const convert_service_1 = require("../../../domains/services/convert.service");
|
|
14
|
+
const latestVersion = Object.keys(specs_1.default.schemas).pop();
|
|
15
|
+
class Convert extends base_1.default {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.conversionService = new convert_service_1.ConversionService();
|
|
19
|
+
}
|
|
20
|
+
run() {
|
|
21
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const { args, flags } = yield this.parse(Convert);
|
|
23
|
+
let filePath = args['spec-file'];
|
|
24
|
+
const proxyHost = flags['proxyHost'];
|
|
25
|
+
const proxyPort = flags['proxyPort'];
|
|
26
|
+
if (proxyHost && proxyPort) {
|
|
27
|
+
const proxyUrl = `http://${proxyHost}:${proxyPort}`;
|
|
28
|
+
filePath = `${filePath}+${proxyUrl}`; // Update filePath with proxyUrl
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
// LOAD FILE
|
|
32
|
+
this.specFile = yield (0, SpecificationFile_1.load)(filePath);
|
|
33
|
+
// eslint-disable-next-line sonarjs/no-duplicate-string
|
|
34
|
+
this.metricsMetadata.to_version = flags['target-version'];
|
|
35
|
+
const conversionOptions = {
|
|
36
|
+
format: flags.format,
|
|
37
|
+
'target-version': (flags['target-version'] ||
|
|
38
|
+
latestVersion),
|
|
39
|
+
perspective: flags['perspective'],
|
|
40
|
+
};
|
|
41
|
+
const result = yield this.conversionService.convertDocument(this.specFile, conversionOptions);
|
|
42
|
+
if (!result.success || !result.data) {
|
|
43
|
+
this.error(result.error || 'Conversion failed', { exit: 1 });
|
|
44
|
+
}
|
|
45
|
+
this.metricsMetadata.conversion_result = result;
|
|
46
|
+
this.log(this.conversionService.handleLogging(this.specFile, conversionOptions));
|
|
47
|
+
if (flags['output']) {
|
|
48
|
+
yield this.conversionService.handleOutput(flags['output'], result.data.convertedDocument);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
this.log(result.data.convertedDocument);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
this.handleError(err, filePath !== null && filePath !== void 0 ? filePath : 'unknown', flags);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// Helper function to handle errors
|
|
60
|
+
handleError(err, filePath, flags) {
|
|
61
|
+
var _a;
|
|
62
|
+
if (err instanceof specification_file_1.SpecificationFileNotFound) {
|
|
63
|
+
this.error(new validation_error_1.ValidationError({
|
|
64
|
+
type: 'invalid-file',
|
|
65
|
+
filepath: filePath,
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
else if (((_a = this.specFile) === null || _a === void 0 ? void 0 : _a.toJson().asyncapi) > flags['target-version']) {
|
|
69
|
+
this.error(`The ${(0, picocolors_1.cyan)(filePath)} file cannot be converted to an older version. Downgrading is not supported.`);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.error(err);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
Convert.metricsMetadata = {};
|
|
77
|
+
Convert.description = 'Convert asyncapi documents older to newer versions or OpenAPI/postman-collection documents to AsyncAPI';
|
|
78
|
+
Convert.flags = Object.assign(Object.assign({}, (0, convert_flags_1.convertFlags)(latestVersion)), (0, proxy_flags_1.proxyFlags)());
|
|
79
|
+
Convert.args = {
|
|
80
|
+
'spec-file': core_1.Args.string({
|
|
81
|
+
description: 'spec path, url, or context-name',
|
|
82
|
+
required: false,
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
exports.default = Convert;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import AsyncAPIDiff from '@asyncapi/diff/lib/asyncapidiff';
|
|
2
|
-
import
|
|
2
|
+
import { Specification } from '../../../domains/models/SpecificationFile';
|
|
3
|
+
import Command from '../internal/base';
|
|
4
|
+
import { ValidationStatus } from '../../../domains/services/validation.service';
|
|
5
|
+
import { Diagnostic } from '@asyncapi/parser/cjs';
|
|
3
6
|
export default class Diff extends Command {
|
|
4
7
|
static description: string;
|
|
8
|
+
private validationService;
|
|
5
9
|
static flags: {
|
|
6
10
|
'log-diagnostics': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
11
|
'diagnostics-format': import("@oclif/core/lib/interfaces").OptionFlag<import("@stoplight/spectral-cli/dist/services/config").OutputFormat, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
-
'fail-severity': import("@oclif/core/lib/interfaces").OptionFlag<"
|
|
12
|
+
'fail-severity': import("@oclif/core/lib/interfaces").OptionFlag<"error" | "warn" | "info" | "hint", import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
13
|
output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
14
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
11
15
|
format: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
@@ -23,4 +27,9 @@ export default class Diff extends Command {
|
|
|
23
27
|
outputJSON(diffOutput: AsyncAPIDiff, outputType: string): void;
|
|
24
28
|
outputYAML(diffOutput: AsyncAPIDiff, outputType: string): void;
|
|
25
29
|
outputMarkdown(diffOutput: AsyncAPIDiff, outputType: string): void;
|
|
30
|
+
parseDocuments(command: Command, firstDocument: Specification, secondDocument: Specification, flags: Record<string, any>): Promise<{
|
|
31
|
+
firstDocumentParsed: import("@asyncapi/parser/cjs").AsyncAPIDocumentInterface;
|
|
32
|
+
secondDocumentParsed: import("@asyncapi/parser/cjs").AsyncAPIDocumentInterface;
|
|
33
|
+
} | undefined>;
|
|
34
|
+
handleGovernanceMessage(document: Specification, diagnostics: Diagnostic[], status: ValidationStatus): Promise<void>;
|
|
26
35
|
}
|
|
@@ -6,16 +6,20 @@ const core_1 = require("@oclif/core");
|
|
|
6
6
|
const diff = tslib_1.__importStar(require("@asyncapi/diff"));
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
9
|
-
const SpecificationFile_1 = require("
|
|
10
|
-
const base_1 = tslib_1.__importDefault(require("../
|
|
11
|
-
const validation_error_1 = require("
|
|
12
|
-
const specification_file_1 = require("
|
|
13
|
-
const diff_error_1 = require("
|
|
14
|
-
const globals_1 = require("../
|
|
15
|
-
const
|
|
16
|
-
const
|
|
9
|
+
const SpecificationFile_1 = require("../../../domains/models/SpecificationFile");
|
|
10
|
+
const base_1 = tslib_1.__importDefault(require("../internal/base"));
|
|
11
|
+
const validation_error_1 = require("../../../errors/validation-error");
|
|
12
|
+
const specification_file_1 = require("../../../errors/specification-file");
|
|
13
|
+
const diff_error_1 = require("../../../errors/diff-error");
|
|
14
|
+
const globals_1 = require("../internal/globals");
|
|
15
|
+
const diff_flags_1 = require("../internal/flags/diff.flags");
|
|
16
|
+
const validation_service_1 = require("../../../domains/services/validation.service");
|
|
17
17
|
const { readFile } = fs_1.promises;
|
|
18
18
|
class Diff extends base_1.default {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.validationService = new validation_service_1.ValidationService();
|
|
22
|
+
}
|
|
19
23
|
/* eslint-disable sonarjs/cognitive-complexity */
|
|
20
24
|
run() {
|
|
21
25
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -84,14 +88,14 @@ class Diff extends base_1.default {
|
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
try {
|
|
87
|
-
const parsed = yield parseDocuments(this, firstDocument, secondDocument, flags);
|
|
91
|
+
const parsed = yield this.parseDocuments(this, firstDocument, secondDocument, flags);
|
|
88
92
|
if (!parsed) {
|
|
89
93
|
return;
|
|
90
94
|
}
|
|
91
95
|
const diffOutput = diff.diff(parsed.firstDocumentParsed.json(), parsed.secondDocumentParsed.json(), {
|
|
92
96
|
override: overrides,
|
|
93
97
|
outputType: outputFormat, // NOSONAR
|
|
94
|
-
markdownSubtype: markdownSubtype
|
|
98
|
+
markdownSubtype: markdownSubtype,
|
|
95
99
|
});
|
|
96
100
|
if (outputFormat === 'json') {
|
|
97
101
|
this.outputJSON(diffOutput, outputType);
|
|
@@ -110,7 +114,8 @@ class Diff extends base_1.default {
|
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
116
|
catch (error) {
|
|
113
|
-
if (error instanceof diff_error_1.DiffBreakingChangeError ||
|
|
117
|
+
if (error instanceof diff_error_1.DiffBreakingChangeError ||
|
|
118
|
+
error instanceof TypeError) {
|
|
114
119
|
this.error(error);
|
|
115
120
|
}
|
|
116
121
|
throw new validation_error_1.ValidationError({
|
|
@@ -143,12 +148,65 @@ class Diff extends base_1.default {
|
|
|
143
148
|
outputMarkdown(diffOutput, outputType) {
|
|
144
149
|
this.log(genericOutput(diffOutput, outputType));
|
|
145
150
|
}
|
|
151
|
+
parseDocuments(command, firstDocument, secondDocument, flags) {
|
|
152
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
const firstResult = yield this.validationService.parseDocument(firstDocument, {}, flags);
|
|
154
|
+
const secondResult = yield this.validationService.parseDocument(secondDocument, {}, flags);
|
|
155
|
+
if (!firstResult.success || !secondResult.success) {
|
|
156
|
+
this.error(new validation_error_1.ValidationError({
|
|
157
|
+
type: 'invalid-file',
|
|
158
|
+
filepath: firstDocument.getFilePath() || secondDocument.getFilePath(),
|
|
159
|
+
err: firstResult.error || secondResult.error,
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
if (!firstResult.data || !secondResult.data) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
const { document: firstDocumentParsed, status: firstDocumentStatus, diagnostics: firstDiagnostics, } = firstResult.data;
|
|
166
|
+
const { document: secondDocumentParsed, status: secondDocumentStatus, diagnostics: secondDiagnostics, } = secondResult.data;
|
|
167
|
+
if (flags['log-diagnostics']) {
|
|
168
|
+
this.log(`Diagnostics for ${firstDocument.getFilePath() || firstDocument.getFileURL()}:`);
|
|
169
|
+
this.handleGovernanceMessage(firstDocument, firstDiagnostics, firstDocumentStatus);
|
|
170
|
+
this.log(this.validationService.formatDiagnosticsOutput(firstDiagnostics, flags['diagnostics-format'], flags['fail-severity']));
|
|
171
|
+
this.log(`Diagnostics for ${secondDocument.getFilePath() || secondDocument.getFileURL()}:`);
|
|
172
|
+
this.handleGovernanceMessage(secondDocument, secondDiagnostics, secondDocumentStatus);
|
|
173
|
+
this.log(this.validationService.formatDiagnosticsOutput(secondDiagnostics, flags['diagnostics-format'], flags['fail-severity']));
|
|
174
|
+
}
|
|
175
|
+
if (!firstDocumentParsed ||
|
|
176
|
+
!secondDocumentParsed ||
|
|
177
|
+
firstDocumentStatus === 'invalid' ||
|
|
178
|
+
secondDocumentStatus === 'invalid') {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
return { firstDocumentParsed, secondDocumentParsed };
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
handleGovernanceMessage(document, diagnostics, status) {
|
|
185
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
const sourceString = document.toSourceString();
|
|
187
|
+
const hasIssues = diagnostics && diagnostics.length > 0;
|
|
188
|
+
const isFailSeverity = status === validation_service_1.ValidationStatus.INVALID;
|
|
189
|
+
const governanceMessage = this.validationService.generateGovernanceMessage(sourceString, hasIssues, isFailSeverity);
|
|
190
|
+
if (isFailSeverity) {
|
|
191
|
+
this.logToStderr(governanceMessage);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
this.log(governanceMessage);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
}
|
|
146
198
|
}
|
|
147
199
|
Diff.description = 'Find diff between two asyncapi files';
|
|
148
200
|
Diff.flags = (0, diff_flags_1.diffFlags)();
|
|
149
201
|
Diff.args = {
|
|
150
|
-
old: core_1.Args.string({
|
|
151
|
-
|
|
202
|
+
old: core_1.Args.string({
|
|
203
|
+
description: 'old spec path, URL or context-name',
|
|
204
|
+
required: true,
|
|
205
|
+
}),
|
|
206
|
+
new: core_1.Args.string({
|
|
207
|
+
description: 'new spec path, URL or context-name',
|
|
208
|
+
required: true,
|
|
209
|
+
}),
|
|
152
210
|
};
|
|
153
211
|
exports.default = Diff;
|
|
154
212
|
/**
|
|
@@ -159,23 +217,18 @@ exports.default = Diff;
|
|
|
159
217
|
*/
|
|
160
218
|
function genericOutput(diffOutput, outputType) {
|
|
161
219
|
switch (outputType) {
|
|
162
|
-
case 'breaking':
|
|
163
|
-
|
|
164
|
-
case '
|
|
165
|
-
|
|
166
|
-
|
|
220
|
+
case 'breaking':
|
|
221
|
+
return diffOutput.breaking();
|
|
222
|
+
case 'non-breaking':
|
|
223
|
+
return diffOutput.nonBreaking();
|
|
224
|
+
case 'unclassified':
|
|
225
|
+
return diffOutput.unclassified();
|
|
226
|
+
case 'all':
|
|
227
|
+
return diffOutput.getOutput();
|
|
228
|
+
default:
|
|
229
|
+
return `The output type ${outputType} is not supported at the moment.`;
|
|
167
230
|
}
|
|
168
231
|
}
|
|
169
|
-
function parseDocuments(command, firstDocument, secondDocument, flags) {
|
|
170
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
const { document: firstDocumentParsed, status: firstDocumentStatus } = yield (0, parser_1.parse)(command, firstDocument, flags);
|
|
172
|
-
const { document: secondDocumentParsed, status: secondDocumentStatus } = yield (0, parser_1.parse)(command, secondDocument, flags);
|
|
173
|
-
if (!firstDocumentParsed || !secondDocumentParsed || firstDocumentStatus === 'invalid' || secondDocumentStatus === 'invalid') {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
return { firstDocumentParsed, secondDocumentParsed };
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
232
|
/**
|
|
180
233
|
* Reads the file from give path and parses it as JSON
|
|
181
234
|
* @param path The path to override file
|
|
@@ -213,7 +266,8 @@ const enableWatch = (status, watcher) => {
|
|
|
213
266
|
function throwOnBreakingChange(diffOutput, outputFormat) {
|
|
214
267
|
const breakingChanges = diffOutput.breaking();
|
|
215
268
|
if ((outputFormat === 'json' && breakingChanges.length !== 0) ||
|
|
216
|
-
((outputFormat === 'yaml' || outputFormat === 'yml') &&
|
|
269
|
+
((outputFormat === 'yaml' || outputFormat === 'yml') &&
|
|
270
|
+
breakingChanges !== '[]\n')) {
|
|
217
271
|
throw new diff_error_1.DiffBreakingChangeError();
|
|
218
272
|
}
|
|
219
273
|
}
|
|
@@ -221,7 +275,7 @@ function throwOnBreakingChange(diffOutput, outputFormat) {
|
|
|
221
275
|
* Checks and warns user about providing unnecessary markdownSubtype option.
|
|
222
276
|
*/
|
|
223
277
|
function checkAndWarnFalseFlag(format, markdownSubtype) {
|
|
224
|
-
if (format !== 'md' && typeof
|
|
278
|
+
if (format !== 'md' && typeof markdownSubtype !== 'undefined') {
|
|
225
279
|
const warningMessage = chalk_1.default.yellowBright(`Warning: The given markdownSubtype flag will not work with the given format.\nProvided flag markdownSubtype: ${markdownSubtype}`);
|
|
226
280
|
console.log(warningMessage);
|
|
227
281
|
}
|
|
@@ -230,7 +284,7 @@ function checkAndWarnFalseFlag(format, markdownSubtype) {
|
|
|
230
284
|
* Sets the default markdownSubtype option in case user doesn't provide one.
|
|
231
285
|
*/
|
|
232
286
|
function setDefaultMarkdownSubtype(format, markdownSubtype) {
|
|
233
|
-
if (format === 'md' && typeof
|
|
287
|
+
if (format === 'md' && typeof markdownSubtype === 'undefined') {
|
|
234
288
|
return 'yaml';
|
|
235
289
|
}
|
|
236
290
|
return markdownSubtype;
|
|
@@ -4,11 +4,11 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
6
|
const core_1 = require("@oclif/core");
|
|
7
|
-
const base_1 = tslib_1.__importDefault(require("../
|
|
8
|
-
const SpecificationFile_1 = require("
|
|
9
|
-
const specification_file_1 = require("
|
|
7
|
+
const base_1 = tslib_1.__importDefault(require("../internal/base"));
|
|
8
|
+
const SpecificationFile_1 = require("../../../domains/models/SpecificationFile");
|
|
9
|
+
const specification_file_1 = require("../../../errors/specification-file");
|
|
10
10
|
const picocolors_1 = require("picocolors");
|
|
11
|
-
const format_flags_1 = require("../
|
|
11
|
+
const format_flags_1 = require("../internal/flags/format.flags");
|
|
12
12
|
class Convert extends base_1.default {
|
|
13
13
|
run() {
|
|
14
14
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|