backend-manager 5.2.19 → 5.3.1
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.
- package/CHANGELOG.md +24 -0
- package/CLAUDE.md +5 -4
- package/docs/admin-post-route.md +2 -0
- package/docs/ai-library.md +29 -2
- package/docs/common-mistakes.md +1 -1
- package/docs/environment-detection.md +87 -3
- package/docs/marketing-campaigns.md +1 -1
- package/docs/payment-system.md +1 -1
- package/docs/testing.md +60 -15
- package/package.json +1 -1
- package/src/cli/commands/install.js +2 -2
- package/src/cli/commands/setup.js +12 -4
- package/src/cli/commands/test.js +1 -1
- package/src/cli/index.js +6 -2
- package/src/defaults/CLAUDE.md +2 -2
- package/src/defaults/test/_init.js +14 -0
- package/src/manager/functions/_legacy/actions/create-post-handler.js +1 -1
- package/src/manager/functions/core/actions/api/admin/edit-post.js +1 -1
- package/src/manager/functions/core/actions/api/general/send-email.js +1 -1
- package/src/manager/functions/core/actions/api/user/delete.js +1 -1
- package/src/manager/functions/core/actions/api/user/oauth2.js +1 -1
- package/src/manager/helpers/analytics.js +3 -1
- package/src/manager/helpers/assistant.js +43 -38
- package/src/manager/index.js +76 -12
- package/src/manager/libraries/ai/index.js +33 -0
- package/src/manager/libraries/ai/providers/openai.js +105 -8
- package/src/manager/libraries/content/ghostii.js +76 -16
- package/src/manager/libraries/email/data/disposable-domains.json +23 -0
- package/src/manager/libraries/email/generators/lib/image-illustrator.js +154 -0
- package/src/manager/libraries/email/generators/newsletter.js +16 -2
- package/src/manager/libraries/payment/discount-codes.js +1 -0
- package/src/manager/routes/admin/post/put.js +1 -1
- package/src/manager/routes/handler/post/post.js +1 -1
- package/src/manager/routes/payments/intent/processors/test.js +1 -1
- package/src/manager/routes/user/delete.js +1 -1
- package/src/manager/routes/user/signup/post.js +4 -2
- package/src/test/runner.js +142 -20
- package/src/test/test-accounts.js +159 -102
- package/test/events/payments/journey-payments-cancel-endpoint.js +6 -2
- package/test/events/payments/journey-payments-cancel.js +6 -3
- package/test/events/payments/journey-payments-failure.js +6 -3
- package/test/events/payments/journey-payments-plan-change.js +6 -3
- package/test/events/payments/journey-payments-refund-webhook.js +6 -2
- package/test/events/payments/journey-payments-suspend.js +6 -3
- package/test/events/payments/journey-payments-trial-cancel.js +6 -3
- package/test/events/payments/journey-payments-trial.js +10 -4
- package/test/events/payments/journey-payments-uid-resolution.js +6 -2
- package/test/events/payments/journey-payments-upgrade.js +6 -3
- package/test/helpers/content/ghostii-blocks.js +134 -0
- package/test/helpers/environment.js +230 -0
- package/test/helpers/webhook-forward.js +26 -0
- package/test/routes/marketing/webhook-forward.js +14 -7
- package/test/routes/payments/cancel.js +4 -1
- package/test/routes/payments/dispute-alert.js +9 -6
- package/test/routes/payments/intent.js +55 -14
- package/test/routes/payments/portal.js +4 -1
- package/test/routes/payments/refund.js +4 -1
|
@@ -56,9 +56,12 @@ module.exports = {
|
|
|
56
56
|
|
|
57
57
|
{
|
|
58
58
|
name: 'succeeds-with-test-processor',
|
|
59
|
-
async run({ http, assert, config, accounts, firestore, waitFor }) {
|
|
59
|
+
async run({ http, assert, config, accounts, firestore, waitFor, skip }) {
|
|
60
60
|
const uid = accounts['journey-payments-portal-route'].uid;
|
|
61
61
|
const paidProduct = config.payment.products.find(p => p.id !== 'basic' && p.prices?.monthly);
|
|
62
|
+
if (!paidProduct) {
|
|
63
|
+
skip('No paid product with monthly price configured in this brand');
|
|
64
|
+
}
|
|
62
65
|
|
|
63
66
|
// Set up a paid subscription with the test processor
|
|
64
67
|
const intentResponse = await http.as('journey-payments-portal-route').post('payments/intent', {
|
|
@@ -112,9 +112,12 @@ module.exports = {
|
|
|
112
112
|
|
|
113
113
|
{
|
|
114
114
|
name: 'succeeds-with-test-processor',
|
|
115
|
-
async run({ http, assert, config, accounts, firestore, waitFor }) {
|
|
115
|
+
async run({ http, assert, config, accounts, firestore, waitFor, skip }) {
|
|
116
116
|
const uid = accounts['route-refund-success'].uid;
|
|
117
117
|
const paidProduct = config.payment.products.find(p => p.id !== 'basic' && p.prices?.monthly);
|
|
118
|
+
if (!paidProduct) {
|
|
119
|
+
skip('No paid product with monthly price configured in this brand');
|
|
120
|
+
}
|
|
118
121
|
|
|
119
122
|
// Step 1: Create a test subscription intent to set up a proper paid subscription
|
|
120
123
|
const intentResponse = await http.as('route-refund-success').post('payments/intent', {
|