@asyncapi/cli 2.16.9 → 2.17.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-glee-app/templates/tutorial/package-lock.json +4 -3
- package/assets/create-template/templates/default/package-lock.json +4 -3
- package/lib/commands/new/template.d.ts +0 -1
- package/lib/commands/new/template.js +4 -7
- package/lib/core/flags/new/template.flags.d.ts +0 -1
- package/lib/core/flags/new/template.flags.js +0 -5
- package/lib/core/hooks/command_not_found/myhook.js +1 -1
- package/oclif.manifest.json +1 -10
- package/package.json +1 -1
|
@@ -2148,9 +2148,10 @@
|
|
|
2148
2148
|
"integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA=="
|
|
2149
2149
|
},
|
|
2150
2150
|
"node_modules/@babel/runtime": {
|
|
2151
|
-
"version": "7.
|
|
2152
|
-
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.
|
|
2153
|
-
"integrity": "sha512-
|
|
2151
|
+
"version": "7.26.10",
|
|
2152
|
+
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
|
|
2153
|
+
"integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
|
|
2154
|
+
"license": "MIT",
|
|
2154
2155
|
"dependencies": {
|
|
2155
2156
|
"regenerator-runtime": "^0.14.0"
|
|
2156
2157
|
},
|
|
@@ -1717,9 +1717,10 @@
|
|
|
1717
1717
|
"integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA=="
|
|
1718
1718
|
},
|
|
1719
1719
|
"node_modules/@babel/runtime": {
|
|
1720
|
-
"version": "7.
|
|
1721
|
-
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.
|
|
1722
|
-
"integrity": "sha512-
|
|
1720
|
+
"version": "7.26.10",
|
|
1721
|
+
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.10.tgz",
|
|
1722
|
+
"integrity": "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==",
|
|
1723
|
+
"license": "MIT",
|
|
1723
1724
|
"dependencies": {
|
|
1724
1725
|
"regenerator-runtime": "^0.14.0"
|
|
1725
1726
|
},
|
|
@@ -13,7 +13,6 @@ export default class template extends Command {
|
|
|
13
13
|
template: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
14
|
file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
'force-write': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
-
renderer: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
16
|
};
|
|
18
17
|
run(): Promise<void>;
|
|
19
18
|
}
|
|
@@ -35,11 +35,8 @@ class template extends base_1.default {
|
|
|
35
35
|
run() {
|
|
36
36
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
const { flags } = yield this.parse(template); // NOSONAR
|
|
38
|
-
const { name: projectName, template: templateName,
|
|
38
|
+
const { name: projectName, template: templateName, } = flags;
|
|
39
39
|
const PROJECT_DIRECTORY = (0, path_1.join)(process.cwd(), projectName);
|
|
40
|
-
if (rendererName !== 'nunjucks' && rendererName !== 'react') {
|
|
41
|
-
this.error('Invalid flag check the flag name of renderer');
|
|
42
|
-
}
|
|
43
40
|
const templateDirectory = (0, path_1.resolve)(__dirname, '../../../assets/create-template/templates/', templateName);
|
|
44
41
|
{
|
|
45
42
|
try {
|
|
@@ -61,7 +58,7 @@ class template extends base_1.default {
|
|
|
61
58
|
}
|
|
62
59
|
}
|
|
63
60
|
try {
|
|
64
|
-
yield copyAndModify(templateDirectory, PROJECT_DIRECTORY,
|
|
61
|
+
yield copyAndModify(templateDirectory, PROJECT_DIRECTORY, projectName);
|
|
65
62
|
this.log((0, exports.successMessage)(projectName));
|
|
66
63
|
}
|
|
67
64
|
catch (err) {
|
|
@@ -78,7 +75,7 @@ template.successMessage = exports.successMessage;
|
|
|
78
75
|
template.errorMessages = errorMessages;
|
|
79
76
|
template.flags = (0, template_flags_1.templateFlags)();
|
|
80
77
|
exports.default = template;
|
|
81
|
-
function copyAndModify(templateDirectory, PROJECT_DIRECTORY,
|
|
78
|
+
function copyAndModify(templateDirectory, PROJECT_DIRECTORY, projectName) {
|
|
82
79
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
83
80
|
const packageJsonPath = path_2.default.join(templateDirectory, 'package.json');
|
|
84
81
|
try {
|
|
@@ -89,7 +86,7 @@ function copyAndModify(templateDirectory, PROJECT_DIRECTORY, rendererName, proje
|
|
|
89
86
|
});
|
|
90
87
|
const packageData = yield jsonfile_1.default.readFile(packageJsonPath);
|
|
91
88
|
if ((packageData.generator && 'renderer' in packageData.generator)) {
|
|
92
|
-
packageData.generator.renderer =
|
|
89
|
+
packageData.generator.renderer = 'react';
|
|
93
90
|
}
|
|
94
91
|
if (packageData.name) {
|
|
95
92
|
packageData.name = projectName;
|
|
@@ -4,5 +4,4 @@ export declare const templateFlags: () => {
|
|
|
4
4
|
template: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
5
5
|
file: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
6
|
'force-write': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
-
renderer: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
7
|
};
|
|
@@ -23,11 +23,6 @@ const templateFlags = () => {
|
|
|
23
23
|
default: false,
|
|
24
24
|
description: 'Force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)',
|
|
25
25
|
}),
|
|
26
|
-
renderer: core_1.Flags.string({
|
|
27
|
-
char: 'r',
|
|
28
|
-
default: 'react',
|
|
29
|
-
description: 'Creating a template for particular engine, Its value can be either react or nunjucks.'
|
|
30
|
-
})
|
|
31
26
|
};
|
|
32
27
|
};
|
|
33
28
|
exports.templateFlags = templateFlags;
|
|
@@ -27,7 +27,7 @@ const hook = function (opts) {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
// now we we return if the command id are not there.
|
|
30
|
-
let binHelp = `${opts.config.bin} help`;
|
|
30
|
+
let binHelp = `${opts.config.bin} --help`;
|
|
31
31
|
const idSplit = opts.id.split(':');
|
|
32
32
|
if (opts.config.findTopic(idSplit[0])) {
|
|
33
33
|
// if valid topic, update binHelp with topic
|
package/oclif.manifest.json
CHANGED
|
@@ -1413,15 +1413,6 @@
|
|
|
1413
1413
|
"name": "force-write",
|
|
1414
1414
|
"allowNo": false,
|
|
1415
1415
|
"type": "boolean"
|
|
1416
|
-
},
|
|
1417
|
-
"renderer": {
|
|
1418
|
-
"char": "r",
|
|
1419
|
-
"description": "Creating a template for particular engine, Its value can be either react or nunjucks.",
|
|
1420
|
-
"name": "renderer",
|
|
1421
|
-
"default": "react",
|
|
1422
|
-
"hasDynamicHelp": false,
|
|
1423
|
-
"multiple": false,
|
|
1424
|
-
"type": "option"
|
|
1425
1416
|
}
|
|
1426
1417
|
},
|
|
1427
1418
|
"hasDynamicHelp": false,
|
|
@@ -1785,5 +1776,5 @@
|
|
|
1785
1776
|
]
|
|
1786
1777
|
}
|
|
1787
1778
|
},
|
|
1788
|
-
"version": "2.
|
|
1779
|
+
"version": "2.17.0"
|
|
1789
1780
|
}
|