@baseplate-dev/plugin-auth 0.6.14 → 0.6.15

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/auth/core/components/auth-definition-editor.js +3 -0
  3. package/dist/auth/core/components/role-editor-form/role-editor-form.js +2 -0
  4. package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.js +4 -0
  5. package/dist/better-auth/generators/fastify/seed-initial-user/templates/src/prisma/seed-initial-user.ts +3 -2
  6. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +2 -2
  7. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +2 -5
  8. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +7 -0
  9. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +21 -0
  10. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +7 -0
  11. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +14 -0
  12. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js +4 -0
  13. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.js +2 -1
  14. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.ts +3 -1
  15. package/dist/web/assets/{_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-3sV-KVGF.js → _virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-D2O_GHnM.js} +13 -13
  16. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-0m3QgjSy.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DPxqayXr.js} +1 -1
  17. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-QrOyqu9V.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.js-DGL7vJhO.js} +1 -1
  18. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-BTSgZGcl.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-IL2CfUDN.js} +30 -26
  19. package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-CJ027_El.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-olZgW088.js} +2 -2
  20. package/dist/web/assets/auth-BA-e6ORB.js +1 -0
  21. package/dist/web/assets/{common-BPbNs2A1.js → common-2qsch56z.js} +5 -5
  22. package/dist/web/assets/{common-Aq-HXybV.js → common-2sTWj7X2.js} +5 -5
  23. package/dist/web/assets/{common-CDrUdhRf.js → common-BJslFOaI.js} +3 -3
  24. package/dist/web/assets/{common-B8N9gx2s.js → common-BY8yEk1M.js} +3 -3
  25. package/dist/web/assets/{common-7-ZtKO5B.js → common-D-CUPN3f.js} +2 -2
  26. package/dist/web/assets/{common-B_XZ3l9w.js → common-DtVPzGI9.js} +2 -2
  27. package/dist/web/assets/{dist-D3CkiDKT.js → dist-DiQ4J8N0.js} +278 -98
  28. package/dist/web/assets/{get-auth-plugin-definition-D3ocnNxw.js → get-auth-plugin-definition-gCzcUybB.js} +2 -2
  29. package/dist/web/assets/{hostInit-D3RxwboF.js → hostInit-BPDI3Q4j.js} +1 -1
  30. package/dist/web/assets/{index-CozZxQl1.js → index-BocHdii2.js} +2 -2
  31. package/dist/web/assets/{mf-entry-bootstrap-0-069a3ab2.js → mf-entry-bootstrap-0-b337c957.js} +2 -2
  32. package/dist/web/assets/{model-utils-CYaLYwoX.js → model-utils-BoeoBppL.js} +38 -3
  33. package/dist/web/assets/{models-k-iaCft-.js → models-Bb8Sa9xa.js} +2 -2
  34. package/dist/web/assets/{models-BX4xFiEn.js → models-CExR9mVk.js} +2 -2
  35. package/dist/web/assets/{plugin-definition-CI1aEVGv.js → plugin-definition-BSgRuyCf.js} +2 -2
  36. package/dist/web/assets/{plugin-definition-BI565qFo.js → plugin-definition-DoLu-enC.js} +2 -2
  37. package/dist/web/assets/{styles-f4jHVv0S.js → styles-DWNihayS.js} +5 -5
  38. package/dist/web/assets/{virtualExposes-BHQhgLE-.js → virtualExposes-ZQ3-2Iup.js} +1 -1
  39. package/dist/web/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-aH8n-Nbe.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-joyeTHHj.js} +3 -3
  40. package/dist/web/assets/{virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-I_SxfvGj.js → virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-Cxtxsg7w.js} +13 -13
  41. package/dist/web/assets/{virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-BQ0UMKSv.js → virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-BzJkYZS3.js} +13 -13
  42. package/dist/web/assets/{web-nLSlkJy_.js → web-BWF6Fc7g.js} +3 -3
  43. package/dist/web/assets/{web-Dh6pUTrF.js → web-BbZNg5Ko.js} +7 -7
  44. package/dist/web/assets/{web-DCK_tLVa.js → web-CbftiK5A.js} +3 -3
  45. package/dist/web/assets/{web-Cn3uvuFs.js → web-DUQ-iyMI.js} +9 -7
  46. package/dist/web/assets/{web-BRvS0HRS.js → web-QvGnMr85.js} +7 -7
  47. package/dist/web/assets/{web-YXVJWeXy.js → web-pdVFZ-id.js} +3 -3
  48. package/dist/web/assets/{web-CkbTu31Q.js → web-sVeHdqQo.js} +8 -8
  49. package/dist/web/index.html +2 -2
  50. package/dist/web/remoteEntry.js +1 -1
  51. package/dist/web/remoteEntry.ssr.js +1 -1
  52. package/package.json +14 -13
  53. package/dist/web/assets/auth-D8BnFQKk.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { t as __commonJSMin } from "./rolldown-runtime-FZ4Itg2g.js";
2
- import { q as stringifyPrettyStable } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-BTSgZGcl.js";
2
+ import { q as stringifyPrettyStable } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.js-IL2CfUDN.js";
3
3
  import { n as __mf_0, t as __mfDefaultExport } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-Do-7VDVw.js";
