@tailor-platform/sdk 2.6.0 → 2.8.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 +65 -0
- package/dist/{application-CmXOqTaK.mjs → application-D2E3FDfF.mjs} +27 -25
- package/dist/application-D2E3FDfF.mjs.map +1 -0
- package/dist/application-rySTKrFa.mjs +1 -0
- package/dist/cli/commands/deploy/config-id-injector.d.mts +16 -0
- package/dist/cli/commands/workspace/create.d.mts +1 -1
- package/dist/cli/lib.d.mts +7 -2
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +50 -1145
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/args.d.mts +7 -1
- package/dist/cli/shared/beta.d.mts +8 -0
- package/dist/cli/shared/client.d.mts +11 -1
- package/dist/cli/shared/config.d.mts +13 -0
- package/dist/cli/shared/prompt.d.mts +53 -0
- package/dist/cli/shared/script-executor.d.mts +1 -1
- package/dist/cli/shared/workspace-name.d.mts +10 -1
- package/dist/completion/zsh-worker.zsh +10 -206
- package/dist/errors-BlX4gUw5.mjs +4 -0
- package/dist/errors-BlX4gUw5.mjs.map +1 -0
- package/dist/es-builtins-BHCXINQp.mjs +2 -0
- package/dist/es-builtins-BHCXINQp.mjs.map +1 -0
- package/dist/field-column-type-QMtF6lUp.mjs +2 -0
- package/dist/field-column-type-QMtF6lUp.mjs.map +1 -0
- package/dist/{kysely-type-BTi3BMtL.mjs → kysely-type-CmvAz1Xj.mjs} +4 -4
- package/dist/kysely-type-CmvAz1Xj.mjs.map +1 -0
- package/dist/node-builtins-TQHhwNzG.mjs +2 -0
- package/dist/node-builtins-TQHhwNzG.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/register-ts-hook-CQuJ7h5G.mjs +642 -0
- package/dist/register-ts-hook-CQuJ7h5G.mjs.map +1 -0
- package/dist/service-COC9whur.mjs +1 -0
- package/dist/{service-CLPMoj9n.mjs → service-CqbQXFDp.mjs} +2 -2
- package/dist/{service-CLPMoj9n.mjs.map → service-CqbQXFDp.mjs.map} +1 -1
- package/dist/{service-YqDsHmlK.mjs → service-DDon86tM.mjs} +2 -2
- package/dist/service-DDon86tM.mjs.map +1 -0
- package/dist/service_pb-BNxUPfP3.mjs +2 -0
- package/dist/service_pb-BNxUPfP3.mjs.map +1 -0
- package/dist/service_pb-D-xFu9Ub.mjs +1 -0
- package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +12 -0
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +18 -1
- package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +130 -1
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +43 -4
- package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +9 -0
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.mjs +1 -1
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/dist/workspace_resource_pb-B7S-zx4Z.mjs +2 -0
- package/dist/workspace_resource_pb-B7S-zx4Z.mjs.map +1 -0
- package/docs/cli-reference.md +0 -16
- package/docs/github-actions.md +12 -0
- package/docs/services/executor.md +17 -0
- package/docs/services/idp.md +1 -1
- package/docs/services/resolver.md +1 -1
- package/docs/services/tailordb-migration.md +12 -0
- package/docs/services/tailordb.md +6 -2
- package/docs/services/workflow.md +1 -1
- package/package.json +15 -17
- package/dist/application-CNeOcaLc.mjs +0 -1
- package/dist/application-CmXOqTaK.mjs.map +0 -1
- package/dist/errors-DLsQ_-ol.mjs +0 -2
- package/dist/errors-DLsQ_-ol.mjs.map +0 -1
- package/dist/es-builtins-n3wBv4Sv.mjs +0 -2
- package/dist/es-builtins-n3wBv4Sv.mjs.map +0 -1
- package/dist/kysely-type-BTi3BMtL.mjs.map +0 -1
- package/dist/node-builtins-oBl7EbyV.mjs +0 -2
- package/dist/node-builtins-oBl7EbyV.mjs.map +0 -1
- package/dist/register-ts-hook-oDA2JLp2.mjs +0 -640
- package/dist/register-ts-hook-oDA2JLp2.mjs.map +0 -1
- package/dist/service-D7iXk0BT.mjs +0 -1
- package/dist/service-YqDsHmlK.mjs.map +0 -1
- package/dist/service_pb-DGKCLuAs.mjs +0 -2
- package/dist/service_pb-DGKCLuAs.mjs.map +0 -1
- package/dist/service_pb-_aeFE-Nv.mjs +0 -1
- package/dist/workspace_resource_pb--GeYQPXu.mjs +0 -2
- package/dist/workspace_resource_pb--GeYQPXu.mjs.map +0 -1
- package/docs/cli/setup.md +0 -210
|
@@ -72,6 +72,12 @@ declare const deploymentArgs: {
|
|
|
72
72
|
"workspace-id": z.ZodOptional<z.ZodString>;
|
|
73
73
|
profile: z.ZodOptional<z.ZodString>;
|
|
74
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* Arguments for commands that require confirmation
|
|
77
|
+
*/
|
|
78
|
+
declare const confirmationArgs: {
|
|
79
|
+
yes: z.ZodDefault<z.ZodBoolean>;
|
|
80
|
+
};
|
|
75
81
|
type CommonArgsType = z.infer<z.ZodObject<typeof commonArgs>>;
|
|
76
82
|
//#endregion
|
|
77
|
-
export { CommonArgsType, Order, commonArgs, configArg, createCommonArgs, deploymentArgs, loadEnvFiles, orderArg, workspaceArgs };
|
|
83
|
+
export { CommonArgsType, Order, commonArgs, configArg, confirmationArgs, createCommonArgs, deploymentArgs, loadEnvFiles, orderArg, workspaceArgs };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region src/cli/shared/beta.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Warn that a feature is in beta.
|
|
4
|
+
* @param {string} featureName - Name of the beta feature (e.g., "tailordb migration")
|
|
5
|
+
*/
|
|
6
|
+
declare function logBetaWarning(featureName: string): void;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { logBetaWarning };
|
|
@@ -14,7 +14,7 @@ import { ListMeterAITokenUsagesRequestSchema, ListMeterAITokenUsagesResponseSche
|
|
|
14
14
|
import { CreateIdPClientRequestSchema, CreateIdPClientResponseSchema, CreateIdPServiceRequestSchema, CreateIdPServiceResponseSchema, DeleteIdPClientRequestSchema, DeleteIdPClientResponseSchema, DeleteIdPServiceRequestSchema, DeleteIdPServiceResponseSchema, GetIdPClientRequestSchema, GetIdPClientResponseSchema, GetIdPServiceRequestSchema, GetIdPServiceResponseSchema, ListIdPClientsRequestSchema, ListIdPClientsResponseSchema, ListIdPServicesRequestSchema, ListIdPServicesResponseSchema, UpdateIdPServiceRequestSchema, UpdateIdPServiceResponseSchema } from "../../tailor-proto/src/tailor/v1/idp_pb.mjs";
|
|
15
15
|
import { AddCustomDomainRequestSchema, AddCustomDomainResponseSchema, CreateDeploymentRequestSchema, CreateDeploymentResponseSchema, CreateStaticWebsiteRequestSchema, CreateStaticWebsiteResponseSchema, DeleteStaticWebsiteRequestSchema, DeleteStaticWebsiteResponseSchema, GetCustomDomainRequestSchema, GetCustomDomainResponseSchema, GetStaticWebsiteRequestSchema, GetStaticWebsiteResponseSchema, ListCustomDomainsRequestSchema, ListCustomDomainsResponseSchema, ListStaticWebsitesRequestSchema, ListStaticWebsitesResponseSchema, PublishDeploymentRequestSchema, PublishDeploymentResponseSchema, RemoveCustomDomainRequestSchema, RemoveCustomDomainResponseSchema, UpdateStaticWebsiteRequestSchema, UpdateStaticWebsiteResponseSchema, UploadFileRequestSchema, UploadFileResponseSchema } from "../../tailor-proto/src/tailor/v1/staticwebsite_pb.mjs";
|
|
16
16
|
import { CreateWorkflowJobFunctionExecutionPolicyRequestSchema, CreateWorkflowJobFunctionExecutionPolicyResponseSchema, CreateWorkflowJobFunctionRequestSchema, CreateWorkflowJobFunctionResponseSchema, CreateWorkflowRequestSchema, CreateWorkflowResponseSchema, DeleteWorkflowJobFunctionExecutionPolicyRequestSchema, DeleteWorkflowJobFunctionExecutionPolicyResponseSchema, DeleteWorkflowJobFunctionRequestSchema, DeleteWorkflowJobFunctionResponseSchema, DeleteWorkflowRequestSchema, DeleteWorkflowResponseSchema, GetWorkflowByNameRequestSchema, GetWorkflowByNameResponseSchema, GetWorkflowExecutionRequestSchema, GetWorkflowExecutionResponseSchema, GetWorkflowJobFunctionByNameRequestSchema, GetWorkflowJobFunctionByNameResponseSchema, GetWorkflowJobFunctionExecutionPolicyByKeyRequestSchema, GetWorkflowJobFunctionExecutionPolicyByKeyResponseSchema, GetWorkflowJobFunctionExecutionPolicyRequestSchema, GetWorkflowJobFunctionExecutionPolicyResponseSchema, GetWorkflowJobFunctionRequestSchema, GetWorkflowJobFunctionResponseSchema, GetWorkflowRequestSchema, GetWorkflowResponseSchema, ListWorkflowExecutionsRequestSchema, ListWorkflowExecutionsResponseSchema, ListWorkflowJobFunctionExecutionPoliciesRequestSchema, ListWorkflowJobFunctionExecutionPoliciesResponseSchema, ListWorkflowJobFunctionsRequestSchema, ListWorkflowJobFunctionsResponseSchema, ListWorkflowsRequestSchema, ListWorkflowsResponseSchema, ResumeWorkflowExecutionRequestSchema, ResumeWorkflowExecutionResponseSchema, StartWorkflowRequestSchema, StartWorkflowResponseSchema, TestResumeWorkflowRequestSchema, TestResumeWorkflowResponseSchema, TestStartWorkflowRequestSchema, TestStartWorkflowResponseSchema, UpdateWorkflowJobFunctionExecutionPolicyRequestSchema, UpdateWorkflowJobFunctionExecutionPolicyResponseSchema, UpdateWorkflowJobFunctionRequestSchema, UpdateWorkflowJobFunctionResponseSchema, UpdateWorkflowRequestSchema, UpdateWorkflowResponseSchema } from "../../tailor-proto/src/tailor/v1/workflow_pb.mjs";
|
|
17
|
-
import { GetMetadataRequestSchema, GetMetadataResponseSchema, SetMetadataRequestSchema, SetMetadataResponseSchema } from "../../tailor-proto/src/tailor/v1/metadata_pb.mjs";
|
|
17
|
+
import { BulkSetMetadataRequestSchema, BulkSetMetadataResponseSchema, GetMetadataRequestSchema, GetMetadataResponseSchema, ListMetadataRequestSchema, ListMetadataResponseSchema, SetMetadataRequestSchema, SetMetadataResponseSchema } from "../../tailor-proto/src/tailor/v1/metadata_pb.mjs";
|
|
18
18
|
import { CreateOTLPExporterRequestSchema, CreateOTLPExporterResponseSchema, CreateResourceAttributesConfigRequestSchema, CreateResourceAttributesConfigResponseSchema, DeleteOTLPExporterRequestSchema, DeleteOTLPExporterResponseSchema, DeleteResourceAttributesConfigRequestSchema, DeleteResourceAttributesConfigResponseSchema, GetOTLPExporterRequestSchema, GetOTLPExporterResponseSchema, GetResourceAttributesConfigRequestSchema, GetResourceAttributesConfigResponseSchema, ListOTLPExportersRequestSchema, ListOTLPExportersResponseSchema, TestOTLPExporterRequestSchema, TestOTLPExporterResponseSchema, UpdateOTLPExporterRequestSchema, UpdateOTLPExporterResponseSchema, UpdateResourceAttributesConfigRequestSchema, UpdateResourceAttributesConfigResponseSchema } from "../../tailor-proto/src/tailor/v1/telemetryrouter_pb.mjs";
|
|
19
19
|
import { OperatorService, PingRequestSchema, PingResponseSchema } from "../../tailor-proto/src/tailor/v1/service_pb.mjs";
|
|
20
20
|
import "@badgateway/oauth2-client";
|
|
@@ -1213,6 +1213,16 @@ declare function initOperatorClient(accessToken: string, config?: PlatformClient
|
|
|
1213
1213
|
input: typeof GetMetadataRequestSchema;
|
|
1214
1214
|
output: typeof GetMetadataResponseSchema;
|
|
1215
1215
|
};
|
|
1216
|
+
bulkSetMetadata: {
|
|
1217
|
+
methodKind: "unary";
|
|
1218
|
+
input: typeof BulkSetMetadataRequestSchema;
|
|
1219
|
+
output: typeof BulkSetMetadataResponseSchema;
|
|
1220
|
+
};
|
|
1221
|
+
listMetadata: {
|
|
1222
|
+
methodKind: "unary";
|
|
1223
|
+
input: typeof ListMetadataRequestSchema;
|
|
1224
|
+
output: typeof ListMetadataResponseSchema;
|
|
1225
|
+
};
|
|
1216
1226
|
createControlplaneMachineUser: {
|
|
1217
1227
|
methodKind: "unary";
|
|
1218
1228
|
input: typeof CreateControlplaneMachineUserRequestSchema;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LoadedConfig } from "./config-loader.mjs";
|
|
2
|
+
//#region src/cli/shared/config.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Extracts namespace keys under `config.db` that this app owns
|
|
5
|
+
* (i.e. not declared with `{ external: true }`). Use this for destructive
|
|
6
|
+
* operations like `tailordb truncate --all` to avoid touching namespaces
|
|
7
|
+
* owned by other apps.
|
|
8
|
+
* @param config - Loaded application configuration.
|
|
9
|
+
* @returns Owned namespace names in insertion order.
|
|
10
|
+
*/
|
|
11
|
+
declare function extractOwnedNamespaces(config: LoadedConfig): string[];
|
|
12
|
+
//#endregion
|
|
13
|
+
export { extractOwnedNamespaces };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region src/cli/shared/prompt.d.ts
|
|
2
|
+
/** Options accepted by {@link prompt.confirm}. */
|
|
3
|
+
interface ConfirmConfig {
|
|
4
|
+
message: string;
|
|
5
|
+
default?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Options accepted by {@link prompt.text}. */
|
|
8
|
+
interface TextConfig {
|
|
9
|
+
message: string;
|
|
10
|
+
default?: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
validate?: (value: string) => boolean | string | Promise<boolean | string>;
|
|
13
|
+
}
|
|
14
|
+
/** Options accepted by {@link prompt.password}. */
|
|
15
|
+
interface PasswordConfig {
|
|
16
|
+
message: string;
|
|
17
|
+
mask?: boolean | string;
|
|
18
|
+
validate?: (value: string) => boolean | string | Promise<boolean | string>;
|
|
19
|
+
}
|
|
20
|
+
/** A selectable entry of {@link SelectConfig.choices}. */
|
|
21
|
+
interface SelectChoice<Value> {
|
|
22
|
+
value: Value;
|
|
23
|
+
name?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
short?: string;
|
|
26
|
+
disabled?: boolean | string;
|
|
27
|
+
}
|
|
28
|
+
/** Options accepted by {@link prompt.select}. */
|
|
29
|
+
interface SelectConfig<Value> {
|
|
30
|
+
message: string;
|
|
31
|
+
choices: readonly SelectChoice<Value>[];
|
|
32
|
+
default?: NoInfer<Value>;
|
|
33
|
+
pageSize?: number;
|
|
34
|
+
loop?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Interactive prompts that fail with an actionable message instead of hanging
|
|
38
|
+
* when stdin is not a TTY (CI, piped input), and exit with 130 on Ctrl-C.
|
|
39
|
+
*
|
|
40
|
+
* The config types are declared here rather than inferred from
|
|
41
|
+
* `@inquirer/prompts`: inference pulls `@inquirer/*` internals (`Context`,
|
|
42
|
+
* `Keybinding`, `PartialDeep`) into this public type, and those cannot be
|
|
43
|
+
* named portably from the published declarations (TS2883). They cover the
|
|
44
|
+
* options this CLI uses — widen them here when a call site needs more.
|
|
45
|
+
*/
|
|
46
|
+
declare const prompt: {
|
|
47
|
+
confirm: (config: ConfirmConfig) => Promise<boolean>;
|
|
48
|
+
text: (config: TextConfig) => Promise<string>;
|
|
49
|
+
password: (config: PasswordConfig) => Promise<string>;
|
|
50
|
+
select: <const Value>(config: SelectConfig<Value>) => Promise<Value>;
|
|
51
|
+
};
|
|
52
|
+
//#endregion
|
|
53
|
+
export { ConfirmConfig, PasswordConfig, SelectChoice, SelectConfig, TextConfig, prompt };
|
|
@@ -53,7 +53,7 @@ interface ExecutionWaitResult {
|
|
|
53
53
|
* Wait for a function execution to complete
|
|
54
54
|
*
|
|
55
55
|
* Polls the getFunctionExecution API until the execution reaches a terminal state
|
|
56
|
-
* (SUCCESS or
|
|
56
|
+
* (SUCCESS, FAILED, or CANCELED).
|
|
57
57
|
* @param {OperatorClient} client - Operator client instance
|
|
58
58
|
* @param {string} workspaceId - Workspace ID
|
|
59
59
|
* @param {string} executionId - Execution ID to wait for
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/cli/shared/workspace-name.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Validates a workspace name against the platform's naming rules: 3-63
|
|
5
|
+
* lowercase alphanumeric or hyphen characters, not starting or ending with a
|
|
6
|
+
* hyphen.
|
|
7
|
+
*/
|
|
8
|
+
declare const workspaceNameSchema: z.ZodString;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { workspaceNameSchema };
|