@tailor-platform/sdk 2.3.0 → 2.4.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 +68 -0
- package/README.md +1 -1
- package/dist/{application-F-nl107y.mjs → application-C8a0UJ-z.mjs} +201 -149
- package/dist/application-C8a0UJ-z.mjs.map +1 -0
- package/dist/application-D4zOiLLa.mjs +3 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +4 -4
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +3 -3
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +5 -5
- package/dist/cli/commands/tailordb/truncate.d.mts +2 -2
- package/dist/cli/lib.mjs +2 -2
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +174 -106
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/ts-hook.mjs +3 -1
- package/dist/completion/zsh-worker.zsh +19 -11
- package/dist/configure/config/index.d.mts +1 -1
- package/dist/configure/index.d.mts +2 -1
- package/dist/configure/index.mjs +2 -2
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/aigateway/index.d.mts +5 -4
- package/dist/configure/services/aigateway/types.d.mts +6 -1
- package/dist/configure/services/auth/types.d.mts +2 -2
- package/dist/configure/services/tailordb/permission.d.mts +1 -1
- package/dist/configure/services/tailordb/schema.d.mts +1 -1
- package/dist/configure/services/tailordb/types.d.mts +7 -4
- package/dist/configure/types/auth-namespace-name.d.mts +18 -0
- package/dist/{crashreport-CINZ5dVN.mjs → crashreport-Cd4TqfZq.mjs} +1 -1
- package/dist/{crashreport-CIIfLnoO.mjs → crashreport-Q0pDAlrj.mjs} +8 -4
- package/dist/{crashreport-CIIfLnoO.mjs.map → crashreport-Q0pDAlrj.mjs.map} +1 -1
- package/dist/{errors-BVb6vYGy.mjs → errors-Bxut5_Sy.mjs} +2 -2
- package/dist/{errors-BVb6vYGy.mjs.map → errors-Bxut5_Sy.mjs.map} +1 -1
- package/dist/file-BUcmVIH2.mjs.map +1 -1
- package/dist/kysely/index.mjs +2 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{logger-DSdExfor.mjs → logger-D0bEznPv.mjs} +9 -5
- package/dist/{logger-DSdExfor.mjs.map → logger-D0bEznPv.mjs.map} +1 -1
- package/dist/package-json-8b0O9TlX.mjs.map +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +5 -5
- package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +14 -11
- package/dist/plugin/builtin/file-utils/index.mjs.map +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +9 -9
- package/dist/plugin/builtin/kysely-type/index.mjs.map +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -4
- package/dist/plugin/get-generated-type.d.mts +4 -4
- package/dist/plugin/index.mjs +13 -13
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +2 -2
- package/dist/plugin/with-context.d.mts +1 -1
- package/dist/{register-ts-hook-ClI226n2.mjs → register-ts-hook-Vqjza10T.mjs} +552 -416
- package/dist/register-ts-hook-Vqjza10T.mjs.map +1 -0
- package/dist/{repl-editor-BCozyiNq.mjs → repl-editor-F9LotMNx.mjs} +3 -2
- package/dist/{repl-editor-BCozyiNq.mjs.map → repl-editor-F9LotMNx.mjs.map} +1 -1
- package/dist/runtime/file.d.mts +14 -14
- package/dist/{schema--xYWRGfe.mjs → schema-D4TC4BC3.mjs} +4 -3
- package/dist/schema-D4TC4BC3.mjs.map +1 -0
- package/dist/seed/index.d.mts +4 -4
- package/dist/seed/index.mjs +3 -3
- package/dist/seed/index.mjs.map +1 -1
- package/dist/{seed-xqM9WIHP.mjs → seed-Cibjmtry.mjs} +46 -40
- package/dist/seed-Cibjmtry.mjs.map +1 -0
- package/dist/{service-C_WpbKHu.mjs → service-2grcAOCJ.mjs} +24 -24
- package/dist/service-2grcAOCJ.mjs.map +1 -0
- package/dist/service-CaBPNDIZ.mjs +3 -0
- package/dist/{service-hZskxZmg.mjs → service-LTfp03ZZ.mjs} +7 -5
- package/dist/{service-hZskxZmg.mjs.map → service-LTfp03ZZ.mjs.map} +1 -1
- package/dist/types/aigateway.generated.d.mts +2 -2
- package/dist/types/auth.generated.d.mts +3 -3
- package/dist/types/executor.generated.d.mts +1 -1
- package/dist/types/tailordb.generated.d.mts +12 -12
- package/dist/utils/test/index.d.mts +4 -4
- package/dist/utils/test/index.mjs +4 -4
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/index.mjs +13 -7
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/docs/cli/application.md +3 -1
- package/docs/cli/function.md +17 -13
- package/docs/cli/tailordb.md +30 -30
- package/docs/cli/workspace.md +2 -2
- package/docs/cli-reference.md +21 -21
- package/docs/configuration.md +2 -2
- package/docs/migration/v2.md +4 -4
- package/docs/migration/v3.md +41 -0
- package/docs/quickstart.md +1 -1
- package/docs/services/aigateway.md +33 -9
- package/docs/services/executor.md +5 -1
- package/docs/services/tailordb-migration.md +47 -47
- package/docs/services/tailordb.md +7 -7
- package/docs/testing.md +1 -1
- package/package.json +6 -6
- package/dist/application-BZfk4HKm.mjs +0 -3
- package/dist/application-F-nl107y.mjs.map +0 -1
- package/dist/register-ts-hook-ClI226n2.mjs.map +0 -1
- package/dist/schema--xYWRGfe.mjs.map +0 -1
- package/dist/seed-xqM9WIHP.mjs.map +0 -1
- package/dist/service-C_WpbKHu.mjs.map +0 -1
- package/dist/service-D1RCdzIL.mjs +0 -3
|
@@ -8,7 +8,7 @@ interface DiffChangeBase {
|
|
|
8
8
|
reason?: string;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Table-level settings patch carried by legacy `type_modified` changes.
|
|
12
12
|
* Current SDK versions no longer produce this kind, but persisted
|
|
13
13
|
* diff.json files written by older versions may still contain it.
|
|
14
14
|
*/
|
|
@@ -16,7 +16,7 @@ interface TypeSettingsPatch {
|
|
|
16
16
|
indexes?: Record<string, SnapshotIndexConfig>;
|
|
17
17
|
files?: Record<string, string>;
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
19
|
+
/** Table-level settings and metadata state used by current diffs. */
|
|
20
20
|
interface SnapshotTypeSettingsState {
|
|
21
21
|
description?: string;
|
|
22
22
|
pluralForm: string;
|
|
@@ -169,7 +169,7 @@ interface RelationshipModifiedChange extends DiffChangeBase {
|
|
|
169
169
|
after: SnapshotRelationship;
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
|
-
*
|
|
172
|
+
* Table-level permissions were modified. `before`/`after` are optional for
|
|
173
173
|
* robustness against hand-edited or legacy diff.json files; consumers guard
|
|
174
174
|
* on their presence.
|
|
175
175
|
*/
|
|
@@ -178,7 +178,7 @@ interface PermissionModifiedChange extends DiffChangeBase {
|
|
|
178
178
|
before?: SnapshotPermissionState;
|
|
179
179
|
after?: SnapshotPermissionState;
|
|
180
180
|
}
|
|
181
|
-
/**
|
|
181
|
+
/** Table-level hook/validate script state for diff tracking. */
|
|
182
182
|
interface TypeScriptsState {
|
|
183
183
|
typeHookExpr?: {
|
|
184
184
|
create?: string;
|
|
@@ -5,11 +5,11 @@ interface GenerateOptions {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
yes?: boolean;
|
|
7
7
|
init?: boolean;
|
|
8
|
-
/** `--rename
|
|
8
|
+
/** `--rename Table.oldField:newField` / `--rename OldTable:NewTable` values confirming renames non-interactively. */
|
|
9
9
|
renames?: string[];
|
|
10
|
-
/** `--drop
|
|
10
|
+
/** `--drop Table.field` / `--drop Table` values confirming removals non-interactively. */
|
|
11
11
|
drops?: string[];
|
|
12
|
-
/** `--expand-contract
|
|
12
|
+
/** `--expand-contract Table.field` values approving a field type conversion. */
|
|
13
13
|
expandContracts?: string[];
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
@@ -40,8 +40,8 @@ declare function getMigrationDirPath(migrationsDir: string, num: number): string
|
|
|
40
40
|
*/
|
|
41
41
|
declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
|
|
42
42
|
/**
|
|
43
|
-
* Create a schema snapshot from local
|
|
44
|
-
* @param {Record<string, TailorDBType>} types - Local
|
|
43
|
+
* Create a schema snapshot from local table definitions
|
|
44
|
+
* @param {Record<string, TailorDBType>} types - Local table definitions
|
|
45
45
|
* @param {string} namespace - Namespace for the snapshot
|
|
46
46
|
* @returns {NormalizedSchemaSnapshot} Normalized schema snapshot
|
|
47
47
|
*/
|
|
@@ -89,7 +89,7 @@ interface CompareSnapshotsOptions {
|
|
|
89
89
|
*/
|
|
90
90
|
fieldRenames?: readonly FieldRenameSpec[];
|
|
91
91
|
/**
|
|
92
|
-
* Confirmed
|
|
92
|
+
* Confirmed table renames. Each spec replaces the corresponding
|
|
93
93
|
* `table_removed` + `table_added` pair with a single breaking
|
|
94
94
|
* `table_renamed` change. Specs are validated against both snapshots.
|
|
95
95
|
*/
|
|
@@ -104,13 +104,13 @@ interface CompareSnapshotsOptions {
|
|
|
104
104
|
*/
|
|
105
105
|
declare function compareSnapshots(previous: NormalizedSchemaSnapshot, current: NormalizedSchemaSnapshot, options?: CompareSnapshotsOptions): MigrationDiff;
|
|
106
106
|
/**
|
|
107
|
-
* Compare a snapshot against canonical TailorDBSnapshotType-shaped local
|
|
107
|
+
* Compare a snapshot against canonical TailorDBSnapshotType-shaped local tables.
|
|
108
108
|
* Callers are expected to pre-convert TailorDBService.types to TailorDBSnapshotType via
|
|
109
109
|
* `createSnapshotType`. As a safety net, both sides are re-run through idempotent
|
|
110
110
|
* normalization here, so a caller that forgets will still get correct
|
|
111
111
|
* comparisons (no silent false drift).
|
|
112
112
|
* @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
|
|
113
|
-
* @param {Record<string, TailorDBSnapshotType>} localTypes - Local snapshot-shaped
|
|
113
|
+
* @param {Record<string, TailorDBSnapshotType>} localTypes - Local snapshot-shaped tables
|
|
114
114
|
* @param {string} namespace - Namespace for comparison
|
|
115
115
|
* @returns {MigrationDiff} Migration diff
|
|
116
116
|
*/
|
|
@@ -6,11 +6,11 @@ interface TruncateOptions {
|
|
|
6
6
|
configPath?: string;
|
|
7
7
|
all?: boolean;
|
|
8
8
|
namespace?: string;
|
|
9
|
-
|
|
9
|
+
tables?: string[];
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Truncate TailorDB data based on the given options.
|
|
13
|
-
* @param options - Truncate options (all, namespace, or
|
|
13
|
+
* @param options - Truncate options (all, namespace, or tables)
|
|
14
14
|
* @returns Promise that resolves when truncation completes
|
|
15
15
|
*/
|
|
16
16
|
declare function truncate(options?: TruncateOptions): Promise<void>;
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as listWorkspaces, A as truncate, At as triggerExecutor, Bn as getLatestMigrationNumber, D as resumeWorkflow, Dn as INITIAL_SCHEMA_NUMBER, Dt as listWebhookExecutors, En as DIFF_FILE_NAME, Et as getFunctionRegistry, F as chunkSeedData, Hn as getMigrationFilePath, I as bundleSeedScript, In as compareLocalTypesWithSnapshot, It as listExecutorJobs, J as remove, Jn as reconstructSnapshotFromMigrations, Jt as deploy, L as generate$1, Ln as compareSnapshots, Lt as watchExecutorJob, M as loadSeedContext, Mn as SCHEMA_FILE_NAME, Mt as listExecutors, Nt as getExecutorJob, On as MIGRATE_FILE_NAME, Or as loadWorkspaceId, P as loadTailorDBNamespaces, Pt as getExecutorWaitFailureMessage, Q as organizationTree, Rn as createSnapshotFromLocalTypes, S as getAppHealth, Sr as loadAccessToken, St as generate, T as waitWorkflowExecution, Tn as DB_TYPES_FILE_NAME, U as deployStaticWebsite, Un as getMigrationFiles, Ut as getWorkflowExecution, Vn as getMigrationDirPath, Vt as getWorkflow, W as show, Wn as getNextMigrationNumber, Wt as listWorkflowExecutions, Xn as MIGRATION_LABEL_KEY, Z as updateOrganization, _ as getWorkspace, _r as loadConfig, _t as getOAuth2Client, at as updateFolder, b as listApps, cn as executeScript, d as listUsers, dn as bundleMigrationScript, dr as generateUserTypes, dt as deleteFolder, er as formatDiffSummary, gr as assertWritable, h as restoreWorkspace, hr as apiCall, ht as listOAuth2Clients, i as query, k as listWorkflows, kn as MIGRATE_TEST_FILE_NAME, l as removeUser, ln as waitForExecution, lt as getFolder, n as errorToJson, nn as createWorkspace, nr as hasChanges, p as inviteUser, pt as createFolder, qt as getExecutor, r as serializeError, rr as getNamespacesWithMigrations, rt as getOrganization, s as updateUser, st as listFolders, t as registerTsHook, tr as formatMigrationDiff, tt as listOrganizations, vt as getMachineUserToken, wt as listFunctionRegistries, xt as listMachineUsers, y as deleteWorkspace, zt as startWorkflow } from "../register-ts-hook-
|
|
2
|
-
import {
|
|
1
|
+
import { $t as listWorkspaces, A as truncate, At as triggerExecutor, Bn as getLatestMigrationNumber, D as resumeWorkflow, Dn as INITIAL_SCHEMA_NUMBER, Dt as listWebhookExecutors, En as DIFF_FILE_NAME, Et as getFunctionRegistry, F as chunkSeedData, Hn as getMigrationFilePath, I as bundleSeedScript, In as compareLocalTypesWithSnapshot, It as listExecutorJobs, J as remove, Jn as reconstructSnapshotFromMigrations, Jt as deploy, L as generate$1, Ln as compareSnapshots, Lt as watchExecutorJob, M as loadSeedContext, Mn as SCHEMA_FILE_NAME, Mt as listExecutors, Nt as getExecutorJob, On as MIGRATE_FILE_NAME, Or as loadWorkspaceId, P as loadTailorDBNamespaces, Pt as getExecutorWaitFailureMessage, Q as organizationTree, Rn as createSnapshotFromLocalTypes, S as getAppHealth, Sr as loadAccessToken, St as generate, T as waitWorkflowExecution, Tn as DB_TYPES_FILE_NAME, U as deployStaticWebsite, Un as getMigrationFiles, Ut as getWorkflowExecution, Vn as getMigrationDirPath, Vt as getWorkflow, W as show, Wn as getNextMigrationNumber, Wt as listWorkflowExecutions, Xn as MIGRATION_LABEL_KEY, Z as updateOrganization, _ as getWorkspace, _r as loadConfig, _t as getOAuth2Client, at as updateFolder, b as listApps, cn as executeScript, d as listUsers, dn as bundleMigrationScript, dr as generateUserTypes, dt as deleteFolder, er as formatDiffSummary, gr as assertWritable, h as restoreWorkspace, hr as apiCall, ht as listOAuth2Clients, i as query, k as listWorkflows, kn as MIGRATE_TEST_FILE_NAME, l as removeUser, ln as waitForExecution, lt as getFolder, n as errorToJson, nn as createWorkspace, nr as hasChanges, p as inviteUser, pt as createFolder, qt as getExecutor, r as serializeError, rr as getNamespacesWithMigrations, rt as getOrganization, s as updateUser, st as listFolders, t as registerTsHook, tr as formatMigrationDiff, tt as listOrganizations, vt as getMachineUserToken, wt as listFunctionRegistries, xt as listMachineUsers, y as deleteWorkspace, zt as startWorkflow } from "../register-ts-hook-Vqjza10T.mjs";
|
|
2
|
+
import { Y as initOperatorClient } from "../application-C8a0UJ-z.mjs";
|
|
3
3
|
import { t as isPluginGeneratedType } from "../type-source-DH_LH20p.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/cli/lib.ts
|
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\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 { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\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 { isPluginGeneratedType } 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 PluginGeneratedTypeSource,\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":";;;;;AAGA,MAAM,eAAe,IAAI,IAAI,iBAAiB,
|
|
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\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 { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\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 { isPluginGeneratedType } 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 PluginGeneratedTypeSource,\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":";;;;;AAGA,MAAM,eAAe,IAAI,IAAI,iBAAiB,YAAY,GAAG,CAAC"}
|