@carlonicora/nestjs-neo4jsonapi 1.3.1 → 1.4.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/scripts/generate-module/generator.d.ts +13 -0
- package/dist/scripts/generate-module/generator.d.ts.map +1 -0
- package/dist/scripts/generate-module/generator.js +193 -0
- package/dist/scripts/generate-module/generator.js.map +1 -0
- package/dist/scripts/generate-module/index.d.ts +3 -0
- package/dist/scripts/generate-module/index.d.ts.map +1 -0
- package/dist/scripts/generate-module/index.js +70 -0
- package/dist/scripts/generate-module/index.js.map +1 -0
- package/dist/scripts/generate-module/templates/controller.template.d.ts +9 -0
- package/dist/scripts/generate-module/templates/controller.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/controller.template.js +177 -0
- package/dist/scripts/generate-module/templates/controller.template.js.map +1 -0
- package/dist/scripts/generate-module/templates/dto.base.template.d.ts +9 -0
- package/dist/scripts/generate-module/templates/dto.base.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/dto.base.template.js +39 -0
- package/dist/scripts/generate-module/templates/dto.base.template.js.map +1 -0
- package/dist/scripts/generate-module/templates/dto.post.template.d.ts +9 -0
- package/dist/scripts/generate-module/templates/dto.post.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/dto.post.template.js +106 -0
- package/dist/scripts/generate-module/templates/dto.post.template.js.map +1 -0
- package/dist/scripts/generate-module/templates/dto.put.template.d.ts +10 -0
- package/dist/scripts/generate-module/templates/dto.put.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/dto.put.template.js +107 -0
- package/dist/scripts/generate-module/templates/dto.put.template.js.map +1 -0
- package/dist/scripts/generate-module/templates/entity.template.d.ts +12 -0
- package/dist/scripts/generate-module/templates/entity.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/entity.template.js +128 -0
- package/dist/scripts/generate-module/templates/entity.template.js.map +1 -0
- package/dist/scripts/generate-module/templates/module.template.d.ts +9 -0
- package/dist/scripts/generate-module/templates/module.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/module.template.js +39 -0
- package/dist/scripts/generate-module/templates/module.template.js.map +1 -0
- package/dist/scripts/generate-module/templates/repository.template.d.ts +9 -0
- package/dist/scripts/generate-module/templates/repository.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/repository.template.js +38 -0
- package/dist/scripts/generate-module/templates/repository.template.js.map +1 -0
- package/dist/scripts/generate-module/templates/service.template.d.ts +9 -0
- package/dist/scripts/generate-module/templates/service.template.d.ts.map +1 -0
- package/dist/scripts/generate-module/templates/service.template.js +43 -0
- package/dist/scripts/generate-module/templates/service.template.js.map +1 -0
- package/dist/scripts/generate-module/transformers/import-resolver.d.ts +78 -0
- package/dist/scripts/generate-module/transformers/import-resolver.d.ts.map +1 -0
- package/dist/scripts/generate-module/transformers/import-resolver.js +89 -0
- package/dist/scripts/generate-module/transformers/import-resolver.js.map +1 -0
- package/dist/scripts/generate-module/transformers/name-transformer.d.ts +39 -0
- package/dist/scripts/generate-module/transformers/name-transformer.d.ts.map +1 -0
- package/dist/scripts/generate-module/transformers/name-transformer.js +69 -0
- package/dist/scripts/generate-module/transformers/name-transformer.js.map +1 -0
- package/dist/scripts/generate-module/transformers/nested-route-generator.d.ts +26 -0
- package/dist/scripts/generate-module/transformers/nested-route-generator.d.ts.map +1 -0
- package/dist/scripts/generate-module/transformers/nested-route-generator.js +55 -0
- package/dist/scripts/generate-module/transformers/nested-route-generator.js.map +1 -0
- package/dist/scripts/generate-module/transformers/relationship-mapper.d.ts +40 -0
- package/dist/scripts/generate-module/transformers/relationship-mapper.d.ts.map +1 -0
- package/dist/scripts/generate-module/transformers/relationship-mapper.js +95 -0
- package/dist/scripts/generate-module/transformers/relationship-mapper.js.map +1 -0
- package/dist/scripts/generate-module/types/json-schema.interface.d.ts +39 -0
- package/dist/scripts/generate-module/types/json-schema.interface.d.ts.map +1 -0
- package/dist/scripts/generate-module/types/json-schema.interface.js +9 -0
- package/dist/scripts/generate-module/types/json-schema.interface.js.map +1 -0
- package/dist/scripts/generate-module/types/template-data.interface.d.ts +101 -0
- package/dist/scripts/generate-module/types/template-data.interface.d.ts.map +1 -0
- package/dist/scripts/generate-module/types/template-data.interface.js +8 -0
- package/dist/scripts/generate-module/types/template-data.interface.js.map +1 -0
- package/dist/scripts/generate-module/utils/file-writer.d.ts +29 -0
- package/dist/scripts/generate-module/utils/file-writer.d.ts.map +1 -0
- package/dist/scripts/generate-module/utils/file-writer.js +89 -0
- package/dist/scripts/generate-module/utils/file-writer.js.map +1 -0
- package/dist/scripts/generate-module/utils/module-registrar.d.ts +12 -0
- package/dist/scripts/generate-module/utils/module-registrar.d.ts.map +1 -0
- package/dist/scripts/generate-module/utils/module-registrar.js +119 -0
- package/dist/scripts/generate-module/utils/module-registrar.js.map +1 -0
- package/dist/scripts/generate-module/validators/json-schema-validator.d.ts +27 -0
- package/dist/scripts/generate-module/validators/json-schema-validator.d.ts.map +1 -0
- package/dist/scripts/generate-module/validators/json-schema-validator.js +156 -0
- package/dist/scripts/generate-module/validators/json-schema-validator.js.map +1 -0
- package/package.json +17 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-writer.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/utils/file-writer.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACZ,GACL,IAAI,CA4BN;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAG1D"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.checkFileConflicts = checkFileConflicts;
|
|
37
|
+
exports.writeFiles = writeFiles;
|
|
38
|
+
exports.buildFilePath = buildFilePath;
|
|
39
|
+
const fs = __importStar(require("fs"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
/**
|
|
42
|
+
* Check if files exist (for conflict detection)
|
|
43
|
+
*
|
|
44
|
+
* @param files - List of files to check
|
|
45
|
+
* @returns Array of existing file paths
|
|
46
|
+
*/
|
|
47
|
+
function checkFileConflicts(files) {
|
|
48
|
+
return files.filter((file) => fs.existsSync(file.path)).map((file) => file.path);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Write files to disk
|
|
52
|
+
*
|
|
53
|
+
* @param files - Files to write
|
|
54
|
+
* @param options - Write options
|
|
55
|
+
*/
|
|
56
|
+
function writeFiles(files, options = {}) {
|
|
57
|
+
const { dryRun = false, force = false } = options;
|
|
58
|
+
if (!force) {
|
|
59
|
+
const conflicts = checkFileConflicts(files);
|
|
60
|
+
if (conflicts.length > 0) {
|
|
61
|
+
throw new Error(`Files already exist. Use --force to overwrite:\n${conflicts.map((f) => ` - ${f}`).join("\n")}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
for (const file of files) {
|
|
65
|
+
if (dryRun) {
|
|
66
|
+
console.log(`[DRY RUN] Would create: ${file.path}`);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
// Create directory if it doesn't exist
|
|
70
|
+
const dir = path.dirname(file.path);
|
|
71
|
+
if (!fs.existsSync(dir)) {
|
|
72
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
73
|
+
}
|
|
74
|
+
// Write file
|
|
75
|
+
fs.writeFileSync(file.path, file.content, "utf-8");
|
|
76
|
+
console.log(`✓ Created: ${file.path}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Build absolute file path
|
|
81
|
+
*
|
|
82
|
+
* @param relativePath - Relative path from project root
|
|
83
|
+
* @returns Absolute path
|
|
84
|
+
*/
|
|
85
|
+
function buildFilePath(relativePath) {
|
|
86
|
+
// Assuming the script is run from the project root
|
|
87
|
+
return path.resolve(process.cwd(), relativePath);
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=file-writer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-writer.js","sourceRoot":"","sources":["../../../../scripts/generate-module/utils/file-writer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,gDAEC;AAQD,gCAkCC;AAQD,sCAGC;AArED,uCAAyB;AACzB,2CAA6B;AAO7B;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,KAAoB;IACrD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnF,CAAC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CACxB,KAAoB,EACpB,UAGI,EAAE;IAEN,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAElD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,SAAS,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CACb,mDAAmD,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACjG,CAAC;QACJ,CAAC;IACH,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACpD,SAAS;QACX,CAAC;QAED,uCAAuC;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;QAED,aAAa;QACb,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACzC,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,YAAoB;IAChD,mDAAmD;IACnD,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,YAAY,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update features.modules.ts to register the new module
|
|
3
|
+
*
|
|
4
|
+
* @param params - Module information
|
|
5
|
+
*/
|
|
6
|
+
export declare function registerModule(params: {
|
|
7
|
+
moduleName: string;
|
|
8
|
+
targetDir: string;
|
|
9
|
+
kebabName: string;
|
|
10
|
+
dryRun?: boolean;
|
|
11
|
+
}): void;
|
|
12
|
+
//# sourceMappingURL=module-registrar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-registrar.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/utils/module-registrar.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAyFP"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerModule = registerModule;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
/**
|
|
40
|
+
* Update features.modules.ts to register the new module
|
|
41
|
+
*
|
|
42
|
+
* @param params - Module information
|
|
43
|
+
*/
|
|
44
|
+
function registerModule(params) {
|
|
45
|
+
const { moduleName, targetDir, kebabName, dryRun = false } = params;
|
|
46
|
+
// Determine the parent module file based on targetDir
|
|
47
|
+
let parentModulePath;
|
|
48
|
+
if (targetDir === "features") {
|
|
49
|
+
parentModulePath = path.resolve(process.cwd(), "apps/api/src/features/features.modules.ts");
|
|
50
|
+
}
|
|
51
|
+
else if (targetDir === "foundations") {
|
|
52
|
+
parentModulePath = path.resolve(process.cwd(), "apps/api/src/foundations/foundations.modules.ts");
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
throw new Error(`Unknown target directory: ${targetDir}`);
|
|
56
|
+
}
|
|
57
|
+
// Check if parent module file exists
|
|
58
|
+
if (!fs.existsSync(parentModulePath)) {
|
|
59
|
+
console.warn(`⚠️ Warning: Parent module file not found: ${parentModulePath}`);
|
|
60
|
+
console.warn(` You will need to manually register ${moduleName}Module`);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
let content = fs.readFileSync(parentModulePath, "utf-8");
|
|
64
|
+
// Build import statement
|
|
65
|
+
const moduleClassName = `${moduleName}Module`;
|
|
66
|
+
const importPath = `src/${targetDir}/${kebabName}/${kebabName}.module`;
|
|
67
|
+
const newImport = `import { ${moduleClassName} } from "${importPath}";\n`;
|
|
68
|
+
// Check if already imported
|
|
69
|
+
if (content.includes(`import { ${moduleClassName} }`)) {
|
|
70
|
+
console.log(`ℹ️ ${moduleClassName} is already imported in ${parentModulePath}`);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (dryRun) {
|
|
74
|
+
console.log(`[DRY RUN] Would add import to ${parentModulePath}:`);
|
|
75
|
+
console.log(` ${newImport.trim()}`);
|
|
76
|
+
console.log(`[DRY RUN] Would add ${moduleClassName} to imports array`);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// Find the last import statement
|
|
80
|
+
const importRegex = /import\s+{[^}]+}\s+from\s+"[^"]+";?\n/g;
|
|
81
|
+
const imports = [...content.matchAll(importRegex)];
|
|
82
|
+
if (imports.length === 0) {
|
|
83
|
+
throw new Error("Could not find any import statements in parent module file");
|
|
84
|
+
}
|
|
85
|
+
const lastImport = imports[imports.length - 1];
|
|
86
|
+
const lastImportEnd = lastImport.index + lastImport[0].length;
|
|
87
|
+
// Insert new import alphabetically
|
|
88
|
+
let insertPosition = lastImportEnd;
|
|
89
|
+
for (const imp of imports) {
|
|
90
|
+
const impText = imp[0];
|
|
91
|
+
if (impText > newImport) {
|
|
92
|
+
insertPosition = imp.index;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
content = content.slice(0, insertPosition) + newImport + content.slice(insertPosition);
|
|
97
|
+
// Find the @Module imports array
|
|
98
|
+
const moduleImportsRegex = /imports:\s*\[([\s\S]*?)\]/;
|
|
99
|
+
const match = content.match(moduleImportsRegex);
|
|
100
|
+
if (!match) {
|
|
101
|
+
throw new Error("Could not find @Module imports array");
|
|
102
|
+
}
|
|
103
|
+
// Parse existing modules
|
|
104
|
+
const importsArrayContent = match[1];
|
|
105
|
+
const modules = importsArrayContent
|
|
106
|
+
.split(",")
|
|
107
|
+
.map((m) => m.trim())
|
|
108
|
+
.filter((m) => m);
|
|
109
|
+
// Add new module alphabetically
|
|
110
|
+
modules.push(moduleClassName);
|
|
111
|
+
modules.sort();
|
|
112
|
+
// Rebuild imports array with proper formatting
|
|
113
|
+
const newImportsArray = `imports: [\n ${modules.join(",\n ")},\n ]`;
|
|
114
|
+
content = content.replace(moduleImportsRegex, newImportsArray);
|
|
115
|
+
// Write back
|
|
116
|
+
fs.writeFileSync(parentModulePath, content, "utf-8");
|
|
117
|
+
console.log(`✓ Registered ${moduleClassName} in ${parentModulePath}`);
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=module-registrar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-registrar.js","sourceRoot":"","sources":["../../../../scripts/generate-module/utils/module-registrar.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,wCA8FC;AAtGD,uCAAyB;AACzB,2CAA6B;AAE7B;;;;GAIG;AACH,SAAgB,cAAc,CAAC,MAK9B;IACC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;IAEpE,sDAAsD;IACtD,IAAI,gBAAwB,CAAC;IAC7B,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;QAC7B,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,2CAA2C,CAAC,CAAC;IAC9F,CAAC;SAAM,IAAI,SAAS,KAAK,aAAa,EAAE,CAAC;QACvC,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,iDAAiD,CAAC,CAAC;IACpG,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,6BAA6B,SAAS,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,qCAAqC;IACrC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,8CAA8C,gBAAgB,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,IAAI,CAAC,yCAAyC,UAAU,QAAQ,CAAC,CAAC;QAC1E,OAAO;IACT,CAAC;IAED,IAAI,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAEzD,yBAAyB;IACzB,MAAM,eAAe,GAAG,GAAG,UAAU,QAAQ,CAAC;IAC9C,MAAM,UAAU,GA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
|
|
6
|
+
/**
|
|
7
|
+
* Validate JSON module definition
|
|
8
|
+
*
|
|
9
|
+
* @param schema - JSON module definition
|
|
10
|
+
* @returns Array of validation errors (empty if valid)
|
|
11
|
+
*/
|
|
12
|
+
export declare function validateJsonSchema(schema: any): ValidationError[];
|
|
13
|
+
/**
|
|
14
|
+
* Check if validation passed (no errors, only warnings allowed)
|
|
15
|
+
*
|
|
16
|
+
* @param errors - Validation errors
|
|
17
|
+
* @returns true if validation passed
|
|
18
|
+
*/
|
|
19
|
+
export declare function validationPassed(errors: ValidationError[]): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Format validation errors for display
|
|
22
|
+
*
|
|
23
|
+
* @param errors - Validation errors
|
|
24
|
+
* @returns Formatted error message
|
|
25
|
+
*/
|
|
26
|
+
export declare function formatValidationErrors(errors: ValidationError[]): string;
|
|
27
|
+
//# sourceMappingURL=json-schema-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-validator.d.ts","sourceRoot":"","sources":["../../../../scripts/generate-module/validators/json-schema-validator.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,eAAe,EAAE,CAqIjE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAWxE"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateJsonSchema = validateJsonSchema;
|
|
4
|
+
exports.validationPassed = validationPassed;
|
|
5
|
+
exports.formatValidationErrors = formatValidationErrors;
|
|
6
|
+
/**
|
|
7
|
+
* Validate JSON module definition
|
|
8
|
+
*
|
|
9
|
+
* @param schema - JSON module definition
|
|
10
|
+
* @returns Array of validation errors (empty if valid)
|
|
11
|
+
*/
|
|
12
|
+
function validateJsonSchema(schema) {
|
|
13
|
+
const errors = [];
|
|
14
|
+
// Required fields
|
|
15
|
+
const required = ["moduleName", "endpointName", "targetDir"];
|
|
16
|
+
for (const field of required) {
|
|
17
|
+
if (!schema[field]) {
|
|
18
|
+
errors.push({
|
|
19
|
+
field,
|
|
20
|
+
message: `${field} is required`,
|
|
21
|
+
severity: "error",
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
// Module name format (PascalCase)
|
|
26
|
+
if (schema.moduleName && !/^[A-Z][a-zA-Z0-9]*$/.test(schema.moduleName)) {
|
|
27
|
+
errors.push({
|
|
28
|
+
field: "moduleName",
|
|
29
|
+
message: 'Must be PascalCase (e.g., "Comment", "Discussion")',
|
|
30
|
+
severity: "error",
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
// Endpoint format (kebab-case plural)
|
|
34
|
+
if (schema.endpointName && !/^[a-z][a-z0-9-]*$/.test(schema.endpointName)) {
|
|
35
|
+
errors.push({
|
|
36
|
+
field: "endpointName",
|
|
37
|
+
message: 'Must be kebab-case (e.g., "comments", "discussions")',
|
|
38
|
+
severity: "error",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Target directory validation
|
|
42
|
+
if (schema.targetDir && !["features", "foundations"].includes(schema.targetDir)) {
|
|
43
|
+
errors.push({
|
|
44
|
+
field: "targetDir",
|
|
45
|
+
message: 'Must be either "features" or "foundations"',
|
|
46
|
+
severity: "error",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Fields validation
|
|
50
|
+
if (schema.fields && Array.isArray(schema.fields)) {
|
|
51
|
+
schema.fields.forEach((field, index) => {
|
|
52
|
+
if (!field.name) {
|
|
53
|
+
errors.push({
|
|
54
|
+
field: `fields[${index}].name`,
|
|
55
|
+
message: "Field name is required",
|
|
56
|
+
severity: "error",
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (!field.type) {
|
|
60
|
+
errors.push({
|
|
61
|
+
field: `fields[${index}].type`,
|
|
62
|
+
message: "Field type is required",
|
|
63
|
+
severity: "error",
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (field.nullable === undefined) {
|
|
67
|
+
errors.push({
|
|
68
|
+
field: `fields[${index}].nullable`,
|
|
69
|
+
message: "Field nullable flag is required",
|
|
70
|
+
severity: "error",
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
// Relationships validation
|
|
76
|
+
if (schema.relationships && Array.isArray(schema.relationships)) {
|
|
77
|
+
schema.relationships.forEach((rel, index) => {
|
|
78
|
+
if (!rel.name) {
|
|
79
|
+
errors.push({
|
|
80
|
+
field: `relationships[${index}].name`,
|
|
81
|
+
message: "Relationship name is required",
|
|
82
|
+
severity: "error",
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (!rel.directory) {
|
|
86
|
+
errors.push({
|
|
87
|
+
field: `relationships[${index}].directory`,
|
|
88
|
+
message: "Relationship directory is required",
|
|
89
|
+
severity: "error",
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (rel.single === undefined) {
|
|
93
|
+
errors.push({
|
|
94
|
+
field: `relationships[${index}].single`,
|
|
95
|
+
message: "Relationship single flag is required",
|
|
96
|
+
severity: "error",
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (!rel.relationshipName) {
|
|
100
|
+
errors.push({
|
|
101
|
+
field: `relationships[${index}].relationshipName`,
|
|
102
|
+
message: "Neo4j relationship name is required",
|
|
103
|
+
severity: "error",
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (rel.relationshipName && !/^[A-Z_]+$/.test(rel.relationshipName)) {
|
|
107
|
+
errors.push({
|
|
108
|
+
field: `relationships[${index}].relationshipName`,
|
|
109
|
+
message: 'Should be UPPER_SNAKE_CASE (e.g., "PUBLISHED", "COMMENT_TO")',
|
|
110
|
+
severity: "warning",
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (rel.toNode === undefined) {
|
|
114
|
+
errors.push({
|
|
115
|
+
field: `relationships[${index}].toNode`,
|
|
116
|
+
message: "Relationship toNode flag is required",
|
|
117
|
+
severity: "error",
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
if (rel.nullable === undefined) {
|
|
121
|
+
errors.push({
|
|
122
|
+
field: `relationships[${index}].nullable`,
|
|
123
|
+
message: "Relationship nullable flag is required",
|
|
124
|
+
severity: "error",
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return errors;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Check if validation passed (no errors, only warnings allowed)
|
|
133
|
+
*
|
|
134
|
+
* @param errors - Validation errors
|
|
135
|
+
* @returns true if validation passed
|
|
136
|
+
*/
|
|
137
|
+
function validationPassed(errors) {
|
|
138
|
+
return errors.filter((e) => e.severity === "error").length === 0;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Format validation errors for display
|
|
142
|
+
*
|
|
143
|
+
* @param errors - Validation errors
|
|
144
|
+
* @returns Formatted error message
|
|
145
|
+
*/
|
|
146
|
+
function formatValidationErrors(errors) {
|
|
147
|
+
if (errors.length === 0) {
|
|
148
|
+
return "No validation errors";
|
|
149
|
+
}
|
|
150
|
+
const errorLines = errors.map((error) => {
|
|
151
|
+
const icon = error.severity === "error" ? "❌" : "⚠️";
|
|
152
|
+
return `${icon} ${error.field}: ${error.message}`;
|
|
153
|
+
});
|
|
154
|
+
return errorLines.join("\n");
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=json-schema-validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema-validator.js","sourceRoot":"","sources":["../../../../scripts/generate-module/validators/json-schema-validator.ts"],"names":[],"mappings":";;AAcA,gDAqIC;AAQD,4CAEC;AAQD,wDAWC;AAxKD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,MAAW;IAC5C,MAAM,MAAM,GAAsB,EAAE,CAAC;IAErC,kBAAkB;IAClB,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IAC7D,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC;gBACV,KAAK;gBACL,OAAO,EAAE,GAAG,KAAK,cAAc;gBAC/B,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,kCAAkC;IAClC,IAAI,MAAM,CAAC,UAAU,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QACxE,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,oDAAoD;YAC7D,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC;IAED,sCAAsC;IACtC,IAAI,MAAM,CAAC,YAAY,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QAC1E,MAAM,CAAC,IAAI,CAAC;YACV,KAAK,EAAE,cAAc;YACrB,OAAO,EAAE,sDAAsD;YAC/D,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;IACL,CAAC;IAED,8BAA8B;IAC9B,IAAI,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CA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GAAG,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;gBAC/B,MAAM,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,iBAAiB,KAAK,YAAY;oBACzC,OAAO,EAAE,wCAAwC;oBACjD,QAAQ,EAAE,OAAO;iBAClB,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,MAAyB;IACxD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,MAAyB;IAC9D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,sBAAsB,CAAC;IAChC,CAAC;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACtC,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACrD,OAAO,GAAG,IAAI,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carlonicora/nestjs-neo4jsonapi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "NestJS foundation package with JSON:API, Neo4j, Redis, LangChain agents, and common utilities",
|
|
5
5
|
"author": "Carlo Nicora",
|
|
6
6
|
"license": "GPL-3.0-or-later",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"bin": {
|
|
10
|
-
"neo4jsonapi-migrate": "./dist/tools/migrate-entity/index.js"
|
|
10
|
+
"neo4jsonapi-migrate": "./dist/tools/migrate-entity/index.js",
|
|
11
|
+
"generate-module": "./dist/scripts/generate-module/index.js"
|
|
11
12
|
},
|
|
12
13
|
"exports": {
|
|
13
14
|
".": {
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
}
|
|
49
50
|
},
|
|
50
51
|
"scripts": {
|
|
51
|
-
"build": "tsc && tsc -p tools/migrate-entity/tsconfig.json",
|
|
52
|
+
"build": "tsc && tsc -p tools/migrate-entity/tsconfig.json && tsc -p scripts/generate-module/tsconfig.json",
|
|
52
53
|
"dev": "tsc --watch",
|
|
53
54
|
"clean": "rm -rf dist",
|
|
54
55
|
"lint": "eslint \"src/**/*.ts\" --fix",
|
|
@@ -56,13 +57,13 @@
|
|
|
56
57
|
"prepublishOnly": "pnpm build"
|
|
57
58
|
},
|
|
58
59
|
"dependencies": {
|
|
59
|
-
"@aws-sdk/client-s3": "^3.
|
|
60
|
-
"@aws-sdk/s3-request-presigner": "^3.
|
|
60
|
+
"@aws-sdk/client-s3": "^3.948.0",
|
|
61
|
+
"@aws-sdk/s3-request-presigner": "^3.948.0",
|
|
61
62
|
"@azure/storage-blob": "^12.29.1",
|
|
62
63
|
"@getbrevo/brevo": "^3.0.1",
|
|
63
|
-
"@langchain/community": "^1.0.
|
|
64
|
-
"@langchain/core": "^1.1.
|
|
65
|
-
"@langchain/langgraph": "^1.0.
|
|
64
|
+
"@langchain/community": "^1.0.7",
|
|
65
|
+
"@langchain/core": "^1.1.4",
|
|
66
|
+
"@langchain/langgraph": "^1.0.4",
|
|
66
67
|
"@langchain/openai": "^1.1.3",
|
|
67
68
|
"@langchain/textsplitters": "^1.0.1",
|
|
68
69
|
"@opentelemetry/api": "^1.9.0",
|
|
@@ -76,10 +77,10 @@
|
|
|
76
77
|
"adm-zip": "^0.5.16",
|
|
77
78
|
"axios": "^1.13.2",
|
|
78
79
|
"bcryptjs": "^3.0.3",
|
|
79
|
-
"bullmq": "^5.
|
|
80
|
+
"bullmq": "^5.66.0",
|
|
80
81
|
"class-transformer": "^0.5.1",
|
|
81
82
|
"class-validator": "^0.14.3",
|
|
82
|
-
"fast-xml-parser": "^5.3.
|
|
83
|
+
"fast-xml-parser": "^5.3.3",
|
|
83
84
|
"fastify": "^5.6.2",
|
|
84
85
|
"handlebars": "^4.7.8",
|
|
85
86
|
"ioredis": "^5.8.2",
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"node-tesseract-ocr": "^2.2.1",
|
|
94
95
|
"nodemailer": "^7.0.11",
|
|
95
96
|
"officeparser": "^5.2.2",
|
|
96
|
-
"openai": "^6.
|
|
97
|
+
"openai": "^6.10.0",
|
|
97
98
|
"passport": "^0.7.0",
|
|
98
99
|
"passport-jwt": "^4.0.1",
|
|
99
100
|
"pdf-parse": "^2.4.5",
|
|
@@ -124,18 +125,18 @@
|
|
|
124
125
|
"@nestjs/bullmq": "^11.0.4",
|
|
125
126
|
"@swc/core": "^1.15.3",
|
|
126
127
|
"@types/bcryptjs": "^3.0.0",
|
|
127
|
-
"@types/node": "^
|
|
128
|
+
"@types/node": "^25.0.1",
|
|
128
129
|
"@types/nodemailer": "^7.0.4",
|
|
129
130
|
"@types/passport-jwt": "^4.0.1",
|
|
130
131
|
"@types/qs": "^6.14.0",
|
|
131
132
|
"@types/turndown": "^5.0.6",
|
|
132
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
133
|
-
"@typescript-eslint/parser": "^8.
|
|
134
|
-
"commander": "^
|
|
133
|
+
"@typescript-eslint/eslint-plugin": "^8.49.0",
|
|
134
|
+
"@typescript-eslint/parser": "^8.49.0",
|
|
135
|
+
"commander": "^14.0.2",
|
|
135
136
|
"eslint": "^9.39.1",
|
|
136
137
|
"eslint-config-prettier": "^10.1.8",
|
|
137
138
|
"eslint-plugin-prettier": "^5.5.4",
|
|
138
|
-
"glob": "^
|
|
139
|
+
"glob": "^13.0.0",
|
|
139
140
|
"globals": "^16.5.0",
|
|
140
141
|
"prettier": "^3.7.4",
|
|
141
142
|
"ts-node": "^10.9.2",
|