shopify_app 21.7.0 → 21.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/workflows/build.yml +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +3 -3
- data/app/controllers/shopify_app/callback_controller.rb +14 -3
- data/docs/shopify_app/webhooks.md +3 -3
- data/karma.conf.js +6 -1
- data/lib/generators/shopify_app/{add_gdpr_jobs/add_gdpr_jobs_generator.rb → add_privacy_jobs/add_privacy_jobs_generator.rb} +1 -1
- data/lib/generators/shopify_app/shopify_app_generator.rb +1 -1
- data/lib/shopify_app/managers/webhooks_manager.rb +1 -0
- data/lib/shopify_app/version.rb +1 -1
- data/package.json +5 -6
- data/shopify_app.gemspec +1 -1
- data/yarn.lock +2087 -3882
- metadata +9 -9
- /data/lib/generators/shopify_app/{add_gdpr_jobs → add_privacy_jobs}/templates/customers_data_request_job.rb.tt +0 -0
- /data/lib/generators/shopify_app/{add_gdpr_jobs → add_privacy_jobs}/templates/customers_redact_job.rb.tt +0 -0
- /data/lib/generators/shopify_app/{add_gdpr_jobs → add_privacy_jobs}/templates/shop_redact_job.rb.tt +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49db79a7ee1809140f869b5a2b0ab52fe6b9e64d53c8d4cd21084763b59392cc
|
4
|
+
data.tar.gz: 5cef8ded01f6a2cebbd887fdc2811ac5612df5ae7b6fb684fa8aadfd3b56ad37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 705b96b32ef22ee3c0f24391e2dc18c194e0c914fb1b03df449d79129da5dddfbdf095949c0ae5d1b219f5533a53384d24ded2464a8e00190099cf6c77c4f182
|
7
|
+
data.tar.gz: ffb76479139e64d4685c87f2af945e90bb7ad45e56b3d42bb6738052da2bedc80c637df977a7671e2ed1c2e28ba2041489444c9046fe5a13631b4708ae0ab9fa
|
data/.github/CODEOWNERS
CHANGED
data/.github/workflows/build.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
Unreleased
|
2
2
|
----------
|
3
3
|
|
4
|
+
21.8.0 (Dec 1, 2023)
|
5
|
+
----------
|
6
|
+
* Bump `shopify_api` to include bugfix with mandatory webhooks + fixes for CI failures that prevented earlier release
|
7
|
+
* Fixes bug with `WebhooksManager#recreate_webhooks!` where we failed to register topics in the registry[#1743](https://github.com/Shopify/shopify_app/pull/1704)
|
8
|
+
* Allow embedded apps to provide a full URL to get redirected to, rather than defaulting to Shopify Admin [#1746](https://github.com/Shopify/shopify_app/pull/1746)
|
9
|
+
|
4
10
|
21.7.0 (Oct 12, 2023)
|
5
11
|
----------
|
6
12
|
* Fixes typo in webhook generator [#1704](https://github.com/Shopify/shopify_app/pull/1704)
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
shopify_app (21.
|
4
|
+
shopify_app (21.8.0)
|
5
5
|
activeresource
|
6
6
|
addressable (~> 2.7)
|
7
7
|
browser_sniffer (~> 2.0)
|
8
8
|
jwt (>= 2.2.3)
|
9
9
|
rails (> 5.2.1)
|
10
10
|
redirect_safely (~> 1.0)
|
11
|
-
shopify_api (~> 13.
|
11
|
+
shopify_api (~> 13.3)
|
12
12
|
sprockets-rails (>= 2.0.0)
|
13
13
|
|
14
14
|
GEM
|
@@ -217,7 +217,7 @@ GEM
|
|
217
217
|
ruby-progressbar (1.13.0)
|
218
218
|
ruby2_keywords (0.0.5)
|
219
219
|
securerandom (0.2.2)
|
220
|
-
shopify_api (13.
|
220
|
+
shopify_api (13.3.0)
|
221
221
|
activesupport
|
222
222
|
concurrent-ruby
|
223
223
|
hash_diff
|
@@ -70,14 +70,25 @@ module ShopifyApp
|
|
70
70
|
|
71
71
|
def redirect_to_app
|
72
72
|
if ShopifyAPI::Context.embedded?
|
73
|
-
return_to =
|
74
|
-
|
75
|
-
|
73
|
+
return_to = session.delete(:return_to)
|
74
|
+
redirect_to = if fully_formed_url?(return_to)
|
75
|
+
return_to
|
76
|
+
else
|
77
|
+
"#{decoded_host}#{return_to}"
|
78
|
+
end
|
79
|
+
|
80
|
+
redirect_to = ShopifyApp.configuration.root_url if deduced_phishing_attack?
|
81
|
+
redirect_to(redirect_to, allow_other_host: true)
|
76
82
|
else
|
77
83
|
redirect_to(return_address)
|
78
84
|
end
|
79
85
|
end
|
80
86
|
|
87
|
+
def fully_formed_url?(return_to)
|
88
|
+
uri = Addressable::URI.parse(return_to)
|
89
|
+
uri.present? && uri.scheme.present? && uri.host.present?
|
90
|
+
end
|
91
|
+
|
81
92
|
def decoded_host
|
82
93
|
@decoded_host ||= ShopifyAPI::Auth.embedded_app_url(params[:host])
|
83
94
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
#### Table of contents
|
4
4
|
|
5
5
|
[Manage webhooks using `ShopifyApp::WebhooksManager`](#manage-webhooks-using-shopifyappwebhooksmanager)
|
6
|
-
[Mandatory
|
6
|
+
[Mandatory Privacy Webhooks](#mandatory-privacy-webhooks)
|
7
7
|
|
8
8
|
## Manage webhooks using `ShopifyApp::WebhooksManager`
|
9
9
|
|
@@ -72,9 +72,9 @@ rails g shopify_app:add_webhook --topic carts/update --path webhooks/carts_updat
|
|
72
72
|
|
73
73
|
Where `--topic` is the topic and `--path` is the path the webhook should be sent to.
|
74
74
|
|
75
|
-
## Mandatory
|
75
|
+
## Mandatory Privacy Webhooks
|
76
76
|
|
77
|
-
We have three mandatory
|
77
|
+
We have three mandatory privacy webhooks
|
78
78
|
|
79
79
|
1. `customers/data_request`
|
80
80
|
2. `customer/redact`
|
data/karma.conf.js
CHANGED
@@ -26,7 +26,12 @@ module.exports = function(config) {
|
|
26
26
|
preprocessors: {
|
27
27
|
'test/javascripts/**/*test.js': ['webpack'],
|
28
28
|
},
|
29
|
-
webpack: {
|
29
|
+
webpack: {
|
30
|
+
mode: 'none',
|
31
|
+
output: {
|
32
|
+
hashFunction: 'rsa-sha512',
|
33
|
+
},
|
34
|
+
},
|
30
35
|
reporters: karmaReporters,
|
31
36
|
port: 9876,
|
32
37
|
colors: true,
|
@@ -4,7 +4,7 @@ require "rails/generators/base"
|
|
4
4
|
|
5
5
|
module ShopifyApp
|
6
6
|
module Generators
|
7
|
-
class
|
7
|
+
class AddPrivacyJobsGenerator < Rails::Generators::Base
|
8
8
|
source_root File.expand_path("../templates", __FILE__)
|
9
9
|
|
10
10
|
def add_customer_data_request_job
|
@@ -10,7 +10,7 @@ module ShopifyApp
|
|
10
10
|
|
11
11
|
def run_all_generators
|
12
12
|
generate("shopify_app:add_app_uninstalled_job")
|
13
|
-
generate("shopify_app:
|
13
|
+
generate("shopify_app:add_privacy_jobs")
|
14
14
|
generate("shopify_app:install #{@opts.join(" ")}")
|
15
15
|
generate("shopify_app:shop_model #{@opts.join(" ")}")
|
16
16
|
generate("shopify_app:authenticated_controller")
|
data/lib/shopify_app/version.rb
CHANGED
data/package.json
CHANGED
@@ -1,25 +1,24 @@
|
|
1
1
|
{
|
2
2
|
"name": "shopify_app",
|
3
|
-
"version": "21.
|
3
|
+
"version": "21.8.0",
|
4
4
|
"repository": "git@github.com:Shopify/shopify_app.git",
|
5
5
|
"author": "Shopify",
|
6
6
|
"license": "MIT",
|
7
|
-
"dependencies": {},
|
8
7
|
"devDependencies": {
|
9
8
|
"babel-loader": "^8.0.6",
|
10
9
|
"babel-preset-shopify": "^21.0.0",
|
11
10
|
"chai": "^4.1.2",
|
12
|
-
"karma": "^
|
11
|
+
"karma": "^6.4.2",
|
13
12
|
"karma-chai-sinon": "^0.1.5",
|
14
13
|
"karma-chrome-launcher": "^3.1.0",
|
15
14
|
"karma-cli": "^2.0.0",
|
16
15
|
"karma-mocha": "^2.0.1",
|
17
16
|
"karma-mocha-clean-reporter": "^0.0.1",
|
18
|
-
"karma-webpack": "^
|
19
|
-
"mocha": "^
|
17
|
+
"karma-webpack": "^5.0.0",
|
18
|
+
"mocha": "^10.2.0",
|
20
19
|
"sinon": "^9.0.3",
|
21
20
|
"sinon-chai": "^3.2.0",
|
22
|
-
"webpack": "^
|
21
|
+
"webpack": "^5.89.0"
|
23
22
|
},
|
24
23
|
"scripts": {
|
25
24
|
"test": "./node_modules/.bin/karma start --browsers ChromeHeadless --single-run"
|
data/shopify_app.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_runtime_dependency("jwt", ">= 2.2.3")
|
21
21
|
s.add_runtime_dependency("rails", "> 5.2.1")
|
22
22
|
s.add_runtime_dependency("redirect_safely", "~> 1.0")
|
23
|
-
s.add_runtime_dependency("shopify_api", "~> 13.
|
23
|
+
s.add_runtime_dependency("shopify_api", "~> 13.3")
|
24
24
|
s.add_runtime_dependency("sprockets-rails", ">= 2.0.0")
|
25
25
|
|
26
26
|
s.add_development_dependency("byebug")
|