4
- import { $ as getTag, A as isPlainObject$1, B as int32ArrayTag, C as createPluginFieldMap, D as validationHintRegistry, E as CASE_VALIDATORS, F as dataViewTag, G as regexpTag, H as mapTag, I as dateTag, J as symbolTag, K as setTag, L as float32ArrayTag, M as arrayBufferTag, N as arrayTag, O as isEqual, P as booleanTag, Q as uint8ClampedArrayTag, R as float64ArrayTag, S as createFieldMapSpec, T as runInPluginContext, U as numberTag, V as int8ArrayTag, W as objectTag, X as uint32ArrayTag, Y as uint16ArrayTag, Z as uint8ArrayTag, _ as createRefContextSlot, a as featureEntityType, b as expressionParserSpec, c as createEntityType, d as definitionSchemaWithSlots, et as getSymbols, f as withPlaceholderSlots, g as withRef, h as withEnt, i as createFeaturesSchema, j as argumentsTag, k as isEqualsSameValueZero, l as createDefinitionSchemaParserContext, m as definitionDefaultRegistry, n as FeatureUtils, nt as createPluginSpec, o as featureNameSchema, p as withDefault, q as stringTag, r as createFeatureSchema, s as DefinitionEntityType, t as ModelUtils, tt as sortBy, u as definitionSchema, v as createRefContextSlotMap, w as getPluginContext, x as definitionRefRegistry, y as RefExpressionParser, z as int16ArrayTag } from "./model-utils-CYaLYwoX.js";
4
+ import { $ as getTag, A as isPlainObject$1, B as int32ArrayTag, C as createPluginFieldMap, D as validationHintRegistry, E as CASE_VALIDATORS, F as dataViewTag, G as regexpTag, H as mapTag, I as dateTag, J as symbolTag, K as setTag, L as float32ArrayTag, M as arrayBufferTag, N as arrayTag, O as isEqual, P as booleanTag, Q as uint8ClampedArrayTag, R as float64ArrayTag, S as createFieldMapSpec, T as runInPluginContext, U as numberTag, V as int8ArrayTag, W as objectTag, X as uint32ArrayTag, Y as uint16ArrayTag, Z as uint8ArrayTag, _ as createRefContextSlot, a as featureEntityType, b as expressionParserSpec, c as createEntityType, d as definitionSchemaWithSlots, et as getSymbols, f as withPlaceholderSlots, g as withRef, h as withEnt, i as createFeaturesSchema, j as argumentsTag, k as isEqualsSameValueZero, l as createDefinitionSchemaParserContext, m as definitionDefaultRegistry, n as FeatureUtils, nt as createPluginSpec, o as featureNameSchema, p as withDefault, q as stringTag, r as createFeatureSchema, s as DefinitionEntityType, t as ModelUtils, tt as sortBy, u as definitionSchema, v as createRefContextSlotMap, w as getPluginContext, x as definitionRefRegistry, y as RefExpressionParser, z as int16ArrayTag } from "./model-utils-BoeoBppL.js";
5
5
  //#region ../../packages/utils/dist/arrays/assert-no-duplicates.js
6
6
  /**
7
7
  * Asserts that an array has no duplicate values based on an optional key function.
@@ -488,6 +488,17 @@ var ToposortUnknownNodeError = class extends Error {
488
488
  }
489
489
  };
490
490
  //#endregion
491
+ //#region ../../packages/utils/dist/toposort/node-index.js
492
+ /**
493
+ * Reads a node index that is in-bounds by construction, throwing if the graph
494
+ * bookkeeping is corrupt rather than silently producing a wrong ordering.
495
+ */
496
+ function atNodeIndex(items, index) {
497
+ const item = items[index];
498
+ if (item === void 0) throw new Error(`Toposort encountered an unknown node index: ${index}`);
499
+ return item;
500
+ }
501
+ //#endregion
491
502
  //#region ../../node_modules/.pnpm/tinyqueue@3.0.0/node_modules/tinyqueue/index.js
