Module: Extension::Messages
- Defined in:
- lib/project_types/extension/messages/messages.rb,
lib/project_types/extension/messages/message_loading.rb
Defined Under Namespace
Modules: MessageLoading
Constant Summary collapse
- MESSAGES =
{ extension: { help: " Suite of commands for developing app extensions. See {{command:%1$s extension <command> --help}} for usage of each command.\n Usage: {{command:%1$s extension [ %2$s ]}}\n HELP\n },\n create: {\n help: <<~HELP,\n Create a new app extension.\n Usage: {{command:%s extension create <name>}}\n Options:\n {{command:--type=TYPE}} The type of extension you would like to create.\n {{command:--name=NAME}} The name of your extension (50 characters).\n {{command:--api-key=KEY}} The API key of your app.\n HELP\n ask_name: \"Extension name\",\n invalid_name: \"Extension name must be under %s characters\",\n ask_type: \"What type of extension are you creating?\",\n invalid_type: \"Extension type is invalid.\",\n setup_project_frame_title: \"Initializing project\",\n ready_to_start: <<~MESSAGE,\n {{v}} A new folder was generated at {{green:./%s}}.\n {{*}} You\u2019re ready to start building {{green:%s}}!\n Navigate to the new folder, then run {{command:shopify extension serve}} to start a local server.\n MESSAGE\n learn_more: <<~MESSAGE,\n {{*}} Once you're ready to version and publish your extension,\n run {{command:shopify extension register}} to register this extension with one of your apps.\n MESSAGE\n try_again: \"{{*}} Fix the errors and run {{command:shopify extension create}} again.\",\n errors: {\n directory_exists: \"Directory \u2018%s\u2019 already exists. Please remove it or choose a new name for your project.\",\n },\n incomplete_configuration: \"Cannot create extension due to missing configuration information\",\n invalid_api_key: \"The API key %s does not match any of your apps.\",\n ask_app: \"Which app would you like to register this extension with?\",\n no_apps: \"{{x}} You don\u2019t have any apps.\",\n learn_about_apps: \"{{*}} Learn more about building apps at <https://shopify.dev/apps>, \" \\\n \"or try creating a new app using {{command:shopify [node|rails] create}}.\",\n loading_apps: \"Loading your apps\u2026\",\n no_available_extensions: \"{{x}} There are no available extensions for this app.\",\n ask_template: \"Select a template to use for your extension\",\n },\n connect: {\n connected: \"Project now connected to {{green:%s: %s}}\",\n incomplete_configuration: \"Cannot connect extension due to missing configuration information\",\n invalid_api_key: \"The API key %s does not match any of your apps.\",\n ask_registration: \"Which extension would you like to connect to?\",\n loading_extensions: \"Loading your extensions\u2026\",\n no_extensions: \"{{x}} You don't have any extensions of type %s\",\n learn_about_extensions: \"{{*}} Learn more about building extensions at <https://shopify.dev/concepts/apps>, \" \\\n \"or try creating a new extension using {{command:shopify extension create}}.\",\n help: <<~HELP,\n {{command:%s extension connect}}: Connects an existing extension to Shopify CLI. Creates a config file.\n Usage: {{command:%s extension connect}}\n HELP\n },\n build: {\n help: <<~HELP,\n Build your extension to prepare for deployment.\n Usage: {{command:%s extension build}}\n HELP\n frame_title: \"Building extension with: %s\u2026\",\n build_failure_message: \"Failed to build extension code.\",\n },\n register: {\n help: <<~HELP,\n Register your local extension to a Shopify app\n Usage: {{command:%s extension register}}\n HELP\n frame_title: \"Registering Extension\",\n waiting_text: \"Registering with Shopify\u2026\",\n already_registered: \"Extension is already registered.\",\n confirm_info: \"This will create a new extension registration for %s, which can\u2019t be undone.\",\n confirm_question: \"Would you like to register this extension? (y/n)\",\n confirm_abort: \"Extension was not registered.\",\n success: \"{{v}} Registered {{green:%s}}.\",\n success_info: \"{{*}} Run {{command:shopify extension push}} to push your extension to Shopify.\",\n },\n push: {\n help: <<~HELP,\n Push the current extension to Shopify.\n Usage: {{command:%s extension push}}\n Options:\n {{command:--api-key=API_KEY}} Connect your extension and app by inserting your app's API key (which you can get from your app setup page on shopify.dev).\n {{command:--extension-id=EXTENSION_ID}} The id of the extension's registration.\n HELP\n frame_title: \"Pushing your extension to Shopify\",\n waiting_text: \"Pushing code to Shopify\u2026\",\n pushed_with_errors: \"{{x}} Code pushed to Shopify with errors on %s.\",\n push_with_errors_info: \"{{*}} Fix these errors and run {{command:shopify extension push}} to \" \\\n \"revalidate your extension.\",\n success_confirmation: \"{{v}} Pushed {{green:%s}} to a draft on %s.\",\n success_info: \"{{*}} Visit %s to version and publish your extension.\",\n },\n serve: {\n help: <<~HELP,\n Serve your extension in a local simulator for development.\n Usage: {{command:%s extension serve [ ROOT ]}}\n Options:\n {{command:-p, --port=PORT}} Local port of the development serve.\n {{command:-T, --theme=NAME_OR_ID}} Theme ID or name of the host theme.\n {{command:--tunnel=TUNNEL}} Establish an ngrok tunnel (default: false).\n {{command:--api-key=API_KEY}} Connect your extension and app by inserting your app's API key (which you can get from your app setup page on shopify.dev).\n {{command:--api-secret=API_SECRET}} The API secret of the app the script is registered with.\n {{command:--extension-id=EXTENSION_ID}} The id of the extension's registration.\n HELP\n frame_title: \"Viewing extension\u2026\",\n no_available_ports_found: \"No available ports found to run extension.\",\n serve_failure_message: \"Failed to run extension code.\",\n serve_missing_information: \"Missing shop or api_key.\",\n tunnel_already_running: \"A tunnel running on another port has been detected. Close the tunnel and try again.\",\n preview_message: <<~PREVIEW_MESSAGE,\n Enable your theme app extension:\n {{green:%s}}\n\n Setup your theme app extension in the host theme:\n {{green:%s}}\n\n Preview your theme app extension:\n {{green:%s}}\n\n (Use Ctrl-C to stop)\n PREVIEW_MESSAGE\n },\n tunnel: {\n duplicate_session: <<~MESSAGE,\n Another ngrok tunnel is currently running with your auth token, possibly on another machine.\n\n Terminate that tunnel before opening a new one.\n MESSAGE\n invalid_token: <<~MESSAGE,\n The ngrok token currently configured is invalid.\n\n After generating a new token, update your local ngrok configuration using {{command:shopify app tunnel auth <token>}}\n MESSAGE\n missing_token: \"{{x}} {{red:auth requires a token argument}}. \"\\\n \"Find it on your ngrok dashboard: {{underline:https://dashboard.ngrok.com/auth/your-authtoken}}.\",\n invalid_port: \"%s is not a valid port.\",\n no_tunnel_running: \"No tunnel running.\",\n tunnel_running_at: \"Tunnel running at: {{underline:%s}}\",\n help: <<~HELP,\n Start or stop an http tunnel to your local development extension using ngrok.\n Usage: {{command:%s extension tunnel [ auth | start | stop | status ]}}\n HELP\n extended_help: <<~HELP,\n {{bold:Subcommands:}}\n\n {{cyan:auth}}: Writes an ngrok auth token to ~/.ngrok2/ngrok.yml to connect with an ngrok account.\n Visit https://dashboard.ngrok.com/signup to sign up.\n Usage: {{command:%1$s extension tunnel auth <token>}}\n\n {{cyan:start}}: Starts an ngrok tunnel, will print the URL for an existing tunnel if already running.\n Usage: {{command:%1$s extension tunnel start}}\n Options:\n {{command:--port=PORT}} Forward the ngrok subdomain to local port PORT. Defaults to %2$s.\n\n {{cyan:stop}}: Stops the ngrok tunnel.\n Usage: {{command:%1$s extension tunnel stop}}\n\n {{cyan:status}}: Output the current status of the ngrok tunnel.\n Usage: {{command:%1$s extension tunnel status}}\n HELP\n },\n check: {\n help: \"Check your extension for errors, suggestions, and best practices.\",\n unsupported: \"{{red:%s projects are not supported for `extension check`}}\",\n },\n features: {\n argo: {\n missing_file_error: \"Could not find built extension file.\",\n script_prepare_error: \"An error occurred while attempting to prepare your script.\",\n initialization_error: \"{{x}} There was an error while initializing the project.\",\n dependencies: {\n node: {\n node_not_installed: \"Node must be installed to create this extension.\",\n version_too_low: \"Your node version %s does not meet the minimum required version %s\",\n },\n argo_missing_renderer_package_error: \"Extension template references invalid renderer package \"\\\n \"please contact Shopify for help.\",\n yarn_install_error: \"Something went wrong while running 'yarn install'. %s.\",\n yarn_run_script_error: \"Something went wrong while running script. %s.\",\n },\n config: {\n unpermitted_keys: \"`%s` contains the following unpermitted keys: %s\",\n },\n },\n },\n tasks: {\n errors: {\n parse_error: \"Unable to parse response from Partners Dashboard.\",\n store_error: \"There was an error getting store data. Try again later.\",\n },\n },\n errors: {\n unknown_type: \"Unknown extension type %s. Valid extension types include: CHECKOUT_POST_PURCHASE, \" \\\n \"THEME_APP_EXTENSION, and PRODUCT_SUBSCRIPTION.\",\n package_not_found: \"`%s` package not found.\",\n missing_push_options_ci: \"The following are missing: %s. \",\n missing_push_options_ci_solution: \"To add them to a CI environment:\\n\\t1. Run a connect command \" \\\n \"({{command:%1$s extension connect}})\\n\\t2. Navigate to the .env file at the root of your project\\n\\t\" \\\n \"3. Copy the missing values and pass them through as arguments in {{command:%1$s extension push}}\",\n missing_env_file_variables: \"The following are missing in the .env file: %s. \",\n missing_env_file_variables_solution: \"To add it, connect your extension with \" \\\n \"{{command:%1$s extension connect}} \" \\\n \"or run {{command:%1$s extension register}} to register a new extension.\",\n module_not_found: \"Unable to find module %s. Ensure your dependencies are up-to-date and try again.\",\n development_server_binary_not_found: {\n title: \"Development Server Binary Missing\",\n message: <<~ERROR,\n The extension development server binary could not be found!\n\n If you're running a development version of the CLI, please run `rake extensions:install` to install it.\n Otherwise, please file a bug report via https://github.com/Shopify/shopify-cli/issues/new.\n ERROR\n },\n outdated_extensions: {\n unknown: <<~TEXT.strip,\n Please refer to the documentation for more information on how to upgrade your extension:\n https://shopify.dev/apps/app-extensions\n TEXT\n checkout_ui_extension: <<~TEXT.strip,\n Please update your package.json as follows:\n * Replace the development dependency @shopify/checkout-ui-extensions-run\n with @shopify/shopify-cli-extensions\n * Remove the start and server script\n * Add a develop script: shopify-cli-extensions develop\n * Change the build script to: shopify-cli-extensions build\n TEXT\n product_subscription: <<~TEXT.strip,\n Please update your package.json as follows:\n * Replace the development dependency @shopify/admin-ui-extensions-run\n with @shopify/shopify-cli-extensions\n * Remove the start and server script\n * Add a develop script: shopify-cli-extensions develop\n * Change the build script to: shopify-cli-extensions build\n TEXT\n checkout_post_purchase: <<~TEXT.strip,\n Please update your package.json as follows:\n * Replace the development dependency @shopify/checkout-ui-extensions-run\n with @shopify/shopify-cli-extensions\n * Remove the start and server script\n * Add a develop script: shopify-cli-extensions develop\n * Change the build script to: shopify-cli-extensions build\n TEXT\n },\n },\n warnings: {\n resource_url_auto_generation_failed: \"{{*}} {{yellow:Warning:}} Unable to auto generate \" \\\n \"the extension resource URL because %s does not have any products. \" \\\n \"Please run {{bold:shopify populate products}} to generate sample products.\",\n },\n}\n",
- TYPES =
{ product_subscription: { name: "Product Subscription", tagline: "(limit 1 per app)", overrides: { register: { confirm_info: "You can only create one %s extension per app, which can’t be undone.", }, }, }, checkout_post_purchase: { name: "Checkout Post Purchase", }, theme_app_extension: { name: "Theme App Extension", tagline: "(limit 1 per app)", overrides: { register: { confirm_info: "You can only create one %s extension per app, which can’t be undone.", }, create: { ready_to_start: " {{v}} A new folder was generated at {{green:./%s}}.\n {{*}} You\u2019re ready to start building {{green:%s}}!\n MESSAGE\n },\n\n },\n },\n}\n",