gemi 0.8.1 → 0.8.2

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.
Files changed (43) hide show
  1. package/dist/bin/index.js +212 -232
  2. package/dist/chunk-18ce9t29.js +4 -0
  3. package/dist/{chunk-taxjvwa6.js.map → chunk-18ce9t29.js.map} +5 -5
  4. package/dist/{chunk-cbt3v889.js → chunk-471zprvy.js} +2 -2
  5. package/dist/{chunk-cbt3v889.js.map → chunk-471zprvy.js.map} +1 -1
  6. package/dist/chunk-686d5sc0.js +5 -0
  7. package/dist/{chunk-vq90tfsz.js.map → chunk-686d5sc0.js.map} +5 -5
  8. package/dist/{chunk-t2aat5vw.js → chunk-8mg4frr6.js} +1 -1
  9. package/dist/{chunk-9aaqjzzf.js → chunk-9hs4hzpr.js} +2 -2
  10. package/dist/{chunk-9aaqjzzf.js.map → chunk-9hs4hzpr.js.map} +1 -1
  11. package/dist/chunk-dgbadcr8.js +4 -0
  12. package/dist/{chunk-j1cwwmg0.js.map → chunk-dgbadcr8.js.map} +2 -2
  13. package/dist/{chunk-q11xg1z2.js → chunk-fe0yca19.js} +2 -2
  14. package/dist/{chunk-f3qyx9ah.js → chunk-pvqj4vwf.js} +1 -1
  15. package/dist/chunk-rbxbvagv.js +4 -0
  16. package/dist/{chunk-2g6dyn68.js.map → chunk-rbxbvagv.js.map} +4 -4
  17. package/dist/chunk-vegenqty.js +20 -0
  18. package/dist/{chunk-bs1xyw0h.js.map → chunk-vegenqty.js.map} +12 -10
  19. package/dist/chunk-xckygssg.js +4 -0
  20. package/dist/{chunk-9s54rg4n.js.map → chunk-xckygssg.js.map} +4 -4
  21. package/dist/{chunk-tc3amtc4.js → chunk-zvwbevjc.js} +1 -1
  22. package/dist/client/Mutation.d.ts +1 -1
  23. package/dist/client/Mutation.d.ts.map +1 -1
  24. package/dist/client/_Form.d.ts +1 -1
  25. package/dist/client/_Form.d.ts.map +1 -1
  26. package/dist/client/index.js +4977 -4512
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/kernel/index.js +1 -1
  29. package/dist/services/index.js +6 -6
  30. package/dist/services/index.js.map +6 -6
  31. package/dist/services/router/ViewRouterServiceProvider.d.ts +2 -1
  32. package/dist/services/router/ViewRouterServiceProvider.d.ts.map +1 -1
  33. package/package.json +5 -3
  34. package/dist/chunk-2g6dyn68.js +0 -4
  35. package/dist/chunk-9s54rg4n.js +0 -4
  36. package/dist/chunk-bs1xyw0h.js +0 -20
  37. package/dist/chunk-j1cwwmg0.js +0 -4
  38. package/dist/chunk-taxjvwa6.js +0 -4
  39. package/dist/chunk-vq90tfsz.js +0 -5
  40. /package/dist/{chunk-t2aat5vw.js.map → chunk-8mg4frr6.js.map} +0 -0
  41. /package/dist/{chunk-q11xg1z2.js.map → chunk-fe0yca19.js.map} +0 -0
  42. /package/dist/{chunk-f3qyx9ah.js.map → chunk-pvqj4vwf.js.map} +0 -0
  43. /package/dist/{chunk-tc3amtc4.js.map → chunk-zvwbevjc.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{e as N}from"../chunk-74saqjmw.js";import{f as U}from"../chunk-1dhwfcpf.js";import"../chunk-641dtrzq.js";import{h as Z,i as _,j as $,k as D,l as P,m as T,n as f,o as x,p as z}from"../services/index.js";import"../chunk-q11xg1z2.js";import"../chunk-bs1xyw0h.js";import"../chunk-9aaqjzzf.js";import"../chunk-vq90tfsz.js";import"../chunk-cfsd9356.js";import"../chunk-t098k1va.js";import"../chunk-mezq16t3.js";import"../chunk-8h7xg91g.js";import{rb as Q}from"../chunk-259ezewy.js";import"../chunk-04mpmtfe.js";import{Bb as V,Cb as K,Db as L,Eb as M,ub as F,xb as H,yb as J}from"../facades/index.js";import{Ib as X,Lb as B,Mb as E,Nb as Y}from"../http/index.js";import{Pb as G}from"../chunk-gn96qav8.js";import{Xb as w}from"../chunk-4x4tep45.js";import"../chunk-a8bwm1yn.js";import"../chunk-yp5mh81v.js";class R{emailServiceProvider=D;authenticationServiceProvider=V;middlewareServiceProvider=X;i18nServiceProvider=Y;fileStorageServiceProvider=Z;apiRouterServiceProvider=_;viewRouterServiceProvider=T;rateLimiterServiceProvider=$;broadcastingsServiceProvider=P;loggingServiceProvider=f;queueServiceProvider=x;imageServiceProvider=z;services={};boot(){this.services={[U._name]:new U(new this.emailServiceProvider),[B._name]:new B(new this.authenticationServiceProvider),[L._name]:new L(new this.middlewareServiceProvider),[G._name]:new G(new this.i18nServiceProvider),[H._name]:new H(new this.fileStorageServiceProvider),[M._name]:new M(new this.apiRouterServiceProvider),[N._name]:new N(new this.viewRouterServiceProvider),[E._name]:new E(new this.rateLimiterServiceProvider),[F._name]:new F(new this.broadcastingsServiceProvider),[J._name]:new J(new this.loggingServiceProvider),[Q._name]:new Q(new this.queueServiceProvider),[K._name]:new K(new this.imageServiceProvider)}}run(j){let q=this.services;return w.run(q,j)}destroy(){for(let j of Object.keys(this.services))delete this.services[j];w.disable()}}class b{j;constructor(j){this.prisma=j}async findUserByVerificationToken(j){return await this.prisma.user.findFirst({where:{verificationToken:j}})}async verifyUser(j){return await this.prisma.user.update({where:{id:j},data:{emailVerifiedAt:new Date}})}async createSession(j){return await this.prisma.session.create({data:j,include:{user:!0}})}async createUser(j){return await this.prisma.user.create({data:j})}async deleteSession(j){return await this.prisma.session.deleteMany({where:{token:j.token}})}async findUserByEmailAddress(j,q){if(q)return await this.prisma.user.findUnique({where:{email:j,emailVerifiedAt:{not:null}}});return await this.prisma.user.findUnique({where:{email:j}})}async findSession(j){if(!j.token)return null;try{return await this.prisma.session.findUnique({where:{token:j.token,userAgent:j.userAgent},include:{user:{select:{password:!1,id:!0,email:!0,globalRole:!0,name:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}}}}}})}catch(q){return console.log(q),null}}async updateSession(j){return await this.prisma.session.update({where:{token:j.token},data:{expiresAt:j.expiresAt},include:{user:{select:{password:!1,email:!0,globalRole:!0,name:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}},organization:!0}}}})}async updateUserPassword(j){return await this.prisma.user.update({where:{id:j.id},data:{password:j.password}})}async createPasswordResetToken(j){return await this.prisma.passwordResetToken.create({data:{user:{connect:{id:j.user.id}},token:j.token}})}async findPasswordResetToken(j){let{token:q}=j;return await this.prisma.passwordResetToken.findUnique({where:{token:q},include:{user:!0}})}async deleteAllUserSessions(j){return await this.prisma.session.deleteMany({where:{userId:j}})}async deletePasswordResetToken(j){let{token:q}=j;return await this.prisma.passwordResetToken.delete({where:{token:q}})}async createAccount(j){return await this.prisma.account.create({data:{organizationId:j.organizationId,organizationRole:j.organizationRole,userId:j.userId}})}async deleteInvitationById(j){return await this.prisma.organizationInvitation.delete({where:{publicId:j}})}async findInvitation(j,q){return await this.prisma.organizationInvitation.findFirst({where:{publicId:j,email:q}})}async createMagicLinkToken(j){return await this.prisma.magicLinkToken.create({data:{email:j.email,token:j.token,pin:j.pin}})}async findUserByMagicLinkToken(j){let{token:q,pin:y,email:W}=j;if(q)return this.prisma.magicLinkToken.findUnique({where:{token_email:{email:W,token:q}}});else return await this.prisma.magicLinkToken.findUnique({where:{pin_email:{email:W,pin:y}}})}async deleteMagicLinkToken(j){return await this.prisma.magicLinkToken.deleteMany({where:{email:j}})}}export{b as PrismaAuthenticationAdapter,R as Kernel,V as AuthenticationServiceProvider};
