shopify_app 11.3.1 → 11.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -2
- data/CHANGELOG.md +27 -0
- data/README.md +7 -0
- data/config/locales/nl.yml +7 -7
- data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +39 -0
- data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +66 -0
- data/lib/generators/shopify_app/install/install_generator.rb +1 -5
- data/lib/generators/shopify_app/install/templates/shopify_app.rb +1 -1
- data/lib/shopify_app.rb +6 -0
- data/lib/shopify_app/configuration.rb +10 -8
- data/lib/shopify_app/controllers/extension_verification_controller.rb +18 -0
- data/lib/shopify_app/engine.rb +4 -0
- data/lib/shopify_app/middleware/same_site_cookie_middleware.rb +60 -0
- data/lib/shopify_app/version.rb +1 -1
- data/package-lock.json +33 -35
- data/package.json +3 -2
- data/shopify_app.gemspec +0 -1
- data/yarn.lock +14 -14
- metadata +6 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14c540b5ab61f25b6a0ad180f76161ae69536d8fcf52f623bd997055b145e02a
|
4
|
+
data.tar.gz: 69be07412bfd24ca729a2e4d1207a7884d71418e5773337ddb477118d2594e86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 901b0a51d2891756243f0903d23833dc3399b158fb27f703a5fe3f977550db9c7d87116b83b1c568de57236855704e80d1dec91fe2094a6cf4280abaff116219
|
7
|
+
data.tar.gz: 172ac0593c9ee3c0dd870a585e122feaeae4b387df367c6962d239e0a79a784c247bc1645ecbe3a3264ae3b57142bbd0854bc34a67461e134374214419a3125c
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,30 @@
|
|
1
|
+
11.6.0
|
2
|
+
-----
|
3
|
+
* Enable SameSite=None; Secure by default on all cookies for embedded apps [#851](https://github.com/Shopify/shopify_app/pull/851)
|
4
|
+
* Ensures compatibility of embedded apps with upcoming Chrome version 80 changes to cookie behaviour
|
5
|
+
* Configurable via `ShopifyApp.configuration.enable_same_site_none` (default true for embedded apps)
|
6
|
+
|
7
|
+
11.5.1
|
8
|
+
-----
|
9
|
+
* Revert per-user token support temporarily
|
10
|
+
|
11
|
+
11.5.0
|
12
|
+
-----
|
13
|
+
* Modularizes durable session storage
|
14
|
+
* Introduces per-user token support and user session management
|
15
|
+
|
16
|
+
11.4.0
|
17
|
+
-----
|
18
|
+
* Remove `dotenv-rails` dependency. [#835](https://github.com/Shopify/shopify_app/pull/835)
|
19
|
+
|
20
|
+
11.3.2
|
21
|
+
-----
|
22
|
+
* Fix hosts generator in Rails 5 [#823](https://github.com/Shopify/shopify_app/pull/823)
|
23
|
+
|
24
|
+
11.3.1
|
25
|
+
-----
|
26
|
+
* Bump browser_sniffer version to 1.1.3 [#824](https://github.com/Shopify/shopify_app/pull/824)
|
27
|
+
|
1
28
|
11.3.0
|
2
29
|
-----
|
3
30
|
* Update assets to be compatible with Rails 6 [#808](https://github.com/Shopify/shopify_app/pull/808)
|
data/README.md
CHANGED
@@ -171,6 +171,13 @@ $ rails generate shopify_app:app_proxy_controller
|
|
171
171
|
|
172
172
|
This optional generator, not included with the default generator, creates the app proxy controller to handle proxy requests to the app from your shop storefront, modifies 'config/routes.rb' with a namespace route, and an example view which displays current shop information using the LiquidAPI
|
173
173
|
|
174
|
+
### Marketing Extension Generator
|
175
|
+
|
176
|
+
```sh
|
177
|
+
$ rails generate shopify_app:add_marketing_activity_extension
|
178
|
+
```
|
179
|
+
|
180
|
+
This will create a controller with the endpoints required to build a [marketing activities extension](https://help.shopify.com/en/api/embedded-apps/app-extensions/shopify-admin/marketing-activities). The extension will be generated with a base url at `/marketing_activities`, which should also be configured in partners.
|
174
181
|
|
175
182
|
### Controllers, Routes and Views
|
176
183
|
|
data/config/locales/nl.yml
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
---
|
2
2
|
nl:
|
3
|
-
logged_out:
|
3
|
+
logged_out: u bent afgemeld
|
4
4
|
could_not_log_in: Kon niet aanmelden bij Shopify-winkel
|
5
5
|
invalid_shop_url: Ongeldig winkeldomein
|
6
6
|
enable_cookies_heading: Schakel cookies in van %{app}
|
7
|
-
enable_cookies_body:
|
7
|
+
enable_cookies_body: U moet cookies in deze browser handmatig inschakelen om %{app}
|
8
8
|
binnen Shopify te gebruiken.
|
9
|
-
enable_cookies_footer: Met cookies kan de app
|
9
|
+
enable_cookies_footer: Met cookies kan de app u verifiëren door uw voorkeuren en
|
10
10
|
persoonlijke informatie tijdelijk op te slaan. Ze vervallen na 30 dagen.
|
11
11
|
enable_cookies_action: Schakel cookies in
|
12
|
-
top_level_interaction_heading:
|
13
|
-
top_level_interaction_body:
|
14
|
-
te vragen tot cookies voordat Shopify het voor
|
12
|
+
top_level_interaction_heading: Uw browser moet %{app} verifiëren
|
13
|
+
top_level_interaction_body: Uw browser heeft apps nodig zoals %{app} om u toegang
|
14
|
+
te vragen tot cookies voordat Shopify het voor u kan openen.
|
15
15
|
top_level_interaction_action: Doorgaan
|
16
16
|
request_storage_access_heading: "%{app} heeft toegang tot cookies nodig"
|
17
|
-
request_storage_access_body: Hiermee kan de app
|
17
|
+
request_storage_access_body: Hiermee kan de app u verifiëren door uw persoonlijke
|
18
18
|
gegevens tijdelijk op te slaan. Klik op Doorgaan en sta cookies toe om de app
|
19
19
|
te gebruiken.
|
20
20
|
request_storage_access_footer: Cookies verlopen na 30 dagen.
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
|
3
|
+
module ShopifyApp
|
4
|
+
module Generators
|
5
|
+
class AddMarketingActivityExtensionGenerator < Rails::Generators::Base
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
|
8
|
+
def generate_app_extension
|
9
|
+
template "marketing_activities_controller.rb", "app/controllers/marketing_activities_controller.rb"
|
10
|
+
generate_routes
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def generate_routes
|
16
|
+
inject_into_file(
|
17
|
+
'config/routes.rb',
|
18
|
+
optimize_indentation(routes, 2),
|
19
|
+
after: "root :to => 'home#index'\n"
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def routes
|
24
|
+
<<~EOS
|
25
|
+
|
26
|
+
resource :marketing_activities, only: [:create, :update] do
|
27
|
+
patch :resume
|
28
|
+
patch :pause
|
29
|
+
patch :delete
|
30
|
+
post :republish
|
31
|
+
post :preload_form_data
|
32
|
+
post :preview
|
33
|
+
post :errors
|
34
|
+
end
|
35
|
+
EOS
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class MarketingActivitiesController < ExtensionVerificationController
|
4
|
+
def preload_form_data
|
5
|
+
preload_data = {
|
6
|
+
"form_data": {
|
7
|
+
"budget": {
|
8
|
+
"currency": "USD",
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
12
|
+
render(json: preload_data, status: :ok)
|
13
|
+
end
|
14
|
+
|
15
|
+
def update
|
16
|
+
render(json: {}, status: :accepted)
|
17
|
+
end
|
18
|
+
|
19
|
+
def pause
|
20
|
+
render(json: {}, status: :accepted)
|
21
|
+
end
|
22
|
+
|
23
|
+
def resume
|
24
|
+
render(json: {}, status: :accepted)
|
25
|
+
end
|
26
|
+
|
27
|
+
def delete
|
28
|
+
render(json: {}, status: :accepted)
|
29
|
+
end
|
30
|
+
|
31
|
+
def preview
|
32
|
+
placeholder_img = "https://cdn.shopify.com/s/files/1/0533/2089/files/placeholder-images-image_small.png"
|
33
|
+
preview_response = {
|
34
|
+
"desktop": {
|
35
|
+
"preview_url": placeholder_img,
|
36
|
+
"content_type": "text/html",
|
37
|
+
"width": 360,
|
38
|
+
"height": 200
|
39
|
+
},
|
40
|
+
"mobile": {
|
41
|
+
"preview_url": placeholder_img,
|
42
|
+
"content_type": "text/html",
|
43
|
+
"width": 360,
|
44
|
+
"height": 200
|
45
|
+
}
|
46
|
+
}
|
47
|
+
render(json: preview_response, status: :ok)
|
48
|
+
end
|
49
|
+
|
50
|
+
def create
|
51
|
+
render(json: {}, status: :ok)
|
52
|
+
end
|
53
|
+
|
54
|
+
def republish
|
55
|
+
render(json: {}, status: :accepted)
|
56
|
+
end
|
57
|
+
|
58
|
+
def errors
|
59
|
+
request_id = params[:request_id]
|
60
|
+
message = params[:message]
|
61
|
+
|
62
|
+
Rails.logger.info("[Marketing Activity App Error Feedback] Request id: #{request_id}, message: #{message}")
|
63
|
+
|
64
|
+
render(json: {}, status: :ok)
|
65
|
+
end
|
66
|
+
end
|
@@ -11,10 +11,6 @@ module ShopifyApp
|
|
11
11
|
class_option :embedded, type: :string, default: 'true'
|
12
12
|
class_option :api_version, type: :string, default: nil
|
13
13
|
|
14
|
-
def add_dotenv_gem
|
15
|
-
gem('dotenv-rails', group: [:test, :development])
|
16
|
-
end
|
17
|
-
|
18
14
|
def create_shopify_app_initializer
|
19
15
|
@application_name = format_array_argument(options['application_name'])
|
20
16
|
@scope = format_array_argument(options['scope'])
|
@@ -67,7 +63,7 @@ module ShopifyApp
|
|
67
63
|
def insert_hosts_into_development_config
|
68
64
|
inject_into_file(
|
69
65
|
'config/environments/development.rb',
|
70
|
-
" config.hosts << /\\h+.ngrok.io/\n",
|
66
|
+
" config.hosts = (config.hosts rescue []) << /\\h+.ngrok.io/\n",
|
71
67
|
after: "Rails.application.configure do\n"
|
72
68
|
)
|
73
69
|
end
|
@@ -8,7 +8,7 @@ ShopifyApp.configure do |config|
|
|
8
8
|
config.embedded_app = <%= embedded_app? %>
|
9
9
|
config.after_authenticate_job = false
|
10
10
|
config.api_version = "<%= @api_version %>"
|
11
|
-
config.session_repository = ShopifyApp::InMemorySessionStore
|
11
|
+
config.session_repository = 'ShopifyApp::InMemorySessionStore'
|
12
12
|
end
|
13
13
|
|
14
14
|
# ShopifyApp::Utils.fetch_known_api_versions # Uncomment to fetch known api versions from shopify servers on boot
|
data/lib/shopify_app.rb
CHANGED
@@ -24,6 +24,9 @@ module ShopifyApp
|
|
24
24
|
# utils
|
25
25
|
require 'shopify_app/utils'
|
26
26
|
|
27
|
+
# controllers
|
28
|
+
require 'shopify_app/controllers/extension_verification_controller'
|
29
|
+
|
27
30
|
# controller concerns
|
28
31
|
require 'shopify_app/controller_concerns/localization'
|
29
32
|
require 'shopify_app/controller_concerns/itp'
|
@@ -40,6 +43,9 @@ module ShopifyApp
|
|
40
43
|
require 'shopify_app/managers/webhooks_manager'
|
41
44
|
require 'shopify_app/managers/scripttags_manager'
|
42
45
|
|
46
|
+
# middleware
|
47
|
+
require 'shopify_app/middleware/same_site_cookie_middleware'
|
48
|
+
|
43
49
|
# session
|
44
50
|
require 'shopify_app/session/session_storage'
|
45
51
|
require 'shopify_app/session/session_repository'
|
@@ -14,7 +14,7 @@ module ShopifyApp
|
|
14
14
|
attr_accessor :webhooks
|
15
15
|
attr_accessor :scripttags
|
16
16
|
attr_accessor :after_authenticate_job
|
17
|
-
|
17
|
+
attr_reader :session_repository
|
18
18
|
attr_accessor :api_version
|
19
19
|
|
20
20
|
# customise urls
|
@@ -34,6 +34,9 @@ module ShopifyApp
|
|
34
34
|
# allow namespacing webhook jobs
|
35
35
|
attr_accessor :webhook_jobs_namespace
|
36
36
|
|
37
|
+
# allow enabling of same site none on cookies
|
38
|
+
attr_accessor :enable_same_site_none
|
39
|
+
|
37
40
|
def initialize
|
38
41
|
@root_url = '/'
|
39
42
|
@myshopify_domain = 'myshopify.com'
|
@@ -47,13 +50,8 @@ module ShopifyApp
|
|
47
50
|
end
|
48
51
|
|
49
52
|
def session_repository=(klass)
|
50
|
-
|
51
|
-
|
52
|
-
else
|
53
|
-
ActiveSupport::Reloader.to_prepare do
|
54
|
-
ShopifyApp::SessionRepository.storage = klass
|
55
|
-
end
|
56
|
-
end
|
53
|
+
@session_repository = klass
|
54
|
+
ShopifyApp::SessionRepository.storage = klass
|
57
55
|
end
|
58
56
|
|
59
57
|
def has_webhooks?
|
@@ -63,6 +61,10 @@ module ShopifyApp
|
|
63
61
|
def has_scripttags?
|
64
62
|
scripttags.present?
|
65
63
|
end
|
64
|
+
|
65
|
+
def enable_same_site_none
|
66
|
+
@enable_same_site_none.nil? ? embedded_app? : @enable_same_site_none
|
67
|
+
end
|
66
68
|
end
|
67
69
|
|
68
70
|
def self.configuration
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class ExtensionVerificationController < ActionController::Base
|
4
|
+
protect_from_forgery with: :null_session
|
5
|
+
before_action :verify_request
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def verify_request
|
10
|
+
hmac_header = request.headers['HTTP_X_SHOPIFY_HMAC_SHA256']
|
11
|
+
request_body = request.body.read
|
12
|
+
secret = ShopifyApp.configuration.secret
|
13
|
+
digest = OpenSSL::Digest.new('sha256')
|
14
|
+
|
15
|
+
expected_hmac = Base64.strict_encode64(OpenSSL::HMAC.digest(digest, secret, request_body))
|
16
|
+
head(:unauthorized) unless ActiveSupport::SecurityUtils.secure_compare(expected_hmac, hmac_header)
|
17
|
+
end
|
18
|
+
end
|
data/lib/shopify_app/engine.rb
CHANGED
@@ -0,0 +1,60 @@
|
|
1
|
+
module ShopifyApp
|
2
|
+
class SameSiteCookieMiddleware
|
3
|
+
def initialize(app)
|
4
|
+
@app = app
|
5
|
+
end
|
6
|
+
|
7
|
+
def call(env)
|
8
|
+
_status, headers, _body = @app.call(env)
|
9
|
+
ensure
|
10
|
+
user_agent = env['HTTP_USER_AGENT']
|
11
|
+
|
12
|
+
if headers && headers['Set-Cookie'] && !SameSiteCookieMiddleware.same_site_none_incompatible?(user_agent) &&
|
13
|
+
ShopifyApp.configuration.enable_same_site_none
|
14
|
+
|
15
|
+
cookies = headers['Set-Cookie'].split("\n").compact
|
16
|
+
|
17
|
+
cookies.each do |cookie|
|
18
|
+
unless cookie.include?("; SameSite")
|
19
|
+
headers['Set-Cookie'] = headers['Set-Cookie'].gsub("#{cookie}", "#{cookie}; secure; SameSite=None")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.same_site_none_incompatible?(user_agent)
|
26
|
+
sniffer = BrowserSniffer.new(user_agent)
|
27
|
+
|
28
|
+
webkit_same_site_bug?(sniffer) || drops_unrecognized_same_site_cookies?(sniffer)
|
29
|
+
rescue
|
30
|
+
true
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.webkit_same_site_bug?(sniffer)
|
34
|
+
(sniffer.os == :ios && sniffer.os_version.match?(/^([0-9]|1[12])[\.\_]/)) ||
|
35
|
+
(sniffer.os == :mac && sniffer.browser == :safari && sniffer.os_version.match?(/^10[\.\_]14/))
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.drops_unrecognized_same_site_cookies?(sniffer)
|
39
|
+
(chromium_based?(sniffer) && sniffer.major_browser_version >= 51 && sniffer.major_browser_version <= 66) ||
|
40
|
+
(uc_browser?(sniffer) && !uc_browser_version_at_least?(sniffer: sniffer, major: 12, minor: 13, build: 2))
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.chromium_based?(sniffer)
|
44
|
+
sniffer.browser_name.downcase.match?(/chrom(e|ium)/)
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.uc_browser?(sniffer)
|
48
|
+
sniffer.user_agent.downcase.match?(/uc\s?browser/)
|
49
|
+
end
|
50
|
+
|
51
|
+
def self.uc_browser_version_at_least?(sniffer:, major:, minor:, build:)
|
52
|
+
digits = sniffer.browser_version.split('.').map(&:to_i)
|
53
|
+
return false unless digits.count >= 3
|
54
|
+
|
55
|
+
return digits[0] > major if digits[0] != major
|
56
|
+
return digits[1] > minor if digits[1] != minor
|
57
|
+
digits[2] >= build
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/lib/shopify_app/version.rb
CHANGED
data/package-lock.json
CHANGED
@@ -5909,12 +5909,6 @@
|
|
5909
5909
|
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
5910
5910
|
"dev": true
|
5911
5911
|
},
|
5912
|
-
"serialize-javascript": {
|
5913
|
-
"version": "1.9.1",
|
5914
|
-
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz",
|
5915
|
-
"integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==",
|
5916
|
-
"dev": true
|
5917
|
-
},
|
5918
5912
|
"set-blocking": {
|
5919
5913
|
"version": "2.0.0",
|
5920
5914
|
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
@@ -6497,31 +6491,6 @@
|
|
6497
6491
|
}
|
6498
6492
|
}
|
6499
6493
|
},
|
6500
|
-
"terser-webpack-plugin": {
|
6501
|
-
"version": "1.4.1",
|
6502
|
-
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz",
|
6503
|
-
"integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==",
|
6504
|
-
"dev": true,
|
6505
|
-
"requires": {
|
6506
|
-
"cacache": "12.0.3",
|
6507
|
-
"find-cache-dir": "2.1.0",
|
6508
|
-
"is-wsl": "1.1.0",
|
6509
|
-
"schema-utils": "1.0.0",
|
6510
|
-
"serialize-javascript": "1.9.1",
|
6511
|
-
"source-map": "0.6.1",
|
6512
|
-
"terser": "4.3.1",
|
6513
|
-
"webpack-sources": "1.4.3",
|
6514
|
-
"worker-farm": "1.7.0"
|
6515
|
-
},
|
6516
|
-
"dependencies": {
|
6517
|
-
"source-map": {
|
6518
|
-
"version": "0.6.1",
|
6519
|
-
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
6520
|
-
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
6521
|
-
"dev": true
|
6522
|
-
}
|
6523
|
-
}
|
6524
|
-
},
|
6525
6494
|
"through2": {
|
6526
6495
|
"version": "2.0.5",
|
6527
6496
|
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
|
@@ -6878,9 +6847,9 @@
|
|
6878
6847
|
}
|
6879
6848
|
},
|
6880
6849
|
"webpack": {
|
6881
|
-
"version": "4.
|
6882
|
-
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.
|
6883
|
-
"integrity": "sha512-
|
6850
|
+
"version": "4.41.3",
|
6851
|
+
"resolved": "https://registry.npmjs.org/webpack/-/webpack-4.41.3.tgz",
|
6852
|
+
"integrity": "sha512-EcNzP9jGoxpQAXq1VOoTet0ik7/VVU1MovIfcUSAjLowc7GhcQku/sOXALvq5nPpSei2HF6VRhibeJSC3i/Law==",
|
6884
6853
|
"dev": true,
|
6885
6854
|
"requires": {
|
6886
6855
|
"@webassemblyjs/ast": "1.8.5",
|
@@ -6903,7 +6872,7 @@
|
|
6903
6872
|
"node-libs-browser": "2.2.1",
|
6904
6873
|
"schema-utils": "1.0.0",
|
6905
6874
|
"tapable": "1.1.3",
|
6906
|
-
"terser-webpack-plugin": "1.4.
|
6875
|
+
"terser-webpack-plugin": "1.4.3",
|
6907
6876
|
"watchpack": "1.6.0",
|
6908
6877
|
"webpack-sources": "1.4.3"
|
6909
6878
|
},
|
@@ -6925,6 +6894,35 @@
|
|
6925
6894
|
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
|
6926
6895
|
"integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==",
|
6927
6896
|
"dev": true
|
6897
|
+
},
|
6898
|
+
"serialize-javascript": {
|
6899
|
+
"version": "2.1.2",
|
6900
|
+
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
|
6901
|
+
"integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==",
|
6902
|
+
"dev": true
|
6903
|
+
},
|
6904
|
+
"source-map": {
|
6905
|
+
"version": "0.6.1",
|
6906
|
+
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
6907
|
+
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
6908
|
+
"dev": true
|
6909
|
+
},
|
6910
|
+
"terser-webpack-plugin": {
|
6911
|
+
"version": "1.4.3",
|
6912
|
+
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz",
|
6913
|
+
"integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==",
|
6914
|
+
"dev": true,
|
6915
|
+
"requires": {
|
6916
|
+
"cacache": "12.0.3",
|
6917
|
+
"find-cache-dir": "2.1.0",
|
6918
|
+
"is-wsl": "1.1.0",
|
6919
|
+
"schema-utils": "1.0.0",
|
6920
|
+
"serialize-javascript": "2.1.2",
|
6921
|
+
"source-map": "0.6.1",
|
6922
|
+
"terser": "4.3.1",
|
6923
|
+
"webpack-sources": "1.4.3",
|
6924
|
+
"worker-farm": "1.7.0"
|
6925
|
+
}
|
6928
6926
|
}
|
6929
6927
|
}
|
6930
6928
|
},
|
data/package.json
CHANGED
@@ -19,9 +19,10 @@
|
|
19
19
|
"mocha-debug": "^0.0.1",
|
20
20
|
"sinon": "^7.4.2",
|
21
21
|
"sinon-chai": "^3.2.0",
|
22
|
-
"webpack": "^4.
|
22
|
+
"webpack": "^4.41.3"
|
23
23
|
},
|
24
24
|
"scripts": {
|
25
25
|
"test": "./node_modules/.bin/karma start --browsers ChromeHeadless --single-run"
|
26
|
-
}
|
26
|
+
},
|
27
|
+
"version": "11.6.0"
|
27
28
|
}
|
data/shopify_app.gemspec
CHANGED
@@ -14,7 +14,6 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.add_runtime_dependency('rails', '> 5.2.1')
|
15
15
|
s.add_runtime_dependency('shopify_api', '~> 8.0')
|
16
16
|
s.add_runtime_dependency('omniauth-shopify-oauth2', '~> 2.2.0')
|
17
|
-
s.add_runtime_dependency('dotenv-rails', '~> 2.7.5')
|
18
17
|
|
19
18
|
s.add_development_dependency('rake')
|
20
19
|
s.add_development_dependency('byebug')
|
data/yarn.lock
CHANGED
@@ -4360,10 +4360,10 @@ semver@^6.3.0:
|
|
4360
4360
|
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
4361
4361
|
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
4362
4362
|
|
4363
|
-
serialize-javascript@^1.
|
4364
|
-
version "1.
|
4365
|
-
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.
|
4366
|
-
integrity sha512-
|
4363
|
+
serialize-javascript@^2.1.2:
|
4364
|
+
version "2.1.2"
|
4365
|
+
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
|
4366
|
+
integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==
|
4367
4367
|
|
4368
4368
|
set-blocking@^2.0.0, set-blocking@~2.0.0:
|
4369
4369
|
version "2.0.0"
|
@@ -4769,16 +4769,16 @@ tar@^4:
|
|
4769
4769
|
safe-buffer "^5.1.2"
|
4770
4770
|
yallist "^3.0.3"
|
4771
4771
|
|
4772
|
-
terser-webpack-plugin@^1.4.
|
4773
|
-
version "1.4.
|
4774
|
-
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.
|
4775
|
-
integrity sha512-
|
4772
|
+
terser-webpack-plugin@^1.4.3:
|
4773
|
+
version "1.4.3"
|
4774
|
+
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c"
|
4775
|
+
integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==
|
4776
4776
|
dependencies:
|
4777
4777
|
cacache "^12.0.2"
|
4778
4778
|
find-cache-dir "^2.1.0"
|
4779
4779
|
is-wsl "^1.1.0"
|
4780
4780
|
schema-utils "^1.0.0"
|
4781
|
-
serialize-javascript "^1.
|
4781
|
+
serialize-javascript "^2.1.2"
|
4782
4782
|
source-map "^0.6.1"
|
4783
4783
|
terser "^4.1.2"
|
4784
4784
|
webpack-sources "^1.4.0"
|
@@ -5083,10 +5083,10 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1:
|
|
5083
5083
|
source-list-map "^2.0.0"
|
5084
5084
|
source-map "~0.6.1"
|
5085
5085
|
|
5086
|
-
webpack@^4.
|
5087
|
-
version "4.
|
5088
|
-
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.
|
5089
|
-
integrity sha512-
|
5086
|
+
webpack@^4.41.3:
|
5087
|
+
version "4.41.3"
|
5088
|
+
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.3.tgz#cb7592c43080337dbc9be9e98fc6478eb3981026"
|
5089
|
+
integrity sha512-EcNzP9jGoxpQAXq1VOoTet0ik7/VVU1MovIfcUSAjLowc7GhcQku/sOXALvq5nPpSei2HF6VRhibeJSC3i/Law==
|
5090
5090
|
dependencies:
|
5091
5091
|
"@webassemblyjs/ast" "1.8.5"
|
5092
5092
|
"@webassemblyjs/helper-module-context" "1.8.5"
|
@@ -5108,7 +5108,7 @@ webpack@^4.40.2:
|
|
5108
5108
|
node-libs-browser "^2.2.1"
|
5109
5109
|
schema-utils "^1.0.0"
|
5110
5110
|
tapable "^1.1.3"
|
5111
|
-
terser-webpack-plugin "^1.4.
|
5111
|
+
terser-webpack-plugin "^1.4.3"
|
5112
5112
|
watchpack "^1.6.0"
|
5113
5113
|
webpack-sources "^1.4.1"
|
5114
5114
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.
|
4
|
+
version: 11.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser_sniffer
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.2.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: dotenv-rails
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 2.7.5
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 2.7.5
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: rake
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -253,6 +239,8 @@ files:
|
|
253
239
|
- karma.conf.js
|
254
240
|
- lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
|
255
241
|
- lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb
|
242
|
+
- lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb
|
243
|
+
- lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb
|
256
244
|
- lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
|
257
245
|
- lib/generators/shopify_app/add_webhook/templates/webhook_job.rb
|
258
246
|
- lib/generators/shopify_app/app_proxy_controller/app_proxy_controller_generator.rb
|
@@ -296,11 +284,13 @@ files:
|
|
296
284
|
- lib/shopify_app/controller_concerns/localization.rb
|
297
285
|
- lib/shopify_app/controller_concerns/login_protection.rb
|
298
286
|
- lib/shopify_app/controller_concerns/webhook_verification.rb
|
287
|
+
- lib/shopify_app/controllers/extension_verification_controller.rb
|
299
288
|
- lib/shopify_app/engine.rb
|
300
289
|
- lib/shopify_app/jobs/scripttags_manager_job.rb
|
301
290
|
- lib/shopify_app/jobs/webhooks_manager_job.rb
|
302
291
|
- lib/shopify_app/managers/scripttags_manager.rb
|
303
292
|
- lib/shopify_app/managers/webhooks_manager.rb
|
293
|
+
- lib/shopify_app/middleware/same_site_cookie_middleware.rb
|
304
294
|
- lib/shopify_app/session/in_memory_session_store.rb
|
305
295
|
- lib/shopify_app/session/session_repository.rb
|
306
296
|
- lib/shopify_app/session/session_storage.rb
|