shopify-cli 1.11.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/CHANGELOG.md +4 -0
- data/lib/project_types/extension/features/argo_runtime.rb +21 -0
- data/lib/project_types/extension/features/argo_serve.rb +3 -2
- data/lib/project_types/extension/features/argo_serve_options.rb +3 -2
- data/lib/project_types/extension/models/specification_handlers/default.rb +18 -3
- data/lib/shopify-cli/shopifolk.rb +1 -1
- data/lib/shopify-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45acefe059ce1e83e77f20be8ee3b7815c5be28f834ef7697dd9000175884c4f
|
4
|
+
data.tar.gz: a1abb2765725c6a1d593f869c323f179429b7c21d25de9bfa8649e5817dc9d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f73366ea4f16f7d5615fe6ae62edd58692f85288b7f6056be61a4cbcbf72c94a1979cc806255fe55c82504f42433c1264ca9b479203639dbaf209273189cccc
|
7
|
+
data.tar.gz: 556ef6bdc6338c156d1ef6c9f9971e37d687cd7c1c8c93f6dc609a053f2303cde7d03b968e2e0e2336e59bc5b89539e8fb3a12f38e3427bbddb29bf448d7f130
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
Unreleased
|
2
2
|
------
|
3
3
|
|
4
|
+
Version 1.12.0
|
5
|
+
--------------
|
6
|
+
* [1255](https://github.com/Shopify/shopify-app-cli/pull/1255): Fix beta flag checks when running `shopify serve`
|
7
|
+
|
4
8
|
Version 1.11.0
|
5
9
|
--------------
|
6
10
|
* [#1221](https://github.com/Shopify/shopify-app-cli/pull/1221): Prioritizes returning an HTTPS URL over HTTP from `shopify tunnel status`.
|
@@ -12,6 +12,7 @@ module Extension
|
|
12
12
|
|
13
13
|
property! :renderer, accepts: Models::NpmPackage
|
14
14
|
property! :cli, accepts: Models::NpmPackage
|
15
|
+
property :beta_access, accepts: Array, default: -> { [] }
|
15
16
|
|
16
17
|
def accepts_port?
|
17
18
|
case cli
|
@@ -49,6 +50,26 @@ module Extension
|
|
49
50
|
end
|
50
51
|
end
|
51
52
|
|
53
|
+
def accepts_shop?
|
54
|
+
return false unless beta_access.include?(:argo_admin_beta)
|
55
|
+
case cli
|
56
|
+
when admin?
|
57
|
+
cli >= ARGO_ADMIN_CLI_0_11_0
|
58
|
+
else
|
59
|
+
false
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def accepts_api_key?
|
64
|
+
return false unless beta_access.include?(:argo_admin_beta)
|
65
|
+
case cli
|
66
|
+
when admin?
|
67
|
+
cli >= ARGO_ADMIN_CLI_0_11_0
|
68
|
+
else
|
69
|
+
false
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
52
73
|
private
|
53
74
|
|
54
75
|
def admin?
|
@@ -8,6 +8,7 @@ module Extension
|
|
8
8
|
property! :context, accepts: ShopifyCli::Context
|
9
9
|
property! :port, accepts: Integer, default: 39351
|
10
10
|
property :tunnel_url, accepts: String, default: ""
|
11
|
+
property :beta_access, accepts: Array, default: -> { [] }
|
11
12
|
|
12
13
|
def call
|
13
14
|
validate_env!
|
@@ -58,10 +59,10 @@ module Extension
|
|
58
59
|
def validate_env!
|
59
60
|
ExtensionProject.reload
|
60
61
|
|
61
|
-
ShopifyCli::Shopifolk.check && ShopifyCli::Feature.enabled?(:argo_admin_beta)
|
62
|
-
|
63
62
|
return if required_fields.none?
|
64
63
|
|
64
|
+
return unless beta_access.include?(:argo_admin_beta)
|
65
|
+
|
65
66
|
ShopifyCli::Tasks::EnsureEnv.call(context, required: required_fields)
|
66
67
|
ShopifyCli::Tasks::EnsureDevStore.call(context) if required_fields.include?(:shop)
|
67
68
|
|
@@ -25,11 +25,12 @@ module Extension
|
|
25
25
|
|
26
26
|
def options
|
27
27
|
project = ExtensionProject.current
|
28
|
+
api_key = project.env.api_key
|
28
29
|
|
29
30
|
@serve_options ||= [].tap do |options|
|
30
31
|
options << "--port=#{port}" if argo_runtime.accepts_port?
|
31
|
-
options << "--shop=#{project.env.shop}" if required_fields.include?(:shop)
|
32
|
-
options << "--apiKey=#{
|
32
|
+
options << "--shop=#{project.env.shop}" if required_fields.include?(:shop) && argo_runtime.accepts_shop?
|
33
|
+
options << "--apiKey=#{api_key}" if required_fields.include?(:api_key) && argo_runtime.accepts_api_key?
|
33
34
|
options << "--argoVersion=#{renderer_package.version}" if argo_runtime.accepts_argo_version?
|
34
35
|
options << "--uuid=#{project.registration_uuid}" if argo_runtime.accepts_uuid?
|
35
36
|
options << "--publicUrl=#{public_url}" if argo_runtime.accepts_tunnel_url?
|
@@ -51,8 +51,14 @@ module Extension
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def serve(context:, port:, tunnel_url:)
|
54
|
-
Features::ArgoServe.new(
|
55
|
-
|
54
|
+
Features::ArgoServe.new(
|
55
|
+
specification_handler: self,
|
56
|
+
argo_runtime: argo_runtime(context),
|
57
|
+
context: context,
|
58
|
+
port: port,
|
59
|
+
tunnel_url: tunnel_url,
|
60
|
+
beta_access: beta_access
|
61
|
+
).call
|
56
62
|
end
|
57
63
|
|
58
64
|
def renderer_package(context)
|
@@ -62,10 +68,19 @@ module Extension
|
|
62
68
|
def argo_runtime(context)
|
63
69
|
@argo_runtime ||= Features::ArgoRuntime.new(
|
64
70
|
renderer: renderer_package(context),
|
65
|
-
cli: cli_package(context)
|
71
|
+
cli: cli_package(context),
|
72
|
+
beta_access: beta_access
|
66
73
|
)
|
67
74
|
end
|
68
75
|
|
76
|
+
def beta_access
|
77
|
+
argo_admin_beta? ? [:argo_admin_beta] : []
|
78
|
+
end
|
79
|
+
|
80
|
+
def argo_admin_beta?
|
81
|
+
ShopifyCli::Shopifolk.check && ShopifyCli::Feature.enabled?(:argo_admin_beta)
|
82
|
+
end
|
83
|
+
|
69
84
|
def cli_package(context)
|
70
85
|
cli_package_name = specification.features.argo&.cli_package_name
|
71
86
|
return unless cli_package_name
|
@@ -33,7 +33,7 @@ module ShopifyCli
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def acting_as_shopify_organization?
|
36
|
-
|
36
|
+
!!(@acting_as_shopify_organization || (Project.has_current? && Project.current.config["shopify_organization"]))
|
37
37
|
end
|
38
38
|
|
39
39
|
def reset
|
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: 1.
|
4
|
+
version: 1.12.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-05-
|
11
|
+
date: 2021-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|