shopify-cli 1.9.1 → 1.13.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +1 -0
  3. data/.github/workflows/build.yml +28 -0
  4. data/.github/workflows/release.yml +2 -4
  5. data/CHANGELOG.md +28 -0
  6. data/Gemfile.lock +1 -1
  7. data/README.md +2 -1
  8. data/lib/project_types/extension/cli.rb +6 -2
  9. data/lib/project_types/extension/commands/serve.rb +69 -1
  10. data/lib/project_types/extension/commands/tunnel.rb +3 -1
  11. data/lib/project_types/extension/extension_project.rb +1 -0
  12. data/lib/project_types/extension/features/argo.rb +15 -24
  13. data/lib/project_types/extension/features/argo_runtime.rb +91 -0
  14. data/lib/project_types/extension/features/argo_serve.rb +35 -27
  15. data/lib/project_types/extension/features/argo_serve_options.rb +42 -0
  16. data/lib/project_types/extension/messages/messages.rb +5 -1
  17. data/lib/project_types/extension/models/npm_package.rb +14 -0
  18. data/lib/project_types/extension/models/specification.rb +1 -0
  19. data/lib/project_types/extension/models/specification_handlers/checkout_argo_extension.rb +18 -0
  20. data/lib/project_types/extension/models/specification_handlers/default.rb +33 -3
  21. data/lib/project_types/extension/tasks/choose_next_available_port.rb +36 -0
  22. data/lib/project_types/extension/tasks/configure_features.rb +2 -0
  23. data/lib/project_types/extension/tasks/find_npm_packages.rb +106 -0
  24. data/lib/project_types/script/cli.rb +17 -12
  25. data/lib/project_types/script/commands/push.rb +6 -2
  26. data/lib/project_types/script/config/extension_points.yml +2 -3
  27. data/lib/project_types/script/graphql/get_app_scripts.graphql +6 -0
  28. data/lib/project_types/script/layers/application/create_script.rb +2 -2
  29. data/lib/project_types/script/layers/application/push_script.rb +2 -1
  30. data/lib/project_types/script/layers/domain/errors.rb +0 -2
  31. data/lib/project_types/script/layers/domain/script_project.rb +17 -1
  32. data/lib/project_types/script/layers/infrastructure/command_runner.rb +19 -0
  33. data/lib/project_types/script/layers/infrastructure/errors.rb +12 -3
  34. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb +97 -0
  35. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +103 -0
  36. data/lib/project_types/script/layers/infrastructure/languages/project_creator.rb +26 -0
  37. data/lib/project_types/script/layers/infrastructure/languages/rust_project_creator.rb +73 -0
  38. data/lib/project_types/script/layers/infrastructure/languages/rust_task_runner.rb +60 -0
  39. data/lib/project_types/script/layers/infrastructure/languages/task_runner.rb +21 -0
  40. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +4 -5
  41. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +22 -29
  42. data/lib/project_types/script/layers/infrastructure/script_service.rb +7 -1
  43. data/lib/project_types/script/messages/messages.rb +14 -4
  44. data/lib/project_types/script/tasks/ensure_env.rb +104 -0
  45. data/lib/project_types/script/ui/error_handler.rb +7 -6
  46. data/lib/shopify-cli/admin_api.rb +7 -4
  47. data/lib/shopify-cli/messages/messages.rb +48 -43
  48. data/lib/shopify-cli/method_object.rb +4 -4
  49. data/lib/shopify-cli/oauth.rb +7 -1
  50. data/lib/shopify-cli/partners_api.rb +7 -4
  51. data/lib/shopify-cli/partners_api/organizations.rb +3 -3
  52. data/lib/shopify-cli/resources/env_file.rb +1 -1
  53. data/lib/shopify-cli/shopifolk.rb +1 -1
  54. data/lib/shopify-cli/tasks/select_org_and_shop.rb +6 -4
  55. data/lib/shopify-cli/tunnel.rb +22 -1
  56. data/lib/shopify-cli/version.rb +1 -1
  57. data/lib/shopify_cli.rb +0 -1
  58. metadata +19 -11
  59. data/.travis.yml +0 -14
  60. data/lib/project_types/extension/features/argo_renderer_package.rb +0 -47
  61. data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +0 -100
  62. data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +0 -95
  63. data/lib/project_types/script/layers/infrastructure/project_creator.rb +0 -24
  64. data/lib/project_types/script/layers/infrastructure/rust_project_creator.rb +0 -72
  65. data/lib/project_types/script/layers/infrastructure/rust_task_runner.rb +0 -59
  66. data/lib/project_types/script/layers/infrastructure/task_runner.rb +0 -19
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Script
4
+ module Layers
5
+ module Infrastructure
6
+ module Languages
7
+ class TaskRunner
8
+ TASK_RUNNERS = {
9
+ "assemblyscript" => AssemblyScriptTaskRunner,
10
+ "rust" => RustTaskRunner,
11
+ }
12
+
13
+ def self.for(ctx, language, script_name)
14
+ raise Errors::TaskRunnerNotFoundError unless TASK_RUNNERS[language]
15
+ TASK_RUNNERS[language].new(ctx, script_name)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -8,7 +8,7 @@ module Script
8
8
  property! :ctx, accepts: ShopifyCli::Context
