shopify-cli 2.6.5 → 2.7.2
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 +42 -4
- 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 +4 -8
- data/lib/project_types/extension/commands/create.rb +3 -5
- 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 -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 +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 +43 -16
- 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 +7 -1
- data/lib/project_types/script/commands/create.rb +3 -8
- 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 +3 -26
- data/lib/project_types/script/errors.rb +0 -18
- 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/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 +2 -2
- data/lib/project_types/script/layers/domain/script_json.rb +1 -1
- data/lib/project_types/script/layers/domain/script_project.rb +4 -0
- 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 -4
- data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +1 -5
- data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +25 -4
- 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 -20
- data/lib/project_types/script/ui/error_handler.rb +1 -32
- 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 +7 -2
- data/lib/project_types/theme/commands/serve.rb +9 -2
- data/lib/project_types/theme/messages/messages.rb +39 -1
- 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 +9 -0
- data/lib/shopify_cli/environment.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/identity_auth.rb +18 -0
- data/lib/shopify_cli/messages/messages.rb +254 -9
- data/lib/shopify_cli/migrator.rb +9 -11
- 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/local_assets.rb +1 -1
- data/lib/shopify_cli/theme/dev_server.rb +35 -17
- 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 +25 -22
- 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 +64 -54
- 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/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: b15f9181fc2d774f3fcc0c7297881090097c32a873f5586a766a9f1af3ca4771
|
4
|
+
data.tar.gz: b05883edae91e131bbe30ea0fcf78fc7b7c31d775299ee37e7ce4b14b14f875a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd64941e6aee6553c078d9cb52c9ff97d04f2975d396943cb94b009e862ea14e2be44632534786288fdc71075bea47337d474a63a87d889393ecb159848c5958
|
7
|
+
data.tar.gz: 24086b852a37609e95cc6a3f3c639b4d7b32c90b3b8b3db8154dd840f86f72b13b9c09b060e3f6da3dfeaa905e5a0c93c31c607c7ba7d7ea4d0029b80a90025e
|
data/.devcontainer.json
ADDED
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/CHANGELOG.md
CHANGED
@@ -1,6 +1,43 @@
|
|
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.2
|
3
|
+
### Fixed
|
4
|
+
* [#1763](https://github.com/Shopify/shopify-cli/pull/1763): Fix: Tunnel --PORT parameter not working in Node.js app.
|
5
|
+
* [#1769](https://github.com/Shopify/shopify-cli/pull/1769): Fix `theme push --development --json` to output the proper exit code
|
6
|
+
* [#1766](https://github.com/Shopify/shopify-cli/pull/1766): Fix `theme serve` failing with the `--host` property
|
7
|
+
* [#1771](https://github.com/Shopify/shopify-cli/pull/1771): Fix `theme push --development --json` to output errors in the STDERR
|
8
|
+
* [#1778](https://github.com/Shopify/shopify-cli/pull/1778): Fix ngrok installation check on Windows
|
9
|
+
* [#1798](https://github.com/Shopify/shopify-cli/pull/1798): Add `--live` option to the `theme pull` and the `theme push` commands
|
10
|
+
* [#1788](https://github.com/Shopify/shopify-cli/pull/1788): Improve `theme serve` errors and add logs for successful operations
|
11
|
+
* [#1794](https://github.com/Shopify/shopify-cli/pull/1794): Fix bug where hidden subcommands appear in the help menu.
|
12
|
+
|
13
|
+
## Version 2.7.1
|
14
|
+
### Fixed
|
15
|
+
* [#1722](https://github.com/Shopify/shopify-cli/pull/1722): Fix `theme serve` failing when the port is already being used
|
16
|
+
* [#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.
|
17
|
+
* [#1750](https://github.com/Shopify/shopify-cli/pull/1750): Runtime errors in Windows' environments when the `PATHEXT` environment variable is not defined.
|
18
|
+
* [#1758](https://github.com/Shopify/shopify-cli/pull/1758): Fix tunnel creation for expired anonymous tunnels
|
19
|
+
|
20
|
+
## Version 2.7.0
|
21
|
+
### Changed
|
22
|
+
* [#1650](https://github.com/Shopify/shopify-cli/pull/1650): **Breaking** Move app commands under `shopify app`.
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
* [#1714](https://github.com/Shopify/shopify-cli/pull/1714): Fix theme serve not serving assets locally when two URLs are on the same line
|
26
|
+
* [#1729](https://github.com/Shopify/shopify-cli/pull/1729): Update theme-check to 1.8.0
|
27
|
+
|
28
|
+
## Version 2.6.6
|
29
|
+
### Added
|
30
|
+
* [#1609](https://github.com/Shopify/shopify-cli/pull/1609): Add `--http-bind=HOST` option to `shopify theme serve`.
|
3
31
|
|
32
|
+
### Fixed
|
33
|
+
* [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Fix migrator's incompatibility with Ruby 2.5.
|
34
|
+
* [#1690](https://github.com/Shopify/shopify-cli/pull/1690): Fix `extension push` command for `PRODUCT_SUBSCRIPTION` extensions
|
35
|
+
|
36
|
+
### Changed
|
37
|
+
* [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Change the `@shopify/scripts-checkout-apis-temp` package name to `@shopify/scripts-discount-apis`.
|
38
|
+
|
39
|
+
### Removed
|
40
|
+
* [#1664](https://github.com/Shopify/shopify-cli/pull/1664): Remove ruby-locking extension
|
4
41
|
## Version 2.6.5
|
5
42
|
### Fixed
|
6
43
|
* [#1661](https://github.com/Shopify/shopify-cli/pull/1661): Handle npm list non-zero exit status when pushing scripts
|
@@ -17,6 +54,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
17
54
|
|
18
55
|
### Changed
|
19
56
|
* [#1635](https://github.com/Shopify/shopify-cli/pull/1635): Automatic usage and error reporting configuration has been unified under `analytics.enabled`.
|
57
|
+
|
20
58
|
### Security
|
21
59
|
|
22
60
|
## Version 2.6.3
|
@@ -24,7 +62,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
24
62
|
|
25
63
|
## Version 2.6.2
|
26
64
|
* Fix broken installation due to a missing variable in `extconf.rb`
|
27
|
-
|
65
|
+
|
28
66
|
## Version 2.6.1
|
29
67
|
* [#1608](https://github.com/Shopify/shopify-cli/pull/1608): Fix errors not being reported.
|
30
68
|
## Version 2.6.0
|
@@ -40,11 +78,11 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
|
|
40
78
|
* [#1553](https://github.com/Shopify/shopify-cli/pull/1553): Add support for PHP app projects
|
41
79
|
|
42
80
|
## Version 2.4.0
|
43
|
-
* [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update
|
81
|
+
* [#1488](https://github.com/Shopify/shopify-cli/pull/1488): Update theme-check to 1.4
|
44
82
|
* [#1507](https://github.com/Shopify/shopify-cli/pull/1507): Limit the generated name for themes to 50 characters
|
45
83
|
|
46
84
|
## Version 2.3.0
|
47
|
-
* [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update
|
85
|
+
* [#1386](https://github.com/Shopify/shopify-cli/pull/1386): Update theme-check to 1.2
|
48
86
|
* [#1457](https://github.com/Shopify/shopify-cli/pull/1457): Fix uploading of binary theme files under Windows
|
49
87
|
* [#1480](https://github.com/Shopify/shopify-cli/pull/1480): Fix customers pages not working with `theme serve`
|
50
88
|
* [#1479](https://github.com/Shopify/shopify-cli/pull/1479): Add theme push & pull option to ignore files per command
|
data/CONTRIBUTING.md
CHANGED
@@ -1,23 +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.
|
3
|
+
Check out the [contributors' documentation](/docs)
|
@@ -6,8 +6,7 @@ FROM cimg/ruby:2.7.1
|
|
6
6
|
RUN git config --global user.email "development-lifecycle@shopify.com"
|
7
7
|
RUN git config --global user.name "Development Lifecycle"
|
8
8
|
|
9
|
-
|
10
|
-
RUN bundle config --global frozen 1
|
9
|
+
RUN gem update bundler
|
11
10
|
|
12
11
|
WORKDIR /usr/src/app
|
13
12
|
|
@@ -24,4 +23,13 @@ RUN sudo apt-get install git -y
|
|
24
23
|
# Install the latest version of NodeJS
|
25
24
|
RUN sudo apt-get install ca-certificates -y
|
26
25
|
RUN curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
|
27
|
-
RUN sudo apt-get install -y nodejs
|
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 python-minimal -y
|
33
|
+
|
34
|
+
# Install sqlite3
|
35
|
+
RUN sudo apt-get install libsqlite3-dev -y
|
data/Gemfile
CHANGED
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.2)
|
5
5
|
bugsnag (~> 6.22)
|
6
6
|
listen (~> 3.7.0)
|
7
|
-
theme-check (~> 1.
|
7
|
+
theme-check (~> 1.8.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -18,6 +18,7 @@ GEM
|
|
18
18
|
builder (3.2.4)
|
19
19
|
byebug (11.1.3)
|
20
20
|
coderay (1.1.3)
|
21
|
+
colorize (0.8.1)
|
21
22
|
concurrent-ruby (1.1.9)
|
22
23
|
crack (0.4.5)
|
23
24
|
rexml
|
@@ -89,7 +90,7 @@ GEM
|
|
89
90
|
byebug (~> 11.0)
|
90
91
|
pry (~> 0.13.0)
|
91
92
|
public_suffix (4.0.6)
|
92
|
-
racc (1.
|
93
|
+
racc (1.6.0)
|
93
94
|
rack (2.2.3)
|
94
95
|
rainbow (3.0.0)
|
95
96
|
rake (13.0.6)
|
@@ -118,7 +119,7 @@ GEM
|
|
118
119
|
ruby-progressbar (1.11.0)
|
119
120
|
sys-uname (1.2.2)
|
120
121
|
ffi (~> 1.1)
|
121
|
-
theme-check (1.
|
122
|
+
theme-check (1.8.0)
|
122
123
|
liquid (>= 5.1.0)
|
123
124
|
nokogiri (>= 1.12)
|
124
125
|
parser (~> 3)
|
@@ -135,6 +136,7 @@ PLATFORMS
|
|
135
136
|
DEPENDENCIES
|
136
137
|
bundler (~> 2.2.2)
|
137
138
|
byebug
|
139
|
+
colorize (~> 0.8.1)
|
138
140
|
cucumber (~> 7.0)
|
139
141
|
fakefs (>= 1.0)
|
140
142
|
iniparse (~> 1.5)
|
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.1
|
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 python-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
|
+
```
|