2
+ import{e as N}from"../chunk-74saqjmw.js";import{f as U}from"../chunk-1dhwfcpf.js";import"../chunk-641dtrzq.js";import{h as Z,i as _,j as $,k as D,l as P,m as T,n as f,o as x,p as z}from"../services/index.js";import"../chunk-fe0yca19.js";import"../chunk-vegenqty.js";import"../chunk-9hs4hzpr.js";import"../chunk-686d5sc0.js";import"../chunk-cfsd9356.js";import"../chunk-t098k1va.js";import"../chunk-mezq16t3.js";import"../chunk-8h7xg91g.js";import{rb as Q}from"../chunk-259ezewy.js";import"../chunk-04mpmtfe.js";import{Bb as V,Cb as K,Db as L,Eb as M,ub as F,xb as H,yb as J}from"../facades/index.js";import{Ib as X,Lb as B,Mb as E,Nb as Y}from"../http/index.js";import{Pb as G}from"../chunk-gn96qav8.js";import{Xb as w}from"../chunk-4x4tep45.js";import"../chunk-a8bwm1yn.js";import"../chunk-yp5mh81v.js";class R{emailServiceProvider=D;authenticationServiceProvider=V;middlewareServiceProvider=X;i18nServiceProvider=Y;fileStorageServiceProvider=Z;apiRouterServiceProvider=_;viewRouterServiceProvider=T;rateLimiterServiceProvider=$;broadcastingsServiceProvider=P;loggingServiceProvider=f;queueServiceProvider=x;imageServiceProvider=z;services={};boot(){this.services={[U._name]:new U(new this.emailServiceProvider),[B._name]:new B(new this.authenticationServiceProvider),[L._name]:new L(new this.middlewareServiceProvider),[G._name]:new G(new this.i18nServiceProvider),[H._name]:new H(new this.fileStorageServiceProvider),[M._name]:new M(new this.apiRouterServiceProvider),[N._name]:new N(new this.viewRouterServiceProvider),[E._name]:new E(new this.rateLimiterServiceProvider),[F._name]:new F(new this.broadcastingsServiceProvider),[J._name]:new J(new this.loggingServiceProvider),[Q._name]:new Q(new this.queueServiceProvider),[K._name]:new K(new this.imageServiceProvider)}}run(j){let q=this.services;return w.run(q,j)}destroy(){for(let j of Object.keys(this.services))delete this.services[j];w.disable()}}class b{j;constructor(j){this.prisma=j}async findUserByVerificationToken(j){return await this.prisma.user.findFirst({where:{verificationToken:j}})}async verifyUser(j){return await this.prisma.user.update({where:{id:j},data:{emailVerifiedAt:new Date}})}async createSession(j){return await this.prisma.session.create({data:j,include:{user:!0}})}async createUser(j){return await this.prisma.user.create({data:j})}async deleteSession(j){return await this.prisma.session.deleteMany({where:{token:j.token}})}async findUserByEmailAddress(j,q){if(q)return await this.prisma.user.findUnique({where:{email:j,emailVerifiedAt:{not:null}}});return await this.prisma.user.findUnique({where:{email:j}})}async findSession(j){if(!j.token)return null;try{return await this.prisma.session.findUnique({where:{token:j.token,userAgent:j.userAgent},include:{user:{select:{password:!1,id:!0,email:!0,globalRole:!0,name:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}}}}}})}catch(q){return console.log(q),null}}async updateSession(j){return await this.prisma.session.update({where:{token:j.token},data:{expiresAt:j.expiresAt},include:{user:{select:{password:!1,email:!0,globalRole:!0,name:!0,publicId:!0,accounts:{select:{id:!0,publicId:!0,organization:!0,organizationRole:!0}},organization:!0}}}})}async updateUserPassword(j){return await this.prisma.user.update({where:{id:j.id},data:{password:j.password}})}async createPasswordResetToken(j){return await this.prisma.passwordResetToken.create({data:{user:{connect:{id:j.user.id}},token:j.token}})}async findPasswordResetToken(j){let{token:q}=j;return await this.prisma.passwordResetToken.findUnique({where:{token:q},include:{user:!0}})}async deleteAllUserSessions(j){return await this.prisma.session.deleteMany({where:{userId:j}})}async deletePasswordResetToken(j){let{token:q}=j;return await this.prisma.passwordResetToken.delete({where:{token:q}})}async createAccount(j){return await this.prisma.account.create({data:{organizationId:j.organizationId,organizationRole:j.organizationRole,userId:j.userId}})}async deleteInvitationById(j){return await this.prisma.organizationInvitation.delete({where:{publicId:j}})}async findInvitation(j,q){return await this.prisma.organizationInvitation.findFirst({where:{publicId:j,email:q}})}async createMagicLinkToken(j){return await this.prisma.magicLinkToken.create({data:{email:j.email,token:j.token,pin:j.pin}})}async findUserByMagicLinkToken(j){let{token:q,pin:y,email:W}=j;if(q)return this.prisma.magicLinkToken.findUnique({where:{token_email:{email:W,token:q}}});else return await this.prisma.magicLinkToken.findUnique({where:{pin_email:{email:W,pin:y}}})}async deleteMagicLinkToken(j){return await this.prisma.magicLinkToken.deleteMany({where:{email:j}})}}export{b as PrismaAuthenticationAdapter,R as Kernel,V as AuthenticationServiceProvider};
3
3
 
4
4
  //# debugId=5271D50A0746102C64756E2164756E21