@baseplate-dev/plugin-auth 0.6.12 → 0.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +14 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +14 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +7 -0
- package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +7 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +14 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +14 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +7 -0
- package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +14 -0
- package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +7 -0
- package/dist/better-auth/constants/packages.d.ts +1 -1
- package/dist/better-auth/constants/packages.js +1 -1
- package/dist/better-auth/generators/fastify/better-auth-admin-module/better-auth-admin-module.generator.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.d.ts +2 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-renderers.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/typed-templates.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/better-auth-email-templates.generator.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/index.d.ts +4 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-renderers.d.ts +1 -0
- package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/typed-templates.d.ts +3 -0
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts +43 -6
- package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js +21 -2
- package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts +46 -10
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts +18 -2
- package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js +6 -2
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts +24 -6
- package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js +8 -5
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts +20 -4
- package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js +10 -5
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/plugins/better-auth.plugin.ts +7 -4
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/auth.ts +76 -59
- package/dist/better-auth/generators/fastify/better-auth-module/templates/module/services/user-session.service.ts +58 -46
- package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts +7 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts +42 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts +7 -0
- package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts +70 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts +14 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts +7 -0
- package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts +7 -0
- package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts +7 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts +14 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts +14 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts +7 -0
- package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts +7 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts +14 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts +14 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts +7 -0
- package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts +14 -0
- package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts +7 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +7 -23
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +28 -66
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +7 -23
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +2 -8
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +35 -66
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +1 -5
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts +2 -2
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js +2 -2
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.ts +8 -4
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts +3 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js +4 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.ts +9 -6
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js +2 -3
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +5 -3
- package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts +4 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts +3 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +62 -8
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.js +21 -11
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +152 -10
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-paths.js +1 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +52 -2
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +14 -4
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +9 -3
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +6 -3
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +102 -8
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +19 -5
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts +0 -4
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js +2 -15
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.ts +2 -16
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.worker.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.worker.js +18 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.worker.ts +22 -0
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js +1 -2
- package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.ts +4 -2
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts +0 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js +0 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.ts +0 -2
- package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts +52 -0
- package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts +9 -0
- package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts +77 -0
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.tsx +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js +2 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.tsx +2 -2
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js +1 -1
- package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.tsx +1 -1
- package/dist/local-auth/core/generators/react-session/generated/index.d.ts +14 -0
- package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts +7 -0
- package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts +14 -0
- package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts +7 -0
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts +2 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.d.ts +10 -2
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.js +8 -5
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.js +1 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.d.ts +3 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.js +2 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/{auth-module.generator.d.ts → placeholder-auth-module.generator.d.ts} +20 -3
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/{auth-module.generator.js → placeholder-auth-module.generator.js} +16 -1
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.d.ts +5 -21
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.js +17 -26
- package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.ts +21 -31
- package/dist/web/assets/{_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-Bd_uRhIr.js → _virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-DxRuC5lD.js} +89 -73
- 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-BX1_Ngjt.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-Dbjihoi-.js} +50 -13
- 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-CQuBII8a.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-CpEOtTmq.js} +50 -14
- 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-DsLoA9K7.js → _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} +6932 -6106
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-CGsbw2Lx.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.js-CJ027_El.js} +72 -151
- package/dist/web/assets/{_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-DE4UUe5K.js → _virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-Do-7VDVw.js} +30 -247
- package/dist/web/assets/auth-gRzmaSZc.js +1 -0
- package/dist/web/assets/{common-ooa00sM_.js → common-B4cD6OfF.js} +6 -6
- package/dist/web/assets/{common-C0Hur22D.js → common-B9LNVIXT.js} +4 -4
- package/dist/web/assets/{common-BFKR_7HQ.js → common-B9sZoKR5.js} +6 -6
- package/dist/web/assets/{common-B8Z1_D6-.js → common-DF9FD3lJ.js} +4 -4
- package/dist/web/assets/{common-CLtpg163.js → common-S36tY-P3.js} +3 -3
- package/dist/web/assets/{common-CTYcv1u_.js → common-sMUs9FmV.js} +3 -3
- package/dist/web/assets/{dist-DicVrB_Z.js → dist-CtqdAorB.js} +374 -254
- package/dist/web/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-CtbvyMZJ.js → dist-SBfmsOB2.js} +43 -359
- package/dist/web/assets/{get-auth-plugin-definition-DBdchbBZ.js → get-auth-plugin-definition-Bs9C6JrS.js} +2 -2
- package/dist/web/assets/hostInit-BtfjN9sB.js +99 -0
- package/dist/web/assets/{index-CR54yoeW.js → index-DVCa_MuH.js} +2 -2
- package/dist/web/assets/{mf-entry-bootstrap-0-4f84e81c.js → mf-entry-bootstrap-0-31a63adb.js} +5 -2
- package/dist/web/assets/{model-utils-CQpTF3uf.js → model-utils-BDM6ILfO.js} +42 -14
- package/dist/web/assets/{models-Bc3L4Vsl.js → models-1c2urnle.js} +3 -3
- package/dist/web/assets/{models-BIKzGkW3.js → models-DGhhwO8Q.js} +3 -3
- package/dist/web/assets/{plugin-definition-BhNnSvrD.js → plugin-definition-B-HRncfN.js} +3 -3
- package/dist/web/assets/{plugin-definition-33i4r91s.js → plugin-definition-Dluw2inU.js} +3 -3
- package/dist/web/assets/{styles-BT_OTXuv.js → styles-BTmSBHAy.js} +15 -12
- package/dist/web/assets/{virtualExposes-B_hX31Ln.js → virtualExposes-C1o-SyCQ.js} +1 -1
- package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-Bs76by83.js +259 -0
- package/dist/web/assets/{virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-BVNjo6R7.js → virtual_mf-exposes-ssr___mfe_internal__plugin-auth__remoteEntry_js-B5SkIaaz.js} +13 -13
- package/dist/web/assets/{virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-B_7IVc8D.js → virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-DotA2McS.js} +50 -15
- package/dist/web/assets/{web-CJlCNegu.js → web-B2REeIGU.js} +3 -3
- package/dist/web/assets/{web-aKoJoBnQ.js → web-BEOhczx1.js} +16 -16
- package/dist/web/assets/{web-Dso6eI9u.js → web-Bh_3N1sv.js} +17 -17
- package/dist/web/assets/{web-BXB-pvWJ.js → web-CiuxQhgn.js} +20 -20
- package/dist/web/assets/{web-DYbNyLPi.js → web-DGv5-Arz.js} +35 -35
- package/dist/web/assets/{web-BDeHApaZ.js → web-jcCkQISW.js} +31 -18
- package/dist/web/assets/{web-BC9MejP0.js → web-wBaHshVG.js} +3 -3
- package/dist/web/index.html +2 -2
- package/dist/web/remoteEntry.js +1 -1
- package/dist/web/remoteEntry.ssr.js +1 -1
- package/package.json +26 -26
- package/dist/web/assets/auth-DS8ZnZZr.js +0 -1
- package/dist/web/assets/hostInit-CDVLjNbq.js +0 -119
|
@@ -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-
|
|
3
|
-
import { n as __mf_0, t as __mfDefaultExport } from "./_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.js-
|
|
4
|
-
import { $ as
|
|
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";
|
|
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-BDM6ILfO.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.
|
|
@@ -66,6 +66,11 @@ function keyBy(arr, getKeyFromItem) {
|
|
|
66
66
|
return result;
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
|
|
70
|
+
function isSymbol(value) {
|
|
71
|
+
return typeof value === "symbol" || value instanceof Symbol;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
69
74
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/uniq.mjs
|
|
70
75
|
function uniq(arr) {
|
|
71
76
|
return [...new Set(arr)];
|
|
@@ -80,6 +85,192 @@ function flow(...funcs) {
|
|
|
80
85
|
};
|
|
81
86
|
}
|
|
82
87
|
//#endregion
|
|
88
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/identity.mjs
|
|
89
|
+
function identity$1(x) {
|
|
90
|
+
return x;
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
|
|
94
|
+
function isPrimitive(value) {
|
|
95
|
+
return value == null || typeof value !== "object" && typeof value !== "function";
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
99
|
+
function isTypedArray(x) {
|
|
100
|
+
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/clone.mjs
|
|
104
|
+
function clone(obj) {
|
|
105
|
+
if (isPrimitive(obj)) return obj;
|
|
106
|
+
if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
|
|
107
|
+
const prototype = Object.getPrototypeOf(obj);
|
|
108
|
+
if (prototype == null) return Object.assign(Object.create(prototype), obj);
|
|
109
|
+
const Constructor = prototype.constructor;
|
|
110
|
+
if (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);
|
|
111
|
+
if (obj instanceof RegExp) {
|
|
112
|
+
const newRegExp = new Constructor(obj);
|
|
113
|
+
newRegExp.lastIndex = obj.lastIndex;
|
|
114
|
+
return newRegExp;
|
|
115
|
+
}
|
|
116
|
+
if (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));
|
|
117
|
+
if (obj instanceof Error) {
|
|
118
|
+
let newError;
|
|
119
|
+
if (obj instanceof AggregateError) newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
|
|
120
|
+
else newError = new Constructor(obj.message, { cause: obj.cause });
|
|
121
|
+
newError.stack = obj.stack;
|
|
122
|
+
Object.assign(newError, obj);
|
|
123
|
+
return newError;
|
|
124
|
+
}
|
|
125
|
+
if (typeof File !== "undefined" && obj instanceof File) return new Constructor([obj], obj.name, {
|
|
126
|
+
type: obj.type,
|
|
127
|
+
lastModified: obj.lastModified
|
|
128
|
+
});
|
|
129
|
+
if (typeof obj === "object") {
|
|
130
|
+
const newObject = Object.create(prototype);
|
|
131
|
+
return Object.assign(newObject, obj);
|
|
132
|
+
}
|
|
133
|
+
return obj;
|
|
134
|
+
}
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
137
|
+
function cloneDeepWith$1(obj, cloneValue) {
|
|
138
|
+
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
|
|
139
|
+
}
|
|
140
|
+
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
|
|
141
|
+
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
142
|
+
if (cloned !== void 0) return cloned;
|
|
143
|
+
if (isPrimitive(valueToClone)) return valueToClone;
|
|
144
|
+
if (stack.has(valueToClone)) return stack.get(valueToClone);
|
|
145
|
+
if (Array.isArray(valueToClone)) {
|
|
146
|
+
const result = new Array(valueToClone.length);
|
|
147
|
+
stack.set(valueToClone, result);
|
|
148
|
+
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
149
|
+
if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
|
|
150
|
+
if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
153
|
+
if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
|
|
154
|
+
if (valueToClone instanceof RegExp) {
|
|
155
|
+
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
156
|
+
result.lastIndex = valueToClone.lastIndex;
|
|
157
|
+
return result;
|
|
158
|
+
}
|
|
159
|
+
if (valueToClone instanceof Map) {
|
|
160
|
+
const result = /* @__PURE__ */ new Map();
|
|
161
|
+
stack.set(valueToClone, result);
|
|
162
|
+
for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
163
|
+
return result;
|
|
164
|
+
}
|
|
165
|
+
if (valueToClone instanceof Set) {
|
|
166
|
+
const result = /* @__PURE__ */ new Set();
|
|
167
|
+
stack.set(valueToClone, result);
|
|
168
|
+
for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
|
|
169
|
+
return result;
|
|
170
|
+
}
|
|
171
|
+
if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
|
|
172
|
+
if (isTypedArray(valueToClone)) {
|
|
173
|
+
const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
|
|
174
|
+
stack.set(valueToClone, result);
|
|
175
|
+
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
|
|
179
|
+
if (valueToClone instanceof DataView) {
|
|
180
|
+
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
181
|
+
stack.set(valueToClone, result);
|
|
182
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
183
|
+
return result;
|
|
184
|
+
}
|
|
185
|
+
if (typeof File !== "undefined" && valueToClone instanceof File) {
|
|
186
|
+
const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
|
|
187
|
+
stack.set(valueToClone, result);
|
|
188
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
191
|
+
if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
|
|
192
|
+
const result = new Blob([valueToClone], { type: valueToClone.type });
|
|
193
|
+
stack.set(valueToClone, result);
|
|
194
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
195
|
+
return result;
|
|
196
|
+
}
|
|
197
|
+
if (valueToClone instanceof Error) {
|
|
198
|
+
const result = new valueToClone.constructor();
|
|
199
|
+
stack.set(valueToClone, result);
|
|
200
|
+
result.message = valueToClone.message;
|
|
201
|
+
result.name = valueToClone.name;
|
|
202
|
+
result.stack = valueToClone.stack;
|
|
203
|
+
result.cause = valueToClone.cause;
|
|
204
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
205
|
+
return result;
|
|
206
|
+
}
|
|
207
|
+
if (valueToClone instanceof Boolean) {
|
|
208
|
+
const result = new Boolean(valueToClone.valueOf());
|
|
209
|
+
stack.set(valueToClone, result);
|
|
210
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
211
|
+
return result;
|
|
212
|
+
}
|
|
213
|
+
if (valueToClone instanceof Number) {
|
|
214
|
+
const result = new Number(valueToClone.valueOf());
|
|
215
|
+
stack.set(valueToClone, result);
|
|
216
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
217
|
+
return result;
|
|
218
|
+
}
|
|
219
|
+
if (valueToClone instanceof String) {
|
|
220
|
+
const result = new String(valueToClone.valueOf());
|
|
221
|
+
stack.set(valueToClone, result);
|
|
222
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
223
|
+
return result;
|
|
224
|
+
}
|
|
225
|
+
if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
|
|
226
|
+
const result = Object.create(Object.getPrototypeOf(valueToClone));
|
|
227
|
+
stack.set(valueToClone, result);
|
|
228
|
+
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
229
|
+
return result;
|
|
230
|
+
}
|
|
231
|
+
return valueToClone;
|
|
232
|
+
}
|
|
233
|
+
function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
|
|
234
|
+
const keys = [...Object.keys(source), ...getSymbols(source)];
|
|
235
|
+
for (let i = 0; i < keys.length; i++) {
|
|
236
|
+
const key = keys[i];
|
|
237
|
+
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
238
|
+
if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function isCloneableObject(object) {
|
|
242
|
+
switch (getTag(object)) {
|
|
243
|
+
case argumentsTag:
|
|
244
|
+
case arrayTag:
|
|
245
|
+
case arrayBufferTag:
|
|
246
|
+
case dataViewTag:
|
|
247
|
+
case booleanTag:
|
|
248
|
+
case dateTag:
|
|
249
|
+
case float32ArrayTag:
|
|
250
|
+
case float64ArrayTag:
|
|
251
|
+
case int8ArrayTag:
|
|
252
|
+
case int16ArrayTag:
|
|
253
|
+
case int32ArrayTag:
|
|
254
|
+
case mapTag:
|
|
255
|
+
case numberTag:
|
|
256
|
+
case objectTag:
|
|
257
|
+
case regexpTag:
|
|
258
|
+
case setTag:
|
|
259
|
+
case stringTag:
|
|
260
|
+
case symbolTag:
|
|
261
|
+
case uint8ArrayTag:
|
|
262
|
+
case uint8ClampedArrayTag:
|
|
263
|
+
case uint16ArrayTag:
|
|
264
|
+
case uint32ArrayTag: return true;
|
|
265
|
+
default: return false;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
//#endregion
|
|
269
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
270
|
+
function cloneDeep$1(obj) {
|
|
271
|
+
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
|
|
272
|
+
}
|
|
273
|
+
//#endregion
|
|
83
274
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mapValues.mjs
|
|
84
275
|
function mapValues(object, getNewValue) {
|
|
85
276
|
const result = {};
|
|
@@ -138,47 +329,9 @@ function pickBy(obj, shouldPick) {
|
|
|
138
329
|
return result;
|
|
139
330
|
}
|
|
140
331
|
//#endregion
|
|
141
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/
|
|
142
|
-
function
|
|
143
|
-
return
|
|
144
|
-
}
|
|
145
|
-
//#endregion
|
|
146
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
|
|
147
|
-
function isTypedArray(x) {
|
|
148
|
-
return ArrayBuffer.isView(x) && !(x instanceof DataView);
|
|
149
|
-
}
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/clone.mjs
|
|
152
|
-
function clone(obj) {
|
|
153
|
-
if (isPrimitive(obj)) return obj;
|
|
154
|
-
if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) return obj.slice(0);
|
|
155
|
-
const prototype = Object.getPrototypeOf(obj);
|
|
156
|
-
if (prototype == null) return Object.assign(Object.create(prototype), obj);
|
|
157
|
-
const Constructor = prototype.constructor;
|
|
158
|
-
if (obj instanceof Date || obj instanceof Map || obj instanceof Set) return new Constructor(obj);
|
|
159
|
-
if (obj instanceof RegExp) {
|
|
160
|
-
const newRegExp = new Constructor(obj);
|
|
161
|
-
newRegExp.lastIndex = obj.lastIndex;
|
|
162
|
-
return newRegExp;
|
|
163
|
-
}
|
|
164
|
-
if (obj instanceof DataView) return new Constructor(obj.buffer.slice(0));
|
|
165
|
-
if (obj instanceof Error) {
|
|
166
|
-
let newError;
|
|
167
|
-
if (obj instanceof AggregateError) newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
|
|
168
|
-
else newError = new Constructor(obj.message, { cause: obj.cause });
|
|
169
|
-
newError.stack = obj.stack;
|
|
170
|
-
Object.assign(newError, obj);
|
|
171
|
-
return newError;
|
|
172
|
-
}
|
|
173
|
-
if (typeof File !== "undefined" && obj instanceof File) return new Constructor([obj], obj.name, {
|
|
174
|
-
type: obj.type,
|
|
175
|
-
lastModified: obj.lastModified
|
|
176
|
-
});
|
|
177
|
-
if (typeof obj === "object") {
|
|
178
|
-
const newObject = Object.create(prototype);
|
|
179
|
-
return Object.assign(newObject, obj);
|
|
180
|
-
}
|
|
181
|
-
return obj;
|
|
332
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
333
|
+
function capitalize$1(str) {
|
|
334
|
+
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
182
335
|
}
|
|
183
336
|
//#endregion
|
|
184
337
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/toMerged.mjs
|
|
@@ -191,6 +344,11 @@ function toMerged(target, source) {
|
|
|
191
344
|
});
|
|
192
345
|
}
|
|
193
346
|
//#endregion
|
|
347
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
348
|
+
function isLength(value) {
|
|
349
|
+
return Number.isSafeInteger(value) && value >= 0;
|
|
350
|
+
}
|
|
351
|
+
//#endregion
|
|
194
352
|
//#region ../../packages/utils/dist/maps/group-by.js
|
|
195
353
|
/**
|
|
196
354
|
* Groups values of an iterable using a key-generating function and returns a Map.
|
|
@@ -1148,16 +1306,6 @@ function createDefinitionEntityNameResolver(entityNameResolver) {
|
|
|
1148
1306
|
return entityNameResolver;
|
|
1149
1307
|
}
|
|
1150
1308
|
//#endregion
|
|
1151
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/identity.mjs
|
|
1152
|
-
function identity$1(x) {
|
|
1153
|
-
return x;
|
|
1154
|
-
}
|
|
1155
|
-
//#endregion
|
|
1156
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
|
|
1157
|
-
function isLength(value) {
|
|
1158
|
-
return Number.isSafeInteger(value) && value >= 0;
|
|
1159
|
-
}
|
|
1160
|
-
//#endregion
|
|
1161
1309
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.mjs
|
|
1162
1310
|
function isArrayLike(value) {
|
|
1163
1311
|
return value != null && typeof value !== "function" && isLength(value.length);
|
|
@@ -1373,144 +1521,6 @@ function isMatch(target, source) {
|
|
|
1373
1521
|
return isMatchWith(target, source, () => void 0);
|
|
1374
1522
|
}
|
|
1375
1523
|
//#endregion
|
|
1376
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
|
|
1377
|
-
function cloneDeepWith$1(obj, cloneValue) {
|
|
1378
|
-
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
|
|
1379
|
-
}
|
|
1380
|
-
function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
|
|
1381
|
-
const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
|
|
1382
|
-
if (cloned !== void 0) return cloned;
|
|
1383
|
-
if (isPrimitive(valueToClone)) return valueToClone;
|
|
1384
|
-
if (stack.has(valueToClone)) return stack.get(valueToClone);
|
|
1385
|
-
if (Array.isArray(valueToClone)) {
|
|
1386
|
-
const result = new Array(valueToClone.length);
|
|
1387
|
-
stack.set(valueToClone, result);
|
|
1388
|
-
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
1389
|
-
if (Object.hasOwn(valueToClone, "index")) result.index = valueToClone.index;
|
|
1390
|
-
if (Object.hasOwn(valueToClone, "input")) result.input = valueToClone.input;
|
|
1391
|
-
return result;
|
|
1392
|
-
}
|
|
1393
|
-
if (valueToClone instanceof Date) return new Date(valueToClone.getTime());
|
|
1394
|
-
if (valueToClone instanceof RegExp) {
|
|
1395
|
-
const result = new RegExp(valueToClone.source, valueToClone.flags);
|
|
1396
|
-
result.lastIndex = valueToClone.lastIndex;
|
|
1397
|
-
return result;
|
|
1398
|
-
}
|
|
1399
|
-
if (valueToClone instanceof Map) {
|
|
1400
|
-
const result = /* @__PURE__ */ new Map();
|
|
1401
|
-
stack.set(valueToClone, result);
|
|
1402
|
-
for (const [key, value] of valueToClone) result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
|
|
1403
|
-
return result;
|
|
1404
|
-
}
|
|
1405
|
-
if (valueToClone instanceof Set) {
|
|
1406
|
-
const result = /* @__PURE__ */ new Set();
|
|
1407
|
-
stack.set(valueToClone, result);
|
|
1408
|
-
for (const value of valueToClone) result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
|
|
1409
|
-
return result;
|
|
1410
|
-
}
|
|
1411
|
-
if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) return valueToClone.subarray();
|
|
1412
|
-
if (isTypedArray(valueToClone)) {
|
|
1413
|
-
const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
|
|
1414
|
-
stack.set(valueToClone, result);
|
|
1415
|
-
for (let i = 0; i < valueToClone.length; i++) result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
|
|
1416
|
-
return result;
|
|
1417
|
-
}
|
|
1418
|
-
if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) return valueToClone.slice(0);
|
|
1419
|
-
if (valueToClone instanceof DataView) {
|
|
1420
|
-
const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
|
|
1421
|
-
stack.set(valueToClone, result);
|
|
1422
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1423
|
-
return result;
|
|
1424
|
-
}
|
|
1425
|
-
if (typeof File !== "undefined" && valueToClone instanceof File) {
|
|
1426
|
-
const result = new File([valueToClone], valueToClone.name, { type: valueToClone.type });
|
|
1427
|
-
stack.set(valueToClone, result);
|
|
1428
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1429
|
-
return result;
|
|
1430
|
-
}
|
|
1431
|
-
if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
|
|
1432
|
-
const result = new Blob([valueToClone], { type: valueToClone.type });
|
|
1433
|
-
stack.set(valueToClone, result);
|
|
1434
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1435
|
-
return result;
|
|
1436
|
-
}
|
|
1437
|
-
if (valueToClone instanceof Error) {
|
|
1438
|
-
const result = new valueToClone.constructor();
|
|
1439
|
-
stack.set(valueToClone, result);
|
|
1440
|
-
result.message = valueToClone.message;
|
|
1441
|
-
result.name = valueToClone.name;
|
|
1442
|
-
result.stack = valueToClone.stack;
|
|
1443
|
-
result.cause = valueToClone.cause;
|
|
1444
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1445
|
-
return result;
|
|
1446
|
-
}
|
|
1447
|
-
if (valueToClone instanceof Boolean) {
|
|
1448
|
-
const result = new Boolean(valueToClone.valueOf());
|
|
1449
|
-
stack.set(valueToClone, result);
|
|
1450
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1451
|
-
return result;
|
|
1452
|
-
}
|
|
1453
|
-
if (valueToClone instanceof Number) {
|
|
1454
|
-
const result = new Number(valueToClone.valueOf());
|
|
1455
|
-
stack.set(valueToClone, result);
|
|
1456
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1457
|
-
return result;
|
|
1458
|
-
}
|
|
1459
|
-
if (valueToClone instanceof String) {
|
|
1460
|
-
const result = new String(valueToClone.valueOf());
|
|
1461
|
-
stack.set(valueToClone, result);
|
|
1462
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1463
|
-
return result;
|
|
1464
|
-
}
|
|
1465
|
-
if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
|
|
1466
|
-
const result = Object.create(Object.getPrototypeOf(valueToClone));
|
|
1467
|
-
stack.set(valueToClone, result);
|
|
1468
|
-
copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
|
|
1469
|
-
return result;
|
|
1470
|
-
}
|
|
1471
|
-
return valueToClone;
|
|
1472
|
-
}
|
|
1473
|
-
function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
|
|
1474
|
-
const keys = [...Object.keys(source), ...getSymbols(source)];
|
|
1475
|
-
for (let i = 0; i < keys.length; i++) {
|
|
1476
|
-
const key = keys[i];
|
|
1477
|
-
const descriptor = Object.getOwnPropertyDescriptor(target, key);
|
|
1478
|
-
if (descriptor == null || descriptor.writable) target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
|
|
1479
|
-
}
|
|
1480
|
-
}
|
|
1481
|
-
function isCloneableObject(object) {
|
|
1482
|
-
switch (getTag(object)) {
|
|
1483
|
-
case argumentsTag:
|
|
1484
|
-
case arrayTag:
|
|
1485
|
-
case arrayBufferTag:
|
|
1486
|
-
case dataViewTag:
|
|
1487
|
-
case booleanTag:
|
|
1488
|
-
case dateTag:
|
|
1489
|
-
case float32ArrayTag:
|
|
1490
|
-
case float64ArrayTag:
|
|
1491
|
-
case int8ArrayTag:
|
|
1492
|
-
case int16ArrayTag:
|
|
1493
|
-
case int32ArrayTag:
|
|
1494
|
-
case mapTag:
|
|
1495
|
-
case numberTag:
|
|
1496
|
-
case objectTag:
|
|
1497
|
-
case regexpTag:
|
|
1498
|
-
case setTag:
|
|
1499
|
-
case stringTag:
|
|
1500
|
-
case symbolTag:
|
|
1501
|
-
case uint8ArrayTag:
|
|
1502
|
-
case uint8ClampedArrayTag:
|
|
1503
|
-
case uint16ArrayTag:
|
|
1504
|
-
case uint32ArrayTag: return true;
|
|
1505
|
-
default: return false;
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
//#endregion
|
|
1509
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
|
|
1510
|
-
function cloneDeep$1(obj) {
|
|
1511
|
-
return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
|
|
1512
|
-
}
|
|
1513
|
-
//#endregion
|
|
1514
1524
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/matches.mjs
|
|
1515
1525
|
function matches(source) {
|
|
1516
1526
|
source = cloneDeep$1(source);
|
|
@@ -1628,17 +1638,6 @@ function groupBy(source, _getKeyFromItem) {
|
|
|
1628
1638
|
return groupBy$1(isArrayLike(source) ? Array.from(source) : Object.values(source), iteratee(_getKeyFromItem ?? identity$1));
|
|
1629
1639
|
}
|
|
1630
1640
|
//#endregion
|
|
1631
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
|
|
1632
|
-
var assignValue = (object, key, value) => {
|
|
1633
|
-
const objValue = object[key];
|
|
1634
|
-
if (!(Object.hasOwn(object, key) && isEqualsSameValueZero(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
|
|
1635
|
-
};
|
|
1636
|
-
//#endregion
|
|
1637
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
|
|
1638
|
-
function isSymbol(value) {
|
|
1639
|
-
return typeof value === "symbol" || value instanceof Symbol;
|
|
1640
|
-
}
|
|
1641
|
-
//#endregion
|
|
1642
1641
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
|
|
1643
1642
|
var regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
1644
1643
|
var regexIsPlainProp = /^\w*$/;
|
|
@@ -1648,6 +1647,12 @@ function isKey(value, object) {
|
|
|
1648
1647
|
return typeof value === "string" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);
|
|
1649
1648
|
}
|
|
1650
1649
|
//#endregion
|
|
1650
|
+
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
|
|
1651
|
+
var assignValue = (object, key, value) => {
|
|
1652
|
+
const objValue = object[key];
|
|
1653
|
+
if (!(Object.hasOwn(object, key) && isEqualsSameValueZero(objValue, value)) || value === void 0 && !(key in object)) object[key] = value;
|
|
1654
|
+
};
|
|
1655
|
+
//#endregion
|
|
1651
1656
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
|
|
1652
1657
|
function updateWith(obj, path, updater, customizer) {
|
|
1653
1658
|
if (obj == null && !isObject(obj)) return obj;
|
|
@@ -1678,11 +1683,6 @@ function set$1(obj, path, value) {
|
|
|
1678
1683
|
return updateWith(obj, path, () => value, () => void 0);
|
|
1679
1684
|
}
|
|
1680
1685
|
//#endregion
|
|
1681
|
-
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/capitalize.mjs
|
|
1682
|
-
function capitalize$1(str) {
|
|
1683
|
-
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
1684
|
-
}
|
|
1685
|
-
//#endregion
|
|
1686
1686
|
//#region ../../node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/string/capitalize.mjs
|
|
1687
1687
|
function capitalize(str) {
|
|
1688
1688
|
return capitalize$1(toString$1(str));
|
|
@@ -4284,7 +4284,8 @@ function binop(name, prec) {
|
|
|
4284
4284
|
binop: prec
|
|
4285
4285
|
});
|
|
4286
4286
|
}
|
|
4287
|
-
var beforeExpr = { beforeExpr: true }
|
|
4287
|
+
var beforeExpr = { beforeExpr: true };
|
|
4288
|
+
var startsExpr = { startsExpr: true };
|
|
4288
4289
|
var keywords = {};
|
|
4289
4290
|
function kw(name, options) {
|
|
4290
4291
|
if (options === void 0) options = {};
|
|
@@ -4536,11 +4537,26 @@ function pushComment(options, array) {
|
|
|
4536
4537
|
array.push(comment);
|
|
4537
4538
|
};
|
|
4538
4539
|
}
|
|
4539
|
-
var SCOPE_TOP = 1
|
|
4540
|
+
var SCOPE_TOP = 1;
|
|
4541
|
+
var SCOPE_FUNCTION = 2;
|
|
4542
|
+
var SCOPE_ASYNC = 4;
|
|
4543
|
+
var SCOPE_GENERATOR = 8;
|
|
4544
|
+
var SCOPE_ARROW = 16;
|
|
4545
|
+
var SCOPE_SIMPLE_CATCH = 32;
|
|
4546
|
+
var SCOPE_SUPER = 64;
|
|
4547
|
+
var SCOPE_DIRECT_SUPER = 128;
|
|
4548
|
+
var SCOPE_CLASS_STATIC_BLOCK = 256;
|
|
4549
|
+
var SCOPE_CLASS_FIELD_INIT = 512;
|
|
4550
|
+
var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
4540
4551
|
function functionFlags(async, generator) {
|
|
4541
4552
|
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
|
|
4542
4553
|
}
|
|
4543
|
-
var BIND_NONE = 0
|
|
4554
|
+
var BIND_NONE = 0;
|
|
4555
|
+
var BIND_VAR = 1;
|
|
4556
|
+
var BIND_LEXICAL = 2;
|
|
4557
|
+
var BIND_FUNCTION = 3;
|
|
4558
|
+
var BIND_SIMPLE_CATCH = 4;
|
|
4559
|
+
var BIND_OUTSIDE = 5;
|
|
4544
4560
|
var Parser = function Parser(options, input, startPos) {
|
|
4545
4561
|
this.options = options = getOptions(options);
|
|
4546
4562
|
this.sourceFile = options.sourceFile;
|
|
@@ -4761,7 +4777,8 @@ pp$8.parseTopLevel = function(node) {
|
|
|
4761
4777
|
node.sourceType = this.options.sourceType;
|
|
4762
4778
|
return this.finishNode(node, "Program");
|
|
4763
4779
|
};
|
|
4764
|
-
var loopLabel = { kind: "loop" }
|
|
4780
|
+
var loopLabel = { kind: "loop" };
|
|
4781
|
+
var switchLabel = { kind: "switch" };
|
|
4765
4782
|
pp$8.isLet = function(context) {
|
|
4766
4783
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
|
|
4767
4784
|
skipWhiteSpace.lastIndex = this.pos;
|
|
@@ -5174,7 +5191,9 @@ pp$8.parseVarId = function(decl, kind) {
|
|
|
5174
5191
|
decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
|
|
5175
5192
|
this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
|
|
5176
5193
|
};
|
|
5177
|
-
var FUNC_STATEMENT = 1
|
|
5194
|
+
var FUNC_STATEMENT = 1;
|
|
5195
|
+
var FUNC_HANGING_STATEMENT = 2;
|
|
5196
|
+
var FUNC_NULLABLE_ID = 4;
|
|
5178
5197
|
pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
|
|
5179
5198
|
this.initFunction(node);
|
|
5180
5199
|
if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
|
|
@@ -8886,14 +8905,6 @@ function validateAuthorizerExpression(ast, modelContext, pluginStore, definition
|
|
|
8886
8905
|
});
|
|
8887
8906
|
return;
|
|
8888
8907
|
}
|
|
8889
|
-
if (relation.referenceCount !== 1) {
|
|
8890
|
-
warnings.push({
|
|
8891
|
-
message: `Relation '${relationName}' has ${relation.referenceCount} foreign key references. Nested authorizer checks only support single-key relations.`,
|
|
8892
|
-
start: relationStart,
|
|
8893
|
-
end: relationEnd
|
|
8894
|
-
});
|
|
8895
|
-
return;
|
|
8896
|
-
}
|
|
8897
8908
|
for (const [i, role] of roles.entries()) if (!relation.foreignAuthorizerRoleNames.has(role)) {
|
|
8898
8909
|
const availableRoles = [...relation.foreignAuthorizerRoleNames].join(", ");
|
|
8899
8910
|
warnings.push({
|
|
@@ -9028,7 +9039,6 @@ function buildModelExpressionContext(model, allModels) {
|
|
|
9028
9039
|
for (const relation of model.model?.relations ?? []) {
|
|
9029
9040
|
const foreignModel = lookupModel(relation.modelRef);
|
|
9030
9041
|
relationInfo.set(relation.name, {
|
|
9031
|
-
referenceCount: relation.references?.length ?? 0,
|
|
9032
9042
|
foreignModelName: foreignModel?.name ?? relation.modelRef,
|
|
9033
9043
|
foreignAuthorizerRoleNames: foreignModel ? buildAuthorizerRoleNames(foreignModel) : /* @__PURE__ */ new Set(),
|
|
9034
9044
|
...foreignModel ? buildFieldInfo(foreignModel) : {},
|
|
@@ -9040,7 +9050,6 @@ function buildModelExpressionContext(model, allModels) {
|
|
|
9040
9050
|
if (rel.modelRef !== currentModelId || !rel.foreignRelationName) continue;
|
|
9041
9051
|
if (relationInfo.has(rel.foreignRelationName)) continue;
|
|
9042
9052
|
relationInfo.set(rel.foreignRelationName, {
|
|
9043
|
-
referenceCount: rel.references?.length ?? 0,
|
|
9044
9053
|
foreignModelName: otherModel.name,
|
|
9045
9054
|
foreignAuthorizerRoleNames: buildAuthorizerRoleNames(otherModel),
|
|
9046
9055
|
...buildFieldInfo(otherModel),
|
|
@@ -9542,7 +9551,21 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
|
|
|
9542
9551
|
type: modelAuthorizerRoleEntityType,
|
|
9543
9552
|
onDelete: "DELETE",
|
|
9544
9553
|
parentSlot: modelSlot
|
|
9545
|
-
})), [])
|
|
9554
|
+
})), []),
|
|
9555
|
+
/**
|
|
9556
|
+
* Whether this field is exposed as a `where` filter operand
|
|
9557
|
+
* when the model's list query has where filtering enabled.
|
|
9558
|
+
* Opt-in: an author must explicitly choose which exposed
|
|
9559
|
+
* fields are filterable.
|
|
9560
|
+
*/
|
|
9561
|
+
filterable: ctx.withDefault(__mf_0.boolean(), false),
|
|
9562
|
+
/**
|
|
9563
|
+
* Whether this field is exposed as an `orderBy` sort key
|
|
9564
|
+
* when the model's list query has sorting enabled. Opt-in:
|
|
9565
|
+
* an author must explicitly choose which exposed fields are
|
|
9566
|
+
* sortable.
|
|
9567
|
+
*/
|
|
9568
|
+
sortable: ctx.withDefault(__mf_0.boolean(), false)
|
|
9546
9569
|
})).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([])),
|
|
9547
9570
|
localRelations: __mf_0.array(__mf_0.object({
|
|
9548
9571
|
ref: ctx.withRef({
|
|
@@ -9568,7 +9591,8 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
|
|
|
9568
9591
|
type: modelAuthorizerRoleEntityType,
|
|
9569
9592
|
onDelete: "DELETE",
|
|
9570
9593
|
parentSlot: modelSlot
|
|
9571
|
-
})), [])
|
|
9594
|
+
})), []),
|
|
9595
|
+
paginated: ctx.withDefault(__mf_0.boolean(), false)
|
|
9572
9596
|
})).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([]))
|
|
9573
9597
|
}), {}),
|
|
9574
9598
|
queries: ctx.withDefault(__mf_0.object({
|
|
@@ -9581,7 +9605,10 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
|
|
|
9581
9605
|
get: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9582
9606
|
list: ctx.withDefault(__mf_0.object({
|
|
9583
9607
|
enabled: ctx.withDefault(__mf_0.boolean(), false),
|
|
9584
|
-
count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
|
|
9608
|
+
count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9609
|
+
connection: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9610
|
+
where: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9611
|
+
orderBy: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
|
|
9585
9612
|
}), {})
|
|
9586
9613
|
}), {}),
|
|
9587
9614
|
mutations: ctx.withDefault(__mf_0.object({
|
|
@@ -10310,18 +10337,46 @@ var createAdminAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType },
|
|
|
10310
10337
|
pathPrefix: "/admin"
|
|
10311
10338
|
}));
|
|
10312
10339
|
//#endregion
|
|
10340
|
+
//#region ../../packages/project-builder-lib/dist/schema/apps/web/web-app-schema-extension-spec.js
|
|
10341
|
+
/**
|
|
10342
|
+
* Spec for registering plugin-contributed schema extensions on the web app
|
|
10343
|
+
* config, keyed by plugin key. Each plugin's schema creator is merged into the
|
|
10344
|
+
* web app config under `pluginData[pluginKey]`, letting plugins add per-app
|
|
10345
|
+
* opt-in settings without editing the core web app schema.
|
|
10346
|
+
*/
|
|
10347
|
+
var webAppSchemaExtensionSpec = createFieldMapSpec("core/web-app-schema-extension", (t) => ({ schemas: t.map() }), { use: (values) => ({ getAllSchemaCreators: () => values.schemas }) });
|
|
10348
|
+
/**
|
|
10349
|
+
* Reads a plugin's per-app settings slice from a web app config.
|
|
10350
|
+
*
|
|
10351
|
+
* `pluginData` is validated per-plugin by that plugin's registered schema
|
|
10352
|
+
* creator, but is statically untyped here (the merged schema is built at
|
|
10353
|
+
* runtime). Callers cast the result to the type they infer from their own schema
|
|
10354
|
+
* creator via `def.InferOutput`.
|
|
10355
|
+
*
|
|
10356
|
+
* @param webApp - The web app config to read from
|
|
10357
|
+
* @param pluginKey - The registering plugin's key
|
|
10358
|
+
* @returns The plugin's slice, or `undefined` if the app has not opted in
|
|
10359
|
+
*/
|
|
10360
|
+
function getWebAppPluginData(webApp, pluginKey) {
|
|
10361
|
+
return webApp.pluginData?.[pluginKey];
|
|
10362
|
+
}
|
|
10363
|
+
//#endregion
|
|
10313
10364
|
//#region ../../packages/project-builder-lib/dist/schema/apps/web/web-app.js
|
|
10314
|
-
var createWebAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType }, (ctx, { appSlot }) =>
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10365
|
+
var createWebAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType }, (ctx, { appSlot }) => {
|
|
10366
|
+
const pluginKeys = ctx.plugins.getPluginKeys();
|
|
10367
|
+
const schemaCreators = ctx.plugins.use(webAppSchemaExtensionSpec).getAllSchemaCreators();
|
|
10368
|
+
const pluginDataSchema = __mf_0.object(Object.fromEntries(pluginKeys.map((pluginKey) => [pluginKey, (schemaCreators.get(pluginKey)?.(ctx) ?? __mf_0.unknown()).optional()])));
|
|
10369
|
+
return __mf_0.object({
|
|
10370
|
+
...baseAppValidators,
|
|
10371
|
+
devPort: __mf_0.number().int().positive(),
|
|
10372
|
+
type: __mf_0.literal("web"),
|
|
10373
|
+
title: __mf_0.string().default(""),
|
|
10374
|
+
description: __mf_0.string().default(""),
|
|
10375
|
+
enableSubscriptions: ctx.withDefault(__mf_0.boolean(), false),
|
|
10376
|
+
pluginData: pluginDataSchema.optional(),
|
|
10377
|
+
adminApp: createAdminAppSchema(ctx, { appSlot })
|
|
10378
|
+
});
|
|
10379
|
+
});
|
|
10325
10380
|
var webAppEntryType = createAppEntryType("web");
|
|
10326
10381
|
//#endregion
|
|
10327
10382
|
//#region ../../packages/project-builder-lib/dist/schema/libraries/types.js
|
|
@@ -15879,6 +15934,31 @@ function migrateUuidField(field) {
|
|
|
15879
15934
|
}
|
|
15880
15935
|
};
|
|
15881
15936
|
}
|
|
15937
|
+
var migration031UuidDefaultGeneration = createSchemaMigration({
|
|
15938
|
+
version: 31,
|
|
15939
|
+
name: "uuidDefaultGeneration",
|
|
15940
|
+
description: "Replace genUuid boolean with defaultGeneration enum (none | uuidv4 | uuidv7) on UUID fields",
|
|
15941
|
+
migrate: (config) => {
|
|
15942
|
+
if (!config.models) return config;
|
|
15943
|
+
return {
|
|
15944
|
+
...config,
|
|
15945
|
+
models: config.models.map((model) => {
|
|
15946
|
+
if (!model.model?.fields) return model;
|
|
15947
|
+
return {
|
|
15948
|
+
...model,
|
|
15949
|
+
model: {
|
|
15950
|
+
...model.model,
|
|
15951
|
+
fields: model.model.fields.map(migrateUuidField)
|
|
15952
|
+
}
|
|
15953
|
+
};
|
|
15954
|
+
})
|
|
15955
|
+
};
|
|
15956
|
+
}
|
|
15957
|
+
});
|
|
15958
|
+
//#endregion
|
|
15959
|
+
//#region ../../packages/project-builder-lib/dist/migrations/migration-032-web-app-plugin-data.js
|
|
15960
|
+
var STORAGE_PLUGIN_KEY = "baseplate-dev_plugin-storage_storage";
|
|
15961
|
+
var NOTIFICATIONS_PLUGIN_KEY = "baseplate-dev_plugin-notifications_notifications";
|
|
15882
15962
|
//#endregion
|
|
15883
15963
|
//#region ../../packages/project-builder-lib/dist/migrations/index.js
|
|
15884
15964
|
var SCHEMA_MIGRATIONS = [
|
|
@@ -15908,24 +15988,32 @@ var SCHEMA_MIGRATIONS = [
|
|
|
15908
15988
|
migration028EnableStripePlugin,
|
|
15909
15989
|
migration029AdminRoleAndAutoAssigned,
|
|
15910
15990
|
migration030RemoveThemeHoverColors,
|
|
15991
|
+
migration031UuidDefaultGeneration,
|
|
15911
15992
|
createSchemaMigration({
|
|
15912
|
-
version:
|
|
15913
|
-
name: "
|
|
15914
|
-
description: "
|
|
15993
|
+
version: 32,
|
|
15994
|
+
name: "webAppPluginData",
|
|
15995
|
+
description: "Move includeUploadComponents/includeNotifications into web app pluginData and drop includeAuth",
|
|
15915
15996
|
migrate: (config) => {
|
|
15916
|
-
|
|
15997
|
+
const apps = config.apps?.map((app) => {
|
|
15998
|
+
if (app.type !== "web") return app;
|
|
15999
|
+
const { includeAuth: _includeAuth, includeUploadComponents, includeNotifications, pluginData: existingPluginData, ...rest } = app;
|
|
16000
|
+
const pluginData = { ...existingPluginData };
|
|
16001
|
+
if (includeUploadComponents) pluginData[STORAGE_PLUGIN_KEY] = {
|
|
16002
|
+
...pluginData[STORAGE_PLUGIN_KEY],
|
|
16003
|
+
includeUploadComponents: true
|
|
16004
|
+
};
|
|
16005
|
+
if (includeNotifications) pluginData[NOTIFICATIONS_PLUGIN_KEY] = {
|
|
16006
|
+
...pluginData[NOTIFICATIONS_PLUGIN_KEY],
|
|
16007
|
+
includeNotifications: true
|
|
16008
|
+
};
|
|
16009
|
+
return Object.keys(pluginData).length > 0 ? {
|
|
16010
|
+
...rest,
|
|
16011
|
+
pluginData
|
|
16012
|
+
} : rest;
|
|
16013
|
+
});
|
|
15917
16014
|
return {
|
|
15918
16015
|
...config,
|
|
15919
|
-
|
|
15920
|
-
if (!model.model?.fields) return model;
|
|
15921
|
-
return {
|
|
15922
|
-
...model,
|
|
15923
|
-
model: {
|
|
15924
|
-
...model.model,
|
|
15925
|
-
fields: model.model.fields.map(migrateUuidField)
|
|
15926
|
-
}
|
|
15927
|
-
};
|
|
15928
|
-
})
|
|
16016
|
+
apps: apps ?? []
|
|
15929
16017
|
};
|
|
15930
16018
|
}
|
|
15931
16019
|
})
|
|
@@ -16466,7 +16554,8 @@ function createIssueFixSetter(issue, container) {
|
|
|
16466
16554
|
const applyFn = fix.apply;
|
|
16467
16555
|
return (draft) => {
|
|
16468
16556
|
const absolutePath = resolveIssuePath(issue, container);
|
|
16469
|
-
|
|
16557
|
+
const currentValue = get$1(draft, absolutePath);
|
|
16558
|
+
set$1(draft, absolutePath, applyFn(currentValue));
|
|
16470
16559
|
};
|
|
16471
16560
|
}
|
|
16472
16561
|
}
|
|
@@ -17038,6 +17127,37 @@ function updateEntity({ entityTypeName, entityId, entityData }, context) {
|
|
|
17038
17127
|
});
|
|
17039
17128
|
}
|
|
17040
17129
|
/**
|
|
17130
|
+
* Partially updates an existing entity by ID.
|
|
17131
|
+
*
|
|
17132
|
+
* Shallow-merges the provided root-level fields into the existing entity data.
|
|
17133
|
+
* Provided fields replace the existing values wholesale (nested objects and
|
|
17134
|
+
* arrays are not deep-merged). The entity's ID is always preserved.
|
|
17135
|
+
*
|
|
17136
|
+
* @returns A new definition with the entity patched (original is not modified)
|
|
17137
|
+
*/
|
|
17138
|
+
function patchEntity({ entityTypeName, entityId, entityData }, context) {
|
|
17139
|
+
const metadata = context.entityTypeMap.get(entityTypeName);
|
|
17140
|
+
if (!metadata) throw new Error(`Unknown entity type: ${entityTypeName}`);
|
|
17141
|
+
const entity = context.lookupEntity(entityId);
|
|
17142
|
+
if (!entity) throw new Error(`Entity "${entityId}" of type "${entityTypeName}" not found`);
|
|
17143
|
+
const currentEntity = get$1(context.serializedDefinition, entity.path);
|
|
17144
|
+
if (!isPlainObject$1(currentEntity)) throw new TypeError(`Expected plain object at path "${entity.path.join(".")}" but got ${typeof currentEntity}`);
|
|
17145
|
+
const mergedEntity = {
|
|
17146
|
+
...currentEntity,
|
|
17147
|
+
...entityData,
|
|
17148
|
+
id: currentEntity.id
|
|
17149
|
+
};
|
|
17150
|
+
const patchedEntity = assignEntityIds(metadata.elementSchema, mergedEntity, { isExistingId: (id) => !!context.lookupEntity(id) });
|
|
17151
|
+
return produce(context.serializedDefinition, (draft) => {
|
|
17152
|
+
const parentPath = entity.path.slice(0, -1);
|
|
17153
|
+
const entityIndex = entity.path.at(-1);
|
|
17154
|
+
if (typeof entityIndex !== "number") throw new TypeError(`Expected numeric index at end of entity path "${entity.path.join(".")}"`);
|
|
17155
|
+
const parentArray = get$1(draft, parentPath);
|
|
17156
|
+
if (!Array.isArray(parentArray)) throw new TypeError(`Expected array at path "${parentPath.join(".")}" but got ${typeof parentArray}`);
|
|
17157
|
+
parentArray[entityIndex] = patchedEntity;
|
|
17158
|
+
});
|
|
17159
|
+
}
|
|
17160
|
+
/**
|
|
17041
17161
|
* Deletes an entity by ID.
|
|
17042
17162
|
*
|
|
17043
17163
|
* @returns A new definition with the entity removed (original is not modified)
|
|
@@ -18143,6 +18263,6 @@ function generateDefaultTheme() {
|
|
|
18143
18263
|
};
|
|
18144
18264
|
}
|
|
18145
18265
|
//#endregion
|
|
18146
|
-
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, 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, 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, webConfigSpec, withByKeyMergeRule, withDefault, withEnt, withFix, withIssueChecker, withMergeRule, withPlaceholderSlots, withRef };
|
|
18266
|
+
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 };
|
|
18147
18267
|
|
|
18148
|
-
//# sourceMappingURL=dist-
|
|
18268
|
+
//# sourceMappingURL=dist-CtqdAorB.js.map
|