@reactionary/feeds 0.12.1 → 0.12.3

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 (2) hide show
  1. package/cli.cjs +18 -6
  2. package/package.json +9 -9
package/cli.cjs CHANGED
@@ -37063,7 +37063,8 @@ var init_envelope_model = __esm({
37063
37063
  page: AnalyticsPageSchema.optional(),
37064
37064
  userAgent: string2().optional().meta({ description: "The user agent of the visitor's request, if known. Delivery happens after the request, so subscribers cannot read it from the request context later." }),
37065
37065
  clientIp: string2().optional().meta({ description: "The IP address of the visitor's request, if known. Personal data: capturing it does not forward it, each subscriber decides what to send to its vendor." }),
37066
- isBot: boolean2().optional().meta({ description: "True if the request was identified as a bot or crawler." })
37066
+ isBot: boolean2().optional().meta({ description: "True if the request was identified as a bot or crawler." }),
37067
+ sessionId: string2().optional().meta({ description: "The id of the visitor's session at emit time (`session.id`), if the storefront sets one." })
37067
37068
  });
37068
37069
  AnalyticsEventEnvelopeSchema = looseObject({
37069
37070
  id: string2().meta({ description: "Unique event id (UUID). Used for deduplication by vendors and for debugging." }),
@@ -39473,6 +39474,7 @@ var init_session_schema = __esm({
39473
39474
  lastUpdated: coerce_exports.date()
39474
39475
  });
39475
39476
  SessionSchema = looseObject({
39477
+ id: string2().optional().meta({ description: "The id of the visitor's current session, set by the storefront. A long-lived visitor id belongs in marketingContext.identifier, not here." }),
39476
39478
  identityContext: IdentityContextSchema,
39477
39479
  marketingContext: PersonalizationProfileSchema.default(() => PersonalizationProfileSchema.parse({})),
39478
39480
  consent: AnalyticsConsentSchema.optional().meta({ description: "The visitor's consent for analytics and marketing processing, if known. When absent, the analytics dispatcher applies its configured default." })
@@ -40512,7 +40514,8 @@ var init_dispatcher = __esm({
40512
40514
  page: referrer ? { referrer } : void 0,
40513
40515
  userAgent: userAgent || void 0,
40514
40516
  clientIp: clientIp || void 0,
40515
- isBot
40517
+ isBot,
40518
+ sessionId: session.id || void 0
40516
40519
  };
40517
40520
  }
40518
40521
  scheduleFlush() {
@@ -160941,6 +160944,9 @@ var init_category_capability5 = __esm({
160941
160944
  });
160942
160945
 
160943
160946
  // packages/medusa/src/capabilities/checkout.capability.ts
160947
+ function isCartAlreadyCompleted(error5) {
160948
+ return error5 instanceof Error && /is already completed/i.test(error5.message);
160949
+ }
160944
160950
  var import_debug24, debug24, CheckoutNotReadyForFinalizationError3, MedusaCheckoutCapability;
160945
160951
  var init_checkout_capability5 = __esm({
160946
160952
  "packages/medusa/src/capabilities/checkout.capability.ts"() {
@@ -161296,11 +161302,17 @@ var init_checkout_capability5 = __esm({
161296
161302
  if (!checkout.value.resultingOrder) {
161297
161303
  const client = await this.medusaApi.getClient();
161298
161304
  const medusaId = payload.checkout;
161299
- await client.store.cart.update(medusaId.key, {
161300
- metadata: {
161301
- cart_id: medusaId.key
161305
+ try {
161306
+ await client.store.cart.update(medusaId.key, {
161307
+ metadata: {
161308
+ cart_id: medusaId.key
161309
+ }
161310
+ });
161311
+ } catch (error5) {
161312
+ if (!isCartAlreadyCompleted(error5)) {
161313
+ throw error5;
161302
161314
  }
161303
- });
161315
+ }
161304
161316
  const response = await client.store.cart.complete(medusaId.key);
161305
161317
  if (response.type === "order") {
161306
161318
  const resultingOrder = this.parseCompletedOrderIdentifier(response.order);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reactionary/feeds",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./src/index.d.ts",
@@ -12,14 +12,14 @@
12
12
  "url": "git+https://github.com/Solteq/reactionary.git"
13
13
  },
14
14
  "dependencies": {
15
- "@reactionary/algolia": "0.12.1",
16
- "@reactionary/commercetools": "0.12.1",
17
- "@reactionary/core": "0.12.1",
18
- "@reactionary/fake": "0.12.1",
19
- "@reactionary/magento": "0.12.1",
20
- "@reactionary/medusa": "0.12.1",
21
- "@reactionary/meilisearch": "0.12.1",
22
- "@reactionary/unomi": "0.12.1",
15
+ "@reactionary/algolia": "0.12.3",
16
+ "@reactionary/commercetools": "0.12.3",
17
+ "@reactionary/core": "0.12.3",
18
+ "@reactionary/fake": "0.12.3",
19
+ "@reactionary/magento": "0.12.3",
20
+ "@reactionary/medusa": "0.12.3",
21
+ "@reactionary/meilisearch": "0.12.3",
22
+ "@reactionary/unomi": "0.12.3",
23
23
  "commander": "^15.0.0",
24
24
  "dotenv": "^17.2.2",
25
25
  "sitemap": "^9.0.1",