@m2c2kit/cli 0.3.31 → 0.3.32
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/dist/index.d.ts +1 -1
- package/dist/index.js +19 -5
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* The code in this file is adapted from a reference CLI implementation from
|
|
4
4
|
* the Angular devkit repository:
|
|
5
|
-
* https://github.com/angular/angular-cli/blob/
|
|
5
|
+
* https://github.com/angular/angular-cli/blob/1c2d49ec736818d22773916d7eaafd3446275ea0/packages/angular_devkit/schematics_cli/bin/schematics.ts
|
|
6
6
|
* The license for that code is as follows:
|
|
7
7
|
* @license
|
|
8
8
|
* Copyright Google LLC All Rights Reserved.
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* The code in this file is adapted from a reference CLI implementation from
|
|
5
5
|
* the Angular devkit repository:
|
|
6
|
-
* https://github.com/angular/angular-cli/blob/
|
|
6
|
+
* https://github.com/angular/angular-cli/blob/1c2d49ec736818d22773916d7eaafd3446275ea0/packages/angular_devkit/schematics_cli/bin/schematics.ts
|
|
7
7
|
* The license for that code is as follows:
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -118,21 +118,31 @@ function _createPromptProvider() {
|
|
|
118
118
|
}
|
|
119
119
|
answers[definition.id] = await (definition.multiselect ? prompts.checkbox : prompts.select)({
|
|
120
120
|
message: definition.message,
|
|
121
|
-
default: definition.default,
|
|
122
121
|
validate: (values) => {
|
|
123
122
|
if (!definition.validator) {
|
|
124
123
|
return true;
|
|
125
124
|
}
|
|
126
125
|
return definition.validator(Object.values(values).map(({ value }) => value));
|
|
127
126
|
},
|
|
128
|
-
|
|
127
|
+
default: definition.multiselect ? undefined : definition.default,
|
|
128
|
+
choices: definition.items?.map((item) => typeof item == "string"
|
|
129
129
|
? {
|
|
130
130
|
name: item,
|
|
131
131
|
value: item,
|
|
132
|
+
checked: definition.multiselect &&
|
|
133
|
+
Array.isArray(definition.default)
|
|
134
|
+
? definition.default?.includes(item)
|
|
135
|
+
: item === definition.default,
|
|
132
136
|
}
|
|
133
137
|
: {
|
|
138
|
+
...item,
|
|
134
139
|
name: item.label,
|
|
135
140
|
value: item.value,
|
|
141
|
+
checked: definition.multiselect &&
|
|
142
|
+
Array.isArray(definition.default)
|
|
143
|
+
? // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
144
|
+
definition.default?.includes(item.value)
|
|
145
|
+
: item.value === definition.default,
|
|
136
146
|
}),
|
|
137
147
|
});
|
|
138
148
|
break;
|
|
@@ -288,10 +298,14 @@ async function main({ args, stdout = process.stdout, stderr = process.stderr, })
|
|
|
288
298
|
logger.error(`ERROR! ${eventPath} ${event.description == "alreadyExist" ? "already exists" : "does not exist"}.`);
|
|
289
299
|
break;
|
|
290
300
|
case "update":
|
|
291
|
-
loggingQueue.push(
|
|
301
|
+
loggingQueue.push(
|
|
302
|
+
// TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution.
|
|
303
|
+
`${colors.cyan("UPDATE")} ${eventPath} (${event.content.length} bytes)`);
|
|
292
304
|
break;
|
|
293
305
|
case "create":
|
|
294
|
-
loggingQueue.push(
|
|
306
|
+
loggingQueue.push(
|
|
307
|
+
// TODO: `as unknown` was necessary during TS 5.9 update. Figure out a long-term solution.
|
|
308
|
+
`${colors.green("CREATE")} ${eventPath} (${event.content.length} bytes)`);
|
|
295
309
|
break;
|
|
296
310
|
case "delete":
|
|
297
311
|
loggingQueue.push(`${colors.yellow("DELETE")} ${eventPath}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m2c2kit/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.32",
|
|
4
4
|
"description": "Command line interface to create new m2c2kit apps",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**"
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://m2c2-project.github.io/m2c2kit",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/core": "^20.
|
|
29
|
-
"@angular-devkit/schematics": "^20.
|
|
30
|
-
"@inquirer/prompts": "7.6
|
|
31
|
-
"@m2c2kit/schematics": "0.1.
|
|
32
|
-
"@schematics/angular": "^20.
|
|
28
|
+
"@angular-devkit/core": "^20.3.4",
|
|
29
|
+
"@angular-devkit/schematics": "^20.3.4",
|
|
30
|
+
"@inquirer/prompts": "7.8.6",
|
|
31
|
+
"@m2c2kit/schematics": "0.1.32",
|
|
32
|
+
"@schematics/angular": "^20.3.4",
|
|
33
33
|
"ansi-colors": "4.1.3",
|
|
34
34
|
"yargs-parser": "22.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/inquirer": "9.0.
|
|
37
|
+
"@types/inquirer": "9.0.9",
|
|
38
38
|
"rimraf": "6.0.1",
|
|
39
|
-
"typescript": "5.
|
|
39
|
+
"typescript": "5.9.3"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=18"
|