@tailor-platform/sdk 1.40.1 → 1.44.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/README.md +23 -0
  3. package/dist/{actor-B2oEmlTc.d.mts → actor-DzCuoMlP.d.mts} +2 -2
  4. package/dist/application-BZRbA1pL.mjs +4 -0
  5. package/dist/{application-EvhIIVg0.mjs → application-DkVNbIuh.mjs} +95 -16
  6. package/dist/application-DkVNbIuh.mjs.map +1 -0
  7. package/dist/brand-Ll48SMXe.mjs.map +1 -1
  8. package/dist/cli/index.mjs +56 -43
  9. package/dist/cli/index.mjs.map +1 -1
  10. package/dist/cli/lib.d.mts +75 -18
  11. package/dist/cli/lib.mjs +9 -9
  12. package/dist/cli/lib.mjs.map +1 -1
  13. package/dist/cli/skills.mjs.map +1 -1
  14. package/dist/{client-CcV6Jjds.mjs → client-DQl5NPG9.mjs} +103 -43
  15. package/dist/{client-CcV6Jjds.mjs.map → client-DQl5NPG9.mjs.map} +1 -1
  16. package/dist/{client-Cn9SqhZT.mjs → client-EI4pMzvm.mjs} +1 -1
  17. package/dist/configure/index.d.mts +5 -5
  18. package/dist/configure/index.mjs +84 -4
  19. package/dist/configure/index.mjs.map +1 -1
  20. package/dist/{crash-report-CUbm1ErM.mjs → crash-report-CSSrblUv.mjs} +4 -4
  21. package/dist/{crash-report-CUbm1ErM.mjs.map → crash-report-CSSrblUv.mjs.map} +1 -1
  22. package/dist/{crash-report-CSYupJ0T.mjs → crash-report-DtkFq9JF.mjs} +1 -1
  23. package/dist/{enum-constants-Dx82rSjf.mjs → enum-constants-C3KSpsYj.mjs} +1 -1
  24. package/dist/{enum-constants-Dx82rSjf.mjs.map → enum-constants-C3KSpsYj.mjs.map} +1 -1
  25. package/dist/{errors-ChWX5ZG8.mjs → errors-_M2TVoWh.mjs} +1 -1
  26. package/dist/{errors-ChWX5ZG8.mjs.map → errors-_M2TVoWh.mjs.map} +1 -1
  27. package/dist/{file-utils-DeWpvq3T.mjs → file-utils-775qWKoo.mjs} +1 -1
  28. package/dist/{file-utils-DeWpvq3T.mjs.map → file-utils-775qWKoo.mjs.map} +1 -1
  29. package/dist/{index-Chvw1Eod.d.mts → index-0Dk-fDWi.d.mts} +2 -2
  30. package/dist/{index-CiNNNpuH.d.mts → index-BEEL1-6Z.d.mts} +2 -2
  31. package/dist/{index-D_ezppY7.d.mts → index-Br4XCvX1.d.mts} +103 -86
  32. package/dist/{index-BtXZdz-F.d.mts → index-DdsUV-aA.d.mts} +2 -2
  33. package/dist/{index-reFAYSX7.d.mts → index-ZZYEd_0R.d.mts} +2 -2
  34. package/dist/interceptor-4UC-KTno.mjs.map +1 -1
  35. package/dist/{job-p6zf8Qpg.mjs → job-BOvKyNdT.mjs} +15 -9
  36. package/dist/job-BOvKyNdT.mjs.map +1 -0
  37. package/dist/kysely/index.mjs.map +1 -1
  38. package/dist/{kysely-type-CwtvQuxh.mjs → kysely-type-BQsYEZoY.mjs} +1 -1
  39. package/dist/kysely-type-BQsYEZoY.mjs.map +1 -0
  40. package/dist/logger-DTNAMYGy.mjs.map +1 -1
  41. package/dist/{package-json-CWp8s9dE.mjs → package-json-CRzw5eUf.mjs} +1 -1
  42. package/dist/{package-json-CWp8s9dE.mjs.map → package-json-CRzw5eUf.mjs.map} +1 -1
  43. package/dist/package-json-DR_mqrCW.mjs +4 -0
  44. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  45. package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
  46. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  47. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  48. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  49. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  50. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  51. package/dist/plugin/builtin/seed/index.mjs +1 -1
  52. package/dist/plugin/index.d.mts +2 -2
  53. package/dist/plugin/index.mjs.map +1 -1
  54. package/dist/repl-editor-DjycioU-.mjs.map +1 -1
  55. package/dist/{runtime-B9R1TzLD.mjs → runtime-l7GFD3Xg.mjs} +503 -196
  56. package/dist/runtime-l7GFD3Xg.mjs.map +1 -0
  57. package/dist/{schema-CEcfEyPN.mjs → schema-DBq6hr6h.mjs} +13 -2
  58. package/dist/{schema-CEcfEyPN.mjs.map → schema-DBq6hr6h.mjs.map} +1 -1
  59. package/dist/{seed-CyYPhvNL.mjs → seed-BkVKgsxf.mjs} +1 -1
  60. package/dist/{seed-CyYPhvNL.mjs.map → seed-BkVKgsxf.mjs.map} +1 -1
  61. package/dist/{service-SrG26B9T.mjs → service-CCnx_IFw.mjs} +2 -2
  62. package/dist/{service-SrG26B9T.mjs.map → service-CCnx_IFw.mjs.map} +1 -1
  63. package/dist/{tailor-db-field-CoFKRCYW.d.mts → tailor-db-field-D_z185oq.d.mts} +36 -6
  64. package/dist/{telemetry-BuDto_2q.mjs → telemetry-B6Le9XT-.mjs} +2 -2
  65. package/dist/{telemetry-BuDto_2q.mjs.map → telemetry-B6Le9XT-.mjs.map} +1 -1
  66. package/dist/telemetry-C_WXxIo0.mjs +4 -0
  67. package/dist/types-Duhhsx3R.mjs.map +1 -1
  68. package/dist/utils/test/index.d.mts +36 -3
  69. package/dist/utils/test/index.mjs +78 -9
  70. package/dist/utils/test/index.mjs.map +1 -1
  71. package/dist/{workflow.generated-Btz6srLR.d.mts → workflow.generated-CDCnZNkH.d.mts} +2 -2
  72. package/docs/cli/application.md +130 -5
  73. package/docs/cli/crash-report.md +12 -1
  74. package/docs/cli/executor.md +6 -4
  75. package/docs/cli/function.md +83 -1
  76. package/docs/cli/organization.md +6 -5
  77. package/docs/cli/workspace.md +16 -13
  78. package/docs/cli-reference.md +13 -10
  79. package/docs/services/executor.md +4 -0
  80. package/docs/services/idp.md +16 -0
  81. package/docs/services/resolver.md +4 -2
  82. package/docs/services/workflow.md +117 -3
  83. package/docs/testing.md +95 -7
  84. package/package.json +24 -24
  85. package/dist/application-CE2s_a6w.mjs +0 -4
  86. package/dist/application-EvhIIVg0.mjs.map +0 -1
  87. package/dist/job-p6zf8Qpg.mjs.map +0 -1
  88. package/dist/kysely-type-CwtvQuxh.mjs.map +0 -1
  89. package/dist/package-json-CPR7s5hf.mjs +0 -4
  90. package/dist/runtime-B9R1TzLD.mjs.map +0 -1
  91. package/dist/telemetry-C1hzFaiV.mjs +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"brand-Ll48SMXe.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"}
