@tailor-platform/sdk 2.4.0 → 2.6.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 +131 -0
- package/bin/tailor.mjs +3 -2
- package/dist/aigateway-DsWDjzk4.mjs +2 -0
- package/dist/{aigateway-DR4Kwuik.mjs.map → aigateway-DsWDjzk4.mjs.map} +1 -1
- package/dist/application-CNeOcaLc.mjs +1 -0
- package/dist/application-CmXOqTaK.mjs +192 -0
- package/dist/application-CmXOqTaK.mjs.map +1 -0
- package/dist/assert-WeXvmG4j.mjs +2 -0
- package/dist/{assert-DBxo8jPo.mjs.map → assert-WeXvmG4j.mjs.map} +1 -1
- package/dist/authconnection-CynFBIv8.mjs +2 -0
- package/dist/{authconnection-CZvi9ANm.mjs.map → authconnection-CynFBIv8.mjs.map} +1 -1
- package/dist/brand-C8nMKhJC.mjs +2 -0
- package/dist/{brand-Eo4pLXPJ.mjs.map → brand-C8nMKhJC.mjs.map} +1 -1
- package/dist/cli/commands/api/index.d.mts +1 -1
- package/dist/cli/commands/deploy/deploy.d.mts +2 -2
- package/dist/cli/commands/deploy/deployment-target.d.mts +2 -0
- package/dist/cli/commands/deploy/event-subscriptions.d.mts +3 -0
- package/dist/cli/commands/deploy/tailordb/apply.d.mts +3 -0
- package/dist/cli/commands/deploy/tailordb/index.d.mts +3 -10
- package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +5 -0
- package/dist/cli/commands/deploy/tailordb/plan.d.mts +8 -0
- package/dist/cli/commands/executor/jobs.d.mts +1 -1
- package/dist/cli/commands/executor/trigger.d.mts +1 -1
- package/dist/cli/commands/generate/seed/bundler.d.mts +2 -2
- package/dist/cli/commands/show.d.mts +1 -1
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +11 -11
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +1 -1
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +43 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +62 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +12 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +12 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-remote.d.mts +1 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +3 -1
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +5 -117
- package/dist/cli/commands/workflow/start.d.mts +1 -1
- package/dist/cli/commands/workspace/list.d.mts +1 -1
- package/dist/cli/lib.d.mts +12 -4
- package/dist/cli/lib.mjs +1 -9
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.d.mts +2 -0
- package/dist/cli/main.mjs +1170 -7754
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/args.d.mts +65 -1
- package/dist/cli/shared/command.d.mts +11 -0
- package/dist/cli/shared/context.d.mts +1 -1
- package/dist/cli/shared/logger.d.mts +64 -0
- package/dist/cli/shared/script-executor.d.mts +1 -1
- package/dist/cli/shared/seed-chunker.d.mts +5 -5
- package/dist/completion/zsh-worker.zsh +82 -9
- package/dist/configure/config/index.d.mts +1 -1
- package/dist/configure/config/types.d.mts +2 -2
- package/dist/configure/index.d.mts +48 -12
- package/dist/configure/index.mjs +1 -1267
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/auth/types.d.mts +1 -1
- package/dist/configure/services/idp/types.d.mts +1 -1
- package/dist/configure/services/tailordb/schema.d.mts +22 -8
- package/dist/configure/services/tailordb/types.d.mts +2 -2
- package/dist/configure/services/workflow/execution-policy.d.mts +3 -3
- package/dist/configure/services/workflow/job.d.mts +12 -2
- package/dist/configure/types/field.types.d.mts +1 -1
- package/dist/configure/types/permission-operand.types.d.mts +1 -1
- package/dist/context-D0QjfxzD.mjs +2 -0
- package/dist/{context-DYQVYWqZ.mjs.map → context-D0QjfxzD.mjs.map} +1 -1
- package/dist/crashreport-BN28xp5B.mjs +42 -0
- package/dist/{crashreport-Q0pDAlrj.mjs.map → crashreport-BN28xp5B.mjs.map} +1 -1
- package/dist/crashreport-By23O2k-.mjs +1 -0
- package/dist/errors-DLsQ_-ol.mjs +2 -0
- package/dist/errors-DLsQ_-ol.mjs.map +1 -0
- package/dist/es-builtins-n3wBv4Sv.mjs +2 -0
- package/dist/es-builtins-n3wBv4Sv.mjs.map +1 -0
- package/dist/file-COPYfju_.mjs +2 -0
- package/dist/file-COPYfju_.mjs.map +1 -0
- package/dist/globals-CMHSnj4w.mjs +2 -0
- package/dist/{globals-B2nlxBrz.mjs.map → globals-CMHSnj4w.mjs.map} +1 -1
- package/dist/iconv-DlFMt2gW.mjs +2 -0
- package/dist/{iconv-QWaZh0TT.mjs.map → iconv-DlFMt2gW.mjs.map} +1 -1
- package/dist/idp-G_ojPBB5.mjs +2 -0
- package/dist/{idp-RA_swu-h.mjs.map → idp-G_ojPBB5.mjs.map} +1 -1
- package/dist/interceptor-DQg3cR_9.mjs +2 -0
- package/dist/{interceptor-e33JtsC-.mjs.map → interceptor-DQg3cR_9.mjs.map} +1 -1
- package/dist/kysely/index.mjs +1 -32
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/kysely-type-BTi3BMtL.mjs +43 -0
- package/dist/kysely-type-BTi3BMtL.mjs.map +1 -0
- package/dist/logger-CCjs1DuH.mjs +9 -0
- package/dist/logger-CCjs1DuH.mjs.map +1 -0
- package/dist/logger-DP2BjQ93.mjs +2 -0
- package/dist/{logger-BtX0suGY.mjs.map → logger-DP2BjQ93.mjs.map} +1 -1
- package/dist/multiline-EyzjEwn9.mjs +3 -0
- package/dist/{multiline-sfHpTZZK.mjs.map → multiline-EyzjEwn9.mjs.map} +1 -1
- package/dist/node-builtins-oBl7EbyV.mjs +2 -0
- package/dist/{node-builtins-CmaL2Cbq.mjs.map → node-builtins-oBl7EbyV.mjs.map} +1 -1
- package/dist/package-json-C690ceex.mjs +2 -0
- package/dist/{package-json-8b0O9TlX.mjs.map → package-json-C690ceex.mjs.map} +1 -1
- package/dist/package-json-CmqhDJ__.mjs +1 -0
- package/dist/parser/service/tailordb/type-source.d.mts +5 -5
- package/dist/parser/service/tailordb/types.d.mts +4 -4
- package/dist/platform-serialize-DkiTdHOt.mjs +2 -0
- package/dist/{platform-serialize-RoRtBS0v.mjs.map → platform-serialize-DkiTdHOt.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +5 -114
- package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +22 -104
- package/dist/plugin/builtin/file-utils/index.mjs.map +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +8 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -275
- package/dist/plugin/builtin/seed/index.d.mts +5 -0
- package/dist/plugin/builtin/seed/index.mjs +1 -3
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +0 -2
- package/dist/plugin/{get-generated-type.d.mts → get-generated-table.d.mts} +5 -5
- package/dist/plugin/index.d.mts +3 -2
- package/dist/plugin/index.mjs +1 -251
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +30 -23
- package/dist/plugin/with-context.d.mts +3 -3
- package/dist/register-ts-hook-oDA2JLp2.mjs +640 -0
- package/dist/register-ts-hook-oDA2JLp2.mjs.map +1 -0
- package/dist/registry-HlEaGvl5.mjs +2 -0
- package/dist/{registry-BIGVUrMB.mjs.map → registry-HlEaGvl5.mjs.map} +1 -1
- package/dist/repl-editor-BG1aDOfH.mjs +2 -0
- package/dist/{repl-editor-F9LotMNx.mjs.map → repl-editor-BG1aDOfH.mjs.map} +1 -1
- package/dist/runtime/aigateway.mjs +1 -3
- package/dist/runtime/authconnection.mjs +1 -3
- package/dist/runtime/context.mjs +1 -3
- package/dist/runtime/file.d.mts +21 -21
- package/dist/runtime/file.mjs +1 -3
- package/dist/runtime/globals.mjs +1 -1
- package/dist/runtime/iconv.mjs +1 -3
- package/dist/runtime/idp.mjs +1 -3
- package/dist/runtime/index.mjs +1 -11
- package/dist/runtime/logger.mjs +1 -3
- package/dist/runtime/secretmanager.mjs +1 -3
- package/dist/runtime/types.d.mts +1 -1
- package/dist/runtime/workflow.mjs +1 -3
- package/dist/schema-AYG4OhXY.mjs +2 -0
- package/dist/schema-AYG4OhXY.mjs.map +1 -0
- package/dist/secret-file-C9wp_FCX.mjs +2 -0
- package/dist/{secret-file-C3J4Gy8r.mjs.map → secret-file-C9wp_FCX.mjs.map} +1 -1
- package/dist/secretmanager-5olfnI1b.mjs +2 -0
- package/dist/{secretmanager-IY4UvinW.mjs.map → secretmanager-5olfnI1b.mjs.map} +1 -1
- package/dist/secretmanager-vHQoXdQz.mjs +2 -0
- package/dist/{secretmanager-CYlpffsz.mjs.map → secretmanager-vHQoXdQz.mjs.map} +1 -1
- package/dist/seed/index.mjs +8 -244
- package/dist/seed/index.mjs.map +1 -1
- package/dist/seed-DwqRFdqP.mjs +207 -0
- package/dist/seed-DwqRFdqP.mjs.map +1 -0
- package/dist/service-CLPMoj9n.mjs +2 -0
- package/dist/{service-LTfp03ZZ.mjs.map → service-CLPMoj9n.mjs.map} +1 -1
- package/dist/service-D7iXk0BT.mjs +1 -0
- package/dist/service-YqDsHmlK.mjs +7 -0
- package/dist/service-YqDsHmlK.mjs.map +1 -0
- package/dist/service_pb-DGKCLuAs.mjs +2 -0
- package/dist/{service_pb-BEWj1pOV.mjs.map → service_pb-DGKCLuAs.mjs.map} +1 -1
- package/dist/service_pb-_aeFE-Nv.mjs +1 -0
- package/dist/shared/src/color.d.mts +5 -0
- package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +1 -1
- package/dist/telemetry-Bklv9kQY.mjs +2 -0
- package/dist/{telemetry-BRVdwh14.mjs.map → telemetry-Bklv9kQY.mjs.map} +1 -1
- package/dist/telemetry-DXHP3VVi.mjs +1 -0
- package/dist/type-source--ZNcV8RJ.mjs +2 -0
- package/dist/type-source--ZNcV8RJ.mjs.map +1 -0
- package/dist/types/executor.generated.d.mts +1 -1
- package/dist/user-agent-vdHYF3QL.mjs +2 -0
- package/dist/{user-agent-Bgsszb5I.mjs.map → user-agent-vdHYF3QL.mjs.map} +1 -1
- package/dist/utils/test/index.mjs +1 -109
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/environment.mjs +1 -41
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.mjs +1 -1986
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/file.d.mts +8 -8
- package/dist/vitest/setup.mjs +1 -140
- package/dist/vitest/setup.mjs.map +1 -1
- package/dist/wait-point-invoker-eiP-IIux.mjs +2 -0
- package/dist/wait-point-invoker-eiP-IIux.mjs.map +1 -0
- package/dist/wait-point-registry-B-ESkTZX.mjs +2 -0
- package/dist/wait-point-registry-B-ESkTZX.mjs.map +1 -0
- package/dist/workflow-Cs9ISw6j.mjs +2 -0
- package/dist/{workflow-Bamae_Yc.mjs.map → workflow-Cs9ISw6j.mjs.map} +1 -1
- package/dist/workspace_resource_pb--GeYQPXu.mjs +2 -0
- package/dist/{workspace_resource_pb-HNIL_Vfj.mjs.map → workspace_resource_pb--GeYQPXu.mjs.map} +1 -1
- package/docs/cli/function.md +66 -6
- package/docs/cli/setup.md +24 -14
- package/docs/cli/tailordb.md +2 -0
- package/docs/cli-reference.md +9 -8
- package/docs/github-actions.md +14 -12
- package/docs/migration/v2.md +18 -2
- package/docs/migration/v3.md +121 -0
- package/docs/plugin/custom.md +130 -85
- package/docs/plugin/index.md +3 -3
- package/docs/services/tailordb-migration.md +21 -7
- package/docs/services/tailordb.md +9 -7
- package/docs/services/workflow.md +10 -9
- package/package.json +14 -13
- package/postinstall.mjs +1 -1
- package/dist/aigateway-DR4Kwuik.mjs +0 -9
- package/dist/application-C8a0UJ-z.mjs +0 -6071
- package/dist/application-C8a0UJ-z.mjs.map +0 -1
- package/dist/application-D4zOiLLa.mjs +0 -3
- package/dist/assert-DBxo8jPo.mjs +0 -9
- package/dist/authconnection-CZvi9ANm.mjs +0 -9
- package/dist/brand-Eo4pLXPJ.mjs +0 -36
- package/dist/context-DYQVYWqZ.mjs +0 -23
- package/dist/crashreport-Cd4TqfZq.mjs +0 -3
- package/dist/crashreport-Q0pDAlrj.mjs +0 -427
- package/dist/errors-Bxut5_Sy.mjs +0 -89
- package/dist/errors-Bxut5_Sy.mjs.map +0 -1
- package/dist/file-BUcmVIH2.mjs +0 -58
- package/dist/file-BUcmVIH2.mjs.map +0 -1
- package/dist/globals-B2nlxBrz.mjs +0 -126
- package/dist/iconv-QWaZh0TT.mjs +0 -38
- package/dist/idp-RA_swu-h.mjs +0 -82
- package/dist/interceptor-e33JtsC-.mjs +0 -33
- package/dist/logger-BtX0suGY.mjs +0 -48
- package/dist/logger-D0bEznPv.mjs +0 -362
- package/dist/logger-D0bEznPv.mjs.map +0 -1
- package/dist/multiline-sfHpTZZK.mjs +0 -38
- package/dist/node-builtins-CmaL2Cbq.mjs +0 -36
- package/dist/package-json-8b0O9TlX.mjs +0 -17
- package/dist/package-json-Cv2Z-TqQ.mjs +0 -3
- package/dist/platform-serialize-RoRtBS0v.mjs +0 -46
- package/dist/plugin/builtin/kysely-type/index.mjs.map +0 -1
- package/dist/plugin/builtin/seed/types.d.mts +0 -2
- package/dist/register-ts-hook-Vqjza10T.mjs +0 -25679
- package/dist/register-ts-hook-Vqjza10T.mjs.map +0 -1
- package/dist/registry-BIGVUrMB.mjs +0 -54
- package/dist/repl-editor-F9LotMNx.mjs +0 -252
- package/dist/schema-D4TC4BC3.mjs +0 -640
- package/dist/schema-D4TC4BC3.mjs.map +0 -1
- package/dist/secret-file-C3J4Gy8r.mjs +0 -64
- package/dist/secretmanager-CYlpffsz.mjs +0 -13
- package/dist/secretmanager-IY4UvinW.mjs +0 -131
- package/dist/seed-Cibjmtry.mjs +0 -489
- package/dist/seed-Cibjmtry.mjs.map +0 -1
- package/dist/service-2grcAOCJ.mjs +0 -898
- package/dist/service-2grcAOCJ.mjs.map +0 -1
- package/dist/service-CaBPNDIZ.mjs +0 -3
- package/dist/service-LTfp03ZZ.mjs +0 -133
- package/dist/service_pb-BEWj1pOV.mjs +0 -167
- package/dist/service_pb-BjlhvK9E.mjs +0 -3
- package/dist/telemetry-BRVdwh14.mjs +0 -84
- package/dist/telemetry-CkbkeJxl.mjs +0 -3
- package/dist/type-source-DH_LH20p.mjs +0 -13
- package/dist/type-source-DH_LH20p.mjs.map +0 -1
- package/dist/user-agent-Bgsszb5I.mjs +0 -28
- package/dist/wait-point-invoker-__oE88_P.mjs +0 -148
- package/dist/wait-point-invoker-__oE88_P.mjs.map +0 -1
- package/dist/wait-point-registry-TL99zotw.mjs +0 -47
- package/dist/wait-point-registry-TL99zotw.mjs.map +0 -1
- package/dist/workflow-Bamae_Yc.mjs +0 -34
- package/dist/workspace_resource_pb-HNIL_Vfj.mjs +0 -860
|
@@ -9,5 +9,69 @@ declare const orderArg: z.ZodEnum<{
|
|
|
9
9
|
desc: "desc";
|
|
10
10
|
}>;
|
|
11
11
|
type Order = z.infer<typeof orderArg>;
|
|
12
|
+
type EnvFileArg = string | string[] | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Load env files from parsed arguments.
|
|
15
|
+
* Processes --env-file first, then --env-file-if-exists.
|
|
16
|
+
*
|
|
17
|
+
* Follows Node.js --env-file behavior:
|
|
18
|
+
* - Variables already set in the environment are NOT overwritten
|
|
19
|
+
* - Variables from later files override those from earlier files
|
|
20
|
+
* @param envFiles - Required env file path(s) that must exist
|
|
21
|
+
* @param envFilesIfExists - Optional env file path(s) that are loaded if they exist
|
|
22
|
+
*/
|
|
23
|
+
declare function loadEnvFiles(envFiles: EnvFileArg, envFilesIfExists: EnvFileArg): void;
|
|
24
|
+
interface CommonArgsOptions {
|
|
25
|
+
/** Extra short alias for `--verbose` (e.g. `"v"`), for plugins that need one */
|
|
26
|
+
verboseAlias?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build the common arguments for all CLI commands. CLI plugins call this so
|
|
30
|
+
* their forwarded global flags parse identically to the host Tailor CLI and
|
|
31
|
+
* feed the same logger state.
|
|
32
|
+
*
|
|
33
|
+
* NOTE: --env-file and --env-file-if-exists collide with Node.js flags due to a bug
|
|
34
|
+
* (https://github.com/nodejs/node/issues/54232). Node.js parses these even after the
|
|
35
|
+
* script path, causing warnings (twice due to tsx loader).
|
|
36
|
+
* @param options - Per-plugin adjustments to the shared arguments
|
|
37
|
+
* @returns Argument shape suitable for spreading into a command schema
|
|
38
|
+
*/
|
|
39
|
+
declare function createCommonArgs(options?: CommonArgsOptions): {
|
|
40
|
+
"env-file": z.ZodOptional<z.ZodString>;
|
|
41
|
+
"env-file-if-exists": z.ZodOptional<z.ZodString>;
|
|
42
|
+
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
43
|
+
json: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Common arguments for all CLI commands
|
|
47
|
+
*/
|
|
48
|
+
declare const commonArgs: {
|
|
49
|
+
"env-file": z.ZodOptional<z.ZodString>;
|
|
50
|
+
"env-file-if-exists": z.ZodOptional<z.ZodString>;
|
|
51
|
+
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
52
|
+
json: z.ZodDefault<z.ZodBoolean>;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Arguments for commands that require workspace context
|
|
56
|
+
*/
|
|
57
|
+
declare const workspaceArgs: {
|
|
58
|
+
"workspace-id": z.ZodOptional<z.ZodString>;
|
|
59
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Shared config arg for commands that accept a config file path
|
|
63
|
+
*/
|
|
64
|
+
declare const configArg: {
|
|
65
|
+
config: z.ZodDefault<z.ZodString>;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Arguments for commands that interact with deployed resources (includes config)
|
|
69
|
+
*/
|
|
70
|
+
declare const deploymentArgs: {
|
|
71
|
+
config: z.ZodDefault<z.ZodString>;
|
|
72
|
+
"workspace-id": z.ZodOptional<z.ZodString>;
|
|
73
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
74
|
+
};
|
|
75
|
+
type CommonArgsType = z.infer<z.ZodObject<typeof commonArgs>>;
|
|
12
76
|
//#endregion
|
|
13
|
-
export { Order, orderArg };
|
|
77
|
+
export { CommonArgsType, Order, commonArgs, configArg, createCommonArgs, deploymentArgs, loadEnvFiles, orderArg, workspaceArgs };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CommonArgsType } from "./args.mjs";
|
|
2
|
+
import { createDefineCommand } from "politty";
|
|
3
|
+
//#region src/cli/shared/command.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* defineCommand with global args type (CommonArgsType).
|
|
6
|
+
* Use this for leaf commands with `run` to get type-safe access to global args.
|
|
7
|
+
* Parent commands with only `subCommands` can use `defineCommand` from politty directly.
|
|
8
|
+
*/
|
|
9
|
+
declare const defineAppCommand: ReturnType<typeof createDefineCommand<CommonArgsType>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { defineAppCommand };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { StyleFn } from "../../shared/src/color.mjs";
|
|
2
|
+
//#region src/cli/shared/logger.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Semantic style functions for inline text styling
|
|
5
|
+
*/
|
|
6
|
+
declare const styles: {
|
|
7
|
+
success: StyleFn;
|
|
8
|
+
error: StyleFn;
|
|
9
|
+
warning: StyleFn;
|
|
10
|
+
info: StyleFn;
|
|
11
|
+
create: StyleFn;
|
|
12
|
+
update: StyleFn;
|
|
13
|
+
delete: StyleFn;
|
|
14
|
+
replace: StyleFn;
|
|
15
|
+
unchanged: StyleFn;
|
|
16
|
+
bold: StyleFn;
|
|
17
|
+
dim: StyleFn;
|
|
18
|
+
highlight: StyleFn;
|
|
19
|
+
successBright: StyleFn;
|
|
20
|
+
errorBright: StyleFn;
|
|
21
|
+
resourceType: StyleFn;
|
|
22
|
+
resourceName: StyleFn;
|
|
23
|
+
path: StyleFn;
|
|
24
|
+
value: StyleFn;
|
|
25
|
+
placeholder: (text: string) => string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Log output modes
|
|
29
|
+
*/
|
|
30
|
+
type LogMode = "default" | "stream" | "plain";
|
|
31
|
+
interface LogOptions {
|
|
32
|
+
/** Output mode (default: "default") */
|
|
33
|
+
mode?: LogMode;
|
|
34
|
+
/** Number of spaces to indent the entire line (default: 0) */
|
|
35
|
+
indent?: number;
|
|
36
|
+
}
|
|
37
|
+
/** Field transformer function. null excludes the field from table output. */
|
|
38
|
+
type FieldTransformer = ((value: unknown, item: object) => string) | null;
|
|
39
|
+
interface OutOptions {
|
|
40
|
+
/** Table display field transform/exclude settings. Only applied in table mode (not JSON). */
|
|
41
|
+
display?: Record<string, FieldTransformer>;
|
|
42
|
+
/** Show null values in table output (default: false) */
|
|
43
|
+
showNull?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The CLI logger. Diagnostics go to stderr; `out()` writes primary output to
|
|
47
|
+
* stdout as a table, or as JSON when `jsonMode` is on. `--json` and
|
|
48
|
+
* `--verbose` feed the `jsonMode` / `verbose` state, which CLI plugins share
|
|
49
|
+
* with the SDK code paths they call.
|
|
50
|
+
*/
|
|
51
|
+
declare const logger: {
|
|
52
|
+
jsonMode: boolean;
|
|
53
|
+
verbose: boolean;
|
|
54
|
+
info(message: string, opts?: LogOptions): void;
|
|
55
|
+
success(message: string, opts?: LogOptions): void;
|
|
56
|
+
warn(message: string, opts?: LogOptions): void;
|
|
57
|
+
error(message: string, opts?: LogOptions): void;
|
|
58
|
+
log(message: string): void;
|
|
59
|
+
newline(): void;
|
|
60
|
+
debug(message: string): void;
|
|
61
|
+
out(data: string | object | object[], options?: OutOptions): void;
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { FieldTransformer, LogMode, LogOptions, OutOptions, logger, styles };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AuthInvokerSchema } from "../../tailor-proto/src/tailor/v1/auth_resource_pb.mjs";
|
|
2
2
|
import { FunctionExecution_Status } from "../../tailor-proto/src/tailor/v1/function_resource_pb.mjs";
|
|
3
3
|
import { OperatorClient } from "./client.mjs";
|
|
4
|
-
import { Jsonifiable } from "type-fest";
|
|
5
4
|
import { MessageInitShape } from "@bufbuild/protobuf";
|
|
5
|
+
import { Jsonifiable } from "type-fest";
|
|
6
6
|
//#region src/cli/shared/script-executor.d.ts
|
|
7
7
|
/** Authentication context for script execution, provided as a plain object. */
|
|
8
8
|
type ScriptInvoker = MessageInitShape<typeof AuthInvokerSchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { JsonObject } from "type-fest";
|
|
2
2
|
//#region src/cli/shared/seed-chunker.d.ts
|
|
3
3
|
/**
|
|
4
|
-
* Seed data keyed by
|
|
4
|
+
* Seed data keyed by table name, with an array of records per table.
|
|
5
5
|
*/
|
|
6
6
|
type SeedData = Record<string, JsonObject[]>;
|
|
7
7
|
/**
|
|
@@ -32,10 +32,10 @@ type ChunkSeedDataOptions = {
|
|
|
32
32
|
* Algorithm:
|
|
33
33
|
* 1. Calculate the available budget for the arg field (maxMessageSize - codeByteSize - overhead)
|
|
34
34
|
* 2. If all data fits in one message, return a single chunk
|
|
35
|
-
* 3. Otherwise, iterate through
|
|
36
|
-
* - If a
|
|
37
|
-
* - If adding a
|
|
38
|
-
* - If a single
|
|
35
|
+
* 3. Otherwise, iterate through tables in dependency order:
|
|
36
|
+
* - If a table fits in the current chunk, add it
|
|
37
|
+
* - If adding a table would exceed the budget, finalize the current chunk and start a new one
|
|
38
|
+
* - If a single table exceeds the budget, split its records across multiple chunks
|
|
39
39
|
* - If a single record exceeds the budget, throw an error
|
|
40
40
|
* @param options - Chunking options
|
|
41
41
|
* @returns Array of seed chunks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# politty-completion-version: 1
|
|
2
|
-
# politty-bin-sig:
|
|
2
|
+
# politty-bin-sig: 1787619934
|
|
3
3
|
# politty-bin-path: /home/runner/work/sdk/sdk/node_modules/.bin/tailor
|
|
4
4
|
# program: tailor
|
|
5
5
|
# shell: zsh
|
|
@@ -602,6 +602,10 @@ __tailor_worker_opt_takes_value() {
|
|
|
602
602
|
function:test-run:--arg|function:test-run:-a|function:test-run:--a) return 0 ;;
|
|
603
603
|
function:test-run:--machine-user|function:test-run:--machineUser|function:test-run:-m|function:test-run:--m) return 0 ;;
|
|
604
604
|
function:test-run:--config|function:test-run:-c|function:test-run:--c) return 0 ;;
|
|
605
|
+
function:script:--workspace-id|function:script:--workspaceId|function:script:-w|function:script:--w) return 0 ;;
|
|
606
|
+
function:script:--profile|function:script:-p|function:script:--p) return 0 ;;
|
|
607
|
+
function:script:--config|function:script:-c|function:script:--c) return 0 ;;
|
|
608
|
+
function:script:--namespace) return 0 ;;
|
|
605
609
|
generate:--config|generate:-c|generate:--c) return 0 ;;
|
|
606
610
|
init:--template|init:-t|init:--t) return 0 ;;
|
|
607
611
|
login:--profile|login:-p|login:--p) return 0 ;;
|
|
@@ -702,7 +706,7 @@ __tailor_worker_opt_takes_value() {
|
|
|
702
706
|
secret:delete:--vault-name|secret:delete:--vaultName|secret:delete:-V|secret:delete:--V) return 0 ;;
|
|
703
707
|
secret:delete:--name|secret:delete:-n|secret:delete:--n) return 0 ;;
|
|
704
708
|
setup:branch:--name|setup:branch:-n|setup:branch:--n) return 0 ;;
|
|
705
|
-
setup:branch:--
|
|
709
|
+
setup:branch:--target) return 0 ;;
|
|
706
710
|
setup:branch:--environment) return 0 ;;
|
|
707
711
|
setup:branch:--dir|setup:branch:-d|setup:branch:--d) return 0 ;;
|
|
708
712
|
setup:tag:--name|setup:tag:-n|setup:tag:--n) return 0 ;;
|
|
@@ -722,6 +726,7 @@ __tailor_worker_opt_takes_value() {
|
|
|
722
726
|
setup:coordinate:--action) return 0 ;;
|
|
723
727
|
setup:coordinate:--branch) return 0 ;;
|
|
724
728
|
setup:coordinate:--environment) return 0 ;;
|
|
729
|
+
setup:deps:--provider) return 0 ;;
|
|
725
730
|
show:--workspace-id|show:--workspaceId|show:-w|show:--w) return 0 ;;
|
|
726
731
|
show:--profile|show:-p|show:--p) return 0 ;;
|
|
727
732
|
show:--config|show:-c|show:--c) return 0 ;;
|
|
@@ -745,6 +750,7 @@ __tailor_worker_opt_takes_value() {
|
|
|
745
750
|
tailordb:truncate:--namespace|tailordb:truncate:-n|tailordb:truncate:--n) return 0 ;;
|
|
746
751
|
tailordb:migration:generate:--config|tailordb:migration:generate:-c|tailordb:migration:generate:--c) return 0 ;;
|
|
747
752
|
tailordb:migration:generate:--name|tailordb:migration:generate:-n|tailordb:migration:generate:--n) return 0 ;;
|
|
753
|
+
tailordb:migration:generate:--namespace) return 0 ;;
|
|
748
754
|
tailordb:migration:generate:--rename) return 0 ;;
|
|
749
755
|
tailordb:migration:generate:--drop) return 0 ;;
|
|
750
756
|
tailordb:migration:generate:--expand-contract|tailordb:migration:generate:--expandContract) return 0 ;;
|
|
@@ -909,6 +915,7 @@ __tailor_worker_is_subcmd() {
|
|
|
909
915
|
function:logs) return 0 ;;
|
|
910
916
|
function:run) return 0 ;;
|
|
911
917
|
function:test-run) return 0 ;;
|
|
918
|
+
function:script) return 0 ;;
|
|
912
919
|
:function) return 0 ;;
|
|
913
920
|
:generate) return 0 ;;
|
|
914
921
|
:init) return 0 ;;
|
|
@@ -955,7 +962,7 @@ __tailor_worker_is_subcmd() {
|
|
|
955
962
|
setup:preview) return 0 ;;
|
|
956
963
|
setup:action) return 0 ;;
|
|
957
964
|
setup:coordinate) return 0 ;;
|
|
958
|
-
setup:
|
|
965
|
+
setup:deps) return 0 ;;
|
|
959
966
|
setup:check) return 0 ;;
|
|
960
967
|
setup:delete) return 0 ;;
|
|
961
968
|
:setup) return 0 ;;
|
|
@@ -1674,6 +1681,62 @@ __tailor_worker_complete_function_run() {
|
|
|
1674
1681
|
__tailor_worker_not_used "--arg" "-a" "--a" && _opts+=("--arg:JSON argument to pass to the function")
|
|
1675
1682
|
__tailor_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Machine user name for authentication. Falls back to the active profile's default machine user.")
|
|
1676
1683
|
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to SDK config file")
|
|
1684
|
+
__tailor_worker_not_used "--allow-schema-drift" "--allowSchemaDrift" && _opts+=("--allow-schema-drift:Run a scaffolded script even when its schema snapshot no longer matches")
|
|
1685
|
+
__tailor_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
1686
|
+
__tailor_worker_cdescribe 'options' _opts
|
|
1687
|
+
return 0
|
|
1688
|
+
fi
|
|
1689
|
+
case "$_pos_count" in
|
|
1690
|
+
0)
|
|
1691
|
+
;;
|
|
1692
|
+
esac
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
__tailor_worker_complete_function_script() {
|
|
1696
|
+
local -a _vals=()
|
|
1697
|
+
case "${words[CURRENT-1]}" in
|
|
1698
|
+
--config|-c|--c)
|
|
1699
|
+
setopt local_options null_glob
|
|
1700
|
+
local _cur="${words[CURRENT]:-}" _dir _prefix _f _out
|
|
1701
|
+
local -a _exts=("ts")
|
|
1702
|
+
if [[ -z "$_cur" || "$_cur" != */* ]]; then
|
|
1703
|
+
_dir="."
|
|
1704
|
+
_prefix="$_cur"
|
|
1705
|
+
elif [[ "$_cur" == */ ]]; then
|
|
1706
|
+
_dir="${_cur%/}"
|
|
1707
|
+
_prefix=""
|
|
1708
|
+
else
|
|
1709
|
+
_dir="${_cur%/*}"
|
|
1710
|
+
_prefix="${_cur##*/}"
|
|
1711
|
+
fi
|
|
1712
|
+
for _f in "$_dir"/"$_prefix"*(N/); do
|
|
1713
|
+
_out="${_f#./}"
|
|
1714
|
+
__tailor_worker_add_path_candidate "$_out"
|
|
1715
|
+
done
|
|
1716
|
+
local _ext
|
|
1717
|
+
for _f in "$_dir"/"$_prefix"*(N.); do
|
|
1718
|
+
_out="${_f#./}"
|
|
1719
|
+
for _ext in "${_exts[@]}"; do
|
|
1720
|
+
[[ -n "$_ext" && "$_out" == *."$_ext" ]] && { __tailor_worker_add_path_candidate "$_out"; break; }
|
|
1721
|
+
done
|
|
1722
|
+
done
|
|
1723
|
+
return 0 ;;
|
|
1724
|
+
esac
|
|
1725
|
+
if __tailor_worker_opt_takes_value "function:script" "${words[CURRENT-1]}"; then return 0; fi
|
|
1726
|
+
if (( _after_dd )); then
|
|
1727
|
+
case "$_pos_count" in
|
|
1728
|
+
0)
|
|
1729
|
+
;;
|
|
1730
|
+
esac
|
|
1731
|
+
return 0
|
|
1732
|
+
fi
|
|
1733
|
+
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
1734
|
+
local -a _opts=()
|
|
1735
|
+
__tailor_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:Workspace ID")
|
|
1736
|
+
__tailor_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
|
|
1737
|
+
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
|
|
1738
|
+
__tailor_worker_not_used "--namespace" && _opts+=("--namespace:Target TailorDB namespace (required when the config does not pin one)")
|
|
1739
|
+
__tailor_worker_not_used "--remote" && _opts+=("--remote:Generate script-scoped DB types from the deployed schema")
|
|
1677
1740
|
__tailor_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
1678
1741
|
__tailor_worker_cdescribe 'options' _opts
|
|
1679
1742
|
return 0
|
|
@@ -1694,7 +1757,7 @@ __tailor_worker_complete_function() {
|
|
|
1694
1757
|
__tailor_worker_cdescribe 'options' _opts
|
|
1695
1758
|
return 0
|
|
1696
1759
|
fi
|
|
1697
|
-
local -a _subs=("get:Get a function registry by name" "list:List function registries in a workspace" "logs:List or get function execution logs." "run:Run a function on the Tailor Platform server without deploying." "test-run:Run a function on the Tailor Platform server without deploying.")
|
|
1760
|
+
local -a _subs=("get:Get a function registry by name" "list:List function registries in a workspace" "logs:List or get function execution logs." "run:Run a function on the Tailor Platform server without deploying." "test-run:Run a function on the Tailor Platform server without deploying." "script:Scaffold a one-off script to run with \`function run\`.")
|
|
1698
1761
|
__tailor_worker_cdescribe 'subcommands' _subs
|
|
1699
1762
|
}
|
|
1700
1763
|
|
|
@@ -2634,7 +2697,7 @@ __tailor_worker_complete_setup_branch() {
|
|
|
2634
2697
|
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2635
2698
|
local -a _opts=()
|
|
2636
2699
|
__tailor_worker_not_used "--name" "-n" "--n" && _opts+=("--name:Name (defaults to the config 'name')")
|
|
2637
|
-
__tailor_worker_not_used "--
|
|
2700
|
+
__tailor_worker_not_used "--target" && _opts+=("--target:Deploy trigger branch (defaults to the detected default branch)")
|
|
2638
2701
|
__tailor_worker_not_used "--environment" && _opts+=("--environment:GitHub Environment for the plan/deploy jobs (defaults to the workspace name)")
|
|
2639
2702
|
__tailor_worker_not_used "--erd-preview" "--erdPreview" && _opts+=("--erd-preview:Add PR ERD viewer artifacts with current/diff previews for TailorDB namespaces")
|
|
2640
2703
|
__tailor_worker_not_used "--dir" "-d" "--d" && _opts+=("--dir:App directory (for monorepo setups)")
|
|
@@ -2716,12 +2779,19 @@ __tailor_worker_complete_setup_coordinate() {
|
|
|
2716
2779
|
fi
|
|
2717
2780
|
}
|
|
2718
2781
|
|
|
2719
|
-
|
|
2782
|
+
__tailor_worker_complete_setup_deps() {
|
|
2720
2783
|
local -a _vals=()
|
|
2721
|
-
|
|
2784
|
+
case "${words[CURRENT-1]}" in
|
|
2785
|
+
--provider)
|
|
2786
|
+
_vals=("renovate")
|
|
2787
|
+
__tailor_worker_cdescribe 'completions' _vals
|
|
2788
|
+
return 0 ;;
|
|
2789
|
+
esac
|
|
2790
|
+
if __tailor_worker_opt_takes_value "setup:deps" "${words[CURRENT-1]}"; then return 0; fi
|
|
2722
2791
|
if (( _after_dd )); then return 0; fi
|
|
2723
2792
|
if [[ "${words[CURRENT]}" == -* ]]; then
|
|
2724
2793
|
local -a _opts=()
|
|
2794
|
+
__tailor_worker_not_used "--provider" && _opts+=("--provider:Dependency update provider to configure")
|
|
2725
2795
|
__tailor_worker_not_used "--help" && _opts+=("--help:Show help")
|
|
2726
2796
|
__tailor_worker_cdescribe 'options' _opts
|
|
2727
2797
|
return 0
|
|
@@ -2774,7 +2844,7 @@ __tailor_worker_complete_setup() {
|
|
|
2774
2844
|
__tailor_worker_cdescribe 'options' _opts
|
|
2775
2845
|
return 0
|
|
2776
2846
|
fi
|
|
2777
|
-
local -a _subs=("branch:Generate a branch-target deploy workflow (push to branch triggers deploy)." "tag:Generate a tag-target deploy workflow (tag push triggers deploy)." "preview:Generate a preview workflow (PR open/sync triggers deploy to a per-PR workspace)." "action:Generate a per-app composite action for use with setup coordinate (monorepo multi-app deploys)." "coordinate:Generate a coordinator workflow that orchestrates multiple --action-generated composite actions." "
|
|
2847
|
+
local -a _subs=("branch:Generate a branch-target deploy workflow (push to branch triggers deploy)." "tag:Generate a tag-target deploy workflow (tag push triggers deploy)." "preview:Generate a preview workflow (PR open/sync triggers deploy to a per-PR workspace)." "action:Generate a per-app composite action for use with setup coordinate (monorepo multi-app deploys)." "coordinate:Generate a coordinator workflow that orchestrates multiple --action-generated composite actions." "deps:Generate a dependency update config for Tailor dependency and workflow updates." "check:Audit generated workflows for drift against the current config/repo (read-only)." "delete:Delete managed workflow/action file(s) and their .github/tailor.lock entries.")
|
|
2778
2848
|
__tailor_worker_cdescribe 'subcommands' _subs
|
|
2779
2849
|
}
|
|
2780
2850
|
|
|
@@ -3058,6 +3128,8 @@ __tailor_worker_complete_tailordb_migration_generate() {
|
|
|
3058
3128
|
__tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
|
|
3059
3129
|
__tailor_worker_not_used "--name" "-n" "--n" && _opts+=("--name:Optional description for the migration")
|
|
3060
3130
|
__tailor_worker_not_used "--init" && _opts+=("--init:Delete existing migrations and start fresh")
|
|
3131
|
+
__tailor_worker_not_used "--data-only" "--dataOnly" && _opts+=("--data-only:Create a migration with no schema changes whose migration script runs a standalone data transformation")
|
|
3132
|
+
__tailor_worker_not_used "--namespace" && _opts+=("--namespace:Target TailorDB namespace for --data-only (required if multiple namespaces exist)")
|
|
3061
3133
|
_opts+=("--rename:Record a field or table rename instead of remove + add (format\: \"Table.oldField\:newField\" or \"OldTable\:NewTable\"; repeatable). Renames require a migration script that copies the data.")
|
|
3062
3134
|
_opts+=("--drop:Confirm that a removed field or table is a genuine removal, not a rename (format\: \"Table.field\" or \"Table\"; repeatable). Required in non-interactive runs for a removal with rename candidates.")
|
|
3063
3135
|
_opts+=("--expand-contract:Convert a field type through a temporary field (format\: \"Table.field\"; repeatable). Generates two migrations.")
|
|
@@ -4341,6 +4413,7 @@ _tailor_worker_completions() {
|
|
|
4341
4413
|
function:logs) __tailor_worker_complete_function_logs ;;
|
|
4342
4414
|
function:run) __tailor_worker_complete_function_run ;;
|
|
4343
4415
|
function:test-run) __tailor_worker_complete_function_run ;;
|
|
4416
|
+
function:script) __tailor_worker_complete_function_script ;;
|
|
4344
4417
|
function) __tailor_worker_complete_function ;;
|
|
4345
4418
|
generate) __tailor_worker_complete_generate ;;
|
|
4346
4419
|
init) __tailor_worker_complete_init ;;
|
|
@@ -4387,7 +4460,7 @@ _tailor_worker_completions() {
|
|
|
4387
4460
|
setup:preview) __tailor_worker_complete_setup_preview ;;
|
|
4388
4461
|
setup:action) __tailor_worker_complete_setup_action ;;
|
|
4389
4462
|
setup:coordinate) __tailor_worker_complete_setup_coordinate ;;
|
|
4390
|
-
setup:
|
|
4463
|
+
setup:deps) __tailor_worker_complete_setup_deps ;;
|
|
4391
4464
|
setup:check) __tailor_worker_complete_setup_check ;;
|
|
4392
4465
|
setup:delete) __tailor_worker_complete_setup_delete ;;
|
|
4393
4466
|
setup) __tailor_worker_complete_setup ;;
|
|
@@ -10,7 +10,7 @@ import { AppConfig } from "./types.mjs";
|
|
|
10
10
|
declare function defineConfig<const Config extends AppConfig & Record<Exclude<keyof Config, keyof AppConfig>, never>>(config: Config): Config;
|
|
11
11
|
/**
|
|
12
12
|
* Define plugins to be used with the Tailor SDK.
|
|
13
|
-
* Plugins can generate additional
|
|
13
|
+
* Plugins can generate additional tables, resolvers, and executors
|
|
14
14
|
* based on existing TailorDB tables.
|
|
15
15
|
* @param configs - Plugin configurations
|
|
16
16
|
* @returns Plugin configurations as given
|
|
@@ -108,7 +108,7 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
|
|
|
108
108
|
allowedIpAddresses?: string[];
|
|
109
109
|
/** Disable GraphQL introspection in production. */
|
|
110
110
|
disableIntrospection?: boolean;
|
|
111
|
-
/** TailorDB service configuration with
|
|
111
|
+
/** TailorDB service configuration with table definition files. */
|
|
112
112
|
db?: TailorDBServiceInput;
|
|
113
113
|
/** Resolver service configuration with resolver files. */
|
|
114
114
|
resolver?: ResolverServiceInput;
|
|
@@ -142,4 +142,4 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
|
|
|
142
142
|
logLevel?: LogLevelInput;
|
|
143
143
|
}
|
|
144
144
|
//#endregion
|
|
145
|
-
export {
|
|
145
|
+
export { AppConfig, EnvEntry, EnvValue, ExecutorServiceConfig, ExecutorServiceInput, HttpAdapterServiceInput, LogLevel, LogLevelInput, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, WorkflowServiceConfig, WorkflowServiceInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldMetadata, FieldOptions, FieldOutput, TailorFieldType } from "./types/field.types.mjs";
|
|
2
2
|
import { AttributeList, Attributes, Env, TailorPrincipal } from "../runtime/types.mjs";
|
|
3
3
|
import { DeepWritable, NullableToOptional, output as output$1 } from "../types/helpers.mjs";
|
|
4
4
|
import { IsAutoFilledDBField, IsReadOnlyDBField, PluginAttachment } from "./services/tailordb/types.mjs";
|
|
@@ -7,7 +7,7 @@ import { BuiltinIdP, IDToken, IdProvider, OAuth2ClientInput, OIDC, SAML, SCIMAtt
|
|
|
7
7
|
import { AuthConfig, AuthConnectionTokenResult, AuthExternalConfig, AuthOwnConfig, AuthServiceInput, BeforeLoginClaims, BeforeLoginHookArgs, DefinedAuth, FederatedIdentity, FederatedIdentityClaims, FederatedIdentityProvider, MachineUserName, MachineUserNameRegistry, OAuth2ClientGrantType, SCIMAttributeType, UserAttributeKey, UserAttributeListKey, UserAttributes, UsernameFieldKey, ValueOperand } from "./services/auth/types.mjs";
|
|
8
8
|
import { AllowedValues, AllowedValuesOutput } from "./types/field.mjs";
|
|
9
9
|
import { Resolver } from "../types/resolver.generated.mjs";
|
|
10
|
-
import { ExecutorReadyContext, GeneratorResult, NamespacePluginOutput, Plugin, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver,
|
|
10
|
+
import { ExecutorReadyContext, GeneratorResult, NamespacePluginOutput, Plugin, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver, PluginGeneratedTable, PluginNamespaceProcessContext, PluginOutput, PluginTableProcessContext, ResolverNamespaceData, ResolverReadyContext, TablePluginOutput, TailorDBNamespaceData, TailorDBReadyContext, TailorDBTableForPlugin } from "../plugin/types.mjs";
|
|
11
11
|
import { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission } from "./services/tailordb/permission.mjs";
|
|
12
12
|
import { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db } from "./services/tailordb/schema.mjs";
|
|
13
13
|
import { AuthNamespaceName, AuthNamespaceNameRegistry } from "./types/auth-namespace-name.mjs";
|
|
@@ -58,55 +58,91 @@ declare const t: {
|
|
|
58
58
|
array: Opt extends {
|
|
59
59
|
array: true;
|
|
60
60
|
} ? true : false;
|
|
61
|
-
}, Opt["optional"] extends true ?
|
|
61
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
62
|
+
array: true;
|
|
63
|
+
}] ? string[] : string) | null : [Opt] extends [{
|
|
64
|
+
array: true;
|
|
65
|
+
}] ? string[] : string, FieldMetadata, TailorFieldType>;
|
|
62
66
|
string: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
63
67
|
type: "string";
|
|
64
68
|
array: Opt extends {
|
|
65
69
|
array: true;
|
|
66
70
|
} ? true : false;
|
|
67
|
-
}, Opt["optional"] extends true ?
|
|
71
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
72
|
+
array: true;
|
|
73
|
+
}] ? string[] : string) | null : [Opt] extends [{
|
|
74
|
+
array: true;
|
|
75
|
+
}] ? string[] : string, FieldMetadata, TailorFieldType>;
|
|
68
76
|
bool: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
69
77
|
type: "boolean";
|
|
70
78
|
array: Opt extends {
|
|
71
79
|
array: true;
|
|
72
80
|
} ? true : false;
|
|
73
|
-
}, Opt["optional"] extends true ?
|
|
81
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
82
|
+
array: true;
|
|
83
|
+
}] ? boolean[] : boolean) | null : [Opt] extends [{
|
|
84
|
+
array: true;
|
|
85
|
+
}] ? boolean[] : boolean, FieldMetadata, TailorFieldType>;
|
|
74
86
|
int: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
75
87
|
type: "integer";
|
|
76
88
|
array: Opt extends {
|
|
77
89
|
array: true;
|
|
78
90
|
} ? true : false;
|
|
79
|
-
}, Opt["optional"] extends true ?
|
|
91
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
92
|
+
array: true;
|
|
93
|
+
}] ? number[] : number) | null : [Opt] extends [{
|
|
94
|
+
array: true;
|
|
95
|
+
}] ? number[] : number, FieldMetadata, TailorFieldType>;
|
|
80
96
|
float: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
81
97
|
type: "float";
|
|
82
98
|
array: Opt extends {
|
|
83
99
|
array: true;
|
|
84
100
|
} ? true : false;
|
|
85
|
-
}, Opt["optional"] extends true ?
|
|
101
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
102
|
+
array: true;
|
|
103
|
+
}] ? number[] : number) | null : [Opt] extends [{
|
|
104
|
+
array: true;
|
|
105
|
+
}] ? number[] : number, FieldMetadata, TailorFieldType>;
|
|
86
106
|
decimal: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
87
107
|
type: "decimal";
|
|
88
108
|
array: Opt extends {
|
|
89
109
|
array: true;
|
|
90
110
|
} ? true : false;
|
|
91
|
-
}, Opt["optional"] extends true ?
|
|
111
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
112
|
+
array: true;
|
|
113
|
+
}] ? string[] : string) | null : [Opt] extends [{
|
|
114
|
+
array: true;
|
|
115
|
+
}] ? string[] : string, FieldMetadata, TailorFieldType>;
|
|
92
116
|
date: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
93
117
|
type: "date";
|
|
94
118
|
array: Opt extends {
|
|
95
119
|
array: true;
|
|
96
120
|
} ? true : false;
|
|
97
|
-
}, Opt["optional"] extends true ?
|
|
121
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
122
|
+
array: true;
|
|
123
|
+
}] ? string[] : string) | null : [Opt] extends [{
|
|
124
|
+
array: true;
|
|
125
|
+
}] ? string[] : string, FieldMetadata, TailorFieldType>;
|
|
98
126
|
datetime: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
99
127
|
type: "datetime";
|
|
100
128
|
array: Opt extends {
|
|
101
129
|
array: true;
|
|
102
130
|
} ? true : false;
|
|
103
|
-
}, Opt["optional"] extends true ?
|
|
131
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
132
|
+
array: true;
|
|
133
|
+
}] ? (string | Date)[] : string | Date) | null : [Opt] extends [{
|
|
134
|
+
array: true;
|
|
135
|
+
}] ? (string | Date)[] : string | Date, FieldMetadata, TailorFieldType>;
|
|
104
136
|
time: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
|
|
105
137
|
type: "time";
|
|
106
138
|
array: Opt extends {
|
|
107
139
|
array: true;
|
|
108
140
|
} ? true : false;
|
|
109
|
-
}, Opt["optional"] extends true ?
|
|
141
|
+
}, Opt["optional"] extends true ? ([Opt] extends [{
|
|
142
|
+
array: true;
|
|
143
|
+
}] ? string[] : string) | null : [Opt] extends [{
|
|
144
|
+
array: true;
|
|
145
|
+
}] ? string[] : string, FieldMetadata, TailorFieldType>;
|
|
110
146
|
enum: <const V extends AllowedValues, const Opt extends FieldOptions>(values: V, options?: Opt) => TailorField<{
|
|
111
147
|
type: "enum";
|
|
112
148
|
array: Opt extends {
|
|
@@ -133,4 +169,4 @@ declare namespace t {
|
|
|
133
169
|
type infer<T> = TailorOutput<T>;
|
|
134
170
|
}
|
|
135
171
|
//#endregion
|
|
136
|
-
export { type AIGatewayConfig, type AIGatewayName, type AIGatewayNameRegistry, type AttributeList, type Attributes, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, type AuthNamespaceName, type AuthNamespaceNameRegistry, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginClaims, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type ConnectionName, type ConnectionNameRegistry, type DefinedAuth, type Env, type ExecutionPolicyConcurrency, type ExecutionPolicyDefInput, type ExecutionPolicyExactInstance, type ExecutionPolicyGroupOptions, type ExecutionPolicyInstance, type ExecutionPolicyWildcardInstance, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, type IdpName, type IdpNameRegistry, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type IsAutoFilledDBField, type IsReadOnlyDBField, type MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, ParameterizedWaitPointInstance, type PermissionCondition, type Plugin, type PluginAttachment, type PluginConfigs, type PluginExecutorContext, type PluginExecutorContextBase, type PluginGeneratedExecutor, type PluginGeneratedExecutorWithFile, type PluginGeneratedResolver, type
|
|
172
|
+
export { type AIGatewayConfig, type AIGatewayName, type AIGatewayNameRegistry, type AttributeList, type Attributes, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, type AuthNamespaceName, type AuthNamespaceNameRegistry, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginClaims, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type ConnectionName, type ConnectionNameRegistry, type DefinedAuth, type Env, type ExecutionPolicyConcurrency, type ExecutionPolicyDefInput, type ExecutionPolicyExactInstance, type ExecutionPolicyGroupOptions, type ExecutionPolicyInstance, type ExecutionPolicyWildcardInstance, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, type IdpName, type IdpNameRegistry, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type IsAutoFilledDBField, type IsReadOnlyDBField, type MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, ParameterizedWaitPointInstance, type PermissionCondition, type Plugin, type PluginAttachment, type PluginConfigs, type PluginExecutorContext, type PluginExecutorContextBase, type PluginGeneratedExecutor, type PluginGeneratedExecutorWithFile, type PluginGeneratedResolver, type PluginGeneratedTable, type PluginNamespaceProcessContext, type PluginOutput, type PluginTableProcessContext, type QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, type ResolvedExecutionPolicyInstance, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, type ResolverPermission, type ResolverPermissionCondition, type ResolverPermissionPolicy, type ResolverReadyContext, type ResolverServiceConfig, type ResolverServiceInput, type RetryPolicy, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleArgs, ScheduleTrigger, type SecretsConfig, type StaticWebsiteConfig, type TablePluginOutput, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, type TailorDBNamespaceData, type TailorDBReadyContext, type TailorDBTableForPlugin, TailorDBTrigger, type TailorDBType, type TailorField, type TailorPrincipal, type TailorTypeGqlPermission, type TailorTypePermission, type TenantProvider as TenantProviderConfig, Trigger, type UserAttributeKey, type UserAttributeListKey, type UserAttributes, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowExecutionArgs, WorkflowExecutionCompletedArgs, WorkflowExecutionResumedArgs, WorkflowExecutionRetriedArgs, WorkflowExecutionStartedArgs, WorkflowExecutionTrigger, WorkflowExecutionWaitResolvedArgs, WorkflowExecutionWaitStartedArgs, WorkflowJob, WorkflowJobContext, WorkflowJobExecutionArgs, WorkflowJobExecutionCompletedArgs, WorkflowJobExecutionStartedArgs, WorkflowJobExecutionTrigger, WorkflowJobExecutionWaitResolvedArgs, WorkflowJobExecutionWaitStartedArgs, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWaitPoint, createWaitPoints, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission, workflowExecutionCompletedTrigger, workflowExecutionResumedTrigger, workflowExecutionRetriedTrigger, workflowExecutionStartedTrigger, workflowExecutionTrigger, workflowExecutionWaitResolvedTrigger, workflowExecutionWaitStartedTrigger, workflowJobExecutionCompletedTrigger, workflowJobExecutionStartedTrigger, workflowJobExecutionTrigger, workflowJobExecutionWaitResolvedTrigger, workflowJobExecutionWaitStartedTrigger };
|