@tailor-platform/sdk 2.15.0 → 2.17.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 (102) hide show
  1. package/CHANGELOG.md +109 -0
  2. package/dist/{application-BpoMu4Af.mjs → application-ChuNPwnl.mjs} +28 -28
  3. package/dist/application-ChuNPwnl.mjs.map +1 -0
  4. package/dist/application-Oh5dMmb5.mjs +1 -0
  5. package/dist/cli/commands/executor/jobs.d.mts +1 -0
  6. package/dist/cli/commands/generate/seed/bundler.d.mts +18 -0
  7. package/dist/cli/commands/tailordb/migrate/config.d.mts +1 -0
  8. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +5 -1
  9. package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +2 -2
  10. package/dist/cli/commands/workflow/waiter.d.mts +1 -0
  11. package/dist/cli/commands/workspace/create.d.mts +16 -1
  12. package/dist/cli/commands/workspace/expiry.d.mts +5 -0
  13. package/dist/cli/commands/workspace/get.d.mts +6 -1
  14. package/dist/cli/commands/workspace/list.d.mts +1 -0
  15. package/dist/cli/lib.d.mts +4 -3
  16. package/dist/cli/lib.mjs +1 -1
  17. package/dist/cli/lib.mjs.map +1 -1
  18. package/dist/cli/main.mjs +57 -59
  19. package/dist/cli/main.mjs.map +1 -1
  20. package/dist/cli/shared/command.d.mts +1 -1
  21. package/dist/cli/shared/error-json.d.mts +21 -1
  22. package/dist/cli/shared/errors.d.mts +1 -0
  23. package/dist/cli/shared/github-actions.d.mts +13 -0
  24. package/dist/cli/shared/logger.d.mts +18 -0
  25. package/dist/completion/zsh-worker.zsh +92 -4
  26. package/dist/configure/index.mjs +1 -1
  27. package/dist/configure/index.mjs.map +1 -1
  28. package/dist/crashreport-CgymxQDu.mjs +1 -0
  29. package/dist/crashreport-Cyuz1qiu.mjs +42 -0
  30. package/dist/crashreport-Cyuz1qiu.mjs.map +1 -0
  31. package/dist/errors-BjJnpXkK.mjs +7 -0
  32. package/dist/errors-BjJnpXkK.mjs.map +1 -0
  33. package/dist/field-parse-CzlKC4b7.mjs +2 -0
  34. package/dist/field-parse-CzlKC4b7.mjs.map +1 -0
  35. package/dist/guards-ForsrxnH.mjs +2 -0
  36. package/dist/guards-ForsrxnH.mjs.map +1 -0
  37. package/dist/kysely-type-B_oA8D1k.mjs +43 -0
  38. package/dist/kysely-type-B_oA8D1k.mjs.map +1 -0
  39. package/dist/{logger-CCjs1DuH.mjs → logger-72hM4JWZ.mjs} +4 -4
  40. package/dist/logger-72hM4JWZ.mjs.map +1 -0
  41. package/dist/manager-C26Gi1bX.mjs +2 -0
  42. package/dist/manager-C26Gi1bX.mjs.map +1 -0
  43. package/dist/node-builtins-DYfhPBnz.mjs +2 -0
  44. package/dist/node-builtins-DYfhPBnz.mjs.map +1 -0
  45. package/dist/plugin/builtin/kysely-type/index.d.mts +2 -0
  46. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  47. package/dist/plugin/builtin/seed/index.mjs +1 -1
  48. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +17 -0
  49. package/dist/plugin/get-generated-table.d.mts +13 -0
  50. package/dist/plugin/index.d.mts +2 -2
  51. package/dist/plugin/index.mjs +1 -1
  52. package/dist/plugin/index.mjs.map +1 -1
  53. package/dist/register-ts-hook-Dn-XlVSD.mjs +917 -0
  54. package/dist/register-ts-hook-Dn-XlVSD.mjs.map +1 -0
  55. package/dist/schema-DRyQEabV.mjs +2 -0
  56. package/dist/schema-DRyQEabV.mjs.map +1 -0
  57. package/dist/{seed-CCc9Xk66.mjs → seed-C3P_T_Eh.mjs} +28 -9
  58. package/dist/seed-C3P_T_Eh.mjs.map +1 -0
  59. package/dist/service-B3OiWCYg.mjs +1 -0
  60. package/dist/service-B4Gh_bbL.mjs +2 -0
  61. package/dist/service-B4Gh_bbL.mjs.map +1 -0
  62. package/dist/service-eM7Fd8zS.mjs +7 -0
  63. package/dist/service-eM7Fd8zS.mjs.map +1 -0
  64. package/dist/tailordb-ddl-Fgm2cNvT.mjs +7 -0
  65. package/dist/tailordb-ddl-Fgm2cNvT.mjs.map +1 -0
  66. package/dist/utils/test/index.d.mts +7 -5
  67. package/dist/utils/test/index.mjs +1 -1
  68. package/dist/utils/test/index.mjs.map +1 -1
  69. package/dist/vitest/index.mjs +1 -1
  70. package/dist/vitest/index.mjs.map +1 -1
  71. package/dist/vitest/mocks/tailordb-pglite.d.mts +5 -4
  72. package/docs/cli/tailordb.md +9 -9
  73. package/docs/cli/workspace.md +133 -20
  74. package/docs/cli-reference.md +101 -28
  75. package/docs/plugin/custom.md +36 -4
  76. package/docs/services/tailordb-migration.md +31 -28
  77. package/docs/testing.md +23 -21
  78. package/package.json +11 -10
  79. package/dist/application-BpoMu4Af.mjs.map +0 -1
  80. package/dist/application-fIhVKX78.mjs +0 -1
  81. package/dist/crashreport-BN28xp5B.mjs +0 -42
  82. package/dist/crashreport-BN28xp5B.mjs.map +0 -1
  83. package/dist/crashreport-By23O2k-.mjs +0 -1
  84. package/dist/errors-BlX4gUw5.mjs +0 -4
  85. package/dist/errors-BlX4gUw5.mjs.map +0 -1
  86. package/dist/field-column-type-QMtF6lUp.mjs +0 -2
  87. package/dist/field-column-type-QMtF6lUp.mjs.map +0 -1
  88. package/dist/kysely-type-B-BOlXH7.mjs +0 -43
  89. package/dist/kysely-type-B-BOlXH7.mjs.map +0 -1
  90. package/dist/logger-CCjs1DuH.mjs.map +0 -1
  91. package/dist/node-builtins-TQHhwNzG.mjs +0 -2
  92. package/dist/node-builtins-TQHhwNzG.mjs.map +0 -1
  93. package/dist/register-ts-hook-CAUcxCt4.mjs +0 -711
  94. package/dist/register-ts-hook-CAUcxCt4.mjs.map +0 -1
  95. package/dist/schema-BTioi2dP.mjs +0 -2
  96. package/dist/schema-BTioi2dP.mjs.map +0 -1
  97. package/dist/seed-CCc9Xk66.mjs.map +0 -1
  98. package/dist/service-7SCy2bhm.mjs +0 -7
  99. package/dist/service-7SCy2bhm.mjs.map +0 -1
  100. package/dist/service-CWFQ8EVo.mjs +0 -1
  101. package/dist/service-CqbQXFDp.mjs +0 -2
  102. package/dist/service-CqbQXFDp.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./application-ChuNPwnl.mjs";export{t as defineApplication,e as generatePluginFilesIfNeeded};
