shopify-cli 2.9.0 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.yaml +117 -0
  3. data/.github/ISSUE_TEMPLATE/enhancement.yaml +38 -0
  4. data/.github/ISSUE_TEMPLATE/feature.yaml +47 -0
  5. data/.github/ISSUE_TEMPLATE.md +18 -0
  6. data/CHANGELOG.md +38 -5
  7. data/Gemfile.lock +1 -1
  8. data/dev.yml +3 -0
  9. data/lib/project_types/extension/commands/build.rb +3 -0
  10. data/lib/project_types/extension/commands/check.rb +3 -0
  11. data/lib/project_types/extension/commands/create.rb +3 -0
  12. data/lib/project_types/extension/commands/push.rb +3 -0
  13. data/lib/project_types/extension/commands/serve.rb +3 -0
  14. data/lib/project_types/extension/models/specification_handlers/default.rb +1 -1
  15. data/lib/project_types/extension/tasks/convert_server_config.rb +3 -1
  16. data/lib/project_types/script/cli.rb +5 -0
  17. data/lib/project_types/script/commands/connect.rb +3 -1
  18. data/lib/project_types/script/commands/create.rb +2 -0
  19. data/lib/project_types/script/commands/push.rb +6 -0
  20. data/lib/project_types/script/config/extension_points.yml +12 -0
  21. data/lib/project_types/script/graphql/app_script_set.graphql +2 -0
  22. data/lib/project_types/script/graphql/module_upload_url_generate.graphql +5 -1
  23. data/lib/project_types/script/layers/application/build_script.rb +6 -3
  24. data/lib/project_types/script/layers/application/project_dependencies.rb +1 -1
  25. data/lib/project_types/script/layers/application/push_script.rb +38 -30
  26. data/lib/project_types/script/layers/domain/errors.rb +10 -3
  27. data/lib/project_types/script/layers/domain/extension_point.rb +2 -2
  28. data/lib/project_types/script/layers/domain/push_package.rb +0 -3
  29. data/lib/project_types/script/layers/domain/script_config.rb +6 -4
  30. data/lib/project_types/script/layers/domain/script_project.rb +1 -0
  31. data/lib/project_types/script/layers/infrastructure/errors.rb +47 -24
  32. data/lib/project_types/script/layers/infrastructure/languages/assemblyscript_task_runner.rb +2 -12
  33. data/lib/project_types/script/layers/infrastructure/languages/project_creator.rb +1 -0
  34. data/lib/project_types/script/layers/infrastructure/languages/task_runner.rb +1 -0
  35. data/lib/project_types/script/layers/infrastructure/languages/typescript_task_runner.rb +2 -12
  36. data/lib/project_types/script/layers/infrastructure/languages/wasm_project_creator.rb +15 -0
  37. data/lib/project_types/script/layers/infrastructure/languages/wasm_task_runner.rb +36 -0
  38. data/lib/project_types/script/layers/infrastructure/metadata_repository.rb +18 -0
  39. data/lib/project_types/script/layers/infrastructure/push_package_repository.rb +7 -8
  40. data/lib/project_types/script/layers/infrastructure/script_project_repository.rb +45 -54
  41. data/lib/project_types/script/layers/infrastructure/script_service.rb +35 -12
  42. data/lib/project_types/script/layers/infrastructure/script_uploader.rb +22 -9
  43. data/lib/project_types/script/loaders/project.rb +2 -1
  44. data/lib/project_types/script/messages/messages.rb +94 -88
  45. data/lib/project_types/script/ui/error_handler.rb +75 -38
  46. data/lib/project_types/theme/commands/check.rb +3 -0
  47. data/lib/project_types/theme/commands/delete.rb +3 -0
  48. data/lib/project_types/theme/commands/init.rb +3 -0
  49. data/lib/project_types/theme/commands/language_server.rb +3 -0
  50. data/lib/project_types/theme/commands/package.rb +3 -0
  51. data/lib/project_types/theme/commands/publish.rb +3 -0
  52. data/lib/project_types/theme/commands/pull.rb +12 -1
  53. data/lib/project_types/theme/commands/push.rb +12 -1
  54. data/lib/project_types/theme/commands/serve.rb +3 -0
  55. data/lib/project_types/theme/messages/messages.rb +4 -0
  56. data/lib/shopify_cli/command/sub_command.rb +2 -0
  57. data/lib/shopify_cli/command.rb +66 -0
  58. data/lib/shopify_cli/commands/app/create/node.rb +3 -0
  59. data/lib/shopify_cli/commands/app/create/rails.rb +3 -0
  60. data/lib/shopify_cli/commands/app/create.rb +3 -0
  61. data/lib/shopify_cli/commands/app/deploy.rb +3 -0
  62. data/lib/shopify_cli/commands/app/serve.rb +3 -0
  63. data/lib/shopify_cli/commands/login.rb +4 -10
  64. data/lib/shopify_cli/constants.rb +18 -2
  65. data/lib/shopify_cli/core/executor.rb +4 -4
  66. data/lib/shopify_cli/environment.rb +61 -16
  67. data/lib/shopify_cli/exception_reporter.rb +9 -0
  68. data/lib/shopify_cli/github/issue_url_generator.rb +19 -8
  69. data/lib/shopify_cli/identity_auth/env_auth_token.rb +34 -0
  70. data/lib/shopify_cli/identity_auth.rb +36 -18
  71. data/lib/shopify_cli/messages/messages.rb +2 -2
  72. data/lib/shopify_cli/method_object.rb +21 -9
  73. data/lib/shopify_cli/partners_api.rb +7 -2
  74. data/lib/shopify_cli/result.rb +61 -59
  75. data/lib/shopify_cli/services/app/create/rails_service.rb +37 -13
  76. data/lib/shopify_cli/task.rb +5 -3
  77. data/lib/shopify_cli/theme/file.rb +2 -2
  78. data/lib/shopify_cli/theme/filter/path_matcher.rb +38 -0
  79. data/lib/shopify_cli/theme/ignore_filter.rb +14 -18
  80. data/lib/shopify_cli/theme/include_filter.rb +65 -0
  81. data/lib/shopify_cli/theme/syncer.rb +17 -2
  82. data/lib/shopify_cli/utilities.rb +7 -0
  83. data/lib/shopify_cli/version.rb +1 -1
  84. data/lib/shopify_cli.rb +3 -1
  85. data/vendor/deps/cli-kit/lib/cli/kit/system.rb +11 -6
  86. data/vendor/deps/cli-kit/lib/cli/kit/util.rb +5 -1
  87. data/vendor/deps/cli-ui/lib/cli/ui/os.rb +6 -4
  88. data/vendor/deps/ruby2_keywords/LICENSE +22 -0
  89. data/vendor/deps/ruby2_keywords/README.md +67 -0
  90. data/vendor/deps/ruby2_keywords/Rakefile +54 -0
  91. data/vendor/deps/ruby2_keywords/lib/ruby2_keywords.rb +57 -0
  92. data/vendor/deps/ruby2_keywords/ruby2_keywords.gemspec +18 -0
  93. data/vendor/deps/ruby2_keywords/test/test_keyword.rb +41 -0
  94. data/vendor/lib/semantic/version.rb +0 -1
  95. metadata +18 -3
  96. data/lib/project_types/rails/commands/create.rb +0 -210
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3126bd5c9f4667732d248380f29b84fcac3bab1e3c944748b18dd3b0a639301d
4
- data.tar.gz: 8c6ffbcf72d7360e227178f970c63a6041ee6c7f61b0ea22a9d6747f163f5b6b
3
+ metadata.gz: 9944385de970a522f54fcf4e8feffa5bcab8ad61498095a1794c5abcf5918063
4
+ data.tar.gz: 62b23eb1ab82cf0783ccab14d77b55c3e71595d87581795fff19227c4bcada57
5
5
  SHA512:
