@forge/cli-shared

9.0.1-next.89.1.0-next.9
out/ui/text.js
~out/ui/text.jsModified
+11−2
Index: package/out/ui/text.js
===================================================================
--- package/out/ui/text.js
+++ package/out/ui/text.js
@@ -1621,10 +1621,19 @@
             warnDownloadFailed: (moduleKey, message) => `Failed to download template archive for "${moduleKey}": ${message}. File copy will be skipped.`,
             warnNoBundle: 'Template bundle was not downloaded; file copy was skipped.',
             warnInstallSkipped: '⚠️ Skipping install: Run npm install to install new dependencies.',
             infoReusingResource: (resourceKey) => `Reusing existing resource '${resourceKey}'`,
-            errorResourceEntryConflict: (resourceKey, entryName, existing, incoming) => `Resource '${resourceKey}' already declares entry '${entryName}' as '${existing}', but the new module wants '${incoming}'. Choose a different moduleKey or remove the existing entry.`,
-            errorResourcePathConflict: (resourceKey, existing, incoming) => `Resource '${resourceKey}' already declares path '${existing}', but the new module wants '${incoming}'. Resources sharing a key must share a path.`
+            optionVariables: 'template variables as a JSON object, e.g. \'{"moduleKey":"my-panel","title":"My Panel"}\'. Implies --non-interactive (requires -t/--module-type)',
+            errorNonInteractiveInvalidVariablesJson: (message) => `--variables isn't valid JSON: ${message}\nProvide a JSON object mapping variable names to values, e.g. {"moduleKey":"my-panel","title":"My Panel"}.`,
+            errorNonInteractiveUnknownVariables: (unknownKeys, accepted) => `Unknown variables: ${unknownKeys.join(', ')}. Accepted variables:\n${accepted
+                .map((v) => `- ${v.name}: ${v.prompt}${v.default ? ` (default: ${v.default})` : ''}`)
+                .join('\n')}`,
+            errorNonInteractiveMissingVariables: (missing) => `Missing required variables:\n${missing.map((v) => `- ${v.name}: ${v.prompt}`).join('\n')}`,
+            errorNonInteractiveMissingUiType: (validTypes) => `This module has multiple UI frameworks. Provide -u/--ui-type with one of: ${validTypes.join(', ')}.`,
+            errorNonInteractiveMissingModuleType: 'Provide -t/--module-type to add a module non-interactively when using --variables.',
+            errorNonInteractiveSummary: (errors) => `Couldn't add the module in non-interactive mode. Resolve the following issues and re-run the command:\n\n${errors.join('\n\n')}`,
+            errorResourceEntryConflict: (resourceKey, entryName, existing, incoming) => `Resource '${resourceKey}' already declares entry '${entryName}' as '${existing}', but the new module expects '${incoming}'. Choose a different moduleKey or remove the existing entry.`,
+            errorResourcePathConflict: (resourceKey, existing, incoming) => `Resource '${resourceKey}' already declares path '${existing}', but the new module expects '${incoming}'. Resources sharing a key must share a path.`
         },
         list: {
             description: '[Preview] list available module templates',
             empty: 'No module templates found.',