@tailor-platform/sdk 1.43.0 → 1.44.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/application-Cot5-3g3.mjs +4 -0
  3. package/dist/{application-DQpD_kHR.mjs → application-vJxYH5LE.mjs} +148 -11
  4. package/dist/application-vJxYH5LE.mjs.map +1 -0
  5. package/dist/cli/index.mjs +27 -19
  6. package/dist/cli/index.mjs.map +1 -1
  7. package/dist/cli/lib.d.mts +349 -15
  8. package/dist/cli/lib.mjs +8 -8
  9. package/dist/cli/lib.mjs.map +1 -1
  10. package/dist/cli/skills.mjs.map +1 -1
  11. package/dist/{client-CcV6Jjds.mjs → client-DcuQRqSd.mjs} +127 -54
  12. package/dist/client-DcuQRqSd.mjs.map +1 -0
  13. package/dist/{client-Cn9SqhZT.mjs → client-IsYnTV5A.mjs} +1 -1
  14. package/dist/configure/index.d.mts +3 -3
  15. package/dist/configure/index.mjs +1 -1
  16. package/dist/configure/index.mjs.map +1 -1
  17. package/dist/{crash-report-CSYupJ0T.mjs → crash-report-DQen2i_W.mjs} +1 -1
  18. package/dist/{crash-report-CUbm1ErM.mjs → crash-report-DVZsX1bs.mjs} +4 -4
  19. package/dist/{crash-report-CUbm1ErM.mjs.map → crash-report-DVZsX1bs.mjs.map} +1 -1
  20. package/dist/{enum-constants-Dx82rSjf.mjs → enum-constants-C3KSpsYj.mjs} +1 -1
  21. package/dist/{enum-constants-Dx82rSjf.mjs.map → enum-constants-C3KSpsYj.mjs.map} +1 -1
  22. package/dist/{errors-ChWX5ZG8.mjs → errors-_M2TVoWh.mjs} +1 -1
  23. package/dist/{errors-ChWX5ZG8.mjs.map → errors-_M2TVoWh.mjs.map} +1 -1
  24. package/dist/{file-utils-DeWpvq3T.mjs → file-utils-775qWKoo.mjs} +1 -1
  25. package/dist/{file-utils-DeWpvq3T.mjs.map → file-utils-775qWKoo.mjs.map} +1 -1
  26. package/dist/{index-Br4XCvX1.d.mts → index-BOfTiouP.d.mts} +5 -2
  27. package/dist/interceptor-4UC-KTno.mjs.map +1 -1
  28. package/dist/job-BOvKyNdT.mjs.map +1 -1
  29. package/dist/kysely/index.mjs.map +1 -1
  30. package/dist/{kysely-type-CwtvQuxh.mjs → kysely-type-BQsYEZoY.mjs} +1 -1
  31. package/dist/kysely-type-BQsYEZoY.mjs.map +1 -0
  32. package/dist/logger-DTNAMYGy.mjs.map +1 -1
  33. package/dist/{package-json-CWp8s9dE.mjs → package-json-CRzw5eUf.mjs} +1 -1
  34. package/dist/{package-json-CWp8s9dE.mjs.map → package-json-CRzw5eUf.mjs.map} +1 -1
  35. package/dist/package-json-DR_mqrCW.mjs +4 -0
  36. package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
  37. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  38. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  39. package/dist/plugin/builtin/seed/index.mjs +1 -1
  40. package/dist/plugin/index.mjs.map +1 -1
  41. package/dist/repl-editor-DjycioU-.mjs.map +1 -1
  42. package/dist/{runtime-Bn68JXnL.mjs → runtime-DQqulWPm.mjs} +324 -126
  43. package/dist/runtime-DQqulWPm.mjs.map +1 -0
  44. package/dist/{schema-CEcfEyPN.mjs → schema-DBq6hr6h.mjs} +13 -2
  45. package/dist/{schema-CEcfEyPN.mjs.map → schema-DBq6hr6h.mjs.map} +1 -1
  46. package/dist/{seed-CyYPhvNL.mjs → seed-BkVKgsxf.mjs} +1 -1
  47. package/dist/{seed-CyYPhvNL.mjs.map → seed-BkVKgsxf.mjs.map} +1 -1
  48. package/dist/{service-SrG26B9T.mjs → service-CCnx_IFw.mjs} +2 -2
  49. package/dist/{service-SrG26B9T.mjs.map → service-CCnx_IFw.mjs.map} +1 -1
  50. package/dist/{telemetry-BuDto_2q.mjs → telemetry-B6Le9XT-.mjs} +2 -2
  51. package/dist/{telemetry-BuDto_2q.mjs.map → telemetry-B6Le9XT-.mjs.map} +1 -1
  52. package/dist/telemetry-C_WXxIo0.mjs +4 -0
  53. package/dist/types-Duhhsx3R.mjs.map +1 -1
  54. package/dist/utils/test/index.d.mts +2 -2
  55. package/dist/utils/test/index.mjs.map +1 -1
  56. package/dist/{workflow.generated-CDCnZNkH.d.mts → workflow.generated-B7Mupf5V.d.mts} +5 -2
  57. package/docs/cli/application.md +130 -5
  58. package/docs/cli/crash-report.md +12 -1
  59. package/docs/cli/executor.md +6 -4
  60. package/docs/cli/organization.md +6 -5
  61. package/docs/cli/workspace.md +16 -13
  62. package/docs/cli-reference.md +10 -9
  63. package/docs/services/workflow.md +20 -0
  64. package/package.json +9 -9
  65. package/dist/application-DQpD_kHR.mjs.map +0 -1
  66. package/dist/application-DUcmoFdc.mjs +0 -4
  67. package/dist/client-CcV6Jjds.mjs.map +0 -1
  68. package/dist/kysely-type-CwtvQuxh.mjs.map +0 -1
  69. package/dist/package-json-CPR7s5hf.mjs +0 -4
  70. package/dist/runtime-Bn68JXnL.mjs.map +0 -1
  71. package/dist/telemetry-C1hzFaiV.mjs +0 -4