9
9
 
10
10
  def create_push_package(script_project:, script_content:, compiled_type:, metadata:)
11
- build_file_path = file_path(script_project.id, script_project.script_name, compiled_type)
11
+ build_file_path = file_path(script_project.id, compiled_type)
12
12
  write_to_path(build_file_path, script_content)
13
13
 
14
14
  Domain::PushPackage.new(
@@ -24,11 +24,10 @@ module Script
24
24
  end
25
25
 
26
26
  def get_push_package(script_project:, compiled_type:, metadata:)
27
- build_file_path = file_path(script_project.id, script_project.script_name, compiled_type)
27
+ build_file_path = file_path(script_project.id, compiled_type)
28
28
  raise Domain::PushPackageNotFoundError unless ctx.file_exist?(build_file_path)
29
29
 
30
30
  script_content = ctx.binread(build_file_path)
31
-
32
31
  Domain::PushPackage.new(
33
32
  id: build_file_path,
34
33
  uuid: script_project.uuid,
@@ -48,8 +47,8 @@ module Script
48
47
  ctx.binwrite(path, content)
49
48
  end
50
49
 
51
- def file_path(path_to_script, script_name, compiled_type)
52
- "#{path_to_script}/build/#{script_name}.#{compiled_type}"
50
+ def file_path(path_to_script, compiled_type)
51
+ "#{path_to_script}/build/script.#{compiled_type}"
53
52
  end
54
53
  end
55
54
  end
@@ -13,15 +13,9 @@ module Script
13
13
  def create(script_name:, extension_point_type:, language:, no_config_ui:)
14
14
  validate_metadata!(extension_point_type, language)
15
15
 
16
- optional_identifiers = {}
17
16
  config_ui_file = nil
18
-
19
- unless no_config_ui
20
- optional_identifiers.merge!(config_ui_file: DEFAULT_CONFIG_UI_FILENAME)
21
- config_ui_file = ConfigUiRepository
22
- .new(ctx: ctx)
23
- .create(DEFAULT_CONFIG_UI_FILENAME, default_config_ui_content(script_name))
24
- end
17
+ optional_identifiers = {}
18
+ optional_identifiers.merge!(config_ui_file: DEFAULT_CONFIG_UI_FILENAME) unless no_config_ui
25
19
 
26
20
  ShopifyCli::Project.write(
27
21
  ctx,
@@ -76,6 +70,25 @@ module Script
76
70
  )
77
71
  end
78
72
 
73
+ def create_env(api_key:, secret:, uuid:)
74
+ ShopifyCli::Resources::EnvFile.new(
75
+ api_key: api_key,
76
+ secret: secret,
77
+ extra: {
78
+ Domain::ScriptProject::UUID_ENV_KEY => uuid,
79
+ }
80
+ ).write(ctx)
81
+
82
+ Domain::ScriptProject.new(
83
+ id: ctx.root,
84
+ env: project.env,
85
+ script_name: script_name,
86
+ extension_point_type: extension_point_type,
87
+ language: language,
88
+ config_ui: ConfigUiRepository.new(ctx: ctx).get(config_ui_file),
89
+ )
90
+ end
91
+
79
92
  private
80
93
 
81
94
  def capture_io(&block)
@@ -109,18 +122,7 @@ module Script
109
122
  end
110
123
 
111
124
  def project
112
- ShopifyCli::Project.current
113
- end
114
-
115
- def default_config_ui_content(title)
116
- require "yaml" # takes 20ms, so deferred as late as possible.
117
- YAML.dump({
118
- "version" => 1,
119
- "inputMode" => "single",
120
- "title" => title,
121
- "description" => "",
122
- "fields" => [],
123
- })
125
+ @project ||= ShopifyCli::Project.current(force_reload: true)
124
126
  end
125
127
 
126
128
  def default_language
@@ -139,15 +141,6 @@ module Script
139
141
  include SmartProperties
140
142
  property! :ctx, accepts: ShopifyCli::Context
141
143
 
142
- def create(filename, content)
143
- File.write(filename, content)
144
-
145
- Domain::ConfigUi.new(
146
- filename: filename,
147
- content: content,
148
- )
149
- end
150
-
151
144
  def get(filename)
152
145
  return nil unless filename
153
146
 
@@ -40,7 +40,7 @@ module Script
40
40
  return resp_hash["data"]["appScriptUpdateOrCreate"]["appScript"]["uuid"] if user_errors.empty?
41
41
 
42
42
  if user_errors.any? { |e| e["tag"] == "already_exists_error" }
43
- raise Errors::ScriptRepushError, api_key
43
+ raise Errors::ScriptRepushError, uuid
44
44
  elsif (e = user_errors.any? { |err| err["tag"] == "config_ui_syntax_error" })
45
45
  raise Errors::ConfigUiSyntaxError, config_ui&.filename
46
46
  elsif (e = user_errors.find { |err| err["tag"] == "config_ui_missing_keys_error" })
@@ -58,6 +58,12 @@ module Script
58
58
  end
59
59
  end
60
60
 
61
+ def get_app_scripts(api_key:, extension_point_type:)
62
+ query_name = "get_app_scripts"
63
+ variables = { appKey: api_key, extensionPointName: extension_point_type.upcase }
64
+ script_service_request(query_name: query_name, api_key: api_key, variables: variables)["data"]["appScripts"]
65
+ end
66
+
61
67
  private
62
68
 
63
69
  class ScriptServiceAPI < ShopifyCli::API
@@ -78,8 +78,8 @@ module Script
78
78
 
79
79
  script_not_found_cause: "Couldn't find script %s for extension point %s",
80
80
 
81
- service_failure_cause: "Internal service error.",
82
- service_failure_help: "Ensure the 'shopify/scripts-toolchain-as' package is up to date.",
81
+ system_call_failure_cause: "An error was returned while running {{command:%{cmd}}}.",
82
+ system_call_failure_help: "Review the following error and try again.\n{{red:%{out}}}",
83
83
 
84
84
  metadata_validation_cause: "Invalid script extension metadata.",
85
85
  metadata_validation_help: "Ensure the 'shopify/scripts-toolchain-as' package is up to date.",
@@ -113,7 +113,7 @@ module Script
113
113
  graphql_error_cause: "An error was returned: %s.",
114
114
  graphql_error_help: "\nReview the error and try again.",
115
115
 
116
- script_repush_cause: "A script with the same extension point already exists on app (API key: %s).",
116
+ script_repush_cause: "A script with this UUID already exists (UUID: %s).",
117
117
  script_repush_help: "Use {{cyan:--force}} to replace the existing script.",
118
118
 
119
119
  shop_auth_cause: "Unable to authenticate with the store.",
@@ -161,7 +161,8 @@ module Script
161
161
  HELP
162
162
 
163
163
  error: {
164
- operation_failed: "Couldn't push script to app (API key: %{api_key}).",
164
+ operation_failed_with_api_key: "Couldn't push script to app (API key: %{api_key}).",
165
+ operation_failed_no_api_key: "Couldn't push script to app.",
165
166
  },
166
167
 
167
168
  script_pushed: "{{v}} Script pushed to app (API key: %{api_key}).",
@@ -192,6 +193,15 @@ module Script
192
193
  disabled: "Disabled",
193
194
  enabling: "Enabling",
194
195
  enabled: "Enabled",
196
+ ensure_env: {
197
+ organization: "Partner organization {{green:%s (%s)}}.",
198
+ organization_select: "Which partner organization do you want to use?",
199
+ app: "Script will be pushed to app {{green:%s}}.",
200
+ app_select: "Which app do you want to push this script to?",
201
+ ask_connect_to_existing_script: "The selected app has some scripts. Do you want to replace any of the "\
202
+ "existing scripts with the current script?",
203
+ ask_which_script_to_connect_to: "Which script do you want to replace?",
204
+ },
195
205
  },
196
206
  },
