shopify-cli 1.0.4 → 1.2.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/.travis.yml +3 -2
- data/CHANGELOG.md +21 -1
- data/Gemfile +1 -1
- data/Gemfile.lock +13 -13
- data/bin/load_shopify.rb +3 -1
- data/bin/shopify +2 -0
- data/docs/Gemfile.lock +23 -13
- data/docs/getting-started/index.md +3 -2
- data/docs/getting-started/install/index.md +55 -9
- data/docs/getting-started/uninstall/index.md +1 -1
- data/docs/getting-started/upgrade/index.md +8 -4
- data/ext/shopify-cli/extconf.rb +40 -20
- data/lib/project_types/extension/cli.rb +1 -0
- data/lib/project_types/extension/features/argo_config.rb +60 -0
- data/lib/project_types/extension/messages/messages.rb +3 -0
- data/lib/project_types/extension/models/type.rb +1 -0
- data/lib/project_types/extension/models/types/checkout_post_purchase.rb +5 -2
- data/lib/project_types/extension/tasks/create_extension.rb +1 -1
- data/lib/project_types/extension/tasks/get_app.rb +1 -1
- data/lib/project_types/extension/tasks/update_draft.rb +1 -1
- data/lib/project_types/node/commands/create.rb +4 -4
- data/lib/project_types/node/commands/deploy/heroku.rb +6 -1
- data/lib/project_types/node/commands/generate/billing.rb +7 -5
- data/lib/project_types/node/commands/generate/page.rb +9 -5
- data/lib/project_types/node/commands/generate/webhook.rb +5 -1
- data/lib/project_types/node/commands/serve.rb +5 -5
- data/lib/project_types/node/messages/messages.rb +5 -1
- data/lib/project_types/rails/commands/create.rb +56 -5
- data/lib/project_types/rails/commands/generate.rb +1 -0
- data/lib/project_types/rails/commands/generate/webhook.rb +3 -2
- data/lib/project_types/rails/commands/serve.rb +11 -7
- data/lib/project_types/rails/gem.rb +61 -6
- data/lib/project_types/rails/messages/messages.rb +32 -12
- data/lib/project_types/script/commands/create.rb +1 -5
- data/lib/project_types/script/commands/disable.rb +1 -2
- data/lib/project_types/script/commands/enable.rb +5 -5
- data/lib/project_types/script/commands/push.rb +1 -6
- data/lib/project_types/script/config/extension_points.yml +4 -4
- data/lib/project_types/script/errors.rb +8 -0
- data/lib/project_types/script/forms/create.rb +1 -1
- data/lib/project_types/script/layers/domain/errors.rb +2 -0
- data/lib/project_types/script/layers/infrastructure/assemblyscript_task_runner.rb +36 -1
- data/lib/project_types/script/layers/infrastructure/errors.rb +8 -0
- data/lib/project_types/script/layers/infrastructure/script_service.rb +6 -2
- data/lib/project_types/script/messages/messages.rb +22 -48
- data/lib/project_types/script/ui/error_handler.rb +12 -0
- data/lib/rubygems_plugin.rb +18 -10
- data/lib/shopify-cli/admin_api/populate_resource_command.rb +1 -1
- data/lib/shopify-cli/command.rb +12 -6
- data/lib/shopify-cli/commands/connect.rb +7 -75
- data/lib/shopify-cli/commands/create.rb +1 -1
- data/lib/shopify-cli/commands/system.rb +21 -12
- data/lib/shopify-cli/context.rb +68 -0
- data/lib/shopify-cli/core/entry_point.rb +4 -1
- data/lib/shopify-cli/core/executor.rb +3 -5
- data/lib/shopify-cli/core/monorail.rb +1 -1
- data/lib/shopify-cli/db.rb +1 -1
- data/lib/shopify-cli/git.rb +1 -1
- data/lib/shopify-cli/heroku.rb +21 -5
- data/lib/shopify-cli/js_deps.rb +2 -2
- data/lib/shopify-cli/js_system.rb +2 -2
- data/lib/shopify-cli/messages/messages.rb +35 -25
- data/lib/shopify-cli/process_supervision.rb +60 -21
- data/lib/shopify-cli/project.rb +17 -9
- data/lib/shopify-cli/project_type.rb +3 -2
- data/lib/shopify-cli/sub_command.rb +1 -0
- data/lib/shopify-cli/task.rb +2 -2
- data/lib/shopify-cli/tasks.rb +11 -4
- data/lib/shopify-cli/tasks/ensure_env.rb +74 -17
- data/lib/shopify-cli/tunnel.rb +22 -7
- data/lib/shopify-cli/version.rb +1 -1
- data/lib/shopify_cli.rb +35 -9
- data/shopify-cli.gemspec +4 -1
- data/vendor/deps/cli-kit/REVISION +1 -1
- data/vendor/deps/cli-kit/lib/cli/kit.rb +1 -1
- data/vendor/deps/cli-kit/lib/cli/kit/autocall.rb +2 -2
- data/vendor/deps/cli-kit/lib/cli/kit/error_handler.rb +12 -6
- data/vendor/deps/cli-kit/lib/cli/kit/executor.rb +9 -11
- data/vendor/deps/cli-kit/lib/cli/kit/logger.rb +8 -2
- data/vendor/deps/cli-kit/lib/cli/kit/support/test_helper.rb +7 -7
- data/vendor/deps/cli-kit/lib/cli/kit/system.rb +48 -17
- data/vendor/deps/cli-ui/REVISION +1 -1
- data/vendor/deps/cli-ui/lib/cli/ui.rb +5 -4
- data/vendor/deps/cli-ui/lib/cli/ui/ansi.rb +9 -3
- data/vendor/deps/cli-ui/lib/cli/ui/color.rb +1 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame.rb +3 -2
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style.rb +1 -0
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb +13 -5
- data/vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb +29 -2
- data/vendor/deps/cli-ui/lib/cli/ui/glyph.rb +21 -10
- data/vendor/deps/cli-ui/lib/cli/ui/os.rb +63 -0
- data/vendor/deps/cli-ui/lib/cli/ui/prompt.rb +11 -2
- data/vendor/deps/cli-ui/lib/cli/ui/prompt/interactive_options.rb +1 -0
- data/vendor/deps/cli-ui/lib/cli/ui/spinner.rb +3 -3
- data/vendor/deps/cli-ui/lib/cli/ui/spinner/spin_group.rb +6 -8
- data/vendor/deps/cli-ui/lib/cli/ui/widgets.rb +2 -0
- data/vendor/gen/lib/gen.rb +39 -0
- data/vendor/gen/lib/gen/commands.rb +18 -0
- data/vendor/gen/lib/gen/commands/help.rb +20 -0
- data/vendor/gen/lib/gen/commands/new.rb +21 -0
- data/vendor/gen/lib/gen/entry_point.rb +10 -0
- data/vendor/gen/lib/gen/generator.rb +165 -0
- data/vendor/gen/template/.gitignore +2 -0
- data/vendor/gen/template/Gemfile +10 -0
- data/vendor/gen/template/README.md +1 -0
- data/vendor/gen/template/bin/testunit +23 -0
- data/vendor/gen/template/bin/update-deps +97 -0
- data/vendor/gen/template/dev-gems.yml +3 -0
- data/vendor/gen/template/dev-vendor.yml +4 -0
- data/vendor/gen/template/exe/__app__-gems +17 -0
- data/vendor/gen/template/exe/__app__-vendor +18 -0
- data/vendor/gen/template/lib/__app__.rb +33 -0
- data/vendor/gen/template/lib/__app__/commands.rb +18 -0
- data/vendor/gen/template/lib/__app__/commands/example.rb +19 -0
- data/vendor/gen/template/lib/__app__/commands/help.rb +21 -0
- data/vendor/gen/template/lib/__app__/entry_point.rb +10 -0
- data/vendor/gen/template/test/example_test.rb +17 -0
- data/vendor/gen/template/test/test_helper.rb +22 -0
- metadata +26 -4
- data/Vagrantfile +0 -17
- data/lib/project_types/script/forms/script_form.rb +0 -69
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
Encoding.default_external = Encoding::UTF_8
|
4
|
+
Encoding.default_internal = Encoding::UTF_8
|
5
|
+
|
6
|
+
unshift_path = ->(path) {
|
7
|
+
p = File.expand_path("../../#{path}", __FILE__)
|
8
|
+
$LOAD_PATH.unshift(p) unless $LOAD_PATH.include?(p)
|
9
|
+
}
|
10
|
+
unshift_path.call('lib')
|
11
|
+
|
12
|
+
require 'bundler/setup'
|
13
|
+
require '__app__'
|
14
|
+
|
15
|
+
exit(__App__::ErrorHandler.call do
|
16
|
+
__App__::EntryPoint.call(ARGV.dup)
|
17
|
+
end)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby --disable-gems
|
2
|
+
|
3
|
+
Encoding.default_external = Encoding::UTF_8
|
4
|
+
Encoding.default_internal = Encoding::UTF_8
|
5
|
+
|
6
|
+
unshift_path = ->(path) {
|
7
|
+
p = File.expand_path("../../#{path}", __FILE__)
|
8
|
+
$LOAD_PATH.unshift(p) unless $LOAD_PATH.include?(p)
|
9
|
+
}
|
10
|
+
unshift_path.call('vendor/deps/cli-ui/lib')
|
11
|
+
unshift_path.call('vendor/deps/cli-kit/lib')
|
12
|
+
unshift_path.call('lib')
|
13
|
+
|
14
|
+
require '__app__'
|
15
|
+
|
16
|
+
exit(__App__::ErrorHandler.call do
|
17
|
+
__App__::EntryPoint.call(ARGV.dup)
|
18
|
+
end)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'cli/ui'
|
2
|
+
require 'cli/kit'
|
3
|
+
|
4
|
+
CLI::UI::StdoutRouter.enable
|
5
|
+
|
6
|
+
module __App__
|
7
|
+
extend CLI::Kit::Autocall
|
8
|
+
|
9
|
+
TOOL_NAME = '__app__'
|
10
|
+
ROOT = File.expand_path('../..', __FILE__)
|
11
|
+
LOG_FILE = '/tmp/__app__.log'
|
12
|
+
|
13
|
+
autoload(:EntryPoint, '__app__/entry_point')
|
14
|
+
autoload(:Commands, '__app__/commands')
|
15
|
+
|
16
|
+
autocall(:Config) { CLI::Kit::Config.new(tool_name: TOOL_NAME) }
|
17
|
+
autocall(:Command) { CLI::Kit::BaseCommand }
|
18
|
+
|
19
|
+
autocall(:Executor) { CLI::Kit::Executor.new(log_file: LOG_FILE) }
|
20
|
+
autocall(:Resolver) do
|
21
|
+
CLI::Kit::Resolver.new(
|
22
|
+
tool_name: TOOL_NAME,
|
23
|
+
command_registry: __App__::Commands::Registry
|
24
|
+
)
|
25
|
+
end
|
26
|
+
|
27
|
+
autocall(:ErrorHandler) do
|
28
|
+
CLI::Kit::ErrorHandler.new(
|
29
|
+
log_file: LOG_FILE,
|
30
|
+
exception_reporter: nil
|
31
|
+
)
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require '__app__'
|
2
|
+
|
3
|
+
module __App__
|
4
|
+
module Commands
|
5
|
+
Registry = CLI::Kit::CommandRegistry.new(
|
6
|
+
default: 'help',
|
7
|
+
contextual_resolver: nil
|
8
|
+
)
|
9
|
+
|
10
|
+
def self.register(const, cmd, path)
|
11
|
+
autoload(const, path)
|
12
|
+
Registry.add(->() { const_get(const) }, cmd)
|
13
|
+
end
|
14
|
+
|
15
|
+
register :Example, 'example', '__app__/commands/example'
|
16
|
+
register :Help, 'help', '__app__/commands/help'
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require '__app__'
|
2
|
+
|
3
|
+
module __App__
|
4
|
+
module Commands
|
5
|
+
class Example < __App__::Command
|
6
|
+
def call(_args, _name)
|
7
|
+
puts 'neato'
|
8
|
+
|
9
|
+
if rand < 0.05
|
10
|
+
raise(CLI::Kit::Abort, "you got unlucky!")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.help
|
15
|
+
"A dummy command.\nUsage: {{command:#{__App__::TOOL_NAME} example}}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require '__app__'
|
2
|
+
|
3
|
+
module __App__
|
4
|
+
module Commands
|
5
|
+
class Help < __App__::Command
|
6
|
+
def call(args, _name)
|
7
|
+
puts CLI::UI.fmt("{{bold:Available commands}}")
|
8
|
+
puts ""
|
9
|
+
|
10
|
+
__App__::Commands::Registry.resolved_commands.each do |name, klass|
|
11
|
+
next if name == 'help'
|
12
|
+
puts CLI::UI.fmt("{{command:#{__App__::TOOL_NAME} #{name}}}")
|
13
|
+
if help = klass.help
|
14
|
+
puts CLI::UI.fmt(help)
|
15
|
+
end
|
16
|
+
puts ""
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module __App__
|
4
|
+
class ExampleTest < MiniTest::Test
|
5
|
+
include CLI::Kit::Support::TestHelper
|
6
|
+
|
7
|
+
def test_example
|
8
|
+
CLI::Kit::System.fake("ls -al", stdout: "a\nb", success: true)
|
9
|
+
|
10
|
+
out, = CLI::Kit::System.capture2('ls', '-al')
|
11
|
+
assert_equal %w(a b), out.split("\n")
|
12
|
+
|
13
|
+
errors = assert_all_commands_run(should_raise: false)
|
14
|
+
assert_nil errors, "expected command to run successfully"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
begin
|
2
|
+
addpath = lambda do |p|
|
3
|
+
path = File.expand_path("../../#{p}", __FILE__)
|
4
|
+
$LOAD_PATH.unshift(path) unless $LOAD_PATH.include?(path)
|
5
|
+
end
|
6
|
+
addpath.call("lib")
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'cli/kit'
|
10
|
+
|
11
|
+
require 'fileutils'
|
12
|
+
require 'tmpdir'
|
13
|
+
require 'tempfile'
|
14
|
+
|
15
|
+
require 'rubygems'
|
16
|
+
require 'bundler/setup'
|
17
|
+
|
18
|
+
CLI::UI::StdoutRouter.enable
|
19
|
+
|
20
|
+
require 'minitest/autorun'
|
21
|
+
require "minitest/unit"
|
22
|
+
require 'mocha/minitest'
|
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.0
|
4
|
+
version: 1.2.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-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -91,7 +91,6 @@ files:
|
|
91
91
|
- RELEASING.md
|
92
92
|
- Rakefile
|
93
93
|
- SECURITY.md
|
94
|
-
- Vagrantfile
|
95
94
|
- bin/load_shopify.rb
|
96
95
|
- bin/shopify
|
97
96
|
- dev.yml
|
@@ -149,6 +148,7 @@ files:
|
|
149
148
|
- lib/project_types/extension/extension_project.rb
|
150
149
|
- lib/project_types/extension/extension_project_keys.rb
|
151
150
|
- lib/project_types/extension/features/argo.rb
|
151
|
+
- lib/project_types/extension/features/argo_config.rb
|
152
152
|
- lib/project_types/extension/features/argo_dependencies.rb
|
153
153
|
- lib/project_types/extension/features/argo_setup.rb
|
154
154
|
- lib/project_types/extension/features/argo_setup_step.rb
|
@@ -216,7 +216,6 @@ files:
|
|
216
216
|
- lib/project_types/script/config/extension_points.yml
|
217
217
|
- lib/project_types/script/errors.rb
|
218
218
|
- lib/project_types/script/forms/create.rb
|
219
|
-
- lib/project_types/script/forms/script_form.rb
|
220
219
|
- lib/project_types/script/graphql/app_script_update_or_create.graphql
|
221
220
|
- lib/project_types/script/graphql/script_service_proxy.graphql
|
222
221
|
- lib/project_types/script/graphql/shop_script_delete.graphql
|
@@ -335,6 +334,7 @@ files:
|
|
335
334
|
- vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/box.rb
|
336
335
|
- vendor/deps/cli-ui/lib/cli/ui/frame/frame_style/bracket.rb
|
337
336
|
- vendor/deps/cli-ui/lib/cli/ui/glyph.rb
|
337
|
+
- vendor/deps/cli-ui/lib/cli/ui/os.rb
|
338
338
|
- vendor/deps/cli-ui/lib/cli/ui/printer.rb
|
339
339
|
- vendor/deps/cli-ui/lib/cli/ui/progress.rb
|
340
340
|
- vendor/deps/cli-ui/lib/cli/ui/prompt.rb
|
@@ -358,6 +358,28 @@ files:
|
|
358
358
|
- vendor/deps/smart_properties/lib/smart_properties/validations.rb
|
359
359
|
- vendor/deps/smart_properties/lib/smart_properties/validations/ancestor.rb
|
360
360
|
- vendor/deps/smart_properties/lib/smart_properties/version.rb
|
361
|
+
- vendor/gen/lib/gen.rb
|
362
|
+
- vendor/gen/lib/gen/commands.rb
|
363
|
+
- vendor/gen/lib/gen/commands/help.rb
|
364
|
+
- vendor/gen/lib/gen/commands/new.rb
|
365
|
+
- vendor/gen/lib/gen/entry_point.rb
|
366
|
+
- vendor/gen/lib/gen/generator.rb
|
367
|
+
- vendor/gen/template/.gitignore
|
368
|
+
- vendor/gen/template/Gemfile
|
369
|
+
- vendor/gen/template/README.md
|
370
|
+
- vendor/gen/template/bin/testunit
|
371
|
+
- vendor/gen/template/bin/update-deps
|
372
|
+
- vendor/gen/template/dev-gems.yml
|
373
|
+
- vendor/gen/template/dev-vendor.yml
|
374
|
+
- vendor/gen/template/exe/__app__-gems
|
375
|
+
- vendor/gen/template/exe/__app__-vendor
|
376
|
+
- vendor/gen/template/lib/__app__.rb
|
377
|
+
- vendor/gen/template/lib/__app__/commands.rb
|
378
|
+
- vendor/gen/template/lib/__app__/commands/example.rb
|
379
|
+
- vendor/gen/template/lib/__app__/commands/help.rb
|
380
|
+
- vendor/gen/template/lib/__app__/entry_point.rb
|
381
|
+
- vendor/gen/template/test/example_test.rb
|
382
|
+
- vendor/gen/template/test/test_helper.rb
|
361
383
|
- vendor/lib/semantic/LICENSE
|
362
384
|
- vendor/lib/semantic/semantic.rb
|
363
385
|
- vendor/lib/semantic/version.rb
|
data/Vagrantfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# -*- mode: ruby -*-
|
2
|
-
# vi: set ft=ruby :
|
3
|
-
|
4
|
-
Vagrant.configure('2') do |config|
|
5
|
-
# config.vm.define "centos" do |centos|
|
6
|
-
# centos.vm.box = "centos/7"
|
7
|
-
# end
|
8
|
-
|
9
|
-
# config.vm.define "windows" do |windows|
|
10
|
-
# windows.vm.box = "Microsoft/EdgeOnWindows10"
|
11
|
-
# windows.vm.box_version = "1.0"
|
12
|
-
# end
|
13
|
-
|
14
|
-
config.vm.define('ubuntu') do |ubuntu|
|
15
|
-
ubuntu.vm.box = 'ubuntu/xenial64'
|
16
|
-
end
|
17
|
-
end
|
@@ -1,69 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Script
|
4
|
-
module Forms
|
5
|
-
class ScriptForm < ShopifyCli::Form
|
6
|
-
protected
|
7
|
-
|
8
|
-
def organization
|
9
|
-
@organization ||= ask_organization
|
10
|
-
end
|
11
|
-
|
12
|
-
def organizations
|
13
|
-
return @organizations if defined?(@organizations)
|
14
|
-
UI::PrintingSpinner.spin(ctx, ctx.message('script.forms.script_form.fetching_organizations')) do |ctx, spinner|
|
15
|
-
@organizations = ShopifyCli::PartnersAPI::Organizations.fetch_with_app(ctx)
|
16
|
-
spinner.update_title(ctx.message('script.forms.script_form.fetched_organizations'))
|
17
|
-
end
|
18
|
-
@organizations
|
19
|
-
end
|
20
|
-
|
21
|
-
def ask_app_api_key(apps, message: ctx.message('script.forms.script_form.ask_app_api_key_default'))
|
22
|
-
if apps.count == 0
|
23
|
-
raise Errors::NoExistingAppsError
|
24
|
-
elsif apps.count == 1
|
25
|
-
ctx.puts(ctx.message(
|
26
|
-
'script.forms.script_form.using_app',
|
27
|
-
title: apps.first['title'],
|
28
|
-
api_key: apps.first['apiKey']
|
29
|
-
))
|
30
|
-
apps.first["apiKey"]
|
31
|
-
else
|
32
|
-
CLI::UI::Prompt.ask(message) do |handler|
|
33
|
-
apps.each { |app| handler.option(app["title"]) { app["apiKey"] } }
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def ask_organization
|
39
|
-
if organizations.count == 0
|
40
|
-
raise Errors::NoExistingOrganizationsError
|
41
|
-
elsif organizations.count == 1
|
42
|
-
org = organizations.first
|
43
|
-
ctx.puts(ctx.message('script.forms.script_form.using_organization',
|
44
|
-
ctx.message('core.partners_api.org_name_and_id', org['businessName'], org['id'])))
|
45
|
-
org
|
46
|
-
else
|
47
|
-
org_id = CLI::UI::Prompt.ask(ctx.message('script.forms.script_form.select_organization')) do |handler|
|
48
|
-
organizations.each do |o|
|
49
|
-
handler.option(ctx.message('core.partners_api.org_name_and_id', o['businessName'], o['id'])) { o['id'] }
|
50
|
-
end
|
51
|
-
end
|
52
|
-
organizations.find { |o| o['id'] == org_id }
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def ask_shop_domain(organization, message: ctx.message('script.forms.script_form.ask_shop_domain_default'))
|
57
|
-
if organization['stores'].count == 0
|
58
|
-
raise Errors::NoExistingStoresError, organization['id']
|
59
|
-
elsif organization['stores'].count == 1
|
60
|
-
domain = organization['stores'].first['shopDomain']
|
61
|
-
ctx.puts(ctx.message('script.forms.script_form.using_development_store', domain: domain))
|
62
|
-
domain
|
63
|
-
else
|
64
|
-
CLI::UI::Prompt.ask(message, options: organization["stores"].map { |s| s["shopDomain"] })
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|