shopify_app 21.1.1 → 21.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +7 -8
  3. data/.github/workflows/stale.yml +1 -0
  4. data/.spin/rails/prepare-application +8 -0
  5. data/CHANGELOG.md +19 -8
  6. data/Gemfile +1 -0
  7. data/Gemfile.lock +106 -91
  8. data/README.md +19 -15
  9. data/SECURITY.md +1 -1
  10. data/app/controllers/concerns/shopify_app/authenticated.rb +4 -9
  11. data/app/controllers/concerns/shopify_app/ensure_authenticated_links.rb +3 -2
  12. data/app/controllers/concerns/shopify_app/ensure_has_session.rb +19 -0
  13. data/app/controllers/concerns/shopify_app/ensure_installed.rb +62 -0
  14. data/app/controllers/concerns/shopify_app/require_known_shop.rb +3 -38
  15. data/app/controllers/shopify_app/authenticated_controller.rb +1 -1
  16. data/app/controllers/shopify_app/callback_controller.rb +64 -27
  17. data/app/controllers/shopify_app/extension_verification_controller.rb +4 -1
  18. data/app/controllers/shopify_app/sessions_controller.rb +11 -2
  19. data/config/locales/ja.yml +1 -1
  20. data/docs/Troubleshooting.md +38 -2
  21. data/docs/Upgrading.md +40 -32
  22. data/docs/shopify_app/controller-concerns.md +48 -0
  23. data/docs/shopify_app/logging.md +21 -0
  24. data/docs/shopify_app/webhooks.md +13 -0
  25. data/lib/generators/shopify_app/add_app_uninstalled_job/add_app_uninstalled_job_generator.rb +15 -0
  26. data/lib/generators/shopify_app/add_app_uninstalled_job/templates/app_uninstalled_job.rb.tt +22 -0
  27. data/lib/generators/shopify_app/add_gdpr_jobs/add_gdpr_jobs_generator.rb +23 -0
  28. data/lib/generators/shopify_app/add_gdpr_jobs/templates/customers_data_request_job.rb.tt +22 -0
  29. data/lib/generators/shopify_app/add_gdpr_jobs/templates/customers_redact_job.rb.tt +22 -0
  30. data/lib/generators/shopify_app/add_gdpr_jobs/templates/shop_redact_job.rb.tt +22 -0
  31. data/lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb +1 -0
  32. data/lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb +2 -1
  33. data/lib/generators/shopify_app/add_webhook/templates/webhook_job.rb.tt +2 -1
  34. data/lib/generators/shopify_app/authenticated_controller/templates/authenticated_controller.rb +1 -1
  35. data/lib/generators/shopify_app/home_controller/templates/index.html.erb +1 -1
  36. data/lib/generators/shopify_app/home_controller/templates/unauthenticated_home_controller.rb +1 -1
  37. data/lib/generators/shopify_app/install/templates/shopify_app.rb.tt +8 -2
  38. data/lib/generators/shopify_app/rotate_shopify_token_job/templates/rotate_shopify_token_job.rb +1 -1
  39. data/lib/generators/shopify_app/shopify_app_generator.rb +2 -0
  40. data/lib/shopify_app/access_scopes/noop_strategy.rb +4 -0
  41. data/lib/shopify_app/access_scopes/user_strategy.rb +5 -0
  42. data/lib/shopify_app/configuration.rb +11 -0
  43. data/lib/shopify_app/controller_concerns/ensure_billing.rb +3 -0
  44. data/lib/shopify_app/controller_concerns/itp.rb +5 -0
  45. data/lib/shopify_app/controller_concerns/login_protection.rb +56 -13
  46. data/lib/shopify_app/controller_concerns/redirect_for_embedded.rb +4 -1
  47. data/lib/shopify_app/controller_concerns/webhook_verification.rb +4 -1
  48. data/lib/shopify_app/logger.rb +28 -0
  49. data/lib/shopify_app/managers/scripttags_manager.rb +1 -0
  50. data/lib/shopify_app/managers/webhooks_manager.rb +6 -0
  51. data/lib/shopify_app/session/jwt.rb +1 -1
  52. data/lib/shopify_app/session/session_repository.rb +15 -4
  53. data/lib/shopify_app/version.rb +1 -1
  54. data/lib/shopify_app.rb +2 -0
  55. data/shopify_app.gemspec +2 -1
  56. data/yarn.lock +5 -5
  57. metadata +30 -4
data/yarn.lock CHANGED
@@ -3095,7 +3095,7 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
3095
3095
  isarray@2.0.1:
3096
3096
  version "2.0.1"
3097
3097
  resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.1.tgz#a37d94ed9cda2d59865c9f76fe596ee1f338741e"
3098
- integrity sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=
3098
+ integrity sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ==
3099
3099
 
3100
3100
  isarray@^2.0.5:
3101
3101
  version "2.0.5"
@@ -3601,7 +3601,7 @@ move-concurrently@^1.0.1:
3601
3601
  ms@2.0.0:
3602
3602
  version "2.0.0"
3603
3603
  resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
3604
- integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
3604
+ integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==
3605
3605
 