492
503
  var TinyQueue = class {
493
504
  constructor(data = [], compare = (a, b) => a < b ? -1 : a > b ? 1 : 0) {
@@ -564,7 +575,7 @@ function makeOutgoingEdges(nodes, edgeArr) {
564
575
  */
565
576
  function makeNodeInDegrees(outgoingEdgesMap, nodeLength) {
566
577
  const nodeInDegrees = Array.from({ length: nodeLength }, () => 0);
567
- for (const [, targets] of outgoingEdgesMap.entries()) for (const target of targets) nodeInDegrees[target]++;
578
+ for (const [, targets] of outgoingEdgesMap.entries()) for (const target of targets) nodeInDegrees[target] = atNodeIndex(nodeInDegrees, target) + 1;
568
579
  return nodeInDegrees;
569
580
  }
570
581
  /**
@@ -591,7 +602,7 @@ function detectCycle(nodes, visited, edges) {
591
602
  for (let i = 0; i < nodes.length; i++) if (!visited.has(i)) {
592
603
  path.length = 0;
593
604
  visitSet.clear();
594
- if (dfs(i)) return path.map((idx) => nodes[idx]);
605
+ if (dfs(i)) return path.map((idx) => atNodeIndex(nodes, idx));
595
606
  }
596
607
  return [];
597
608
  }
@@ -607,7 +618,7 @@ function toposort(nodes, edges, options = {}) {
607
618
  const { compareFunc } = options;
608
619
  const outgoingEdgesMap = makeOutgoingEdges(new Map(nodes.map((node, index) => [node, index])), edges);
609
620
  const nodeInDegrees = makeNodeInDegrees(outgoingEdgesMap, nodes.length);
610
- const zeroInDegreeQueue = compareFunc ? new TinyQueue([], (a, b) => compareFunc(nodes[a], nodes[b])) : [];
621
+ const zeroInDegreeQueue = compareFunc ? new TinyQueue([], (a, b) => compareFunc(atNodeIndex(nodes, a), atNodeIndex(nodes, b))) : [];
611
622
  for (const [i, nodeInDegree] of nodeInDegrees.entries()) if (nodeInDegree === 0) zeroInDegreeQueue.push(i);
612
623
  const result = [];
613
624
  const visited = /* @__PURE__ */ new Set();
@@ -615,11 +626,12 @@ function toposort(nodes, edges, options = {}) {
615
626
  const current = zeroInDegreeQueue.pop();
616
627
  if (current === void 0) break;
617
628
  visited.add(current);
618
- result.push(nodes[current]);
629
+ result.push(atNodeIndex(nodes, current));
619
630
  const outgoingEdges = outgoingEdgesMap.get(current);
620
631
  if (outgoingEdges) for (const target of outgoingEdges) {
621
- nodeInDegrees[target]--;
622
- if (nodeInDegrees[target] === 0) zeroInDegreeQueue.push(target);
632
+ const remainingInDegree = atNodeIndex(nodeInDegrees, target) - 1;
633
+ nodeInDegrees[target] = remainingInDegree;
634
+ if (remainingInDegree === 0) zeroInDegreeQueue.push(target);
623
635
  }
624
636
  }
625
637
  if (result.length !== nodes.length) throw new ToposortCyclicalDependencyError(detectCycle(nodes, visited, outgoingEdgesMap));
@@ -1237,8 +1249,9 @@ function byId$2(projectDefinition, id) {
1237
1249
  }
1238
1250
  function getBackendApp(projectDefinition) {
1239
1251
  const backendApps = projectDefinition.apps.filter((a) => a.type === "backend");
1240
- if (backendApps.length > 1 || backendApps.length === 0) throw new Error(`Only one backend app is supported and must exist`);
1241
- return backendApps[0];
1252
+ const backendApp = backendApps[0];
1253
+ if (backendApps.length > 1 || !backendApp) throw new Error(`Only one backend app is supported and must exist`);
1254
+ return backendApp;
1242
1255
  }
1243
1256
  /**
1244
1257
  * Given an app config, get the relative directory of the app
@@ -1908,7 +1921,7 @@ function walkNode$1(schema, data, path, visitors, entityCtx) {
1908
1921
  walkNode$1(children.right, data, path, visitors, entityCtx);
1909
1922
  break;
1910
1923
  }
1911
- for (let i = cleanups.length - 1; i >= 0; i--) cleanups[i]();
1924
+ for (const cleanup of cleanups.toReversed()) cleanup();
1912
1925
  if (entityRestore) entityRestore();
1913
1926
  }
1914
1927
  //#endregion
@@ -2182,7 +2195,9 @@ function resolveZodRefPayloadNames(payload, { skipReferenceNameResolution = fals
2182
2195
  return entity.name;
2183
2196
  }
2184
2197
  for (const id of orderedEntities) {
2185
- const { nameResolver, ...rest } = entitiesById[id];
2198
+ const entity = entitiesById[id];
2199
+ if (!entity) throw new Error(`Could not find entity for id: ${id}`);
2200
+ const { nameResolver, ...rest } = entity;
2186
2201
  if (typeof nameResolver === "string") resolvedEntitiesById.set(rest.id, {
2187
2202
  ...rest,
2188
2203
  name: nameResolver
@@ -2250,7 +2265,7 @@ function resolveReferencesToIds(payload) {
2250
2265
  if (typeof data !== "object" || data === null) throw new TypeError("Data is not an object");
2251
2266
  const entitiesById = groupBy$1(entities, (entity) => entity.id);
2252
2267
  const duplicateEntityIds = Object.values(entitiesById).filter((e) => e.length > 1);
2253
- if (duplicateEntityIds.length > 0) throw new Error(`Found multiple duplicate entity IDs: ${duplicateEntityIds.map((ents) => `${ents[0].id} (${ents.map((e) => e.path.join(".")).join(",")})`).join(", ")}`);
2268
+ if (duplicateEntityIds.length > 0) throw new Error(`Found multiple duplicate entity IDs: ${duplicateEntityIds.map((ents) => `${ents[0]?.id} (${ents.map((e) => e.path.join(".")).join(",")})`).join(", ")}`);
2254
2269
  if (uniq(entities.map((e) => e.id)).length !== entities.length) throw new Error(`Found duplicate entity IDs`);
2255
2270
  const entityTypes = uniq(entities.map((e) => e.type));
2256
2271
  const entityTypeNames = uniq(entityTypes.map((t) => t.name));
@@ -8454,7 +8469,7 @@ function parseAuthorizerExpression(input) {
8454
8469
  }
8455
8470
  if (program.body.length !== 1) throw new AuthorizerExpressionParseError("Expression must be a single expression statement, e.g. model.id === auth.userId", 0, input.length);
8456
8471
  const expressionStatement = program.body[0];
8457
- if (expressionStatement.type !== "ExpressionStatement") throw new AuthorizerExpressionParseError("Line must be an expression statement, e.g. model.id === auth.userId", expressionStatement);
8472
+ if (expressionStatement?.type !== "ExpressionStatement") throw new AuthorizerExpressionParseError("Line must be an expression statement, e.g. model.id === auth.userId", expressionStatement);
8458
8473
  const ast = convertNode(expressionStatement.expression);
8459
8474
  return {
8460
8475
  ast,
@@ -8564,7 +8579,7 @@ function parseModelRelationArg(arg, funcName) {
8564
8579
  function parseHasRoleArgs(node, funcName) {
8565
8580
  if (node.arguments.length === 1) {
8566
8581
  const arg = node.arguments[0];
8567
- if (arg.type !== "Literal" || typeof arg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} argument must be a string literal`, arg);
8582
+ if (arg?.type !== "Literal" || typeof arg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} argument must be a string literal`, arg ?? node);
8568
8583
  return {
8569
8584
  type: "hasRole",
8570
8585
  role: arg.value,
@@ -8576,7 +8591,7 @@ function parseHasRoleArgs(node, funcName) {
8576
8591
  const relationArg = node.arguments[0];
8577
8592
  const roleArg = node.arguments[1];
8578
8593
  const relation = parseModelRelationArg(relationArg, funcName);
8579
- if (roleArg.type !== "Literal" || typeof roleArg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} second argument must be a string literal (role name)`, roleArg);
8594
+ if (roleArg?.type !== "Literal" || typeof roleArg.value !== "string") throw new AuthorizerExpressionParseError(`${funcName} second argument must be a string literal (role name)`, roleArg ?? node);
8580
8595
  return {
8581
8596
  type: "nestedHasRole",
8582
8597
  relationName: relation.relationName,
@@ -8650,7 +8665,7 @@ function parseRelationFilterArgs(node, operator, funcName) {
8650
8665
  const relationArg = node.arguments[0];
8651
8666
  const conditionsArg = node.arguments[1];
8652
8667
  const relation = parseModelRelationArg(relationArg, funcName);
8653
- if (conditionsArg.type !== "ObjectExpression") throw new AuthorizerExpressionParseError(`${funcName} second argument must be an object literal (e.g., { userId: userId })`, conditionsArg);
8668
+ if (conditionsArg?.type !== "ObjectExpression") throw new AuthorizerExpressionParseError(`${funcName} second argument must be an object literal (e.g., { userId: userId })`, conditionsArg ?? node);
8654
8669
  if (conditionsArg.properties.length === 0) throw new AuthorizerExpressionParseError(`${funcName} conditions object must have at least one property`, conditionsArg);
8655
8670
  const conditions = [];
8656
8671
  for (const prop of conditionsArg.properties) {
@@ -8869,10 +8884,10 @@ function validateAuthorizerExpression(ast, modelContext, pluginStore, definition
8869
8884
  });
8870
8885
  },
8871
8886
  hasSomeRole(node) {
8872
- for (let i = 0; i < node.roles.length; i++) {
8873
- const role = node.roles[i];
8887
+ for (const [i, role] of node.roles.entries()) {
8874
8888
  const start = node.rolesStart[i];
8875
8889
  const end = node.rolesEnd[i];
8890
+ if (start === void 0 || end === void 0) continue;
8876
8891
  if (allRoleNames.has(role)) warnIfAutoAssignedRole(role, start, end);
8877
8892
  else warnings.push({
8878
8893
  message: `Role '${role}' is not defined in the project configuration. Available roles: ${[...allRoleNames].join(", ")}.`,
@@ -9204,13 +9219,15 @@ var AuthorizerExpressionParser = class extends RefExpressionParser {
9204
9219
  const foreignModel = modelById.get(relation.modelRef);
9205
9220
  if (foreignModel) {
9206
9221
  const foreignRoleByName = new Map(foreignModel.authorizer.roles.map((r) => [r.name, r]));
9207
- for (let i = 0; i < node.roles.length; i++) {
9208
- const foreignRole = foreignRoleByName.get(node.roles[i]);
9209
- if (foreignRole) deps.push({
9222
+ for (const [i, roleName] of node.roles.entries()) {
9223
+ const foreignRole = foreignRoleByName.get(roleName);
9224
+ const roleStart = node.rolesStart[i];
9225
+ const roleEnd = node.rolesEnd[i];
9226
+ if (foreignRole && roleStart !== void 0 && roleEnd !== void 0) deps.push({
9210
9227
  entityType: modelAuthorizerRoleEntityType,
9211
9228
  entityId: foreignRole.id,
9212
- start: node.rolesStart[i] + 1,
9213
- end: node.rolesEnd[i] - 1
9229
+ start: roleStart + 1,
9230
+ end: roleEnd - 1
9214
9231
  });
9215
9232
  }
9216
9233
  }
@@ -9266,9 +9283,9 @@ var AuthorizerExpressionParser = class extends RefExpressionParser {
9266
9283
  const modelPath = resolvedSlots.model;
9267
9284
  for (let len = modelPath.length; len > 0; len--) {
9268
9285
  let current = definition;
9269
- for (let i = 0; i < len; i++) {
9286
+ for (const part of modelPath.slice(0, len)) {
9270
9287
  if (current === null || current === void 0) break;
9271
- current = current[modelPath[i]];
9288
+ current = current[part];
9272
9289
  }
9273
9290
  if (current !== null && current !== void 0 && typeof current === "object" && "name" in current && typeof current.name === "string") return current;
9274
9291
  }
@@ -9556,21 +9573,7 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
9556
9573
  type: modelAuthorizerRoleEntityType,
9557
9574
  onDelete: "DELETE",
9558
9575
  parentSlot: modelSlot
9559
- })), []),
9560
- /**
9561
- * Whether this field is exposed as a `where` filter operand
9562
- * when the model's list query has where filtering enabled.
9563
- * Opt-in: an author must explicitly choose which exposed
9564
- * fields are filterable.
9565
- */
9566
- filterable: ctx.withDefault(__mf_0.boolean(), false),
9567
- /**
9568
- * Whether this field is exposed as an `orderBy` sort key
9569
- * when the model's list query has sorting enabled. Opt-in:
9570
- * an author must explicitly choose which exposed fields are
9571
- * sortable.
9572
- */
9573
- sortable: ctx.withDefault(__mf_0.boolean(), false)
9576
+ })), [])
9574
9577
  })).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([])),
