@jskit-ai/jskit-cli 0.2.124 → 0.2.126
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/jskit-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.126",
|
|
4
4
|
"description": "Bundle and package orchestration CLI for JSKIT apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"test": "node --test"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
24
|
-
"@jskit-ai/kernel": "0.1.
|
|
25
|
-
"@jskit-ai/shell-web": "0.1.
|
|
23
|
+
"@jskit-ai/jskit-catalog": "0.1.121",
|
|
24
|
+
"@jskit-ai/kernel": "0.1.114",
|
|
25
|
+
"@jskit-ai/shell-web": "0.1.113",
|
|
26
26
|
"@vue/compiler-sfc": "^3.5.29",
|
|
27
27
|
"ts-morph": "^28.0.0"
|
|
28
28
|
},
|
|
@@ -106,6 +106,10 @@ function normalizeResolvedOptionValue(value = "") {
|
|
|
106
106
|
return String(value || "").trim().toLowerCase();
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
function isFlagOptionSchema(schema = {}) {
|
|
110
|
+
return normalizeResolvedOptionValue(schema?.inputType) === "flag";
|
|
111
|
+
}
|
|
112
|
+
|
|
109
113
|
function normalizeResolvedOptionSchemaValue({
|
|
110
114
|
packageEntry,
|
|
111
115
|
optionName = "",
|
|
@@ -475,6 +479,7 @@ async function resolvePackageOptions(packageEntry, inlineOptions, io, { appRoot
|
|
|
475
479
|
for (const optionName of optionNames) {
|
|
476
480
|
const schema = ensureObject(optionSchemas[optionName]);
|
|
477
481
|
const allowEmpty = schema.allowEmpty === true;
|
|
482
|
+
const isFlagOption = isFlagOptionSchema(schema);
|
|
478
483
|
const assignResolvedOption = (rawValue = "") => {
|
|
479
484
|
const normalizedOptionValue = normalizeResolvedOptionSchemaValue({
|
|
480
485
|
packageEntry,
|
|
@@ -489,7 +494,12 @@ async function resolvePackageOptions(packageEntry, inlineOptions, io, { appRoot
|
|
|
489
494
|
return false;
|
|
490
495
|
};
|
|
491
496
|
if (hasInlineOption(optionName)) {
|
|
492
|
-
const
|
|
497
|
+
const rawInlineValue = inlineOptionValues[optionName];
|
|
498
|
+
const inlineValue = String(rawInlineValue ?? "").trim();
|
|
499
|
+
if (isFlagOption) {
|
|
500
|
+
assignResolvedOption(inlineValue || "true");
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
493
503
|
if (inlineValue || allowEmpty) {
|
|
494
504
|
assignResolvedOption(inlineValue);
|
|
495
505
|
continue;
|
|
@@ -522,6 +532,11 @@ async function resolvePackageOptions(packageEntry, inlineOptions, io, { appRoot
|
|
|
522
532
|
continue;
|
|
523
533
|
}
|
|
524
534
|
|
|
535
|
+
if (isFlagOption) {
|
|
536
|
+
resolved[optionName] = "false";
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
|
|
525
540
|
if (schema.required) {
|
|
526
541
|
const promptConfigContext = appRoot ? await loadConfigContext() : {};
|
|
527
542
|
assignResolvedOption(await promptForRequiredOption({
|
|
@@ -47,6 +47,7 @@ function buildMaterializedInstallRoot({ appRoot, packageEntry }) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
function buildCatalogPackageCacheInstallArgs(packageSpec) {
|
|
50
|
+
// The cache only needs package-owned descriptors/templates. App installs still validate peer dependencies.
|
|
50
51
|
return [
|
|
51
52
|
"install",
|
|
52
53
|
"--no-save",
|