shopify-cli 1.1.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CONTRIBUTING.md +1 -1
- data/.gitignore +0 -1
- data/.rubocop.yml +6 -2
- data/.rubocop_todo.yml +20 -0
- data/CHANGELOG.md +24 -0
- data/Gemfile +1 -2
- data/Gemfile.lock +11 -11
- data/RELEASING.md +22 -10
- data/docs/core/index.md +16 -0
- data/lib/project_types/extension/cli.rb +6 -1
- data/lib/project_types/extension/commands/register.rb +1 -1
- data/lib/project_types/extension/features/argo/admin.rb +20 -0
- data/lib/project_types/extension/features/argo/base.rb +129 -0
- data/lib/project_types/extension/features/argo/checkout.rb +20 -0
- data/lib/project_types/extension/features/argo_config.rb +60 -0
- data/lib/project_types/extension/messages/messages.rb +11 -2
- data/lib/project_types/extension/models/type.rb +4 -0
- data/lib/project_types/extension/models/types/checkout_post_purchase.rb +6 -3
- data/lib/project_types/extension/models/types/product_subscription.rb +24 -0
- data/lib/project_types/node/commands/create.rb +6 -1
- data/lib/project_types/node/commands/serve.rb +5 -5
- data/lib/project_types/node/messages/messages.rb +4 -1
- data/lib/project_types/rails/commands/create.rb +10 -2
- data/lib/project_types/rails/commands/serve.rb +5 -5
- data/lib/project_types/rails/messages/messages.rb +5 -1
- data/lib/project_types/script/config/extension_points.yml +8 -8
- data/lib/project_types/script/layers/infrastructure/assemblyscript_project_creator.rb +2 -2
- data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +36 -1
- data/lib/project_types/script/layers/infrastructure/errors.rb +7 -0
- data/lib/project_types/script/messages/messages.rb +12 -37
- data/lib/project_types/script/ui/error_handler.rb +13 -5
- data/lib/shopify-cli/api.rb +5 -9
- data/lib/shopify-cli/commands/config.rb +33 -1
- data/lib/shopify-cli/commands/system.rb +9 -0
- data/lib/shopify-cli/context.rb +40 -0
- data/lib/shopify-cli/core/entry_point.rb +3 -0
- data/lib/shopify-cli/git.rb +1 -1
- data/lib/shopify-cli/http_request.rb +15 -0
- data/lib/shopify-cli/js_system.rb +22 -5
- data/lib/shopify-cli/messages/messages.rb +39 -11
- data/lib/shopify-cli/project.rb +3 -3
- data/lib/shopify-cli/shopifolk.rb +67 -0
- data/lib/shopify-cli/tunnel.rb +1 -1
- data/lib/shopify-cli/version.rb +1 -1
- data/lib/shopify_cli.rb +1 -0
- metadata +10 -4
- data/lib/project_types/extension/features/argo.rb +0 -48
- data/lib/project_types/extension/models/types/subscription_management.rb +0 -20
data/lib/shopify-cli/tunnel.rb
CHANGED
@@ -210,7 +210,7 @@ module ShopifyCli
|
|
210
210
|
end
|
211
211
|
|
212
212
|
def parse_account
|
213
|
-
account, timeout, _ = @log.match(/AccountName:(
|
213
|
+
account, timeout, _ = @log.match(/AccountName:(.*)\s+SessionDuration:([\d]+) PlanName/)&.captures
|
214
214
|
@account = account&.empty? ? nil : account
|
215
215
|
@timeout = timeout&.empty? ? 0 : timeout.to_i
|
216
216
|
end
|
data/lib/shopify-cli/version.rb
CHANGED
data/lib/shopify_cli.rb
CHANGED
@@ -116,6 +116,7 @@ module ShopifyCli
|
|
116
116
|
autoload :Project, 'shopify-cli/project'
|
117
117
|
autoload :ProjectType, 'shopify-cli/project_type'
|
118
118
|
autoload :Resources, 'shopify-cli/resources'
|
119
|
+
autoload :Shopifolk, 'shopify-cli/shopifolk'
|
119
120
|
autoload :SubCommand, 'shopify-cli/sub_command'
|
120
121
|
autoload :Task, 'shopify-cli/task'
|
121
122
|
autoload :Tasks, 'shopify-cli/tasks'
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- ".github/probots.yml"
|
80
80
|
- ".gitignore"
|
81
81
|
- ".rubocop.yml"
|
82
|
+
- ".rubocop_todo.yml"
|
82
83
|
- ".ruby-version"
|
83
84
|
- ".tmp/.gitkeep"
|
84
85
|
- ".tmp/sv/.gitkeep"
|
@@ -147,7 +148,10 @@ files:
|
|
147
148
|
- lib/project_types/extension/commands/tunnel.rb
|
148
149
|
- lib/project_types/extension/extension_project.rb
|
149
150
|
- lib/project_types/extension/extension_project_keys.rb
|
150
|
-
- lib/project_types/extension/features/argo.rb
|
151
|
+
- lib/project_types/extension/features/argo/admin.rb
|
152
|
+
- lib/project_types/extension/features/argo/base.rb
|
153
|
+
- lib/project_types/extension/features/argo/checkout.rb
|
154
|
+
- lib/project_types/extension/features/argo_config.rb
|
151
155
|
- lib/project_types/extension/features/argo_dependencies.rb
|
152
156
|
- lib/project_types/extension/features/argo_setup.rb
|
153
157
|
- lib/project_types/extension/features/argo_setup_step.rb
|
@@ -161,7 +165,7 @@ files:
|
|
161
165
|
- lib/project_types/extension/models/registration.rb
|
162
166
|
- lib/project_types/extension/models/type.rb
|
163
167
|
- lib/project_types/extension/models/types/checkout_post_purchase.rb
|
164
|
-
- lib/project_types/extension/models/types/
|
168
|
+
- lib/project_types/extension/models/types/product_subscription.rb
|
165
169
|
- lib/project_types/extension/models/validation_error.rb
|
166
170
|
- lib/project_types/extension/models/version.rb
|
167
171
|
- lib/project_types/extension/tasks/converters/app_converter.rb
|
@@ -275,6 +279,7 @@ files:
|
|
275
279
|
- lib/shopify-cli/helpers.rb
|
276
280
|
- lib/shopify-cli/helpers/haikunator.rb
|
277
281
|
- lib/shopify-cli/heroku.rb
|
282
|
+
- lib/shopify-cli/http_request.rb
|
278
283
|
- lib/shopify-cli/js_deps.rb
|
279
284
|
- lib/shopify-cli/js_system.rb
|
280
285
|
- lib/shopify-cli/messages/messages.rb
|
@@ -289,6 +294,7 @@ files:
|
|
289
294
|
- lib/shopify-cli/project_type.rb
|
290
295
|
- lib/shopify-cli/resources.rb
|
291
296
|
- lib/shopify-cli/resources/env_file.rb
|
297
|
+
- lib/shopify-cli/shopifolk.rb
|
292
298
|
- lib/shopify-cli/sub_command.rb
|
293
299
|
- lib/shopify-cli/task.rb
|
294
300
|
- lib/shopify-cli/tasks.rb
|
@@ -1,48 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require 'base64'
|
3
|
-
|
4
|
-
module Extension
|
5
|
-
module Features
|
6
|
-
class Argo
|
7
|
-
include SmartProperties
|
8
|
-
|
9
|
-
GIT_ADMIN_TEMPLATE = 'https://github.com/Shopify/argo-admin-template.git'
|
10
|
-
GIT_CHECKOUT_TEMPLATE = 'https://github.com/Shopify/argo-checkout-template.git'
|
11
|
-
SCRIPT_PATH = %w(build main.js).freeze
|
12
|
-
|
13
|
-
class << self
|
14
|
-
def admin
|
15
|
-
@admin ||= Argo.new(setup: ArgoSetup.new(git_template: GIT_ADMIN_TEMPLATE))
|
16
|
-
end
|
17
|
-
|
18
|
-
def checkout
|
19
|
-
@checkout ||= Argo.new(
|
20
|
-
setup: ArgoSetup.new(
|
21
|
-
git_template: GIT_CHECKOUT_TEMPLATE,
|
22
|
-
dependency_checks: [ArgoDependencies.node_installed(min_major: 10, min_minor: 16)]
|
23
|
-
)
|
24
|
-
)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
property! :setup, accepts: Features::ArgoSetup
|
29
|
-
|
30
|
-
def create(directory_name, identifier, context)
|
31
|
-
setup.call(directory_name, identifier, context)
|
32
|
-
end
|
33
|
-
|
34
|
-
def config(context)
|
35
|
-
filepath = File.join(context.root, SCRIPT_PATH)
|
36
|
-
context.abort(context.message('features.argo.missing_file_error')) unless File.exist?(filepath)
|
37
|
-
|
38
|
-
begin
|
39
|
-
{
|
40
|
-
serialized_script: Base64.strict_encode64(File.open(filepath).read.chomp),
|
41
|
-
}
|
42
|
-
rescue StandardError
|
43
|
-
context.abort(context.message('features.argo.script_prepare_error'))
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require 'base64'
|
3
|
-
|
4
|
-
module Extension
|
5
|
-
module Models
|
6
|
-
module Types
|
7
|
-
class SubscriptionManagement < Models::Type
|
8
|
-
IDENTIFIER = 'SUBSCRIPTION_MANAGEMENT'
|
9
|
-
|
10
|
-
def create(directory_name, context)
|
11
|
-
Features::Argo.admin.create(directory_name, IDENTIFIER, context)
|
12
|
-
end
|
13
|
-
|
14
|
-
def config(context)
|
15
|
-
Features::Argo.admin.config(context)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|