shopify-cli 2.6.6 → 2.7.3
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/CODEOWNERS +2 -2
- data/.github/DESIGN.md +1 -1
- data/.github/ISSUE_TEMPLATE.md +7 -0
- data/.github/workflows/shopify.yml +1 -1
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.vscode/extensions.json +5 -0
- data/.vscode/settings.json +9 -0
- data/CHANGELOG.md +44 -4
- data/CONTRIBUTING.md +1 -29
- data/{Dockerfile → Codespace.dockerfile} +2 -2
- data/Gemfile.lock +5 -5
- data/README.md +20 -99
- data/Rakefile +27 -0
- data/Tests.dockerfile +35 -0
- data/assets/logo.png +0 -0
- data/dev.yml +1 -4
- 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/hashes/javy-arm-macos-v0.1.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-linux-v0.1.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-macos-v0.1.0.gz.sha256 +1 -0
- data/ext/javy/hashes/javy-x86_64-windows-v0.1.0.gz.sha256 +1 -0
- data/ext/javy/javy.rb +205 -0
- data/ext/javy/version +1 -0
- data/lib/project_types/extension/cli.rb +6 -3
- data/lib/project_types/extension/commands/build.rb +4 -8
- data/lib/project_types/extension/commands/create.rb +2 -5
- data/lib/project_types/extension/commands/extension_command.rb +1 -1
- data/lib/project_types/extension/features/argo_serve.rb +9 -23
- data/lib/project_types/extension/forms/questions/ask_template.rb +1 -5
- data/lib/project_types/extension/messages/messages.rb +0 -2
- data/lib/project_types/extension/models/development_server.rb +2 -2
- 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 +3 -1
- 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/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 +3 -5
- data/lib/project_types/rails/forms/create.rb +5 -6
- data/lib/project_types/rails/messages/messages.rb +6 -151
- data/lib/project_types/script/cli.rb +8 -2
- data/lib/project_types/script/commands/create.rb +2 -4
- data/lib/project_types/script/commands/javy.rb +29 -0
- data/lib/project_types/script/commands/push.rb +3 -2
- data/lib/project_types/script/config/extension_points.yml +12 -30
- data/lib/project_types/script/forms/ask_app.rb +32 -0
- data/lib/project_types/script/forms/ask_org.rb +30 -0
- data/lib/project_types/script/forms/ask_script_uuid.rb +22 -0
- data/lib/project_types/script/forms/run_against_shopify_org.rb +14 -0
- data/lib/project_types/script/graphql/app_script_set.graphql +2 -2
- data/lib/project_types/script/layers/application/build_script.rb +0 -1
- data/lib/project_types/script/layers/application/connect_app.rb +73 -0
- data/lib/project_types/script/layers/application/create_script.rb +1 -1
- data/lib/project_types/script/layers/application/push_script.rb +1 -1
- data/lib/project_types/script/layers/domain/errors.rb +1 -4
- data/lib/project_types/script/layers/domain/push_package.rb +3 -3
- data/lib/project_types/script/layers/domain/{script_json.rb → script_config.rb} +2 -2
- data/lib/project_types/script/layers/domain/script_project.rb +5 -1
- data/lib/project_types/script/layers/infrastructure/errors.rb +36 -7
- data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +0 -4
- data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +0 -4
- data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +2 -2
- data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +104 -27
- data/lib/project_types/script/layers/infrastructure/script_service.rb +11 -11
- data/lib/project_types/script/messages/messages.rb +21 -4
- data/lib/project_types/script/ui/error_handler.rb +31 -21
- 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 +4 -1
- data/lib/project_types/theme/commands/push.rb +5 -1
- data/lib/project_types/theme/commands/serve.rb +9 -3
- data/lib/project_types/theme/messages/messages.rb +39 -2
- data/lib/project_types/theme/ui/sync_progress_bar.rb +2 -2
- 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 +31 -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 +36 -0
- data/lib/shopify_cli/commands/app/create/php.rb +36 -0
- data/lib/shopify_cli/commands/app/create/rails.rb +38 -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 +7 -0
- data/lib/shopify_cli/context.rb +10 -0
- data/lib/shopify_cli/environment.rb +4 -0
- data/lib/shopify_cli/exception_reporter.rb +3 -4
- data/lib/shopify_cli/git.rb +14 -1
- data/lib/shopify_cli/github/issue_url_generator.rb +19 -0
- data/lib/shopify_cli/github.rb +5 -0
- data/lib/shopify_cli/identity_auth.rb +18 -0
- data/lib/shopify_cli/messages/messages.rb +254 -9
- data/lib/shopify_cli/partners_api.rb +1 -8
- 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/tasks/ensure_authenticated.rb +9 -3
- data/lib/shopify_cli/theme/dev_server/cdn_fonts.rb +73 -0
- data/lib/shopify_cli/theme/dev_server/hot-reload.js +25 -9
- data/lib/shopify_cli/theme/dev_server/local_assets.rb +1 -1
- data/lib/shopify_cli/theme/dev_server.rb +37 -18
- data/lib/shopify_cli/theme/syncer/error_reporter.rb +45 -0
- data/lib/shopify_cli/theme/syncer/operation.rb +56 -0
- data/lib/shopify_cli/theme/syncer/standard_reporter.rb +32 -0
- data/lib/shopify_cli/theme/syncer.rb +40 -39
- data/lib/shopify_cli/theme/theme.rb +31 -19
- data/lib/shopify_cli/tunnel.rb +26 -22
- data/lib/shopify_cli/version.rb +1 -1
- data/lib/shopify_cli.rb +1 -2
- data/shopify-cli.gemspec +1 -1
- data/shopify-dev +18 -0
- data/utilities/constants.rb +7 -0
- data/utilities/docker/container.rb +10 -3
- data/utilities/docker.rb +2 -2
- data/utilities/utilities.rb +1 -0
- data/vendor/deps/cli-kit/lib/cli/kit/system.rb +1 -1
- metadata +66 -50
- 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/install.sh +0 -7
- data/lib/project_types/extension/tasks/converters/server_config_converter.rb +0 -30
- data/lib/project_types/extension/tasks/load_server_config.rb +0 -28
- 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/tasks/ensure_env.rb +0 -106
- data/lib/shopify_cli/sub_command.rb +0 -17
- data/shopify.fish +0 -12
- data/shopify.sh +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f839cd234fbc37b84d85cc7ba1efddedf6b1571adba40562b3f4296286ca0130
|
4
|
+
data.tar.gz: fb66a6a0728d317bddc220e1af1c4fa0049bd42e34cbef6f4310daa19cfe9e86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11c1e49165ad7140139fe89b56e55287e6a3facca584c18234a4dbb302428d01a62cf2f4c5c27edf1943c9ec7f6610c8733fc1689b3cb78f9425b01c2f4f3836
|
7
|
+
data.tar.gz: 8fc34d5588a785bbd8fa7f47b0dc8f9682dc955a8c23aa733dd33e39e37ebc9fbe898c542314ea16604a7f08a384d54ec693c8eb129af7bde0a156567c345058
|
data/.devcontainer.json
ADDED
data/.github/CODEOWNERS
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
* @shopify/core-build-learn
|
2
2
|
* @shopify/development-lifecycle
|
3
3
|
|
4
|
-
/lib/project_types/script/ @shopify/scripts-
|
5
|
-
/test/project_types/script/ @shopify/scripts-
|
4
|
+
/lib/project_types/script/ @shopify/scripts-platform
|
5
|
+
/test/project_types/script/ @shopify/scripts-platform
|
data/.github/DESIGN.md
CHANGED
@@ -30,7 +30,7 @@ The user understands the following mechanics of a CLI:
|
|
30
30
|
When creating a new command or subcommand there are a few things to keep in mind.
|
31
31
|
|
32
32
|
### What is the quickest way to execute a command?
|
33
|
-
Commands are best executed autonomously. Most of the time the command should be self contained and should not
|
33
|
+
Commands are best executed autonomously. Most of the time the command should be self contained and should not require additional input from the user. For example when running `shopify populate products` the command will execute without additional inputs required from the user even though the command could ask for things like `product name`, `price`, etc.
|
34
34
|
|
35
35
|
When creating a new command or subcommand consider how much information is absolutely necessary for the command to execute autonomously. If a command always requires arguments or additional information then adding smart defaults could help make inputting the command faster.
|
36
36
|
|
data/.github/ISSUE_TEMPLATE.md
CHANGED
@@ -25,6 +25,13 @@ Tip: include an error message (in a `<details></details>` tag) if your issue is
|
|
25
25
|
1.
|
26
26
|
|
27
27
|
|
28
|
+
## Stacktrace
|
29
|
+
|
30
|
+
<!--Stacktrace
|
31
|
+
Add any stacktrace that might help debug the reported issue.
|
32
|
+
Otherwise, delete this section.
|
33
|
+
-->
|
34
|
+
|
28
35
|
|
29
36
|
## Specifications
|
30
37
|
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.7.
|
1
|
+
2.7.5
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,48 @@
|
|
1
1
|
From version 2.6.0, the sections in this file adhere to the [keep a changelog](https://keepachangelog.com/en/1.0.0/) specification.
|
2
|
-
##
|
2
|
+
## Version 2.7.3
|
3
|
+
### Added
|
4
|
+
* [#1826](https://github.com/Shopify/shopify-cli/pull/1826): Support using `script.config.yml` file for script configuration
|
5
|
+
* [#1843](https://github.com/Shopify/shopify-cli/pull/1826): Support using javy on Apple ARM processors
|
6
|
+
|
7
|
+
### Fixed
|
8
|
+
* [#1811](https://github.com/Shopify/shopify-cli/pull/1811): Update theme-check to 1.9.0
|
9
|
+
* [#1831](https://github.com/Shopify/shopify-cli/pull/1831): Ensure correct `ngrok` version is downloaded for Apple M1
|
10
|
+
* [#1823](https://github.com/Shopify/shopify-cli/pull/1823): Indicate git is unavailable; don't error out
|
11
|
+
* [#1807](https://github.com/Shopify/shopify-cli/pull/1807): Fix `--live` parameter, it should not imply `--allow-live` in the `theme push` command
|
12
|
+
* [#1812](https://github.com/Shopify/shopify-cli/pull/1812): App creation with Rails 7
|
13
|
+
* [#1821](https://github.com/Shopify/shopify-cli/pull/1821): Fix Shopify hosted fonts to load via the local preview URL
|
14
|
+
* [#1830](https://github.com/Shopify/shopify-cli/pull/1830): Fix hot reload when users update many files "simultaneously"
|
15
|
+
* [#1837](https://github.com/Shopify/shopify-cli/pull/1837): Fix `ShopifyCLI::Theme::DevServer::CdnFonts` class to support any font
|
16
|
+
|
17
|
+
## Version 2.7.2
|
18
|
+
### Fixed
|
19
|
+
* [#1763](https://github.com/Shopify/shopify-cli/pull/1763): Fix: Tunnel --PORT parameter not working in Node.js app.
|
20
|
+
* [#1769](https://github.com/Shopify/shopify-cli/pull/1769): Fix `theme push --development --json` to output the proper exit code
|
21
|
+
* [#1766](https://github.com/Shopify/shopify-cli/pull/1766): Fix `theme serve` failing with the `--host` property
|
22
|
+
* [#1771](https://github.com/Shopify/shopify-cli/pull/1771): Fix `theme push --development --json` to output errors in the STDERR
|
23
|
+
* [#1778](https://github.com/Shopify/shopify-cli/pull/1778): Fix ngrok installation check on Windows
|
24
|
+
* [#1798](https://github.com/Shopify/shopify-cli/pull/1798): Add `--live` option to the `theme pull` and the `theme push` commands
|
25
|
+
* [#1788](https://github.com/Shopify/shopify-cli/pull/1788): Improve `theme serve` errors and add logs for successful operations
|
26
|
+
* [#1794](https://github.com/Shopify/shopify-cli/pull/1794): Fix bug where hidden subcommands appear in the help menu.
|
27
|
+
|
28
|
+
## Version 2.7.1
|
29
|
+
### Fixed
|
30
|
+
* [#1722](https://github.com/Shopify/shopify-cli/pull/1722): Fix `theme serve` failing when the port is already being used
|
31
|
+
* [#1751](https://github.com/Shopify/shopify-cli/pull/1751): A bug in the app creation flow that caused the CLI to abort when the form validation failed.
|
32
|
+
* [#1750](https://github.com/Shopify/shopify-cli/pull/1750): Runtime errors in Windows' environments when the `PATHEXT` environment variable is not defined.
|
33
|
+
* [#1758](https://github.com/Shopify/shopify-cli/pull/1758): Fix tunnel creation for expired anonymous tunnels
|
34
|
+
|
35
|
+
## Version 2.7.0
|
36
|
+
### Changed
|
37
|
+
* [#1650](https://github.com/Shopify/shopify-cli/pull/1650): **Breaking** Move app commands under `shopify app`.
|
38
|
+
|
39
|
+
### Fixed
|
40
|
+
* [#1714](https://github.com/Shopify/shopify-cli/pull/1714): Fix theme serve not serving assets locally when two URLs are on the same line
|
41
|
+
* [#1729](https://github.com/Shopify/shopify-cli/pull/1729): Update theme-check to 1.8.0
|
3
42
|
|
4
43
|
## Version 2.6.6
|
5
44
|
### Added
|
6
|
-
* [#1609](https://github.com/Shopify/shopify-cli/pull/1609): Add `--bind=HOST` option to `shopify theme serve`.
|
45
|
+
* [#1609](https://github.com/Shopify/shopify-cli/pull/1609): Add `--http-bind=HOST` option to `shopify theme serve`.
|
7
46
|
|
8
47
|
### Fixed
|
9
48
|
* [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Fix migrator's incompatibility with Ruby 2.5.
|
@@ -30,6 +69,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
30
69
|
|
31
70
|
### Changed
|
32
71
|
* [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Automatic usage and error reporting configuration has been unified under `analytics.enabled`.
|
72
|
+
|
33
73
|
### Security
|
34
74
|
|
35
75
|
## Version 2.6.3
|
@@ -53,11 +93,11 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
53
93
|
* [#1553](https://github.com/Shopify/shopify-cli/pull/1553): Add support for PHP app projects
|
54
94
|
|
55
95
|
## Version 2.4.0
|
56
|
-
* [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update
|
96
|
+
* [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update theme-check to 1.4
|
57
97
|
* [#1507](https://github.com/Shopify/shopify-cli/pull/1507): Limit the generated name for themes to 50 characters
|
58
98
|
|
59
99
|
## Version 2.3.0
|
60
|
-
* [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update
|
100
|
+
* [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update theme-check to 1.2
|
61
101
|
* [#1457](https://github.com/Shopify/shopify-cli/pull/1457): Fix uploading of binary theme files under Windows
|
62
102
|
* [#1480](https://github.com/Shopify/shopify-cli/pull/1480): Fix customers pages not working with `theme serve`
|
63
103
|
* [#1479](https://github.com/Shopify/shopify-cli/pull/1479): Add theme push & pull option to ignore files per command
|
data/CONTRIBUTING.md
CHANGED
@@ -1,31 +1,3 @@
|
|
1
1
|
# Contributing
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
## Testing
|
6
|
-
|
7
|
-
The project employs a diverse suite tests that help ensure it works as intended and prevents regressions as it continues to grow and evolve.
|
8
|
-
|
9
|
-
### Unit Tests
|
10
|
-
Most of the internal components the project uses have unit tests to thoroughly test them. Here dependencies of components are mocked or stubbed appropriately to ensure tests are reliable, test only one component and are fast!
|
11
|
-
|
12
|
-
### Acceptance Tests
|
13
|
-
|
14
|
-
Acceptance tests run the built `shopify` command line against a wide range of fixtures and verify its output and results. They are the slowest to run however provide the most coverage. The idea is to test a few complete scenarios for each major feature.
|
15
|
-
|
16
|
-
Those are written in [Cucumber](https://cucumber.io/) and Ruby and can be found in the [`features/`](/features) directory. They can be executed by running:
|
17
|
-
|
18
|
-
```bash
|
19
|
-
bundle exec cucumber
|
20
|
-
bundle exec cucumber features/theme.feature:3 # A specific test
|
21
|
-
```
|
22
|
-
|
23
|
-
> **Note** that we currently don't have an approach for stubbing the interactions with the GraphQL APIs and that therefore we can't write acceptance tests for commands that interact with APIs.
|
24
|
-
|
25
|
-
#### Debugging acceptance tests
|
26
|
-
When developing acceptance tests, it can be helpful to see the outputs of running commands.
|
27
|
-
To see outputs, append `--verbose` when running an acceptance test. Example:
|
28
|
-
|
29
|
-
```sh
|
30
|
-
bundle exec cucumber features/theme.feature --verbose
|
31
|
-
```
|
3
|
+
Check out the [contributors' documentation](/docs)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# This is a Docker image to test the CLI in UNIX environments other than macOS
|
2
2
|
# Build the image: docker build . -t shopify-cli
|
3
3
|
# Run tests: docker run -t --rm --volume "$(pwd):/usr/src/app" shopify-cli bundle exec rake test
|
4
|
-
FROM cimg/ruby:2.7.
|
4
|
+
FROM cimg/ruby:2.7.5
|
5
5
|
|
6
6
|
RUN git config --global user.email "development-lifecycle@shopify.com"
|
7
7
|
RUN git config --global user.name "Development Lifecycle"
|
@@ -29,7 +29,7 @@ RUN sudo apt-get install -y nodejs
|
|
29
29
|
RUN sudo npm install --global yarn
|
30
30
|
|
31
31
|
# Python is necessary to compile NPM packages with native extensions through node-gyp
|
32
|
-
RUN sudo apt install
|
32
|
+
RUN sudo apt install python2-minimal -y
|
33
33
|
|
34
34
|
# Install sqlite3
|
35
35
|
RUN sudo apt-get install libsqlite3-dev -y
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
shopify-cli (2.
|
4
|
+
shopify-cli (2.7.3)
|
5
5
|
bugsnag (~> 6.22)
|
6
6
|
listen (~> 3.7.0)
|
7
|
-
theme-check (~> 1.
|
7
|
+
theme-check (~> 1.9.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -81,7 +81,7 @@ GEM
|
|
81
81
|
mini_portile2 (~> 2.6.1)
|
82
82
|
racc (~> 1.4)
|
83
83
|
parallel (1.21.0)
|
84
|
-
parser (3.0.
|
84
|
+
parser (3.0.3.1)
|
85
85
|
ast (~> 2.4.1)
|
86
86
|
pry (0.13.1)
|
87
87
|
coderay (~> 1.1)
|
@@ -90,7 +90,7 @@ GEM
|
|
90
90
|
byebug (~> 11.0)
|
91
91
|
pry (~> 0.13.0)
|
92
92
|
public_suffix (4.0.6)
|
93
|
-
racc (1.
|
93
|
+
racc (1.6.0)
|
94
94
|
rack (2.2.3)
|
95
95
|
rainbow (3.0.0)
|
96
96
|
rake (13.0.6)
|
@@ -119,7 +119,7 @@ GEM
|
|
119
119
|
ruby-progressbar (1.11.0)
|
120
120
|
sys-uname (1.2.2)
|
121
121
|
ffi (~> 1.1)
|
122
|
-
theme-check (1.
|
122
|
+
theme-check (1.9.0)
|
123
123
|
liquid (>= 5.1.0)
|
124
124
|
nokogiri (>= 1.12)
|
125
125
|
parser (~> 3)
|
data/README.md
CHANGED
@@ -1,113 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div align="center">
|
2
|
+
<img src="assets/logo.png" width="150"/>
|
3
|
+
<h1>Shopify CLI</h1>
|
4
|
+
<a href=""><img src="https://github.com/shopify/shopify-cli/workflows/CI/badge.svg" alt="Shopify"></a>
|
5
|
+
<img src="https://img.shields.io/github/v/release/shopify/shopify-cli?include_prereleases&style=flat-square" alt="Latest Version">
|
6
|
+
<img src="https://img.shields.io/github/forks/shopify/shopify-cli?style=flat-square" alt="GitHub forks">
|
7
|
+
<img src="https://img.shields.io/github/stars/shopify/shopify-cli?style=flat-square" alt="GitHub stars">
|
8
|
+
<img src="https://img.shields.io/github/commit-activity/w/shopify/shopify-cli?style=flat-square" alt="Commit Activity">
|
9
|
+
<img src="https://img.shields.io/github/contributors/shopify/shopify-cli?style=flat-square" alt="Contributors">
|
10
|
+
<img src="https://img.shields.io/github/commits-since/shopify/shopify-cli/latest?style=flat-square" alt="Latest Commits">
|
11
|
+
<a href="http://twitter.com/ShopifyDevs"><img src="https://img.shields.io/twitter/follow/ShopifyDevs?style=flat-square" alt="Twitter Followers"></a>
|
12
|
+
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License">
|
13
|
+
<img src="https://img.shields.io/badge/Powered%20by-Ruby-red" alt="Powered by Ruby">
|
14
|
+
</div>
|
5
15
|
|
6
16
|
|
7
17
|
Shopify CLI helps you build Shopify themes and apps. Use Shopify CLI to automate and enhance your local development workflow.
|
8
18
|
|
9
19
|
Shopify CLI is available as a gem and can be run and installed on Mac, Linux and Windows systems.
|
10
20
|
|
11
|
-
## Installation
|
12
|
-
|
13
|
-
- Make sure you have [Homebrew](https://brew.sh/) installed
|
14
|
-
- Open your terminal app
|
15
|
-
- Run `brew tap shopify/shopify`
|
16
|
-
- Run `brew install shopify-cli`
|
17
|
-
- After the installation is completed, run `shopify version`, if this outputs a version number you've successfully installed the CLI.
|
18
|
-
|
19
|
-
### To upgrade Shopify CLI
|
20
|
-
|
21
|
-
#### Homebrew (Mac OS)
|
22
|
-
|
23
|
-
```shell
|
24
|
-
$ brew update
|
25
|
-
$ brew upgrade shopify-cli
|
26
|
-
```
|
27
|
-
|
28
|
-
#### apt (Debian, Ubuntu)
|
29
|
-
|
30
|
-
1.- Download the latest `.deb` binary for Shopify CLI from the releases page.
|
31
|
-
|
32
|
-
2.- Install the downloaded file and make sure to replace /path/to/download/shopify-cli-x.y.z.deb with the path to your file's location:
|
33
|
-
|
34
|
-
```shell
|
35
|
-
$ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
|
36
|
-
```
|
37
|
-
|
38
|
-
#### yum (CentOS 8+, Fedora, Red Hat, SUSE)
|
39
|
-
|
40
|
-
1.- Download the latest .rpm file for Shopify App CLI from the releases page.
|
41
|
-
|
42
|
-
2.- Install the downloaded file and make sure to replace /path/to/downloaded/shopify-cli-x.y.x.rpm with the path to your file's location:
|
43
|
-
|
44
|
-
```shell
|
45
|
-
$ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
|
46
|
-
```
|
47
|
-
|
48
|
-
#### RubyGems (macOS, Linux, Windows 10)
|
49
|
-
|
50
|
-
```shell
|
51
|
-
$ gem update shopify-cli
|
52
|
-
```
|
53
|
-
|
54
|
-
|
55
|
-
## Command specification and semantics
|
56
|
-
|
57
|
-
Shopify CLI offers a command structure similar to other CLIs:
|
58
|
-
|
59
|
-
`shopify [ GLOBAL_ACTION | RESOURCE [ ACTION ] ] [ VARIADIC_ARGS ] [ OPTIONS ]`
|
60
|
-
|
61
|
-
The top level command will always be a **resource** or a **global action**:
|
62
|
-
|
63
|
-
- Resources represent Shopify concepts that you can work with in the CLI, for example `theme`.
|
64
|
-
- Usually, global actions are commands that alter the state of the CLI (e.g `config` or `login`)
|
65
|
-
|
66
|
-
Actions are commands that you can run to interact with a resource.
|
67
|
-
|
68
|
-
You can add `--help` or `-h` to the end of your command to get a full explanation of the available options for the command.
|
69
|
-
|
70
|
-
## Quick start guide for theme developers
|
71
|
-
|
72
|
-
This quick start guide shows you how to begin local theme development when working with a new theme from scratch.
|
73
|
-
|
74
|
-
### 1.- Authenticate the CLI
|
75
|
-
|
76
|
-
After you install Shopify CLI, you need to authenticate your CLI instance and connect to the store that you want to work on.
|
77
|
-
|
78
|
-
Run:
|
79
|
-
|
80
|
-
`shopify login --store=<your-shop-url>`
|
81
|
-
|
82
|
-
When prompted, open the provided accounts.shopify.com URL in a browser. In your browser window, log into the account that's attached to the store that you want to use for development.
|
83
|
-
|
84
|
-
### 2.- Create a new theme
|
85
|
-
|
86
|
-
Run:
|
87
|
-
|
88
|
-
`shopify theme init`
|
89
|
-
|
90
|
-
To initialize a theme on your current working directory. This will actually clone Shopify's starter theme which you should use as a reference when building themes for Shopify.
|
91
|
-
|
92
|
-
### 3.- Start the local theme server
|
93
|
-
|
94
|
-
Shopify CLI comes with a local theme server which lets you preview your changes live on your local machine.
|
95
|
-
|
96
|
-
After you create or navigate to your theme, you can run `shopify theme serve` to interact with the theme in a browser. Shopify CLI uploads the theme as a development theme on the store that you're connected to, and gives you an IP address and port to preview changes in real time using the store's data.
|
97
|
-
|
98
|
-
Run:
|
99
|
-
|
100
|
-
`shopify theme serve`
|
21
|
+
## Installation
|
101
22
|
|
102
|
-
|
23
|
+
Check out our [installation steps](docs/users/installation.md).
|
103
24
|
|
104
|
-
|
25
|
+
## Contributing 👩💻
|
105
26
|
|
106
|
-
|
27
|
+
Shopify CLI is an [open source tool](/LICENSE) and everyone is welcome to help the community by [contributing](/docs/README.md) to the project.
|
107
28
|
|
108
|
-
|
29
|
+
## Help 🖐
|
109
30
|
|
110
|
-
|
31
|
+
If you encounter issues using the CLI or have feedback you'd like to share with us, below are some options:
|
111
32
|
|
112
33
|
- [Open a GitHub issue](https://github.com/Shopify/shopify-cli/issues) - To report bugs or request new features, open an issue in the Shopify CLI repository.
|
113
34
|
|
data/Rakefile
CHANGED
@@ -146,6 +146,33 @@ namespace :extensions do
|
|
146
146
|
end
|
147
147
|
end
|
148
148
|
|
149
|
+
namespace :scripts do
|
150
|
+
namespace :javy do
|
151
|
+
task :symlink do
|
152
|
+
source = Paths.root("..", "javy", "target", "release", "javy")
|
153
|
+
error("Unable to find javy executable: #{executable}") unless File.executable?(source)
|
154
|
+
target = Paths.javy("javy")
|
155
|
+
File.delete(target) if File.exist?(target)
|
156
|
+
File.symlink(source, target)
|
157
|
+
end
|
158
|
+
|
159
|
+
task :install do
|
160
|
+
require_relative Paths.javy("javy.rb")
|
161
|
+
Javy.install
|
162
|
+
end
|
163
|
+
|
164
|
+
module Paths
|
165
|
+
def self.javy(*args)
|
166
|
+
root("ext", "javy", *args)
|
167
|
+
end
|
168
|
+
|
169
|
+
def self.root(*args)
|
170
|
+
Pathname(File.dirname(__FILE__)).join(*args).to_s
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
149
176
|
def error(message, output: STDERR, code: 1)
|
150
177
|
output.puts(message)
|
151
178
|
exit(code)
|
data/Tests.dockerfile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# This is a Docker image to test the CLI in UNIX environments other than macOS
|
2
|
+
# Build the image: docker build . -t shopify-cli
|
3
|
+
# Run tests: docker run -t --rm --volume "$(pwd):/usr/src/app" shopify-cli bundle exec rake test
|
4
|
+
FROM cimg/ruby:2.7.5
|
5
|
+
|
6
|
+
RUN git config --global user.email "development-lifecycle@shopify.com"
|
7
|
+
RUN git config --global user.name "Development Lifecycle"
|
8
|
+
|
9
|
+
RUN gem update bundler
|
10
|
+
|
11
|
+
WORKDIR /usr/src/app
|
12
|
+
|
13
|
+
COPY Gemfile Gemfile.lock ./
|
14
|
+
COPY shopify-cli.gemspec shopify-cli.gemspec
|
15
|
+
COPY lib/shopify_cli/version.rb lib/shopify_cli/version.rb
|
16
|
+
RUN bundle install
|
17
|
+
|
18
|
+
# Update git
|
19
|
+
RUN sudo add-apt-repository -y ppa:git-core/ppa
|
20
|
+
RUN sudo apt-get update
|
21
|
+
RUN sudo apt-get install git -y
|
22
|
+
|
23
|
+
# Install the latest version of NodeJS
|
24
|
+
RUN sudo apt-get install ca-certificates -y
|
25
|
+
RUN curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
|
26
|
+
RUN sudo apt-get install -y nodejs
|
27
|
+
|
28
|
+
# Install the latest version of Yarn
|
29
|
+
RUN sudo npm install --global yarn
|
30
|
+
|
31
|
+
# Python is necessary to compile NPM packages with native extensions through node-gyp
|
32
|
+
RUN sudo apt install python2-minimal -y
|
33
|
+
|
34
|
+
# Install sqlite3
|
35
|
+
RUN sudo apt-get install libsqlite3-dev -y
|
data/assets/logo.png
ADDED
Binary file
|
data/dev.yml
CHANGED
data/docs/README.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Documentation
|
2
|
+
|
3
|
+
This directory contains documentation for **contributors** of the Shopify CLI.
|
4
|
+
It also contains documentation that is relevant to **users** like migration guidelines.
|
5
|
+
|
6
|
+
## Contributors
|
7
|
+
|
8
|
+
- [**Testing**](contributors/testing.md): Read about testing strategies and how they are used across the codebase.
|
9
|
+
|
10
|
+
## Users
|
11
|
+
|
12
|
+
- [**Installation**](users/installation.md): Learn how to install the Shopify CLI in different OSs.
|
13
|
+
- [**Migrate from theme-kit**](users/migrate-from-themekit.md): If you were previously using theme-kit, check out this documentation to learn how to migrate to the Shopify CLI theme commands.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
## Testing
|
2
|
+
|
3
|
+
The project employs a diverse suite tests that help ensure it works as intended and prevents regressions as it continues to grow and evolve.
|
4
|
+
|
5
|
+
### Unit Tests
|
6
|
+
Most of the internal components the project uses have unit tests to thoroughly test them. Here dependencies of components are mocked or stubbed appropriately to ensure tests are reliable, test only one component and are fast!
|
7
|
+
|
8
|
+
### Acceptance Tests
|
9
|
+
|
10
|
+
Acceptance tests run the built `shopify` command line against a wide range of fixtures and verify its output and results. They are the slowest to run however provide the most coverage. The idea is to test a few complete scenarios for each major feature.
|
11
|
+
|
12
|
+
Those are written in [Cucumber](https://cucumber.io/) and Ruby and can be found in the [`features/`](/features) directory. They can be executed by running:
|
13
|
+
|
14
|
+
```bash
|
15
|
+
bundle exec cucumber
|
16
|
+
bundle exec cucumber features/theme.feature:3 # A specific test
|
17
|
+
```
|
18
|
+
|
19
|
+
> **Note** that we currently don't have an approach for stubbing the interactions with the GraphQL APIs and that therefore we can't write acceptance tests for commands that interact with APIs.
|
20
|
+
|
21
|
+
#### Debugging acceptance tests
|
22
|
+
When developing acceptance tests, it can be helpful to see the outputs of running commands.
|
23
|
+
To see outputs, append `--verbose` when running an acceptance test. Example:
|
24
|
+
|
25
|
+
```sh
|
26
|
+
bundle exec cucumber features/theme.feature --verbose
|
27
|
+
```
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# Installation
|
2
|
+
|
3
|
+
## Installation through RubyGems
|
4
|
+
|
5
|
+
The easiest method to install the Shopify CLI is through RubyGems:
|
6
|
+
|
7
|
+
```shell
|
8
|
+
$ gem install shopify-cli
|
9
|
+
```
|
10
|
+
|
11
|
+
## Installation for macOS Users
|
12
|
+
|
13
|
+
- Make sure you have [Homebrew](https://brew.sh/) installed
|
14
|
+
- Open your terminal app
|
15
|
+
- Run `brew tap shopify/shopify`
|
16
|
+
- Run `brew install shopify-cli`
|
17
|
+
- After the installation is completed, run `shopify version`, if this outputs a version number you've successfully installed the CLI.
|
18
|
+
|
19
|
+
### To upgrade Shopify CLI
|
20
|
+
|
21
|
+
#### Homebrew (Mac OS)
|
22
|
+
|
23
|
+
```shell
|
24
|
+
$ brew update
|
25
|
+
$ brew upgrade shopify-cli
|
26
|
+
```
|
27
|
+
|
28
|
+
## Installation for Debian and Ubuntu users through `apt`
|
29
|
+
|
30
|
+
1.- Download the latest `.deb` binary for Shopify CLI from the releases page.
|
31
|
+
|
32
|
+
2.- Install the downloaded file and make sure to replace /path/to/download/shopify-cli-x.y.z.deb with the path to your file's location:
|
33
|
+
|
34
|
+
```shell
|
35
|
+
$ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
|
36
|
+
```
|
37
|
+
|
38
|
+
## Installation for CentOS 8+, Fedora, Red Hat, and SUSE users through `yum`
|
39
|
+
|
40
|
+
1.- Download the latest .rpm file for Shopify App CLI from the releases page.
|
41
|
+
|
42
|
+
2.- Install the downloaded file and make sure to replace /path/to/downloaded/shopify-cli-x.y.x.rpm with the path to your file's location:
|
43
|
+
|
44
|
+
```shell
|
45
|
+
$ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
|
46
|
+
```
|
@@ -0,0 +1 @@
|
|
1
|
+
16e1a74c06eff6e5be79253a8ee96a08a404e95be3479a6e384c8926bb736e43
|
@@ -0,0 +1 @@
|
|
1
|
+
53cb9d0e8a345d68f91512a28a7d2eab93463dc8650c7a044f03cbee1f7cac05
|
@@ -0,0 +1 @@
|
|
1
|
+
5e1ca88385206a653980139ab969efd80de11fd9b298dafe450d3ac27d6d0173
|
@@ -0,0 +1 @@
|
|
1
|
+
37f9b3f75b4ffca68b06656d6f90abfbac57597ee45fffb59b3a559b6b5de44e
|