@@ -1,4 +1,5 @@
1
1
  import { Order } from "../../shared/args.mjs";
2
+ import "../../shared/errors.mjs";
2
3
  import { ExecutorJobAttemptInfo, ExecutorJobInfo, ExecutorJobListInfo } from "./transform.mjs";
3
4
  import { z } from "zod";
4
5
  //#region src/cli/commands/executor/jobs.d.ts
@@ -9,6 +9,13 @@ export type SeedBundleResult = {
9
9
  bundledCode: string;
10
10
  typesIncluded: string[];
11
11
  };
12
+ /**
13
+ * Result of bundling a seed dump script.
14
+ */
15
+ export type SeedDumpBundleResult = {
16
+ namespace: string;
17
+ bundledCode: string;
18
+ };
12
19
  /**
13
20
  * Bundle a seed script for server-side execution
14
21
  *
@@ -23,4 +30,15 @@ export type SeedBundleResult = {
23
30
  * @returns Bundled seed script result
24
31
  */
25
32
  export declare function bundleSeedScript(namespace: string, tableNames: string[], baseDir?: string): Promise<SeedBundleResult>;
33
+ /**
34
+ * Bundle a seed dump script for server-side execution
35
+ *
36
+ * The read-only counterpart of the seed script: it selects one page of rows
37
+ * from a single table ordered by id, so a caller can page through a table with
38
+ * a keyset cursor instead of holding it all in one message.
39
+ * @param namespace - TailorDB namespace
40
+ * @param baseDir - Directory whose dependencies and tsconfig the generated entry uses
41
+ * @returns Bundled seed dump script result
42
+ */
43
+ export declare function bundleSeedDumpScript(namespace: string, baseDir?: string): Promise<SeedDumpBundleResult>;
26
44
  //#endregion
@@ -1,4 +1,5 @@
1
1
  import { AppConfig } from "../../../../configure/config/types.mjs";
2
+ import "../../../shared/errors.mjs";
2
3
  //#region src/cli/commands/tailordb/migrate/config.d.ts
3
4
  /**
4
5
  * Namespace with migrations configuration
@@ -15,10 +15,14 @@ export declare const MIGRATE_FILE_NAME = "migrate.ts";
15
15
  export declare const MIGRATE_TEST_FILE_NAME = "migrate.test.ts";
16
16
  /** File name for generated DB type definitions. */
17
17
  export declare const DB_TYPES_FILE_NAME = "db.ts";
18
+ /** File name for the generated PGlite schema script module. */
19
+ export declare const DB_PGLITE_SCHEMA_FILE_NAME = "db.pglite.ts";
20
+ /** File name for the migration script PGlite test. */
21
+ export declare const MIGRATE_PGLITE_TEST_FILE_NAME = "migrate.pglite.test.ts";
18
22
  /**
19
23
  * Migration file type
20
24
  */
