rerobe-js-orm 4.9.2 → 4.9.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.
@@ -281,7 +281,13 @@ class Product extends Base_1.default {
281
281
  const systemTags = Array.isArray(parent.systemTags)
282
282
  ? parent.systemTags.filter((tag) => tag !== 'templateProduct')
283
283
  : [];
284
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, parent), { productClass: product_constants_1.PRODUCT_CLASS_VALUES.UNIQUE, variantInventory: [], status: product_constants_1.PRODUCT_STATES.hidden, systemTags: [...new Set([...systemTags, 'clonedProduct', 'variantClone'])], price: String(resolvedPrice), imageUrls: resolvedImageUrls, sku: resolvedSku }), ProductVariantHelpers_1.default.mapOptionsToAttributes(variantOptions)), { variantOptions, originalVariantProductId: parent.documentId || '', chosenVariantId: (chosenVariant && chosenVariant.id) || chosenVariantId || '', chosenVariantSku: resolvedSku, bookedTimestamp: null, openTimestamp: null }), overrides);
284
+ return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, parent), { productClass: product_constants_1.PRODUCT_CLASS_VALUES.UNIQUE, variantInventory: [], status: product_constants_1.PRODUCT_STATES.hidden, systemTags: [...new Set([...systemTags, 'clonedProduct', 'variantClone'])], price: String(resolvedPrice), imageUrls: resolvedImageUrls, sku: resolvedSku }), ProductVariantHelpers_1.default.mapOptionsToAttributes(variantOptions)), { variantOptions, originalVariantProductId: parent.documentId || '', chosenVariantId: (chosenVariant && chosenVariant.id) || chosenVariantId || '', chosenVariantSku: resolvedSku,
285
+ // The clone is a brand-new unit "born now": null out the parent's
286
+ // lifecycle timestamps so the persistence layer stamps fresh createdAt(s).
287
+ // Critical for createdAtTimestamp — the abandoned-clone reaper deletes by
288
+ // age, so inheriting the parent's (old) timestamp would reap the clone
289
+ // immediately, mid-checkout.
290
+ createdAt: null, createdAtTimestamp: null, bookedTimestamp: null, openTimestamp: null }), overrides);
285
291
  }
286
292
  // Diagnose whether a variant-inventory product is purchasable. Mirrors
287
293
  // the readiness gate the retail entry exposes as a confirm-before-save
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "4.9.2",
3
+ "version": "4.9.3",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",