shopify-cli 2.20.0 → 2.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/cla.yml +22 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/lib/project_types/theme/messages/messages.rb +1 -1
- data/lib/shopify_cli/theme/syncer/json_update_handler.rb +6 -2
- data/lib/shopify_cli/theme/syncer.rb +9 -3
- data/lib/shopify_cli/theme/theme_admin_api_throttler/bulk_job.rb +1 -1
- data/lib/shopify_cli/version.rb +1 -1
- metadata +3 -3
- data/.github/probots.yml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bab2227e665dd4dec8e90ca261705072971a838f85d19bcbb85d18ed1a1d5b0
|
4
|
+
data.tar.gz: 90e22472586a681a26974882b79ac3fd326fdcf696db2aa29201ab5d9a37c2b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24701865a98be1b3062ff7644fff3d35b61532803e96c39d84c7fae636b8205531e57e41641d1222dbd09275288e4dee2f2f94c837d58846212a0f4ed1643b28
|
7
|
+
data.tar.gz: 6e5c53ef75f07879d338692ce9271749002c13f8174a19fe3857b3396ec1512a2368770ec50bd24de2a0c9dc325dddb5b3547564c79cc360a40d1b19b35d2c50
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: Contributor License Agreement (CLA)
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request_target:
|
5
|
+
types: [opened, synchronize]
|
6
|
+
issue_comment:
|
7
|
+
types: [created]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
cla:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
if: |
|
13
|
+
(github.event.issue.pull_request
|
14
|
+
&& !github.event.issue.pull_request.merged_at
|
15
|
+
&& contains(github.event.comment.body, 'signed')
|
16
|
+
)
|
17
|
+
|| (github.event.pull_request && !github.event.pull_request.merged)
|
18
|
+
steps:
|
19
|
+
- uses: Shopify/shopify-cla-action@v1
|
20
|
+
with:
|
21
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
22
|
+
cla-token: ${{ secrets.CLA_TOKEN }}
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
2
2
|
|
3
3
|
## [Unreleased]
|
4
4
|
|
5
|
+
## Version 2.20.1 - 2022-07-18
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
* [#2458](https://github.com/Shopify/shopify-cli/pull/2458): Fix shop URL in unauthorized error message
|
9
|
+
* [#2459](https://github.com/Shopify/shopify-cli/pull/2459): Fix `.json` file ignore issues with `shopify theme push`
|
10
|
+
* [#2460](https://github.com/Shopify/shopify-cli/pull/2460): Fix job retries for .json theme file dependencies and support wider range of asset API errors
|
11
|
+
|
5
12
|
## Version 2.20.0 - 2022-07-11
|
6
13
|
|
7
14
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ module Theme
|
|
11
11
|
unauthorized_error: <<~EOD,
|
12
12
|
You can't use Shopify CLI with development stores if you only have Partner staff member access. If you want to use Shopify CLI to work on a development store, then you should be the store owner or create a staff account on the store.
|
13
13
|
|
14
|
-
If you're the store owner, then you need to log in to the store directly using the store URL at least once (for example, using %s
|
14
|
+
If you're the store owner, then you need to log in to the store directly using the store URL at least once (for example, using %s/admin) before you log in using Shopify CLI. Logging in to the Shopify admin directly connects the development store with your Shopify login.
|
15
15
|
EOD
|
16
16
|
ensure_user_try_this: <<~ENSURE_USER,
|
17
17
|
Check if your user is activated, has permission to edit themes at the store, and try to re-login.
|
@@ -10,7 +10,7 @@ module ShopifyCLI
|
|
10
10
|
def enqueue_json_updates(files)
|
11
11
|
# Update remote JSON files and delays `delayed_files` update
|
12
12
|
files = files
|
13
|
-
.select { |file|
|
13
|
+
.select { |file| ready_to_update?(file) }
|
14
14
|
.sort_by { |file| delayed_files.include?(file) ? 1 : 0 }
|
15
15
|
.reject { |file| overwrite_json? && delayed_files.include?(file) }
|
16
16
|
|
@@ -26,7 +26,7 @@ module ShopifyCLI
|
|
26
26
|
return unless overwrite_json?
|
27
27
|
# Update delayed files synchronously
|
28
28
|
delayed_files.each do |file|
|
29
|
-
update(file) if
|
29
|
+
update(file) if ready_to_update?(file)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -86,6 +86,10 @@ module ShopifyCLI
|
|
86
86
|
def ask_update_strategy(file)
|
87
87
|
Forms::SelectUpdateStrategy.ask(@ctx, [], file: file, exists_remotely: file_exist_remotely?(file)).strategy
|
88
88
|
end
|
89
|
+
|
90
|
+
def ready_to_update?(file)
|
91
|
+
!ignore_file?(file) && file.exist? && checksums.file_has_changed?(file)
|
92
|
+
end
|
89
93
|
end
|
90
94
|
end
|
91
95
|
end
|
@@ -366,17 +366,23 @@ module ShopifyCLI
|
|
366
366
|
checksums.reject_duplicated_checksums!
|
367
367
|
end
|
368
368
|
|
369
|
-
def parse_api_errors(exception)
|
369
|
+
def parse_api_errors(operation, exception)
|
370
370
|
parsed_body = if exception&.response&.is_a?(Hash)
|
371
371
|
exception&.response&.[](:body)
|
372
372
|
else
|
373
373
|
JSON.parse(exception&.response&.body)
|
374
374
|
end
|
375
|
-
|
375
|
+
|
376
|
+
errors = parsed_body.dig("errors") # either nil or another type
|
377
|
+
errors = errors.dig("asset") if errors&.is_a?(Hash)
|
378
|
+
|
379
|
+
message = errors || parsed_body["message"] || exception.message
|
376
380
|
# Truncate to first lines
|
377
381
|
[message].flatten.map { |m| m.split("\n", 2).first }
|
378
382
|
rescue JSON::ParserError
|
379
383
|
[exception.message]
|
384
|
+
rescue StandardError => e
|
385
|
+
["The asset #{operation.file} is could not be synced (cause: #{e.message})."]
|
380
386
|
end
|
381
387
|
|
382
388
|
def backoff_if_near_limit!(used, limit)
|
@@ -400,7 +406,7 @@ module ShopifyCLI
|
|
400
406
|
end
|
401
407
|
|
402
408
|
def handle_operation_error(operation, error)
|
403
|
-
error_suffix = ":\n " + parse_api_errors(error).join("\n ")
|
409
|
+
error_suffix = ":\n " + parse_api_errors(operation, error).join("\n ")
|
404
410
|
report_error(operation, error_suffix)
|
405
411
|
end
|
406
412
|
|
data/lib/shopify_cli/version.rb
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.20.
|
4
|
+
version: 2.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -124,7 +124,7 @@ files:
|
|
124
124
|
- ".github/ISSUE_TEMPLATE/enhancement.yaml"
|
125
125
|
- ".github/ISSUE_TEMPLATE/feature.yaml"
|
126
126
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
127
|
-
- ".github/
|
127
|
+
- ".github/workflows/cla.yml"
|
128
128
|
- ".github/workflows/shopify.yml"
|
129
129
|
- ".github/workflows/stale.yml"
|
130
130
|
- ".github/workflows/triage.yml"
|
data/.github/probots.yml
DELETED