@medusajs/payment 2.10.4-snapshot-20250927183117 → 2.10.4-snapshot-20250928141742
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/dist/migrations/Migration20250924135437.d.ts +6 -0
- package/dist/migrations/Migration20250924135437.d.ts.map +1 -0
- package/dist/migrations/Migration20250924135437.js +37 -0
- package/dist/migrations/Migration20250924135437.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250924135437.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20250924135437.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAGjD,qBAAa,uBAAwB,SAAQ,SAAS;IACrC,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAWrC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20250924135437 = void 0;
|
|
4
|
+
const migrations_1 = require("@mikro-orm/migrations");
|
|
5
|
+
const ulid_1 = require("ulid");
|
|
6
|
+
class Migration20250924135437 extends migrations_1.Migration {
|
|
7
|
+
async up() {
|
|
8
|
+
const [existingReason] = await this.execute(`
|
|
9
|
+
SELECT 1 as exists
|
|
10
|
+
FROM "refund_reason"
|
|
11
|
+
LIMIT 1
|
|
12
|
+
`);
|
|
13
|
+
if (!existingReason) {
|
|
14
|
+
// 2. Create default shipping option type
|
|
15
|
+
await this.execute(`
|
|
16
|
+
INSERT INTO "refund_reason" (id, label, description)
|
|
17
|
+
VALUES
|
|
18
|
+
('refr_${(0, ulid_1.ulid)()}', 'Shipping Issue', 'Refund due to lost, delayed, or misdelivered shipment'),
|
|
19
|
+
('refr_${(0, ulid_1.ulid)()}', 'Customer Care Adjustment', 'Refund given as goodwill or compensation for inconvenience'),
|
|
20
|
+
('refr_${(0, ulid_1.ulid)()}', 'Pricing Error', 'Refund to correct an overcharge, missing discount, or incorrect price');
|
|
21
|
+
`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async down() {
|
|
25
|
+
// Remove the default refund reasons we created
|
|
26
|
+
this.addSql(`
|
|
27
|
+
DELETE FROM "refund_reason"
|
|
28
|
+
WHERE ("label", "description") IN (
|
|
29
|
+
('Shipping Issue', 'Refund due to lost, delayed, or misdelivered shipment'),
|
|
30
|
+
('Customer Care Adjustment', 'Refund given as goodwill or compensation for inconvenience'),
|
|
31
|
+
('Pricing Error', 'Refund to correct an overcharge, missing discount, or incorrect price')
|
|
32
|
+
)
|
|
33
|
+
`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.Migration20250924135437 = Migration20250924135437;
|
|
37
|
+
//# sourceMappingURL=Migration20250924135437.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Migration20250924135437.js","sourceRoot":"","sources":["../../src/migrations/Migration20250924135437.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AACjD,+BAA2B;AAE3B,MAAa,uBAAwB,SAAQ,sBAAS;IAC3C,KAAK,CAAC,EAAE;QACf,MAAM,CAAC,cAAc,CAAC,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;;;;KAI3C,CAAC,CAAA;QAEF,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,yCAAyC;YACzC,MAAM,IAAI,CAAC,OAAO,CAAC;;;mBAGN,IAAA,WAAI,GAAE;mBACN,IAAA,WAAI,GAAE;mBACN,IAAA,WAAI,GAAE;OAClB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,+CAA+C;QAC/C,IAAI,CAAC,MAAM,CAAC;;;;;;;KAOX,CAAC,CAAA;IACJ,CAAC;CACF;AA/BD,0DA+BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/joiner-config.ts","../src/loaders/index.ts","../src/loaders/providers.ts","../src/migrations/
|
|
1
|
+
{"root":["../src/index.ts","../src/joiner-config.ts","../src/loaders/index.ts","../src/loaders/providers.ts","../src/migrations/Migration20240225134525.ts","../src/migrations/Migration20240806072619.ts","../src/migrations/Migration20241211151053.ts","../src/migrations/Migration20250115160517.ts","../src/migrations/Migration20250120110552.ts","../src/migrations/Migration20250123122334.ts","../src/migrations/Migration20250206105639.ts","../src/migrations/Migration20250207132723.ts","../src/migrations/Migration20250625084134.ts","../src/migrations/Migration20250924135437.ts","../src/models/account-holder.ts","../src/models/capture.ts","../src/models/index.ts","../src/models/payment-collection.ts","../src/models/payment-provider.ts","../src/models/payment-session.ts","../src/models/payment.ts","../src/models/refund-reason.ts","../src/models/refund.ts","../src/providers/index.ts","../src/providers/system.ts","../src/services/index.ts","../src/services/payment-module.ts","../src/services/payment-provider.ts","../src/types/index.ts"],"version":"5.6.2"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/payment",
|
|
3
|
-
"version": "2.10.4-snapshot-
|
|
3
|
+
"version": "2.10.4-snapshot-20250928141742",
|
|
4
4
|
"description": "Medusa Payment module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,9 +23,21 @@
|
|
|
23
23
|
},
|
|
24
24
|
"author": "Medusa",
|
|
25
25
|
"license": "MIT",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"watch": "tsc --build --watch",
|
|
28
|
+
"watch:test": "tsc --build tsconfig.spec.json --watch",
|
|
29
|
+
"resolve:aliases": "tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && tsc-alias -p tsconfig.resolved.json && rimraf tsconfig.resolved.json",
|
|
30
|
+
"build": "rimraf dist && tsc --build && npm run resolve:aliases",
|
|
31
|
+
"test": "jest --bail --passWithNoTests --forceExit -- src",
|
|
32
|
+
"test:integration": "jest --forceExit -- integration-tests/**/__tests__/**/*.ts",
|
|
33
|
+
"migration:initial": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm migration:create --initial",
|
|
34
|
+
"migration:create": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm-orm migration:create",
|
|
35
|
+
"migration:up": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm-orm migration:up",
|
|
36
|
+
"orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm-orm cache:clear"
|
|
37
|
+
},
|
|
26
38
|
"devDependencies": {
|
|
27
|
-
"@medusajs/framework": "2.10.4-snapshot-
|
|
28
|
-
"@medusajs/test-utils": "2.10.4-snapshot-
|
|
39
|
+
"@medusajs/framework": "2.10.4-snapshot-20250928141742",
|
|
40
|
+
"@medusajs/test-utils": "2.10.4-snapshot-20250928141742",
|
|
29
41
|
"@swc/core": "^1.7.28",
|
|
30
42
|
"@swc/jest": "^0.2.36",
|
|
31
43
|
"jest": "^29.7.0",
|
|
@@ -34,18 +46,6 @@
|
|
|
34
46
|
"typescript": "^5.6.2"
|
|
35
47
|
},
|
|
36
48
|
"peerDependencies": {
|
|
37
|
-
"@medusajs/framework": "2.10.4-snapshot-
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"watch": "tsc --build --watch",
|
|
41
|
-
"watch:test": "tsc --build tsconfig.spec.json --watch",
|
|
42
|
-
"resolve:aliases": "tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && tsc-alias -p tsconfig.resolved.json && rimraf tsconfig.resolved.json",
|
|
43
|
-
"build": "rimraf dist && tsc --build && npm run resolve:aliases",
|
|
44
|
-
"test": "jest --bail --passWithNoTests --forceExit -- src",
|
|
45
|
-
"test:integration": "jest --forceExit -- integration-tests/**/__tests__/**/*.ts",
|
|
46
|
-
"migration:initial": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm migration:create --initial",
|
|
47
|
-
"migration:create": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm migration:create",
|
|
48
|
-
"migration:up": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm migration:up",
|
|
49
|
-
"orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts medusa-mikro-orm cache:clear"
|
|
49
|
+
"@medusajs/framework": "2.10.4-snapshot-20250928141742"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|