@mohasinac/appkit 2.5.0 → 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/configs/next.js +6 -0
- package/dist/jobs.d.ts +24 -0
- package/dist/jobs.js +27 -0
- package/dist/server-entry.d.ts +0 -2
- package/dist/server-entry.js +5 -2
- package/package.json +5 -1
package/dist/configs/next.js
CHANGED
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
const FIREBASE_EXTERNAL_PACKAGES = [
|
|
18
18
|
"firebase-admin",
|
|
19
|
+
// firebase-functions is only ever resolved inside the actual Firebase
|
|
20
|
+
// Functions runtime (appkit/functions). Next.js API routes in Vercel
|
|
21
|
+
// lambdas never call these binders, but the import chain reaches
|
|
22
|
+
// `_internal/server/jobs/runtime/adapters/firebase.js` via server-entry.
|
|
23
|
+
// Externalising avoids needing `firebase-functions` in consumer deps.
|
|
24
|
+
"firebase-functions",
|
|
19
25
|
"@google-cloud/firestore",
|
|
20
26
|
"@google-cloud/storage",
|
|
21
27
|
"@google-cloud/common",
|
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";
|
package/dist/server-entry.d.ts
CHANGED
|
@@ -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";
|
package/dist/server-entry.js
CHANGED
|
@@ -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 +
|
|
66
|
-
|
|
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.
|
|
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"
|