shopify-cli 2.12.0 → 2.15.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/.github/CODEOWNERS +5 -0
- data/.github/CONTRIBUTING.md +1 -1
- data/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- data/.github/workflows/shopify.yml +2 -1
- data/.github/workflows/stale.yml +41 -0
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +36 -0
- data/Gemfile.lock +18 -18
- data/Rakefile +16 -0
- data/bin/shopify +4 -4
- data/dev.yml +1 -1
- data/ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256 +1 -0
- data/ext/javy/version +1 -1
- data/lib/project_types/extension/features/argo_setup_steps.rb +4 -6
- data/lib/project_types/extension/models/npm_package.rb +19 -1
- data/lib/project_types/extension/models/server_config/development_renderer.rb +4 -3
- data/lib/project_types/extension/models/specification_handlers/checkout_ui_extension.rb +13 -0
- data/lib/project_types/extension/tasks/configure_features.rb +15 -2
- data/lib/project_types/extension/tasks/convert_server_config.rb +2 -1
- data/lib/project_types/script/cli.rb +0 -4
- data/lib/project_types/script/commands/create.rb +4 -4
- data/lib/project_types/script/config/extension_points.yml +0 -6
- data/lib/project_types/script/errors.rb +1 -1
- data/lib/project_types/script/forms/create.rb +7 -7
- data/lib/project_types/script/layers/application/build_script.rb +9 -26
- data/lib/project_types/script/layers/application/create_script.rb +9 -10
- data/lib/project_types/script/layers/application/project_dependencies.rb +12 -14
- data/lib/project_types/script/layers/application/push_script.rb +14 -10
- data/lib/project_types/script/layers/domain/errors.rb +3 -3
- data/lib/project_types/script/layers/domain/push_package.rb +6 -0
- data/lib/project_types/script/layers/domain/script_config.rb +2 -4
- data/lib/project_types/script/layers/domain/script_project.rb +3 -2
- data/lib/project_types/script/layers/infrastructure/languages/project_creator.rb +0 -16
- data/lib/project_types/script/layers/infrastructure/languages/task_runner.rb +0 -1
- data/lib/project_types/script/layers/infrastructure/languages/typescript_project_creator.rb +19 -4
- data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +2 -10
- data/lib/project_types/script/layers/infrastructure/languages/wasm_project_creator.rb +0 -3
- data/lib/project_types/script/layers/infrastructure/languages/wasm_task_runner.rb +1 -1
- data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +3 -21
- data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +14 -26
- data/lib/project_types/script/layers/infrastructure/script_service.rb +4 -2
- data/lib/project_types/script/messages/messages.rb +9 -9
- data/lib/project_types/script/ui/error_handler.rb +4 -4
- data/lib/project_types/script/ui/strict_spinner.rb +4 -6
- data/lib/project_types/theme/cli.rb +2 -0
- data/lib/project_types/theme/commands/common/root_helper.rb +11 -5
- data/lib/project_types/theme/commands/list.rb +34 -0
- data/lib/project_types/theme/commands/open.rb +65 -0
- data/lib/project_types/theme/commands/package.rb +1 -0
- data/lib/project_types/theme/commands/pull.rb +4 -4
- data/lib/project_types/theme/commands/push.rb +4 -4
- data/lib/project_types/theme/conversions/base_glob.rb +20 -5
- data/lib/project_types/theme/forms/select.rb +11 -39
- data/lib/project_types/theme/messages/messages.rb +33 -2
- data/lib/project_types/theme/presenters/theme_presenter.rb +48 -0
- data/lib/project_types/theme/presenters/themes_presenter.rb +32 -0
- data/lib/shopify_cli/api.rb +1 -1
- data/lib/shopify_cli/command.rb +1 -7
- data/lib/shopify_cli/commands/app/deploy.rb +0 -1
- data/lib/shopify_cli/constants.rb +2 -2
- data/lib/shopify_cli/context.rb +13 -15
- data/lib/shopify_cli/core/entry_point.rb +1 -1
- data/lib/shopify_cli/core/monorail.rb +14 -6
- data/lib/shopify_cli/environment.rb +19 -11
- data/lib/shopify_cli/exception_reporter.rb +2 -0
- data/lib/shopify_cli/messages/messages.rb +5 -5
- data/lib/shopify_cli/packager.rb +1 -1
- data/lib/shopify_cli/result.rb +14 -0
- data/lib/shopify_cli/services/app/create/node_service.rb +2 -14
- data/lib/shopify_cli/services/app/create/php_service.rb +1 -6
- data/lib/shopify_cli/services/app/create/rails_service.rb +5 -13
- data/lib/shopify_cli/theme/dev_server/hot_reload/remote_file_reloader.rb +5 -5
- data/lib/shopify_cli/theme/dev_server/watcher.rb +10 -2
- data/lib/shopify_cli/theme/development_theme.rb +2 -5
- data/lib/shopify_cli/theme/syncer.rb +27 -32
- data/lib/shopify_cli/theme/theme.rb +16 -27
- data/lib/shopify_cli/theme/theme_admin_api.rb +72 -0
- data/lib/shopify_cli/transform_data_structure.rb +3 -2
- data/lib/shopify_cli/version.rb +1 -1
- data/shipit.yml +3 -0
- data/shopify-cli.gemspec +9 -2
- data/shopify-dev +9 -11
- metadata +21 -9
- data/lib/project_types/rails/ruby.rb +0 -17
- data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb +0 -21
- data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +0 -109
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.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-03-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 2.
|
|
19
|
+
version: 2.3.8
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 2.
|
|
26
|
+
version: 2.3.8
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -92,14 +92,14 @@ dependencies:
|
|
|
92
92
|
requirements:
|
|
93
93
|
- - "~>"
|
|
94
94
|
- !ruby/object:Gem::Version
|
|
95
|
-
version: 1.
|
|
95
|
+
version: 1.10.1
|
|
96
96
|
type: :runtime
|
|
97
97
|
prerelease: false
|
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
|
99
99
|
requirements:
|
|
100
100
|
- - "~>"
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 1.
|
|
102
|
+
version: 1.10.1
|
|
103
103
|
description: |
|
|
104
104
|
Shopify CLI helps you build Shopify apps faster. It quickly scaffolds Node.js
|
|
105
105
|
and Ruby on Rails embedded apps. It also automates many common tasks in the
|
|
@@ -124,6 +124,7 @@ files:
|
|
|
124
124
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
125
125
|
- ".github/probots.yml"
|
|
126
126
|
- ".github/workflows/shopify.yml"
|
|
127
|
+
- ".github/workflows/stale.yml"
|
|
127
128
|
- ".github/workflows/triage.yml"
|
|
128
129
|
- ".gitignore"
|
|
129
130
|
- ".rubocop.yml"
|
|
@@ -154,9 +155,17 @@ files:
|
|
|
154
155
|
- docs/users/installation.md
|
|
155
156
|
- docs/users/migrate-from-themekit.md
|
|
156
157
|
- ext/javy/hashes/javy-arm-macos-v0.1.0.gz.sha256
|
|
158
|
+
- ext/javy/hashes/javy-arm-macos-v0.2.0.gz.sha256
|
|
159
|
+
- ext/javy/hashes/javy-arm-macos-v0.2.1.gz.sha256
|
|
157
160
|
- ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256
|
|
161
|
+
- ext/javy/hashes/javy-x86_64-linux-v0.2.0.gz.sha256
|
|
162
|
+
- ext/javy/hashes/javy-x86_64-linux-v0.2.1.gz.sha256
|
|
158
163
|
- ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256
|
|
164
|
+
- ext/javy/hashes/javy-x86_64-macos-v0.2.0.gz.sha256
|
|
165
|
+
- ext/javy/hashes/javy-x86_64-macos-v0.2.1.gz.sha256
|
|
159
166
|
- ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256
|
|
167
|
+
- ext/javy/hashes/javy-x86_64-windows-v0.2.0.gz.sha256
|
|
168
|
+
- ext/javy/hashes/javy-x86_64-windows-v0.2.1.gz.sha256
|
|
160
169
|
- ext/javy/javy.rb
|
|
161
170
|
- ext/javy/version
|
|
162
171
|
- ext/shopify-extensions/extconf.rb
|
|
@@ -279,7 +288,6 @@ files:
|
|
|
279
288
|
- lib/project_types/rails/forms/create.rb
|
|
280
289
|
- lib/project_types/rails/gem.rb
|
|
281
290
|
- lib/project_types/rails/messages/messages.rb
|
|
282
|
-
- lib/project_types/rails/ruby.rb
|
|
283
291
|
- lib/project_types/script/cli.rb
|
|
284
292
|
- lib/project_types/script/commands/connect.rb
|
|
285
293
|
- lib/project_types/script/commands/create.rb
|
|
@@ -313,8 +321,6 @@ files:
|
|
|
313
321
|
- lib/project_types/script/layers/infrastructure/command_runner.rb
|
|
314
322
|
- lib/project_types/script/layers/infrastructure/errors.rb
|
|
315
323
|
- lib/project_types/script/layers/infrastructure/extension_point_repository.rb
|
|
316
|
-
- lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb
|
|
317
|
-
- lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb
|
|
318
324
|
- lib/project_types/script/layers/infrastructure/languages/project_creator.rb
|
|
319
325
|
- lib/project_types/script/layers/infrastructure/languages/task_runner.rb
|
|
320
326
|
- lib/project_types/script/layers/infrastructure/languages/tool_version_checker.rb
|
|
@@ -340,6 +346,8 @@ files:
|
|
|
340
346
|
- lib/project_types/theme/commands/delete.rb
|
|
341
347
|
- lib/project_types/theme/commands/init.rb
|
|
342
348
|
- lib/project_types/theme/commands/language_server.rb
|
|
349
|
+
- lib/project_types/theme/commands/list.rb
|
|
350
|
+
- lib/project_types/theme/commands/open.rb
|
|
343
351
|
- lib/project_types/theme/commands/package.rb
|
|
344
352
|
- lib/project_types/theme/commands/publish.rb
|
|
345
353
|
- lib/project_types/theme/commands/pull.rb
|
|
@@ -351,6 +359,8 @@ files:
|
|
|
351
359
|
- lib/project_types/theme/forms/confirm_store.rb
|
|
352
360
|
- lib/project_types/theme/forms/select.rb
|
|
353
361
|
- lib/project_types/theme/messages/messages.rb
|
|
362
|
+
- lib/project_types/theme/presenters/theme_presenter.rb
|
|
363
|
+
- lib/project_types/theme/presenters/themes_presenter.rb
|
|
354
364
|
- lib/project_types/theme/ui/sync_progress_bar.rb
|
|
355
365
|
- lib/rubygems_plugin.rb
|
|
356
366
|
- lib/shopify_cli.rb
|
|
@@ -494,12 +504,14 @@ files:
|
|
|
494
504
|
- lib/shopify_cli/theme/syncer/operation.rb
|
|
495
505
|
- lib/shopify_cli/theme/syncer/standard_reporter.rb
|
|
496
506
|
- lib/shopify_cli/theme/theme.rb
|
|
507
|
+
- lib/shopify_cli/theme/theme_admin_api.rb
|
|
497
508
|
- lib/shopify_cli/thread_pool.rb
|
|
498
509
|
- lib/shopify_cli/thread_pool/job.rb
|
|
499
510
|
- lib/shopify_cli/transform_data_structure.rb
|
|
500
511
|
- lib/shopify_cli/tunnel.rb
|
|
501
512
|
- lib/shopify_cli/utilities.rb
|
|
502
513
|
- lib/shopify_cli/version.rb
|
|
514
|
+
- shipit.yml
|
|
503
515
|
- shopify-cli.gemspec
|
|
504
516
|
- shopify-dev
|
|
505
517
|
- utilities/constants.rb
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
module Rails
|
|
2
|
-
class Ruby
|
|
3
|
-
include SmartProperties
|
|
4
|
-
|
|
5
|
-
VERSION_STRING = /ruby ([\d\.]+)/
|
|
6
|
-
|
|
7
|
-
property :ctx, accepts: ShopifyCLI::Context, required: true
|
|
8
|
-
|
|
9
|
-
class << self
|
|
10
|
-
def version(ctx)
|
|
11
|
-
require "semantic/semantic"
|
|
12
|
-
out, _ = ctx.capture2("ruby", "-v")
|
|
13
|
-
Semantic::Version.new(VERSION_STRING.match(out)[1])
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_project_creator.rb
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Script
|
|
4
|
-
module Layers
|
|
5
|
-
module Infrastructure
|
|
6
|
-
module Languages
|
|
7
|
-
class AssemblyScriptProjectCreator < ProjectCreator
|
|
8
|
-
def self.config_file
|
|
9
|
-
"package.json"
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def setup_dependencies
|
|
13
|
-
task_runner = Infrastructure::Languages::AssemblyScriptTaskRunner.new(ctx)
|
|
14
|
-
task_runner.set_npm_config
|
|
15
|
-
super
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
21
|
-
end
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Script
|
|
4
|
-
module Layers
|
|
5
|
-
module Infrastructure
|
|
6
|
-
module Languages
|
|
7
|
-
class AssemblyScriptTaskRunner < TaskRunner
|
|
8
|
-
NODE_MIN_VERSION = "14.15.0"
|
|
9
|
-
NPM_MIN_VERSION = "5.2.0"
|
|
10
|
-
|
|
11
|
-
BYTECODE_FILE = "build/script.wasm"
|
|
12
|
-
METADATA_FILE = "build/metadata.json"
|
|
13
|
-
SCRIPT_SDK_BUILD = "npm run build"
|
|
14
|
-
NPM_SET_REGISTRY_COMMAND = "npm --userconfig ./.npmrc config set @shopify:registry https://registry.npmjs.com"
|
|
15
|
-
NPM_SET_ENGINE_STRICT_COMMAND = "npm --userconfig ./.npmrc config set engine-strict true"
|
|
16
|
-
NPM_INSTALL_COMMAND = "npm install --no-audit --no-optional --legacy-peer-deps --loglevel error"
|
|
17
|
-
|
|
18
|
-
def build
|
|
19
|
-
compile
|
|
20
|
-
bytecode
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def install_dependencies
|
|
24
|
-
run_cmd_with_env_check(NPM_INSTALL_COMMAND)
|
|
25
|
-
|
|
26
|
-
rescue Errors::SystemCallFailureError => e
|
|
27
|
-
raise Errors::DependencyInstallError, e.out
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def dependencies_installed?
|
|
31
|
-
# Assuming if node_modules folder exist at root of script folder, all deps are installed
|
|
32
|
-
ctx.dir_exist?("node_modules")
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def metadata_file_location
|
|
36
|
-
METADATA_FILE
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
def library_version(library_name)
|
|
40
|
-
output = JSON.parse(run_cmd_with_env_check("npm -s list --json"))
|
|
41
|
-
library_version_from_npm_list(output, library_name)
|
|
42
|
-
rescue Errors::SystemCallFailureError => error
|
|
43
|
-
library_version_from_npm_list_error_output(error, library_name)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def set_npm_config
|
|
47
|
-
run_cmd_with_env_check(NPM_SET_REGISTRY_COMMAND)
|
|
48
|
-
run_cmd_with_env_check(NPM_SET_ENGINE_STRICT_COMMAND)
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
private
|
|
52
|
-
|
|
53
|
-
def ensure_environment
|
|
54
|
-
return if defined?(@environment_checked)
|
|
55
|
-
@environment_checked = true
|
|
56
|
-
|
|
57
|
-
ToolVersionChecker.check_node(minimum_version: NODE_MIN_VERSION)
|
|
58
|
-
ToolVersionChecker.check_npm(minimum_version: NPM_MIN_VERSION)
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def run_cmd_with_env_check(cmd)
|
|
62
|
-
ensure_environment
|
|
63
|
-
CommandRunner.new(ctx: ctx).call(cmd)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def library_version_from_npm_list_error_output(error, library_name)
|
|
67
|
-
# npm list can return a failure status code, even when returning the correct data.
|
|
68
|
-
# This causes the CommandRunner to throw a SystemCallFailure error that contains the data.
|
|
69
|
-
# In here, we check that the output contains `npm list`'s structure and extract the version.
|
|
70
|
-
output = JSON.parse(error.out)
|
|
71
|
-
raise error unless output.key?("dependencies")
|
|
72
|
-
|
|
73
|
-
library_version_from_npm_list(output, library_name)
|
|
74
|
-
rescue JSON::ParserError
|
|
75
|
-
raise error
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
def library_version_from_npm_list(output, library_name)
|
|
79
|
-
output.dig("dependencies", library_name, "version").tap do |version|
|
|
80
|
-
raise Errors::APILibraryNotFoundError, library_name unless version
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def compile
|
|
85
|
-
check_compilation_dependencies!
|
|
86
|
-
run_cmd_with_env_check(SCRIPT_SDK_BUILD)
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def check_compilation_dependencies!
|
|
90
|
-
pkg = JSON.parse(File.read("package.json"))
|
|
91
|
-
build_script = pkg.dig("scripts", "build")
|
|
92
|
-
|
|
93
|
-
raise Errors::BuildScriptNotFoundError,
|
|
94
|
-
"Build script not found" if build_script.nil?
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def bytecode
|
|
98
|
-
raise Errors::WebAssemblyBinaryNotFoundError unless ctx.file_exist?(BYTECODE_FILE)
|
|
99
|
-
|
|
100
|
-
contents = ctx.binread(BYTECODE_FILE)
|
|
101
|
-
ctx.rm(BYTECODE_FILE)
|
|
102
|
-
|
|
103
|
-
contents
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
end
|