1
+ {"version":3,"file":"brand-Ll48SMXe.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 =\n | \"tailordb-type\"\n | \"resolver\"\n | \"executor\"\n | \"workflow\"\n | \"workflow-job\"\n | \"wait-point\";\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;;;;;;;;;AAkBzE,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"}
@@ -1,29 +1,29 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { G as PATScope, R as AuthInvokerSchema, c as fetchUserInfo, d as initOperatorClient, h as userAgent, i as fetchAll, j as FunctionExecution_Type, n as closeConnectionPool, o as fetchPaged, s as fetchPlatformMachineUserToken, u as initOAuth2Client } from "../client-CcV6Jjds.mjs";
3
+ import { G as PATScope, R as AuthInvokerSchema, c as fetchUserInfo, d as initOperatorClient, h as userAgent, i as fetchAll, j as FunctionExecution_Type, n as closeConnectionPool, o as fetchPaged, s as fetchPlatformMachineUserToken, u as initOAuth2Client } from "../client-DQl5NPG9.mjs";
4
4
  import { n as logger, r as styles } from "../logger-DTNAMYGy.mjs";
5
- import { $ as deleteCommand$3, $t as isValidMigrationNumber, At as formatKeyValueTable, C as listCommand$12, E as resumeCommand, Et as executionsCommand, F as showCommand, G as getCommand$4, H as treeCommand, I as logBetaWarning, Lt as parseMigrationLabelNumber, N as generateCommand$1, Nt as apply, O as listCommand$11, Pt as executeScript, R as removeCommand$1, St as startCommand, T as healthCommand, U as listCommand$10, Xt as getMigrationFilePath, Y as listCommand$9, Z as getCommand$3, Zt as getMigrationFiles, _n as pagedLogArgs, an as getNamespacesWithMigrations, at as getCommand$2, b as createCommand$4, bn as workspaceArgs, c as listCommand$13, cn as trnPrefix, ct as tokenCommand, dn as apiCommand, dt as generate, en as loadDiff, f as restoreCommand, fn as defineAppCommand, g as getCommand$6, gn as isVerbose, gt as listCommand$6, hn as deploymentArgs, i as updateCommand$4, j as truncateCommand, jt as getCommand$1, kt as functionExecutionStatusToString, lt as listCommand$7, m as listCommand$14, mn as confirmationArgs, mt as triggerCommand, o as removeCommand, on as prompt, pn as commonArgs, pt as webhookCommand, q as updateCommand$2, qt as formatMigrationNumber, r as queryCommand, rt as listCommand$8, sn as sdkNameLabelKey, t as isNativeTypeScriptRuntime, tt as createCommand$3, u as inviteCommand, v as deleteCommand$4, vn as paginationArgs, wt as getCommand$5, yn as toPageDirection, yt as jobsCommand, z as updateCommand$3 } from "../runtime-B9R1TzLD.mjs";
6
- import { t as readPackageJson } from "../package-json-CWp8s9dE.mjs";
7
- import { C as resolveTokens, S as readPlatformConfig, T as writePlatformConfig, _ as loadConfig, a as WorkflowJobSchema, b as loadAccessToken, c as ExecutorSchema, h as getDistDir, i as resolveInlineSourcemap, o as ResolverSchema, v as deleteUserTokens, w as saveUserTokens, x as loadWorkspaceId, y as fetchLatestToken } from "../application-EvhIIVg0.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-CUbm1ErM.mjs";
9
- import { n as isCLIError } from "../errors-ChWX5ZG8.mjs";
5
+ import { $ as deleteCommand$3, At as executionsCommand, C as listCommand$13, Cn as toPageDirection, Ct as jobsCommand, E as resumeCommand, Et as startCommand, F as showCommand, Ft as getCommand$1, G as getCommand$5, H as treeCommand, I as logBetaWarning, Lt as apply, N as generateCommand$1, Nt as functionExecutionStatusToString, O as listCommand$12, Ot as getCommand$6, Pt as formatKeyValueTable, R as removeCommand$1, Rt as executeScript, Sn as paginationArgs, T as healthCommand, U as listCommand$11, Vt as parseMigrationLabelNumber, Y as listCommand$10, Z as getCommand$4, Zt as formatMigrationNumber, _n as commonArgs, _t as webhookCommand, at as getCommand$3, b as createCommand$4, bn as isVerbose, bt as listCommand$6, c as listCommand$14, ct as tokenCommand, dn as sdkNameLabelKey, dt as generate, en as getMigrationFilePath, f as restoreCommand, fn as trnPrefix, ft as listCommand$7, g as getCommand$7, gn as defineAppCommand, i as updateCommand$4, in as loadDiff, j as truncateCommand, ln as getNamespacesWithMigrations, lt as listCommand$8, m as listCommand$15, mn as apiCommand, mt as getCommand$2, o as removeCommand, q as updateCommand$2, r as queryCommand, rn as isValidMigrationNumber, rt as listCommand$9, t as isNativeTypeScriptRuntime, tn as getMigrationFiles, tt as createCommand$3, u as inviteCommand, un as prompt, v as deleteCommand$4, vn as confirmationArgs, vt as triggerCommand, wn as workspaceArgs, xn as pagedLogArgs, yn as deploymentArgs, z as updateCommand$3 } from "../runtime-l7GFD3Xg.mjs";
6
+ import { C as loadWorkspaceId, D as writePlatformConfig, E as saveUserTokens, S as loadAccessToken, T as resolveTokens, _ as getDistDir, a as WorkflowJobSchema, b as deleteUserTokens, c as ExecutorSchema, i as resolveInlineSourcemap, l as INVOKER_EXPR, o as ResolverSchema, w as readPlatformConfig, x as fetchLatestToken, y as loadConfig } from "../application-DkVNbIuh.mjs";
7
+ import { t as readPackageJson } from "../package-json-CRzw5eUf.mjs";
8
+ import { n as isCLIError } from "../errors-_M2TVoWh.mjs";
9
+ import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crash-report-CSSrblUv.mjs";
10
10
  import { createRequire } from "node:module";
