shopify-cli 1.8.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +1 -0
- data/.github/workflows/build.yml +28 -0
- data/.rubocop_todo.yml +15 -2
- data/CHANGELOG.md +24 -1
- data/Gemfile.lock +4 -4
- data/README.md +2 -1
- data/dev.yml +3 -0
- data/lib/graphql/extension_create.graphql +17 -2
- data/lib/project_types/extension/cli.rb +8 -0
- data/lib/project_types/extension/commands/extension_command.rb +4 -4
- data/lib/project_types/extension/commands/push.rb +2 -2
- data/lib/project_types/extension/commands/register.rb +4 -3
- data/lib/project_types/extension/commands/serve.rb +62 -28
- data/lib/project_types/extension/commands/tunnel.rb +3 -1
- data/lib/project_types/extension/extension_project.rb +16 -4
- data/lib/project_types/extension/extension_project_keys.rb +2 -1
- data/lib/project_types/extension/features/argo.rb +19 -44
- data/lib/project_types/extension/features/argo_runtime.rb +84 -0
- data/lib/project_types/extension/features/argo_serve.rb +80 -0
- data/lib/project_types/extension/features/argo_serve_options.rb +41 -0
- data/lib/project_types/extension/features/argo_setup.rb +1 -1
- data/lib/project_types/extension/messages/message_loading.rb +3 -1
- data/lib/project_types/extension/messages/messages.rb +5 -4
- data/lib/project_types/extension/models/npm_package.rb +14 -0
- data/lib/project_types/extension/models/registration.rb +1 -0
- data/lib/project_types/extension/models/specification.rb +3 -0
- data/lib/project_types/extension/models/specification_handlers/checkout_argo_extension.rb +18 -0
- data/lib/project_types/extension/models/specification_handlers/default.rb +49 -1
- data/lib/project_types/extension/models/version.rb +1 -1
- data/lib/project_types/extension/tasks/choose_next_available_port.rb +36 -0
- data/lib/project_types/extension/tasks/configure_features.rb +4 -0
- data/lib/project_types/extension/tasks/converters/registration_converter.rb +2 -0
- data/lib/project_types/extension/tasks/find_npm_packages.rb +106 -0
- data/lib/project_types/node/commands/generate.rb +0 -22
- data/lib/project_types/node/messages/messages.rb +4 -4
- data/lib/project_types/rails/messages/messages.rb +4 -4
- data/lib/project_types/script/cli.rb +7 -8
- data/lib/project_types/script/commands/create.rb +0 -7
- data/lib/project_types/script/commands/push.rb +3 -3
- data/lib/project_types/script/config/extension_points.yml +4 -0
- data/lib/project_types/script/errors.rb +0 -19
- data/lib/project_types/script/forms/create.rb +3 -14
- data/lib/project_types/script/graphql/app_script_update_or_create.graphql +5 -5
- data/lib/project_types/script/graphql/get_app_scripts.graphql +6 -0
- data/lib/project_types/script/graphql/script_service_proxy.graphql +1 -2
- data/lib/project_types/script/layers/application/build_script.rb +1 -2
- data/lib/project_types/script/layers/application/create_script.rb +30 -51
- data/lib/project_types/script/layers/application/extension_points.rb +3 -2
- data/lib/project_types/script/layers/application/push_script.rb +5 -5
- data/lib/project_types/script/layers/domain/errors.rb +0 -2
- data/lib/project_types/script/layers/domain/extension_point.rb +56 -46
- data/lib/project_types/script/layers/domain/metadata.rb +18 -25
- data/lib/project_types/script/layers/domain/push_package.rb +4 -4
- data/lib/project_types/script/layers/domain/script_project.rb +54 -0
- data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +15 -16
- data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +13 -7
- data/lib/project_types/script/layers/infrastructure/command_runner.rb +19 -0
- data/lib/project_types/script/layers/infrastructure/errors.rb +40 -11
- data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +12 -13
- data/lib/project_types/script/layers/infrastructure/rust_project_creator.rb +9 -10
- data/lib/project_types/script/layers/infrastructure/rust_task_runner.rb +6 -7
- data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +172 -0
- data/lib/project_types/script/layers/infrastructure/script_service.rb +21 -72
- data/lib/project_types/script/messages/messages.rb +20 -50
- data/lib/project_types/script/tasks/ensure_env.rb +85 -0
- data/lib/project_types/script/ui/error_handler.rb +32 -30
- data/lib/shopify-cli/context.rb +28 -0
- data/lib/shopify-cli/js_system.rb +2 -2
- data/lib/shopify-cli/messages/messages.rb +50 -45
- data/lib/shopify-cli/method_object.rb +4 -4
- data/lib/shopify-cli/oauth.rb +9 -3
- data/lib/shopify-cli/packager.rb +1 -1
- data/lib/shopify-cli/partners_api/organizations.rb +3 -3
- data/lib/shopify-cli/resolve_constant.rb +1 -1
- data/lib/shopify-cli/resources/env_file.rb +1 -1
- data/lib/shopify-cli/shopifolk.rb +1 -1
- data/lib/shopify-cli/tasks/select_org_and_shop.rb +6 -4
- data/lib/shopify-cli/transform_data_structure.rb +1 -1
- data/lib/shopify-cli/tunnel.rb +22 -1
- data/lib/shopify-cli/version.rb +1 -1
- data/lib/shopify_cli.rb +0 -1
- data/vendor/deps/smart_properties/REVISION +1 -1
- data/vendor/deps/smart_properties/lib/smart_properties/property.rb +7 -1
- data/vendor/deps/smart_properties/lib/smart_properties/version.rb +1 -1
- metadata +16 -12
- data/.travis.yml +0 -14
- data/lib/project_types/script/commands/disable.rb +0 -25
- data/lib/project_types/script/commands/enable.rb +0 -80
- data/lib/project_types/script/graphql/shop_script_delete.graphql +0 -14
- data/lib/project_types/script/graphql/shop_script_update_or_create.graphql +0 -28
- data/lib/project_types/script/layers/application/disable_script.rb +0 -21
- data/lib/project_types/script/layers/application/enable_script.rb +0 -23
- data/lib/project_types/script/layers/infrastructure/config_ui_repository.rb +0 -46
- data/lib/project_types/script/script_project.rb +0 -64
@@ -0,0 +1,85 @@
|
|
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
|
+
if ShopifyCli::Shopifolk.check && wants_to_run_against_shopify_org?
|
31
|
+
ShopifyCli::Shopifolk.act_as_shopify_organization
|
32
|
+
end
|
33
|
+
|
34
|
+
orgs = ShopifyCli::PartnersAPI::Organizations.fetch_with_app(ctx)
|
35
|
+
if orgs.count == 1
|
36
|
+
default = orgs.first
|
37
|
+
ctx.puts(ctx.message("script.application.ensure_env.organization", default["businessName"], default["id"]))
|
38
|
+
default
|
39
|
+
elsif orgs.count > 0
|
40
|
+
CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.organization_select")) do |handler|
|
41
|
+
orgs.each do |org|
|
42
|
+
handler.option("#{org["businessName"]} (#{org["id"]})") { org }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
else
|
46
|
+
raise Errors::NoExistingOrganizationsError
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def ask_app(apps)
|
51
|
+
unless ShopifyCli::Shopifolk.acting_as_shopify_organization?
|
52
|
+
apps = apps.select { |app| app["appType"] == "custom" }
|
53
|
+
end
|
54
|
+
|
55
|
+
if apps.count == 1
|
56
|
+
default = apps.first
|
57
|
+
ctx.puts(ctx.message("script.application.ensure_env.app", default["title"]))
|
58
|
+
default
|
59
|
+
elsif apps.count > 0
|
60
|
+
CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.app_select")) do |handler|
|
61
|
+
apps.each do |app|
|
62
|
+
handler.option(app["title"]) { app }
|
63
|
+
end
|
64
|
+
end
|
65
|
+
else
|
66
|
+
raise Errors::NoExistingAppsError
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def ask_script_uuid(app, extension_point_type)
|
71
|
+
script_service = Layers::Infrastructure::ScriptService.new(ctx: ctx)
|
72
|
+
scripts = script_service.get_app_scripts(api_key: app["apiKey"], extension_point_type: extension_point_type)
|
73
|
+
|
74
|
+
return nil unless scripts.count > 0 &&
|
75
|
+
CLI::UI::Prompt.confirm(ctx.message("script.application.ensure_env.ask_connect_to_existing_script"))
|
76
|
+
|
77
|
+
CLI::UI::Prompt.ask(ctx.message("script.application.ensure_env.ask_which_script_to_connect_to")) do |handler|
|
78
|
+
scripts.each do |script|
|
79
|
+
handler.option("#{script["title"]} (#{script["uuid"]})") { script["uuid"] }
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -39,7 +39,7 @@ module Script
|
|
39
39
|
cause_of_error: ShopifyCli::Context.message("script.error.oauth_cause"),
|
40
40
|
help_suggestion: ShopifyCli::Context.message("script.error.oauth_help"),
|
41
41
|
}
|
42
|
-
when Errors::InvalidContextError
|
42
|
+
when Layers::Infrastructure::Errors::InvalidContextError
|
43
43
|
{
|
44
44
|
cause_of_error: ShopifyCli::Context.message("script.error.invalid_context_cause"),
|
45
45
|
help_suggestion: ShopifyCli::Context.message("script.error.invalid_context_help"),
|
@@ -53,7 +53,7 @@ module Script
|
|
53
53
|
{
|
54
54
|
cause_of_error: ShopifyCli::Context.message("script.error.invalid_config", e.config_file),
|
55
55
|
}
|
56
|
-
when Errors::InvalidLanguageError
|
56
|
+
when Layers::Infrastructure::Errors::InvalidLanguageError
|
57
57
|
{
|
58
58
|
cause_of_error: ShopifyCli::Context.message("script.error.invalid_language_cause", e.language),
|
59
59
|
help_suggestion: ShopifyCli::Context.message(
|
@@ -84,12 +84,12 @@ module Script
|
|
84
84
|
organization_id: e.organization_id
|
85
85
|
),
|
86
86
|
}
|
87
|
-
when Errors::ScriptProjectAlreadyExistsError
|
87
|
+
when Layers::Infrastructure::Errors::ScriptProjectAlreadyExistsError
|
88
88
|
{
|
89
89
|
cause_of_error: ShopifyCli::Context.message("script.error.project_exists_cause"),
|
90
90
|
help_suggestion: ShopifyCli::Context.message("script.error.project_exists_help"),
|
91
91
|
}
|
92
|
-
when Errors::DeprecatedEPError
|
92
|
+
when Layers::Infrastructure::Errors::DeprecatedEPError
|
93
93
|
{
|
94
94
|
cause_of_error: ShopifyCli::Context.message("script.error.deprecated_ep", e.ep),
|
95
95
|
help_suggestion: ShopifyCli::Context.message("script.error.deprecated_ep_cause"),
|
@@ -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"),
|
@@ -141,11 +136,6 @@ module Script
|
|
141
136
|
{
|
142
137
|
cause_of_error: ShopifyCli::Context.message("script.error.app_not_installed_cause"),
|
143
138
|
}
|
144
|
-
when Layers::Infrastructure::Errors::AppScriptNotPushedError,
|
145
|
-
Layers::Infrastructure::Errors::AppScriptUndefinedError
|
146
|
-
{
|
147
|
-
cause_of_error: ShopifyCli::Context.message("script.error.app_script_not_pushed_help"),
|
148
|
-
}
|
149
139
|
when Layers::Infrastructure::Errors::BuildError
|
150
140
|
{
|
151
141
|
cause_of_error: ShopifyCli::Context.message("script.error.build_error_cause"),
|
@@ -168,6 +158,15 @@ module Script
|
|
168
158
|
),
|
169
159
|
help_suggestion: ShopifyCli::Context.message("script.error.config_ui_missing_keys_error_help"),
|
170
160
|
}
|
161
|
+
when Layers::Infrastructure::Errors::ConfigUiInvalidInputModeError
|
162
|
+
{
|
163
|
+
cause_of_error: ShopifyCli::Context.message(
|
164
|
+
"script.error.config_ui_invalid_input_mode_error_cause",
|
165
|
+
filename: e.filename,
|
166
|
+
valid_input_modes: e.valid_input_modes
|
167
|
+
),
|
168
|
+
help_suggestion: ShopifyCli::Context.message("script.error.config_ui_invalid_input_mode_error_help"),
|
169
|
+
}
|
171
170
|
when Layers::Infrastructure::Errors::ConfigUiFieldsMissingKeysError
|
172
171
|
{
|
173
172
|
cause_of_error: ShopifyCli::Context.message(
|
@@ -177,6 +176,15 @@ module Script
|
|
177
176
|
),
|
178
177
|
help_suggestion: ShopifyCli::Context.message("script.error.config_ui_fields_missing_keys_error_help"),
|
179
178
|
}
|
179
|
+
when Layers::Infrastructure::Errors::ConfigUiFieldsInvalidTypeError
|
180
|
+
{
|
181
|
+
cause_of_error: ShopifyCli::Context.message(
|
182
|
+
"script.error.config_ui_fields_invalid_type_error_cause",
|
183
|
+
filename: e.filename,
|
184
|
+
valid_types: e.valid_types
|
185
|
+
),
|
186
|
+
help_suggestion: ShopifyCli::Context.message("script.error.config_ui_fields_invalid_type_error_help"),
|
187
|
+
}
|
180
188
|
when Layers::Infrastructure::Errors::DependencyInstallError
|
181
189
|
{
|
182
190
|
cause_of_error: ShopifyCli::Context.message("script.error.dependency_install_cause"),
|
@@ -193,33 +201,27 @@ module Script
|
|
193
201
|
}
|
194
202
|
when Layers::Infrastructure::Errors::GraphqlError
|
195
203
|
{
|
196
|
-
cause_of_error: ShopifyCli::Context.message(
|
204
|
+
cause_of_error: ShopifyCli::Context.message(
|
205
|
+
"script.error.graphql_error_cause", JSON.pretty_generate(e.errors)
|
206
|
+
),
|
197
207
|
help_suggestion: ShopifyCli::Context.message("script.error.graphql_error_help"),
|
198
208
|
}
|
199
|
-
when Layers::Infrastructure::Errors::
|
209
|
+
when Layers::Infrastructure::Errors::SystemCallFailureError
|
200
210
|
{
|
201
|
-
cause_of_error: ShopifyCli::Context
|
202
|
-
|
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),
|
203
214
|
}
|
204
|
-
when Layers::Infrastructure::Errors::
|
215
|
+
when Layers::Infrastructure::Errors::ScriptRepushError
|
205
216
|
{
|
206
|
-
cause_of_error: ShopifyCli::Context.message("script.error.
|
207
|
-
help_suggestion: ShopifyCli::Context.message("script.error.
|
217
|
+
cause_of_error: ShopifyCli::Context.message("script.error.script_repush_cause", e.uuid),
|
218
|
+
help_suggestion: ShopifyCli::Context.message("script.error.script_repush_help"),
|
208
219
|
}
|
209
220
|
when Layers::Infrastructure::Errors::ShopAuthenticationError
|
210
221
|
{
|
211
222
|
cause_of_error: ShopifyCli::Context.message("script.error.shop_auth_cause"),
|
212
223
|
help_suggestion: ShopifyCli::Context.message("script.error.shop_auth_help"),
|
213
224
|
}
|
214
|
-
when Layers::Infrastructure::Errors::ShopScriptConflictError
|
215
|
-
{
|
216
|
-
cause_of_error: ShopifyCli::Context.message("script.error.shop_script_conflict_cause"),
|
217
|
-
help_suggestion: ShopifyCli::Context.message("script.error.shop_script_conflict_help"),
|
218
|
-
}
|
219
|
-
when Layers::Infrastructure::Errors::ShopScriptUndefinedError
|
220
|
-
{
|
221
|
-
cause_of_error: ShopifyCli::Context.message("script.error.shop_script_undefined_cause"),
|
222
|
-
}
|
223
225
|
when Layers::Infrastructure::Errors::BuildScriptNotFoundError
|
224
226
|
{
|
225
227
|
cause_of_error: ShopifyCli::Context.message("script.error.build_script_not_found"),
|
data/lib/shopify-cli/context.rb
CHANGED
@@ -144,6 +144,34 @@ module ShopifyCli
|
|
144
144
|
File.write(ctx_path(fname), content)
|
145
145
|
end
|
146
146
|
|
147
|
+
# will read a binary file relative to the context root unless the file path is absolute.
|
148
|
+
#
|
149
|
+
# #### Parameters
|
150
|
+
# * `fname` - filename of the file that you are reading, relative to root unless it is absolute.
|
151
|
+
#
|
152
|
+
# #### Example
|
153
|
+
#
|
154
|
+
# @ctx.read('binary.out')
|
155
|
+
#
|
156
|
+
def binread(fname)
|
157
|
+
File.binread(ctx_path(fname))
|
158
|
+
end
|
159
|
+
|
160
|
+
# will write/overwrite a binary file with the provided contents, relative to the context root
|
161
|
+
# unless the file path is absolute.
|
162
|
+
#
|
163
|
+
# #### Parameters
|
164
|
+
# * `fname` - filename of the file that you are writing, relative to root unless it is absolute.
|
165
|
+
# * `content` - the body contents of the file that you are writing
|
166
|
+
#
|
167
|
+
# #### Example
|
168
|
+
#
|
169
|
+
# @ctx.binwrite('binary.out', 'ASCII-8BIT encoded binary')
|
170
|
+
#
|
171
|
+
def binwrite(fname, content)
|
172
|
+
File.binwrite(ctx_path(fname), content)
|
173
|
+
end
|
174
|
+
|
147
175
|
# will change directories and update the root, the filepath is relative to the command root unless absolute
|
148
176
|
#
|
149
177
|
# #### Parameters
|
@@ -37,8 +37,8 @@ module ShopifyCli
|
|
37
37
|
#
|
38
38
|
# ShopifyCli::JsSystem.call(ctx, yarn: ['install', '--silent'], npm: ['install', '--no-audit'])
|
39
39
|
#
|
40
|
-
def call(ctx, yarn:, npm:)
|
41
|
-
JsSystem.new(ctx: ctx).call(yarn: yarn, npm: npm)
|
40
|
+
def call(ctx, yarn:, npm:, capture_response: false)
|
41
|
+
JsSystem.new(ctx: ctx).call(yarn: yarn, npm: npm, capture_response: capture_response)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -16,8 +16,8 @@ module ShopifyCli
|
|
16
16
|
core: {
|
17
17
|
connect: {
|
18
18
|
help: <<~HELP,
|
19
|
-
|
20
|
-
|
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
|
-
|
31
|
-
|
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
|
-
|
38
|
-
|
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
|
-
|
57
|
-
|
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
|
-
|
62
|
-
|
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
|
-
|
72
|
-
|
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",
|
@@ -82,7 +82,8 @@ module ShopifyCli
|
|
82
82
|
error: {
|
83
83
|
directory_exists: "Project directory already exists. Please create a project with a new name.",
|
84
84
|
no_branches_found: "Could not find any git branches",
|
85
|
-
repo_not_initiated:
|
85
|
+
repo_not_initiated:
|
86
|
+
"Git repo is not initiated. Please run {{command:git init}} and make at least one commit.",
|
86
87
|
no_commits_made: "No git commits have been made. Please make at least one commit.",
|
87
88
|
},
|
88
89
|
|
@@ -96,9 +97,9 @@ module ShopifyCli
|
|
96
97
|
},
|
97
98
|
|
98
99
|
preamble: <<~MESSAGE,
|
99
|
-
|
100
|
+
Use {{command:%s help <command>}} to display detailed information about a specific command.
|
100
101
|
|
101
|
-
|
102
|
+
{{bold:Available core commands:}}
|
102
103
|
|
103
104
|
MESSAGE
|
104
105
|
},
|
@@ -110,7 +111,7 @@ module ShopifyCli
|
|
110
111
|
deploy: "Could not deploy to Heroku",
|
111
112
|
download: "Heroku CLI could not be downloaded",
|
112
113
|
install: "Could not install Heroku CLI",
|
113
|
-
could_not_select_app: "Heroku app
|
114
|
+
could_not_select_app: "Heroku app {{green:%s}} could not be selected",
|
114
115
|
},
|
115
116
|
},
|
116
117
|
|
@@ -130,8 +131,8 @@ module ShopifyCli
|
|
130
131
|
|
131
132
|
logout: {
|
132
133
|
help: <<~HELP,
|
133
|
-
|
134
|
-
|
134
|
+
Log out of a currently authenticated partner organization and store, or clear invalid credentials
|
135
|
+
Usage: {{command:%s logout}}
|
135
136
|
HELP
|
136
137
|
|
137
138
|
success: "Logged out of partner organization and store",
|
@@ -153,6 +154,7 @@ module ShopifyCli
|
|
153
154
|
location: {
|
154
155
|
admin: "development store",
|
155
156
|
partner: "Shopify Partners account",
|
157
|
+
shopifolk: "{{green:Shopify Employee account}}",
|
156
158
|
},
|
157
159
|
authentication_required:
|
158
160
|
"{{i}} Authentication required. Login to the URL below with your %s credentials to continue.",
|
@@ -174,8 +176,8 @@ module ShopifyCli
|
|
174
176
|
org_name_and_id: "%s (%s)",
|
175
177
|
error: {
|
176
178
|
account_not_found: <<~MESSAGE,
|
177
|
-
|
178
|
-
|
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
|
179
181
|
MESSAGE
|
180
182
|
},
|
181
183
|
},
|
@@ -195,16 +197,16 @@ module ShopifyCli
|
|
195
197
|
},
|
196
198
|
populating: "Populating %d %ss...",
|
197
199
|
completion_message: <<~COMPLETION_MESSAGE,
|
198
|
-
|
199
|
-
|
200
|
+
Successfully added %d %s to {{green:%s}}
|
201
|
+
{{*}} View all %ss at {{underline:%s%ss}}
|
200
202
|
COMPLETION_MESSAGE
|
201
203
|
},
|
202
204
|
|
203
205
|
project: {
|
204
206
|
error: {
|
205
207
|
not_in_project: <<~MESSAGE,
|
206
|
-
|
207
|
-
|
208
|
+
{{x}} You are not in a Shopify app project
|
209
|
+
{{yellow:{{*}}}}{{reset: Run}}{{cyan: shopify create}}{{reset: to create your app}}
|
208
210
|
MESSAGE
|
209
211
|
},
|
210
212
|
},
|
@@ -225,10 +227,10 @@ module ShopifyCli
|
|
225
227
|
|
226
228
|
system: {
|
227
229
|
help: <<~HELP,
|
228
|
-
|
229
|
-
|
230
|
+
Print details about the development system.
|
231
|
+
Usage: {{command:%s system [all]}}
|
230
232
|
|
231
|
-
|
233
|
+
{{cyan:all}}: displays more details about development system and environment
|
232
234
|
|
233
235
|
HELP
|
234
236
|
|
@@ -239,8 +241,8 @@ module ShopifyCli
|
|
239
241
|
header: "{{bold:Shopify App CLI}}",
|
240
242
|
const: "%17s = %s",
|
241
243
|
ruby_header: <<~RUBY_MESSAGE,
|
242
|
-
|
243
|
-
|
244
|
+
{{bold:Ruby (via RbConfig)}}
|
245
|
+
%s
|
244
246
|
RUBY_MESSAGE
|
245
247
|
rb_config: "%-25s - RbConfig[\"%s\"]",
|
246
248
|
command_header: "{{bold:Commands}}",
|
@@ -267,8 +269,8 @@ module ShopifyCli
|
|
267
269
|
ensure_env: {
|
268
270
|
organization_select: "To which partner organization does this project belong?",
|
269
271
|
no_development_stores: <<~MESSAGE,
|
270
|
-
|
271
|
-
|
272
|
+
No development stores available.
|
273
|
+
Visit {{underline:https://partners.shopify.com/%d/stores}} to create one
|
272
274
|
MESSAGE
|
273
275
|
development_store_select: "Which development store would you like to use?",
|
274
276
|
app_select: "To which app does this project belong?",
|
@@ -305,7 +307,10 @@ module ShopifyCli
|
|
305
307
|
no_development_stores: "{{x}} No Development Stores available.",
|
306
308
|
no_organizations: "No partner organizations available.",
|
307
309
|
organization_not_found: "Cannot find a partner organization with that ID",
|
308
|
-
|
310
|
+
shopifolk_notice: <<~MESSAGE,
|
311
|
+
{{i}} As a {{green:Shopify}} employee, the authentication should take you to the Shopify Okta login,
|
312
|
+
NOT the Partner account login. Please run {{command:%s logout}} and try again.
|
313
|
+
MESSAGE
|
309
314
|
},
|
310
315
|
first_party: "Are you working on a 1P (1st Party) app?",
|
311
316
|
identified_as_shopify: "We've identified you as a {{green:Shopify}} employee.",
|
@@ -326,9 +331,9 @@ module ShopifyCli
|
|
326
331
|
|
327
332
|
not_running: "{{green:x}} ngrok tunnel not running",
|
328
333
|
signup_suggestion: <<~MESSAGE,
|
329
|
-
|
330
|
-
|
331
|
-
|
334
|
+
{{*}} To avoid tunnels that timeout, it is recommended to signup for a free ngrok
|
335
|
+
account at {{underline:https://ngrok.com/signup}}. After you signup, install your
|
336
|
+
personalized authorization token using {{command:%s tunnel auth <token>}}.
|
332
337
|
MESSAGE
|
333
338
|
start: "{{v}} ngrok tunnel running at {{underline:%s}}",
|
334
339
|
start_with_account: "{{v}} ngrok tunnel running at {{underline:%s}}, with account %s",
|
@@ -340,31 +345,31 @@ module ShopifyCli
|
|
340
345
|
|
341
346
|
version: {
|
342
347
|
help: <<~HELP,
|
343
|
-
|
344
|
-
|
348
|
+
Prints version number.
|
349
|
+
Usage: {{command:%s version}}
|
345
350
|
HELP
|
346
351
|
},
|
347
352
|
|
348
353
|
warning: {
|
349
354
|
development_version: <<~DEVELOPMENT,
|
350
|
-
|
351
|
-
|
355
|
+
{{*}} {{yellow:You are running a development version of the CLI at:}}
|
356
|
+
{{yellow:%s}}
|
352
357
|
|
353
358
|
DEVELOPMENT
|
354
359
|
|
355
360
|
shell_shim: <<~MESSAGE,
|
356
|
-
|
361
|
+
{{x}} This version of Shopify App CLI is no longer supported. You’ll need to migrate to the new CLI version to continue.
|
357
362
|
|
358
|
-
|
359
|
-
|
363
|
+
Please visit this page for complete instructions:
|
364
|
+
{{underline:https://shopify.dev/tools/cli/troubleshooting#migrate-from-a-legacy-version}}
|
360
365
|
|
361
366
|
MESSAGE
|
362
367
|
|
363
368
|
new_version: <<~MESSAGE,
|
364
|
-
|
369
|
+
{{*}} {{yellow:A new version of Shopify App CLI is available! You have version %s and the latest version is %s.
|
365
370
|
|
366
|
-
|
367
|
-
|
371
|
+
To upgrade, follow the instructions for the package manager you’re using:
|
372
|
+
{{underline:https://shopify.dev/tools/cli/troubleshooting#upgrade-shopify-app-cli}}}}
|
368
373
|
|
369
374
|
MESSAGE
|
370
375
|
},
|