@carlonicora/nestjs-neo4jsonapi 1.5.1 → 1.6.0
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/agents/community.detector/services/community.detector.service.d.ts.map +1 -1
- package/dist/agents/community.detector/services/community.detector.service.js.map +1 -1
- package/dist/bootstrap/app.module.factory.d.ts.map +1 -1
- package/dist/bootstrap/app.module.factory.js +23 -1
- package/dist/bootstrap/app.module.factory.js.map +1 -1
- package/dist/common/guards/index.d.ts +1 -1
- package/dist/common/guards/index.d.ts.map +1 -1
- package/dist/common/guards/index.js +1 -1
- package/dist/common/guards/index.js.map +1 -1
- package/dist/config/base.config.d.ts.map +1 -1
- package/dist/config/base.config.js +2 -0
- package/dist/config/base.config.js.map +1 -1
- package/dist/config/interfaces/config.discord.interface.d.ts +2 -0
- package/dist/config/interfaces/config.discord.interface.d.ts.map +1 -1
- package/dist/config/interfaces/index.d.ts +1 -0
- package/dist/config/interfaces/index.d.ts.map +1 -1
- package/dist/config/interfaces/index.js +1 -0
- package/dist/config/interfaces/index.js.map +1 -1
- package/dist/core/neo4j/abstracts/abstract.repository.d.ts.map +1 -1
- package/dist/core/neo4j/abstracts/abstract.repository.js +9 -3
- package/dist/core/neo4j/abstracts/abstract.repository.js.map +1 -1
- package/dist/foundations/auth/auth.module.js +2 -2
- package/dist/foundations/auth/auth.module.js.map +1 -1
- package/dist/foundations/auth/services/auth.discord.service.d.ts +3 -1
- package/dist/foundations/auth/services/auth.discord.service.d.ts.map +1 -1
- package/dist/foundations/auth/services/auth.discord.service.js +5 -21
- package/dist/foundations/auth/services/auth.discord.service.js.map +1 -1
- package/dist/foundations/discord/discord.module.d.ts +3 -0
- package/dist/foundations/discord/discord.module.d.ts.map +1 -0
- package/dist/foundations/discord/discord.module.js +23 -0
- package/dist/foundations/discord/discord.module.js.map +1 -0
- package/dist/foundations/discord/index.d.ts +4 -0
- package/dist/foundations/discord/index.d.ts.map +1 -0
- package/dist/foundations/discord/index.js +20 -0
- package/dist/foundations/discord/index.js.map +1 -0
- package/dist/foundations/discord/serialisers/discord.error.serialiser.d.ts +8 -0
- package/dist/foundations/discord/serialisers/discord.error.serialiser.d.ts.map +1 -0
- package/dist/foundations/discord/serialisers/discord.error.serialiser.js +23 -0
- package/dist/foundations/discord/serialisers/discord.error.serialiser.js.map +1 -0
- package/dist/foundations/discord/services/discord.service.d.ts +11 -0
- package/dist/foundations/discord/services/discord.service.d.ts.map +1 -0
- package/dist/foundations/discord/services/discord.service.js +54 -0
- package/dist/foundations/discord/services/discord.service.js.map +1 -0
- package/dist/foundations/discord-user/discord-user.module.d.ts +3 -0
- package/dist/foundations/discord-user/discord-user.module.d.ts.map +1 -0
- package/dist/foundations/discord-user/{discord.module.js → discord-user.module.js} +4 -3
- package/dist/foundations/discord-user/discord-user.module.js.map +1 -0
- package/dist/foundations/discord-user/index.d.ts +5 -0
- package/dist/foundations/discord-user/index.d.ts.map +1 -0
- package/dist/foundations/discord-user/index.js +21 -0
- package/dist/foundations/discord-user/index.js.map +1 -0
- package/dist/foundations/discord-user/services/discord-user.service.d.ts +16 -0
- package/dist/foundations/discord-user/services/discord-user.service.d.ts.map +1 -0
- package/dist/foundations/discord-user/services/discord-user.service.js +54 -0
- package/dist/foundations/discord-user/services/discord-user.service.js.map +1 -0
- package/dist/foundations/discord-user/types/discord.user.type.d.ts +1 -1
- package/dist/foundations/discord-user/types/discord.user.type.d.ts.map +1 -1
- package/dist/foundations/foundations.modules.js +2 -2
- package/dist/foundations/foundations.modules.js.map +1 -1
- package/dist/foundations/index.d.ts +2 -0
- package/dist/foundations/index.d.ts.map +1 -1
- package/dist/foundations/index.js +2 -0
- package/dist/foundations/index.js.map +1 -1
- package/dist/scripts/generate-module/generator.d.ts.map +1 -1
- package/dist/scripts/generate-module/generator.js +6 -0
- package/dist/scripts/generate-module/generator.js.map +1 -1
- package/dist/scripts/generate-module/templates/controller.template.d.ts.map +1 -1
- package/dist/scripts/generate-module/templates/controller.template.js +34 -12
- package/dist/scripts/generate-module/templates/controller.template.js.map +1 -1
- package/dist/scripts/generate-module/templates/dto.post.template.d.ts.map +1 -1
- package/dist/scripts/generate-module/templates/dto.post.template.js +19 -3
- package/dist/scripts/generate-module/templates/dto.post.template.js.map +1 -1
- package/dist/scripts/generate-module/templates/dto.put.template.d.ts.map +1 -1
- package/dist/scripts/generate-module/templates/dto.put.template.js +19 -3
- package/dist/scripts/generate-module/templates/dto.put.template.js.map +1 -1
- package/dist/scripts/generate-module/templates/entity.template.d.ts.map +1 -1
- package/dist/scripts/generate-module/templates/entity.template.js +48 -24
- package/dist/scripts/generate-module/templates/entity.template.js.map +1 -1
- package/dist/scripts/generate-module/templates/meta.template.d.ts +12 -0
- package/dist/scripts/generate-module/templates/meta.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/meta.template.js +25 -0
- package/dist/scripts/generate-module/templates/meta.template.js.map +1 -0
- package/dist/scripts/generate-module/transformers/import-resolver.d.ts +66 -0
- package/dist/scripts/generate-module/transformers/import-resolver.d.ts.map +1 -1
- package/dist/scripts/generate-module/transformers/import-resolver.js +91 -0
- package/dist/scripts/generate-module/transformers/import-resolver.js.map +1 -1
- package/dist/scripts/generate-module/transformers/nested-route-generator.d.ts.map +1 -1
- package/dist/scripts/generate-module/transformers/nested-route-generator.js +13 -3
- package/dist/scripts/generate-module/transformers/nested-route-generator.js.map +1 -1
- package/dist/scripts/generate-module/transformers/relationship-mapper.d.ts +3 -3
- package/dist/scripts/generate-module/transformers/relationship-mapper.d.ts.map +1 -1
- package/dist/scripts/generate-module/transformers/relationship-mapper.js +33 -10
- package/dist/scripts/generate-module/transformers/relationship-mapper.js.map +1 -1
- package/dist/scripts/generate-module/types/template-data.interface.d.ts +7 -0
- package/dist/scripts/generate-module/types/template-data.interface.d.ts.map +1 -1
- package/package.json +8 -6
- package/dist/foundations/discord-user/discord.module.d.ts +0 -3
- package/dist/foundations/discord-user/discord.module.d.ts.map +0 -1
- package/dist/foundations/discord-user/discord.module.js.map +0 -1
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateEntityFile = generateEntityFile;
|
|
4
4
|
const import_resolver_1 = require("../transformers/import-resolver");
|
|
5
|
+
/**
|
|
6
|
+
* Get the entity type import path
|
|
7
|
+
*
|
|
8
|
+
* For foundation entities: imports from the package
|
|
9
|
+
* For feature entities: relative path to entity file
|
|
10
|
+
*/
|
|
11
|
+
function getEntityImportPath(rel) {
|
|
12
|
+
return (0, import_resolver_1.isFoundationImport)(rel.relatedEntity.directory)
|
|
13
|
+
? import_resolver_1.FOUNDATION_PACKAGE
|
|
14
|
+
: `src/${rel.relatedEntity.directory}/${rel.relatedEntity.kebabCase}/entities/${rel.relatedEntity.kebabCase}`;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get the meta import path
|
|
18
|
+
*
|
|
19
|
+
* For foundation entities: imports from the package (metas are re-exported)
|
|
20
|
+
* For feature entities: relative path to meta file
|
|
21
|
+
*/
|
|
22
|
+
function getMetaImportPath(rel) {
|
|
23
|
+
return (0, import_resolver_1.isFoundationImport)(rel.relatedEntity.directory)
|
|
24
|
+
? import_resolver_1.FOUNDATION_PACKAGE
|
|
25
|
+
: `src/${rel.relatedEntity.directory}/${rel.relatedEntity.kebabCase}/entities/${rel.relatedEntity.kebabCase}.meta`;
|
|
26
|
+
}
|
|
5
27
|
/**
|
|
6
28
|
* Generate entity file content (Type + Descriptor)
|
|
7
29
|
*
|
|
@@ -12,38 +34,34 @@ const import_resolver_1 = require("../transformers/import-resolver");
|
|
|
12
34
|
* @returns Generated TypeScript code
|
|
13
35
|
*/
|
|
14
36
|
function generateEntityFile(data) {
|
|
15
|
-
const { names, endpoint, nodeName, labelName, fields, relationships
|
|
37
|
+
const { names, endpoint, nodeName, labelName, fields, relationships } = data;
|
|
16
38
|
// Build imports
|
|
17
39
|
const libraryImports = ["defineEntity", "Entity"];
|
|
18
40
|
if (data.isCompanyScoped) {
|
|
19
41
|
libraryImports.push("Company");
|
|
20
42
|
}
|
|
21
|
-
//
|
|
22
|
-
|
|
43
|
+
// All entities use meta pattern to avoid circular dependencies
|
|
44
|
+
// Entity type imports (grouped by path) - for type annotations
|
|
23
45
|
const entityImportsByPath = new Map();
|
|
46
|
+
const processedEntities = new Set();
|
|
24
47
|
for (const rel of relationships) {
|
|
25
|
-
if (!
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const importPath = (0, import_resolver_1.isFoundationImport)(rel.relatedEntity.directory)
|
|
29
|
-
? import_resolver_1.FOUNDATION_PACKAGE
|
|
30
|
-
: `../../${rel.relatedEntity.directory}/${rel.relatedEntity.kebabCase}/entities/${rel.relatedEntity.kebabCase}.entity`;
|
|
48
|
+
if (!processedEntities.has(rel.relatedEntity.name)) {
|
|
49
|
+
processedEntities.add(rel.relatedEntity.name);
|
|
50
|
+
const importPath = getEntityImportPath(rel);
|
|
31
51
|
if (!entityImportsByPath.has(importPath)) {
|
|
32
52
|
entityImportsByPath.set(importPath, []);
|
|
33
53
|
}
|
|
34
54
|
entityImportsByPath.get(importPath).push(rel.relatedEntity.name);
|
|
35
55
|
}
|
|
36
56
|
}
|
|
37
|
-
//
|
|
38
|
-
const uniqueMetaImports = new Set();
|
|
57
|
+
// Meta imports (grouped by path) - for relationship model references
|
|
39
58
|
const metaImportsByPath = new Map();
|
|
59
|
+
const processedMetas = new Set();
|
|
40
60
|
for (const rel of relationships) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const importPath = (
|
|
45
|
-
? import_resolver_1.FOUNDATION_PACKAGE
|
|
46
|
-
: `../../${rel.relatedEntity.directory}/${rel.relatedEntity.kebabCase}/entities/${rel.relatedEntity.kebabCase}.meta`;
|
|
61
|
+
// Model is like "userMeta", "ownerMeta", "campaignMeta", etc.
|
|
62
|
+
if (!processedMetas.has(rel.model)) {
|
|
63
|
+
processedMetas.add(rel.model);
|
|
64
|
+
const importPath = getMetaImportPath(rel);
|
|
47
65
|
if (!metaImportsByPath.has(importPath)) {
|
|
48
66
|
metaImportsByPath.set(importPath, []);
|
|
49
67
|
}
|
|
@@ -78,13 +96,19 @@ function generateEntityFile(data) {
|
|
|
78
96
|
return ` ${rel.key}: {\n ${parts.join(",\n ")},\n },`;
|
|
79
97
|
})
|
|
80
98
|
.join("\n");
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
.join("
|
|
99
|
+
// Build all import lines
|
|
100
|
+
const importLines = [];
|
|
101
|
+
// Library imports (always first)
|
|
102
|
+
importLines.push(`import { ${libraryImports.join(", ")} } from "@carlonicora/nestjs-neo4jsonapi";`);
|
|
103
|
+
// Entity type imports (for type annotations in the type definition)
|
|
104
|
+
for (const [importPath, items] of entityImportsByPath.entries()) {
|
|
105
|
+
importLines.push(`import { ${items.join(", ")} } from "${importPath}";`);
|
|
106
|
+
}
|
|
107
|
+
// Meta imports (for relationship model references)
|
|
108
|
+
for (const [importPath, items] of metaImportsByPath.entries()) {
|
|
109
|
+
importLines.push(`import { ${items.join(", ")} } from "${importPath}";`);
|
|
110
|
+
}
|
|
111
|
+
return `${importLines.join("\n")}
|
|
88
112
|
|
|
89
113
|
/**
|
|
90
114
|
* ${names.pascalCase} Entity Type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity.template.js","sourceRoot":"","sources":["../../../../scripts/generate-module/templates/entity.template.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"entity.template.js","sourceRoot":"","sources":["../../../../scripts/generate-module/templates/entity.template.ts"],"names":[],"mappings":";;AAoCA,gDAsIC;AAzKD,qEAAyF;AAEzF;;;;;GAKG;AACH,SAAS,mBAAmB,CAAC,GAA2B;IACtD,OAAO,IAAA,oCAAkB,EAAC,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC;QACpD,CAAC,CAAC,oCAAkB;QACpB,CAAC,CAAC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C,KAAK,CAAC,UAAU,6BAA6B,KAAK,CAAC,UAAU;WACjE,QAAQ;eACJ,QAAQ;eACR,QAAQ;gBACP,SAAS;EACvB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE;;EAE5D,gBAAgB;;;;EAIhB,uBAAuB;;;;cAIX,KAAK,CAAC,UAAU,2BAA2B,KAAK,CAAC,UAAU;CACxE,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TemplateData } from "../types/template-data.interface";
|
|
2
|
+
/**
|
|
3
|
+
* Generate meta file content
|
|
4
|
+
*
|
|
5
|
+
* Meta files contain lightweight metadata (type, endpoint, nodeName, labelName)
|
|
6
|
+
* that can be imported without causing circular dependencies.
|
|
7
|
+
*
|
|
8
|
+
* @param data - Template data
|
|
9
|
+
* @returns Generated TypeScript code for meta file
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateMetaFile(data: TemplateData): string;
|
|
12
|
+
//# sourceMappingURL=meta.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.template.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/templates/meta.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAY3D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateMetaFile = generateMetaFile;
|
|
4
|
+
/**
|
|
5
|
+
* Generate meta file content
|
|
6
|
+
*
|
|
7
|
+
* Meta files contain lightweight metadata (type, endpoint, nodeName, labelName)
|
|
8
|
+
* that can be imported without causing circular dependencies.
|
|
9
|
+
*
|
|
10
|
+
* @param data - Template data
|
|
11
|
+
* @returns Generated TypeScript code for meta file
|
|
12
|
+
*/
|
|
13
|
+
function generateMetaFile(data) {
|
|
14
|
+
const { names, endpoint, nodeName, labelName } = data;
|
|
15
|
+
return `import { DataMeta } from "@carlonicora/nestjs-neo4jsonapi";
|
|
16
|
+
|
|
17
|
+
export const ${names.camelCase}Meta: DataMeta = {
|
|
18
|
+
type: "${endpoint}",
|
|
19
|
+
endpoint: "${endpoint}",
|
|
20
|
+
nodeName: "${nodeName}",
|
|
21
|
+
labelName: "${labelName}",
|
|
22
|
+
};
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=meta.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meta.template.js","sourceRoot":"","sources":["../../../../scripts/generate-module/templates/meta.template.ts"],"names":[],"mappings":";;AAWA,4CAYC;AArBD;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAAC,IAAkB;IACjD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAEtD,OAAO;;eAEM,KAAK,CAAC,SAAS;WACnB,QAAQ;eACJ,QAAQ;eACR,QAAQ;gBACP,SAAS;;CAExB,CAAC;AACF,CAAC"}
|
|
@@ -13,6 +13,47 @@ export declare const FOUNDATION_PACKAGE = "@carlonicora/nestjs-neo4jsonapi";
|
|
|
13
13
|
* isFoundationImport("features/campaign") // false
|
|
14
14
|
*/
|
|
15
15
|
export declare function isFoundationImport(directory: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Check if a related entity uses the NEW structure (Descriptor pattern)
|
|
18
|
+
*
|
|
19
|
+
* IMPORTANT: As of the circular dependency fix, we ALWAYS generate .meta.ts files
|
|
20
|
+
* for all entities. This means all entities now use the OLD structure (meta pattern)
|
|
21
|
+
* to avoid circular imports between entities that reference each other.
|
|
22
|
+
*
|
|
23
|
+
* @param params - Directory and module name of the related entity
|
|
24
|
+
* @returns Always false - all entities now use meta pattern
|
|
25
|
+
*
|
|
26
|
+
* @deprecated This function now always returns false. All entities use meta pattern.
|
|
27
|
+
*/
|
|
28
|
+
export declare function isNewEntityStructure(params: {
|
|
29
|
+
directory: string;
|
|
30
|
+
moduleName: string;
|
|
31
|
+
}): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Get the model reference string for a relationship
|
|
34
|
+
*
|
|
35
|
+
* @param params - Entity name and structure type
|
|
36
|
+
* @returns Model reference string for use in relationship definition
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* getModelReference({ isNewStructure: false, entityName: "User", variantName: "owner" })
|
|
40
|
+
* // Returns: "ownerMeta"
|
|
41
|
+
*
|
|
42
|
+
* getModelReference({ isNewStructure: true, entityName: "Character" })
|
|
43
|
+
* // Returns: "CharacterDescriptor.model"
|
|
44
|
+
*/
|
|
45
|
+
export declare function getModelReference(params: {
|
|
46
|
+
isNewStructure: boolean;
|
|
47
|
+
entityName: string;
|
|
48
|
+
variantName?: string;
|
|
49
|
+
}): string;
|
|
50
|
+
/**
|
|
51
|
+
* Get the Descriptor name for NEW structure entities
|
|
52
|
+
*
|
|
53
|
+
* @param entityName - PascalCase entity name
|
|
54
|
+
* @returns Descriptor name (e.g., "CharacterDescriptor")
|
|
55
|
+
*/
|
|
56
|
+
export declare function getDescriptorName(entityName: string): string;
|
|
16
57
|
/**
|
|
17
58
|
* Resolve relative import path between two modules
|
|
18
59
|
*
|
|
@@ -90,4 +131,29 @@ export declare function resolveDtoImportPath(params: {
|
|
|
90
131
|
* // Returns: "../entities/comment"
|
|
91
132
|
*/
|
|
92
133
|
export declare function resolveModuleInternalPath(subpath: string): string;
|
|
134
|
+
/**
|
|
135
|
+
* Resolve import path for NEW structure entity file
|
|
136
|
+
* NEW structure uses absolute paths from src and no .entity suffix
|
|
137
|
+
*
|
|
138
|
+
* @param params - Directory and module info
|
|
139
|
+
* @returns Absolute import path for entity (e.g., "src/features/character/entities/character")
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* resolveNewEntityImportPath({ directory: "features", moduleName: "character" })
|
|
143
|
+
* // Returns: "src/features/character/entities/character"
|
|
144
|
+
*/
|
|
145
|
+
export declare function resolveNewEntityImportPath(params: {
|
|
146
|
+
directory: string;
|
|
147
|
+
moduleName: string;
|
|
148
|
+
}): string;
|
|
149
|
+
/**
|
|
150
|
+
* Resolve import path for NEW structure DTO file
|
|
151
|
+
*
|
|
152
|
+
* @param params - Directory and module info
|
|
153
|
+
* @returns Absolute import path for DTO (e.g., "src/features/character/dtos/character.dto")
|
|
154
|
+
*/
|
|
155
|
+
export declare function resolveNewDtoImportPath(params: {
|
|
156
|
+
directory: string;
|
|
157
|
+
moduleName: string;
|
|
158
|
+
}): string;
|
|
93
159
|
//# sourceMappingURL=import-resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-resolver.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/import-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"import-resolver.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/import-resolver.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,kBAAkB,oCAAoC,CAAC;AAEpE;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAK/F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,OAAO,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,MAAM,CAUT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,U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
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FOUNDATION_PACKAGE = void 0;
|
|
4
4
|
exports.isFoundationImport = isFoundationImport;
|
|
5
|
+
exports.isNewEntityStructure = isNewEntityStructure;
|
|
6
|
+
exports.getModelReference = getModelReference;
|
|
7
|
+
exports.getDescriptorName = getDescriptorName;
|
|
5
8
|
exports.resolveImportPath = resolveImportPath;
|
|
6
9
|
exports.resolveEntityImportPath = resolveEntityImportPath;
|
|
7
10
|
exports.resolveMetaImportPath = resolveMetaImportPath;
|
|
8
11
|
exports.resolveDtoImportPath = resolveDtoImportPath;
|
|
9
12
|
exports.resolveModuleInternalPath = resolveModuleInternalPath;
|
|
13
|
+
exports.resolveNewEntityImportPath = resolveNewEntityImportPath;
|
|
14
|
+
exports.resolveNewDtoImportPath = resolveNewDtoImportPath;
|
|
10
15
|
/**
|
|
11
16
|
* Foundation package name constant
|
|
12
17
|
*/
|
|
@@ -24,6 +29,57 @@ exports.FOUNDATION_PACKAGE = "@carlonicora/nestjs-neo4jsonapi";
|
|
|
24
29
|
function isFoundationImport(directory) {
|
|
25
30
|
return directory === "@foundation" || directory.startsWith("@foundation/");
|
|
26
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a related entity uses the NEW structure (Descriptor pattern)
|
|
34
|
+
*
|
|
35
|
+
* IMPORTANT: As of the circular dependency fix, we ALWAYS generate .meta.ts files
|
|
36
|
+
* for all entities. This means all entities now use the OLD structure (meta pattern)
|
|
37
|
+
* to avoid circular imports between entities that reference each other.
|
|
38
|
+
*
|
|
39
|
+
* @param params - Directory and module name of the related entity
|
|
40
|
+
* @returns Always false - all entities now use meta pattern
|
|
41
|
+
*
|
|
42
|
+
* @deprecated This function now always returns false. All entities use meta pattern.
|
|
43
|
+
*/
|
|
44
|
+
function isNewEntityStructure(params) {
|
|
45
|
+
// Always return false - we now generate .meta.ts files for ALL entities
|
|
46
|
+
// This prevents circular dependencies when entities reference each other
|
|
47
|
+
void params; // Suppress unused parameter warning
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get the model reference string for a relationship
|
|
52
|
+
*
|
|
53
|
+
* @param params - Entity name and structure type
|
|
54
|
+
* @returns Model reference string for use in relationship definition
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* getModelReference({ isNewStructure: false, entityName: "User", variantName: "owner" })
|
|
58
|
+
* // Returns: "ownerMeta"
|
|
59
|
+
*
|
|
60
|
+
* getModelReference({ isNewStructure: true, entityName: "Character" })
|
|
61
|
+
* // Returns: "CharacterDescriptor.model"
|
|
62
|
+
*/
|
|
63
|
+
function getModelReference(params) {
|
|
64
|
+
const { isNewStructure, entityName, variantName } = params;
|
|
65
|
+
if (isNewStructure) {
|
|
66
|
+
return `${entityName}Descriptor.model`;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// OLD structure: use variant name if provided, otherwise entity name
|
|
70
|
+
const baseName = variantName || entityName;
|
|
71
|
+
return `${baseName.charAt(0).toLowerCase()}${baseName.slice(1)}Meta`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get the Descriptor name for NEW structure entities
|
|
76
|
+
*
|
|
77
|
+
* @param entityName - PascalCase entity name
|
|
78
|
+
* @returns Descriptor name (e.g., "CharacterDescriptor")
|
|
79
|
+
*/
|
|
80
|
+
function getDescriptorName(entityName) {
|
|
81
|
+
return `${entityName}Descriptor`;
|
|
82
|
+
}
|
|
27
83
|
/**
|
|
28
84
|
* Resolve relative import path between two modules
|
|
29
85
|
*
|
|
@@ -105,4 +161,39 @@ function resolveDtoImportPath(params) {
|
|
|
105
161
|
function resolveModuleInternalPath(subpath) {
|
|
106
162
|
return `../${subpath}`;
|
|
107
163
|
}
|
|
164
|
+
// ============================================================================
|
|
165
|
+
// NEW Structure Import Path Functions
|
|
166
|
+
// ============================================================================
|
|
167
|
+
/**
|
|
168
|
+
* Resolve import path for NEW structure entity file
|
|
169
|
+
* NEW structure uses absolute paths from src and no .entity suffix
|
|
170
|
+
*
|
|
171
|
+
* @param params - Directory and module info
|
|
172
|
+
* @returns Absolute import path for entity (e.g., "src/features/character/entities/character")
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* resolveNewEntityImportPath({ directory: "features", moduleName: "character" })
|
|
176
|
+
* // Returns: "src/features/character/entities/character"
|
|
177
|
+
*/
|
|
178
|
+
function resolveNewEntityImportPath(params) {
|
|
179
|
+
const { directory, moduleName } = params;
|
|
180
|
+
if (isFoundationImport(directory)) {
|
|
181
|
+
// Foundation: use package path (when foundations are migrated to NEW structure)
|
|
182
|
+
return `src/foundations/${moduleName}/entities/${moduleName}`;
|
|
183
|
+
}
|
|
184
|
+
return `src/${directory}/${moduleName}/entities/${moduleName}`;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Resolve import path for NEW structure DTO file
|
|
188
|
+
*
|
|
189
|
+
* @param params - Directory and module info
|
|
190
|
+
* @returns Absolute import path for DTO (e.g., "src/features/character/dtos/character.dto")
|
|
191
|
+
*/
|
|
192
|
+
function resolveNewDtoImportPath(params) {
|
|
193
|
+
const { directory, moduleName } = params;
|
|
194
|
+
if (isFoundationImport(directory)) {
|
|
195
|
+
return `src/foundations/${moduleName}/dtos/${moduleName}.dto`;
|
|
196
|
+
}
|
|
197
|
+
return `src/${directory}/${moduleName}/dtos/${moduleName}.dto`;
|
|
198
|
+
}
|
|
108
199
|
//# sourceMappingURL=import-resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-resolver.js","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/import-resolver.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"import-resolver.js","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/import-resolver.ts"],"names":[],"mappings":";;;AAiBA,gDAEC;AAcD,oDAKC;AAeD,8CAcC;AA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CAAC;IAChE,CAAC;IAED,OAAO,OAAO,SAAS,IAAI,UAAU,aAAa,UAAU,EAAE,CAAC;AACjE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,uBAAuB,CAAC,MAAiD;IACvF,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAEzC,IAAI,kBAAkB,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,OAAO,mBAAmB,UAAU,SAAS,UAAU,MAAM,CAAC;IAChE,CAAC;IAED,OAAO,OAAO,SAAS,IAAI,UAAU,SAAS,UAAU,MAAM,CAAC;AACjE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nested-route-generator.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/nested-route-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAGvF;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,sBAAsB,EAAE,EACvC,UAAU,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACjD,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"nested-route-generator.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/nested-route-generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAGvF;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,sBAAsB,EAAE,EACvC,UAAU,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACjD,WAAW,EAAE,CA2Cf;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAG9E"}
|
|
@@ -26,10 +26,16 @@ function generateNestedRoutes(relationships, thisEntity) {
|
|
|
26
26
|
.map((rel) => {
|
|
27
27
|
const relatedName = rel.relatedEntity.camelCase;
|
|
28
28
|
const relatedMeta = rel.model;
|
|
29
|
+
// For NEW structure, the endpoint is accessed via Descriptor.model.endpoint
|
|
30
|
+
// For OLD structure, it's accessed via meta.endpoint
|
|
31
|
+
const endpointAccess = rel.isNewStructure ? `${rel.descriptorName}.model.endpoint` : `${relatedMeta}.endpoint`;
|
|
32
|
+
// The current entity's Descriptor name (PascalCase)
|
|
33
|
+
const thisEntityDescriptor = `${(0, name_transformer_1.toPascalCase)(thisEntity.nodeName)}Descriptor`;
|
|
29
34
|
return {
|
|
30
35
|
// Path template using descriptor endpoint
|
|
31
|
-
//
|
|
32
|
-
|
|
36
|
+
// OLD: ${discussionMeta.endpoint}/:discussionId/${CommentDescriptor.model.endpoint}
|
|
37
|
+
// NEW: ${CharacterDescriptor.model.endpoint}/:characterId/${AttributeDescriptor.model.endpoint}
|
|
38
|
+
path: `\${${endpointAccess}}/:${relatedName}Id/\${${thisEntityDescriptor}.model.endpoint}`,
|
|
33
39
|
// Method name: findByDiscussion, findByTopic, etc.
|
|
34
40
|
methodName: `findBy${(0, name_transformer_1.toPascalCase)(rel.key)}`,
|
|
35
41
|
// Relationship key used in findByRelated call
|
|
@@ -37,8 +43,12 @@ function generateNestedRoutes(relationships, thisEntity) {
|
|
|
37
43
|
relationshipKey: rel.key,
|
|
38
44
|
// Parameter name in route: discussionId, topicId, etc.
|
|
39
45
|
paramName: `${relatedName}Id`,
|
|
40
|
-
// Meta import name
|
|
46
|
+
// Meta import name (for OLD structure) or endpoint access expression
|
|
41
47
|
relatedMeta: relatedMeta,
|
|
48
|
+
// NEW structure support
|
|
49
|
+
isNewStructure: rel.isNewStructure,
|
|
50
|
+
descriptorName: rel.descriptorName,
|
|
51
|
+
importPath: rel.importPath,
|
|
42
52
|
};
|
|
43
53
|
});
|
|
44
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nested-route-generator.js","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/nested-route-generator.ts"],"names":[],"mappings":";;AAgBA,
|
|
1
|
+
{"version":3,"file":"nested-route-generator.js","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/nested-route-generator.ts"],"names":[],"mappings":";;AAgBA,oDA8CC;AAQD,8DAGC;AAxED,yDAAkD;AAElD;;;;;;;;;;;;GAYG;AACH,SAAgB,oBAAoB,CAClC,aAAuC,EACvC,UAAkD;IAElD,OAAO,aAAa;SACjB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;QACd,mDAAmD;QACnD,gDAAgD;QAChD,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;IACzB,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QACX,MAAM,WAAW,GAAG,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC;QAChD,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC;QAE9B,4EAA4E;QAC5E,qDAAqD;QACrD,MAAM,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,cAAc,iBAAiB,CAAC,CAAC,CAAC,GAAG,WAAW,WAAW,CAAC;QAE/G,oDAAoD;QACpD,MAAM,oBAAoB,GAAG,GAAG,IAAA,+BAAY,EAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC;QAE9E,OAAO;YACL,0CAA0C;YAC1C,oFAAoF;YACpF,gGAAgG;YAChG,IAAI,EAAE,MAAM,cAAc,MAAM,WAAW,SAAS,oBAAoB,kBAAkB;YAE1F,mDAAmD;YACnD,UAAU,EAAE,SAAS,IAAA,+BAAY,EAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAE5C,8CAA8C;YAC9C,uDAAuD;YACvD,eAAe,EAAE,GAAG,CAAC,GAAG;YAExB,uDAAuD;YACvD,SAAS,EAAE,GAAG,WAAW,IAAI;YAE7B,qEAAqE;YACrE,WAAW,EAAE,WAAW;YAExB,wBAAwB;YACxB,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,cAAc,EAAE,GAAG,CAAC,cAAc;YAClC,UAAU,EAAE,GAAG,CAAC,UAAU;SAC3B,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CAAC,GAA2B;IACnE,uDAAuD;IACvD,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AACzB,CAAC"}
|
|
@@ -4,12 +4,12 @@ import { DescriptorRelationship } from "../types/template-data.interface";
|
|
|
4
4
|
* Map JSON relationship definition to descriptor relationship
|
|
5
5
|
*
|
|
6
6
|
* Key mappings:
|
|
7
|
-
* - toNode: true → direction: "
|
|
8
|
-
* - toNode: false → direction: "
|
|
7
|
+
* - toNode: true → direction: "out" (relationship FROM this entity TO related)
|
|
8
|
+
* - toNode: false → direction: "in" (relationship FROM related TO this entity)
|
|
9
9
|
* - single: true → cardinality: "one"
|
|
10
10
|
* - single: false → cardinality: "many"
|
|
11
11
|
* - variant: "Author" → contextKey: "userId"
|
|
12
|
-
* - variant: other → dtoKey:
|
|
12
|
+
* - variant: other → dtoKey: singular/plural based on cardinality
|
|
13
13
|
*
|
|
14
14
|
* @param rel - JSON relationship definition
|
|
15
15
|
* @returns Descriptor relationship configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationship-mapper.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/relationship-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"relationship-mapper.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/relationship-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAS1E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,0BAA0B,GAAG,sBAAsB,CAsEvF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,0BAA0B,EAAE,GAAG,sBAAsB,EAAE,CAEtG;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,sBAAsB,EAAE,GAAG,MAAM,EAAE,CAGtF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,sBAAsB,EAAE,GAAG,MAAM,EAAE,CAGxF"}
|
|
@@ -5,23 +5,24 @@ exports.mapRelationships = mapRelationships;
|
|
|
5
5
|
exports.getUniqueMetaImports = getUniqueMetaImports;
|
|
6
6
|
exports.getUniqueEntityImports = getUniqueEntityImports;
|
|
7
7
|
const name_transformer_1 = require("./name-transformer");
|
|
8
|
+
const import_resolver_1 = require("./import-resolver");
|
|
8
9
|
/**
|
|
9
10
|
* Map JSON relationship definition to descriptor relationship
|
|
10
11
|
*
|
|
11
12
|
* Key mappings:
|
|
12
|
-
* - toNode: true → direction: "
|
|
13
|
-
* - toNode: false → direction: "
|
|
13
|
+
* - toNode: true → direction: "out" (relationship FROM this entity TO related)
|
|
14
|
+
* - toNode: false → direction: "in" (relationship FROM related TO this entity)
|
|
14
15
|
* - single: true → cardinality: "one"
|
|
15
16
|
* - single: false → cardinality: "many"
|
|
16
17
|
* - variant: "Author" → contextKey: "userId"
|
|
17
|
-
* - variant: other → dtoKey:
|
|
18
|
+
* - variant: other → dtoKey: singular/plural based on cardinality
|
|
18
19
|
*
|
|
19
20
|
* @param rel - JSON relationship definition
|
|
20
21
|
* @returns Descriptor relationship configuration
|
|
21
22
|
*/
|
|
22
23
|
function mapRelationship(rel) {
|
|
23
24
|
// Core mappings
|
|
24
|
-
const direction = rel.toNode ? "
|
|
25
|
+
const direction = rel.toNode ? "out" : "in";
|
|
25
26
|
const cardinality = rel.single ? "one" : "many";
|
|
26
27
|
// Determine contextKey and dtoKey based on variant
|
|
27
28
|
let contextKey;
|
|
@@ -31,19 +32,38 @@ function mapRelationship(rel) {
|
|
|
31
32
|
contextKey = "userId";
|
|
32
33
|
}
|
|
33
34
|
else if (rel.variant) {
|
|
34
|
-
// Other variants: use variant name as dtoKey
|
|
35
|
-
|
|
35
|
+
// Other variants: use variant name as dtoKey
|
|
36
|
+
// Pluralize only for "many" cardinality
|
|
37
|
+
dtoKey = rel.single ? rel.variant.toLowerCase() : (0, name_transformer_1.pluralize)(rel.variant.toLowerCase());
|
|
36
38
|
}
|
|
37
39
|
else {
|
|
38
|
-
// No variant: use entity name as dtoKey
|
|
39
|
-
|
|
40
|
+
// No variant: use entity name as dtoKey
|
|
41
|
+
// Pluralize only for "many" cardinality
|
|
42
|
+
dtoKey = rel.single ? rel.name.toLowerCase() : (0, name_transformer_1.pluralize)(rel.name.toLowerCase());
|
|
40
43
|
}
|
|
41
44
|
// Determine relationship key (what it's called in the descriptor)
|
|
42
45
|
const key = (0, name_transformer_1.toCamelCase)(rel.variant || rel.name);
|
|
43
|
-
// Meta import name (e.g., "userMeta", "discussionMeta")
|
|
44
|
-
const model = `${(0, name_transformer_1.toCamelCase)(rel.name)}Meta`;
|
|
45
46
|
// Related entity name transformations
|
|
46
47
|
const relatedEntityNames = (0, name_transformer_1.transformNames)(rel.name, (0, name_transformer_1.pluralize)(rel.name.toLowerCase()));
|
|
48
|
+
// Detect if related entity uses NEW structure (Descriptor pattern)
|
|
49
|
+
const isNewStructure = (0, import_resolver_1.isNewEntityStructure)({
|
|
50
|
+
directory: rel.directory,
|
|
51
|
+
moduleName: relatedEntityNames.kebabCase,
|
|
52
|
+
});
|
|
53
|
+
// Get model reference based on structure type
|
|
54
|
+
const model = (0, import_resolver_1.getModelReference)({
|
|
55
|
+
isNewStructure,
|
|
56
|
+
entityName: rel.name,
|
|
57
|
+
variantName: rel.variant,
|
|
58
|
+
});
|
|
59
|
+
// NEW structure specific fields
|
|
60
|
+
const descriptorName = isNewStructure ? (0, import_resolver_1.getDescriptorName)(rel.name) : undefined;
|
|
61
|
+
const importPath = isNewStructure
|
|
62
|
+
? (0, import_resolver_1.resolveNewEntityImportPath)({
|
|
63
|
+
directory: rel.directory,
|
|
64
|
+
moduleName: relatedEntityNames.kebabCase,
|
|
65
|
+
})
|
|
66
|
+
: undefined;
|
|
47
67
|
return {
|
|
48
68
|
key,
|
|
49
69
|
model,
|
|
@@ -60,6 +80,9 @@ function mapRelationship(rel) {
|
|
|
60
80
|
camelCase: relatedEntityNames.camelCase,
|
|
61
81
|
kebabCase: relatedEntityNames.kebabCase,
|
|
62
82
|
},
|
|
83
|
+
isNewStructure,
|
|
84
|
+
descriptorName,
|
|
85
|
+
importPath,
|
|
63
86
|
};
|
|
64
87
|
}
|
|
65
88
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationship-mapper.js","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/relationship-mapper.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"relationship-mapper.js","sourceRoot":"","sources":["../../../../scripts/generate-module/transformers/relationship-mapper.ts"],"names":[],"mappings":";;AAwBA,0CAsEC;AAQD,4CAEC;AASD,oDAGC;AAQD,wDAGC;AA7HD,yDAA4E;AAC5E,uDAK2B;AAE3B;;;;;;;;;;;;;GAaG;AACH,SAAgB,eAAe,CAAC,GAA+B;IAC7D,gBAAgB;IAChB,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5C,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IAEhD,mDAAmD;IACnD,IAAI,UAA8B,CAAC;IACnC,IAAI,MAA0B,CAAC;IAE/B,IAAI,GAAG,CAAC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,IAAI,CAAC,CAAC,CAAC;IAC9E,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,CAAC;AACtC,CAAC"}
|
|
@@ -47,6 +47,9 @@ export interface DescriptorRelationship {
|
|
|
47
47
|
camelCase: string;
|
|
48
48
|
kebabCase: string;
|
|
49
49
|
};
|
|
50
|
+
isNewStructure: boolean;
|
|
51
|
+
descriptorName?: string;
|
|
52
|
+
importPath?: string;
|
|
50
53
|
}
|
|
51
54
|
/**
|
|
52
55
|
* Nested route configuration
|
|
@@ -57,6 +60,9 @@ export interface NestedRoute {
|
|
|
57
60
|
relationshipKey: string;
|
|
58
61
|
paramName: string;
|
|
59
62
|
relatedMeta: string;
|
|
63
|
+
isNewStructure: boolean;
|
|
64
|
+
descriptorName?: string;
|
|
65
|
+
importPath?: string;
|
|
60
66
|
}
|
|
61
67
|
/**
|
|
62
68
|
* DTO field configuration
|
|
@@ -76,6 +82,7 @@ export interface DTORelationship {
|
|
|
76
82
|
isList: boolean;
|
|
77
83
|
isOptional: boolean;
|
|
78
84
|
importPath: string;
|
|
85
|
+
isNewStructure: boolean;
|
|
79
86
|
}
|
|
80
87
|
/**
|
|
81
88
|
* Complete template data passed to all templates
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-data.interface.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/types/template-data.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE;QACb,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"template-data.interface.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/types/template-data.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,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