21
- export type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db";
25
+ export type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db" | "pgliteSchema" | "pgliteTest";
22
26
  /**
23
27
  * Get migration directory path for a given number
24
28
  * @param {string} migrationsDir - Base migrations directory path
@@ -1,7 +1,7 @@
1
1
  import { NormalizedSchemaSnapshot, RebaselineMarker, SchemaSnapshot, SnapshotActionPermission, SnapshotEnumValue, SnapshotFieldConfig, SnapshotGqlPermission, SnapshotGqlPermissionPolicy, SnapshotIndexConfig, SnapshotPermissionCondition, SnapshotPermissionOperand, SnapshotRecordPermission, SnapshotRelationship, TailorDBSnapshotType } from "./snapshot-types.mjs";
2
2
  import { CompareSnapshotsOptions, compareLocalTypesWithSnapshot, compareSnapshots } from "./snapshot-comparison.mjs";
3
- import { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATE_TEST_FILE_NAME, MigrationFileType, SCHEMA_FILE_NAME, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber } from "./snapshot-files.mjs";
3
+ import { DB_PGLITE_SCHEMA_FILE_NAME, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATE_PGLITE_TEST_FILE_NAME, MIGRATE_TEST_FILE_NAME, MigrationFileType, SCHEMA_FILE_NAME, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber } from "./snapshot-files.mjs";
4
4
  import { reconstructSnapshotFromMigrations } from "./snapshot-migrations.mjs";
5
5
  import { createSnapshotFromLocalTypes } from "./snapshot-local.mjs";
6
6
  import "./snapshot-remote.mjs";
7
- export { CompareSnapshotsOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATE_TEST_FILE_NAME, MigrationFileType, type NormalizedSchemaSnapshot, SCHEMA_FILE_NAME, type SchemaSnapshot, type SnapshotFieldConfig, type TailorDBSnapshotType, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber, reconstructSnapshotFromMigrations };
7
+ export { CompareSnapshotsOptions, DB_PGLITE_SCHEMA_FILE_NAME, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATE_PGLITE_TEST_FILE_NAME, MIGRATE_TEST_FILE_NAME, MigrationFileType, type NormalizedSchemaSnapshot, SCHEMA_FILE_NAME, type SchemaSnapshot, type SnapshotFieldConfig, type TailorDBSnapshotType, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber, reconstructSnapshotFromMigrations };
@@ -1,4 +1,5 @@
1
1
  import "../../shared/client.mjs";
2
+ import "../../shared/errors.mjs";
2
3
  import { WorkflowExecutionInfo } from "./transform.mjs";
3
4
  import { WorkflowExecutionStatusClass, WorkflowWaitUntil } from "./status.mjs";
4
5
  //#region src/cli/commands/workflow/waiter.d.ts
@@ -14,13 +14,28 @@ declare const createWorkspaceOptionsSchema: z.ZodObject<{
14
14
  deleteProtection: z.ZodOptional<z.ZodBoolean>;
15
15
  organizationId: z.ZodOptional<z.ZodUUID>;
16
16
  folderId: z.ZodOptional<z.ZodUUID>;
17
+ ttl: z.ZodOptional<z.ZodString>;
17
18
  profile: z.ZodOptional<z.ZodString>;
18
19
  }, z.core.$strip>;
19
20
  export type CreateWorkspaceOptions = z.input<typeof createWorkspaceOptionsSchema>;
21
+ /** A created workspace, plus how recording its prune expiry went when one was requested. */
22
+ export type CreatedWorkspaceInfo = WorkspaceInfo & {
23
+ ttl?: TtlWriteResult;
24
+ };
20
25
  /**
21
26
  * Create a new workspace with the given options.
22
27
  * @param options - Workspace creation options
23
28
  * @returns Created workspace info
24
29
  */
25
- export declare function createWorkspace(options: CreateWorkspaceOptions): Promise<WorkspaceInfo>;
30
+ export declare function createWorkspace(options: CreateWorkspaceOptions): Promise<CreatedWorkspaceInfo>;
31
+ /** Outcome of recording a created workspace's prune expiry. */
32
+ export type TtlWriteResult = {
33
+ state: "written";
34
+ expiresAt: Date;
35
+ } | {
36
+ state: "unconfirmed";
37
+ expiresAt: Date;
38
+ requested: string;
39
+ message: string;
40
+ };
26
41
  //#endregion
@@ -0,0 +1,5 @@
1
+ import "../deploy/label.mjs";
2
+ //#region src/cli/commands/workspace/expiry.d.ts
3
+ /** How a command reports a workspace's recorded expiry. */
4
+ export type ReportedExpiry = string | null | "invalid" | "unavailable";
5
+ //#endregion
@@ -1,4 +1,5 @@
1
1
  import { WorkspaceDetails } from "./transform.mjs";
2
+ import { ReportedExpiry } from "./expiry.mjs";
2
3
  import { z } from "zod";
3
4
  //#region src/cli/commands/workspace/get.d.ts
