@tailor-platform/sdk 2.10.0 → 2.12.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/application-BFTkaW6X.mjs +1 -0
  3. package/dist/{application-D2E3FDfF.mjs → application-D3HlhR3i.mjs} +32 -31
  4. package/dist/application-D3HlhR3i.mjs.map +1 -0
  5. package/dist/cli/commands/generate/seed/bundler.d.mts +2 -2
  6. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +1 -1
  7. package/dist/cli/commands/workspace/user/remove.d.mts +1 -1
  8. package/dist/cli/commands/workspace/user/update.d.mts +1 -1
  9. package/dist/cli/lib.mjs +1 -1
  10. package/dist/cli/main.mjs +41 -41
  11. package/dist/cli/main.mjs.map +1 -1
  12. package/dist/cli/shared/script-executor.d.mts +2 -2
  13. package/dist/completion/zsh-worker.zsh +18 -2
  14. package/dist/idp-G_ojPBB5.mjs.map +1 -1
  15. package/dist/kysely-type-B-BOlXH7.mjs +43 -0
  16. package/dist/kysely-type-B-BOlXH7.mjs.map +1 -0
  17. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  18. package/dist/{register-ts-hook-D6aNriu3.mjs → register-ts-hook-rBH346V_.mjs} +63 -63
  19. package/dist/register-ts-hook-rBH346V_.mjs.map +1 -0
  20. package/dist/seed-CMkupmX8.mjs.map +1 -1
  21. package/dist/service-BzsSm2f6.mjs +7 -0
  22. package/dist/service-BzsSm2f6.mjs.map +1 -0
  23. package/dist/service-CmwD9bwv.mjs +1 -0
  24. package/dist/service_pb-CFVlGYdr.mjs +1 -0
  25. package/dist/{service_pb-BNxUPfP3.mjs → service_pb-CxHztLk1.mjs} +2 -2
  26. package/dist/{service_pb-BNxUPfP3.mjs.map → service_pb-CxHztLk1.mjs.map} +1 -1
  27. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +10 -0
  28. package/dist/vitest/index.d.mts +3 -2
  29. package/dist/vitest/index.mjs +1 -1
  30. package/dist/vitest/index.mjs.map +1 -1
  31. package/dist/vitest/mocks/tailordb-pglite.d.mts +88 -0
  32. package/dist/vitest/pglite-kysely.d.mts +13 -5
  33. package/dist/workflow-Cs9ISw6j.mjs.map +1 -1
  34. package/dist/workspace_resource_pb-u9bj6p3i.mjs +2 -0
  35. package/dist/workspace_resource_pb-u9bj6p3i.mjs.map +1 -0
  36. package/docs/cli/user.md +43 -7
  37. package/docs/cli-reference.md +1 -0
  38. package/docs/plugin/custom.md +11 -0
  39. package/docs/plugin/index.md +5 -0
  40. package/docs/testing.md +78 -2
  41. package/package.json +7 -7
  42. package/dist/application-D2E3FDfF.mjs.map +0 -1
  43. package/dist/application-rySTKrFa.mjs +0 -1
  44. package/dist/kysely-type-CmvAz1Xj.mjs +0 -43
  45. package/dist/kysely-type-CmvAz1Xj.mjs.map +0 -1
  46. package/dist/register-ts-hook-D6aNriu3.mjs.map +0 -1
  47. package/dist/service-COC9whur.mjs +0 -1
  48. package/dist/service-DDon86tM.mjs +0 -7
  49. package/dist/service-DDon86tM.mjs.map +0 -1
  50. package/dist/service_pb-D-xFu9Ub.mjs +0 -1
  51. package/dist/workspace_resource_pb-B7S-zx4Z.mjs +0 -2
  52. package/dist/workspace_resource_pb-B7S-zx4Z.mjs.map +0 -1
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Seed script bundler for TailorDB seed data
4
4
  *
5
- * Bundles seed scripts to be executed via TestExecScript API
5
+ * Bundles seed scripts for server-side execution
6
6
  */
