@lark-apaas/fullstack-cli 1.1.68-alpha.20261003004004 → 1.1.68-alpha.20261019123412
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.js +5 -40
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4882,11 +4882,7 @@ async function hydrateCapability(capability) {
|
|
|
4882
4882
|
let pluginInstance = null;
|
|
4883
4883
|
if (hasDynamicSchema) {
|
|
4884
4884
|
const plugin = await loadPlugin(capability.pluginKey);
|
|
4885
|
-
|
|
4886
|
-
pluginInstance = plugin.create(capability.formValue || {});
|
|
4887
|
-
} catch {
|
|
4888
|
-
throw new Error("plugin_initialization_failed");
|
|
4889
|
-
}
|
|
4885
|
+
pluginInstance = plugin.create(capability.formValue || {});
|
|
4890
4886
|
}
|
|
4891
4887
|
const actions = [];
|
|
4892
4888
|
for (let index = 0; index < manifest.actions.length; index++) {
|
|
@@ -4898,14 +4894,9 @@ async function hydrateCapability(capability) {
|
|
|
4898
4894
|
if (!pluginInstance) {
|
|
4899
4895
|
throw new Error(`Plugin instance not available for dynamic schema`);
|
|
4900
4896
|
}
|
|
4901
|
-
|
|
4902
|
-
try {
|
|
4903
|
-
jsonSchema = pluginInstance.getInputJsonSchema(manifestAction.key);
|
|
4904
|
-
} catch {
|
|
4905
|
-
throw new Error("plugin_input_schema_resolution_failed");
|
|
4906
|
-
}
|
|
4897
|
+
const jsonSchema = pluginInstance.getInputJsonSchema(manifestAction.key);
|
|
4907
4898
|
if (!jsonSchema) {
|
|
4908
|
-
throw new Error(
|
|
4899
|
+
throw new Error(`Failed to get input schema for action: ${manifestAction.key}`);
|
|
4909
4900
|
}
|
|
4910
4901
|
inputSchema = jsonSchema;
|
|
4911
4902
|
} else {
|
|
@@ -4916,14 +4907,9 @@ async function hydrateCapability(capability) {
|
|
|
4916
4907
|
if (!pluginInstance) {
|
|
4917
4908
|
throw new Error(`Plugin instance not available for dynamic schema`);
|
|
4918
4909
|
}
|
|
4919
|
-
|
|
4920
|
-
try {
|
|
4921
|
-
jsonSchema = pluginInstance.getOutputJsonSchema(manifestAction.key, capability.formValue || {});
|
|
4922
|
-
} catch {
|
|
4923
|
-
throw new Error("plugin_output_schema_resolution_failed");
|
|
4924
|
-
}
|
|
4910
|
+
const jsonSchema = pluginInstance.getOutputJsonSchema(manifestAction.key, capability.formValue || {});
|
|
4925
4911
|
if (!jsonSchema) {
|
|
4926
|
-
throw new Error(
|
|
4912
|
+
throw new Error(`Failed to get output schema for action: ${manifestAction.key}`);
|
|
4927
4913
|
}
|
|
4928
4914
|
outputSchema = jsonSchema;
|
|
4929
4915
|
} else {
|
|
@@ -4954,21 +4940,6 @@ async function hydrateCapability(capability) {
|
|
|
4954
4940
|
};
|
|
4955
4941
|
}
|
|
4956
4942
|
}
|
|
4957
|
-
function getHydrationFailureReason(result) {
|
|
4958
|
-
if ("_hydrateError" in result) {
|
|
4959
|
-
return result._hydrateError || "unknown hydration error";
|
|
4960
|
-
}
|
|
4961
|
-
if (!("actions" in result)) {
|
|
4962
|
-
return "hydration result is missing actions";
|
|
4963
|
-
}
|
|
4964
|
-
if (!Array.isArray(result.actions)) {
|
|
4965
|
-
return "hydration result actions is not an array";
|
|
4966
|
-
}
|
|
4967
|
-
if (result.actions.length === 0) {
|
|
4968
|
-
return "hydration result has no actions";
|
|
4969
|
-
}
|
|
4970
|
-
return void 0;
|
|
4971
|
-
}
|
|
4972
4943
|
function formatJsonOutput(data, compact = false) {
|
|
4973
4944
|
return compact ? JSON.stringify(data) : JSON.stringify(data, null, 2);
|
|
4974
4945
|
}
|
|
@@ -5003,12 +4974,6 @@ async function listSingle(id, summary) {
|
|
|
5003
4974
|
printJson(capability);
|
|
5004
4975
|
} else {
|
|
5005
4976
|
const hydrated = await hydrateCapability(capability);
|
|
5006
|
-
const failureReason = getHydrationFailureReason(hydrated);
|
|
5007
|
-
if (failureReason) {
|
|
5008
|
-
throw new Error(
|
|
5009
|
-
`capability_hydration_failed: pluginKey=${capability.pluginKey} capabilityId=${capability.id} reason=${failureReason}`
|
|
5010
|
-
);
|
|
5011
|
-
}
|
|
5012
4977
|
printJson(hydrated);
|
|
5013
4978
|
}
|
|
5014
4979
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/fullstack-cli",
|
|
3
|
-
"version": "1.1.68-alpha.
|
|
3
|
+
"version": "1.1.68-alpha.20261019123412",
|
|
4
4
|
"description": "CLI tool for fullstack template management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@lark-apaas/http-client": "
|
|
34
|
+
"@lark-apaas/http-client": "0.1.8-alpha.20261019123410",
|
|
35
35
|
"@lydell/node-pty": "1.1.0",
|
|
36
36
|
"@vercel/nft": "^0.30.3",
|
|
37
37
|
"commander": "^13.0.0",
|