@forge/cli-shared
9.10.0-next.109.10.0-next.11
out/ui/text.js~
out/ui/text.jsModified+25−2
Index: package/out/ui/text.js
===================================================================
--- package/out/ui/text.js
+++ package/out/ui/text.js
@@ -276,10 +276,10 @@
intro: (givenDirectory) => `Creating an app in directory ${chalk_1.default.bold(givenDirectory)}.\n`,
introWithCurrentDirectory: (currentDirectory) => `Creating an app in your current directory:\n\n ${chalk_1.default.bold(currentDirectory)}\n`,
optionTemplate: 'specify the template to use',
optionDirectory: 'specify the directory to create (uses the template name by default)',
- optionSpace: 'specify the Developer Space id to use',
- optionAcceptTerms: 'automatically accept terms and conditions in non-interactive mode',
+ optionSpace: `specify the Developer Space id to use (see your Developer Spaces by running ${forge('developer-spaces', 'list')})`,
+ optionAcceptTerms: 'accept terms and conditions without prompting',
optionPersonal: 'register as a personal app',
overviewAppName: `\nName your app. The app name can include dashes, spaces, and underscores.\n`,
overviewTemplates: '\nStart with a template. Each template contains the required files to be a valid app.\n',
waitTemplates: 'Getting template list...',
@@ -306,8 +306,31 @@
},
name: {
tooLong: (max) => `The app name exceeds ${max} characters. Run ${forge('create')} using a shorter app name.`
},
+ nonInteractive: {
+ missingInputs: (missingInputs, nextCommand) => {
+ const labelWidth = Math.max(...missingInputs.map(({ label }) => label.length));
+ const inputs = missingInputs.map(({ label, hint }) => `${label.padEnd(labelWidth)} ${hint}`);
+ return `Missing required inputs for non-interactive mode.\n\nProvide:\n${itemList(inputs)}\n\nNext: ${forge('create', ...nextCommand)}`;
+ },
+ labels: {
+ appName: '<app name>',
+ template: '-t, --template <template name>',
+ developerSpace: '-s, --developer-space-id <Developer Space id>',
+ acceptTerms: '-y, --accept-terms'
+ },
+ placeholders: {
+ appName: '<app name>',
+ template: '<template name>',
+ directory: '<directory name>',
+ developerSpace: '<Developer Space id>'
+ },
+ appNameHint: (maxLength) => `up to ${maxLength} characters`,
+ templateHint: 'for example: blank',
+ developerSpaceHint: `find one with: ${forge('developer-spaces', 'list', '--json')}`,
+ acceptTermsHint: 'accepts the Developer Terms, Privacy Policy and usage pricing'
+ },
template: {
download: (template) => `Failed to download the ${template} template. Run ${forge('create')} again.`,
notFound: (template) => `The template ${template} doesn't exist. Run ${forge('create')} using a different template.`,
noTemplates: 'There are no templates to choose from.',