@tailor-platform/sdk 1.19.0 → 1.20.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 +32 -0
- package/dist/{application-A6PZjujv.mjs → application-Bli2ieqY.mjs} +97952 -97659
- package/dist/application-Bli2ieqY.mjs.map +1 -0
- package/dist/{application-nPS5veK6.mjs → application-CZdieD3K.mjs} +2 -2
- package/dist/cli/index.mjs +117 -62
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +116 -58
- package/dist/cli/lib.mjs +6 -6
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/skills.mjs +1 -1
- package/dist/cli/skills.mjs.map +1 -1
- package/dist/configure/index.d.mts +4 -4
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-B91ZpOcd.d.mts → index-B86CIKCW.d.mts} +2 -2
- package/dist/{index-B6pvy1MK.d.mts → index-CGjiOz_W.d.mts} +2 -2
- package/dist/{index-CPzbMghQ.d.mts → index-CIXOwe6g.d.mts} +2 -2
- package/dist/{index-ClLZCbcm.d.mts → index-DcY0e3S5.d.mts} +4 -43
- package/dist/{index-DDqKNFh4.d.mts → index-i6QUsr5p.d.mts} +2 -2
- package/dist/{package-json-DUY2kB6z.mjs → package-json-3H5gfhA4.mjs} +2 -2
- package/dist/package-json-3H5gfhA4.mjs.map +1 -0
- package/dist/package-json-DTDAqRRJ.mjs +3 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +2 -2
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -2
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -2
- package/dist/plugin/builtin/seed/index.d.mts +2 -2
- package/dist/plugin/index.d.mts +1 -1
- package/dist/telemetry-Dhzj9Ncm.mjs +3 -0
- package/dist/{telemetry-rFq0QdvJ.mjs → telemetry-DuBhnd0X.mjs} +2 -2
- package/dist/telemetry-DuBhnd0X.mjs.map +1 -0
- package/dist/{types-CJF3Y1x8.d.mts → types-C14GuyPI.d.mts} +87 -3
- package/dist/{types-CblXasFV.d.mts → types-CNw4p8V7.d.mts} +2 -2
- package/dist/{update-Cr5c7h1r.mjs → update-DkpWgrzL.mjs} +338 -160
- package/dist/update-DkpWgrzL.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +3 -3
- package/docs/cli/application.md +2 -0
- package/package.json +1 -1
- package/dist/application-A6PZjujv.mjs.map +0 -1
- package/dist/package-json-DUY2kB6z.mjs.map +0 -1
- package/dist/package-json-Dd1AnA5F.mjs +0 -3
- package/dist/telemetry-9A1BZqbl.mjs +0 -3
- package/dist/telemetry-rFq0QdvJ.mjs.map +0 -1
- package/dist/update-Cr5c7h1r.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./chunk-CqAI0b6X.mjs";
|
|
2
2
|
import "./brand-BZJCv6UY.mjs";
|
|
3
|
-
import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-
|
|
4
|
-
import "./package-json-
|
|
3
|
+
import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-Bli2ieqY.mjs";
|
|
4
|
+
import "./package-json-3H5gfhA4.mjs";
|
|
5
5
|
import "./file-utils-GX_tGWl4.mjs";
|
|
6
6
|
import "./kysely-type-Cpq5TNGY.mjs";
|
|
7
7
|
import "./seed-CeUEANfQ.mjs";
|
package/dist/cli/index.mjs
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import "../chunk-CqAI0b6X.mjs";
|
|
3
3
|
import "../schema-D5Cpd8fQ.mjs";
|
|
4
4
|
import "../brand-BZJCv6UY.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as readPackageJson } from "../package-json-
|
|
5
|
+
import { A as generateCommand$1, At as getMigrationFiles, C as resumeCommand, Et as formatMigrationNumber, F as removeCommand$1, Gt as deploymentArgs, H as listCommand$6, Ht as apiCommand, I as listCommand$7, Jt as workspaceArgs, K as webhookCommand, Kt as jsonArgs, Mt as isValidMigrationNumber, N as showCommand, Nt as loadDiff, O as truncateCommand, Q as jobsCommand, R as getCommand$2, Rt as getNamespacesWithMigrations, S as healthCommand, T as listCommand$8, Ut as commonArgs, V as tokenCommand, W as generate, Wt as confirmationArgs, Y as listCommand$5, _ as createCommand$3, a as listCommand$10, at as executionsCommand, b as listCommand$9, ct as functionExecutionStatusToString, d as listCommand$11, ft as apply, gt as parseMigrationLabelNumber, h as deleteCommand$3, j as logBetaWarning, kt as getMigrationFilePath, l as restoreCommand, lt as formatKeyValueTable, p as getCommand$4, q as triggerCommand, qt as withCommonArgs, r as removeCommand, rt as getCommand$3, s as inviteCommand, t as updateCommand$2, tt as startCommand, ut as getCommand$1, zt as trnPrefix } from "../update-DkpWgrzL.mjs";
|
|
6
|
+
import { B as FunctionExecution_Type, C as initOAuth2Client, Q as PATScope, S as fetchUserInfo, _ as loadWorkspaceId, b as fetchAll, ct as logger, i as loadConfig, lt as styles, m as loadAccessToken, p as fetchLatestToken, v as readPlatformConfig, w as initOperatorClient, y as writePlatformConfig } from "../application-Bli2ieqY.mjs";
|
|
7
|
+
import { t as readPackageJson } from "../package-json-3H5gfhA4.mjs";
|
|
8
8
|
import "../file-utils-GX_tGWl4.mjs";
|
|
9
9
|
import "../kysely-type-Cpq5TNGY.mjs";
|
|
10
10
|
import "../seed-CeUEANfQ.mjs";
|
|
11
|
-
import "../telemetry-
|
|
11
|
+
import "../telemetry-DuBhnd0X.mjs";
|
|
12
12
|
import { createRequire, register } from "node:module";
|
|
13
13
|
import { arg, defineCommand, runCommand, runMain } from "politty";
|
|
14
14
|
import { withCompletionCommand } from "politty/completion";
|
|
@@ -19,16 +19,47 @@ import { generateCodeVerifier } from "@badgateway/oauth2-client";
|
|
|
19
19
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
20
20
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
21
21
|
import ml from "multiline-ts";
|
|
22
|
+
import * as crypto from "node:crypto";
|
|
22
23
|
import * as fs$2 from "fs";
|
|
23
24
|
import pLimit from "p-limit";
|
|
24
|
-
import * as crypto from "node:crypto";
|
|
25
25
|
import { spawn, spawnSync } from "node:child_process";
|
|
26
26
|
import * as http from "node:http";
|
|
27
27
|
import open from "open";
|
|
28
28
|
import { lookup } from "mime-types";
|
|
29
29
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
30
30
|
|
|
31
|
-
//#region src/cli/
|
|
31
|
+
//#region src/cli/commands/apply/index.ts
|
|
32
|
+
const applyCommand = defineCommand({
|
|
33
|
+
name: "apply",
|
|
34
|
+
description: "Apply Tailor configuration to deploy your application.",
|
|
35
|
+
args: z.object({
|
|
36
|
+
...commonArgs,
|
|
37
|
+
...deploymentArgs,
|
|
38
|
+
...confirmationArgs,
|
|
39
|
+
"dry-run": arg(z.boolean().optional(), {
|
|
40
|
+
alias: "d",
|
|
41
|
+
description: "Run the command without making any changes"
|
|
42
|
+
}),
|
|
43
|
+
"no-schema-check": arg(z.boolean().optional(), { description: "Skip schema diff check against migration snapshots" }),
|
|
44
|
+
"no-cache": arg(z.boolean().optional(), { description: "Disable bundle caching for this run" }),
|
|
45
|
+
"clean-cache": arg(z.boolean().optional(), { description: "Clean the bundle cache before building" })
|
|
46
|
+
}),
|
|
47
|
+
run: withCommonArgs(async (args) => {
|
|
48
|
+
await apply({
|
|
49
|
+
workspaceId: args["workspace-id"],
|
|
50
|
+
profile: args.profile,
|
|
51
|
+
configPath: args.config,
|
|
52
|
+
dryRun: args["dry-run"],
|
|
53
|
+
yes: args.yes,
|
|
54
|
+
noSchemaCheck: args["no-schema-check"],
|
|
55
|
+
noCache: args["no-cache"],
|
|
56
|
+
cleanCache: args["clean-cache"]
|
|
57
|
+
});
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/cli/commands/executor/index.ts
|
|
32
63
|
const executorCommand = defineCommand({
|
|
33
64
|
name: "executor",
|
|
34
65
|
description: "Manage executors",
|
|
@@ -45,7 +76,7 @@ const executorCommand = defineCommand({
|
|
|
45
76
|
});
|
|
46
77
|
|
|
47
78
|
//#endregion
|
|
48
|
-
//#region src/cli/function/logs.ts
|
|
79
|
+
//#region src/cli/commands/function/logs.ts
|
|
49
80
|
/**
|
|
50
81
|
* Convert function execution type enum to string.
|
|
51
82
|
* @param type - Function execution type enum value
|
|
@@ -168,7 +199,7 @@ const logsCommand = defineCommand({
|
|
|
168
199
|
});
|
|
169
200
|
|
|
170
201
|
//#endregion
|
|
171
|
-
//#region src/cli/function/index.ts
|
|
202
|
+
//#region src/cli/commands/function/index.ts
|
|
172
203
|
const functionCommand = defineCommand({
|
|
173
204
|
name: "function",
|
|
174
205
|
description: "Manage functions",
|
|
@@ -179,7 +210,31 @@ const functionCommand = defineCommand({
|
|
|
179
210
|
});
|
|
180
211
|
|
|
181
212
|
//#endregion
|
|
182
|
-
//#region src/cli/
|
|
213
|
+
//#region src/cli/commands/generate/index.ts
|
|
214
|
+
const generateCommand = defineCommand({
|
|
215
|
+
name: "generate",
|
|
216
|
+
description: "Generate files using Tailor configuration.",
|
|
217
|
+
args: z.object({
|
|
218
|
+
...commonArgs,
|
|
219
|
+
config: arg(z.string().default("tailor.config.ts"), {
|
|
220
|
+
alias: "c",
|
|
221
|
+
description: "Path to SDK config file"
|
|
222
|
+
}),
|
|
223
|
+
watch: arg(z.boolean().default(false), {
|
|
224
|
+
alias: "W",
|
|
225
|
+
description: "Watch for type/resolver changes and regenerate"
|
|
226
|
+
})
|
|
227
|
+
}),
|
|
228
|
+
run: withCommonArgs(async (args) => {
|
|
229
|
+
await generate({
|
|
230
|
+
configPath: args.config,
|
|
231
|
+
watch: args.watch
|
|
232
|
+
});
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/cli/commands/init.ts
|
|
183
238
|
const detectPackageManager = () => {
|
|
184
239
|
const availablePMs = [
|
|
185
240
|
"npm",
|
|
@@ -227,7 +282,7 @@ const initCommand = defineCommand({
|
|
|
227
282
|
});
|
|
228
283
|
|
|
229
284
|
//#endregion
|
|
230
|
-
//#region src/cli/login.ts
|
|
285
|
+
//#region src/cli/commands/login.ts
|
|
231
286
|
const redirectPort = 8085;
|
|
232
287
|
const redirectUri = `http://localhost:${redirectPort}/callback`;
|
|
233
288
|
function randomState() {
|
|
@@ -308,7 +363,7 @@ const loginCommand = defineCommand({
|
|
|
308
363
|
});
|
|
309
364
|
|
|
310
365
|
//#endregion
|
|
311
|
-
//#region src/cli/logout.ts
|
|
366
|
+
//#region src/cli/commands/logout.ts
|
|
312
367
|
const logoutCommand = defineCommand({
|
|
313
368
|
name: "logout",
|
|
314
369
|
description: "Logout from Tailor Platform.",
|
|
@@ -333,7 +388,7 @@ const logoutCommand = defineCommand({
|
|
|
333
388
|
});
|
|
334
389
|
|
|
335
390
|
//#endregion
|
|
336
|
-
//#region src/cli/machineuser/index.ts
|
|
391
|
+
//#region src/cli/commands/machineuser/index.ts
|
|
337
392
|
const machineuserCommand = defineCommand({
|
|
338
393
|
name: "machineuser",
|
|
339
394
|
description: "Manage machine users in your Tailor Platform application.",
|
|
@@ -347,7 +402,7 @@ const machineuserCommand = defineCommand({
|
|
|
347
402
|
});
|
|
348
403
|
|
|
349
404
|
//#endregion
|
|
350
|
-
//#region src/cli/oauth2client/index.ts
|
|
405
|
+
//#region src/cli/commands/oauth2client/index.ts
|
|
351
406
|
const oauth2clientCommand = defineCommand({
|
|
352
407
|
name: "oauth2client",
|
|
353
408
|
description: "Manage OAuth2 clients in your Tailor Platform application.",
|
|
@@ -361,7 +416,7 @@ const oauth2clientCommand = defineCommand({
|
|
|
361
416
|
});
|
|
362
417
|
|
|
363
418
|
//#endregion
|
|
364
|
-
//#region src/cli/open.ts
|
|
419
|
+
//#region src/cli/commands/open.ts
|
|
365
420
|
const consoleBaseUrl = "https://console.tailor.tech";
|
|
366
421
|
const openCommand = defineCommand({
|
|
367
422
|
name: "open",
|
|
@@ -392,7 +447,7 @@ const openCommand = defineCommand({
|
|
|
392
447
|
});
|
|
393
448
|
|
|
394
449
|
//#endregion
|
|
395
|
-
//#region src/cli/profile/create.ts
|
|
450
|
+
//#region src/cli/commands/profile/create.ts
|
|
396
451
|
const createCommand$2 = defineCommand({
|
|
397
452
|
name: "create",
|
|
398
453
|
description: "Create a new profile.",
|
|
@@ -439,7 +494,7 @@ const createCommand$2 = defineCommand({
|
|
|
439
494
|
});
|
|
440
495
|
|
|
441
496
|
//#endregion
|
|
442
|
-
//#region src/cli/profile/delete.ts
|
|
497
|
+
//#region src/cli/commands/profile/delete.ts
|
|
443
498
|
const deleteCommand$2 = defineCommand({
|
|
444
499
|
name: "delete",
|
|
445
500
|
description: "Delete a profile.",
|
|
@@ -460,7 +515,7 @@ const deleteCommand$2 = defineCommand({
|
|
|
460
515
|
});
|
|
461
516
|
|
|
462
517
|
//#endregion
|
|
463
|
-
//#region src/cli/profile/list.ts
|
|
518
|
+
//#region src/cli/commands/profile/list.ts
|
|
464
519
|
const listCommand$4 = defineCommand({
|
|
465
520
|
name: "list",
|
|
466
521
|
description: "List all profiles.",
|
|
@@ -488,7 +543,7 @@ const listCommand$4 = defineCommand({
|
|
|
488
543
|
});
|
|
489
544
|
|
|
490
545
|
//#endregion
|
|
491
|
-
//#region src/cli/profile/update.ts
|
|
546
|
+
//#region src/cli/commands/profile/update.ts
|
|
492
547
|
const updateCommand$1 = defineCommand({
|
|
493
548
|
name: "update",
|
|
494
549
|
description: "Update profile properties.",
|
|
@@ -539,7 +594,7 @@ const updateCommand$1 = defineCommand({
|
|
|
539
594
|
});
|
|
540
595
|
|
|
541
596
|
//#endregion
|
|
542
|
-
//#region src/cli/profile/index.ts
|
|
597
|
+
//#region src/cli/commands/profile/index.ts
|
|
543
598
|
const profileCommand = defineCommand({
|
|
544
599
|
name: "profile",
|
|
545
600
|
description: "Manage workspace profiles (user + workspace combinations).",
|
|
@@ -555,7 +610,7 @@ const profileCommand = defineCommand({
|
|
|
555
610
|
});
|
|
556
611
|
|
|
557
612
|
//#endregion
|
|
558
|
-
//#region src/cli/secret/args.ts
|
|
613
|
+
//#region src/cli/commands/secret/args.ts
|
|
559
614
|
/**
|
|
560
615
|
* Arguments for specify secret key
|
|
561
616
|
*/
|
|
@@ -585,7 +640,7 @@ const secretValueArgs = {
|
|
|
585
640
|
};
|
|
586
641
|
|
|
587
642
|
//#endregion
|
|
588
|
-
//#region src/cli/secret/create.ts
|
|
643
|
+
//#region src/cli/commands/secret/create.ts
|
|
589
644
|
const createSecretCommand = defineCommand({
|
|
590
645
|
name: "create",
|
|
591
646
|
description: "Create a secret in a vault.",
|
|
@@ -622,7 +677,7 @@ const createSecretCommand = defineCommand({
|
|
|
622
677
|
});
|
|
623
678
|
|
|
624
679
|
//#endregion
|
|
625
|
-
//#region src/cli/secret/delete.ts
|
|
680
|
+
//#region src/cli/commands/secret/delete.ts
|
|
626
681
|
const deleteSecretCommand = defineCommand({
|
|
627
682
|
name: "delete",
|
|
628
683
|
description: "Delete a secret in a vault.",
|
|
@@ -662,7 +717,7 @@ const deleteSecretCommand = defineCommand({
|
|
|
662
717
|
});
|
|
663
718
|
|
|
664
719
|
//#endregion
|
|
665
|
-
//#region src/cli/secret/list.ts
|
|
720
|
+
//#region src/cli/commands/secret/list.ts
|
|
666
721
|
function secretInfo(secret) {
|
|
667
722
|
return {
|
|
668
723
|
name: secret.name,
|
|
@@ -719,7 +774,7 @@ const listSecretCommand = defineCommand({
|
|
|
719
774
|
});
|
|
720
775
|
|
|
721
776
|
//#endregion
|
|
722
|
-
//#region src/cli/secret/update.ts
|
|
777
|
+
//#region src/cli/commands/secret/update.ts
|
|
723
778
|
const updateSecretCommand = defineCommand({
|
|
724
779
|
name: "update",
|
|
725
780
|
description: "Update a secret in a vault.",
|
|
@@ -753,14 +808,14 @@ const updateSecretCommand = defineCommand({
|
|
|
753
808
|
});
|
|
754
809
|
|
|
755
810
|
//#endregion
|
|
756
|
-
//#region src/cli/secret/vault/args.ts
|
|
811
|
+
//#region src/cli/commands/secret/vault/args.ts
|
|
757
812
|
const nameArgs = { name: arg(z.string(), {
|
|
758
813
|
positional: true,
|
|
759
814
|
description: "Vault name"
|
|
760
815
|
}) };
|
|
761
816
|
|
|
762
817
|
//#endregion
|
|
763
|
-
//#region src/cli/secret/vault/create.ts
|
|
818
|
+
//#region src/cli/commands/secret/vault/create.ts
|
|
764
819
|
const createCommand$1 = defineCommand({
|
|
765
820
|
name: "create",
|
|
766
821
|
description: "Create a new Secret Manager vault.",
|
|
@@ -792,7 +847,7 @@ const createCommand$1 = defineCommand({
|
|
|
792
847
|
});
|
|
793
848
|
|
|
794
849
|
//#endregion
|
|
795
|
-
//#region src/cli/secret/vault/delete.ts
|
|
850
|
+
//#region src/cli/commands/secret/vault/delete.ts
|
|
796
851
|
const deleteCommand$1 = defineCommand({
|
|
797
852
|
name: "delete",
|
|
798
853
|
description: "Delete a Secret Manager vault.",
|
|
@@ -831,7 +886,7 @@ const deleteCommand$1 = defineCommand({
|
|
|
831
886
|
});
|
|
832
887
|
|
|
833
888
|
//#endregion
|
|
834
|
-
//#region src/cli/secret/vault/list.ts
|
|
889
|
+
//#region src/cli/commands/secret/vault/list.ts
|
|
835
890
|
function vaultInfo(vault) {
|
|
836
891
|
return {
|
|
837
892
|
name: vault.name,
|
|
@@ -880,7 +935,7 @@ const listCommand$3 = defineCommand({
|
|
|
880
935
|
});
|
|
881
936
|
|
|
882
937
|
//#endregion
|
|
883
|
-
//#region src/cli/secret/vault/index.ts
|
|
938
|
+
//#region src/cli/commands/secret/vault/index.ts
|
|
884
939
|
const vaultCommand = defineCommand({
|
|
885
940
|
name: "vault",
|
|
886
941
|
description: "Manage Secret Manager vaults.",
|
|
@@ -895,7 +950,7 @@ const vaultCommand = defineCommand({
|
|
|
895
950
|
});
|
|
896
951
|
|
|
897
952
|
//#endregion
|
|
898
|
-
//#region src/cli/secret/index.ts
|
|
953
|
+
//#region src/cli/commands/secret/index.ts
|
|
899
954
|
const secretCommand = defineCommand({
|
|
900
955
|
name: "secret",
|
|
901
956
|
description: "Manage Secret Manager vaults and secrets.",
|
|
@@ -912,7 +967,7 @@ const secretCommand = defineCommand({
|
|
|
912
967
|
});
|
|
913
968
|
|
|
914
969
|
//#endregion
|
|
915
|
-
//#region src/cli/
|
|
970
|
+
//#region src/cli/shared/progress.ts
|
|
916
971
|
/**
|
|
917
972
|
* Create a simple progress reporter that writes updates to stderr.
|
|
918
973
|
* @param label - Label to prefix progress output
|
|
@@ -949,7 +1004,7 @@ async function withTimeout(p, ms, message) {
|
|
|
949
1004
|
}
|
|
950
1005
|
|
|
951
1006
|
//#endregion
|
|
952
|
-
//#region src/cli/staticwebsite/deploy.ts
|
|
1007
|
+
//#region src/cli/commands/staticwebsite/deploy.ts
|
|
953
1008
|
const CHUNK_SIZE = 64 * 1024;
|
|
954
1009
|
const IGNORED_FILES = new Set([
|
|
955
1010
|
".DS_Store",
|
|
@@ -1112,7 +1167,7 @@ const deployCommand = defineCommand({
|
|
|
1112
1167
|
});
|
|
1113
1168
|
|
|
1114
1169
|
//#endregion
|
|
1115
|
-
//#region src/cli/staticwebsite/get.ts
|
|
1170
|
+
//#region src/cli/commands/staticwebsite/get.ts
|
|
1116
1171
|
const getCommand = defineCommand({
|
|
1117
1172
|
name: "get",
|
|
1118
1173
|
description: "Get details of a specific static website.",
|
|
@@ -1157,7 +1212,7 @@ const getCommand = defineCommand({
|
|
|
1157
1212
|
});
|
|
1158
1213
|
|
|
1159
1214
|
//#endregion
|
|
1160
|
-
//#region src/cli/staticwebsite/list.ts
|
|
1215
|
+
//#region src/cli/commands/staticwebsite/list.ts
|
|
1161
1216
|
/**
|
|
1162
1217
|
* List static websites in the workspace.
|
|
1163
1218
|
* @param options - Static website listing options
|
|
@@ -1217,7 +1272,7 @@ const listCommand$2 = defineCommand({
|
|
|
1217
1272
|
});
|
|
1218
1273
|
|
|
1219
1274
|
//#endregion
|
|
1220
|
-
//#region src/cli/staticwebsite/index.ts
|
|
1275
|
+
//#region src/cli/commands/staticwebsite/index.ts
|
|
1221
1276
|
const staticwebsiteCommand = defineCommand({
|
|
1222
1277
|
name: "staticwebsite",
|
|
1223
1278
|
description: "Manage static websites in your workspace.",
|
|
@@ -1232,7 +1287,7 @@ const staticwebsiteCommand = defineCommand({
|
|
|
1232
1287
|
});
|
|
1233
1288
|
|
|
1234
1289
|
//#endregion
|
|
1235
|
-
//#region src/cli/
|
|
1290
|
+
//#region src/cli/shared/resolve-cli-bin.ts
|
|
1236
1291
|
/**
|
|
1237
1292
|
* Resolve a CLI binary path from the SDK's dependencies.
|
|
1238
1293
|
* @param options - Resolution options for locating the CLI binary.
|
|
@@ -1253,7 +1308,7 @@ function resolveCliBinPath(options) {
|
|
|
1253
1308
|
}
|
|
1254
1309
|
|
|
1255
1310
|
//#endregion
|
|
1256
|
-
//#region src/cli/tailordb/erd/schema.ts
|
|
1311
|
+
//#region src/cli/commands/tailordb/erd/schema.ts
|
|
1257
1312
|
/**
|
|
1258
1313
|
* Convert TailorDB field config to tbls column definition.
|
|
1259
1314
|
* @param fieldName - Field name
|
|
@@ -1403,7 +1458,7 @@ async function writeTblsSchemaToFile(options) {
|
|
|
1403
1458
|
}
|
|
1404
1459
|
|
|
1405
1460
|
//#endregion
|
|
1406
|
-
//#region src/cli/tailordb/erd/utils.ts
|
|
1461
|
+
//#region src/cli/commands/tailordb/erd/utils.ts
|
|
1407
1462
|
/**
|
|
1408
1463
|
* Initialize shared ERD command context.
|
|
1409
1464
|
* @param args - CLI arguments.
|
|
@@ -1428,7 +1483,7 @@ async function initErdContext(args) {
|
|
|
1428
1483
|
}
|
|
1429
1484
|
|
|
1430
1485
|
//#endregion
|
|
1431
|
-
//#region src/cli/tailordb/erd/export.ts
|
|
1486
|
+
//#region src/cli/commands/tailordb/erd/export.ts
|
|
1432
1487
|
const DEFAULT_ERD_BASE_DIR = ".tailor-sdk/erd";
|
|
1433
1488
|
/**
|
|
1434
1489
|
* Resolve TailorDB config and namespace.
|
|
@@ -1610,7 +1665,7 @@ const erdExportCommand = defineCommand({
|
|
|
1610
1665
|
});
|
|
1611
1666
|
|
|
1612
1667
|
//#endregion
|
|
1613
|
-
//#region src/cli/tailordb/erd/deploy.ts
|
|
1668
|
+
//#region src/cli/commands/tailordb/erd/deploy.ts
|
|
1614
1669
|
const erdDeployCommand = defineCommand({
|
|
1615
1670
|
name: "deploy",
|
|
1616
1671
|
description: "Deploy ERD static website for TailorDB namespace(s).",
|
|
@@ -1655,7 +1710,7 @@ const erdDeployCommand = defineCommand({
|
|
|
1655
1710
|
});
|
|
1656
1711
|
|
|
1657
1712
|
//#endregion
|
|
1658
|
-
//#region src/cli/tailordb/erd/serve.ts
|
|
1713
|
+
//#region src/cli/commands/tailordb/erd/serve.ts
|
|
1659
1714
|
function formatServeCommand(namespace) {
|
|
1660
1715
|
return `tailor-sdk tailordb erd serve --namespace ${namespace}`;
|
|
1661
1716
|
}
|
|
@@ -1720,7 +1775,7 @@ const erdServeCommand = defineCommand({
|
|
|
1720
1775
|
});
|
|
1721
1776
|
|
|
1722
1777
|
//#endregion
|
|
1723
|
-
//#region src/cli/tailordb/erd/index.ts
|
|
1778
|
+
//#region src/cli/commands/tailordb/erd/index.ts
|
|
1724
1779
|
const erdCommand = defineCommand({
|
|
1725
1780
|
name: "erd",
|
|
1726
1781
|
description: "Generate ERD artifacts for TailorDB namespaces using Liam ERD. (beta)",
|
|
@@ -1732,7 +1787,7 @@ const erdCommand = defineCommand({
|
|
|
1732
1787
|
});
|
|
1733
1788
|
|
|
1734
1789
|
//#endregion
|
|
1735
|
-
//#region src/cli/tailordb/migrate/set.ts
|
|
1790
|
+
//#region src/cli/commands/tailordb/migrate/set.ts
|
|
1736
1791
|
/**
|
|
1737
1792
|
* Set migration checkpoint for a TailorDB namespace
|
|
1738
1793
|
* @param {SetOptions} options - Command options
|
|
@@ -1834,7 +1889,7 @@ const setCommand = defineCommand({
|
|
|
1834
1889
|
});
|
|
1835
1890
|
|
|
1836
1891
|
//#endregion
|
|
1837
|
-
//#region src/cli/tailordb/migrate/status.ts
|
|
1892
|
+
//#region src/cli/commands/tailordb/migrate/status.ts
|
|
1838
1893
|
/**
|
|
1839
1894
|
* Show migration status for TailorDB namespaces
|
|
1840
1895
|
* @param {StatusOptions} options - Command options
|
|
@@ -1905,7 +1960,7 @@ const statusCommand = defineCommand({
|
|
|
1905
1960
|
});
|
|
1906
1961
|
|
|
1907
1962
|
//#endregion
|
|
1908
|
-
//#region src/cli/tailordb/migrate/index.ts
|
|
1963
|
+
//#region src/cli/commands/tailordb/migrate/index.ts
|
|
1909
1964
|
/**
|
|
1910
1965
|
* TailorDB migration command
|
|
1911
1966
|
*
|
|
@@ -1918,14 +1973,14 @@ const migrationCommand = defineCommand({
|
|
|
1918
1973
|
name: "migration",
|
|
1919
1974
|
description: "Manage TailorDB schema migrations.",
|
|
1920
1975
|
subCommands: {
|
|
1921
|
-
generate: generateCommand,
|
|
1976
|
+
generate: generateCommand$1,
|
|
1922
1977
|
set: setCommand,
|
|
1923
1978
|
status: statusCommand
|
|
1924
1979
|
}
|
|
1925
1980
|
});
|
|
1926
1981
|
|
|
1927
1982
|
//#endregion
|
|
1928
|
-
//#region src/cli/tailordb/index.ts
|
|
1983
|
+
//#region src/cli/commands/tailordb/index.ts
|
|
1929
1984
|
const tailordbCommand = defineCommand({
|
|
1930
1985
|
name: "tailordb",
|
|
1931
1986
|
description: "Manage TailorDB tables and data.",
|
|
@@ -1937,7 +1992,7 @@ const tailordbCommand = defineCommand({
|
|
|
1937
1992
|
});
|
|
1938
1993
|
|
|
1939
1994
|
//#endregion
|
|
1940
|
-
//#region src/cli/user/current.ts
|
|
1995
|
+
//#region src/cli/commands/user/current.ts
|
|
1941
1996
|
const currentCommand = defineCommand({
|
|
1942
1997
|
name: "current",
|
|
1943
1998
|
description: "Show current user.",
|
|
@@ -1957,7 +2012,7 @@ const currentCommand = defineCommand({
|
|
|
1957
2012
|
});
|
|
1958
2013
|
|
|
1959
2014
|
//#endregion
|
|
1960
|
-
//#region src/cli/user/list.ts
|
|
2015
|
+
//#region src/cli/commands/user/list.ts
|
|
1961
2016
|
const listCommand$1 = defineCommand({
|
|
1962
2017
|
name: "list",
|
|
1963
2018
|
description: "List all users.",
|
|
@@ -1987,7 +2042,7 @@ const listCommand$1 = defineCommand({
|
|
|
1987
2042
|
});
|
|
1988
2043
|
|
|
1989
2044
|
//#endregion
|
|
1990
|
-
//#region src/cli/user/pat/transform.ts
|
|
2045
|
+
//#region src/cli/commands/user/pat/transform.ts
|
|
1991
2046
|
function patScopeToString(scope) {
|
|
1992
2047
|
switch (scope) {
|
|
1993
2048
|
case PATScope.PAT_SCOPE_READ: return "read";
|
|
@@ -2043,7 +2098,7 @@ function printCreatedToken(name, token, write, action) {
|
|
|
2043
2098
|
}
|
|
2044
2099
|
|
|
2045
2100
|
//#endregion
|
|
2046
|
-
//#region src/cli/user/pat/create.ts
|
|
2101
|
+
//#region src/cli/commands/user/pat/create.ts
|
|
2047
2102
|
const createCommand = defineCommand({
|
|
2048
2103
|
name: "create",
|
|
2049
2104
|
description: "Create a new personal access token.",
|
|
@@ -2077,7 +2132,7 @@ const createCommand = defineCommand({
|
|
|
2077
2132
|
});
|
|
2078
2133
|
|
|
2079
2134
|
//#endregion
|
|
2080
|
-
//#region src/cli/user/pat/delete.ts
|
|
2135
|
+
//#region src/cli/commands/user/pat/delete.ts
|
|
2081
2136
|
const deleteCommand = defineCommand({
|
|
2082
2137
|
name: "delete",
|
|
2083
2138
|
description: "Delete a personal access token.",
|
|
@@ -2100,7 +2155,7 @@ const deleteCommand = defineCommand({
|
|
|
2100
2155
|
});
|
|
2101
2156
|
|
|
2102
2157
|
//#endregion
|
|
2103
|
-
//#region src/cli/user/pat/list.ts
|
|
2158
|
+
//#region src/cli/commands/user/pat/list.ts
|
|
2104
2159
|
const listCommand = defineCommand({
|
|
2105
2160
|
name: "list",
|
|
2106
2161
|
description: "List all personal access tokens.",
|
|
@@ -2145,7 +2200,7 @@ const listCommand = defineCommand({
|
|
|
2145
2200
|
});
|
|
2146
2201
|
|
|
2147
2202
|
//#endregion
|
|
2148
|
-
//#region src/cli/user/pat/update.ts
|
|
2203
|
+
//#region src/cli/commands/user/pat/update.ts
|
|
2149
2204
|
const updateCommand = defineCommand({
|
|
2150
2205
|
name: "update",
|
|
2151
2206
|
description: "Update a personal access token (delete and recreate).",
|
|
@@ -2180,7 +2235,7 @@ const updateCommand = defineCommand({
|
|
|
2180
2235
|
});
|
|
2181
2236
|
|
|
2182
2237
|
//#endregion
|
|
2183
|
-
//#region src/cli/user/pat/index.ts
|
|
2238
|
+
//#region src/cli/commands/user/pat/index.ts
|
|
2184
2239
|
const patCommand = defineCommand({
|
|
2185
2240
|
name: "pat",
|
|
2186
2241
|
description: "Manage personal access tokens.",
|
|
@@ -2197,7 +2252,7 @@ const patCommand = defineCommand({
|
|
|
2197
2252
|
});
|
|
2198
2253
|
|
|
2199
2254
|
//#endregion
|
|
2200
|
-
//#region src/cli/user/switch.ts
|
|
2255
|
+
//#region src/cli/commands/user/switch.ts
|
|
2201
2256
|
const switchCommand = defineCommand({
|
|
2202
2257
|
name: "switch",
|
|
2203
2258
|
description: "Set current user.",
|
|
@@ -2221,7 +2276,7 @@ const switchCommand = defineCommand({
|
|
|
2221
2276
|
});
|
|
2222
2277
|
|
|
2223
2278
|
//#endregion
|
|
2224
|
-
//#region src/cli/user/index.ts
|
|
2279
|
+
//#region src/cli/commands/user/index.ts
|
|
2225
2280
|
const userCommand$1 = defineCommand({
|
|
2226
2281
|
name: "user",
|
|
2227
2282
|
description: "Manage Tailor Platform users.",
|
|
@@ -2237,7 +2292,7 @@ const userCommand$1 = defineCommand({
|
|
|
2237
2292
|
});
|
|
2238
2293
|
|
|
2239
2294
|
//#endregion
|
|
2240
|
-
//#region src/cli/workflow/index.ts
|
|
2295
|
+
//#region src/cli/commands/workflow/index.ts
|
|
2241
2296
|
const workflowCommand = defineCommand({
|
|
2242
2297
|
name: "workflow",
|
|
2243
2298
|
description: "Manage workflows and workflow executions.",
|
|
@@ -2254,7 +2309,7 @@ const workflowCommand = defineCommand({
|
|
|
2254
2309
|
});
|
|
2255
2310
|
|
|
2256
2311
|
//#endregion
|
|
2257
|
-
//#region src/cli/workspace/app/index.ts
|
|
2312
|
+
//#region src/cli/commands/workspace/app/index.ts
|
|
2258
2313
|
const appCommand = defineCommand({
|
|
2259
2314
|
name: "app",
|
|
2260
2315
|
description: "Manage workspace applications",
|
|
@@ -2268,7 +2323,7 @@ const appCommand = defineCommand({
|
|
|
2268
2323
|
});
|
|
2269
2324
|
|
|
2270
2325
|
//#endregion
|
|
2271
|
-
//#region src/cli/workspace/user/index.ts
|
|
2326
|
+
//#region src/cli/commands/workspace/user/index.ts
|
|
2272
2327
|
const userCommand = defineCommand({
|
|
2273
2328
|
name: "user",
|
|
2274
2329
|
description: "Manage workspace users",
|
|
@@ -2284,7 +2339,7 @@ const userCommand = defineCommand({
|
|
|
2284
2339
|
});
|
|
2285
2340
|
|
|
2286
2341
|
//#endregion
|
|
2287
|
-
//#region src/cli/workspace/index.ts
|
|
2342
|
+
//#region src/cli/commands/workspace/index.ts
|
|
2288
2343
|
const workspaceCommand = defineCommand({
|
|
2289
2344
|
name: "workspace",
|
|
2290
2345
|
description: "Manage Tailor Platform workspaces.",
|
|
@@ -2315,7 +2370,7 @@ const mainCommand = withCompletionCommand(defineCommand({
|
|
|
2315
2370
|
apply: applyCommand,
|
|
2316
2371
|
executor: executorCommand,
|
|
2317
2372
|
function: functionCommand,
|
|
2318
|
-
generate: generateCommand
|
|
2373
|
+
generate: generateCommand,
|
|
2319
2374
|
init: initCommand,
|
|
2320
2375
|
login: loginCommand,
|
|
2321
2376
|
logout: logoutCommand,
|