@mohasinac/appkit 4.42.11 → 4.42.13
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.
|
@@ -535,7 +535,25 @@ async function createOrderForGroup(group, orderType, ctx) {
|
|
|
535
535
|
shipmentProtectionAddon: !adminBypass && shipmentProtectionFee > 0 ? true : undefined,
|
|
536
536
|
shipmentProtectionFee: !adminBypass && shipmentProtectionFee > 0 ? shipmentProtectionFee : undefined,
|
|
537
537
|
taxableAmount: gstBreakdown?.taxableAmount,
|
|
538
|
-
|
|
538
|
+
/*
|
|
539
|
+
* 🛑 This must include the GST on the PLATFORM FEE, not just product GST.
|
|
540
|
+
*
|
|
541
|
+
* `gstBreakdown` exists only when product GST is non-zero, and this
|
|
542
|
+
* catalogue's products carry no `gstRate` — so for every real order so far
|
|
543
|
+
* this resolved to `undefined`. Measured 2026-10-03: 0 of 40 live orders
|
|
544
|
+
* had a `gstAmount`, and the order page's Tax row (which maps from it via
|
|
545
|
+
* adapters.ts `tax: doc.gstAmount`) had therefore NEVER rendered.
|
|
546
|
+
*
|
|
547
|
+
* Meanwhile the buyer IS charged `platformFeeGst` — it is a term in the
|
|
548
|
+
* `orderTotal` expression above — and checkout displays it: a real order
|
|
549
|
+
* showed "GST ₹1.80" at checkout and an order page whose lines summed
|
|
550
|
+
* ₹1.80 short of its own total, with nothing naming the gap.
|
|
551
|
+
*
|
|
552
|
+
* Summing both is what makes the order reconcile. Keep `cgst`/`sgst`/`igst`
|
|
553
|
+
* as the product-only split; they describe the intra/inter-state breakdown
|
|
554
|
+
* of goods, which fee GST is not part of.
|
|
555
|
+
*/
|
|
556
|
+
gstAmount: (gstBreakdown?.gstAmount ?? 0) + platformFeeGst || undefined,
|
|
539
557
|
cgst: gstBreakdown?.cgst || undefined,
|
|
540
558
|
sgst: gstBreakdown?.sgst || undefined,
|
|
541
559
|
igst: gstBreakdown?.igst || undefined,
|
|
@@ -212,6 +212,70 @@ const _rawProductsStandardSeedData = [
|
|
|
212
212
|
createdAt: new Date("2026-04-10"),
|
|
213
213
|
updatedAt: new Date("2026-05-01"),
|
|
214
214
|
},
|
|
215
|
+
/*
|
|
216
|
+
* 🛑 CROSS-STORE PAIR — these two exist ONLY so the cross-store bundle
|
|
217
|
+
* refusal can be exercised. They are deliberately in DIFFERENT stores,
|
|
218
|
+
* which is the shape all four bundle write routes must reject via
|
|
219
|
+
* findBundleMemberStores().
|
|
220
|
+
*
|
|
221
|
+
* Added 2026-10-03: CLAUDE.md asserted these were seeded and they were not —
|
|
222
|
+
* a full reseed produced 70 products with zero tester fixtures, so the guard
|
|
223
|
+
* had nothing that could trigger it and the case was unrunnable. A guard with
|
|
224
|
+
* no data that triggers it is a guard nobody can verify.
|
|
225
|
+
*
|
|
226
|
+
* isTestData marks them for the sandbox cleanup sweep; keep the expiry far
|
|
227
|
+
* enough out that a run cannot outlive them.
|
|
228
|
+
*/
|
|
229
|
+
{
|
|
230
|
+
id: "product-tester-crossstore-a",
|
|
231
|
+
slug: "product-tester-crossstore-a",
|
|
232
|
+
title: "QA Cross-store A — Beyblade Arena",
|
|
233
|
+
description: "Tester fixture. Paired with product-tester-crossstore-b, which belongs to a DIFFERENT store, so that a bundle spanning both must be refused at save time.",
|
|
234
|
+
categorySlugs: ["category-beyblade-burst", "category-spinning-tops"],
|
|
235
|
+
categoryNames: ["Beyblade Burst", "Spinning Tops"],
|
|
236
|
+
brandSlug: "brand-beyblade",
|
|
237
|
+
brand: "Beyblade",
|
|
238
|
+
price: 499,
|
|
239
|
+
currency: "INR",
|
|
240
|
+
stockQuantity: 5,
|
|
241
|
+
availableQuantity: 5,
|
|
242
|
+
isSold: false,
|
|
243
|
+
mainImage: seedPhoto("product-image-tester-crossstore-a-1-20261003", 900, 900),
|
|
244
|
+
images: [seedPhoto("product-image-tester-crossstore-a-1-20261003", 900, 900)],
|
|
245
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
246
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
247
|
+
tags: ["qa-fixture"],
|
|
248
|
+
storeId: "store-beyblade-arena",
|
|
249
|
+
storeName: "Beyblade Arena",
|
|
250
|
+
isTestData: true,
|
|
251
|
+
createdAt: new Date("2026-10-03"),
|
|
252
|
+
updatedAt: new Date("2026-10-03"),
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: "product-tester-crossstore-b",
|
|
256
|
+
slug: "product-tester-crossstore-b",
|
|
257
|
+
title: "QA Cross-store B — LetItRip Official",
|
|
258
|
+
description: "Tester fixture. Paired with product-tester-crossstore-a, which belongs to a DIFFERENT store, so that a bundle spanning both must be refused at save time.",
|
|
259
|
+
categorySlugs: ["category-beyblade-burst", "category-spinning-tops"],
|
|
260
|
+
categoryNames: ["Beyblade Burst", "Spinning Tops"],
|
|
261
|
+
brandSlug: "brand-beyblade",
|
|
262
|
+
brand: "Beyblade",
|
|
263
|
+
price: 499,
|
|
264
|
+
currency: "INR",
|
|
265
|
+
stockQuantity: 5,
|
|
266
|
+
availableQuantity: 5,
|
|
267
|
+
isSold: false,
|
|
268
|
+
mainImage: seedPhoto("product-image-tester-crossstore-b-1-20261003", 900, 900),
|
|
269
|
+
images: [seedPhoto("product-image-tester-crossstore-b-1-20261003", 900, 900)],
|
|
270
|
+
status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
|
|
271
|
+
condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
|
|
272
|
+
tags: ["qa-fixture"],
|
|
273
|
+
storeId: "store-letitrip-official",
|
|
274
|
+
storeName: "LetItRip Official",
|
|
275
|
+
isTestData: true,
|
|
276
|
+
createdAt: new Date("2026-10-03"),
|
|
277
|
+
updatedAt: new Date("2026-10-03"),
|
|
278
|
+
},
|
|
215
279
|
{
|
|
216
280
|
id: "product-beyblade-original-driger-v",
|
|
217
281
|
slug: "product-beyblade-original-driger-v",
|
package/package.json
CHANGED
package/scripts/seed-cli.mjs
CHANGED
|
@@ -179,6 +179,10 @@ const { encryptPiiFields, piiIndicesFor, encryptPayoutDetails, encryptPayoutBank
|
|
|
179
179
|
const {
|
|
180
180
|
// seed data
|
|
181
181
|
usersSeedData, addressesSeedData, storeAddressesSeedData,
|
|
182
|
+
// store-extensions — see the SEED_DATA_MAP note below (Root Cause #90, 7-16).
|
|
183
|
+
payoutMethodsSeedData, shippingConfigsSeedData, analyticsCardsSeedData, analyticsAlertsSeedData,
|
|
184
|
+
storeCategoriesSeedData, listingTemplatesSeedData, moderationQueueSeedData, reportsSeedData,
|
|
185
|
+
itemRequestsSeedData, storeGoogleConfigSeedData,
|
|
182
186
|
categoriesSeedData, storesSeedData, sessionsSeedData,
|
|
183
187
|
productsStandardSeedData, productsAuctionsSeedData, productsPreordersSeedData,
|
|
184
188
|
productsPrizeDrawsSeedData, productsClassifiedsSeedData, productsDigitalCodesSeedData, productsLiveItemsSeedData,
|
|
@@ -253,6 +257,24 @@ const COLLECTION_MAP = {
|
|
|
253
257
|
procurementShipments: "procurementShipments", // features/shipments/schemas/firestore.ts:26
|
|
254
258
|
shipmentLots: "shipmentLots",
|
|
255
259
|
shipmentItems: "shipmentItems",
|
|
260
|
+
/*
|
|
261
|
+
* store-extensions. Ten collections with seed fixtures in manifest.ts that
|
|
262
|
+
* were NEVER in this map, so ALL_COLLECTIONS omitted them and they held ZERO
|
|
263
|
+
* documents in every run ever -- Root Cause #90, instances 7-16. Found via
|
|
264
|
+
* /store/analytics/cards rendering "No cards" under copy promising built-ins.
|
|
265
|
+
* String literals for the same reason as the block above: none of these is
|
|
266
|
+
* re-exported from appkit's barrel.
|
|
267
|
+
*/
|
|
268
|
+
payoutMethods: "payoutMethods", // features/store-extensions/schemas/firestore.ts:46
|
|
269
|
+
shippingConfigs: "shippingConfigs", // :84
|
|
270
|
+
analyticsCards: "analyticsCards", // :120
|
|
271
|
+
analyticsAlerts: "analyticsAlerts", // :152
|
|
272
|
+
storeCategories: "storeCategories", // :179
|
|
273
|
+
listingTemplates: "listingTemplates", // :240
|
|
274
|
+
moderationQueue: "moderationQueue", // :280
|
|
275
|
+
reports: "reports", // :372
|
|
276
|
+
itemRequests: "itemRequests",
|
|
277
|
+
storeGoogleConfig: "storeGoogleConfig",
|
|
256
278
|
blogPosts: BLOG_POSTS_COLLECTION,
|
|
257
279
|
events: EVENTS_COLLECTION,
|
|
258
280
|
eventEntries: EVENT_ENTRIES_COLLECTION,
|
|
@@ -279,6 +301,23 @@ const COLLECTION_MAP = {
|
|
|
279
301
|
|
|
280
302
|
const SEED_DATA_MAP = {
|
|
281
303
|
users: usersSeedData,
|
|
304
|
+
/*
|
|
305
|
+
* store-extensions. COLLECTION_MAP was only HALF the wiring: load() reads
|
|
306
|
+
* SEED_DATA_MAP and short-circuits on an empty array, so adding the ten
|
|
307
|
+
* collection names alone produced "no seed data, skipping" for all ten.
|
|
308
|
+
* Same shape as the art/stickers note further down -- added everywhere
|
|
309
|
+
* except the map that actually runs.
|
|
310
|
+
*/
|
|
311
|
+
payoutMethods: payoutMethodsSeedData,
|
|
312
|
+
shippingConfigs: shippingConfigsSeedData,
|
|
313
|
+
analyticsCards: analyticsCardsSeedData,
|
|
314
|
+
analyticsAlerts: analyticsAlertsSeedData,
|
|
315
|
+
storeCategories: storeCategoriesSeedData,
|
|
316
|
+
listingTemplates: listingTemplatesSeedData,
|
|
317
|
+
moderationQueue: moderationQueueSeedData,
|
|
318
|
+
reports: reportsSeedData,
|
|
319
|
+
itemRequests: itemRequestsSeedData,
|
|
320
|
+
storeGoogleConfig: storeGoogleConfigSeedData,
|
|
282
321
|
addresses: addressesSeedData,
|
|
283
322
|
storeAddresses: storeAddressesSeedData,
|
|
284
323
|
// SB-UNI-C: brands were merged into categories (categoryType:"brand") — no
|