@tailor-platform/sdk 2.3.0 → 2.4.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 +68 -0
- package/README.md +1 -1
- package/dist/{application-F-nl107y.mjs → application-C8a0UJ-z.mjs} +201 -149
- package/dist/application-C8a0UJ-z.mjs.map +1 -0
- package/dist/application-D4zOiLLa.mjs +3 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +4 -4
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +3 -3
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +5 -5
- package/dist/cli/commands/tailordb/truncate.d.mts +2 -2
- package/dist/cli/lib.mjs +2 -2
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +174 -106
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/ts-hook.mjs +3 -1
- package/dist/completion/zsh-worker.zsh +19 -11
- package/dist/configure/config/index.d.mts +1 -1
- package/dist/configure/index.d.mts +2 -1
- package/dist/configure/index.mjs +2 -2
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/aigateway/index.d.mts +5 -4
- package/dist/configure/services/aigateway/types.d.mts +6 -1
- package/dist/configure/services/auth/types.d.mts +2 -2
- package/dist/configure/services/tailordb/permission.d.mts +1 -1
- package/dist/configure/services/tailordb/schema.d.mts +1 -1
- package/dist/configure/services/tailordb/types.d.mts +7 -4
- package/dist/configure/types/auth-namespace-name.d.mts +18 -0
- package/dist/{crashreport-CINZ5dVN.mjs → crashreport-Cd4TqfZq.mjs} +1 -1
- package/dist/{crashreport-CIIfLnoO.mjs → crashreport-Q0pDAlrj.mjs} +8 -4
- package/dist/{crashreport-CIIfLnoO.mjs.map → crashreport-Q0pDAlrj.mjs.map} +1 -1
- package/dist/{errors-BVb6vYGy.mjs → errors-Bxut5_Sy.mjs} +2 -2
- package/dist/{errors-BVb6vYGy.mjs.map → errors-Bxut5_Sy.mjs.map} +1 -1
- package/dist/file-BUcmVIH2.mjs.map +1 -1
- package/dist/kysely/index.mjs +2 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{logger-DSdExfor.mjs → logger-D0bEznPv.mjs} +9 -5
- package/dist/{logger-DSdExfor.mjs.map → logger-D0bEznPv.mjs.map} +1 -1
- package/dist/package-json-8b0O9TlX.mjs.map +1 -1
- package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +5 -5
- package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
- package/dist/plugin/builtin/file-utils/index.mjs +14 -11
- package/dist/plugin/builtin/file-utils/index.mjs.map +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +9 -9
- package/dist/plugin/builtin/kysely-type/index.mjs.map +1 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -4
- package/dist/plugin/get-generated-type.d.mts +4 -4
- package/dist/plugin/index.mjs +13 -13
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +2 -2
- package/dist/plugin/with-context.d.mts +1 -1
- package/dist/{register-ts-hook-ClI226n2.mjs → register-ts-hook-Vqjza10T.mjs} +552 -416
- package/dist/register-ts-hook-Vqjza10T.mjs.map +1 -0
- package/dist/{repl-editor-BCozyiNq.mjs → repl-editor-F9LotMNx.mjs} +3 -2
- package/dist/{repl-editor-BCozyiNq.mjs.map → repl-editor-F9LotMNx.mjs.map} +1 -1
- package/dist/runtime/file.d.mts +14 -14
- package/dist/{schema--xYWRGfe.mjs → schema-D4TC4BC3.mjs} +4 -3
- package/dist/schema-D4TC4BC3.mjs.map +1 -0
- package/dist/seed/index.d.mts +4 -4
- package/dist/seed/index.mjs +3 -3
- package/dist/seed/index.mjs.map +1 -1
- package/dist/{seed-xqM9WIHP.mjs → seed-Cibjmtry.mjs} +46 -40
- package/dist/seed-Cibjmtry.mjs.map +1 -0
- package/dist/{service-C_WpbKHu.mjs → service-2grcAOCJ.mjs} +24 -24
- package/dist/service-2grcAOCJ.mjs.map +1 -0
- package/dist/service-CaBPNDIZ.mjs +3 -0
- package/dist/{service-hZskxZmg.mjs → service-LTfp03ZZ.mjs} +7 -5
- package/dist/{service-hZskxZmg.mjs.map → service-LTfp03ZZ.mjs.map} +1 -1
- package/dist/types/aigateway.generated.d.mts +2 -2
- package/dist/types/auth.generated.d.mts +3 -3
- package/dist/types/executor.generated.d.mts +1 -1
- package/dist/types/tailordb.generated.d.mts +12 -12
- package/dist/utils/test/index.d.mts +4 -4
- package/dist/utils/test/index.mjs +4 -4
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/index.mjs +13 -7
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/docs/cli/application.md +3 -1
- package/docs/cli/function.md +17 -13
- package/docs/cli/tailordb.md +30 -30
- package/docs/cli/workspace.md +2 -2
- package/docs/cli-reference.md +21 -21
- package/docs/configuration.md +2 -2
- package/docs/migration/v2.md +4 -4
- package/docs/migration/v3.md +41 -0
- package/docs/quickstart.md +1 -1
- package/docs/services/aigateway.md +33 -9
- package/docs/services/executor.md +5 -1
- package/docs/services/tailordb-migration.md +47 -47
- package/docs/services/tailordb.md +7 -7
- package/docs/testing.md +1 -1
- package/package.json +6 -6
- package/dist/application-BZfk4HKm.mjs +0 -3
- package/dist/application-F-nl107y.mjs.map +0 -1
- package/dist/register-ts-hook-ClI226n2.mjs.map +0 -1
- package/dist/schema--xYWRGfe.mjs.map +0 -1
- package/dist/seed-xqM9WIHP.mjs.map +0 -1
- package/dist/service-C_WpbKHu.mjs.map +0 -1
- package/dist/service-D1RCdzIL.mjs +0 -3
package/dist/cli/main.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as parseInputFields } from "../schema
|
|
2
|
+
import { r as parseInputFields } from "../schema-D4TC4BC3.mjs";
|
|
3
3
|
import { At as PATScope, Ct as AuthInvokerSchema, E as CustomDomainStatus, Ft as CloneOperationStatus, W as FunctionExecution_Type } from "../workspace_resource_pb-HNIL_Vfj.mjs";
|
|
4
4
|
import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
|
|
5
|
-
import { n as logger, r as styles } from "../logger-
|
|
6
|
-
import { $ as treeCommand, $n as sanitizeMigrationLabel, An as MIGRATION_FILE_NAMES, Ar as readPlatformConfig, B as MIGRATION_REVIEW_REQUIRED_MARKER, Bn as getLatestMigrationNumber, Br as deploymentArgs, Bt as getCommand$6, C as healthCommand, Cn as captureFileState, Cr as loadConfigPath, Ct as listCommand$9, Dr as loadStoredUserTokens, E as resumeCommand, Er as loadPlatformClientConfig, F as chunkSeedData, Fn as assertValidMigrationFiles, Fr as writePlatformConfig, Ft as jobsCommand, G as showCommand, Gn as loadDiff, Gr as resolveMachineUserInputSource, Gt as functionExecutionStatusToString, H as deployCommand$1, Hn as getMigrationFilePath, Hr as multiConfigArg, Ht as executionsCommand, I as bundleSeedScript, In as compareLocalTypesWithSnapshot, Ir as defineAppCommand, Jn as reconstructSnapshotFromMigrations, K as extractOwnedNamespaces, Kn as loadSnapshot, Kr as toPageDirection, Kt as getCommand$1, Ln as compareSnapshots, Lr as commonArgs, M as loadSeedContext, Mr as resolveConfigUser, N as loadApplicationNamespaces, Nn as UnsupportedMigrationFileVersionError, Nr as resolveUserTokenKey, O as listCommand$14, Or as loadWorkspaceId, Ot as webhookCommand, Pn as assertMigrationNumberExists, Pr as saveUserTokens, Qn as handleOptionalToRequiredError, Qt as listCommand$17, R as generateCommand$1, Rn as createSnapshotFromLocalTypes, Rr as configArg, Rt as startCommand, Sn as protoGqlPermission, Sr as loadAccessToken, St as generate, Tr as loadMachineUserName, Tt as getCommand$2, Un as getMigrationFiles, Ur as pagedLogArgs, V as generateSchemaFile, Vr as isVerbose, Wr as paginationArgs, X as updateCommand$3, Xn as MIGRATION_LABEL_KEY, Xt as deployMigrationTestBaseline, Y as removeCommand$1, Yn as MIGRATION_HISTORY_LABEL_KEY, Yt as deployFromCLI, Zn as createMigrationHistoryId, Zt as deployMigrationTestTarget, _n as verifyRemoteSchema, _r as loadConfig, a as queryCommand, an as ensureConfigId, ar as resourceTrn, bn as compareSnapshotWithRemote, br as hasAnyUserTokenEntry, bt as listCommand$10, c as removeCommand, cn as executeScript, cr as sdkVersionLabelKey, ct as getCommand$4, dn as bundleMigrationScript, en as createCommand$4, er as formatDiffSummary, et as listCommand$13, f as inviteCommand, fn as checkMigrationDiffs, fr as formatMigrationNumber, ft as createCommand$3, g as getCommand$7, gn as toTailorDBDeployInput, gr as assertWritable, gt as getCommand$3, hn as logRemoteDriftGuidance, hr as apiCall, in as workspaceNameSchema, ir as selectTargetNamespace, it as updateCommand$2, j as truncateCommand, jn as MIGRATION_NUMBER_PATTERN, jr as removeLegacyUserAlias, jt as listCommand$8, kr as platformConfigFromProfile, kt as triggerCommand, lr as writeMetadataLabels, m as restoreCommand, mn as formatRemoteVerificationResults, mr as prompt, mt as listCommand$11, nr as hasChanges, nt as getCommand$5, o as updateCommand$4, on as getMigrationMachineUser, or as sdkAppIdLabelKey, ot as listCommand$12, pn as fetchRemoteSchemaSnapshot, pr as parseMigrationNumberArg, q as logBetaWarning, qn as normalizeSchemaSnapshot, qr as workspaceArgs, r as serializeError, rn as formatKeyValueTable, rr as getNamespacesWithMigrations, sn as updateMigrationLabel, sr as sdkNameLabelKey, t as registerTsHook, tn as createValidatedWorkspaceWithClient, tr as formatMigrationDiff, u as listCommand$16, un as formatMigrationScriptCommand, ur as PluginManager, ut as deleteCommand$4, v as deleteCommand$5, vn as fetchRemoteMigrationNumber, vr as deleteUserTokens, w as waitCommand, wn as captureMigrationFileState, wr as loadConsoleBaseUrl, x as listCommand$15, xn as generateAllTypeManifestsFromSnapshot, xr as hasUserTokenEntry, yn as fetchRemoteMigrationState, yr as fetchLatestToken, yt as tokenCommand$1, z as scriptCommand, zn as formatSchemaDrifts, zr as confirmationArgs } from "../register-ts-hook-
|
|
7
|
-
import {
|
|
8
|
-
import { h as loadFilesWithIgnores, i as ExecutorSchema, r as stripExecutorTriggerArgs } from "../service-
|
|
5
|
+
import { n as logger, r as styles } from "../logger-D0bEznPv.mjs";
|
|
6
|
+
import { $ as treeCommand, $n as sanitizeMigrationLabel, An as MIGRATION_FILE_NAMES, Ar as readPlatformConfig, B as MIGRATION_REVIEW_REQUIRED_MARKER, Bn as getLatestMigrationNumber, Br as deploymentArgs, Bt as getCommand$6, C as healthCommand, Cn as captureFileState, Cr as loadConfigPath, Ct as listCommand$9, Dr as loadStoredUserTokens, E as resumeCommand, Er as loadPlatformClientConfig, F as chunkSeedData, Fn as assertValidMigrationFiles, Fr as writePlatformConfig, Ft as jobsCommand, G as showCommand, Gn as loadDiff, Gr as resolveMachineUserInputSource, Gt as functionExecutionStatusToString, H as deployCommand$1, Hn as getMigrationFilePath, Hr as multiConfigArg, Ht as executionsCommand, I as bundleSeedScript, In as compareLocalTypesWithSnapshot, Ir as defineAppCommand, Jn as reconstructSnapshotFromMigrations, K as extractOwnedNamespaces, Kn as loadSnapshot, Kr as toPageDirection, Kt as getCommand$1, Ln as compareSnapshots, Lr as commonArgs, M as loadSeedContext, Mr as resolveConfigUser, N as loadApplicationNamespaces, Nn as UnsupportedMigrationFileVersionError, Nr as resolveUserTokenKey, O as listCommand$14, Or as loadWorkspaceId, Ot as webhookCommand, Pn as assertMigrationNumberExists, Pr as saveUserTokens, Qn as handleOptionalToRequiredError, Qt as listCommand$17, R as generateCommand$1, Rn as createSnapshotFromLocalTypes, Rr as configArg, Rt as startCommand, Sn as protoGqlPermission, Sr as loadAccessToken, St as generate, Tr as loadMachineUserName, Tt as getCommand$2, Un as getMigrationFiles, Ur as pagedLogArgs, V as generateSchemaFile, Vr as isVerbose, Wr as paginationArgs, X as updateCommand$3, Xn as MIGRATION_LABEL_KEY, Xt as deployMigrationTestBaseline, Y as removeCommand$1, Yn as MIGRATION_HISTORY_LABEL_KEY, Yt as deployFromCLI, Zn as createMigrationHistoryId, Zt as deployMigrationTestTarget, _n as verifyRemoteSchema, _r as loadConfig, a as queryCommand, an as ensureConfigId, ar as resourceTrn, bn as compareSnapshotWithRemote, br as hasAnyUserTokenEntry, bt as listCommand$10, c as removeCommand, cn as executeScript, cr as sdkVersionLabelKey, ct as getCommand$4, dn as bundleMigrationScript, en as createCommand$4, er as formatDiffSummary, et as listCommand$13, f as inviteCommand, fn as checkMigrationDiffs, fr as formatMigrationNumber, ft as createCommand$3, g as getCommand$7, gn as toTailorDBDeployInput, gr as assertWritable, gt as getCommand$3, hn as logRemoteDriftGuidance, hr as apiCall, in as workspaceNameSchema, ir as selectTargetNamespace, it as updateCommand$2, j as truncateCommand, jn as MIGRATION_NUMBER_PATTERN, jr as removeLegacyUserAlias, jt as listCommand$8, kr as platformConfigFromProfile, kt as triggerCommand, lr as writeMetadataLabels, m as restoreCommand, mn as formatRemoteVerificationResults, mr as prompt, mt as listCommand$11, nr as hasChanges, nt as getCommand$5, o as updateCommand$4, on as getMigrationMachineUser, or as sdkAppIdLabelKey, ot as listCommand$12, pn as fetchRemoteSchemaSnapshot, pr as parseMigrationNumberArg, q as logBetaWarning, qn as normalizeSchemaSnapshot, qr as workspaceArgs, r as serializeError, rn as formatKeyValueTable, rr as getNamespacesWithMigrations, sn as updateMigrationLabel, sr as sdkNameLabelKey, t as registerTsHook, tn as createValidatedWorkspaceWithClient, tr as formatMigrationDiff, u as listCommand$16, un as formatMigrationScriptCommand, ur as PluginManager, ut as deleteCommand$4, v as deleteCommand$5, vn as fetchRemoteMigrationNumber, vr as deleteUserTokens, w as waitCommand, wn as captureMigrationFileState, wr as loadConsoleBaseUrl, x as listCommand$15, xn as generateAllTypeManifestsFromSnapshot, xr as hasUserTokenEntry, yn as fetchRemoteMigrationState, yr as fetchLatestToken, yt as tokenCommand$1, z as scriptCommand, zn as formatSchemaDrifts, zr as confirmationArgs } from "../register-ts-hook-Vqjza10T.mjs";
|
|
7
|
+
import { C as createTsconfigPathsPlugin, D as createLogLevelTreeshakeOptions, E as composeFunctionTreeshakeOptions, G as getOAuth2ClientId, H as fetchPlatformMachineUserToken, I as closeConnectionPool, J as initOAuth2Client, K as getOrNull, L as defaultPlatformBaseUrl, N as getDistDir, O as resolveBundleLogLevel, R as fetchAll, S as createGeneratedEntryResolverPlugin, T as platformBundleDefinePlugin, U as fetchUserInfo, V as fetchPaged, X as isDefaultPlatform, Y as initOperatorClient, _ as assertUniqueLocalTailorDBTypeNames, a as resolveInlineSourcemap, d as ResolverSchema, g as buildResolverPermissionAndInputCheckExpr, k as createBundleLog, l as WorkflowJobSchema, p as INVOKER_EXPR, q as getPlatformBaseUrl, u as resolveResolverDefaultPermissionForFile, w as resolveTSConfigWithFallback, z as fetchAllTolerant } from "../application-C8a0UJ-z.mjs";
|
|
8
|
+
import { h as loadFilesWithIgnores, i as ExecutorSchema, r as stripExecutorTriggerArgs } from "../service-2grcAOCJ.mjs";
|
|
9
9
|
import { t as multiline } from "../multiline-sfHpTZZK.mjs";
|
|
10
10
|
import { t as readPackageJson } from "../package-json-8b0O9TlX.mjs";
|
|
11
11
|
import { t as userAgent } from "../user-agent-Bgsszb5I.mjs";
|
|
12
|
-
import { a as typeOnlyImportHint, i as isCLIError, r as formatNextAction, t as createCLIError } from "../errors-
|
|
12
|
+
import { a as typeOnlyImportHint, i as isCLIError, r as formatNextAction, t as createCLIError } from "../errors-Bxut5_Sy.mjs";
|
|
13
13
|
import { t as OperatorService } from "../service_pb-BEWj1pOV.mjs";
|
|
14
|
-
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crashreport-
|
|
14
|
+
import { a as JSON_FOOTER_MARKER, i as CRASH_LOG_EXTENSION, o as parseCrashReportConfig, r as sendCrashReport, t as initCrashReporting } from "../crashreport-Q0pDAlrj.mjs";
|
|
15
15
|
import * as path from "pathe";
|
|
16
16
|
import { dirname, resolve } from "pathe";
|
|
17
17
|
import { resolvePackageJSON } from "pkg-types";
|
|
@@ -650,7 +650,8 @@ const authorizeAuthConnectionCommand = defineAppCommand({
|
|
|
650
650
|
}),
|
|
651
651
|
run: async (args) => {
|
|
652
652
|
await assertWritable({ profile: args.profile });
|
|
653
|
-
const
|
|
653
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
654
|
+
const client = await initOperatorClient(accessToken);
|
|
654
655
|
const workspaceId = await loadWorkspaceId({
|
|
655
656
|
workspaceId: args["workspace-id"],
|
|
656
657
|
profile: args.profile
|
|
@@ -713,7 +714,7 @@ const authorizeAuthConnectionCommand = defineAppCommand({
|
|
|
713
714
|
const timeout = setTimeout(() => {
|
|
714
715
|
server.close();
|
|
715
716
|
reject(/* @__PURE__ */ new Error("Authorization timeout exceeded (5 minutes)."));
|
|
716
|
-
},
|
|
717
|
+
}, 3e5);
|
|
717
718
|
server.on("close", () => {
|
|
718
719
|
clearTimeout(timeout);
|
|
719
720
|
});
|
|
@@ -751,7 +752,8 @@ const deleteAuthConnectionCommand = defineAppCommand({
|
|
|
751
752
|
}),
|
|
752
753
|
run: async (args) => {
|
|
753
754
|
await assertWritable({ profile: args.profile });
|
|
754
|
-
const
|
|
755
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
756
|
+
const client = await initOperatorClient(accessToken);
|
|
755
757
|
const workspaceId = await loadWorkspaceId({
|
|
756
758
|
workspaceId: args["workspace-id"],
|
|
757
759
|
profile: args.profile
|
|
@@ -798,7 +800,8 @@ const listAuthConnectionCommand = defineAppCommand({
|
|
|
798
800
|
...paginationArgs()
|
|
799
801
|
}),
|
|
800
802
|
run: async (args) => {
|
|
801
|
-
const
|
|
803
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
804
|
+
const client = await initOperatorClient(accessToken);
|
|
802
805
|
const workspaceId = await loadWorkspaceId({
|
|
803
806
|
workspaceId: args["workspace-id"],
|
|
804
807
|
profile: args.profile
|
|
@@ -878,7 +881,8 @@ const revokeAuthConnectionCommand = defineAppCommand({
|
|
|
878
881
|
}),
|
|
879
882
|
run: async (args) => {
|
|
880
883
|
await assertWritable({ profile: args.profile });
|
|
881
|
-
const
|
|
884
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
885
|
+
const client = await initOperatorClient(accessToken);
|
|
882
886
|
const workspaceId = await loadWorkspaceId({
|
|
883
887
|
workspaceId: args["workspace-id"],
|
|
884
888
|
profile: args.profile
|
|
@@ -1196,7 +1200,7 @@ async function downloadFunctionScript(options) {
|
|
|
1196
1200
|
//#region src/cli/shared/stack-trace.ts
|
|
1197
1201
|
/**
|
|
1198
1202
|
* Stack trace parsing, sourcemap-based source identification, and
|
|
1199
|
-
* formatted error display for the
|
|
1203
|
+
* formatted error display for the function run command.
|
|
1200
1204
|
*
|
|
1201
1205
|
* The platform runtime automatically applies inline sourcemaps to V8
|
|
1202
1206
|
* stack traces, so frame positions are already original source positions.
|
|
@@ -1246,7 +1250,8 @@ function extractInlineSourcemap(bundledCode) {
|
|
|
1246
1250
|
if (!match) return null;
|
|
1247
1251
|
try {
|
|
1248
1252
|
const decoded = Buffer.from(assertDefined(match[1], "sourcemap base64 data missing"), "base64").toString("utf-8");
|
|
1249
|
-
|
|
1253
|
+
const rawSourceMap = JSON.parse(decoded);
|
|
1254
|
+
return new TraceMap(rawSourceMap);
|
|
1250
1255
|
} catch {
|
|
1251
1256
|
return null;
|
|
1252
1257
|
}
|
|
@@ -1396,7 +1401,7 @@ function formatMappedError(errorMessage, frames, traceMap, bundleDir) {
|
|
|
1396
1401
|
}
|
|
1397
1402
|
/**
|
|
1398
1403
|
* Format an error string with sourcemap-based source locations.
|
|
1399
|
-
* This is the main entry point for
|
|
1404
|
+
* This is the main entry point for function run error display.
|
|
1400
1405
|
*
|
|
1401
1406
|
* The platform runtime applies inline sourcemaps automatically, so V8
|
|
1402
1407
|
* stack frames already contain original source positions. This function
|
|
@@ -1510,7 +1515,8 @@ function formatExecutionErrorFallback(error) {
|
|
|
1510
1515
|
*/
|
|
1511
1516
|
function formatExecutionError(error, bundledCode) {
|
|
1512
1517
|
if (bundledCode && error.stackTrace) {
|
|
1513
|
-
const
|
|
1518
|
+
const errorString = composeExecutionErrorString(error);
|
|
1519
|
+
const formatted = formatErrorWithSourcemap(errorString, bundledCode, process.cwd());
|
|
1514
1520
|
if (formatted) return formatted;
|
|
1515
1521
|
}
|
|
1516
1522
|
return formatExecutionErrorFallback(error);
|
|
@@ -1576,7 +1582,7 @@ async function downloadScriptForMapping(options) {
|
|
|
1576
1582
|
const { client, workspaceId, scriptName, executionType, executionContentHash } = options;
|
|
1577
1583
|
const registryName = scriptNameToRegistryName(scriptName, executionType);
|
|
1578
1584
|
if (registryName == null) {
|
|
1579
|
-
logger.debug(`Script "${scriptName}" is not a deployed registry script (e.g.
|
|
1585
|
+
logger.debug(`Script "${scriptName}" is not a deployed registry script (e.g. function run or seed); skipping sourcemap mapping.`);
|
|
1580
1586
|
return null;
|
|
1581
1587
|
}
|
|
1582
1588
|
if (executionContentHash === "") {
|
|
@@ -1598,7 +1604,7 @@ async function downloadScriptForMapping(options) {
|
|
|
1598
1604
|
const logsCommand = defineAppCommand({
|
|
1599
1605
|
name: "logs",
|
|
1600
1606
|
description: "List or get function execution logs.",
|
|
1601
|
-
notes: `When viewing a specific execution that failed, the command displays error details with the stack trace mapped back to your original source files (clickable file links and code snippets, matching \`function
|
|
1607
|
+
notes: `When viewing a specific execution that failed, the command displays error details with the stack trace mapped back to your original source files (clickable file links and code snippets, matching \`function run\` output).
|
|
1602
1608
|
|
|
1603
1609
|
Stack traces are mapped only when the execution includes a content hash for the exact build that ran. If the content hash is missing or the build is no longer available, the command falls back to a plain-text error display.`,
|
|
1604
1610
|
examples: [
|
|
@@ -1628,7 +1634,8 @@ Stack traces are mapped only when the execution includes a content hash for the
|
|
|
1628
1634
|
})
|
|
1629
1635
|
}),
|
|
1630
1636
|
run: async (args) => {
|
|
1631
|
-
const
|
|
1637
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
1638
|
+
const client = await initOperatorClient(accessToken);
|
|
1632
1639
|
const workspaceId = await loadWorkspaceId({
|
|
1633
1640
|
workspaceId: args["workspace-id"],
|
|
1634
1641
|
profile: args.profile
|
|
@@ -1674,18 +1681,18 @@ Stack traces are mapped only when the execution includes a content hash for the
|
|
|
1674
1681
|
//#endregion
|
|
1675
1682
|
//#region src/cli/commands/function/bundle.ts
|
|
1676
1683
|
/**
|
|
1677
|
-
* Bundler for function
|
|
1684
|
+
* Bundler for the function run command
|
|
1678
1685
|
*
|
|
1679
1686
|
* Bundles a single function file for execution via the TestExecScript API.
|
|
1680
1687
|
* Generates an entry file based on the detected function type and bundles
|
|
1681
1688
|
* with rolldown, following the same patterns as the existing bundlers.
|
|
1682
1689
|
*/
|
|
1683
1690
|
/**
|
|
1684
|
-
* Bundle a function file for
|
|
1691
|
+
* Bundle a function file for `function run` execution via the TestExecScript API.
|
|
1685
1692
|
* @param options - Bundle options
|
|
1686
1693
|
* @returns Bundled code and script name
|
|
1687
1694
|
*/
|
|
1688
|
-
async function
|
|
1695
|
+
async function bundleForRun(options) {
|
|
1689
1696
|
const { detected, sourceFile, baseDir, env = {}, machineUser, workspaceId } = options;
|
|
1690
1697
|
const inlineSourcemap = resolveInlineSourcemap(options.inlineSourcemap);
|
|
1691
1698
|
const bundleLogLevel = resolveBundleLogLevel(options.logLevel);
|
|
@@ -1820,7 +1827,7 @@ function buildMachinePrincipalExpr(machineUser, workspaceId) {
|
|
|
1820
1827
|
//#endregion
|
|
1821
1828
|
//#region src/cli/commands/function/detect.ts
|
|
1822
1829
|
/**
|
|
1823
|
-
* Function type detection for
|
|
1830
|
+
* Function type detection for the function run command
|
|
1824
1831
|
*
|
|
1825
1832
|
* Detects the function type (resolver, executor, workflow job, or plain function)
|
|
1826
1833
|
* by dynamically importing the module and checking against known schemas.
|
|
@@ -1932,15 +1939,16 @@ function deriveNameFromPath(filePath) {
|
|
|
1932
1939
|
}
|
|
1933
1940
|
|
|
1934
1941
|
//#endregion
|
|
1935
|
-
//#region src/cli/commands/function/
|
|
1942
|
+
//#region src/cli/commands/function/run.ts
|
|
1936
1943
|
/**
|
|
1937
|
-
* `tailor function
|
|
1944
|
+
* `tailor function run` command
|
|
1938
1945
|
*
|
|
1939
1946
|
* Bundles and executes a function on the Tailor Platform server
|
|
1940
1947
|
* without deploying (applying) the application.
|
|
1941
1948
|
*/
|
|
1942
|
-
const
|
|
1943
|
-
name: "
|
|
1949
|
+
const runFunctionCommand = defineAppCommand({
|
|
1950
|
+
name: "run",
|
|
1951
|
+
aliases: ["test-run"],
|
|
1944
1952
|
description: "Run a function on the Tailor Platform server without deploying.",
|
|
1945
1953
|
args: z.object({
|
|
1946
1954
|
...workspaceArgs,
|
|
@@ -1969,8 +1977,10 @@ const testRunCommand = defineAppCommand({
|
|
|
1969
1977
|
notes: `You can pass either a source file (\`.ts\`) or a pre-bundled file (\`.js\`).
|
|
1970
1978
|
When a \`.js\` file is provided, detection and bundling are skipped and the file is executed as-is.
|
|
1971
1979
|
|
|
1980
|
+
\`test-run\` is a deprecated alias of this command and will be removed in v3.
|
|
1981
|
+
|
|
1972
1982
|
> [!WARNING]
|
|
1973
|
-
> Workflow job \`.start()\` calls do not work in
|
|
1983
|
+
> Workflow job \`.start()\` calls do not work in this mode.
|
|
1974
1984
|
> Started jobs are not executed; only the target job's \`body\` function runs in isolation.`,
|
|
1975
1985
|
examples: [
|
|
1976
1986
|
{
|
|
@@ -1987,6 +1997,7 @@ When a \`.js\` file is provided, detection and bundling are skipped and the file
|
|
|
1987
1997
|
}
|
|
1988
1998
|
],
|
|
1989
1999
|
run: async (args) => {
|
|
2000
|
+
if (invokedViaTestRunAlias(process.argv)) logger.warn("`tailor function test-run` is deprecated and will be removed in v3. Use `tailor function run` instead.");
|
|
1990
2001
|
const jsonOutput = logger.jsonMode;
|
|
1991
2002
|
const filePath = path.resolve(args.file);
|
|
1992
2003
|
if (!fs.existsSync(filePath)) throw new Error(`File not found: ${filePath}`);
|
|
@@ -1998,7 +2009,8 @@ When a \`.js\` file is provided, detection and bundling are skipped and the file
|
|
|
1998
2009
|
profile: args.profile,
|
|
1999
2010
|
authConfig: config.auth
|
|
2000
2011
|
});
|
|
2001
|
-
const
|
|
2012
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
2013
|
+
const client = await initOperatorClient(accessToken);
|
|
2002
2014
|
const workspaceId = await loadWorkspaceId({
|
|
2003
2015
|
workspaceId: args["workspace-id"],
|
|
2004
2016
|
profile: args.profile
|
|
@@ -2035,7 +2047,7 @@ When a \`.js\` file is provided, detection and bundling are skipped and the file
|
|
|
2035
2047
|
}
|
|
2036
2048
|
logger.info("Bundling...");
|
|
2037
2049
|
const baseDir = path.dirname(config.path);
|
|
2038
|
-
({bundledCode, scriptName} = await
|
|
2050
|
+
({bundledCode, scriptName} = await bundleForRun({
|
|
2039
2051
|
detected,
|
|
2040
2052
|
sourceFile: filePath,
|
|
2041
2053
|
baseDir,
|
|
@@ -2107,6 +2119,16 @@ When a \`.js\` file is provided, detection and bundling are skipped and the file
|
|
|
2107
2119
|
}
|
|
2108
2120
|
});
|
|
2109
2121
|
/**
|
|
2122
|
+
* Detect whether the command was invoked through the deprecated `test-run`
|
|
2123
|
+
* alias. politty resolves aliases before dispatch, so the invoked name is only
|
|
2124
|
+
* observable from the raw argv.
|
|
2125
|
+
* @param argv - Process argv tokens
|
|
2126
|
+
* @returns true when the `test-run` alias follows the `function` subcommand
|
|
2127
|
+
*/
|
|
2128
|
+
function invokedViaTestRunAlias(argv) {
|
|
2129
|
+
return argv.some((token, i) => token === "function" && argv[i + 1] === "test-run");
|
|
2130
|
+
}
|
|
2131
|
+
/**
|
|
2110
2132
|
* Resolve auth namespace from config.
|
|
2111
2133
|
* @param authConfig - Auth configuration from tailor.config.ts
|
|
2112
2134
|
* @returns Resolved auth namespace
|
|
@@ -2181,7 +2203,7 @@ const functionCommand = defineCommand({
|
|
|
2181
2203
|
get: getCommand$2,
|
|
2182
2204
|
list: listCommand$9,
|
|
2183
2205
|
logs: logsCommand,
|
|
2184
|
-
|
|
2206
|
+
run: runFunctionCommand
|
|
2185
2207
|
},
|
|
2186
2208
|
async run() {
|
|
2187
2209
|
await runCommand(listCommand$9, []);
|
|
@@ -2352,7 +2374,7 @@ const startAuthServer = async (args = {}) => {
|
|
|
2352
2374
|
const timeout = setTimeout(() => {
|
|
2353
2375
|
server.close();
|
|
2354
2376
|
reject(/* @__PURE__ */ new Error("Login timeout exceeded"));
|
|
2355
|
-
},
|
|
2377
|
+
}, 3e5);
|
|
2356
2378
|
server.on("close", () => {
|
|
2357
2379
|
clearTimeout(timeout);
|
|
2358
2380
|
});
|
|
@@ -3097,7 +3119,7 @@ const createCommand$2 = defineAppCommand({
|
|
|
3097
3119
|
permission: arg(z.enum(["write", "read"]).default("write"), { description: "Profile permission. 'read' blocks all write commands while the profile is active." }),
|
|
3098
3120
|
"machine-user": arg(z.string().optional(), {
|
|
3099
3121
|
alias: "m",
|
|
3100
|
-
description: "Default machine user name for application-data commands (query, workflow start, function
|
|
3122
|
+
description: "Default machine user name for application-data commands (query, workflow start, function run, machineuser token)."
|
|
3101
3123
|
}),
|
|
3102
3124
|
"machine-user-override": arg(z.enum(["allow", "deny"]).optional(), { description: "Whether the command line or TAILOR_PLATFORM_MACHINE_USER_NAME may override the profile's machine user. 'deny' requires --machine-user." }),
|
|
3103
3125
|
"platform-url": arg(z.url().optional(), {
|
|
@@ -3238,7 +3260,7 @@ const updateCommand$1 = defineAppCommand({
|
|
|
3238
3260
|
permission: arg(z.enum(["write", "read"]).optional(), { description: "Profile permission. 'read' blocks all write commands; 'write' lifts the restriction." }),
|
|
3239
3261
|
"machine-user": arg(z.string().optional(), {
|
|
3240
3262
|
alias: "m",
|
|
3241
|
-
description: "Default machine user name for application-data commands (query, workflow start, function
|
|
3263
|
+
description: "Default machine user name for application-data commands (query, workflow start, function run, machineuser token). Pass an empty string to clear."
|
|
3242
3264
|
}),
|
|
3243
3265
|
"machine-user-override": arg(z.enum(["allow", "deny"]).optional(), { description: "Whether the command line or TAILOR_PLATFORM_MACHINE_USER_NAME may override the profile's machine user. 'deny' requires --machine-user; 'allow' lifts the restriction." }),
|
|
3244
3266
|
"platform-url": arg(z.union([z.url(), z.literal("")]).optional(), { description: "Platform API base URL for this profile. Pass an empty string to clear." }),
|
|
@@ -3287,16 +3309,24 @@ const updateCommand$1 = defineAppCommand({
|
|
|
3287
3309
|
profile.workspace_id = newWorkspaceId;
|
|
3288
3310
|
if (args.permission === "read") profile.readonly = true;
|
|
3289
3311
|
else if (args.permission === "write") delete profile.readonly;
|
|
3290
|
-
if (args["machine-user"] !== void 0)
|
|
3291
|
-
|
|
3312
|
+
if (args["machine-user"] !== void 0) {
|
|
3313
|
+
if (args["machine-user"] === "") delete profile.machine_user;
|
|
3314
|
+
else profile.machine_user = args["machine-user"];
|
|
3315
|
+
}
|
|
3292
3316
|
if (args["machine-user-override"] === "deny") profile.machine_user_override = "deny";
|
|
3293
3317
|
else if (args["machine-user-override"] === "allow") delete profile.machine_user_override;
|
|
3294
|
-
if (args["platform-url"] !== void 0)
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
if (args["
|
|
3299
|
-
|
|
3318
|
+
if (args["platform-url"] !== void 0) {
|
|
3319
|
+
if (args["platform-url"] === "") delete profile.platform_url;
|
|
3320
|
+
else profile.platform_url = args["platform-url"];
|
|
3321
|
+
}
|
|
3322
|
+
if (args["oauth2-client-id"] !== void 0) {
|
|
3323
|
+
if (args["oauth2-client-id"] === "") delete profile.oauth2_client_id;
|
|
3324
|
+
else profile.oauth2_client_id = args["oauth2-client-id"];
|
|
3325
|
+
}
|
|
3326
|
+
if (args["console-url"] !== void 0) {
|
|
3327
|
+
if (args["console-url"] === "") delete profile.console_url;
|
|
3328
|
+
else profile.console_url = args["console-url"];
|
|
3329
|
+
}
|
|
3300
3330
|
writePlatformConfig(config);
|
|
3301
3331
|
if (!args.json) logger.success(`Profile "${args.name}" updated successfully`);
|
|
3302
3332
|
const profileInfo = {
|
|
@@ -3434,7 +3464,8 @@ const createSecretCommand = defineAppCommand({
|
|
|
3434
3464
|
}),
|
|
3435
3465
|
run: async (args) => {
|
|
3436
3466
|
await assertWritable({ profile: args.profile });
|
|
3437
|
-
const
|
|
3467
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
3468
|
+
const client = await initOperatorClient(accessToken);
|
|
3438
3469
|
const workspaceId = await loadWorkspaceId({
|
|
3439
3470
|
workspaceId: args["workspace-id"],
|
|
3440
3471
|
profile: args.profile
|
|
@@ -3484,7 +3515,8 @@ const deleteSecretCommand = defineAppCommand({
|
|
|
3484
3515
|
}),
|
|
3485
3516
|
run: async (args) => {
|
|
3486
3517
|
await assertWritable({ profile: args.profile });
|
|
3487
|
-
const
|
|
3518
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
3519
|
+
const client = await initOperatorClient(accessToken);
|
|
3488
3520
|
const workspaceId = await loadWorkspaceId({
|
|
3489
3521
|
workspaceId: args["workspace-id"],
|
|
3490
3522
|
profile: args.profile
|
|
@@ -3533,7 +3565,8 @@ function secretInfo(secret) {
|
|
|
3533
3565
|
* @returns List of secrets
|
|
3534
3566
|
*/
|
|
3535
3567
|
async function secretList(options) {
|
|
3536
|
-
const
|
|
3568
|
+
const accessToken = await loadAccessToken({ profile: options.profile });
|
|
3569
|
+
const client = await initOperatorClient(accessToken);
|
|
3537
3570
|
const workspaceId = await loadWorkspaceId({
|
|
3538
3571
|
workspaceId: options.workspaceId,
|
|
3539
3572
|
profile: options.profile
|
|
@@ -3587,7 +3620,8 @@ const updateSecretCommand = defineAppCommand({
|
|
|
3587
3620
|
}),
|
|
3588
3621
|
run: async (args) => {
|
|
3589
3622
|
await assertWritable({ profile: args.profile });
|
|
3590
|
-
const
|
|
3623
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
3624
|
+
const client = await initOperatorClient(accessToken);
|
|
3591
3625
|
const workspaceId = await loadWorkspaceId({
|
|
3592
3626
|
workspaceId: args["workspace-id"],
|
|
3593
3627
|
profile: args.profile
|
|
@@ -3640,7 +3674,8 @@ const createCommand$1 = defineAppCommand({
|
|
|
3640
3674
|
}),
|
|
3641
3675
|
run: async (args) => {
|
|
3642
3676
|
await assertWritable({ profile: args.profile });
|
|
3643
|
-
const
|
|
3677
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
3678
|
+
const client = await initOperatorClient(accessToken);
|
|
3644
3679
|
const workspaceId = await loadWorkspaceId({
|
|
3645
3680
|
workspaceId: args["workspace-id"],
|
|
3646
3681
|
profile: args.profile
|
|
@@ -3670,7 +3705,8 @@ const deleteCommand$2 = defineAppCommand({
|
|
|
3670
3705
|
}),
|
|
3671
3706
|
run: async (args) => {
|
|
3672
3707
|
await assertWritable({ profile: args.profile });
|
|
3673
|
-
const
|
|
3708
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
3709
|
+
const client = await initOperatorClient(accessToken);
|
|
3674
3710
|
const workspaceId = await loadWorkspaceId({
|
|
3675
3711
|
workspaceId: args["workspace-id"],
|
|
3676
3712
|
profile: args.profile
|
|
@@ -3715,7 +3751,8 @@ function vaultInfo(vault) {
|
|
|
3715
3751
|
* @returns List of vaults
|
|
3716
3752
|
*/
|
|
3717
3753
|
async function vaultList(options) {
|
|
3718
|
-
const
|
|
3754
|
+
const accessToken = await loadAccessToken({ profile: options?.profile });
|
|
3755
|
+
const client = await initOperatorClient(accessToken);
|
|
3719
3756
|
const workspaceId = await loadWorkspaceId({
|
|
3720
3757
|
workspaceId: options?.workspaceId,
|
|
3721
3758
|
profile: options?.profile
|
|
@@ -4547,7 +4584,8 @@ function decideAction(obj) {
|
|
|
4547
4584
|
}
|
|
4548
4585
|
if (!fileExists) return { action: "restore" };
|
|
4549
4586
|
if (currentContent !== null) {
|
|
4550
|
-
|
|
4587
|
+
const normalizedContent = normalize ? normalize(currentContent) : currentContent;
|
|
4588
|
+
if (hashContent(normalizedContent) === existing.contentHash) return { action: "regenerate" };
|
|
4551
4589
|
}
|
|
4552
4590
|
if (force) return { action: "regenerate" };
|
|
4553
4591
|
return {
|
|
@@ -5379,7 +5417,8 @@ const domainGetCommand = defineAppCommand({
|
|
|
5379
5417
|
})
|
|
5380
5418
|
}),
|
|
5381
5419
|
run: async (args) => {
|
|
5382
|
-
const
|
|
5420
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
5421
|
+
const client = await initOperatorClient(accessToken);
|
|
5383
5422
|
const workspaceId = await loadWorkspaceId({
|
|
5384
5423
|
workspaceId: args["workspace-id"],
|
|
5385
5424
|
profile: args.profile
|
|
@@ -5419,7 +5458,8 @@ const domainListCommand = defineAppCommand({
|
|
|
5419
5458
|
})
|
|
5420
5459
|
}),
|
|
5421
5460
|
run: async (args) => {
|
|
5422
|
-
const
|
|
5461
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
5462
|
+
const client = await initOperatorClient(accessToken);
|
|
5423
5463
|
const workspaceId = await loadWorkspaceId({
|
|
5424
5464
|
workspaceId: args["workspace-id"],
|
|
5425
5465
|
profile: args.profile
|
|
@@ -5471,7 +5511,8 @@ const getCommand = defineAppCommand({
|
|
|
5471
5511
|
})
|
|
5472
5512
|
}),
|
|
5473
5513
|
run: async (args) => {
|
|
5474
|
-
const
|
|
5514
|
+
const accessToken = await loadAccessToken({ profile: args.profile });
|
|
5515
|
+
const client = await initOperatorClient(accessToken);
|
|
5475
5516
|
const workspaceId = await loadWorkspaceId({
|
|
5476
5517
|
workspaceId: args["workspace-id"],
|
|
5477
5518
|
profile: args.profile
|
|
@@ -5506,7 +5547,8 @@ const getCommand = defineAppCommand({
|
|
|
5506
5547
|
* @returns List of static websites
|
|
5507
5548
|
*/
|
|
5508
5549
|
async function listStaticWebsites(options) {
|
|
5509
|
-
const
|
|
5550
|
+
const accessToken = await loadAccessToken({ profile: options?.profile });
|
|
5551
|
+
const client = await initOperatorClient(accessToken);
|
|
5510
5552
|
const workspaceId = await loadWorkspaceId({
|
|
5511
5553
|
workspaceId: options?.workspaceId,
|
|
5512
5554
|
profile: options?.profile
|
|
@@ -5597,13 +5639,15 @@ async function activateBaseline(migrationsDir, snapshot, namespace, rebaseline)
|
|
|
5597
5639
|
force: true
|
|
5598
5640
|
});
|
|
5599
5641
|
}
|
|
5600
|
-
|
|
5642
|
+
const stagedSnapshot = {
|
|
5601
5643
|
...snapshot,
|
|
5602
5644
|
namespace,
|
|
5603
5645
|
version: 5,
|
|
5604
5646
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5605
5647
|
rebaseline
|
|
5606
|
-
}
|
|
5648
|
+
};
|
|
5649
|
+
const result = await generateSchemaFile(stagedSnapshot, stagingDir, 0);
|
|
5650
|
+
loadSnapshot(result.filePath);
|
|
5607
5651
|
await fsPromises.rename(resolvedMigrationsDir, backupDir);
|
|
5608
5652
|
movedLiveDirectory = true;
|
|
5609
5653
|
try {
|
|
@@ -5653,7 +5697,7 @@ async function rebaseline(options) {
|
|
|
5653
5697
|
const currentHistoryId = reconstructSnapshotFromMigrations(target.migrationsDir, 0)?.rebaseline?.historyId ?? null;
|
|
5654
5698
|
const initialFileState = captureMigrationFileState([target])[target.namespace];
|
|
5655
5699
|
const pluginManager = plugins.length > 0 ? new PluginManager(plugins) : void 0;
|
|
5656
|
-
const { defineApplication } = await import("../application-
|
|
5700
|
+
const { defineApplication } = await import("../application-D4zOiLLa.mjs");
|
|
5657
5701
|
const application = defineApplication({
|
|
5658
5702
|
config,
|
|
5659
5703
|
pluginManager
|
|
@@ -5676,7 +5720,8 @@ async function rebaseline(options) {
|
|
|
5676
5720
|
const localSourceFiles = () => [config.path, ...loadFilesWithIgnores(targetService.config, configDir)];
|
|
5677
5721
|
assertLocalTypesReady();
|
|
5678
5722
|
const initialLocalFileState = captureFileState(localSourceFiles());
|
|
5679
|
-
const
|
|
5723
|
+
const accessToken = await loadAccessToken({ profile: options.profile });
|
|
5724
|
+
const client = await initOperatorClient(accessToken);
|
|
5680
5725
|
const workspaceId = await loadWorkspaceId({
|
|
5681
5726
|
workspaceId: options.workspaceId,
|
|
5682
5727
|
profile: options.profile
|
|
@@ -5744,7 +5789,7 @@ async function rebaseline(options) {
|
|
|
5744
5789
|
}
|
|
5745
5790
|
assertValidMigrationFiles(target.migrationsDir, target.namespace);
|
|
5746
5791
|
if (captureMigrationFileState([target])[target.namespace] !== initialFileState) throw new Error("Migration files changed while waiting for confirmation. Run the command again.");
|
|
5747
|
-
if (captureFileState(localSourceFiles()) !== initialLocalFileState) throw new Error("Local TailorDB
|
|
5792
|
+
if (captureFileState(localSourceFiles()) !== initialLocalFileState) throw new Error("Local TailorDB table or config files changed. Run the command again.");
|
|
5748
5793
|
assertLocalTypesReady();
|
|
5749
5794
|
await assertConnectedWorkspaceReady(currentHistoryId, "confirmation");
|
|
5750
5795
|
const rebaselineMarker = {
|
|
@@ -5794,16 +5839,20 @@ async function set(options) {
|
|
|
5794
5839
|
logBetaWarning("tailordb migration");
|
|
5795
5840
|
const migrationNumber = parseMigrationNumberArg(options.number);
|
|
5796
5841
|
const { config } = await loadConfig(options.configPath);
|
|
5797
|
-
const
|
|
5842
|
+
const configDir = path.dirname(config.path);
|
|
5843
|
+
const namespacesWithMigrations = getNamespacesWithMigrations(config, configDir);
|
|
5844
|
+
const target = selectTargetNamespace(namespacesWithMigrations, options.namespace);
|
|
5798
5845
|
const targetNamespace = target.namespace;
|
|
5799
5846
|
assertValidMigrationFiles(target.migrationsDir, targetNamespace);
|
|
5800
5847
|
assertMigrationNumberExists(target.migrationsDir, migrationNumber);
|
|
5801
5848
|
const historyId = reconstructSnapshotFromMigrations(target.migrationsDir, 0)?.rebaseline?.historyId;
|
|
5802
|
-
const
|
|
5803
|
-
const
|
|
5849
|
+
const accessToken = await loadAccessToken({ profile: options.profile });
|
|
5850
|
+
const client = await initOperatorClient(accessToken);
|
|
5851
|
+
const workspaceId = await loadWorkspaceId({
|
|
5804
5852
|
workspaceId: options.workspaceId,
|
|
5805
5853
|
profile: options.profile
|
|
5806
|
-
})
|
|
5854
|
+
});
|
|
5855
|
+
const trn = resourceTrn(workspaceId, "tailordb", targetNamespace);
|
|
5807
5856
|
const currentState = await fetchRemoteMigrationState(client, trn);
|
|
5808
5857
|
const current = currentState.number;
|
|
5809
5858
|
const currentMigration = current ?? 0;
|
|
@@ -5882,7 +5931,8 @@ function isStatusFailure(row) {
|
|
|
5882
5931
|
}
|
|
5883
5932
|
async function collectMigrationStatuses(options) {
|
|
5884
5933
|
const { config } = await loadConfig(options.configPath);
|
|
5885
|
-
const
|
|
5934
|
+
const configDir = path.dirname(config.path);
|
|
5935
|
+
const namespacesWithMigrations = getNamespacesWithMigrations(config, configDir);
|
|
5886
5936
|
if (namespacesWithMigrations.length === 0) throw new Error("No TailorDB services with migrations configuration found");
|
|
5887
5937
|
const targetNamespaces = options.namespace ? namespacesWithMigrations.filter((ns) => ns.namespace === options.namespace) : namespacesWithMigrations;
|
|
5888
5938
|
if (targetNamespaces.length === 0) throw new Error(`Namespace "${options.namespace}" not found or does not have migrations configured`);
|
|
@@ -5918,7 +5968,8 @@ async function collectMigrationStatuses(options) {
|
|
|
5918
5968
|
namespace,
|
|
5919
5969
|
error: localFailures.get(namespace) ?? "Failed to read local migration history."
|
|
5920
5970
|
}));
|
|
5921
|
-
const
|
|
5971
|
+
const accessToken = await loadAccessToken({ profile: options.profile });
|
|
5972
|
+
const client = await initOperatorClient(accessToken);
|
|
5922
5973
|
const workspaceId = await loadWorkspaceId({
|
|
5923
5974
|
workspaceId: options.workspaceId,
|
|
5924
5975
|
profile: options.profile
|
|
@@ -6091,7 +6142,7 @@ async function fetchRemoteTypes(client, workspaceId, namespace) {
|
|
|
6091
6142
|
async function assertMigrationsReproduceLocalTypes(loaded, target) {
|
|
6092
6143
|
const { config, plugins } = loaded;
|
|
6093
6144
|
const pluginManager = plugins.length > 0 ? new PluginManager(plugins) : void 0;
|
|
6094
|
-
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-
|
|
6145
|
+
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-D4zOiLLa.mjs");
|
|
6095
6146
|
const application = defineApplication({
|
|
6096
6147
|
config,
|
|
6097
6148
|
pluginManager
|
|
@@ -6103,7 +6154,7 @@ async function assertMigrationsReproduceLocalTypes(loaded, target) {
|
|
|
6103
6154
|
await service.processNamespacePlugins();
|
|
6104
6155
|
}
|
|
6105
6156
|
const pluginExecutorFiles = generatePluginFilesIfNeeded(pluginManager, application.tailorDBServices, config.path);
|
|
6106
|
-
const executorService = application.executorService ?? (pluginExecutorFiles.length > 0 ? (await import("../service-
|
|
6157
|
+
const executorService = application.executorService ?? (pluginExecutorFiles.length > 0 ? (await import("../service-CaBPNDIZ.mjs")).createExecutorService({
|
|
6107
6158
|
config: { files: [] },
|
|
6108
6159
|
baseDir: path.dirname(config.path)
|
|
6109
6160
|
}) : void 0);
|
|
@@ -6117,14 +6168,15 @@ async function assertMigrationsReproduceLocalTypes(loaded, target) {
|
|
|
6117
6168
|
};
|
|
6118
6169
|
const latestSnapshot = reconstructSnapshotFromMigrations(target.migrationsDir);
|
|
6119
6170
|
if (!latestSnapshot) return manifestOptions;
|
|
6120
|
-
const
|
|
6171
|
+
const currentSnapshot = createSnapshotFromLocalTypes(tailordbService.types, target.namespace);
|
|
6172
|
+
const diff = compareLocalTypesWithSnapshot(latestSnapshot, currentSnapshot.tables, target.namespace);
|
|
6121
6173
|
if (!hasChanges(diff)) return manifestOptions;
|
|
6122
6174
|
logger.error(`Migration history does not reproduce the current local schema for namespace ${styles.bold(target.namespace)}:`);
|
|
6123
6175
|
logger.log(formatMigrationDiff(diff));
|
|
6124
6176
|
logger.newline();
|
|
6125
6177
|
logger.info("This usually means one of the following:");
|
|
6126
|
-
logger.info(" - Migration files were edited and replaying them no longer matches the
|
|
6127
|
-
logger.info(" -
|
|
6178
|
+
logger.info(" - Migration files were edited and replaying them no longer matches the table definitions — fix the migration files.", { mode: "plain" });
|
|
6179
|
+
logger.info(" - Table definitions changed without a new migration — run 'tailor tailordb migration generate' first.", { mode: "plain" });
|
|
6128
6180
|
logger.newline();
|
|
6129
6181
|
throw new Error("Refusing to sync: the migration history must reproduce the current local schema before it can be applied to the remote.");
|
|
6130
6182
|
}
|
|
@@ -6148,13 +6200,16 @@ async function sync(options) {
|
|
|
6148
6200
|
const targetVersion = parseMigrationNumberArg(options.number);
|
|
6149
6201
|
const loaded = await loadConfig(options.configPath);
|
|
6150
6202
|
const { config } = loaded;
|
|
6151
|
-
const
|
|
6203
|
+
const configDir = path.dirname(config.path);
|
|
6204
|
+
const namespacesWithMigrations = getNamespacesWithMigrations(config, configDir);
|
|
6205
|
+
const target = selectTargetNamespace(namespacesWithMigrations, options.namespace);
|
|
6152
6206
|
assertValidMigrationFiles(target.migrationsDir, target.namespace);
|
|
6153
6207
|
const latest = assertMigrationNumberExists(target.migrationsDir, targetVersion);
|
|
6154
6208
|
const snapshot = reconstructSnapshotFromMigrations(target.migrationsDir, targetVersion);
|
|
6155
6209
|
if (!snapshot) throw new Error(`No initial schema snapshot found in ${target.migrationsDir}. Expected 0000/schema.json.`);
|
|
6156
6210
|
const manifestOptions = await assertMigrationsReproduceLocalTypes(loaded, target);
|
|
6157
|
-
const
|
|
6211
|
+
const accessToken = await loadAccessToken({ profile: options.profile });
|
|
6212
|
+
const client = await initOperatorClient(accessToken);
|
|
6158
6213
|
const workspaceId = await loadWorkspaceId({
|
|
6159
6214
|
workspaceId: options.workspaceId,
|
|
6160
6215
|
profile: options.profile
|
|
@@ -6162,7 +6217,8 @@ async function sync(options) {
|
|
|
6162
6217
|
const trn = resourceTrn(workspaceId, "tailordb", target.namespace);
|
|
6163
6218
|
const current = await fetchRemoteMigrationNumber(client, trn);
|
|
6164
6219
|
const remoteTypes = await fetchRemoteTypes(client, workspaceId, target.namespace);
|
|
6165
|
-
const
|
|
6220
|
+
const existingTypeNames = new Set(remoteTypes.map((t) => t.name));
|
|
6221
|
+
const { creates, updates, deletes } = compareSnapshotWithRemote(snapshot, existingTypeNames);
|
|
6166
6222
|
const remoteGqlPermissions = await fetchRemoteGqlPermissions(client, workspaceId, target.namespace);
|
|
6167
6223
|
const remoteGqlPermissionTypes = new Set(remoteGqlPermissions.map((p) => p.typeName));
|
|
6168
6224
|
const desiredGqlPermissions = Object.entries(snapshot.tables).flatMap(([typeName, snapshotType]) => snapshotType.permissions?.gql ? [{
|
|
@@ -6175,16 +6231,16 @@ async function sync(options) {
|
|
|
6175
6231
|
logger.info(`Namespace: ${styles.bold(target.namespace)}`);
|
|
6176
6232
|
logger.log(` Current migration: ${current === null ? "<unset>" : styles.bold(formatMigrationNumber(current))}`);
|
|
6177
6233
|
logger.log(` Target migration: ${styles.bold(formatMigrationNumber(targetVersion))}`);
|
|
6178
|
-
logger.log(`
|
|
6179
|
-
logger.log(`
|
|
6180
|
-
logger.log(`
|
|
6234
|
+
logger.log(` Tables to create: ${styles.bold(String(creates.length))}`);
|
|
6235
|
+
logger.log(` Tables to update: ${styles.bold(String(updates.length))}`);
|
|
6236
|
+
logger.log(` Tables to delete: ${styles.bold(String(deletes.length))}`);
|
|
6181
6237
|
logger.log(` GQL permissions to set: ${styles.bold(String(desiredGqlPermissions.length))}`);
|
|
6182
6238
|
logger.log(` GQL permissions to delete: ${styles.bold(String(gqlPermissionDeletes.length))}`);
|
|
6183
6239
|
logger.newline();
|
|
6184
|
-
if (creates.length + updates.length + deletes.length + desiredGqlPermissions.length + gqlPermissionDeletes.length === 0) logger.info("No
|
|
6240
|
+
if (creates.length + updates.length + deletes.length + desiredGqlPermissions.length + gqlPermissionDeletes.length === 0) logger.info("No tables to apply; only the migration label will be updated.");
|
|
6185
6241
|
else {
|
|
6186
|
-
logger.warn("This operation will overwrite remote TailorDB
|
|
6187
|
-
if (deletes.length > 0) logger.warn("Existing data in deleted
|
|
6242
|
+
logger.warn("This operation will overwrite remote TailorDB tables to match the selected snapshot.");
|
|
6243
|
+
if (deletes.length > 0) logger.warn("Existing data in deleted tables will be lost.");
|
|
6188
6244
|
logger.newline();
|
|
6189
6245
|
}
|
|
6190
6246
|
logger.warn("Sync never runs migrate.ts scripts; it only applies the schema snapshot and moves the migration label.");
|
|
@@ -6209,7 +6265,7 @@ async function sync(options) {
|
|
|
6209
6265
|
const manifests = generateAllTypeManifestsFromSnapshot(snapshot, manifestOptions);
|
|
6210
6266
|
const manifestFor = (typeName) => {
|
|
6211
6267
|
const manifest = manifests.get(typeName);
|
|
6212
|
-
if (!manifest) throw new Error(`Internal error: no manifest generated for
|
|
6268
|
+
if (!manifest) throw new Error(`Internal error: no manifest generated for table "${typeName}". No changes were applied.`);
|
|
6213
6269
|
return manifest;
|
|
6214
6270
|
};
|
|
6215
6271
|
const createManifests = creates.map((typeName) => manifestFor(typeName));
|
|
@@ -6291,7 +6347,7 @@ const syncCommand = defineAppCommand({
|
|
|
6291
6347
|
//#endregion
|
|
6292
6348
|
//#region src/cli/commands/tailordb/migrate/test-runtime.ts
|
|
6293
6349
|
const CLONE_POLL_INTERVAL = 1e3;
|
|
6294
|
-
const CLONE_TIMEOUT =
|
|
6350
|
+
const CLONE_TIMEOUT = 3e5;
|
|
6295
6351
|
function delay(milliseconds) {
|
|
6296
6352
|
return milliseconds > 0 ? new Promise((resolve) => setTimeout(resolve, milliseconds)) : Promise.resolve();
|
|
6297
6353
|
}
|
|
@@ -6502,7 +6558,8 @@ async function assertSourceBaselineFresh(state, prepared, sourceWorkspaceId) {
|
|
|
6502
6558
|
for (const input of unmigratedInputs) {
|
|
6503
6559
|
const snapshot = prepared.baselineSnapshots.get(input.namespace);
|
|
6504
6560
|
if (!snapshot) continue;
|
|
6505
|
-
|
|
6561
|
+
const current = await fetchRemoteSchemaSnapshot(state.client, sourceWorkspaceId, input.namespace);
|
|
6562
|
+
if (compareSnapshots(snapshot, current).changes.length > 0) throw new Error(`Source namespace "${input.namespace}" schema changed after migration test preparation. Run the migration test again.`);
|
|
6506
6563
|
}
|
|
6507
6564
|
}
|
|
6508
6565
|
/**
|
|
@@ -6553,7 +6610,9 @@ async function prepareMigrationTest(options) {
|
|
|
6553
6610
|
}
|
|
6554
6611
|
if (options.assertionPath) assertAssertionScript(options.assertionPath);
|
|
6555
6612
|
const inputs = loaded.application.tailorDBServices.map(toTailorDBDeployInput);
|
|
6556
|
-
const
|
|
6613
|
+
const accessToken = await loadAccessToken({ profile: options.profile });
|
|
6614
|
+
const platformConfig = await loadPlatformClientConfig({ profile: options.profile });
|
|
6615
|
+
const client = await initOperatorClient(accessToken, platformConfig);
|
|
6557
6616
|
const sourceWorkspaceId = await loadWorkspaceId({
|
|
6558
6617
|
workspaceId: options.workspaceId,
|
|
6559
6618
|
profile: options.profile
|
|
@@ -6644,7 +6703,8 @@ function createMigrationTestDependencies() {
|
|
|
6644
6703
|
return prepared;
|
|
6645
6704
|
},
|
|
6646
6705
|
createWorkspace: async (prepared) => {
|
|
6647
|
-
const
|
|
6706
|
+
const state = stateOrThrow(runtimeState);
|
|
6707
|
+
const workspace = await createValidatedWorkspaceWithClient(state.client, prepared.temporaryWorkspace);
|
|
6648
6708
|
logger.info(`Created temporary workspace ${workspace.name} (${workspace.id}).`);
|
|
6649
6709
|
return {
|
|
6650
6710
|
id: workspace.id,
|
|
@@ -6995,12 +7055,13 @@ function buildValidationReports(options) {
|
|
|
6995
7055
|
*/
|
|
6996
7056
|
async function collectValidationReports(options) {
|
|
6997
7057
|
const { config, plugins } = await loadConfig(options.configPath);
|
|
6998
|
-
const
|
|
7058
|
+
const configDir = path.dirname(config.path);
|
|
7059
|
+
const namespacesWithMigrations = getNamespacesWithMigrations(config, configDir);
|
|
6999
7060
|
if (namespacesWithMigrations.length === 0) throw new Error("No TailorDB services with migrations configuration found");
|
|
7000
7061
|
const targetNamespaces = options.namespace ? namespacesWithMigrations.filter((ns) => ns.namespace === options.namespace) : namespacesWithMigrations;
|
|
7001
7062
|
if (targetNamespaces.length === 0) throw new Error(`Namespace "${options.namespace}" not found or does not have migrations configured`);
|
|
7002
7063
|
const pluginManager = plugins.length > 0 ? new PluginManager(plugins) : void 0;
|
|
7003
|
-
const { defineApplication } = await import("../application-
|
|
7064
|
+
const { defineApplication } = await import("../application-D4zOiLLa.mjs");
|
|
7004
7065
|
const application = defineApplication({
|
|
7005
7066
|
config,
|
|
7006
7067
|
pluginManager
|
|
@@ -7034,10 +7095,13 @@ async function collectValidationReports(options) {
|
|
|
7034
7095
|
if (checkableNamespaces.length === 0) return { reports: buildValidationReports(localReportOptions) };
|
|
7035
7096
|
let remoteResults;
|
|
7036
7097
|
try {
|
|
7037
|
-
|
|
7098
|
+
const accessToken = await loadAccessToken({ profile: options.profile });
|
|
7099
|
+
const client = await initOperatorClient(accessToken);
|
|
7100
|
+
const workspaceId = await loadWorkspaceId({
|
|
7038
7101
|
workspaceId: options.workspaceId,
|
|
7039
7102
|
profile: options.profile
|
|
7040
|
-
})
|
|
7103
|
+
});
|
|
7104
|
+
remoteResults = await verifyRemoteSchema(client, workspaceId, checkableNamespaces, config, tailorDBInputs);
|
|
7041
7105
|
} catch (remoteError) {
|
|
7042
7106
|
return {
|
|
7043
7107
|
reports: buildValidationReports(localReportOptions),
|
|
@@ -7060,12 +7124,13 @@ function printValidationReports(reports) {
|
|
|
7060
7124
|
}
|
|
7061
7125
|
logger.log(` Migration files: ${styles.success("OK")}`);
|
|
7062
7126
|
const local = report.localSchema;
|
|
7063
|
-
if (local?.hasDiff)
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7127
|
+
if (local?.hasDiff) {
|
|
7128
|
+
if (local.diff) {
|
|
7129
|
+
logger.log(` Local schema: ${styles.error("changes not in migration files")}`);
|
|
7130
|
+
logger.log(` ${formatDiffSummary(local.diff)}`);
|
|
7131
|
+
logger.log(formatMigrationDiff(local.diff));
|
|
7132
|
+
} else logger.log(` Local schema: ${styles.error("no migration snapshot found")}`);
|
|
7133
|
+
} else logger.log(` Local schema: ${styles.success("OK")}`);
|
|
7069
7134
|
const remote = report.remoteSchema;
|
|
7070
7135
|
if (remote?.skipped === "check_failed") logger.log(` Remote schema: ${styles.error("not checked")}`);
|
|
7071
7136
|
else if (remote?.checkpointRepair) logger.log(` Remote schema: ${styles.success("OK")} (next deploy will reset the checkpoint to 0000 from ${formatMigrationNumber(remote.checkpointRepair.from)})`);
|
|
@@ -7078,14 +7143,16 @@ function printValidationReports(reports) {
|
|
|
7078
7143
|
else if (remote?.skipped === "no_snapshot") logger.log(` Remote schema: ${styles.dim(`skipped (no local snapshot for remote migration ${formatMigrationNumber(remote.remoteMigrationNumber)})`)}`);
|
|
7079
7144
|
else if (remote) logger.log(` Remote schema: ${styles.success("OK")} (remote migration: ${formatMigrationNumber(remote.remoteMigrationNumber)})`);
|
|
7080
7145
|
const acknowledgments = report.warningAcknowledgments;
|
|
7081
|
-
if (acknowledgments)
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
const
|
|
7086
|
-
|
|
7087
|
-
const
|
|
7088
|
-
|
|
7146
|
+
if (acknowledgments) {
|
|
7147
|
+
if (acknowledgments.valid) logger.log(` Warning acknowledgments: ${styles.success("OK")}`);
|
|
7148
|
+
else {
|
|
7149
|
+
logger.log(` Warning acknowledgments: ${styles.error("missing for pending migration(s) with possible data loss")}`);
|
|
7150
|
+
for (const migration of acknowledgments.missing) {
|
|
7151
|
+
const label = formatMigrationNumber(migration.migrationNumber);
|
|
7152
|
+
for (const warning of migration.warnings) {
|
|
7153
|
+
const field = warning.fieldName ? `.${warning.fieldName}` : "";
|
|
7154
|
+
logger.log(` ${label}: ${warning.tableName}${field}: ${warning.reason}`);
|
|
7155
|
+
}
|
|
7089
7156
|
}
|
|
7090
7157
|
}
|
|
7091
7158
|
}
|
|
@@ -7128,7 +7195,7 @@ async function validate(options) {
|
|
|
7128
7195
|
}
|
|
7129
7196
|
const validateCommand = defineAppCommand({
|
|
7130
7197
|
name: "validate",
|
|
7131
|
-
description: "Validate the full migration history, unreviewed generated migration scripts, and schema drift (local
|
|
7198
|
+
description: "Validate the full migration history, unreviewed generated migration scripts, and schema drift (local tables vs. migration snapshot, remote schema vs. migration checkpoint) without deploying. This includes the migration and schema-drift checks used by 'deploy' and exits with a non-zero code when issues are found.",
|
|
7132
7199
|
args: z.strictObject({
|
|
7133
7200
|
...deploymentArgs,
|
|
7134
7201
|
namespace: arg(z.string().optional(), {
|
|
@@ -7210,7 +7277,7 @@ const upgradeCommand = defineAppCommand({
|
|
|
7210
7277
|
run: async (args) => {
|
|
7211
7278
|
const { initTelemetry } = await import("../telemetry-CkbkeJxl.mjs");
|
|
7212
7279
|
await initTelemetry();
|
|
7213
|
-
const { upgrade } = await import("../service-
|
|
7280
|
+
const { upgrade } = await import("../service-LTfp03ZZ.mjs");
|
|
7214
7281
|
await upgrade({
|
|
7215
7282
|
from: args.from,
|
|
7216
7283
|
dryRun: args["dry-run"],
|
|
@@ -7623,7 +7690,8 @@ initCrashReporting();
|
|
|
7623
7690
|
const packageJson = await readPackageJson();
|
|
7624
7691
|
const cliName = Object.keys(packageJson.bin ?? {})[0] || "tailor";
|
|
7625
7692
|
const packageName = packageJson.name ?? "@tailor-platform/sdk";
|
|
7626
|
-
const
|
|
7693
|
+
const packageJsonPath = await resolvePackageJSON(import.meta.url);
|
|
7694
|
+
const bundledSkillsDir = resolve(dirname(packageJsonPath), "agent-skills");
|
|
7627
7695
|
function defaultSkillsRunToAdd(command) {
|
|
7628
7696
|
const add = (command.subCommands ?? {}).add;
|
|
7629
7697
|
return {
|
|
@@ -7719,7 +7787,7 @@ runMain(mainCommand, {
|
|
|
7719
7787
|
if (isVerbose() && error.stack) logger.debug(`\nStack trace:\n${error.stack}`);
|
|
7720
7788
|
} else logger.error(`Unknown error: ${error}`);
|
|
7721
7789
|
if (!isCLIError(error) && (!(error instanceof Error) || error instanceof TypeError || error instanceof RangeError)) {
|
|
7722
|
-
const { reportCrash } = await import("../crashreport-
|
|
7790
|
+
const { reportCrash } = await import("../crashreport-Cd4TqfZq.mjs");
|
|
7723
7791
|
await reportCrash(error, "handledError");
|
|
7724
7792
|
}
|
|
7725
7793
|
}
|