@tailor-platform/sdk 1.73.0 → 1.73.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 +15 -0
- package/dist/application-BXdCl6bp.mjs +3 -0
- package/dist/{application-Dxhdq_nu.mjs → application-Bb9NNp5m.mjs} +34 -10
- package/dist/application-Bb9NNp5m.mjs.map +1 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +14 -2
- package/dist/cli/index.mjs +6 -6
- 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/index.mjs.map +1 -1
- package/dist/configure/services/workflow/job.d.mts +3 -3
- package/dist/configure/services/workflow/wait-point.d.mts +3 -3
- package/dist/job-CtU73PGa.mjs.map +1 -1
- package/dist/{runtime-CEFC05qX.mjs → runtime-B8O6JFS2.mjs} +674 -129
- package/dist/runtime-B8O6JFS2.mjs.map +1 -0
- package/docs/services/tailordb-migration.md +2 -0
- package/package.json +1 -1
- package/dist/application-BhRnH42h.mjs +0 -3
- package/dist/application-Dxhdq_nu.mjs.map +0 -1
- package/dist/runtime-CEFC05qX.mjs.map +0 -1
|
@@ -17,6 +17,12 @@ interface TypeSettingsPatch {
|
|
|
17
17
|
indexes?: Record<string, SnapshotIndexConfig>;
|
|
18
18
|
files?: Record<string, string>;
|
|
19
19
|
}
|
|
20
|
+
/** Type-level settings and metadata state used by current diffs. */
|
|
21
|
+
interface SnapshotTypeSettingsState {
|
|
22
|
+
description?: string;
|
|
23
|
+
pluralForm: string;
|
|
24
|
+
settings?: TailorDBSnapshotType["settings"];
|
|
25
|
+
}
|
|
20
26
|
/**
|
|
21
27
|
* Permission state carried by `permission_modified` changes.
|
|
22
28
|
*/
|
|
@@ -44,6 +50,12 @@ interface TypeModifiedChange extends DiffChangeBase {
|
|
|
44
50
|
before?: TypeSettingsPatch;
|
|
45
51
|
after?: TypeSettingsPatch;
|
|
46
52
|
}
|
|
53
|
+
/** Type-level settings or metadata changed. */
|
|
54
|
+
interface TypeSettingsModifiedChange extends DiffChangeBase {
|
|
55
|
+
kind: "type_settings_modified";
|
|
56
|
+
before: SnapshotTypeSettingsState;
|
|
57
|
+
after: SnapshotTypeSettingsState;
|
|
58
|
+
}
|
|
47
59
|
/** A field was added to a type. */
|
|
48
60
|
interface FieldAddedChange extends DiffChangeBase {
|
|
49
61
|
kind: "field_added";
|
|
@@ -141,7 +153,7 @@ interface PermissionModifiedChange extends DiffChangeBase {
|
|
|
141
153
|
* Single change in migration diff, discriminated by `kind` so that
|
|
142
154
|
* `before`/`after` are typed per change kind.
|
|
143
155
|
*/
|
|
144
|
-
type DiffChange = TypeAddedChange | TypeRemovedChange | TypeModifiedChange | FieldAddedChange | FieldRemovedChange | FieldModifiedChange | IndexAddedChange | IndexRemovedChange | IndexModifiedChange | FileAddedChange | FileRemovedChange | FileModifiedChange | RelationshipAddedChange | RelationshipRemovedChange | RelationshipModifiedChange | PermissionModifiedChange;
|
|
156
|
+
type DiffChange = TypeAddedChange | TypeRemovedChange | TypeModifiedChange | TypeSettingsModifiedChange | FieldAddedChange | FieldRemovedChange | FieldModifiedChange | IndexAddedChange | IndexRemovedChange | IndexModifiedChange | FileAddedChange | FileRemovedChange | FileModifiedChange | RelationshipAddedChange | RelationshipRemovedChange | RelationshipModifiedChange | PermissionModifiedChange;
|
|
145
157
|
/**
|
|
146
158
|
* Migration diff - changes between two schema versions
|
|
147
159
|
* Stored as XXXX/diff.json (e.g., 0001/diff.json)
|
|
@@ -208,4 +220,4 @@ declare function formatMigrationDiff(diff: MigrationDiff): string;
|
|
|
208
220
|
*/
|
|
209
221
|
declare function formatDiffSummary(diff: MigrationDiff): string;
|
|
210
222
|
//#endregion
|
|
211
|
-
export { BreakingChangeInfo, DiffChange, FieldAddedChange, FieldModifiedChange, FieldRemovedChange, FileAddedChange, FileModifiedChange, FileRemovedChange, IndexAddedChange, IndexModifiedChange, IndexRemovedChange, MigrationDiff, PermissionModifiedChange, RelationshipAddedChange, RelationshipModifiedChange, RelationshipRemovedChange, SnapshotPermissionState, TypeAddedChange, TypeModifiedChange, TypeRemovedChange, TypeSettingsPatch, WarningChangeInfo, formatDiffSummary, formatMigrationDiff, hasChanges };
|
|
223
|
+
export { BreakingChangeInfo, DiffChange, FieldAddedChange, FieldModifiedChange, FieldRemovedChange, FileAddedChange, FileModifiedChange, FileRemovedChange, IndexAddedChange, IndexModifiedChange, IndexRemovedChange, MigrationDiff, PermissionModifiedChange, RelationshipAddedChange, RelationshipModifiedChange, RelationshipRemovedChange, SnapshotPermissionState, SnapshotTypeSettingsState, TypeAddedChange, TypeModifiedChange, TypeRemovedChange, TypeSettingsModifiedChange, TypeSettingsPatch, WarningChangeInfo, formatDiffSummary, formatMigrationDiff, hasChanges };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { C as CustomDomainStatus, R as FunctionExecution_Type, mt as AuthInvokerSchema, xt as PATScope } from "../service_pb-CIrhGwHk.mjs";
|
|
3
3
|
import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
|
|
4
4
|
import { n as logger, r as styles } from "../logger-BEiZZ3qT.mjs";
|
|
5
|
-
import { $t as generateAllTypeManifestsFromSnapshot, A as listCommand$12, An as apiCommand, Bn as paginationArgs, C as listCommand$13, Cn as getNamespacesWithMigrations, Dn as PluginManager, Dt as listCommand$6, E as waitCommand, En as sdkNameLabelKey, F as generateCommand$1, Fn as configArg, G as removeCommand$1, Gt as deploy, H as extractOwnedNamespaces, Hn as workspaceArgs, Ht as formatKeyValueTable, I as generateMigrationScript, In as confirmationArgs, It as getCommand$6, K as updateCommand$3, Kt as executeScript, L as writeDbTypesFile, Ln as deploymentArgs, Mn as assertWritable, N as truncateCommand, Nn as defineAppCommand, O as resumeCommand, On as generateUserTypes, Pn as commonArgs, Pt as startCommand, Q as getCommand$5, Qt as compareSnapshotWithRemote, R as getConfiguredEditorCommand, Rn as isVerbose, Rt as executionsCommand, Sn as hasChanges, T as healthCommand, Tn as resourceTrn, Tt as triggerCommand, U as logBetaWarning, Ut as getCommand$1, V as showCommand, Vn as toPageDirection, Vt as functionExecutionStatusToString, X as listCommand$11, Xt as handleOptionalToRequiredError, Y as treeCommand, Yt as MIGRATION_LABEL_KEY, Zt as parseMigrationLabelNumber, _n as reconstructSnapshotFromMigrations, b as createCommand$4, c as listCommand$14, ct as createCommand$3, en as protoGqlPermission, et as updateCommand$2, f as restoreCommand, fn as getMigrationFilePath, ft as getCommand$3, g as getCommand$7, gn as loadDiff, gt as listCommand$8, hn as isValidMigrationNumber, ht as tokenCommand, i as updateCommand$4, it as getCommand$4, jt as jobsCommand, kn as prompt, ln as createSnapshotFromLocalTypes, m as listCommand$15, nt as listCommand$10, o as removeCommand, on as assertValidMigrationFiles, ot as deleteCommand$3, pn as getMigrationFiles, r as queryCommand, rn as INITIAL_SCHEMA_NUMBER, sn as compareLocalTypesWithSnapshot, t as isNativeTypeScriptRuntime, u as inviteCommand, un as getLatestMigrationNumber, ut as listCommand$9, v as deleteCommand$4, vn as formatMigrationNumber, vt as generate, wn as ensureConfigId, wt as webhookCommand, xn as formatMigrationDiff, xt as getCommand$2, yn as parseMigrationNumberArg, yt as listCommand$7, z as openInConfiguredEditor, zn as pagedLogArgs } from "../runtime-
|
|
6
|
-
import { $ as initOperatorClient, A as loadAccessToken, B as saveUserTokens, C as hashContent$1, D as fetchLatestToken, E as deleteUserTokens, F as loadStoredUserTokens, H as closeConnectionPool, I as loadWorkspaceId, J as fetchUserInfo, K as fetchPaged, L as platformConfigFromProfile, M as loadConsoleBaseUrl, N as loadMachineUserName, O as hasAnyUserTokenEntry, Q as initOAuth2Client, R as readPlatformConfig, S as getDistDir, T as loadConfig, U as defaultPlatformBaseUrl, V as writePlatformConfig, W as fetchAll, _ as createLogLevelTreeshakeOptions, a as WorkflowJobSchema, c as INVOKER_EXPR, et as isDefaultPlatform, g as composeFunctionTreeshakeOptions, h as platformBundleDefinePlugin, i as resolveInlineSourcemap, k as hasUserTokenEntry, o as ResolverSchema, q as fetchPlatformMachineUserToken, t as defineApplication, v as resolveBundleLogLevel, z as resolveUserTokenKey } from "../application-
|
|
5
|
+
import { $t as generateAllTypeManifestsFromSnapshot, A as listCommand$12, An as apiCommand, Bn as paginationArgs, C as listCommand$13, Cn as getNamespacesWithMigrations, Dn as PluginManager, Dt as listCommand$6, E as waitCommand, En as sdkNameLabelKey, F as generateCommand$1, Fn as configArg, G as removeCommand$1, Gt as deploy, H as extractOwnedNamespaces, Hn as workspaceArgs, Ht as formatKeyValueTable, I as generateMigrationScript, In as confirmationArgs, It as getCommand$6, K as updateCommand$3, Kt as executeScript, L as writeDbTypesFile, Ln as deploymentArgs, Mn as assertWritable, N as truncateCommand, Nn as defineAppCommand, O as resumeCommand, On as generateUserTypes, Pn as commonArgs, Pt as startCommand, Q as getCommand$5, Qt as compareSnapshotWithRemote, R as getConfiguredEditorCommand, Rn as isVerbose, Rt as executionsCommand, Sn as hasChanges, T as healthCommand, Tn as resourceTrn, Tt as triggerCommand, U as logBetaWarning, Ut as getCommand$1, V as showCommand, Vn as toPageDirection, Vt as functionExecutionStatusToString, X as listCommand$11, Xt as handleOptionalToRequiredError, Y as treeCommand, Yt as MIGRATION_LABEL_KEY, Zt as parseMigrationLabelNumber, _n as reconstructSnapshotFromMigrations, b as createCommand$4, c as listCommand$14, ct as createCommand$3, en as protoGqlPermission, et as updateCommand$2, f as restoreCommand, fn as getMigrationFilePath, ft as getCommand$3, g as getCommand$7, gn as loadDiff, gt as listCommand$8, hn as isValidMigrationNumber, ht as tokenCommand, i as updateCommand$4, it as getCommand$4, jt as jobsCommand, kn as prompt, ln as createSnapshotFromLocalTypes, m as listCommand$15, nt as listCommand$10, o as removeCommand, on as assertValidMigrationFiles, ot as deleteCommand$3, pn as getMigrationFiles, r as queryCommand, rn as INITIAL_SCHEMA_NUMBER, sn as compareLocalTypesWithSnapshot, t as isNativeTypeScriptRuntime, u as inviteCommand, un as getLatestMigrationNumber, ut as listCommand$9, v as deleteCommand$4, vn as formatMigrationNumber, vt as generate, wn as ensureConfigId, wt as webhookCommand, xn as formatMigrationDiff, xt as getCommand$2, yn as parseMigrationNumberArg, yt as listCommand$7, z as openInConfiguredEditor, zn as pagedLogArgs } from "../runtime-B8O6JFS2.mjs";
|
|
6
|
+
import { $ as initOperatorClient, A as loadAccessToken, B as saveUserTokens, C as hashContent$1, D as fetchLatestToken, E as deleteUserTokens, F as loadStoredUserTokens, H as closeConnectionPool, I as loadWorkspaceId, J as fetchUserInfo, K as fetchPaged, L as platformConfigFromProfile, M as loadConsoleBaseUrl, N as loadMachineUserName, O as hasAnyUserTokenEntry, Q as initOAuth2Client, R as readPlatformConfig, S as getDistDir, T as loadConfig, U as defaultPlatformBaseUrl, V as writePlatformConfig, W as fetchAll, _ as createLogLevelTreeshakeOptions, a as WorkflowJobSchema, c as INVOKER_EXPR, et as isDefaultPlatform, g as composeFunctionTreeshakeOptions, h as platformBundleDefinePlugin, i as resolveInlineSourcemap, k as hasUserTokenEntry, o as ResolverSchema, q as fetchPlatformMachineUserToken, t as defineApplication, v as resolveBundleLogLevel, z as resolveUserTokenKey } from "../application-Bb9NNp5m.mjs";
|
|
7
7
|
import { n as ExecutorSchema } from "../service-DiEtAsvc.mjs";
|
|
8
8
|
import { t as multiline } from "../multiline-sfHpTZZK.mjs";
|
|
9
9
|
import { r as isPluginGeneratedType } from "../seed-DoMTMLcm.mjs";
|
|
@@ -3967,9 +3967,9 @@ function resolveSkillsSource(source) {
|
|
|
3967
3967
|
* Build CLI arguments for `skills add` with the fixed tailor-sdk skill target.
|
|
3968
3968
|
* `--copy` is included so the installed skill survives `pnpm install` wiping `node_modules`.
|
|
3969
3969
|
* @param options - Options controlling the generated `skills add` arguments
|
|
3970
|
-
* @param options.source
|
|
3971
|
-
* @param options.agent
|
|
3972
|
-
* @param options.yes
|
|
3970
|
+
* @param options.source - Skill source package or path passed to `skills add`
|
|
3971
|
+
* @param options.agent - Target agent name passed through with `--agent`
|
|
3972
|
+
* @param options.yes - Whether to add `--yes` for non-interactive installation
|
|
3973
3973
|
* @returns CLI arguments for `npx skills add`
|
|
3974
3974
|
*/
|
|
3975
3975
|
function buildSkillsAddArgs(options) {
|
|
@@ -5986,7 +5986,7 @@ async function fetchRemoteTypes(client, workspaceId, namespace) {
|
|
|
5986
5986
|
async function assertMigrationsReproduceLocalTypes(loaded, target) {
|
|
5987
5987
|
const { config, plugins } = loaded;
|
|
5988
5988
|
const pluginManager = plugins.length > 0 ? new PluginManager(plugins) : void 0;
|
|
5989
|
-
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-
|
|
5989
|
+
const { defineApplication, generatePluginFilesIfNeeded } = await import("../application-BXdCl6bp.mjs");
|
|
5990
5990
|
const application = defineApplication({
|
|
5991
5991
|
config,
|
|
5992
5992
|
pluginManager
|