@tailor-platform/sdk 2.14.1 → 2.15.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 +44 -0
- package/bin/tailor.mjs +2 -2
- package/dist/{application-CfevPO-k.mjs → application-BpoMu4Af.mjs} +18 -18
- package/dist/application-BpoMu4Af.mjs.map +1 -0
- package/dist/application-fIhVKX78.mjs +1 -0
- package/dist/cli/commands/deploy/app-id-lock.d.mts +97 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +15 -1
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +5 -2
- package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +13 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +7 -1
- package/dist/cli/commands/workflow/executions.d.mts +2 -0
- package/dist/cli/lib.d.mts +4 -2
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +8 -8
- package/dist/cli/main.mjs +42 -44
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/command.d.mts +1 -1
- package/dist/cli/shared/function-execution.d.mts +14 -0
- package/dist/completion/zsh-worker.zsh +8 -3
- package/dist/configure/config/types.d.mts +23 -6
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/executor/trigger/event.d.mts +5 -2
- package/dist/date-CGBZbMW5.mjs +2 -0
- package/dist/date-CGBZbMW5.mjs.map +1 -0
- package/dist/file-DKBOj5q4.mjs +2 -0
- package/dist/file-DKBOj5q4.mjs.map +1 -0
- package/dist/plugin/builtin/file-utils/index.mjs +27 -1
- package/dist/plugin/builtin/file-utils/index.mjs.map +1 -1
- package/dist/register-ts-hook-CAUcxCt4.mjs +711 -0
- package/dist/register-ts-hook-CAUcxCt4.mjs.map +1 -0
- package/dist/runtime/file.d.mts +46 -2
- package/dist/runtime/file.mjs +1 -1
- package/dist/runtime/index.mjs +1 -1
- package/dist/{schema-DMlLMsWA.mjs → schema-BTioi2dP.mjs} +2 -2
- package/dist/{schema-DMlLMsWA.mjs.map → schema-BTioi2dP.mjs.map} +1 -1
- package/dist/service_pb-DKrsO1_u.mjs +1 -0
- package/dist/service_pb-DprmLNsq.mjs +2 -0
- package/dist/{service_pb-CxHztLk1.mjs.map → service_pb-DprmLNsq.mjs.map} +1 -1
- package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +5 -1
- package/dist/types/auth.generated.d.mts +1 -19
- package/dist/types/executor.generated.d.mts +5 -3
- package/dist/types/field.generated.d.mts +40 -0
- package/dist/types/helpers.d.mts +9 -1
- package/dist/types/resolver.generated.d.mts +5 -40
- package/dist/vitest/index.d.mts +2 -3
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/file.d.mts +2 -2
- package/dist/vitest/setup.d.mts +0 -37
- package/dist/vitest/setup.mjs +1 -1
- package/dist/vitest/setup.mjs.map +1 -1
- package/dist/{workspace_resource_pb-u9bj6p3i.mjs → workspace_resource_pb-BOoRts_z.mjs} +2 -2
- package/dist/{workspace_resource_pb-u9bj6p3i.mjs.map → workspace_resource_pb-BOoRts_z.mjs.map} +1 -1
- package/docs/cli/application.md +1 -1
- package/docs/cli/function.md +19 -6
- package/docs/cli/tailordb.md +11 -11
- package/docs/configuration.md +20 -3
- package/docs/github-actions.md +45 -13
- package/docs/migration/v3.md +38 -0
- package/docs/runtime.md +39 -0
- package/docs/services/resolver.md +3 -1
- package/docs/services/tailordb-migration.md +25 -5
- package/docs/testing.md +3 -7
- package/package.json +7 -7
- package/dist/application-BWOMdL3D.mjs +0 -1
- package/dist/application-CfevPO-k.mjs.map +0 -1
- package/dist/date-DrUO8rOJ.mjs +0 -2
- package/dist/date-DrUO8rOJ.mjs.map +0 -1
- package/dist/file-COPYfju_.mjs +0 -2
- package/dist/file-COPYfju_.mjs.map +0 -1
- package/dist/register-ts-hook-DZ1Kpt4s.mjs +0 -642
- package/dist/register-ts-hook-DZ1Kpt4s.mjs.map +0 -1
- package/dist/service_pb-CFVlGYdr.mjs +0 -1
- package/dist/service_pb-CxHztLk1.mjs +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./application-BpoMu4Af.mjs";export{t as defineApplication,e as generatePluginFilesIfNeeded};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//#region src/cli/commands/deploy/app-id-lock.d.ts
|
|
2
|
+
/** Lock file path, relative to the repository root. Created by `tailor setup`. */
|
|
3
|
+
export declare const TAILOR_LOCK_FILENAME = ".github/tailor.lock";
|
|
4
|
+
/**
|
|
5
|
+
* Current lock schema version. Version 2 added `appIds`; a lock carrying it
|
|
6
|
+
* must not be rewritten by a tool that would drop the section.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TAILOR_LOCK_VERSION = 2;
|
|
9
|
+
/** App ids recorded in the lock, keyed by repository-relative config path. */
|
|
10
|
+
export type AppIds = Readonly<Record<string, string>>;
|
|
11
|
+
/** The `appIds` section of a repository's lock file. */
|
|
12
|
+
export type AppIdLock = {
|
|
13
|
+
/** Repository root: the directory that holds `.github/tailor.lock`. */
|
|
14
|
+
root: string;
|
|
15
|
+
appIds: AppIds;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Validate the `appIds` section of a lock file.
|
|
19
|
+
*
|
|
20
|
+
* Every key must be a repository-relative config path and every value a UUID.
|
|
21
|
+
* Two configs must not share one id: that is the copied-config accident the
|
|
22
|
+
* lock exists to prevent, so it is rejected instead of deployed.
|
|
23
|
+
* @param value - The raw `appIds` value, or undefined when the lock has none
|
|
24
|
+
* @returns The validated section (empty when absent)
|
|
25
|
+
*/
|
|
26
|
+
export declare function parseAppIds(value: unknown): AppIds;
|
|
27
|
+
/**
|
|
28
|
+
* Locate the lock file that governs a config: the nearest `.github/tailor.lock`
|
|
29
|
+
* in the config's directory or one of its ancestors, without leaving the
|
|
30
|
+
* repository the config belongs to. That is the root setup records against
|
|
31
|
+
* when it runs from that directory.
|
|
32
|
+
* @param configPath - Absolute path to the config file
|
|
33
|
+
* @returns The lock, or null when no ancestor directory inside the repository has one
|
|
34
|
+
*/
|
|
35
|
+
export declare function findAppIdLock(configPath: string): AppIdLock | null;
|
|
36
|
+
/**
|
|
37
|
+
* How a command may treat a config whose id is not yet recorded.
|
|
38
|
+
*
|
|
39
|
+
* - `write`: local runs that may record, adopt, or generate ids
|
|
40
|
+
* - `read`: local read-only runs; a missing id is a warning
|
|
41
|
+
* - `require`: CI; a missing id is an error, since a fresh id per run would
|
|
42
|
+
* make every run a separate application
|
|
43
|
+
*/
|
|
44
|
+
export type AppIdPlanMode = "write" | "read" | "require";
|
|
45
|
+
/** One config to resolve: its path and the id its module evaluates to. */
|
|
46
|
+
export type AppIdEntryInput = {
|
|
47
|
+
configPath: string;
|
|
48
|
+
configId: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
/** The resolved id of one config and where it came from. */
|
|
51
|
+
export type AppIdEntry = {
|
|
52
|
+
configPath: string;
|
|
53
|
+
key: string;
|
|
54
|
+
id: string | undefined;
|
|
55
|
+
source: "lock" | "config" | "generated" | "none";
|
|
56
|
+
/** The config still carries the id; remove it once the lock is written. */
|
|
57
|
+
removeConfigId: boolean;
|
|
58
|
+
};
|
|
59
|
+
/** The `appIds` section after resolving a batch of configs. */
|
|
60
|
+
export type AppIdPlan = {
|
|
61
|
+
appIds: Record<string, string>;
|
|
62
|
+
/** Whether `appIds` differs from the lock it was planned against. */
|
|
63
|
+
changed: boolean;
|
|
64
|
+
/** One entry per input, in input order. */
|
|
65
|
+
entries: AppIdEntry[];
|
|
66
|
+
};
|
|
67
|
+
export type PlanAppIdsParams = {
|
|
68
|
+
lock: AppIdLock;
|
|
69
|
+
entries: readonly AppIdEntryInput[];
|
|
70
|
+
mode: AppIdPlanMode;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Decide the app id of every config in a batch against one lock file.
|
|
74
|
+
*
|
|
75
|
+
* Precedence per config: the lock entry, then the id the config evaluates to,
|
|
76
|
+
* then a generated id. A config whose id disagrees with its lock entry is an
|
|
77
|
+
* error, since neither value can be chosen mechanically. Reads nothing but the
|
|
78
|
+
* lock passed in and the existence of the files its entries name; the caller
|
|
79
|
+
* persists the returned `appIds`.
|
|
80
|
+
* @param params - The lock, the configs to resolve, and the mode
|
|
81
|
+
* @returns The resolved entries and the `appIds` section to persist
|
|
82
|
+
*/
|
|
83
|
+
export declare function planAppIds(params: PlanAppIdsParams): Promise<AppIdPlan>;
|
|
84
|
+
/** Result of {@link removeAdoptedConfigIds}. */
|
|
85
|
+
export type RemoveAdoptedConfigIdsResult = {
|
|
86
|
+
/** Whether at least one config file was edited. */
|
|
87
|
+
configEdited: boolean;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Remove the `id` from every config whose id the plan moved into the lock.
|
|
91
|
+
* Call it after the lock has been written, so the id is never held nowhere.
|
|
92
|
+
* A config shape that cannot be edited is reported with a manual-edit hint.
|
|
93
|
+
* @param plan - A plan produced in `write` mode
|
|
94
|
+
* @returns Whether any config was edited
|
|
95
|
+
*/
|
|
96
|
+
export declare function removeAdoptedConfigIds(plan: AppIdPlan): Promise<RemoveAdoptedConfigIdsResult>;
|
|
97
|
+
//#endregion
|
|
@@ -78,12 +78,26 @@ export interface FieldRemovedChange extends DiffChangeBase {
|
|
|
78
78
|
fieldName: string;
|
|
79
79
|
before: SnapshotFieldConfig;
|
|
80
80
|
}
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* A member inside a nested field was renamed. `previousPath` and `path` are
|
|
83
|
+
* relative to the top-level field and share the same parent.
|
|
84
|
+
*/
|
|
85
|
+
export interface NestedMemberRename {
|
|
86
|
+
previousPath: string[];
|
|
87
|
+
path: string[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A field configuration was modified. `memberRenames` records members inside a
|
|
91
|
+
* nested field that the user confirmed as renames (interactively or via
|
|
92
|
+
* `--rename Table.field.old:new`); their values must be copied by the
|
|
93
|
+
* migration script.
|
|
94
|
+
*/
|
|
82
95
|
export interface FieldModifiedChange extends DiffChangeBase {
|
|
83
96
|
kind: "field_modified";
|
|
84
97
|
fieldName: string;
|
|
85
98
|
before: SnapshotFieldConfig;
|
|
86
99
|
after: SnapshotFieldConfig;
|
|
100
|
+
memberRenames?: NestedMemberRename[];
|
|
87
101
|
}
|
|
88
102
|
/**
|
|
89
103
|
* A field was renamed within a table. Recorded when the user confirms that a
|
|
@@ -9,9 +9,12 @@ export interface GenerateOptions {
|
|
|
9
9
|
dataOnly?: boolean;
|
|
10
10
|
/** Namespace the `--data-only` migration targets. */
|
|
11
11
|
namespace?: string;
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* `--rename Table.oldField:newField` / `--rename OldTable:NewTable` /
|
|
14
|
+
* `--rename Table.field.oldMember:newMember` values confirming renames non-interactively.
|
|
15
|
+
*/
|
|
13
16
|
renames?: string[];
|
|
14
|
-
/** `--drop Table.field` / `--drop Table` values confirming removals non-interactively. */
|
|
17
|
+
/** `--drop Table.field` / `--drop Table` / `--drop Table.field.member` values confirming removals non-interactively. */
|
|
15
18
|
drops?: string[];
|
|
16
19
|
/** `--expand-contract Table.field` values approving a field type conversion. */
|
|
17
20
|
expandContracts?: string[];
|
|
@@ -9,6 +9,19 @@ export interface FieldRenameSpec {
|
|
|
9
9
|
/** Field name after the rename. */
|
|
10
10
|
fieldName: string;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A confirmed rename of a member inside a nested field. Paths are relative to
|
|
14
|
+
* the top-level field and share the same parent.
|
|
15
|
+
*/
|
|
16
|
+
export interface NestedMemberRenameSpec {
|
|
17
|
+
tableName: string;
|
|
18
|
+
/** Top-level nested field containing the member. */
|
|
19
|
+
fieldName: string;
|
|
20
|
+
/** Member path before the rename. */
|
|
21
|
+
previousPath: string[];
|
|
22
|
+
/** Member path after the rename. */
|
|
23
|
+
path: string[];
|
|
24
|
+
}
|
|
12
25
|
/**
|
|
13
26
|
* A confirmed table rename to record in the migration diff.
|
|
14
27
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NormalizedSchemaSnapshot, SchemaSnapshot, TailorDBSnapshotType } from "./snapshot-types.mjs";
|
|
2
2
|
import { MigrationDiff } from "./diff-calculator.mjs";
|
|
3
|
-
import { FieldRenameSpec, TypeRenameSpec } from "./rename-detection.mjs";
|
|
3
|
+
import { FieldRenameSpec, NestedMemberRenameSpec, TypeRenameSpec } from "./rename-detection.mjs";
|
|
4
4
|
//#region src/cli/commands/tailordb/migrate/snapshot-comparison.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Options for {@link compareSnapshots}.
|
|
@@ -18,6 +18,12 @@ export interface CompareSnapshotsOptions {
|
|
|
18
18
|
* `table_renamed` change. Specs are validated against both snapshots.
|
|
19
19
|
*/
|
|
20
20
|
typeRenames?: readonly TypeRenameSpec[];
|
|
21
|
+
/**
|
|
22
|
+
* Confirmed renames of members inside nested fields. Each spec is recorded on
|
|
23
|
+
* the field's `field_modified` change as a breaking `memberRenames` entry
|
|
24
|
+
* instead of a removal warning. Specs are validated against both snapshots.
|
|
25
|
+
*/
|
|
26
|
+
nestedMemberRenames?: readonly NestedMemberRenameSpec[];
|
|
21
27
|
}
|
|
22
28
|
/**
|
|
23
29
|
* Compare two normalized snapshots and generate a diff
|
|
@@ -2,6 +2,7 @@ import { Order } from "../../shared/args.mjs";
|
|
|
2
2
|
import { WorkflowExecutionInfo, WorkflowJobExecutionInfo } from "./transform.mjs";
|
|
3
3
|
import { WorkflowWaitUntil } from "./status.mjs";
|
|
4
4
|
import { WorkflowWaitResult } from "./waiter.mjs";
|
|
5
|
+
import { FunctionLogEntryInfo } from "../../shared/function-execution.mjs";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
//#region src/cli/commands/workflow/executions.d.ts
|
|
7
8
|
type WorkflowLike = {
|
|
@@ -27,6 +28,7 @@ export interface GetWorkflowExecutionOptions {
|
|
|
27
28
|
export interface WorkflowExecutionDetailInfo extends WorkflowExecutionInfo {
|
|
28
29
|
jobDetails?: (WorkflowJobExecutionInfo & {
|
|
29
30
|
logs?: string;
|
|
31
|
+
logEntries?: FunctionLogEntryInfo[];
|
|
30
32
|
result?: string;
|
|
31
33
|
})[];
|
|
32
34
|
}
|
package/dist/cli/lib.d.mts
CHANGED
|
@@ -25,6 +25,7 @@ import "./commands/deploy/function-registry.mjs";
|
|
|
25
25
|
import { NamespaceWithMigrations, getNamespacesWithMigrations } from "./commands/tailordb/migrate/config.mjs";
|
|
26
26
|
import { DeployOptions, deploy } from "./commands/deploy/deploy.mjs";
|
|
27
27
|
import { ensureConfigId } from "./commands/deploy/config-id-injector.mjs";
|
|
28
|
+
import { AppIdEntry, AppIdEntryInput, AppIdLock, AppIdPlan, AppIdPlanMode, AppIds, PlanAppIdsParams, RemoveAdoptedConfigIdsResult, TAILOR_LOCK_FILENAME, TAILOR_LOCK_VERSION, findAppIdLock, parseAppIds, planAppIds, removeAdoptedConfigIds } from "./commands/deploy/app-id-lock.mjs";
|
|
28
29
|
import { GenerateOptions } from "./commands/generate/options.mjs";
|
|
29
30
|
import { generate } from "./commands/generate/service.mjs";
|
|
30
31
|
import { extractOwnedNamespaces } from "./shared/config.mjs";
|
|
@@ -63,6 +64,7 @@ import { ListWorkflowsOptions, listWorkflows } from "./commands/workflow/list.mj
|
|
|
63
64
|
import { GetWorkflowTypedOptions, getWorkflow } from "./commands/workflow/get.mjs";
|
|
64
65
|
import { WaitWorkflowExecutionOptions, WorkflowWaitResult } from "./commands/workflow/waiter.mjs";
|
|
65
66
|
import { StartWorkflowResultWithWait, StartWorkflowTypedOptions, WaitOptions, startWorkflow } from "./commands/workflow/start.mjs";
|
|
67
|
+
import { FunctionLogEntryInfo } from "./shared/function-execution.mjs";
|
|
66
68
|
import { GetWorkflowExecutionOptions, GetWorkflowExecutionResult, ListWorkflowExecutionsTypedOptions, WorkflowExecutionWaitInfo, getWorkflowExecution, listWorkflowExecutions } from "./commands/workflow/executions.mjs";
|
|
67
69
|
import { WorkflowWaitOutput, waitWorkflowExecution } from "./commands/workflow/wait.mjs";
|
|
68
70
|
import { ResumeWorkflowOptions, ResumeWorkflowResultWithWait, resumeWorkflow } from "./commands/workflow/resume.mjs";
|
|
@@ -94,6 +96,6 @@ import { ChunkSeedDataOptions, SeedChunk, SeedData, chunkSeedData } from "./shar
|
|
|
94
96
|
import { SeedBundleResult, bundleSeedScript } from "./commands/generate/seed/bundler.mjs";
|
|
95
97
|
import { MigrationBundleResult, bundleMigrationScript } from "./commands/tailordb/migrate/bundler.mjs";
|
|
96
98
|
import { ExecutionWaitResult, ScriptExecutionOptions, ScriptExecutionResult, ScriptInvoker, executeScript, waitForExecution } from "./shared/script-executor.mjs";
|
|
97
|
-
import { arg, defineCommand, runCommand, runMain } from "politty";
|
|
99
|
+
import { arg, defineCommand, runCommand, runMain } from "@politty/zod";
|
|
98
100
|
import { MachineUserName } from "@tailor-platform/sdk";
|
|
99
|
-
export { type AIGatewayInfo, type ApiCallOptions, type ApiCallResult, type AppHealthInfo, 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 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 Plugin, type PluginAttachment, type PluginGeneratedTableSource, 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, 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, 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, prompt, query, reconstructSnapshotFromMigrations, remove, removeUser, restoreWorkspace, resumeWorkflow, runCommand, runMain, serializeError, show, startWorkflow, styles, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, waitWorkflowExecution, watchExecutorJob, workspaceArgs, workspaceNameSchema };
|
|
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 };
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n as ee,r as
|
|
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};
|
|
2
2
|
//# sourceMappingURL=lib.mjs.map
|
package/dist/cli/lib.mjs.map
CHANGED
|
@@ -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 surface is re-exported for the same\n// reason: arg metadata (aliases, env bindings, effects) lives in a politty\n// module-level registry, so registration and parsing must use one politty copy.\nexport { arg, defineCommand, runCommand, runMain } from \"politty\";\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 { 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 {\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":"6iCAGA,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 { 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"}
|
package/dist/cli/main.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyCommand } from "politty";
|
|
1
|
+
import { AnyCommand } from "@politty/zod";
|
|
2
2
|
//#region src/cli/main.d.ts
|
|
3
3
|
export declare const mainCommand: {
|
|
4
4
|
subCommands: {
|
|
@@ -9,16 +9,16 @@ export declare const mainCommand: {
|
|
|
9
9
|
description?: string | undefined;
|
|
10
10
|
aliases?: string[] | undefined;
|
|
11
11
|
args: undefined;
|
|
12
|
-
setup?: ((context: import("politty").SetupContext<Record<string, never> & {
|
|
13
|
-
$source?: (name: string) => import("politty").ArgSource;
|
|
14
|
-
$invocation?: import("politty").RunInvocation;
|
|
12
|
+
setup?: ((context: import("@politty/zod").SetupContext<Record<string, never> & {
|
|
13
|
+
$source?: (name: string) => import("@politty/zod").ArgSource;
|
|
14
|
+
$invocation?: import("@politty/zod").RunInvocation;
|
|
15
15
|
}>) => void | Promise<void>) | undefined;
|
|
16
|
-
cleanup?: ((context: import("politty").CleanupContext<Record<string, never> & {
|
|
17
|
-
$source?: (name: string) => import("politty").ArgSource;
|
|
18
|
-
$invocation?: import("politty").RunInvocation;
|
|
16
|
+
cleanup?: ((context: import("@politty/zod").CleanupContext<Record<string, never> & {
|
|
17
|
+
$source?: (name: string) => import("@politty/zod").ArgSource;
|
|
18
|
+
$invocation?: import("@politty/zod").RunInvocation;
|
|
19
19
|
}>) => void | Promise<void>) | undefined;
|
|
20
20
|
notes?: string | undefined;
|
|
21
|
-
examples?: import("politty").Example[] | undefined;
|
|
21
|
+
examples?: import("@politty/zod").Example[] | undefined;
|
|
22
22
|
runMainHook?: ((argv: readonly string[]) => void) | undefined;
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|