9575
9578
  localRelations: __mf_0.array(__mf_0.object({
9576
9579
  ref: ctx.withRef({
@@ -9597,9 +9600,67 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
9597
9600
  onDelete: "DELETE",
9598
9601
  parentSlot: modelSlot
9599
9602
  })), []),
9600
- paginated: ctx.withDefault(__mf_0.boolean(), false)
9603
+ paginated: ctx.withDefault(__mf_0.boolean(), false),
9604
+ orderable: ctx.withDefault(__mf_0.boolean(), false)
9601
9605
  })).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([]))
9602
9606
  }), {}),
9607
+ /**
9608
+ * Sorting configuration shared by every surface that exposes an
9609
+ * `orderBy` argument — the list and connection queries, and `orderable`
9610
+ * list relations. Each surface opts in separately (`queries.orderBy.enabled`,
9611
+ * `objectType.foreignRelations[].orderable`) but they all sort by the
9612
+ * same fields.
9613
+ */
9614
+ orderBy: ctx.withDefault(__mf_0.object({
9615
+ /** Fields exposed as `orderBy` sort keys. */
9616
+ fields: __mf_0.array(ctx.withRef({
9617
+ type: modelScalarFieldEntityType,
9618
+ onDelete: "DELETE_PARENT",
9619
+ parentSlot: modelSlot
9620
+ })).apply(withDefault([])),
9621
+ /**
9622
+ * Applied when a caller supplies no `orderBy`. Ordered, so multi-key
9623
+ * defaults sort by the first entry first. Not restricted to
9624
+ * `fields` — a model can default to a sort key it does not expose.
9625
+ */
9626
+ defaultSort: __mf_0.array(__mf_0.object({
9627
+ ref: ctx.withRef({
9628
+ type: modelScalarFieldEntityType,
9629
+ onDelete: "DELETE_PARENT",
9630
+ parentSlot: modelSlot
9631
+ }),
9632
+ direction: ctx.withDefault(__mf_0.enum(["asc", "desc"]), "asc")
9633
+ })).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([]))
9634
+ }), {}),
9635
+ /**
9636
+ * Filtering configuration for surfaces that expose a `where` argument —
9637
+ * the list and connection queries (`queries.where.enabled`). Shaped like
9638
+ * `orderBy` so relation-level filtering can reuse it.
9639
+ */
9640
+ where: ctx.withDefault(__mf_0.object({
9641
+ /** Fields exposed as `where` filter operands. */
9642
+ fields: __mf_0.array(ctx.withRef({
9643
+ type: modelScalarFieldEntityType,
9644
+ onDelete: "DELETE_PARENT",
9645
+ parentSlot: modelSlot
9646
+ })).apply(withDefault([])) }), {}),
9647
+ /**
9648
+ * Page-size limits shared by every paginated surface — the list query,
9649
+ * the connection query, and paginated list relations. Both are optional;
9650
+ * leaving them unset keeps the offset surfaces unbounded and lets the
9651
+ * connection fall back to Pothos' own defaults (20 / 100). Setting only a
9652
+ * max also applies it as the default, since the cap on an offset surface
9653
+ * would otherwise be bypassed by omitting the argument.
9654
+ */
9655
+ pagination: ctx.withDefault(__mf_0.object({
9656
+ /** Page size applied when the caller requests no explicit size. */
9657
+ defaultPageSize: __mf_0.number().int().positive().optional(),
9658
+ /** Largest page a caller may request. */
9659
+ maxPageSize: __mf_0.number().int().positive().optional()
9660
+ }).refine(({ defaultPageSize, maxPageSize }) => defaultPageSize === void 0 || maxPageSize === void 0 || defaultPageSize <= maxPageSize, {
9661
+ message: "Default page size cannot exceed max page size",
9662
+ path: ["defaultPageSize"]
9663
+ }), {}),
9603
9664
  queries: ctx.withDefault(__mf_0.object({
9604
9665
  globalRoles: createRoleArray(ctx),
9605
9666
  instanceRoles: ctx.withDefault(__mf_0.array(ctx.withRef({
@@ -9608,13 +9669,23 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
9608
9669
  parentSlot: modelSlot
9609
9670
  })), []),
9610
9671
  get: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9672
+ /** Offset pagination (`skip`/`take`). */
9611
9673
  list: ctx.withDefault(__mf_0.object({
9612
9674
  enabled: ctx.withDefault(__mf_0.boolean(), false),
9613
- count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9614
- connection: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9615
- where: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9616
- orderBy: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
9617
- }), {})
9675
+ count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
9676
+ }), {}),
9677
+ /**
9678
+ * Cursor pagination (Relay connection). Independent of `list` — a
9679
+ * model may expose either, both, or neither.
9680
+ */
9681
+ connection: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9682
+ /**
9683
+ * `where`/`orderBy` arguments, shared by the list and connection
9684
+ * queries. The fields each may operate on live in the model-level
9685
+ * `where.fields` / `orderBy.fields` lists.
9686
+ */
9687
+ where: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
9688
+ orderBy: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
9618
9689
  }), {}),
