@asyncapi/cli 1.0.0 → 1.1.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/default/package-lock.json +7 -7
- package/assets/create-glee-app/templates/default/package.json +1 -1
- package/assets/create-glee-app/templates/tutorial/LICENSE +199 -0
- package/assets/create-glee-app/templates/tutorial/README-template.md +17 -0
- package/assets/create-glee-app/templates/tutorial/asyncapi.yaml +41 -0
- package/assets/create-glee-app/templates/tutorial/env +1 -0
- package/assets/create-glee-app/templates/tutorial/functions/onLightMeasured.js +4 -0
- package/assets/create-glee-app/templates/tutorial/gitignore +103 -0
- package/assets/create-glee-app/templates/tutorial/package-lock.json +12169 -0
- package/assets/create-glee-app/templates/tutorial/package.json +21 -0
- package/lib/commands/new/glee.d.ts +1 -0
- package/lib/commands/new/glee.js +3 -1
- package/oclif.manifest.json +17 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "glee-tutorial",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Tutorial from the AsyncAPI website.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=14.15.1"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "glee dev",
|
|
11
|
+
"start": "glee start"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"glee"
|
|
15
|
+
],
|
|
16
|
+
"author": "Fran Mendez",
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@asyncapi/glee": "^0.29.1"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -5,6 +5,7 @@ export default class NewGlee extends Command {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
7
7
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
|
+
template: import("@oclif/core/lib/interfaces").OptionFlag<string>;
|
|
8
9
|
};
|
|
9
10
|
run(): Promise<void>;
|
|
10
11
|
}
|
package/lib/commands/new/glee.js
CHANGED
|
@@ -15,8 +15,9 @@ class NewGlee extends base_1.default {
|
|
|
15
15
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
16
|
const { flags } = yield this.parse(NewGlee); // NOSONAR
|
|
17
17
|
const projectName = flags.name;
|
|
18
|
+
const templateName = flags.template;
|
|
18
19
|
const PROJECT_DIRECTORY = (0, path_1.join)(process.cwd(), projectName);
|
|
19
|
-
const GLEE_TEMPLATES_DIRECTORY = (0, path_1.resolve)(__dirname, '../../../assets/create-glee-app/templates/
|
|
20
|
+
const GLEE_TEMPLATES_DIRECTORY = (0, path_1.resolve)(__dirname, '../../../assets/create-glee-app/templates/', templateName);
|
|
20
21
|
try {
|
|
21
22
|
yield fs_1.promises.mkdir(PROJECT_DIRECTORY);
|
|
22
23
|
}
|
|
@@ -53,4 +54,5 @@ NewGlee.description = 'Creates a new Glee project';
|
|
|
53
54
|
NewGlee.flags = {
|
|
54
55
|
help: core_1.Flags.help({ char: 'h' }),
|
|
55
56
|
name: core_1.Flags.string({ char: 'n', description: 'name of the project', default: 'project' }),
|
|
57
|
+
template: core_1.Flags.string({ char: 't', description: 'name of the template', default: 'default' }),
|
|
56
58
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.1.0",
|
|
3
3
|
"commands": {
|
|
4
4
|
"bundle": {
|
|
5
5
|
"id": "bundle",
|
|
@@ -788,6 +788,14 @@
|
|
|
788
788
|
"description": "name of the project",
|
|
789
789
|
"multiple": false,
|
|
790
790
|
"default": "project"
|
|
791
|
+
},
|
|
792
|
+
"template": {
|
|
793
|
+
"name": "template",
|
|
794
|
+
"type": "option",
|
|
795
|
+
"char": "t",
|
|
796
|
+
"description": "name of the template",
|
|
797
|
+
"multiple": false,
|
|
798
|
+
"default": "default"
|
|
791
799
|
}
|
|
792
800
|
},
|
|
793
801
|
"args": {}
|
|
@@ -872,6 +880,14 @@
|
|
|
872
880
|
"description": "name of the project",
|
|
873
881
|
"multiple": false,
|
|
874
882
|
"default": "project"
|
|
883
|
+
},
|
|
884
|
+
"template": {
|
|
885
|
+
"name": "template",
|
|
886
|
+
"type": "option",
|
|
887
|
+
"char": "t",
|
|
888
|
+
"description": "name of the template",
|
|
889
|
+
"multiple": false,
|
|
890
|
+
"default": "default"
|
|
875
891
|
}
|
|
876
892
|
},
|
|
877
893
|
"args": {}
|