shopify-cli 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -0
- data/Gemfile.lock +4 -4
- data/README.md +3 -1
- data/RELEASING.md +2 -0
- data/THEMEKIT_MIGRATION.md +18 -0
- data/lib/graphql/api_versions.graphql +1 -1
- data/lib/graphql/get_variant_id.graphql +16 -0
- data/lib/project_types/extension/cli.rb +10 -1
- data/lib/project_types/extension/commands/check.rb +44 -0
- data/lib/project_types/extension/commands/serve.rb +8 -2
- data/lib/project_types/extension/extension_project.rb +39 -1
- data/lib/project_types/extension/extension_project_keys.rb +1 -0
- data/lib/project_types/extension/features/argo_runtime.rb +6 -38
- data/lib/project_types/extension/features/argo_serve.rb +30 -1
- data/lib/project_types/extension/features/runtimes/admin.rb +29 -0
- data/lib/project_types/extension/features/runtimes/base.rb +19 -0
- data/lib/project_types/extension/features/runtimes/checkout_post_purchase.rb +23 -0
- data/lib/project_types/extension/features/runtimes/checkout_ui_extension.rb +29 -0
- data/lib/project_types/extension/messages/messages.rb +19 -6
- data/lib/project_types/extension/models/product.rb +12 -0
- data/lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb +10 -2
- data/lib/project_types/extension/models/specification_handlers/default.rb +13 -4
- data/lib/project_types/extension/models/specification_handlers/theme_app_extension.rb +15 -0
- data/lib/project_types/extension/tasks/configure_features.rb +1 -0
- data/lib/project_types/extension/tasks/converters/product_converter.rb +21 -0
- data/lib/project_types/extension/tasks/get_product.rb +22 -0
- data/lib/project_types/node/messages/messages.rb +1 -1
- data/lib/project_types/rails/messages/messages.rb +18 -18
- data/lib/project_types/script/commands/create.rb +1 -1
- data/lib/project_types/script/graphql/app_script_update_or_create.graphql +3 -3
- data/lib/project_types/script/layers/infrastructure/script_service.rb +17 -2
- data/lib/project_types/theme/cli.rb +1 -0
- data/lib/project_types/theme/commands/init.rb +42 -0
- data/lib/project_types/theme/commands/serve.rb +3 -1
- data/lib/project_types/theme/forms/select.rb +1 -1
- data/lib/project_types/theme/messages/messages.rb +14 -3
- data/lib/shopify-cli/admin_api.rb +6 -2
- data/lib/shopify-cli/api.rb +2 -2
- data/lib/shopify-cli/context.rb +1 -1
- data/lib/shopify-cli/core/monorail.rb +8 -3
- data/lib/shopify-cli/http_request.rb +6 -0
- data/lib/shopify-cli/messages/messages.rb +9 -8
- data/lib/shopify-cli/packager.rb +5 -5
- data/lib/shopify-cli/theme/dev_server.rb +5 -5
- data/lib/shopify-cli/theme/dev_server/local_assets.rb +1 -1
- data/lib/shopify-cli/theme/file.rb +2 -2
- data/lib/shopify-cli/theme/syncer.rb +9 -5
- data/lib/shopify-cli/theme/theme.rb +5 -5
- data/lib/shopify-cli/tunnel.rb +1 -1
- data/lib/shopify-cli/version.rb +1 -1
- data/shopify-cli.gemspec +1 -1
- metadata +15 -4
@@ -149,7 +149,7 @@ module ShopifyCli
|
|
149
149
|
# Process lower-priority files in the background
|
150
150
|
|
151
151
|
# Assets are served locally, so can be uploaded in the background
|
152
|
-
enqueue_updates(@theme.
|
152
|
+
enqueue_updates(@theme.static_asset_files)
|
153
153
|
|
154
154
|
unless delay_low_priority_files
|
155
155
|
wait!(&block)
|
@@ -254,8 +254,12 @@ module ShopifyCli
|
|
254
254
|
|
255
255
|
update_checksums(body)
|
256
256
|
|
257
|
-
|
258
|
-
|
257
|
+
attachment = body.dig("asset", "attachment")
|
258
|
+
value = if attachment
|
259
|
+
file.write(Base64.decode64(attachment), 0, mode: "wb")
|
260
|
+
else
|
261
|
+
file.write(body.dig("asset", "value"))
|
262
|
+
end
|
259
263
|
|
260
264
|
response
|
261
265
|
end
|
@@ -277,7 +281,7 @@ module ShopifyCli
|
|
277
281
|
|
278
282
|
def update_checksums(api_response)
|
279
283
|
api_response.values.flatten.each do |asset|
|
280
|
-
if asset["key"]
|
284
|
+
if asset["key"]
|
281
285
|
@checksums[asset["key"]] = asset["checksum"]
|
282
286
|
end
|
283
287
|
end
|
@@ -310,7 +314,7 @@ module ShopifyCli
|
|
310
314
|
|
311
315
|
def backoff_if_near_limit!(used, limit)
|
312
316
|
if used > limit - @threads.size
|
313
|
-
@ctx.debug("Near API call limit, waiting 2 sec
|
317
|
+
@ctx.debug("Near API call limit, waiting 2 sec…")
|
314
318
|
@backoff_mutex.synchronize { sleep 2 }
|
315
319
|
end
|
316
320
|
end
|
@@ -20,11 +20,11 @@ module ShopifyCli
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def theme_files
|
23
|
-
glob(["**/*.liquid", "**/*.json", "assets/*"])
|
23
|
+
glob(["**/*.liquid", "**/*.json", "assets/*"]).uniq
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
27
|
-
glob("assets/*")
|
26
|
+
def static_asset_files
|
27
|
+
glob("assets/*").reject(&:liquid?)
|
28
28
|
end
|
29
29
|
|
30
30
|
def liquid_files
|
@@ -43,8 +43,8 @@ module ShopifyCli
|
|
43
43
|
theme_files.include?(self[file])
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
47
|
-
|
46
|
+
def static_asset_paths
|
47
|
+
static_asset_files.map(&:relative_path)
|
48
48
|
end
|
49
49
|
|
50
50
|
def [](file)
|
data/lib/shopify-cli/tunnel.rb
CHANGED
@@ -149,7 +149,7 @@ module ShopifyCli
|
|
149
149
|
check_prereq_command(ctx, "curl")
|
150
150
|
check_prereq_command(ctx, ctx.linux? ? "unzip" : "tar")
|
151
151
|
spinner = CLI::UI::SpinGroup.new
|
152
|
-
spinner.add("
|
152
|
+
spinner.add(ctx.message("core.tunnel.installing")) do
|
153
153
|
zip_dest = File.join(ShopifyCli.cache_dir, "ngrok.zip")
|
154
154
|
unless File.exist?(zip_dest)
|
155
155
|
ctx.system("curl", "-o", zip_dest, DOWNLOAD_URLS[ctx.os], chdir: ShopifyCli.cache_dir)
|
data/lib/shopify-cli/version.rb
CHANGED
data/shopify-cli.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '1.
|
81
|
+
version: '1.1'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '1.
|
88
|
+
version: '1.1'
|
89
89
|
description: |
|
90
90
|
Shopify CLI helps you build Shopify apps faster. It quickly scaffolds Node.js
|
91
91
|
and Ruby on Rails embedded apps. It also automates many common tasks in the
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- RELEASING.md
|
122
122
|
- Rakefile
|
123
123
|
- SECURITY.md
|
124
|
+
- THEMEKIT_MIGRATION.md
|
124
125
|
- bin/load_shopify.rb
|
125
126
|
- bin/shopify
|
126
127
|
- dev.yml
|
@@ -158,9 +159,11 @@ files:
|
|
158
159
|
- lib/graphql/find_organization.graphql
|
159
160
|
- lib/graphql/get_app_by_api_key.graphql
|
160
161
|
- lib/graphql/get_app_urls.graphql
|
162
|
+
- lib/graphql/get_variant_id.graphql
|
161
163
|
- lib/graphql/update_dashboard_urls.graphql
|
162
164
|
- lib/project_types/extension/cli.rb
|
163
165
|
- lib/project_types/extension/commands/build.rb
|
166
|
+
- lib/project_types/extension/commands/check.rb
|
164
167
|
- lib/project_types/extension/commands/connect.rb
|
165
168
|
- lib/project_types/extension/commands/create.rb
|
166
169
|
- lib/project_types/extension/commands/extension_command.rb
|
@@ -180,6 +183,10 @@ files:
|
|
180
183
|
- lib/project_types/extension/features/argo_setup.rb
|
181
184
|
- lib/project_types/extension/features/argo_setup_step.rb
|
182
185
|
- lib/project_types/extension/features/argo_setup_steps.rb
|
186
|
+
- lib/project_types/extension/features/runtimes/admin.rb
|
187
|
+
- lib/project_types/extension/features/runtimes/base.rb
|
188
|
+
- lib/project_types/extension/features/runtimes/checkout_post_purchase.rb
|
189
|
+
- lib/project_types/extension/features/runtimes/checkout_ui_extension.rb
|
183
190
|
- lib/project_types/extension/forms/connect.rb
|
184
191
|
- lib/project_types/extension/forms/create.rb
|
185
192
|
- lib/project_types/extension/forms/questions/ask_app.rb
|
@@ -191,6 +198,7 @@ files:
|
|
191
198
|
- lib/project_types/extension/models/app.rb
|
192
199
|
- lib/project_types/extension/models/lazy_specification_handler.rb
|
193
200
|
- lib/project_types/extension/models/npm_package.rb
|
201
|
+
- lib/project_types/extension/models/product.rb
|
194
202
|
- lib/project_types/extension/models/registration.rb
|
195
203
|
- lib/project_types/extension/models/specification.rb
|
196
204
|
- lib/project_types/extension/models/specification_handlers/checkout_post_purchase.rb
|
@@ -204,6 +212,7 @@ files:
|
|
204
212
|
- lib/project_types/extension/tasks/configure_features.rb
|
205
213
|
- lib/project_types/extension/tasks/configure_options.rb
|
206
214
|
- lib/project_types/extension/tasks/converters/app_converter.rb
|
215
|
+
- lib/project_types/extension/tasks/converters/product_converter.rb
|
207
216
|
- lib/project_types/extension/tasks/converters/registration_converter.rb
|
208
217
|
- lib/project_types/extension/tasks/converters/validation_error_converter.rb
|
209
218
|
- lib/project_types/extension/tasks/converters/version_converter.rb
|
@@ -213,6 +222,7 @@ files:
|
|
213
222
|
- lib/project_types/extension/tasks/get_app.rb
|
214
223
|
- lib/project_types/extension/tasks/get_apps.rb
|
215
224
|
- lib/project_types/extension/tasks/get_extensions.rb
|
225
|
+
- lib/project_types/extension/tasks/get_product.rb
|
216
226
|
- lib/project_types/extension/tasks/update_draft.rb
|
217
227
|
- lib/project_types/extension/tasks/user_errors.rb
|
218
228
|
- lib/project_types/node/cli.rb
|
@@ -280,6 +290,7 @@ files:
|
|
280
290
|
- lib/project_types/theme/cli.rb
|
281
291
|
- lib/project_types/theme/commands/check.rb
|
282
292
|
- lib/project_types/theme/commands/delete.rb
|
293
|
+
- lib/project_types/theme/commands/init.rb
|
283
294
|
- lib/project_types/theme/commands/language_server.rb
|
284
295
|
- lib/project_types/theme/commands/package.rb
|
285
296
|
- lib/project_types/theme/commands/publish.rb
|