9619
9690
  mutations: ctx.withDefault(__mf_0.object({
9620
9691
  create: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
@@ -10708,7 +10779,7 @@ var pluginMetadataSchema = __mf_0.object({
10708
10779
  function sortAndValidateMigrations(migrations, pluginKey) {
10709
10780
  const sortedMigrations = [...migrations].toSorted((a, b) => a.version - b.version);
10710
10781
  if (sortedMigrations.some((m) => m.version <= 0)) throw new Error(`All migrations for plugin ${pluginKey} must have a positive version`);
10711
- for (let i = 0; i < sortedMigrations.length - 1; i++) if (sortedMigrations[i].version === sortedMigrations[i + 1].version) throw new Error(`All migrations for plugin ${pluginKey} must have a unique version`);
10782
+ for (const [i, migration] of sortedMigrations.slice(0, -1).entries()) if (migration.version === sortedMigrations[i + 1]?.version) throw new Error(`All migrations for plugin ${pluginKey} must have a unique version`);
10712
10783
  return sortedMigrations;
10713
10784
  }
10714
10785
  /**
@@ -11155,7 +11226,7 @@ var EnumUtils = {
11155
11226
  function isScalarUnique(model, fieldId) {
11156
11227
  const { primaryKeyFieldRefs } = model.model;
11157
11228
  const { uniqueConstraints } = model.model;
11158
- return primaryKeyFieldRefs.length === 1 && primaryKeyFieldRefs.includes(fieldId) || uniqueConstraints.some((c) => c.fields.length === 1 && c.fields[0].fieldRef === fieldId);
11229
+ return primaryKeyFieldRefs.length === 1 && primaryKeyFieldRefs.includes(fieldId) || uniqueConstraints.some((c) => c.fields.length === 1 && c.fields[0]?.fieldRef === fieldId);
11159
11230
  }
11160
11231
  function areScalarsUnique(model, fieldIds) {
11161
11232
  const sortedFieldIds = [...fieldIds].toSorted();
@@ -11229,9 +11300,10 @@ function byId(projectDefinition, id) {
11229
11300
  }
11230
11301
  function byUniqueTypeOrThrow(projectDefinition, type) {
11231
11302
  const config = projectDefinition.libraries.filter((lib) => lib.type === type);
11232
- if (config.length === 0) throw new Error(`Unable to find library with type ${type}`);
11303
+ const library = config[0];
11304
+ if (!library) throw new Error(`Unable to find library with type ${type}`);
11233
11305
  if (config.length > 1) throw new Error(`Multiple libraries with type ${type} found and only one is expected (${config.map((lib) => lib.name).join(", ")})`);
11234
- return config[0];
11306
+ return library;
11235
11307
  }
11236
11308
  /**
11237
11309
  * Given a library config, get the relative directory of the library
@@ -11487,7 +11559,7 @@ function walkNode(schema, path, visitors, visited) {
11487
11559
  walkNode(children.right, path, visitors, visited);
11488
11560
  break;
11489
11561
  }
11490
- for (let i = cleanups.length - 1; i >= 0; i--) cleanups[i]();
11562
+ for (const cleanup of cleanups.toReversed()) cleanup();
11491
11563
  visited.delete(schema);
11492
11564
  }
11493
11565
  /**
@@ -11934,6 +12006,7 @@ function transformJsonPath(data, path, transformFn) {
11934
12006
  const navigateAndTransform = (current, parts) => {
11935
12007
  if (parts.length === 0) return transformFn(structuredClone(current));
11936
12008
  const [currentPart, ...remainingParts] = parts;
12009
+ if (currentPart === void 0) return transformFn(structuredClone(current));
11937
12010
  if (currentPart === "*") {
11938
12011
  if (!Array.isArray(current)) throw new TypeError(`Expected an array at ${pathParts.join(".")}`);
11939
12012
  return current.map((item) => navigateAndTransform(item, remainingParts));
@@ -11954,7 +12027,7 @@ function renameObjectKeysTransform(renames) {
11954
12027
  return (data) => {
11955
12028
  if (data === null) return null;
11956
12029
  if (typeof data !== "object") throw new TypeError(`Expected an object, got ${typeof data}`);
11957
- return Object.fromEntries(Object.entries(data).map(([key, value]) => [renames[key] || key, value]));
12030
+ return Object.fromEntries(Object.entries(data).map(([key, value]) => [renames[key] ?? key, value]));
11958
12031
  };
11959
12032
  }
11960
12033
  //#endregion
@@ -15193,10 +15266,13 @@ var migration012MigrateAuthConfig = createSchemaMigration({
15193
15266
  version: "0.1.0",
15194
15267
  config: auth0Config
15195
15268
  });
15196
- else plugins[pluginIndex] = {
15197
- ...plugins[pluginIndex],
15198
- config: auth0Config
15199
- };
15269
+ else {
15270
+ const existingPlugin = plugins[pluginIndex];
15271
+ if (existingPlugin) plugins[pluginIndex] = {
15272
+ ...existingPlugin,
15273
+ config: auth0Config
15274
+ };
15275
+ }
15200
15276
  return {
15201
15277
  ...config,
15202
15278
  auth: void 0,
@@ -15375,7 +15451,7 @@ var migration018CrudNameFieldRef = createSchemaMigration({
15375
15451
  selectedField ??= model.model.fields[0];
15376
15452
  return {
15377
15453
  ...section,
15378
- nameFieldRef: selectedField.name
15454
+ nameFieldRef: selectedField?.name ?? ""
15379
15455
  };
15380
15456
  });
15381
15457
  return {
@@ -15523,13 +15599,16 @@ var migration021MigrateBullmqToPlugin = createSchemaMigration({
15523
15599
  version: "1.0.0",
15524
15600
  config: { implementationPluginKey: "baseplate-dev_plugin-queue_bullmq" }
15525
15601
  });
15526
- else plugins[queuePluginIndex] = {
15527
- ...plugins[queuePluginIndex],
15528
- config: {
15529
- ...plugins[queuePluginIndex].config,
15530
- implementationPluginKey: "baseplate-dev_plugin-queue_bullmq"
15531
- }
15532
- };
15602
+ else {
15603
+ const existingQueuePlugin = plugins[queuePluginIndex];
15604
+ if (existingQueuePlugin) plugins[queuePluginIndex] = {
15605
+ ...existingQueuePlugin,
15606
+ config: {
15607
+ ...existingQueuePlugin.config,
15608
+ implementationPluginKey: "baseplate-dev_plugin-queue_bullmq"
15609
+ }
15610
+ };
15611
+ }
15533
15612
  if (plugins.findIndex((p) => p.id === bullmqPluginId) === -1) plugins.push({
15534
15613
  id: bullmqPluginId,
15535
15614
  name: "bullmq",
@@ -15964,6 +16043,101 @@ var migration031UuidDefaultGeneration = createSchemaMigration({
15964
16043
  //#region ../../packages/project-builder-lib/dist/migrations/migration-032-web-app-plugin-data.js
15965
16044
  var STORAGE_PLUGIN_KEY = "baseplate-dev_plugin-storage_storage";
15966
16045
  var NOTIFICATIONS_PLUGIN_KEY = "baseplate-dev_plugin-notifications_notifications";
16046
+ /**
16047
+ * Moves hardcoded per-app opt-in flags off the core web app config and into the
16048
+ * generic `pluginData[pluginKey]` bag introduced by the web app schema extension
16049
+ * point.
16050
+ *
16051
+ * - `includeUploadComponents` -> `pluginData['<storage>'].includeUploadComponents`
16052
+ * - `includeNotifications` -> `pluginData['<notifications>'].includeNotifications`
16053
+ * - `includeAuth` -> dropped (it was never read by any generator)
16054
+ *
16055
+ * Only `true` values are relocated so existing opt-ins are preserved; the flags
16056
+ * are always stripped from the core config.
16057
+ */
16058
+ var migration032WebAppPluginData = createSchemaMigration({
16059
+ version: 32,
16060
+ name: "webAppPluginData",
16061
+ description: "Move includeUploadComponents/includeNotifications into web app pluginData and drop includeAuth",
16062
+ migrate: (config) => {
16063
+ const apps = config.apps?.map((app) => {
16064
+ if (app.type !== "web") return app;
16065
+ const { includeAuth: _includeAuth, includeUploadComponents, includeNotifications, pluginData: existingPluginData, ...rest } = app;
16066
+ const pluginData = { ...existingPluginData };
16067
+ if (includeUploadComponents) pluginData[STORAGE_PLUGIN_KEY] = {
16068
+ ...pluginData[STORAGE_PLUGIN_KEY],
16069
+ includeUploadComponents: true
16070
+ };
16071
+ if (includeNotifications) pluginData[NOTIFICATIONS_PLUGIN_KEY] = {
16072
+ ...pluginData[NOTIFICATIONS_PLUGIN_KEY],
16073
+ includeNotifications: true
16074
+ };
16075
+ return Object.keys(pluginData).length > 0 ? {
16076
+ ...rest,
16077
+ pluginData
16078
+ } : rest;
16079
+ });
16080
+ return {
16081
+ ...config,
16082
+ apps: apps ?? []
16083
+ };
16084
+ }
16085
+ });
16086
+ //#endregion
16087
+ //#region ../../packages/project-builder-lib/dist/migrations/migration-033-hoist-sort-filter-config.js
16088
+ /**
16089
+ * Hoists the per-field `sortable`/`filterable` flags off
16090
+ * `graphql.objectType.fields[]` into the shared `graphql.orderBy.fields` and
16091
+ * `graphql.where.fields` lists.
16092
+ *
16093
+ * Both flags gate vocabulary used by more than one surface — the list query and
16094
+ * `orderable` list relations — so they belong beside the other shared sort and
16095
+ * filter configuration rather than under the object type. The per-surface
16096
+ * enable switches (`queries.list.orderBy.enabled`, `queries.list.where.enabled`)
16097
+ * are unaffected.
16098
+ */
16099
+ var migration033HoistSortFilterConfig = createSchemaMigration({
16100
+ version: 33,
16101
+ name: "hoistSortFilterConfig",
16102
+ description: "Hoist sortable/filterable field flags into shared graphql.orderBy and graphql.where config",
16103
+ migrate: (config) => {
16104
+ if (!config.models) return config;
16105
+ const refsWhere = (fields, key) => fields.filter((field) => field[key] === true).map((field) => field.ref).filter((ref) => ref !== void 0);
16106
+ return {
16107
+ ...config,
16108
+ models: config.models.map((model) => {
16109
+ const { graphql } = model;
16110
+ if (!graphql?.objectType?.fields) return model;
16111
+ const { fields } = graphql.objectType;
16112
+ return {
16113
+ ...model,
16114
+ graphql: {
16115
+ ...graphql,
16116
+ objectType: {
16117
+ ...graphql.objectType,
16118
+ fields: fields.map((field) => omit(field, ["sortable", "filterable"]))
16119
+ },
16120
+ orderBy: {
16121
+ ...graphql.orderBy,
16122
+ fields: refsWhere(fields, "sortable")
16123
+ },
16124
+ where: {
16125
+ ...graphql.where,
16126
+ fields: refsWhere(fields, "filterable")
16127
+ }
16128
+ }
16129
+ };
16130
+ })
16131
+ };
16132
+ }
16133
+ });
16134
+ //#endregion
16135
+ //#region ../../packages/project-builder-lib/dist/migrations/migration-034-hoist-connection-config.js
16136
+ var HOISTED_KEYS = [
16137
+ "connection",
16138
+ "where",
16139
+ "orderBy"
16140
+ ];
15967
16141
  //#endregion
15968
16142
  //#region ../../packages/project-builder-lib/dist/migrations/index.js
15969
16143
  var SCHEMA_MIGRATIONS = [
@@ -15994,31 +16168,36 @@ var SCHEMA_MIGRATIONS = [
15994
16168
  migration029AdminRoleAndAutoAssigned,
15995
16169
  migration030RemoveThemeHoverColors,
15996
16170
  migration031UuidDefaultGeneration,
16171
+ migration032WebAppPluginData,
16172
+ migration033HoistSortFilterConfig,
15997
16173
  createSchemaMigration({
15998
- version: 32,
15999
- name: "webAppPluginData",
16000
- description: "Move includeUploadComponents/includeNotifications into web app pluginData and drop includeAuth",
16174
+ version: 34,
16175
+ name: "hoistConnectionConfig",
16176
+ description: "Hoist connection, where, and orderBy toggles out of graphql.queries.list into graphql.queries",
16001
16177
  migrate: (config) => {
16002
- const apps = config.apps?.map((app) => {
16003
- if (app.type !== "web") return app;
16004
- const { includeAuth: _includeAuth, includeUploadComponents, includeNotifications, pluginData: existingPluginData, ...rest } = app;
16005
- const pluginData = { ...existingPluginData };
16006
- if (includeUploadComponents) pluginData[STORAGE_PLUGIN_KEY] = {
16007
- ...pluginData[STORAGE_PLUGIN_KEY],
16008
- includeUploadComponents: true
16009
- };
16010
- if (includeNotifications) pluginData[NOTIFICATIONS_PLUGIN_KEY] = {
16011
- ...pluginData[NOTIFICATIONS_PLUGIN_KEY],
16012
- includeNotifications: true
16013
- };
16014
- return Object.keys(pluginData).length > 0 ? {
16015
- ...rest,
16016
- pluginData
16017
- } : rest;
16018
- });
16178
+ if (!config.models) return config;
16019
16179
  return {
16020
16180
  ...config,
16021
- apps: apps ?? []
16181
+ models: config.models.map((model) => {
16182
+ const { graphql } = model;
16183
+ const list = graphql?.queries?.list;
16184
+ if (!graphql?.queries || !list) return model;
16185
+ const hoisted = Object.fromEntries(HOISTED_KEYS.filter((key) => list[key] !== void 0).map((key) => [key, key === "connection" && list.enabled !== true ? {
16186
+ ...list[key],
16187
+ enabled: false
16188
+ } : list[key]]));
16189
+ return {
16190
+ ...model,
16191
+ graphql: {
16192
+ ...graphql,
16193
+ queries: {
16194
+ ...graphql.queries,
16195
+ ...hoisted,
16196
+ list: omit(list, HOISTED_KEYS)
16197
+ }
16198
+ }
16199
+ };
16200
+ })
16022
16201
  };
16023
16202
  }
16024
16203
  })
@@ -17210,12 +17389,10 @@ function convertColorNameToOklch(color) {
17210
17389
  const fixedColorMapping = FIXED_COLOR_MAPPINGS[color];
17211
17390
  if (fixedColorMapping) return fixedColorMapping;
17212
17391
  const colorComponents = color.split("-");
17213
- if (colorComponents.length === 2) {
17214
- const paletteName = colorComponents[0];
17215
- if (Object.prototype.hasOwnProperty.call(COLOR_PALETTES, paletteName)) {
17216
- const shade = COLOR_PALETTES[colorComponents[0]][colorComponents[1]];
17217
- if (shade) return shade;
17218
- }
17392
+ const [paletteName, shadeName] = colorComponents;
17393
+ if (colorComponents.length === 2 && paletteName !== void 0 && shadeName !== void 0 && Object.prototype.hasOwnProperty.call(COLOR_PALETTES, paletteName)) {
17394
+ const shade = COLOR_PALETTES[paletteName][shadeName];
17395
+ if (shade) return shade;
17219
17396
  }
17220
17397
  return color;
17221
17398
  }
@@ -17305,10 +17482,12 @@ var DefinitionDiffKeyedArrayField = class extends DefinitionDiffField {
17305
17482
  case "add":
17306
17483
  items.push(item);
17307
17484
  break;
17308
- case "update":
17309
- if (index === -1) throw new Error(`Cannot apply patch. Item with key "${key}" not found.`);
17310
- items[index] = toMerged(items[index], item);
17485
+ case "update": {
17486
+ const existingItem = items[index];
17487
+ if (index === -1 || !existingItem) throw new Error(`Cannot apply patch. Item with key "${key}" not found.`);
17488
+ items[index] = toMerged(existingItem, item);
17311
17489
  break;
17490
+ }
17312
17491
  case "remove":
17313
17492
  if (index !== -1) items.splice(index, 1);
17314
17493
  break;
@@ -17334,8 +17513,9 @@ var DefinitionDiffReplacementField = class extends DefinitionDiffField {
17334
17513
  return [];
17335
17514
  }
17336
17515
  apply(current, diff) {
17337
- if (diff.length === 0) return current;
17338
- return diff[0].item;
17516
+ const firstOperation = diff[0];
17517
+ if (!firstOperation) return current;
17518
+ return firstOperation.item;
17339
17519
  }
17340
17520
  getActionVerb(isNew) {
17341
17521
  return isNew ? "set" : "replaced";
@@ -18270,4 +18450,4 @@ function generateDefaultTheme() {
18270
18450
  //#endregion
18271
18451
  export { AVAILABLE_FLAGS, AppUtils, AuthorizerExpressionParseError, AuthorizerExpressionParser, BUILT_IN_ADMIN_CRUD_ACTIONS, BUILT_IN_ADMIN_CRUD_COLUMNS, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DEFAULT_APPS_FOLDER, DEFAULT_LIBRARIES_FOLDER, DefinitionDiffArrayIncludesField, DefinitionDiffKeyedArrayField, DefinitionDiffReplacementField, DefinitionEntityType, EnumUtils, FIXED_COLOR_MAPPINGS, FeatureUtils, LibraryCompiler, LibraryUtils, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PackageCompiler, PluginSpecStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, RefExpressionParser, SCALAR_FIELD_TYPES, SCHEMA_MIGRATIONS, SchemaMigrationError, THEME_COLORS, THEME_COLOR_KEYS, VALIDATORS, adminCrudActionCompilerSpec, adminCrudActionEntityType, adminCrudActionSpec, adminCrudColumnCompilerSpec, adminCrudColumnEntityType, adminCrudColumnSpec, adminCrudEmbeddedFormEntityType, adminCrudEmbeddedInputType, adminCrudEmbeddedLocalInputType, adminCrudInputCompilerSpec, adminCrudInputEntityType, adminCrudInputSpec, adminCrudSectionColumnEntityType, adminSectionEntityType, appCompilerSpec, appEntityType, applyDefinitionDiff, applyDefinitionFixes, applyExpressionRenames, applyMergedDefinition, assignEntityIds, authConfigSpec, authModelsSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudActionSchema, baseAdminCrudColumnSchema, baseAdminCrudInputSchema, baseAppSchema, baseAppValidators, baseLibrarySchema, baseLibraryValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, buildEnabledPluginFqnSet, buildModelExpressionContext, buildPackageName, checkUniqueField, checkUniqueFieldValue, cleanDefaultValues, collectDefinitionIssues, collectEntityArrays, collectEntityMetadata, collectExpressionIssues, collectFieldIssues, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudActionSchema, createAdminCrudActionType, createAdminCrudColumnCompiler, createAdminCrudColumnSchema, createAdminCrudColumnType, createAdminCrudDeleteActionSchema, createAdminCrudEditActionSchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignColumnSchema, createAdminCrudForeignInputSchema, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTextColumnSchema, createAdminCrudTextInputSchema, createAppCompiler, createAppEntryType, createAppSchema, createAuthorizerRoleSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionDiff, createDefinitionDiffConfig, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, createEmbeddedRelationTransformerSchema, createEntity, createEntityIssue, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createExpressionParserRef, createFeatureSchema, createFeaturesSchema, createFieldMapSpec, createIssueFixSetter, createLibraryWebConfig, createModelAuthorizerSchema, createModelBaseSchema, createModelGraphqlSchema, createModelIndexSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerType, createModelUniqueConstraintSchema, createPluginFieldMap, createPluginImplementationStoreWithNewPlugins, createPluginModelSyncChecker, createPluginModule, createPluginSpec, createPluginSpecStore, createPluginWithConfigSchema, createPluginsSchema, createProjectDefinitionSchema, createProjectDefinitionSchemaWithContext, createRefContextSlot, createRefContextSlotMap, createRefSchemaCollector, createRefSchemaVisitor, createSettingsSchema, createTemplateExtractorSchema, createThemeSchema, createTransformerSchema, createWebAdminSectionSchema, createWebAppSchema, definitionFieldIssueRegistry, definitionFixRegistry, definitionIssueCheckerSpec, definitionRefRegistry, definitionSchema, definitionSchemaWithSlots, deleteEntity, deserializeSchemaWithTransformedReferences, diffDefinition, diffSerializedDefinitions, expressionParserCoreModule, expressionParserSpec, extractDefinitionRefs, featureEntityType, featureNameSchema, findDiscriminatedUnionMatch, findOrphanedUnionItems, fixDefinitionRefs, fixRefDeletions, formatOklch, generalSettingsSchema, generateCssBlockFromThemeColors, generateCssFromThemeConfig, generateDefaultTheme, generateThemeColorsFromShade, getBackendRelativePath, getDefaultThemeColorFromShade, getEntity, getEntityName, getLatestMigrationVersion, getManagedPluginsForPlugin, getMergeRule, getPackageDirectory, getPluginContext, getPluginDependencies, getPluginMetadataByKey, getPluginMetadataByKeyOrThrow, getUnmetPluginDependencies, getWebAppPluginData, infrastructureSettingsSchema, initializePlugins, isMigrateableProjectDefinition, libraryEntityType, libraryTypeSpec, listEntities, mergeDataWithSchema, mergeDefinition, mergeDefinitionContainer, modelAuthorizerRoleEntityType, modelEntityType, modelEnumEntityType, modelEnumValueEntityType, modelForeignRelationEntityType, modelIndexEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelTransformerCompilerSpec, modelTransformerEntityType, modelTransformerSpec, modelUniqueConstraintEntityType, monorepoSettingsSchema, nodeLibraryDefinitionSchemaEntry, normalizeOklch, oklchColor, paletteSchema, palettesSchema, parseAuthorizerExpression, parseOklch, parseProjectDefinitionWithContext, parseProjectDefinitionWithReferences, partitionIssuesBySeverity, patchEntity, pluginAppCompiler, pluginConfigSpec, pluginDefaultsSpec, pluginDependencySchema, pluginEntityType, pluginMetadataSchema, pluginSpecDependencySchema, pluginSpecSupportSchema, previewIssueFix, resolveIssuePath, rootCompilerSpec, runInPluginContext, runPluginMigrations, runSchemaMigrations, serializeSchema, serializeSchemaFromRefPayload, sortEntityArrays, stripEmptyGeneratorChildren, stripUndefinedValues, themeColorSchema, transformDataWithSchema, undefinedIfEmpty, undefinedIfFalsy, updateEntity, validateAuthorizerExpression, validatePluginDependencyGraph, visitAuthorizerExpression, walkDataWithSchema, walkSchemaStructure, webAppEntryType, webAppSchemaExtensionSpec, webConfigSpec, withByKeyMergeRule, withDefault, withEnt, withFix, withIssueChecker, withMergeRule, withPlaceholderSlots, withRef };
18272
18452
 
18273
- //# sourceMappingURL=dist-D3CkiDKT.js.map
18453
+ //# sourceMappingURL=dist-DiQ4J8N0.js.map
@@ -1,4 +1,4 @@
1
- import { f as __mf_26 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-0m3QgjSy.js";
1
+ import { f as __mf_26 } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.js-DPxqayXr.js";
2
2
  //#region src/auth/utils/get-auth-plugin-definition.ts
3
3
  /**
4
4
  * Get the auth plugin definition from the project definition.
@@ -11,4 +11,4 @@ function getAuthPluginDefinition(definition) {
11
11
  //#endregion
12
12
  export { getAuthPluginDefinition as t };
13
13
 
14
- //# sourceMappingURL=get-auth-plugin-definition-D3ocnNxw.js.map
14
+ //# sourceMappingURL=get-auth-plugin-definition-gCzcUybB.js.map
@@ -45,7 +45,7 @@ async function initHost() {
45
45
  };
46
46
  const runtime = await (await __vitePreload(() => import("../remoteEntry.js"), [], import.meta.url)).init();
47
47
  const { usedShared } = await __vitePreload(async () => {
48
- const { usedShared } = await import("./_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-3sV-KVGF.js");
48
+ const { usedShared } = await import("./_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-D2O_GHnM.js");
49
49
  return { usedShared };
50
50
  }, [], import.meta.url);
51
51
  const __mfNormalizeRuntimeShare = (mod) => {