@mohasinac/appkit 2.5.1 → 2.6.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.
package/dist/jobs.d.ts ADDED
@@ -0,0 +1,24 @@
1
+ /**
2
+ * `@mohasinac/appkit/jobs` — Firebase Functions binders + job handlers.
3
+ *
4
+ * Carved out of `server-entry.ts` 2026-05-12 because the import chain reaches
5
+ * `firebase-functions/v2/{https,scheduler,firestore}`, which is only
6
+ * available in the Firebase Functions runtime — not in Vercel Next.js
7
+ * lambdas. Re-exporting these from the main server surface forced every
8
+ * consumer (including the letitrip Next app) to install `firebase-functions`
9
+ * as a dep just to get past `next build`.
10
+ *
11
+ * Now: only the `appkit/functions/` package imports this subpath. The
12
+ * letitrip Next app never reaches `firebase-functions` because it's not in
13
+ * any of the chains rooted at `@mohasinac/appkit` or
14
+ * `@mohasinac/appkit/server`.
15
+ *
16
+ * Usage (functions/src/index.ts):
17
+ * import {
18
+ * bindToFirebase,
19
+ * couponExpiryHandler,
20
+ * listingProcessorHandler,
21
+ * } from "@mohasinac/appkit/jobs";
22
+ */
23
+ export { couponExpiryHandler, offerExpiryHandler, cartPruneHandler, notificationPruneHandler, dailyDataCleanupHandler, cleanupRtdbEventsHandler, auctionSettlementHandler, autoPayoutEligibilityHandler, countersReconcileHandler, onOrderCreateHandler, onOrderStatusChangeHandler, onBidPlacedHandler, onReviewWriteHandler, promotionsHandler, mediaTmpCleanupHandler, pendingOrderTimeoutHandler, productStatsSyncHandler, positionsReconcileHandler, payoutBatchHandler, weeklyPayoutEligibilityHandler, onCategoryWriteHandler, onProductWriteHandler, onStoreWriteHandler, adminAnalyticsHandler, storeAnalyticsHandler, listingProcessorHandler, supportedListingCollections, bindSchedule, bindDocumentWritten, bindDocumentCreated, bindDocumentUpdated, bindCallable, bindHttps, bindToFirebase, } from "./_internal/server/jobs/index.js";
24
+ export type { PromotionsCallableResult, AdminAnalyticsResult, StoreAnalyticsInput, StoreAnalyticsResult, ListingRequestBody, ListingResponseBody, JobContext, JobLogger, JobHandlers, ScheduleHandler, FirestoreTriggerHandler, FirestoreTriggerEvent, CallableHandler, BindHttpsOptions, } from "./_internal/server/jobs/index.js";
package/dist/jobs.js ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * `@mohasinac/appkit/jobs` — Firebase Functions binders + job handlers.
3
+ *
4
+ * Carved out of `server-entry.ts` 2026-05-12 because the import chain reaches
5
+ * `firebase-functions/v2/{https,scheduler,firestore}`, which is only
6
+ * available in the Firebase Functions runtime — not in Vercel Next.js
7
+ * lambdas. Re-exporting these from the main server surface forced every
8
+ * consumer (including the letitrip Next app) to install `firebase-functions`
9
+ * as a dep just to get past `next build`.
10
+ *
11
+ * Now: only the `appkit/functions/` package imports this subpath. The
12
+ * letitrip Next app never reaches `firebase-functions` because it's not in
13
+ * any of the chains rooted at `@mohasinac/appkit` or
14
+ * `@mohasinac/appkit/server`.
15
+ *
16
+ * Usage (functions/src/index.ts):
17
+ * import {
18
+ * bindToFirebase,
19
+ * couponExpiryHandler,
20
+ * listingProcessorHandler,
21
+ * } from "@mohasinac/appkit/jobs";
22
+ */
23
+ export {
24
+ // S4–S5: Job handlers (pure, framework-agnostic)
25
+ couponExpiryHandler, offerExpiryHandler, cartPruneHandler, notificationPruneHandler, dailyDataCleanupHandler, cleanupRtdbEventsHandler, auctionSettlementHandler, autoPayoutEligibilityHandler, countersReconcileHandler, onOrderCreateHandler, onOrderStatusChangeHandler, onBidPlacedHandler, onReviewWriteHandler, promotionsHandler, mediaTmpCleanupHandler, pendingOrderTimeoutHandler, productStatsSyncHandler, positionsReconcileHandler, payoutBatchHandler, weeklyPayoutEligibilityHandler, onCategoryWriteHandler, onProductWriteHandler, onStoreWriteHandler, adminAnalyticsHandler, storeAnalyticsHandler, listingProcessorHandler, supportedListingCollections,
26
+ // Firebase binder adapter
27
+ bindSchedule, bindDocumentWritten, bindDocumentCreated, bindDocumentUpdated, bindCallable, bindHttps, bindToFirebase, } from "./_internal/server/jobs/index.js";
@@ -36,8 +36,6 @@ export { createCheckoutOrderAction, attachPaymentAction, formatShippingAddress,
36
36
  export { createPaymentIntentAction, verifyPaymentSignatureAction, resolvePaymentFee, PAYMENTS_DEFAULT_RAZORPAY_FEE_PERCENT, PAYMENTS_RECEIPT_PREFIX, type CreatePaymentIntentInput, type CreatePaymentIntentResult, type VerifyPaymentSignatureInput, type ResolvedPaymentFee, } from "./_internal/server/features/payments/index";
37
37
  export { getSublistingCategoryForDetail } from "./_internal/server/features/sublisting-categories/index";
38
38
  export { getStoreForDetail, listStoreProductsInitial, listStoreAuctionsInitial, listStorePreOrdersInitial, listSitemapStores, STORES_PAGE_SIZE, STORES_PRODUCTS_PAGE_SIZE, STORES_SITEMAP_LIMIT, STORES_FEATURED_LIMIT, } from "./_internal/server/features/stores/index";
39
- export { couponExpiryHandler, offerExpiryHandler, cartPruneHandler, notificationPruneHandler, dailyDataCleanupHandler, cleanupRtdbEventsHandler, auctionSettlementHandler, autoPayoutEligibilityHandler, countersReconcileHandler, onOrderCreateHandler, onOrderStatusChangeHandler, onBidPlacedHandler, onReviewWriteHandler, promotionsHandler, type PromotionsCallableResult, mediaTmpCleanupHandler, pendingOrderTimeoutHandler, productStatsSyncHandler, positionsReconcileHandler, payoutBatchHandler, weeklyPayoutEligibilityHandler, onCategoryWriteHandler, onProductWriteHandler, onStoreWriteHandler, adminAnalyticsHandler, type AdminAnalyticsResult, storeAnalyticsHandler, type StoreAnalyticsInput, type StoreAnalyticsResult, listingProcessorHandler, supportedListingCollections, type ListingRequestBody, type ListingResponseBody, bindSchedule, bindDocumentWritten, bindDocumentCreated, bindDocumentUpdated, bindCallable, bindHttps, bindToFirebase, } from "./_internal/server/jobs/index";
40
- export type { JobContext, JobLogger, JobHandlers, ScheduleHandler, FirestoreTriggerHandler, FirestoreTriggerEvent, CallableHandler, } from "./_internal/server/jobs/index";
41
39
  export { AppShell, DashboardScaffold } from "./_internal/client/scaffolds/index";
42
40
  export type { AppShellProps, AppShellRenderContext, DashboardScaffoldProps, DashboardScaffoldRenderContext, } from "./_internal/client/scaffolds/index";
43
41
  export { toClient, clientInitial } from "./_internal/shared/serialization/index";
@@ -62,8 +62,11 @@ export { createPaymentIntentAction, verifyPaymentSignatureAction, resolvePayment
62
62
  export { getSublistingCategoryForDetail } from "./_internal/server/features/sublisting-categories/index";
63
63
  // S3: stores data layer
64
64
  export { getStoreForDetail, listStoreProductsInitial, listStoreAuctionsInitial, listStorePreOrdersInitial, listSitemapStores, STORES_PAGE_SIZE, STORES_PRODUCTS_PAGE_SIZE, STORES_SITEMAP_LIMIT, STORES_FEATURED_LIMIT, } from "./_internal/server/features/stores/index";
65
- // S4–S5: Job handlers + runtime (dormant until consumer's functions/ wires them via bindToFirebase)
66
- export { couponExpiryHandler, offerExpiryHandler, cartPruneHandler, notificationPruneHandler, dailyDataCleanupHandler, cleanupRtdbEventsHandler, auctionSettlementHandler, autoPayoutEligibilityHandler, countersReconcileHandler, onOrderCreateHandler, onOrderStatusChangeHandler, onBidPlacedHandler, onReviewWriteHandler, promotionsHandler, mediaTmpCleanupHandler, pendingOrderTimeoutHandler, productStatsSyncHandler, positionsReconcileHandler, payoutBatchHandler, weeklyPayoutEligibilityHandler, onCategoryWriteHandler, onProductWriteHandler, onStoreWriteHandler, adminAnalyticsHandler, storeAnalyticsHandler, listingProcessorHandler, supportedListingCollections, bindSchedule, bindDocumentWritten, bindDocumentCreated, bindDocumentUpdated, bindCallable, bindHttps, bindToFirebase, } from "./_internal/server/jobs/index";
65
+ // S4–S5: Job handlers + Firebase binders moved to the `@mohasinac/appkit/jobs`
66
+ // subpath (2.6.0, 2026-05-12). The chain reaches `firebase-functions/v2/*`
67
+ // which is only available in the Firebase Functions runtime, not in Vercel
68
+ // Next.js lambdas. Consumers that need them (i.e. `functions/src/index.ts`)
69
+ // import directly from `@mohasinac/appkit/jobs`.
67
70
  // S6: client scaffolds (server-side type-aware import; runtime is "use client")
68
71
  export { AppShell, DashboardScaffold } from "./_internal/client/scaffolds/index";
69
72
  // CC-3: hydration helpers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mohasinac/appkit",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -39,6 +39,10 @@
39
39
  "types": "./dist/server.d.ts",
40
40
  "import": "./dist/server.js"
41
41
  },
42
+ "./jobs": {
43
+ "types": "./dist/jobs.d.ts",
44
+ "import": "./dist/jobs.js"
45
+ },
42
46
  "./providers": {
43
47
  "types": "./dist/providers.d.ts",
44
48
  "import": "./dist/providers.js"