11
11
  import { arg, defineCommand, runCommand, runMain } from "politty";
12
12
  import { withCompletionCommand } from "politty/completion";
13
13
  import { z } from "zod";
14
- import { timestampDate } from "@bufbuild/protobuf/wkt";
15
14
  import * as fs$1 from "node:fs";
15
+ import { timestampDate } from "@bufbuild/protobuf/wkt";
16
16
  import * as path from "pathe";
17
17
  import { dirname, resolve } from "pathe";
18
+ import { pathToFileURL } from "node:url";
19
+ import ml from "multiline-ts";
18
20
  import { generateCodeVerifier } from "@badgateway/oauth2-client";
19
21
  import { Code, ConnectError } from "@connectrpc/connect";
20
22
  import * as http from "node:http";
21
23
  import * as crypto from "node:crypto";
22
- import { pathToFileURL } from "node:url";
23
24
  import { resolvePackageJSON, resolveTSConfig } from "pkg-types";
24
- import ml from "multiline-ts";
25
- import * as rolldown from "rolldown";
26
25
  import { create } from "@bufbuild/protobuf";
26
+ import * as rolldown from "rolldown";
27
27
  import open from "open";
28
28
  import { TraceMap, generatedPositionFor, originalPositionFor } from "@jridgewell/trace-mapping";
