shopify-cli 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f47a49090da5b25b266e4186c08b377e91e6fe240620076f24bb0174accc854
4
- data.tar.gz: 68be2a02c00aa4e0c67295024d0997c453eb40b9d92f4cec9ae06dc5c0b3d0fa
3
+ metadata.gz: 8765adff2578420b0bbaaf7aa30e7e3f6b28b20363671f9e64a419f8b97fe647
4
+ data.tar.gz: 17e00973e6c881c58c1e0ade838a98e93a17a39f7d960261a36f9cdc74a87940
5
5
  SHA512:
6
- metadata.gz: f0cd5e1c1e79ec89fcba9834eb1c1ea98d53a98ad46f2fcc45e5fefebfabcd9b1655cb73c1431c503b9c1a26f2d684d6a1c330813423733601670839c7e82efc
7
- data.tar.gz: a3f83e966247aee450f3a73615dce3d324f82ab944304be131dec81973d1984c405d060844601047ceb259163faaa79524d859bbe9a874479ea4a26c21530152
6
+ metadata.gz: '08b07fe290962b6ba6416214165dde7d9c78d01c7eade8662917ec530af18af1a773b08957c58be5b6c10c733bd4be8e2c40a24c2241153d575a158d3988bb84'
7
+ data.tar.gz: 171f11dd5a4e740cb91345ed51e10485f9499e328bc6dec0ab3027c415b35fd312b616c451137639c224c07862d8651836074ef5bbb85563229ca93d85aa944a
@@ -1,3 +1,7 @@
1
+ Version 1.1.1
2
+ ------
3
+ * Fix a bug where usernames with spaces caused issues on Windows
4
+
1
5
  Version 1.1.0
2
6
  ------
3
7
  * Add native Windows 10 support, including variety of stability fixes.