7
7
  type SeedBundleResult = {
8
8
  namespace: string;
@@ -16,7 +16,7 @@ type SeedBundleResult = {
16
16
  * 1. Defines getDB() function inline
17
17
  * 2. Processes data in batches using Kysely
18
18
  * 3. Reports progress via console.log
19
- * 4. Exports as main() for TestExecScript
19
+ * 4. Exports main() as the server-side entry point
20
20
  * @param namespace - TailorDB namespace
21
21
  * @param tableNames - List of table names to include in the seed
22
22
  * @param baseDir - Directory whose dependencies and tsconfig the generated entry uses
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Migration script bundler for TailorDB migrations
4
4
  *
5
- * Bundles migration scripts to be executed via TestExecScript API
5
+ * Bundles migration scripts for server-side execution
6
6
  */
7
7
  interface MigrationBundleResult {
8
8
  namespace: string;
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  declare const removeUserOptionsSchema: z.ZodObject<{
4
4
  workspaceId: z.ZodOptional<z.ZodUUID>;
5
5
  profile: z.ZodOptional<z.ZodString>;
6
- email: z.ZodString;
6
+ email: z.ZodEmail;
7
7
  }, z.core.$strip>;
8
8
  type RemoveUserOptions = z.input<typeof removeUserOptionsSchema>;
9
9
  /**
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  declare const updateUserOptionsSchema: z.ZodObject<{
4
4
  workspaceId: z.ZodOptional<z.ZodUUID>;
5
5
  profile: z.ZodOptional<z.ZodString>;
6
- email: z.ZodString;
6
+ email: z.ZodEmail;
7
7
  role: z.ZodEnum<{
8
8
  admin: "admin";
9
9
  editor: "editor";
package/dist/cli/lib.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{n as ee,r as e}from"../logger-CCjs1DuH.mjs";import{A as t,At as n,B as r,Bn as i,Bt as a,D as o,Dn as s,Dr as c,Et as l,F as u,G as d,Gr as f,Gt as p,H as m,In as h,It as g,J as _,Jn as v,Jr as y,Jt as b,Kn as x,Kr as S,Ln as C,Lt as w,M as T,N as E,Nn as D,Nr as O,Ot as k,P as A,Pt as j,Q as M,Qt as N,Rn as P,Rt as F,S as I,Sr as L,St as R,T as z,Tt as B,U as V,Ut as H,Vn as U,Vr as W,Vt as G,Wn as K,Wr as q,Xn as J,Y,Yn as X,Zt as Z,_ as Q,ar as te,b as ne,br as $,cn as re,ct as ie,d as ae,dn as oe,dr as se,ei as ce,er as le,et as ue,fr as de,ft as fe,h as pe,ht as me,i as he,ir as ge,it as _e,jt as ve,k as ye,l as be,ln as xe,mt as Se,n as Ce,nt as we,on as Te,ot as Ee,p as De,qn as Oe,qr as ke,qt as Ae,r as je,rn as Me,s as Ne,t as Pe,ur as Fe,ut as Ie,vt as Le,wt as Re,xn as ze,xr as Be,y as Ve,yr as He,yt as Ue,zn as We}from"../register-ts-hook-D6aNriu3.mjs";import{Z as Ge}from"../application-D2E3FDfF.mjs";import{t as Ke}from"../type-source--ZNcV8RJ.mjs";import{arg as qe,defineCommand as Je,runCommand as Ye,runMain as Xe}from"politty";await Pe(new URL(`./ts-hook.mjs`,import.meta.url));export{C as DB_TYPES_FILE_NAME,P as DIFF_FILE_NAME,We as INITIAL_SCHEMA_NUMBER,i as MIGRATE_FILE_NAME,U as MIGRATE_TEST_FILE_NAME,le as MIGRATION_LABEL_KEY,K as SCHEMA_FILE_NAME,$ as apiCall,N as apply,N as deploy,qe as arg,Be as assertWritable,ze as bundleMigrationScript,A as bundleSeedScript,E as chunkSeedData,ge as compareLocalTypesWithSnapshot,te as compareSnapshots,q as configArg,f as confirmationArgs,S as createCommonArgs,Ie as createFolder,D as createSnapshotFromLocalTypes,Te as createWorkspace,W as defineAppCommand,Je as defineCommand,ie as deleteFolder,Ve as deleteWorkspace,m as deployStaticWebsite,ke as deploymentArgs,xe as ensureConfigId,Ce as errorToJson,B as executeScript,Re as extractOwnedNamespaces,Fe as formatDiffSummary,se as formatMigrationDiff,Ue as generate,oe as generateUserTypes,I as getAppHealth,Z as getExecutor,w as getExecutorJob,F as getExecutorWaitFailureMessage,Ee as getFolder,n as getFunctionRegistry,x as getLatestMigrationNumber,me as getMachineUserToken,Oe as getMigrationDirPath,v as getMigrationFilePath,X as getMigrationFiles,s as getNamespacesWithMigrations,J as getNextMigrationNumber,Se as getOAuth2Client,ue as getOrganization,p as getWorkflow,Ae as getWorkflowExecution,Q as getWorkspace,de as hasChanges,Ge as initOperatorClient,De as inviteUser,Ke as isPluginGeneratedTable,ne as listApps,a as listExecutorJobs,g as listExecutors,_e as listFolders,k as listFunctionRegistries,Le as listMachineUsers,fe as listOAuth2Clients,M as listOrganizations,ae as listUsers,ve as listWebhookExecutors,b as listWorkflowExecutions,ye as listWorkflows,Me as listWorkspaces,c as loadAccessToken,L as loadConfig,y as loadEnvFiles,T as loadSeedContext,R as loadTailorDBNamespaces,O as loadWorkspaceId,r as logBetaWarning,ee as logger,u as migrateGenerate,Y as organizationTree,He as prompt,he as query,h as reconstructSnapshotFromMigrations,d as remove,be as removeUser,pe as restoreWorkspace,o as resumeWorkflow,Ye as runCommand,Xe as runMain,je as serializeError,V as show,H as startWorkflow,e as styles,j as triggerExecutor,t as truncate,we as updateFolder,_ as updateOrganization,Ne as updateUser,l as waitForExecution,z as waitWorkflowExecution,G as watchExecutorJob,ce as workspaceArgs,re as workspaceNameSchema};
1
+ import{n as ee,r as e}from"../logger-CCjs1DuH.mjs";import{A as t,Ar as n,At as r,B as i,Bn as a,Bt as o,Cn as s,Cr as c,D as l,Et as u,F as d,Fn as f,G as p,Gr as m,Gt as h,H as g,Hn as _,It as v,J as y,Jn as b,Jr as x,Jt as S,Kn as C,Lr as w,Lt as T,M as E,N as D,Ot as O,P as k,Pt as A,Q as j,Qn as M,Qr as N,Qt as P,Rn as F,Rt as I,S as L,St as R,T as z,Tr as B,Tt as V,U as H,Un as U,Ut as W,Vn as G,Vt as K,Xn as q,Xr as J,Y,Yn as X,Yr as Z,Zn as Q,Zr as te,Zt as ne,_ as $,b as re,ct as ie,d as ae,dn as oe,et as se,fr as ce,ft as le,h as ue,ht as de,i as fe,ii as pe,it as me,jt as he,k as ge,kn as _e,l as ve,mr as ye,mt as be,n as xe,nr as Se,nt as Ce,on as we,or as Te,ot as Ee,p as De,pn as Oe,pr as ke,qt as Ae,r as je,rn as Me,s as Ne,sr as Pe,t as Fe,un as Ie,ut as Le,vt as Re,wr as ze,wt as Be,xr as Ve,y as He,yt as Ue,zn as We}from"../register-ts-hook-rBH346V_.mjs";import{Q as Ge}from"../application-D3HlhR3i.mjs";import{t as Ke}from"../type-source--ZNcV8RJ.mjs";import{arg as qe,defineCommand as Je,runCommand as Ye,runMain as Xe}from"politty";await Fe(new URL(`./ts-hook.mjs`,import.meta.url));export{We as DB_TYPES_FILE_NAME,a as DIFF_FILE_NAME,G as INITIAL_SCHEMA_NUMBER,_ as MIGRATE_FILE_NAME,U as MIGRATE_TEST_FILE_NAME,Se as MIGRATION_LABEL_KEY,C as SCHEMA_FILE_NAME,c as apiCall,P as apply,P as deploy,qe as arg,ze as assertWritable,s as bundleMigrationScript,k as bundleSeedScript,D as chunkSeedData,Te as compareLocalTypesWithSnapshot,Pe as compareSnapshots,x as configArg,Z as confirmationArgs,J as createCommonArgs,Le as createFolder,f as createSnapshotFromLocalTypes,we as createWorkspace,m as defineAppCommand,Je as defineCommand,ie as deleteFolder,He as deleteWorkspace,g as deployStaticWebsite,te as deploymentArgs,oe as ensureConfigId,xe as errorToJson,V as executeScript,Be as extractOwnedNamespaces,ce as formatDiffSummary,ke as formatMigrationDiff,Ue as generate,Oe as generateUserTypes,L as getAppHealth,ne as getExecutor,T as getExecutorJob,I as getExecutorWaitFailureMessage,Ee as getFolder,r as getFunctionRegistry,b as getLatestMigrationNumber,de as getMachineUserToken,X as getMigrationDirPath,q as getMigrationFilePath,Q as getMigrationFiles,_e as getNamespacesWithMigrations,M as getNextMigrationNumber,be as getOAuth2Client,se as getOrganization,h as getWorkflow,Ae as getWorkflowExecution,$ as getWorkspace,ye as hasChanges,Ge as initOperatorClient,De as inviteUser,Ke as isPluginGeneratedTable,re as listApps,o as listExecutorJobs,v as listExecutors,me as listFolders,O as listFunctionRegistries,Re as listMachineUsers,le as listOAuth2Clients,j as listOrganizations,ae as listUsers,he as listWebhookExecutors,S as listWorkflowExecutions,ge as listWorkflows,Me as listWorkspaces,n as loadAccessToken,B as loadConfig,N as loadEnvFiles,E as loadSeedContext,R as loadTailorDBNamespaces,w as loadWorkspaceId,i as logBetaWarning,ee as logger,d as migrateGenerate,Y as organizationTree,Ve as prompt,fe as query,F as reconstructSnapshotFromMigrations,p as remove,ve as removeUser,ue as restoreWorkspace,l as resumeWorkflow,Ye as runCommand,Xe as runMain,je as serializeError,H as show,W as startWorkflow,e as styles,A as triggerExecutor,t as truncate,Ce as updateFolder,y as updateOrganization,Ne as updateUser,u as waitForExecution,z as waitWorkflowExecution,K as watchExecutorJob,pe as workspaceArgs,Ie as workspaceNameSchema};
2
2
  //# sourceMappingURL=lib.mjs.map