runlify 0.0.780 → 0.0.782
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/build/projectsGeneration/args.js +39 -3
- package/build/projectsGeneration/builders/BaseSavableEntityBuilder.js +10 -2
- package/build/projectsGeneration/builders/SystemMetaBuilder.js +55 -9
- package/build/projectsGeneration/builders/buildedTypes.js +1 -1
- package/build/projectsGeneration/defaultCatalogs/addElasticSearch.js +2 -1
- package/build/projectsGeneration/generateProject/generateEnvironment.js +36 -8
- package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/getPrisma.js +75 -8
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/class.js +8 -4
- package/build/projectsGeneration/generators/fileTemplates/back/services/entity/config.js +2 -2
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.js +17 -6
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.js +3 -3
- package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntitiesWithClientAdnDb.js +67 -9
- package/build/projectsGeneration/utils/databaseMeta.js +75 -0
- package/build/types/projectsGeneration/builders/BaseSavableEntityBuilder.d.ts +2 -0
- package/build/types/projectsGeneration/builders/SystemMetaBuilder.d.ts +2 -0
- package/build/types/projectsGeneration/builders/buildedTypes.d.ts +5 -0
- package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/clients/getPrisma.d.ts +2 -2
- package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaEntity.d.ts +1 -1
- package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.d.ts +1 -1
- package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntitiesWithClientAdnDb.d.ts +12 -1
- package/build/types/projectsGeneration/utils/databaseMeta.d.ts +8 -0
- package/package.json +1 -1
|
@@ -18,6 +18,9 @@ export interface Glossary {
|
|
|
18
18
|
term: string;
|
|
19
19
|
definition: string;
|
|
20
20
|
}
|
|
21
|
+
export type DataBaseMeta = {
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
21
24
|
export type ProjectCategory = 'back' | 'ui' | 'app' | 'land';
|
|
22
25
|
export interface Command {
|
|
23
26
|
projectCategory: ProjectCategory;
|
|
@@ -238,6 +241,7 @@ export type BaseSavableEntity = BaseEntity & {
|
|
|
238
241
|
labels: string[];
|
|
239
242
|
excludeFromCommonMenu: boolean;
|
|
240
243
|
cacheable: boolean;
|
|
244
|
+
database: string;
|
|
241
245
|
};
|
|
242
246
|
export type Report = BaseEntity & {
|
|
243
247
|
type: 'report';
|
|
@@ -427,6 +431,7 @@ export type System = {
|
|
|
427
431
|
prefix: string;
|
|
428
432
|
needFor?: string;
|
|
429
433
|
configVars: ConfigVar[];
|
|
434
|
+
dataBases: DataBaseMeta[];
|
|
430
435
|
catalogs: Catalog[];
|
|
431
436
|
documents: Document[];
|
|
432
437
|
infoRegistries: InfoRegistry[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const prismaGetterTmpl: (
|
|
1
|
+
import { ProjectWideGenerationArgs } from '../../../../../../args';
|
|
2
|
+
export declare const prismaGetterTmpl: (args: ProjectWideGenerationArgs) => string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Entity } from '../../../builders';
|
|
2
2
|
import { LinkedEntities } from '../../../types';
|
|
3
|
-
export declare const genPrismaEntity: (entity: Entity, links: LinkedEntities[], forShards?: boolean) => string;
|
|
3
|
+
export declare const genPrismaEntity: (entity: Entity, links: LinkedEntities[], forShards?: boolean, allEntities?: Map<string, Entity>) => string;
|
package/build/types/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Entity } from '../../../builders';
|
|
2
2
|
import { LinkedEntities } from '../../../types';
|
|
3
|
-
export declare const genPrismaSchemaForEntities: (entities: Entity[], links: LinkedEntities[], forShards?: boolean) => string;
|
|
3
|
+
export declare const genPrismaSchemaForEntities: (entities: Entity[], links: LinkedEntities[], forShards?: boolean, allEntities?: Map<string, Entity>) => string;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import { ProjectWideGenerationArgs } from '../../../args';
|
|
2
|
-
export
|
|
2
|
+
export type GenPrismaSchemaDbOptions = {
|
|
3
|
+
/** Logical database key; `main` uses legacy paths and split by sharding. */
|
|
4
|
+
database: string;
|
|
5
|
+
/**
|
|
6
|
+
* When `database === 'main'`, same as today: shard vs non-shard models.
|
|
7
|
+
* For `database !== 'main'`, callers must pass `false` (sharding ignored).
|
|
8
|
+
*/
|
|
9
|
+
forShards: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const genPrismaSchemaForEntitiesWithClientAdnDb: (args: ProjectWideGenerationArgs, opts: GenPrismaSchemaDbOptions) => string;
|
|
12
|
+
/** Minimal deploy schema (migrate URL only). */
|
|
13
|
+
export declare const genDeployConnectionPrisma: (database: string) => string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ConfigVar } from '../builders/buildedTypes';
|
|
2
|
+
export declare const postgresUrlDatabaseName: (metaDbName: string) => string;
|
|
3
|
+
export declare const validateEntityDatabaseName: (name: string) => void;
|
|
4
|
+
/** Config vars for a non-main database (mirrors database.main.* in SystemMetaBuilder). */
|
|
5
|
+
export declare const buildConfigVarsForAdditionalDatabase: (dbName: string) => ConfigVar[];
|
|
6
|
+
export declare const databaseNameToEnvSuffix: (dbName: string) => string;
|
|
7
|
+
export declare const prismaDatasourceWriteEnvVar: (database: string) => string;
|
|
8
|
+
export declare const prismaDatasourceMigrationEnvVar: (database: string) => string;
|