@tailor-platform/sdk 1.36.0 → 1.37.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 +26 -0
- package/dist/application-ILhZq_oW.mjs +4 -0
- package/dist/{application-BwboBFcU.mjs → application-qRGMV8Tr.mjs} +50 -20
- package/dist/application-qRGMV8Tr.mjs.map +1 -0
- package/dist/{brand-0SscafcY.mjs → brand-D-d15jx3.mjs} +1 -1
- package/dist/{brand-0SscafcY.mjs.map → brand-D-d15jx3.mjs.map} +1 -1
- package/dist/cli/index.mjs +11 -11
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +6 -6
- package/dist/cli/lib.mjs +7 -7
- package/dist/{client-B6icVEv4.mjs → client-424n_3T9.mjs} +1 -1
- package/dist/{client-CN15WgW2.mjs → client-DllDLYmZ.mjs} +4 -4
- package/dist/{client-CN15WgW2.mjs.map → client-DllDLYmZ.mjs.map} +1 -1
- package/dist/configure/index.d.mts +5 -5
- package/dist/configure/index.mjs +4 -14
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-CdxPj_SW.mjs → crash-report-CDQ2JvgR.mjs} +4 -4
- package/dist/{crash-report-CdxPj_SW.mjs.map → crash-report-CDQ2JvgR.mjs.map} +1 -1
- package/dist/{crash-report-CB1UtT3O.mjs → crash-report-aHnky_xH.mjs} +1 -1
- package/dist/{enum-constants-DI85-fPE.mjs → enum-constants-Dx82rSjf.mjs} +1 -1
- package/dist/{enum-constants-DI85-fPE.mjs.map → enum-constants-Dx82rSjf.mjs.map} +1 -1
- package/dist/{env-_ce3IYbl.d.mts → env-04IQXqsl.d.mts} +2 -2
- package/dist/{file-utils-C4rXlOVt.mjs → file-utils-DeWpvq3T.mjs} +1 -1
- package/dist/{file-utils-C4rXlOVt.mjs.map → file-utils-DeWpvq3T.mjs.map} +1 -1
- package/dist/{index-C7vIBAg8.d.mts → index-BUT18Kak.d.mts} +2 -2
- package/dist/{index-CYaunQeL.d.mts → index-BVJQLjyN.d.mts} +27 -12
- package/dist/{index-DDCyefuU.d.mts → index-C3kcXHXJ.d.mts} +2 -2
- package/dist/{index-DZN1QFLM.d.mts → index-CeS4FA9o.d.mts} +2 -2
- package/dist/{index-CxSLivW7.d.mts → index-DnIg_LfT.d.mts} +2 -2
- package/dist/{interceptor-f7slMkCC.mjs → interceptor-dSNiQq71.mjs} +1 -1
- package/dist/{interceptor-f7slMkCC.mjs.map → interceptor-dSNiQq71.mjs.map} +1 -1
- package/dist/{job-CPKYCk_e.mjs → job-DkAklmE4.mjs} +2 -2
- package/dist/{job-CPKYCk_e.mjs.map → job-DkAklmE4.mjs.map} +1 -1
- package/dist/{kysely-type-DtnNdHn3.mjs → kysely-type-CwtvQuxh.mjs} +1 -1
- package/dist/{kysely-type-DtnNdHn3.mjs.map → kysely-type-CwtvQuxh.mjs.map} +1 -1
- package/dist/{logger-qz-Y4sBV.mjs → logger-C8qBDCKO.mjs} +1 -1
- package/dist/{logger-qz-Y4sBV.mjs.map → logger-C8qBDCKO.mjs.map} +1 -1
- package/dist/package-json--6dmp6-h.mjs +4 -0
- package/dist/{package-json-CfUqjJaQ.mjs → package-json-BHViVisJ.mjs} +1 -1
- package/dist/{package-json-CfUqjJaQ.mjs.map → package-json-BHViVisJ.mjs.map} +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.d.mts +2 -2
- package/dist/{plugin-CiPUxkyN.d.mts → plugin-D6P4g_2L.d.mts} +14 -9
- package/dist/{runtime-C7RRDaB3.mjs → runtime-D9ejnCm6.mjs} +566 -95
- package/dist/runtime-D9ejnCm6.mjs.map +1 -0
- package/dist/{schema-D27cW0Ca.mjs → schema-CnwUqPyM.mjs} +4 -361
- package/dist/schema-CnwUqPyM.mjs.map +1 -0
- package/dist/{seed-BZIFDG27.mjs → seed-DrbB1VXd.mjs} +1 -1
- package/dist/{seed-BZIFDG27.mjs.map → seed-DrbB1VXd.mjs.map} +1 -1
- package/dist/telemetry-4IOPW6wE.mjs +4 -0
- package/dist/{telemetry-CREcGK8y.mjs → telemetry-DwHuiNiR.mjs} +2 -2
- package/dist/{telemetry-CREcGK8y.mjs.map → telemetry-DwHuiNiR.mjs.map} +1 -1
- package/dist/types-B9ZMosul.mjs +372 -0
- package/dist/types-B9ZMosul.mjs.map +1 -0
- package/dist/types-C45jRrCM.mjs +4 -0
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs +1 -1
- package/dist/{workflow.generated-8BeGQsVU.d.mts → workflow.generated-Bj_DVqGh.d.mts} +2 -2
- package/docs/services/auth.md +6 -5
- package/docs/services/executor.md +5 -12
- package/docs/services/resolver.md +6 -13
- package/docs/services/workflow.md +4 -3
- package/package.json +4 -4
- package/dist/application-BB5TqXWY.mjs +0 -4
- package/dist/application-BwboBFcU.mjs.map +0 -1
- package/dist/package-json-D5Km1jjt.mjs +0 -4
- package/dist/runtime-C7RRDaB3.mjs.map +0 -1
- package/dist/schema-D27cW0Ca.mjs.map +0 -1
- package/dist/telemetry-C508zIi1.mjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-
|
|
1
|
+
{"version":3,"file":"brand-D-d15jx3.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.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import { I as AuthInvokerSchema, U as PATScope, i as fetchAll, k as FunctionExecution_Type, l as initOAuth2Client, m as userAgent, n as closeConnectionPool, o as fetchPlatformMachineUserToken, s as fetchUserInfo, u as initOperatorClient } from "../client-
|
|
4
|
-
import { n as logger, r as styles } from "../logger-
|
|
5
|
-
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-
|
|
6
|
-
import { t as readPackageJson } from "../package-json-
|
|
7
|
-
import { C as resolveTokens, S as readPlatformConfig, T as writePlatformConfig, a as loadConfig, b as loadAccessToken, g as getDistDir, i as resolveInlineSourcemap, l as ExecutorSchema, o as WorkflowJobSchema, s as ResolverSchema, v as deleteUserTokens, w as saveUserTokens, x as loadWorkspaceId, y as fetchLatestToken } from "../application-
|
|
8
|
-
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crash-report-
|
|
3
|
+
import { I as AuthInvokerSchema, U as PATScope, i as fetchAll, k as FunctionExecution_Type, l as initOAuth2Client, m as userAgent, n as closeConnectionPool, o as fetchPlatformMachineUserToken, s as fetchUserInfo, u as initOperatorClient } from "../client-DllDLYmZ.mjs";
|
|
4
|
+
import { n as logger, r as styles } from "../logger-C8qBDCKO.mjs";
|
|
5
|
+
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-D9ejnCm6.mjs";
|
|
6
|
+
import { t as readPackageJson } from "../package-json-BHViVisJ.mjs";
|
|
7
|
+
import { C as resolveTokens, S as readPlatformConfig, T as writePlatformConfig, a as loadConfig, b as loadAccessToken, g as getDistDir, i as resolveInlineSourcemap, l as ExecutorSchema, o as WorkflowJobSchema, s as ResolverSchema, v as deleteUserTokens, w as saveUserTokens, x as loadWorkspaceId, y as fetchLatestToken } from "../application-qRGMV8Tr.mjs";
|
|
8
|
+
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crash-report-CDQ2JvgR.mjs";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import { arg, defineCommand, runCommand, runMain } from "politty";
|
|
11
11
|
import { withCompletionCommand } from "politty/completion";
|
|
@@ -46,7 +46,7 @@ const applyCommand = defineAppCommand({
|
|
|
46
46
|
"clean-cache": arg(z.boolean().optional(), { description: "Clean the bundle cache before building" })
|
|
47
47
|
}).strict(),
|
|
48
48
|
run: async (args) => {
|
|
49
|
-
const { initTelemetry } = await import("../telemetry-
|
|
49
|
+
const { initTelemetry } = await import("../telemetry-4IOPW6wE.mjs");
|
|
50
50
|
await initTelemetry();
|
|
51
51
|
await apply({
|
|
52
52
|
workspaceId: args["workspace-id"],
|
|
@@ -940,7 +940,7 @@ async function detectFunctionType(options) {
|
|
|
940
940
|
const rawInput = module.default.input;
|
|
941
941
|
let inputSchema;
|
|
942
942
|
if (rawInput) {
|
|
943
|
-
const { t } = await import("
|
|
943
|
+
const { t } = await import("../types-C45jRrCM.mjs");
|
|
944
944
|
inputSchema = t.object(rawInput);
|
|
945
945
|
}
|
|
946
946
|
return {
|
|
@@ -1310,7 +1310,7 @@ const generateCommand = defineAppCommand({
|
|
|
1310
1310
|
})
|
|
1311
1311
|
}).strict(),
|
|
1312
1312
|
run: async (args) => {
|
|
1313
|
-
const { initTelemetry } = await import("../telemetry-
|
|
1313
|
+
const { initTelemetry } = await import("../telemetry-4IOPW6wE.mjs");
|
|
1314
1314
|
await initTelemetry();
|
|
1315
1315
|
await generate({
|
|
1316
1316
|
configPath: args.config,
|
|
@@ -3774,11 +3774,11 @@ runMain(mainCommand, {
|
|
|
3774
3774
|
if (isVerbose() && error.stack) logger.debug(`\nStack trace:\n${error.stack}`);
|
|
3775
3775
|
} else logger.error(`Unknown error: ${error}`);
|
|
3776
3776
|
if (!isCLIError(error) && (!(error instanceof Error) || error instanceof TypeError || error instanceof RangeError)) {
|
|
3777
|
-
const { reportCrash } = await import("../crash-report-
|
|
3777
|
+
const { reportCrash } = await import("../crash-report-aHnky_xH.mjs");
|
|
3778
3778
|
await reportCrash(error, "handledError");
|
|
3779
3779
|
}
|
|
3780
3780
|
}
|
|
3781
|
-
const { shutdownTelemetry } = await import("../telemetry-
|
|
3781
|
+
const { shutdownTelemetry } = await import("../telemetry-4IOPW6wE.mjs");
|
|
3782
3782
|
await shutdownTelemetry();
|
|
3783
3783
|
}
|
|
3784
3784
|
});
|