@tailor-platform/sdk 1.32.0 → 1.32.1
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 +24 -0
- package/dist/application-Cwt_ifTT.mjs +12 -0
- package/dist/{application-B8vok3w2.mjs → application-p2GujXmg.mjs} +10 -9
- package/dist/{application-B8vok3w2.mjs.map → application-p2GujXmg.mjs.map} +1 -1
- package/dist/{brand-GZnI4eYb.mjs → brand-0SscafcY.mjs} +2 -1
- package/dist/{brand-GZnI4eYb.mjs.map → brand-0SscafcY.mjs.map} +1 -1
- package/dist/{chunk-DEt8GZDa.mjs → chunk-COzJYswC.mjs} +1 -0
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.mjs +27 -26
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +7 -6
- package/dist/cli/lib.mjs +14 -13
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/skills.d.mts +1 -0
- package/dist/cli/skills.mjs +2 -1
- package/dist/cli/skills.mjs.map +1 -1
- package/dist/{client-DfdgRZlQ.mjs → client-D5P1myz0.mjs} +6 -5
- package/dist/{client-DfdgRZlQ.mjs.map → client-D5P1myz0.mjs.map} +1 -1
- package/dist/{client-B0wrLUVK.mjs → client-gpRgZl1b.mjs} +5 -4
- package/dist/configure/index.d.mts +5 -4
- package/dist/configure/index.mjs +5 -4
- package/dist/configure/index.mjs.map +1 -1
- package/dist/crash-report-Cm9vFmTN.mjs +7 -0
- package/dist/{crash-report-wNxS0IUJ.mjs → crash-report-DnwITWeV.mjs} +5 -4
- package/dist/{crash-report-wNxS0IUJ.mjs.map → crash-report-DnwITWeV.mjs.map} +1 -1
- package/dist/{enum-constants-D1nfn0qD.mjs → enum-constants-CkKARYb7.mjs} +2 -1
- package/dist/{enum-constants-D1nfn0qD.mjs.map → enum-constants-CkKARYb7.mjs.map} +1 -1
- package/dist/{env-BgdHfWDn.d.mts → env-BZLTIlIo.d.mts} +3 -2
- package/dist/{file-utils-Bctuzn3x.mjs → file-utils-D2TxR_kj.mjs} +2 -1
- package/dist/{file-utils-Bctuzn3x.mjs.map → file-utils-D2TxR_kj.mjs.map} +1 -1
- package/dist/{index-D4Y81vh1.d.mts → index-BQKAzTPA.d.mts} +3 -2
- package/dist/{index-BAud4CE7.d.mts → index-BYk_9R3S.d.mts} +16 -15
- package/dist/{index-CxgBnxKM.d.mts → index-CgMytw2A.d.mts} +3 -2
- package/dist/{index-CdDzh-T2.d.mts → index-CoReoodF.d.mts} +3 -2
- package/dist/{index-FZMBoUWm.d.mts → index-vVGamLOw.d.mts} +3 -2
- package/dist/{interceptor-DgQNmwWJ.mjs → interceptor-1LL1gBsF.mjs} +3 -2
- package/dist/{interceptor-DgQNmwWJ.mjs.map → interceptor-1LL1gBsF.mjs.map} +1 -1
- package/dist/{job-DdfW7vH3.mjs → job-CPKYCk_e.mjs} +3 -2
- package/dist/{job-DdfW7vH3.mjs.map → job-CPKYCk_e.mjs.map} +1 -1
- package/dist/kysely/index.d.mts +1 -0
- package/dist/kysely/index.mjs +2 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-B_IecdK9.mjs → kysely-type-BK0b4Rqt.mjs} +2 -1
- package/dist/{kysely-type-B_IecdK9.mjs.map → kysely-type-BK0b4Rqt.mjs.map} +1 -1
- package/dist/{logger-CqezTedh.mjs → logger-qz-Y4sBV.mjs} +2 -1
- package/dist/{logger-CqezTedh.mjs.map → logger-qz-Y4sBV.mjs.map} +1 -1
- package/dist/package-json-88x7bPKC.mjs +5 -0
- package/dist/{package-json-D3x2nBPB.mjs → package-json-VqyFvGiP.mjs} +2 -1
- package/dist/{package-json-D3x2nBPB.mjs.map → package-json-VqyFvGiP.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +2 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +3 -2
- package/dist/plugin/builtin/file-utils/index.d.mts +2 -1
- package/dist/plugin/builtin/file-utils/index.mjs +3 -2
- package/dist/plugin/builtin/kysely-type/index.d.mts +2 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +3 -2
- package/dist/plugin/builtin/seed/index.d.mts +2 -1
- package/dist/plugin/builtin/seed/index.mjs +3 -2
- package/dist/plugin/index.d.mts +3 -2
- package/dist/plugin/index.mjs +2 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/{plugin-DyVYXZWz.d.mts → plugin-IIDZW9GG.d.mts} +2 -1
- package/dist/{runtime-DbX_UxlC.mjs → runtime-7DOyTTxR.mjs} +23 -23
- package/dist/runtime-7DOyTTxR.mjs.map +1 -0
- package/dist/{schema-CNWt2FKQ.mjs → schema-BITbkmq3.mjs} +3 -2
- package/dist/{schema-CNWt2FKQ.mjs.map → schema-BITbkmq3.mjs.map} +1 -1
- package/dist/seed/index.d.mts +1 -0
- package/dist/seed/index.mjs +2 -1
- package/dist/seed/index.mjs.map +1 -1
- package/dist/{seed-CWkIDWMb.mjs → seed-BXrSEJbv.mjs} +2 -1
- package/dist/{seed-CWkIDWMb.mjs.map → seed-BXrSEJbv.mjs.map} +1 -1
- package/dist/{telemetry-BSUlYTs-.mjs → telemetry-B4sp-dD2.mjs} +3 -2
- package/dist/{telemetry-BSUlYTs-.mjs.map → telemetry-B4sp-dD2.mjs.map} +1 -1
- package/dist/telemetry-DXIGGa6A.mjs +5 -0
- package/dist/utils/test/index.d.mts +3 -2
- package/dist/utils/test/index.mjs +4 -3
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/{workflow.generated-DMQ-cjyT.d.mts → workflow.generated-C2A5Ye0m.d.mts} +3 -2
- package/docs/generator/builtin.md +0 -8
- package/package.json +11 -10
- package/dist/application-DHifc-oA.mjs +0 -11
- package/dist/crash-report-BMEhRxeg.mjs +0 -6
- package/dist/package-json-DiZWrkIA.mjs +0 -4
- package/dist/runtime-DbX_UxlC.mjs.map +0 -1
- package/dist/telemetry-BtN2l0f1.mjs +0 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
//#region src/utils/brand.ts
|
|
2
3
|
const SDK_BRAND = Symbol.for("tailor-platform/sdk");
|
|
3
4
|
/**
|
|
@@ -33,4 +34,4 @@ function isSdkBranded(value, kind) {
|
|
|
33
34
|
|
|
34
35
|
//#endregion
|
|
35
36
|
export { isSdkBranded as n, brandValue as t };
|
|
36
|
-
//# sourceMappingURL=brand-
|
|
37
|
+
//# sourceMappingURL=brand-0SscafcY.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-
|
|
1
|
+
{"version":3,"file":"brand-0SscafcY.mjs","names":[],"sources":["../src/utils/brand.ts"],"sourcesContent":["// Symbol.for ensures the same symbol is returned across different ESM module instances,\n// avoiding identity mismatches when multiple copies of the SDK are loaded.\nexport const SDK_BRAND: unique symbol = Symbol.for(\"tailor-platform/sdk\");\n\nexport type SdkBrandKind = \"tailordb-type\" | \"resolver\" | \"executor\" | \"workflow\" | \"workflow-job\";\n\n/**\n * Adds a non-enumerable SDK brand symbol to the given object (in-place).\n * The brand stores the kind so service loaders can distinguish between\n * different SDK object types (e.g. a type loader skips executors).\n * @param value - The object to brand\n * @param kind - The kind of SDK object\n * @returns The same object with the brand applied\n */\nexport function brandValue<T extends object>(value: T, kind: SdkBrandKind): T {\n Object.defineProperty(value, SDK_BRAND, {\n value: kind,\n enumerable: false,\n configurable: false,\n writable: false,\n });\n return value;\n}\n\n/**\n * Checks whether the given value has been branded by the SDK.\n * When kind is specified, only returns true if the brand matches that kind.\n * Accepts a single kind or an array of kinds for multi-kind matching.\n * @param value - The value to check\n * @param kind - Optional kind or kinds to match against\n * @returns True if the value has the SDK brand symbol (and matches kind if specified)\n */\nexport function isSdkBranded(\n value: unknown,\n kind?: SdkBrandKind | readonly SdkBrandKind[],\n): boolean {\n if (value === null || typeof value !== \"object\" || !(SDK_BRAND in value)) return false;\n const stored = (value as Record<symbol, unknown>)[SDK_BRAND];\n // No kind filter → any brand matches. Legacy `true` brand → matches any kind.\n return (\n kind === undefined ||\n stored === true ||\n (Array.isArray(kind) ? kind.includes(stored as SdkBrandKind) : stored === kind)\n );\n}\n"],"mappings":";;AAEA,MAAa,YAA2B,OAAO,IAAI,sBAAsB;;;;;;;;;AAYzE,SAAgB,WAA6B,OAAU,MAAuB;AAC5E,QAAO,eAAe,OAAO,WAAW;EACtC,OAAO;EACP,YAAY;EACZ,cAAc;EACd,UAAU;EACX,CAAC;AACF,QAAO;;;;;;;;;;AAWT,SAAgB,aACd,OACA,MACS;AACT,KAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,EAAE,aAAa,OAAQ,QAAO;CACjF,MAAM,SAAU,MAAkC;AAElD,QACE,SAAS,UACT,WAAW,SACV,MAAM,QAAQ,KAAK,GAAG,KAAK,SAAS,OAAuB,GAAG,WAAW"}
|
package/dist/cli/index.d.mts
CHANGED
package/dist/cli/index.mjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { B as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import
|
|
2
|
+
|
|
3
|
+
import "../chunk-COzJYswC.mjs";
|
|
4
|
+
import "../schema-BITbkmq3.mjs";
|
|
5
|
+
import "../brand-0SscafcY.mjs";
|
|
6
|
+
import { n as logger, r as styles } from "../logger-qz-Y4sBV.mjs";
|
|
7
|
+
import { At as functionExecutionStatusToString, B as updateCommand$3, Ct as startCommand, D as resumeCommand, Dt as executionsCommand, E as healthCommand, Ft as executeScript, I as showCommand, J as updateCommand$2, Jt as formatMigrationNumber, K as getCommand$4, L as logBetaWarning, M as truncateCommand, Mt as getCommand$1, P as generateCommand$1, Pt as apply, Q as getCommand$3, Qt as getMigrationFiles, Rt as parseMigrationLabelNumber, Tt as getCommand$5, U as treeCommand, W as listCommand$10, X as listCommand$9, Zt as getMigrationFilePath, _ as getCommand$6, _n as isVerbose, _t as listCommand$6, a as updateCommand$4, bt as jobsCommand, cn as sdkNameLabelKey, d as inviteCommand, en as isValidMigrationNumber, et as deleteCommand$3, fn as apiCommand, ft as generate, gn as deploymentArgs, h as listCommand$14, hn as confirmationArgs, ht as triggerCommand, i as isCLIError, it as listCommand$8, jt as formatKeyValueTable, k as listCommand$11, l as listCommand$13, ln as trnPrefix, lt as tokenCommand, mn as commonArgs, mt as webhookCommand, nt as createCommand$3, on as getNamespacesWithMigrations, ot as getCommand$2, p as restoreCommand, pn as defineAppCommand, r as queryCommand, s as removeCommand, sn as prompt, t as isNativeTypeScriptRuntime, tn as loadDiff, ut as listCommand$7, vn as workspaceArgs, w as listCommand$12, x as createCommand$4, y as deleteCommand$4, z as removeCommand$1 } from "../runtime-7DOyTTxR.mjs";
|
|
8
|
+
import { B as PATScope, D as FunctionExecution_Type, N as AuthInvokerSchema, i as fetchAll, l as initOAuth2Client, m as userAgent, n as closeConnectionPool, o as fetchPlatformMachineUserToken, s as fetchUserInfo, u as initOperatorClient } from "../client-D5P1myz0.mjs";
|
|
9
|
+
import { t as readPackageJson } from "../package-json-VqyFvGiP.mjs";
|
|
10
|
+
import { C as resolveTokens, S as readPlatformConfig, T as writePlatformConfig, a as loadConfig, b as loadAccessToken, c as ExecutorSchema, g as getDistDir, i as resolveInlineSourcemap, o as WorkflowJobSchema, u as ResolverSchema, v as deleteUserTokens, w as saveUserTokens, x as loadWorkspaceId, y as fetchLatestToken } from "../application-p2GujXmg.mjs";
|
|
11
|
+
import "../seed-BXrSEJbv.mjs";
|
|
12
|
+
import "../file-utils-D2TxR_kj.mjs";
|
|
13
|
+
import "../kysely-type-BK0b4Rqt.mjs";
|
|
14
|
+
import "../telemetry-B4sp-dD2.mjs";
|
|
15
|
+
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crash-report-DnwITWeV.mjs";
|
|
15
16
|
import { createRequire } from "node:module";
|
|
16
17
|
import { arg, defineCommand, runCommand, runMain } from "politty";
|
|
17
18
|
import { withCompletionCommand } from "politty/completion";
|
|
@@ -51,7 +52,7 @@ const applyCommand = defineAppCommand({
|
|
|
51
52
|
"clean-cache": arg(z.boolean().optional(), { description: "Clean the bundle cache before building" })
|
|
52
53
|
}).strict(),
|
|
53
54
|
run: async (args) => {
|
|
54
|
-
const { initTelemetry } = await import("../telemetry-
|
|
55
|
+
const { initTelemetry } = await import("../telemetry-DXIGGa6A.mjs");
|
|
55
56
|
await initTelemetry();
|
|
56
57
|
await apply({
|
|
57
58
|
workspaceId: args["workspace-id"],
|
|
@@ -803,7 +804,7 @@ const generateCommand = defineAppCommand({
|
|
|
803
804
|
})
|
|
804
805
|
}).strict(),
|
|
805
806
|
run: async (args) => {
|
|
806
|
-
const { initTelemetry } = await import("../telemetry-
|
|
807
|
+
const { initTelemetry } = await import("../telemetry-DXIGGa6A.mjs");
|
|
807
808
|
await initTelemetry();
|
|
808
809
|
await generate({
|
|
809
810
|
configPath: args.config,
|
|
@@ -1284,7 +1285,7 @@ async function checkVaultManaged(params) {
|
|
|
1284
1285
|
existingLabels: {}
|
|
1285
1286
|
};
|
|
1286
1287
|
let owner;
|
|
1287
|
-
let allLabels
|
|
1288
|
+
let allLabels;
|
|
1288
1289
|
try {
|
|
1289
1290
|
const { metadata } = await client.getMetadata({ trn });
|
|
1290
1291
|
allLabels = metadata?.labels ?? {};
|
|
@@ -1357,8 +1358,8 @@ const createSecretCommand = defineAppCommand({
|
|
|
1357
1358
|
});
|
|
1358
1359
|
} catch (error) {
|
|
1359
1360
|
if (error instanceof ConnectError) {
|
|
1360
|
-
if (error.code === Code.NotFound) throw new Error(`Vault "${args["vault-name"]}" not found
|
|
1361
|
-
if (error.code === Code.AlreadyExists) throw new Error(`Secret "${args.name}" already exists
|
|
1361
|
+
if (error.code === Code.NotFound) throw new Error(`Vault "${args["vault-name"]}" not found.`, { cause: error });
|
|
1362
|
+
if (error.code === Code.AlreadyExists) throw new Error(`Secret "${args.name}" already exists.`, { cause: error });
|
|
1362
1363
|
}
|
|
1363
1364
|
throw error;
|
|
1364
1365
|
}
|
|
@@ -1407,7 +1408,7 @@ const deleteSecretCommand = defineAppCommand({
|
|
|
1407
1408
|
secretmanagerSecretName: args.name
|
|
1408
1409
|
});
|
|
1409
1410
|
} catch (error) {
|
|
1410
|
-
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Secret "${args.name}" not found in vault "${args["vault-name"]}"
|
|
1411
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Secret "${args.name}" not found in vault "${args["vault-name"]}".`, { cause: error });
|
|
1411
1412
|
throw error;
|
|
1412
1413
|
}
|
|
1413
1414
|
if (managed.isManaged) await releaseVaultOwnership({
|
|
@@ -1467,7 +1468,7 @@ const listSecretCommand = defineAppCommand({
|
|
|
1467
1468
|
});
|
|
1468
1469
|
logger.out(secrets);
|
|
1469
1470
|
} catch (error) {
|
|
1470
|
-
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Vault "${args["vault-name"]}" not found
|
|
1471
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Vault "${args["vault-name"]}" not found.`, { cause: error });
|
|
1471
1472
|
throw error;
|
|
1472
1473
|
}
|
|
1473
1474
|
}
|
|
@@ -1511,7 +1512,7 @@ const updateSecretCommand = defineAppCommand({
|
|
|
1511
1512
|
secretmanagerSecretValue: args.value
|
|
1512
1513
|
});
|
|
1513
1514
|
} catch (error) {
|
|
1514
|
-
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Secret "${args.name}" not found in vault "${args["vault-name"]}"
|
|
1515
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Secret "${args.name}" not found in vault "${args["vault-name"]}".`, { cause: error });
|
|
1515
1516
|
throw error;
|
|
1516
1517
|
}
|
|
1517
1518
|
if (managed.isManaged) await releaseVaultOwnership({
|
|
@@ -1553,7 +1554,7 @@ const createCommand$1 = defineAppCommand({
|
|
|
1553
1554
|
secretmanagerVaultName: args.name
|
|
1554
1555
|
});
|
|
1555
1556
|
} catch (error) {
|
|
1556
|
-
if (error instanceof ConnectError && error.code === Code.AlreadyExists) throw new Error(`Vault "${args.name}" already exists
|
|
1557
|
+
if (error instanceof ConnectError && error.code === Code.AlreadyExists) throw new Error(`Vault "${args.name}" already exists.`, { cause: error });
|
|
1557
1558
|
throw error;
|
|
1558
1559
|
}
|
|
1559
1560
|
logger.success(`Vault: ${args.name} created`);
|
|
@@ -1596,7 +1597,7 @@ const deleteCommand$1 = defineAppCommand({
|
|
|
1596
1597
|
secretmanagerVaultName: args.name
|
|
1597
1598
|
});
|
|
1598
1599
|
} catch (error) {
|
|
1599
|
-
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Vault "${args.name}" not found
|
|
1600
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(`Vault "${args.name}" not found.`, { cause: error });
|
|
1600
1601
|
throw error;
|
|
1601
1602
|
}
|
|
1602
1603
|
if (managed.isManaged) logger.info("Remove this vault from defineSecretManager() in your config to prevent the next apply from re-creating it.");
|
|
@@ -2065,7 +2066,7 @@ const getCommand = defineAppCommand({
|
|
|
2065
2066
|
};
|
|
2066
2067
|
logger.out(info);
|
|
2067
2068
|
} catch (error) {
|
|
2068
|
-
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(notFoundErrorMessage);
|
|
2069
|
+
if (error instanceof ConnectError && error.code === Code.NotFound) throw new Error(notFoundErrorMessage, { cause: error });
|
|
2069
2070
|
throw error;
|
|
2070
2071
|
}
|
|
2071
2072
|
}
|
|
@@ -3243,11 +3244,11 @@ runMain(mainCommand, {
|
|
|
3243
3244
|
if (isVerbose() && error.stack) logger.debug(`\nStack trace:\n${error.stack}`);
|
|
3244
3245
|
} else logger.error(`Unknown error: ${error}`);
|
|
3245
3246
|
if (!isCLIError(error) && (!(error instanceof Error) || error instanceof TypeError || error instanceof RangeError)) {
|
|
3246
|
-
const { reportCrash } = await import("../crash-report-
|
|
3247
|
+
const { reportCrash } = await import("../crash-report-Cm9vFmTN.mjs");
|
|
3247
3248
|
await reportCrash(error, "handledError");
|
|
3248
3249
|
}
|
|
3249
3250
|
}
|
|
3250
|
-
const { shutdownTelemetry } = await import("../telemetry-
|
|
3251
|
+
const { shutdownTelemetry } = await import("../telemetry-DXIGGa6A.mjs");
|
|
3251
3252
|
await shutdownTelemetry();
|
|
3252
3253
|
}
|
|
3253
3254
|
});
|