3606
3606
  ms@2.1.2:
3607
3607
  version "2.1.2"
@@ -4448,9 +4448,9 @@ socket.io-client@2.4.0:
4448
4448
  to-array "0.1.4"
4449
4449
 
4450
4450
  socket.io-parser@~3.3.0:
4451
- version "3.3.2"
4452
- resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.2.tgz#ef872009d0adcf704f2fbe830191a14752ad50b6"
4453
- integrity sha512-FJvDBuOALxdCI9qwRrO/Rfp9yfndRtc1jSgVgV8FDraihmSP/MLGD5PEuJrNfjALvcQ+vMDM/33AWOYP/JSjDg==
4451
+ version "3.3.3"
4452
+ resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.3.3.tgz#3a8b84823eba87f3f7624e64a8aaab6d6318a72f"
4453
+ integrity sha512-qOg87q1PMWWTeO01768Yh9ogn7chB9zkKtQnya41Y355S0UmpXgpcrFwAgjYJxu9BdKug5r5e9YtVSeWhKBUZg==
4454
4454
  dependencies:
4455
4455
  component-emitter "~1.3.0"
4456
4456
  debug "~3.1.0"
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: 21.1.1
4
+ version: 21.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-20 00:00:00.000000000 Z
11
+ date: 2022-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '12.2'
89
+ version: '12.3'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '12.2'
96
+ version: '12.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sprockets-rails
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -220,6 +220,20 @@ dependencies:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: ruby-lsp
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
223
237
  - !ruby/object:Gem::Dependency
224
238
  name: sqlite3
225
239
  requirement: !ruby/object:Gem::Requirement
@@ -271,6 +285,7 @@ files:
271
285
  - ".nvmrc"
272
286
  - ".rubocop.yml"
273
287
  - ".ruby-version"
288
+ - ".spin/rails/prepare-application"
274
289
  - CHANGELOG.md
275
290
  - CONTRIBUTING.md
276
291
  - Gemfile
@@ -295,6 +310,8 @@ files:
295
310
  - app/assets/javascripts/shopify_app/top_level_interaction.js
296
311
  - app/controllers/concerns/shopify_app/authenticated.rb
297
312
  - app/controllers/concerns/shopify_app/ensure_authenticated_links.rb
313
+ - app/controllers/concerns/shopify_app/ensure_has_session.rb
314
+ - app/controllers/concerns/shopify_app/ensure_installed.rb
298
315
  - app/controllers/concerns/shopify_app/require_known_shop.rb
299
316
  - app/controllers/concerns/shopify_app/shop_access_scopes_verification.rb
300
317
  - app/controllers/shopify_app/authenticated_controller.rb
@@ -342,9 +359,11 @@ files:
342
359
  - docs/Upgrading.md
343
360
  - docs/shopify_app/authentication.md
344
361
  - docs/shopify_app/content-security-policy.md
362
+ - docs/shopify_app/controller-concerns.md
345
363
  - docs/shopify_app/engine.md
346
364
  - docs/shopify_app/generators.md
347
365
  - docs/shopify_app/handling-access-scopes-changes.md
366
+ - docs/shopify_app/logging.md
348
367
  - docs/shopify_app/script-tags.md
349
368
  - docs/shopify_app/session-repository.md
350
369
  - docs/shopify_app/testing.md
@@ -353,6 +372,12 @@ files:
353
372
  - karma.conf.js
354
373
  - lib/generators/shopify_app/add_after_authenticate_job/add_after_authenticate_job_generator.rb
355
374
  - lib/generators/shopify_app/add_after_authenticate_job/templates/after_authenticate_job.rb
375
+ - lib/generators/shopify_app/add_app_uninstalled_job/add_app_uninstalled_job_generator.rb
376
+ - lib/generators/shopify_app/add_app_uninstalled_job/templates/app_uninstalled_job.rb.tt
377
+ - lib/generators/shopify_app/add_gdpr_jobs/add_gdpr_jobs_generator.rb
378
+ - lib/generators/shopify_app/add_gdpr_jobs/templates/customers_data_request_job.rb.tt
379
+ - lib/generators/shopify_app/add_gdpr_jobs/templates/customers_redact_job.rb.tt
380
+ - lib/generators/shopify_app/add_gdpr_jobs/templates/shop_redact_job.rb.tt
356
381
  - lib/generators/shopify_app/add_marketing_activity_extension/add_marketing_activity_extension_generator.rb
357
382
  - lib/generators/shopify_app/add_marketing_activity_extension/templates/marketing_activities_controller.rb
358
383
  - lib/generators/shopify_app/add_webhook/add_webhook_generator.rb
@@ -417,6 +442,7 @@ files:
417
442
  - lib/shopify_app/errors.rb
418
443
  - lib/shopify_app/jobs/scripttags_manager_job.rb
419
444
  - lib/shopify_app/jobs/webhooks_manager_job.rb
445
+ - lib/shopify_app/logger.rb
420
446
  - lib/shopify_app/managers/scripttags_manager.rb
421
447
  - lib/shopify_app/managers/webhooks_manager.rb
422
448
  - lib/shopify_app/middleware/jwt_middleware.rb