@tailor-platform/sdk 2.0.0-next.6 → 2.0.0-next.7
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 +47 -0
- package/dist/{application-BJXRpQj5.mjs → application-GzW98_Xr.mjs} +199 -172
- package/dist/application-GzW98_Xr.mjs.map +1 -0
- package/dist/application-OM0taSPn.mjs +3 -0
- package/dist/cli/index.mjs +12 -9
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.mjs +2 -2
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/config/types.d.mts +5 -1
- package/dist/configure/index.mjs +16 -16
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/auth/types.d.mts +18 -23
- package/dist/configure/services/executor/operation.d.mts +1 -1
- package/dist/configure/services/workflow/job.d.mts +10 -10
- package/dist/configure/services/workflow/workflow.d.mts +6 -4
- package/dist/{globals-D-YbJKW-.mjs → globals-CBZ0egXT.mjs} +3 -6
- package/dist/globals-CBZ0egXT.mjs.map +1 -0
- package/dist/{register-ts-hook-DL31O2W9.mjs → register-ts-hook-DvEs6YsL.mjs} +35 -78
- package/dist/register-ts-hook-DvEs6YsL.mjs.map +1 -0
- package/dist/{registry-CC3CbQiF.mjs → registry-i7EdJ-D5.mjs} +10 -10
- package/dist/registry-i7EdJ-D5.mjs.map +1 -0
- package/dist/runtime/globals.d.mts +1 -4
- package/dist/runtime/index.mjs +1 -1
- package/dist/runtime/workflow.d.mts +1 -76
- package/dist/runtime/workflow.mjs +1 -1
- package/dist/service-BJAQ70e5.mjs +3 -0
- package/dist/{service-CnHz9rwz.mjs → service-Dmxa2I4i.mjs} +31 -17
- package/dist/service-Dmxa2I4i.mjs.map +1 -0
- package/dist/utils/test/index.mjs +11 -11
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/utils/test/mock.d.mts +6 -6
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.mjs +67 -99
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mocks/workflow.d.mts +21 -41
- package/dist/vitest/setup.mjs +1 -1
- package/dist/vitest/workflow-local.d.mts +2 -2
- package/dist/workflow-CsBvRE3g.mjs +34 -0
- package/dist/workflow-CsBvRE3g.mjs.map +1 -0
- package/docs/cli/application.md +2 -0
- package/docs/cli/function.md +2 -2
- package/docs/cli/tailordb.md +2 -2
- package/docs/cli-reference.md +1 -1
- package/docs/configuration.md +2 -0
- package/docs/github-actions.md +2 -2
- package/docs/migration/v2.md +128 -11
- package/docs/runtime.md +1 -1
- package/docs/services/auth.md +7 -7
- package/docs/services/workflow.md +43 -43
- package/docs/testing.md +9 -9
- package/package.json +2 -2
- package/dist/application-BJXRpQj5.mjs.map +0 -1
- package/dist/application-BV-AXawv.mjs +0 -3
- package/dist/globals-D-YbJKW-.mjs.map +0 -1
- package/dist/register-ts-hook-DL31O2W9.mjs.map +0 -1
- package/dist/registry-CC3CbQiF.mjs.map +0 -1
- package/dist/service-CnHz9rwz.mjs.map +0 -1
- package/dist/service-nU6ITOHL.mjs +0 -3
- package/dist/workflow-9kHGKxF2.mjs +0 -64
- package/dist/workflow-9kHGKxF2.mjs.map +0 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -3,9 +3,9 @@ import { r as parseInputFields } from "../schema--xYWRGfe.mjs";
|
|
|
3
3
|
import { St as AuthInvokerSchema, T as CustomDomainStatus, U as FunctionExecution_Type, kt as PATScope } from "../workspace_resource_pb-Db3fv68L.mjs";
|
|
4
4
|
import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
|
|
5
5
|
import { n as logger, r as styles } from "../logger-BwS4ppwO.mjs";
|
|
6
|
-
import { $n as saveUserTokens, An as sdkNameLabelKey, B as extractOwnedNamespaces, Bn as hasUserTokenEntry, Bt as getCommand$1, Cn as formatMigrationNumber, Ct as triggerCommand, Dn as hasChanges, E as listCommand$14, En as formatMigrationDiff, F as openInConfiguredEditor, Fn as assertWritable, Gn as loadPlatformClientConfig, Hn as loadConfigPath, I as deployCommand$1, In as loadConfig, It as executionsCommand, J as listCommand$13, Jn as platformConfigFromProfile, Jt as formatKeyValueTable, Kn as loadStoredUserTokens, Kt as createCommand$4, Ln as deleteUserTokens, M as generateMigrationScript, Mt as startCommand, N as writeDbTypesFile, Nn as prompt, On as getNamespacesWithMigrations, P as getConfiguredEditorCommand, Pn as apiCall, Pt as getCommand$6, Q as updateCommand$2, Qn as resolveUserTokenKey, Rn as fetchLatestToken, S as waitCommand, Sn as reconstructSnapshotFromMigrations, St as webhookCommand, Tt as listCommand$8, U as removeCommand$1, Un as loadConsoleBaseUrl, Ut as deployFromCLI, V as logBetaWarning, Vn as loadAccessToken, W as updateCommand$3, Wn as loadMachineUserName, Wt as listCommand$17, X as getCommand$5, Xn as removeLegacyUserAlias, Xt as ensureConfigId, Yn as readPlatformConfig, Yt as workspaceNameSchema, Zn as resolveConfigUser, Zt as executeScript, _n as getMigrationFilePath, _t as listCommand$9, an as protoGqlPermission, ar as deploymentArgs, bn as isValidMigrationNumber, c as listCommand$16, cn as INITIAL_SCHEMA_NUMBER, cr as pagedLogArgs, ct as listCommand$11, dn as assertValidMigrationFiles, dr as toPageDirection, en as MIGRATION_LABEL_KEY, er as writePlatformConfig, et as listCommand$12, f as restoreCommand, fn as compareLocalTypesWithSnapshot, fr as workspaceArgs, g as deleteCommand$5, gt as generate, hn as getLatestMigrationNumber, i as updateCommand$4, in as generateAllTypeManifestsFromSnapshot, ir as confirmationArgs, it as deleteCommand$4, j as generateCommand$1, jn as PluginManager, k as truncateCommand, kn as resourceTrn, kt as jobsCommand, lr as paginationArgs, m as getCommand$7, mn as createSnapshotFromLocalTypes, mt as listCommand$10, nn as parseMigrationLabelNumber, nr as commonArgs, nt as getCommand$4, o as removeCommand, or as isVerbose, ot as createCommand$3, pt as tokenCommand$1, q as treeCommand, qn as loadWorkspaceId, r as queryCommand, rn as compareSnapshotWithRemote, rr as configArg, sr as multiConfigArg, t as registerTsHook, tn as handleOptionalToRequiredError, tr as defineAppCommand, u as inviteCommand, ur as resolveMachineUserInputSource, ut as getCommand$3, vn as getMigrationFiles, w as resumeCommand, wn as parseMigrationNumberArg, x as healthCommand, xn as loadDiff, y as listCommand$15, yt as getCommand$2, z as showCommand, zn as hasAnyUserTokenEntry, zt as functionExecutionStatusToString } from "../register-ts-hook-
|
|
7
|
-
import { A as fetchAllTolerant, B as initOperatorClient, D as closeConnectionPool, I as getOAuth2ClientId, L as getOrNull, M as fetchPaged, N as fetchPlatformMachineUserToken, O as defaultPlatformBaseUrl, P as fetchUserInfo, R as getPlatformBaseUrl, V as isDefaultPlatform, _ as platformBundleDefinePlugin, a as resolveInlineSourcemap, b as resolveBundleLogLevel, c as WorkflowJobSchema, d as INVOKER_EXPR, k as fetchAll, l as ResolverSchema, v as composeFunctionTreeshakeOptions, w as getDistDir, y as createLogLevelTreeshakeOptions, z as initOAuth2Client } from "../application-
|
|
8
|
-
import { i as ExecutorSchema, r as stripExecutorTriggerArgs } from "../service-
|
|
6
|
+
import { $n as saveUserTokens, An as sdkNameLabelKey, B as extractOwnedNamespaces, Bn as hasUserTokenEntry, Bt as getCommand$1, Cn as formatMigrationNumber, Ct as triggerCommand, Dn as hasChanges, E as listCommand$14, En as formatMigrationDiff, F as openInConfiguredEditor, Fn as assertWritable, Gn as loadPlatformClientConfig, Hn as loadConfigPath, I as deployCommand$1, In as loadConfig, It as executionsCommand, J as listCommand$13, Jn as platformConfigFromProfile, Jt as formatKeyValueTable, Kn as loadStoredUserTokens, Kt as createCommand$4, Ln as deleteUserTokens, M as generateMigrationScript, Mt as startCommand, N as writeDbTypesFile, Nn as prompt, On as getNamespacesWithMigrations, P as getConfiguredEditorCommand, Pn as apiCall, Pt as getCommand$6, Q as updateCommand$2, Qn as resolveUserTokenKey, Rn as fetchLatestToken, S as waitCommand, Sn as reconstructSnapshotFromMigrations, St as webhookCommand, Tt as listCommand$8, U as removeCommand$1, Un as loadConsoleBaseUrl, Ut as deployFromCLI, V as logBetaWarning, Vn as loadAccessToken, W as updateCommand$3, Wn as loadMachineUserName, Wt as listCommand$17, X as getCommand$5, Xn as removeLegacyUserAlias, Xt as ensureConfigId, Yn as readPlatformConfig, Yt as workspaceNameSchema, Zn as resolveConfigUser, Zt as executeScript, _n as getMigrationFilePath, _t as listCommand$9, an as protoGqlPermission, ar as deploymentArgs, bn as isValidMigrationNumber, c as listCommand$16, cn as INITIAL_SCHEMA_NUMBER, cr as pagedLogArgs, ct as listCommand$11, dn as assertValidMigrationFiles, dr as toPageDirection, en as MIGRATION_LABEL_KEY, er as writePlatformConfig, et as listCommand$12, f as restoreCommand, fn as compareLocalTypesWithSnapshot, fr as workspaceArgs, g as deleteCommand$5, gt as generate, hn as getLatestMigrationNumber, i as updateCommand$4, in as generateAllTypeManifestsFromSnapshot, ir as confirmationArgs, it as deleteCommand$4, j as generateCommand$1, jn as PluginManager, k as truncateCommand, kn as resourceTrn, kt as jobsCommand, lr as paginationArgs, m as getCommand$7, mn as createSnapshotFromLocalTypes, mt as listCommand$10, nn as parseMigrationLabelNumber, nr as commonArgs, nt as getCommand$4, o as removeCommand, or as isVerbose, ot as createCommand$3, pt as tokenCommand$1, q as treeCommand, qn as loadWorkspaceId, r as queryCommand, rn as compareSnapshotWithRemote, rr as configArg, sr as multiConfigArg, t as registerTsHook, tn as handleOptionalToRequiredError, tr as defineAppCommand, u as inviteCommand, ur as resolveMachineUserInputSource, ut as getCommand$3, vn as getMigrationFiles, w as resumeCommand, wn as parseMigrationNumberArg, x as healthCommand, xn as loadDiff, y as listCommand$15, yt as getCommand$2, z as showCommand, zn as hasAnyUserTokenEntry, zt as functionExecutionStatusToString } from "../register-ts-hook-DvEs6YsL.mjs";
|
|
7
|
+
import { A as fetchAllTolerant, B as initOperatorClient, D as closeConnectionPool, I as getOAuth2ClientId, L as getOrNull, M as fetchPaged, N as fetchPlatformMachineUserToken, O as defaultPlatformBaseUrl, P as fetchUserInfo, R as getPlatformBaseUrl, V as isDefaultPlatform, _ as platformBundleDefinePlugin, a as resolveInlineSourcemap, b as resolveBundleLogLevel, c as WorkflowJobSchema, d as INVOKER_EXPR, k as fetchAll, l as ResolverSchema, v as composeFunctionTreeshakeOptions, w as getDistDir, y as createLogLevelTreeshakeOptions, z as initOAuth2Client } from "../application-GzW98_Xr.mjs";
|
|
8
|
+
import { i as ExecutorSchema, r as stripExecutorTriggerArgs } from "../service-Dmxa2I4i.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";
|
|
@@ -1975,8 +1975,8 @@ const testRunCommand = defineAppCommand({
|
|
|
1975
1975
|
When a \`.js\` file is provided, detection and bundling are skipped and the file is executed as-is.
|
|
1976
1976
|
|
|
1977
1977
|
> [!WARNING]
|
|
1978
|
-
> Workflow job \`.
|
|
1979
|
-
>
|
|
1978
|
+
> Workflow job \`.start()\` calls do not work in test-run mode.
|
|
1979
|
+
> Started jobs are not executed; only the target job's \`body\` function runs in isolation.`,
|
|
1980
1980
|
examples: [
|
|
1981
1981
|
{
|
|
1982
1982
|
cmd: "resolvers/add.ts --arg '{\"a\":1,\"b\":2}'",
|
|
@@ -2655,7 +2655,7 @@ const BUILTIN_COMMAND_NAMES = [
|
|
|
2655
2655
|
* dispatcher resolves (command path joined with `-`). Used to suggest an
|
|
2656
2656
|
* install command when the plugin executable is not found.
|
|
2657
2657
|
*/
|
|
2658
|
-
const KNOWN_PLUGIN_PACKAGES = { "tailordb-erd": "@tailor-platform/sdk-tailordb-erd
|
|
2658
|
+
const KNOWN_PLUGIN_PACKAGES = { "tailordb-erd": "@tailor-platform/sdk-plugin-tailordb-erd" };
|
|
2659
2659
|
/** PATH entry separator (`;` on Windows, `:` elsewhere). */
|
|
2660
2660
|
const pathDelimiter = process.platform === "win32" ? ";" : ":";
|
|
2661
2661
|
/**
|
|
@@ -5730,7 +5730,7 @@ async function fetchRemoteTypes(client, workspaceId, namespace) {
|
|
|
5730
5730
|
async function assertMigrationsReproduceLocalTypes(loaded, target) {
|
|
5731
5731
|
const { config, plugins } = loaded;
|
|
5732
5732
|
const pluginManager = plugins.length > 0 ? new PluginManager(plugins) : void 0;
|
|
5733
|
-
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-
|
|
5733
|
+
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-OM0taSPn.mjs");
|
|
5734
5734
|
const application = defineApplication({
|
|
5735
5735
|
config,
|
|
5736
5736
|
pluginManager
|
|
@@ -5742,7 +5742,10 @@ async function assertMigrationsReproduceLocalTypes(loaded, target) {
|
|
|
5742
5742
|
await service.processNamespacePlugins();
|
|
5743
5743
|
}
|
|
5744
5744
|
const pluginExecutorFiles = generatePluginFilesIfNeeded(pluginManager, application.tailorDBServices, config.path);
|
|
5745
|
-
const executorService = application.executorService ?? (pluginExecutorFiles.length > 0 ? (await import("../service-
|
|
5745
|
+
const executorService = application.executorService ?? (pluginExecutorFiles.length > 0 ? (await import("../service-BJAQ70e5.mjs")).createExecutorService({
|
|
5746
|
+
config: { files: [] },
|
|
5747
|
+
baseDir: path.dirname(config.path)
|
|
5748
|
+
}) : void 0);
|
|
5746
5749
|
await executorService?.loadExecutors();
|
|
5747
5750
|
if (pluginExecutorFiles.length > 0) await executorService?.loadPluginExecutorFiles([...pluginExecutorFiles]);
|
|
5748
5751
|
const executorUsedTypes = /* @__PURE__ */ new Set();
|
|
@@ -5987,7 +5990,7 @@ const migrationCommand = defineCommand({
|
|
|
5987
5990
|
const tailordbCommand = defineCommand({
|
|
5988
5991
|
name: "tailordb",
|
|
5989
5992
|
description: "Manage TailorDB tables and data.",
|
|
5990
|
-
notes: "The `tailordb erd` commands are provided by the @tailor-platform/sdk-tailordb-erd
|
|
5993
|
+
notes: "The `tailordb erd` commands are provided by the @tailor-platform/sdk-plugin-tailordb-erd CLI plugin.",
|
|
5991
5994
|
subCommands: {
|
|
5992
5995
|
truncate: truncateCommand,
|
|
5993
5996
|
migration: migrationCommand
|