@tailor-platform/sdk 1.55.2 → 1.56.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.
@@ -1,4 +1,4 @@
1
1
 
2
- import { n as seedPlugin, t as SeedGeneratorID } from "../../../seed-DfLyRh63.mjs";
2
+ import { n as seedPlugin, t as SeedGeneratorID } from "../../../seed-C0fE2sJB.mjs";
3
3
 
4
4
  export { SeedGeneratorID, seedPlugin };
@@ -2,7 +2,7 @@
2
2
  import { t as db } from "./schema-DKsNhbav.mjs";
3
3
  import { $ as FilterSchema, A as FunctionExecution_Status, B as AuthOAuth2Client_GrantType, C as TailorDBType_Permission_Operator, D as IdPLang, E as PipelineResolver_OperationType, F as AuthConnection_Type, H as AuthSCIMAttribute_Type, I as AuthHookPoint, J as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, K as TenantProviderConfig_TenantProviderType, L as AuthIDPConfig_AuthType, M as ExecutorJobStatus, N as ExecutorTargetType, O as IdPPermissionOperator, P as ExecutorTriggerType, Q as Condition_Operator, R as AuthInvokerSchema, S as TailorDBGQLPermission_Permit, T as TailorDBType_PermitAction, U as AuthSCIMAttribute_Uniqueness, V as AuthSCIMAttribute_Mutability, W as AuthSCIMConfig_AuthorizationType, X as Subgraph_ServiceType, Y as ApplicationSchemaUpdateAttemptStatus, Z as ConditionSchema, _ as WorkspacePlatformUserRole, a as fetchMachineUserToken, b as TailorDBGQLPermission_Action, d as initOperatorClient, et as PageDirection, g as OperatorService, h as userAgent, i as fetchAll, k as IdPPermissionPermit, m as resolveStaticWebsiteUrls, o as fetchPaged, p as platformBaseUrl, q as UserProfileProviderConfig_UserProfileProviderType, v as WorkflowExecution_Status, w as TailorDBType_Permission_Permit, x as TailorDBGQLPermission_Operator, y as WorkflowJobExecution_Status, z as AuthOAuth2Client_ClientType } from "./client-DLPEPJ_s.mjs";
4
4
  import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-DpJyJvNz.mjs";
5
- import { C as loadConfigPath, O as writePlatformConfig, S as loadAccessToken, T as readPlatformConfig, _ as getDistDir, c as createExecutorService, d as buildExecutorArgsExpr, f as buildResolverOperationHookExpr, g as createBundleCache, h as loadFilesWithIgnores, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as HTTP_METHODS, t as defineApplication, v as hashFile, w as loadWorkspaceId, y as loadConfig } from "./application-MY7YJJ-C.mjs";
5
+ import { D as loadWorkspaceId, E as loadConfigPath, O as readPlatformConfig, S as loadConfig, T as loadAccessToken, b as getDistDir, c as createExecutorService, d as buildExecutorArgsExpr, f as buildResolverOperationHookExpr, h as loadFilesWithIgnores, j as writePlatformConfig, m as stringifyFunction, n as generatePluginFilesIfNeeded, p as TailorDBTypeSchema, r as loadApplication, s as HTTP_METHODS, t as defineApplication, x as hashFile, y as createBundleCache } from "./application-DuT_ae02.mjs";
6
6
  import { t as multiline } from "./multiline-Cf9ODpr1.mjs";
7
7
  import { t as readPackageJson } from "./package-json-DcQApfPQ.mjs";
8
8
  import { n as isCLIError, t as createCLIError } from "./errors-EsY4XO6O.mjs";
@@ -3012,6 +3012,25 @@ function parseIdPPermission(rawPermission) {
3012
3012
  if (!rawPermission) return;
3013
3013
  return normalizeIdPPermission(rawPermission);
3014
3014
  }
3015
+ /**
3016
+ * Find object-format IdP permission rules that omit `permit`.
3017
+ *
3018
+ * Object-format rules default to `deny` when `permit` is omitted, whereas the
3019
+ * array shorthand defaults to `allow`. Omitting `permit` on an object rule is
3020
+ * therefore an easy way to accidentally deny access you meant to grant, so the
3021
+ * CLI warns about these locations to nudge authors toward setting `permit`
3022
+ * explicitly.
3023
+ * @param permission - Raw IdP permission from user config
3024
+ * @returns Locations of offending rules, e.g. `read[0]`
3025
+ */
3026
+ function findOmittedPermitRules(permission) {
3027
+ if (!permission) return [];
3028
+ const locations = [];
3029
+ for (const action of Object.keys(permission)) permission[action]?.forEach((rule, index) => {
3030
+ if (isObjectFormat(rule) && rule.permit === void 0) locations.push(`${String(action)}[${index}]`);
3031
+ });
3032
+ return locations;
3033
+ }
3015
3034
 
3016
3035
  //#endregion
3017
3036
  //#region src/cli/commands/deploy/idp.ts
