@lark-apaas/fullstack-cli 1.1.66 → 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.
Files changed (2) hide show
  1. package/dist/index.js +16 -15
  2. 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
- let inputSchema;
4843
- if (index === 0 && hasValidParamsSchema(capability.paramsSchema)) {
4844
- inputSchema = capability.paramsSchema;
4845
- } else if (isDynamicSchema(manifestAction.inputSchema)) {
4846
- if (!pluginInstance) {
4847
- throw new Error(`Plugin instance not available for dynamic schema`);
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-cli",
3
- "version": "1.1.66",
3
+ "version": "1.1.67-alpha.20260914114352",
4
4
  "description": "CLI tool for fullstack template management",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",