@@ -8,14 +8,15 @@ Developers should have some prior knowledge of the [Shopify app ecosystem](https
8
8
 
9
9
  ## Requirements
10
10
 
11
- - [Ruby](https://www.ruby-lang.org) 2.5.1+
12
11
  - A [Shopify partner account](https://partners.shopify.com/signup)
13
12
  - A [Shopify development store](https://help.shopify.com/en/partners/dashboard/development-stores#create-a-development-store) to install and test apps
13
+ - [Ruby](https://www.ruby-lang.org) 2.5.1+
14
14
 
15
15
  ### Windows requirements
16
16
 
17
- You’ll need to install the following tools to use Shopify App CLI on Windows:
17
+ If you wish to use Shopify App CLI natively on **Windows 10**, we recommend installing Ruby using [RubyInstaller for Windows](https://rubyinstaller.org/downloads/).
18
18
 
19
+ Alternatively, you can also use Shopify App CLI using **Windows Subsystem for Linux**, in which case you need:
19
20
  - [Linux Subsystem for Windows](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
20
21
  - [Ubuntu VM](https://www.microsoft.com/en-ca/p/ubuntu/9nblggh4msv6)
21
22
 
@@ -5,9 +5,15 @@ toc: false
5
5
  redirect_from: "/install/"
6
6
  ---
7
7
 
8
- Shopify App CLI can be installed using a variety of package managers.
8
+ Shopify App CLI can be installed on a variety of systems, using a variety of package managers.
9
+ > Note that for systems that have multiple installation options, you only need to use one of these methods to install.
9
10
 
10
- ### Homebrew (macOS)
11
+ ---
12
+ ### macOS
13
+
14
+ Shopify App CLI is available through Homebrew _or_ RubyGems.
15
+
16
+ **Homebrew**
11
17
 
12
18
  You’ll need to run `brew tap` first to add Shopify’s third-party repositories to Homebrew.
13
19
 
@@ -16,28 +22,68 @@ $ brew tap shopify/shopify
16
22
  $ brew install shopify-cli
17
23
  ```
18
24
 
19
- ### apt (Debian, Ubuntu)
25
+ **RubyGems**
26
+
27
+ See the [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygems-all-platforms) section for further details.
28
+
29
+ ---
30
+
31
+ ### Debian/Ubuntu Linux
20
32
 
21
- You’ll need to install a downloaded .deb file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
33
+ On Debian-based Linux systems, Shopify App CLI is available through the `apt` command _or_ RubyGems.
22
34
 
35
+ **apt**
36
+
37
+ You’ll need to install a downloaded `.deb` file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
38
+
39
+ 1. Download the `.deb` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
40
+ 1. Install the downloaded file
23
41
  ```console
24
- $ sudo apt install shopify-cli-x.y.z.deb
42
+ $ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
25
43
  ```
26
44
 
27
- ### yum (CentOS 8+, Fedora, Red Hat, SUSE)
45
+ **RubyGems**
46
+
47
+ See the [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygems-all-platforms) section for further details.
48
+
49
+ ---
50
+
51
+ ### CentOS 8+/Fedora/Red Hat/SUSE Linux
28
52
 
29
- You’ll need to install a downloaded .rpm file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
53
+ On RPM-based Linux systems, Shopify App CLI is available through the `yum` command _or_ RubyGems.
30
54
 
55
+ **yum**
56
+
57
+ You’ll need to install a downloaded `.rpm` file with an explicit version number. Check the [releases page](https://github.com/Shopify/shopify-app-cli/releases) to make sure you install the latest package.
58
+
59
+ 1. Download the `.rpm` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
60
+ 1. Install the downloaded file
31
61
  ```console
32
- $ sudo yum install shopify-cli-x.y.x.rpm
62
+ $ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
33
63
  ```
34
64
 
35
- ### Ruby gem
65
+ **RubyGems**
66
+
67
+ See the [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygems-all-platforms) section for further details.
68
+
69
+ ---
70
+
71
+ ### Windows 10
72
+
73
+ On Windows 10 systems, Shopify App CLI is available through [RubyGems]({{ site.baseurl }}/getting-started/install/#rubygem-all-platforms).
74
+
75
+ ---
76
+
77
+ ### RubyGems (all platforms)
78
+
79
+ Shopify App CLI is available on all platforms as a RubyGem through [RubyGems.org](https://rubygems.org/).
36
80
 
37
81
  ```console
38
82
  $ gem install shopify-cli
39
83
  ```
40
84
 
85
+ ---
86
+
41
87
  ### To check that Shopify App CLI is installed correctly:
42
88
 
43
89
  ```console
@@ -25,7 +25,7 @@ $ sudo apt remove shopify-cli
25
25
  $ sudo yum remove shopify-cli
26
26
  ```
27
27
 
28
- ### Ruby gem
28
+ ### RubyGems (macOS, Linux, Windows 10)
29
29
 
30
30
  ```console
31
31
  $ gem uninstall shopify-cli
@@ -5,7 +5,7 @@ toc: false
5
5
  redirect_from: "/upgrade/"
6
6
  ---
7
7
 
8
- You can manage upgrades to Shopify App CLI with the package manager for your platform.
8
+ You can manage upgrades to Shopify App CLI with the package manager for your platform. **Note** that it's important to use the same package manager to upgrade that you originally used to install Shopify App CLI.
9
9
 
10
10
  ### Homebrew (macOS)
11
11
 
@@ -18,19 +18,23 @@ $ brew upgrade shopify-cli
18
18
 
19
19
  On Debian-based Linux distributions, download the latest `.deb` file for Shopify App CLI from the [releases page](https://github.com/Shopify/shopify-app-cli/releases) and install it to update.
20
20
 
21
+ 1. Download the `.deb` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
22
+ 1. Install the downloaded file
21
23
  ```console
22
- $ sudo apt install shopify-cli-x.y.z.deb
24
+ $ sudo apt install /path/to/downloaded/shopify-cli-x.y.z.deb
23
25
  ```
24
26
 
25
27
  ### yum (CentOS 8+, Fedora, Red Hat, SUSE)
26
28
 
27
29
  On Red Hat–based Linux distributions, download the latest `.rpm` file for Shopify App CLI from the [releases page](https://github.com/Shopify/shopify-app-cli/releases) and install it to update.
28
30
 
31
+ 1. Download the `.rpm` file from the [releases page](https://github.com/Shopify/shopify-app-cli/releases)
32
+ 1. Install the downloaded file
29
33
  ```console
30
- $ sudo yum install shopify-cli-x.y.z.rpm
34
+ $ sudo yum install /path/to/downloaded/shopify-cli-x.y.x.rpm
31
35
  ```
32
36
 
33
- ### Ruby gem
37
+ ### RubyGems (macOS, Linux, Windows 10)
34
38
 
35
39
  ```console
36
40
  $ gem update shopify-cli
@@ -19,6 +19,7 @@ module Node
19
19
  end
20
20
  billing_type_name = BILLING_TYPES.key(selected_type)
21
21
  selected_type[0] = File.join(ShopifyCli::Project.current.directory, selected_type[0])
22
+ selected_type[0] = "\"#{selected_type[0]}\""
22
23
  selected_type = selected_type.join(' ')
23
24
 
24
25
  spin_group = CLI::UI::SpinGroup.new
@@ -39,6 +39,7 @@ module Node
39
39
  end
40
40
  page_type_name = PAGE_TYPES.key(selected_type)
41
41
  selected_type[0] = File.join(ShopifyCli::Project.current.directory, selected_type[0])
42
+ selected_type[0] = "\"#{selected_type[0]}\""
42
43
  selected_type = selected_type.join(' ')
43
44
 
44
45
  spin_group = CLI::UI::SpinGroup.new
@@ -17,6 +17,7 @@ module Node
17
17
  end
18
18
 
19
19
  generate_path = File.join(ShopifyCli::Project.current.directory, "node_modules/.bin/generate-node-app")
20
+ generate_path = "\"#{generate_path}\""
20
21
 
21
22
  spin_group = CLI::UI::SpinGroup.new
22
23
  spin_group.add(@ctx.message('node.generate.webhook.generating', selected_type)) do |spinner|
@@ -1,24 +1,24 @@
1
1
  discount:
2
2
  assemblyscript:
3
3
  package: "@shopify/extension-point-as-discount"
4
- version: "^0.2.6"
4
+ version: "^0.2.10"
5
5
  sdk-version: "^6.0.0"
6
6
  toolchain-version: "^1.1.0"
7
7
  unit_limit_per_order:
8
8
  assemblyscript:
9
9
  package: "@shopify/extension-point-as-unit-limit-per-order"
10
- version: "^0.1.8"
10
+ version: "^0.1.12"
11
11
  sdk-version: "^6.0.0"
12
12
  toolchain-version: "^1.1.0"
13
13
  payment_filter:
14
14
  assemblyscript:
15
15
  package: "@shopify/extension-point-as-payment-filter"
16
- version: "^0.2.4"
16
+ version: "^0.2.8"
17
17
  sdk-version: "^6.0.0"
18
18
  toolchain-version: "^1.1.0"
19
19
  shipping_filter:
20
20
  assemblyscript:
21
21
  package: "@shopify/extension-point-as-shipping-filter"
22
- version: "^0.2.6"
22
+ version: "^0.2.10"
23
23
  sdk-version: "^6.0.0"
24
24
  toolchain-version: "^1.1.0"
@@ -49,7 +49,7 @@ module Script
49
49
  resp_hash = script_service_request(
50
50
  query_name: query_name,
51
51
  api_key: api_key,
52
- shop_domain: shop_domain,
52
+ shop_domain: format_shop_domain(shop_domain),
53
53
  variables: variables,
54
54
  )
55
55
  user_errors = resp_hash["data"]["shopScriptUpdateOrCreate"]["userErrors"]
@@ -76,7 +76,7 @@ module Script
76
76
  resp_hash = script_service_request(
77
77
  query_name: query_name,
78
78
  api_key: api_key,
79
- shop_domain: shop_domain,
79
+ shop_domain: format_shop_domain(shop_domain),
80
80
  variables: variables,
81
81
  )
82
82
  user_errors = resp_hash["data"]["shopScriptDelete"]["userErrors"]
@@ -91,6 +91,10 @@ module Script
91
91
 
92
92
  private
93
93
 
94
+ def format_shop_domain(shop_domain)
95
+ shop_domain.delete_suffix("/")
96
+ end
97
+
94
98
  class ScriptServiceAPI < ShopifyCli::API
95
99
  property(:api_key, accepts: String)
96
100
  property(:shop_id, accepts: Integer)
@@ -45,7 +45,7 @@ module ShopifyCli
45
45
  return if installed?
46
46
 
47
47
  result = if @ctx.windows?
48
- @ctx.system(download_path)
48
+ @ctx.system("\"#{download_path}\"")
49
49
  else
50
50
  @ctx.system('tar', '-xf', download_path, chdir: ShopifyCli.cache_dir)
51
51
  end
@@ -289,6 +289,8 @@ module ShopifyCli
289
289
  error: {
290
290
  stop: "ngrok tunnel could not be stopped. Try running {{command:killall -9 ngrok}}",
291
291
  url_fetch_failure: "Unable to fetch external url",
292
+ prereq_command_required: "%1$s is required for installing ngrok. Please install %1$s using the appropriate"\
293
+ " package manager for your system.",
292
294
  },
293
295
 
294
296
  not_running: "{{green:x}} ngrok tunnel not running",
@@ -302,6 +304,7 @@ module ShopifyCli
302
304
  stopped: "{{green:x}} ngrok tunnel stopped",
303
305
  timed_out: "{{x}} ngrok tunnel has timed out, restarting ...",
304
306
  will_timeout: "{{*}} This tunnel will timeout in {{red:%s}}",
307
+ prereq_command_location: "%s @ %s",
305
308
  },
306
309
 
307
310
  version: {
@@ -124,6 +124,8 @@ module ShopifyCli
124
124
 
125
125
  def install(ctx)
126
126
  return if File.exist?(File.join(ShopifyCli.cache_dir, ctx.windows? ? 'ngrok.exe' : 'ngrok'))
127
+ check_prereq_command(ctx, 'curl')
128
+ check_prereq_command(ctx, ctx.linux? ? 'unzip' : 'tar')
127
129
  spinner = CLI::UI::SpinGroup.new
128
130
  spinner.add('Installing ngrok...') do
129
131
  zip_dest = File.join(ShopifyCli.cache_dir, 'ngrok.zip')
@@ -149,7 +151,7 @@ module ShopifyCli
149
151
  end
150
152
 
151
153
  def ngrok_command(port)
152
- "#{File.join(ShopifyCli.cache_dir, 'ngrok')} http -inspect=false -log=stdout -log-level=debug #{port}"
154
+ "\"#{File.join(ShopifyCli.cache_dir, 'ngrok')}\" http -inspect=false -log=stdout -log-level=debug #{port}"
153
155
  end
154
156
 
155
157
  def seconds_to_hm(seconds)
@@ -169,6 +171,13 @@ module ShopifyCli
169
171
  end
170
172
  start_ngrok(ctx, port)
171
173
  end
174
+
175
+ def check_prereq_command(ctx, command)
176
+ cmd_path = ctx.which(command)
177
+ ctx.abort(ctx.message('core.tunnel.error.prereq_command_required', command)) if cmd_path.nil?
178
+ ctx.done(ctx.message('core.tunnel.prereq_command_location', command, cmd_path))
179
+ end
180
+
172
181
  class LogParser # :nodoc:
173
182
  TIMEOUT = 10
174
183
 
@@ -1,3 +1,3 @@
1
1
  module ShopifyCli
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-24 00:00:00.000000000 Z
11
+ date: 2020-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler