@hartl-services/medusa-base 2.7.0 → 2.9.0

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.
Files changed (54) hide show
  1. package/.medusa/server/src/admin/admin-components/features/plugin-features/components/PluginSettingsForm.js +12 -9
  2. package/.medusa/server/src/admin/admin-components/features/plugin-features/hooks/usePluginFeatureEnabled.d.ts +5 -1
  3. package/.medusa/server/src/admin/admin-components/features/plugin-features/hooks/usePluginFeatures.d.ts +20 -4
  4. package/.medusa/server/src/admin/admin-components/features/plugin-features/hooks/usePluginSettingsForm.d.ts +5 -1
  5. package/.medusa/server/src/admin/admin-components/features/plugin-features/lib/plugin-features-admin-client.d.ts +20 -4
  6. package/.medusa/server/src/admin/admin-components/features/plugin-features/lib/plugin-view.d.ts +0 -5
  7. package/.medusa/server/src/admin/admin-components/features/plugin-features/lib/plugin-view.js +0 -5
  8. package/.medusa/server/src/admin/admin-components/features/plugin-features/lib/settings-layout.d.ts +4 -0
  9. package/.medusa/server/src/admin/admin-components/features/plugin-features/lib/settings-layout.js +4 -0
  10. package/.medusa/server/src/admin/admin-components/i18n/texts.d.ts +1 -2
  11. package/.medusa/server/src/admin/admin-components/i18n/texts.js +1 -2
  12. package/.medusa/server/src/admin/index.js +142 -87
  13. package/.medusa/server/src/admin/index.mjs +144 -89
  14. package/.medusa/server/src/api/admin/email/templates/[kind]/send-test/route.js +7 -1
  15. package/.medusa/server/src/customer-auth/plugin-features.js +10 -10
  16. package/.medusa/server/src/email/application/warn-credential-expiry.js +77 -0
  17. package/.medusa/server/src/email/config/index.js +8 -2
  18. package/.medusa/server/src/email/config/notification-module.js +28 -2
  19. package/.medusa/server/src/email/domain/business-keys.js +5 -2
  20. package/.medusa/server/src/email/domain/failure-classification.js +9 -1
  21. package/.medusa/server/src/email/plugin-features.js +123 -1
  22. package/.medusa/server/src/email/rendering/default-templates.js +16 -1
  23. package/.medusa/server/src/email/rendering/render-email.js +2 -1
  24. package/.medusa/server/src/email/types/email-kinds.js +2 -1
  25. package/.medusa/server/src/email/types/template-data.js +8 -1
  26. package/.medusa/server/src/jobs/email-credential-expiry.js +27 -0
  27. package/.medusa/server/src/modules/email/domain/message-state.js +3 -1
  28. package/.medusa/server/src/modules/email/migrations/Migration20261011120000.js +20 -0
  29. package/.medusa/server/src/modules/plugin-features/domain/plugin-settings.js +27 -6
  30. package/.medusa/server/src/modules/plugin-features/service.js +4 -3
  31. package/.medusa/server/src/providers/smtp/delivery-settings.js +75 -0
  32. package/.medusa/server/src/providers/smtp/graph-transport.js +150 -0
  33. package/.medusa/server/src/providers/smtp/service.js +105 -37
  34. package/.medusa/server/src/providers/smtp/types.js +7 -1
  35. package/.medusa/server/src/public/descriptor.js +24 -3
  36. package/.medusa/server/src/shared/lib/dates.js +8 -2
  37. package/.medusa/server/src/shop-config/build-food-shop-config.js +3 -5
  38. package/README.md +100 -65
  39. package/dist/customer-auth/plugin-features.js +9 -9
  40. package/dist/email/config/index.d.ts +6 -1
  41. package/dist/email/config/index.js +7 -1
  42. package/dist/email/config/notification-module.d.ts +25 -0
  43. package/dist/email/config/notification-module.js +27 -1
  44. package/dist/email/types/email-kinds.d.ts +2 -1
  45. package/dist/email/types/email-kinds.js +1 -0
  46. package/dist/email/types/template-data.d.ts +10 -0
  47. package/dist/email/types/template-data.js +7 -0
  48. package/dist/public/descriptor.js +23 -2
  49. package/dist/public/types.d.ts +14 -4
  50. package/dist/shared/lib/dates.d.ts +2 -0
  51. package/dist/shared/lib/dates.js +7 -1
  52. package/dist/shop-config/build-food-shop-config.d.ts +1 -1
  53. package/dist/shop-config/build-food-shop-config.js +2 -4
  54. package/package.json +2 -2