29
29
  import { spawn, spawnSync } from "node:child_process";
@@ -48,7 +48,7 @@ const applyCommand = defineAppCommand({
48
48
  "clean-cache": arg(z.boolean().optional(), { description: "Clean the bundle cache before building" })
49
49
  }).strict(),
50
50
  run: async (args) => {
51
- const { initTelemetry } = await import("../telemetry-C1hzFaiV.mjs");
51
+ const { initTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
52
52
  await initTelemetry();
53
53
  await apply({
54
54
  workspaceId: args["workspace-id"],
@@ -297,11 +297,16 @@ const authconnectionCommand = defineCommand({
297
297
 
298
298
  //#endregion
299
299
  //#region src/cli/commands/crash-report/list.ts
300
+ function orderAndLimitCrashReports(entries, options) {
301
+ const sorted = entries.filter((f) => f.endsWith(CRASH_LOG_EXTENSION)).sort();
302
+ const ordered = options.order === "asc" ? sorted : sorted.reverse();
303
+ return options.limit && options.limit > 0 ? ordered.slice(0, options.limit) : ordered;
304
+ }
300
305
  const listCommand$5 = defineAppCommand({
301
306
  name: "list",
302
307
  description: "List local crash report files.",
303
- args: z.object({}).strict(),
304
- run: async () => {
308
+ args: z.object({ ...paginationArgs() }).strict(),
309
+ run: async (args) => {
305
310
  const config = parseCrashReportConfig();
306
311
  if (!config.localDir) {
307
312
  logger.info("Crash report directory not available.");
@@ -314,7 +319,10 @@ const listCommand$5 = defineAppCommand({
314
319
  logger.info("No crash reports found.");
315
320
  return;
316
321
  }
317
- const files = entries.filter((f) => f.endsWith(CRASH_LOG_EXTENSION)).sort().reverse();
322
+ const files = orderAndLimitCrashReports(entries, {
323
+ order: args.order,
324
+ limit: args.limit
325
+ });
318
326
  if (files.length === 0) {
319
327
  logger.info("No crash reports found.");
320
328
  return;
@@ -1056,6 +1064,7 @@ function generateEntry(detected, sourceFile, env, machineUser, workspaceId) {
1056
1064
  const _user = ${userExpr};
1057
1065
 
1058
1066
  const $tailor_resolver_body = async (context) => {
1067
+ const _invoker = ${INVOKER_EXPR};
1059
1068
  if (_internalResolver.input) {
1060
1069
  const result = t.object(_internalResolver.input).parse({
1061
1070
  value: context,
@@ -1071,7 +1080,7 @@ function generateEntry(detected, sourceFile, env, machineUser, workspaceId) {
1071
1080
  }
1072
1081
  }
1073
1082
 
1074
- const enrichedContext = { input: context, env: _env, user: _user };
1083
+ const enrichedContext = { input: context, env: _env, user: _user, invoker: _invoker };
1075
1084
  return _internalResolver.body(enrichedContext);
1076
1085
  };
1077
1086
 
@@ -1087,7 +1096,8 @@ function generateEntry(detected, sourceFile, env, machineUser, workspaceId) {
1087
1096
  const _actor = ${actorExpr};
1088
1097
 
1089
1098
  const __executor_function = async (args) => {
1090
- return _internalExecutor.operation.body({ ...args, env: _env, actor: _actor });
1099
+ const _invoker = ${INVOKER_EXPR};
1100
+ return _internalExecutor.operation.body({ ...args, env: _env, actor: _actor, invoker: _invoker });
1091
1101
  };
1092
1102
 
1093
1103
  export { __executor_function as main };
@@ -1101,7 +1111,8 @@ function generateEntry(detected, sourceFile, env, machineUser, workspaceId) {
1101
1111
  const env = ${JSON.stringify(env)};
1102
1112
 
1103
1113
  export async function main(input) {
1104
- return await ${exportName}.body(input, { env });
1114
+ const invoker = ${INVOKER_EXPR};
1115
+ return await ${exportName}.body(input, { env, invoker });
1105
1116
  }
1106
1117
  `;
1107
1118
  }
@@ -1506,11 +1517,13 @@ const functionCommand = defineCommand({
1506
1517
  name: "function",
1507
1518
  description: "Manage functions",
1508
1519
  subCommands: {
1520
+ get: getCommand$2,
1521
+ list: listCommand$7,
1509
1522
  logs: logsCommand,
1510
1523
  "test-run": testRunCommand
1511
1524
  },
1512
1525
  async run() {
1513
- await runCommand(logsCommand, []);
1526
+ await runCommand(listCommand$7, []);
1514
1527
  }
1515
1528
  });
1516
1529
 
@@ -1530,7 +1543,7 @@ const generateCommand = defineAppCommand({
1530
1543
  })
1531
1544
  }).strict(),
1532
1545
  run: async (args) => {
1533
- const { initTelemetry } = await import("../telemetry-C1hzFaiV.mjs");
1546
+ const { initTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
1534
1547
  await initTelemetry();
1535
1548
  await generate({
1536
1549
  configPath: args.config,
@@ -1731,11 +1744,11 @@ const machineuserCommand = defineCommand({
1731
1744
  name: "machineuser",
1732
1745
  description: "Manage machine users in your Tailor Platform application.",
1733
1746
  subCommands: {
1734
- list: listCommand$7,
1747
+ list: listCommand$8,
1735
1748
  token: tokenCommand
1736
1749
  },
1737
1750
  async run() {
1738
- await runCommand(listCommand$7, []);
1751
+ await runCommand(listCommand$8, []);
1739
1752
  }
1740
1753
  });
1741
1754
 
@@ -1745,11 +1758,11 @@ const oauth2clientCommand = defineCommand({
1745
1758
  name: "oauth2client",
1746
1759
  description: "Manage OAuth2 clients in your Tailor Platform application.",
1747
1760
  subCommands: {
1748
- list: listCommand$8,
1749
- get: getCommand$2
1761
+ list: listCommand$9,
1762
+ get: getCommand$3
1750
1763
  },
1751
1764
  async run() {
1752
- await runCommand(listCommand$8, []);
1765
+ await runCommand(listCommand$9, []);
1753
1766
  }
1754
1767
  });
1755
1768
 
@@ -1789,8 +1802,8 @@ const folderCommand = defineCommand({
1789
1802
  subCommands: {
1790
1803
  create: createCommand$3,
1791
1804
  delete: deleteCommand$3,
1792
- get: getCommand$3,
1793
- list: listCommand$9,
1805
+ get: getCommand$4,
1806
+ list: listCommand$10,
1794
1807
  update: updateCommand$2
1795
1808
  }
1796
1809
  });
@@ -1802,13 +1815,13 @@ const organizationCommand = defineCommand({
1802
1815
  description: "Manage Tailor Platform organizations.",
1803
1816
  subCommands: {
1804
1817
  folder: folderCommand,
1805
- get: getCommand$4,
1806
- list: listCommand$10,
1818
+ get: getCommand$5,
1819
+ list: listCommand$11,
1807
1820
  tree: treeCommand,
1808
1821
  update: updateCommand$3
1809
1822
  },
1810
1823
  async run() {
1811
- await runCommand(listCommand$10, []);
1824
+ await runCommand(listCommand$11, []);
1812
1825
  }
1813
1826
  });
1814
1827
 
@@ -3718,9 +3731,9 @@ const upgradeCommand = defineAppCommand({
3718
3731
  })
3719
3732
  }).strict(),
3720
3733
  run: async (args) => {
3721
- const { initTelemetry } = await import("../telemetry-C1hzFaiV.mjs");
3734
+ const { initTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
3722
3735
  await initTelemetry();
3723
- const { upgrade } = await import("../service-SrG26B9T.mjs");
3736
+ const { upgrade } = await import("../service-CCnx_IFw.mjs");
3724
3737
  await upgrade({
3725
3738
  from: args.from,
3726
3739
  dryRun: args["dry-run"],
@@ -4020,14 +4033,14 @@ const workflowCommand = defineCommand({
4020
4033
  name: "workflow",
4021
4034
  description: "Manage workflows and workflow executions.",
4022
4035
  subCommands: {
4023
- list: listCommand$11,
4024
- get: getCommand$5,
4036
+ list: listCommand$12,
4037
+ get: getCommand$6,
4025
4038
  start: startCommand,
4026
4039
  executions: executionsCommand,
4027
4040
  resume: resumeCommand
4028
4041
  },
4029
4042
  async run() {
4030
- await runCommand(listCommand$11, []);
4043
+ await runCommand(listCommand$12, []);
4031
4044
  }
4032
4045
  });
4033
4046
 
@@ -4038,10 +4051,10 @@ const appCommand = defineCommand({
4038
4051
  description: "Manage workspace applications",
4039
4052
  subCommands: {
4040
4053
  health: healthCommand,
4041
- list: listCommand$12
4054
+ list: listCommand$13
4042
4055
  },
4043
4056
  async run() {
4044
- await runCommand(listCommand$12, []);
4057
+ await runCommand(listCommand$13, []);
4045
4058
  }
4046
4059
  });
4047
4060
 
@@ -4052,12 +4065,12 @@ const userCommand = defineCommand({
4052
4065
  description: "Manage workspace users",
4053
4066
  subCommands: {
4054
4067
  invite: inviteCommand,
4055
- list: listCommand$13,
4068
+ list: listCommand$14,
4056
4069
  remove: removeCommand,
4057
4070
  update: updateCommand$4
4058
4071
  },
4059
4072
  async run() {
4060
- await runCommand(listCommand$13, []);
4073
+ await runCommand(listCommand$14, []);
4061
4074
  }
4062
4075
  });
4063
4076
 
@@ -4070,13 +4083,13 @@ const workspaceCommand = defineCommand({
4070
4083
  app: appCommand,
4071
4084
  create: createCommand$4,
4072
4085
  delete: deleteCommand$4,
4073
- get: getCommand$6,
4074
- list: listCommand$14,
4086
+ get: getCommand$7,
4087
+ list: listCommand$15,
4075
4088
  restore: restoreCommand,
4076
4089
  user: userCommand
4077
4090
  },
4078
4091
  async run() {
4079
- await runCommand(listCommand$14, []);
4092
+ await runCommand(listCommand$15, []);
4080
4093
  }
4081
4094
  });
4082
4095
 
@@ -4136,11 +4149,11 @@ runMain(mainCommand, {
4136
4149
  if (isVerbose() && error.stack) logger.debug(`\nStack trace:\n${error.stack}`);
4137
4150
  } else logger.error(`Unknown error: ${error}`);
4138
4151
  if (!isCLIError(error) && (!(error instanceof Error) || error instanceof TypeError || error instanceof RangeError)) {
4139
- const { reportCrash } = await import("../crash-report-CSYupJ0T.mjs");
4152
+ const { reportCrash } = await import("../crash-report-DtkFq9JF.mjs");
4140
4153
  await reportCrash(error, "handledError");
4141
4154
  }
4142
4155
  }
4143
- const { shutdownTelemetry } = await import("../telemetry-C1hzFaiV.mjs");
4156
+ const { shutdownTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
4144
4157
  await shutdownTelemetry();
4145
4158
  }
4146
4159
  });