@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.
- package/CHANGELOG.md +32 -0
- package/dist/application-Cot5-3g3.mjs +4 -0
- package/dist/{application-DQpD_kHR.mjs → application-vJxYH5LE.mjs} +148 -11
- package/dist/application-vJxYH5LE.mjs.map +1 -0
- package/dist/cli/index.mjs +27 -19
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +349 -15
- package/dist/cli/lib.mjs +8 -8
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/skills.mjs.map +1 -1
- package/dist/{client-CcV6Jjds.mjs → client-DcuQRqSd.mjs} +127 -54
- package/dist/client-DcuQRqSd.mjs.map +1 -0
- package/dist/{client-Cn9SqhZT.mjs → client-IsYnTV5A.mjs} +1 -1
- package/dist/configure/index.d.mts +3 -3
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crash-report-CSYupJ0T.mjs → crash-report-DQen2i_W.mjs} +1 -1
- package/dist/{crash-report-CUbm1ErM.mjs → crash-report-DVZsX1bs.mjs} +4 -4
- package/dist/{crash-report-CUbm1ErM.mjs.map → crash-report-DVZsX1bs.mjs.map} +1 -1
- package/dist/{enum-constants-Dx82rSjf.mjs → enum-constants-C3KSpsYj.mjs} +1 -1
- package/dist/{enum-constants-Dx82rSjf.mjs.map → enum-constants-C3KSpsYj.mjs.map} +1 -1
- package/dist/{errors-ChWX5ZG8.mjs → errors-_M2TVoWh.mjs} +1 -1
- package/dist/{errors-ChWX5ZG8.mjs.map → errors-_M2TVoWh.mjs.map} +1 -1
- package/dist/{file-utils-DeWpvq3T.mjs → file-utils-775qWKoo.mjs} +1 -1
- package/dist/{file-utils-DeWpvq3T.mjs.map → file-utils-775qWKoo.mjs.map} +1 -1
- package/dist/{index-Br4XCvX1.d.mts → index-BOfTiouP.d.mts} +5 -2
- package/dist/interceptor-4UC-KTno.mjs.map +1 -1
- package/dist/job-BOvKyNdT.mjs.map +1 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-CwtvQuxh.mjs → kysely-type-BQsYEZoY.mjs} +1 -1
- package/dist/kysely-type-BQsYEZoY.mjs.map +1 -0
- package/dist/logger-DTNAMYGy.mjs.map +1 -1
- package/dist/{package-json-CWp8s9dE.mjs → package-json-CRzw5eUf.mjs} +1 -1
- package/dist/{package-json-CWp8s9dE.mjs.map → package-json-CRzw5eUf.mjs.map} +1 -1
- package/dist/package-json-DR_mqrCW.mjs +4 -0
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/repl-editor-DjycioU-.mjs.map +1 -1
- package/dist/{runtime-Bn68JXnL.mjs → runtime-DQqulWPm.mjs} +324 -126
- package/dist/runtime-DQqulWPm.mjs.map +1 -0
- package/dist/{schema-CEcfEyPN.mjs → schema-DBq6hr6h.mjs} +13 -2
- package/dist/{schema-CEcfEyPN.mjs.map → schema-DBq6hr6h.mjs.map} +1 -1
- package/dist/{seed-CyYPhvNL.mjs → seed-BkVKgsxf.mjs} +1 -1
- package/dist/{seed-CyYPhvNL.mjs.map → seed-BkVKgsxf.mjs.map} +1 -1
- package/dist/{service-SrG26B9T.mjs → service-CCnx_IFw.mjs} +2 -2
- package/dist/{service-SrG26B9T.mjs.map → service-CCnx_IFw.mjs.map} +1 -1
- package/dist/{telemetry-BuDto_2q.mjs → telemetry-B6Le9XT-.mjs} +2 -2
- package/dist/{telemetry-BuDto_2q.mjs.map → telemetry-B6Le9XT-.mjs.map} +1 -1
- package/dist/telemetry-C_WXxIo0.mjs +4 -0
- package/dist/types-Duhhsx3R.mjs.map +1 -1
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/{workflow.generated-CDCnZNkH.d.mts → workflow.generated-B7Mupf5V.d.mts} +5 -2
- package/docs/cli/application.md +130 -5
- package/docs/cli/crash-report.md +12 -1
- package/docs/cli/executor.md +6 -4
- package/docs/cli/organization.md +6 -5
- package/docs/cli/workspace.md +16 -13
- package/docs/cli-reference.md +10 -9
- package/docs/services/workflow.md +20 -0
- package/package.json +9 -9
- package/dist/application-DQpD_kHR.mjs.map +0 -1
- package/dist/application-DUcmoFdc.mjs +0 -4
- package/dist/client-CcV6Jjds.mjs.map +0 -1
- package/dist/kysely-type-CwtvQuxh.mjs.map +0 -1
- package/dist/package-json-CPR7s5hf.mjs +0 -4
- package/dist/runtime-Bn68JXnL.mjs.map +0 -1
- package/dist/telemetry-C1hzFaiV.mjs +0 -4
package/dist/cli/index.mjs
CHANGED
|
@@ -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-
|
|
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,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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-
|
|
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
|
|
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-
|
|
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-
|
|
3734
|
+
const { initTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
|
|
3727
3735
|
await initTelemetry();
|
|
3728
|
-
const { upgrade } = await import("../service-
|
|
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-
|
|
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-
|
|
4156
|
+
const { shutdownTelemetry } = await import("../telemetry-C_WXxIo0.mjs");
|
|
4149
4157
|
await shutdownTelemetry();
|
|
4150
4158
|
}
|
|
4151
4159
|
});
|