@tailor-platform/sdk 1.18.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 +53 -0
- package/dist/{application-gWUyKuzv.mjs → application-Bli2ieqY.mjs} +2704 -2394
- package/dist/application-Bli2ieqY.mjs.map +1 -0
- package/dist/application-CZdieD3K.mjs +9 -0
- package/dist/cli/index.mjs +121 -64
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +122 -58
- package/dist/cli/lib.mjs +11 -9
- 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 +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{enum-constants-Cwd4qdpa.mjs → enum-constants-CGVvu3dd.mjs} +1 -1
- package/dist/{enum-constants-Cwd4qdpa.mjs.map → enum-constants-CGVvu3dd.mjs.map} +1 -1
- package/dist/{file-utils-cqcpFk87.mjs → file-utils-GX_tGWl4.mjs} +1 -1
- package/dist/{file-utils-cqcpFk87.mjs.map → file-utils-GX_tGWl4.mjs.map} +1 -1
- package/dist/{index-sSDpuVQY.d.mts → index-B86CIKCW.d.mts} +2 -2
- package/dist/{index-SqWgrTnF.d.mts → index-CGjiOz_W.d.mts} +2 -2
- package/dist/{index-BKXch-td.d.mts → index-CIXOwe6g.d.mts} +2 -2
- package/dist/{index-DP8EB9FK.d.mts → index-DcY0e3S5.d.mts} +10 -43
- package/dist/{index-C3Ib7pFc.d.mts → index-i6QUsr5p.d.mts} +2 -2
- package/dist/interceptor-D8MeZOxX.mjs +33 -0
- package/dist/interceptor-D8MeZOxX.mjs.map +1 -0
- package/dist/{jiti-DHlauMCo.mjs → jiti-DfS9jItj.mjs} +1 -1
- package/dist/{jiti-DHlauMCo.mjs.map → jiti-DfS9jItj.mjs.map} +1 -1
- package/dist/{kysely-type-DtUUoAi3.mjs → kysely-type-Cpq5TNGY.mjs} +2 -1
- package/dist/kysely-type-Cpq5TNGY.mjs.map +1 -0
- package/dist/package-json-3H5gfhA4.mjs +17 -0
- 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/enum-constants/index.mjs +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -2
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -2
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +2 -2
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +1 -1
- package/dist/{schema-WDvc7Zel.mjs → schema-D5Cpd8fQ.mjs} +45 -3
- package/dist/schema-D5Cpd8fQ.mjs.map +1 -0
- package/dist/{seed-Dm7lrGZ3.mjs → seed-CeUEANfQ.mjs} +1 -1
- package/dist/{seed-Dm7lrGZ3.mjs.map → seed-CeUEANfQ.mjs.map} +1 -1
- package/dist/{src-i4uqS1G4.mjs → src-Bb1UVstT.mjs} +1 -1
- package/dist/{src-i4uqS1G4.mjs.map → src-Bb1UVstT.mjs.map} +1 -1
- package/dist/telemetry-Dhzj9Ncm.mjs +3 -0
- package/dist/telemetry-DuBhnd0X.mjs +84 -0
- package/dist/telemetry-DuBhnd0X.mjs.map +1 -0
- package/dist/{types-Bhl_wAM2.d.mts → types-C14GuyPI.d.mts} +94 -3
- package/dist/{types-DdvTxFiD.d.mts → types-CNw4p8V7.d.mts} +34 -10
- package/dist/types-ClK_HJ0G.mjs.map +1 -1
- package/dist/{update-BoNKMti-.mjs → update-DkpWgrzL.mjs} +548 -300
- 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 +7 -1
- package/dist/application-Csj7Ow5Q.mjs +0 -8
- package/dist/application-gWUyKuzv.mjs.map +0 -1
- package/dist/kysely-type-DtUUoAi3.mjs.map +0 -1
- package/dist/schema-WDvc7Zel.mjs.map +0 -1
- package/dist/update-BoNKMti-.mjs.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./chunk-CqAI0b6X.mjs";
|
|
2
|
+
import "./brand-BZJCv6UY.mjs";
|
|
3
|
+
import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-Bli2ieqY.mjs";
|
|
4
|
+
import "./package-json-3H5gfhA4.mjs";
|
|
5
|
+
import "./file-utils-GX_tGWl4.mjs";
|
|
6
|
+
import "./kysely-type-Cpq5TNGY.mjs";
|
|
7
|
+
import "./seed-CeUEANfQ.mjs";
|
|
8
|
+
|
|
9
|
+
export { defineApplication };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import "../chunk-CqAI0b6X.mjs";
|
|
3
|
-
import "../schema-
|
|
3
|
+
import "../schema-D5Cpd8fQ.mjs";
|
|
4
4
|
import "../brand-BZJCv6UY.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
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
|
+
import "../file-utils-GX_tGWl4.mjs";
|
|
9
|
+
import "../kysely-type-Cpq5TNGY.mjs";
|
|
10
|
+
import "../seed-CeUEANfQ.mjs";
|
|
11
|
+
import "../telemetry-DuBhnd0X.mjs";
|
|
10
12
|
import { createRequire, register } from "node:module";
|
|
11
13
|
import { arg, defineCommand, runCommand, runMain } from "politty";
|
|
12
14
|
import { withCompletionCommand } from "politty/completion";
|
|
@@ -17,16 +19,47 @@ import { generateCodeVerifier } from "@badgateway/oauth2-client";
|
|
|
17
19
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
18
20
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
19
21
|
import ml from "multiline-ts";
|
|
22
|
+
import * as crypto from "node:crypto";
|
|
20
23
|
import * as fs$2 from "fs";
|
|
21
24
|
import pLimit from "p-limit";
|
|
22
|
-
import * as crypto from "node:crypto";
|
|
23
25
|
import { spawn, spawnSync } from "node:child_process";
|
|
24
26
|
import * as http from "node:http";
|
|
25
27
|
import open from "open";
|
|
26
28
|
import { lookup } from "mime-types";
|
|
27
29
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
28
30
|
|
|
29
|
-
//#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
|
|
30
63
|
const executorCommand = defineCommand({
|
|
31
64
|
name: "executor",
|
|
32
65
|
description: "Manage executors",
|
|
@@ -43,7 +76,7 @@ const executorCommand = defineCommand({
|
|
|
43
76
|
});
|
|
44
77
|
|
|
45
78
|
//#endregion
|
|
46
|
-
//#region src/cli/function/logs.ts
|
|
79
|
+
//#region src/cli/commands/function/logs.ts
|
|
47
80
|
/**
|
|
48
81
|
* Convert function execution type enum to string.
|
|
49
82
|
* @param type - Function execution type enum value
|
|
@@ -166,7 +199,7 @@ const logsCommand = defineCommand({
|
|
|
166
199
|
});
|
|
167
200
|
|
|
168
201
|
//#endregion
|
|
169
|
-
//#region src/cli/function/index.ts
|
|
202
|
+
//#region src/cli/commands/function/index.ts
|
|
170
203
|
const functionCommand = defineCommand({
|
|
171
204
|
name: "function",
|
|
172
205
|
description: "Manage functions",
|
|
@@ -177,7 +210,31 @@ const functionCommand = defineCommand({
|
|
|
177
210
|
});
|
|
178
211
|
|
|
179
212
|
//#endregion
|
|
180
|
-
//#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
|
|
181
238
|
const detectPackageManager = () => {
|
|
182
239
|
const availablePMs = [
|
|
183
240
|
"npm",
|
|
@@ -225,7 +282,7 @@ const initCommand = defineCommand({
|
|
|
225
282
|
});
|
|
226
283
|
|
|
227
284
|
//#endregion
|
|
228
|
-
//#region src/cli/login.ts
|
|
285
|
+
//#region src/cli/commands/login.ts
|
|
229
286
|
const redirectPort = 8085;
|
|
230
287
|
const redirectUri = `http://localhost:${redirectPort}/callback`;
|
|
231
288
|
function randomState() {
|
|
@@ -306,7 +363,7 @@ const loginCommand = defineCommand({
|
|
|
306
363
|
});
|
|
307
364
|
|
|
308
365
|
//#endregion
|
|
309
|
-
//#region src/cli/logout.ts
|
|
366
|
+
//#region src/cli/commands/logout.ts
|
|
310
367
|
const logoutCommand = defineCommand({
|
|
311
368
|
name: "logout",
|
|
312
369
|
description: "Logout from Tailor Platform.",
|
|
@@ -331,7 +388,7 @@ const logoutCommand = defineCommand({
|
|
|
331
388
|
});
|
|
332
389
|
|
|
333
390
|
//#endregion
|
|
334
|
-
//#region src/cli/machineuser/index.ts
|
|
391
|
+
//#region src/cli/commands/machineuser/index.ts
|
|
335
392
|
const machineuserCommand = defineCommand({
|
|
336
393
|
name: "machineuser",
|
|
337
394
|
description: "Manage machine users in your Tailor Platform application.",
|
|
@@ -345,7 +402,7 @@ const machineuserCommand = defineCommand({
|
|
|
345
402
|
});
|
|
346
403
|
|
|
347
404
|
//#endregion
|
|
348
|
-
//#region src/cli/oauth2client/index.ts
|
|
405
|
+
//#region src/cli/commands/oauth2client/index.ts
|
|
349
406
|
const oauth2clientCommand = defineCommand({
|
|
350
407
|
name: "oauth2client",
|
|
351
408
|
description: "Manage OAuth2 clients in your Tailor Platform application.",
|
|
@@ -359,7 +416,7 @@ const oauth2clientCommand = defineCommand({
|
|
|
359
416
|
});
|
|
360
417
|
|
|
361
418
|
//#endregion
|
|
362
|
-
//#region src/cli/open.ts
|
|
419
|
+
//#region src/cli/commands/open.ts
|
|
363
420
|
const consoleBaseUrl = "https://console.tailor.tech";
|
|
364
421
|
const openCommand = defineCommand({
|
|
365
422
|
name: "open",
|
|
@@ -390,7 +447,7 @@ const openCommand = defineCommand({
|
|
|
390
447
|
});
|
|
391
448
|
|
|
392
449
|
//#endregion
|
|
393
|
-
//#region src/cli/profile/create.ts
|
|
450
|
+
//#region src/cli/commands/profile/create.ts
|
|
394
451
|
const createCommand$2 = defineCommand({
|
|
395
452
|
name: "create",
|
|
396
453
|
description: "Create a new profile.",
|
|
@@ -437,7 +494,7 @@ const createCommand$2 = defineCommand({
|
|
|
437
494
|
});
|
|
438
495
|
|
|
439
496
|
//#endregion
|
|
440
|
-
//#region src/cli/profile/delete.ts
|
|
497
|
+
//#region src/cli/commands/profile/delete.ts
|
|
441
498
|
const deleteCommand$2 = defineCommand({
|
|
442
499
|
name: "delete",
|
|
443
500
|
description: "Delete a profile.",
|
|
@@ -458,7 +515,7 @@ const deleteCommand$2 = defineCommand({
|
|
|
458
515
|
});
|
|
459
516
|
|
|
460
517
|
//#endregion
|
|
461
|
-
//#region src/cli/profile/list.ts
|
|
518
|
+
//#region src/cli/commands/profile/list.ts
|
|
462
519
|
const listCommand$4 = defineCommand({
|
|
463
520
|
name: "list",
|
|
464
521
|
description: "List all profiles.",
|
|
@@ -486,7 +543,7 @@ const listCommand$4 = defineCommand({
|
|
|
486
543
|
});
|
|
487
544
|
|
|
488
545
|
//#endregion
|
|
489
|
-
//#region src/cli/profile/update.ts
|
|
546
|
+
//#region src/cli/commands/profile/update.ts
|
|
490
547
|
const updateCommand$1 = defineCommand({
|
|
491
548
|
name: "update",
|
|
492
549
|
description: "Update profile properties.",
|
|
@@ -537,7 +594,7 @@ const updateCommand$1 = defineCommand({
|
|
|
537
594
|
});
|
|
538
595
|
|
|
539
596
|
//#endregion
|
|
540
|
-
//#region src/cli/profile/index.ts
|
|
597
|
+
//#region src/cli/commands/profile/index.ts
|
|
541
598
|
const profileCommand = defineCommand({
|
|
542
599
|
name: "profile",
|
|
543
600
|
description: "Manage workspace profiles (user + workspace combinations).",
|
|
@@ -553,7 +610,7 @@ const profileCommand = defineCommand({
|
|
|
553
610
|
});
|
|
554
611
|
|
|
555
612
|
//#endregion
|
|
556
|
-
//#region src/cli/secret/args.ts
|
|
613
|
+
//#region src/cli/commands/secret/args.ts
|
|
557
614
|
/**
|
|
558
615
|
* Arguments for specify secret key
|
|
559
616
|
*/
|
|
@@ -583,7 +640,7 @@ const secretValueArgs = {
|
|
|
583
640
|
};
|
|
584
641
|
|
|
585
642
|
//#endregion
|
|
586
|
-
//#region src/cli/secret/create.ts
|
|
643
|
+
//#region src/cli/commands/secret/create.ts
|
|
587
644
|
const createSecretCommand = defineCommand({
|
|
588
645
|
name: "create",
|
|
589
646
|
description: "Create a secret in a vault.",
|
|
@@ -620,7 +677,7 @@ const createSecretCommand = defineCommand({
|
|
|
620
677
|
});
|
|
621
678
|
|
|
622
679
|
//#endregion
|
|
623
|
-
//#region src/cli/secret/delete.ts
|
|
680
|
+
//#region src/cli/commands/secret/delete.ts
|
|
624
681
|
const deleteSecretCommand = defineCommand({
|
|
625
682
|
name: "delete",
|
|
626
683
|
description: "Delete a secret in a vault.",
|
|
@@ -660,7 +717,7 @@ const deleteSecretCommand = defineCommand({
|
|
|
660
717
|
});
|
|
661
718
|
|
|
662
719
|
//#endregion
|
|
663
|
-
//#region src/cli/secret/list.ts
|
|
720
|
+
//#region src/cli/commands/secret/list.ts
|
|
664
721
|
function secretInfo(secret) {
|
|
665
722
|
return {
|
|
666
723
|
name: secret.name,
|
|
@@ -717,7 +774,7 @@ const listSecretCommand = defineCommand({
|
|
|
717
774
|
});
|
|
718
775
|
|
|
719
776
|
//#endregion
|
|
720
|
-
//#region src/cli/secret/update.ts
|
|
777
|
+
//#region src/cli/commands/secret/update.ts
|
|
721
778
|
const updateSecretCommand = defineCommand({
|
|
722
779
|
name: "update",
|
|
723
780
|
description: "Update a secret in a vault.",
|
|
@@ -751,14 +808,14 @@ const updateSecretCommand = defineCommand({
|
|
|
751
808
|
});
|
|
752
809
|
|
|
753
810
|
//#endregion
|
|
754
|
-
//#region src/cli/secret/vault/args.ts
|
|
811
|
+
//#region src/cli/commands/secret/vault/args.ts
|
|
755
812
|
const nameArgs = { name: arg(z.string(), {
|
|
756
813
|
positional: true,
|
|
757
814
|
description: "Vault name"
|
|
758
815
|
}) };
|
|
759
816
|
|
|
760
817
|
//#endregion
|
|
761
|
-
//#region src/cli/secret/vault/create.ts
|
|
818
|
+
//#region src/cli/commands/secret/vault/create.ts
|
|
762
819
|
const createCommand$1 = defineCommand({
|
|
763
820
|
name: "create",
|
|
764
821
|
description: "Create a new Secret Manager vault.",
|
|
@@ -790,7 +847,7 @@ const createCommand$1 = defineCommand({
|
|
|
790
847
|
});
|
|
791
848
|
|
|
792
849
|
//#endregion
|
|
793
|
-
//#region src/cli/secret/vault/delete.ts
|
|
850
|
+
//#region src/cli/commands/secret/vault/delete.ts
|
|
794
851
|
const deleteCommand$1 = defineCommand({
|
|
795
852
|
name: "delete",
|
|
796
853
|
description: "Delete a Secret Manager vault.",
|
|
@@ -829,7 +886,7 @@ const deleteCommand$1 = defineCommand({
|
|
|
829
886
|
});
|
|
830
887
|
|
|
831
888
|
//#endregion
|
|
832
|
-
//#region src/cli/secret/vault/list.ts
|
|
889
|
+
//#region src/cli/commands/secret/vault/list.ts
|
|
833
890
|
function vaultInfo(vault) {
|
|
834
891
|
return {
|
|
835
892
|
name: vault.name,
|
|
@@ -878,7 +935,7 @@ const listCommand$3 = defineCommand({
|
|
|
878
935
|
});
|
|
879
936
|
|
|
880
937
|
//#endregion
|
|
881
|
-
//#region src/cli/secret/vault/index.ts
|
|
938
|
+
//#region src/cli/commands/secret/vault/index.ts
|
|
882
939
|
const vaultCommand = defineCommand({
|
|
883
940
|
name: "vault",
|
|
884
941
|
description: "Manage Secret Manager vaults.",
|
|
@@ -893,7 +950,7 @@ const vaultCommand = defineCommand({
|
|
|
893
950
|
});
|
|
894
951
|
|
|
895
952
|
//#endregion
|
|
896
|
-
//#region src/cli/secret/index.ts
|
|
953
|
+
//#region src/cli/commands/secret/index.ts
|
|
897
954
|
const secretCommand = defineCommand({
|
|
898
955
|
name: "secret",
|
|
899
956
|
description: "Manage Secret Manager vaults and secrets.",
|
|
@@ -910,7 +967,7 @@ const secretCommand = defineCommand({
|
|
|
910
967
|
});
|
|
911
968
|
|
|
912
969
|
//#endregion
|
|
913
|
-
//#region src/cli/
|
|
970
|
+
//#region src/cli/shared/progress.ts
|
|
914
971
|
/**
|
|
915
972
|
* Create a simple progress reporter that writes updates to stderr.
|
|
916
973
|
* @param label - Label to prefix progress output
|
|
@@ -947,7 +1004,7 @@ async function withTimeout(p, ms, message) {
|
|
|
947
1004
|
}
|
|
948
1005
|
|
|
949
1006
|
//#endregion
|
|
950
|
-
//#region src/cli/staticwebsite/deploy.ts
|
|
1007
|
+
//#region src/cli/commands/staticwebsite/deploy.ts
|
|
951
1008
|
const CHUNK_SIZE = 64 * 1024;
|
|
952
1009
|
const IGNORED_FILES = new Set([
|
|
953
1010
|
".DS_Store",
|
|
@@ -1110,7 +1167,7 @@ const deployCommand = defineCommand({
|
|
|
1110
1167
|
});
|
|
1111
1168
|
|
|
1112
1169
|
//#endregion
|
|
1113
|
-
//#region src/cli/staticwebsite/get.ts
|
|
1170
|
+
//#region src/cli/commands/staticwebsite/get.ts
|
|
1114
1171
|
const getCommand = defineCommand({
|
|
1115
1172
|
name: "get",
|
|
1116
1173
|
description: "Get details of a specific static website.",
|
|
@@ -1155,7 +1212,7 @@ const getCommand = defineCommand({
|
|
|
1155
1212
|
});
|
|
1156
1213
|
|
|
1157
1214
|
//#endregion
|
|
1158
|
-
//#region src/cli/staticwebsite/list.ts
|
|
1215
|
+
//#region src/cli/commands/staticwebsite/list.ts
|
|
1159
1216
|
/**
|
|
1160
1217
|
* List static websites in the workspace.
|
|
1161
1218
|
* @param options - Static website listing options
|
|
@@ -1215,7 +1272,7 @@ const listCommand$2 = defineCommand({
|
|
|
1215
1272
|
});
|
|
1216
1273
|
|
|
1217
1274
|
//#endregion
|
|
1218
|
-
//#region src/cli/staticwebsite/index.ts
|
|
1275
|
+
//#region src/cli/commands/staticwebsite/index.ts
|
|
1219
1276
|
const staticwebsiteCommand = defineCommand({
|
|
1220
1277
|
name: "staticwebsite",
|
|
1221
1278
|
description: "Manage static websites in your workspace.",
|
|
@@ -1230,7 +1287,7 @@ const staticwebsiteCommand = defineCommand({
|
|
|
1230
1287
|
});
|
|
1231
1288
|
|
|
1232
1289
|
//#endregion
|
|
1233
|
-
//#region src/cli/
|
|
1290
|
+
//#region src/cli/shared/resolve-cli-bin.ts
|
|
1234
1291
|
/**
|
|
1235
1292
|
* Resolve a CLI binary path from the SDK's dependencies.
|
|
1236
1293
|
* @param options - Resolution options for locating the CLI binary.
|
|
@@ -1251,7 +1308,7 @@ function resolveCliBinPath(options) {
|
|
|
1251
1308
|
}
|
|
1252
1309
|
|
|
1253
1310
|
//#endregion
|
|
1254
|
-
//#region src/cli/tailordb/erd/schema.ts
|
|
1311
|
+
//#region src/cli/commands/tailordb/erd/schema.ts
|
|
1255
1312
|
/**
|
|
1256
1313
|
* Convert TailorDB field config to tbls column definition.
|
|
1257
1314
|
* @param fieldName - Field name
|
|
@@ -1401,7 +1458,7 @@ async function writeTblsSchemaToFile(options) {
|
|
|
1401
1458
|
}
|
|
1402
1459
|
|
|
1403
1460
|
//#endregion
|
|
1404
|
-
//#region src/cli/tailordb/erd/utils.ts
|
|
1461
|
+
//#region src/cli/commands/tailordb/erd/utils.ts
|
|
1405
1462
|
/**
|
|
1406
1463
|
* Initialize shared ERD command context.
|
|
1407
1464
|
* @param args - CLI arguments.
|
|
@@ -1426,7 +1483,7 @@ async function initErdContext(args) {
|
|
|
1426
1483
|
}
|
|
1427
1484
|
|
|
1428
1485
|
//#endregion
|
|
1429
|
-
//#region src/cli/tailordb/erd/export.ts
|
|
1486
|
+
//#region src/cli/commands/tailordb/erd/export.ts
|
|
1430
1487
|
const DEFAULT_ERD_BASE_DIR = ".tailor-sdk/erd";
|
|
1431
1488
|
/**
|
|
1432
1489
|
* Resolve TailorDB config and namespace.
|
|
@@ -1608,7 +1665,7 @@ const erdExportCommand = defineCommand({
|
|
|
1608
1665
|
});
|
|
1609
1666
|
|
|
1610
1667
|
//#endregion
|
|
1611
|
-
//#region src/cli/tailordb/erd/deploy.ts
|
|
1668
|
+
//#region src/cli/commands/tailordb/erd/deploy.ts
|
|
1612
1669
|
const erdDeployCommand = defineCommand({
|
|
1613
1670
|
name: "deploy",
|
|
1614
1671
|
description: "Deploy ERD static website for TailorDB namespace(s).",
|
|
@@ -1653,7 +1710,7 @@ const erdDeployCommand = defineCommand({
|
|
|
1653
1710
|
});
|
|
1654
1711
|
|
|
1655
1712
|
//#endregion
|
|
1656
|
-
//#region src/cli/tailordb/erd/serve.ts
|
|
1713
|
+
//#region src/cli/commands/tailordb/erd/serve.ts
|
|
1657
1714
|
function formatServeCommand(namespace) {
|
|
1658
1715
|
return `tailor-sdk tailordb erd serve --namespace ${namespace}`;
|
|
1659
1716
|
}
|
|
@@ -1718,7 +1775,7 @@ const erdServeCommand = defineCommand({
|
|
|
1718
1775
|
});
|
|
1719
1776
|
|
|
1720
1777
|
//#endregion
|
|
1721
|
-
//#region src/cli/tailordb/erd/index.ts
|
|
1778
|
+
//#region src/cli/commands/tailordb/erd/index.ts
|
|
1722
1779
|
const erdCommand = defineCommand({
|
|
1723
1780
|
name: "erd",
|
|
1724
1781
|
description: "Generate ERD artifacts for TailorDB namespaces using Liam ERD. (beta)",
|
|
@@ -1730,7 +1787,7 @@ const erdCommand = defineCommand({
|
|
|
1730
1787
|
});
|
|
1731
1788
|
|
|
1732
1789
|
//#endregion
|
|
1733
|
-
//#region src/cli/tailordb/migrate/set.ts
|
|
1790
|
+
//#region src/cli/commands/tailordb/migrate/set.ts
|
|
1734
1791
|
/**
|
|
1735
1792
|
* Set migration checkpoint for a TailorDB namespace
|
|
1736
1793
|
* @param {SetOptions} options - Command options
|
|
@@ -1832,7 +1889,7 @@ const setCommand = defineCommand({
|
|
|
1832
1889
|
});
|
|
1833
1890
|
|
|
1834
1891
|
//#endregion
|
|
1835
|
-
//#region src/cli/tailordb/migrate/status.ts
|
|
1892
|
+
//#region src/cli/commands/tailordb/migrate/status.ts
|
|
1836
1893
|
/**
|
|
1837
1894
|
* Show migration status for TailorDB namespaces
|
|
1838
1895
|
* @param {StatusOptions} options - Command options
|
|
@@ -1903,7 +1960,7 @@ const statusCommand = defineCommand({
|
|
|
1903
1960
|
});
|
|
1904
1961
|
|
|
1905
1962
|
//#endregion
|
|
1906
|
-
//#region src/cli/tailordb/migrate/index.ts
|
|
1963
|
+
//#region src/cli/commands/tailordb/migrate/index.ts
|
|
1907
1964
|
/**
|
|
1908
1965
|
* TailorDB migration command
|
|
1909
1966
|
*
|
|
@@ -1916,14 +1973,14 @@ const migrationCommand = defineCommand({
|
|
|
1916
1973
|
name: "migration",
|
|
1917
1974
|
description: "Manage TailorDB schema migrations.",
|
|
1918
1975
|
subCommands: {
|
|
1919
|
-
generate: generateCommand,
|
|
1976
|
+
generate: generateCommand$1,
|
|
1920
1977
|
set: setCommand,
|
|
1921
1978
|
status: statusCommand
|
|
1922
1979
|
}
|
|
1923
1980
|
});
|
|
1924
1981
|
|
|
1925
1982
|
//#endregion
|
|
1926
|
-
//#region src/cli/tailordb/index.ts
|
|
1983
|
+
//#region src/cli/commands/tailordb/index.ts
|
|
1927
1984
|
const tailordbCommand = defineCommand({
|
|
1928
1985
|
name: "tailordb",
|
|
1929
1986
|
description: "Manage TailorDB tables and data.",
|
|
@@ -1935,7 +1992,7 @@ const tailordbCommand = defineCommand({
|
|
|
1935
1992
|
});
|
|
1936
1993
|
|
|
1937
1994
|
//#endregion
|
|
1938
|
-
//#region src/cli/user/current.ts
|
|
1995
|
+
//#region src/cli/commands/user/current.ts
|
|
1939
1996
|
const currentCommand = defineCommand({
|
|
1940
1997
|
name: "current",
|
|
1941
1998
|
description: "Show current user.",
|
|
@@ -1955,7 +2012,7 @@ const currentCommand = defineCommand({
|
|
|
1955
2012
|
});
|
|
1956
2013
|
|
|
1957
2014
|
//#endregion
|
|
1958
|
-
//#region src/cli/user/list.ts
|
|
2015
|
+
//#region src/cli/commands/user/list.ts
|
|
1959
2016
|
const listCommand$1 = defineCommand({
|
|
1960
2017
|
name: "list",
|
|
1961
2018
|
description: "List all users.",
|
|
@@ -1985,7 +2042,7 @@ const listCommand$1 = defineCommand({
|
|
|
1985
2042
|
});
|
|
1986
2043
|
|
|
1987
2044
|
//#endregion
|
|
1988
|
-
//#region src/cli/user/pat/transform.ts
|
|
2045
|
+
//#region src/cli/commands/user/pat/transform.ts
|
|
1989
2046
|
function patScopeToString(scope) {
|
|
1990
2047
|
switch (scope) {
|
|
1991
2048
|
case PATScope.PAT_SCOPE_READ: return "read";
|
|
@@ -2041,7 +2098,7 @@ function printCreatedToken(name, token, write, action) {
|
|
|
2041
2098
|
}
|
|
2042
2099
|
|
|
2043
2100
|
//#endregion
|
|
2044
|
-
//#region src/cli/user/pat/create.ts
|
|
2101
|
+
//#region src/cli/commands/user/pat/create.ts
|
|
2045
2102
|
const createCommand = defineCommand({
|
|
2046
2103
|
name: "create",
|
|
2047
2104
|
description: "Create a new personal access token.",
|
|
@@ -2075,7 +2132,7 @@ const createCommand = defineCommand({
|
|
|
2075
2132
|
});
|
|
2076
2133
|
|
|
2077
2134
|
//#endregion
|
|
2078
|
-
//#region src/cli/user/pat/delete.ts
|
|
2135
|
+
//#region src/cli/commands/user/pat/delete.ts
|
|
2079
2136
|
const deleteCommand = defineCommand({
|
|
2080
2137
|
name: "delete",
|
|
2081
2138
|
description: "Delete a personal access token.",
|
|
@@ -2098,7 +2155,7 @@ const deleteCommand = defineCommand({
|
|
|
2098
2155
|
});
|
|
2099
2156
|
|
|
2100
2157
|
//#endregion
|
|
2101
|
-
//#region src/cli/user/pat/list.ts
|
|
2158
|
+
//#region src/cli/commands/user/pat/list.ts
|
|
2102
2159
|
const listCommand = defineCommand({
|
|
2103
2160
|
name: "list",
|
|
2104
2161
|
description: "List all personal access tokens.",
|
|
@@ -2143,7 +2200,7 @@ const listCommand = defineCommand({
|
|
|
2143
2200
|
});
|
|
2144
2201
|
|
|
2145
2202
|
//#endregion
|
|
2146
|
-
//#region src/cli/user/pat/update.ts
|
|
2203
|
+
//#region src/cli/commands/user/pat/update.ts
|
|
2147
2204
|
const updateCommand = defineCommand({
|
|
2148
2205
|
name: "update",
|
|
2149
2206
|
description: "Update a personal access token (delete and recreate).",
|
|
@@ -2178,7 +2235,7 @@ const updateCommand = defineCommand({
|
|
|
2178
2235
|
});
|
|
2179
2236
|
|
|
2180
2237
|
//#endregion
|
|
2181
|
-
//#region src/cli/user/pat/index.ts
|
|
2238
|
+
//#region src/cli/commands/user/pat/index.ts
|
|
2182
2239
|
const patCommand = defineCommand({
|
|
2183
2240
|
name: "pat",
|
|
2184
2241
|
description: "Manage personal access tokens.",
|
|
@@ -2195,7 +2252,7 @@ const patCommand = defineCommand({
|
|
|
2195
2252
|
});
|
|
2196
2253
|
|
|
2197
2254
|
//#endregion
|
|
2198
|
-
//#region src/cli/user/switch.ts
|
|
2255
|
+
//#region src/cli/commands/user/switch.ts
|
|
2199
2256
|
const switchCommand = defineCommand({
|
|
2200
2257
|
name: "switch",
|
|
2201
2258
|
description: "Set current user.",
|
|
@@ -2219,7 +2276,7 @@ const switchCommand = defineCommand({
|
|
|
2219
2276
|
});
|
|
2220
2277
|
|
|
2221
2278
|
//#endregion
|
|
2222
|
-
//#region src/cli/user/index.ts
|
|
2279
|
+
//#region src/cli/commands/user/index.ts
|
|
2223
2280
|
const userCommand$1 = defineCommand({
|
|
2224
2281
|
name: "user",
|
|
2225
2282
|
description: "Manage Tailor Platform users.",
|
|
@@ -2235,7 +2292,7 @@ const userCommand$1 = defineCommand({
|
|
|
2235
2292
|
});
|
|
2236
2293
|
|
|
2237
2294
|
//#endregion
|
|
2238
|
-
//#region src/cli/workflow/index.ts
|
|
2295
|
+
//#region src/cli/commands/workflow/index.ts
|
|
2239
2296
|
const workflowCommand = defineCommand({
|
|
2240
2297
|
name: "workflow",
|
|
2241
2298
|
description: "Manage workflows and workflow executions.",
|
|
@@ -2252,7 +2309,7 @@ const workflowCommand = defineCommand({
|
|
|
2252
2309
|
});
|
|
2253
2310
|
|
|
2254
2311
|
//#endregion
|
|
2255
|
-
//#region src/cli/workspace/app/index.ts
|
|
2312
|
+
//#region src/cli/commands/workspace/app/index.ts
|
|
2256
2313
|
const appCommand = defineCommand({
|
|
2257
2314
|
name: "app",
|
|
2258
2315
|
description: "Manage workspace applications",
|
|
@@ -2266,7 +2323,7 @@ const appCommand = defineCommand({
|
|
|
2266
2323
|
});
|
|
2267
2324
|
|
|
2268
2325
|
//#endregion
|
|
2269
|
-
//#region src/cli/workspace/user/index.ts
|
|
2326
|
+
//#region src/cli/commands/workspace/user/index.ts
|
|
2270
2327
|
const userCommand = defineCommand({
|
|
2271
2328
|
name: "user",
|
|
2272
2329
|
description: "Manage workspace users",
|
|
@@ -2282,7 +2339,7 @@ const userCommand = defineCommand({
|
|
|
2282
2339
|
});
|
|
2283
2340
|
|
|
2284
2341
|
//#endregion
|
|
2285
|
-
//#region src/cli/workspace/index.ts
|
|
2342
|
+
//#region src/cli/commands/workspace/index.ts
|
|
2286
2343
|
const workspaceCommand = defineCommand({
|
|
2287
2344
|
name: "workspace",
|
|
2288
2345
|
description: "Manage Tailor Platform workspaces.",
|
|
@@ -2313,7 +2370,7 @@ const mainCommand = withCompletionCommand(defineCommand({
|
|
|
2313
2370
|
apply: applyCommand,
|
|
2314
2371
|
executor: executorCommand,
|
|
2315
2372
|
function: functionCommand,
|
|
2316
|
-
generate: generateCommand
|
|
2373
|
+
generate: generateCommand,
|
|
2317
2374
|
init: initCommand,
|
|
2318
2375
|
login: loginCommand,
|
|
2319
2376
|
logout: logoutCommand,
|