@venizia/ignis-docs 0.0.1-1 → 0.0.1-10
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/LICENSE.md +102 -0
- package/README.md +459 -0
- package/dist/mcp-server/common/config.d.ts +64 -0
- package/dist/mcp-server/common/config.d.ts.map +1 -0
- package/dist/mcp-server/common/config.js +82 -0
- package/dist/mcp-server/common/config.js.map +1 -0
- package/dist/mcp-server/common/index.d.ts +3 -0
- package/dist/mcp-server/common/index.d.ts.map +1 -0
- package/dist/mcp-server/common/index.js.map +1 -0
- package/dist/mcp-server/common/paths.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/common/paths.js +13 -11
- package/dist/mcp-server/common/paths.js.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/helpers/docs.helper.d.ts +5 -5
- package/dist/mcp-server/helpers/docs.helper.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/helpers/docs.helper.js +38 -34
- package/dist/mcp-server/helpers/docs.helper.js.map +1 -0
- package/dist/mcp-server/helpers/github.helper.d.ts +37 -0
- package/dist/mcp-server/helpers/github.helper.d.ts.map +1 -0
- package/dist/mcp-server/helpers/github.helper.js +100 -0
- package/dist/mcp-server/helpers/github.helper.js.map +1 -0
- package/dist/mcp-server/helpers/index.d.ts +4 -0
- package/dist/mcp-server/helpers/index.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/helpers/index.js +1 -0
- package/dist/mcp-server/helpers/index.js.map +1 -0
- package/dist/mcp-server/helpers/logger.helper.d.ts.map +1 -0
- package/dist/mcp-server/helpers/logger.helper.js.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/index.d.ts.map +1 -1
- package/dist/mcp-server/index.js +90 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/tools/base.tool.d.ts +8 -12
- package/dist/mcp-server/tools/base.tool.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/tools/base.tool.js +3 -5
- package/dist/mcp-server/tools/base.tool.js.map +1 -0
- package/{mcp-server/dist/tools/get-doc-content.tool.d.ts → dist/mcp-server/tools/docs/get-document-content.tool.d.ts} +13 -17
- package/dist/mcp-server/tools/docs/get-document-content.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/get-doc-content.tool.js → dist/mcp-server/tools/docs/get-document-content.tool.js} +20 -22
- package/dist/mcp-server/tools/docs/get-document-content.tool.js.map +1 -0
- package/{mcp-server/dist/tools/get-doc-metadata.tool.d.ts → dist/mcp-server/tools/docs/get-document-metadata.tool.d.ts} +21 -25
- package/dist/mcp-server/tools/docs/get-document-metadata.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/get-doc-metadata.tool.js → dist/mcp-server/tools/docs/get-document-metadata.tool.js} +35 -27
- package/dist/mcp-server/tools/docs/get-document-metadata.tool.js.map +1 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.d.ts +50 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.js +221 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.js.map +1 -0
- package/dist/mcp-server/tools/docs/index.d.ts +7 -0
- package/dist/mcp-server/tools/docs/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/docs/index.js +23 -0
- package/dist/mcp-server/tools/docs/index.js.map +1 -0
- package/{mcp-server/dist/tools → dist/mcp-server/tools/docs}/list-categories.tool.d.ts +3 -3
- package/dist/mcp-server/tools/docs/list-categories.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools → dist/mcp-server/tools/docs}/list-categories.tool.js +10 -9
- package/dist/mcp-server/tools/docs/list-categories.tool.js.map +1 -0
- package/{mcp-server/dist/tools/list-docs.tool.d.ts → dist/mcp-server/tools/docs/list-documents.tool.d.ts} +5 -5
- package/dist/mcp-server/tools/docs/list-documents.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/list-docs.tool.js → dist/mcp-server/tools/docs/list-documents.tool.js} +15 -14
- package/dist/mcp-server/tools/docs/list-documents.tool.js.map +1 -0
- package/{mcp-server/dist/tools/search-docs.tool.d.ts → dist/mcp-server/tools/docs/search-documents.tool.d.ts} +23 -19
- package/dist/mcp-server/tools/docs/search-documents.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/search-docs.tool.js → dist/mcp-server/tools/docs/search-documents.tool.js} +29 -25
- package/dist/mcp-server/tools/docs/search-documents.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/index.d.ts +5 -0
- package/dist/mcp-server/tools/github/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/index.js +21 -0
- package/dist/mcp-server/tools/github/index.js.map +1 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.d.ts +28 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.js +98 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/search-code.tool.d.ts +42 -0
- package/dist/mcp-server/tools/github/search-code.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/search-code.tool.js +194 -0
- package/dist/mcp-server/tools/github/search-code.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.d.ts +55 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js +167 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.d.ts +26 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.js +91 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.js.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +4 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/index.js +22 -0
- package/dist/mcp-server/tools/index.js.map +1 -0
- package/package.json +46 -23
- package/wiki/changelogs/2025-12-16-initial-architecture.md +145 -0
- package/wiki/changelogs/2025-12-16-model-repo-datasource-refactor.md +300 -0
- package/wiki/changelogs/2025-12-17-refactor.md +90 -0
- package/wiki/changelogs/2025-12-18-performance-optimizations.md +130 -0
- package/wiki/changelogs/2025-12-18-repository-validation-security.md +249 -0
- package/wiki/changelogs/index.md +33 -0
- package/wiki/changelogs/planned-transaction-support.md +216 -0
- package/wiki/changelogs/template.md +123 -0
- package/wiki/get-started/5-minute-quickstart.md +1 -1
- package/wiki/get-started/best-practices/api-usage-examples.md +54 -8
- package/wiki/get-started/best-practices/architectural-patterns.md +43 -2
- package/wiki/get-started/best-practices/code-style-standards.md +41 -0
- package/wiki/get-started/best-practices/common-pitfalls.md +5 -3
- package/wiki/get-started/best-practices/contribution-workflow.md +40 -6
- package/wiki/get-started/best-practices/data-modeling.md +177 -0
- package/wiki/get-started/best-practices/security-guidelines.md +3 -1
- package/wiki/get-started/building-a-crud-api.md +63 -78
- package/wiki/get-started/core-concepts/components.md +4 -2
- package/wiki/get-started/core-concepts/controllers.md +14 -14
- package/wiki/get-started/core-concepts/dependency-injection.md +13 -1
- package/wiki/get-started/core-concepts/persistent.md +383 -431
- package/wiki/get-started/core-concepts/services.md +21 -27
- package/wiki/get-started/mcp-docs-server.md +130 -32
- package/wiki/get-started/philosophy.md +198 -25
- package/wiki/get-started/quickstart.md +1 -1
- package/wiki/public/logo.svg +1 -0
- package/wiki/references/base/application.md +5 -5
- package/wiki/references/base/components.md +1 -1
- package/wiki/references/base/controllers.md +43 -17
- package/wiki/references/base/datasources.md +195 -33
- package/wiki/references/base/dependency-injection.md +8 -7
- package/wiki/references/base/models.md +713 -25
- package/wiki/references/base/repositories.md +475 -22
- package/wiki/references/base/services.md +2 -2
- package/wiki/references/components/authentication.md +228 -10
- package/wiki/references/components/health-check.md +1 -1
- package/wiki/references/components/index.md +4 -2
- package/wiki/references/components/static-asset.md +1289 -0
- package/wiki/references/components/swagger.md +1 -1
- package/wiki/references/helpers/error.md +2 -2
- package/wiki/references/helpers/inversion.md +29 -14
- package/wiki/references/helpers/storage.md +538 -11
- package/wiki/references/src-details/core.md +21 -6
- package/wiki/references/src-details/docs.md +19 -9
- package/wiki/references/src-details/inversion.md +4 -4
- package/wiki/references/src-details/mcp-server.md +185 -234
- package/wiki/references/utilities/index.md +1 -1
- package/wiki/references/utilities/request.md +162 -3
- package/mcp-server/dist/common/config.d.ts +0 -27
- package/mcp-server/dist/common/config.d.ts.map +0 -1
- package/mcp-server/dist/common/config.js +0 -27
- package/mcp-server/dist/common/config.js.map +0 -1
- package/mcp-server/dist/common/index.d.ts +0 -3
- package/mcp-server/dist/common/index.d.ts.map +0 -1
- package/mcp-server/dist/common/index.js.map +0 -1
- package/mcp-server/dist/common/paths.d.ts.map +0 -1
- package/mcp-server/dist/common/paths.js.map +0 -1
- package/mcp-server/dist/helpers/docs.helper.d.ts.map +0 -1
- package/mcp-server/dist/helpers/docs.helper.js.map +0 -1
- package/mcp-server/dist/helpers/index.d.ts +0 -3
- package/mcp-server/dist/helpers/index.d.ts.map +0 -1
- package/mcp-server/dist/helpers/index.js.map +0 -1
- package/mcp-server/dist/helpers/logger.helper.d.ts.map +0 -1
- package/mcp-server/dist/helpers/logger.helper.js.map +0 -1
- package/mcp-server/dist/index.js +0 -62
- package/mcp-server/dist/index.js.map +0 -1
- package/mcp-server/dist/tools/base.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/base.tool.js.map +0 -1
- package/mcp-server/dist/tools/get-doc-content.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/get-doc-content.tool.js.map +0 -1
- package/mcp-server/dist/tools/get-doc-metadata.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/get-doc-metadata.tool.js.map +0 -1
- package/mcp-server/dist/tools/index.d.ts +0 -8
- package/mcp-server/dist/tools/index.d.ts.map +0 -1
- package/mcp-server/dist/tools/index.js +0 -18
- package/mcp-server/dist/tools/index.js.map +0 -1
- package/mcp-server/dist/tools/list-categories.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/list-categories.tool.js.map +0 -1
- package/mcp-server/dist/tools/list-docs.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/list-docs.tool.js.map +0 -1
- package/mcp-server/dist/tools/search-docs.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/search-docs.tool.js.map +0 -1
- /package/{mcp-server/dist → dist/mcp-server}/common/index.js +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/common/paths.d.ts +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/helpers/logger.helper.d.ts +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/helpers/logger.helper.js +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/index.d.ts +0 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyDependenciesTool = void 0;
|
|
4
|
+
const tools_1 = require("@mastra/core/tools");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const base_tool_1 = require("../base.tool");
|
|
7
|
+
const helpers_1 = require("../../../mcp-server/helpers");
|
|
8
|
+
// ----------------------------------------------------------------------------
|
|
9
|
+
// DESCRIPTIONS
|
|
10
|
+
// ----------------------------------------------------------------------------
|
|
11
|
+
const TOOL_DESCRIPTION = `
|
|
12
|
+
Verifies dependencies of a package within the Ignis monorepo against NPM registry.
|
|
13
|
+
|
|
14
|
+
PURPOSE:
|
|
15
|
+
Check for outdated dependencies. Reads package.json from a specific package,
|
|
16
|
+
fetches latest version for each dependency from NPM registry, and reports
|
|
17
|
+
which packages may need updating.
|
|
18
|
+
|
|
19
|
+
WHEN TO USE:
|
|
20
|
+
- To assess maintenance status of a package
|
|
21
|
+
- To identify potential security risks from outdated dependencies
|
|
22
|
+
- Before starting development, to see what needs updating
|
|
23
|
+
- To answer user questions about package dependencies
|
|
24
|
+
|
|
25
|
+
WHEN NOT TO USE:
|
|
26
|
+
- This tool can be slow as it makes multiple network requests to NPM
|
|
27
|
+
- For workspace dependencies (e.g., "workspace:*") - these are internal references
|
|
28
|
+
|
|
29
|
+
NOTE: Version comparison is simplified (string comparison). Complex version ranges
|
|
30
|
+
or intentionally pinned versions may show as "outdated" even when correct.
|
|
31
|
+
`;
|
|
32
|
+
const PACKAGE_PATH_DESCRIPTION = `
|
|
33
|
+
The path to the package directory from the repository root.
|
|
34
|
+
This directory must contain a 'package.json' file.
|
|
35
|
+
|
|
36
|
+
EXAMPLES:
|
|
37
|
+
- "packages/core"
|
|
38
|
+
- "packages/helpers"
|
|
39
|
+
- "examples/5-mins-qs"
|
|
40
|
+
`;
|
|
41
|
+
// ----------------------------------------------------------------------------
|
|
42
|
+
// SCHEMAS
|
|
43
|
+
// ----------------------------------------------------------------------------
|
|
44
|
+
const DependencyInfoSchema = zod_1.z.object({
|
|
45
|
+
name: zod_1.z.string(),
|
|
46
|
+
currentVersion: zod_1.z.string(),
|
|
47
|
+
latestVersion: zod_1.z.string(),
|
|
48
|
+
isOutdated: zod_1.z.boolean(),
|
|
49
|
+
});
|
|
50
|
+
const InputSchema = zod_1.z.object({
|
|
51
|
+
packagePath: zod_1.z.string().describe(PACKAGE_PATH_DESCRIPTION),
|
|
52
|
+
});
|
|
53
|
+
const OutputSchema = zod_1.z.object({
|
|
54
|
+
packageName: zod_1.z.string().optional(),
|
|
55
|
+
dependencies: zod_1.z.array(DependencyInfoSchema).optional(),
|
|
56
|
+
devDependencies: zod_1.z.array(DependencyInfoSchema).optional(),
|
|
57
|
+
error: zod_1.z.string().optional(),
|
|
58
|
+
});
|
|
59
|
+
// ----------------------------------------------------------------------------
|
|
60
|
+
// TOOL CLASS
|
|
61
|
+
// ----------------------------------------------------------------------------
|
|
62
|
+
class VerifyDependenciesTool extends base_tool_1.BaseTool {
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments);
|
|
65
|
+
this.id = 'verifyDependencies';
|
|
66
|
+
this.description = TOOL_DESCRIPTION;
|
|
67
|
+
this.inputSchema = InputSchema;
|
|
68
|
+
this.outputSchema = OutputSchema;
|
|
69
|
+
}
|
|
70
|
+
async getLatestVersion(opts) {
|
|
71
|
+
try {
|
|
72
|
+
const url = `https://registry.npmjs.org/${opts.packageName}/latest`;
|
|
73
|
+
const response = await fetch(url);
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
return 'unknown';
|
|
76
|
+
}
|
|
77
|
+
const data = (await response.json());
|
|
78
|
+
return data.version || 'unknown';
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
helpers_1.Logger.warn(`Could not fetch latest version for ${opts.packageName}:`, error);
|
|
82
|
+
return 'unknown';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Extracts a clean semver version from various version specifiers.
|
|
87
|
+
* Returns null for non-standard versions that can't be compared.
|
|
88
|
+
*/
|
|
89
|
+
parseVersion(opts) {
|
|
90
|
+
// Skip workspace, file, git, and URL references
|
|
91
|
+
if (opts.version.startsWith('workspace:') ||
|
|
92
|
+
opts.version.startsWith('file:') ||
|
|
93
|
+
opts.version.startsWith('git') ||
|
|
94
|
+
opts.version.startsWith('http') ||
|
|
95
|
+
opts.version === '*' ||
|
|
96
|
+
opts.version === 'latest') {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
// Remove common prefixes: ^, ~, >=, >, <=, <, =
|
|
100
|
+
const cleaned = opts.version.replace(/^[\^~>=<]+/, '').trim();
|
|
101
|
+
// Handle version ranges (e.g., "1.0.0 || 2.0.0", ">=1.0.0 <2.0.0")
|
|
102
|
+
// Just take the first version-like string
|
|
103
|
+
const semverMatch = cleaned.match(/(\d+\.\d+\.\d+(?:-[\w.]+)?)/);
|
|
104
|
+
return semverMatch ? semverMatch[1] : null;
|
|
105
|
+
}
|
|
106
|
+
async processDependencies(opts) {
|
|
107
|
+
if (!opts.deps) {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
const results = [];
|
|
111
|
+
for (const [name, version] of Object.entries(opts.deps)) {
|
|
112
|
+
const parsedVersion = this.parseVersion({ version });
|
|
113
|
+
// Skip non-standard versions
|
|
114
|
+
if (!parsedVersion) {
|
|
115
|
+
results.push({
|
|
116
|
+
name,
|
|
117
|
+
currentVersion: version,
|
|
118
|
+
latestVersion: 'N/A',
|
|
119
|
+
isOutdated: false,
|
|
120
|
+
});
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
const latestVersion = await this.getLatestVersion({ packageName: name });
|
|
124
|
+
results.push({
|
|
125
|
+
name,
|
|
126
|
+
currentVersion: parsedVersion,
|
|
127
|
+
latestVersion,
|
|
128
|
+
isOutdated: latestVersion !== 'unknown' && parsedVersion !== latestVersion,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
return results;
|
|
132
|
+
}
|
|
133
|
+
async execute(opts) {
|
|
134
|
+
const packageJsonPath = `${opts.packagePath}/package.json`;
|
|
135
|
+
const result = await helpers_1.GithubHelper.getFileContent({ filePath: packageJsonPath });
|
|
136
|
+
if ('error' in result) {
|
|
137
|
+
return { error: `Could not read package.json at ${packageJsonPath}. Error: ${result.error}` };
|
|
138
|
+
}
|
|
139
|
+
try {
|
|
140
|
+
const packageJson = JSON.parse(result.content);
|
|
141
|
+
const [dependencies, devDependencies] = await Promise.all([
|
|
142
|
+
this.processDependencies({ deps: packageJson.dependencies }),
|
|
143
|
+
this.processDependencies({ deps: packageJson.devDependencies }),
|
|
144
|
+
]);
|
|
145
|
+
return {
|
|
146
|
+
packageName: packageJson.name,
|
|
147
|
+
dependencies,
|
|
148
|
+
devDependencies,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
helpers_1.Logger.error('[execute] Failed to execute | Error: ', error);
|
|
153
|
+
return { error: `Failed to parse package.json at ${packageJsonPath}.` };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
getTool() {
|
|
157
|
+
return (0, tools_1.createTool)({
|
|
158
|
+
id: this.id,
|
|
159
|
+
description: this.description,
|
|
160
|
+
inputSchema: this.inputSchema,
|
|
161
|
+
outputSchema: this.outputSchema,
|
|
162
|
+
execute: async ({ context }) => this.execute(context),
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
exports.VerifyDependenciesTool = VerifyDependenciesTool;
|
|
167
|
+
//# sourceMappingURL=verify-dependencies.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-dependencies.tool.js","sourceRoot":"","sources":["../../../../mcp-server/tools/github/verify-dependencies.tool.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAChD,6BAAwB;AACxB,4CAAqD;AACrD,kDAA4D;AAE5D,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;CAoBxB,CAAC;AAEF,MAAM,wBAAwB,GAAG;;;;;;;;CAQhC,CAAC;AAEF,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,UAAU,EAAE,OAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;CAC3D,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,YAAY,EAAE,OAAC,CAAC,KAAK,C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AI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AAjHD,wDAiHC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseTool, TMastraTool } from '../base.tool';
|
|
3
|
+
declare const InputSchema: z.ZodObject<{
|
|
4
|
+
filePath: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
declare const OutputSchema: z.ZodObject<{
|
|
7
|
+
filePath: z.ZodString;
|
|
8
|
+
content: z.ZodOptional<z.ZodString>;
|
|
9
|
+
error: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare class ViewSourceFileTool extends BaseTool<typeof InputSchema, typeof OutputSchema> {
|
|
12
|
+
readonly id = "viewSourceFile";
|
|
13
|
+
readonly description = "\nRetrieves the full source code content of a specific file from the Ignis GitHub repository.\n\nPURPOSE:\nRead contents of a source file. Primary method for inspecting implementation details,\nunderstanding logic, and viewing exact code.\n\nWHEN TO USE:\n- After finding a relevant file with listProjectFiles or searchCode\n- When you need to see implementation of a specific class, function, or component\n- To verify details not present in documentation\n- To extract specific code examples or snippets\n\nWHEN NOT TO USE:\n- For discovering files (use listProjectFiles to browse, or searchCode to find by keyword)\n- Do not use on non-text files (images, binaries) or very large files unless necessary\n- For documentation content (use getDocContent instead)\n";
|
|
14
|
+
readonly inputSchema: z.ZodObject<{
|
|
15
|
+
filePath: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
readonly outputSchema: z.ZodObject<{
|
|
18
|
+
filePath: z.ZodString;
|
|
19
|
+
content: z.ZodOptional<z.ZodString>;
|
|
20
|
+
error: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
|
|
23
|
+
getTool(): TMastraTool;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=view-source-file.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-source-file.tool.d.ts","sourceRoot":"","sources":["../../../../mcp-server/tools/github/view-source-file.tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA4CrD,QAAA,MAAM,WAAW;;iBAEf,CAAC;AAEH,QAAA,MAAM,YAAY;;;;iBAOhB,CAAC;AAMH,qBAAa,kBAAmB,SAAQ,QAAQ,CAAC,OAAO,WAAW,EAAE,OAAO,YAAY,CAAC;IACvF,QAAQ,CAAC,EAAE,oBAAoB;IAC/B,QAAQ,CAAC,WAAW,kwBAAoB;IACxC,QAAQ,CAAC,WAAW;;sBAAe;IACnC,QAAQ,CAAC,YAAY;;;;sBAAgB;IAE/B,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;IAgBvF,OAAO,IAAI,WAAW;CASvB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewSourceFileTool = void 0;
|
|
4
|
+
const tools_1 = require("@mastra/core/tools");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const base_tool_1 = require("../base.tool");
|
|
7
|
+
const helpers_1 = require("../../../mcp-server/helpers");
|
|
8
|
+
// ----------------------------------------------------------------------------
|
|
9
|
+
// DESCRIPTIONS
|
|
10
|
+
// ----------------------------------------------------------------------------
|
|
11
|
+
const TOOL_DESCRIPTION = `
|
|
12
|
+
Retrieves the full source code content of a specific file from the Ignis GitHub repository.
|
|
13
|
+
|
|
14
|
+
PURPOSE:
|
|
15
|
+
Read contents of a source file. Primary method for inspecting implementation details,
|
|
16
|
+
understanding logic, and viewing exact code.
|
|
17
|
+
|
|
18
|
+
WHEN TO USE:
|
|
19
|
+
- After finding a relevant file with listProjectFiles or searchCode
|
|
20
|
+
- When you need to see implementation of a specific class, function, or component
|
|
21
|
+
- To verify details not present in documentation
|
|
22
|
+
- To extract specific code examples or snippets
|
|
23
|
+
|
|
24
|
+
WHEN NOT TO USE:
|
|
25
|
+
- For discovering files (use listProjectFiles to browse, or searchCode to find by keyword)
|
|
26
|
+
- Do not use on non-text files (images, binaries) or very large files unless necessary
|
|
27
|
+
- For documentation content (use getDocContent instead)
|
|
28
|
+
`;
|
|
29
|
+
const FILE_PATH_DESCRIPTION = `
|
|
30
|
+
The full path to the file from the root of the repository.
|
|
31
|
+
|
|
32
|
+
HOW TO OBTAIN:
|
|
33
|
+
- Use listProjectFiles to browse the project and find valid file paths
|
|
34
|
+
- Use searchCode to find files containing specific keywords or patterns
|
|
35
|
+
- Navigate from root directory down to the specific file
|
|
36
|
+
|
|
37
|
+
EXAMPLES:
|
|
38
|
+
- "packages/core/src/application.ts"
|
|
39
|
+
- "examples/5-mins-qs/src/index.ts"
|
|
40
|
+
- "package.json"
|
|
41
|
+
`;
|
|
42
|
+
// ----------------------------------------------------------------------------
|
|
43
|
+
// SCHEMAS
|
|
44
|
+
// ----------------------------------------------------------------------------
|
|
45
|
+
const InputSchema = zod_1.z.object({
|
|
46
|
+
filePath: zod_1.z.string().min(1).describe(FILE_PATH_DESCRIPTION),
|
|
47
|
+
});
|
|
48
|
+
const OutputSchema = zod_1.z.object({
|
|
49
|
+
filePath: zod_1.z.string(),
|
|
50
|
+
content: zod_1.z.string().optional().describe('The full source code content of the file.'),
|
|
51
|
+
error: zod_1.z
|
|
52
|
+
.string()
|
|
53
|
+
.optional()
|
|
54
|
+
.describe('An error message if the file could not be read (e.g., not found).'),
|
|
55
|
+
});
|
|
56
|
+
// ----------------------------------------------------------------------------
|
|
57
|
+
// TOOL CLASS
|
|
58
|
+
// ----------------------------------------------------------------------------
|
|
59
|
+
class ViewSourceFileTool extends base_tool_1.BaseTool {
|
|
60
|
+
constructor() {
|
|
61
|
+
super(...arguments);
|
|
62
|
+
this.id = 'viewSourceFile';
|
|
63
|
+
this.description = TOOL_DESCRIPTION;
|
|
64
|
+
this.inputSchema = InputSchema;
|
|
65
|
+
this.outputSchema = OutputSchema;
|
|
66
|
+
}
|
|
67
|
+
async execute(opts) {
|
|
68
|
+
const result = await helpers_1.GithubHelper.getFileContent({ filePath: opts.filePath });
|
|
69
|
+
if ('error' in result) {
|
|
70
|
+
return {
|
|
71
|
+
filePath: opts.filePath,
|
|
72
|
+
error: result.error,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
filePath: opts.filePath,
|
|
77
|
+
content: result.content,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
getTool() {
|
|
81
|
+
return (0, tools_1.createTool)({
|
|
82
|
+
id: this.id,
|
|
83
|
+
description: this.description,
|
|
84
|
+
inputSchema: this.inputSchema,
|
|
85
|
+
outputSchema: this.outputSchema,
|
|
86
|
+
execute: async ({ context }) => this.execute(context),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.ViewSourceFileTool = ViewSourceFileTool;
|
|
91
|
+
//# sourceMappingURL=view-source-file.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-source-file.tool.js","sourceRoot":"","sources":["../../../../mcp-server/tools/github/view-source-file.tool.ts"],"names":[],"mappings":";;;AAAA,8CAAgD;AAChD,6BAAwB;AACxB,4CAAqD;AACrD,kDAAoD;AAEpD,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,MAAM,gBAAgB,GAA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CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,IAAA,kBAAU,EAAC;YAChB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF;AA/BD,gDA+BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../mcp-server/tools/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAG5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Base class
|
|
18
|
+
__exportStar(require("./base.tool"), exports);
|
|
19
|
+
// Tool classes
|
|
20
|
+
__exportStar(require("./docs"), exports);
|
|
21
|
+
__exportStar(require("./github"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../mcp-server/tools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,aAAa;AACb,8CAA4B;AAE5B,eAAe;AACf,yCAAuB;AACvB,2CAAyB"}
|
package/package.json
CHANGED
|
@@ -1,41 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-docs",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-10",
|
|
4
4
|
"description": "Documentation and MCP Server for Ignis Framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ignis",
|
|
7
|
+
"documentation",
|
|
8
|
+
"docs",
|
|
9
|
+
"guide",
|
|
10
|
+
"wiki",
|
|
11
|
+
"examples",
|
|
12
|
+
"vitepress",
|
|
7
13
|
"mcp",
|
|
8
14
|
"model-context-protocol",
|
|
9
|
-
"
|
|
15
|
+
"mastra",
|
|
16
|
+
"mastra-mcp",
|
|
10
17
|
"ai",
|
|
11
|
-
"
|
|
18
|
+
"ai-gateway",
|
|
19
|
+
"llm-gateway",
|
|
20
|
+
"model-router",
|
|
21
|
+
"ai-development",
|
|
22
|
+
"llm-development",
|
|
23
|
+
"server",
|
|
24
|
+
"cli",
|
|
25
|
+
"tooling",
|
|
26
|
+
"dev-tools",
|
|
27
|
+
"framework",
|
|
28
|
+
"venizia"
|
|
12
29
|
],
|
|
13
|
-
"main": "./mcp-server/
|
|
14
|
-
"types": "./mcp-server/
|
|
30
|
+
"main": "./dist/mcp-server/index.js",
|
|
31
|
+
"types": "./dist/mcp-server/index.d.ts",
|
|
15
32
|
"exports": {
|
|
16
33
|
".": {
|
|
17
|
-
"types": "./mcp-server/
|
|
18
|
-
"default": "./mcp-server/
|
|
34
|
+
"types": "./dist/mcp-server/index.d.ts",
|
|
35
|
+
"default": "./dist/mcp-server/index.js"
|
|
19
36
|
},
|
|
20
37
|
"./tools": {
|
|
21
|
-
"types": "./mcp-server/
|
|
22
|
-
"default": "./mcp-server/
|
|
38
|
+
"types": "./dist/mcp-server/tools/index.d.ts",
|
|
39
|
+
"default": "./dist/mcp-server/tools/index.js"
|
|
23
40
|
},
|
|
24
41
|
"./helpers": {
|
|
25
|
-
"types": "./mcp-server/
|
|
26
|
-
"default": "./mcp-server/
|
|
42
|
+
"types": "./dist/mcp-server/helpers/index.d.ts",
|
|
43
|
+
"default": "./dist/mcp-server/helpers/index.js"
|
|
27
44
|
},
|
|
28
45
|
"./common": {
|
|
29
|
-
"types": "./mcp-server/
|
|
30
|
-
"default": "./mcp-server/
|
|
46
|
+
"types": "./dist/mcp-server/common/index.d.ts",
|
|
47
|
+
"default": "./dist/mcp-server/common/index.js"
|
|
31
48
|
}
|
|
32
49
|
},
|
|
33
50
|
"bin": {
|
|
34
|
-
"ignis-docs-mcp": "./mcp-server/
|
|
51
|
+
"ignis-docs-mcp": "./dist/mcp-server/index.js"
|
|
35
52
|
},
|
|
36
53
|
"files": [
|
|
37
|
-
"
|
|
38
|
-
"
|
|
54
|
+
"README.md",
|
|
55
|
+
"LICENSE.md",
|
|
56
|
+
"dist/mcp-server",
|
|
57
|
+
"wiki",
|
|
58
|
+
"!**/*.tsbuildinfo"
|
|
39
59
|
],
|
|
40
60
|
"publishConfig": {
|
|
41
61
|
"access": "public"
|
|
@@ -44,6 +64,7 @@
|
|
|
44
64
|
"bun": ">=1.3"
|
|
45
65
|
},
|
|
46
66
|
"scripts": {
|
|
67
|
+
"force-update": "sh ./scripts/force-update.sh",
|
|
47
68
|
"eslint": "eslint --report-unused-disable-directives .",
|
|
48
69
|
"lint": "bun run eslint && bun run prettier:cli",
|
|
49
70
|
"lint:fix": "bun run eslint --fix && bun run prettier:fix",
|
|
@@ -51,18 +72,19 @@
|
|
|
51
72
|
"prettier:fix": "bun run prettier:cli --write",
|
|
52
73
|
"docs:dev": "vitepress dev site",
|
|
53
74
|
"docs:clean": "sh ./scripts/docs-clean.sh",
|
|
54
|
-
"docs:build": "
|
|
75
|
+
"docs:build": "sh ./scripts/docs-build.sh",
|
|
55
76
|
"docs:preview": "vitepress preview site",
|
|
56
|
-
"
|
|
57
|
-
"mcp:
|
|
77
|
+
"rebuild": "sh ./scripts/mcp-rebuild.sh no-version",
|
|
78
|
+
"mcp:rebuild": "bun run rebuild",
|
|
79
|
+
"mcp:build": "sh ./scripts/mcp-build.sh",
|
|
58
80
|
"mcp:clean": "sh ./scripts/mcp-clean.sh",
|
|
59
81
|
"mcp:start": "bun run mcp-server/index.ts",
|
|
60
82
|
"mcp:dev": "bun --watch mcp-server/index.ts",
|
|
61
|
-
"prepublishOnly": "bun run mcp:
|
|
83
|
+
"prepublishOnly": "bun run mcp:rebuild"
|
|
62
84
|
},
|
|
63
85
|
"repository": {
|
|
64
86
|
"type": "git",
|
|
65
|
-
"url": "https://github.com/
|
|
87
|
+
"url": "git+https://github.com/VENIZIA-AI/ignis.git",
|
|
66
88
|
"directory": "packages/docs"
|
|
67
89
|
},
|
|
68
90
|
"author": {
|
|
@@ -73,7 +95,7 @@
|
|
|
73
95
|
"bugs": {
|
|
74
96
|
"url": "https://github.com/VENIZIA-AI/ignis/issues"
|
|
75
97
|
},
|
|
76
|
-
"homepage": "https://github.
|
|
98
|
+
"homepage": "https://venizia-ai.github.io/ignis",
|
|
77
99
|
"license": "MIT",
|
|
78
100
|
"dependencies": {
|
|
79
101
|
"@mastra/core": "^0.24.6",
|
|
@@ -89,10 +111,11 @@
|
|
|
89
111
|
"@braintree/sanitize-url": "^7.1.1",
|
|
90
112
|
"@types/bun": "^1.3.4",
|
|
91
113
|
"@types/glob": "^8.1.0",
|
|
92
|
-
"@venizia/dev-configs": "
|
|
114
|
+
"@venizia/dev-configs": "^0.0.1-4",
|
|
93
115
|
"eslint": "^9.36.0",
|
|
94
116
|
"glob": "^10.4.2",
|
|
95
117
|
"prettier": "^3.6.2",
|
|
118
|
+
"tsc-alias": "^1.8.16",
|
|
96
119
|
"tsx": "^4.16.2",
|
|
97
120
|
"typescript": "^5.5.4",
|
|
98
121
|
"vitepress": "^1.6.4",
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Initial Architecture
|
|
3
|
+
description: Documentation of the original Ignis architecture before the Model-Repository-DataSource refactor
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Changelog - 2025-12-16
|
|
7
|
+
|
|
8
|
+
## Initial Architecture (Pre-Refactor)
|
|
9
|
+
|
|
10
|
+
This documents the original architecture of the Ignis framework before the Model-Repository-DataSource refactor. This version required manual schema registration and explicit constructor parameters.
|
|
11
|
+
|
|
12
|
+
## Overview
|
|
13
|
+
|
|
14
|
+
- **Model Definition**: Three separate declarations (table, relations, class) for each model.
|
|
15
|
+
- **DataSource Definition**: Required manual schema registration.
|
|
16
|
+
- **Repository Definition**: Required explicit constructor injection.
|
|
17
|
+
|
|
18
|
+
## Architecture Pattern
|
|
19
|
+
|
|
20
|
+
### Model Definition
|
|
21
|
+
|
|
22
|
+
Models were defined in three separate steps:
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// Step 1: Define table schema
|
|
26
|
+
const TABLE_NAME = 'Configuration';
|
|
27
|
+
|
|
28
|
+
export const configurationTable = pgTable(TABLE_NAME, {
|
|
29
|
+
...generateIdColumnDefs({ id: { dataType: 'string' } }),
|
|
30
|
+
...generateTzColumnDefs(),
|
|
31
|
+
code: text('code').notNull(),
|
|
32
|
+
group: text('group').notNull(),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
// Step 2: Define relations separately
|
|
36
|
+
export const configurationRelations = createRelations({
|
|
37
|
+
source: configurationTable,
|
|
38
|
+
relations: [
|
|
39
|
+
{
|
|
40
|
+
name: 'creator',
|
|
41
|
+
type: RelationTypes.ONE,
|
|
42
|
+
schema: userTable,
|
|
43
|
+
metadata: {
|
|
44
|
+
fields: [configurationTable.createdBy],
|
|
45
|
+
references: [userTable.id],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Step 3: Create model class
|
|
52
|
+
@model({ type: 'entity', skipMigrate: false })
|
|
53
|
+
export class Configuration extends BaseEntity<typeof configurationTable> {
|
|
54
|
+
static readonly TABLE_NAME = Configuration.name;
|
|
55
|
+
|
|
56
|
+
constructor() {
|
|
57
|
+
super({
|
|
58
|
+
name: Configuration.TABLE_NAME,
|
|
59
|
+
schema: configurationTable,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### DataSource Definition
|
|
66
|
+
|
|
67
|
+
DataSources required manual schema registration:
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
@datasource({})
|
|
71
|
+
export class PostgresDataSource extends BaseDataSource<TNodePostgresConnector, IDSConfigs> {
|
|
72
|
+
constructor() {
|
|
73
|
+
super({
|
|
74
|
+
name: PostgresDataSource.name,
|
|
75
|
+
driver: 'node-postgres',
|
|
76
|
+
config: { /* connection config */ },
|
|
77
|
+
|
|
78
|
+
// Manual schema registration - verbose and error-prone
|
|
79
|
+
schema: Object.assign(
|
|
80
|
+
{},
|
|
81
|
+
{
|
|
82
|
+
[User.TABLE_NAME]: userTable,
|
|
83
|
+
[Configuration.TABLE_NAME]: configurationTable,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
userRelations: userRelations.relations,
|
|
87
|
+
configurationRelations: configurationRelations.relations,
|
|
88
|
+
},
|
|
89
|
+
),
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Repository Definition
|
|
96
|
+
|
|
97
|
+
Repositories required explicit constructor injection:
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
@repository({})
|
|
101
|
+
export class ConfigurationRepository extends DefaultCRUDRepository<typeof configurationTable> {
|
|
102
|
+
constructor(@inject({ key: 'datasources.PostgresDataSource' }) dataSource: IDataSource) {
|
|
103
|
+
super({
|
|
104
|
+
dataSource,
|
|
105
|
+
entityClass: Configuration,
|
|
106
|
+
relations: configurationRelations.definitions,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Pain Points
|
|
113
|
+
|
|
114
|
+
- **Verbose Model Definition**: Three separate declarations (table, relations, class) for each model
|
|
115
|
+
- **Manual Schema Registration**: DataSource required explicit registration of every model and relation
|
|
116
|
+
- **Unclear Repository Role**: Repository just wrapped datasource without defining the model-datasource binding
|
|
117
|
+
- **Declaration Order Issues**: Had to declare table before relations, relations before class
|
|
118
|
+
- **No Auto-Discovery**: Adding a new model required updates in multiple places
|
|
119
|
+
- **Tight Coupling**: Changes to model structure required updates in datasource configuration
|
|
120
|
+
|
|
121
|
+
## File Structure
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
src/
|
|
125
|
+
├── models/
|
|
126
|
+
│ └── entities/
|
|
127
|
+
│ ├── user.model.ts # Table + Relations + Class
|
|
128
|
+
│ └── configuration.model.ts # Table + Relations + Class
|
|
129
|
+
├── datasources/
|
|
130
|
+
│ └── postgres.datasource.ts # Manual schema assembly
|
|
131
|
+
└── repositories/
|
|
132
|
+
├── user.repository.ts # Explicit constructor injection
|
|
133
|
+
└── configuration.repository.ts
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Dependencies
|
|
137
|
+
|
|
138
|
+
- `@venizia/ignis-helpers`: Core utilities and types
|
|
139
|
+
- `@venizia/ignis-inversion`: Dependency injection
|
|
140
|
+
- `drizzle-orm`: ORM layer
|
|
141
|
+
- `drizzle-zod`: Schema validation
|
|
142
|
+
|
|
143
|
+
## No Breaking Changes
|
|
144
|
+
|
|
145
|
+
This document describes the initial state of the architecture.
|