@@ -31,7 +31,7 @@ export type FoodShopConfigInput = {
31
31
  };
32
32
  /**
33
33
  * Builds the plain `medusa-config.ts` input of a food shop: Medusa core
34
- * settings, the Redis event bus, SMTP notifications, S3 file storage, tax and
34
+ * settings, the Redis event bus, the mail provider (set up in the Admin), S3 file storage, tax and
35
35
  * Stripe payment providers, and the Hartl Services plugins (the base plugin
36
36
  * with its E-Mail, Documents and file storage modules plus five feature
37
37
  * plugins). Deployment
@@ -12,7 +12,7 @@ const sentry_logger_1 = require("../public/sentry-logger");
12
12
  const options_1 = require("./options");
13
13
  /**
14
14
  * Builds the plain `medusa-config.ts` input of a food shop: Medusa core
15
- * settings, the Redis event bus, SMTP notifications, S3 file storage, tax and
15
+ * settings, the Redis event bus, the mail provider (set up in the Admin), S3 file storage, tax and
16
16
  * Stripe payment providers, and the Hartl Services plugins (the base plugin
17
17
  * with its E-Mail, Documents and file storage modules plus five feature
18
18
  * plugins). Deployment
@@ -35,7 +35,6 @@ function buildFoodShopConfig(options, environment = process.env) {
35
35
  "COOKIE_SECRET",
36
36
  "MEDUSA_BACKEND_URL",
37
37
  "STOREFRONT_URL",
38
- ...config_1.SMTP_ENVIRONMENT_VARIABLES,
39
38
  "STRIPE_API_KEY",
40
39
  "STRIPE_WEBHOOK_SECRET",
41
40
  "S3_CACHE_STORAGE_BUCKET",
@@ -43,7 +42,6 @@ function buildFoodShopConfig(options, environment = process.env) {
43
42
  "DOCUMENT_PDF_EXECUTABLE",
44
43
  ], phase, {
45
44
  ...config_1.MEDUSA_BUILD_PLACEHOLDERS,
46
- ...config_1.SMTP_BUILD_PLACEHOLDERS,
47
45
  ...config_1.S3_BUILD_PLACEHOLDERS,
48
46
  ...config_1.DOCUMENTS_BUILD_PLACEHOLDERS,
49
47
  });
@@ -101,7 +99,7 @@ function buildFoodShopConfig(options, environment = process.env) {
101
99
  },
102
100
  ]
103
101
  : []),
104
- (0, config_1.createSmtpNotificationModuleConfig)((0, config_1.resolveSmtp)(env, allowInsecure)),
102
+ (0, config_1.createEmailNotificationModuleConfig)({ allowInsecure }),
105
103
  s3CacheStorage.fileModule,
106
104
  {
107
105
  // Replaces Medusa's default auth entry (same module key): the same
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hartl-services/medusa-base",
3
- "version": "2.7.0",
3
+ "version": "2.9.0",
4
4
  "description": "Base plugin for Hartl Services Medusa shops: per-plugin feature toggles with a generic Admin settings page, a Store endpoint for storefronts, enforcement helpers, the complete-cart hook composition, the root redirect, cart-promotion link repair, the built-in E-Mail, Documents and S3 file storage modules, config helpers with the turnkey food-shop preset, and the Sentry logger wrapper and instrumentation.",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -101,7 +101,7 @@
101
101
  "mime-types": "3.0.1",
102
102
  "nodemailer": "6.10.1",
103
103
  "ulid": "^2.4.0",
104
- "@hartl-services/medusa-food-supplements-contracts": "^0.27.0"
104
+ "@hartl-services/medusa-food-supplements-contracts": "^0.29.0"
105
105
  },
106
106
  "devDependencies": {
107
107
  "@medusajs/admin-sdk": "2.19.0",