@tailor-platform/sdk 2.23.0 → 2.24.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/CHANGELOG.md +41 -0
- package/dist/application-BDqze-wy.mjs +1 -0
- package/dist/application-CfqvzV3I.mjs +200 -0
- package/dist/application-CfqvzV3I.mjs.map +1 -0
- package/dist/cli/cache/bundle-cache.d.mts +1 -0
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +35 -35
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/services/application.d.mts +1 -0
- package/dist/cli/services/workflow/bundler.d.mts +2 -1
- package/dist/cli/shared/forbidden-runtime-globals.d.mts +1 -0
- package/dist/cli/shared/start-context.d.mts +1 -0
- package/dist/cli/ts-hook.mjs +3 -3
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/config/types.d.mts +42 -2
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{register-ts-hook-ztnEFW6n.mjs → register-ts-hook-CVlI9Jzl.mjs} +51 -51
- package/dist/register-ts-hook-CVlI9Jzl.mjs.map +1 -0
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/docs/configuration.md +28 -3
- package/docs/github-actions.md +167 -52
- package/docs/migration/v3.md +46 -0
- package/docs/multi-environment.md +3 -1
- package/docs/services/workflow.md +3 -0
- package/package.json +4 -4
- package/dist/application-BtZ8hmx9.mjs +0 -1
- package/dist/application-m2G91kKI.mjs +0 -199
- package/dist/application-m2G91kKI.mjs.map +0 -1
- package/dist/register-ts-hook-ztnEFW6n.mjs.map +0 -1
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as ee,o as te}from"../logger-Db-YRTwK.mjs";import{$n as ne,A as e,Ai as t,An as n,Ar as r,At as i,Br as a,Bt as o,C as s,Cn as c,Ct as l,Dn as u,Dr as d,E as f,En as p,Et as m,F as h,Fn as g,Fr as _,Ft as v,G as y,Gr as b,Gt as x,H as S,Hi as C,Ht as w,I as T,Kr as E,L as D,Mi as O,Mn as k,Mt as A,N as j,Nn as M,O as N,On as P,Or as F,Ot as I,P as L,Pi as R,Pn as z,Pt as B,Qt as V,Rt as H,Sr as U,St as W,Ti as G,Tr as K,Vt as q,W as J,Wt as Y,X,Yt as Z,Z as re,Zt as ie,_ as ae,_r as oe,_t as se,ar as Q,br as ce,bt as le,cn as ue,ct as de,d as fe,dn as pe,ei as me,et as he,fr as ge,ft as _e,gi as ve,gr as ye,gt as be,h as xe,hr as Se,i as Ce,ii as we,it as Te,j as Ee,ji as De,jn as Oe,jr as ke,ki as Ae,kn as je,kr as Me,kt as Ne,l as Pe,li as Fe,mt as Ie,n as Le,ni as Re,nn as ze,nt as Be,ot as Ve,p as He,q as Ue,qr as We,qt as Ge,r as Ke,ri as qe,rn as $,s as Je,t as Ye,ut as Xe,vr as Ze,x as Qe,xr as $e,xt as et,y as tt,yr as nt,zr as rt}from"../register-ts-hook-
|
|
1
|
+
import{i as ee,o as te}from"../logger-Db-YRTwK.mjs";import{$n as ne,A as e,Ai as t,An as n,Ar as r,At as i,Br as a,Bt as o,C as s,Cn as c,Ct as l,Dn as u,Dr as d,E as f,En as p,Et as m,F as h,Fn as g,Fr as _,Ft as v,G as y,Gr as b,Gt as x,H as S,Hi as C,Ht as w,I as T,Kr as E,L as D,Mi as O,Mn as k,Mt as A,N as j,Nn as M,O as N,On as P,Or as F,Ot as I,P as L,Pi as R,Pn as z,Pt as B,Qt as V,Rt as H,Sr as U,St as W,Ti as G,Tr as K,Vt as q,W as J,Wt as Y,X,Yt as Z,Z as re,Zt as ie,_ as ae,_r as oe,_t as se,ar as Q,br as ce,bt as le,cn as ue,ct as de,d as fe,dn as pe,ei as me,et as he,fr as ge,ft as _e,gi as ve,gr as ye,gt as be,h as xe,hr as Se,i as Ce,ii as we,it as Te,j as Ee,ji as De,jn as Oe,jr as ke,ki as Ae,kn as je,kr as Me,kt as Ne,l as Pe,li as Fe,mt as Ie,n as Le,ni as Re,nn as ze,nt as Be,ot as Ve,p as He,q as Ue,qr as We,qt as Ge,r as Ke,ri as qe,rn as $,s as Je,t as Ye,ut as Xe,vr as Ze,x as Qe,xr as $e,xt as et,y as tt,yr as nt,zr as rt}from"../register-ts-hook-CVlI9Jzl.mjs";import{at as it}from"../application-CfqvzV3I.mjs";import{t as at}from"../type-source--ZNcV8RJ.mjs";import{arg as ot,defineCommand as st,runCommand as ct,runMain as lt}from"@politty/zod";await Ye(new URL(`./ts-hook.mjs`,import.meta.url));export{ye as DB_PGLITE_SCHEMA_FILE_NAME,oe as DB_TYPES_FILE_NAME,Ze as DIFF_FILE_NAME,nt as INITIAL_SCHEMA_NUMBER,ce as MIGRATE_FILE_NAME,$e as MIGRATE_PGLITE_TEST_FILE_NAME,U as MIGRATE_TEST_FILE_NAME,_ as MIGRATION_LABEL_KEY,K as SCHEMA_FILE_NAME,p as TAILOR_LOCK_FILENAME,u as TAILOR_LOCK_VERSION,Le as annotateTerminalError,Re as apiCall,P as appIdLockKey,$ as apply,$ as deploy,ot as arg,qe as assertWritable,ne as bundleMigrationScript,h as bundleSeedDumpScript,T as bundleSeedScript,L as chunkSeedData,rt as compareLocalTypesWithSnapshot,a as compareSnapshots,Ae as configArg,t as confirmationArgs,De as createCommonArgs,_e as createFolder,ge as createSnapshotFromLocalTypes,pe as createWorkspace,G as defineAppCommand,st as defineCommand,Xe as deleteFolder,tt as deleteWorkspace,J as deployStaticWebsite,O as deploymentArgs,z as ensureConfigId,W as errorToJson,Ne as executeScript,I as extractOwnedNamespaces,je as findAppIdLock,b as formatDiffSummary,E as formatMigrationDiff,et as generate,g as generateUserTypes,s as getAppHealth,ze as getExecutor,q as getExecutorJob,w as getExecutorWaitFailureMessage,de as getFolder,B as getFunctionRegistry,d as getLatestMigrationNumber,se as getMachineUserToken,F as getMigrationDirPath,Me as getMigrationFilePath,r as getMigrationFiles,Q as getNamespacesWithMigrations,ke as getNextMigrationNumber,be as getOAuth2Client,Be as getOrganization,Z as getWorkflow,ie as getWorkflowExecution,ae as getWorkspace,We as hasChanges,it as initOperatorClient,He as inviteUser,at as isPluginGeneratedTable,Qe as listApps,Y as listExecutorJobs,o as listExecutors,Ve as listFolders,A as listFunctionRegistries,le as listMachineUsers,Ie as listOAuth2Clients,he as listOrganizations,fe as listUsers,v as listWebhookExecutors,V as listWorkflowExecutions,e as listWorkflows,ue as listWorkspaces,Fe as loadAccessToken,we as loadConfig,R as loadEnvFiles,j as loadSeedContext,m as loadTailorDBNamespaces,ve as loadWorkspaceId,S as logBetaWarning,ee as logger,D as migrateGenerate,re as organizationTree,n as parseAppIds,Oe as planAppIds,me as prompt,Ce as query,Se as reconstructSnapshotFromMigrations,Ue as remove,k as removeAdoptedConfigIds,Pe as removeUser,M as resolveAppId,xe as restoreWorkspace,N as resumeWorkflow,ct as runCommand,lt as runMain,l as serializeError,y as show,Ge as startWorkflow,te as styles,H as triggerExecutor,Ee as truncate,Te as updateFolder,X as updateOrganization,Je as updateUser,i as waitForExecution,f as waitWorkflowExecution,x as watchExecutorJob,Ke as withSourceLocation,C as workspaceArgs,c as workspaceNameSchema};
|
|
2
2
|
//# sourceMappingURL=lib.mjs.map
|
package/dist/cli/lib.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.mjs","names":["logger","styles","bundleMigrationScript","listWorkflows","confirmationArgs","parseAppIds","getMigrationFiles","waitForExecution","compareSnapshots","listExecutors","getAppHealth","workspaceNameSchema","serializeError","TAILOR_LOCK_VERSION","getLatestMigrationNumber","waitWorkflowExecution","TAILOR_LOCK_FILENAME","loadTailorDBNamespaces","bundleSeedDumpScript","generateUserTypes","MIGRATION_LABEL_KEY","listWebhookExecutors","show","formatDiffSummary","watchExecutorJob","logBetaWarning","workspaceArgs","getExecutorWaitFailureMessage","bundleSeedScript","formatMigrationDiff","generate$1","deploymentArgs","removeAdoptedConfigIds","listFunctionRegistries","loadSeedContext","resolveAppId","resumeWorkflow","appIdLockKey","getMigrationDirPath","extractOwnedNamespaces","chunkSeedData","loadEnvFiles","ensureConfigId","getFunctionRegistry","listWorkflowExecutions","triggerExecutor","MIGRATE_TEST_FILE_NAME","errorToJson","defineAppCommand","SCHEMA_FILE_NAME","getExecutorJob","deployStaticWebsite","listExecutorJobs","getWorkflow","organizationTree","getWorkflowExecution","getWorkspace","DB_TYPES_FILE_NAME","getMachineUserToken","getNamespacesWithMigrations","MIGRATE_FILE_NAME","listMachineUsers","listWorkspaces","getFolder","listUsers","createWorkspace","prompt","listOrganizations","createSnapshotFromLocalTypes","createFolder","loadWorkspaceId","DB_PGLITE_SCHEMA_FILE_NAME","getOAuth2Client","restoreWorkspace","reconstructSnapshotFromMigrations","query","loadConfig","updateFolder","truncate","createCommonArgs","planAppIds","getNextMigrationNumber","configArg","findAppIdLock","getMigrationFilePath","executeScript","removeUser","loadAccessToken","listOAuth2Clients","annotateTerminalError","apiCall","getExecutor","getOrganization","listFolders","inviteUser","remove","hasChanges","startWorkflow","withSourceLocation","assertWritable","deploy","updateUser","registerTsHook","deleteFolder","DIFF_FILE_NAME","listApps","MIGRATE_PGLITE_TEST_FILE_NAME","generate","deleteWorkspace","INITIAL_SCHEMA_NUMBER","compareLocalTypesWithSnapshot","isPluginGeneratedTable","arg","defineCommand","initOperatorClient","runCommand","runMain","updateOrganization"],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { registerTsHook } from \"./shared/register-ts-hook\";\n\nawait registerTsHook(new URL(\"./ts-hook.mjs\", import.meta.url));\n\n// CLI foundation shared with plugins. Plugins resolve this package at runtime,\n// so logger state (--json / --verbose) set through these args reaches the SDK\n// code paths they call into. The @politty/zod surface is re-exported for the\n// same reason: arg metadata (aliases, env bindings, effects) lives in a\n// @politty/zod module-level registry, so registration and parsing must use\n// one @politty/zod copy.\nexport { arg, defineCommand, runCommand, runMain } from \"@politty/zod\";\nexport { logger, styles, type LogMode, type LogOptions, type OutOptions } from \"./shared/logger\";\nexport { defineAppCommand } from \"./shared/command\";\nexport { logBetaWarning } from \"./shared/beta\";\nexport { prompt } from \"./shared/prompt\";\nexport { workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n} from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport { getWorkflow, type GetWorkflowTypedOptions } from \"./commands/workflow/get\";\nexport type { MachineUserName } from \"@tailor-platform/sdk\";\nexport {\n startWorkflow,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n type WorkflowExecutionWaitInfo,\n} from \"./commands/workflow/executions\";\nexport { waitWorkflowExecution, type WorkflowWaitOutput } from \"./commands/workflow/wait\";\nexport type { WaitWorkflowExecutionOptions, WorkflowWaitResult } from \"./commands/workflow/waiter\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport type { FunctionLogEntryInfo } from \"./shared/function-execution\";\nexport {\n triggerExecutor,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n getExecutorWaitFailureMessage,\n watchExecutorJob,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport { getExecutor, type GetExecutorTypedOptions } from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n MIGRATE_TEST_FILE_NAME,\n MIGRATE_PGLITE_TEST_FILE_NAME,\n DB_TYPES_FILE_NAME,\n DB_PGLITE_SCHEMA_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type NormalizedSchemaSnapshot,\n type TailorDBSnapshotType,\n type SnapshotFieldConfig,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport {\n loadSeedContext,\n type LoadSeedContextOptions,\n type SeedContext,\n type SeedIdpUserContext,\n type SeedNamespaceConfig,\n} from \"./shared/seed-context\";\nexport {\n chunkSeedData,\n type SeedChunk,\n type ChunkSeedDataOptions,\n type SeedData,\n} from \"./shared/seed-chunker\";\nexport {\n bundleSeedScript,\n bundleSeedDumpScript,\n type SeedBundleResult,\n type SeedDumpBundleResult,\n} from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ScriptInvoker,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-platform/tailor-proto/auth_resource_pb\";\n"],"mappings":"6pCAGA,MAAMsG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC"}
|
|
1
|
+
{"version":3,"file":"lib.mjs","names":["logger","styles","bundleMigrationScript","listWorkflows","confirmationArgs","parseAppIds","getMigrationFiles","waitForExecution","compareSnapshots","listExecutors","getAppHealth","workspaceNameSchema","serializeError","TAILOR_LOCK_VERSION","getLatestMigrationNumber","waitWorkflowExecution","TAILOR_LOCK_FILENAME","loadTailorDBNamespaces","bundleSeedDumpScript","generateUserTypes","MIGRATION_LABEL_KEY","listWebhookExecutors","show","formatDiffSummary","watchExecutorJob","logBetaWarning","workspaceArgs","getExecutorWaitFailureMessage","bundleSeedScript","formatMigrationDiff","generate$1","deploymentArgs","removeAdoptedConfigIds","listFunctionRegistries","loadSeedContext","resolveAppId","resumeWorkflow","appIdLockKey","getMigrationDirPath","extractOwnedNamespaces","chunkSeedData","loadEnvFiles","ensureConfigId","getFunctionRegistry","listWorkflowExecutions","triggerExecutor","MIGRATE_TEST_FILE_NAME","errorToJson","defineAppCommand","SCHEMA_FILE_NAME","getExecutorJob","deployStaticWebsite","listExecutorJobs","getWorkflow","organizationTree","getWorkflowExecution","getWorkspace","DB_TYPES_FILE_NAME","getMachineUserToken","getNamespacesWithMigrations","MIGRATE_FILE_NAME","listMachineUsers","listWorkspaces","getFolder","listUsers","createWorkspace","prompt","listOrganizations","createSnapshotFromLocalTypes","createFolder","loadWorkspaceId","DB_PGLITE_SCHEMA_FILE_NAME","getOAuth2Client","restoreWorkspace","reconstructSnapshotFromMigrations","query","loadConfig","updateFolder","truncate","createCommonArgs","planAppIds","getNextMigrationNumber","configArg","findAppIdLock","getMigrationFilePath","executeScript","removeUser","loadAccessToken","listOAuth2Clients","annotateTerminalError","apiCall","getExecutor","getOrganization","listFolders","inviteUser","remove","hasChanges","startWorkflow","withSourceLocation","assertWritable","deploy","updateUser","registerTsHook","deleteFolder","DIFF_FILE_NAME","listApps","MIGRATE_PGLITE_TEST_FILE_NAME","generate","deleteWorkspace","INITIAL_SCHEMA_NUMBER","compareLocalTypesWithSnapshot","initOperatorClient","isPluginGeneratedTable","arg","defineCommand","runCommand","runMain","updateOrganization"],"sources":["../../src/cli/lib.ts"],"sourcesContent":["// CLI API exports for programmatic usage\nimport { registerTsHook } from \"./shared/register-ts-hook\";\n\nawait registerTsHook(new URL(\"./ts-hook.mjs\", import.meta.url));\n\n// CLI foundation shared with plugins. Plugins resolve this package at runtime,\n// so logger state (--json / --verbose) set through these args reaches the SDK\n// code paths they call into. The @politty/zod surface is re-exported for the\n// same reason: arg metadata (aliases, env bindings, effects) lives in a\n// @politty/zod module-level registry, so registration and parsing must use\n// one @politty/zod copy.\nexport { arg, defineCommand, runCommand, runMain } from \"@politty/zod\";\nexport { logger, styles, type LogMode, type LogOptions, type OutOptions } from \"./shared/logger\";\nexport { defineAppCommand } from \"./shared/command\";\nexport { logBetaWarning } from \"./shared/beta\";\nexport { prompt } from \"./shared/prompt\";\nexport { workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n} from \"./commands/show\";\nexport { remove, type RemoveOptions } from \"./commands/remove\";\nexport { createWorkspace, type CreateWorkspaceOptions } from \"./commands/workspace/create\";\nexport { listWorkspaces, type ListWorkspacesOptions } from \"./commands/workspace/list\";\nexport { deleteWorkspace, type DeleteWorkspaceOptions } from \"./commands/workspace/delete\";\nexport { getWorkspace, type GetWorkspaceOptions } from \"./commands/workspace/get\";\nexport { restoreWorkspace, type RestoreWorkspaceOptions } from \"./commands/workspace/restore\";\nexport type { WorkspaceInfo, WorkspaceDetails } from \"./commands/workspace/transform\";\nexport { listUsers, type ListUsersOptions } from \"./commands/workspace/user/list\";\nexport { inviteUser, type InviteUserOptions } from \"./commands/workspace/user/invite\";\nexport { updateUser, type UpdateUserOptions } from \"./commands/workspace/user/update\";\nexport { removeUser, type RemoveUserOptions } from \"./commands/workspace/user/remove\";\nexport type { UserInfo } from \"./commands/workspace/user/transform\";\nexport { listApps, type ListAppsOptions } from \"./commands/workspace/app/list\";\nexport {\n getAppHealth,\n type HealthOptions as GetAppHealthOptions,\n} from \"./commands/workspace/app/health\";\nexport type { AppInfo, AppHealthInfo } from \"./commands/workspace/app/transform\";\nexport { getFunctionRegistry, type GetFunctionRegistryOptions } from \"./commands/function/get\";\nexport {\n listFunctionRegistries,\n type ListFunctionRegistriesOptions,\n} from \"./commands/function/list\";\nexport type { FunctionRegistryInfo } from \"./commands/function/transform\";\nexport {\n listMachineUsers,\n type ListMachineUsersOptions,\n type MachineUserInfo,\n} from \"./commands/machineuser/list\";\nexport {\n getMachineUserToken,\n type GetMachineUserTokenOptions,\n type MachineUserTokenInfo,\n} from \"./commands/machineuser/token\";\nexport { getOAuth2Client, type GetOAuth2ClientOptions } from \"./commands/oauth2client/get\";\nexport { listOAuth2Clients, type ListOAuth2ClientsOptions } from \"./commands/oauth2client/list\";\nexport type { OAuth2ClientInfo, OAuth2ClientCredentials } from \"./commands/oauth2client/transform\";\nexport { listWorkflows, type ListWorkflowsOptions } from \"./commands/workflow/list\";\nexport { getWorkflow, type GetWorkflowTypedOptions } from \"./commands/workflow/get\";\nexport type { MachineUserName } from \"@tailor-platform/sdk\";\nexport {\n startWorkflow,\n type StartWorkflowTypedOptions,\n type StartWorkflowResultWithWait,\n type WaitOptions,\n} from \"./commands/workflow/start\";\nexport {\n listWorkflowExecutions,\n getWorkflowExecution,\n type ListWorkflowExecutionsTypedOptions,\n type GetWorkflowExecutionOptions,\n type GetWorkflowExecutionResult,\n type WorkflowExecutionWaitInfo,\n} from \"./commands/workflow/executions\";\nexport { waitWorkflowExecution, type WorkflowWaitOutput } from \"./commands/workflow/wait\";\nexport type { WaitWorkflowExecutionOptions, WorkflowWaitResult } from \"./commands/workflow/waiter\";\nexport {\n resumeWorkflow,\n type ResumeWorkflowOptions,\n type ResumeWorkflowResultWithWait,\n} from \"./commands/workflow/resume\";\nexport type {\n WorkflowListInfo,\n WorkflowInfo,\n WorkflowExecutionInfo,\n WorkflowJobExecutionInfo,\n} from \"./commands/workflow/transform\";\nexport type { FunctionLogEntryInfo } from \"./shared/function-execution\";\nexport {\n triggerExecutor,\n type TriggerExecutorTypedOptions,\n type TriggerExecutorResult,\n} from \"./commands/executor/trigger\";\nexport {\n listExecutorJobs,\n getExecutorJob,\n getExecutorWaitFailureMessage,\n watchExecutorJob,\n type ListExecutorJobsTypedOptions,\n type GetExecutorJobTypedOptions,\n type WatchExecutorJobTypedOptions,\n type ExecutorJobDetailInfo,\n type WatchExecutorJobResult,\n} from \"./commands/executor/jobs\";\nexport { listExecutors, type ListExecutorsOptions } from \"./commands/executor/list\";\nexport { getExecutor, type GetExecutorTypedOptions } from \"./commands/executor/get\";\nexport {\n listWebhookExecutors,\n type ListWebhookExecutorsOptions,\n type WebhookExecutorInfo,\n} from \"./commands/executor/webhook\";\nexport type {\n ExecutorJobListInfo,\n ExecutorJobInfo,\n ExecutorJobAttemptInfo,\n ExecutorListInfo,\n ExecutorInfo,\n} from \"./commands/executor/transform\";\nexport { listOrganizations, type ListOrganizationsOptions } from \"./commands/organization/list\";\nexport { getOrganization, type GetOrganizationOptions } from \"./commands/organization/get\";\nexport { updateOrganization, type UpdateOrganizationOptions } from \"./commands/organization/update\";\nexport { organizationTree, type OrganizationTreeOptions } from \"./commands/organization/tree\";\nexport type {\n UserOrganizationInfo,\n OrganizationInfo,\n FolderListInfo,\n FolderInfo,\n} from \"./commands/organization/transform\";\nexport { listFolders, type ListFoldersOptions } from \"./commands/organization/folder/list\";\nexport { getFolder, type GetFolderOptions } from \"./commands/organization/folder/get\";\nexport { createFolder, type CreateFolderOptions } from \"./commands/organization/folder/create\";\nexport { updateFolder, type UpdateFolderOptions } from \"./commands/organization/folder/update\";\nexport { deleteFolder, type DeleteFolderOptions } from \"./commands/organization/folder/delete\";\nexport { loadAccessToken, loadWorkspaceId } from \"./shared/context\";\nexport { apiCall, type ApiCallOptions, type ApiCallResult } from \"./commands/api\";\nexport { query } from \"./query\";\nexport { truncate, type TruncateOptions } from \"./commands/tailordb/truncate\";\n\n// Migration exports\nexport {\n generate as migrateGenerate,\n type GenerateOptions as MigrateGenerateOptions,\n} from \"./commands/tailordb/migrate/generate\";\nexport {\n createSnapshotFromLocalTypes,\n reconstructSnapshotFromMigrations,\n compareSnapshots,\n getNextMigrationNumber,\n getLatestMigrationNumber,\n getMigrationFiles,\n compareLocalTypesWithSnapshot,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport {\n getNamespacesWithMigrations,\n type NamespaceWithMigrations,\n} from \"./commands/tailordb/migrate/config\";\nexport {\n hasChanges,\n formatMigrationDiff,\n formatDiffSummary,\n type MigrationDiff,\n type BreakingChangeInfo,\n} from \"./commands/tailordb/migrate/diff-calculator\";\nexport {\n SCHEMA_FILE_NAME,\n DIFF_FILE_NAME,\n MIGRATE_FILE_NAME,\n MIGRATE_TEST_FILE_NAME,\n MIGRATE_PGLITE_TEST_FILE_NAME,\n DB_TYPES_FILE_NAME,\n DB_PGLITE_SCHEMA_FILE_NAME,\n INITIAL_SCHEMA_NUMBER,\n getMigrationDirPath,\n getMigrationFilePath,\n type SchemaSnapshot,\n type NormalizedSchemaSnapshot,\n type TailorDBSnapshotType,\n type SnapshotFieldConfig,\n} from \"./commands/tailordb/migrate/snapshot\";\nexport { MIGRATION_LABEL_KEY } from \"./commands/tailordb/migrate/types\";\n\n// Seed exports\nexport {\n loadSeedContext,\n type LoadSeedContextOptions,\n type SeedContext,\n type SeedIdpUserContext,\n type SeedNamespaceConfig,\n} from \"./shared/seed-context\";\nexport {\n chunkSeedData,\n type SeedChunk,\n type ChunkSeedDataOptions,\n type SeedData,\n} from \"./shared/seed-chunker\";\nexport {\n bundleSeedScript,\n bundleSeedDumpScript,\n type SeedBundleResult,\n type SeedDumpBundleResult,\n} from \"./commands/generate/seed/bundler\";\nexport {\n bundleMigrationScript,\n type MigrationBundleResult,\n} from \"./commands/tailordb/migrate/bundler\";\nexport {\n executeScript,\n waitForExecution,\n type ScriptExecutionOptions,\n type ScriptExecutionResult,\n type ScriptInvoker,\n type ExecutionWaitResult,\n} from \"./shared/script-executor\";\nexport { initOperatorClient, type OperatorClient } from \"./shared/client\";\nexport type { AuthInvoker } from \"@tailor-platform/tailor-proto/auth_resource_pb\";\n"],"mappings":"mqCAGA,MAAMsG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC"}
|