@asyncapi/cli 2.16.1 → 2.16.3
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 +52 -59
- package/lib/commands/generate/fromTemplate.d.ts +3 -1
- package/lib/commands/generate/fromTemplate.js +7 -1
- package/lib/commands/generate/models.d.ts +4 -1
- package/lib/commands/generate/models.js +7 -1
- package/lib/commands/new/index.d.ts +4 -2
- package/lib/commands/new/index.js +10 -2
- package/oclif.manifest.json +36 -52
- package/package.json +4 -1
|
@@ -1825,9 +1825,10 @@
|
|
|
1825
1825
|
}
|
|
1826
1826
|
},
|
|
1827
1827
|
"node_modules/@jsep-plugin/regex": {
|
|
1828
|
-
"version": "1.0.
|
|
1829
|
-
"resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.
|
|
1830
|
-
"integrity": "sha512-
|
|
1828
|
+
"version": "1.0.4",
|
|
1829
|
+
"resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.4.tgz",
|
|
1830
|
+
"integrity": "sha512-q7qL4Mgjs1vByCaTnDFcBnV9HS7GVPJX5vyVoCgZHNSC9rjwIlmbXG5sUuorR5ndfHAIlJ8pVStxvjXHbNvtUg==",
|
|
1831
|
+
"license": "MIT",
|
|
1831
1832
|
"engines": {
|
|
1832
1833
|
"node": ">= 10.16.0"
|
|
1833
1834
|
},
|
|
@@ -1836,9 +1837,10 @@
|
|
|
1836
1837
|
}
|
|
1837
1838
|
},
|
|
1838
1839
|
"node_modules/@jsep-plugin/ternary": {
|
|
1839
|
-
"version": "1.1.
|
|
1840
|
-
"resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.
|
|
1841
|
-
"integrity": "sha512-
|
|
1840
|
+
"version": "1.1.4",
|
|
1841
|
+
"resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.4.tgz",
|
|
1842
|
+
"integrity": "sha512-ck5wiqIbqdMX6WRQztBL7ASDty9YLgJ3sSAK5ZpBzXeySvFGCzIvM6UiAI4hTZ22fEcYQVV/zhUbNscggW+Ukg==",
|
|
1843
|
+
"license": "MIT",
|
|
1842
1844
|
"engines": {
|
|
1843
1845
|
"node": ">= 10.16.0"
|
|
1844
1846
|
},
|
|
@@ -1977,34 +1979,35 @@
|
|
|
1977
1979
|
}
|
|
1978
1980
|
},
|
|
1979
1981
|
"node_modules/@stoplight/spectral-core": {
|
|
1980
|
-
"version": "1.
|
|
1981
|
-
"resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.
|
|
1982
|
-
"integrity": "sha512-
|
|
1982
|
+
"version": "1.19.4",
|
|
1983
|
+
"resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.19.4.tgz",
|
|
1984
|
+
"integrity": "sha512-8hnZXfssTlV99SKo8J8BwMt5LsiBFHkCh0V3P7j8IPcCNl//bpG92U4TpYy7AwmUms/zCLX7sxNQC6AZ+bkfzg==",
|
|
1985
|
+
"license": "Apache-2.0",
|
|
1983
1986
|
"dependencies": {
|
|
1984
1987
|
"@stoplight/better-ajv-errors": "1.0.3",
|
|
1985
1988
|
"@stoplight/json": "~3.21.0",
|
|
1986
1989
|
"@stoplight/path": "1.3.2",
|
|
1987
1990
|
"@stoplight/spectral-parsers": "^1.0.0",
|
|
1988
|
-
"@stoplight/spectral-ref-resolver": "^1.0.
|
|
1989
|
-
"@stoplight/spectral-runtime": "^1.
|
|
1991
|
+
"@stoplight/spectral-ref-resolver": "^1.0.4",
|
|
1992
|
+
"@stoplight/spectral-runtime": "^1.1.2",
|
|
1990
1993
|
"@stoplight/types": "~13.6.0",
|
|
1991
1994
|
"@types/es-aggregate-error": "^1.0.2",
|
|
1992
1995
|
"@types/json-schema": "^7.0.11",
|
|
1993
|
-
"ajv": "^8.
|
|
1996
|
+
"ajv": "^8.17.1",
|
|
1994
1997
|
"ajv-errors": "~3.0.0",
|
|
1995
1998
|
"ajv-formats": "~2.1.0",
|
|
1996
1999
|
"es-aggregate-error": "^1.0.7",
|
|
1997
|
-
"jsonpath-plus": "
|
|
2000
|
+
"jsonpath-plus": "10.2.0",
|
|
1998
2001
|
"lodash": "~4.17.21",
|
|
1999
2002
|
"lodash.topath": "^4.5.2",
|
|
2000
2003
|
"minimatch": "3.1.2",
|
|
2001
|
-
"nimma": "0.2.
|
|
2002
|
-
"pony-cause": "^1.
|
|
2003
|
-
"simple-eval": "1.0.
|
|
2004
|
-
"tslib": "^2.
|
|
2004
|
+
"nimma": "0.2.3",
|
|
2005
|
+
"pony-cause": "^1.1.1",
|
|
2006
|
+
"simple-eval": "1.0.1",
|
|
2007
|
+
"tslib": "^2.8.1"
|
|
2005
2008
|
},
|
|
2006
2009
|
"engines": {
|
|
2007
|
-
"node": "^
|
|
2010
|
+
"node": "^16.20 || ^18.18 || >= 20.17"
|
|
2008
2011
|
}
|
|
2009
2012
|
},
|
|
2010
2013
|
"node_modules/@stoplight/spectral-core/node_modules/@stoplight/types": {
|
|
@@ -2019,18 +2022,11 @@
|
|
|
2019
2022
|
"node": "^12.20 || >=14.13"
|
|
2020
2023
|
}
|
|
2021
2024
|
},
|
|
2022
|
-
"node_modules/@stoplight/spectral-core/node_modules/jsonpath-plus": {
|
|
2023
|
-
"version": "7.1.0",
|
|
2024
|
-
"resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.1.0.tgz",
|
|
2025
|
-
"integrity": "sha512-gTaNRsPWO/K2KY6MrqaUFClF9kmuM6MFH5Dhg1VYDODgFbByw1yb7xu3hrViE/sz+dGOeMWgCzwUwQtAnCTE9g==",
|
|
2026
|
-
"engines": {
|
|
2027
|
-
"node": ">=12.0.0"
|
|
2028
|
-
}
|
|
2029
|
-
},
|
|
2030
2025
|
"node_modules/@stoplight/spectral-core/node_modules/tslib": {
|
|
2031
|
-
"version": "2.
|
|
2032
|
-
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.
|
|
2033
|
-
"integrity": "sha512-
|
|
2026
|
+
"version": "2.8.1",
|
|
2027
|
+
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
|
2028
|
+
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
|
2029
|
+
"license": "0BSD"
|
|
2034
2030
|
},
|
|
2035
2031
|
"node_modules/@stoplight/spectral-formats": {
|
|
2036
2032
|
"version": "1.6.0",
|
|
@@ -2357,9 +2353,10 @@
|
|
|
2357
2353
|
}
|
|
2358
2354
|
},
|
|
2359
2355
|
"node_modules/astring": {
|
|
2360
|
-
"version": "1.
|
|
2361
|
-
"resolved": "https://registry.npmjs.org/astring/-/astring-1.
|
|
2362
|
-
"integrity": "sha512-
|
|
2356
|
+
"version": "1.9.0",
|
|
2357
|
+
"resolved": "https://registry.npmjs.org/astring/-/astring-1.9.0.tgz",
|
|
2358
|
+
"integrity": "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==",
|
|
2359
|
+
"license": "MIT",
|
|
2363
2360
|
"bin": {
|
|
2364
2361
|
"astring": "bin/astring"
|
|
2365
2362
|
}
|
|
@@ -3315,9 +3312,10 @@
|
|
|
3315
3312
|
}
|
|
3316
3313
|
},
|
|
3317
3314
|
"node_modules/jsep": {
|
|
3318
|
-
"version": "1.
|
|
3319
|
-
"resolved": "https://registry.npmjs.org/jsep/-/jsep-1.
|
|
3320
|
-
"integrity": "sha512-
|
|
3315
|
+
"version": "1.4.0",
|
|
3316
|
+
"resolved": "https://registry.npmjs.org/jsep/-/jsep-1.4.0.tgz",
|
|
3317
|
+
"integrity": "sha512-B7qPcEVE3NVkmSJbaYxvv4cHkVW7DQsZz13pUMrfS8z8Q/BuShN+gcTXrUlPiGqM2/t/EEaI030bpxMqY8gMlw==",
|
|
3318
|
+
"license": "MIT",
|
|
3321
3319
|
"engines": {
|
|
3322
3320
|
"node": ">= 10.16.0"
|
|
3323
3321
|
}
|
|
@@ -3355,13 +3353,14 @@
|
|
|
3355
3353
|
"integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w=="
|
|
3356
3354
|
},
|
|
3357
3355
|
"node_modules/jsonpath-plus": {
|
|
3358
|
-
"version": "10.
|
|
3359
|
-
"resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.
|
|
3360
|
-
"integrity": "sha512-
|
|
3356
|
+
"version": "10.2.0",
|
|
3357
|
+
"resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-10.2.0.tgz",
|
|
3358
|
+
"integrity": "sha512-T9V+8iNYKFL2n2rF+w02LBOT2JjDnTjioaNFrxRy0Bv1y/hNsqR/EBK7Ojy2ythRHwmz2cRIls+9JitQGZC/sw==",
|
|
3359
|
+
"license": "MIT",
|
|
3361
3360
|
"dependencies": {
|
|
3362
|
-
"@jsep-plugin/assignment": "^1.
|
|
3363
|
-
"@jsep-plugin/regex": "^1.0.
|
|
3364
|
-
"jsep": "^1.
|
|
3361
|
+
"@jsep-plugin/assignment": "^1.3.0",
|
|
3362
|
+
"@jsep-plugin/regex": "^1.0.4",
|
|
3363
|
+
"jsep": "^1.4.0"
|
|
3365
3364
|
},
|
|
3366
3365
|
"bin": {
|
|
3367
3366
|
"jsonpath": "bin/jsonpath-cli.js",
|
|
@@ -3400,7 +3399,8 @@
|
|
|
3400
3399
|
"node_modules/lodash.topath": {
|
|
3401
3400
|
"version": "4.5.2",
|
|
3402
3401
|
"resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz",
|
|
3403
|
-
"integrity": "sha512-1/W4dM+35DwvE/iEd1M9ekewOSTlpFekhw9mhAtrwjVqUr83/ilQiyAvmg4tVX7Unkcfl1KC+i9WdaT4B6aQcg=="
|
|
3402
|
+
"integrity": "sha512-1/W4dM+35DwvE/iEd1M9ekewOSTlpFekhw9mhAtrwjVqUr83/ilQiyAvmg4tVX7Unkcfl1KC+i9WdaT4B6aQcg==",
|
|
3403
|
+
"license": "MIT"
|
|
3404
3404
|
},
|
|
3405
3405
|
"node_modules/loose-envify": {
|
|
3406
3406
|
"version": "1.4.0",
|
|
@@ -3438,9 +3438,10 @@
|
|
|
3438
3438
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
|
3439
3439
|
},
|
|
3440
3440
|
"node_modules/nimma": {
|
|
3441
|
-
"version": "0.2.
|
|
3442
|
-
"resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.
|
|
3443
|
-
"integrity": "sha512-
|
|
3441
|
+
"version": "0.2.3",
|
|
3442
|
+
"resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.3.tgz",
|
|
3443
|
+
"integrity": "sha512-1ZOI8J+1PKKGceo/5CT5GfQOG6H8I2BencSK06YarZ2wXwH37BSSUWldqJmMJYA5JfqDqffxDXynt6f11AyKcA==",
|
|
3444
|
+
"license": "Apache-2.0",
|
|
3444
3445
|
"dependencies": {
|
|
3445
3446
|
"@jsep-plugin/regex": "^1.0.1",
|
|
3446
3447
|
"@jsep-plugin/ternary": "^1.0.2",
|
|
@@ -3451,19 +3452,10 @@
|
|
|
3451
3452
|
"node": "^12.20 || >=14.13"
|
|
3452
3453
|
},
|
|
3453
3454
|
"optionalDependencies": {
|
|
3454
|
-
"jsonpath-plus": "^6.0.1",
|
|
3455
|
+
"jsonpath-plus": "^6.0.1 || ^10.1.0",
|
|
3455
3456
|
"lodash.topath": "^4.5.2"
|
|
3456
3457
|
}
|
|
3457
3458
|
},
|
|
3458
|
-
"node_modules/nimma/node_modules/jsonpath-plus": {
|
|
3459
|
-
"version": "6.0.1",
|
|
3460
|
-
"resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-6.0.1.tgz",
|
|
3461
|
-
"integrity": "sha512-EvGovdvau6FyLexFH2OeXfIITlgIbgZoAZe3usiySeaIDm5QS+A10DKNpaPBBqqRSZr2HN6HVNXxtwUAr2apEw==",
|
|
3462
|
-
"optional": true,
|
|
3463
|
-
"engines": {
|
|
3464
|
-
"node": ">=10.0.0"
|
|
3465
|
-
}
|
|
3466
|
-
},
|
|
3467
3459
|
"node_modules/node-fetch": {
|
|
3468
3460
|
"version": "2.6.7",
|
|
3469
3461
|
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
|
@@ -3809,11 +3801,12 @@
|
|
|
3809
3801
|
}
|
|
3810
3802
|
},
|
|
3811
3803
|
"node_modules/simple-eval": {
|
|
3812
|
-
"version": "1.0.
|
|
3813
|
-
"resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.
|
|
3814
|
-
"integrity": "sha512-
|
|
3804
|
+
"version": "1.0.1",
|
|
3805
|
+
"resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.1.tgz",
|
|
3806
|
+
"integrity": "sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==",
|
|
3807
|
+
"license": "MIT",
|
|
3815
3808
|
"dependencies": {
|
|
3816
|
-
"jsep": "^1.
|
|
3809
|
+
"jsep": "^1.3.6"
|
|
3817
3810
|
},
|
|
3818
3811
|
"engines": {
|
|
3819
3812
|
"node": ">=12"
|
|
@@ -3,7 +3,9 @@ import { Parser } from '@asyncapi/parser';
|
|
|
3
3
|
export default class Template extends Command {
|
|
4
4
|
static description: string;
|
|
5
5
|
static examples: string[];
|
|
6
|
-
static flags: {
|
|
6
|
+
static readonly flags: {
|
|
7
|
+
proxyHost: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
proxyPort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
9
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
8
10
|
'disable-hook': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
11
|
'no-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -19,6 +19,7 @@ const prompts_1 = require("@clack/prompts");
|
|
|
19
19
|
const picocolors_1 = require("picocolors");
|
|
20
20
|
const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
|
|
21
21
|
const fromTemplate_flags_1 = require("../../core/flags/generate/fromTemplate.flags");
|
|
22
|
+
const proxy_flags_1 = require("../../core/flags/proxy.flags");
|
|
22
23
|
const templatesNotSupportingV3 = {
|
|
23
24
|
'@asyncapi/minimaltemplate': 'some link',
|
|
24
25
|
'@asyncapi/dotnet-nats-template': 'https://github.com/asyncapi/dotnet-nats-template/issues/384',
|
|
@@ -79,6 +80,7 @@ class Template extends base_1.default {
|
|
|
79
80
|
const interactive = !flags['no-interactive'];
|
|
80
81
|
let { asyncapi, template } = args;
|
|
81
82
|
let output = flags.output;
|
|
83
|
+
const { proxyPort, proxyHost } = flags;
|
|
82
84
|
if (interactive) {
|
|
83
85
|
(0, prompts_1.intro)((0, picocolors_1.inverse)('AsyncAPI Generator'));
|
|
84
86
|
const parsedArgs = yield this.parseArgs(args, output);
|
|
@@ -101,6 +103,10 @@ class Template extends base_1.default {
|
|
|
101
103
|
token: flags['registry-token']
|
|
102
104
|
}
|
|
103
105
|
};
|
|
106
|
+
if (proxyHost && proxyPort) {
|
|
107
|
+
const proxyUrl = `http://${proxyHost}:${proxyPort}`;
|
|
108
|
+
asyncapi = `${asyncapi}+${proxyUrl}`;
|
|
109
|
+
}
|
|
104
110
|
const asyncapiInput = (yield (0, SpecificationFile_1.load)(asyncapi)) || (yield (0, SpecificationFile_1.load)());
|
|
105
111
|
this.specFile = asyncapiInput;
|
|
106
112
|
this.metricsMetadata.template = template;
|
|
@@ -384,7 +390,7 @@ Template.description = 'Generates whatever you want using templates compatible w
|
|
|
384
390
|
Template.examples = [
|
|
385
391
|
'asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write'
|
|
386
392
|
];
|
|
387
|
-
Template.flags = (0, fromTemplate_flags_1.fromTemplateFlags)();
|
|
393
|
+
Template.flags = Object.assign(Object.assign({}, (0, fromTemplate_flags_1.fromTemplateFlags)()), (0, proxy_flags_1.proxyFlags)());
|
|
388
394
|
Template.args = {
|
|
389
395
|
asyncapi: core_1.Args.string({ description: '- Local path, url or context-name pointing to AsyncAPI file', required: true }),
|
|
390
396
|
template: core_1.Args.string({ description: '- Name of the generator template like for example @asyncapi/html-template or https://github.com/asyncapi/html-template', required: true }),
|
|
@@ -2,7 +2,10 @@ import Command from '../../core/base';
|
|
|
2
2
|
export default class Models extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static readonly args: any;
|
|
5
|
-
static flags:
|
|
5
|
+
static readonly flags: {
|
|
6
|
+
proxyHost: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
proxyPort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
};
|
|
6
9
|
run(): Promise<void>;
|
|
7
10
|
private parseArgs;
|
|
8
11
|
}
|
|
@@ -8,12 +8,14 @@ const prompts_1 = require("@clack/prompts");
|
|
|
8
8
|
const picocolors_1 = require("picocolors");
|
|
9
9
|
const modelina_cli_1 = require("@asyncapi/modelina-cli");
|
|
10
10
|
const models_flags_1 = require("../../core/flags/generate/models.flags");
|
|
11
|
+
const proxy_flags_1 = require("../../core/flags/proxy.flags");
|
|
11
12
|
class Models extends base_1.default {
|
|
12
13
|
run() {
|
|
13
14
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
15
|
const { args, flags } = yield this.parse(Models);
|
|
15
16
|
let { language, file } = args;
|
|
16
17
|
let { output } = flags;
|
|
18
|
+
const { proxyPort, proxyHost } = flags;
|
|
17
19
|
const interactive = !flags['no-interactive'];
|
|
18
20
|
if (!interactive) {
|
|
19
21
|
(0, prompts_1.intro)((0, picocolors_1.inverse)('AsyncAPI Generate Models'));
|
|
@@ -22,6 +24,10 @@ class Models extends base_1.default {
|
|
|
22
24
|
file = parsedArgs.file;
|
|
23
25
|
output = parsedArgs.output;
|
|
24
26
|
}
|
|
27
|
+
if (proxyHost && proxyPort) {
|
|
28
|
+
const proxyUrl = `http://${proxyHost}:${proxyPort}`;
|
|
29
|
+
file = `${file}+${proxyUrl}`;
|
|
30
|
+
}
|
|
25
31
|
const inputFile = (yield (0, SpecificationFile_1.load)(file)) || (yield (0, SpecificationFile_1.load)());
|
|
26
32
|
const { document, diagnostics, status } = yield (0, parser_1.parse)(this, inputFile, flags);
|
|
27
33
|
if (!document || status === 'invalid') {
|
|
@@ -117,4 +123,4 @@ class Models extends base_1.default {
|
|
|
117
123
|
exports.default = Models;
|
|
118
124
|
Models.description = 'Generates typed models';
|
|
119
125
|
Models.args = modelina_cli_1.ModelinaArgs;
|
|
120
|
-
Models.flags = (0, models_flags_1.modelsFlags)();
|
|
126
|
+
Models.flags = Object.assign(Object.assign({}, (0, models_flags_1.modelsFlags)()), (0, proxy_flags_1.proxyFlags)());
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default class New extends
|
|
1
|
+
import Command from '../../core/base';
|
|
2
|
+
export default class New extends Command {
|
|
3
|
+
static readonly description = "Create a new AsyncAPI project, specification files, or templates for clients and applications.";
|
|
4
|
+
run(): Promise<void>;
|
|
3
5
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const base_1 = tslib_1.__importDefault(require("../../core/base"));
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
class New extends base_1.default {
|
|
7
|
+
run() {
|
|
8
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
const help = new core_1.Help(this.config);
|
|
10
|
+
help.showHelp(['new', '--help']);
|
|
11
|
+
});
|
|
12
|
+
}
|
|
6
13
|
}
|
|
7
14
|
exports.default = New;
|
|
15
|
+
New.description = 'Create a new AsyncAPI project, specification files, or templates for clients and applications.';
|
package/oclif.manifest.json
CHANGED
|
@@ -870,6 +870,22 @@
|
|
|
870
870
|
"name": "use-new-generator",
|
|
871
871
|
"allowNo": false,
|
|
872
872
|
"type": "boolean"
|
|
873
|
+
},
|
|
874
|
+
"proxyHost": {
|
|
875
|
+
"description": "Name of the ProxyHost",
|
|
876
|
+
"name": "proxyHost",
|
|
877
|
+
"required": false,
|
|
878
|
+
"hasDynamicHelp": false,
|
|
879
|
+
"multiple": false,
|
|
880
|
+
"type": "option"
|
|
881
|
+
},
|
|
882
|
+
"proxyPort": {
|
|
883
|
+
"description": "Port number number for the proxyHost.",
|
|
884
|
+
"name": "proxyPort",
|
|
885
|
+
"required": false,
|
|
886
|
+
"hasDynamicHelp": false,
|
|
887
|
+
"multiple": false,
|
|
888
|
+
"type": "option"
|
|
873
889
|
}
|
|
874
890
|
},
|
|
875
891
|
"hasDynamicHelp": false,
|
|
@@ -1187,6 +1203,22 @@
|
|
|
1187
1203
|
"hint"
|
|
1188
1204
|
],
|
|
1189
1205
|
"type": "option"
|
|
1206
|
+
},
|
|
1207
|
+
"proxyHost": {
|
|
1208
|
+
"description": "Name of the ProxyHost",
|
|
1209
|
+
"name": "proxyHost",
|
|
1210
|
+
"required": false,
|
|
1211
|
+
"hasDynamicHelp": false,
|
|
1212
|
+
"multiple": false,
|
|
1213
|
+
"type": "option"
|
|
1214
|
+
},
|
|
1215
|
+
"proxyPort": {
|
|
1216
|
+
"description": "Port number number for the proxyHost.",
|
|
1217
|
+
"name": "proxyPort",
|
|
1218
|
+
"required": false,
|
|
1219
|
+
"hasDynamicHelp": false,
|
|
1220
|
+
"multiple": false,
|
|
1221
|
+
"type": "option"
|
|
1190
1222
|
}
|
|
1191
1223
|
},
|
|
1192
1224
|
"hasDynamicHelp": false,
|
|
@@ -1337,63 +1369,15 @@
|
|
|
1337
1369
|
"new": {
|
|
1338
1370
|
"aliases": [],
|
|
1339
1371
|
"args": {},
|
|
1340
|
-
"description": "
|
|
1341
|
-
"
|
|
1342
|
-
"asyncapi new\t - start creation of a file in interactive mode",
|
|
1343
|
-
"asyncapi new --file-name=my-asyncapi.yaml --example=default-example.yaml --no-tty\t - create a new file with a specific name, using one of the examples and without interactive mode"
|
|
1344
|
-
],
|
|
1345
|
-
"flags": {
|
|
1346
|
-
"help": {
|
|
1347
|
-
"char": "h",
|
|
1348
|
-
"description": "Show CLI help.",
|
|
1349
|
-
"name": "help",
|
|
1350
|
-
"allowNo": false,
|
|
1351
|
-
"type": "boolean"
|
|
1352
|
-
},
|
|
1353
|
-
"file-name": {
|
|
1354
|
-
"char": "n",
|
|
1355
|
-
"description": "name of the file",
|
|
1356
|
-
"name": "file-name",
|
|
1357
|
-
"hasDynamicHelp": false,
|
|
1358
|
-
"multiple": false,
|
|
1359
|
-
"type": "option"
|
|
1360
|
-
},
|
|
1361
|
-
"example": {
|
|
1362
|
-
"char": "e",
|
|
1363
|
-
"description": "name of the example to use. Available examples are:\n\t - simple-asyncapi.yml\n\t - adeo-kafka-request-reply-asyncapi.yml\n\t - anyof-asyncapi.yml\n\t - application-headers-asyncapi.yml\n\t - correlation-id-asyncapi.yml\n\t - websocket-gemini-asyncapi.yml\n\t - gitter-streaming-asyncapi.yml\n\t - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml\n\t - kraken-websocket-request-reply-multiple-channels-asyncapi.yml\n\t - mercure-asyncapi.yml\n\t - not-asyncapi.yml\n\t - operation-security-asyncapi.yml\n\t - oneof-asyncapi.yml\n\t - rpc-client-asyncapi.yml\n\t - rpc-server-asyncapi.yml\n\t - slack-rtm-asyncapi.yml\n\t - tutorial.yml\n\t - streetlights-kafka-asyncapi.yml\n\t - streetlights-operation-security-asyncapi.yml\n\t - streetlights-mqtt-asyncapi.yml",
|
|
1364
|
-
"name": "example",
|
|
1365
|
-
"hasDynamicHelp": false,
|
|
1366
|
-
"multiple": false,
|
|
1367
|
-
"type": "option"
|
|
1368
|
-
},
|
|
1369
|
-
"studio": {
|
|
1370
|
-
"char": "s",
|
|
1371
|
-
"description": "open in Studio",
|
|
1372
|
-
"name": "studio",
|
|
1373
|
-
"allowNo": false,
|
|
1374
|
-
"type": "boolean"
|
|
1375
|
-
},
|
|
1376
|
-
"port": {
|
|
1377
|
-
"char": "p",
|
|
1378
|
-
"description": "port in which to start Studio",
|
|
1379
|
-
"name": "port",
|
|
1380
|
-
"hasDynamicHelp": false,
|
|
1381
|
-
"multiple": false,
|
|
1382
|
-
"type": "option"
|
|
1383
|
-
},
|
|
1384
|
-
"no-tty": {
|
|
1385
|
-
"description": "do not use an interactive terminal",
|
|
1386
|
-
"name": "no-tty",
|
|
1387
|
-
"allowNo": false,
|
|
1388
|
-
"type": "boolean"
|
|
1389
|
-
}
|
|
1390
|
-
},
|
|
1372
|
+
"description": "Create a new AsyncAPI project, specification files, or templates for clients and applications.",
|
|
1373
|
+
"flags": {},
|
|
1391
1374
|
"hasDynamicHelp": false,
|
|
1392
1375
|
"hiddenAliases": [],
|
|
1393
1376
|
"id": "new",
|
|
1394
1377
|
"pluginAlias": "@asyncapi/cli",
|
|
1395
1378
|
"pluginName": "@asyncapi/cli",
|
|
1396
1379
|
"pluginType": "core",
|
|
1380
|
+
"strict": true,
|
|
1397
1381
|
"isESM": false,
|
|
1398
1382
|
"relativePath": [
|
|
1399
1383
|
"lib",
|
|
@@ -1817,5 +1801,5 @@
|
|
|
1817
1801
|
]
|
|
1818
1802
|
}
|
|
1819
1803
|
},
|
|
1820
|
-
"version": "2.16.
|
|
1804
|
+
"version": "2.16.3"
|
|
1821
1805
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asyncapi/cli",
|
|
3
3
|
"description": "All in one CLI for all AsyncAPI tools",
|
|
4
|
-
"version": "2.16.
|
|
4
|
+
"version": "2.16.3",
|
|
5
5
|
"author": "@asyncapi",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asyncapi": "./bin/run_bin"
|
|
@@ -106,6 +106,9 @@
|
|
|
106
106
|
"oclif": {
|
|
107
107
|
"commands": "./lib/commands",
|
|
108
108
|
"bin": "asyncapi",
|
|
109
|
+
"additionalVersionFlags": [
|
|
110
|
+
"--v"
|
|
111
|
+
],
|
|
109
112
|
"hooks": {
|
|
110
113
|
"command_not_found": [
|
|
111
114
|
"./lib/hooks/command_not_found/myhook"
|