shopify-cli 2.7.3 → 2.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +1 -1
- data/dev.yml +2 -2
- data/ext/javy/javy.rb +7 -8
- data/lib/graphql/get_extension_registrations.graphql +27 -0
- data/lib/project_types/extension/cli.rb +27 -2
- data/lib/project_types/extension/commands/build.rb +10 -10
- data/lib/project_types/extension/commands/create.rb +2 -3
- data/lib/project_types/extension/commands/push.rb +36 -8
- data/lib/project_types/extension/extension_project.rb +1 -1
- data/lib/project_types/extension/features/argo_serve.rb +6 -5
- data/lib/project_types/extension/forms/questions/ask_registration.rb +6 -2
- data/lib/project_types/extension/loaders/project.rb +29 -0
- data/lib/project_types/extension/loaders/specification_handler.rb +22 -0
- data/lib/project_types/extension/messages/messages.rb +4 -0
- data/lib/project_types/extension/models/app.rb +1 -1
- data/lib/project_types/extension/models/specification_handlers/default.rb +4 -0
- data/lib/project_types/extension/tasks/convert_server_config.rb +3 -1
- data/lib/project_types/extension/tasks/execute_commands/base.rb +13 -0
- data/lib/project_types/extension/tasks/execute_commands/build.rb +29 -0
- data/lib/project_types/extension/tasks/execute_commands/create.rb +33 -0
- data/lib/project_types/extension/tasks/execute_commands/serve.rb +35 -0
- data/lib/project_types/extension/tasks/merge_server_config.rb +33 -22
- data/lib/project_types/script/cli.rb +2 -0
- data/lib/project_types/script/commands/connect.rb +19 -0
- data/lib/project_types/script/layers/application/connect_app.rb +9 -3
- data/lib/project_types/script/layers/application/create_script.rb +16 -16
- data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +21 -0
- data/lib/project_types/script/messages/messages.rb +12 -1
- data/lib/project_types/theme/commands/push.rb +3 -1
- data/lib/project_types/theme/messages/messages.rb +1 -0
- data/lib/shopify_cli/command.rb +6 -0
- data/lib/shopify_cli/constants.rb +4 -0
- data/lib/shopify_cli/context.rb +1 -1
- data/lib/shopify_cli/form.rb +2 -0
- data/lib/shopify_cli/messages/messages.rb +7 -1
- data/lib/shopify_cli/partners_api/app_extensions/job.rb +36 -0
- data/lib/shopify_cli/partners_api/app_extensions.rb +46 -0
- data/lib/shopify_cli/partners_api/organizations.rb +2 -5
- data/lib/shopify_cli/partners_api.rb +1 -0
- data/lib/shopify_cli/project.rb +8 -7
- data/lib/shopify_cli/resources/env_file.rb +13 -5
- data/lib/shopify_cli/theme/dev_server/hot-reload.js +15 -2
- data/lib/shopify_cli/theme/dev_server/proxy/template_param_builder.rb +84 -0
- data/lib/shopify_cli/theme/dev_server/proxy.rb +9 -15
- data/lib/shopify_cli/thread_pool/job.rb +27 -0
- data/lib/shopify_cli/thread_pool.rb +37 -0
- data/lib/shopify_cli/version.rb +1 -1
- data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +3 -1
- metadata +15 -4
- data/lib/graphql/all_orgs_with_extensions.graphql +0 -37
- data/lib/project_types/extension/tasks/run_extension_command.rb +0 -82
data/lib/shopify_cli/version.rb
CHANGED
@@ -114,7 +114,9 @@ module CLI
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def print_error_message(e)
|
117
|
-
|
117
|
+
CLI::UI::Frame.open("Error", color: :red, timing: false) do
|
118
|
+
$stderr.puts(format_error_message(e.message))
|
119
|
+
end
|
118
120
|
end
|
119
121
|
end
|
120
122
|
end
|
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.7.
|
4
|
+
version: 2.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -165,7 +165,6 @@ files:
|
|
165
165
|
- lib/graphql/admin_introspection.graphql
|
166
166
|
- lib/graphql/all_organizations.graphql
|
167
167
|
- lib/graphql/all_orgs_with_apps.graphql
|
168
|
-
- lib/graphql/all_orgs_with_extensions.graphql
|
169
168
|
- lib/graphql/api_versions.graphql
|
170
169
|
- lib/graphql/convert_dev_to_test_store.graphql
|
171
170
|
- lib/graphql/create_app.graphql
|
@@ -178,6 +177,7 @@ files:
|
|
178
177
|
- lib/graphql/find_organization.graphql
|
179
178
|
- lib/graphql/get_app_by_api_key.graphql
|
180
179
|
- lib/graphql/get_app_urls.graphql
|
180
|
+
- lib/graphql/get_extension_registrations.graphql
|
181
181
|
- lib/graphql/get_variant_id.graphql
|
182
182
|
- lib/graphql/update_dashboard_urls.graphql
|
183
183
|
- lib/project_types/extension/cli.rb
|
@@ -213,6 +213,8 @@ files:
|
|
213
213
|
- lib/project_types/extension/forms/questions/ask_registration.rb
|
214
214
|
- lib/project_types/extension/forms/questions/ask_template.rb
|
215
215
|
- lib/project_types/extension/forms/questions/ask_type.rb
|
216
|
+
- lib/project_types/extension/loaders/project.rb
|
217
|
+
- lib/project_types/extension/loaders/specification_handler.rb
|
216
218
|
- lib/project_types/extension/messages/message_loading.rb
|
217
219
|
- lib/project_types/extension/messages/messages.rb
|
218
220
|
- lib/project_types/extension/models/app.rb
|
@@ -250,6 +252,10 @@ files:
|
|
250
252
|
- lib/project_types/extension/tasks/converters/version_converter.rb
|
251
253
|
- lib/project_types/extension/tasks/create_extension.rb
|
252
254
|
- lib/project_types/extension/tasks/ensure_resource_url.rb
|
255
|
+
- lib/project_types/extension/tasks/execute_commands/base.rb
|
256
|
+
- lib/project_types/extension/tasks/execute_commands/build.rb
|
257
|
+
- lib/project_types/extension/tasks/execute_commands/create.rb
|
258
|
+
- lib/project_types/extension/tasks/execute_commands/serve.rb
|
253
259
|
- lib/project_types/extension/tasks/fetch_specifications.rb
|
254
260
|
- lib/project_types/extension/tasks/find_npm_packages.rb
|
255
261
|
- lib/project_types/extension/tasks/find_package_from_json.rb
|
@@ -258,7 +264,6 @@ files:
|
|
258
264
|
- lib/project_types/extension/tasks/get_extensions.rb
|
259
265
|
- lib/project_types/extension/tasks/get_product.rb
|
260
266
|
- lib/project_types/extension/tasks/merge_server_config.rb
|
261
|
-
- lib/project_types/extension/tasks/run_extension_command.rb
|
262
267
|
- lib/project_types/extension/tasks/update_draft.rb
|
263
268
|
- lib/project_types/extension/tasks/user_errors.rb
|
264
269
|
- lib/project_types/node/cli.rb
|
@@ -274,6 +279,7 @@ files:
|
|
274
279
|
- lib/project_types/rails/messages/messages.rb
|
275
280
|
- lib/project_types/rails/ruby.rb
|
276
281
|
- lib/project_types/script/cli.rb
|
282
|
+
- lib/project_types/script/commands/connect.rb
|
277
283
|
- lib/project_types/script/commands/create.rb
|
278
284
|
- lib/project_types/script/commands/javy.rb
|
279
285
|
- lib/project_types/script/commands/push.rb
|
@@ -407,6 +413,8 @@ files:
|
|
407
413
|
- lib/shopify_cli/options.rb
|
408
414
|
- lib/shopify_cli/packager.rb
|
409
415
|
- lib/shopify_cli/partners_api.rb
|
416
|
+
- lib/shopify_cli/partners_api/app_extensions.rb
|
417
|
+
- lib/shopify_cli/partners_api/app_extensions/job.rb
|
410
418
|
- lib/shopify_cli/partners_api/organizations.rb
|
411
419
|
- lib/shopify_cli/php_deps.rb
|
412
420
|
- lib/shopify_cli/process_supervision.rb
|
@@ -455,6 +463,7 @@ files:
|
|
455
463
|
- lib/shopify_cli/theme/dev_server/hot_reload.rb
|
456
464
|
- lib/shopify_cli/theme/dev_server/local_assets.rb
|
457
465
|
- lib/shopify_cli/theme/dev_server/proxy.rb
|
466
|
+
- lib/shopify_cli/theme/dev_server/proxy/template_param_builder.rb
|
458
467
|
- lib/shopify_cli/theme/dev_server/sse.rb
|
459
468
|
- lib/shopify_cli/theme/dev_server/watcher.rb
|
460
469
|
- lib/shopify_cli/theme/dev_server/web_server.rb
|
@@ -467,6 +476,8 @@ files:
|
|
467
476
|
- lib/shopify_cli/theme/syncer/operation.rb
|
468
477
|
- lib/shopify_cli/theme/syncer/standard_reporter.rb
|
469
478
|
- lib/shopify_cli/theme/theme.rb
|
479
|
+
- lib/shopify_cli/thread_pool.rb
|
480
|
+
- lib/shopify_cli/thread_pool/job.rb
|
470
481
|
- lib/shopify_cli/transform_data_structure.rb
|
471
482
|
- lib/shopify_cli/tunnel.rb
|
472
483
|
- lib/shopify_cli/version.rb
|
@@ -1,37 +0,0 @@
|
|
1
|
-
query AllOrgs ($type: String) {
|
2
|
-
organizations {
|
3
|
-
nodes {
|
4
|
-
id
|
5
|
-
businessName
|
6
|
-
website
|
7
|
-
apps(first: 500) {
|
8
|
-
nodes {
|
9
|
-
id
|
10
|
-
title
|
11
|
-
apiKey
|
12
|
-
apiSecretKeys{
|
13
|
-
secret
|
14
|
-
}
|
15
|
-
appType
|
16
|
-
extensionRegistrations(specificationIdentifier: $type) {
|
17
|
-
id
|
18
|
-
type
|
19
|
-
uuid
|
20
|
-
title
|
21
|
-
draftVersion {
|
22
|
-
registrationId
|
23
|
-
context
|
24
|
-
lastUserInteractionAt
|
25
|
-
location
|
26
|
-
validationErrors { field message }
|
27
|
-
|
28
|
-
id
|
29
|
-
uuid
|
30
|
-
versionTag
|
31
|
-
}
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
@@ -1,82 +0,0 @@
|
|
1
|
-
|
2
|
-
# frozen_string_literal: true
|
3
|
-
require "shopify_cli"
|
4
|
-
|
5
|
-
module Extension
|
6
|
-
module Tasks
|
7
|
-
class RunExtensionCommand < ShopifyCLI::Task
|
8
|
-
include SmartProperties
|
9
|
-
|
10
|
-
SUPPORTED_COMMANDS = [
|
11
|
-
"create",
|
12
|
-
"build",
|
13
|
-
"serve",
|
14
|
-
]
|
15
|
-
|
16
|
-
property! :command, accepts: SUPPORTED_COMMANDS
|
17
|
-
property! :type, accepts: Models::DevelopmentServerRequirements::SUPPORTED_EXTENSION_TYPES
|
18
|
-
property! :context, accepts: ShopifyCLI::Context
|
19
|
-
property :config_file_name, accepts: String
|
20
|
-
property :port, accepts: Integer, default: 39351
|
21
|
-
property :resource_url, accepts: String
|
22
|
-
property :root_dir, accepts: String
|
23
|
-
property :template, accepts: Models::ServerConfig::Development::VALID_TEMPLATES
|
24
|
-
property :tunnel_url, accepts: String
|
25
|
-
|
26
|
-
def call
|
27
|
-
ShopifyCLI::Result.success(config_file_exists?)
|
28
|
-
.then(&method(:load_or_build_server_config))
|
29
|
-
.then(&method(:run_command))
|
30
|
-
.unwrap do |error|
|
31
|
-
raise error unless error.nil?
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def config_file_exists?
|
38
|
-
return false if config_file_name.nil?
|
39
|
-
project = ExtensionProject.current
|
40
|
-
File.exist?(File.join(project.directory, config_file_name))
|
41
|
-
end
|
42
|
-
|
43
|
-
def load_or_build_server_config(config_file_exists)
|
44
|
-
return merge_server_config if config_file_exists
|
45
|
-
build_server_config
|
46
|
-
end
|
47
|
-
|
48
|
-
def merge_server_config
|
49
|
-
Tasks::MergeServerConfig.call(
|
50
|
-
context: context,
|
51
|
-
file_name: config_file_name,
|
52
|
-
resource_url: resource_url,
|
53
|
-
tunnel_url: tunnel_url,
|
54
|
-
type: type
|
55
|
-
)
|
56
|
-
end
|
57
|
-
|
58
|
-
def build_server_config
|
59
|
-
extension = Models::ServerConfig::Extension.build(
|
60
|
-
template: template,
|
61
|
-
type: type,
|
62
|
-
root_dir: root_dir,
|
63
|
-
)
|
64
|
-
|
65
|
-
Models::ServerConfig::Root.new(port: port, extensions: [extension])
|
66
|
-
end
|
67
|
-
|
68
|
-
def run_command(server_config)
|
69
|
-
case command
|
70
|
-
when "create"
|
71
|
-
Models::DevelopmentServer.new.create(server_config)
|
72
|
-
when "build"
|
73
|
-
Models::DevelopmentServer.new.build(server_config)
|
74
|
-
when "serve"
|
75
|
-
Models::DevelopmentServer.new.serve(context, server_config)
|
76
|
-
else
|
77
|
-
raise NotImplementedError
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|