@mohasinac/appkit 4.48.0 → 4.49.0

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.
@@ -125,6 +125,14 @@ export const SEED_COLLECTION_PURPOSE = {
125
125
  /* Real HSN codes and GST rates. A wrong rate on a real invoice is a
126
126
  * compliance matter, not a fixture. */
127
127
  taxCodes: "permanent",
128
+ /* The `/media/<shortId>` -> Storage-path index. 195 rows back the taxonomy
129
+ * cover images, and `categories` above is permanent for the same reason:
130
+ * clearing these orphans the BUCKET — every category cover 404s while its
131
+ * object sits untouched in Storage, and no amount of re-running the loader
132
+ * brings it back without re-uploading. Permanent is also what stops
133
+ * `isTestData` being derived onto them, which would hide every cover from
134
+ * the public via `hidePublicTestData`. */
135
+ mediaAssets: "permanent",
128
136
  /* The ~169-term feature vocabulary: condition, authenticity, release, type,
129
137
  * spin, grade, chase. Hand-curated from the crawl. */
130
138
  productFeatures: "permanent",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "4.48.0",
3
+ "version": "4.49.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -194,6 +194,7 @@ const {
194
194
  productsStandardSeedData, productsAuctionsSeedData, productsPreordersSeedData,
195
195
  productsPrizeDrawsSeedData, productsClassifiedsSeedData, productsDigitalCodesSeedData, productsLiveItemsSeedData,
196
196
  productsArtSeedData, productsStickersSeedData,
197
+ productsCatalogueSeedData,
197
198
  ordersSeedData, reviewsSeedData, cartsSeedData, bidsSeedData,
198
199
  couponsSeedData, couponUsageSeedData,
199
200
  eventsSeedData, eventEntriesSeedData, payoutsSeedData, offersSeedData,
@@ -202,6 +203,7 @@ const {
202
203
  siteSettingsSeedData, faqSeedData,
203
204
  wishlistsSeedData, historySeedData,
204
205
  groupedListingsSeedData,
206
+ mediaAssetsSeedData,
205
207
  scammersSeedData, productFeaturesSeedData, taxCodesSeedData,
206
208
  partGlossarySeedData, modelCompositionSeedData,
207
209
  testerChecklistSeedData, testerResponsesSeedData,
@@ -304,6 +306,13 @@ const COLLECTION_MAP = {
304
306
  wishlists: WISHLIST_COLLECTION,
305
307
  history: HISTORY_COLLECTION,
306
308
  groupedListings: GROUPED_LISTINGS_COLLECTION,
309
+ /*
310
+ * `/media/<shortId>` resolves ONLY through a mediaAssets document, so without
311
+ * these rows every seeded cover image 404s while its object sits untouched in
312
+ * the bucket. Seeded rather than left as a side effect of the upload script
313
+ * precisely so a Firestore wipe cannot orphan Storage.
314
+ */
315
+ mediaAssets: "mediaAssets",
307
316
  scammerProfiles: SCAMMER_COLLECTION,
308
317
  productFeatures: PRODUCT_FEATURES_COLLECTION,
309
318
  taxCodes: TAX_CODES_COLLECTION,
@@ -460,6 +469,11 @@ const SEED_DATA_MAP = {
460
469
  // /stickers were permanently empty, and listingType=art|stickers returned 0.
461
470
  // Root Cause #58's family one layer down: added everywhere except the runner.
462
471
  ...(productsArtSeedData || []), ...(productsStickersSeedData || []),
472
+ // The 972 generated catalogue-filler listings (one per taxonomy leaf) —
473
+ // see scripts/gen-catalogue-listings.mjs. This is what makes `products`
474
+ // reproducible after a full wipe; without it the collection drops from
475
+ // 1,039 to 71 the moment someone purges it.
476
+ ...(productsCatalogueSeedData || []),
463
477
  ]),
464
478
  orders: ordersSeedData,
465
479
  reviews: reviewsSeedData,
@@ -496,6 +510,9 @@ const SEED_DATA_MAP = {
496
510
  wishlists: wishlistsSeedData,
497
511
  history: historySeedData,
498
512
  groupedListings: groupedListingsSeedData,
513
+ // The other half of the wiring — load() short-circuits on an empty array, so
514
+ // the COLLECTION_MAP entry above does nothing on its own (Root Cause #90).
515
+ mediaAssets: mediaAssetsSeedData,
499
516
  scammerProfiles: scammersSeedData,
500
517
  productFeatures: productFeaturesSeedData,
501
518
  taxCodes: taxCodesSeedData,