@baseplate-dev/plugin-auth 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth0/constants/model-names.d.ts +4 -0
- package/dist/auth0/constants/model-names.d.ts.map +1 -0
- package/dist/auth0/constants/model-names.js +4 -0
- package/dist/auth0/constants/model-names.js.map +1 -0
- package/dist/auth0/core/common.d.ts.map +1 -1
- package/dist/auth0/core/common.js +3 -5
- package/dist/auth0/core/common.js.map +1 -1
- package/dist/auth0/core/components/auth0-definition-editor.d.ts.map +1 -1
- package/dist/auth0/core/components/auth0-definition-editor.js +11 -15
- package/dist/auth0/core/components/auth0-definition-editor.js.map +1 -1
- package/dist/auth0/core/node.d.ts.map +1 -1
- package/dist/auth0/core/node.js +2 -4
- package/dist/auth0/core/node.js.map +1 -1
- package/dist/auth0/core/schema/models.d.ts +2 -4
- package/dist/auth0/core/schema/models.d.ts.map +1 -1
- package/dist/auth0/core/schema/models.js +3 -2
- package/dist/auth0/core/schema/models.js.map +1 -1
- package/dist/auth0/core/schema/plugin-definition.d.ts +1 -18
- package/dist/auth0/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/auth0/core/schema/plugin-definition.js +2 -9
- package/dist/auth0/core/schema/plugin-definition.js.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts +0 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.d.ts.map +1 -1
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js +3 -3
- package/dist/auth0/generators/fastify/auth0-module/auth0-module.generator.js.map +1 -1
- package/dist/auth0/generators/react/auth0-apollo/auth0-apollo.generator.d.ts.map +1 -1
- package/dist/auth0/generators/react/react-auth0/react-auth0.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js +1 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +1 -1
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +1 -1
- package/dist/local-auth/admin/schema/manage-role-action.d.ts +3 -4
- package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +1 -1
- package/dist/local-auth/admin/schema/reset-password-action.d.ts +3 -4
- package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +1 -1
- package/dist/local-auth/admin/schema/roles-column.d.ts +3 -4
- package/dist/local-auth/admin/schema/roles-column.d.ts.map +1 -1
- package/dist/local-auth/admin/web.d.ts.map +1 -1
- package/dist/local-auth/admin/web.js +8 -13
- package/dist/local-auth/admin/web.js.map +1 -1
- package/dist/local-auth/constants/model-names.d.ts +19 -0
- package/dist/local-auth/constants/model-names.d.ts.map +1 -0
- package/dist/local-auth/constants/model-names.js +19 -0
- package/dist/local-auth/constants/model-names.js.map +1 -0
- package/dist/local-auth/core/common.d.ts.map +1 -1
- package/dist/local-auth/core/common.js +3 -5
- package/dist/local-auth/core/common.js.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +1 -1
- package/dist/local-auth/core/components/local-auth-definition-editor.js +10 -16
- package/dist/local-auth/core/components/local-auth-definition-editor.js.map +1 -1
- package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js +3 -3
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js +1 -0
- package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +0 -2
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +5 -6
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +5 -5
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +6 -6
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js.map +1 -1
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js +4 -24
- package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js.map +1 -1
- package/dist/local-auth/core/node.d.ts.map +1 -1
- package/dist/local-auth/core/node.js +0 -3
- package/dist/local-auth/core/node.js.map +1 -1
- package/dist/local-auth/core/schema/models.d.ts +2 -7
- package/dist/local-auth/core/schema/models.d.ts.map +1 -1
- package/dist/local-auth/core/schema/models.js +9 -8
- package/dist/local-auth/core/schema/models.js.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.d.ts +0 -28
- package/dist/local-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/local-auth/core/schema/plugin-definition.js +1 -19
- package/dist/local-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/placeholder-auth/constants/model-names.d.ts +4 -0
- package/dist/placeholder-auth/constants/model-names.d.ts.map +1 -0
- package/dist/placeholder-auth/constants/model-names.js +4 -0
- package/dist/placeholder-auth/constants/model-names.js.map +1 -0
- package/dist/placeholder-auth/core/common.d.ts.map +1 -1
- package/dist/placeholder-auth/core/common.js +3 -5
- package/dist/placeholder-auth/core/common.js.map +1 -1
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +1 -1
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js +12 -16
- package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +1 -1
- package/dist/placeholder-auth/core/schema/models.d.ts +2 -4
- package/dist/placeholder-auth/core/schema/models.d.ts.map +1 -1
- package/dist/placeholder-auth/core/schema/models.js +3 -2
- package/dist/placeholder-auth/core/schema/models.js.map +1 -1
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts +2 -18
- package/dist/placeholder-auth/core/schema/plugin-definition.d.ts.map +1 -1
- package/dist/placeholder-auth/core/schema/plugin-definition.js +2 -9
- package/dist/placeholder-auth/core/schema/plugin-definition.js.map +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-Dd4OxG3J.js → __federation_expose_auth0CoreCommon-zQL4xAil.js} +5 -11
- package/dist/web/assets/__federation_expose_auth0CoreCommon-zQL4xAil.js.map +1 -0
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-C_de43BE.js → __federation_expose_auth0CoreWeb-BQJHnPPM.js} +26 -41
- package/dist/web/assets/__federation_expose_auth0CoreWeb-BQJHnPPM.js.map +1 -0
- package/dist/web/assets/{__federation_expose_authCoreCommon-BAF30G9e.js → __federation_expose_authCoreCommon-hEy5zrff.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-BAF30G9e.js.map → __federation_expose_authCoreCommon-hEy5zrff.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-B26BFarY.js → __federation_expose_authCoreWeb-UlIYc0cq.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-B26BFarY.js.map → __federation_expose_authCoreWeb-UlIYc0cq.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-DLbuTALX.js → __federation_expose_local-authAdminCommon-DyMAwXJ7.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-DLbuTALX.js.map → __federation_expose_local-authAdminCommon-DyMAwXJ7.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-bT8Js4V6.js → __federation_expose_local-authAdminWeb-B6PdHqzu.js} +7 -25
- package/dist/web/assets/__federation_expose_local-authAdminWeb-B6PdHqzu.js.map +1 -0
- package/dist/web/assets/__federation_expose_local-authCoreCommon-BtQr1I4Q.js +27 -0
- package/dist/web/assets/__federation_expose_local-authCoreCommon-BtQr1I4Q.js.map +1 -0
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-DKVkRzEo.js → __federation_expose_local-authCoreWeb-DsK2Dfpr.js} +33 -87
- package/dist/web/assets/__federation_expose_local-authCoreWeb-DsK2Dfpr.js.map +1 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-BZy2rgIt.js +26 -0
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-BZy2rgIt.js.map +1 -0
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-tw3UiMLM.js → __federation_expose_placeholder-authCoreWeb-OEDsMJ_b.js} +28 -43
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-OEDsMJ_b.js.map +1 -0
- package/dist/web/assets/{__federation_fn_import-B_QMlAIe.js → __federation_fn_import-v1QB_w7U.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-B_QMlAIe.js.map → __federation_fn_import-v1QB_w7U.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-DdrB9jrq.js → web-Cb2knzA_.js} +6 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-Cb2knzA_.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-BvG5Zcxb.js → project-builder-lib-CJdJXC1f.js} +25 -98
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CJdJXC1f.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-CjIA8Av2.js → ui-components-CrL3nReP.js} +6 -6
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-CrL3nReP.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-LpAGNm5N.js → utils-CJgKqZu4.js} +173 -4
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-CJgKqZu4.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CEcQRiV1.js → react-router-DdszvTPE.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-CEcQRiV1.js.map → react-router-DdszvTPE.js.map} +1 -1
- package/dist/web/assets/{__federation_shared_zod-BK7IELHt.js → __federation_shared_zod-BGUJlEOa.js} +213 -302
- package/dist/web/assets/__federation_shared_zod-BGUJlEOa.js.map +1 -0
- package/dist/web/assets/{get-auth-plugin-definition-BrApugiB.js → get-auth-plugin-definition-Qo_0oJFS.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-BrApugiB.js.map → get-auth-plugin-definition-Qo_0oJFS.js.map} +1 -1
- package/dist/web/assets/{index-DAcyTb_o.js → index-KXYo3x9T.js} +2 -2
- package/dist/web/assets/{index-DAcyTb_o.js.map → index-KXYo3x9T.js.map} +1 -1
- package/dist/web/assets/{index.esm-BFQQfZNu.js → index.esm-BsVb2e-m.js} +2 -2
- package/dist/web/assets/{index.esm-BFQQfZNu.js.map → index.esm-BsVb2e-m.js.map} +1 -1
- package/dist/web/assets/{model-merger-boZDknXa.js → model-merger-BeuqGz00.js} +35 -59
- package/dist/web/assets/model-merger-BeuqGz00.js.map +1 -0
- package/dist/web/assets/model-names-CEoSIalq.js +21 -0
- package/dist/web/assets/model-names-CEoSIalq.js.map +1 -0
- package/dist/web/assets/plugin-definition-C1FCvorP.js +16 -0
- package/dist/web/assets/plugin-definition-C1FCvorP.js.map +1 -0
- package/dist/web/assets/plugin-definition-CeI3VlQi.js +31 -0
- package/dist/web/assets/plugin-definition-CeI3VlQi.js.map +1 -0
- package/dist/web/assets/plugin-definition-CpmhXG71.js +16 -0
- package/dist/web/assets/plugin-definition-CpmhXG71.js.map +1 -0
- package/dist/web/assets/{plugin-definition-CyqVivit.js → plugin-definition-p6J3lSNe.js} +2 -2
- package/dist/web/assets/{plugin-definition-CyqVivit.js.map → plugin-definition-p6J3lSNe.js.map} +1 -1
- package/dist/web/assets/{react-CKjL52W8.js → react-BUJ02Ozg.js} +2 -2
- package/dist/web/assets/{react-CKjL52W8.js.map → react-BUJ02Ozg.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +20 -20
- package/dist/web/assets/{style-BhUCMIWI.css → style-Cu4lNOci.css} +0 -18
- package/dist/web/assets/{styles-CyTaudys.js → styles-DMYfkBXJ.js} +3 -3
- package/dist/web/assets/{styles-CyTaudys.js.map → styles-DMYfkBXJ.js.map} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +14 -14
- package/dist/web/assets/__federation_expose_auth0CoreCommon-Dd4OxG3J.js.map +0 -1
- package/dist/web/assets/__federation_expose_auth0CoreWeb-C_de43BE.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authAdminWeb-bT8Js4V6.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreCommon-D9tovFrj.js +0 -32
- package/dist/web/assets/__federation_expose_local-authCoreCommon-D9tovFrj.js.map +0 -1
- package/dist/web/assets/__federation_expose_local-authCoreWeb-DKVkRzEo.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-D1fszuKq.js +0 -32
- package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-D1fszuKq.js.map +0 -1
- package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-tw3UiMLM.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-DdrB9jrq.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BvG5Zcxb.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-CjIA8Av2.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-LpAGNm5N.js.map +0 -1
- package/dist/web/assets/__federation_shared_zod-BK7IELHt.js.map +0 -1
- package/dist/web/assets/model-merger-boZDknXa.js.map +0 -1
- package/dist/web/assets/plugin-definition-B7A-hS1o.js +0 -19
- package/dist/web/assets/plugin-definition-B7A-hS1o.js.map +0 -1
- package/dist/web/assets/plugin-definition-BeK0C-OP.js +0 -49
- package/dist/web/assets/plugin-definition-BeK0C-OP.js.map +0 -1
- package/dist/web/assets/plugin-definition-DfsGhMRb.js +0 -19
- package/dist/web/assets/plugin-definition-DfsGhMRb.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
2
|
import { g as getSymbols, a as isPlainObject, e as eq } from './isEqual-DAXqKRba.js';
|
|
3
3
|
|
|
4
4
|
function createInitializedPluginSpec(spec, implementation) {
|
|
@@ -202,6 +202,9 @@ const {randomKey} = await importShared('@baseplate-dev/utils');
|
|
|
202
202
|
* Definition of an entity type.
|
|
203
203
|
*/
|
|
204
204
|
class DefinitionEntityType {
|
|
205
|
+
prefix;
|
|
206
|
+
name;
|
|
207
|
+
parentType;
|
|
205
208
|
/**
|
|
206
209
|
* Creates a new entity type.
|
|
207
210
|
*
|
|
@@ -210,24 +213,8 @@ class DefinitionEntityType {
|
|
|
210
213
|
* @param parentType - The type of the parent entity if any
|
|
211
214
|
*/
|
|
212
215
|
constructor(name, prefix, parentType) {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
configurable: true,
|
|
216
|
-
writable: true,
|
|
217
|
-
value: name
|
|
218
|
-
});
|
|
219
|
-
Object.defineProperty(this, "parentType", {
|
|
220
|
-
enumerable: true,
|
|
221
|
-
configurable: true,
|
|
222
|
-
writable: true,
|
|
223
|
-
value: parentType
|
|
224
|
-
});
|
|
225
|
-
Object.defineProperty(this, "prefix", {
|
|
226
|
-
enumerable: true,
|
|
227
|
-
configurable: true,
|
|
228
|
-
writable: true,
|
|
229
|
-
value: void 0
|
|
230
|
-
});
|
|
216
|
+
this.name = name;
|
|
217
|
+
this.parentType = parentType;
|
|
231
218
|
this.prefix = prefix ?? name.split('/').pop() ?? name;
|
|
232
219
|
}
|
|
233
220
|
/**
|
|
@@ -257,19 +244,11 @@ function createEntityType(name, options) {
|
|
|
257
244
|
}
|
|
258
245
|
|
|
259
246
|
class DefinitionReferenceMarker {
|
|
247
|
+
value;
|
|
248
|
+
reference;
|
|
260
249
|
constructor(value, reference) {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
configurable: true,
|
|
264
|
-
writable: true,
|
|
265
|
-
value: value
|
|
266
|
-
});
|
|
267
|
-
Object.defineProperty(this, "reference", {
|
|
268
|
-
enumerable: true,
|
|
269
|
-
configurable: true,
|
|
270
|
-
writable: true,
|
|
271
|
-
value: reference
|
|
272
|
-
});
|
|
250
|
+
this.value = value;
|
|
251
|
+
this.reference = reference;
|
|
273
252
|
}
|
|
274
253
|
toString() {
|
|
275
254
|
return this.value ?? '';
|
|
@@ -839,6 +818,16 @@ function byIdOrThrow(projectDefinition, id) {
|
|
|
839
818
|
}
|
|
840
819
|
return model;
|
|
841
820
|
}
|
|
821
|
+
function byName(projectDefinition, name) {
|
|
822
|
+
return projectDefinition.models.find((m) => m.name === name);
|
|
823
|
+
}
|
|
824
|
+
function byNameOrThrow(projectDefinition, name) {
|
|
825
|
+
const model = byName(projectDefinition, name);
|
|
826
|
+
if (!model) {
|
|
827
|
+
throw new Error(`Could not find model with name ${name}`);
|
|
828
|
+
}
|
|
829
|
+
return model;
|
|
830
|
+
}
|
|
842
831
|
function getScalarFieldById(model, id) {
|
|
843
832
|
const field = model.model.fields.find((f) => f.id === id);
|
|
844
833
|
if (!field) {
|
|
@@ -878,6 +867,8 @@ function getModelIdByNameOrDefault(projectDefinition, name) {
|
|
|
878
867
|
const ModelUtils = {
|
|
879
868
|
byId,
|
|
880
869
|
byIdOrThrow,
|
|
870
|
+
byName,
|
|
871
|
+
byNameOrThrow,
|
|
881
872
|
getScalarFieldById,
|
|
882
873
|
getRelationsToModel,
|
|
883
874
|
getModelsForFeature,
|
|
@@ -891,38 +882,24 @@ const ModelUtils = {
|
|
|
891
882
|
* Allows diffing of arbitrary JSON objects.
|
|
892
883
|
*/
|
|
893
884
|
class DefinitionDiffField {
|
|
894
|
-
constructor(
|
|
895
885
|
/**
|
|
896
886
|
* The name of the field to be presented to the user.
|
|
897
887
|
*/
|
|
898
|
-
name
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
configurable: true,
|
|
902
|
-
writable: true,
|
|
903
|
-
value: name
|
|
904
|
-
});
|
|
888
|
+
name;
|
|
889
|
+
constructor(name) {
|
|
890
|
+
this.name = name;
|
|
905
891
|
}
|
|
906
892
|
}
|
|
907
893
|
/**
|
|
908
894
|
* A field that is an array of objects with a unique key.
|
|
909
895
|
*/
|
|
910
896
|
class DefinitionDiffKeyedArrayField extends DefinitionDiffField {
|
|
897
|
+
getKey;
|
|
898
|
+
options;
|
|
911
899
|
constructor(name, getKey, options = {}) {
|
|
912
900
|
super(name);
|
|
913
|
-
Object.defineProperty(this, "getKey", {
|
|
914
|
-
enumerable: true,
|
|
915
|
-
configurable: true,
|
|
916
|
-
writable: true,
|
|
917
|
-
value: getKey
|
|
918
|
-
});
|
|
919
|
-
Object.defineProperty(this, "options", {
|
|
920
|
-
enumerable: true,
|
|
921
|
-
configurable: true,
|
|
922
|
-
writable: true,
|
|
923
|
-
value: options
|
|
924
|
-
});
|
|
925
901
|
this.getKey = getKey;
|
|
902
|
+
this.options = options;
|
|
926
903
|
}
|
|
927
904
|
diff(current, desired) {
|
|
928
905
|
const currentValue = current ?? [];
|
|
@@ -1016,14 +993,10 @@ class DefinitionDiffReplacementField extends DefinitionDiffField {
|
|
|
1016
993
|
* This field type only adds items, never removes them.
|
|
1017
994
|
*/
|
|
1018
995
|
class DefinitionDiffArrayIncludesField extends DefinitionDiffField {
|
|
996
|
+
getKey;
|
|
1019
997
|
constructor(name, getKey) {
|
|
1020
998
|
super(name);
|
|
1021
|
-
|
|
1022
|
-
enumerable: true,
|
|
1023
|
-
configurable: true,
|
|
1024
|
-
writable: true,
|
|
1025
|
-
value: getKey
|
|
1026
|
-
});
|
|
999
|
+
this.getKey = getKey;
|
|
1027
1000
|
}
|
|
1028
1001
|
diff(current, desired) {
|
|
1029
1002
|
const currentValue = current ?? [];
|
|
@@ -1119,6 +1092,7 @@ const modelMergerDefinitionDiffConfig = createDefinitionDiffConfig({
|
|
|
1119
1092
|
* @returns The serialized model merger model input.
|
|
1120
1093
|
*/
|
|
1121
1094
|
function serializeModelMergerModelInput(input, definitionContainer, siblingModels) {
|
|
1095
|
+
const siblingModelIds = new Map(siblingModels.map((m) => [m.id, m.name]));
|
|
1122
1096
|
const siblingModelFieldIdMap = new Map([
|
|
1123
1097
|
...input.model.fields.map((f) => [f.id, f.name]),
|
|
1124
1098
|
...siblingModels.flatMap((m) => m.model.fields.map((f) => [f.id, f.name])),
|
|
@@ -1129,6 +1103,7 @@ function serializeModelMergerModelInput(input, definitionContainer, siblingModel
|
|
|
1129
1103
|
...(input.model.relations ?? []).map((r) => [r.foreignId, r.foreignRelationName]),
|
|
1130
1104
|
...siblingModels.flatMap((m) => (m.model.relations ?? []).map((r) => [r.foreignId, r.foreignRelationName])),
|
|
1131
1105
|
]);
|
|
1106
|
+
const modelFromId = (id) => siblingModelIds.get(id) ?? definitionContainer.nameFromId(id);
|
|
1132
1107
|
const fieldNameFromId = (id) => siblingModelFieldIdMap.get(id) ?? definitionContainer.nameFromId(id);
|
|
1133
1108
|
const relationNameFromId = (id) => siblingModelRelationIdMap.get(id) ?? definitionContainer.nameFromId(id);
|
|
1134
1109
|
return {
|
|
@@ -1137,6 +1112,7 @@ function serializeModelMergerModelInput(input, definitionContainer, siblingModel
|
|
|
1137
1112
|
...input.model,
|
|
1138
1113
|
relations: input.model.relations?.map((r) => ({
|
|
1139
1114
|
...r,
|
|
1115
|
+
modelRef: modelFromId(r.modelRef),
|
|
1140
1116
|
references: r.references.map((reference) => ({
|
|
1141
1117
|
...reference,
|
|
1142
1118
|
localRef: fieldNameFromId(reference.localRef),
|
|
@@ -1306,7 +1282,7 @@ function doesModelMergerResultsHaveChanges(results) {
|
|
|
1306
1282
|
function createModelMergerResults(current, desired, definitionContainer, { siblingModels = [] } = {}) {
|
|
1307
1283
|
return mapValues(desired, (desired, key) => createModelMergerResult(current[key] && modelEntityType.isId(current[key])
|
|
1308
1284
|
? ModelUtils.byIdOrThrow(definitionContainer.definition, current[key])
|
|
1309
|
-
:
|
|
1285
|
+
: ModelUtils.byName(definitionContainer.definition, current[key] ?? ''), desired, definitionContainer, {
|
|
1310
1286
|
siblingModels,
|
|
1311
1287
|
}));
|
|
1312
1288
|
}
|
|
@@ -1400,4 +1376,4 @@ function createAndApplyModelMergerResults(draftConfig, current, desired, definit
|
|
|
1400
1376
|
}
|
|
1401
1377
|
|
|
1402
1378
|
export { createModelMergerResults as A, applyModelMergerDiff as B, applyModelMergerResultInPlace as C, DefinitionReferenceMarker as D, createAndApplyModelMergerResults as E, FeatureUtils as F, DefinitionDiffKeyedArrayField as G, DefinitionDiffReplacementField as H, DefinitionDiffArrayIncludesField as I, createDefinitionDiffConfig as J, createDefinitionDiff as K, applyDefinitionDiff as L, ModelUtils as M, REF_ANNOTATIONS_MARKER_SYMBOL as R, createEntityType as a, createDefinitionSchemaParserContext as b, createPluginSpec as c, definitionSchema as d, modelForeignRelationEntityType as e, modelLocalRelationEntityType as f, get as g, modelScalarFieldEntityType as h, modelTransformerEntityType as i, modelEntityType as j, modelEnumValueEntityType as k, featureEntityType as l, mapValues as m, modelEnumEntityType as n, modelUniqueConstraintEntityType as o, createFeaturesSchema as p, omit as q, cloneDeep as r, set as s, createInitializedPluginSpec as t, DefinitionEntityType as u, featureNameSchema as v, createFeatureSchema as w, modelMergerDefinitionDiffConfig as x, createModelMergerResult as y, doesModelMergerResultsHaveChanges as z };
|
|
1403
|
-
//# sourceMappingURL=model-merger-
|
|
1379
|
+
//# sourceMappingURL=model-merger-BeuqGz00.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-merger-BeuqGz00.js","sources":["../../../../../packages/project-builder-lib/dist/plugins/spec/types.js","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/object/mapValues.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/object/merge.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/object/omit.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/object/toMerged.mjs","../../../../../packages/project-builder-lib/dist/references/types.js","../../../../../packages/project-builder-lib/dist/references/markers.js","../../../../../packages/project-builder-lib/dist/references/extend-parser-context-with-refs.js","../../../../../packages/project-builder-lib/dist/schema/creator/extend-parser-context-with-defaults.js","../../../../../packages/project-builder-lib/dist/schema/creator/schema-creator.js","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/object/get.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/predicate/isMatch.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs","../../../../../node_modules/.pnpm/es-toolkit@1.31.0/node_modules/es-toolkit/dist/compat/object/set.mjs","../../../../../packages/project-builder-lib/dist/schema/features/feature.js","../../../../../packages/project-builder-lib/dist/schema/models/types.js","../../../../../packages/project-builder-lib/dist/definition/feature/feature-utils.js","../../../../../packages/project-builder-lib/dist/definition/model/model-utils.js","../../../../../packages/project-builder-lib/dist/utils/definition-diff/definition-diff.js","../../../../../packages/project-builder-lib/dist/tools/model-merger/model-merger.js"],"sourcesContent":["export function createInitializedPluginSpec(spec, implementation) {\n return { spec, implementation };\n}\nexport function createPluginSpec(name, options) {\n const { platforms, defaultInitializer } = options ?? {};\n return {\n type: 'plugin-spec',\n name,\n platforms: platforms && (Array.isArray(platforms) ? platforms : [platforms]),\n isOptional: false,\n optional() {\n return { ...this, isOptional: true };\n },\n defaultInitializer,\n };\n}\n//# sourceMappingURL=types.js.map","function isPrimitive(value) {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n\nexport { isPrimitive };\n","function isTypedArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n\nexport { isTypedArray };\n","import { getSymbols } from '../compat/_internal/getSymbols.mjs';\nimport { isPrimitive } from '../predicate/isPrimitive.mjs';\nimport { isTypedArray } from '../predicate/isTypedArray.mjs';\n\nfunction cloneDeepWith(obj, cloneValue) {\n return cloneDeepWithImpl(obj, undefined, obj, new Map(), cloneValue);\n}\nfunction cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = new Map(), cloneValue = undefined) {\n const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);\n if (cloned != null) {\n return cloned;\n }\n if (isPrimitive(valueToClone)) {\n return valueToClone;\n }\n if (stack.has(valueToClone)) {\n return stack.get(valueToClone);\n }\n if (Array.isArray(valueToClone)) {\n const result = new Array(valueToClone.length);\n stack.set(valueToClone, result);\n for (let i = 0; i < valueToClone.length; i++) {\n result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n }\n if (Object.hasOwn(valueToClone, 'index')) {\n result.index = valueToClone.index;\n }\n if (Object.hasOwn(valueToClone, 'input')) {\n result.input = valueToClone.input;\n }\n return result;\n }\n if (valueToClone instanceof Date) {\n return new Date(valueToClone.getTime());\n }\n if (valueToClone instanceof RegExp) {\n const result = new RegExp(valueToClone.source, valueToClone.flags);\n result.lastIndex = valueToClone.lastIndex;\n return result;\n }\n if (valueToClone instanceof Map) {\n const result = new Map();\n stack.set(valueToClone, result);\n for (const [key, value] of valueToClone) {\n result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));\n }\n return result;\n }\n if (valueToClone instanceof Set) {\n const result = new Set();\n stack.set(valueToClone, result);\n for (const value of valueToClone) {\n result.add(cloneDeepWithImpl(value, undefined, objectToClone, stack, cloneValue));\n }\n return result;\n }\n if (typeof Buffer !== 'undefined' && Buffer.isBuffer(valueToClone)) {\n return valueToClone.subarray();\n }\n if (isTypedArray(valueToClone)) {\n const result = new (Object.getPrototypeOf(valueToClone).constructor)(valueToClone.length);\n stack.set(valueToClone, result);\n for (let i = 0; i < valueToClone.length; i++) {\n result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);\n }\n return result;\n }\n if (valueToClone instanceof ArrayBuffer ||\n (typeof SharedArrayBuffer !== 'undefined' && valueToClone instanceof SharedArrayBuffer)) {\n return valueToClone.slice(0);\n }\n if (valueToClone instanceof DataView) {\n const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof File !== 'undefined' && valueToClone instanceof File) {\n const result = new File([valueToClone], valueToClone.name, {\n type: valueToClone.type,\n });\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Blob) {\n const result = new Blob([valueToClone], { type: valueToClone.type });\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (valueToClone instanceof Error) {\n const result = new valueToClone.constructor();\n stack.set(valueToClone, result);\n result.message = valueToClone.message;\n result.name = valueToClone.name;\n result.stack = valueToClone.stack;\n result.cause = valueToClone.cause;\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n if (typeof valueToClone === 'object' && valueToClone !== null) {\n const result = Object.create(Object.getPrototypeOf(valueToClone));\n stack.set(valueToClone, result);\n copyProperties(result, valueToClone, objectToClone, stack, cloneValue);\n return result;\n }\n return valueToClone;\n}\nfunction copyProperties(target, source, objectToClone = target, stack, cloneValue) {\n const keys = [...Object.keys(source), ...getSymbols(source)];\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const descriptor = Object.getOwnPropertyDescriptor(target, key);\n if (descriptor == null || descriptor.writable) {\n target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);\n }\n }\n}\n\nexport { cloneDeepWith, cloneDeepWithImpl, copyProperties };\n","import { cloneDeepWithImpl } from './cloneDeepWith.mjs';\n\nfunction cloneDeep(obj) {\n return cloneDeepWithImpl(obj, undefined, obj, new Map(), undefined);\n}\n\nexport { cloneDeep };\n","function mapValues(object, getNewValue) {\n const result = {};\n const keys = Object.keys(object);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = object[key];\n result[key] = getNewValue(value, key, object);\n }\n return result;\n}\n\nexport { mapValues };\n","import { isPlainObject } from '../predicate/isPlainObject.mjs';\n\nfunction merge(target, source) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n const sourceValue = source[key];\n const targetValue = target[key];\n if (Array.isArray(sourceValue)) {\n if (Array.isArray(targetValue)) {\n target[key] = merge(targetValue, sourceValue);\n }\n else {\n target[key] = merge([], sourceValue);\n }\n }\n else if (isPlainObject(sourceValue)) {\n if (isPlainObject(targetValue)) {\n target[key] = merge(targetValue, sourceValue);\n }\n else {\n target[key] = merge({}, sourceValue);\n }\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { merge };\n","function omit(obj, keys) {\n const result = { ...obj };\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n delete result[key];\n }\n return result;\n}\n\nexport { omit };\n","import { cloneDeep } from './cloneDeep.mjs';\nimport { merge } from './merge.mjs';\n\nfunction toMerged(target, source) {\n return merge(cloneDeep(target), source);\n}\n\nexport { toMerged };\n","import { randomKey } from '@baseplate-dev/utils';\n/**\n * Definition of an entity type.\n */\nexport class DefinitionEntityType {\n prefix;\n name;\n parentType;\n /**\n * Creates a new entity type.\n *\n * @param name - The name of the entity type.\n * @param prefix - The prefix of the entity type to use in the ID, defaults to the name.\n * @param parentType - The type of the parent entity if any\n */\n constructor(name, prefix, parentType) {\n this.name = name;\n this.parentType = parentType;\n this.prefix = prefix ?? name.split('/').pop() ?? name;\n }\n /**\n * Generates a new ID for the entity type.\n *\n * @returns The new ID.\n */\n generateNewId() {\n return `${this.prefix}:${randomKey()}`;\n }\n idFromKey(key) {\n if (!key) {\n return undefined;\n }\n return `${this.prefix}:${key}`;\n }\n keyFromId(id) {\n return id.split(':')[1];\n }\n isId(id) {\n return id.startsWith(`${this.prefix}:`);\n }\n}\nexport function createEntityType(name, options) {\n const { parentType, prefix } = options ?? {};\n return new DefinitionEntityType(name, prefix, parentType);\n}\n//# sourceMappingURL=types.js.map","export class DefinitionReferenceMarker {\n value;\n reference;\n constructor(value, reference) {\n this.value = value;\n this.reference = reference;\n }\n toString() {\n return this.value ?? '';\n }\n}\nexport const REF_ANNOTATIONS_MARKER_SYMBOL = Symbol('refAnnotationsMarker');\n//# sourceMappingURL=markers.js.map","import { z } from 'zod';\nimport { DefinitionReferenceMarker, REF_ANNOTATIONS_MARKER_SYMBOL, } from './markers.js';\nexport function extendParserContextWithRefs({ transformReferences, }) {\n function withRef(reference) {\n return z.string().transform((value) => {\n if (transformReferences && value) {\n return new DefinitionReferenceMarker(value, reference);\n }\n return value;\n });\n }\n function withEnt(schema, entity) {\n if (!('id' in schema.shape)) {\n throw new Error(`Entity must have an id field. Entity type: ${entity.type.name}. Schema keys: ${Object.keys(schema.shape).join(', ')}`);\n }\n return schema.transform((value) => {\n // Check if the id is valid\n if (!('id' in value) || !entity.type.isId(value.id)) {\n throw new Error(`Invalid id for entity ${entity.type.name}. Id: ${value.id}`);\n }\n if (transformReferences) {\n const existingAnnotations = REF_ANNOTATIONS_MARKER_SYMBOL in value\n ? value[REF_ANNOTATIONS_MARKER_SYMBOL]\n : undefined;\n return {\n ...value,\n [REF_ANNOTATIONS_MARKER_SYMBOL]: {\n entities: [...(existingAnnotations?.entities ?? []), entity],\n references: existingAnnotations?.references ?? [],\n contextPaths: existingAnnotations?.contextPaths ?? [],\n },\n };\n }\n return value;\n });\n }\n function withRefBuilder(schema, builder) {\n return schema.transform((value) => {\n if (!value) {\n return value;\n }\n if (typeof value !== 'object') {\n throw new TypeError(`refBuilder requires an object, but got ${typeof value}`);\n }\n const existingAnnotations = REF_ANNOTATIONS_MARKER_SYMBOL in value\n ? value[REF_ANNOTATIONS_MARKER_SYMBOL]\n : undefined;\n const entities = existingAnnotations?.entities ?? [];\n const references = existingAnnotations?.references ?? [];\n const contextPaths = existingAnnotations?.contextPaths ?? [];\n const refBuilder = {\n addReference: (reference) => {\n references.push(reference);\n },\n addEntity: (entity) => {\n entities.push(entity);\n },\n addPathToContext: (path, type, context) => {\n contextPaths.push({ path, type, context });\n },\n };\n builder?.(refBuilder, value);\n if (transformReferences) {\n return {\n ...value,\n [REF_ANNOTATIONS_MARKER_SYMBOL]: {\n entities,\n references,\n contextPaths,\n },\n };\n }\n return value;\n });\n }\n return {\n withRef,\n withEnt,\n withRefBuilder,\n };\n}\n//# sourceMappingURL=extend-parser-context-with-refs.js.map","import { z } from 'zod';\nfunction isEmpty(value) {\n if (value === undefined || value === null) {\n return true;\n }\n if (Array.isArray(value)) {\n return value.length === 0;\n }\n if (typeof value === 'object' &&\n Object.getPrototypeOf(value) === Object.prototype) {\n return Object.values(value).every((val) => val === undefined);\n }\n if (typeof value === 'string') {\n return value === '';\n }\n return false;\n}\n/**\n * Extends the parser context with default value handling functionality.\n *\n * @param options - The schema creator options containing the defaultMode\n * @returns An object containing the withDefault method\n */\nexport function extendParserContextWithDefaults(options) {\n const mode = options.defaultMode ?? 'populate';\n return {\n withDefault: function withDefault(schema, defaultValue) {\n // Auto-add .optional() to the schema\n const optionalSchema = schema.optional();\n switch (mode) {\n case 'populate': {\n // Use preprocess to inject defaults before validation\n return z.preprocess((value) => {\n if (value === undefined) {\n return defaultValue;\n }\n return value;\n }, optionalSchema);\n }\n case 'strip': {\n // Use transform to remove values matching defaults after validation\n return optionalSchema.transform((value) => {\n if (isEmpty(value)) {\n return undefined;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return -- it's typed to a generic\n return value;\n });\n }\n case 'preserve': {\n // Return schema with .optional() added\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return -- it's typed to a generic\n return optionalSchema.transform((x) => x);\n }\n }\n },\n };\n}\n//# sourceMappingURL=extend-parser-context-with-defaults.js.map","import { extendParserContextWithRefs } from '#src/references/extend-parser-context-with-refs.js';\nimport { extendParserContextWithDefaults } from './extend-parser-context-with-defaults.js';\nexport function createDefinitionSchemaParserContext(options) {\n return {\n ...options,\n ...extendParserContextWithRefs(options),\n ...extendParserContextWithDefaults(options),\n };\n}\nexport function definitionSchema(creator) {\n return (context) => creator(context);\n}\n//# sourceMappingURL=schema-creator.js.map","function isDeepKey(key) {\n switch (typeof key) {\n case 'number':\n case 'symbol': {\n return false;\n }\n case 'string': {\n return key.includes('.') || key.includes('[') || key.includes(']');\n }\n }\n}\n\nexport { isDeepKey };\n","function toKey(value) {\n if (Object.is(value, -0)) {\n return '-0';\n }\n return value.toString();\n}\n\nexport { toKey };\n","function toPath(deepKey) {\n const result = [];\n const length = deepKey.length;\n if (length === 0) {\n return result;\n }\n let index = 0;\n let key = '';\n let quoteChar = '';\n let bracket = false;\n if (deepKey.charCodeAt(0) === 46) {\n result.push('');\n index++;\n }\n while (index < length) {\n const char = deepKey[index];\n if (quoteChar) {\n if (char === '\\\\' && index + 1 < length) {\n index++;\n key += deepKey[index];\n }\n else if (char === quoteChar) {\n quoteChar = '';\n }\n else {\n key += char;\n }\n }\n else if (bracket) {\n if (char === '\"' || char === \"'\") {\n quoteChar = char;\n }\n else if (char === ']') {\n bracket = false;\n result.push(key);\n key = '';\n }\n else {\n key += char;\n }\n }\n else {\n if (char === '[') {\n bracket = true;\n if (key) {\n result.push(key);\n key = '';\n }\n }\n else if (char === '.') {\n if (key) {\n result.push(key);\n key = '';\n }\n }\n else {\n key += char;\n }\n }\n index++;\n }\n if (key) {\n result.push(key);\n }\n return result;\n}\n\nexport { toPath };\n","import { isDeepKey } from '../_internal/isDeepKey.mjs';\nimport { toKey } from '../_internal/toKey.mjs';\nimport { toPath } from '../util/toPath.mjs';\n\nfunction get(object, path, defaultValue) {\n if (object == null) {\n return defaultValue;\n }\n switch (typeof path) {\n case 'string': {\n const result = object[path];\n if (result === undefined) {\n if (isDeepKey(path)) {\n return get(object, toPath(path), defaultValue);\n }\n else {\n return defaultValue;\n }\n }\n return result;\n }\n case 'number':\n case 'symbol': {\n if (typeof path === 'number') {\n path = toKey(path);\n }\n const result = object[path];\n if (result === undefined) {\n return defaultValue;\n }\n return result;\n }\n default: {\n if (Array.isArray(path)) {\n return getWithPath(object, path, defaultValue);\n }\n if (Object.is(path?.valueOf(), -0)) {\n path = '-0';\n }\n else {\n path = String(path);\n }\n const result = object[path];\n if (result === undefined) {\n return defaultValue;\n }\n return result;\n }\n }\n}\nfunction getWithPath(object, path, defaultValue) {\n if (path.length === 0) {\n return defaultValue;\n }\n let current = object;\n for (let index = 0; index < path.length; index++) {\n if (current == null) {\n return defaultValue;\n }\n current = current[path[index]];\n }\n if (current === undefined) {\n return defaultValue;\n }\n return current;\n}\n\nexport { get };\n","function isObject(value) {\n return value !== null && (typeof value === 'object' || typeof value === 'function');\n}\n\nexport { isObject };\n","import { isObject } from './isObject.mjs';\nimport { isPrimitive } from '../../predicate/isPrimitive.mjs';\nimport { eq } from '../util/eq.mjs';\n\nfunction isMatch(target, source) {\n if (source === target) {\n return true;\n }\n switch (typeof source) {\n case 'object': {\n if (source == null) {\n return true;\n }\n const keys = Object.keys(source);\n if (target == null) {\n return keys.length === 0;\n }\n if (Array.isArray(source)) {\n return isArrayMatch(target, source);\n }\n if (source instanceof Map) {\n return isMapMatch(target, source);\n }\n if (source instanceof Set) {\n return isSetMatch(target, source);\n }\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!isPrimitive(target) && !(key in target)) {\n return false;\n }\n if (source[key] === undefined && target[key] !== undefined) {\n return false;\n }\n if (source[key] === null && target[key] !== null) {\n return false;\n }\n if (!isMatch(target[key], source[key])) {\n return false;\n }\n }\n return true;\n }\n case 'function': {\n if (Object.keys(source).length > 0) {\n return isMatch(target, { ...source });\n }\n return false;\n }\n default: {\n if (!isObject(target)) {\n return eq(target, source);\n }\n return !source;\n }\n }\n}\nfunction isMapMatch(target, source) {\n if (source.size === 0) {\n return true;\n }\n if (!(target instanceof Map)) {\n return false;\n }\n for (const [key, value] of source.entries()) {\n if (!isMatch(target.get(key), value)) {\n return false;\n }\n }\n return true;\n}\nfunction isArrayMatch(target, source) {\n if (source.length === 0) {\n return true;\n }\n if (!Array.isArray(target)) {\n return false;\n }\n const countedIndex = new Set();\n for (let i = 0; i < source.length; i++) {\n const sourceItem = source[i];\n const index = target.findIndex((targetItem, index) => {\n return isMatch(targetItem, sourceItem) && !countedIndex.has(index);\n });\n if (index === -1) {\n return false;\n }\n countedIndex.add(index);\n }\n return true;\n}\nfunction isSetMatch(target, source) {\n if (source.size === 0) {\n return true;\n }\n if (!(target instanceof Set)) {\n return false;\n }\n return isArrayMatch([...target], [...source]);\n}\n\nexport { isArrayMatch, isMapMatch, isMatch, isSetMatch };\n","const IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\\d*)$/;\nfunction isIndex(value, length = Number.MAX_SAFE_INTEGER) {\n switch (typeof value) {\n case 'number': {\n return Number.isInteger(value) && value >= 0 && value < length;\n }\n case 'symbol': {\n return false;\n }\n case 'string': {\n return IS_UNSIGNED_INTEGER.test(value);\n }\n }\n}\n\nexport { isIndex };\n","import { isIndex } from '../_internal/isIndex.mjs';\nimport { toPath } from '../util/toPath.mjs';\n\nfunction set(obj, path, value) {\n const resolvedPath = Array.isArray(path) ? path : typeof path === 'string' ? toPath(path) : [path];\n let current = obj;\n for (let i = 0; i < resolvedPath.length - 1; i++) {\n const key = resolvedPath[i];\n const nextKey = resolvedPath[i + 1];\n if (current[key] == null) {\n current[key] = isIndex(nextKey) ? [] : {};\n }\n current = current[key];\n }\n const lastKey = resolvedPath[resolvedPath.length - 1];\n current[lastKey] = value;\n return obj;\n}\n\nexport { set };\n","import { CASE_VALIDATORS } from '@baseplate-dev/utils';\nimport { z } from 'zod';\nimport { createEntityType } from '#src/references/types.js';\nimport { definitionSchema } from '#src/schema/creator/schema-creator.js';\nexport const featureEntityType = createEntityType('feature');\nexport const featureNameSchema = CASE_VALIDATORS.KEBAB_CASE;\nexport const createFeatureSchema = definitionSchema((ctx) => ctx.withEnt(z.object({\n id: z.string(),\n name: z\n .string()\n .min(1)\n .refine((name) => name\n .split('/')\n .every((part) => featureNameSchema.safeParse(part).success), {\n message: 'Feature name must be lowercase and contain only letters, numbers, and dashes',\n }),\n parentRef: ctx\n .withRef({\n type: featureEntityType,\n onDelete: 'DELETE_PARENT',\n })\n .optional(),\n}), { type: featureEntityType }));\nexport const createFeaturesSchema = definitionSchema((ctx) => z.array(createFeatureSchema(ctx)).default([]));\n//# sourceMappingURL=feature.js.map","import { createEntityType } from '#src/references/index.js';\nexport const modelEntityType = createEntityType('model');\nexport const modelScalarFieldEntityType = createEntityType('model-scalar-field', {\n parentType: modelEntityType,\n});\nexport const modelLocalRelationEntityType = createEntityType('model-local-relation', { parentType: modelEntityType });\nexport const modelForeignRelationEntityType = createEntityType('model-foreign-relation', { parentType: modelEntityType });\nexport const modelUniqueConstraintEntityType = createEntityType('model-unique-constraint', { parentType: modelEntityType });\nexport const modelTransformerEntityType = createEntityType('model-transformer', { parentType: modelEntityType });\nexport const modelEnumEntityType = createEntityType('model-enum');\nexport const modelEnumValueEntityType = createEntityType('model-enum-value', {\n parentType: modelEnumEntityType,\n});\n//# sourceMappingURL=types.js.map","import { featureEntityType, featureNameSchema } from '#src/schema/index.js';\nfunction getRootFeatures(projectDefinition) {\n return projectDefinition.features.filter((f) => !f.parentRef);\n}\nfunction getFeatureById(projectDefinition, featureId) {\n return projectDefinition.features.find((f) => f.id === featureId);\n}\nfunction getFeatureByIdOrThrow(projectDefinition, featureId) {\n const feature = getFeatureById(projectDefinition, featureId);\n if (!feature) {\n throw new Error(`Could not find feature with ID ${featureId}`);\n }\n return feature;\n}\nfunction getFeatureChildren(projectDefinition, featureId) {\n return projectDefinition.features.filter((f) => f.parentRef === featureId);\n}\nfunction getFeatureName(featureConfig) {\n return featureConfig.name.split('/').pop() ?? '';\n}\nfunction getFeatureNameById(projectDefinition, featureId) {\n const feature = getFeatureByIdOrThrow(projectDefinition, featureId);\n return getFeatureName(feature);\n}\nfunction getFeaturePathById(projectDefinition, featureId) {\n const feature = getFeatureByIdOrThrow(projectDefinition, featureId);\n return feature.name;\n}\nfunction validateFeatureName(name) {\n const nameParts = name.split('/');\n return nameParts.every((part) => featureNameSchema.safeParse(part).success);\n}\nfunction ensureFeatureByNameRecursively(projectDefinition, nameOrId) {\n if (featureEntityType.isId(nameOrId)) {\n return nameOrId;\n }\n const nameParts = nameOrId.split('/');\n let lastName = '';\n let parentRef = undefined;\n for (const part of nameParts) {\n const feature = projectDefinition.features.find((f) => f.name === part && f.parentRef === parentRef);\n const name = [lastName, part].filter(Boolean).join('/');\n if (feature) {\n parentRef = feature.id;\n }\n else {\n const newFeature = {\n id: featureEntityType.generateNewId(),\n name,\n parentRef,\n };\n projectDefinition.features.push(newFeature);\n parentRef = newFeature.id;\n }\n lastName = name;\n }\n if (!parentRef) {\n throw new Error('Failed to create feature');\n }\n return parentRef;\n}\nfunction getFeatureByName(projectDefinition, name) {\n return projectDefinition.features.find((f) => f.name === name);\n}\nfunction getFeatureIdByNameOrDefault(projectDefinition, name) {\n return getFeatureByName(projectDefinition, name)?.id ?? name;\n}\nexport const FeatureUtils = {\n getRootFeatures,\n getFeatureById,\n getFeatureByIdOrThrow,\n getFeatureChildren,\n getFeatureName,\n getFeatureNameById,\n getFeaturePathById,\n validateFeatureName,\n ensureFeatureByNameRecursively,\n getFeatureByName,\n getFeatureIdByNameOrDefault,\n};\n//# sourceMappingURL=feature-utils.js.map","import { PASCAL_CASE_REGEX } from '@baseplate-dev/utils';\nfunction byId(projectDefinition, id) {\n return projectDefinition.models.find((m) => m.id === id);\n}\nfunction byIdOrThrow(projectDefinition, id) {\n const model = byId(projectDefinition, id);\n if (!model) {\n throw new Error(`Could not find model with ID ${id}`);\n }\n return model;\n}\nfunction byName(projectDefinition, name) {\n return projectDefinition.models.find((m) => m.name === name);\n}\nfunction byNameOrThrow(projectDefinition, name) {\n const model = byName(projectDefinition, name);\n if (!model) {\n throw new Error(`Could not find model with name ${name}`);\n }\n return model;\n}\nfunction getScalarFieldById(model, id) {\n const field = model.model.fields.find((f) => f.id === id);\n if (!field) {\n throw new Error(`Could not find field with ID ${id}`);\n }\n return field;\n}\nfunction getRelationsToModel(projectDefinition, modelId) {\n return projectDefinition.models.flatMap((m) => m.model.relations\n ?.filter((r) => r.modelRef === modelId)\n .map((r) => ({ model: m, relation: r })) ?? []);\n}\nfunction getModelsForFeature(projectDefinition, featureId) {\n return projectDefinition.models.filter((m) => m.featureRef === featureId);\n}\nfunction getModelIdFields(model) {\n return model.model.primaryKeyFieldRefs;\n}\nfunction hasService(model) {\n return (!!model.service.create.enabled ||\n !!model.service.update.enabled ||\n !!model.service.delete.enabled ||\n model.service.transformers.length > 0);\n}\nfunction validateModelName(name) {\n return PASCAL_CASE_REGEX.test(name);\n}\n/**\n * Returns the ID of a model by name, or the name if no model is found.\n * @param projectDefinition - The project definition.\n * @param name - The name of the model.\n * @returns The ID of the model, or the name if no model is found.\n */\nfunction getModelIdByNameOrDefault(projectDefinition, name) {\n return projectDefinition.models.find((m) => m.name === name)?.id ?? name;\n}\nexport const ModelUtils = {\n byId,\n byIdOrThrow,\n byName,\n byNameOrThrow,\n getScalarFieldById,\n getRelationsToModel,\n getModelsForFeature,\n getModelIdFields,\n hasService,\n validateModelName,\n getModelIdByNameOrDefault,\n};\n//# sourceMappingURL=model-utils.js.map","/**\n * Allows diffing of arbitrary JSON objects.\n */\nimport { cloneDeep, mapValues, omit, toMerged } from 'es-toolkit';\nimport { get, isMatch, set } from 'es-toolkit/compat';\nclass DefinitionDiffField {\n /**\n * The name of the field to be presented to the user.\n */\n name;\n constructor(name) {\n this.name = name;\n }\n}\n/**\n * A field that is an array of objects with a unique key.\n */\nexport class DefinitionDiffKeyedArrayField extends DefinitionDiffField {\n getKey;\n options;\n constructor(name, getKey, options = {}) {\n super(name);\n this.getKey = getKey;\n this.options = options;\n }\n diff(current, desired) {\n const currentValue = current ?? [];\n const desiredValue = desired ?? [];\n if (!Array.isArray(currentValue) || !Array.isArray(desiredValue)) {\n throw new TypeError('Current and desired must be arrays');\n }\n const ops = [];\n const { allowRemove, ignoreFields = ['id'] } = this.options;\n const currentByKey = new Map(currentValue.map((item) => [this.getKey(item), item]));\n const desiredByKey = new Map(desiredValue.map((item) => [this.getKey(item), item]));\n for (const [key, desiredItem] of desiredByKey) {\n const currentItem = currentByKey.get(key);\n if (!currentItem) {\n ops.push({ type: 'add', key, item: desiredItem });\n continue;\n }\n if (!isMatch(omit(currentItem, ignoreFields), omit(desiredItem, ignoreFields))) {\n ops.push({ type: 'update', key, item: desiredItem });\n }\n }\n if (allowRemove) {\n for (const [key, currentItem] of currentByKey) {\n if (!desiredByKey.has(key)) {\n ops.push({ type: 'remove', key, item: currentItem });\n }\n }\n }\n return ops;\n }\n apply(current, diff) {\n const patch = diff;\n const currentValue = current ?? [];\n if (!Array.isArray(currentValue)) {\n throw new TypeError('Current must be array');\n }\n const items = [...currentValue];\n for (const { type, key, item } of patch) {\n const index = items.findIndex((i) => this.getKey(i) === key);\n switch (type) {\n case 'add': {\n items.push(item);\n break;\n }\n case 'update': {\n if (index === -1) {\n throw new Error(`Cannot apply patch. Item with key \"${key}\" not found.`);\n }\n // Preserve existing id if present.\n items[index] = toMerged(items[index], item);\n break;\n }\n case 'remove': {\n if (index !== -1) {\n items.splice(index, 1);\n }\n break;\n }\n }\n }\n return items;\n }\n getActionVerb(isNew) {\n return isNew ? 'created' : 'added or updated';\n }\n}\n/**\n * A field that is a replacement for the entire object or array.\n */\nexport class DefinitionDiffReplacementField extends DefinitionDiffField {\n diff(current, desired) {\n if (desired === undefined) {\n return [];\n }\n if (!isMatch(current, desired)) {\n return [{ type: 'update', key: '*', item: desired }];\n }\n return [];\n }\n apply(current, diff) {\n if (diff.length === 0)\n return current;\n return diff[0].item;\n }\n getActionVerb(isNew) {\n return isNew ? 'set' : 'replaced';\n }\n}\n/**\n * A field that ensures an array contains certain values.\n * This field type only adds items, never removes them.\n */\nexport class DefinitionDiffArrayIncludesField extends DefinitionDiffField {\n getKey;\n constructor(name, getKey) {\n super(name);\n this.getKey = getKey;\n }\n diff(current, desired) {\n const currentValue = current ?? [];\n const desiredValue = desired ?? [];\n if (!Array.isArray(currentValue) || !Array.isArray(desiredValue)) {\n throw new TypeError('Current and desired must be arrays');\n }\n const ops = [];\n const currentSet = new Set(this.getKey ? currentValue.map(this.getKey) : currentValue);\n for (const item of desiredValue) {\n const key = this.getKey ? this.getKey(item) : String(item);\n if (!currentSet.has(key)) {\n ops.push({ type: 'add', key, item });\n }\n }\n return ops;\n }\n apply(current, diff) {\n const currentValue = (current ?? []);\n if (!Array.isArray(currentValue)) {\n throw new TypeError('Current must be array');\n }\n const items = [...currentValue];\n for (const { type, item } of diff) {\n if (type === 'add') {\n items.push(item);\n }\n }\n return items;\n }\n getActionVerb(isNew) {\n return isNew ? 'created' : 'added';\n }\n}\nexport function createDefinitionDiffConfig(config) {\n return config;\n}\n/**\n * Creates a diff between two objects.\n */\nexport function createDefinitionDiff(current, desired, configuration) {\n const ops = mapValues(configuration, (field, key) => {\n if (!field)\n return [];\n return field.diff(get(current, key), get(desired, key));\n });\n if (Object.values(ops).every((ops) => ops.length === 0)) {\n return undefined;\n }\n return ops;\n}\n/**\n * Applies a diff to an object.\n */\nexport function applyDefinitionDiff(current, diff, configuration) {\n const clonedCurrent = cloneDeep(current);\n for (const [key, ops] of Object.entries(diff)) {\n if (!ops)\n continue;\n const field = configuration[key];\n const currentValue = get(clonedCurrent, key);\n set(clonedCurrent, key, field.apply(currentValue, ops));\n }\n return clonedCurrent;\n}\n//# sourceMappingURL=definition-diff.js.map","import { mapValues } from 'es-toolkit';\nimport { ModelUtils } from '#src/definition/index.js';\nimport { modelEntityType, modelForeignRelationEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelUniqueConstraintEntityType, } from '#src/schema/index.js';\nimport { applyDefinitionDiff, createDefinitionDiff, createDefinitionDiffConfig, DefinitionDiffArrayIncludesField, DefinitionDiffKeyedArrayField, DefinitionDiffReplacementField, } from '#src/utils/definition-diff/definition-diff.js';\n/**\n * Computes a unique key for a unique constraint by sorting its field refs.\n *\n * @param constraint - Unique constraint input.\n * @returns A key string.\n */\nfunction getUniqueConstraintKey(constraint) {\n const fields = constraint.fields.map((f) => f.fieldRef).sort();\n return fields.join('|');\n}\nexport const modelMergerDefinitionDiffConfig = createDefinitionDiffConfig({\n 'model.fields': new DefinitionDiffKeyedArrayField('fields', (f) => f.name),\n 'model.relations': new DefinitionDiffKeyedArrayField('relations', (r) => r.name),\n 'model.uniqueConstraints': new DefinitionDiffKeyedArrayField('unique constraints', (c) => getUniqueConstraintKey(c)),\n 'model.primaryKeyFieldRefs': new DefinitionDiffReplacementField('primary key fields'),\n 'graphql.objectType.enabled': new DefinitionDiffReplacementField('GraphQL object type enabled'),\n 'graphql.objectType.fields': new DefinitionDiffArrayIncludesField('GraphQL object type fields'),\n 'graphql.objectType.localRelations': new DefinitionDiffArrayIncludesField('GraphQL object type local relations'),\n 'graphql.objectType.foreignRelations': new DefinitionDiffArrayIncludesField('GraphQL object type foreign relations'),\n});\n/**\n * Serializes a model merger model input such that all IDs are replaced with\n * names.\n *\n * @param input - The model merger model input.\n * @param definitionContainer - The definition container.\n * @returns The serialized model merger model input.\n */\nfunction serializeModelMergerModelInput(input, definitionContainer, siblingModels) {\n const siblingModelIds = new Map(siblingModels.map((m) => [m.id, m.name]));\n const siblingModelFieldIdMap = new Map([\n ...input.model.fields.map((f) => [f.id, f.name]),\n ...siblingModels.flatMap((m) => m.model.fields.map((f) => [f.id, f.name])),\n ]);\n const siblingModelRelationIdMap = new Map([\n ...(input.model.relations ?? []).map((r) => [r.id, r.name]),\n ...siblingModels.flatMap((m) => (m.model.relations ?? []).map((r) => [r.id, r.name])),\n ...(input.model.relations ?? []).map((r) => [r.foreignId, r.foreignRelationName]),\n ...siblingModels.flatMap((m) => (m.model.relations ?? []).map((r) => [r.foreignId, r.foreignRelationName])),\n ]);\n const modelFromId = (id) => siblingModelIds.get(id) ?? definitionContainer.nameFromId(id);\n const fieldNameFromId = (id) => siblingModelFieldIdMap.get(id) ?? definitionContainer.nameFromId(id);\n const relationNameFromId = (id) => siblingModelRelationIdMap.get(id) ?? definitionContainer.nameFromId(id);\n return {\n ...input,\n model: {\n ...input.model,\n relations: input.model.relations?.map((r) => ({\n ...r,\n modelRef: modelFromId(r.modelRef),\n references: r.references.map((reference) => ({\n ...reference,\n localRef: fieldNameFromId(reference.localRef),\n foreignRef: fieldNameFromId(reference.foreignRef),\n })),\n })),\n uniqueConstraints: input.model.uniqueConstraints?.map((c) => ({\n ...c,\n fields: c.fields.map((f) => ({\n ...f,\n fieldRef: fieldNameFromId(f.fieldRef),\n })),\n })),\n primaryKeyFieldRefs: input.model.primaryKeyFieldRefs.map(fieldNameFromId),\n },\n graphql: {\n ...input.graphql,\n objectType: {\n ...input.graphql?.objectType,\n fields: input.graphql?.objectType?.fields?.map(fieldNameFromId) ?? [],\n localRelations: input.graphql?.objectType?.localRelations?.map(relationNameFromId) ??\n [],\n foreignRelations: input.graphql?.objectType?.foreignRelations?.map(relationNameFromId) ?? [],\n },\n },\n };\n}\n/**\n * Attaches IDs to the model merger model input.\n *\n * @param input - The model merger model input.\n * @returns The model merger model input with IDs attached.\n */\nfunction attachIdsToModelMergerModelInput(input) {\n return {\n ...input,\n model: {\n ...input.model,\n fields: input.model.fields.map((f) => ({\n ...f,\n id: f.id ?? modelScalarFieldEntityType.generateNewId(),\n })),\n relations: input.model.relations?.map((r) => ({\n ...r,\n id: r.id ?? modelLocalRelationEntityType.generateNewId(),\n foreignId: r.foreignId ?? modelForeignRelationEntityType.generateNewId(),\n })),\n uniqueConstraints: input.model.uniqueConstraints?.map((c) => ({\n ...c,\n id: c.id ?? modelUniqueConstraintEntityType.generateNewId(),\n })),\n },\n };\n}\n/**\n * Deserializes a model merger model input converting all names to IDs.\n *\n * @param input - The model merger model input.\n * @param resolveForeignFieldRef - A function that resolves the foreign field ref.\n * @returns The deserialized model merger model input.\n */\nfunction deserializeModelMergerModelInput(input, resolveForeignFieldRef, resolveForeignRelationRef, resolveModelRef) {\n const inputWithIds = attachIdsToModelMergerModelInput(input);\n const resolveLocalFieldName = (name) => {\n const field = inputWithIds.model.fields.find((f) => f.name === name);\n if (!field) {\n throw new Error(`Field ${name} not found`);\n }\n return field.id;\n };\n const resolveLocalRelationName = (name) => {\n const relation = inputWithIds.model.relations?.find((r) => r.name === name);\n if (!relation) {\n throw new Error(`Relation ${name} not found`);\n }\n return relation.id;\n };\n return {\n ...inputWithIds,\n model: {\n ...inputWithIds.model,\n relations: inputWithIds.model.relations?.map((relation) => ({\n ...relation,\n modelRef: resolveModelRef(relation.modelRef),\n references: relation.references.map((reference) => ({\n ...reference,\n localRef: resolveLocalFieldName(reference.localRef),\n foreignRef: resolveForeignFieldRef(relation.modelRef, reference.foreignRef),\n })),\n })),\n uniqueConstraints: inputWithIds.model.uniqueConstraints?.map((constraint) => ({\n ...constraint,\n fields: constraint.fields.map((field) => ({\n ...field,\n fieldRef: resolveLocalFieldName(field.fieldRef),\n })),\n })),\n primaryKeyFieldRefs: inputWithIds.model.primaryKeyFieldRefs.map((fieldRef) => resolveLocalFieldName(fieldRef)),\n },\n graphql: {\n ...inputWithIds.graphql,\n objectType: {\n ...inputWithIds.graphql?.objectType,\n fields: inputWithIds.graphql?.objectType?.fields?.map((fieldRef) => resolveLocalFieldName(fieldRef)) ?? [],\n localRelations: inputWithIds.graphql?.objectType?.localRelations?.map((relationRef) => resolveLocalRelationName(relationRef)) ?? [],\n foreignRelations: inputWithIds.graphql?.objectType?.foreignRelations?.map((relationRef) => resolveForeignRelationRef(relationRef)) ?? [],\n },\n },\n };\n}\n/**\n * Creates a new blank model config input from a name and feature ref.\n *\n * @param name - The name of the model.\n * @param featureRef - The feature ref of the model.\n * @returns The new model config input.\n */\nfunction createNewModelConfigInput(name, featureRef, id) {\n return {\n id,\n name,\n featureRef,\n model: {\n fields: [],\n primaryKeyFieldRefs: [],\n },\n };\n}\n/**\n * Diff the model definition.\n *\n * @param current - The current model definition or a new model to be created.\n * @param desired - The desired model definition.\n * @param definitionContainer - Project definition container.\n * @param options - Diff options.\n * @returns A diff output or undefined if there are no differences.\n */\nexport function createModelMergerResult(current, desired, definitionContainer, { siblingModels = [] } = {}) {\n const currentModel = current ??\n createNewModelConfigInput(desired.name, desired.featureRef, modelEntityType.generateNewId());\n // resolves all the names of the current model config input\n const resolvedCurrent = serializeModelMergerModelInput(currentModel, definitionContainer, siblingModels);\n const diff = createDefinitionDiff(resolvedCurrent, desired, modelMergerDefinitionDiffConfig);\n if (!diff) {\n return undefined;\n }\n return {\n isNewModel: !current,\n id: currentModel.id,\n name: currentModel.name,\n featureRef: currentModel.featureRef,\n changes: diff,\n };\n}\nexport function doesModelMergerResultsHaveChanges(results) {\n return Object.values(results).some((result) => result?.changes);\n}\n/**\n * Creates a model merger result for a set of models.\n *\n * @param current - A map of model IDs\n * @param desired - The desired model definition.\n * @param definitionContainer - Project definition container.\n * @param options - Diff options.\n * @returns A model merger result for a set of models.\n */\nexport function createModelMergerResults(current, desired, definitionContainer, { siblingModels = [] } = {}) {\n return mapValues(desired, (desired, key) => createModelMergerResult(current[key] && modelEntityType.isId(current[key])\n ? ModelUtils.byIdOrThrow(definitionContainer.definition, current[key])\n : ModelUtils.byName(definitionContainer.definition, current[key] ?? ''), desired, definitionContainer, {\n siblingModels,\n }));\n}\nexport function applyModelMergerDiff(model, diff, definitionContainer, siblingModels = []) {\n const resolvedCurrent = serializeModelMergerModelInput(model, definitionContainer, siblingModels);\n const patchedCurrent = applyDefinitionDiff(resolvedCurrent, diff, modelMergerDefinitionDiffConfig);\n return {\n ...model,\n ...deserializeModelMergerModelInput(patchedCurrent, (modelId, fieldName) => {\n const siblingModel = siblingModels.find((m) => m.id === modelId || m.name === modelId);\n if (siblingModel) {\n const field = siblingModel.model.fields.find((f) => f.name === fieldName);\n if (!field) {\n throw new Error(`Field ${fieldName} not found in sibling model ${modelId}`);\n }\n return field.id;\n }\n const model = ModelUtils.byIdOrThrow(definitionContainer.definition, modelId);\n const field = model.model.fields.find((f) => f.name === fieldName);\n if (!field) {\n throw new Error(`Field ${fieldName} not found in model ${model.name}`);\n }\n return field.id;\n }, (relationName) => {\n // Search sibling model first\n let relationId;\n for (const siblingModel of siblingModels) {\n const relation = siblingModel.model.relations?.find((r) => r.foreignRelationName === relationName);\n if (relation) {\n relationId = relation.foreignId;\n break;\n }\n }\n if (relationId) {\n return relationId;\n }\n const relations = ModelUtils.getRelationsToModel(definitionContainer.definition, model.id);\n const relation = relations.find((r) => r.relation.foreignRelationName === relationName &&\n r.relation.modelRef === model.id);\n if (!relation) {\n throw new Error(`Relation ${relationName} not found in model ${model.name}`);\n }\n return relation.relation.foreignId;\n }, (modelRef) => {\n const siblingModel = siblingModels.find((m) => m.id === modelRef || m.name === modelRef);\n if (siblingModel) {\n return siblingModel.id;\n }\n return modelRef;\n }),\n };\n}\nexport function applyModelMergerResultInPlace(draftConfig, currentModel, result, definitionContainer, { siblingModels = [] } = {}) {\n const newModel = applyModelMergerDiff(currentModel, result.changes, definitionContainer, siblingModels);\n if (result.isNewModel) {\n draftConfig.models.push(newModel);\n }\n else {\n const index = draftConfig.models.findIndex((m) => m.id === result.id);\n if (index === -1) {\n throw new Error(`Model ${result.id} not found`);\n }\n draftConfig.models[index] = newModel;\n }\n return newModel.id;\n}\nexport function createAndApplyModelMergerResults(draftConfig, current, desired, definitionContainer, { siblingModels = [] } = {}) {\n const results = createModelMergerResults(current, desired, definitionContainer, { siblingModels });\n const newModels = [];\n const resultIds = {};\n // Apply model mergers in order\n for (const [key, result] of Object.entries(results)) {\n if (result) {\n const model = result.isNewModel\n ? createNewModelConfigInput(result.name, result.featureRef, result.id)\n : ModelUtils.byIdOrThrow(definitionContainer.definition, result.id);\n applyModelMergerResultInPlace(draftConfig, model, result, definitionContainer, {\n siblingModels: newModels,\n });\n const newModel = draftConfig.models.find((m) => m.id === result.id);\n if (newModel) {\n newModels.push(newModel);\n }\n resultIds[key] = model.id;\n }\n else {\n resultIds[key] = desired[key].name;\n }\n }\n return resultIds;\n}\n//# sourceMappingURL=model-merger.js.map"],"names":["z"],"mappings":";;;AAAO,SAAS,2BAA2B,CAAC,IAAI,EAAE,cAAc,EAAE;AAClE,IAAI,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE;AACnC;AACO,SAAS,gBAAgB,CAAC,IAAI,EAAE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AAC;AACd,YAAY,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC;AAC/E,YAAY,IAAI,QAAQ,EAAE;AAC1B,gBAAgB,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;AACxC;AACA,YAAY,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,EAAE;AACrC;AACA,aAAa;AACb,YAAY,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI;AAC9C;AACA;AACA,IAAI,OAAO,SAAS;AACpB;;;;","x_google_ignoreList":[1,2,3,4,5,6,7,8,14,15,16,17,18,19,20,21]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const LOCAL_AUTH_MODELS = {
|
|
2
|
+
/**
|
|
3
|
+
* Model name for the user model that represents a user in the local auth system.
|
|
4
|
+
*/
|
|
5
|
+
user: "User",
|
|
6
|
+
/**
|
|
7
|
+
* Model name for the user account model that represents a user account in the local auth system, e.g. email / password.
|
|
8
|
+
*/
|
|
9
|
+
userAccount: "UserAccount",
|
|
10
|
+
/**
|
|
11
|
+
* Model name for the user role model that represents a user role in the local auth system.
|
|
12
|
+
*/
|
|
13
|
+
userRole: "UserRole",
|
|
14
|
+
/**
|
|
15
|
+
* Model name for the user session model that represents a user session in the local auth system.
|
|
16
|
+
*/
|
|
17
|
+
userSession: "UserSession"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { LOCAL_AUTH_MODELS as L };
|
|
21
|
+
//# sourceMappingURL=model-names-CEoSIalq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-names-CEoSIalq.js","sources":["../../../src/local-auth/constants/model-names.ts"],"sourcesContent":["export const LOCAL_AUTH_MODELS = {\n /**\n * Model name for the user model that represents a user in the local auth system.\n */\n user: 'User',\n /**\n * Model name for the user account model that represents a user account in the local auth system, e.g. email / password.\n */\n userAccount: 'UserAccount',\n /**\n * Model name for the user role model that represents a user role in the local auth system.\n */\n userRole: 'UserRole',\n /**\n * Model name for the user session model that represents a user session in the local auth system.\n */\n userSession: 'UserSession',\n} as const;\n"],"names":[],"mappings":"AAAO,MAAM,iBAAoB,GAAA;AAAA;AAAA;AAAA;AAAA,EAI/B,IAAM,EAAA,MAAA;AAAA;AAAA;AAAA;AAAA,EAIN,WAAa,EAAA,aAAA;AAAA;AAAA;AAAA;AAAA,EAIb,QAAU,EAAA,UAAA;AAAA;AAAA;AAAA;AAAA,EAIV,WAAa,EAAA;AACf;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
|
+
|
|
3
|
+
const PLACEHOLDER_AUTH_MODELS = {
|
|
4
|
+
user: "User"
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const {definitionSchema} = await importShared('@baseplate-dev/project-builder-lib');
|
|
8
|
+
|
|
9
|
+
const {z} = await importShared('zod');
|
|
10
|
+
|
|
11
|
+
const createPlaceholderAuthPluginDefinitionSchema = definitionSchema(
|
|
12
|
+
(_) => z.object({})
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export { PLACEHOLDER_AUTH_MODELS as P, createPlaceholderAuthPluginDefinitionSchema as c };
|
|
16
|
+
//# sourceMappingURL=plugin-definition-C1FCvorP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-definition-C1FCvorP.js","sources":["../../../src/placeholder-auth/constants/model-names.ts","../../../src/placeholder-auth/core/schema/plugin-definition.ts"],"sourcesContent":["export const PLACEHOLDER_AUTH_MODELS = {\n user: 'User',\n} as const;\n","import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport { definitionSchema } from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nexport const createPlaceholderAuthPluginDefinitionSchema = definitionSchema(\n (_) => z.object({}),\n);\n\nexport type PlaceholderAuthPluginDefinitionInput = def.InferInput<\n typeof createPlaceholderAuthPluginDefinitionSchema\n>;\n"],"names":[],"mappings":";;AAAO,MAAM,uBAA0B,GAAA;AAAA,EACrC,IAAM,EAAA;AACR;;ACAA,MAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;;AACA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,YAAA,CAAA,KAAA,CAAA;;AAEO,MAAM,2CAA8C,GAAA,gBAAA;AAAA,EACzD,CAAC,CAAA,KAAM,CAAE,CAAA,MAAA,CAAO,EAAE;AACpB;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
|
+
|
|
3
|
+
const {authRoleEntityType,definitionSchema} = await importShared('@baseplate-dev/project-builder-lib');
|
|
4
|
+
|
|
5
|
+
const {z} = await importShared('zod');
|
|
6
|
+
|
|
7
|
+
const createLocalAuthPluginDefinitionSchema = definitionSchema(
|
|
8
|
+
(ctx) => z.object({
|
|
9
|
+
initialUserRoles: ctx.withDefault(
|
|
10
|
+
z.array(
|
|
11
|
+
ctx.withRef({
|
|
12
|
+
type: authRoleEntityType,
|
|
13
|
+
onDelete: "DELETE"
|
|
14
|
+
})
|
|
15
|
+
),
|
|
16
|
+
[]
|
|
17
|
+
),
|
|
18
|
+
userAdminRoles: ctx.withDefault(
|
|
19
|
+
z.array(
|
|
20
|
+
ctx.withRef({
|
|
21
|
+
type: authRoleEntityType,
|
|
22
|
+
onDelete: "DELETE"
|
|
23
|
+
})
|
|
24
|
+
),
|
|
25
|
+
[]
|
|
26
|
+
)
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export { createLocalAuthPluginDefinitionSchema as c };
|
|
31
|
+
//# sourceMappingURL=plugin-definition-CeI3VlQi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-definition-CeI3VlQi.js","sources":["../../../src/local-auth/core/schema/plugin-definition.ts"],"sourcesContent":["import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport {\n authRoleEntityType,\n definitionSchema,\n} from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nexport const createLocalAuthPluginDefinitionSchema = definitionSchema((ctx) =>\n z.object({\n initialUserRoles: ctx.withDefault(\n z.array(\n ctx.withRef({\n type: authRoleEntityType,\n onDelete: 'DELETE',\n }),\n ),\n [],\n ),\n userAdminRoles: ctx.withDefault(\n z.array(\n ctx.withRef({\n type: authRoleEntityType,\n onDelete: 'DELETE',\n }),\n ),\n [],\n ),\n }),\n);\n\nexport type LocalAuthPluginDefinition = def.InferOutput<\n typeof createLocalAuthPluginDefinitionSchema\n>;\n\nexport type LocalAuthPluginDefinitionInput = def.InferInput<\n typeof createLocalAuthPluginDefinitionSchema\n>;\n"],"names":[],"mappings":";;AAEA,MAAA,CAAA,kBAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;;AAIA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,YAAA,CAAA,KAAA,CAAA;;AAEO,MAAM,qCAAwC,GAAA,gBAAA;AAAA,EAAiB,CAAC,GACrE,KAAA,CAAA,CAAE,MAAO,CAAA;AAAA,IACP,kBAAkB,GAAI,CAAA,WAAA;AAAA,MACpB,CAAE,CAAA,KAAA;AAAA,QACA,IAAI,OAAQ,CAAA;AAAA,UACV,IAAM,EAAA,kBAAA;AAAA,UACN,QAAU,EAAA;AAAA,SACX;AAAA,OACH;AAAA,MACA;AAAC,KACH;AAAA,IACA,gBAAgB,GAAI,CAAA,WAAA;AAAA,MAClB,CAAE,CAAA,KAAA;AAAA,QACA,IAAI,OAAQ,CAAA;AAAA,UACV,IAAM,EAAA,kBAAA;AAAA,UACN,QAAU,EAAA;AAAA,SACX;AAAA,OACH;AAAA,MACA;AAAC;AACH,GACD;AACH;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
|
+
|
|
3
|
+
const AUTH0_MODELS = {
|
|
4
|
+
user: "User"
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
const {definitionSchema} = await importShared('@baseplate-dev/project-builder-lib');
|
|
8
|
+
|
|
9
|
+
const {z} = await importShared('zod');
|
|
10
|
+
|
|
11
|
+
const createAuth0PluginDefinitionSchema = definitionSchema(
|
|
12
|
+
(_) => z.object({})
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
export { AUTH0_MODELS as A, createAuth0PluginDefinitionSchema as c };
|
|
16
|
+
//# sourceMappingURL=plugin-definition-CpmhXG71.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-definition-CpmhXG71.js","sources":["../../../src/auth0/constants/model-names.ts","../../../src/auth0/core/schema/plugin-definition.ts"],"sourcesContent":["export const AUTH0_MODELS = {\n user: 'User',\n} as const;\n","import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport { definitionSchema } from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nexport const createAuth0PluginDefinitionSchema = definitionSchema((_) =>\n z.object({}),\n);\n\nexport type Auth0PluginDefinitionInput = def.InferInput<\n typeof createAuth0PluginDefinitionSchema\n>;\n"],"names":[],"mappings":";;AAAO,MAAM,YAAe,GAAA;AAAA,EAC1B,IAAM,EAAA;AACR;;ACAA,MAAA,CAAA,gBAAA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;;AACA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,YAAA,CAAA,KAAA,CAAA;;AAEO,MAAM,iCAAoC,GAAA,gBAAA;AAAA,EAAiB,CAAC,CAAA,KACjE,CAAE,CAAA,MAAA,CAAO,EAAE;AACb;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
2
|
|
|
3
3
|
const {authRoleEntityType: authRoleEntityType$1} = await importShared('@baseplate-dev/project-builder-lib');
|
|
4
4
|
|
|
@@ -83,4 +83,4 @@ const createAuthPluginDefinitionSchema = definitionSchema(
|
|
|
83
83
|
);
|
|
84
84
|
|
|
85
85
|
export { createAuthPluginDefinitionSchema as a, createDefaultAuthRoles as b, createAuthRoleSchema as c };
|
|
86
|
-
//# sourceMappingURL=plugin-definition-
|
|
86
|
+
//# sourceMappingURL=plugin-definition-p6J3lSNe.js.map
|
package/dist/web/assets/{plugin-definition-CyqVivit.js.map → plugin-definition-p6J3lSNe.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-definition-
|
|
1
|
+
{"version":3,"file":"plugin-definition-p6J3lSNe.js","sources":["../../../src/auth/core/schema/roles/constants.ts","../../../src/auth/core/schema/roles/schema.ts","../../../src/auth/core/schema/plugin-definition.ts"],"sourcesContent":["import { authRoleEntityType } from '@baseplate-dev/project-builder-lib';\n\nimport type { AuthRoleDefinition } from './schema.js';\n\nexport const AUTH_DEFAULT_ROLES: Omit<AuthRoleDefinition, 'id'>[] = [\n {\n name: 'public',\n comment: 'All users (including unauthenticated and authenticated users)',\n builtIn: true,\n },\n {\n name: 'user',\n comment: 'All authenticated users',\n builtIn: true,\n },\n {\n name: 'system',\n comment: 'System processes without a user context, e.g. background jobs',\n builtIn: true,\n },\n];\n\nexport function createDefaultAuthRoles(): AuthRoleDefinition[] {\n return AUTH_DEFAULT_ROLES.map((role) => ({\n ...role,\n id: authRoleEntityType.generateNewId(),\n }));\n}\n","import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport {\n authRoleEntityType,\n definitionSchema,\n} from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nimport { AUTH_DEFAULT_ROLES } from './constants.js';\n\nexport const createAuthRoleSchema = definitionSchema((ctx) =>\n ctx.withEnt(\n z.object({\n id: z.string(),\n name: z.string().min(1),\n comment: z.string().min(1),\n builtIn: z.boolean().default(false),\n }),\n { type: authRoleEntityType },\n ),\n);\n\n/**\n * Defines the schema for a role.\n */\nexport type AuthRoleDefinition = def.InferOutput<typeof createAuthRoleSchema>;\n\nexport type AuthRoleInput = def.InferInput<typeof createAuthRoleSchema>;\n\n/**\n * Defines the schema for an array of roles ensuring that there are no duplicate\n * role names and that the built-in roles are included.\n */\nexport const createAuthRolesSchema = definitionSchema((ctx) =>\n z\n .array(createAuthRoleSchema(ctx))\n .superRefine((roles, ctx) => {\n const dup = roles\n .map((r) => r.name)\n .filter((v, i, a) => a.indexOf(v) !== i);\n if (dup.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `Duplicate role name(s): ${dup.join(', ')}`,\n });\n }\n })\n .transform((roles) => [\n ...AUTH_DEFAULT_ROLES.map((r) => {\n const existingRole = roles.find((role) => role.name === r.name);\n return existingRole\n ? {\n ...existingRole,\n builtIn: true,\n }\n : {\n ...r,\n builtIn: true,\n id: authRoleEntityType.generateNewId(),\n };\n }),\n // Filter out the built-in roles\n ...roles.filter(\n (r) => !AUTH_DEFAULT_ROLES.map((v) => v.name).includes(r.name),\n ),\n ]),\n);\n","import type { def } from '@baseplate-dev/project-builder-lib';\n\nimport {\n definitionSchema,\n featureEntityType,\n} from '@baseplate-dev/project-builder-lib';\nimport { z } from 'zod';\n\nimport { createAuthRolesSchema } from './roles/index.js';\n\nexport const createAuthPluginDefinitionSchema = definitionSchema((ctx) =>\n z.object({\n implementationPluginKey: z\n .string()\n .min(1, 'Auth implementation plugin must be selected'),\n authFeatureRef: ctx.withRef({\n type: featureEntityType,\n onDelete: 'RESTRICT',\n }),\n roles: createAuthRolesSchema(ctx),\n }),\n);\n\nexport type AuthPluginDefinition = def.InferOutput<\n typeof createAuthPluginDefinitionSchema\n>;\n\nexport type AuthPluginDefinitionInput = def.InferInput<\n typeof createAuthPluginDefinitionSchema\n>;\n"],"names":["authRoleEntityType","definitionSchema","z","ct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AA,CAAA,GAAA,MAAA,YAAA,CAAA,oCAAA,CAAA;;AAIA,MAAA,CAAA,CAAA,CAAA,GAAA,MAAA,YAAA,CAAA,KAAA,CAAA;AAIO,MAAM,gCAAmC,GAAA,gBAAA;AAAA,EAAiB,CAAC,GAChE,KAAA,CAAA,CAAE,MAAO,CAAA;AAAA,IACP,yBAAyB,CACtB,CAAA,MAAA,EACA,CAAA,GAAA,CAAI,GAAG,6CAA6C,CAAA;AAAA,IACvD,cAAA,EAAgB,IAAI,OAAQ,CAAA;AAAA,MAC1B,IAAM,EAAA,iBAAA;AAAA,MACN,QAAU,EAAA;AAAA,KACX,CAAA;AAAA,IACD,KAAA,EAAO,sBAAsB,GAAG;AAAA,GACjC;AACH;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { importShared } from './__federation_fn_import-
|
|
1
|
+
import { importShared } from './__federation_fn_import-v1QB_w7U.js';
|
|
2
2
|
|
|
3
3
|
const createStoreImpl = (createState) => {
|
|
4
4
|
let state;
|
|
@@ -44,4 +44,4 @@ const createImpl = (createState) => {
|
|
|
44
44
|
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
45
45
|
|
|
46
46
|
export { create as c };
|
|
47
|
-
//# sourceMappingURL=react-
|
|
47
|
+
//# sourceMappingURL=react-BUJ02Ozg.js.map
|