@baseplate-dev/plugin-auth 0.6.12 → 0.6.14
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 +40 -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-3sV-KVGF.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-0m3QgjSy.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-QrOyqu9V.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-D8BnFQKk.js +1 -0
- package/dist/web/assets/{common-CLtpg163.js → common-7-ZtKO5B.js} +3 -3
- package/dist/web/assets/{common-ooa00sM_.js → common-Aq-HXybV.js} +6 -6
- package/dist/web/assets/{common-C0Hur22D.js → common-B8N9gx2s.js} +4 -4
- package/dist/web/assets/{common-BFKR_7HQ.js → common-BPbNs2A1.js} +6 -6
- package/dist/web/assets/{common-CTYcv1u_.js → common-B_XZ3l9w.js} +3 -3
- package/dist/web/assets/{common-B8Z1_D6-.js → common-CDrUdhRf.js} +4 -4
- package/dist/web/assets/{dist-DicVrB_Z.js → dist-D3CkiDKT.js} +387 -262
- 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-D3ocnNxw.js} +2 -2
- package/dist/web/assets/hostInit-D3RxwboF.js +99 -0
- package/dist/web/assets/{index-CR54yoeW.js → index-CozZxQl1.js} +2 -2
- package/dist/web/assets/{mf-entry-bootstrap-0-4f84e81c.js → mf-entry-bootstrap-0-069a3ab2.js} +5 -2
- package/dist/web/assets/{model-utils-CQpTF3uf.js → model-utils-CYaLYwoX.js} +48 -14
- package/dist/web/assets/{models-Bc3L4Vsl.js → models-BX4xFiEn.js} +3 -3
- package/dist/web/assets/{models-BIKzGkW3.js → models-k-iaCft-.js} +3 -3
- package/dist/web/assets/{plugin-definition-33i4r91s.js → plugin-definition-BI565qFo.js} +3 -3
- package/dist/web/assets/{plugin-definition-BhNnSvrD.js → plugin-definition-CI1aEVGv.js} +3 -3
- package/dist/web/assets/{styles-BT_OTXuv.js → styles-f4jHVv0S.js} +15 -12
- package/dist/web/assets/{virtualExposes-B_hX31Ln.js → virtualExposes-BHQhgLE-.js} +1 -1
- package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-aH8n-Nbe.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-I_SxfvGj.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-BQ0UMKSv.js} +50 -15
- package/dist/web/assets/{web-Dso6eI9u.js → web-BRvS0HRS.js} +17 -17
- package/dist/web/assets/{web-aKoJoBnQ.js → web-CkbTu31Q.js} +16 -16
- package/dist/web/assets/{web-DYbNyLPi.js → web-Cn3uvuFs.js} +35 -35
- package/dist/web/assets/{web-BDeHApaZ.js → web-DCK_tLVa.js} +31 -18
- package/dist/web/assets/{web-BXB-pvWJ.js → web-Dh6pUTrF.js} +20 -20
- package/dist/web/assets/{web-CJlCNegu.js → web-YXVJWeXy.js} +3 -3
- package/dist/web/assets/{web-BC9MejP0.js → web-nLSlkJy_.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-CYaLYwoX.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));
|
|
@@ -3267,16 +3267,20 @@ var createAuthorizerRoleSchema = definitionSchemaWithSlots({ modelSlot: modelEnt
|
|
|
3267
3267
|
*/
|
|
3268
3268
|
name: VALIDATORS.CAMEL_CASE_STRING,
|
|
3269
3269
|
/**
|
|
3270
|
-
*
|
|
3270
|
+
* Authorization expression — a JS-like boolean DSL, not arbitrary
|
|
3271
|
+
* TypeScript. See `.agents/authorization.md` for the full grammar.
|
|
3271
3272
|
*
|
|
3272
|
-
* Available context
|
|
3273
|
-
* - `model
|
|
3274
|
-
* - `userId`
|
|
3275
|
-
* - `hasRole()` / `hasSomeRole()`
|
|
3273
|
+
* Available context:
|
|
3274
|
+
* - `model.<field>` — the row being authorized (scalars and relations)
|
|
3275
|
+
* - `userId` / `isAuthenticated` — the principal
|
|
3276
|
+
* - `hasRole()` / `hasSomeRole()` — global roles, or role delegation
|
|
3277
|
+
* across a relation in the two-argument form
|
|
3278
|
+
* - `exists()` / `all()` — quantify over a has-many relation
|
|
3276
3279
|
*
|
|
3277
|
-
* @example 'model.
|
|
3278
|
-
* @example
|
|
3279
|
-
* @example
|
|
3280
|
+
* @example 'model.userId === userId'
|
|
3281
|
+
* @example "hasRole('admin')"
|
|
3282
|
+
* @example "hasRole(model.blog, 'owner')"
|
|
3283
|
+
* @example 'exists(model.members, { userId: userId })'
|
|
3280
3284
|
*/
|
|
3281
3285
|
expression: ctx.withExpression(authorizerExpressionRef, { model: modelSlot })
|
|
3282
3286
|
}), {
|
|
@@ -4284,7 +4288,8 @@ function binop(name, prec) {
|
|
|
4284
4288
|
binop: prec
|
|
4285
4289
|
});
|
|
4286
4290
|
}
|
|
4287
|
-
var beforeExpr = { beforeExpr: true }
|
|
4291
|
+
var beforeExpr = { beforeExpr: true };
|
|
4292
|
+
var startsExpr = { startsExpr: true };
|
|
4288
4293
|
var keywords = {};
|
|
4289
4294
|
function kw(name, options) {
|
|
4290
4295
|
if (options === void 0) options = {};
|
|
@@ -4536,11 +4541,26 @@ function pushComment(options, array) {
|
|
|
4536
4541
|
array.push(comment);
|
|
4537
4542
|
};
|
|
4538
4543
|
}
|
|
4539
|
-
var SCOPE_TOP = 1
|
|
4544
|
+
var SCOPE_TOP = 1;
|
|
4545
|
+
var SCOPE_FUNCTION = 2;
|
|
4546
|
+
var SCOPE_ASYNC = 4;
|
|
4547
|
+
var SCOPE_GENERATOR = 8;
|
|
4548
|
+
var SCOPE_ARROW = 16;
|
|
4549
|
+
var SCOPE_SIMPLE_CATCH = 32;
|
|
4550
|
+
var SCOPE_SUPER = 64;
|
|
4551
|
+
var SCOPE_DIRECT_SUPER = 128;
|
|
4552
|
+
var SCOPE_CLASS_STATIC_BLOCK = 256;
|
|
4553
|
+
var SCOPE_CLASS_FIELD_INIT = 512;
|
|
4554
|
+
var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
4540
4555
|
function functionFlags(async, generator) {
|
|
4541
4556
|
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
|
|
4542
4557
|
}
|
|
4543
|
-
var BIND_NONE = 0
|
|
4558
|
+
var BIND_NONE = 0;
|
|
4559
|
+
var BIND_VAR = 1;
|
|
4560
|
+
var BIND_LEXICAL = 2;
|
|
4561
|
+
var BIND_FUNCTION = 3;
|
|
4562
|
+
var BIND_SIMPLE_CATCH = 4;
|
|
4563
|
+
var BIND_OUTSIDE = 5;
|
|
4544
4564
|
var Parser = function Parser(options, input, startPos) {
|
|
4545
4565
|
this.options = options = getOptions(options);
|
|
4546
4566
|
this.sourceFile = options.sourceFile;
|
|
@@ -4761,7 +4781,8 @@ pp$8.parseTopLevel = function(node) {
|
|
|
4761
4781
|
node.sourceType = this.options.sourceType;
|
|
4762
4782
|
return this.finishNode(node, "Program");
|
|
4763
4783
|
};
|
|
4764
|
-
var loopLabel = { kind: "loop" }
|
|
4784
|
+
var loopLabel = { kind: "loop" };
|
|
4785
|
+
var switchLabel = { kind: "switch" };
|
|
4765
4786
|
pp$8.isLet = function(context) {
|
|
4766
4787
|
if (this.options.ecmaVersion < 6 || !this.isContextual("let")) return false;
|
|
4767
4788
|
skipWhiteSpace.lastIndex = this.pos;
|
|
@@ -5174,7 +5195,9 @@ pp$8.parseVarId = function(decl, kind) {
|
|
|
5174
5195
|
decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
|
|
5175
5196
|
this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
|
|
5176
5197
|
};
|
|
5177
|
-
var FUNC_STATEMENT = 1
|
|
5198
|
+
var FUNC_STATEMENT = 1;
|
|
5199
|
+
var FUNC_HANGING_STATEMENT = 2;
|
|
5200
|
+
var FUNC_NULLABLE_ID = 4;
|
|
5178
5201
|
pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) {
|
|
5179
5202
|
this.initFunction(node);
|
|
5180
5203
|
if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
|
|
@@ -8886,14 +8909,6 @@ function validateAuthorizerExpression(ast, modelContext, pluginStore, definition
|
|
|
8886
8909
|
});
|
|
8887
8910
|
return;
|
|
8888
8911
|
}
|
|
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
8912
|
for (const [i, role] of roles.entries()) if (!relation.foreignAuthorizerRoleNames.has(role)) {
|
|
8898
8913
|
const availableRoles = [...relation.foreignAuthorizerRoleNames].join(", ");
|
|
8899
8914
|
warnings.push({
|
|
@@ -9028,7 +9043,6 @@ function buildModelExpressionContext(model, allModels) {
|
|
|
9028
9043
|
for (const relation of model.model?.relations ?? []) {
|
|
9029
9044
|
const foreignModel = lookupModel(relation.modelRef);
|
|
9030
9045
|
relationInfo.set(relation.name, {
|
|
9031
|
-
referenceCount: relation.references?.length ?? 0,
|
|
9032
9046
|
foreignModelName: foreignModel?.name ?? relation.modelRef,
|
|
9033
9047
|
foreignAuthorizerRoleNames: foreignModel ? buildAuthorizerRoleNames(foreignModel) : /* @__PURE__ */ new Set(),
|
|
9034
9048
|
...foreignModel ? buildFieldInfo(foreignModel) : {},
|
|
@@ -9040,7 +9054,6 @@ function buildModelExpressionContext(model, allModels) {
|
|
|
9040
9054
|
if (rel.modelRef !== currentModelId || !rel.foreignRelationName) continue;
|
|
9041
9055
|
if (relationInfo.has(rel.foreignRelationName)) continue;
|
|
9042
9056
|
relationInfo.set(rel.foreignRelationName, {
|
|
9043
|
-
referenceCount: rel.references?.length ?? 0,
|
|
9044
9057
|
foreignModelName: otherModel.name,
|
|
9045
9058
|
foreignAuthorizerRoleNames: buildAuthorizerRoleNames(otherModel),
|
|
9046
9059
|
...buildFieldInfo(otherModel),
|
|
@@ -9076,6 +9089,7 @@ function buildModelExpressionContext(model, allModels) {
|
|
|
9076
9089
|
*/
|
|
9077
9090
|
var AuthorizerExpressionParser = class extends RefExpressionParser {
|
|
9078
9091
|
name = "authorizer-expression";
|
|
9092
|
+
description = "JS-like boolean DSL over `model.<field>`, `userId`, and `isAuthenticated` — e.g. `model.userId === userId`, `hasRole(model.blog, 'owner')`, `exists(model.members, { userId: userId })`. See .agents/authorization.md for the full grammar.";
|
|
9079
9093
|
/**
|
|
9080
9094
|
* Creates a Zod schema for validating expression strings.
|
|
9081
9095
|
* Requires a non-empty string value.
|
|
@@ -9542,7 +9556,21 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
|
|
|
9542
9556
|
type: modelAuthorizerRoleEntityType,
|
|
9543
9557
|
onDelete: "DELETE",
|
|
9544
9558
|
parentSlot: modelSlot
|
|
9545
|
-
})), [])
|
|
9559
|
+
})), []),
|
|
9560
|
+
/**
|
|
9561
|
+
* Whether this field is exposed as a `where` filter operand
|
|
9562
|
+
* when the model's list query has where filtering enabled.
|
|
9563
|
+
* Opt-in: an author must explicitly choose which exposed
|
|
9564
|
+
* fields are filterable.
|
|
9565
|
+
*/
|
|
9566
|
+
filterable: ctx.withDefault(__mf_0.boolean(), false),
|
|
9567
|
+
/**
|
|
9568
|
+
* Whether this field is exposed as an `orderBy` sort key
|
|
9569
|
+
* when the model's list query has sorting enabled. Opt-in:
|
|
9570
|
+
* an author must explicitly choose which exposed fields are
|
|
9571
|
+
* sortable.
|
|
9572
|
+
*/
|
|
9573
|
+
sortable: ctx.withDefault(__mf_0.boolean(), false)
|
|
9546
9574
|
})).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([])),
|
|
9547
9575
|
localRelations: __mf_0.array(__mf_0.object({
|
|
9548
9576
|
ref: ctx.withRef({
|
|
@@ -9568,7 +9596,8 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
|
|
|
9568
9596
|
type: modelAuthorizerRoleEntityType,
|
|
9569
9597
|
onDelete: "DELETE",
|
|
9570
9598
|
parentSlot: modelSlot
|
|
9571
|
-
})), [])
|
|
9599
|
+
})), []),
|
|
9600
|
+
paginated: ctx.withDefault(__mf_0.boolean(), false)
|
|
9572
9601
|
})).apply(withByKeyMergeRule({ getKey: (item) => item.ref })).apply(withDefault([]))
|
|
9573
9602
|
}), {}),
|
|
9574
9603
|
queries: ctx.withDefault(__mf_0.object({
|
|
@@ -9581,7 +9610,10 @@ var createModelGraphqlSchema = definitionSchemaWithSlots({ modelSlot: modelEntit
|
|
|
9581
9610
|
get: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9582
9611
|
list: ctx.withDefault(__mf_0.object({
|
|
9583
9612
|
enabled: ctx.withDefault(__mf_0.boolean(), false),
|
|
9584
|
-
count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
|
|
9613
|
+
count: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9614
|
+
connection: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9615
|
+
where: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {}),
|
|
9616
|
+
orderBy: ctx.withDefault(__mf_0.object({ enabled: ctx.withDefault(__mf_0.boolean(), false) }), {})
|
|
9585
9617
|
}), {})
|
|
9586
9618
|
}), {}),
|
|
9587
9619
|
mutations: ctx.withDefault(__mf_0.object({
|
|
@@ -10310,18 +10342,46 @@ var createAdminAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType },
|
|
|
10310
10342
|
pathPrefix: "/admin"
|
|
10311
10343
|
}));
|
|
10312
10344
|
//#endregion
|
|
10345
|
+
//#region ../../packages/project-builder-lib/dist/schema/apps/web/web-app-schema-extension-spec.js
|
|
10346
|
+
/**
|
|
10347
|
+
* Spec for registering plugin-contributed schema extensions on the web app
|
|
10348
|
+
* config, keyed by plugin key. Each plugin's schema creator is merged into the
|
|
10349
|
+
* web app config under `pluginData[pluginKey]`, letting plugins add per-app
|
|
10350
|
+
* opt-in settings without editing the core web app schema.
|
|
10351
|
+
*/
|
|
10352
|
+
var webAppSchemaExtensionSpec = createFieldMapSpec("core/web-app-schema-extension", (t) => ({ schemas: t.map() }), { use: (values) => ({ getAllSchemaCreators: () => values.schemas }) });
|
|
10353
|
+
/**
|
|
10354
|
+
* Reads a plugin's per-app settings slice from a web app config.
|
|
10355
|
+
*
|
|
10356
|
+
* `pluginData` is validated per-plugin by that plugin's registered schema
|
|
10357
|
+
* creator, but is statically untyped here (the merged schema is built at
|
|
10358
|
+
* runtime). Callers cast the result to the type they infer from their own schema
|
|
10359
|
+
* creator via `def.InferOutput`.
|
|
10360
|
+
*
|
|
10361
|
+
* @param webApp - The web app config to read from
|
|
10362
|
+
* @param pluginKey - The registering plugin's key
|
|
10363
|
+
* @returns The plugin's slice, or `undefined` if the app has not opted in
|
|
10364
|
+
*/
|
|
10365
|
+
function getWebAppPluginData(webApp, pluginKey) {
|
|
10366
|
+
return webApp.pluginData?.[pluginKey];
|
|
10367
|
+
}
|
|
10368
|
+
//#endregion
|
|
10313
10369
|
//#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
|
-
|
|
10370
|
+
var createWebAppSchema = definitionSchemaWithSlots({ appSlot: appEntityType }, (ctx, { appSlot }) => {
|
|
10371
|
+
const pluginKeys = ctx.plugins.getPluginKeys();
|
|
10372
|
+
const schemaCreators = ctx.plugins.use(webAppSchemaExtensionSpec).getAllSchemaCreators();
|
|
10373
|
+
const pluginDataSchema = __mf_0.object(Object.fromEntries(pluginKeys.map((pluginKey) => [pluginKey, (schemaCreators.get(pluginKey)?.(ctx) ?? __mf_0.unknown()).optional()])));
|
|
10374
|
+
return __mf_0.object({
|
|
10375
|
+
...baseAppValidators,
|
|
10376
|
+
devPort: __mf_0.number().int().positive(),
|
|
10377
|
+
type: __mf_0.literal("web"),
|
|
10378
|
+
title: __mf_0.string().default(""),
|
|
10379
|
+
description: __mf_0.string().default(""),
|
|
10380
|
+
enableSubscriptions: ctx.withDefault(__mf_0.boolean(), false),
|
|
10381
|
+
pluginData: pluginDataSchema.optional(),
|
|
10382
|
+
adminApp: createAdminAppSchema(ctx, { appSlot })
|
|
10383
|
+
});
|
|
10384
|
+
});
|
|
10325
10385
|
var webAppEntryType = createAppEntryType("web");
|
|
10326
10386
|
//#endregion
|
|
10327
10387
|
//#region ../../packages/project-builder-lib/dist/schema/libraries/types.js
|
|
@@ -15879,6 +15939,31 @@ function migrateUuidField(field) {
|
|
|
15879
15939
|
}
|
|
15880
15940
|
};
|
|
15881
15941
|
}
|
|
15942
|
+
var migration031UuidDefaultGeneration = createSchemaMigration({
|
|
15943
|
+
version: 31,
|
|
15944
|
+
name: "uuidDefaultGeneration",
|
|
15945
|
+
description: "Replace genUuid boolean with defaultGeneration enum (none | uuidv4 | uuidv7) on UUID fields",
|
|
15946
|
+
migrate: (config) => {
|
|
15947
|
+
if (!config.models) return config;
|
|
15948
|
+
return {
|
|
15949
|
+
...config,
|
|
15950
|
+
models: config.models.map((model) => {
|
|
15951
|
+
if (!model.model?.fields) return model;
|
|
15952
|
+
return {
|
|
15953
|
+
...model,
|
|
15954
|
+
model: {
|
|
15955
|
+
...model.model,
|
|
15956
|
+
fields: model.model.fields.map(migrateUuidField)
|
|
15957
|
+
}
|
|
15958
|
+
};
|
|
15959
|
+
})
|
|
15960
|
+
};
|
|
15961
|
+
}
|
|
15962
|
+
});
|
|
15963
|
+
//#endregion
|
|
15964
|
+
//#region ../../packages/project-builder-lib/dist/migrations/migration-032-web-app-plugin-data.js
|
|
15965
|
+
var STORAGE_PLUGIN_KEY = "baseplate-dev_plugin-storage_storage";
|
|
15966
|
+
var NOTIFICATIONS_PLUGIN_KEY = "baseplate-dev_plugin-notifications_notifications";
|
|
15882
15967
|
//#endregion
|
|
15883
15968
|
//#region ../../packages/project-builder-lib/dist/migrations/index.js
|
|
15884
15969
|
var SCHEMA_MIGRATIONS = [
|
|
@@ -15908,24 +15993,32 @@ var SCHEMA_MIGRATIONS = [
|
|
|
15908
15993
|
migration028EnableStripePlugin,
|
|
15909
15994
|
migration029AdminRoleAndAutoAssigned,
|
|
15910
15995
|
migration030RemoveThemeHoverColors,
|
|
15996
|
+
migration031UuidDefaultGeneration,
|
|
15911
15997
|
createSchemaMigration({
|
|
15912
|
-
version:
|
|
15913
|
-
name: "
|
|
15914
|
-
description: "
|
|
15998
|
+
version: 32,
|
|
15999
|
+
name: "webAppPluginData",
|
|
16000
|
+
description: "Move includeUploadComponents/includeNotifications into web app pluginData and drop includeAuth",
|
|
15915
16001
|
migrate: (config) => {
|
|
15916
|
-
|
|
16002
|
+
const apps = config.apps?.map((app) => {
|
|
16003
|
+
if (app.type !== "web") return app;
|
|
16004
|
+
const { includeAuth: _includeAuth, includeUploadComponents, includeNotifications, pluginData: existingPluginData, ...rest } = app;
|
|
16005
|
+
const pluginData = { ...existingPluginData };
|
|
16006
|
+
if (includeUploadComponents) pluginData[STORAGE_PLUGIN_KEY] = {
|
|
16007
|
+
...pluginData[STORAGE_PLUGIN_KEY],
|
|
16008
|
+
includeUploadComponents: true
|
|
16009
|
+
};
|
|
16010
|
+
if (includeNotifications) pluginData[NOTIFICATIONS_PLUGIN_KEY] = {
|
|
16011
|
+
...pluginData[NOTIFICATIONS_PLUGIN_KEY],
|
|
16012
|
+
includeNotifications: true
|
|
16013
|
+
};
|
|
16014
|
+
return Object.keys(pluginData).length > 0 ? {
|
|
16015
|
+
...rest,
|
|
16016
|
+
pluginData
|
|
16017
|
+
} : rest;
|
|
16018
|
+
});
|
|
15917
16019
|
return {
|
|
15918
16020
|
...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
|
-
})
|
|
16021
|
+
apps: apps ?? []
|
|
15929
16022
|
};
|
|
15930
16023
|
}
|
|
15931
16024
|
})
|
|
@@ -16466,7 +16559,8 @@ function createIssueFixSetter(issue, container) {
|
|
|
16466
16559
|
const applyFn = fix.apply;
|
|
16467
16560
|
return (draft) => {
|
|
16468
16561
|
const absolutePath = resolveIssuePath(issue, container);
|
|
16469
|
-
|
|
16562
|
+
const currentValue = get$1(draft, absolutePath);
|
|
16563
|
+
set$1(draft, absolutePath, applyFn(currentValue));
|
|
16470
16564
|
};
|
|
16471
16565
|
}
|
|
16472
16566
|
}
|
|
@@ -17038,6 +17132,37 @@ function updateEntity({ entityTypeName, entityId, entityData }, context) {
|
|
|
17038
17132
|
});
|
|
17039
17133
|
}
|
|
17040
17134
|
/**
|
|
17135
|
+
* Partially updates an existing entity by ID.
|
|
17136
|
+
*
|
|
17137
|
+
* Shallow-merges the provided root-level fields into the existing entity data.
|
|
17138
|
+
* Provided fields replace the existing values wholesale (nested objects and
|
|
17139
|
+
* arrays are not deep-merged). The entity's ID is always preserved.
|
|
17140
|
+
*
|
|
17141
|
+
* @returns A new definition with the entity patched (original is not modified)
|
|
17142
|
+
*/
|
|
17143
|
+
function patchEntity({ entityTypeName, entityId, entityData }, context) {
|
|
17144
|
+
const metadata = context.entityTypeMap.get(entityTypeName);
|
|
17145
|
+
if (!metadata) throw new Error(`Unknown entity type: ${entityTypeName}`);
|
|
17146
|
+
const entity = context.lookupEntity(entityId);
|
|
17147
|
+
if (!entity) throw new Error(`Entity "${entityId}" of type "${entityTypeName}" not found`);
|
|
17148
|
+
const currentEntity = get$1(context.serializedDefinition, entity.path);
|
|
17149
|
+
if (!isPlainObject$1(currentEntity)) throw new TypeError(`Expected plain object at path "${entity.path.join(".")}" but got ${typeof currentEntity}`);
|
|
17150
|
+
const mergedEntity = {
|
|
17151
|
+
...currentEntity,
|
|
17152
|
+
...entityData,
|
|
17153
|
+
id: currentEntity.id
|
|
17154
|
+
};
|
|
17155
|
+
const patchedEntity = assignEntityIds(metadata.elementSchema, mergedEntity, { isExistingId: (id) => !!context.lookupEntity(id) });
|
|
17156
|
+
return produce(context.serializedDefinition, (draft) => {
|
|
17157
|
+
const parentPath = entity.path.slice(0, -1);
|
|
17158
|
+
const entityIndex = entity.path.at(-1);
|
|
17159
|
+
if (typeof entityIndex !== "number") throw new TypeError(`Expected numeric index at end of entity path "${entity.path.join(".")}"`);
|
|
17160
|
+
const parentArray = get$1(draft, parentPath);
|
|
17161
|
+
if (!Array.isArray(parentArray)) throw new TypeError(`Expected array at path "${parentPath.join(".")}" but got ${typeof parentArray}`);
|
|
17162
|
+
parentArray[entityIndex] = patchedEntity;
|
|
17163
|
+
});
|
|
17164
|
+
}
|
|
17165
|
+
/**
|
|
17041
17166
|
* Deletes an entity by ID.
|
|
17042
17167
|
*
|
|
17043
17168
|
* @returns A new definition with the entity removed (original is not modified)
|
|
@@ -18143,6 +18268,6 @@ function generateDefaultTheme() {
|
|
|
18143
18268
|
};
|
|
18144
18269
|
}
|
|
18145
18270
|
//#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 };
|
|
18271
|
+
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
18272
|
|
|
18148
|
-
//# sourceMappingURL=dist-
|
|
18273
|
+
//# sourceMappingURL=dist-D3CkiDKT.js.map
|