@stacksjs/orm 0.74.32 → 0.74.33
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/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/package.json +23 -23
package/dist/index.d.ts
CHANGED
|
@@ -122,6 +122,8 @@ export declare const ProductUnit: ReturnType<typeof lazyModel<typeof import('./m
|
|
|
122
122
|
export declare const ProductVariant: ReturnType<typeof lazyModel<typeof import('./models/commerce/ProductVariant').default>>;
|
|
123
123
|
export declare const QueryLog: ReturnType<typeof lazyModel<typeof import('./models/QueryLog').default>>;
|
|
124
124
|
export declare const Receipt: ReturnType<typeof lazyModel<typeof import('./models/commerce/Receipt').default>>;
|
|
125
|
+
export declare const Referral: ReturnType<typeof lazyModel<typeof import('./models/Referral').default>>;
|
|
126
|
+
export declare const ReferralCode: ReturnType<typeof lazyModel<typeof import('./models/ReferralCode').default>>;
|
|
125
127
|
export declare const Release: ReturnType<typeof lazyModel<typeof import('./models/Release').default>>;
|
|
126
128
|
export declare const Request: ReturnType<typeof lazyModel<typeof import('./models/Request').default>>;
|
|
127
129
|
export declare const Review: ReturnType<typeof lazyModel<typeof import('./models/commerce/Review').default>>;
|
package/dist/index.js
CHANGED
|
@@ -19,4 +19,4 @@ export {}
|
|
|
19
19
|
`),m=`${Ct(l)}${f}
|
|
20
20
|
${vt(l)}`;if(!e.dryRun){let p=S.dirname(o);if(!Q.existsSync(p))Q.mkdirSync(p,{recursive:!0});Q.writeFileSync(o,m,"utf-8"),xr.success(`[generate:db-types] wrote ${c.length} table(s) to ${o}`)}return{outFile:o,tables:c,errors:a,content:m}}function Qr(e,t="app"){let n=[...e].sort((r,o)=>r.table.localeCompare(o.table)).map((r)=>Ot(r.table,r.columns,t==="framework"?1:2)).join(`
|
|
21
21
|
`);return`${Ct(t)}${n}
|
|
22
|
-
${vt(t)}`}import{isCursorPaginator as Ys,isPaginator as Xs,isSimplePaginator as Zs,toCursorPaginator as eu,toPaginator as tu,toSimplePaginator as nu}from"@stacksjs/pagination";import{configureOrm as Vr}from"@stacksjs/query-builder";function zr(){try{let e=process.env.DB_DATABASE_PATH||"database/stacks.sqlite";if((process.env.DB_CONNECTION||"sqlite")==="sqlite")Vr({database:e})}catch{}}zr();async function Dt(e){for(let t=0;;t++){let n=await import(e);try{return n.default}catch(r){if(t<5&&r instanceof ReferenceError&&/before initialization/.test(r.message)){await new Promise((o)=>setTimeout(o,0));continue}throw r}}}async function te(e,t=[""]){let{path:n}=await import("@stacksjs/path"),r=n.userModelsPath(`${e}.ts`);try{if(await Bun.file(r).exists())return await Dt(r)}catch(o){console.error(`[orm] Failed to import userland model ${e} from ${r} - falling back to framework default. Reason:`,o)}for(let o of t){let a=o?`${o}/`:"",i=n.frameworkPath(`defaults/app/Models/${a}${e}.ts`);try{if(await Bun.file(i).exists())return await Dt(i)}catch(s){console.error(`[orm] Failed to import framework default model ${e} from ${i} - trying next subdir. Reason:`,s)}}return null}var C={},Et=()=>{},xs=new Promise((e)=>{Et=e});function y(e){return new Proxy(function(){},{get(t,n){if(n==="then")return;let r=C[e];if(r==null)return;let o=r[n];return typeof o==="function"?o.bind(r):o},set(t,n,r){let o=C[e];if(o==null)return!1;return o[n]=r,!0},has(t,n){let r=C[e];return r==null?!1:(n in r)},apply(t,n,r){let o=C[e];if(o==null||typeof o!=="function")return;return o.apply(n,r)}})}var Hr=y("User"),Gr=y("Job"),Jr=y("FailedJob"),Yr=[["Team",[""],"auth"],["TeamInvitation",[""],"auth"],["TeamMember",[""],"auth"],["SocialAccount",[""],"auth"],["Subscriber",[""],"auth"],["SubscriberEmail",[""],"auth"],["Subscription",[""],"auth"],["Post",["Content"],"cms"],["Page",["Content"],"cms"],["PageRevision",["Content"],"cms"],["Redirect",["Content"],"cms"],["Menu",["Content"],"cms"],["MenuItem",["Content"],"cms"],["Author",["Content"],"cms"],["Comment",[""],"cms"],["Tag",[""],"cms"],["Site",[""],"auth"],["SiteDomain",[""],"auth"],["MagicLinkToken",[""],"auth"],["SmsOptOut",[""],"auth"],["Form",["Forms"],"forms"],["FormField",["Forms"],"forms"],["FormSubmission",["Forms"],"forms"],["Activity",[""],"dashboard"],["Board",[""],"dashboard"],["BoardColumn",[""],"dashboard"],["Card",[""],"dashboard"],["CardComment",[""],"dashboard"],["Deployment",[""],"dashboard"],["Label",[""],"dashboard"],["Release",[""],"dashboard"],["Notification",[""],"dashboard"],["NotificationDelivery",[""],"dashboard"],["PersonalAccessToken",[""],"dashboard"],["MailPreference",[""],"dashboard"],["Log",[""],"dashboard"],["Request",[""],"dashboard"],["AnalyticsEvent",[""],"dashboard"],["QueryLog",[""],"dashboard"],["Error",[""],"monitoring"],["Websocket",["realtime"],"realtime"],["Campaign",[""],"marketing"],["CampaignSend",[""],"marketing"],["EmailList",[""],"marketing"],["EmailListSubscriber",[""],"marketing"],["EmailIdempotency",[""],"marketing"],["EmailSuppression",[""],"marketing"],["EmailWebhookEvent",[""],"marketing"],["SocialPost",[""],"marketing"],["Automation",[""],"marketing"],["AutomationRun",[""],"marketing"],["CampaignVariant",[""],"marketing"],["CommunicationSuppression",[""],"marketing"],["ConsentEvent",[""],"marketing"],["SenderDomain",[""],"marketing"],["UsageEvent",[""],"marketing"],["PaymentMethod",[""],"commerce"],["PaymentProduct",[""],"commerce"],["PaymentTransaction",[""],"commerce"],["Order",["commerce"],"commerce"],["OrderIdempotency",["commerce"],"commerce"],["OrderItem",["commerce"],"commerce"],["Cart",["commerce"],"commerce"],["CartItem",["commerce"],"commerce"],["Customer",["commerce"],"commerce"],["Product",["commerce"],"commerce"],["ProductVariant",["commerce"],"commerce"],["ProductUnit",["commerce"],"commerce"],["Manufacturer",["commerce"],"commerce"],["Category",["commerce"],"commerce"],["Coupon",["commerce"],"commerce"],["GiftCard",["commerce"],"commerce"],["LicenseKey",["commerce"],"commerce"],["Review",["commerce"],"commerce"],["Receipt",["commerce"],"commerce"],["PrintDevice",["commerce"],"commerce"],["ShippingMethod",["commerce"],"commerce"],["ShippingRate",["commerce"],"commerce"],["ShippingZone",["commerce"],"commerce"],["DeliveryRoute",["commerce"],"commerce"],["DeliveryStop",["commerce"],"commerce"],["DigitalDelivery",["commerce"],"commerce"],["Courier",["commerce"],"commerce"],["CourierPing",["commerce"],"commerce"],["TaxRate",["commerce"],"commerce"],["WaitlistProduct",["commerce"],"commerce"],["WaitlistRestaurant",["commerce"],"commerce"],["Auction",["commerce"],"commerce"],["AuctionItem",["commerce"],"commerce"],["Bid",["commerce"],"commerce"],["Pledge",["commerce"],"commerce"],["LoyaltyPoint",["commerce"],"commerce"],["LoyaltyReward",["commerce"],"commerce"],["Payment",["commerce"],"commerce"],["Transaction",["commerce"],"commerce"]];queueMicrotask(async()=>{try{let{feature:e}=await import("@stacksjs/config"),t=await te("User");if(t)C.User=t;if(e("queue")){let n=await te("Job");if(n)C.Job=n;let r=await te("FailedJob");if(r)C.FailedJob=r}for(let[n,r,o]of Yr){if(!e(o))continue;let a=await te(n,r);if(a)C[n]=a}}catch(e){console.error("[orm] deferred model load failed:",e)}finally{Et()}});var Xr=y("Activity"),Zr=y("AnalyticsEvent"),eo=y("Automation"),to=y("AutomationRun"),no=y("Auction"),ro=y("CampaignVariant"),oo=y("CommunicationSuppression"),ao=y("ConsentEvent"),io=y("SenderDomain"),so=y("UsageEvent"),uo=y("AuctionItem"),co=y("Author"),lo=y("Bid"),fo=y("Board"),po=y("BoardColumn"),mo=y("Campaign"),yo=y("Card"),go=y("CardComment"),bo=y("Cart"),wo=y("CartItem"),ho=y("Category"),ko=y("Comment"),_o=y("Coupon"),To=y("Customer"),Ro=y("DeliveryRoute"),So=y("DeliveryStop"),Ao=y("Deployment"),Po=y("DigitalDelivery"),xo=y("Courier"),Oo=y("CourierPing"),Co=y("CampaignSend"),vo=y("EmailList"),Mo=y("EmailListSubscriber"),Do=y("Form"),Eo=y("FormField"),Fo=y("FormSubmission"),$o=y("MagicLinkToken"),Io=y("Menu"),jo=y("MenuItem"),Bo=y("PageRevision"),No=y("Pledge"),qo=y("Redirect"),Lo=y("Site"),Uo=y("SiteDomain"),Ko=y("SmsOptOut"),Wo=y("EmailIdempotency"),Qo=y("EmailSuppression"),Vo=y("EmailWebhookEvent"),zo=y("Error"),Ho=y("GiftCard"),Go=y("Label"),Jo=y("LicenseKey"),Yo=y("Log"),Xo=y("LoyaltyPoint"),Zo=y("LoyaltyReward"),ea=y("MailPreference"),ta=y("Manufacturer"),na=y("Notification"),ra=y("NotificationDelivery"),oa=y("Order"),aa=y("OrderIdempotency"),Os=y("PersonalAccessToken"),ia=y("OrderItem"),sa=y("Page"),ua=y("Payment"),ca=y("PaymentMethod"),la=y("PaymentProduct"),da=y("PaymentTransaction"),fa=y("Post"),pa=y("PrintDevice"),ma=y("Product"),ya=y("ProductUnit"),ga=y("ProductVariant"),ba=y("QueryLog"),wa=y("Receipt"),ha=y("Release"),ka=y("Request"),_a=y("Review"),Ta=y("ShippingMethod"),Ra=y("ShippingRate"),Sa=y("ShippingZone"),Aa=y("SocialPost"),Pa=y("SocialAccount"),xa=y("Subscriber"),Oa=y("SubscriberEmail"),Ca=y("Subscription"),va=y("Tag"),Ma=y("TaxRate"),Da=y("Team"),Ea=y("TeamInvitation"),Fa=y("TeamMember"),$a=y("Transaction"),Ia=y("WaitlistProduct"),ja=y("WaitlistRestaurant"),Ba=y("Websocket"),Ft={User:Hr,Job:Gr,FailedJob:Jr,Activity:Xr,AnalyticsEvent:Zr,Automation:eo,AutomationRun:to,Auction:no,AuctionItem:uo,Author:co,Bid:lo,Board:fo,BoardColumn:po,Campaign:mo,CampaignSend:Co,CampaignVariant:ro,Card:yo,CardComment:go,Cart:bo,CartItem:wo,Category:ho,Comment:ko,Coupon:_o,Customer:To,CommunicationSuppression:oo,ConsentEvent:ao,DeliveryRoute:Ro,DeliveryStop:So,Deployment:Ao,DigitalDelivery:Po,Courier:xo,CourierPing:Oo,EmailList:vo,EmailListSubscriber:Mo,EmailIdempotency:Wo,EmailSuppression:Qo,EmailWebhookEvent:Vo,ErrorModel:zo,Form:Do,FormField:Eo,FormSubmission:Fo,GiftCard:Ho,Label:Go,LicenseKey:Jo,Log:Yo,LoyaltyPoint:Xo,LoyaltyReward:Zo,MailPreference:ea,Manufacturer:ta,Notification:na,MagicLinkToken:$o,Menu:Io,MenuItem:jo,NotificationDelivery:ra,Order:oa,OrderIdempotency:aa,OrderItem:ia,Page:sa,PageRevision:Bo,Payment:ua,PaymentMethod:ca,PaymentProduct:la,PaymentTransaction:da,Pledge:No,Post:fa,PrintDevice:pa,Product:ma,ProductUnit:ya,ProductVariant:ga,QueryLog:ba,Receipt:wa,Release:ha,Request:ka,Review:_a,ShippingMethod:Ta,Redirect:qo,SenderDomain:io,ShippingRate:Ra,ShippingZone:Sa,Site:Lo,SiteDomain:Uo,SmsOptOut:Ko,SocialAccount:Pa,SocialPost:Aa,Subscriber:xa,SubscriberEmail:Oa,Subscription:Ca,Tag:va,TaxRate:Ma,Team:Da,TeamInvitation:Ea,TeamMember:Fa,Transaction:$a,UsageEvent:so,WaitlistProduct:Ia,WaitlistRestaurant:ja,Websocket:Ba},I=globalThis;for(let[e,t]of Object.entries(Ft))if(t&&I[e]===void 0)I[e]=t;var Cs=Object.keys(Ft);async function Na(e){if(!e)return[];try{if(typeof e.all==="function"){let t=await e.all();return Array.isArray(t)?t:[]}if(typeof e.get==="function"){let t=await e.get();return Array.isArray(t)?t:[]}}catch{}return[]}function qa(e,t,n=""){if(!e)return n;try{if(typeof e.get==="function"){let o=e.get(t);if(o!==void 0&&o!==null)return o}}catch{}let r=e?.[t];return r!==void 0&&r!==null?r:n}if(I.safeAll===void 0)I.safeAll=Na;if(I.safeGet===void 0)I.safeGet=qa;export{Xr as Activity,Zr as AnalyticsEvent,no as Auction,uo as AuctionItem,co as Author,eo as Automation,to as AutomationRun,lo as Bid,fo as Board,po as BoardColumn,mo as Campaign,Co as CampaignSend,ro as CampaignVariant,yo as Card,go as CardComment,bo as Cart,wo as CartItem,ho as Category,ko as Comment,oo as CommunicationSuppression,ao as ConsentEvent,_o as Coupon,xo as Courier,Oo as CourierPing,To as Customer,Ro as DeliveryRoute,So as DeliveryStop,Ao as Deployment,Po as DigitalDelivery,Wo as EmailIdempotency,vo as EmailList,Mo as EmailListSubscriber,Qo as EmailSuppression,Vo as EmailWebhookEvent,zo as ErrorModel,Jr as FailedJob,Do as Form,Eo as FormField,Fo as FormSubmission,Ho as GiftCard,Gr as Job,Go as Label,Jo as LicenseKey,Yo as Log,Xo as LoyaltyPoint,Zo as LoyaltyReward,Ce as MODEL_DEFINITION,$o as MagicLinkToken,ea as MailPreference,ta as Manufacturer,Pe as MassAssignmentException,Io as Menu,jo as MenuItem,_t as ModelNotFoundError,wt as ModelValidationError,na as Notification,ra as NotificationDelivery,oa as Order,aa as OrderIdempotency,ia as OrderItem,sa as Page,Bo as PageRevision,ua as Payment,ca as PaymentMethod,la as PaymentProduct,da as PaymentTransaction,Os as PersonalAccessToken,No as Pledge,fa as Post,pa as PrintDevice,ma as Product,ya as ProductUnit,ga as ProductVariant,ba as QueryLog,wa as Receipt,qo as Redirect,ha as Release,ka as Request,_a as Review,io as SenderDomain,Ta as ShippingMethod,Ra as ShippingRate,Sa as ShippingZone,Lo as Site,Uo as SiteDomain,Ko as SmsOptOut,Pa as SocialAccount,Aa as SocialPost,_n as SubqueryBuilder,xa as Subscriber,Oa as SubscriberEmail,Ca as Subscription,va as Tag,Ma as TaxRate,Da as Team,Ea as TeamInvitation,Fa as TeamMember,$a as Transaction,so as UsageEvent,Hr as User,Ia as WaitlistProduct,ja as WaitlistRestaurant,Ba as Websocket,Ai as batchLoad,Wr as buildDatabaseSchema,ae as collectEncryptedAttributes,Ie as createAuditMethods,pe as createCategorizableMethods,le as createCommentableMethods,me as createLikeableMethods,fe as createTaggableMethods,pn as customerOwnership,Ci as db,oe as decryptValue,St as defineModel,re as encryptValue,_e as enrichPaginatorUrls,ms as extendModel,rn as filterFillable,Qa as getPrunableConfig,nn as getWritableFields,Ys as isCursorPaginator,j as isEncrypted,Xs as isPaginator,Zs as isSimplePaginator,Ue as isUniqueViolation,en as mapWriteError,Wa as massPrunable,wr as mergeModelDefinition,Cs as modelGlobalNames,xs as ormReady,bn as parentOwnership,He as parseCursor,Oe as projectDocumentsFromTrait,It as prunable,Qr as renderDatabaseTypeFile,ke as resolveCursorArgs,he as resolvePageArgs,Ei as savepoint,mn as selfOwnership,Wt as setAuditUser,yn as siteOwnership,gn as teamMembershipOwnership,fr as toAttrs,eu as toCursorPaginator,tu as toPaginator,nu as toSimplePaginator,tn as toSnakeCaseKeys,Di as transaction,Fi as transactional,M as withoutEvents,Kn as withoutValidation};
|
|
22
|
+
${vt(t)}`}import{isCursorPaginator as Zs,isPaginator as eu,isSimplePaginator as tu,toCursorPaginator as nu,toPaginator as ru,toSimplePaginator as ou}from"@stacksjs/pagination";import{configureOrm as Vr}from"@stacksjs/query-builder";function zr(){try{let e=process.env.DB_DATABASE_PATH||"database/stacks.sqlite";if((process.env.DB_CONNECTION||"sqlite")==="sqlite")Vr({database:e})}catch{}}zr();async function Dt(e){for(let t=0;;t++){let n=await import(e);try{return n.default}catch(r){if(t<5&&r instanceof ReferenceError&&/before initialization/.test(r.message)){await new Promise((o)=>setTimeout(o,0));continue}throw r}}}async function te(e,t=[""]){let{path:n}=await import("@stacksjs/path"),r=n.userModelsPath(`${e}.ts`);try{if(await Bun.file(r).exists())return await Dt(r)}catch(o){console.error(`[orm] Failed to import userland model ${e} from ${r} - falling back to framework default. Reason:`,o)}for(let o of t){let a=o?`${o}/`:"",i=n.frameworkPath(`defaults/app/Models/${a}${e}.ts`);try{if(await Bun.file(i).exists())return await Dt(i)}catch(s){console.error(`[orm] Failed to import framework default model ${e} from ${i} - trying next subdir. Reason:`,s)}}return null}var C={},Et=()=>{},xs=new Promise((e)=>{Et=e});function y(e){return new Proxy(function(){},{get(t,n){if(n==="then")return;let r=C[e];if(r==null)return;let o=r[n];return typeof o==="function"?o.bind(r):o},set(t,n,r){let o=C[e];if(o==null)return!1;return o[n]=r,!0},has(t,n){let r=C[e];return r==null?!1:(n in r)},apply(t,n,r){let o=C[e];if(o==null||typeof o!=="function")return;return o.apply(n,r)}})}var Hr=y("User"),Gr=y("Job"),Jr=y("FailedJob"),Yr=[["Referral",[""],"auth"],["ReferralCode",[""],"auth"],["Team",[""],"auth"],["TeamInvitation",[""],"auth"],["TeamMember",[""],"auth"],["SocialAccount",[""],"auth"],["Subscriber",[""],"auth"],["SubscriberEmail",[""],"auth"],["Subscription",[""],"auth"],["Post",["Content"],"cms"],["Page",["Content"],"cms"],["PageRevision",["Content"],"cms"],["Redirect",["Content"],"cms"],["Menu",["Content"],"cms"],["MenuItem",["Content"],"cms"],["Author",["Content"],"cms"],["Comment",[""],"cms"],["Tag",[""],"cms"],["Site",[""],"auth"],["SiteDomain",[""],"auth"],["MagicLinkToken",[""],"auth"],["SmsOptOut",[""],"auth"],["Form",["Forms"],"forms"],["FormField",["Forms"],"forms"],["FormSubmission",["Forms"],"forms"],["Activity",[""],"dashboard"],["Board",[""],"dashboard"],["BoardColumn",[""],"dashboard"],["Card",[""],"dashboard"],["CardComment",[""],"dashboard"],["Deployment",[""],"dashboard"],["Label",[""],"dashboard"],["Release",[""],"dashboard"],["Notification",[""],"dashboard"],["NotificationDelivery",[""],"dashboard"],["PersonalAccessToken",[""],"dashboard"],["MailPreference",[""],"dashboard"],["Log",[""],"dashboard"],["Request",[""],"dashboard"],["AnalyticsEvent",[""],"dashboard"],["QueryLog",[""],"dashboard"],["Error",[""],"monitoring"],["Websocket",["realtime"],"realtime"],["Campaign",[""],"marketing"],["CampaignSend",[""],"marketing"],["EmailList",[""],"marketing"],["EmailListSubscriber",[""],"marketing"],["EmailIdempotency",[""],"marketing"],["EmailSuppression",[""],"marketing"],["EmailWebhookEvent",[""],"marketing"],["SocialPost",[""],"marketing"],["Automation",[""],"marketing"],["AutomationRun",[""],"marketing"],["CampaignVariant",[""],"marketing"],["CommunicationSuppression",[""],"marketing"],["ConsentEvent",[""],"marketing"],["SenderDomain",[""],"marketing"],["UsageEvent",[""],"marketing"],["PaymentMethod",[""],"commerce"],["PaymentProduct",[""],"commerce"],["PaymentTransaction",[""],"commerce"],["Order",["commerce"],"commerce"],["OrderIdempotency",["commerce"],"commerce"],["OrderItem",["commerce"],"commerce"],["Cart",["commerce"],"commerce"],["CartItem",["commerce"],"commerce"],["Customer",["commerce"],"commerce"],["Product",["commerce"],"commerce"],["ProductVariant",["commerce"],"commerce"],["ProductUnit",["commerce"],"commerce"],["Manufacturer",["commerce"],"commerce"],["Category",["commerce"],"commerce"],["Coupon",["commerce"],"commerce"],["GiftCard",["commerce"],"commerce"],["LicenseKey",["commerce"],"commerce"],["Review",["commerce"],"commerce"],["Receipt",["commerce"],"commerce"],["PrintDevice",["commerce"],"commerce"],["ShippingMethod",["commerce"],"commerce"],["ShippingRate",["commerce"],"commerce"],["ShippingZone",["commerce"],"commerce"],["DeliveryRoute",["commerce"],"commerce"],["DeliveryStop",["commerce"],"commerce"],["DigitalDelivery",["commerce"],"commerce"],["Courier",["commerce"],"commerce"],["CourierPing",["commerce"],"commerce"],["TaxRate",["commerce"],"commerce"],["WaitlistProduct",["commerce"],"commerce"],["WaitlistRestaurant",["commerce"],"commerce"],["Auction",["commerce"],"commerce"],["AuctionItem",["commerce"],"commerce"],["Bid",["commerce"],"commerce"],["Pledge",["commerce"],"commerce"],["LoyaltyPoint",["commerce"],"commerce"],["LoyaltyReward",["commerce"],"commerce"],["Payment",["commerce"],"commerce"],["Transaction",["commerce"],"commerce"]];queueMicrotask(async()=>{try{let{feature:e}=await import("@stacksjs/config"),t=await te("User");if(t)C.User=t;if(e("queue")){let n=await te("Job");if(n)C.Job=n;let r=await te("FailedJob");if(r)C.FailedJob=r}for(let[n,r,o]of Yr){if(!e(o))continue;let a=await te(n,r);if(a)C[n]=a}}catch(e){console.error("[orm] deferred model load failed:",e)}finally{Et()}});var Xr=y("Activity"),Zr=y("AnalyticsEvent"),eo=y("Automation"),to=y("AutomationRun"),no=y("Auction"),ro=y("CampaignVariant"),oo=y("CommunicationSuppression"),ao=y("ConsentEvent"),io=y("SenderDomain"),so=y("UsageEvent"),uo=y("AuctionItem"),co=y("Author"),lo=y("Bid"),fo=y("Board"),po=y("BoardColumn"),mo=y("Campaign"),yo=y("Card"),go=y("CardComment"),bo=y("Cart"),wo=y("CartItem"),ho=y("Category"),ko=y("Comment"),_o=y("Coupon"),To=y("Customer"),Ro=y("DeliveryRoute"),So=y("DeliveryStop"),Ao=y("Deployment"),Po=y("DigitalDelivery"),xo=y("Courier"),Oo=y("CourierPing"),Co=y("CampaignSend"),vo=y("EmailList"),Mo=y("EmailListSubscriber"),Do=y("Form"),Eo=y("FormField"),Fo=y("FormSubmission"),$o=y("MagicLinkToken"),Io=y("Menu"),jo=y("MenuItem"),Bo=y("PageRevision"),No=y("Pledge"),qo=y("Redirect"),Lo=y("Site"),Uo=y("SiteDomain"),Ko=y("SmsOptOut"),Wo=y("EmailIdempotency"),Qo=y("EmailSuppression"),Vo=y("EmailWebhookEvent"),zo=y("Error"),Ho=y("GiftCard"),Go=y("Label"),Jo=y("LicenseKey"),Yo=y("Log"),Xo=y("LoyaltyPoint"),Zo=y("LoyaltyReward"),ea=y("MailPreference"),ta=y("Manufacturer"),na=y("Notification"),ra=y("NotificationDelivery"),oa=y("Order"),aa=y("OrderIdempotency"),Os=y("PersonalAccessToken"),ia=y("OrderItem"),sa=y("Page"),ua=y("Payment"),ca=y("PaymentMethod"),la=y("PaymentProduct"),da=y("PaymentTransaction"),fa=y("Post"),pa=y("PrintDevice"),ma=y("Product"),ya=y("ProductUnit"),ga=y("ProductVariant"),ba=y("QueryLog"),wa=y("Receipt"),Cs=y("Referral"),vs=y("ReferralCode"),ha=y("Release"),ka=y("Request"),_a=y("Review"),Ta=y("ShippingMethod"),Ra=y("ShippingRate"),Sa=y("ShippingZone"),Aa=y("SocialPost"),Pa=y("SocialAccount"),xa=y("Subscriber"),Oa=y("SubscriberEmail"),Ca=y("Subscription"),va=y("Tag"),Ma=y("TaxRate"),Da=y("Team"),Ea=y("TeamInvitation"),Fa=y("TeamMember"),$a=y("Transaction"),Ia=y("WaitlistProduct"),ja=y("WaitlistRestaurant"),Ba=y("Websocket"),Ft={User:Hr,Job:Gr,FailedJob:Jr,Activity:Xr,AnalyticsEvent:Zr,Automation:eo,AutomationRun:to,Auction:no,AuctionItem:uo,Author:co,Bid:lo,Board:fo,BoardColumn:po,Campaign:mo,CampaignSend:Co,CampaignVariant:ro,Card:yo,CardComment:go,Cart:bo,CartItem:wo,Category:ho,Comment:ko,Coupon:_o,Customer:To,CommunicationSuppression:oo,ConsentEvent:ao,DeliveryRoute:Ro,DeliveryStop:So,Deployment:Ao,DigitalDelivery:Po,Courier:xo,CourierPing:Oo,EmailList:vo,EmailListSubscriber:Mo,EmailIdempotency:Wo,EmailSuppression:Qo,EmailWebhookEvent:Vo,ErrorModel:zo,Form:Do,FormField:Eo,FormSubmission:Fo,GiftCard:Ho,Label:Go,LicenseKey:Jo,Log:Yo,LoyaltyPoint:Xo,LoyaltyReward:Zo,MailPreference:ea,Manufacturer:ta,Notification:na,MagicLinkToken:$o,Menu:Io,MenuItem:jo,NotificationDelivery:ra,Order:oa,OrderIdempotency:aa,OrderItem:ia,Page:sa,PageRevision:Bo,Payment:ua,PaymentMethod:ca,PaymentProduct:la,PaymentTransaction:da,Pledge:No,Post:fa,PrintDevice:pa,Product:ma,ProductUnit:ya,ProductVariant:ga,QueryLog:ba,Receipt:wa,Release:ha,Request:ka,Review:_a,ShippingMethod:Ta,Redirect:qo,SenderDomain:io,ShippingRate:Ra,ShippingZone:Sa,Site:Lo,SiteDomain:Uo,SmsOptOut:Ko,SocialAccount:Pa,SocialPost:Aa,Subscriber:xa,SubscriberEmail:Oa,Subscription:Ca,Tag:va,TaxRate:Ma,Team:Da,TeamInvitation:Ea,TeamMember:Fa,Transaction:$a,UsageEvent:so,WaitlistProduct:Ia,WaitlistRestaurant:ja,Websocket:Ba},I=globalThis;for(let[e,t]of Object.entries(Ft))if(t&&I[e]===void 0)I[e]=t;var Ms=Object.keys(Ft);async function Na(e){if(!e)return[];try{if(typeof e.all==="function"){let t=await e.all();return Array.isArray(t)?t:[]}if(typeof e.get==="function"){let t=await e.get();return Array.isArray(t)?t:[]}}catch{}return[]}function qa(e,t,n=""){if(!e)return n;try{if(typeof e.get==="function"){let o=e.get(t);if(o!==void 0&&o!==null)return o}}catch{}let r=e?.[t];return r!==void 0&&r!==null?r:n}if(I.safeAll===void 0)I.safeAll=Na;if(I.safeGet===void 0)I.safeGet=qa;export{Xr as Activity,Zr as AnalyticsEvent,no as Auction,uo as AuctionItem,co as Author,eo as Automation,to as AutomationRun,lo as Bid,fo as Board,po as BoardColumn,mo as Campaign,Co as CampaignSend,ro as CampaignVariant,yo as Card,go as CardComment,bo as Cart,wo as CartItem,ho as Category,ko as Comment,oo as CommunicationSuppression,ao as ConsentEvent,_o as Coupon,xo as Courier,Oo as CourierPing,To as Customer,Ro as DeliveryRoute,So as DeliveryStop,Ao as Deployment,Po as DigitalDelivery,Wo as EmailIdempotency,vo as EmailList,Mo as EmailListSubscriber,Qo as EmailSuppression,Vo as EmailWebhookEvent,zo as ErrorModel,Jr as FailedJob,Do as Form,Eo as FormField,Fo as FormSubmission,Ho as GiftCard,Gr as Job,Go as Label,Jo as LicenseKey,Yo as Log,Xo as LoyaltyPoint,Zo as LoyaltyReward,Ce as MODEL_DEFINITION,$o as MagicLinkToken,ea as MailPreference,ta as Manufacturer,Pe as MassAssignmentException,Io as Menu,jo as MenuItem,_t as ModelNotFoundError,wt as ModelValidationError,na as Notification,ra as NotificationDelivery,oa as Order,aa as OrderIdempotency,ia as OrderItem,sa as Page,Bo as PageRevision,ua as Payment,ca as PaymentMethod,la as PaymentProduct,da as PaymentTransaction,Os as PersonalAccessToken,No as Pledge,fa as Post,pa as PrintDevice,ma as Product,ya as ProductUnit,ga as ProductVariant,ba as QueryLog,wa as Receipt,qo as Redirect,Cs as Referral,vs as ReferralCode,ha as Release,ka as Request,_a as Review,io as SenderDomain,Ta as ShippingMethod,Ra as ShippingRate,Sa as ShippingZone,Lo as Site,Uo as SiteDomain,Ko as SmsOptOut,Pa as SocialAccount,Aa as SocialPost,_n as SubqueryBuilder,xa as Subscriber,Oa as SubscriberEmail,Ca as Subscription,va as Tag,Ma as TaxRate,Da as Team,Ea as TeamInvitation,Fa as TeamMember,$a as Transaction,so as UsageEvent,Hr as User,Ia as WaitlistProduct,ja as WaitlistRestaurant,Ba as Websocket,Ai as batchLoad,Wr as buildDatabaseSchema,ae as collectEncryptedAttributes,Ie as createAuditMethods,pe as createCategorizableMethods,le as createCommentableMethods,me as createLikeableMethods,fe as createTaggableMethods,pn as customerOwnership,Ci as db,oe as decryptValue,St as defineModel,re as encryptValue,_e as enrichPaginatorUrls,ms as extendModel,rn as filterFillable,Qa as getPrunableConfig,nn as getWritableFields,Zs as isCursorPaginator,j as isEncrypted,eu as isPaginator,tu as isSimplePaginator,Ue as isUniqueViolation,en as mapWriteError,Wa as massPrunable,wr as mergeModelDefinition,Ms as modelGlobalNames,xs as ormReady,bn as parentOwnership,He as parseCursor,Oe as projectDocumentsFromTrait,It as prunable,Qr as renderDatabaseTypeFile,ke as resolveCursorArgs,he as resolvePageArgs,Ei as savepoint,mn as selfOwnership,Wt as setAuditUser,yn as siteOwnership,gn as teamMembershipOwnership,fr as toAttrs,nu as toCursorPaginator,ru as toPaginator,ou as toSimplePaginator,tn as toSnakeCaseKeys,Di as transaction,Fi as transactional,M as withoutEvents,Kn as withoutValidation};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/orm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.74.
|
|
5
|
+
"version": "0.74.33",
|
|
6
6
|
"description": "The Stacks ORM integration",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"contributors": [
|
|
@@ -63,31 +63,31 @@
|
|
|
63
63
|
"prepublishOnly": "bun run build"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@stacksjs/cache": "0.74.
|
|
67
|
-
"@stacksjs/cli": "0.74.
|
|
68
|
-
"@stacksjs/config": "0.74.
|
|
69
|
-
"@stacksjs/database": "0.74.
|
|
70
|
-
"@stacksjs/env": "0.74.
|
|
71
|
-
"@stacksjs/error-handling": "0.74.
|
|
72
|
-
"@stacksjs/events": "0.74.
|
|
73
|
-
"@stacksjs/logging": "0.74.
|
|
74
|
-
"@stacksjs/model-meta": "0.74.
|
|
75
|
-
"@stacksjs/pagination": "0.74.
|
|
76
|
-
"@stacksjs/path": "0.74.
|
|
77
|
-
"@stacksjs/query-builder": "0.74.
|
|
78
|
-
"@stacksjs/realtime": "0.74.
|
|
79
|
-
"@stacksjs/router": "0.74.
|
|
80
|
-
"@stacksjs/storage": "0.74.
|
|
81
|
-
"@stacksjs/strings": "0.74.
|
|
66
|
+
"@stacksjs/cache": "0.74.33",
|
|
67
|
+
"@stacksjs/cli": "0.74.33",
|
|
68
|
+
"@stacksjs/config": "0.74.33",
|
|
69
|
+
"@stacksjs/database": "0.74.33",
|
|
70
|
+
"@stacksjs/env": "0.74.33",
|
|
71
|
+
"@stacksjs/error-handling": "0.74.33",
|
|
72
|
+
"@stacksjs/events": "0.74.33",
|
|
73
|
+
"@stacksjs/logging": "0.74.33",
|
|
74
|
+
"@stacksjs/model-meta": "0.74.33",
|
|
75
|
+
"@stacksjs/pagination": "0.74.33",
|
|
76
|
+
"@stacksjs/path": "0.74.33",
|
|
77
|
+
"@stacksjs/query-builder": "0.74.33",
|
|
78
|
+
"@stacksjs/realtime": "0.74.33",
|
|
79
|
+
"@stacksjs/router": "0.74.33",
|
|
80
|
+
"@stacksjs/storage": "0.74.33",
|
|
81
|
+
"@stacksjs/strings": "0.74.33",
|
|
82
82
|
"@stacksjs/ts-validation": "^0.5.6",
|
|
83
|
-
"@stacksjs/validation": "0.74.
|
|
83
|
+
"@stacksjs/validation": "0.74.33",
|
|
84
84
|
"bun-query-builder": "^0.2.69"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@stacksjs/auth": "0.74.
|
|
88
|
-
"@stacksjs/payments": "0.74.
|
|
89
|
-
"@stacksjs/queue": "0.74.
|
|
90
|
-
"@stacksjs/search-engine": "0.74.
|
|
87
|
+
"@stacksjs/auth": "0.74.33",
|
|
88
|
+
"@stacksjs/payments": "0.74.33",
|
|
89
|
+
"@stacksjs/queue": "0.74.33",
|
|
90
|
+
"@stacksjs/search-engine": "0.74.33",
|
|
91
91
|
"stripe": "22.3.2"
|
|
92
92
|
},
|
|
93
93
|
"peerDependenciesMeta": {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@stacksjs/types": "0.74.
|
|
111
|
+
"@stacksjs/types": "0.74.33",
|
|
112
112
|
"better-dx": "^0.2.24",
|
|
113
113
|
"stripe": "22.3.2"
|
|
114
114
|
}
|