@@ -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-DcuQRqSd.mjs";
4
4
  import { n as logger, r as styles } from "../logger-DTNAMYGy.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, hn as apiCommand, i as updateCommand$4, in as loadDiff, j as truncateCommand, ln as getNamespacesWithMigrations, lt as listCommand$8, m as listCommand$15, 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-Bn68JXnL.mjs";
6
- import { t as readPackageJson } from "../package-json-CWp8s9dE.mjs";
7
- 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-DQpD_kHR.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-DQqulWPm.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-vJxYH5LE.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-DVZsX1bs.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;
@@ -1535,7 +1543,7 @@ const generateCommand = defineAppCommand({
1535
1543
  })
1536
1544
  }).strict(),
1537
1545
  run: async (args) => {
1538
- const { initTelemetry } = await import("../telemetry-C1hzFaiV.mjs");
1546
+ const { initTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
1539
1547
  await initTelemetry();
1540
1548
  await generate({
1541
1549
  configPath: args.config,
@@ -3723,9 +3731,9 @@ const upgradeCommand = defineAppCommand({
3723
3731
  })
3724
3732
  }).strict(),
3725
3733
  run: async (args) => {
3726
- const { initTelemetry } = await import("../telemetry-C1hzFaiV.mjs");
3734
+ const { initTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
3727
3735
  await initTelemetry();
3728
- const { upgrade } = await import("../service-SrG26B9T.mjs");
3736
+ const { upgrade } = await import("../service-CCnx_IFw.mjs");
3729
3737
  await upgrade({
3730
3738
  from: args.from,
3731
3739
  dryRun: args["dry-run"],
@@ -4141,11 +4149,11 @@ runMain(mainCommand, {
4141
4149
  if (isVerbose() && error.stack) logger.debug(`\nStack trace:\n${error.stack}`);
4142
4150
  } else logger.error(`Unknown error: ${error}`);
4143
4151
  if (!isCLIError(error) && (!(error instanceof Error) || error instanceof TypeError || error instanceof RangeError)) {
4144
- const { reportCrash } = await import("../crash-report-CSYupJ0T.mjs");
4152
+ const { reportCrash } = await import("../crash-report-DQen2i_W.mjs");
4145
4153
  await reportCrash(error, "handledError");
4146
4154
  }
4147
4155
  }
4148
- const { shutdownTelemetry } = await import("../telemetry-C1hzFaiV.mjs");
4156
+ const { shutdownTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
4149
4157
  await shutdownTelemetry();
4150
4158
  }
4151
4159
  });