4
5
  declare const getWorkspaceOptionsSchema: z.ZodObject<{
@@ -6,10 +7,14 @@ declare const getWorkspaceOptionsSchema: z.ZodObject<{
6
7
  profile: z.ZodOptional<z.ZodString>;
7
8
  }, z.core.$strip>;
8
9
  export type GetWorkspaceOptions = z.input<typeof getWorkspaceOptionsSchema>;
10
+ /** A workspace's details, plus the prune expiry it records. */
11
+ export type WorkspaceDetailsWithExpiry = WorkspaceDetails & {
12
+ expiresAt: ReportedExpiry;
13
+ };
9
14
  /**
10
15
  * Get detailed information about a workspace.
11
16
  * @param options - Workspace get options
12
17
  * @returns Workspace details
13
18
  */
14
- export declare function getWorkspace(options: GetWorkspaceOptions): Promise<WorkspaceDetails>;
19
+ export declare function getWorkspace(options: GetWorkspaceOptions): Promise<WorkspaceDetailsWithExpiry>;
15
20
  //#endregion
@@ -1,5 +1,6 @@
1
1
  import { Order } from "../../shared/args.mjs";
2
2
  import { WorkspaceInfo } from "./transform.mjs";
3
+ import "./expiry.mjs";
3
4
  import { z } from "zod";
4
5
  //#region src/cli/commands/workspace/list.d.ts
5
6
  export interface ListWorkspacesOptions {
@@ -16,7 +16,7 @@ import { OperatorClient, initOperatorClient } from "./shared/client.mjs";
16
16
  import { NormalizedSchemaSnapshot, SchemaSnapshot, SnapshotFieldConfig, TailorDBSnapshotType } from "./commands/tailordb/migrate/snapshot-types.mjs";
17
17
  import { BreakingChangeInfo, MigrationDiff, formatDiffSummary, formatMigrationDiff, hasChanges } from "./commands/tailordb/migrate/diff-calculator.mjs";
18
18
  import { compareLocalTypesWithSnapshot, compareSnapshots } from "./commands/tailordb/migrate/snapshot-comparison.mjs";
19
- import { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATE_TEST_FILE_NAME, SCHEMA_FILE_NAME, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber } from "./commands/tailordb/migrate/snapshot-files.mjs";
19
+ import { DB_PGLITE_SCHEMA_FILE_NAME, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MIGRATE_PGLITE_TEST_FILE_NAME, MIGRATE_TEST_FILE_NAME, SCHEMA_FILE_NAME, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber } from "./commands/tailordb/migrate/snapshot-files.mjs";
20
20
  import { reconstructSnapshotFromMigrations } from "./commands/tailordb/migrate/snapshot-migrations.mjs";
21
21
  import { createSnapshotFromLocalTypes } from "./commands/tailordb/migrate/snapshot-local.mjs";
22
22
  import { MIGRATION_LABEL_KEY } from "./commands/tailordb/migrate/types.mjs";
@@ -30,6 +30,7 @@ import { GenerateOptions } from "./commands/generate/options.mjs";
30
30
  import { generate } from "./commands/generate/service.mjs";
31
31
  import { extractOwnedNamespaces } from "./shared/config.mjs";
32
32
  import { ErrorToJsonOptions, errorToJson, serializeError } from "./shared/error-json.mjs";
33
+ import { annotateTerminalError } from "./shared/github-actions.mjs";
33
34
  import { generateUserTypes } from "./shared/type-generator.mjs";
34
35
  import { LoadTailorDBNamespacesOptions, LoadedTailorDBNamespaces, TailorDBNamespaceSelector, loadTailorDBNamespaces } from "./shared/tailordb-namespaces.mjs";
35
36
  import { DeployResult, deployStaticWebsite } from "./commands/staticwebsite/deploy.mjs";
@@ -93,9 +94,9 @@ import { GenerateOptions as GenerateOptions$1, generate as generate$1 } from "./
93
94
  import { SeedNamespaceConfig } from "../plugin/builtin/seed/seed-type-processor.mjs";
94
95
  import { LoadSeedContextOptions, SeedContext, SeedIdpUserContext, loadSeedContext } from "./shared/seed-context.mjs";
95
96
  import { ChunkSeedDataOptions, SeedChunk, SeedData, chunkSeedData } from "./shared/seed-chunker.mjs";
96
- import { SeedBundleResult, bundleSeedScript } from "./commands/generate/seed/bundler.mjs";
97
+ import { SeedBundleResult, SeedDumpBundleResult, bundleSeedDumpScript, bundleSeedScript } from "./commands/generate/seed/bundler.mjs";
97
98
  import { MigrationBundleResult, bundleMigrationScript } from "./commands/tailordb/migrate/bundler.mjs";
98
99
  import { ExecutionWaitResult, ScriptExecutionOptions, ScriptExecutionResult, ScriptInvoker, executeScript, waitForExecution } from "./shared/script-executor.mjs";
99
100
  import { arg, defineCommand, runCommand, runMain } from "@politty/zod";
100
101
  import { MachineUserName } from "@tailor-platform/sdk";
101
- export { type AIGatewayInfo, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppIdEntry, type AppIdEntryInput, type AppIdLock, type AppIdPlan, type AppIdPlanMode, type AppIds, type AppInfo, type ApplicationInfo, type DeployOptions as ApplyOptions, type AuthInvoker, type BreakingChangeInfo, type BundledScripts, type ChunkSeedDataOptions, type CommonArgsType, type CreateFolderOptions, type CreateWorkspaceOptions, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteFolderOptions, type DeleteWorkspaceOptions, type DeployOptions, type ErrorToJsonOptions, type ExecutionWaitResult, type Executor, type ExecutorInfo, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FolderInfo, type FolderListInfo, type FunctionLogEntryInfo, type FunctionRegistryInfo, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobTypedOptions, type GetExecutorTypedOptions, type GetFolderOptions, type GetFunctionRegistryOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetOrganizationOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListFoldersOptions, type ListFunctionRegistriesOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListOrganizationsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadSeedContextOptions, type LoadTailorDBNamespacesOptions, type LoadedConfig, type LoadedTailorDBNamespaces, type LogMode, type LogOptions, MIGRATE_FILE_NAME, MIGRATE_TEST_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserName, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationBundleResult, type MigrationDiff, type NamespaceWithMigrations, type NormalizedSchemaSnapshot, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type OperatorFieldConfig, type OrganizationInfo, type OrganizationTreeOptions, type OutOptions, type ParsedField, type PlanAppIdsParams, type Plugin, type PluginAttachment, type PluginGeneratedTableSource, type RemoveAdoptedConfigIdsResult, type RemoveOptions, type RemoveUserOptions, type Resolver, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type ScriptInvoker, type SeedBundleResult, type SeedChunk, type SeedContext, type SeedData, type SeedIdpUserContext, type SeedNamespaceConfig, type ShowInfo, type ShowOptions, type SnapshotFieldConfig, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type DeployResult as StaticWebsiteDeployResult, TAILOR_LOCK_FILENAME, TAILOR_LOCK_VERSION, type TailorDBNamespaceData, type TailorDBNamespaceSelector, type TailorDBSnapshotType, type TailorDBType, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateFolderOptions, type UpdateOrganizationOptions, type UpdateUserOptions, type UserInfo, type UserOrganizationInfo, type WaitOptions, type WaitWorkflowExecutionOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowExecutionWaitInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkflowWaitOutput, type WorkflowWaitResult, type WorkspaceDetails, type WorkspaceInfo, apiCall, deploy as apply, arg, assertWritable, bundleMigrationScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, configArg, confirmationArgs, createCommonArgs, createFolder, createSnapshotFromLocalTypes, createWorkspace, defineAppCommand, defineCommand, deleteFolder, deleteWorkspace, deploy, deployStaticWebsite, deploymentArgs, ensureConfigId, errorToJson, executeScript, extractOwnedNamespaces, findAppIdLock, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getExecutorWaitFailureMessage, getFolder, getFunctionRegistry, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getOrganization, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, isPluginGeneratedTable, listApps, listExecutorJobs, listExecutors, listFolders, listFunctionRegistries, listMachineUsers, listOAuth2Clients, listOrganizations, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadEnvFiles, loadSeedContext, loadTailorDBNamespaces, loadWorkspaceId, logBetaWarning, logger, generate$1 as migrateGenerate, organizationTree, parseAppIds, planAppIds, prompt, query, reconstructSnapshotFromMigrations, remove, removeAdoptedConfigIds, removeUser, restoreWorkspace, resumeWorkflow, runCommand, runMain, serializeError, show, startWorkflow, styles, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, waitWorkflowExecution, watchExecutorJob, workspaceArgs, workspaceNameSchema };
102
+ export { type AIGatewayInfo, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, type AppIdEntry, type AppIdEntryInput, type AppIdLock, type AppIdPlan, type AppIdPlanMode, type AppIds, type AppInfo, type ApplicationInfo, type DeployOptions as ApplyOptions, type AuthInvoker, type BreakingChangeInfo, type BundledScripts, type ChunkSeedDataOptions, type CommonArgsType, type CreateFolderOptions, type CreateWorkspaceOptions, DB_PGLITE_SCHEMA_FILE_NAME, DB_TYPES_FILE_NAME, DIFF_FILE_NAME, type DeleteFolderOptions, type DeleteWorkspaceOptions, type DeployOptions, type ErrorToJsonOptions, type ExecutionWaitResult, type Executor, type ExecutorInfo, type ExecutorJobAttemptInfo, type ExecutorJobDetailInfo, type ExecutorJobInfo, type ExecutorJobListInfo, type ExecutorListInfo, type FolderInfo, type FolderListInfo, type FunctionLogEntryInfo, type FunctionRegistryInfo, type GenerateOptions, type GeneratorResult, type HealthOptions as GetAppHealthOptions, type GetExecutorJobTypedOptions, type GetExecutorTypedOptions, type GetFolderOptions, type GetFunctionRegistryOptions, type GetMachineUserTokenOptions, type GetOAuth2ClientOptions, type GetOrganizationOptions, type GetWorkflowExecutionOptions, type GetWorkflowExecutionResult, type GetWorkflowTypedOptions, type GetWorkspaceOptions, INITIAL_SCHEMA_NUMBER, type InviteUserOptions, type ListAppsOptions, type ListExecutorJobsTypedOptions, type ListExecutorsOptions, type ListFoldersOptions, type ListFunctionRegistriesOptions, type ListMachineUsersOptions, type ListOAuth2ClientsOptions, type ListOrganizationsOptions, type ListUsersOptions, type ListWebhookExecutorsOptions, type ListWorkflowExecutionsTypedOptions, type ListWorkflowsOptions, type ListWorkspacesOptions, type LoadSeedContextOptions, type LoadTailorDBNamespacesOptions, type LoadedConfig, type LoadedTailorDBNamespaces, type LogMode, type LogOptions, MIGRATE_FILE_NAME, MIGRATE_PGLITE_TEST_FILE_NAME, MIGRATE_TEST_FILE_NAME, MIGRATION_LABEL_KEY, type MachineUserInfo, type MachineUserName, type MachineUserTokenInfo, type GenerateOptions$1 as MigrateGenerateOptions, type MigrationBundleResult, type MigrationDiff, type NamespaceWithMigrations, type NormalizedSchemaSnapshot, type OAuth2ClientCredentials, type OAuth2ClientInfo, type OperatorClient, type OperatorFieldConfig, type OrganizationInfo, type OrganizationTreeOptions, type OutOptions, type ParsedField, type PlanAppIdsParams, type Plugin, type PluginAttachment, type PluginGeneratedTableSource, type RemoveAdoptedConfigIdsResult, type RemoveOptions, type RemoveUserOptions, type Resolver, type RestoreWorkspaceOptions, type ResumeWorkflowOptions, type ResumeWorkflowResultWithWait, SCHEMA_FILE_NAME, type SchemaSnapshot, type ScriptExecutionOptions, type ScriptExecutionResult, type ScriptInvoker, type SeedBundleResult, type SeedChunk, type SeedContext, type SeedData, type SeedDumpBundleResult, type SeedIdpUserContext, type SeedNamespaceConfig, type ShowInfo, type ShowOptions, type SnapshotFieldConfig, type StartWorkflowResultWithWait, type StartWorkflowTypedOptions, type DeployResult as StaticWebsiteDeployResult, TAILOR_LOCK_FILENAME, TAILOR_LOCK_VERSION, type TailorDBNamespaceData, type TailorDBNamespaceSelector, type TailorDBSnapshotType, type TailorDBType, type TriggerExecutorResult, type TriggerExecutorTypedOptions, type TruncateOptions, type TypeSourceInfoEntry, type UpdateFolderOptions, type UpdateOrganizationOptions, type UpdateUserOptions, type UserInfo, type UserOrganizationInfo, type WaitOptions, type WaitWorkflowExecutionOptions, type WatchExecutorJobResult, type WatchExecutorJobTypedOptions, type WebhookExecutorInfo, type WorkflowExecutionInfo, type WorkflowExecutionWaitInfo, type WorkflowInfo, type WorkflowJobExecutionInfo, type WorkflowListInfo, type WorkflowWaitOutput, type WorkflowWaitResult, type WorkspaceDetails, type WorkspaceInfo, annotateTerminalError, apiCall, deploy as apply, arg, assertWritable, bundleMigrationScript, bundleSeedDumpScript, bundleSeedScript, chunkSeedData, compareLocalTypesWithSnapshot, compareSnapshots, configArg, confirmationArgs, createCommonArgs, createFolder, createSnapshotFromLocalTypes, createWorkspace, defineAppCommand, defineCommand, deleteFolder, deleteWorkspace, deploy, deployStaticWebsite, deploymentArgs, ensureConfigId, errorToJson, executeScript, extractOwnedNamespaces, findAppIdLock, formatDiffSummary, formatMigrationDiff, generate, generateUserTypes, getAppHealth, getExecutor, getExecutorJob, getExecutorWaitFailureMessage, getFolder, getFunctionRegistry, getLatestMigrationNumber, getMachineUserToken, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNamespacesWithMigrations, getNextMigrationNumber, getOAuth2Client, getOrganization, getWorkflow, getWorkflowExecution, getWorkspace, hasChanges, initOperatorClient, inviteUser, isPluginGeneratedTable, listApps, listExecutorJobs, listExecutors, listFolders, listFunctionRegistries, listMachineUsers, listOAuth2Clients, listOrganizations, listUsers, listWebhookExecutors, listWorkflowExecutions, listWorkflows, listWorkspaces, loadAccessToken, loadConfig, loadEnvFiles, loadSeedContext, loadTailorDBNamespaces, loadWorkspaceId, logBetaWarning, logger, generate$1 as migrateGenerate, organizationTree, parseAppIds, planAppIds, prompt, query, reconstructSnapshotFromMigrations, remove, removeAdoptedConfigIds, removeUser, restoreWorkspace, resumeWorkflow, runCommand, runMain, serializeError, show, startWorkflow, styles, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, waitWorkflowExecution, watchExecutorJob, workspaceArgs, workspaceNameSchema };
package/dist/cli/lib.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{n as ee,r as te}from"../logger-CCjs1DuH.mjs";import{$n as e,A as t,At as n,B as r,Bt as i,Cn as a,D as o,Dr as s,En as c,Er as l,Et as u,F as d,Fr as f,G as p,Gt as m,H as h,It as g,J as _,Jt as v,Ln as y,Lr as b,Lt as x,M as S,N as C,Or as w,Ot as T,P as E,Pt as D,Q as O,Qn as k,Rr as A,Rt as j,S as M,Sn as N,St as P,T as F,Tt as I,U as L,Un as R,Ut as z,Vt as B,Wr as V,Y as H,Yn as U,Zr as W,_ as G,_n as K,ai as q,an as J,b as Y,bi as X,bn as Z,br as Q,ci as ne,cr as $,ct as re,d as ie,di as ae,dr as oe,er as se,et as ce,fr as le,ft as ue,gr as de,h as fe,ht as pe,i as me,in as he,it as ge,jt as _e,k as ve,l as ye,li as be,lr as xe,mt as Se,n as Ce,nr as we,nt as Te,or as Ee,ot as De,p as Oe,pi as ke,pn as Ae,qt as je,r as Me,rr as Ne,s as Pe,t as Fe,tr as Ie,ui as Le,un as Re,ur as ze,ut as Be,vn as Ve,vt as He,wn as Ue,wt as We,xn as Ge,xr as Ke,y as qe,yn as Je,yt as Ye,zr as Xe}from"../register-ts-hook-CAUcxCt4.mjs";import{$ as Ze}from"../application-BpoMu4Af.mjs";import{t as Qe}from"../type-source--ZNcV8RJ.mjs";import{arg as $e,defineCommand as et,runCommand as tt,runMain as nt}from"@politty/zod";await Fe(new URL(`./ts-hook.mjs`,import.meta.url));export{e as DB_TYPES_FILE_NAME,se as DIFF_FILE_NAME,Ie as INITIAL_SCHEMA_NUMBER,we as MIGRATE_FILE_NAME,Ne as MIGRATE_TEST_FILE_NAME,de as MIGRATION_LABEL_KEY,Ee as SCHEMA_FILE_NAME,Ve as TAILOR_LOCK_FILENAME,Je as TAILOR_LOCK_VERSION,b as apiCall,J as apply,J as deploy,$e as arg,A as assertWritable,y as bundleMigrationScript,E as bundleSeedScript,C as chunkSeedData,Q as compareLocalTypesWithSnapshot,Ke as compareSnapshots,ne as configArg,be as confirmationArgs,Le as createCommonArgs,Be as createFolder,U as createSnapshotFromLocalTypes,Ae as createWorkspace,q as defineAppCommand,et as defineCommand,re as deleteFolder,qe as deleteWorkspace,h as deployStaticWebsite,ae as deploymentArgs,Ue as ensureConfigId,Ce as errorToJson,I as executeScript,We as extractOwnedNamespaces,Z as findAppIdLock,l as formatDiffSummary,s as formatMigrationDiff,Ye as generate,c as generateUserTypes,M as getAppHealth,he as getExecutor,x as getExecutorJob,j as getExecutorWaitFailureMessage,De as getFolder,n as getFunctionRegistry,$ as getLatestMigrationNumber,pe as getMachineUserToken,xe as getMigrationDirPath,ze as getMigrationFilePath,oe as getMigrationFiles,R as getNamespacesWithMigrations,le as getNextMigrationNumber,Se as getOAuth2Client,ce as getOrganization,m as getWorkflow,je as getWorkflowExecution,G as getWorkspace,w as hasChanges,Ze as initOperatorClient,Oe as inviteUser,Qe as isPluginGeneratedTable,Y as listApps,i as listExecutorJobs,g as listExecutors,ge as listFolders,T as listFunctionRegistries,He as listMachineUsers,ue as listOAuth2Clients,O as listOrganizations,ie as listUsers,_e as listWebhookExecutors,v as listWorkflowExecutions,ve as listWorkflows,Re as listWorkspaces,V as loadAccessToken,Xe as loadConfig,ke as loadEnvFiles,S as loadSeedContext,P as loadTailorDBNamespaces,W as loadWorkspaceId,r as logBetaWarning,ee as logger,d as migrateGenerate,H as organizationTree,Ge as parseAppIds,N as planAppIds,f as prompt,me as query,k as reconstructSnapshotFromMigrations,p as remove,a as removeAdoptedConfigIds,ye as removeUser,fe as restoreWorkspace,o as resumeWorkflow,tt as runCommand,nt as runMain,Me as serializeError,L as show,z as startWorkflow,te as styles,D as triggerExecutor,t as truncate,Te as updateFolder,_ as updateOrganization,Pe as updateUser,u as waitForExecution,F as waitWorkflowExecution,B as watchExecutorJob,X as workspaceArgs,K as workspaceNameSchema};
1
+ import{i as ee,n as te}from"../logger-72hM4JWZ.mjs";import{$ as ne,$r as e,A as t,Ai as n,Bt as r,Cr as i,D as a,Di as o,Dr as s,Dt as c,Ei as l,Er as u,F as d,Fn as f,Fr as p,Hr as m,I as h,In as g,Ir as _,Jt as v,K as y,Kt as b,Ln as x,Lt as S,M as C,Mn as w,N as T,Nn as E,Nt as D,Oi as O,On as k,Ot as A,P as j,Pn as M,Pt as N,Qr as P,Ri as F,Rn as I,S as L,St as R,T as z,Ti as B,Tr as V,Tt as H,U,Ur as W,Ut as G,V as K,Vr as q,Vt as J,W as Y,Wt as X,X as Z,Xr as re,Xt as ie,Y as ae,Yn as oe,Zt as se,_r as Q,ai as ce,at as le,b as ue,bt as de,c as fe,cn as $,cr as pe,dr as me,dt as he,ei as ge,f as _e,fi as ve,fr as ye,g as be,gn as xe,gr as Se,gt as Ce,hr as we,ht as Te,jn as Ee,jr as De,jt as Oe,k as ke,kt as Ae,lt as je,m as Me,mr as Ne,n as Pe,o as Fe,pn as Ie,pr as Le,pt as Re,r as ze,rt as Be,sn as Ve,st as He,t as Ue,tr as We,tt as Ge,u as Ke,v as qe,vr as Je,wr as Ye,xi as Xe,xr as Ze,xt as Qe,yt as $e,zt as et}from"../register-ts-hook-Dn-XlVSD.mjs";import{Q as tt}from"../application-ChuNPwnl.mjs";import{t as nt}from"../type-source--ZNcV8RJ.mjs";import{arg as rt,defineCommand as it,runCommand as at,runMain as ot}from"@politty/zod";await Ue(new URL(`./ts-hook.mjs`,import.meta.url));export{ye as DB_PGLITE_SCHEMA_FILE_NAME,Le as DB_TYPES_FILE_NAME,Ne as DIFF_FILE_NAME,we as INITIAL_SCHEMA_NUMBER,Se as MIGRATE_FILE_NAME,Q as MIGRATE_PGLITE_TEST_FILE_NAME,Je as MIGRATE_TEST_FILE_NAME,De as MIGRATION_LABEL_KEY,Ze as SCHEMA_FILE_NAME,Ee as TAILOR_LOCK_FILENAME,w as TAILOR_LOCK_VERSION,Pe as annotateTerminalError,P as apiCall,$ as apply,$ as deploy,rt as arg,e as assertWritable,oe as bundleMigrationScript,j as bundleSeedDumpScript,d as bundleSeedScript,T as chunkSeedData,p as compareLocalTypesWithSnapshot,_ as compareSnapshots,B as configArg,l as confirmationArgs,o as createCommonArgs,he as createFolder,pe as createSnapshotFromLocalTypes,xe as createWorkspace,Xe as defineAppCommand,it as defineCommand,je as deleteFolder,qe as deleteWorkspace,U as deployStaticWebsite,O as deploymentArgs,x as ensureConfigId,Qe as errorToJson,A as executeScript,c as extractOwnedNamespaces,E as findAppIdLock,q as formatDiffSummary,m as formatMigrationDiff,de as generate,I as generateUserTypes,L as getAppHealth,Ve as getExecutor,r as getExecutorJob,J as getExecutorWaitFailureMessage,He as getFolder,D as getFunctionRegistry,i as getLatestMigrationNumber,Ce as getMachineUserToken,Ye as getMigrationDirPath,V as getMigrationFilePath,u as getMigrationFiles,We as getNamespacesWithMigrations,s as getNextMigrationNumber,Te as getOAuth2Client,Ge as getOrganization,v as getWorkflow,ie as getWorkflowExecution,be as getWorkspace,W as hasChanges,tt as initOperatorClient,_e as inviteUser,nt as isPluginGeneratedTable,ue as listApps,G as listExecutorJobs,et as listExecutors,le as listFolders,Oe as listFunctionRegistries,$e as listMachineUsers,Re as listOAuth2Clients,ne as listOrganizations,Ke as listUsers,N as listWebhookExecutors,se as listWorkflowExecutions,ke as listWorkflows,Ie as listWorkspaces,ce as loadAccessToken,ge as loadConfig,n as loadEnvFiles,C as loadSeedContext,H as loadTailorDBNamespaces,ve as loadWorkspaceId,K as logBetaWarning,te as logger,h as migrateGenerate,Z as organizationTree,M as parseAppIds,f as planAppIds,re as prompt,ze as query,me as reconstructSnapshotFromMigrations,y as remove,g as removeAdoptedConfigIds,fe as removeUser,Me as restoreWorkspace,a as resumeWorkflow,at as runCommand,ot as runMain,R as serializeError,Y as show,b as startWorkflow,ee as styles,S as triggerExecutor,t as truncate,Be as updateFolder,ae as updateOrganization,Fe as updateUser,Ae as waitForExecution,z as waitWorkflowExecution,X as watchExecutorJob,F as workspaceArgs,k as workspaceNameSchema};
2
2
  //# sourceMappingURL=lib.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"lib.mjs","names":[],"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 findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\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} 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 { 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 DB_TYPES_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 { bundleSeedScript, type SeedBundleResult } 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":"wmCAGA,MAAM,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC"}
1
+ {"version":3,"file":"lib.mjs","names":[],"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 findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\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} 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 } from \"./shared/github-actions\";\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":"uoCAGA,MAAM,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC"}