@lark-apaas/fullstack-cli 1.1.66-beta.0 → 1.1.67-alpha.20260914114352
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 +16 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4803,6 +4803,16 @@ function isDynamicSchema(schema) {
|
|
|
4803
4803
|
function hasValidParamsSchema(paramsSchema) {
|
|
4804
4804
|
return paramsSchema !== void 0 && Object.keys(paramsSchema).length > 0;
|
|
4805
4805
|
}
|
|
4806
|
+
function resolveActionInputSchema(manifestAction, actionIndex, paramsSchema, pluginInstance) {
|
|
4807
|
+
if (isDynamicSchema(manifestAction.inputSchema)) {
|
|
4808
|
+
if (!pluginInstance) throw new Error("Plugin instance not available for dynamic schema");
|
|
4809
|
+
const jsonSchema = pluginInstance.getInputJsonSchema(manifestAction.key);
|
|
4810
|
+
if (!jsonSchema) throw new Error(`Failed to get input schema for action: ${manifestAction.key}`);
|
|
4811
|
+
return jsonSchema;
|
|
4812
|
+
}
|
|
4813
|
+
if (actionIndex === 0 && hasValidParamsSchema(paramsSchema)) return paramsSchema;
|
|
4814
|
+
return manifestAction.inputSchema;
|
|
4815
|
+
}
|
|
4806
4816
|
async function loadPlugin(pluginKey) {
|
|
4807
4817
|
try {
|
|
4808
4818
|
const userRequire = createRequire2(path13.join(getProjectRoot2(), "package.json"));
|
|
@@ -4839,21 +4849,12 @@ async function hydrateCapability(capability) {
|
|
|
4839
4849
|
const actions = [];
|
|
4840
4850
|
for (let index = 0; index < manifest.actions.length; index++) {
|
|
4841
4851
|
const manifestAction = manifest.actions[index];
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
}
|
|
4849
|
-
const jsonSchema = pluginInstance.getInputJsonSchema(manifestAction.key);
|
|
4850
|
-
if (!jsonSchema) {
|
|
4851
|
-
throw new Error(`Failed to get input schema for action: ${manifestAction.key}`);
|
|
4852
|
-
}
|
|
4853
|
-
inputSchema = jsonSchema;
|
|
4854
|
-
} else {
|
|
4855
|
-
inputSchema = manifestAction.inputSchema;
|
|
4856
|
-
}
|
|
4852
|
+
const inputSchema = resolveActionInputSchema(
|
|
4853
|
+
manifestAction,
|
|
4854
|
+
index,
|
|
4855
|
+
capability.paramsSchema,
|
|
4856
|
+
pluginInstance
|
|
4857
|
+
);
|
|
4857
4858
|
let outputSchema;
|
|
4858
4859
|
if (isDynamicSchema(manifestAction.outputSchema)) {
|
|
4859
4860
|
if (!pluginInstance) {
|