@tailor-platform/sdk 2.36.0 → 2.38.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 +132 -0
- package/dist/{application-DaJbleMi.mjs → application-Bz80INH4.mjs} +1 -1
- package/dist/application-CeqD1OK-.mjs +207 -0
- package/dist/application-CeqD1OK-.mjs.map +1 -0
- package/dist/cli/commands/deploy/deploy.d.mts +7 -1
- package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +3 -0
- package/dist/cli/commands/executor/jobs.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/config.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +10 -0
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +28 -2
- package/dist/cli/commands/tailordb/migrate/hints.d.mts +1 -0
- package/dist/cli/commands/tailordb/migrate/remote-state.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +3 -1
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +44 -6
- package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +8 -0
- package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -0
- package/dist/cli/commands/workspace/create.d.mts +1 -1
- package/dist/cli/lib.d.mts +3 -3
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +65 -58
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/args.d.mts +14 -5
- package/dist/cli/shared/client.d.mts +40 -3
- package/dist/cli/shared/error-json.d.mts +12 -26
- package/dist/cli/shared/function-execution.d.mts +2 -0
- package/dist/cli/shared/prompt.d.mts +9 -4
- package/dist/client-CHXix4LD.mjs +1 -0
- package/dist/client-DOQv-BP8.mjs +2 -0
- package/dist/client-DOQv-BP8.mjs.map +1 -0
- package/dist/completion/zsh-worker.zsh +151 -79
- package/dist/configure/config/index.d.mts +2 -0
- package/dist/configure/config/types.d.mts +2 -0
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/executor/operation.d.mts +5 -4
- package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
- package/dist/configure/services/index.d.mts +0 -1
- package/dist/configure/services/tailordb/schema.d.mts +1 -0
- package/dist/configure/services/tailordb/types.d.mts +12 -0
- package/dist/context-DSi5kfqr.mjs +23 -0
- package/dist/context-DSi5kfqr.mjs.map +1 -0
- package/dist/context-OOASEQLA.mjs +1 -0
- package/dist/{crashreport-DGU6lwiX.mjs → crashreport-CQTAlnbA.mjs} +4 -4
- package/dist/{crashreport-DGU6lwiX.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
- package/dist/crashreport-GRnWyDnF.mjs +1 -0
- package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
- package/dist/{errors-BXmGBX-7.mjs → errors-9OOL3xOM.mjs} +6 -5
- package/dist/errors-9OOL3xOM.mjs.map +1 -0
- package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
- package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
- package/dist/{kysely-type-B0ri1-Xs.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
- package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
- package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -3
- package/dist/plugin/get-generated-table.d.mts +4 -0
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +55 -3
- package/dist/plugin/with-context.d.mts +16 -0
- package/dist/register-ts-hook-CXYYYgCl.mjs +1094 -0
- package/dist/register-ts-hook-CXYYYgCl.mjs.map +1 -0
- package/dist/repl-editor-Bposemei.mjs +2 -0
- package/dist/repl-editor-Bposemei.mjs.map +1 -0
- package/dist/resource_pb-elY668ZB.mjs +2 -0
- package/dist/resource_pb-elY668ZB.mjs.map +1 -0
- package/dist/schema-BU1aIQ63.mjs.map +1 -1
- package/dist/{secret-file-BxZ-J_Nz.mjs → secret-file-CSXzcg4c.mjs} +2 -2
- package/dist/{secret-file-BxZ-J_Nz.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
- package/dist/{service-CaGmqg0r.mjs → service-B2vx6CGM.mjs} +2 -2
- package/dist/{service-CaGmqg0r.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
- package/dist/service-DB-RHn25.mjs +9 -0
- package/dist/service-DB-RHn25.mjs.map +1 -0
- package/dist/service-DsAWXbVX.mjs +1 -0
- package/dist/service_pb-Bethc2NW.mjs +1 -0
- package/dist/service_pb-CfpSriCy.mjs +2 -0
- package/dist/service_pb-CfpSriCy.mjs.map +1 -0
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +3 -3
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +92 -0
- package/dist/tailor-proto/src/tailor/v1/notification_pb.d.mts +176 -0
- package/dist/tailor-proto/src/tailor/v1/notification_resource_pb.d.mts +172 -0
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +78 -0
- package/dist/types/app-config.generated.d.mts +1 -1
- package/dist/types/auth-connection.generated.d.mts +2 -2
- package/dist/types/auth.generated.d.mts +13 -13
- package/dist/types/executor.generated.d.mts +25 -25
- package/dist/types/field.generated.d.mts +2 -2
- package/dist/types/http-adapter.generated.d.mts +4 -4
- package/dist/types/idp.generated.d.mts +272 -272
- package/dist/types/resolver.generated.d.mts +10 -10
- package/dist/types/tailordb.generated.d.mts +84 -80
- package/dist/types/workflow.generated.d.mts +2 -2
- package/dist/validation-errors-DqCeUW4L.mjs +3 -0
- package/dist/validation-errors-DqCeUW4L.mjs.map +1 -0
- package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
- package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
- package/dist/vendor/graphql/language/ast.d.mts +784 -0
- package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
- package/dist/vendor/graphql/language/source.d.mts +46 -0
- package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
- package/dist/vitest/date-representation.d.mts +2 -0
- package/dist/vitest/environment.d.mts +1 -0
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/migration-steps.d.mts +13 -2
- package/dist/vitest/mock-kysely.d.mts +12 -2
- package/dist/vitest/mocks/aigateway.d.mts +7 -1
- package/dist/vitest/mocks/authconnection.d.mts +7 -1
- package/dist/vitest/mocks/file.d.mts +8 -2
- package/dist/vitest/mocks/iconv.d.mts +7 -1
- package/dist/vitest/mocks/idp.d.mts +7 -1
- package/dist/vitest/mocks/logger.d.mts +7 -1
- package/dist/vitest/mocks/secretmanager.d.mts +7 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +12 -2
- package/dist/vitest/mocks/tailordb.d.mts +22 -4
- package/dist/vitest/mocks/workflow.d.mts +2 -1
- package/dist/vitest/pglite-kysely.d.mts +18 -2
- package/dist/vitest/pglite-temporal.d.mts +5 -1
- package/dist/vitest/workflow-local.d.mts +7 -0
- package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
- package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
- package/docs/cli/application.md +63 -29
- package/docs/cli/executor.md +2 -0
- package/docs/cli/function.md +3 -1
- package/docs/cli/notification.md +128 -0
- package/docs/cli/tailordb.md +45 -68
- package/docs/cli/workflow.md +2 -0
- package/docs/cli/workspace.md +20 -18
- package/docs/cli-reference.md +231 -50
- package/docs/configuration.md +2 -2
- package/docs/data-clone.md +1 -1
- package/docs/github-actions.md +266 -41
- package/docs/plugin/custom.md +4 -4
- package/docs/runtime.md +1 -1
- package/docs/services/auth.md +2 -0
- package/docs/services/idp.md +2 -0
- package/docs/services/tailordb/index.md +13 -4
- package/docs/services/tailordb/migration.md +109 -71
- package/docs/services/workflow.md +1 -1
- package/docs/testing.md +9 -10
- package/package.json +23 -19
- package/dist/application-BbORWCj-.mjs +0 -207
- package/dist/application-BbORWCj-.mjs.map +0 -1
- package/dist/configure/services/http-adapter/index.d.mts +0 -2
- package/dist/crashreport-WsYAWARW.mjs +0 -1
- package/dist/errors-BXmGBX-7.mjs.map +0 -1
- package/dist/kysely-type-B0ri1-Xs.mjs.map +0 -1
- package/dist/register-ts-hook-iAcG1dfz.mjs +0 -1057
- package/dist/register-ts-hook-iAcG1dfz.mjs.map +0 -1
- package/dist/repl-editor-DkrCZmmg.mjs +0 -2
- package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
- package/dist/service-DTrVVaDJ.mjs +0 -1
- package/dist/service-hIarp2Gl.mjs +0 -8
- package/dist/service-hIarp2Gl.mjs.map +0 -1
- package/dist/service_pb-6EkMfdOb.mjs +0 -2
- package/dist/service_pb-6EkMfdOb.mjs.map +0 -1
- package/dist/service_pb-CsJKokDl.mjs +0 -1
- package/dist/workspace_resource_pb-C4CkoYww.mjs +0 -2
- package/dist/workspace_resource_pb-C4CkoYww.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "../../shared/args.mjs";
|
|
1
2
|
import { BundledScripts } from "./function-registry-types.mjs";
|
|
2
3
|
import { HttpAdapterBundleResult } from "../../services/http-adapter/bundler.mjs";
|
|
3
4
|
import "../../shared/client.mjs";
|
|
@@ -13,8 +14,13 @@ export interface DeployOptions {
|
|
|
13
14
|
configPath?: string;
|
|
14
15
|
dryRun?: boolean;
|
|
15
16
|
yes?: boolean;
|
|
17
|
+
/** **Beta:** This API may change in future releases. */
|
|
16
18
|
noSchemaCheck?: boolean;
|
|
17
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Steps of an in-progress multi-step migration to skip, keyed by namespace.
|
|
21
|
+
*
|
|
22
|
+
* **Beta:** This API may change in future releases.
|
|
23
|
+
*/
|
|
18
24
|
migrationSkipSteps?: ReadonlyMap<string, readonly string[]>;
|
|
19
25
|
noValidate?: boolean;
|
|
20
26
|
noCache?: boolean;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import "../../../shared/client.mjs";
|
|
2
2
|
import "../../../shared/config-loader.mjs";
|
|
3
3
|
import "../../tailordb/migrate/snapshot.mjs";
|
|
4
|
+
import "../../../shared/errors.mjs";
|
|
4
5
|
import "../../tailordb/migrate/config.mjs";
|
|
6
|
+
import "../../tailordb/migrate/hints.mjs";
|
|
7
|
+
import "../../tailordb/migrate/remote-state.mjs";
|
|
5
8
|
import "../../tailordb/migrate/schema-checks.mjs";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Order } from "../../shared/args.mjs";
|
|
2
2
|
import "../../shared/errors.mjs";
|
|
3
|
+
import { FunctionLogEntryInfo } from "../../shared/function-execution.mjs";
|
|
3
4
|
import { ExecutorJobAttemptInfo, ExecutorJobInfo, ExecutorJobListInfo } from "./transform.mjs";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
type ExecutorLike = {
|
|
@@ -36,6 +37,7 @@ export interface ExecutorJobDetailInfo extends ExecutorJobInfo {
|
|
|
36
37
|
interface WorkflowJobLog {
|
|
37
38
|
jobName: string;
|
|
38
39
|
logs?: string;
|
|
40
|
+
logEntries?: FunctionLogEntryInfo[];
|
|
39
41
|
result?: string;
|
|
40
42
|
}
|
|
41
43
|
export interface WatchExecutorJobResult {
|
|
@@ -51,6 +53,7 @@ export interface WatchExecutorJobResult {
|
|
|
51
53
|
functionExecutionId?: string;
|
|
52
54
|
functionStatus?: string;
|
|
53
55
|
functionLogs?: string;
|
|
56
|
+
functionLogEntries?: FunctionLogEntryInfo[];
|
|
54
57
|
}
|
|
55
58
|
/**
|
|
56
59
|
* List executor jobs for a given executor.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EffectiveDateDefault } from "../../../../runtime/types.mjs";
|
|
2
|
+
/** **Beta:** This API may change in future releases. */
|
|
2
3
|
export interface MigrationBundleResult {
|
|
3
4
|
namespace: string;
|
|
4
5
|
migrationNumber: number;
|
|
@@ -7,6 +8,8 @@ export interface MigrationBundleResult {
|
|
|
7
8
|
/**
|
|
8
9
|
* Bundle a single migration script
|
|
9
10
|
*
|
|
11
|
+
* **Beta:** This API may change in future releases.
|
|
12
|
+
*
|
|
10
13
|
* Creates an entry that:
|
|
11
14
|
* 1. Imports the migration script's main function
|
|
12
15
|
* 2. Defines getDB() function inline
|
|
@@ -2,6 +2,8 @@ import { AppConfig } from "../../../../configure/config/types.mjs";
|
|
|
2
2
|
import "../../../shared/errors.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Namespace with migrations configuration
|
|
5
|
+
*
|
|
6
|
+
* **Beta:** This API may change in future releases.
|
|
5
7
|
*/
|
|
6
8
|
export interface NamespaceWithMigrations {
|
|
7
9
|
namespace: string;
|
|
@@ -9,6 +11,8 @@ export interface NamespaceWithMigrations {
|
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Get namespaces that have migrations configured
|
|
14
|
+
*
|
|
15
|
+
* **Beta:** This API may change in future releases.
|
|
12
16
|
* @param {AppConfig} config - Application configuration
|
|
13
17
|
* @param {string} configDir - Configuration directory path
|
|
14
18
|
* @returns {NamespaceWithMigrations[]} Array of namespaces with migrations configured
|
|
@@ -213,6 +213,8 @@ export type DiffChange = TableAddedChange | TableRemovedChange | TableRenamedCha
|
|
|
213
213
|
/**
|
|
214
214
|
* Migration diff - changes between two schema versions
|
|
215
215
|
* Stored as XXXX/diff.json (e.g., 0001/diff.json)
|
|
216
|
+
*
|
|
217
|
+
* **Beta:** This API may change in future releases.
|
|
216
218
|
*/
|
|
217
219
|
export interface MigrationDiff {
|
|
218
220
|
/** Format version for future compatibility */
|
|
@@ -256,6 +258,8 @@ export interface ScriptSkippedInfo {
|
|
|
256
258
|
}
|
|
257
259
|
/**
|
|
258
260
|
* Breaking change information in migration diff
|
|
261
|
+
*
|
|
262
|
+
* **Beta:** This API may change in future releases.
|
|
259
263
|
*/
|
|
260
264
|
export interface BreakingChangeInfo {
|
|
261
265
|
tableName: string;
|
|
@@ -282,18 +286,24 @@ export interface WarningChangeInfo {
|
|
|
282
286
|
}
|
|
283
287
|
/**
|
|
284
288
|
* Check if a migration diff has any changes
|
|
289
|
+
*
|
|
290
|
+
* **Beta:** This API may change in future releases.
|
|
285
291
|
* @param {MigrationDiff} diff - Migration diff to check
|
|
286
292
|
* @returns {boolean} True if diff has changes
|
|
287
293
|
*/
|
|
288
294
|
export declare function hasChanges(diff: MigrationDiff): boolean;
|
|
289
295
|
/**
|
|
290
296
|
* Format a migration diff for display
|
|
297
|
+
*
|
|
298
|
+
* **Beta:** This API may change in future releases.
|
|
291
299
|
* @param {MigrationDiff} diff - Migration diff to format
|
|
292
300
|
* @returns {string} Formatted diff string
|
|
293
301
|
*/
|
|
294
302
|
export declare function formatMigrationDiff(diff: MigrationDiff): string;
|
|
295
303
|
/**
|
|
296
304
|
* Format a summary of the migration diff
|
|
305
|
+
*
|
|
306
|
+
* **Beta:** This API may change in future releases.
|
|
297
307
|
* @param {MigrationDiff} diff - Migration diff to summarize
|
|
298
308
|
* @returns {string} Formatted summary string
|
|
299
309
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
/** **Beta:** This API may change in future releases. */
|
|
2
3
|
export interface GenerateOptions {
|
|
3
4
|
configPath?: string;
|
|
4
5
|
name?: string;
|
|
@@ -18,9 +19,34 @@ export interface GenerateOptions {
|
|
|
18
19
|
/** `--expand-contract Table.field` values approving a field type conversion. */
|
|
19
20
|
expandContracts?: string[];
|
|
20
21
|
}
|
|
22
|
+
/** A migration this run wrote; paths are null for files it did not write. */
|
|
23
|
+
type GeneratedMigration = {
|
|
24
|
+
namespace: string;
|
|
25
|
+
migrationNumber: number;
|
|
26
|
+
schemaPath: string | null;
|
|
27
|
+
diffPath: string | null;
|
|
28
|
+
migratePath: string | null;
|
|
29
|
+
dbTypesPath: string | null;
|
|
30
|
+
pgliteSchemaPath: string | null;
|
|
31
|
+
pgliteSchemaError: string | null;
|
|
32
|
+
};
|
|
33
|
+
/** **Beta:** The outcome of generating TailorDB migrations. */
|
|
34
|
+
export type GenerateResult = {
|
|
35
|
+
changed: boolean;
|
|
36
|
+
/** Namespaces whose migration directory --init deleted */
|
|
37
|
+
clearedNamespaces: string[];
|
|
38
|
+
/** Namespaces whose breaking changes the user declined to generate */
|
|
39
|
+
skippedNamespaces: string[];
|
|
40
|
+
migrations: GeneratedMigration[];
|
|
41
|
+
};
|
|
21
42
|
/**
|
|
22
43
|
* Generate migration files for TailorDB schema changes
|
|
44
|
+
*
|
|
45
|
+
* **Beta:** This API may change in future releases.
|
|
46
|
+
* Declining a breaking-change confirmation skips that namespace and resolves successfully.
|
|
47
|
+
* Declining the `--init` confirmation rejects with `MIGRATION_GENERATE_CANCELLED`.
|
|
23
48
|
* @param {GenerateOptions} options - Generation options
|
|
24
|
-
* @returns {Promise<
|
|
49
|
+
* @returns {Promise<GenerateResult>} The migrations written, the directories cleared, and the namespaces skipped
|
|
25
50
|
*/
|
|
26
|
-
export declare function generate(options: GenerateOptions): Promise<
|
|
51
|
+
export declare function generate(options: GenerateOptions): Promise<GenerateResult>;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../../../shared/args.mjs";
|
|
@@ -26,6 +26,8 @@ export interface CompareSnapshotsOptions {
|
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Compare two normalized snapshots and generate a diff
|
|
29
|
+
*
|
|
30
|
+
* **Beta:** This API may change in future releases.
|
|
29
31
|
* @param {NormalizedSchemaSnapshot} previous - Previous normalized snapshot
|
|
30
32
|
* @param {NormalizedSchemaSnapshot} current - Current normalized snapshot
|
|
31
33
|
* @param {CompareSnapshotsOptions} [options] - Comparison options
|
|
@@ -38,6 +40,8 @@ export declare function compareSnapshots(previous: NormalizedSchemaSnapshot, cur
|
|
|
38
40
|
* `createSnapshotType`. As a safety net, both sides are re-run through idempotent
|
|
39
41
|
* normalization here, so a caller that forgets will still get correct
|
|
40
42
|
* comparisons (no silent false drift).
|
|
43
|
+
*
|
|
44
|
+
* **Beta:** This API may change in future releases.
|
|
41
45
|
* @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
|
|
42
46
|
* @param {Record<string, TailorDBSnapshotType>} localTypes - Local snapshot-shaped tables
|
|
43
47
|
* @param {string} namespace - Namespace for comparison
|
|
@@ -1,22 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Initial schema migration number (0000)
|
|
3
|
+
*
|
|
4
|
+
* **Beta:** This API may change in future releases.
|
|
3
5
|
*/
|
|
4
6
|
export declare const INITIAL_SCHEMA_NUMBER = 0;
|
|
5
7
|
/**
|
|
6
8
|
* Migration file names (used within migration directories)
|
|
9
|
+
*
|
|
10
|
+
* **Beta:** This API may change in future releases.
|
|
7
11
|
*/
|
|
8
12
|
export declare const SCHEMA_FILE_NAME = "schema.json";
|
|
9
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* File name for migration diff metadata.
|
|
15
|
+
*
|
|
16
|
+
* **Beta:** This API may change in future releases.
|
|
17
|
+
*/
|
|
10
18
|
export declare const DIFF_FILE_NAME = "diff.json";
|
|
11
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* File name for migration script.
|
|
21
|
+
*
|
|
22
|
+
* **Beta:** This API may change in future releases.
|
|
23
|
+
*/
|
|
12
24
|
export declare const MIGRATE_FILE_NAME = "migrate.ts";
|
|
13
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* File name for migration script unit test.
|
|
27
|
+
*
|
|
28
|
+
* **Beta:** This API may change in future releases.
|
|
29
|
+
*/
|
|
14
30
|
export declare const MIGRATE_TEST_FILE_NAME = "migrate.test.ts";
|
|
15
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* File name for generated DB type definitions.
|
|
33
|
+
*
|
|
34
|
+
* **Beta:** This API may change in future releases.
|
|
35
|
+
*/
|
|
16
36
|
export declare const DB_TYPES_FILE_NAME = "db.ts";
|
|
17
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* File name for the generated PGlite schema script module.
|
|
39
|
+
*
|
|
40
|
+
* **Beta:** This API may change in future releases.
|
|
41
|
+
*/
|
|
18
42
|
export declare const DB_PGLITE_SCHEMA_FILE_NAME = "db.pglite.ts";
|
|
19
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* File name for the migration script PGlite test.
|
|
45
|
+
*
|
|
46
|
+
* **Beta:** This API may change in future releases.
|
|
47
|
+
*/
|
|
20
48
|
export declare const MIGRATE_PGLITE_TEST_FILE_NAME = "migrate.pglite.test.ts";
|
|
21
49
|
/**
|
|
22
50
|
* Migration file type
|
|
@@ -24,6 +52,8 @@ export declare const MIGRATE_PGLITE_TEST_FILE_NAME = "migrate.pglite.test.ts";
|
|
|
24
52
|
export type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db" | "pgliteSchema" | "pgliteTest";
|
|
25
53
|
/**
|
|
26
54
|
* Get migration directory path for a given number
|
|
55
|
+
*
|
|
56
|
+
* **Beta:** This API may change in future releases.
|
|
27
57
|
* @param {string} migrationsDir - Base migrations directory path
|
|
28
58
|
* @param {number} num - Migration number
|
|
29
59
|
* @returns {string} Full directory path for the migration
|
|
@@ -31,6 +61,8 @@ export type MigrationFileType = "schema" | "diff" | "migrate" | "test" | "db" |
|
|
|
31
61
|
export declare function getMigrationDirPath(migrationsDir: string, num: number): string;
|
|
32
62
|
/**
|
|
33
63
|
* Get migration file path for a given number and type
|
|
64
|
+
*
|
|
65
|
+
* **Beta:** This API may change in future releases.
|
|
34
66
|
* @param {string} migrationsDir - Migrations directory path
|
|
35
67
|
* @param {number} num - Migration number
|
|
36
68
|
* @param {MigrationFileType} type - File type
|
|
@@ -39,6 +71,8 @@ export declare function getMigrationDirPath(migrationsDir: string, num: number):
|
|
|
39
71
|
export declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
|
|
40
72
|
/**
|
|
41
73
|
* Get all migration directories and their files, sorted by number
|
|
74
|
+
*
|
|
75
|
+
* **Beta:** This API may change in future releases.
|
|
42
76
|
* @param {string} migrationsDir - Migrations directory path
|
|
43
77
|
* @returns {Array<{number: number, type: "schema" | "diff", path: string}>} Migration files sorted by number
|
|
44
78
|
*/
|
|
@@ -50,6 +84,8 @@ export declare function getMigrationFiles(migrationsDir: string): {
|
|
|
50
84
|
/**
|
|
51
85
|
* Get the next migration number for a directory
|
|
52
86
|
* Returns INITIAL_SCHEMA_NUMBER (0) if no migrations exist
|
|
87
|
+
*
|
|
88
|
+
* **Beta:** This API may change in future releases.
|
|
53
89
|
* @param {string} migrationsDir - Migrations directory path
|
|
54
90
|
* @returns {number} Next migration number
|
|
55
91
|
*/
|
|
@@ -57,6 +93,8 @@ export declare function getNextMigrationNumber(migrationsDir: string): number;
|
|
|
57
93
|
/**
|
|
58
94
|
* Get the latest migration number from a directory
|
|
59
95
|
* Returns 0 if no migrations exist
|
|
96
|
+
*
|
|
97
|
+
* **Beta:** This API may change in future releases.
|
|
60
98
|
* @param {string} migrationsDir - Migrations directory path
|
|
61
99
|
* @returns {number} Latest migration number or 0 if no migrations exist
|
|
62
100
|
*/
|
|
@@ -2,6 +2,8 @@ import { TailorDBType } from "../../../../parser/service/tailordb/types.mjs";
|
|
|
2
2
|
import { NormalizedSchemaSnapshot } from "./snapshot-types.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Create a schema snapshot from local table definitions
|
|
5
|
+
*
|
|
6
|
+
* **Beta:** This API may change in future releases.
|
|
5
7
|
* @param {Record<string, TailorDBType>} types - Local table definitions
|
|
6
8
|
* @param {string} namespace - Namespace for the snapshot
|
|
7
9
|
* @returns {NormalizedSchemaSnapshot} Normalized schema snapshot
|
|
@@ -2,6 +2,8 @@ import { NormalizedSchemaSnapshot } from "./snapshot-types.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* Reconstruct the latest schema snapshot from all migration files
|
|
4
4
|
* Returns null if no migrations exist
|
|
5
|
+
*
|
|
6
|
+
* **Beta:** This API may change in future releases.
|
|
5
7
|
* @param {string} migrationsDir - Migrations directory path
|
|
6
8
|
* @param {number} [maxVersion] - Optional maximum migration version to apply
|
|
7
9
|
* @returns {NormalizedSchemaSnapshot | null} Reconstructed normalized snapshot or null if no migrations exist
|
|
@@ -39,6 +39,8 @@ export interface SnapshotEnumValue {
|
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Field configuration in schema snapshot
|
|
42
|
+
*
|
|
43
|
+
* **Beta:** This API may change in future releases.
|
|
42
44
|
*/
|
|
43
45
|
export interface SnapshotFieldConfig {
|
|
44
46
|
type: string;
|
|
@@ -153,6 +155,8 @@ export type SnapshotGqlPermission = readonly SnapshotGqlPermissionPolicy[];
|
|
|
153
155
|
* `pluralForm` is always materialized — either set by the SDK user, derived
|
|
154
156
|
* via inflection at snapshot construction, or backfilled when loading legacy
|
|
155
157
|
* snapshots in `loadSnapshot`.
|
|
158
|
+
*
|
|
159
|
+
* **Beta:** This API may change in future releases.
|
|
156
160
|
*/
|
|
157
161
|
export interface TailorDBSnapshotType {
|
|
158
162
|
name: string;
|
|
@@ -194,6 +198,8 @@ export interface RebaselineMarker {
|
|
|
194
198
|
* Schema snapshot - full schema state at a point in time.
|
|
195
199
|
* Stored as XXXX/schema.json. Defined here (leaf module) so that
|
|
196
200
|
* snapshot-schema.ts can reference it without importing snapshot.ts.
|
|
201
|
+
*
|
|
202
|
+
* **Beta:** This API may change in future releases.
|
|
197
203
|
*/
|
|
198
204
|
export interface SchemaSnapshot {
|
|
199
205
|
/** Format version for future compatibility */
|
|
@@ -207,6 +213,8 @@ declare const normalizedSchemaSnapshotBrand: unique symbol;
|
|
|
207
213
|
/**
|
|
208
214
|
* Schema snapshot normalized to a canonical form for consistent comparison.
|
|
209
215
|
*
|
|
216
|
+
* **Beta:** This API may change in future releases.
|
|
217
|
+
*
|
|
210
218
|
* Returned by snapshot creation and loading functions so drift detection stays
|
|
211
219
|
* stable when local definitions omit defaults that the platform materializes.
|
|
212
220
|
*/
|
|
@@ -14,7 +14,7 @@ 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
|
+
ttl: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodString>>;
|
|
18
18
|
profile: z.ZodOptional<z.ZodString>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
20
|
export type CreateWorkspaceOptions = z.input<typeof createWorkspaceOptionsSchema>;
|
package/dist/cli/lib.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LogMode, LogOptions, OutOptions, logger, styles } from "./shared/logger.mjs";
|
|
2
|
-
import { CommonArgsType, configArg, confirmationArgs, createCommonArgs, deploymentArgs, loadEnvFiles, workspaceArgs } from "./shared/args.mjs";
|
|
2
|
+
import { CommonArgsType, configArg, confirmationArgs, createCommonArgs, deploymentArgs, loadEnvFiles, loadEnvFilesFromArgv, workspaceArgs } from "./shared/args.mjs";
|
|
3
3
|
import { defineAppCommand } from "./shared/command.mjs";
|
|
4
4
|
import { logBetaWarning } from "./shared/beta.mjs";
|
|
5
5
|
import { prompt } from "./shared/prompt.mjs";
|
|
@@ -91,7 +91,7 @@ import { ApiCallOptions, ApiCallResult, apiCall } from "./commands/api/api-call.
|
|
|
91
91
|
import "./commands/api/index.mjs";
|
|
92
92
|
import { query } from "./query/index.mjs";
|
|
93
93
|
import { TruncateOptions, truncate } from "./commands/tailordb/truncate.mjs";
|
|
94
|
-
import { GenerateOptions as GenerateOptions$1, generate as generate$1 } from "./commands/tailordb/migrate/generate.mjs";
|
|
94
|
+
import { GenerateOptions as GenerateOptions$1, GenerateResult, generate as generate$1 } from "./commands/tailordb/migrate/generate.mjs";
|
|
95
95
|
import { SeedNamespaceConfig } from "../plugin/builtin/seed/seed-type-processor.mjs";
|
|
96
96
|
import { LoadSeedContextOptions, SeedContext, SeedIdpUserContext, loadSeedContext } from "./shared/seed-context.mjs";
|
|
97
97
|
import { ChunkSeedDataOptions, SeedChunk, SeedData, chunkSeedData } from "./shared/seed-chunker.mjs";
|
|
@@ -100,4 +100,4 @@ import { MigrationBundleResult, bundleMigrationScript } from "./commands/tailord
|
|
|
100
100
|
import { ExecutionWaitResult, ScriptExecutionOptions, ScriptExecutionResult, ScriptInvoker, executeScript, waitForExecution } from "./shared/script-executor.mjs";
|
|
101
101
|
import { arg, defineCommand, runCommand, runMain } from "@politty/zod";
|
|
102
102
|
import { MachineUserName } from "@tailor-platform/sdk";
|
|
103
|
-
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 ErrorSourceLocation, 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 ResolveAppIdParams, 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 ShowOAuth2ClientInfo, type ShowOptions, type ShowStaticWebsiteInfo, 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, WORKSPACE_NAME_MAX_LENGTH, 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, appIdLockKey, 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, resolveAppId, restoreWorkspace, resumeWorkflow, runCommand, runMain, serializeError, show, startWorkflow, styles, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, waitWorkflowExecution, watchExecutorJob, withSourceLocation, workspaceArgs, workspaceNameSchema };
|
|
103
|
+
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 ErrorSourceLocation, 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 GenerateResult as MigrateGenerateResult, 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 ResolveAppIdParams, 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 ShowOAuth2ClientInfo, type ShowOptions, type ShowStaticWebsiteInfo, 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, WORKSPACE_NAME_MAX_LENGTH, 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, appIdLockKey, 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, loadEnvFilesFromArgv, loadSeedContext, loadTailorDBNamespaces, loadWorkspaceId, logBetaWarning, logger, generate$1 as migrateGenerate, organizationTree, parseAppIds, planAppIds, prompt, query, reconstructSnapshotFromMigrations, remove, removeAdoptedConfigIds, removeUser, resolveAppId, restoreWorkspace, resumeWorkflow, runCommand, runMain, serializeError, show, startWorkflow, styles, triggerExecutor, truncate, updateFolder, updateOrganization, updateUser, waitForExecution, waitWorkflowExecution, watchExecutorJob, withSourceLocation, workspaceArgs, workspaceNameSchema };
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as ee,p as te}from"../errors-9OOL3xOM.mjs";import{F as e,H as t,M as n,N as r,P as i,U as a,a as o,m as s,st as c}from"../context-DSi5kfqr.mjs";import{$ as l,A as u,Ai as d,An as f,At as p,B as m,Bt as h,C as g,Ct as _,Dn as v,E as y,En as b,Et as x,Ft as S,Gi as C,Gr as w,Gt as T,Hi as E,Ht as D,In as O,Jr as k,Jt as A,L as j,Lt as M,Mn as N,Mt as P,N as F,Nn as I,Nt as L,O as R,Oi as z,On as B,Ot as V,Pn as H,Qt as U,R as W,Rr as G,Si as K,Sn as q,St as J,Tn as Y,U as X,Ui as Z,Ut as Q,W as ne,Wi as re,Xt as ie,Y as ae,Yt as oe,Z as se,Zt as ce,_ as le,ai as ue,at as $,bt as de,d as fe,di as pe,dr as me,ei as he,fi as ge,gt as _e,h as ve,hi as ye,ht as be,i as xe,ii as Se,j as Ce,jn as we,ki as Te,kn as Ee,kt as De,l as Oe,li as ke,lt as Ae,mi as je,mt as Me,n as Ne,ni as Pe,oi as Fe,on as Ie,p as Le,pi as Re,pt as ze,q as Be,qt as Ve,r as He,ri as Ue,rn as We,rt as Ge,s as Ke,st as qe,t as Je,ti as Ye,tt as Xe,ut as Ze,vi as Qe,vt as $e,x as et,xi as tt,xn as nt,y as rt,zi as it,zt as at}from"../register-ts-hook-CXYYYgCl.mjs";import{E as ot}from"../client-DOQv-BP8.mjs";import{t as st}from"../type-source--ZNcV8RJ.mjs";import{arg as ct,defineCommand as lt,runCommand as ut,runMain as dt}from"@politty/zod";await Je(new URL(`./ts-hook.mjs`,import.meta.url));export{he as DB_PGLITE_SCHEMA_FILE_NAME,Ye as DB_TYPES_FILE_NAME,Pe as DIFF_FILE_NAME,Ue as INITIAL_SCHEMA_NUMBER,Se as MIGRATE_FILE_NAME,ue as MIGRATE_PGLITE_TEST_FILE_NAME,Fe as MIGRATE_TEST_FILE_NAME,Qe as MIGRATION_LABEL_KEY,ke as SCHEMA_FILE_NAME,Y as TAILOR_LOCK_FILENAME,b as TAILOR_LOCK_VERSION,nt as WORKSPACE_NAME_MAX_LENGTH,Ne as annotateTerminalError,E as apiCall,v as appIdLockKey,U as apply,U as deploy,ct as arg,Z as assertWritable,me as bundleMigrationScript,ie as bundleSeedDumpScript,ce as bundleSeedScript,Ve as chunkSeedData,tt as compareLocalTypesWithSnapshot,K as compareSnapshots,n as configArg,r as confirmationArgs,i as createCommonArgs,$ as createFolder,w as createSnapshotFromLocalTypes,Ie as createWorkspace,C as defineAppCommand,lt as defineCommand,Ge as deleteFolder,rt as deleteWorkspace,O as deployStaticWebsite,e as deploymentArgs,I as ensureConfigId,be as errorToJson,A as executeScript,$e as extractOwnedNamespaces,B as findAppIdLock,z as formatDiffSummary,Te as formatMigrationDiff,Me as generate,H as generateUserTypes,g as getAppHealth,D as getExecutor,De as getExecutorJob,p as getExecutorWaitFailureMessage,Xe as getFolder,J as getFunctionRegistry,pe as getLatestMigrationNumber,Ze as getMachineUserToken,ge as getMigrationDirPath,Re as getMigrationFilePath,je as getMigrationFiles,G as getNamespacesWithMigrations,ye as getNextMigrationNumber,Ae as getOAuth2Client,ae as getOrganization,M as getWorkflow,at as getWorkflowExecution,le as getWorkspace,d as hasChanges,ot as initOperatorClient,Le as inviteUser,st as isPluginGeneratedTable,et as listApps,P as listExecutorJobs,V as listExecutors,l as listFolders,de as listFunctionRegistries,ze as listMachineUsers,qe as listOAuth2Clients,Be as listOrganizations,fe as listUsers,_ as listWebhookExecutors,h as listWorkflowExecutions,u as listWorkflows,We as listWorkspaces,o as loadAccessToken,re as loadConfig,t as loadEnvFiles,a as loadEnvFilesFromArgv,Q as loadSeedContext,T as loadTailorDBNamespaces,s as loadWorkspaceId,j as logBetaWarning,te as logger,F as migrateGenerate,ne as organizationTree,Ee as parseAppIds,f as planAppIds,it as prompt,xe as query,k as reconstructSnapshotFromMigrations,m as remove,we as removeAdoptedConfigIds,Oe as removeUser,N as resolveAppId,ve as restoreWorkspace,R as resumeWorkflow,ut as runCommand,dt as runMain,_e as serializeError,W as show,S as startWorkflow,ee as styles,x as triggerExecutor,Ce as truncate,se as updateFolder,X as updateOrganization,Ke as updateUser,oe as waitForExecution,y as waitWorkflowExecution,L as watchExecutorJob,He as withSourceLocation,c as workspaceArgs,q as workspaceNameSchema};
|
|
2
2
|
//# sourceMappingURL=lib.mjs.map
|
package/dist/cli/lib.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.mjs","names":["styles","logger","listFolders","createCommonArgs","MIGRATION_LABEL_KEY","deploy","listWorkflows","planAppIds","getExecutorWaitFailureMessage","remove","MIGRATE_PGLITE_TEST_FILE_NAME","listWorkflowExecutions","getAppHealth","assertWritable","listWebhookExecutors","appIdLockKey","waitWorkflowExecution","TAILOR_LOCK_VERSION","triggerExecutor","DB_PGLITE_SCHEMA_FILE_NAME","startWorkflow","loadTailorDBNamespaces","getExecutor","loadWorkspaceId","deployStaticWebsite","DB_TYPES_FILE_NAME","defineAppCommand","getMigrationFilePath","chunkSeedData","getLatestMigrationNumber","logBetaWarning","DIFF_FILE_NAME","getWorkflow","resolveAppId","listExecutorJobs","ensureConfigId","watchExecutorJob","resumeWorkflow","findAppIdLock","listExecutors","generateUserTypes","reconstructSnapshotFromMigrations","confirmationArgs","bundleSeedScript","show","INITIAL_SCHEMA_NUMBER","apiCall","workspaceNameSchema","getFunctionRegistry","TAILOR_LOCK_FILENAME","updateOrganization","loadSeedContext","MIGRATE_TEST_FILE_NAME","organizationTree","SCHEMA_FILE_NAME","getNextMigrationNumber","waitForExecution","getOrganization","getMigrationFiles","executeScript","updateFolder","configArg","bundleSeedDumpScript","getWorkspace","createFolder","listFunctionRegistries","formatDiffSummary","listUsers","deploymentArgs","bundleMigrationScript","serializeError","restoreWorkspace","errorToJson","query","loadEnvFiles","listWorkspaces","truncate","removeAdoptedConfigIds","createSnapshotFromLocalTypes","loadAccessToken","parseAppIds","getExecutorJob","removeUser","formatMigrationDiff","getOAuth2Client","workspaceArgs","generate","annotateTerminalError","compareLocalTypesWithSnapshot","inviteUser","listMachineUsers","listOrganizations","getMigrationDirPath","withSourceLocation","compareSnapshots","deleteFolder","updateUser","createWorkspace","listOAuth2Clients","registerTsHook","getFolder","hasChanges","getMachineUserToken","extractOwnedNamespaces","loadConfig","getNamespacesWithMigrations","listApps","WORKSPACE_NAME_MAX_LENGTH","deleteWorkspace","prompt","MIGRATE_FILE_NAME","getWorkflowExecution","initOperatorClient","isPluginGeneratedTable","arg","defineCommand","generate$1","runCommand","runMain"],"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 { WORKSPACE_NAME_MAX_LENGTH, workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n type ShowStaticWebsiteInfo,\n type ShowOAuth2ClientInfo,\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":"A,6qCAGA,MAAMmG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC,E"}
|
|
1
|
+
{"version":3,"file":"lib.mjs","names":["styles","logger","deploymentArgs","loadEnvFiles","configArg","confirmationArgs","createCommonArgs","loadEnvFilesFromArgv","loadAccessToken","loadWorkspaceId","workspaceArgs","listFolders","listWorkflows","hasChanges","planAppIds","getExecutorWaitFailureMessage","remove","listWorkflowExecutions","getAppHealth","listWebhookExecutors","appIdLockKey","waitWorkflowExecution","TAILOR_LOCK_VERSION","triggerExecutor","startWorkflow","defineAppCommand","createSnapshotFromLocalTypes","loadTailorDBNamespaces","apiCall","getExecutor","deployStaticWebsite","reconstructSnapshotFromMigrations","executeScript","logBetaWarning","getWorkflow","resolveAppId","listExecutorJobs","generate$1","ensureConfigId","watchExecutorJob","resumeWorkflow","formatDiffSummary","findAppIdLock","listExecutors","generateUserTypes","deploy","show","getNamespacesWithMigrations","compareSnapshots","workspaceNameSchema","getFunctionRegistry","TAILOR_LOCK_FILENAME","updateOrganization","assertWritable","loadSeedContext","organizationTree","loadConfig","bundleSeedDumpScript","getOrganization","waitForExecution","updateFolder","bundleSeedScript","getWorkspace","MIGRATE_PGLITE_TEST_FILE_NAME","createFolder","listFunctionRegistries","listUsers","getLatestMigrationNumber","bundleMigrationScript","DB_PGLITE_SCHEMA_FILE_NAME","getMigrationDirPath","serializeError","restoreWorkspace","getNextMigrationNumber","errorToJson","query","MIGRATE_FILE_NAME","truncate","removeAdoptedConfigIds","formatMigrationDiff","parseAppIds","getExecutorJob","removeUser","SCHEMA_FILE_NAME","getOAuth2Client","getMigrationFiles","generate","annotateTerminalError","DIFF_FILE_NAME","MIGRATE_TEST_FILE_NAME","createWorkspace","inviteUser","getMigrationFilePath","listMachineUsers","listOrganizations","chunkSeedData","withSourceLocation","INITIAL_SCHEMA_NUMBER","listWorkspaces","deleteFolder","updateUser","listOAuth2Clients","registerTsHook","DB_TYPES_FILE_NAME","getFolder","getMachineUserToken","MIGRATION_LABEL_KEY","extractOwnedNamespaces","listApps","compareLocalTypesWithSnapshot","WORKSPACE_NAME_MAX_LENGTH","deleteWorkspace","prompt","getWorkflowExecution","initOperatorClient","isPluginGeneratedTable","arg","defineCommand","runCommand","runMain"],"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 { WORKSPACE_NAME_MAX_LENGTH, workspaceNameSchema } from \"./shared/workspace-name\";\nexport {\n createCommonArgs,\n workspaceArgs,\n configArg,\n confirmationArgs,\n deploymentArgs,\n loadEnvFiles,\n loadEnvFilesFromArgv,\n type CommonArgsType,\n} from \"./shared/args\";\nexport { deploy, deploy as apply } from \"./commands/deploy/deploy\";\nexport type { DeployOptions, DeployOptions as ApplyOptions } from \"./commands/deploy/deploy\";\nexport type { BundledScripts } from \"./commands/deploy/function-registry\";\nexport { ensureConfigId } from \"./commands/deploy/config-id-injector\";\nexport {\n TAILOR_LOCK_FILENAME,\n TAILOR_LOCK_VERSION,\n appIdLockKey,\n findAppIdLock,\n parseAppIds,\n planAppIds,\n removeAdoptedConfigIds,\n resolveAppId,\n type AppIdEntry,\n type AppIdEntryInput,\n type AppIdLock,\n type AppIdPlan,\n type AppIdPlanMode,\n type AppIds,\n type PlanAppIdsParams,\n type RemoveAdoptedConfigIdsResult,\n type ResolveAppIdParams,\n} from \"./commands/deploy/app-id-lock\";\nexport { generate } from \"./commands/generate/service\";\nexport type { GenerateOptions } from \"./commands/generate/options\";\nexport { loadConfig, type LoadedConfig } from \"./shared/config-loader\";\nexport { extractOwnedNamespaces } from \"./shared/config\";\nexport { errorToJson, serializeError, type ErrorToJsonOptions } from \"./shared/error-json\";\nexport { annotateTerminalError, withSourceLocation } from \"./shared/github-actions\";\nexport type { ErrorSourceLocation } from \"./shared/error-diagnostics\";\nexport { generateUserTypes } from \"./shared/type-generator\";\nexport {\n loadTailorDBNamespaces,\n type TailorDBNamespaceSelector,\n type LoadTailorDBNamespacesOptions,\n type LoadedTailorDBNamespaces,\n} from \"./shared/tailordb-namespaces\";\nexport {\n deployStaticWebsite,\n type DeployResult as StaticWebsiteDeployResult,\n} from \"./commands/staticwebsite/deploy\";\nexport { assertWritable } from \"./shared/readonly-guard\";\nexport { isPluginGeneratedTable } from \"#/parser/service/tailordb/type-source\";\nexport type {\n GeneratorResult,\n Plugin,\n PluginAttachment,\n TailorDBNamespaceData,\n} from \"#/plugin/types\";\nexport type {\n TailorDBType,\n TypeSourceInfoEntry,\n ParsedField,\n OperatorFieldConfig,\n PluginGeneratedTableSource,\n} from \"#/parser/service/tailordb/types\";\nexport type { Resolver } from \"#/types/resolver.generated\";\nexport type { Executor } from \"#/types/executor.generated\";\n\nexport {\n show,\n type ShowOptions,\n type ApplicationInfo,\n type ShowInfo,\n type AIGatewayInfo,\n type ShowStaticWebsiteInfo,\n type ShowOAuth2ClientInfo,\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 type GenerateResult as MigrateGenerateResult,\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":"A,ktCAGA,MAAMsG,GAAe,IAAI,IAAI,gBAAiB,YAAY,GAAG,CAAC,E"}
|