shopify-cli 2.6.4 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.devcontainer.json +5 -0
- data/.github/DESIGN.md +1 -1
- data/.github/ISSUE_TEMPLATE.md +7 -0
- data/.gitignore +1 -0
- data/.vscode/extensions.json +5 -0
- data/.vscode/settings.json +9 -0
- data/CHANGELOG.md +35 -3
- data/CONTRIBUTING.md +1 -21
- data/{Dockerfile → Codespace.dockerfile} +11 -3
- data/Gemfile +1 -0
- data/Gemfile.lock +6 -4
- data/README.md +20 -99
- data/Rakefile +27 -0
- data/Tests.dockerfile +35 -0
- data/assets/logo.png +0 -0
- data/dev.yml +0 -3
- data/docs/README.md +13 -0
- data/docs/contributors/testing.md +27 -0
- data/docs/users/installation.md +46 -0
- data/{THEMEKIT_MIGRATION.md → docs/users/migrate-from-themekit.md} +1 -1
- data/ext/javy/javy.rb +186 -0
- data/ext/javy/version +1 -0
- data/lib/project_types/extension/cli.rb +7 -3
- data/lib/project_types/extension/commands/build.rb +1 -0
- data/lib/project_types/extension/commands/create.rb +6 -6
- data/lib/project_types/extension/commands/extension_command.rb +1 -1
- data/lib/project_types/extension/features/argo.rb +1 -8
- data/lib/project_types/extension/features/argo_serve.rb +9 -23
- data/lib/project_types/extension/forms/create.rb +1 -1
- data/lib/project_types/extension/forms/questions/ask_template.rb +3 -6
- data/lib/project_types/extension/messages/messages.rb +1 -0
- data/lib/project_types/extension/models/development_server_requirements.rb +2 -3
- data/lib/project_types/extension/models/server_config/app.rb +13 -0
- data/lib/project_types/extension/models/server_config/development.rb +5 -4
- data/lib/project_types/extension/models/server_config/development_renderer.rb +1 -1
- data/lib/project_types/extension/models/server_config/development_resource.rb +13 -0
- data/lib/project_types/extension/models/server_config/extension.rb +4 -0
- data/lib/project_types/extension/models/server_config/root.rb +4 -1
- data/lib/project_types/extension/tasks/convert_server_config.rb +65 -0
- data/lib/project_types/extension/tasks/ensure_resource_url.rb +39 -0
- data/lib/project_types/extension/tasks/find_package_from_json.rb +37 -0
- data/lib/project_types/extension/tasks/merge_server_config.rb +32 -0
- data/lib/project_types/extension/tasks/run_extension_command.rb +11 -10
- data/lib/project_types/node/cli.rb +0 -16
- data/lib/project_types/node/forms/create.rb +5 -5
- data/lib/project_types/node/messages/messages.rb +2 -144
- data/lib/project_types/php/cli.rb +0 -11
- data/lib/project_types/php/forms/create.rb +5 -6
- data/lib/project_types/php/messages/messages.rb +2 -161
- data/lib/project_types/rails/cli.rb +0 -16
- data/lib/project_types/rails/commands/create.rb +46 -17
- data/lib/project_types/rails/forms/create.rb +5 -7
- data/lib/project_types/rails/messages/messages.rb +6 -151
- data/lib/project_types/script/cli.rb +2 -1
- data/lib/project_types/script/commands/create.rb +2 -5
- data/lib/project_types/script/commands/javy.rb +31 -0
- data/lib/project_types/script/commands/push.rb +1 -1
- data/lib/project_types/script/config/extension_points.yml +3 -0
- data/lib/project_types/script/errors.rb +0 -18
- data/lib/project_types/script/layers/application/create_script.rb +2 -2
- data/lib/project_types/script/layers/domain/script_json.rb +1 -1
- data/lib/project_types/script/layers/infrastructure/api_clients/partners_proxy_api_client.rb +0 -4
- data/lib/project_types/script/layers/infrastructure/errors.rb +8 -3
- data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +22 -3
- data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +25 -0
- data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +3 -4
- data/lib/project_types/script/layers/infrastructure/script_service.rb +1 -1
- data/lib/project_types/script/messages/messages.rb +16 -22
- data/lib/project_types/script/ui/error_handler.rb +1 -27
- data/lib/project_types/theme/cli.rb +1 -1
- data/lib/project_types/theme/commands/check.rb +1 -1
- data/lib/project_types/theme/commands/delete.rb +1 -1
- data/lib/project_types/theme/commands/init.rb +1 -1
- data/lib/project_types/theme/commands/language_server.rb +1 -1
- data/lib/project_types/theme/commands/package.rb +1 -1
- data/lib/project_types/theme/commands/publish.rb +1 -1
- data/lib/project_types/theme/commands/pull.rb +1 -1
- data/lib/project_types/theme/commands/push.rb +1 -1
- data/lib/project_types/theme/commands/serve.rb +9 -2
- data/lib/project_types/theme/messages/messages.rb +30 -1
- data/lib/shopify_cli/admin_api/populate_resource_command.rb +1 -1
- data/lib/shopify_cli/api.rb +7 -2
- data/lib/shopify_cli/app_type_detector.rb +24 -20
- data/lib/shopify_cli/command/app_sub_command.rb +10 -0
- data/lib/shopify_cli/command/project_command.rb +18 -0
- data/lib/shopify_cli/command/sub_command.rb +19 -0
- data/lib/shopify_cli/command.rb +7 -2
- data/lib/shopify_cli/commands/app/connect.rb +22 -0
- data/lib/shopify_cli/commands/app/create/node.rb +38 -0
- data/lib/shopify_cli/commands/app/create/php.rb +36 -0
- data/lib/shopify_cli/commands/app/create/rails.rb +40 -0
- data/lib/shopify_cli/commands/app/create.rb +28 -0
- data/lib/shopify_cli/commands/app/deploy.rb +49 -0
- data/lib/shopify_cli/commands/app/open.rb +19 -0
- data/lib/shopify_cli/commands/app/serve.rb +49 -0
- data/lib/shopify_cli/commands/app/tunnel.rb +43 -0
- data/lib/shopify_cli/commands/app.rb +29 -0
- data/lib/shopify_cli/commands/config.rb +2 -2
- data/lib/shopify_cli/commands.rb +1 -0
- data/lib/shopify_cli/constants.rb +4 -0
- data/lib/shopify_cli/exception_reporter.rb +8 -6
- data/lib/shopify_cli/git.rb +12 -1
- data/lib/shopify_cli/github/issue_url_generator.rb +19 -0
- data/lib/shopify_cli/github.rb +5 -0
- data/lib/shopify_cli/messages/messages.rb +253 -9
- data/lib/shopify_cli/migrator.rb +9 -11
- data/lib/shopify_cli/project.rb +5 -1
- data/lib/shopify_cli/project_commands.rb +1 -1
- data/lib/shopify_cli/services/app/connect_service.rb +25 -0
- data/lib/shopify_cli/services/app/create/node_service.rb +155 -0
- data/lib/shopify_cli/services/app/create/php_service.rb +152 -0
- data/lib/shopify_cli/services/app/create/rails_service.rb +215 -0
- data/lib/shopify_cli/services/app/deploy/heroku/node_service.rb +101 -0
- data/lib/shopify_cli/services/app/deploy/heroku/php_service.rb +135 -0
- data/lib/shopify_cli/services/app/deploy/heroku/rails_service.rb +120 -0
- data/lib/shopify_cli/services/app/open_service.rb +19 -0
- data/lib/shopify_cli/services/app/serve/node_service.rb +42 -0
- data/lib/shopify_cli/services/app/serve/php_service.rb +46 -0
- data/lib/shopify_cli/services/app/serve/rails_service.rb +48 -0
- data/lib/shopify_cli/services/app/tunnel/auth_service.rb +21 -0
- data/lib/shopify_cli/services/app/tunnel/start_service.rb +20 -0
- data/lib/shopify_cli/services/app/tunnel/stop_service.rb +20 -0
- data/lib/shopify_cli/services.rb +31 -0
- data/lib/shopify_cli/theme/dev_server/local_assets.rb +1 -1
- data/lib/shopify_cli/theme/dev_server.rb +35 -17
- data/lib/shopify_cli/tunnel.rb +25 -20
- data/lib/shopify_cli/version.rb +1 -1
- data/lib/shopify_cli.rb +1 -2
- data/shopify-cli.gemspec +2 -6
- data/shopify-dev +18 -0
- data/utilities/constants.rb +7 -0
- data/utilities/docker/container.rb +30 -2
- data/utilities/docker.rb +3 -2
- data/utilities/utilities.rb +1 -0
- data/vendor/deps/cli-kit/lib/cli/kit/system.rb +1 -1
- metadata +56 -53
- data/docs/_config.yml +0 -2
- data/docs/app/node/commands/index.md +0 -4
- data/docs/app/node/index.md +0 -4
- data/docs/app/rails/commands/index.md +0 -4
- data/docs/app/rails/index.md +0 -4
- data/docs/core/index.md +0 -4
- data/docs/getting-started/index.md +0 -4
- data/docs/getting-started/install/index.md +0 -4
- data/docs/getting-started/migrate/index.md +0 -4
- data/docs/getting-started/uninstall/index.md +0 -4
- data/docs/getting-started/upgrade/index.md +0 -4
- data/docs/help/start-app/index.md +0 -4
- data/docs/index.md +0 -4
- data/ext/shopify-cli/extconf.rb +0 -60
- data/install.sh +0 -7
- data/lib/project_types/extension/tasks/converters/server_config_converter.rb +0 -31
- data/lib/project_types/extension/tasks/load_server_config.rb +0 -23
- data/lib/project_types/node/commands/connect.rb +0 -21
- data/lib/project_types/node/commands/create.rb +0 -125
- data/lib/project_types/node/commands/deploy/heroku.rb +0 -96
- data/lib/project_types/node/commands/deploy.rb +0 -32
- data/lib/project_types/node/commands/generate.rb +0 -22
- data/lib/project_types/node/commands/open.rb +0 -18
- data/lib/project_types/node/commands/serve.rb +0 -45
- data/lib/project_types/node/commands/tunnel.rb +0 -41
- data/lib/project_types/php/commands/connect.rb +0 -19
- data/lib/project_types/php/commands/create.rb +0 -143
- data/lib/project_types/php/commands/deploy/heroku.rb +0 -129
- data/lib/project_types/php/commands/deploy.rb +0 -32
- data/lib/project_types/php/commands/open.rb +0 -16
- data/lib/project_types/php/commands/serve.rb +0 -48
- data/lib/project_types/php/commands/tunnel.rb +0 -37
- data/lib/project_types/rails/commands/connect.rb +0 -21
- data/lib/project_types/rails/commands/deploy/heroku.rb +0 -115
- data/lib/project_types/rails/commands/deploy.rb +0 -32
- data/lib/project_types/rails/commands/generate/webhook.rb +0 -42
- data/lib/project_types/rails/commands/generate.rb +0 -60
- data/lib/project_types/rails/commands/open.rb +0 -18
- data/lib/project_types/rails/commands/serve.rb +0 -51
- data/lib/project_types/rails/commands/tunnel.rb +0 -41
- data/lib/project_types/script/graphql/app_script_update_or_create.graphql +0 -0
- data/lib/shopify_cli/sub_command.rb +0 -17
- data/shopify.fish +0 -12
- data/shopify.sh +0 -11
@@ -1,18 +0,0 @@
|
|
1
|
-
require "shopify_cli"
|
2
|
-
|
3
|
-
module Rails
|
4
|
-
class Command
|
5
|
-
class Open < ShopifyCLI::SubCommand
|
6
|
-
prerequisite_task ensure_project_type: :rails
|
7
|
-
|
8
|
-
def call(*)
|
9
|
-
project = ShopifyCLI::Project.current
|
10
|
-
@ctx.open_url!("#{project.env.host}/login?shop=#{project.env.shop}")
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.help
|
14
|
-
ShopifyCLI::Context.message("rails.open.help", ShopifyCLI::TOOL_NAME)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
module Rails
|
3
|
-
class Command
|
4
|
-
class Serve < ShopifyCLI::SubCommand
|
5
|
-
include ShopifyCLI::CommandOptions::CommandServeOptions
|
6
|
-
|
7
|
-
prerequisite_task ensure_project_type: :rails
|
8
|
-
prerequisite_task :ensure_env, :ensure_dev_store
|
9
|
-
|
10
|
-
parse_host_option
|
11
|
-
parse_port_option
|
12
|
-
|
13
|
-
def call(*)
|
14
|
-
project = ShopifyCLI::Project.current
|
15
|
-
tunnel_port = port.to_s
|
16
|
-
url = host || ShopifyCLI::Tunnel.start(@ctx, port: tunnel_port)
|
17
|
-
project.env.update(@ctx, :host, url)
|
18
|
-
ShopifyCLI::Tasks::UpdateDashboardURLS.call(
|
19
|
-
@ctx,
|
20
|
-
url: url,
|
21
|
-
callback_url: "/auth/shopify/callback",
|
22
|
-
)
|
23
|
-
|
24
|
-
if project.env.shop
|
25
|
-
project_url = "#{project.env.host}/login?shop=#{project.env.shop}"
|
26
|
-
@ctx.puts("\n" + @ctx.message("rails.serve.open_info", project_url) + "\n")
|
27
|
-
end
|
28
|
-
|
29
|
-
CLI::UI::Frame.open(@ctx.message("rails.serve.running_server")) do
|
30
|
-
env = ShopifyCLI::Project.current.env.to_h
|
31
|
-
env.delete("HOST")
|
32
|
-
env["PORT"] = tunnel_port
|
33
|
-
env["GEM_PATH"] = Gem.gem_path(@ctx)
|
34
|
-
if @ctx.windows?
|
35
|
-
@ctx.system("ruby bin\\rails server", env: env)
|
36
|
-
else
|
37
|
-
@ctx.system("bin/rails server", env: env)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def self.help
|
43
|
-
ShopifyCLI::Context.message("rails.serve.help", ShopifyCLI::TOOL_NAME)
|
44
|
-
end
|
45
|
-
|
46
|
-
def self.extended_help
|
47
|
-
ShopifyCLI::Context.message("rails.serve.extended_help", ShopifyCLI::TOOL_NAME)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "shopify_cli"
|
4
|
-
|
5
|
-
module Rails
|
6
|
-
class Command
|
7
|
-
class Tunnel < ShopifyCLI::SubCommand
|
8
|
-
# subcommands :auth, :start, :stop
|
9
|
-
|
10
|
-
prerequisite_task ensure_project_type: :rails
|
11
|
-
|
12
|
-
def call(args, _name)
|
13
|
-
subcommand = args.shift
|
14
|
-
case subcommand
|
15
|
-
when "auth"
|
16
|
-
token = args.shift
|
17
|
-
if token.nil?
|
18
|
-
@ctx.puts(@ctx.message("rails.tunnel.error.token_argument_missing"))
|
19
|
-
@ctx.puts("#{self.class.help}\n#{self.class.extended_help}")
|
20
|
-
else
|
21
|
-
ShopifyCLI::Tunnel.auth(@ctx, token)
|
22
|
-
end
|
23
|
-
when "start"
|
24
|
-
ShopifyCLI::Tunnel.start(@ctx)
|
25
|
-
when "stop"
|
26
|
-
ShopifyCLI::Tunnel.stop(@ctx)
|
27
|
-
else
|
28
|
-
@ctx.puts(self.class.help)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def self.help
|
33
|
-
ShopifyCLI::Context.message("rails.tunnel.help", ShopifyCLI::TOOL_NAME)
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.extended_help
|
37
|
-
ShopifyCLI::Context.message("rails.tunnel.extended_help", ShopifyCLI::TOOL_NAME)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
File without changes
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
require "shopify_cli"
|
3
|
-
|
4
|
-
module ShopifyCLI
|
5
|
-
class SubCommand < Command
|
6
|
-
class << self
|
7
|
-
def call(args, command_name, parent_command)
|
8
|
-
cmd = new(@ctx)
|
9
|
-
args = cmd.options.parse(@_options, args[1..-1] || [])
|
10
|
-
return call_help(parent_command, command_name) if cmd.options.help
|
11
|
-
run_prerequisites
|
12
|
-
|
13
|
-
cmd.call(args, command_name)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/shopify.fish
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
#!/usr/bin/env fish
|
2
|
-
# vi: ft=fish
|
3
|
-
|
4
|
-
# If we're not already in a shim environment but still tried to set up a shim, print out the re-installation warning
|
5
|
-
type -t shopify > /dev/null 2>&1
|
6
|
-
if [ $status != "0" ]
|
7
|
-
echo "This version of Shopify CLI is no longer supported. You’ll need to migrate to the new CLI version to continue.
|
8
|
-
|
9
|
-
Please visit this page for complete instructions:
|
10
|
-
https://shopify.dev/tools/cli/troubleshooting#migrate-from-a-legacy-version
|
11
|
-
"
|
12
|
-
end
|
data/shopify.sh
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
# If we're not already in a shim environment but still tried to set up a shim, print out the re-installation warning
|
4
|
-
typeset -f shopify > /dev/null 2>&1
|
5
|
-
if [ "$?" != "0" ]; then
|
6
|
-
echo "This version of Shopify CLI is no longer supported. You’ll need to migrate to the new CLI version to continue.
|
7
|
-
|
8
|
-
Please visit this page for complete instructions:
|
9
|
-
https://shopify.dev/tools/cli/troubleshooting#migrate-from-a-legacy-version
|
10
|
-
"
|
11
|
-
fi
|