197
207
  }.freeze
@@ -0,0 +1,104 @@
1
+ require "shopify_cli"
2
+
3
+ module Script
4
+ module Tasks
5
+ class EnsureEnv < ShopifyCli::Task
6
+ attr_accessor :ctx
7
+
8
+ def call(ctx)
9
+ self.ctx = ctx
10
+
11
+ script_project_repo = Layers::Infrastructure::ScriptProjectRepository.new(ctx: ctx)
12
+ script_project = script_project_repo.get
13
+
14
+ return if script_project.api_key && script_project.api_secret && script_project.uuid_defined?
15
+
16
+ org = ask_org
17
+ app = ask_app(org["apps"])
18
+ uuid = ask_script_uuid(app, script_project.extension_point_type)
19
+
20
+ script_project_repo.create_env(
21
+ api_key: app["apiKey"],
22
+ secret: app["apiSecretKeys"].first["secret"],
23
+ uuid: uuid
24
+ )
25
+ end
26
+
27
+ private
28
+
29
+ def ask_org
30
+ return stubbed_org if partner_proxy_bypass
31
+
32
+ if ShopifyCli::Shopifolk.check && wants_to_run_against_shopify_org?
33
+ ShopifyCli::Shopifolk.act_as_shopify_organization
34
+ end
35
+
36
+ orgs = ShopifyCli::PartnersAPI::Organizations.fetch_with_app(ctx)
37
+ if orgs.count == 1
38
+ default = orgs.first
39
+ ctx.puts(ctx.message("script.application.ensure_env.organization", default["businessName"], default["id"]))
40
+ default
41
+ elsif orgs.count > 0
42
+ CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.organization_select")) do |handler|
43
+ orgs.each do |org|
44
+ handler.option("#{org["businessName"]} (#{org["id"]})") { org }
45
+ end
46
+ end
47
+ else
48
+ raise Errors::NoExistingOrganizationsError
49
+ end
50
+ end
51
+
52
+ def stubbed_org
53
+ {
54
+ "apps" => [
55
+ {
56
+ "appType" => "custom",
57
+ "apiKey" => "stubbed-api-key",
58
+ "apiSecretKeys" => [{ "secret" => "stubbed-api-secret" }],
59
+ "title" => "Fake App (Not connected to Partners)",
60
+ },
61
+ ],
62
+ }
63
+ end
64
+
65
+ def partner_proxy_bypass
66
+ !ENV["BYPASS_PARTNERS_PROXY"].nil?
67
+ end
68
+
69
+ def ask_app(apps)
70
+ unless ShopifyCli::Shopifolk.acting_as_shopify_organization?
71
+ apps = apps.select { |app| app["appType"] == "custom" }
72
+ end
73
+
74
+ if apps.count == 1
75
+ default = apps.first
76
+ ctx.puts(ctx.message("script.application.ensure_env.app", default["title"]))
77
+ default
78
+ elsif apps.count > 0
79
+ CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.app_select")) do |handler|
80
+ apps.each do |app|
81
+ handler.option(app["title"]) { app }
82
+ end
83
+ end
84
+ else
85
+ raise Errors::NoExistingAppsError
86
+ end
87
+ end
88
+
89
+ def ask_script_uuid(app, extension_point_type)
90
+ script_service = Layers::Infrastructure::ScriptService.new(ctx: ctx)
91
+ scripts = script_service.get_app_scripts(api_key: app["apiKey"], extension_point_type: extension_point_type)
92
+
93
+ return nil unless scripts.count > 0 &&
94
+ CLI::UI::Prompt.confirm(ctx.message("script.application.ensure_env.ask_connect_to_existing_script"))
95
+
96
+ CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.ask_which_script_to_connect_to")) do |handler|
97
+ scripts.each do |script|
98
+ handler.option("#{script["title"]} (#{script["uuid"]})") { script["uuid"] }
99
+ end
100
+ end
101
+ end
102
+ end
103
+ end
104
+ end
@@ -110,11 +110,6 @@ module Script
110
110
  e.extension_point_type
