@tailor-platform/sdk 1.85.4 → 1.85.5
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 +6 -0
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/lib.mjs +1 -1
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/{register-typescript-runtime-CkZYnoz3.mjs → register-typescript-runtime-BRXZCBjd.mjs} +20 -9
- package/dist/register-typescript-runtime-BRXZCBjd.mjs.map +1 -0
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/package.json +1 -1
- package/dist/register-typescript-runtime-CkZYnoz3.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @tailor-platform/sdk
|
|
2
2
|
|
|
3
|
+
## 1.85.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2796](https://github.com/tailor-platform/sdk/pull/2796) [`ddb5b92`](https://github.com/tailor-platform/sdk/commit/ddb5b92ad13fd5eba404420659cfdf9383aea3b0) Thanks [@toiroakr](https://github.com/toiroakr)! - `tailor-sdk deploy` keeps restoring a missing IdP client secret vault with the client's secret after an SDK upgrade, once the platform stops returning secrets when listing clients.
|
|
8
|
+
|
|
3
9
|
## 1.85.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cli/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { r as parseInputFields } from "../schema-CYrle8JZ.mjs";
|
|
|
3
3
|
import { At as PATScope, Ct as AuthInvokerSchema, E as CustomDomainStatus, W as FunctionExecution_Type } from "../workspace_resource_pb-6X2GIZDj.mjs";
|
|
4
4
|
import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
|
|
5
5
|
import { n as logger, r as styles } from "../logger-CXQq9YIp.mjs";
|
|
6
|
-
import { $n as saveUserTokens, $t as checkMigrationDiffs, An as formatMigrationDiff, At as startCommand, Bn as loadConfig, Bt as deployFromCLI, Ct as listCommand$7, Dn as formatMigrationNumber, Dt as jobsCommand, E as listCommand$13, En as reconstructSnapshotFromMigrations, F as openInConfiguredEditor, Fn as PluginManager, G as treeCommand, Gn as loadAccessToken, Gt as formatKeyValueTable, H as updateCommand$3, Hn as fetchLatestToken, In as generateUserTypes, J as getCommand$5, Jn as loadStoredUserTokens, Jt as executeScript, K as listCommand$12, Kn as loadConsoleBaseUrl, Kt as workspaceNameSchema, L as showCommand, Ln as prompt, Lt as getCommand$1, M as generateMigrationScript, Mn as getNamespacesWithMigrations, Mt as getCommand$6, N as writeDbTypesFile, Nn as resourceTrn, On as parseMigrationNumberArg, P as getConfiguredEditorCommand, Pn as sdkNameLabelKey, Pt as executionsCommand, Q as listCommand$11, Qn as resolveUserTokenKey, R as extractOwnedNamespaces, Rn as apiCall, S as waitCommand, Sn as getMigrationFiles, Tn as loadDiff, Un as hasAnyUserTokenEntry, Ut as createCommand$4, V as removeCommand$1, Vn as deleteUserTokens, Vt as listCommand$16, Wn as hasUserTokenEntry, X as updateCommand$2, Xn as platformConfigFromProfile, Xt as functionExecutionStatusToString, Yn as loadWorkspaceId, Zn as readPlatformConfig, Zt as joinFunctionLogMessages, _n as createSnapshotFromLocalTypes, _t as getCommand$2, an as parseMigrationLabelNumber, ar as deploymentArgs, bt as webhookCommand, c as listCommand$15, cn as protoGqlPermission, cr as pagedLogArgs, ct as getCommand$3, dn as INITIAL_SCHEMA_NUMBER, dr as toPageDirection, dt as tokenCommand, en as logRemoteDriftGuidance, er as writePlatformConfig, et as getCommand$4, f as restoreCommand, fr as workspaceArgs, ft as listCommand$9, g as deleteCommand$5, hn as compareLocalTypesWithSnapshot, ht as listCommand$8, i as updateCommand$4, in as handleOptionalToRequiredError, ir as confirmationArgs, it as createCommand$3, j as generateCommand$1, jn as hasChanges, k as truncateCommand, kn as formatDiffSummary, lr as paginationArgs, m as getCommand$7, mn as assertValidMigrationFiles, mt as generate, nn as verifyRemoteSchema, nr as commonArgs, nt as deleteCommand$4, o as removeCommand, on as compareSnapshotWithRemote, or as isVerbose, ot as listCommand$10, qn as loadMachineUserName, qt as ensureConfigId, r as queryCommand, rn as MIGRATION_LABEL_KEY, rr as configArg, sn as generateAllTypeManifestsFromSnapshot, sr as multiConfigArg, t as registerTypeScriptRuntime, tn as toTailorDBDeployInput, tr as defineAppCommand, u as inviteCommand, ur as resolveMachineUserInputSource, vn as formatSchemaDrifts, w as resumeCommand, wn as isValidMigrationNumber, x as healthCommand, xn as getMigrationFilePath, xt as triggerCommand, y as listCommand$14, yn as getLatestMigrationNumber, z as logBetaWarning, zn as assertWritable } from "../register-typescript-runtime-
|
|
6
|
+
import { $n as saveUserTokens, $t as checkMigrationDiffs, An as formatMigrationDiff, At as startCommand, Bn as loadConfig, Bt as deployFromCLI, Ct as listCommand$7, Dn as formatMigrationNumber, Dt as jobsCommand, E as listCommand$13, En as reconstructSnapshotFromMigrations, F as openInConfiguredEditor, Fn as PluginManager, G as treeCommand, Gn as loadAccessToken, Gt as formatKeyValueTable, H as updateCommand$3, Hn as fetchLatestToken, In as generateUserTypes, J as getCommand$5, Jn as loadStoredUserTokens, Jt as executeScript, K as listCommand$12, Kn as loadConsoleBaseUrl, Kt as workspaceNameSchema, L as showCommand, Ln as prompt, Lt as getCommand$1, M as generateMigrationScript, Mn as getNamespacesWithMigrations, Mt as getCommand$6, N as writeDbTypesFile, Nn as resourceTrn, On as parseMigrationNumberArg, P as getConfiguredEditorCommand, Pn as sdkNameLabelKey, Pt as executionsCommand, Q as listCommand$11, Qn as resolveUserTokenKey, R as extractOwnedNamespaces, Rn as apiCall, S as waitCommand, Sn as getMigrationFiles, Tn as loadDiff, Un as hasAnyUserTokenEntry, Ut as createCommand$4, V as removeCommand$1, Vn as deleteUserTokens, Vt as listCommand$16, Wn as hasUserTokenEntry, X as updateCommand$2, Xn as platformConfigFromProfile, Xt as functionExecutionStatusToString, Yn as loadWorkspaceId, Zn as readPlatformConfig, Zt as joinFunctionLogMessages, _n as createSnapshotFromLocalTypes, _t as getCommand$2, an as parseMigrationLabelNumber, ar as deploymentArgs, bt as webhookCommand, c as listCommand$15, cn as protoGqlPermission, cr as pagedLogArgs, ct as getCommand$3, dn as INITIAL_SCHEMA_NUMBER, dr as toPageDirection, dt as tokenCommand, en as logRemoteDriftGuidance, er as writePlatformConfig, et as getCommand$4, f as restoreCommand, fr as workspaceArgs, ft as listCommand$9, g as deleteCommand$5, hn as compareLocalTypesWithSnapshot, ht as listCommand$8, i as updateCommand$4, in as handleOptionalToRequiredError, ir as confirmationArgs, it as createCommand$3, j as generateCommand$1, jn as hasChanges, k as truncateCommand, kn as formatDiffSummary, lr as paginationArgs, m as getCommand$7, mn as assertValidMigrationFiles, mt as generate, nn as verifyRemoteSchema, nr as commonArgs, nt as deleteCommand$4, o as removeCommand, on as compareSnapshotWithRemote, or as isVerbose, ot as listCommand$10, qn as loadMachineUserName, qt as ensureConfigId, r as queryCommand, rn as MIGRATION_LABEL_KEY, rr as configArg, sn as generateAllTypeManifestsFromSnapshot, sr as multiConfigArg, t as registerTypeScriptRuntime, tn as toTailorDBDeployInput, tr as defineAppCommand, u as inviteCommand, ur as resolveMachineUserInputSource, vn as formatSchemaDrifts, w as resumeCommand, wn as isValidMigrationNumber, x as healthCommand, xn as getMigrationFilePath, xt as triggerCommand, y as listCommand$14, yn as getLatestMigrationNumber, z as logBetaWarning, zn as assertWritable } from "../register-typescript-runtime-BRXZCBjd.mjs";
|
|
7
7
|
import { A as getDistDir, B as fetchPlatformMachineUserToken, C as composeFunctionTreeshakeOptions, E as createBundleLog, F as defaultPlatformBaseUrl, I as fetchAll, J as isDefaultPlatform, K as initOAuth2Client, L as fetchAllTolerant, P as closeConnectionPool, S as platformBundleDefinePlugin, T as resolveBundleLogLevel, V as fetchUserInfo, W as getOrNull, b as createTsconfigPathsPlugin, c as WorkflowJobSchema, d as INVOKER_EXPR, h as assertUniqueLocalTailorDBTypeNames, j as hashContent$1, l as ResolverSchema, m as buildResolverPermissionAndInputCheckExpr, o as resolveInlineSourcemap, q as initOperatorClient, t as defineApplication, w as createLogLevelTreeshakeOptions, x as resolveTSConfigWithFallback, y as createGeneratedEntryResolverPlugin, z as fetchPaged } from "../application-D9j1a2Xc.mjs";
|
|
8
8
|
import { n as ExecutorSchema } from "../service-CPJWhTLn.mjs";
|
|
9
9
|
import { t as multiline } from "../multiline-sfHpTZZK.mjs";
|
package/dist/cli/lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as assertDefined } from "../assert-DBxo8jPo.mjs";
|
|
2
|
-
import { $ as listFolders, A as generate$1, An as formatMigrationDiff, B as remove, Bn as loadConfig, C as waitWorkflowExecution, Cn as getNextMigrationNumber, D as listWorkflows, En as reconstructSnapshotFromMigrations, Et as getExecutorWaitFailureMessage, Ft as getWorkflowExecution, Gn as loadAccessToken, Ht as listWorkspaces, I as show, In as generateUserTypes, It as listWorkflowExecutions, Jt as executeScript, Mn as getNamespacesWithMigrations, Nt as getWorkflow, O as truncate, Ot as listExecutorJobs, Qt as bundleMigrationScript, Rn as apiCall, Rt as getExecutor, Sn as getMigrationFiles, St as triggerExecutor, T as resumeWorkflow, Tt as getExecutorJob, U as updateOrganization, W as organizationTree, Wt as createWorkspace, Y as getOrganization, Yn as loadWorkspaceId, Yt as waitForExecution, Z as updateFolder, _ as deleteWorkspace, _n as createSnapshotFromLocalTypes, a as updateUser, at as createFolder, b as getAppHealth, bn as getMigrationDirPath, d as inviteUser, dn as INITIAL_SCHEMA_NUMBER, fn as MIGRATE_FILE_NAME, gn as compareSnapshots, gt as listFunctionRegistries, h as getWorkspace, hn as compareLocalTypesWithSnapshot, jn as hasChanges, jt as startWorkflow, kn as formatDiffSummary, kt as watchExecutorJob, l as listUsers, ln as DB_TYPES_FILE_NAME, lt as getOAuth2Client, mt as generate, n as query, p as restoreWorkspace, pn as SCHEMA_FILE_NAME, pt as listMachineUsers, q as listOrganizations, rn as MIGRATION_LABEL_KEY, rt as deleteFolder, s as removeUser, st as listOAuth2Clients, t as registerTypeScriptRuntime, tt as getFolder, un as DIFF_FILE_NAME, ut as getMachineUserToken, v as listApps, vt as getFunctionRegistry, wt as listExecutors, xn as getMigrationFilePath, yn as getLatestMigrationNumber, yt as listWebhookExecutors, zt as deploy } from "../register-typescript-runtime-
|
|
2
|
+
import { $ as listFolders, A as generate$1, An as formatMigrationDiff, B as remove, Bn as loadConfig, C as waitWorkflowExecution, Cn as getNextMigrationNumber, D as listWorkflows, En as reconstructSnapshotFromMigrations, Et as getExecutorWaitFailureMessage, Ft as getWorkflowExecution, Gn as loadAccessToken, Ht as listWorkspaces, I as show, In as generateUserTypes, It as listWorkflowExecutions, Jt as executeScript, Mn as getNamespacesWithMigrations, Nt as getWorkflow, O as truncate, Ot as listExecutorJobs, Qt as bundleMigrationScript, Rn as apiCall, Rt as getExecutor, Sn as getMigrationFiles, St as triggerExecutor, T as resumeWorkflow, Tt as getExecutorJob, U as updateOrganization, W as organizationTree, Wt as createWorkspace, Y as getOrganization, Yn as loadWorkspaceId, Yt as waitForExecution, Z as updateFolder, _ as deleteWorkspace, _n as createSnapshotFromLocalTypes, a as updateUser, at as createFolder, b as getAppHealth, bn as getMigrationDirPath, d as inviteUser, dn as INITIAL_SCHEMA_NUMBER, fn as MIGRATE_FILE_NAME, gn as compareSnapshots, gt as listFunctionRegistries, h as getWorkspace, hn as compareLocalTypesWithSnapshot, jn as hasChanges, jt as startWorkflow, kn as formatDiffSummary, kt as watchExecutorJob, l as listUsers, ln as DB_TYPES_FILE_NAME, lt as getOAuth2Client, mt as generate, n as query, p as restoreWorkspace, pn as SCHEMA_FILE_NAME, pt as listMachineUsers, q as listOrganizations, rn as MIGRATION_LABEL_KEY, rt as deleteFolder, s as removeUser, st as listOAuth2Clients, t as registerTypeScriptRuntime, tt as getFolder, un as DIFF_FILE_NAME, ut as getMachineUserToken, v as listApps, vt as getFunctionRegistry, wt as listExecutors, xn as getMigrationFilePath, yn as getLatestMigrationNumber, yt as listWebhookExecutors, zt as deploy } from "../register-typescript-runtime-BRXZCBjd.mjs";
|
|
3
3
|
import { A as getDistDir, E as createBundleLog, S as platformBundleDefinePlugin, b as createTsconfigPathsPlugin, q as initOperatorClient, y as createGeneratedEntryResolverPlugin } from "../application-D9j1a2Xc.mjs";
|
|
4
4
|
import { n as enumConstantsPlugin } from "../enum-constants-j9QBF0cB.mjs";
|
|
5
5
|
import { t as multiline } from "../multiline-sfHpTZZK.mjs";
|
package/dist/{register-typescript-runtime-CkZYnoz3.mjs → register-typescript-runtime-BRXZCBjd.mjs}
RENAMED
|
@@ -4043,6 +4043,18 @@ async function applyIdP(client, result, phase = "create-update") {
|
|
|
4043
4043
|
secretmanagerVaultName: vaultName
|
|
4044
4044
|
});
|
|
4045
4045
|
})) return;
|
|
4046
|
+
const idpClient = await client.getIdPClient({
|
|
4047
|
+
workspaceId: update.workspaceId,
|
|
4048
|
+
namespaceName: update.namespaceName,
|
|
4049
|
+
name: update.name
|
|
4050
|
+
}).then((res) => res.client).catch((error) => {
|
|
4051
|
+
if (error instanceof ConnectError && error.code === Code.InvalidArgument) return null;
|
|
4052
|
+
throw error;
|
|
4053
|
+
});
|
|
4054
|
+
if (idpClient === null) {
|
|
4055
|
+
logger.warn(`IdP client "${update.name}" in "${update.namespaceName}" has no secret vault, and the platform rejects its name when reading the client, so the vault was not restored.`);
|
|
4056
|
+
return;
|
|
4057
|
+
}
|
|
4046
4058
|
await client.createSecretManagerVault({
|
|
4047
4059
|
workspaceId: update.workspaceId,
|
|
4048
4060
|
secretmanagerVaultName: vaultName
|
|
@@ -4051,7 +4063,7 @@ async function applyIdP(client, result, phase = "create-update") {
|
|
|
4051
4063
|
workspaceId: update.workspaceId,
|
|
4052
4064
|
secretmanagerVaultName: vaultName,
|
|
4053
4065
|
secretmanagerSecretName: secretName,
|
|
4054
|
-
secretmanagerSecretValue:
|
|
4066
|
+
secretmanagerSecretValue: idpClient?.clientSecret
|
|
4055
4067
|
});
|
|
4056
4068
|
})]);
|
|
4057
4069
|
} else if (phase === "delete-resources") await Promise.all(changeSet.client.deletes.map(async (del) => {
|
|
@@ -4305,19 +4317,18 @@ async function planClients(client, workspaceId, idps, deletedServices, forceAppl
|
|
|
4305
4317
|
for (const [i, idp] of idps.entries()) {
|
|
4306
4318
|
const namespaceName = idp.name;
|
|
4307
4319
|
const existingClients = assertDefined(clientsByIdp[i], "clientsByIdp missing entry for idp index");
|
|
4308
|
-
const
|
|
4320
|
+
const existingNames = /* @__PURE__ */ new Set();
|
|
4309
4321
|
existingClients.forEach((client) => {
|
|
4310
|
-
|
|
4322
|
+
existingNames.add(client.name);
|
|
4311
4323
|
});
|
|
4312
|
-
for (const name of idp.clients) if (
|
|
4324
|
+
for (const name of idp.clients) if (existingNames.has(name)) {
|
|
4313
4325
|
if (forceApplyAll) changeSet.updates.push({
|
|
4314
4326
|
name,
|
|
4315
4327
|
workspaceId,
|
|
4316
|
-
namespaceName
|
|
4317
|
-
clientSecret: existingNameMap.get(name) ?? ""
|
|
4328
|
+
namespaceName
|
|
4318
4329
|
});
|
|
4319
4330
|
else changeSet.unchanged.push({ name });
|
|
4320
|
-
|
|
4331
|
+
existingNames.delete(name);
|
|
4321
4332
|
} else changeSet.creates.push({
|
|
4322
4333
|
name,
|
|
4323
4334
|
request: {
|
|
@@ -4326,7 +4337,7 @@ async function planClients(client, workspaceId, idps, deletedServices, forceAppl
|
|
|
4326
4337
|
client: { name }
|
|
4327
4338
|
}
|
|
4328
4339
|
});
|
|
4329
|
-
|
|
4340
|
+
existingNames.forEach((name) => {
|
|
4330
4341
|
changeSet.deletes.push({
|
|
4331
4342
|
name,
|
|
4332
4343
|
request: {
|
|
@@ -21543,4 +21554,4 @@ async function registerTypeScriptRuntime(hookUrl) {
|
|
|
21543
21554
|
|
|
21544
21555
|
//#endregion
|
|
21545
21556
|
export { listFolders as $, saveUserTokens as $n, checkMigrationDiffs as $t, generate as A, formatMigrationDiff as An, startCommand as At, remove as B, loadConfig as Bn, deployFromCLI as Bt, waitWorkflowExecution as C, getNextMigrationNumber as Cn, listCommand$8 as Ct, listWorkflows as D, formatMigrationNumber as Dn, jobsCommand as Dt, listCommand$2 as E, reconstructSnapshotFromMigrations as En, getExecutorWaitFailureMessage as Et, openInConfiguredEditor as F, PluginManager as Fn, getWorkflowExecution as Ft, treeCommand as G, loadAccessToken as Gn, formatKeyValueTable as Gt, updateCommand$1 as H, fetchLatestToken as Hn, listWorkspaces as Ht, show as I, generateUserTypes as In, listWorkflowExecutions as It, getCommand$1 as J, loadStoredUserTokens as Jn, executeScript as Jt, listCommand$3 as K, loadConsoleBaseUrl as Kn, workspaceNameSchema as Kt, showCommand as L, prompt as Ln, getCommand$6 as Lt, generateMigrationScript as M, getNamespacesWithMigrations as Mn, getCommand$5 as Mt, writeDbTypesFile as N, resourceTrn as Nn, getWorkflow as Nt, truncate as O, parseMigrationNumberArg as On, listExecutorJobs as Ot, getConfiguredEditorCommand as P, sdkNameLabelKey as Pn, executionsCommand as Pt, listCommand$4 as Q, resolveUserTokenKey as Qn, bundleMigrationScript as Qt, extractOwnedNamespaces as R, apiCall as Rn, getExecutor as Rt, waitCommand as S, getMigrationFiles as Sn, triggerExecutor as St, resumeWorkflow as T, loadDiff as Tn, getExecutorJob as Tt, updateOrganization as U, hasAnyUserTokenEntry as Un, createCommand$1 as Ut, removeCommand$1 as V, deleteUserTokens as Vn, listCommand$9 as Vt, organizationTree as W, hasUserTokenEntry as Wn, createWorkspace$1 as Wt, updateCommand$2 as X, platformConfigFromProfile as Xn, functionExecutionStatusToString as Xt, getOrganization as Y, loadWorkspaceId as Yn, waitForExecution as Yt, updateFolder as Z, readPlatformConfig as Zn, joinFunctionLogMessages as Zt, deleteWorkspace as _, createSnapshotFromLocalTypes as _n, getCommand$4 as _t, updateUser as a, parseMigrationLabelNumber as an, deploymentArgs as ar, createFolder as at, getAppHealth as b, getMigrationDirPath as bn, webhookCommand as bt, listCommand as c, protoGqlPermission as cn, pagedLogArgs as cr, getCommand$3 as ct, inviteUser as d, INITIAL_SCHEMA_NUMBER as dn, toPageDirection as dr, tokenCommand as dt, logRemoteDriftGuidance as en, writePlatformConfig as er, getCommand$2 as et, restoreCommand as f, MIGRATE_FILE_NAME as fn, workspaceArgs as fr, listCommand$6 as ft, deleteCommand as g, compareSnapshots as gn, listFunctionRegistries as gt, getWorkspace as h, compareLocalTypesWithSnapshot as hn, listCommand$7 as ht, updateCommand as i, handleOptionalToRequiredError as in, confirmationArgs as ir, createCommand as it, generateCommand as j, hasChanges as jn, startWorkflow as jt, truncateCommand as k, formatDiffSummary as kn, watchExecutorJob as kt, listUsers as l, DB_TYPES_FILE_NAME as ln, paginationArgs as lr, getOAuth2Client as lt, getCommand as m, assertValidMigrationFiles as mn, generate$1 as mt, query as n, verifyRemoteSchema as nn, commonArgs as nr, deleteCommand$1 as nt, removeCommand as o, compareSnapshotWithRemote as on, isVerbose as or, listCommand$5 as ot, restoreWorkspace as p, SCHEMA_FILE_NAME as pn, listMachineUsers as pt, listOrganizations as q, loadMachineUserName as qn, ensureConfigId as qt, queryCommand as r, MIGRATION_LABEL_KEY as rn, configArg as rr, deleteFolder as rt, removeUser as s, generateAllTypeManifestsFromSnapshot as sn, multiConfigArg as sr, listOAuth2Clients as st, registerTypeScriptRuntime as t, toTailorDBDeployInput as tn, defineAppCommand as tr, getFolder as tt, inviteCommand as u, DIFF_FILE_NAME as un, resolveMachineUserInputSource as ur, getMachineUserToken as ut, listApps as v, formatSchemaDrifts as vn, getFunctionRegistry as vt, resumeCommand as w, isValidMigrationNumber as wn, listExecutors as wt, healthCommand as x, getMigrationFilePath as xn, triggerCommand as xt, listCommand$1 as y, getLatestMigrationNumber as yn, listWebhookExecutors as yt, logBetaWarning as z, assertWritable as zn, deploy as zt };
|
|
21546
|
-
//# sourceMappingURL=register-typescript-runtime-
|
|
21557
|
+
//# sourceMappingURL=register-typescript-runtime-BRXZCBjd.mjs.map
|