@neurodevs/ndx-cli 0.1.47 → 0.1.49
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/.vscode/tasks.json
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"presentation": {
|
|
41
41
|
"reveal": "always",
|
|
42
|
-
"panel": "dedicated"
|
|
42
|
+
"panel": "dedicated"
|
|
43
43
|
},
|
|
44
44
|
"problemMatcher": []
|
|
45
45
|
},
|
|
@@ -88,6 +88,18 @@
|
|
|
88
88
|
"clear": false
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
+
{
|
|
92
|
+
"label": "ndx",
|
|
93
|
+
"type": "shell",
|
|
94
|
+
"command": "ndx ${input:ndxCommand}",
|
|
95
|
+
"problemMatcher": [],
|
|
96
|
+
"presentation": {
|
|
97
|
+
"reveal": "always",
|
|
98
|
+
"focus": true,
|
|
99
|
+
"panel": "new",
|
|
100
|
+
"clear": false
|
|
101
|
+
}
|
|
102
|
+
},
|
|
91
103
|
{
|
|
92
104
|
"label": "ndx",
|
|
93
105
|
"type": "shell",
|
|
@@ -125,6 +137,12 @@
|
|
|
125
137
|
"description": "ndx command",
|
|
126
138
|
"default": "create.impl",
|
|
127
139
|
"type": "promptString"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "ndxCommand",
|
|
143
|
+
"description": "ndx command",
|
|
144
|
+
"default": "create.module",
|
|
145
|
+
"type": "promptString"
|
|
128
146
|
}
|
|
129
147
|
]
|
|
130
148
|
}
|
|
@@ -31,8 +31,10 @@ export default class CliCommandRunner implements CommandRunner {
|
|
|
31
31
|
private createImplModule;
|
|
32
32
|
private createPackage;
|
|
33
33
|
private createUiModule;
|
|
34
|
-
private help;
|
|
35
34
|
private upgradePackage;
|
|
35
|
+
private help;
|
|
36
|
+
private get log();
|
|
37
|
+
private readonly helpText;
|
|
36
38
|
}
|
|
37
39
|
export interface CommandRunner {
|
|
38
40
|
run(): Promise<void>;
|
|
@@ -29,6 +29,20 @@ class CliCommandRunner {
|
|
|
29
29
|
this.dashHCommand,
|
|
30
30
|
this.upgradePackageCommand,
|
|
31
31
|
];
|
|
32
|
+
this.helpText = `ndx CLI (Command Line Interface)
|
|
33
|
+
|
|
34
|
+
Available commands:
|
|
35
|
+
|
|
36
|
+
- create.impl Create implementation for interface with test and fake.
|
|
37
|
+
- create.package Create npm package using latest template.
|
|
38
|
+
- create.ui Create React component with test and fake.
|
|
39
|
+
- upgrade.package Upgrade existing npm package to latest template.
|
|
40
|
+
- help, --help, -h Show this help text.
|
|
41
|
+
|
|
42
|
+
Usage:
|
|
43
|
+
|
|
44
|
+
- ndx <command> [options]
|
|
45
|
+
`;
|
|
32
46
|
this.args = args;
|
|
33
47
|
}
|
|
34
48
|
static Create(args) {
|
|
@@ -86,26 +100,16 @@ class CliCommandRunner {
|
|
|
86
100
|
const command = new CreateUiCommand_1.default();
|
|
87
101
|
await command.run();
|
|
88
102
|
}
|
|
89
|
-
async help() {
|
|
90
|
-
CliCommandRunner.log(`ndx CLI (Command Line Interface)
|
|
91
|
-
|
|
92
|
-
Available commands:
|
|
93
|
-
|
|
94
|
-
- create.impl Create implementation for interface with test and fake.
|
|
95
|
-
- create.package Create npm package using latest template.
|
|
96
|
-
- create.ui Create React component with test and fake.
|
|
97
|
-
- upgrade.package Upgrade existing npm package to latest template.
|
|
98
|
-
- help, --help, -h Show this help text.
|
|
99
|
-
|
|
100
|
-
Usage:
|
|
101
|
-
|
|
102
|
-
- ndx <command> [options]
|
|
103
|
-
`);
|
|
104
|
-
}
|
|
105
103
|
async upgradePackage() {
|
|
106
104
|
const command = new UpgradePackageCommand_1.default();
|
|
107
105
|
await command.run();
|
|
108
106
|
}
|
|
107
|
+
async help() {
|
|
108
|
+
this.log(this.helpText);
|
|
109
|
+
}
|
|
110
|
+
get log() {
|
|
111
|
+
return CliCommandRunner.log;
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
CliCommandRunner.exec = (0, util_1.promisify)(child_process_1.exec);
|
|
111
115
|
CliCommandRunner.log = console.log;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CliCommandRunner.js","sourceRoot":"","sources":["../../src/modules/CliCommandRunner.ts"],"names":[],"mappings":";;;;;AAAA,iDAAgD;AAChD,0CAAwD;AACxD,+BAAgC;AAChC,sDAA6B;AAC7B,qFAA4D;AAC5D,2FAAkE;AAClE,iFAAwD;AACxD,6FAAoE;AAEpE,MAAqB,gBAAgB;IA6BjC,YAAsB,IAAc;QAlBnB,sBAAiB,GAAG,aAAa,CAAA;QACjC,yBAAoB,GAAG,gBAAgB,CAAA;QACvC,oBAAe,GAAG,WAAW,CAAA;QAC7B,gBAAW,GAAG,MAAM,CAAA;QACpB,wBAAmB,GAAG,QAAQ,CAAA;QAC9B,iBAAY,GAAG,IAAI,CAAA;QACnB,0BAAqB,GAAG,iBAAiB,CAAA;QAEzC,sBAAiB,GAAG;YACjC,IAAI,CAAC,iBAAiB;YACtB,IAAI,CAAC,oBAAoB;YACzB,IAAI,CAAC,eAAe;YACpB,IAAI,CAAC,WAAW;YAChB,IAAI,CAAC,mBAAmB;YACxB,IAAI,CAAC,YAAY;YACjB,IAAI,CAAC,qBAAqB;SAC7B,CAAA;
|
|
1
|
+
{"version":3,"file":"CliCommandRunner.js","sourceRoot":"","sources":["../../src/modules/CliCommandRunner.ts"],"names":[],"mappings":";;;;;AAAA,iDAAgD;AAChD,0CAAwD;AACxD,+BAAgC;AAChC,sDAA6B;AAC7B,qFAA4D;AAC5D,2FAAkE;AAClE,iFAAwD;AACxD,6FAAoE;AAEpE,MAAqB,gBAAgB;IA6BjC,YAAsB,IAAc;QAlBnB,sBAAiB,GAAG,aAAa,CAAA;QACjC,yBAAoB,GAAG,gBAAgB,CAAA;QACvC,oBAAe,GAAG,WAAW,CAAA;QAC7B,gBAAW,GAAG,MAAM,CAAA;QACpB,wBAAmB,GAAG,QAAQ,CAAA;QA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B,oBAAG,GAAG,OAAO,CAAC,GAAG,AAAd,CAAc;AACjB,sBAAK,GAAG,gBAAK,AAAR,CAAQ;AACb,wBAAO,GAAG,iBAAO,AAAV,CAAU;AACjB,yBAAQ,GAAG,mBAAQ,AAAX,CAAW;AACnB,0BAAS,GAAG,oBAAS,AAAZ,CAAY;kBAPlB,gBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neurodevs/ndx-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.49",
|
|
4
4
|
"description": "CLI tools for the Neurodevs ecosystem.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"watch.tsc": "tsc -w"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@neurodevs/meta-node": "^0.10.
|
|
51
|
+
"@neurodevs/meta-node": "^0.10.15",
|
|
52
52
|
"prompts": "^2.4.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -104,8 +104,20 @@ export default class CliCommandRunner implements CommandRunner {
|
|
|
104
104
|
await command.run()
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
private async upgradePackage() {
|
|
108
|
+
const command = new UpgradePackageCommand()
|
|
109
|
+
await command.run()
|
|
110
|
+
}
|
|
111
|
+
|
|
107
112
|
private async help() {
|
|
108
|
-
|
|
113
|
+
this.log(this.helpText)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
private get log() {
|
|
117
|
+
return CliCommandRunner.log
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
private readonly helpText = `ndx CLI (Command Line Interface)
|
|
109
121
|
|
|
110
122
|
Available commands:
|
|
111
123
|
|
|
@@ -118,13 +130,7 @@ export default class CliCommandRunner implements CommandRunner {
|
|
|
118
130
|
Usage:
|
|
119
131
|
|
|
120
132
|
- ndx <command> [options]
|
|
121
|
-
`
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
private async upgradePackage() {
|
|
125
|
-
const command = new UpgradePackageCommand()
|
|
126
|
-
await command.run()
|
|
127
|
-
}
|
|
133
|
+
`
|
|
128
134
|
}
|
|
129
135
|
|
|
130
136
|
export interface CommandRunner {
|