111
111
  ),
112
112
  }
113
- when Layers::Domain::Errors::ServiceFailureError
114
- {
115
- cause_of_error: ShopifyCli::Context.message("script.error.service_failure_cause"),
116
- help_suggestion: ShopifyCli::Context.message("script.error.service_failure_help"),
117
- }
118
113
  when Layers::Domain::Errors::MetadataValidationError
119
114
  {
120
115
  cause_of_error: ShopifyCli::Context.message("script.error.metadata_validation_cause"),
@@ -211,9 +206,15 @@ module Script
211
206
  ),
212
207
  help_suggestion: ShopifyCli::Context.message("script.error.graphql_error_help"),
213
208
  }
209
+ when Layers::Infrastructure::Errors::SystemCallFailureError
210
+ {
211
+ cause_of_error: ShopifyCli::Context
212
+ .message("script.error.system_call_failure_cause", cmd: e.cmd),
213
+ help_suggestion: ShopifyCli::Context.message("script.error.system_call_failure_help", out: e.out),
214
+ }
214
215
  when Layers::Infrastructure::Errors::ScriptRepushError
215
216
  {
216
- cause_of_error: ShopifyCli::Context.message("script.error.script_repush_cause", e.api_key),
217
+ cause_of_error: ShopifyCli::Context.message("script.error.script_repush_cause", e.uuid),
217
218
  help_suggestion: ShopifyCli::Context.message("script.error.script_repush_help"),
218
219
  }
