@baseplate-dev/plugin-auth 2.0.8 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts +12 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js +4 -2
- package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts +1 -2
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts +12 -0
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js +2 -1
- package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.ts +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts +1 -2
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js +1 -1
- package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts +12 -0
- package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js +4 -2
- package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts +1 -2
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts +12 -0
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js +2 -1
- package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts.map +1 -1
- package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.ts +1 -1
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts +1 -2
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js +1 -1
- package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts +12 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts +6 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.js +4 -2
- package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.js.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts +1 -2
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/ts-import-providers.js.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts +6 -0
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js +2 -1
- package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts +6 -0
- package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.d.ts +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.d.ts.map +1 -1
- package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.ts +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-CZKXKtdg.js → __federation_expose_auth0CoreCommon-xk1Gj1WU.js} +3 -3
- package/dist/web/assets/{__federation_expose_auth0CoreCommon-CZKXKtdg.js.map → __federation_expose_auth0CoreCommon-xk1Gj1WU.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-geAHQXw8.js → __federation_expose_auth0CoreWeb-CAiUkJwE.js} +5 -5
- package/dist/web/assets/{__federation_expose_auth0CoreWeb-geAHQXw8.js.map → __federation_expose_auth0CoreWeb-CAiUkJwE.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreCommon-BViBe4DS.js → __federation_expose_authCoreCommon-K21saJbW.js} +3 -3
- package/dist/web/assets/{__federation_expose_authCoreCommon-BViBe4DS.js.map → __federation_expose_authCoreCommon-K21saJbW.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_authCoreWeb-Bg3h64mw.js → __federation_expose_authCoreWeb-L7mv-Kl9.js} +6 -6
- package/dist/web/assets/{__federation_expose_authCoreWeb-Bg3h64mw.js.map → __federation_expose_authCoreWeb-L7mv-Kl9.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-M_4c2ukP.js → __federation_expose_local-authAdminCommon-BcMGRCCu.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminCommon-M_4c2ukP.js.map → __federation_expose_local-authAdminCommon-BcMGRCCu.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-BSY1dZOn.js → __federation_expose_local-authAdminWeb-DUY1rKEt.js} +2 -2
- package/dist/web/assets/{__federation_expose_local-authAdminWeb-BSY1dZOn.js.map → __federation_expose_local-authAdminWeb-DUY1rKEt.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-DG2cv8RB.js → __federation_expose_local-authCoreCommon-B1wtgXDT.js} +3 -3
- package/dist/web/assets/{__federation_expose_local-authCoreCommon-DG2cv8RB.js.map → __federation_expose_local-authCoreCommon-B1wtgXDT.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-luPBuflE.js → __federation_expose_local-authCoreWeb-CSWj3XON.js} +5 -5
- package/dist/web/assets/{__federation_expose_local-authCoreWeb-luPBuflE.js.map → __federation_expose_local-authCoreWeb-CSWj3XON.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-Cb6bmMtY.js → __federation_expose_placeholder-authCoreCommon-BTZdABuy.js} +3 -3
- package/dist/web/assets/{__federation_expose_placeholder-authCoreCommon-Cb6bmMtY.js.map → __federation_expose_placeholder-authCoreCommon-BTZdABuy.js.map} +1 -1
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-DUhTjT7C.js → __federation_expose_placeholder-authCoreWeb-DXc_X2aO.js} +5 -5
- package/dist/web/assets/{__federation_expose_placeholder-authCoreWeb-DUhTjT7C.js.map → __federation_expose_placeholder-authCoreWeb-DXc_X2aO.js.map} +1 -1
- package/dist/web/assets/{__federation_fn_import-Csq_dMs0.js → __federation_fn_import-BVpKhyMw.js} +2 -2
- package/dist/web/assets/{__federation_fn_import-Csq_dMs0.js.map → __federation_fn_import-BVpKhyMw.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-CgtWwz-I.js → web-gdwlRH2l.js} +5 -5
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/{web-CgtWwz-I.js.map → web-gdwlRH2l.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{project-builder-lib-DcCDifTM.js → project-builder-lib-BvJ1_iif.js} +542 -305
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-BvJ1_iif.js.map +1 -0
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-DST25W-W.js → ui-components-E30UR3cY.js} +8 -7
- package/dist/web/assets/__federation_shared_@baseplate-dev/{ui-components-DST25W-W.js.map → ui-components-E30UR3cY.js.map} +1 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/{utils-DPq3fZwQ.js → utils-Ciu7eAT9.js} +42 -3
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-Ciu7eAT9.js.map +1 -0
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-WDylYaIf.js → react-router-AU7vpPwr.js} +2 -2
- package/dist/web/assets/__federation_shared_@tanstack/{react-router-WDylYaIf.js.map → react-router-AU7vpPwr.js.map} +1 -1
- package/dist/web/assets/{get-auth-plugin-definition-BW3aipsm.js → get-auth-plugin-definition-CHOjVGaq.js} +2 -2
- package/dist/web/assets/{get-auth-plugin-definition-BW3aipsm.js.map → get-auth-plugin-definition-CHOjVGaq.js.map} +1 -1
- package/dist/web/assets/{index-D17gcHW9.js → index-DqPqnxYC.js} +2 -2
- package/dist/web/assets/{index-D17gcHW9.js.map → index-DqPqnxYC.js.map} +1 -1
- package/dist/web/assets/{index.esm-Db3JT_Sb.js → index.esm-DUunUtBj.js} +2 -2
- package/dist/web/assets/{index.esm-Db3JT_Sb.js.map → index.esm-DUunUtBj.js.map} +1 -1
- package/dist/web/assets/{model-merger-BZk6R5TG.js → model-merger-CI1pu411.js} +3 -3
- package/dist/web/assets/{model-merger-BZk6R5TG.js.map → model-merger-CI1pu411.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BzNRzlSY.js → plugin-definition--cfUfY5Z.js} +2 -2
- package/dist/web/assets/{plugin-definition-BzNRzlSY.js.map → plugin-definition--cfUfY5Z.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-BYGf_zSR.js → plugin-definition-BYzEIUL9.js} +2 -2
- package/dist/web/assets/{plugin-definition-BYGf_zSR.js.map → plugin-definition-BYzEIUL9.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-Btdhhs9H.js → plugin-definition-BzhiPIBh.js} +2 -2
- package/dist/web/assets/{plugin-definition-Btdhhs9H.js.map → plugin-definition-BzhiPIBh.js.map} +1 -1
- package/dist/web/assets/{plugin-definition-TOGLgOaU.js → plugin-definition-CIiMl7Zf.js} +2 -2
- package/dist/web/assets/{plugin-definition-TOGLgOaU.js.map → plugin-definition-CIiMl7Zf.js.map} +1 -1
- package/dist/web/assets/{react-CyMZK5Vn.js → react-DW8S9iUr.js} +2 -2
- package/dist/web/assets/{react-CyMZK5Vn.js.map → react-DW8S9iUr.js.map} +1 -1
- package/dist/web/assets/remoteEntry.js +10 -10
- package/dist/web/assets/{styles-CkOdb5Qq.js → styles-N05E1ZaS.js} +3 -3
- package/dist/web/assets/{styles-CkOdb5Qq.js.map → styles-N05E1ZaS.js.map} +1 -1
- package/package.json +12 -12
- package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-DcCDifTM.js.map +0 -1
- package/dist/web/assets/__federation_shared_@baseplate-dev/utils-DPq3fZwQ.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as createPluginSpec, m as mapValues, a as createEntityType, d as definitionSchema, D as DefinitionReferenceMarker, g as get, R as REF_ANNOTATIONS_MARKER_SYMBOL, b as createDefinitionSchemaParserContext, s as set$1, e as modelForeignRelationEntityType, f as modelLocalRelationEntityType, h as modelScalarFieldEntityType, i as
|
|
2
|
-
export { I as DefinitionDiffArrayIncludesField, G as DefinitionDiffKeyedArrayField, H as DefinitionDiffReplacementField, u as DefinitionEntityType, F as FeatureUtils, L as applyDefinitionDiff, B as applyModelMergerDiff, C as applyModelMergerResultInPlace, E as createAndApplyModelMergerResults, K as createDefinitionDiff, J as createDefinitionDiffConfig, w as createFeatureSchema, t as createInitializedPluginSpec, y as createModelMergerResult, A as createModelMergerResults, z as doesModelMergerResultsHaveChanges, v as featureNameSchema, x as modelMergerDefinitionDiffConfig } from '../model-merger-
|
|
3
|
-
import { importShared } from '../__federation_fn_import-
|
|
1
|
+
import { c as createPluginSpec, m as mapValues, a as createEntityType, d as definitionSchema, D as DefinitionReferenceMarker, g as get, R as REF_ANNOTATIONS_MARKER_SYMBOL, b as createDefinitionSchemaParserContext, s as set$1, e as modelForeignRelationEntityType, f as modelLocalRelationEntityType, h as modelScalarFieldEntityType, i as modelEntityType, j as modelTransformerEntityType, k as modelEnumValueEntityType, l as featureEntityType, n as modelEnumEntityType, o as modelUniqueConstraintEntityType, p as createFeaturesSchema, M as ModelUtils, q as omit, r as cloneDeep } from '../model-merger-CI1pu411.js';
|
|
2
|
+
export { I as DefinitionDiffArrayIncludesField, G as DefinitionDiffKeyedArrayField, H as DefinitionDiffReplacementField, u as DefinitionEntityType, F as FeatureUtils, L as applyDefinitionDiff, B as applyModelMergerDiff, C as applyModelMergerResultInPlace, E as createAndApplyModelMergerResults, K as createDefinitionDiff, J as createDefinitionDiffConfig, w as createFeatureSchema, t as createInitializedPluginSpec, y as createModelMergerResult, A as createModelMergerResults, z as doesModelMergerResultsHaveChanges, v as featureNameSchema, x as modelMergerDefinitionDiffConfig } from '../model-merger-CI1pu411.js';
|
|
3
|
+
import { importShared } from '../__federation_fn_import-BVpKhyMw.js';
|
|
4
4
|
import { i as isEqual } from '../isEqual-DAXqKRba.js';
|
|
5
5
|
import { s as sortBy } from '../sortBy-BPH_zRB8.js';
|
|
6
6
|
|
|
@@ -312,45 +312,45 @@ function getManagedPluginsForPlugin(pluginStore, pluginKey) {
|
|
|
312
312
|
.map((p) => p.metadata);
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
const {z: z$
|
|
315
|
+
const {z: z$r} = await importShared('zod');
|
|
316
316
|
|
|
317
317
|
// matches semver
|
|
318
|
-
const versionSchema = z$
|
|
319
|
-
const pluginSpecSupportSchema = z$
|
|
320
|
-
spec: z$
|
|
321
|
-
version: z$
|
|
318
|
+
const versionSchema = z$r.string().regex(/^(\d+\.\d+\.\d+)$/);
|
|
319
|
+
const pluginSpecSupportSchema = z$r.object({
|
|
320
|
+
spec: z$r.string().min(1),
|
|
321
|
+
version: z$r.string().min(1),
|
|
322
322
|
});
|
|
323
|
-
const pluginSpecDependencySchema = z$
|
|
324
|
-
spec: z$
|
|
325
|
-
version: z$
|
|
323
|
+
const pluginSpecDependencySchema = z$r.object({
|
|
324
|
+
spec: z$r.string(),
|
|
325
|
+
version: z$r.string(),
|
|
326
326
|
});
|
|
327
327
|
/**
|
|
328
328
|
* Schema for the plugin's metadata (plugin.json)
|
|
329
329
|
*/
|
|
330
|
-
const pluginMetadataSchema = z$
|
|
330
|
+
const pluginMetadataSchema = z$r.object({
|
|
331
331
|
/**
|
|
332
332
|
* The name of the plugin - must be lowercase and contain only letters, numbers, and hyphens
|
|
333
333
|
*/
|
|
334
|
-
name: z$
|
|
334
|
+
name: z$r
|
|
335
335
|
.string()
|
|
336
336
|
.min(1)
|
|
337
337
|
.regex(/^[a-z0-9-]+$/),
|
|
338
338
|
/**
|
|
339
339
|
* A list of directories with entrypoints in them. Defaults to ['.']
|
|
340
340
|
*/
|
|
341
|
-
moduleDirectories: z$
|
|
341
|
+
moduleDirectories: z$r.array(z$r.string()).optional(),
|
|
342
342
|
/**
|
|
343
343
|
* The display name of the plugin
|
|
344
344
|
*/
|
|
345
|
-
displayName: z$
|
|
345
|
+
displayName: z$r.string().min(1),
|
|
346
346
|
/**
|
|
347
347
|
* The icon to display for the plugin as a pointer to the icon in the plugin's static folder
|
|
348
348
|
*/
|
|
349
|
-
icon: z$
|
|
349
|
+
icon: z$r.string().optional(),
|
|
350
350
|
/**
|
|
351
351
|
* A description of the plugin
|
|
352
352
|
*/
|
|
353
|
-
description: z$
|
|
353
|
+
description: z$r.string(),
|
|
354
354
|
/**
|
|
355
355
|
* The fully qualified name of the plugin that manages this plugin,
|
|
356
356
|
* e.g. "@baseplate-dev/plugin-auth:auth0" would be managed by the "@baseplate-dev/plugin-auth:auth" plugin.
|
|
@@ -358,7 +358,7 @@ const pluginMetadataSchema = z$o.object({
|
|
|
358
358
|
* Managed plugins do not appear in the plugin list but are managed by the base plugin. If the base
|
|
359
359
|
* plugin is disabled, the managed plugins will also be disabled.
|
|
360
360
|
*/
|
|
361
|
-
managedBy: z$
|
|
361
|
+
managedBy: z$r.string().optional(),
|
|
362
362
|
/**
|
|
363
363
|
* The version of the plugin using semver
|
|
364
364
|
*/
|
|
@@ -366,16 +366,16 @@ const pluginMetadataSchema = z$o.object({
|
|
|
366
366
|
/**
|
|
367
367
|
* Configuration for the specs that the plugin exports/depends on
|
|
368
368
|
*/
|
|
369
|
-
specs: z$
|
|
369
|
+
specs: z$r
|
|
370
370
|
.object({
|
|
371
371
|
/**
|
|
372
372
|
* The specs that the plugin exports
|
|
373
373
|
*/
|
|
374
|
-
exports: z$
|
|
374
|
+
exports: z$r.array(pluginSpecSupportSchema).optional(),
|
|
375
375
|
/**
|
|
376
376
|
* The specs that the plugin depends on
|
|
377
377
|
*/
|
|
378
|
-
dependencies: z$
|
|
378
|
+
dependencies: z$r.array(pluginSpecDependencySchema).optional(),
|
|
379
379
|
})
|
|
380
380
|
.optional(),
|
|
381
381
|
/**
|
|
@@ -383,7 +383,7 @@ const pluginMetadataSchema = z$o.object({
|
|
|
383
383
|
*
|
|
384
384
|
* (It can be used once in the definition but cannot be added)
|
|
385
385
|
*/
|
|
386
|
-
hidden: z$
|
|
386
|
+
hidden: z$r.boolean().optional(),
|
|
387
387
|
});
|
|
388
388
|
|
|
389
389
|
var NOTHING = Symbol.for("immer-nothing");
|
|
@@ -1804,15 +1804,15 @@ function getBackendApp(projectDefinition) {
|
|
|
1804
1804
|
* Given an app config, get the relative directory of the app
|
|
1805
1805
|
*
|
|
1806
1806
|
* @param appConfig The app config
|
|
1807
|
+
* @param monorepoSettings Optional monorepo settings to determine apps folder location
|
|
1807
1808
|
* @returns The directory of the app
|
|
1808
1809
|
*/
|
|
1809
|
-
function getAppDirectory(appConfig) {
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
: `packages/${appConfig.name}`;
|
|
1810
|
+
function getAppDirectory(appConfig, monorepoSettings) {
|
|
1811
|
+
const appsFolder = monorepoSettings?.appsFolder ?? 'apps';
|
|
1812
|
+
return `${appsFolder}/${appConfig.name}`;
|
|
1813
1813
|
}
|
|
1814
|
-
function getBackendRelativePath(appConfig, backendApp) {
|
|
1815
|
-
const backendRelativePath = computeRelativePath(getAppDirectory(appConfig), getAppDirectory(backendApp));
|
|
1814
|
+
function getBackendRelativePath(appConfig, backendApp, monorepoSettings) {
|
|
1815
|
+
const backendRelativePath = computeRelativePath(getAppDirectory(appConfig, monorepoSettings), getAppDirectory(backendApp, monorepoSettings));
|
|
1816
1816
|
return backendRelativePath;
|
|
1817
1817
|
}
|
|
1818
1818
|
const AppUtils = {
|
|
@@ -1827,32 +1827,25 @@ function createAppEntryType(name) {
|
|
|
1827
1827
|
return name;
|
|
1828
1828
|
}
|
|
1829
1829
|
|
|
1830
|
-
const {CASE_VALIDATORS: CASE_VALIDATORS$
|
|
1830
|
+
const {CASE_VALIDATORS: CASE_VALIDATORS$2} = await importShared('@baseplate-dev/utils');
|
|
1831
1831
|
|
|
1832
|
-
const {z: z$
|
|
1832
|
+
const {z: z$q} = await importShared('zod');
|
|
1833
1833
|
const baseAppValidators = {
|
|
1834
|
-
id: z$
|
|
1835
|
-
name: CASE_VALIDATORS$
|
|
1836
|
-
type: z$
|
|
1837
|
-
packageLocation: z$n
|
|
1838
|
-
.string()
|
|
1839
|
-
.regex(/^(?!.*(?:\/|\.\.)\/)(?!^\.\.$)(?!^\.$)(?:[\w\-.]+\/?)+[\w\-.]*|^$/, {
|
|
1840
|
-
message: 'Invalid package location. Must be a valid subdirectory.',
|
|
1841
|
-
})
|
|
1842
|
-
.optional(),
|
|
1834
|
+
id: z$q.string().default(appEntityType.generateNewId()),
|
|
1835
|
+
name: CASE_VALIDATORS$2.KEBAB_CASE,
|
|
1836
|
+
type: z$q.string(),
|
|
1843
1837
|
};
|
|
1844
|
-
const baseAppSchema = z$
|
|
1838
|
+
const baseAppSchema = z$q.object(baseAppValidators);
|
|
1845
1839
|
|
|
1846
|
-
const {z: z$
|
|
1847
|
-
const createBackendAppSchema = definitionSchema(() => z$
|
|
1840
|
+
const {z: z$p} = await importShared('zod');
|
|
1841
|
+
const createBackendAppSchema = definitionSchema(() => z$p.object({
|
|
1848
1842
|
...baseAppValidators,
|
|
1849
|
-
type: z$
|
|
1850
|
-
enableStripe: z$
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
enableAxios: z$m.boolean().optional(),
|
|
1843
|
+
type: z$p.literal('backend'),
|
|
1844
|
+
enableStripe: z$p.boolean().optional(),
|
|
1845
|
+
enableBullQueue: z$p.boolean().optional(),
|
|
1846
|
+
enablePostmark: z$p.boolean().optional(),
|
|
1847
|
+
enableSubscriptions: z$p.boolean().optional(),
|
|
1848
|
+
enableAxios: z$p.boolean().optional(),
|
|
1856
1849
|
}));
|
|
1857
1850
|
const backendAppEntryType = createAppEntryType('backend');
|
|
1858
1851
|
|
|
@@ -2457,141 +2450,101 @@ const SCALAR_FIELD_TYPES = [
|
|
|
2457
2450
|
'enum',
|
|
2458
2451
|
];
|
|
2459
2452
|
|
|
2460
|
-
const {z: z$
|
|
2461
|
-
const oklchColor = z$l
|
|
2462
|
-
.string()
|
|
2463
|
-
.regex(/^oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)$/, {
|
|
2464
|
-
message: 'OKLCH color must be of the format "oklch(l c h [/ a])" where l and c are between 0 and 1 and h is between 0 and 360 and a is between 0 and 100',
|
|
2465
|
-
});
|
|
2466
|
-
const themeColorSchema = z$l.record(z$l.enum(THEME_COLOR_KEYS), oklchColor);
|
|
2467
|
-
const paletteSchema = z$l
|
|
2468
|
-
.object({
|
|
2469
|
-
paletteName: z$l.string().min(1),
|
|
2470
|
-
customBase: oklchColor.nullish(),
|
|
2471
|
-
shades: z$l.record(z$l.enum(PALETTE_SHADES), oklchColor),
|
|
2472
|
-
})
|
|
2473
|
-
.refine((data) => data.paletteName !== 'custom' || !!data.paletteName, {
|
|
2474
|
-
message: 'A custom base color is required if using a custom base palette',
|
|
2475
|
-
path: ['customBase'],
|
|
2476
|
-
});
|
|
2477
|
-
const palettesSchema = z$l.object({
|
|
2478
|
-
base: paletteSchema,
|
|
2479
|
-
primary: paletteSchema,
|
|
2480
|
-
});
|
|
2481
|
-
const createThemeSchema = definitionSchema(() => z$l.object({
|
|
2482
|
-
palettes: z$l.object({
|
|
2483
|
-
base: paletteSchema,
|
|
2484
|
-
primary: paletteSchema,
|
|
2485
|
-
}),
|
|
2486
|
-
colors: z$l.object({
|
|
2487
|
-
light: themeColorSchema,
|
|
2488
|
-
dark: themeColorSchema,
|
|
2489
|
-
}),
|
|
2490
|
-
}));
|
|
2491
|
-
|
|
2492
|
-
const {z: z$k} = await importShared('zod');
|
|
2453
|
+
const {z: z$o} = await importShared('zod');
|
|
2493
2454
|
|
|
2494
2455
|
const VALIDATORS = {
|
|
2495
|
-
PASCAL_CASE_STRING: z$
|
|
2456
|
+
PASCAL_CASE_STRING: z$o
|
|
2496
2457
|
.string()
|
|
2497
2458
|
.regex(/^[A-Z][a-zA-Z0-9]*$/, "Should be PascalCase, e.g. 'MyModel'"),
|
|
2498
|
-
CAMEL_CASE_STRING: z$
|
|
2459
|
+
CAMEL_CASE_STRING: z$o
|
|
2499
2460
|
.string()
|
|
2500
2461
|
.regex(/^[a-z][a-zA-Z0-9]*$/, "Should be camelCase, e.g. 'myField'"),
|
|
2501
|
-
CONSTANT_CASE_STRING: z$
|
|
2462
|
+
CONSTANT_CASE_STRING: z$o
|
|
2502
2463
|
.string()
|
|
2503
2464
|
.regex(/^[A-Z][A-Z0-9_]*$/, "Should be CONSTANT_CASE, e.g. 'MY_CONSTANT'"),
|
|
2504
|
-
OPTIONAL_CONSTANT_CASE_STRING: z$
|
|
2465
|
+
OPTIONAL_CONSTANT_CASE_STRING: z$o
|
|
2505
2466
|
.string()
|
|
2506
2467
|
.regex(/^[A-Z][A-Z0-9_]*$/, "Should be CONSTANT_CASE, e.g. 'MY_CONSTANT'")
|
|
2507
|
-
.or(z$
|
|
2468
|
+
.or(z$o.literal(''))
|
|
2508
2469
|
.optional(),
|
|
2509
2470
|
};
|
|
2510
2471
|
|
|
2511
|
-
const {z: z$
|
|
2512
|
-
const createRoleArray = definitionSchema((ctx) => ctx.withDefault(z$
|
|
2472
|
+
const {z: z$n} = await importShared('zod');
|
|
2473
|
+
const createRoleArray = definitionSchema((ctx) => ctx.withDefault(z$n.array(ctx.withRef({
|
|
2513
2474
|
type: authRoleEntityType,
|
|
2514
2475
|
onDelete: 'DELETE',
|
|
2515
2476
|
})), []));
|
|
2516
|
-
const createModelGraphqlSchema = definitionSchema((ctx) => z$
|
|
2517
|
-
objectType: ctx.withDefault(z$
|
|
2518
|
-
enabled: ctx.withDefault(z$
|
|
2519
|
-
fields: ctx.withDefault(z$
|
|
2477
|
+
const createModelGraphqlSchema = definitionSchema((ctx) => z$n.object({
|
|
2478
|
+
objectType: ctx.withDefault(z$n.object({
|
|
2479
|
+
enabled: ctx.withDefault(z$n.boolean(), false),
|
|
2480
|
+
fields: ctx.withDefault(z$n.array(ctx.withRef({
|
|
2520
2481
|
type: modelScalarFieldEntityType,
|
|
2521
2482
|
onDelete: 'DELETE',
|
|
2522
2483
|
parentPath: { context: 'model' },
|
|
2523
2484
|
})), []),
|
|
2524
|
-
localRelations: ctx.withDefault(z$
|
|
2485
|
+
localRelations: ctx.withDefault(z$n.array(ctx.withRef({
|
|
2525
2486
|
type: modelLocalRelationEntityType,
|
|
2526
2487
|
onDelete: 'DELETE',
|
|
2527
2488
|
parentPath: { context: 'model' },
|
|
2528
2489
|
})), []),
|
|
2529
|
-
foreignRelations: ctx.withDefault(z$
|
|
2490
|
+
foreignRelations: ctx.withDefault(z$n.array(ctx.withRef({
|
|
2530
2491
|
type: modelForeignRelationEntityType,
|
|
2531
2492
|
onDelete: 'DELETE',
|
|
2532
2493
|
parentPath: { context: 'model' },
|
|
2533
2494
|
})), []),
|
|
2534
2495
|
}), {}),
|
|
2535
|
-
queries: ctx.withDefault(z$
|
|
2536
|
-
get: ctx.withDefault(z$
|
|
2537
|
-
enabled: ctx.withDefault(z$
|
|
2496
|
+
queries: ctx.withDefault(z$n.object({
|
|
2497
|
+
get: ctx.withDefault(z$n.object({
|
|
2498
|
+
enabled: ctx.withDefault(z$n.boolean(), false),
|
|
2538
2499
|
roles: createRoleArray(ctx),
|
|
2539
2500
|
}), {}),
|
|
2540
|
-
list: ctx.withDefault(z$
|
|
2541
|
-
enabled: ctx.withDefault(z$
|
|
2501
|
+
list: ctx.withDefault(z$n.object({
|
|
2502
|
+
enabled: ctx.withDefault(z$n.boolean(), false),
|
|
2542
2503
|
roles: createRoleArray(ctx),
|
|
2543
2504
|
}), {}),
|
|
2544
2505
|
}), {}),
|
|
2545
|
-
mutations: ctx.withDefault(z$
|
|
2546
|
-
create: ctx.withDefault(z$
|
|
2547
|
-
enabled: ctx.withDefault(z$
|
|
2506
|
+
mutations: ctx.withDefault(z$n.object({
|
|
2507
|
+
create: ctx.withDefault(z$n.object({
|
|
2508
|
+
enabled: ctx.withDefault(z$n.boolean(), false),
|
|
2548
2509
|
roles: createRoleArray(ctx),
|
|
2549
2510
|
}), {}),
|
|
2550
|
-
update: ctx.withDefault(z$
|
|
2551
|
-
enabled: ctx.withDefault(z$
|
|
2511
|
+
update: ctx.withDefault(z$n.object({
|
|
2512
|
+
enabled: ctx.withDefault(z$n.boolean(), false),
|
|
2552
2513
|
roles: createRoleArray(ctx),
|
|
2553
2514
|
}), {}),
|
|
2554
|
-
delete: ctx.withDefault(z$
|
|
2555
|
-
enabled: ctx.withDefault(z$
|
|
2515
|
+
delete: ctx.withDefault(z$n.object({
|
|
2516
|
+
enabled: ctx.withDefault(z$n.boolean(), false),
|
|
2556
2517
|
roles: createRoleArray(ctx),
|
|
2557
2518
|
}), {}),
|
|
2558
2519
|
}), {}),
|
|
2559
2520
|
}));
|
|
2560
2521
|
|
|
2561
|
-
const {z: z$
|
|
2522
|
+
const {z: z$m} = await importShared('zod');
|
|
2562
2523
|
|
|
2563
2524
|
const baseTransformerFields = {
|
|
2564
|
-
id: z$
|
|
2565
|
-
type: z$
|
|
2525
|
+
id: z$m.string(),
|
|
2526
|
+
type: z$m.string().min(1),
|
|
2566
2527
|
};
|
|
2567
|
-
const baseTransformerSchema = z$
|
|
2528
|
+
const baseTransformerSchema = z$m.object(baseTransformerFields);
|
|
2568
2529
|
function createModelTransformerType(payload) {
|
|
2569
2530
|
return payload;
|
|
2570
2531
|
}
|
|
2571
2532
|
|
|
2572
|
-
const {z: z$
|
|
2573
|
-
const
|
|
2574
|
-
...baseTransformerFields,
|
|
2575
|
-
type: z$h.literal('password'),
|
|
2576
|
-
}), {
|
|
2577
|
-
type: modelTransformerEntityType,
|
|
2578
|
-
parentPath: { context: 'model' },
|
|
2579
|
-
getNameResolver: () => 'password',
|
|
2580
|
-
}));
|
|
2581
|
-
const createEmbeddedRelationTransformerSchema = definitionSchema((ctx) => ctx.withRefBuilder(ctx.withEnt(z$h.object({
|
|
2533
|
+
const {z: z$l} = await importShared('zod');
|
|
2534
|
+
const createEmbeddedRelationTransformerSchema = definitionSchema((ctx) => ctx.withRefBuilder(ctx.withEnt(z$l.object({
|
|
2582
2535
|
...baseTransformerFields,
|
|
2583
2536
|
foreignRelationRef: ctx.withRef({
|
|
2584
2537
|
type: modelForeignRelationEntityType,
|
|
2585
2538
|
onDelete: 'DELETE_PARENT',
|
|
2586
2539
|
parentPath: { context: 'model' },
|
|
2587
2540
|
}),
|
|
2588
|
-
type: z$
|
|
2589
|
-
embeddedFieldNames: z$
|
|
2541
|
+
type: z$l.literal('embeddedRelation'),
|
|
2542
|
+
embeddedFieldNames: z$l.array(ctx.withRef({
|
|
2590
2543
|
type: modelScalarFieldEntityType,
|
|
2591
2544
|
onDelete: 'RESTRICT',
|
|
2592
2545
|
parentPath: { context: 'embeddedModel' },
|
|
2593
2546
|
})),
|
|
2594
|
-
embeddedTransformerNames: z$
|
|
2547
|
+
embeddedTransformerNames: z$l
|
|
2595
2548
|
.array(ctx.withRef({
|
|
2596
2549
|
type: modelTransformerEntityType,
|
|
2597
2550
|
onDelete: 'RESTRICT',
|
|
@@ -2613,11 +2566,6 @@ const createEmbeddedRelationTransformerSchema = definitionSchema((ctx) => ctx.wi
|
|
|
2613
2566
|
builder.addPathToContext('modelRef', modelEntityType, 'embeddedModel');
|
|
2614
2567
|
}));
|
|
2615
2568
|
const BUILT_IN_TRANSFORMERS = [
|
|
2616
|
-
createModelTransformerType({
|
|
2617
|
-
name: 'password',
|
|
2618
|
-
createSchema: createPasswordTransformerSchema,
|
|
2619
|
-
getName: () => 'Password',
|
|
2620
|
-
}),
|
|
2621
2569
|
createModelTransformerType({
|
|
2622
2570
|
name: 'embeddedRelation',
|
|
2623
2571
|
createSchema: createEmbeddedRelationTransformerSchema,
|
|
@@ -2671,46 +2619,46 @@ const createTransformerSchema = definitionSchema((ctx) => baseTransformerSchema.
|
|
|
2671
2619
|
});
|
|
2672
2620
|
}));
|
|
2673
2621
|
|
|
2674
|
-
const {z: z$
|
|
2675
|
-
const createEnumValueSchema = definitionSchema((ctx) => ctx.withEnt(z$
|
|
2676
|
-
id: z$
|
|
2677
|
-
name: z$
|
|
2678
|
-
friendlyName: z$
|
|
2622
|
+
const {z: z$k} = await importShared('zod');
|
|
2623
|
+
const createEnumValueSchema = definitionSchema((ctx) => ctx.withEnt(z$k.object({
|
|
2624
|
+
id: z$k.string(),
|
|
2625
|
+
name: z$k.string().min(1),
|
|
2626
|
+
friendlyName: z$k.string().min(1),
|
|
2679
2627
|
}), {
|
|
2680
2628
|
type: modelEnumValueEntityType,
|
|
2681
2629
|
parentPath: { context: 'enum' },
|
|
2682
2630
|
}));
|
|
2683
|
-
const createEnumBaseSchema = definitionSchema((ctx) => z$
|
|
2684
|
-
id: z$
|
|
2685
|
-
name: z$
|
|
2631
|
+
const createEnumBaseSchema = definitionSchema((ctx) => z$k.object({
|
|
2632
|
+
id: z$k.string(),
|
|
2633
|
+
name: z$k.string().min(1),
|
|
2686
2634
|
featureRef: ctx.withRef({
|
|
2687
2635
|
type: featureEntityType,
|
|
2688
2636
|
onDelete: 'RESTRICT',
|
|
2689
2637
|
}),
|
|
2690
|
-
values: z$
|
|
2691
|
-
isExposed: z$
|
|
2638
|
+
values: z$k.array(createEnumValueSchema(ctx)),
|
|
2639
|
+
isExposed: z$k.boolean(),
|
|
2692
2640
|
}));
|
|
2693
2641
|
const createEnumSchema = definitionSchema((ctx) => ctx.withEnt(createEnumBaseSchema(ctx), {
|
|
2694
2642
|
type: modelEnumEntityType,
|
|
2695
2643
|
addContext: 'enum',
|
|
2696
2644
|
}));
|
|
2697
2645
|
|
|
2698
|
-
const {z: z$
|
|
2646
|
+
const {z: z$j} = await importShared('zod');
|
|
2699
2647
|
const createModelScalarFieldSchema = definitionSchema((ctx) => ctx
|
|
2700
|
-
.withEnt(z$
|
|
2701
|
-
id: z$
|
|
2648
|
+
.withEnt(z$j.object({
|
|
2649
|
+
id: z$j.string(),
|
|
2702
2650
|
name: VALIDATORS.CAMEL_CASE_STRING,
|
|
2703
|
-
type: z$
|
|
2704
|
-
isOptional: z$
|
|
2705
|
-
options: ctx.withRefBuilder(z$
|
|
2651
|
+
type: z$j.enum(SCALAR_FIELD_TYPES),
|
|
2652
|
+
isOptional: z$j.boolean().default(false),
|
|
2653
|
+
options: ctx.withRefBuilder(z$j
|
|
2706
2654
|
.object({
|
|
2707
2655
|
// string options
|
|
2708
|
-
default: z$
|
|
2656
|
+
default: z$j.string().default(''),
|
|
2709
2657
|
// uuid options
|
|
2710
|
-
genUuid: z$
|
|
2658
|
+
genUuid: z$j.boolean().optional(),
|
|
2711
2659
|
// date options
|
|
2712
|
-
updatedAt: z$
|
|
2713
|
-
defaultToNow: z$
|
|
2660
|
+
updatedAt: z$j.boolean().optional(),
|
|
2661
|
+
defaultToNow: z$j.boolean().optional(),
|
|
2714
2662
|
// enum options
|
|
2715
2663
|
enumRef: ctx
|
|
2716
2664
|
.withRef({
|
|
@@ -2718,7 +2666,7 @@ const createModelScalarFieldSchema = definitionSchema((ctx) => ctx
|
|
|
2718
2666
|
onDelete: 'RESTRICT',
|
|
2719
2667
|
})
|
|
2720
2668
|
.optional(),
|
|
2721
|
-
defaultEnumValueRef: z$
|
|
2669
|
+
defaultEnumValueRef: z$j.string().optional(),
|
|
2722
2670
|
})
|
|
2723
2671
|
.transform((val) => ({
|
|
2724
2672
|
...val,
|
|
@@ -2770,13 +2718,13 @@ const REFERENTIAL_ACTIONS = [
|
|
|
2770
2718
|
'SetNull',
|
|
2771
2719
|
'SetDefault',
|
|
2772
2720
|
];
|
|
2773
|
-
const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$
|
|
2774
|
-
id: z$
|
|
2775
|
-
foreignId: z$
|
|
2721
|
+
const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$j.object({
|
|
2722
|
+
id: z$j.string(),
|
|
2723
|
+
foreignId: z$j
|
|
2776
2724
|
.string()
|
|
2777
2725
|
.default(() => modelForeignRelationEntityType.generateNewId()),
|
|
2778
2726
|
name: VALIDATORS.CAMEL_CASE_STRING,
|
|
2779
|
-
references: z$
|
|
2727
|
+
references: z$j.array(z$j.object({
|
|
2780
2728
|
localRef: ctx.withRef({
|
|
2781
2729
|
type: modelScalarFieldEntityType,
|
|
2782
2730
|
onDelete: 'RESTRICT',
|
|
@@ -2788,10 +2736,10 @@ const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuil
|
|
|
2788
2736
|
parentPath: { context: 'foreignModel' },
|
|
2789
2737
|
}),
|
|
2790
2738
|
})),
|
|
2791
|
-
modelRef: z$
|
|
2739
|
+
modelRef: z$j.string().min(1),
|
|
2792
2740
|
foreignRelationName: VALIDATORS.CAMEL_CASE_STRING,
|
|
2793
|
-
onDelete: z$
|
|
2794
|
-
onUpdate: z$
|
|
2741
|
+
onDelete: z$j.enum(REFERENTIAL_ACTIONS).default('Cascade'),
|
|
2742
|
+
onUpdate: z$j.enum(REFERENTIAL_ACTIONS).default('Restrict'),
|
|
2795
2743
|
}), (builder) => {
|
|
2796
2744
|
builder.addReference({
|
|
2797
2745
|
type: modelEntityType,
|
|
@@ -2810,9 +2758,9 @@ const createModelRelationFieldSchema = definitionSchema((ctx) => ctx.withRefBuil
|
|
|
2810
2758
|
parentPath: 'modelRef',
|
|
2811
2759
|
});
|
|
2812
2760
|
}));
|
|
2813
|
-
const createModelUniqueConstraintSchema = definitionSchema((ctx) => ctx.withEnt(z$
|
|
2814
|
-
id: z$
|
|
2815
|
-
fields: z$
|
|
2761
|
+
const createModelUniqueConstraintSchema = definitionSchema((ctx) => ctx.withEnt(z$j.object({
|
|
2762
|
+
id: z$j.string(),
|
|
2763
|
+
fields: z$j.array(z$j.object({
|
|
2816
2764
|
fieldRef: ctx.withRef({
|
|
2817
2765
|
type: modelScalarFieldEntityType,
|
|
2818
2766
|
onDelete: 'RESTRICT',
|
|
@@ -2829,18 +2777,18 @@ const createModelUniqueConstraintSchema = definitionSchema((ctx) => ctx.withEnt(
|
|
|
2829
2777
|
});
|
|
2830
2778
|
},
|
|
2831
2779
|
}));
|
|
2832
|
-
const createModelServiceSchema = definitionSchema((ctx) => z$
|
|
2833
|
-
create: z$
|
|
2780
|
+
const createModelServiceSchema = definitionSchema((ctx) => z$j.object({
|
|
2781
|
+
create: z$j
|
|
2834
2782
|
.object({
|
|
2835
|
-
enabled: z$
|
|
2836
|
-
fields: z$
|
|
2783
|
+
enabled: z$j.boolean().default(false),
|
|
2784
|
+
fields: z$j
|
|
2837
2785
|
.array(ctx.withRef({
|
|
2838
2786
|
type: modelScalarFieldEntityType,
|
|
2839
2787
|
onDelete: 'DELETE',
|
|
2840
2788
|
parentPath: { context: 'model' },
|
|
2841
2789
|
}))
|
|
2842
2790
|
.optional(),
|
|
2843
|
-
transformerNames: z$
|
|
2791
|
+
transformerNames: z$j
|
|
2844
2792
|
.array(ctx.withRef({
|
|
2845
2793
|
type: modelTransformerEntityType,
|
|
2846
2794
|
onDelete: 'DELETE',
|
|
@@ -2849,17 +2797,17 @@ const createModelServiceSchema = definitionSchema((ctx) => z$f.object({
|
|
|
2849
2797
|
.optional(),
|
|
2850
2798
|
})
|
|
2851
2799
|
.default({ enabled: false }),
|
|
2852
|
-
update: z$
|
|
2800
|
+
update: z$j
|
|
2853
2801
|
.object({
|
|
2854
|
-
enabled: z$
|
|
2855
|
-
fields: z$
|
|
2802
|
+
enabled: z$j.boolean().default(false),
|
|
2803
|
+
fields: z$j
|
|
2856
2804
|
.array(ctx.withRef({
|
|
2857
2805
|
type: modelScalarFieldEntityType,
|
|
2858
2806
|
onDelete: 'DELETE',
|
|
2859
2807
|
parentPath: { context: 'model' },
|
|
2860
2808
|
}))
|
|
2861
2809
|
.optional(),
|
|
2862
|
-
transformerNames: z$
|
|
2810
|
+
transformerNames: z$j
|
|
2863
2811
|
.array(ctx.withRef({
|
|
2864
2812
|
type: modelTransformerEntityType,
|
|
2865
2813
|
onDelete: 'DELETE',
|
|
@@ -2868,33 +2816,33 @@ const createModelServiceSchema = definitionSchema((ctx) => z$f.object({
|
|
|
2868
2816
|
.optional(),
|
|
2869
2817
|
})
|
|
2870
2818
|
.default({ enabled: false }),
|
|
2871
|
-
delete: z$
|
|
2819
|
+
delete: z$j
|
|
2872
2820
|
.object({
|
|
2873
|
-
enabled: z$
|
|
2821
|
+
enabled: z$j.boolean().default(false),
|
|
2874
2822
|
})
|
|
2875
2823
|
.default({
|
|
2876
2824
|
enabled: false,
|
|
2877
2825
|
}),
|
|
2878
|
-
transformers: z$
|
|
2826
|
+
transformers: z$j.array(createTransformerSchema(ctx)).default([]),
|
|
2879
2827
|
}));
|
|
2880
|
-
const createModelBaseSchema = definitionSchema((ctx) => z$
|
|
2881
|
-
id: z$
|
|
2828
|
+
const createModelBaseSchema = definitionSchema((ctx) => z$j.object({
|
|
2829
|
+
id: z$j.string(),
|
|
2882
2830
|
name: VALIDATORS.PASCAL_CASE_STRING,
|
|
2883
2831
|
featureRef: ctx.withRef({
|
|
2884
2832
|
type: featureEntityType,
|
|
2885
2833
|
onDelete: 'RESTRICT',
|
|
2886
2834
|
}),
|
|
2887
|
-
model: z$
|
|
2888
|
-
fields: z$
|
|
2889
|
-
relations: z$
|
|
2890
|
-
primaryKeyFieldRefs: z$
|
|
2835
|
+
model: z$j.object({
|
|
2836
|
+
fields: z$j.array(createModelScalarFieldSchema(ctx)),
|
|
2837
|
+
relations: z$j.array(createModelRelationFieldSchema(ctx)).optional(),
|
|
2838
|
+
primaryKeyFieldRefs: z$j
|
|
2891
2839
|
.array(ctx.withRef({
|
|
2892
2840
|
type: modelScalarFieldEntityType,
|
|
2893
2841
|
onDelete: 'RESTRICT',
|
|
2894
2842
|
parentPath: { context: 'model' },
|
|
2895
2843
|
}))
|
|
2896
2844
|
.min(1),
|
|
2897
|
-
uniqueConstraints: z$
|
|
2845
|
+
uniqueConstraints: z$j
|
|
2898
2846
|
.array(createModelUniqueConstraintSchema(ctx))
|
|
2899
2847
|
.optional(),
|
|
2900
2848
|
}),
|
|
@@ -2918,26 +2866,26 @@ const adminCrudSectionColumnEntityType = createEntityType('admin-crud-section-co
|
|
|
2918
2866
|
parentType: adminSectionEntityType,
|
|
2919
2867
|
});
|
|
2920
2868
|
|
|
2921
|
-
const {z: z$
|
|
2922
|
-
const createBaseAdminSectionValidators = definitionSchema((ctx) => z$
|
|
2923
|
-
id: z$
|
|
2924
|
-
name: z$
|
|
2869
|
+
const {z: z$i} = await importShared('zod');
|
|
2870
|
+
const createBaseAdminSectionValidators = definitionSchema((ctx) => z$i.object({
|
|
2871
|
+
id: z$i.string().default(adminSectionEntityType.generateNewId()),
|
|
2872
|
+
name: z$i.string().min(1),
|
|
2925
2873
|
featureRef: ctx.withRef({
|
|
2926
2874
|
type: featureEntityType,
|
|
2927
2875
|
onDelete: 'RESTRICT',
|
|
2928
2876
|
}),
|
|
2929
|
-
icon: z$
|
|
2930
|
-
type: z$
|
|
2877
|
+
icon: z$i.string().optional(),
|
|
2878
|
+
type: z$i.string().min(1),
|
|
2931
2879
|
}));
|
|
2932
2880
|
|
|
2933
|
-
const {z: z$
|
|
2934
|
-
const baseAdminCrudActionSchema = z$
|
|
2935
|
-
id: z$
|
|
2881
|
+
const {z: z$h} = await importShared('zod');
|
|
2882
|
+
const baseAdminCrudActionSchema = z$h.object({
|
|
2883
|
+
id: z$h
|
|
2936
2884
|
.string()
|
|
2937
2885
|
.min(1)
|
|
2938
2886
|
.default(() => adminCrudActionEntityType.generateNewId()),
|
|
2939
|
-
type: z$
|
|
2940
|
-
position: z$
|
|
2887
|
+
type: z$h.string().min(1),
|
|
2888
|
+
position: z$h.enum(['inline', 'dropdown']).default('dropdown'),
|
|
2941
2889
|
});
|
|
2942
2890
|
function createAdminCrudActionType(payload) {
|
|
2943
2891
|
return payload;
|
|
@@ -2946,16 +2894,16 @@ const adminCrudActionEntityType = createEntityType('admin-crud-action', {
|
|
|
2946
2894
|
parentType: adminSectionEntityType,
|
|
2947
2895
|
});
|
|
2948
2896
|
|
|
2949
|
-
const {z: z$
|
|
2897
|
+
const {z: z$g} = await importShared('zod');
|
|
2950
2898
|
const createAdminCrudEditActionSchema = definitionSchema(() => baseAdminCrudActionSchema.extend({
|
|
2951
|
-
type: z$
|
|
2899
|
+
type: z$g.literal('edit'),
|
|
2952
2900
|
}));
|
|
2953
2901
|
const adminCrudEditActionType = createAdminCrudActionType({
|
|
2954
2902
|
name: 'edit',
|
|
2955
2903
|
createSchema: createAdminCrudEditActionSchema,
|
|
2956
2904
|
});
|
|
2957
2905
|
const createAdminCrudDeleteActionSchema = definitionSchema(() => baseAdminCrudActionSchema.extend({
|
|
2958
|
-
type: z$
|
|
2906
|
+
type: z$g.literal('delete'),
|
|
2959
2907
|
}));
|
|
2960
2908
|
const adminCrudDeleteActionType = createAdminCrudActionType({
|
|
2961
2909
|
name: 'delete',
|
|
@@ -3015,14 +2963,14 @@ const createAdminCrudActionSchema = definitionSchema((ctx) => ctx
|
|
|
3015
2963
|
});
|
|
3016
2964
|
}));
|
|
3017
2965
|
|
|
3018
|
-
const {z: z$
|
|
3019
|
-
const baseAdminCrudColumnSchema = z$
|
|
3020
|
-
id: z$
|
|
2966
|
+
const {z: z$f} = await importShared('zod');
|
|
2967
|
+
const baseAdminCrudColumnSchema = z$f.object({
|
|
2968
|
+
id: z$f
|
|
3021
2969
|
.string()
|
|
3022
2970
|
.min(1)
|
|
3023
2971
|
.default(() => adminCrudColumnEntityType.generateNewId()),
|
|
3024
|
-
type: z$
|
|
3025
|
-
label: z$
|
|
2972
|
+
type: z$f.string().min(1),
|
|
2973
|
+
label: z$f.string().min(1),
|
|
3026
2974
|
});
|
|
3027
2975
|
function createAdminCrudColumnType(payload) {
|
|
3028
2976
|
return payload;
|
|
@@ -3031,10 +2979,10 @@ const adminCrudColumnEntityType = createEntityType('admin-crud-column', {
|
|
|
3031
2979
|
parentType: adminSectionEntityType,
|
|
3032
2980
|
});
|
|
3033
2981
|
|
|
3034
|
-
const {z: z$
|
|
2982
|
+
const {z: z$e} = await importShared('zod');
|
|
3035
2983
|
// Text Column
|
|
3036
2984
|
const createAdminCrudTextColumnSchema = definitionSchema((ctx) => baseAdminCrudColumnSchema.extend({
|
|
3037
|
-
type: z$
|
|
2985
|
+
type: z$e.literal('text'),
|
|
3038
2986
|
modelFieldRef: ctx.withRef({
|
|
3039
2987
|
type: modelScalarFieldEntityType,
|
|
3040
2988
|
onDelete: 'RESTRICT',
|
|
@@ -3047,14 +2995,14 @@ const adminCrudTextColumnType = createAdminCrudColumnType({
|
|
|
3047
2995
|
});
|
|
3048
2996
|
// Foreign Column
|
|
3049
2997
|
const createAdminCrudForeignColumnSchema = definitionSchema((ctx) => baseAdminCrudColumnSchema.extend({
|
|
3050
|
-
type: z$
|
|
2998
|
+
type: z$e.literal('foreign'),
|
|
3051
2999
|
localRelationRef: ctx.withRef({
|
|
3052
3000
|
type: modelLocalRelationEntityType,
|
|
3053
3001
|
onDelete: 'RESTRICT',
|
|
3054
3002
|
parentPath: { context: 'model' },
|
|
3055
3003
|
}),
|
|
3056
|
-
labelExpression: z$
|
|
3057
|
-
valueExpression: z$
|
|
3004
|
+
labelExpression: z$e.string().min(1),
|
|
3005
|
+
valueExpression: z$e.string().min(1),
|
|
3058
3006
|
}));
|
|
3059
3007
|
const adminCrudForeignColumnType = createAdminCrudColumnType({
|
|
3060
3008
|
name: 'foreign',
|
|
@@ -3114,14 +3062,14 @@ const createAdminCrudColumnSchema = definitionSchema((ctx) => ctx
|
|
|
3114
3062
|
});
|
|
3115
3063
|
}));
|
|
3116
3064
|
|
|
3117
|
-
const {z: z$
|
|
3118
|
-
const baseAdminCrudInputSchema = z$
|
|
3119
|
-
id: z$
|
|
3065
|
+
const {z: z$d} = await importShared('zod');
|
|
3066
|
+
const baseAdminCrudInputSchema = z$d.object({
|
|
3067
|
+
id: z$d
|
|
3120
3068
|
.string()
|
|
3121
3069
|
.min(1)
|
|
3122
3070
|
.default(() => adminCrudInputEntityType.generateNewId()),
|
|
3123
|
-
type: z$
|
|
3124
|
-
label: z$
|
|
3071
|
+
type: z$d.string().min(1),
|
|
3072
|
+
label: z$d.string().min(1),
|
|
3125
3073
|
});
|
|
3126
3074
|
function createAdminCrudInputType(payload) {
|
|
3127
3075
|
return payload;
|
|
@@ -3133,41 +3081,41 @@ const adminCrudInputEntityType = createEntityType('admin-crud-input', {
|
|
|
3133
3081
|
parentType: adminSectionEntityType,
|
|
3134
3082
|
});
|
|
3135
3083
|
|
|
3136
|
-
const {z: z$
|
|
3084
|
+
const {z: z$c} = await importShared('zod');
|
|
3137
3085
|
const createAdminCrudTextInputSchema = definitionSchema((ctx) => baseAdminCrudInputSchema.extend({
|
|
3138
|
-
type: z$
|
|
3139
|
-
label: z$
|
|
3086
|
+
type: z$c.literal('text'),
|
|
3087
|
+
label: z$c.string().min(1),
|
|
3140
3088
|
modelFieldRef: ctx.withRef({
|
|
3141
3089
|
type: modelScalarFieldEntityType,
|
|
3142
3090
|
onDelete: 'RESTRICT',
|
|
3143
3091
|
parentPath: { context: 'model' },
|
|
3144
3092
|
}),
|
|
3145
|
-
validation: z$
|
|
3093
|
+
validation: z$c.string().optional(),
|
|
3146
3094
|
}));
|
|
3147
3095
|
const adminCrudTextInputType = createAdminCrudInputType({
|
|
3148
3096
|
name: 'text',
|
|
3149
3097
|
createSchema: createAdminCrudTextInputSchema,
|
|
3150
3098
|
});
|
|
3151
3099
|
const createAdminCrudForeignInputSchema = definitionSchema((ctx) => baseAdminCrudInputSchema.extend({
|
|
3152
|
-
type: z$
|
|
3153
|
-
label: z$
|
|
3100
|
+
type: z$c.literal('foreign'),
|
|
3101
|
+
label: z$c.string().min(1),
|
|
3154
3102
|
localRelationRef: ctx.withRef({
|
|
3155
3103
|
type: modelLocalRelationEntityType,
|
|
3156
3104
|
onDelete: 'RESTRICT',
|
|
3157
3105
|
parentPath: { context: 'model' },
|
|
3158
3106
|
}),
|
|
3159
|
-
labelExpression: z$
|
|
3160
|
-
valueExpression: z$
|
|
3161
|
-
defaultLabel: z$
|
|
3162
|
-
nullLabel: z$
|
|
3107
|
+
labelExpression: z$c.string().min(1),
|
|
3108
|
+
valueExpression: z$c.string().min(1),
|
|
3109
|
+
defaultLabel: z$c.string().optional(),
|
|
3110
|
+
nullLabel: z$c.string().optional(),
|
|
3163
3111
|
}));
|
|
3164
3112
|
const adminCrudForeignInputType = createAdminCrudInputType({
|
|
3165
3113
|
name: 'foreign',
|
|
3166
3114
|
createSchema: createAdminCrudForeignInputSchema,
|
|
3167
3115
|
});
|
|
3168
3116
|
const createAdminCrudEnumInputSchema = definitionSchema((ctx) => baseAdminCrudInputSchema.extend({
|
|
3169
|
-
type: z$
|
|
3170
|
-
label: z$
|
|
3117
|
+
type: z$c.literal('enum'),
|
|
3118
|
+
label: z$c.string().min(1),
|
|
3171
3119
|
modelFieldRef: ctx.withRef({
|
|
3172
3120
|
type: modelScalarFieldEntityType,
|
|
3173
3121
|
onDelete: 'RESTRICT',
|
|
@@ -3179,8 +3127,8 @@ const adminCrudEnumInputType = createAdminCrudInputType({
|
|
|
3179
3127
|
createSchema: createAdminCrudEnumInputSchema,
|
|
3180
3128
|
});
|
|
3181
3129
|
const createAdminCrudEmbeddedInputSchema = definitionSchema((ctx) => baseAdminCrudInputSchema.extend({
|
|
3182
|
-
type: z$
|
|
3183
|
-
label: z$
|
|
3130
|
+
type: z$c.literal('embedded'),
|
|
3131
|
+
label: z$c.string().min(1),
|
|
3184
3132
|
modelRelationRef: ctx.withRef({
|
|
3185
3133
|
type: modelForeignRelationEntityType,
|
|
3186
3134
|
onDelete: 'RESTRICT',
|
|
@@ -3197,8 +3145,8 @@ const adminCrudEmbeddedInputType = createAdminCrudInputType({
|
|
|
3197
3145
|
createSchema: createAdminCrudEmbeddedInputSchema,
|
|
3198
3146
|
});
|
|
3199
3147
|
const createAdminCrudEmbeddedLocalInputSchema = definitionSchema((ctx) => baseAdminCrudInputSchema.extend({
|
|
3200
|
-
type: z$
|
|
3201
|
-
label: z$
|
|
3148
|
+
type: z$c.literal('embeddedLocal'),
|
|
3149
|
+
label: z$c.string().min(1),
|
|
3202
3150
|
localRelationRef: ctx.withRef({
|
|
3203
3151
|
type: modelLocalRelationEntityType,
|
|
3204
3152
|
onDelete: 'RESTRICT',
|
|
@@ -3215,8 +3163,8 @@ const adminCrudEmbeddedLocalInputType = createAdminCrudInputType({
|
|
|
3215
3163
|
createSchema: createAdminCrudEmbeddedLocalInputSchema,
|
|
3216
3164
|
});
|
|
3217
3165
|
const createAdminCrudPasswordInputSchema = definitionSchema(() => baseAdminCrudInputSchema.extend({
|
|
3218
|
-
type: z$
|
|
3219
|
-
label: z$
|
|
3166
|
+
type: z$c.literal('password'),
|
|
3167
|
+
label: z$c.string().min(1),
|
|
3220
3168
|
}));
|
|
3221
3169
|
const adminCrudPasswordInputType = createAdminCrudInputType({
|
|
3222
3170
|
name: 'password',
|
|
@@ -3280,38 +3228,38 @@ const createAdminCrudInputSchema = definitionSchema((ctx) => ctx
|
|
|
3280
3228
|
});
|
|
3281
3229
|
}));
|
|
3282
3230
|
|
|
3283
|
-
const {z: z$
|
|
3231
|
+
const {z: z$b} = await importShared('zod');
|
|
3284
3232
|
// Embedded Crud
|
|
3285
|
-
const createAdminCrudEmbeddedObjectSchema = definitionSchema((ctx) => z$
|
|
3286
|
-
id: z$
|
|
3287
|
-
name: z$
|
|
3233
|
+
const createAdminCrudEmbeddedObjectSchema = definitionSchema((ctx) => z$b.object({
|
|
3234
|
+
id: z$b.string().min(1),
|
|
3235
|
+
name: z$b.string().min(1),
|
|
3288
3236
|
modelRef: ctx.withRef({
|
|
3289
3237
|
type: modelEntityType,
|
|
3290
3238
|
onDelete: 'RESTRICT',
|
|
3291
3239
|
}),
|
|
3292
|
-
includeIdField: z$
|
|
3293
|
-
type: z$
|
|
3294
|
-
form: z$
|
|
3295
|
-
fields: z$
|
|
3240
|
+
includeIdField: z$b.boolean().optional(),
|
|
3241
|
+
type: z$b.literal('object'),
|
|
3242
|
+
form: z$b.object({
|
|
3243
|
+
fields: z$b.array(createAdminCrudInputSchema(ctx)),
|
|
3296
3244
|
}),
|
|
3297
3245
|
}));
|
|
3298
|
-
const createAdminCrudEmbeddedListSchema = definitionSchema((ctx) => z$
|
|
3299
|
-
id: z$
|
|
3300
|
-
name: z$
|
|
3246
|
+
const createAdminCrudEmbeddedListSchema = definitionSchema((ctx) => z$b.object({
|
|
3247
|
+
id: z$b.string().min(1),
|
|
3248
|
+
name: z$b.string().min(1),
|
|
3301
3249
|
modelRef: ctx.withRef({
|
|
3302
3250
|
type: modelEntityType,
|
|
3303
3251
|
onDelete: 'RESTRICT',
|
|
3304
3252
|
}),
|
|
3305
|
-
includeIdField: z$
|
|
3306
|
-
type: z$
|
|
3307
|
-
table: z$
|
|
3308
|
-
columns: z$
|
|
3253
|
+
includeIdField: z$b.boolean().optional(),
|
|
3254
|
+
type: z$b.literal('list'),
|
|
3255
|
+
table: z$b.object({
|
|
3256
|
+
columns: z$b.array(createAdminCrudColumnSchema(ctx)),
|
|
3309
3257
|
}),
|
|
3310
|
-
form: z$
|
|
3311
|
-
fields: z$
|
|
3258
|
+
form: z$b.object({
|
|
3259
|
+
fields: z$b.array(createAdminCrudInputSchema(ctx)),
|
|
3312
3260
|
}),
|
|
3313
3261
|
}));
|
|
3314
|
-
const createAdminCrudEmbeddedFormSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$
|
|
3262
|
+
const createAdminCrudEmbeddedFormSchema = definitionSchema((ctx) => ctx.withRefBuilder(z$b.discriminatedUnion('type', [
|
|
3315
3263
|
createAdminCrudEmbeddedObjectSchema(ctx),
|
|
3316
3264
|
createAdminCrudEmbeddedListSchema(ctx),
|
|
3317
3265
|
]), (builder) => {
|
|
@@ -3322,8 +3270,8 @@ const createAdminCrudEmbeddedFormSchema = definitionSchema((ctx) => ctx.withRefB
|
|
|
3322
3270
|
builder.addPathToContext('modelRef', modelEntityType, 'model');
|
|
3323
3271
|
}));
|
|
3324
3272
|
// Admin Section
|
|
3325
|
-
const createAdminCrudSectionSchema = definitionSchema((ctx) => ctx.withRefBuilder(createBaseAdminSectionValidators(ctx).and(z$
|
|
3326
|
-
type: z$
|
|
3273
|
+
const createAdminCrudSectionSchema = definitionSchema((ctx) => ctx.withRefBuilder(createBaseAdminSectionValidators(ctx).and(z$b.object({
|
|
3274
|
+
type: z$b.literal('crud'),
|
|
3327
3275
|
modelRef: ctx.withRef({
|
|
3328
3276
|
type: modelEntityType,
|
|
3329
3277
|
onDelete: 'RESTRICT',
|
|
@@ -3336,25 +3284,25 @@ const createAdminCrudSectionSchema = definitionSchema((ctx) => ctx.withRefBuilde
|
|
|
3336
3284
|
context: 'model',
|
|
3337
3285
|
},
|
|
3338
3286
|
}),
|
|
3339
|
-
disableCreate: ctx.withDefault(z$
|
|
3340
|
-
table: z$
|
|
3341
|
-
columns: z$
|
|
3342
|
-
actions: ctx.withDefault(z$
|
|
3287
|
+
disableCreate: ctx.withDefault(z$b.boolean(), false),
|
|
3288
|
+
table: z$b.object({
|
|
3289
|
+
columns: z$b.array(createAdminCrudColumnSchema(ctx)),
|
|
3290
|
+
actions: ctx.withDefault(z$b.array(createAdminCrudActionSchema(ctx)), [
|
|
3343
3291
|
{ type: 'edit', position: 'inline' },
|
|
3344
3292
|
{ type: 'delete', position: 'dropdown' },
|
|
3345
3293
|
]),
|
|
3346
3294
|
}),
|
|
3347
|
-
form: z$
|
|
3348
|
-
fields: z$
|
|
3295
|
+
form: z$b.object({
|
|
3296
|
+
fields: z$b.array(createAdminCrudInputSchema(ctx)),
|
|
3349
3297
|
}),
|
|
3350
|
-
embeddedForms: z$
|
|
3298
|
+
embeddedForms: z$b
|
|
3351
3299
|
.array(createAdminCrudEmbeddedFormSchema(ctx))
|
|
3352
3300
|
.optional(),
|
|
3353
3301
|
})), (builder) => {
|
|
3354
3302
|
builder.addPathToContext('modelRef', modelEntityType, 'model');
|
|
3355
3303
|
}));
|
|
3356
3304
|
|
|
3357
|
-
const {z: z$
|
|
3305
|
+
const {z: z$a} = await importShared('zod');
|
|
3358
3306
|
const createWebAdminSectionSchema = definitionSchema((ctx) => ctx.withRefBuilder(createAdminCrudSectionSchema(ctx), (builder) => {
|
|
3359
3307
|
builder.addEntity({
|
|
3360
3308
|
type: adminSectionEntityType,
|
|
@@ -3362,37 +3310,37 @@ const createWebAdminSectionSchema = definitionSchema((ctx) => ctx.withRefBuilder
|
|
|
3362
3310
|
addContext: 'admin-section',
|
|
3363
3311
|
});
|
|
3364
3312
|
}));
|
|
3365
|
-
const createAdminAppSchema = definitionSchema((ctx) => ctx.withDefault(z$
|
|
3366
|
-
enabled: z$
|
|
3367
|
-
pathPrefix: z$
|
|
3368
|
-
allowedRoles: ctx.withDefault(z$
|
|
3313
|
+
const createAdminAppSchema = definitionSchema((ctx) => ctx.withDefault(z$a.object({
|
|
3314
|
+
enabled: z$a.boolean(),
|
|
3315
|
+
pathPrefix: z$a.string().default('/admin'),
|
|
3316
|
+
allowedRoles: ctx.withDefault(z$a.array(ctx.withRef({
|
|
3369
3317
|
type: authRoleEntityType,
|
|
3370
3318
|
onDelete: 'DELETE',
|
|
3371
3319
|
})), []),
|
|
3372
|
-
sections: ctx.withDefault(z$
|
|
3320
|
+
sections: ctx.withDefault(z$a.array(createWebAdminSectionSchema(ctx)), []),
|
|
3373
3321
|
}), { enabled: false, pathPrefix: '/admin' }));
|
|
3374
3322
|
|
|
3375
|
-
const {z: z$
|
|
3376
|
-
const createWebAppSchema = definitionSchema((ctx) => z$
|
|
3323
|
+
const {z: z$9} = await importShared('zod');
|
|
3324
|
+
const createWebAppSchema = definitionSchema((ctx) => z$9.object({
|
|
3377
3325
|
...baseAppValidators,
|
|
3378
|
-
type: z$
|
|
3379
|
-
includeAuth: ctx.withDefault(z$
|
|
3380
|
-
title: z$
|
|
3381
|
-
description: z$
|
|
3382
|
-
includeUploadComponents: ctx.withDefault(z$
|
|
3383
|
-
enableSubscriptions: ctx.withDefault(z$
|
|
3326
|
+
type: z$9.literal('web'),
|
|
3327
|
+
includeAuth: ctx.withDefault(z$9.boolean(), false),
|
|
3328
|
+
title: z$9.string().default(''),
|
|
3329
|
+
description: z$9.string().default(''),
|
|
3330
|
+
includeUploadComponents: ctx.withDefault(z$9.boolean(), false),
|
|
3331
|
+
enableSubscriptions: ctx.withDefault(z$9.boolean(), false),
|
|
3384
3332
|
adminApp: createAdminAppSchema(ctx),
|
|
3385
3333
|
}));
|
|
3386
3334
|
const webAppEntryType = createAppEntryType('web');
|
|
3387
3335
|
|
|
3388
|
-
const {z: z$
|
|
3389
|
-
const basePluginDefinitionSchema = z$
|
|
3390
|
-
id: z$
|
|
3391
|
-
packageName: z$
|
|
3392
|
-
name: z$
|
|
3393
|
-
version: z$
|
|
3394
|
-
config: z$
|
|
3395
|
-
configSchemaVersion: z$
|
|
3336
|
+
const {z: z$8} = await importShared('zod');
|
|
3337
|
+
const basePluginDefinitionSchema = z$8.object({
|
|
3338
|
+
id: z$8.string(),
|
|
3339
|
+
packageName: z$8.string(),
|
|
3340
|
+
name: z$8.string(),
|
|
3341
|
+
version: z$8.string(),
|
|
3342
|
+
config: z$8.unknown(),
|
|
3343
|
+
configSchemaVersion: z$8.number().optional(),
|
|
3396
3344
|
});
|
|
3397
3345
|
const createPluginWithConfigSchema = definitionSchema((ctx) => ctx
|
|
3398
3346
|
.withEnt(basePluginDefinitionSchema.passthrough(), {
|
|
@@ -3413,53 +3361,289 @@ const createPluginWithConfigSchema = definitionSchema((ctx) => ctx
|
|
|
3413
3361
|
path: parseCtx.path,
|
|
3414
3362
|
});
|
|
3415
3363
|
}));
|
|
3416
|
-
const createPluginsSchema = definitionSchema((ctx) => z$
|
|
3364
|
+
const createPluginsSchema = definitionSchema((ctx) => z$8.array(createPluginWithConfigSchema(ctx)));
|
|
3417
3365
|
|
|
3418
|
-
const {
|
|
3419
|
-
const createTemplateExtractorSchema = definitionSchema(() => z$3.object({
|
|
3420
|
-
/**
|
|
3421
|
-
* Whether to write template extractor metadata when writing files to the project.
|
|
3422
|
-
*
|
|
3423
|
-
* This allows the template extraction process to update the generator's templates.
|
|
3424
|
-
*/
|
|
3425
|
-
writeMetadata: z$3.boolean().default(false),
|
|
3426
|
-
/**
|
|
3427
|
-
* A list of file IDs to include in the template extractor metadata for generators
|
|
3428
|
-
* that have a manually assigned file IDs, e.g. files generated by generators that
|
|
3429
|
-
* have multiple instances.
|
|
3430
|
-
*
|
|
3431
|
-
* The list is delimited by a newline and can include a * to match any number of characters.
|
|
3432
|
-
*/
|
|
3433
|
-
fileIdRegexWhitelist: z$3.string().default(''),
|
|
3434
|
-
}));
|
|
3366
|
+
const {CASE_VALIDATORS: CASE_VALIDATORS$1} = await importShared('@baseplate-dev/utils');
|
|
3435
3367
|
|
|
3436
|
-
const {
|
|
3368
|
+
const {z: z$7} = await importShared('zod');
|
|
3437
3369
|
|
|
3438
|
-
|
|
3439
|
-
|
|
3370
|
+
/**
|
|
3371
|
+
* General project settings schema
|
|
3372
|
+
*
|
|
3373
|
+
* Includes basic project configuration like name, package scope, and port offset.
|
|
3374
|
+
*/
|
|
3375
|
+
const generalSettingsSchema = z$7.object({
|
|
3440
3376
|
/**
|
|
3441
3377
|
* The name of the project.
|
|
3378
|
+
*
|
|
3379
|
+
* Must be in kebab-case format (lowercase letters and dashes only).
|
|
3380
|
+
* Example: "my-awesome-project"
|
|
3442
3381
|
*/
|
|
3443
|
-
name: CASE_VALIDATORS.KEBAB_CASE,
|
|
3382
|
+
name: CASE_VALIDATORS$1.KEBAB_CASE,
|
|
3444
3383
|
/**
|
|
3445
|
-
* The package scope of the project if any
|
|
3384
|
+
* The package scope of the project if any.
|
|
3385
|
+
*
|
|
3386
|
+
* Used for scoped npm packages, e.g. "my-org" results in "@my-org/package-name".
|
|
3387
|
+
* Must be in kebab-case format or empty string.
|
|
3388
|
+
* Example: "my-org" → "@my-org/backend", "@my-org/web"
|
|
3446
3389
|
*/
|
|
3447
|
-
packageScope: z$
|
|
3448
|
-
.union([z$
|
|
3390
|
+
packageScope: z$7
|
|
3391
|
+
.union([z$7.literal(''), CASE_VALIDATORS$1.KEBAB_CASE])
|
|
3449
3392
|
.default(''),
|
|
3450
3393
|
/**
|
|
3451
|
-
* The port offset to base the app ports on for development
|
|
3394
|
+
* The port offset to base the app ports on for development.
|
|
3395
|
+
*
|
|
3396
|
+
* Must be a multiple of 1000 between 1000 and 60000.
|
|
3397
|
+
* Each app will use offset + specific port number (e.g. offset 8000 → DB at 8432, API at 8001).
|
|
3398
|
+
* This allows running multiple Baseplate projects without port conflicts.
|
|
3399
|
+
*
|
|
3400
|
+
* Example: 3000 → backend API at 3001, database at 3432, Redis at 3379
|
|
3452
3401
|
*/
|
|
3453
|
-
portOffset: z$
|
|
3402
|
+
portOffset: z$7
|
|
3454
3403
|
.number()
|
|
3455
3404
|
.min(1000)
|
|
3456
3405
|
.max(60_000)
|
|
3457
3406
|
.int()
|
|
3458
3407
|
.refine((portOffset) => portOffset % 1000 === 0, 'Port offset must be a multiple of 1000, e.g. 1000, 2000, 3000, etc.'),
|
|
3459
3408
|
});
|
|
3409
|
+
|
|
3410
|
+
const {z: z$6} = await importShared('zod');
|
|
3411
|
+
|
|
3412
|
+
/**
|
|
3413
|
+
* Infrastructure settings schema
|
|
3414
|
+
*
|
|
3415
|
+
* Configures optional infrastructure services for the project.
|
|
3416
|
+
* These services are shared across all backend applications in the monorepo.
|
|
3417
|
+
*
|
|
3418
|
+
* Note: PostgreSQL is always enabled for backend apps and doesn't require configuration.
|
|
3419
|
+
* Port is calculated as portOffset + 432 (e.g., 3000 → 3432).
|
|
3420
|
+
* Password defaults to "{projectName}-password" and database defaults to project name.
|
|
3421
|
+
*/
|
|
3422
|
+
const infrastructureSettingsSchema = z$6.object({
|
|
3423
|
+
/**
|
|
3424
|
+
* Redis configuration (optional)
|
|
3425
|
+
*
|
|
3426
|
+
* Redis can be used for caching, sessions, and queue management.
|
|
3427
|
+
* Port is calculated as portOffset + 379 (e.g., 3000 → 3379).
|
|
3428
|
+
* Password defaults to "{projectName}-password".
|
|
3429
|
+
*/
|
|
3430
|
+
redis: z$6
|
|
3431
|
+
.object({
|
|
3432
|
+
/**
|
|
3433
|
+
* Whether to enable Redis service
|
|
3434
|
+
*/
|
|
3435
|
+
enabled: z$6.boolean().default(false),
|
|
3436
|
+
})
|
|
3437
|
+
.optional(),
|
|
3438
|
+
});
|
|
3439
|
+
|
|
3440
|
+
const {CASE_VALIDATORS} = await importShared('@baseplate-dev/utils');
|
|
3441
|
+
|
|
3442
|
+
const {z: z$5} = await importShared('zod');
|
|
3443
|
+
|
|
3444
|
+
/**
|
|
3445
|
+
* Monorepo settings schema
|
|
3446
|
+
*
|
|
3447
|
+
* Configures the folder structure for monorepo packages.
|
|
3448
|
+
* In V1, only supports configuring the apps folder location.
|
|
3449
|
+
*/
|
|
3450
|
+
const monorepoSettingsSchema = z$5.object({
|
|
3451
|
+
/**
|
|
3452
|
+
* The folder where apps are located in the monorepo.
|
|
3453
|
+
*
|
|
3454
|
+
* Must be in kebab-case format (lowercase letters and dashes only).
|
|
3455
|
+
* Apps will be placed in {appsFolder}/{app-name}, e.g. "apps/backend", "apps/web".
|
|
3456
|
+
*
|
|
3457
|
+
* @default "apps"
|
|
3458
|
+
* @example "apps" → apps/backend, apps/web
|
|
3459
|
+
* @example "applications" → applications/backend, applications/web
|
|
3460
|
+
*/
|
|
3461
|
+
appsFolder: CASE_VALIDATORS.KEBAB_CASE.min(1)
|
|
3462
|
+
.max(50)
|
|
3463
|
+
.regex(/^[a-z0-9-]+$/, {
|
|
3464
|
+
message: 'Apps folder must contain only lowercase letters, numbers, and dashes (no slashes)',
|
|
3465
|
+
})
|
|
3466
|
+
.default('apps'),
|
|
3467
|
+
});
|
|
3468
|
+
|
|
3469
|
+
const {z: z$4} = await importShared('zod');
|
|
3470
|
+
/**
|
|
3471
|
+
* Template extractor configuration schema
|
|
3472
|
+
*
|
|
3473
|
+
* Controls how template extraction works when syncing projects.
|
|
3474
|
+
* Template extraction allows updating generator templates from working code.
|
|
3475
|
+
*/
|
|
3476
|
+
const createTemplateExtractorSchema = definitionSchema(() => z$4.object({
|
|
3477
|
+
/**
|
|
3478
|
+
* Whether to write template extractor metadata when writing files to the project.
|
|
3479
|
+
*
|
|
3480
|
+
* When enabled, Baseplate will write `.templates-info.json` files that track
|
|
3481
|
+
* which generated files correspond to which templates. This metadata enables
|
|
3482
|
+
* the template extraction process to update the generator's templates from
|
|
3483
|
+
* your working code.
|
|
3484
|
+
*
|
|
3485
|
+
* Useful for: Generator development, template refinement, extracting patterns
|
|
3486
|
+
* Default: false
|
|
3487
|
+
*/
|
|
3488
|
+
writeMetadata: z$4.boolean().default(false),
|
|
3489
|
+
/**
|
|
3490
|
+
* A list of file IDs to include in the template extractor metadata.
|
|
3491
|
+
*
|
|
3492
|
+
* Used for generators that have manually assigned file IDs, particularly
|
|
3493
|
+
* generators with multiple instances (e.g. one generator per model).
|
|
3494
|
+
*
|
|
3495
|
+
* Format: Newline-delimited list of patterns
|
|
3496
|
+
* Supports wildcards: Use * to match any number of characters
|
|
3497
|
+
*
|
|
3498
|
+
* Example:
|
|
3499
|
+
* ```
|
|
3500
|
+
* user-*
|
|
3501
|
+
* post-*
|
|
3502
|
+
* comment-service-*
|
|
3503
|
+
* ```
|
|
3504
|
+
*
|
|
3505
|
+
* Default: empty string (no file ID whitelist)
|
|
3506
|
+
*/
|
|
3507
|
+
fileIdRegexWhitelist: z$4.string().default(''),
|
|
3508
|
+
}));
|
|
3509
|
+
|
|
3510
|
+
const {z: z$3} = await importShared('zod');
|
|
3511
|
+
/**
|
|
3512
|
+
* OKLCH color format validator
|
|
3513
|
+
*
|
|
3514
|
+
* OKLCH is a perceptually uniform color space that provides better color manipulation than RGB/HEX.
|
|
3515
|
+
* Format: oklch(l c h [/ a]) where:
|
|
3516
|
+
* - l (lightness): 0-1
|
|
3517
|
+
* - c (chroma): 0-1
|
|
3518
|
+
* - h (hue): 0-360
|
|
3519
|
+
* - a (alpha, optional): 0-100
|
|
3520
|
+
*
|
|
3521
|
+
* Example: "oklch(0.5 0.2 180)" or "oklch(0.5 0.2 180 / 50)"
|
|
3522
|
+
*/
|
|
3523
|
+
const oklchColor = z$3
|
|
3524
|
+
.string()
|
|
3525
|
+
.regex(/^oklch\(\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)$/, {
|
|
3526
|
+
message: 'OKLCH color must be of the format "oklch(l c h [/ a])" where l and c are between 0 and 1 and h is between 0 and 360 and a is between 0 and 100',
|
|
3527
|
+
});
|
|
3528
|
+
/**
|
|
3529
|
+
* Theme color configuration
|
|
3530
|
+
*
|
|
3531
|
+
* Maps semantic color keys (e.g. "background", "foreground", "primary") to OKLCH color values.
|
|
3532
|
+
*/
|
|
3533
|
+
const themeColorSchema = z$3.record(z$3.enum(THEME_COLOR_KEYS), oklchColor);
|
|
3534
|
+
/**
|
|
3535
|
+
* Palette configuration schema
|
|
3536
|
+
*
|
|
3537
|
+
* Defines a color palette with a base color and generated shades.
|
|
3538
|
+
* Palettes can use predefined bases (zinc, slate, etc.) or a custom base color.
|
|
3539
|
+
*/
|
|
3540
|
+
const paletteSchema = z$3
|
|
3541
|
+
.object({
|
|
3542
|
+
/**
|
|
3543
|
+
* Name of the palette base (e.g. "zinc", "slate") or "custom" for custom base color
|
|
3544
|
+
*/
|
|
3545
|
+
paletteName: z$3.string().min(1),
|
|
3546
|
+
/**
|
|
3547
|
+
* Custom base color in OKLCH format.
|
|
3548
|
+
* Required when paletteName is "custom", ignored otherwise.
|
|
3549
|
+
*/
|
|
3550
|
+
customBase: oklchColor.nullish(),
|
|
3551
|
+
/**
|
|
3552
|
+
* Generated color shades (50, 100, 200, ..., 950)
|
|
3553
|
+
* Automatically computed from the base color
|
|
3554
|
+
*/
|
|
3555
|
+
shades: z$3.record(z$3.enum(PALETTE_SHADES), oklchColor),
|
|
3556
|
+
})
|
|
3557
|
+
.refine((data) => data.paletteName !== 'custom' || !!data.customBase, {
|
|
3558
|
+
message: 'A custom base color is required if using a custom base palette',
|
|
3559
|
+
path: ['customBase'],
|
|
3560
|
+
});
|
|
3561
|
+
/**
|
|
3562
|
+
* Palettes configuration schema
|
|
3563
|
+
*
|
|
3564
|
+
* Defines base (neutral colors) and primary (brand colors) palettes
|
|
3565
|
+
*/
|
|
3566
|
+
const palettesSchema = z$3.object({
|
|
3567
|
+
/**
|
|
3568
|
+
* Base palette used for neutral colors (backgrounds, borders, text)
|
|
3569
|
+
*/
|
|
3570
|
+
base: paletteSchema,
|
|
3571
|
+
/**
|
|
3572
|
+
* Primary palette used for brand colors (buttons, links, highlights)
|
|
3573
|
+
*/
|
|
3574
|
+
primary: paletteSchema,
|
|
3575
|
+
});
|
|
3576
|
+
/**
|
|
3577
|
+
* Theme configuration schema
|
|
3578
|
+
*
|
|
3579
|
+
* Defines the complete theme including palettes and semantic color mappings for light and dark modes.
|
|
3580
|
+
*/
|
|
3581
|
+
const createThemeSchema = definitionSchema(() => z$3.object({
|
|
3582
|
+
/**
|
|
3583
|
+
* Color palettes for base and primary colors
|
|
3584
|
+
*/
|
|
3585
|
+
palettes: z$3.object({
|
|
3586
|
+
base: paletteSchema,
|
|
3587
|
+
primary: paletteSchema,
|
|
3588
|
+
}),
|
|
3589
|
+
/**
|
|
3590
|
+
* Semantic color mappings for light and dark modes
|
|
3591
|
+
*/
|
|
3592
|
+
colors: z$3.object({
|
|
3593
|
+
/**
|
|
3594
|
+
* Light mode color mappings
|
|
3595
|
+
*/
|
|
3596
|
+
light: themeColorSchema,
|
|
3597
|
+
/**
|
|
3598
|
+
* Dark mode color mappings
|
|
3599
|
+
*/
|
|
3600
|
+
dark: themeColorSchema,
|
|
3601
|
+
}),
|
|
3602
|
+
}));
|
|
3603
|
+
|
|
3604
|
+
const {z: z$2} = await importShared('zod');
|
|
3605
|
+
/**
|
|
3606
|
+
* Complete project settings schema
|
|
3607
|
+
*
|
|
3608
|
+
* Combines all settings categories:
|
|
3609
|
+
* - general: Project name, scope, and port configuration
|
|
3610
|
+
* - infrastructure: Infrastructure services (Postgres, Redis)
|
|
3611
|
+
* - monorepo: Monorepo folder configuration (optional)
|
|
3612
|
+
* - templateExtractor: Template extraction configuration (optional)
|
|
3613
|
+
* - theme: UI theme and color palette configuration (optional)
|
|
3614
|
+
*/
|
|
3460
3615
|
const createSettingsSchema = definitionSchema((ctx) => z$2.object({
|
|
3616
|
+
/**
|
|
3617
|
+
* General project settings (required)
|
|
3618
|
+
*/
|
|
3461
3619
|
general: generalSettingsSchema,
|
|
3620
|
+
/**
|
|
3621
|
+
* Infrastructure settings (optional)
|
|
3622
|
+
*
|
|
3623
|
+
* Configures infrastructure services like Postgres and Redis.
|
|
3624
|
+
* When omitted, uses default configuration (Postgres enabled, Redis disabled).
|
|
3625
|
+
*/
|
|
3626
|
+
infrastructure: infrastructureSettingsSchema.optional(),
|
|
3627
|
+
/**
|
|
3628
|
+
* Monorepo configuration (optional)
|
|
3629
|
+
*
|
|
3630
|
+
* Configures the folder structure for monorepo packages.
|
|
3631
|
+
* When omitted, uses default folder structure (apps/*).
|
|
3632
|
+
*/
|
|
3633
|
+
monorepo: monorepoSettingsSchema.optional(),
|
|
3634
|
+
/**
|
|
3635
|
+
* Template extractor configuration (optional)
|
|
3636
|
+
*
|
|
3637
|
+
* Controls how template extraction works when syncing projects.
|
|
3638
|
+
* Only needed when developing generators or extracting templates.
|
|
3639
|
+
*/
|
|
3462
3640
|
templateExtractor: createTemplateExtractorSchema(ctx).optional(),
|
|
3641
|
+
/**
|
|
3642
|
+
* Theme configuration (optional)
|
|
3643
|
+
*
|
|
3644
|
+
* Defines color palettes and semantic color mappings for the UI.
|
|
3645
|
+
* When omitted, uses default theme configuration.
|
|
3646
|
+
*/
|
|
3463
3647
|
theme: createThemeSchema(ctx).optional(),
|
|
3464
3648
|
}));
|
|
3465
3649
|
|
|
@@ -9069,6 +9253,49 @@ const migration019ColumnTypeBased = createSchemaMigration({
|
|
|
9069
9253
|
},
|
|
9070
9254
|
});
|
|
9071
9255
|
|
|
9256
|
+
/**
|
|
9257
|
+
* Migration to move enableRedis from backend apps to infrastructure settings
|
|
9258
|
+
*
|
|
9259
|
+
* This migration:
|
|
9260
|
+
* 1. Finds the first backend app with enableRedis property
|
|
9261
|
+
* 2. Moves that value to settings.infrastructure.redis.enabled
|
|
9262
|
+
* 3. Removes enableRedis from all backend apps
|
|
9263
|
+
*/
|
|
9264
|
+
const migration020MoveRedisToInfrastructure = createSchemaMigration({
|
|
9265
|
+
version: 20,
|
|
9266
|
+
name: 'moveRedisToInfrastructure',
|
|
9267
|
+
description: 'Move enableRedis from backend apps to settings.infrastructure.redis.enabled',
|
|
9268
|
+
migrate: (config) => {
|
|
9269
|
+
// Find the first backend app with enableRedis
|
|
9270
|
+
const firstBackendApp = config.apps?.find((app) => app.type === 'backend' && 'enableRedis' in app);
|
|
9271
|
+
// Get the enableRedis value (default to false if not found)
|
|
9272
|
+
const enableRedis = firstBackendApp?.enableRedis ?? false;
|
|
9273
|
+
// Remove enableRedis from all apps
|
|
9274
|
+
const apps = config.apps?.map((app) => {
|
|
9275
|
+
if (app.type === 'backend' && 'enableRedis' in app) {
|
|
9276
|
+
const { enableRedis: _, ...rest } = app;
|
|
9277
|
+
return rest;
|
|
9278
|
+
}
|
|
9279
|
+
return app;
|
|
9280
|
+
});
|
|
9281
|
+
// Update settings with infrastructure.redis.enabled
|
|
9282
|
+
const settings = {
|
|
9283
|
+
...config.settings,
|
|
9284
|
+
infrastructure: {
|
|
9285
|
+
...config.settings?.infrastructure,
|
|
9286
|
+
redis: {
|
|
9287
|
+
enabled: enableRedis,
|
|
9288
|
+
},
|
|
9289
|
+
},
|
|
9290
|
+
};
|
|
9291
|
+
return {
|
|
9292
|
+
...config,
|
|
9293
|
+
apps,
|
|
9294
|
+
settings,
|
|
9295
|
+
};
|
|
9296
|
+
},
|
|
9297
|
+
});
|
|
9298
|
+
|
|
9072
9299
|
const SCHEMA_MIGRATIONS = [
|
|
9073
9300
|
migration005PrimaryUniqueRefs,
|
|
9074
9301
|
migration006IndividualServiceControllers,
|
|
@@ -9085,6 +9312,7 @@ const SCHEMA_MIGRATIONS = [
|
|
|
9085
9312
|
migration017RenameAuthPlugin,
|
|
9086
9313
|
migration018CrudNameFieldRef,
|
|
9087
9314
|
migration019ColumnTypeBased,
|
|
9315
|
+
migration020MoveRedisToInfrastructure,
|
|
9088
9316
|
];
|
|
9089
9317
|
function isMigrateableProjectDefinition(projectDefinition) {
|
|
9090
9318
|
return (typeof projectDefinition === 'object' &&
|
|
@@ -9152,7 +9380,16 @@ function createTestProjectDefinitionContainer(input = {}) {
|
|
|
9152
9380
|
};
|
|
9153
9381
|
const pluginImplementationStore = new PluginImplementationStore({});
|
|
9154
9382
|
const resolvedRefPayload = deserializeSchemaWithTransformedReferences(createProjectDefinitionSchema, createTestProjectDefinitionInput(input), { plugins: pluginImplementationStore });
|
|
9155
|
-
return new ProjectDefinitionContainer(resolvedRefPayload, {
|
|
9383
|
+
return new ProjectDefinitionContainer(resolvedRefPayload, {
|
|
9384
|
+
pluginStore,
|
|
9385
|
+
cliVersion: '0.1.0',
|
|
9386
|
+
project: {
|
|
9387
|
+
id: 'test-project',
|
|
9388
|
+
name: 'test-project',
|
|
9389
|
+
directory: '/test-project',
|
|
9390
|
+
isInternalExample: false,
|
|
9391
|
+
},
|
|
9392
|
+
}, pluginImplementationStore);
|
|
9156
9393
|
}
|
|
9157
9394
|
|
|
9158
9395
|
const AVAILABLE_FLAGS = ['TEMPLATE_EXTRACTOR'];
|
|
@@ -10213,5 +10450,5 @@ function generateDefaultTheme() {
|
|
|
10213
10450
|
};
|
|
10214
10451
|
}
|
|
10215
10452
|
|
|
10216
|
-
export { AVAILABLE_FLAGS, AppUtils, BUILT_IN_ADMIN_CRUD_ACTIONS, BUILT_IN_ADMIN_CRUD_COLUMNS, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DefinitionRefBuilder, EnumUtils, FIXED_COLOR_MAPPINGS, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PluginImplementationStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, 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, authConfigSpec, authModelConfigSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudActionSchema, baseAdminCrudColumnSchema, baseAdminCrudInputSchema, baseAppSchema, baseAppValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudActionCompilerImplementation, createAdminCrudActionImplementation, createAdminCrudActionSchema, createAdminCrudActionType, createAdminCrudColumnCompiler, createAdminCrudColumnCompilerImplementation, createAdminCrudColumnImplementation, createAdminCrudColumnSchema, createAdminCrudColumnType, createAdminCrudDeleteActionSchema, createAdminCrudEditActionSchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedListSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEmbeddedObjectSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignColumnSchema, createAdminCrudForeignInputSchema, createAdminCrudInputCompilerImplementation, createAdminCrudInputImplementation, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTextColumnSchema, createAdminCrudTextInputSchema, createAppCompiler, createAppCompilerPlugin, createAppEntryType, createAppSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, createEmbeddedRelationTransformerSchema, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createFeaturesSchema, createModelBaseSchema, createModelGraphqlSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerCompilerImplementation, createModelTransformerImplementation, createModelTransformerType, createModelUniqueConstraintSchema,
|
|
10217
|
-
//# sourceMappingURL=project-builder-lib-
|
|
10453
|
+
export { AVAILABLE_FLAGS, AppUtils, BUILT_IN_ADMIN_CRUD_ACTIONS, BUILT_IN_ADMIN_CRUD_COLUMNS, BUILT_IN_ADMIN_CRUD_INPUTS, BUILT_IN_TRANSFORMERS, COLOR_PALETTES, DefinitionRefBuilder, EnumUtils, FIXED_COLOR_MAPPINGS, ModelFieldUtils, ModelTransformerUtils, ModelUtils, PALETTE_SHADES, PluginImplementationStore, PluginUtils, ProjectDefinitionContainer, REFERENTIAL_ACTIONS, 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, authConfigSpec, authModelConfigSpec, authRoleEntityType, backendAppEntryType, baseAdminCrudActionSchema, baseAdminCrudColumnSchema, baseAdminCrudInputSchema, baseAppSchema, baseAppValidators, basePluginDefinitionSchema, baseTransformerFields, baseTransformerSchema, convertColorNameToOklch, convertHexToOklch, convertOklchToColorName, convertOklchToHex, createAdminAppSchema, createAdminCrudActionCompilerImplementation, createAdminCrudActionImplementation, createAdminCrudActionSchema, createAdminCrudActionType, createAdminCrudColumnCompiler, createAdminCrudColumnCompilerImplementation, createAdminCrudColumnImplementation, createAdminCrudColumnSchema, createAdminCrudColumnType, createAdminCrudDeleteActionSchema, createAdminCrudEditActionSchema, createAdminCrudEmbeddedFormSchema, createAdminCrudEmbeddedInputSchema, createAdminCrudEmbeddedListSchema, createAdminCrudEmbeddedLocalInputSchema, createAdminCrudEmbeddedObjectSchema, createAdminCrudEnumInputSchema, createAdminCrudForeignColumnSchema, createAdminCrudForeignInputSchema, createAdminCrudInputCompilerImplementation, createAdminCrudInputImplementation, createAdminCrudInputSchema, createAdminCrudInputType, createAdminCrudPasswordInputSchema, createAdminCrudSectionSchema, createAdminCrudTextColumnSchema, createAdminCrudTextInputSchema, createAppCompiler, createAppCompilerPlugin, createAppEntryType, createAppSchema, createBackendAppSchema, createBaseAdminSectionValidators, createDefinitionEntityNameResolver, createDefinitionSchemaParserContext, createEmbeddedRelationTransformerSchema, createEntityType, createEnumBaseSchema, createEnumSchema, createEnumValueSchema, createFeaturesSchema, createModelBaseSchema, createModelGraphqlSchema, createModelRelationFieldSchema, createModelScalarFieldSchema, createModelSchema, createModelServiceSchema, createModelTransformerCompilerImplementation, createModelTransformerImplementation, createModelTransformerType, createModelUniqueConstraintSchema, createPlatformPluginExport, createPluginConfigImplementation, createPluginImplementationStore, createPluginImplementationStoreWithNewPlugins, createPluginSpec, createPluginWithConfigSchema, createPluginsSchema, createProjectDefinitionSchema, createProjectDefinitionSchemaWithContext, createSettingsSchema, createTemplateExtractorSchema, createTestProjectDefinition, createTestProjectDefinitionContainer, createTestProjectDefinitionInput, createThemeSchema, createTransformerSchema, createWebAdminSectionSchema, createWebAppSchema, createWebConfigImplementation, definitionSchema, deserializeSchemaWithTransformedReferences, extractDefinitionRefs, extractDefinitionRefsRecursive, featureEntityType, fixRefDeletions, generalSettingsSchema, generateCssFromThemeConfig, generateDefaultTheme, generateThemeColorsFromShade, getBackendRelativePath, getDefaultThemeColorFromShade, getLatestMigrationVersion, getManagedPluginsForPlugin, getPluginMetadataByKey, getPluginMetadataByKeyOrThrow, infrastructureSettingsSchema, initializePlugins, isMigrateableProjectDefinition, modelEntityType, modelEnumEntityType, modelEnumValueEntityType, modelForeignRelationEntityType, modelLocalRelationEntityType, modelScalarFieldEntityType, modelTransformerCompilerSpec, modelTransformerEntityType, modelTransformerSpec, modelUniqueConstraintEntityType, monorepoSettingsSchema, oklchColor, paletteSchema, palettesSchema, parseOklch, parseProjectDefinitionWithContext, parseProjectDefinitionWithReferences, pluginConfigSpec, pluginEntityType, pluginMetadataSchema, pluginSpecDependencySchema, pluginSpecSupportSchema, runPluginMigrations, runSchemaMigrations, serializeSchema, serializeSchemaFromRefPayload, stripEmptyGeneratorChildren, stripUndefinedValues, themeColorSchema, undefinedIfEmpty, undefinedIfFalsy, webAppEntryType, webConfigSpec };
|
|
10454
|
+
//# sourceMappingURL=project-builder-lib-BvJ1_iif.js.map
|