@medusajs/medusa 2.0.5-preview-20241112150249 → 2.0.5-snapshot-20241112130534

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"payment-webhook.d.ts","sourceRoot":"","sources":["../../src/subscribers/payment-webhook.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAOvE,wBAA8B,qBAAqB,CAAC,EAClD,KAAK,EACL,SAAS,GACV,EAAE,cAAc,CAAC,sBAAsB,CAAC,iBA4BxC;AAED,eAAO,MAAM,MAAM,EAAE,gBAKpB,CAAA"}
1
+ {"version":3,"file":"payment-webhook.d.ts","sourceRoot":"","sources":["../../src/subscribers/payment-webhook.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,sBAAsB,EACvB,MAAM,2BAA2B,CAAA;AAMlC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAOvE,wBAA8B,qBAAqB,CAAC,EAClD,KAAK,EACL,SAAS,GACV,EAAE,cAAc,CAAC,sBAAsB,CAAC,iBAiCxC;AAED,eAAO,MAAM,MAAM,EAAE,gBAKpB,CAAA"}
@@ -7,7 +7,7 @@ const utils_1 = require("@medusajs/framework/utils");
7
7
  async function paymentWebhookhandler({ event, container, }) {
8
8
  const paymentService = container.resolve(utils_1.Modules.PAYMENT);
9
9
  const input = event.data;
10
- if (input.payload?.rawData?.type === "Buffer") {
10
+ if (input.payload.rawData.type === "Buffer") {
11
11
  input.payload.rawData = Buffer.from(input.payload.rawData.data);
12
12
  }
13
13
  const processedEvent = await paymentService.getWebhookActionAndData(input);
@@ -20,6 +20,10 @@ async function paymentWebhookhandler({ event, container, }) {
20
20
  await (0, core_flows_1.processPaymentWorkflow)(container).run({
21
21
  input: processedEvent,
22
22
  });
23
+ // We process the intended side effects of payment processing separately.
24
+ await (0, core_flows_1.onPaymentProcessedWorkflow)(container).run({
25
+ input: processedEvent,
26
+ });
23
27
  }
24
28
  exports.config = {
25
29
  event: utils_1.PaymentWebhookEvents.WebhookReceived,
@@ -1 +1 @@
1
- {"version":3,"file":"payment-webhook.js","sourceRoot":"","sources":["../../src/subscribers/payment-webhook.ts"],"names":[],"mappings":";;;AAiBA,wCA+BC;AAhDD,qDAA6D;AAK7D,qDAIkC;AAQnB,KAAK,UAAU,qBAAqB,CAAC,EAClD,KAAK,EACL,SAAS,GAC8B;IACvC,MAAM,cAAc,GAA0B,SAAS,CAAC,OAAO,CAC7D,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;IAExB,IACG,KAAK,CAAC,OAAO,EAAE,OAAuC,EAAE,IAAI,KAAK,QAAQ,EAC1E,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAChC,KAAK,CAAC,OAAO,CAAC,OAAuC,CAAC,IAAI,CAC5D,CAAA;IACH,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAA;IAE1E,IAAI,cAAc,EAAE,MAAM,KAAK,sBAAc,CAAC,aAAa,EAAE,CAAC;QAC5D,OAAM;IACR,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QACzB,OAAM;IACR,CAAC;IAED,MAAM,IAAA,mCAAsB,EAAC,SAAS,CAAC,CAAC,GAAG,CAAC;QAC1C,KAAK,EAAE,cAAc;KACtB,CAAC,CAAA;AACJ,CAAC;AAEY,QAAA,MAAM,GAAqB;IACtC,KAAK,EAAE,4BAAoB,CAAC,eAAe;IAC3C,OAAO,EAAE;QACP,YAAY,EAAE,yBAAyB;KACxC;CACF,CAAA"}
1
+ {"version":3,"file":"payment-webhook.js","sourceRoot":"","sources":["../../src/subscribers/payment-webhook.ts"],"names":[],"mappings":";;;AAoBA,wCAoCC;AAxDD,qDAG6B;AAK7B,qDAIkC;AAQnB,KAAK,UAAU,qBAAqB,CAAC,EAClD,KAAK,EACL,SAAS,GAC8B;IACvC,MAAM,cAAc,GAA0B,SAAS,CAAC,OAAO,CAC7D,eAAO,CAAC,OAAO,CAChB,CAAA;IAED,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAA;IAExB,IACG,KAAK,CAAC,OAAO,CAAC,OAAuC,CAAC,IAAI,KAAK,QAAQ,EACxE,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAChC,KAAK,CAAC,OAAO,CAAC,OAAuC,CAAC,IAAI,CAC5D,CAAA;IACH,CAAC;IAED,MAAM,cAAc,GAAG,MAAM,cAAc,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAA;IAE1E,IAAI,cAAc,EAAE,MAAM,KAAK,sBAAc,CAAC,aAAa,EAAE,CAAC;QAC5D,OAAM;IACR,CAAC;IAED,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;QACzB,OAAM;IACR,CAAC;IAED,MAAM,IAAA,mCAAsB,EAAC,SAAS,CAAC,CAAC,GAAG,CAAC;QAC1C,KAAK,EAAE,cAAc;KACtB,CAAC,CAAA;IAEF,yEAAyE;IACzE,MAAM,IAAA,uCAA0B,EAAC,SAAS,CAAC,CAAC,GAAG,CAAC;QAC9C,KAAK,EAAE,cAAc;KACtB,CAAC,CAAA;AACJ,CAAC;AAEY,QAAA,MAAM,GAAqB;IACtC,KAAK,EAAE,4BAAoB,CAAC,eAAe;IAC3C,OAAO,EAAE;QACP,YAAY,EAAE,yBAAyB;KACxC;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/medusa",
3
- "version": "2.0.5-preview-20241112150249",
3
+ "version": "2.0.5-snapshot-20241112130534",
4
4
  "description": "Building blocks for digital commerce",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -43,7 +43,7 @@
43
43
  "test": "jest --silent --bail --maxWorkers=50% --forceExit"
44
44
  },
45
45
  "devDependencies": {
46
- "@medusajs/framework": "2.0.5-preview-20241112150249",
46
+ "@medusajs/framework": "2.0.5-snapshot-20241112130534",
47
47
  "@opentelemetry/api": "^1.9.0",
48
48
  "@opentelemetry/instrumentation": "^0.53.0",
49
49
  "@opentelemetry/instrumentation-pg": "^0.44.0",
@@ -62,49 +62,49 @@
62
62
  "dependencies": {
63
63
  "@inquirer/checkbox": "^2.3.11",
64
64
  "@inquirer/input": "^2.2.9",
65
- "@medusajs/admin-bundler": "2.0.5-preview-20241112150249",
66
- "@medusajs/api-key": "2.0.5-preview-20241112150249",
67
- "@medusajs/auth": "2.0.5-preview-20241112150249",
68
- "@medusajs/auth-emailpass": "2.0.5-preview-20241112150249",
69
- "@medusajs/auth-github": "2.0.5-preview-20241112150249",
70
- "@medusajs/auth-google": "2.0.5-preview-20241112150249",
71
- "@medusajs/cache-inmemory": "2.0.5-preview-20241112150249",
72
- "@medusajs/cache-redis": "2.0.5-preview-20241112150249",
73
- "@medusajs/cart": "2.0.5-preview-20241112150249",
74
- "@medusajs/core-flows": "2.0.5-preview-20241112150249",
75
- "@medusajs/currency": "2.0.5-preview-20241112150249",
76
- "@medusajs/customer": "2.0.5-preview-20241112150249",
77
- "@medusajs/event-bus-local": "2.0.5-preview-20241112150249",
78
- "@medusajs/event-bus-redis": "2.0.5-preview-20241112150249",
79
- "@medusajs/file": "2.0.5-preview-20241112150249",
80
- "@medusajs/file-local": "2.0.5-preview-20241112150249",
81
- "@medusajs/file-s3": "2.0.5-preview-20241112150249",
82
- "@medusajs/fulfillment": "2.0.5-preview-20241112150249",
83
- "@medusajs/fulfillment-manual": "2.0.5-preview-20241112150249",
84
- "@medusajs/index": "2.0.5-preview-20241112150249",
85
- "@medusajs/inventory": "2.0.5-preview-20241112150249",
86
- "@medusajs/link-modules": "2.0.5-preview-20241112150249",
87
- "@medusajs/locking": "2.0.5-preview-20241112150249",
88
- "@medusajs/locking-postgres": "2.0.5-preview-20241112150249",
89
- "@medusajs/locking-redis": "2.0.5-preview-20241112150249",
90
- "@medusajs/notification": "2.0.5-preview-20241112150249",
91
- "@medusajs/notification-local": "2.0.5-preview-20241112150249",
92
- "@medusajs/notification-sendgrid": "2.0.5-preview-20241112150249",
93
- "@medusajs/order": "2.0.5-preview-20241112150249",
94
- "@medusajs/payment": "2.0.5-preview-20241112150249",
95
- "@medusajs/payment-stripe": "2.0.5-preview-20241112150249",
96
- "@medusajs/pricing": "2.0.5-preview-20241112150249",
97
- "@medusajs/product": "2.0.5-preview-20241112150249",
98
- "@medusajs/promotion": "2.0.5-preview-20241112150249",
99
- "@medusajs/region": "2.0.5-preview-20241112150249",
100
- "@medusajs/sales-channel": "2.0.5-preview-20241112150249",
101
- "@medusajs/stock-location": "2.0.5-preview-20241112150249",
102
- "@medusajs/store": "2.0.5-preview-20241112150249",
103
- "@medusajs/tax": "2.0.5-preview-20241112150249",
104
- "@medusajs/telemetry": "2.0.5-preview-20241112150249",
105
- "@medusajs/user": "2.0.5-preview-20241112150249",
106
- "@medusajs/workflow-engine-inmemory": "2.0.5-preview-20241112150249",
107
- "@medusajs/workflow-engine-redis": "2.0.5-preview-20241112150249",
65
+ "@medusajs/admin-bundler": "2.0.5-snapshot-20241112130534",
66
+ "@medusajs/api-key": "2.0.5-snapshot-20241112130534",
67
+ "@medusajs/auth": "2.0.5-snapshot-20241112130534",
68
+ "@medusajs/auth-emailpass": "2.0.5-snapshot-20241112130534",
69
+ "@medusajs/auth-github": "2.0.5-snapshot-20241112130534",
70
+ "@medusajs/auth-google": "2.0.5-snapshot-20241112130534",
71
+ "@medusajs/cache-inmemory": "2.0.5-snapshot-20241112130534",
72
+ "@medusajs/cache-redis": "2.0.5-snapshot-20241112130534",
73
+ "@medusajs/cart": "2.0.5-snapshot-20241112130534",
74
+ "@medusajs/core-flows": "2.0.5-snapshot-20241112130534",
75
+ "@medusajs/currency": "2.0.5-snapshot-20241112130534",
76
+ "@medusajs/customer": "2.0.5-snapshot-20241112130534",
77
+ "@medusajs/event-bus-local": "2.0.5-snapshot-20241112130534",
78
+ "@medusajs/event-bus-redis": "2.0.5-snapshot-20241112130534",
79
+ "@medusajs/file": "2.0.5-snapshot-20241112130534",
80
+ "@medusajs/file-local": "2.0.5-snapshot-20241112130534",
81
+ "@medusajs/file-s3": "2.0.5-snapshot-20241112130534",
82
+ "@medusajs/fulfillment": "2.0.5-snapshot-20241112130534",
83
+ "@medusajs/fulfillment-manual": "2.0.5-snapshot-20241112130534",
84
+ "@medusajs/index": "2.0.5-snapshot-20241112130534",
85
+ "@medusajs/inventory": "2.0.5-snapshot-20241112130534",
86
+ "@medusajs/link-modules": "2.0.5-snapshot-20241112130534",
87
+ "@medusajs/locking": "2.0.5-snapshot-20241112130534",
88
+ "@medusajs/locking-postgres": "2.0.5-snapshot-20241112130534",
89
+ "@medusajs/locking-redis": "2.0.5-snapshot-20241112130534",
90
+ "@medusajs/notification": "2.0.5-snapshot-20241112130534",
91
+ "@medusajs/notification-local": "2.0.5-snapshot-20241112130534",
92
+ "@medusajs/notification-sendgrid": "2.0.5-snapshot-20241112130534",
93
+ "@medusajs/order": "2.0.5-snapshot-20241112130534",
94
+ "@medusajs/payment": "2.0.5-snapshot-20241112130534",
95
+ "@medusajs/payment-stripe": "2.0.5-snapshot-20241112130534",
96
+ "@medusajs/pricing": "2.0.5-snapshot-20241112130534",
97
+ "@medusajs/product": "2.0.5-snapshot-20241112130534",
98
+ "@medusajs/promotion": "2.0.5-snapshot-20241112130534",
99
+ "@medusajs/region": "2.0.5-snapshot-20241112130534",
100
+ "@medusajs/sales-channel": "2.0.5-snapshot-20241112130534",
101
+ "@medusajs/stock-location": "2.0.5-snapshot-20241112130534",
102
+ "@medusajs/store": "2.0.5-snapshot-20241112130534",
103
+ "@medusajs/tax": "2.0.5-snapshot-20241112130534",
104
+ "@medusajs/telemetry": "2.0.5-snapshot-20241112130534",
105
+ "@medusajs/user": "2.0.5-snapshot-20241112130534",
106
+ "@medusajs/workflow-engine-inmemory": "2.0.5-snapshot-20241112130534",
107
+ "@medusajs/workflow-engine-redis": "2.0.5-snapshot-20241112130534",
108
108
  "@swc/core": "1.5.7",
109
109
  "@swc/helpers": "^0.5.11",
110
110
  "@types/express": "^4.17.17",
@@ -125,7 +125,7 @@
125
125
  "zod": "3.22.4"
126
126
  },
127
127
  "peerDependencies": {
128
- "@medusajs/framework": "2.0.5-preview-20241112150249",
128
+ "@medusajs/framework": "2.0.5-snapshot-20241112130534",
129
129
  "@mikro-orm/core": "5.9.7",
130
130
  "@mikro-orm/knex": "5.9.7",
131
131
  "@mikro-orm/migrations": "5.9.7",