219
220
  when Layers::Infrastructure::Errors::ShopAuthenticationError
@@ -85,11 +85,14 @@ module ShopifyCli
85
85
 
86
86
  private
87
87
 
88
- def authenticated_req(ctx, shop)
89
- yield
88
+ def authenticated_req(ctx, shop, &block)
89
+ CLI::Kit::Util
90
+ .begin(&block)
91
+ .retry_after(API::APIRequestUnauthorizedError, retries: 1) do
92
+ authenticate(ctx, shop)
93
+ end
90
94
  rescue API::APIRequestUnauthorizedError
91
- authenticate(ctx, shop)
92
- retry
95
+ ctx.abort(ctx.message("core.api.error.failed_auth"))
93
96
  end
94
97
 
95
98
  def authenticate(ctx, shop)
@@ -16,8 +16,8 @@ module ShopifyCli
16
16
  core: {
17
17
  connect: {
18
18
  help: <<~HELP,
19
- Connect (or re-connect) an existing project to a Shopify partner organization and/or a store. Creates or updates the {{green:.env}} file, and creates the {{green:.shopify-cli.yml}} file.
20
- Usage: {{command:%s connect}}
19
+ Connect (or re-connect) an existing project to a Shopify partner organization and/or a store. Creates or updates the {{green:.env}} file, and creates the {{green:.shopify-cli.yml}} file.
20
+ Usage: {{command:%s connect}}
21
21
  HELP
22
22
 
23
23
  already_connected_warning: "{{yellow:! This app appears to be already connected}}",
@@ -27,15 +27,15 @@ module ShopifyCli
27
27
 
28
28
  context: {
29
29
  open_url: <<~OPEN,
30
- Please open this URL in your browser:
31
- {{green:%s}}
30
+ Please open this URL in your browser:
31
+ {{green:%s}}
32
32
  OPEN
33
33
  },
34
34
 
35
35
  create: {
36
36
  help: <<~HELP,
37
- Create a new project.
38
- Usage: {{command:%s create [ %s ]}}
37
+ Create a new project.
38
+ Usage: {{command:%s create [ %s ]}}
39
39
  HELP
40
40
 
41
41
  error: {
@@ -53,13 +53,13 @@ module ShopifyCli
53
53
 
54
54
  config: {
55
55
  help: <<~HELP,
56
- Change configuration of how the CLI operates
57
- Usage: {{command:%s config [ feature | analytics ] }}
56
+ Change configuration of how the CLI operates
57
+ Usage: {{command:%s config [ feature | analytics ] }}
58
58
  HELP
59
59
  feature: {
60
60
  help: <<~HELP,
61
- Change configuration of various features
62
- Usage: {{command:%s config [ feature ] [ feature_name ] }}
61
+ Change configuration of various features
62
+ Usage: {{command:%s config [ feature ] [ feature_name ] }}
63
63
  HELP
64
64
  enabled: "{{v}} feature {{green:%s}} has been enabled",
65
65
  disabled: "{{v}} feature {{green:%s}} has been disabled",
@@ -68,8 +68,8 @@ module ShopifyCli
68
68
  },
69
69
  analytics: {
70
70
  help: <<~HELP,
71
- Opt in/out of anonymous usage reporting
72
- Usage: {{command:%s config [ analytics ] }}
71
+ Opt in/out of anonymous usage reporting
72
+ Usage: {{command:%s config [ analytics ] }}
73
73
  HELP
74
74
  enabled: "{{v}} analytics have been enabled",
75
75
  disabled: "{{v}} analytics have been disabled",
@@ -97,9 +97,9 @@ module ShopifyCli
97
97
  },
98
98
 
99
99
  preamble: <<~MESSAGE,
100
- Use {{command:%s help <command>}} to display detailed information about a specific command.
100
+ Use {{command:%s help <command>}} to display detailed information about a specific command.
101
101
 
102
- {{bold:Available core commands:}}
102
+ {{bold:Available core commands:}}
103
103
 
104
104
  MESSAGE
105
105
  },
@@ -131,8 +131,8 @@ module ShopifyCli
131
131
 
132
132
  logout: {
133
133
  help: <<~HELP,
134
- Log out of a currently authenticated partner organization and store, or clear invalid credentials
135
- Usage: {{command:%s logout}}
134
+ Log out of a currently authenticated partner organization and store, or clear invalid credentials
135
+ Usage: {{command:%s logout}}
136
136
  HELP
137
137
 
138
138
  success: "Logged out of partner organization and store",
@@ -154,6 +154,7 @@ module ShopifyCli
154
154
  location: {
155
155
  admin: "development store",
156
156
  partner: "Shopify Partners account",
157
+ shopifolk: "{{green:Shopify Employee account}}",
157
158
  },
158
159
  authentication_required:
159
160
  "{{i}} Authentication required. Login to the URL below with your %s credentials to continue.",
@@ -175,14 +176,15 @@ module ShopifyCli
175
176
  org_name_and_id: "%s (%s)",
176
177
  error: {
177
178
  account_not_found: <<~MESSAGE,
178
- {{x}} error: Your account was not found. Please sign up at https://partners.shopify.com/signup
179
- For authentication issues, run {{command:%s logout}} to clear invalid credentials
179
+ {{x}} error: Your account was not found. Please sign up at https://partners.shopify.com/signup
180
+ For authentication issues, run {{command:%s logout}} to clear invalid credentials
180
181
  MESSAGE
181
182
  },
182
183
  },
183
184
 
184
185
  api: {
185
186
  error: {
187
+ failed_auth: "Failed to authenticate with Shopify. Please try again later.",
186
188
  internal_server_error: "{{red:{{x}} An unexpected error occurred on Shopify.}}",
187
189
  internal_server_error_debug: "\n{{red:Response details:}}\n%s\n\n",
188
190
  invalid_url: "Invalid URL: %s",
@@ -196,16 +198,16 @@ module ShopifyCli
196
198
  },
197
199
  populating: "Populating %d %ss...",
198
200
  completion_message: <<~COMPLETION_MESSAGE,
199
- Successfully added %d %s to {{green:%s}}
200
- {{*}} View all %ss at {{underline:%s%ss}}
201
+ Successfully added %d %s to {{green:%s}}
202
+ {{*}} View all %ss at {{underline:%s%ss}}
201
203
  COMPLETION_MESSAGE
202
204
  },
203
205
 
204
206
  project: {
205
207
  error: {
206
208
  not_in_project: <<~MESSAGE,
207
- {{x}} You are not in a Shopify app project
208
- {{yellow:{{*}}}}{{reset: Run}}{{cyan: shopify create}}{{reset: to create your app}}
209
+ {{x}} You are not in a Shopify app project
210
+ {{yellow:{{*}}}}{{reset: Run}}{{cyan: shopify create}}{{reset: to create your app}}
209
211
  MESSAGE
210
212
  },
211
213
  },
@@ -226,10 +228,10 @@ module ShopifyCli
226
228
 
227
229
  system: {
228
230
  help: <<~HELP,
229
- Print details about the development system.
230
- Usage: {{command:%s system [all]}}
231
+ Print details about the development system.
232
+ Usage: {{command:%s system [all]}}
231
233
 
232
- {{cyan:all}}: displays more details about development system and environment
234
+ {{cyan:all}}: displays more details about development system and environment
233
235
 
234
236
  HELP
235
237
 
@@ -240,8 +242,8 @@ module ShopifyCli
240
242
  header: "{{bold:Shopify App CLI}}",
241
243
  const: "%17s = %s",
242
244
  ruby_header: <<~RUBY_MESSAGE,
243
- {{bold:Ruby (via RbConfig)}}
244
- %s
245
+ {{bold:Ruby (via RbConfig)}}
246
+ %s
245
247
  RUBY_MESSAGE
246
248
  rb_config: "%-25s - RbConfig[\"%s\"]",
247
249
  command_header: "{{bold:Commands}}",
@@ -268,8 +270,8 @@ module ShopifyCli
268
270
  ensure_env: {
269
271
  organization_select: "To which partner organization does this project belong?",
270
272
  no_development_stores: <<~MESSAGE,
271
- No development stores available.
272
- Visit {{underline:https://partners.shopify.com/%d/stores}} to create one
273
+ No development stores available.
274
+ Visit {{underline:https://partners.shopify.com/%d/stores}} to create one
273
275
  MESSAGE
274
276
  development_store_select: "Which development store would you like to use?",
275
277
  app_select: "To which app does this project belong?",
@@ -306,7 +308,10 @@ module ShopifyCli
306
308
  no_development_stores: "{{x}} No Development Stores available.",
307
309
  no_organizations: "No partner organizations available.",
308
310
  organization_not_found: "Cannot find a partner organization with that ID",
309
- partners_notice: "Please visit https://partners.shopify.com/ to create a partners account",
311
+ shopifolk_notice: <<~MESSAGE,
312
+ {{i}} As a {{green:Shopify}} employee, the authentication should take you to the Shopify Okta login,
313
+ NOT the Partner account login. Please run {{command:%s logout}} and try again.
314
+ MESSAGE
310
315
  },
311
316
  first_party: "Are you working on a 1P (1st Party) app?",
312
317
  identified_as_shopify: "We've identified you as a {{green:Shopify}} employee.",
@@ -327,9 +332,9 @@ module ShopifyCli
327
332
 
328
333
  not_running: "{{green:x}} ngrok tunnel not running",
329
334
  signup_suggestion: <<~MESSAGE,
330
- {{*}} To avoid tunnels that timeout, it is recommended to signup for a free ngrok
331
- account at {{underline:https://ngrok.com/signup}}. After you signup, install your
332
- personalized authorization token using {{command:%s tunnel auth <token>}}.
335
+ {{*}} To avoid tunnels that timeout, it is recommended to signup for a free ngrok
336
+ account at {{underline:https://ngrok.com/signup}}. After you signup, install your
337
+ personalized authorization token using {{command:%s tunnel auth <token>}}.
333
338
  MESSAGE
334
339
  start: "{{v}} ngrok tunnel running at {{underline:%s}}",
335
340
  start_with_account: "{{v}} ngrok tunnel running at {{underline:%s}}, with account %s",
@@ -341,31 +346,31 @@ module ShopifyCli
341
346
 
342
347
  version: {
343
348
  help: <<~HELP,
344
- Prints version number.
345
- Usage: {{command:%s version}}
349
+ Prints version number.
350
+ Usage: {{command:%s version}}
346
351
  HELP
347
352
  },
348
353
 
349
354
  warning: {
350
355
  development_version: <<~DEVELOPMENT,
351
- {{*}} {{yellow:You are running a development version of the CLI at:}}
352
- {{yellow:%s}}
356
+ {{*}} {{yellow:You are running a development version of the CLI at:}}
357
+ {{yellow:%s}}
353
358
 
354
359
  DEVELOPMENT
355
360
 
356
361
  shell_shim: <<~MESSAGE,
357
- {{x}} This version of Shopify App CLI is no longer supported. You’ll need to migrate to the new CLI version to continue.
362
+ {{x}} This version of Shopify App CLI is no longer supported. You’ll need to migrate to the new CLI version to continue.
358
363
 
359
- Please visit this page for complete instructions:
360
- {{underline:https://shopify.dev/tools/cli/troubleshooting#migrate-from-a-legacy-version}}
364
+ Please visit this page for complete instructions:
365
+ {{underline:https://shopify.dev/tools/cli/troubleshooting#migrate-from-a-legacy-version}}
361
366
 
362
367
  MESSAGE
363
368
 
364
369
  new_version: <<~MESSAGE,
365
- {{*}} {{yellow:A new version of Shopify App CLI is available! You have version %s and the latest version is %s.
370
+ {{*}} {{yellow:A new version of Shopify App CLI is available! You have version %s and the latest version is %s.
366
371
 
367
- To upgrade, follow the instructions for the package manager you’re using:
368
- {{underline:https://shopify.dev/tools/cli/troubleshooting#upgrade-shopify-app-cli}}}}
372
+ To upgrade, follow the instructions for the package manager you’re using:
373
+ {{underline:https://shopify.dev/tools/cli/troubleshooting#upgrade-shopify-app-cli}}}}
369
374
 
370
375
  MESSAGE
371
376
  },