6
- metadata.gz: 2a21a55b5b258fa6c5037fff6652c43ba09a207e7f2b313b52a950b7a1d221e41d7edf719ce66c089200c1f2fba577e412fb985420c872ee83a4d40ef0cd05be
7
- data.tar.gz: 338348f5e2220ef8b307e619981cc16985f012ecafc09c2d2eb232c2639ca65a11df12249f0d64fea5839b9015e1e31f0617eae84b82b4e530df587969b5fcc8
6
+ metadata.gz: 72ec8ee4a02bb2b7cd6f9d58c094625bba0e1971a1d2e81d86920e8b326ff8fb52bac73b2a7afec43f7e67991b239bd7ac11c43a2df70790ecd82cf6c4614db2
7
+ data.tar.gz: e456bb338bfa6102cf8643455b983a147a0fdef6fb820a5ee46dd210e6cbde788de6053727c48ab44057a7ad920a8b765651bfd09a26735b4db8525dc6f247b1
@@ -0,0 +1,117 @@
1
+ name: Bug Report
2
+ description: File a bug report
3
+ title: "[Bug]: <YOUR ISSUE TITLE>"
4
+ labels: ["type:bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |-
9
+ Hi! 👋 Thanks for taking the time to open an issue.
10
+
11
+ ## Before you begin
12
+ - type: checkboxes
13
+ id: preflight_checks
14
+ attributes:
15
+ label: |-
16
+ Please confirm that you have:
17
+ options:
18
+ - label: Searched [existing issues](https://github.com/Shopify/shopify-cli/issues) to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
19
+ required: true
20
+ - label: Reproduced the issue in [the latest CLI version](https://github.com/Shopify/shopify-cli/releases).
21
+ required: true
22
+ validations:
23
+ required: true
24
+ - type: markdown
25
+ attributes:
26
+ value: '## General Questions'
27
+ - type: dropdown
28
+ id: app_type
29
+ attributes:
30
+ label: What type of project are you working on?
31
+ options:
32
+ - app
33
+ - extension
34
+ - script
35
+ - theme
36
+ - other
37
+ validations:
38
+ required: true
39
+ - type: textarea
40
+ id: expected_behavior
41
+ attributes:
42
+ label: Expected behavior
43
+ description: What do you think should have happened?
44
+ placeholder: It should have worked
45
+ validations:
46
+ required: true
47
+ - type: textarea
48
+ id: actual_behavior
49
+ attributes:
50
+ label: Actual behavior
51
+ description: What actually happened?
52
+ placeholder: It didn't work
53
+ validations:
54
+ required: true
55
+ - type: textarea
56
+ id: stack_trace
57
+ attributes:
58
+ label: Stack trace
59
+ description: Paste in a stack trace if you've got one!
60
+ render: shell
61
+ validations:
62
+ required: false
63
+ - type: textarea
64
+ id: repro_steps
65
+ attributes:
66
+ label: Reproduction steps
67
+ description: Let us know the exact steps required to reproduce the error. The more detail, the better!
68
+ value: |-
69
+ 1.
70
+ 2.
71
+ 3.
72
+ validations:
73
+ required: true
74
+ - type: markdown
75
+ attributes:
76
+ value: |
77
+ ## Environment Details
78
+
79
+ Just a few more technical questions, to help us understand if your bug is linked to a particular runtime enviroment.
80
+ - type: input
81
+ id: os
82
+ attributes:
83
+ label: Operating System
84
+ placeholder: Windows 11, Mac OS Monterey, Ubuntu 20.04...
85
+ validations:
86
+ required: true
87
+ - type: input
88
+ id: cli_version
89
+ attributes:
90
+ label: CLI version (run `shopify version` if you're not sure)
91
+ placeholder: 2.10.0
92
+ validations:
93
+ required: true
94
+ - type: input
95
+ id: shell
96
+ attributes:
97
+ label: Shell
98
+ placeholder: Cygwin, Git Bash, iTerm2, bash, zsh...
99
+ - type: input
100
+ id: ruby_version
101
+ attributes:
102
+ label: Ruby version (run `ruby -v` if you're not sure)
103
+ placeholder: 3.0.2p107
104
+ - type: input
105
+ id: other_versions
106
+ attributes:
107
+ label: What language and version are you using in your application?
108
+ placeholder: Ruby 3.0.3, Node 17.1, PHP 7.4...
109
+ - type: markdown
110
+ attributes:
111
+ value: |-
112
+
113
+ ## What to Expect
114
+
115
+ When you submit this issue, it will go to a Shopify developer experience team. We may not be able to reply right away, but we usually respond within a week.
116
+
117
+ We always value your feedback. Thanks again for taking the time to help improve the CLI for everyone!
@@ -0,0 +1,38 @@
1
+ name: Enhancement
2
+ description: Enhancement to our codebase that isn't a adding or changing a feature
3
+ title: "[Enhancement]: <YOUR ENHANCEMENT>"
4
+ labels: ["type:enhancement"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |-
9
+ Hi! 👋 Thanks for taking the time to open an issue.
10
+
11
+ While we can't promise we'll implement your request, we'll certainly look it over and take your needs into consideration.
12
+ - type: dropdown
13
+ id: app_type
14
+ attributes:
15
+ label: What type of project(s) will this request affect?
16
+ options:
17
+ - app
18
+ - extension
19
+ - script
20
+ - theme
21
+ - other
22
+ multiple: true
23
+ validations:
24
+ required: true
25
+ - type: textarea
26
+ id: overview
27
+ attributes:
28
+ label: Overview
29
+ description: Describe in your own words the change you'd like to be made to the CLI.
30
+ validations:
31
+ required: true
32
+ - type: textarea
33
+ id: motivation
34
+ attributes:
35
+ label: Motivation
36
+ description: What inspired this request? What problems were you facing?
37
+ validations:
38
+ required: true
@@ -0,0 +1,47 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature, or changes to an existing one
3
+ title: "[Feature]: <YOUR FEATURE>"
4
+ labels: ["type:feature"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |-
9
+ Hi! 👋 Thanks for taking the time to open an issue.
10
+
11
+ While we can't promise we'll implement your request, we'll certainly look it over and take your needs into consideration.
12
+ - type: dropdown
13
+ id: app_type
14
+ attributes:
15
+ label: What type of project(s) will this request affect?
16
+ options:
17
+ - app
18
+ - extension
19
+ - script
20
+ - theme
21
+ - other
22
+ multiple: true
23
+ validations:
24
+ required: true
25
+ - type: dropdown
26
+ id: type
27
+ attributes:
28
+ label: What type of change do you want to see?
29
+ options:
30
+ - New feature
31
+ - Substantial change to existing feature
32
+ validations:
33
+ required: true
34
+ - type: textarea
35
+ id: overview
36
+ attributes:
37
+ label: Overview
38
+ description: Describe in your own words the feature you'd like to be added to the CLI.
39
+ validations:
40
+ required: true
41
+ - type: textarea
42
+ id: motivation
43
+ attributes:
44
+ label: Motivation
45
+ description: What inspired this feature request? What problems were you facing?
46
+ validations:
47
+ required: true
@@ -1,3 +1,21 @@
1
+ <!--
2
+
3
+ Hi! 👋 Thanks for taking the time to open an issue.
4
+
5
+ BEFORE SUBMITTING YOUR ISSUE, please ensure that:
6
+
7
+ 1. You've searched the existing issues to see if someone else has already submitted the same thing. You can access the list at: https://github.com/Shopify/shopify-cli/issues (and feel free to add any additional information in a comment!)
8
+ 2. You've given as much detail as reasonably possible
9
+ 3. You're working with the latest CLI version (check the badge at https://github.com/Shopify/shopify-cli)
10
+
11
+ This is important because:
12
+
13
+ 1. We will notice and prioritize 1 popular issue more quickly than many small duplicates
14
+ 2. More details = faster, higher-quality response
15
+ 3. We might have fixed your issue already!
16
+
17
+ -->
18
+
1
19
  # Issue summary
2
20
 
3
21
  Write a short description of the issue here ↓
data/CHANGELOG.md CHANGED
@@ -2,8 +2,42 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## 2.9.0
5
+ ## Version 2.11.0
6
6
 
7
+ ### Fixed
8
+ * [#2005](https://github.com/Shopify/shopify-cli/pull/2005): Fix PHP app serve on Windows environments
9
+
10
+ ### Added
11
+ * [#1998](https://github.com/Shopify/shopify-cli/pull/1998): Add support for Rails 7
12
+ * [#1945](https://github.com/Shopify/shopify-cli/pull/1945): Check Node and Ruby versions and warn the user if their environment's version might be incompatible with the version the command expects.
13
+ * [#2011](https://github.com/Shopify/shopify-cli/pull/2011): Adds support for the Spin rewrite
14
+
15
+ ### Changed
16
+ * [#2001](https://github.com/Shopify/shopify-cli/pull/2001): Improve Bug Issue Template. Includes autofill of CLI/Ruby/environment information.
17
+ * [#2004](https://github.com/Shopify/shopify-cli/pull/2004): Template improvements II. Includes autofill of Shell if $SHELL is set.
18
+ * [#2002](https://github.com/Shopify/shopify-cli/pull/2002): Update `-o`/`--only` parameter to allow multiple patterns on `theme push`/`theme pull` commands
19
+ * [#2022](https://github.com/Shopify/shopify-cli/pull/2022): Don't warn the user if the Ruby version is in the range 3.0.x.
20
+
21
+ ## Version 2.10.2
22
+ ### Fixed
23
+ * [#1983](https://github.com/Shopify/shopify-cli/pull/1983): Improve Windows compatibility
24
+ * [#1928](https://github.com/Shopify/shopify-cli/pull/1928): Ensure script Wasm file sizes don't exceed the limit
25
+ * [#2006](https://github.com/Shopify/shopify-cli/pull/2006): Fix: More defensive URL generation
26
+
27
+ ## Version 2.10.1
28
+ ### Fixed
29
+ * [#1985](https://github.com/Shopify/shopify-cli/pull/1985): Revert "Fix CORS (Cross-origin resource sharing) errors (#1952)"
30
+
31
+ ## Version 2.10.0
32
+ ### Fixed
33
+ * [#1937](https://github.com/Shopify/shopify-cli/pull/1937): Fix `theme pull` to no longer add empty lines on Windows
34
+ * [#1952](https://github.com/Shopify/shopify-cli/pull/1952): Fix CORS (cross-origin resource sharing) errors
35
+ * [#1965](https://github.com/Shopify/shopify-cli/pull/1965): Revert: Fix partners ability to login to external shops. (#1873)
36
+
37
+ ### Added
38
+ * [#1892](https://github.com/Shopify/shopify-cli/pull/1892): Add `-o`/`--only` parameter to filter files on `theme push`/`theme pull` commands
39
+
40
+ ## Version 2.9.0
7
41
  ### Fixed
8
42
  * [#1922](https://github.com/Shopify/shopify-cli/pull/1922): Respect RUBY_BINDIR from Homebrew for installing gem
9
43
  * [#1906](https://github.com/Shopify/shopify-cli/pull/1906): Fix Ngrok incompatibility with some Apple ARM environments
@@ -12,7 +46,6 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
12
46
 
13
47
  ### Added
14
48
  * [#1900](https://github.com/Shopify/shopify-cli/pull/1900): Add `-d`/`--development` flag to Shopify theme pull command
15
- * [#1896](https://github.com/Shopify/shopify-cli/pull/1896): Release Typescript options for payment_methods and shipping_methods scripts
16
49
  * [#1891](https://github.com/Shopify/shopify-cli/pull/1891): Allow for additional arguments in `shopify push script` on CI.
17
50
  * [#1877](https://github.com/Shopify/shopify-cli/pull/1877): Add theme (`-t`/`--theme=NAME_OR_ID`) parameter to `theme push`/`theme pull` commands
18
51
  * [#1871](https://github.com/Shopify/shopify-cli/pull/1871): Add a new `--live-reload` parameter to the `theme serve` command
@@ -57,7 +90,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
57
90
  * [#1769](https://github.com/Shopify/shopify-cli/pull/1769): Fix `theme push --development --json` to output the proper exit code
58
91
  * [#1766](https://github.com/Shopify/shopify-cli/pull/1766): Fix `theme serve` failing with the `--host` property
59
92
  * [#1771](https://github.com/Shopify/shopify-cli/pull/1771): Fix `theme push --development --json` to output errors in the STDERR
60
- * [#1778](https://github.com/Shopify/shopify-cli/pull/1778): Fix ngrok installation check on Windows
93
+ * [#1778](https://github.com/Shopify/shopify-cli/pull/1778): Fix ngrok installation check on Windows
61
94
  * [#1798](https://github.com/Shopify/shopify-cli/pull/1798): Add `--live` option to the `theme pull` and the `theme push` commands
62
95
  * [#1788](https://github.com/Shopify/shopify-cli/pull/1788): Improve `theme serve` errors and add logs for successful operations
63
96
  * [#1794](https://github.com/Shopify/shopify-cli/pull/1794): Fix bug where hidden subcommands appear in the help menu.
@@ -66,7 +99,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
66
99
  ### Fixed
67
100
  * [#1722](https://github.com/Shopify/shopify-cli/pull/1722): Fix `theme serve` failing when the port is already being used
68
101
  * [#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.
69
- * [#1750](https://github.com/Shopify/shopify-cli/pull/1750): Runtime errors in Windows' environments when the `PATHEXT` environment variable is not defined.
102
+ * [#1750](https://github.com/Shopify/shopify-cli/pull/1750): Runtime errors in Windows' environments when the `PATHEXT` environment variable is not defined.
70
103
  * [#1758](https://github.com/Shopify/shopify-cli/pull/1758): Fix tunnel creation for expired anonymous tunnels
71
104
 
72
105
  ## Version 2.7.0
@@ -84,7 +117,7 @@ From version 2.6.0, the sections in this file adhere to the [keep a changelog](h
84
117
  ### Fixed
85
118
  * [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Fix migrator's incompatibility with Ruby 2.5.
86
119
  * [#1690](https://github.com/Shopify/shopify-cli/pull/1690): Fix `extension push` command for `PRODUCT_SUBSCRIPTION` extensions
87
-
120
+
88
121
  ### Changed
89
122
  * [#1678](https://github.com/Shopify/shopify-cli/pull/1678): Change the `@shopify/scripts-checkout-apis-temp` package name to `@shopify/scripts-discount-apis`.
90
123
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shopify-cli (2.9.0)
4
+ shopify-cli (2.11.0)
5
5
  bugsnag (~> 6.22)
6
6
  listen (~> 3.7.0)
7
7
  theme-check (~> 1.9.0)
data/dev.yml CHANGED
@@ -28,3 +28,6 @@ test:
28
28
  commands:
29
29
  style:
30
30
  run: bundle exec rubocop .
31
+ test:script:
32
+ desc: "Run all script-related tests"
33
+ run: TEST='test/project_types/script/**/*.rb' bundle exec rake test $@
@@ -8,6 +8,9 @@ module Extension
8
8
 
9
9
  prerequisite_task ensure_project_type: :extension
10
10
 
11
+ recommend_default_node_range
12
+ recommend_default_ruby_range
13
+
11
14
  YARN_BUILD_COMMAND = %w(build)
12
15
  NPM_BUILD_COMMAND = %w(run-script build)
13
16
 
@@ -4,6 +4,9 @@ require "theme_check"
4
4
  module Extension
5
5
  class Command
6
6
  class Check < ExtensionCommand
7
+ recommend_default_node_range
8
+ recommend_default_ruby_range
9
+
7
10
  class CheckOptions < ShopifyCLI::Options
8
11
  def initialize(ctx, theme_check)
9
12
  super()
@@ -5,6 +5,9 @@ module Extension
5
5
  class Create < ShopifyCLI::Command::SubCommand
6
6
  prerequisite_task :ensure_authenticated
7
7
 
8
+ recommend_default_node_range
9
+ recommend_default_ruby_range
10
+
8
11
  options do |parser, flags|
9
12
  parser.on("--name=NAME") { |name| flags[:name] = name }
10
13
  parser.on("--template=TEMPLATE") { |template| flags[:template] = template }
@@ -6,6 +6,9 @@ module Extension
6
6
  class Push < ShopifyCLI::Command::SubCommand
7
7
  prerequisite_task ensure_project_type: :extension
8
8
 
9
+ recommend_default_node_range
10
+ recommend_default_ruby_range
11
+
9
12
  options do |parser, flags|
10
13
  parser.on("--api-key=API_KEY") { |api_key| flags[:api_key] = api_key.gsub('"', "") }
11
14
  parser.on("--api-secret=API_SECRET") { |api_secret| flags[:api_secret] = api_secret.gsub('"', "") }
@@ -5,6 +5,9 @@ module Extension
5
5
  class Serve < ExtensionCommand
6
6
  prerequisite_task ensure_project_type: :extension
7
7
 
8
+ recommend_default_node_range
9
+ recommend_default_ruby_range
10
+
8
11
  DEFAULT_PORT = 39351
9
12
 
10
13
  options do |parser, flags|
@@ -108,7 +108,7 @@ module Extension
108
108
  end
109
109
 
110
110
  def server_config_file
111
- "shopifile.yml"
111
+ "extension.config.yml"
112
112
  end
113
113
 
114
114
  protected
@@ -17,6 +17,8 @@ module Extension
17
17
  property :tunnel_url, accepts: String
18
18
  property! :type, accepts: String
19
19
 
20
+ DEFAULT_BUILD_DIR = "build"
21
+
20
22
  def self.call(*args)
21
23
  new(*args).call
22
24
  end
@@ -31,7 +33,7 @@ module Extension
31
33
  type: type.upcase,
32
34
  user: Models::ServerConfig::User.new,
33
35
  development: Models::ServerConfig::Development.new(
34
- build_dir: hash.dig("development", "build_dir"),
36
+ build_dir: hash.dig("development", "build_dir") || DEFAULT_BUILD_DIR,
35
37
  renderer: renderer,
36
38
  entries: Models::ServerConfig::DevelopmentEntries.new(
37
39
  main: hash.dig("development", "entries", "main")
@@ -57,6 +57,7 @@ module Script
57
57
  autoload :CommandRunner, Project.project_filepath("layers/infrastructure/command_runner")
58
58
  autoload :PushPackageRepository, Project.project_filepath("layers/infrastructure/push_package_repository")
59
59
  autoload :ExtensionPointRepository, Project.project_filepath("layers/infrastructure/extension_point_repository")
60
+ autoload :MetadataRepository, Project.project_filepath("layers/infrastructure/metadata_repository")
60
61
  autoload :ScriptProjectRepository, Project.project_filepath("layers/infrastructure/script_project_repository")
61
62
  autoload :ScriptService, Project.project_filepath("layers/infrastructure/script_service")
62
63
  autoload :ScriptUploader, Project.project_filepath("layers/infrastructure/script_uploader")
@@ -73,6 +74,10 @@ module Script
73
74
  Project.project_filepath("layers/infrastructure/languages/typescript_project_creator.rb")
74
75
  autoload :TypeScriptTaskRunner,
75
76
  Project.project_filepath("layers/infrastructure/languages/typescript_task_runner.rb")
77
+ autoload :WasmProjectCreator,
78
+ Project.project_filepath("layers/infrastructure/languages/wasm_project_creator.rb")
79
+ autoload :WasmTaskRunner,
80
+ Project.project_filepath("layers/infrastructure/languages/wasm_task_runner.rb")
76
81
  end
77
82
 
78
83
  module ApiClients
@@ -5,6 +5,8 @@ module Script
5
5
  prerequisite_task :ensure_authenticated
6
6
  prerequisite_task ensure_project_type: :script
7
7
 
8
+ recommend_default_ruby_range
9
+
8
10
  def call(_args, _)
9
11
  Layers::Application::ConnectApp.call(ctx: @ctx, force: true)
10
12
  rescue StandardError => e
@@ -12,7 +14,7 @@ module Script
12
14
  end
13
15
 
14
16
  def self.help
15
- ShopifyCLI::Context.new.message("connect.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
17
+ ShopifyCLI::Context.new.message("script.connect.help", ShopifyCLI::TOOL_NAME, ShopifyCLI::TOOL_NAME)
16
18
  end
17
19
  end
18
20
  end
@@ -5,6 +5,8 @@ module Script
5
5
  class Create < ShopifyCLI::Command::SubCommand
6
6
  prerequisite_task :ensure_authenticated
7
7
 
8
+ recommend_default_ruby_range
9
+
8
10
  options do |parser, flags|
9
11
  parser.on("--name=NAME") { |name| flags[:name] = name }
10
12
  parser.on("--api=API_NAME") { |ep_name| flags[:extension_point] = ep_name }
@@ -5,6 +5,12 @@ module Script
5
5
  class Push < ShopifyCLI::Command::SubCommand
6
6
  prerequisite_task ensure_project_type: :script
7
7
 
8
+ recommend_node(
9
+ from: ::Script::Layers::Infrastructure::Languages::TypeScriptProjectCreator::MIN_NODE_VERSION,
10
+ to: ShopifyCLI::Constants::SupportedVersions::Node::TO
11
+ )
12
+ recommend_default_ruby_range
13
+
8
14
  options do |parser, flags|
9
15
  parser.on("--force") { |t| flags[:force] = t }
10
16
  parser.on("--api-key=API_KEY") { |api_key| flags[:api_key] = api_key.gsub('"', "") }
@@ -8,6 +8,9 @@ payment_methods:
8
8
  beta: true
9
9
  package: "@shopify/scripts-checkout-apis"
10
10
  repo: "https://github.com/Shopify/scripts-apis-examples"
11
+ wasm:
12
+ beta: true
13
+ repo: "https://github.com/Shopify/scripts-apis-examples"
11
14
  shipping_methods:
12
15
  domain: 'checkout'
13
16
  libraries:
@@ -18,6 +21,9 @@ shipping_methods:
18
21
  beta: true
19
22
  package: "@shopify/scripts-checkout-apis"
20
23
  repo: "https://github.com/Shopify/scripts-apis-examples"
24
+ wasm:
25
+ beta: true
26
+ repo: "https://github.com/Shopify/scripts-apis-examples"
21
27
  merchandise_discount_types:
22
28
  beta: true
23
29
  domain: 'discounts'
@@ -26,6 +32,9 @@ merchandise_discount_types:
26
32
  beta: true
27
33
  package: "@shopify/scripts-discounts-apis"
28
34
  repo: "https://github.com/Shopify/scripts-apis-examples"
35
+ wasm:
36
+ beta: true
37
+ repo: "https://github.com/Shopify/scripts-apis-examples"
29
38
  delivery_discount_types:
30
39
  beta: true
31
40
  domain: 'discounts'
@@ -34,3 +43,6 @@ delivery_discount_types:
34
43
  beta: true
35
44
  package: "@shopify/scripts-discounts-apis"
36
45
  repo: "https://github.com/Shopify/scripts-apis-examples"
46
+ wasm:
47
+ beta: true
48
+ repo: "https://github.com/Shopify/scripts-apis-examples"
@@ -11,6 +11,7 @@ mutation AppScriptSet(
11
11
  $configurationDefinition: String!,
12
12
  $moduleUploadUrl: String!,
13
13
  $library: LibraryInput,
14
+ $inputQuery: String,
14
15
  ) {
15
16
  appScriptSet(
16
17
  uuid: $uuid
@@ -25,6 +26,7 @@ mutation AppScriptSet(
25
26
  configurationDefinition: $configurationDefinition,
26
27
  moduleUploadUrl: $moduleUploadUrl,
27
28
  library: $library,
29
+ inputQuery: $inputQuery,
28
30
  ) {
29
31
  userErrors {
30
32
  field
@@ -1,6 +1,10 @@
1
1
  mutation moduleUploadUrlGenerate {
2
2
  moduleUploadUrlGenerate {
3
- url
3
+ details {
4
+ url
5
+ headers
6
+ humanizedMaxSize
7
+ }
4
8
  userErrors {
5
9
  field
6
10
  message
@@ -9,11 +9,14 @@ module Script
9
9
  CLI::UI::Frame.open(ctx.message("script.application.building")) do
10
10
  begin
11
11
  UI::StrictSpinner.spin(ctx.message("script.application.building_script")) do |spinner|
12
+ script_content = task_runner.build
13
+ metadata_file_location = task_runner.metadata_file_location
14
+ metadata = Infrastructure::MetadataRepository.new(ctx: ctx).get_metadata(metadata_file_location)
15
+
12
16
  Infrastructure::PushPackageRepository.new(ctx: ctx).create_push_package(
13
17
  script_project: script_project,
14
- script_content: task_runner.build,
15
- compiled_type: task_runner.compiled_type,
16
- metadata: task_runner.metadata,
18
+ script_content: script_content,
19
+ metadata: metadata,
17
20
  library: library,
18
21
  )
19
22
  spinner.update_title(ctx.message("script.application.built"))
@@ -3,7 +3,7 @@ module Script
3
3
  module Application
4
4
  class ProjectDependencies
5
5
  def self.install(ctx:, task_runner:)
6
- CLI::UI::Frame.open(ctx.message("script.project_deps.checking_with_npm")) do
6
+ CLI::UI::Frame.open(ctx.message("script.project_deps.checking")) do
7
7
  begin
8
8
  if task_runner.dependencies_installed?
9
9
  ctx.puts(ctx.message("script.project_deps.none_required"))