@tailor-platform/sdk 1.68.0 → 1.69.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 +75 -0
- package/dist/application-Br48NXBD.mjs +4 -0
- package/dist/application-Cr-limKC.mjs +6192 -0
- package/dist/application-Cr-limKC.mjs.map +1 -0
- package/dist/cli/index.mjs +13 -12
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +234 -153
- package/dist/cli/lib.mjs +3 -3
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/skills.mjs +1 -1
- package/dist/completion/zsh-worker.zsh +23 -23
- package/dist/configure/index.d.mts +2 -2
- package/dist/configure/index.mjs +4 -0
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{crashreport-u9y2npiy.mjs → crashreport-BqyvFk-_.mjs} +2 -2
- package/dist/{crashreport-u9y2npiy.mjs.map → crashreport-BqyvFk-_.mjs.map} +1 -1
- package/dist/{crashreport-6jpCceOF.mjs → crashreport-BwF8cHF0.mjs} +1 -1
- package/dist/enum-constants-C7DaWeQo.mjs.map +1 -1
- package/dist/field-C4zdJLW5.mjs.map +1 -1
- package/dist/file-utils-BHPxPXmn.mjs.map +1 -1
- package/dist/{idp-BlBPtXJ-.d.mts → idp-BmYwCXnJ.d.mts} +30 -3
- package/dist/{idp-BZPqpcYY.mjs → idp-ynUfzwpz.mjs} +9 -1
- package/dist/idp-ynUfzwpz.mjs.map +1 -0
- package/dist/{index-DvEUb3pX.d.mts → index-B7VbJm0_.d.mts} +25 -16
- package/dist/{index-DRhMpdnA.d.mts → index-dKNk8hjo.d.mts} +2 -2
- package/dist/job-BpsFXPbi.mjs.map +1 -1
- package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-CSoZxVKN.mjs} +2 -2
- package/dist/{kysely-type-D1e0Vwkd.mjs.map → kysely-type-CSoZxVKN.mjs.map} +1 -1
- package/dist/{logger-DpJyJvNz.mjs → logger-DKF-JsAK.mjs} +3 -3
- package/dist/{logger-DpJyJvNz.mjs.map → logger-DKF-JsAK.mjs.map} +1 -1
- package/dist/{mock-DMgIygjE.mjs → mock-wf5qeZLi.mjs} +19 -9
- package/dist/mock-wf5qeZLi.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/registry-D0uB0OrK.mjs.map +1 -1
- package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DD5YP5mt.mjs} +4 -4
- package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DD5YP5mt.mjs.map} +1 -1
- package/dist/runtime/globals.d.mts +3 -2
- package/dist/runtime/idp.d.mts +2 -2
- package/dist/runtime/idp.mjs +1 -1
- package/dist/runtime/index.d.mts +2 -2
- package/dist/runtime/index.mjs +1 -1
- package/dist/{runtime-DxaBq6U8.mjs → runtime-jowoN6qC.mjs} +84 -34
- package/dist/runtime-jowoN6qC.mjs.map +1 -0
- package/dist/schema-1msIhXwA.mjs.map +1 -1
- package/dist/seed-YAbtMy65.mjs.map +1 -1
- package/dist/{service-wI3Hvrgx.mjs → service-B2Jd9CxS.mjs} +2 -2
- package/dist/service-B2Jd9CxS.mjs.map +1 -0
- package/dist/service-CRaa4Joe.mjs +4 -0
- package/dist/{service-DMohAx8a.mjs → service-DDWgZL_L2.mjs} +2 -2
- package/dist/service-DDWgZL_L2.mjs.map +1 -0
- package/dist/service_pb-DGSmn-aF.mjs +4 -0
- package/dist/{application-WpWwTyk9.mjs → service_pb-DSNjrcbW.mjs} +22 -6176
- package/dist/service_pb-DSNjrcbW.mjs.map +1 -0
- package/dist/telemetry-BQbbVo2t.mjs.map +1 -1
- package/dist/types-CmzfQP_m.mjs.map +1 -1
- package/dist/utils/test/index.d.mts +2 -2
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.mjs +4 -4
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/setup.mjs +1 -1
- package/dist/{workflow.generated-1S50BhEb.d.mts → workflow.generated-Br9bmLdX.d.mts} +98 -3
- package/docs/cli/application.md +5 -202
- package/docs/cli/auth.md +12 -256
- package/docs/cli/completion.md +0 -24
- package/docs/cli/crashreport.md +0 -58
- package/docs/cli/executor.md +2 -166
- package/docs/cli/function.md +2 -118
- package/docs/cli/organization.md +1 -211
- package/docs/cli/query.md +0 -20
- package/docs/cli/secret.md +70 -250
- package/docs/cli/setup.md +1 -41
- package/docs/cli/skills.md +0 -39
- package/docs/cli/staticwebsite.md +24 -172
- package/docs/cli/tailordb.md +5 -255
- package/docs/cli/upgrade.md +0 -20
- package/docs/cli/user.md +32 -247
- package/docs/cli/workflow.md +30 -189
- package/docs/cli/workspace.md +158 -537
- package/docs/cli-reference.md +55 -37
- package/docs/configuration.md +7 -1
- package/docs/services/idp.md +55 -2
- package/docs/services/staticwebsite.md +7 -1
- package/package.json +23 -18
- package/dist/application-Djeezk3m.mjs +0 -4
- package/dist/application-WpWwTyk9.mjs.map +0 -1
- package/dist/idp-BZPqpcYY.mjs.map +0 -1
- package/dist/mock-DMgIygjE.mjs.map +0 -1
- package/dist/runtime-DxaBq6U8.mjs.map +0 -1
- package/dist/service-BHQIerYh.mjs +0 -4
- package/dist/service-DMohAx8a.mjs.map +0 -1
- package/dist/service-wI3Hvrgx.mjs.map +0 -1
package/dist/runtime/idp.mjs
CHANGED
package/dist/runtime/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ import { n as authconnection_d_exports } from "../authconnection-BIYzEh2p.mjs";
|
|
|
2
2
|
import { i as context_d_exports } from "../context-CUBwSBq4.mjs";
|
|
3
3
|
import { b as file_d_exports } from "../file-BzK8z3X-.mjs";
|
|
4
4
|
import { u as iconv_d_exports } from "../iconv-kwrmd1U_.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { m as idp_d_exports } from "../idp-BmYwCXnJ.mjs";
|
|
6
6
|
import { i as secretmanager_d_exports } from "../secretmanager-CKLB3wAQ.mjs";
|
|
7
7
|
import { c as workflow_d_exports } from "../workflow-CMamswkK.mjs";
|
|
8
|
-
import { a as TailordbQueryResult, i as TailordbCommandType, n as TailordbClientConstructor, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-
|
|
8
|
+
import { a as TailordbQueryResult, i as TailordbCommandType, n as TailordbClientConstructor, o as TailordbRuntime, r as TailordbClientInstance, t as TailorRuntime } from "../index-dKNk8hjo.mjs";
|
|
9
9
|
export { TailorRuntime, TailordbClientConstructor, TailordbClientInstance, TailordbCommandType, TailordbQueryResult, TailordbRuntime, authconnection_d_exports as authconnection, context_d_exports as context, file_d_exports as file, iconv_d_exports as iconv, idp_d_exports as idp, secretmanager_d_exports as secretmanager, workflow_d_exports as workflow };
|
package/dist/runtime/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { s as iconv_exports } from "../iconv-D1zmPjvi.mjs";
|
|
3
3
|
import { r as secretmanager_exports } from "../secretmanager-h3tBJV8f.mjs";
|
|
4
4
|
import { t as authconnection_exports } from "../authconnection-Ds2Ahpum.mjs";
|
|
5
|
-
import { n as idp_exports } from "../idp-
|
|
5
|
+
import { n as idp_exports } from "../idp-ynUfzwpz.mjs";
|
|
6
6
|
import { a as workflow_exports } from "../workflow-C8I7shjM.mjs";
|
|
7
7
|
import { t as context_exports } from "../context-CDQqIv4u.mjs";
|
|
8
8
|
import { a as file_exports } from "../file-BkxupbYP.mjs";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import { t as db } from "./schema-1msIhXwA.mjs";
|
|
3
|
-
import { $ as
|
|
3
|
+
import { $ as CreateUserProfileConfigRequestSchema, A as UpdatePipelineServiceRequestSchema, At as PageDirection, B as UpdateExecutorExecutorRequestSchema, Ct as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, D as CreatePipelineResolverRequestSchema, Dt as ConditionSchema, E as UpdateSecretManagerSecretRequestSchema, Et as Subgraph_ServiceType, F as IdPPermissionOperator, G as CreateAuthHookRequestSchema, H as ExecutorTargetType, I as IdPPermissionPermit, J as CreateAuthOAuth2ClientRequestSchema, K as CreateAuthIDPConfigRequestSchema, L as FunctionExecution_Status, M as CreateIdPServiceRequestSchema, N as UpdateIdPServiceRequestSchema, O as CreatePipelineServiceRequestSchema, Ot as Condition_Operator, P as IdPLang, Q as CreateTenantConfigRequestSchema, S as UpdateStaticWebsiteRequestSchema, St as CreateApplicationRequestSchema, T as CreateSecretManagerVaultRequestSchema, Tt as ApplicationSchemaUpdateAttemptStatus, U as ExecutorTriggerType, V as ExecutorJobStatus, W as CreateAuthConnectionRequestSchema, X as CreateAuthSCIMResourceRequestSchema, Y as CreateAuthSCIMConfigRequestSchema, Z as CreateAuthServiceRequestSchema, _ as TailorDBType_Permission_Operator, _t as AuthSCIMAttribute_Uniqueness, a as WorkspacePlatformUserRole, at as UpdateAuthSCIMResourceRequestSchema, b as AddCustomDomainRequestSchema, bt as TenantProviderConfig_TenantProviderType, c as UpdateWorkflowRequestSchema, ct as UpdateUserProfileConfigRequestSchema, d as CreateTailorDBServiceRequestSchema, dt as AuthIDPConfig_AuthType, et as UpdateAuthHookRequestSchema, f as CreateTailorDBTypeRequestSchema, ft as AuthInvokerSchema, g as TailorDBGQLPermission_Permit, gt as AuthSCIMAttribute_Type, h as TailorDBGQLPermission_Operator, ht as AuthSCIMAttribute_Mutability, it as UpdateAuthSCIMConfigRequestSchema, j as PipelineResolver_OperationType, k as UpdatePipelineResolverRequestSchema, kt as FilterSchema, l as WorkflowExecution_Status, lt as AuthConnection_Type, m as TailorDBGQLPermission_Action, mt as AuthOAuth2Client_GrantType, nt as UpdateAuthMachineUserRequestSchema, o as CreateWorkflowJobFunctionRequestSchema, ot as UpdateAuthServiceRequestSchema, p as UpdateTailorDBTypeRequestSchema, pt as AuthOAuth2Client_ClientType, q as CreateAuthMachineUserRequestSchema, rt as UpdateAuthOAuth2ClientRequestSchema, s as CreateWorkflowRequestSchema, st as UpdateTenantConfigRequestSchema, t as OperatorService, tt as UpdateAuthIDPConfigRequestSchema, u as WorkflowJobExecution_Status, ut as AuthHookPoint, v as TailorDBType_Permission_Permit, vt as AuthSCIMConfig_AuthorizationType, w as CreateSecretManagerSecretRequestSchema, wt as UpdateApplicationRequestSchema, x as CreateStaticWebsiteRequestSchema, xt as UserProfileProviderConfig_UserProfileProviderType, y as TailorDBType_PermitAction, z as CreateExecutorExecutorRequestSchema } from "./service_pb-DSNjrcbW.mjs";
|
|
4
4
|
import { t as assertDefined } from "./assert-CKfwrmCV.mjs";
|
|
5
|
-
import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-
|
|
6
|
-
import {
|
|
5
|
+
import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-DKF-JsAK.mjs";
|
|
6
|
+
import { A as loadMachineUserName, F as writePlatformConfig, G as resolveStaticWebsiteUrls, K as byName, L as fetchAll, M as readPlatformConfig, O as loadAccessToken, R as fetchMachineUserToken, S as getDistDir, T as loadConfig, U as initOperatorClient, W as platformBaseUrl, b as hasGenerationHooks, d as assertUniqueLocalTailorDBTypeNames, f as assertUniqueTailorDBTypeNamesWithExternal, h as platformBundleDefinePlugin, j as loadWorkspaceId, k as loadConfigPath, l as buildExecutorArgsExpr, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as HTTP_METHODS, t as defineApplication, u as buildResolverOperationHookExpr, w as hashFile, x as createBundleCache, y as getPluginGenerationDependencies, z as fetchPaged } from "./application-Cr-limKC.mjs";
|
|
7
|
+
import { o as loadFilesWithIgnores, t as createExecutorService } from "./service-B2Jd9CxS.mjs";
|
|
7
8
|
import { t as multiline } from "./multiline-Cf9ODpr1.mjs";
|
|
8
9
|
import { t as readPackageJson } from "./package-json-DcQApfPQ.mjs";
|
|
9
10
|
import { i as userAgent } from "./secret-file-eB3R3Fil.mjs";
|
|
@@ -385,7 +386,7 @@ function nestedMessage(field) {
|
|
|
385
386
|
function isWellKnownType(message) {
|
|
386
387
|
return message.typeName.startsWith("google.protobuf.");
|
|
387
388
|
}
|
|
388
|
-
const UNREPRESENTABLE_WELL_KNOWN_TYPES = new Set([
|
|
389
|
+
const UNREPRESENTABLE_WELL_KNOWN_TYPES = /* @__PURE__ */ new Set([
|
|
389
390
|
"google.protobuf.Struct",
|
|
390
391
|
"google.protobuf.Value",
|
|
391
392
|
"google.protobuf.ListValue",
|
|
@@ -568,7 +569,7 @@ function fieldToJson(field, visited) {
|
|
|
568
569
|
return json;
|
|
569
570
|
}
|
|
570
571
|
function renderInspectJson(method) {
|
|
571
|
-
const visited = new Set([method.input]);
|
|
572
|
+
const visited = /* @__PURE__ */ new Set([method.input]);
|
|
572
573
|
return {
|
|
573
574
|
method: method.name,
|
|
574
575
|
input: {
|
|
@@ -599,7 +600,7 @@ function renderInspectText(method) {
|
|
|
599
600
|
const lines = [];
|
|
600
601
|
lines.push(`${method.name}`);
|
|
601
602
|
lines.push(` request: ${method.input.typeName}`);
|
|
602
|
-
const visited = new Set([method.input]);
|
|
603
|
+
const visited = /* @__PURE__ */ new Set([method.input]);
|
|
603
604
|
for (const f of method.input.fields) lines.push(...renderFieldText(f, " ", visited));
|
|
604
605
|
lines.push(` response: ${method.output.typeName}`);
|
|
605
606
|
return lines.join("\n");
|
|
@@ -750,7 +751,7 @@ function normalizeBodyFieldKeys(body, fields) {
|
|
|
750
751
|
}
|
|
751
752
|
return changed;
|
|
752
753
|
}
|
|
753
|
-
const FORBIDDEN_SEGMENTS = new Set([
|
|
754
|
+
const FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set([
|
|
754
755
|
"__proto__",
|
|
755
756
|
"constructor",
|
|
756
757
|
"prototype"
|
|
@@ -3162,7 +3163,8 @@ function normalizeIdPPermission(permission) {
|
|
|
3162
3163
|
read: permission.read.map((p) => normalizeIdPActionPermission(p)),
|
|
3163
3164
|
update: permission.update.map((p) => normalizeIdPActionPermission(p)),
|
|
3164
3165
|
delete: permission.delete.map((p) => normalizeIdPActionPermission(p)),
|
|
3165
|
-
sendPasswordResetEmail: permission.sendPasswordResetEmail.map((p) => normalizeIdPActionPermission(p))
|
|
3166
|
+
sendPasswordResetEmail: (permission.sendPasswordResetEmail ?? []).map((p) => normalizeIdPActionPermission(p)),
|
|
3167
|
+
unenrollMfa: (permission.unenrollMfa ?? []).map((p) => normalizeIdPActionPermission(p))
|
|
3166
3168
|
};
|
|
3167
3169
|
}
|
|
3168
3170
|
/**
|
|
@@ -3188,7 +3190,7 @@ function parseIdPPermission(rawPermission) {
|
|
|
3188
3190
|
function findOmittedPermitRules(permission) {
|
|
3189
3191
|
if (!permission) return [];
|
|
3190
3192
|
const locations = [];
|
|
3191
|
-
for (const action of Object.keys(permission)) permission[action]
|
|
3193
|
+
for (const action of Object.keys(permission)) permission[action]?.forEach((rule, index) => {
|
|
3192
3194
|
if (isObjectFormat(rule) && rule.permit === void 0) locations.push(`${String(action)}[${index}]`);
|
|
3193
3195
|
});
|
|
3194
3196
|
return locations;
|
|
@@ -3196,6 +3198,14 @@ function findOmittedPermitRules(permission) {
|
|
|
3196
3198
|
|
|
3197
3199
|
//#endregion
|
|
3198
3200
|
//#region src/cli/commands/deploy/idp.ts
|
|
3201
|
+
async function resolveServiceReturnOrigins(client, request) {
|
|
3202
|
+
const policy = request.userAuthPolicy;
|
|
3203
|
+
const originals = policy?.allowedReturnOrigins;
|
|
3204
|
+
if (!policy || !originals?.length) return;
|
|
3205
|
+
const resolved = await resolveStaticWebsiteUrls(client, assertDefined(request.workspaceId, "request missing workspaceId"), originals, `IdP service "${request.namespaceName ?? ""}" allowedReturnOrigins`);
|
|
3206
|
+
if (resolved.length !== originals.length) throw new Error(`IdP service "${request.namespaceName ?? ""}" allowedReturnOrigins: ${originals.length - resolved.length} of ${originals.length} entries could not be resolved. Check that each "<name>:url" entry refers to a deployed static website.`);
|
|
3207
|
+
policy.allowedReturnOrigins = resolved;
|
|
3208
|
+
}
|
|
3199
3209
|
/**
|
|
3200
3210
|
* Build the vault name for an IdP client.
|
|
3201
3211
|
* @param namespaceName - IdP namespace name
|
|
@@ -3225,9 +3235,11 @@ async function applyIdP(client, result, phase = "create-update") {
|
|
|
3225
3235
|
const { changeSet } = result;
|
|
3226
3236
|
if (phase === "create-update") {
|
|
3227
3237
|
await Promise.all([...changeSet.service.creates.map(async (create) => {
|
|
3238
|
+
await resolveServiceReturnOrigins(client, create.request);
|
|
3228
3239
|
await client.createIdPService(create.request);
|
|
3229
3240
|
await client.setMetadata(create.metaRequest);
|
|
3230
3241
|
}), ...changeSet.service.updates.map(async (update) => {
|
|
3242
|
+
await resolveServiceReturnOrigins(client, update.request);
|
|
3231
3243
|
await client.updateIdPService(update.request);
|
|
3232
3244
|
await client.setMetadata(update.metaRequest);
|
|
3233
3245
|
})]);
|
|
@@ -3286,7 +3298,8 @@ async function applyIdP(client, result, phase = "create-update") {
|
|
|
3286
3298
|
async function planIdP(context) {
|
|
3287
3299
|
const { client, workspaceId, application, forRemoval, forceApplyAll = false, idpUserTriggerTargets } = context;
|
|
3288
3300
|
const idps = forRemoval ? [] : application.idpServices;
|
|
3289
|
-
const
|
|
3301
|
+
const expectedLocalWebsites = new Set(application.staticWebsiteServices.map((website) => website.name));
|
|
3302
|
+
const { changeSet: serviceChangeSet, conflicts, unmanaged, resourceOwners } = await planServices$3(client, workspaceId, application.name, application.id, idps, idpUserTriggerTargets ?? /* @__PURE__ */ new Set(), expectedLocalWebsites);
|
|
3290
3303
|
return {
|
|
3291
3304
|
changeSet: {
|
|
3292
3305
|
service: serviceChangeSet,
|
|
@@ -3310,7 +3323,11 @@ function normalizeComparableUserAuthPolicy(policy) {
|
|
|
3310
3323
|
allowedEmailDomains: (policy?.allowedEmailDomains ?? []).toSorted(),
|
|
3311
3324
|
allowGoogleOauth: policy?.allowGoogleOauth ?? false,
|
|
3312
3325
|
disablePasswordAuth: policy?.disablePasswordAuth ?? false,
|
|
3313
|
-
allowMicrosoftOauth: policy?.allowMicrosoftOauth ?? false
|
|
3326
|
+
allowMicrosoftOauth: policy?.allowMicrosoftOauth ?? false,
|
|
3327
|
+
enableMfa: policy?.enableMfa ?? false,
|
|
3328
|
+
requireMfa: policy?.requireMfa ?? false,
|
|
3329
|
+
allowedReturnOrigins: (policy?.allowedReturnOrigins ?? []).toSorted(),
|
|
3330
|
+
mfaIssuer: policy?.mfaIssuer ?? ""
|
|
3314
3331
|
};
|
|
3315
3332
|
}
|
|
3316
3333
|
function normalizeComparableDisableGqlOperations(value) {
|
|
@@ -3319,7 +3336,9 @@ function normalizeComparableDisableGqlOperations(value) {
|
|
|
3319
3336
|
update: value?.update ?? false,
|
|
3320
3337
|
delete: value?.delete ?? false,
|
|
3321
3338
|
read: value?.read ?? false,
|
|
3322
|
-
sendPasswordResetEmail: value?.sendPasswordResetEmail ?? false
|
|
3339
|
+
sendPasswordResetEmail: value?.sendPasswordResetEmail ?? false,
|
|
3340
|
+
requestMfaSettingsUrl: value?.requestMfaSettingsUrl ?? false,
|
|
3341
|
+
unenrollMfa: value?.unenrollMfa ?? false
|
|
3323
3342
|
};
|
|
3324
3343
|
}
|
|
3325
3344
|
function normalizeComparableEmailConfig(value) {
|
|
@@ -3341,7 +3360,7 @@ function normalizeComparableIdPService(input) {
|
|
|
3341
3360
|
}
|
|
3342
3361
|
function normalizeComparablePermission(permission) {
|
|
3343
3362
|
if (!permission) return;
|
|
3344
|
-
if (permission.create.length === 0 && permission.read.length === 0 && permission.update.length === 0 && permission.delete.length === 0 && permission.sendPasswordResetEmail.length === 0) return;
|
|
3363
|
+
if (permission.create.length === 0 && permission.read.length === 0 && permission.update.length === 0 && permission.delete.length === 0 && permission.sendPasswordResetEmail.length === 0 && permission.unenrollMfa.length === 0) return;
|
|
3345
3364
|
const normalizePolicy = (policy) => ({
|
|
3346
3365
|
conditions: policy.conditions.map((c) => ({
|
|
3347
3366
|
left: c.left ? { kind: c.left.kind } : void 0,
|
|
@@ -3356,7 +3375,8 @@ function normalizeComparablePermission(permission) {
|
|
|
3356
3375
|
read: permission.read.map(normalizePolicy),
|
|
3357
3376
|
update: permission.update.map(normalizePolicy),
|
|
3358
3377
|
delete: permission.delete.map(normalizePolicy),
|
|
3359
|
-
sendPasswordResetEmail: permission.sendPasswordResetEmail.map(normalizePolicy)
|
|
3378
|
+
sendPasswordResetEmail: permission.sendPasswordResetEmail.map(normalizePolicy),
|
|
3379
|
+
unenrollMfa: permission.unenrollMfa.map(normalizePolicy)
|
|
3360
3380
|
};
|
|
3361
3381
|
}
|
|
3362
3382
|
function areIdPServicesEqual(existing, desired) {
|
|
@@ -3370,7 +3390,7 @@ function areIdPServicesEqual(existing, desired) {
|
|
|
3370
3390
|
permission: normalizeComparablePermission(existing.permission)
|
|
3371
3391
|
}), desired);
|
|
3372
3392
|
}
|
|
3373
|
-
async function planServices$3(client, workspaceId, appName, appId, idps, idpUserTriggerTargets) {
|
|
3393
|
+
async function planServices$3(client, workspaceId, appName, appId, idps, idpUserTriggerTargets, expectedLocalWebsites) {
|
|
3374
3394
|
const changeSet = createChangeSet("IdP services");
|
|
3375
3395
|
const conflicts = [];
|
|
3376
3396
|
const unmanaged = [];
|
|
@@ -3432,10 +3452,15 @@ async function planServices$3(client, workspaceId, appName, appId, idps, idpUser
|
|
|
3432
3452
|
if (omittedPermitLocations.length > 0) logger.warn(`IdP service "${namespaceName}" has permission rule(s) ${omittedPermitLocations.join(", ")} in object form without an explicit "permit"; they default to "deny". Set permit: true (allow) or permit: false (deny) to silence this warning.`);
|
|
3433
3453
|
const parsedPermission = parseIdPPermission(idp.permission);
|
|
3434
3454
|
const protoPermission = parsedPermission ? protoIdPPermission(parsedPermission) : void 0;
|
|
3455
|
+
const resolvedReturnOrigins = await resolveStaticWebsiteUrls(client, workspaceId, userAuthPolicy?.allowedReturnOrigins ? [...userAuthPolicy.allowedReturnOrigins] : [], `IdP service "${namespaceName}" allowedReturnOrigins`, { expectedLocalNames: expectedLocalWebsites });
|
|
3456
|
+
const userAuthPolicyForCompare = userAuthPolicy ? {
|
|
3457
|
+
...userAuthPolicy,
|
|
3458
|
+
allowedReturnOrigins: resolvedReturnOrigins
|
|
3459
|
+
} : userAuthPolicy;
|
|
3435
3460
|
const desired = normalizeComparableIdPService({
|
|
3436
3461
|
authorization,
|
|
3437
3462
|
lang,
|
|
3438
|
-
userAuthPolicy: normalizeComparableUserAuthPolicy(
|
|
3463
|
+
userAuthPolicy: normalizeComparableUserAuthPolicy(userAuthPolicyForCompare),
|
|
3439
3464
|
publishUserEvents,
|
|
3440
3465
|
disableGqlOperations: normalizeComparableDisableGqlOperations(convertGqlOperationsToDisable(idp.gqlOperations)),
|
|
3441
3466
|
emailConfig: normalizeComparableEmailConfig(emailConfig),
|
|
@@ -3577,7 +3602,9 @@ function convertGqlOperationsToDisable(gqlOperations) {
|
|
|
3577
3602
|
update: gqlOperations.update === false,
|
|
3578
3603
|
delete: gqlOperations.delete === false,
|
|
3579
3604
|
read: gqlOperations.read === false,
|
|
3580
|
-
sendPasswordResetEmail: gqlOperations.sendPasswordResetEmail === false
|
|
3605
|
+
sendPasswordResetEmail: gqlOperations.sendPasswordResetEmail === false,
|
|
3606
|
+
requestMfaSettingsUrl: gqlOperations.requestMfaSettingsUrl === false,
|
|
3607
|
+
unenrollMfa: gqlOperations.unenrollMfa === false
|
|
3581
3608
|
};
|
|
3582
3609
|
}
|
|
3583
3610
|
function protoIdPPermission(permission) {
|
|
@@ -3586,7 +3613,8 @@ function protoIdPPermission(permission) {
|
|
|
3586
3613
|
read: permission.read.map((p) => protoIdPPolicy(p)),
|
|
3587
3614
|
update: permission.update.map((p) => protoIdPPolicy(p)),
|
|
3588
3615
|
delete: permission.delete.map((p) => protoIdPPolicy(p)),
|
|
3589
|
-
sendPasswordResetEmail: permission.sendPasswordResetEmail.map((p) => protoIdPPolicy(p))
|
|
3616
|
+
sendPasswordResetEmail: permission.sendPasswordResetEmail.map((p) => protoIdPPolicy(p)),
|
|
3617
|
+
unenrollMfa: permission.unenrollMfa.map((p) => protoIdPPolicy(p))
|
|
3590
3618
|
};
|
|
3591
3619
|
}
|
|
3592
3620
|
function protoIdPPolicy(policy) {
|
|
@@ -3757,7 +3785,7 @@ async function planAuth(context) {
|
|
|
3757
3785
|
},
|
|
3758
3786
|
conflicts: [...conflicts, ...connectionResult.conflicts],
|
|
3759
3787
|
unmanaged: [...unmanaged, ...connectionResult.unmanaged],
|
|
3760
|
-
resourceOwners: new Set([...resourceOwners, ...connectionResult.resourceOwners])
|
|
3788
|
+
resourceOwners: /* @__PURE__ */ new Set([...resourceOwners, ...connectionResult.resourceOwners])
|
|
3761
3789
|
};
|
|
3762
3790
|
}
|
|
3763
3791
|
async function planServices$2(client, workspaceId, appName, appId, auths, forceApplyAll = false) {
|
|
@@ -6976,7 +7004,7 @@ function createSnapshotFieldConfig(field) {
|
|
|
6976
7004
|
}
|
|
6977
7005
|
/**
|
|
6978
7006
|
* Create a snapshot field config from an OperatorFieldConfig (for nested fields)
|
|
6979
|
-
* @param {import("
|
|
7007
|
+
* @param {import("#/parser/service/tailordb/types").OperatorFieldConfig} fieldConfig - Field configuration
|
|
6980
7008
|
* @returns {SnapshotFieldConfig} Snapshot field configuration
|
|
6981
7009
|
*/
|
|
6982
7010
|
function createSnapshotFieldConfigFromOperatorConfig(fieldConfig) {
|
|
@@ -7826,7 +7854,7 @@ function validateMigrationFiles(migrationsDir) {
|
|
|
7826
7854
|
message: `Schema file found at migration ${formatMigrationNumber(num)}, but schema should only exist at ${formatMigrationNumber(0)}`,
|
|
7827
7855
|
migrationNumber: num
|
|
7828
7856
|
});
|
|
7829
|
-
const allNumbers = [
|
|
7857
|
+
const allNumbers = [.../* @__PURE__ */ new Set([...schemaFiles, ...diffFiles])].toSorted((a, b) => a - b);
|
|
7830
7858
|
if (allNumbers.length === 0) return errors;
|
|
7831
7859
|
for (const num of schemaFiles) if (num !== 0 && diffFiles.includes(num)) errors.push({
|
|
7832
7860
|
type: "duplicate",
|
|
@@ -7958,7 +7986,7 @@ function compareFields(typeName, fieldName, remoteField, snapshotField) {
|
|
|
7958
7986
|
/**
|
|
7959
7987
|
* System fields that are auto-generated and should be excluded from comparison
|
|
7960
7988
|
*/
|
|
7961
|
-
const SYSTEM_FIELDS = new Set(["id"]);
|
|
7989
|
+
const SYSTEM_FIELDS = /* @__PURE__ */ new Set(["id"]);
|
|
7962
7990
|
/**
|
|
7963
7991
|
* Compare remote TailorDB types with a local snapshot
|
|
7964
7992
|
* @param {ProtoTailorDBType[]} remoteTypes - Remote types from listParsedTailorDBTypes API
|
|
@@ -8486,7 +8514,7 @@ function protoGqlOperand(operand) {
|
|
|
8486
8514
|
/**
|
|
8487
8515
|
* Diff change kinds that require pre-migration schema adjustments.
|
|
8488
8516
|
*/
|
|
8489
|
-
const PRE_MIGRATION_FIELD_KINDS = new Set([
|
|
8517
|
+
const PRE_MIGRATION_FIELD_KINDS = /* @__PURE__ */ new Set([
|
|
8490
8518
|
"field_added",
|
|
8491
8519
|
"field_modified",
|
|
8492
8520
|
"field_removed"
|
|
@@ -9629,7 +9657,7 @@ async function rollbackSingleMigrationPrePhase(client, changeSet, migration, wor
|
|
|
9629
9657
|
const name = update.request.tailordbType?.name;
|
|
9630
9658
|
if (update.request.namespaceName === migration.namespace && name) namespaceTypes.add(name);
|
|
9631
9659
|
}
|
|
9632
|
-
const applied = new Set([...processedTypes.created, ...processedTypes.updated]);
|
|
9660
|
+
const applied = /* @__PURE__ */ new Set([...processedTypes.created, ...processedTypes.updated]);
|
|
9633
9661
|
const rollbackTypes = new Set([...namespaceTypes].filter((name) => applied.has(name)));
|
|
9634
9662
|
if (rollbackTypes.size === 0) return;
|
|
9635
9663
|
const priorSnapshot = reconstructSnapshotFromMigrations(migration.migrationsDir, migration.number - 1);
|
|
@@ -9950,7 +9978,7 @@ const tailordbCompareKnownDefaults = {
|
|
|
9950
9978
|
* Proto bigint-backed values can round-trip as numbers locally and strings remotely.
|
|
9951
9979
|
* Canonicalize them to strings at compare time.
|
|
9952
9980
|
*/
|
|
9953
|
-
numericStringPaths: new Set([
|
|
9981
|
+
numericStringPaths: /* @__PURE__ */ new Set([
|
|
9954
9982
|
"schema.fields.*.serial.start",
|
|
9955
9983
|
"schema.fields.*.serial.maxValue",
|
|
9956
9984
|
"schema.settings.defaultQueryLimitSize",
|
|
@@ -10530,8 +10558,13 @@ function validateItems(params) {
|
|
|
10530
10558
|
*
|
|
10531
10559
|
* Collections not validated: idp client, tailorDB gqlPermission, functionRegistry — no
|
|
10532
10560
|
* buf.validate annotations.
|
|
10533
|
-
* Application cors
|
|
10534
|
-
*
|
|
10561
|
+
* Application cors and IdP userAuthPolicy.allowedReturnOrigins receive special
|
|
10562
|
+
* handling: static-website URL placeholders are resolved at apply time, so the
|
|
10563
|
+
* relevant origin/URL constraints would false-positive on `<name>:url` entries
|
|
10564
|
+
* here. Application cors is dropped entirely (no other constraint to lose); IdP
|
|
10565
|
+
* `allowedReturnOrigins` substitutes placeholder entries with a dummy origin so
|
|
10566
|
+
* the per-item regex and the cross-field `enable_mfa requires ≥1 origin` rule
|
|
10567
|
+
* still get exercised on the rest of the payload.
|
|
10535
10568
|
* Workflow jobFunctions map excluded: versions are registered at apply time (registerJobFunctions)
|
|
10536
10569
|
* and the map field carries no min_items constraint. Job names are validated separately via
|
|
10537
10570
|
* CreateWorkflowJobFunctionRequestSchema using usedJobNames from the workflow change set.
|
|
@@ -10583,8 +10616,25 @@ async function validatePlan(input) {
|
|
|
10583
10616
|
creates(CreateStaticWebsiteRequestSchema, "StaticWebsite", staticWebsite.changeSet.creates);
|
|
10584
10617
|
updates(UpdateStaticWebsiteRequestSchema, "StaticWebsite", staticWebsite.changeSet.updates);
|
|
10585
10618
|
creates(AddCustomDomainRequestSchema, "StaticWebsite custom domain", staticWebsite.customDomainChangeSet.creates);
|
|
10586
|
-
|
|
10587
|
-
|
|
10619
|
+
const placeholderOriginReplacement = "https://placeholder.invalid";
|
|
10620
|
+
const substituteIdpReturnOrigins = (item) => {
|
|
10621
|
+
const request = item.request;
|
|
10622
|
+
const origins = request.userAuthPolicy?.allowedReturnOrigins;
|
|
10623
|
+
if (!Array.isArray(origins) || origins.length === 0) return item;
|
|
10624
|
+
const substituted = origins.map((origin) => typeof origin === "string" && /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]:url$/.test(origin) ? placeholderOriginReplacement : origin);
|
|
10625
|
+
return {
|
|
10626
|
+
...item,
|
|
10627
|
+
request: {
|
|
10628
|
+
...request,
|
|
10629
|
+
userAuthPolicy: {
|
|
10630
|
+
...request.userAuthPolicy,
|
|
10631
|
+
allowedReturnOrigins: substituted
|
|
10632
|
+
}
|
|
10633
|
+
}
|
|
10634
|
+
};
|
|
10635
|
+
};
|
|
10636
|
+
creates(CreateIdPServiceRequestSchema, "IdP service", idp.changeSet.service.creates.map(substituteIdpReturnOrigins));
|
|
10637
|
+
updates(UpdateIdPServiceRequestSchema, "IdP service", idp.changeSet.service.updates.map(substituteIdpReturnOrigins));
|
|
10588
10638
|
const idpClientVaultItems = [...idp.changeSet.client.creates.map((c) => ({
|
|
10589
10639
|
clientName: c.request.client?.name ?? "",
|
|
10590
10640
|
namespaceName: c.request.namespaceName ?? "",
|
|
@@ -11065,7 +11115,7 @@ async function deploy(options) {
|
|
|
11065
11115
|
await confirmImportantResourceDeletion(importantDeletions, yes);
|
|
11066
11116
|
const emptyApps = computeRenamedAppDeletions({
|
|
11067
11117
|
conflicts: allConflicts,
|
|
11068
|
-
resourceOwners: new Set([
|
|
11118
|
+
resourceOwners: /* @__PURE__ */ new Set([
|
|
11069
11119
|
...functionRegistry.resourceOwners,
|
|
11070
11120
|
...tailorDB.resourceOwners,
|
|
11071
11121
|
...staticWebsite.resourceOwners,
|
|
@@ -15601,7 +15651,7 @@ function formatEnumUnion(values) {
|
|
|
15601
15651
|
return values.map((v) => `"${v}"`).join(" | ");
|
|
15602
15652
|
}
|
|
15603
15653
|
function generateEnumChangeColumnType(enumValueChange, config) {
|
|
15604
|
-
const selectType = formatEnumUnion([
|
|
15654
|
+
const selectType = formatEnumUnion([.../* @__PURE__ */ new Set([...enumValueChange.beforeValues, ...enumValueChange.afterValues])]);
|
|
15605
15655
|
const afterType = formatEnumUnion(enumValueChange.afterValues);
|
|
15606
15656
|
if (config.array && !config.required) return `ColumnType<(${selectType})[] | null, (${afterType})[] | null, (${afterType})[] | null>`;
|
|
15607
15657
|
if (config.array) return `ColumnType<(${selectType})[], (${afterType})[], (${afterType})[]>`;
|
|
@@ -15928,7 +15978,7 @@ async function generate(options) {
|
|
|
15928
15978
|
if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
|
|
15929
15979
|
let pluginManager;
|
|
15930
15980
|
if (plugins.length > 0) pluginManager = new PluginManager(plugins);
|
|
15931
|
-
const { defineApplication } = await import("./application-
|
|
15981
|
+
const { defineApplication } = await import("./application-Br48NXBD.mjs");
|
|
15932
15982
|
const application = defineApplication({
|
|
15933
15983
|
config,
|
|
15934
15984
|
pluginManager
|
|
@@ -17862,7 +17912,7 @@ async function runRepl(options) {
|
|
|
17862
17912
|
const execute = await prepareQueryExecutor(options);
|
|
17863
17913
|
const historyPath = getReplHistoryPath(options.engine, options.profile, options.workspaceId);
|
|
17864
17914
|
const validate = createReplValidator(options.engine);
|
|
17865
|
-
const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-
|
|
17915
|
+
const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-DD5YP5mt.mjs");
|
|
17866
17916
|
const highlight = options.engine === "sql" ? highlightSqlLine : highlightGraphqlLine;
|
|
17867
17917
|
const prompt = createPrompt({
|
|
17868
17918
|
prefix: "",
|
|
@@ -18197,4 +18247,4 @@ function isDeno() {
|
|
|
18197
18247
|
|
|
18198
18248
|
//#endregion
|
|
18199
18249
|
export { updateCommand$2 as $, protoGqlPermission as $t, listCommand$3 as A, apiCall as An, jobsCommand as At, show as B, toPageDirection as Bn, functionExecutionStatusToString as Bt, listCommand$2 as C, ensureConfigId as Cn, webhookCommand as Ct, waitWorkflowExecution as D, generateUserTypes as Dn, listExecutors as Dt, waitCommand as E, PluginManager as En, listCommand$9 as Et, generateCommand as F, confirmationArgs as Fn, getCommand$5 as Ft, updateCommand$1 as G, executeScript as Gt, logBetaWarning as H, getCommand$6 as Ht, generateMigrationScript as I, deploymentArgs as In, getWorkflow as It, treeCommand as J, MIGRATION_LABEL_KEY as Jt, updateOrganization as K, waitForExecution as Kt, writeDbTypesFile as L, isVerbose as Ln, executionsCommand as Lt, truncate as M, defineAppCommand as Mn, watchExecutorJob as Mt, truncateCommand as N, commonArgs as Nn, startCommand as Nt, resumeCommand as O, prompt as On, getExecutorJob as Ot, generate as P, configArg as Pn, startWorkflow as Pt, getOrganization as Q, generateAllTypeManifestsFromSnapshot as Qt, getConfiguredEditorCommand as R, pagedLogArgs as Rn, getWorkflowExecution as Rt, listApps as S, getNamespacesWithMigrations as Sn, listWebhookExecutors as St, healthCommand as T, sdkNameLabelKey as Tn, triggerExecutor as Tt, remove as U, getExecutor as Ut, showCommand as V, workspaceArgs as Vn, formatKeyValueTable as Vt, removeCommand$1 as W, deploy as Wt, listOrganizations as X, parseMigrationLabelNumber as Xt, listCommand$4 as Y, handleOptionalToRequiredError as Yt, getCommand$1 as Z, compareSnapshotWithRemote as Zt, getWorkspace as _, formatMigrationNumber as _n, generate$1 as _t, updateUser as a, assertValidMigrationFiles as an, deleteCommand$1 as at, createCommand as b, formatMigrationDiff as bn, getCommand$4 as bt, listCommand as c, createSnapshotFromLocalTypes as cn, createFolder as ct, inviteUser as d, getMigrationFilePath as dn, getCommand$3 as dt, DB_TYPES_FILE_NAME as en, updateFolder as et, restoreCommand as f, getMigrationFiles as fn, getOAuth2Client as ft, getCommand as g, reconstructSnapshotFromMigrations as gn, listMachineUsers as gt, listWorkspaces as h, loadDiff as hn, listCommand$7 as ht, updateCommand as i, SCHEMA_FILE_NAME as in, getFolder as it, listWorkflows as j, assertWritable as jn, listExecutorJobs as jt, resumeWorkflow as k, apiCommand as kn, getExecutorWaitFailureMessage as kt, listUsers as l, getLatestMigrationNumber as ln, listCommand$6 as lt, listCommand$1 as m, isValidMigrationNumber as mn, tokenCommand as mt, query as n, INITIAL_SCHEMA_NUMBER as nn, listFolders as nt, removeCommand as o, compareLocalTypesWithSnapshot as on, deleteFolder as ot, restoreWorkspace as p, getNextMigrationNumber as pn, getMachineUserToken as pt, organizationTree as q, bundleMigrationScript as qt, queryCommand as r, MIGRATE_FILE_NAME as rn, getCommand$2 as rt, removeUser as s, compareSnapshots as sn, createCommand$1 as st, isNativeTypeScriptRuntime as t, DIFF_FILE_NAME as tn, listCommand$5 as tt, inviteCommand as u, getMigrationDirPath as un, listOAuth2Clients as ut, deleteCommand as v, parseMigrationNumberArg as vn, listCommand$8 as vt, getAppHealth as w, resourceTrn as wn, triggerCommand as wt, createWorkspace as x, hasChanges as xn, getFunctionRegistry as xt, deleteWorkspace as y, formatDiffSummary as yn, listFunctionRegistries as yt, openInConfiguredEditor as z, paginationArgs as zn, listWorkflowExecutions as zt };
|
|
18200
|
-
//# sourceMappingURL=runtime-
|
|
18250
|
+
//# sourceMappingURL=runtime-jowoN6qC.mjs.map
|