@@ -3250,6 +3269,8 @@ async function planServices$3(client, workspaceId, appName, appId, idps, idpUser
3250
3269
  const publishUserEvents = idp.publishUserEvents ?? isIdpUserTriggerTarget;
3251
3270
  const emailConfig = idp.emailConfig;
3252
3271
  if (!idp.permission) logger.warn(`IdP service "${namespaceName}" has no permission configured.`);
3272
+ const omittedPermitLocations = findOmittedPermitRules(idp.permission);
3273
+ 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.`);
3253
3274
  const parsedPermission = parseIdPPermission(idp.permission);
3254
3275
  const protoPermission = parsedPermission ? protoIdPPermission(parsedPermission) : void 0;
3255
3276
  const desired = normalizeComparableIdPService({
@@ -14494,7 +14515,7 @@ async function generate(options) {
14494
14515
  if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
14495
14516
  let pluginManager;
14496
14517
  if (plugins.length > 0) pluginManager = new PluginManager(plugins);
14497
- const { defineApplication } = await import("./application-D6znmyMd.mjs");
14518
+ const { defineApplication } = await import("./application-CC3oaSay.mjs");
14498
14519
  const application = defineApplication({
14499
14520
  config,
14500
14521
  pluginManager
@@ -16687,4 +16708,4 @@ function isDeno() {
16687
16708
 
16688
16709
  //#endregion
16689
16710
  export { listCommand$5 as $, compareSnapshots as $t, truncate as A, workspaceArgs as An, startCommand as At, logBetaWarning as B, getExecutor as Bt, listCommand$2 as C, configArg as Cn, triggerExecutor as Ct, resumeWorkflow as D, pagedLogArgs as Dn, jobsCommand as Dt, resumeCommand as E, isVerbose as En, getExecutorJob as Et, writeDbTypesFile as F, getWorkflowExecution as Ft, organizationTree as G, parseMigrationLabelNumber as Gt, removeCommand$1 as H, executeScript as Ht, getConfiguredEditorCommand as I, listWorkflowExecutions as It, listOrganizations as J, DIFF_FILE_NAME as Jt, treeCommand as K, bundleMigrationScript as Kt, openInConfiguredEditor as L, functionExecutionStatusToString as Lt, generate as M, getCommand$5 as Mt, generateCommand as N, getWorkflow as Nt, listCommand$3 as O, paginationArgs as On, listExecutorJobs as Ot, generateMigrationScript as P, executionsCommand as Pt, updateFolder as Q, compareLocalTypesWithSnapshot as Qt, show as R, formatKeyValueTable as Rt, listApps as S, commonArgs as Sn, triggerCommand as St, healthCommand as T, deploymentArgs as Tn, listExecutors as Tt, updateCommand$1 as U, waitForExecution$1 as Ut, remove as V, deploy as Vt, updateOrganization as W, MIGRATION_LABEL_KEY as Wt, getOrganization as X, MIGRATE_FILE_NAME as Xt, getCommand$1 as Y, INITIAL_SCHEMA_NUMBER as Yt, updateCommand$2 as Z, SCHEMA_FILE_NAME as Zt, getWorkspace as _, prompt as _n, listFunctionRegistries as _t, updateUser as a, getNextMigrationNumber as an, createCommand$1 as at, createCommand as b, assertWritable as bn, listWebhookExecutors as bt, listCommand as c, reconstructSnapshotFromMigrations as cn, listOAuth2Clients as ct, inviteUser as d, formatMigrationDiff as dn, getMachineUserToken as dt, createSnapshotFromLocalTypes as en, listFolders as et, restoreCommand as f, hasChanges as fn, tokenCommand as ft, getCommand as g, generateUserTypes as gn, listCommand$8 as gt, listWorkspaces as h, trnPrefix as hn, generate$1 as ht, updateCommand as i, getMigrationFiles as in, deleteFolder as it, truncateCommand as j, startWorkflow as jt, listWorkflows as k, toPageDirection as kn, watchExecutorJob as kt, listUsers as l, formatMigrationNumber as ln, getCommand$3 as lt, listCommand$1 as m, sdkNameLabelKey as mn, listMachineUsers as mt, query as n, getMigrationDirPath as nn, getFolder as nt, removeCommand as o, isValidMigrationNumber as on, createFolder as ot, restoreWorkspace as p, getNamespacesWithMigrations as pn, listCommand$7 as pt, listCommand$4 as q, DB_TYPES_FILE_NAME as qt, queryCommand as r, getMigrationFilePath as rn, deleteCommand$1 as rt, removeUser as s, loadDiff as sn, listCommand$6 as st, isNativeTypeScriptRuntime as t, getLatestMigrationNumber as tn, getCommand$2 as tt, inviteCommand as u, formatDiffSummary as un, getOAuth2Client as ut, deleteCommand as v, apiCommand as vn, getCommand$4 as vt, getAppHealth as w, confirmationArgs as wn, listCommand$9 as wt, createWorkspace as x, defineAppCommand as xn, webhookCommand as xt, deleteWorkspace as y, apiCall as yn, getFunctionRegistry as yt, showCommand as z, getCommand$6 as zt };
16690
- //# sourceMappingURL=runtime-DH5F_z8A.mjs.map
16711
+ //# sourceMappingURL=runtime-745lvg7i.mjs.map