shopify_app 21.7.0 → 21.8.1
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 +9 -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: 36bbee7b9808abae0813b1177ebd8bf8102be7fd81984e5aae8cd9c6d78aca20
|
4
|
+
data.tar.gz: c1d239928719eb000562a1fbfd0df83ef48db41baf17e923f9968ede0e57466b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b3ef76d79690b330e874dde1a11a837c3c85e5db67fe7d3b453e9543cee3291ad22d1794576b2985a3f9601b15156d6b9f476d0b9e9c09932346dcdcf0d759a
|
7
|
+
data.tar.gz: 2faa1c6bf1691020a0b75728bf85c0483d237b4e0f5ff5cca3d3f0876744828af10228625c1d0426beadc87efebe6f93ae65ec6be37f3ab5d9b7c544af5b7755
|
data/.github/CODEOWNERS
CHANGED
data/.github/workflows/build.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
Unreleased
|
2
2
|
----------
|
3
3
|
|
4
|
+
21.8.1 (December 6, 2023)
|
5
|
+
* Bump `shopify_api` to 13.3.1 [1763](https://github.com/Shopify/shopify-api-ruby/blob/main/CHANGELOG.md#1331)
|
6
|
+
|
7
|
+
21.8.0 (Dec 1, 2023)
|
8
|
+
----------
|
9
|
+
* Bump `shopify_api` to include bugfix with mandatory webhooks + fixes for CI failures that prevented earlier release
|
10
|
+
* Fixes bug with `WebhooksManager#recreate_webhooks!` where we failed to register topics in the registry[#1743](https://github.com/Shopify/shopify_app/pull/1704)
|
11
|
+
* 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)
|
12
|
+
|
4
13
|
21.7.0 (Oct 12, 2023)
|
5
14
|
----------
|
6
15
|
* 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.1)
|
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.1)
|
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.1",
|
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")
|