@venizia/ignis-docs 0.0.8 → 0.2.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/README.md +7 -7
- package/content/best-practices/api-usage-examples.md +15 -12
- package/content/best-practices/architectural-patterns.md +70 -78
- package/content/best-practices/architecture-decisions.md +91 -60
- package/content/best-practices/code-style-standards/advanced-patterns.md +56 -44
- package/content/best-practices/code-style-standards/constants-configuration.md +11 -11
- package/content/best-practices/code-style-standards/control-flow.md +5 -2
- package/content/best-practices/code-style-standards/documentation.md +13 -13
- package/content/best-practices/code-style-standards/function-patterns.md +9 -10
- package/content/best-practices/code-style-standards/index.md +1 -1
- package/content/best-practices/code-style-standards/naming-conventions.md +10 -8
- package/content/best-practices/code-style-standards/route-definitions.md +30 -12
- package/content/best-practices/code-style-standards/tooling.md +8 -5
- package/content/best-practices/code-style-standards/type-safety.md +13 -12
- package/content/best-practices/common-pitfalls.md +56 -37
- package/content/best-practices/contribution-workflow.md +13 -14
- package/content/best-practices/data-modeling.md +46 -22
- package/content/best-practices/deployment-strategies.md +28 -27
- package/content/best-practices/error-handling.md +48 -24
- package/content/best-practices/index.md +5 -5
- package/content/best-practices/performance-optimization.md +40 -31
- package/content/best-practices/security-guidelines.md +52 -23
- package/content/best-practices/testing-strategies.md +65 -51
- package/content/best-practices/troubleshooting-tips.md +24 -24
- package/content/extensions/components/{swagger.md → api-reference.md} +40 -31
- package/content/extensions/components/authentication/api.md +19 -19
- package/content/extensions/components/authentication/errors.md +7 -7
- package/content/extensions/components/authentication/index.md +10 -8
- package/content/extensions/components/authentication/usage.md +101 -6
- package/content/extensions/components/authorization/api.md +45 -25
- package/content/extensions/components/authorization/errors.md +6 -6
- package/content/extensions/components/authorization/index.md +11 -10
- package/content/extensions/components/authorization/usage.md +21 -21
- package/content/extensions/components/health-check.md +1 -1
- package/content/extensions/components/index.md +5 -5
- package/content/extensions/components/mail/errors.md +15 -15
- package/content/extensions/components/mail/index.md +1 -2
- package/content/extensions/components/mail/usage.md +1 -1
- package/content/extensions/components/request-tracker.md +1 -1
- package/content/extensions/components/socket-io/api.md +9 -9
- package/content/extensions/components/socket-io/errors.md +5 -5
- package/content/extensions/components/socket-io/index.md +8 -8
- package/content/extensions/components/socket-io/usage.md +1 -1
- package/content/extensions/components/static-asset/api.md +17 -4
- package/content/extensions/components/static-asset/errors.md +4 -4
- package/content/extensions/components/static-asset/index.md +26 -28
- package/content/extensions/components/static-asset/usage.md +13 -12
- package/content/extensions/components/template/index.md +2 -2
- package/content/extensions/components/template/setup-page.md +1 -1
- package/content/extensions/components/websocket/api.md +3 -3
- package/content/extensions/components/websocket/errors.md +5 -5
- package/content/extensions/components/websocket/index.md +5 -5
- package/content/extensions/components/websocket/usage.md +3 -3
- package/content/extensions/helpers/cron/index.md +2 -2
- package/content/extensions/helpers/crypto/index.md +1 -1
- package/content/extensions/helpers/env/index.md +27 -12
- package/content/extensions/helpers/error/index.md +81 -25
- package/content/extensions/helpers/index.md +2 -3
- package/content/extensions/helpers/inversion/index.md +15 -7
- package/content/extensions/helpers/kafka/compile-binary.md +92 -0
- package/content/extensions/helpers/kafka/examples.md +1 -1
- package/content/extensions/helpers/kafka/index.md +3 -0
- package/content/extensions/helpers/logger/index.md +32 -2
- package/content/extensions/helpers/network/index.md +6 -0
- package/content/extensions/helpers/queue/index.md +14 -17
- package/content/extensions/helpers/redis/index.md +548 -323
- package/content/extensions/helpers/socket-io/index.md +14 -10
- package/content/extensions/helpers/storage/api.md +44 -8
- package/content/extensions/helpers/storage/index.md +43 -7
- package/content/extensions/helpers/template/index.md +6 -3
- package/content/extensions/helpers/types/index.md +11 -8
- package/content/extensions/helpers/websocket/api.md +9 -9
- package/content/extensions/helpers/websocket/index.md +7 -7
- package/content/extensions/helpers/worker-thread/index.md +2 -2
- package/content/extensions/index.md +3 -4
- package/content/extensions/src-details/mcp-server.md +18 -24
- package/content/guides/core-concepts/application/bootstrapping.md +11 -14
- package/content/guides/core-concepts/application/index.md +3 -3
- package/content/guides/core-concepts/components.md +19 -10
- package/content/guides/core-concepts/dependency-injection.md +6 -3
- package/content/guides/core-concepts/grpc-controllers.md +6 -5
- package/content/guides/core-concepts/persistent/datasources.md +42 -43
- package/content/guides/core-concepts/persistent/index.md +16 -7
- package/content/guides/core-concepts/persistent/models.md +24 -20
- package/content/guides/core-concepts/persistent/postgres-drivers.md +201 -0
- package/content/guides/core-concepts/persistent/repositories.md +40 -23
- package/content/guides/core-concepts/persistent/search-meilisearch.md +185 -0
- package/content/guides/core-concepts/persistent/search-typesense.md +431 -0
- package/content/guides/core-concepts/persistent/transactions.md +61 -25
- package/content/guides/core-concepts/rest-controllers.md +12 -9
- package/content/guides/core-concepts/services.md +330 -60
- package/content/guides/get-started/5-minute-quickstart.md +15 -15
- package/content/guides/get-started/philosophy.md +36 -36
- package/content/guides/get-started/setup.md +3 -3
- package/content/guides/index.md +3 -3
- package/content/guides/migrations/redis-helpers-migration.md +177 -0
- package/content/guides/migrations/scoped-rbac-migration.md +17 -17
- package/content/guides/migrations/unified-connectors-migration.md +113 -0
- package/content/guides/reference/glossary.md +19 -12
- package/content/guides/reference/mcp-docs-server.md +22 -18
- package/content/guides/tutorials/building-a-crud-api.md +37 -44
- package/content/guides/tutorials/complete-installation.md +17 -17
- package/content/guides/tutorials/ecommerce-api.md +163 -124
- package/content/guides/tutorials/realtime-chat.md +181 -135
- package/content/guides/tutorials/testing.md +65 -523
- package/content/index.md +2 -180
- package/content/public/apple-touch-icon.png +0 -0
- package/content/public/og-image.png +0 -0
- package/content/public/site.webmanifest +11 -0
- package/content/references/base/application.md +4 -5
- package/content/references/base/bootstrapping.md +18 -5
- package/content/references/base/components.md +149 -120
- package/content/references/base/connectors.md +178 -0
- package/content/references/base/controllers.md +41 -30
- package/content/references/base/datasources.md +163 -92
- package/content/references/base/dependency-injection.md +34 -22
- package/content/references/base/filter-system/application-usage.md +17 -14
- package/content/references/base/filter-system/array-operators.md +7 -2
- package/content/references/base/filter-system/comparison-operators.md +3 -0
- package/content/references/base/filter-system/default-filter.md +89 -71
- package/content/references/base/filter-system/fields-order-pagination.md +22 -22
- package/content/references/base/filter-system/index.md +6 -3
- package/content/references/base/filter-system/json-filtering.md +20 -1
- package/content/references/base/filter-system/list-operators.md +1 -1
- package/content/references/base/filter-system/logical-operators.md +33 -1
- package/content/references/base/filter-system/null-operators.md +30 -1
- package/content/references/base/filter-system/quick-reference.md +23 -4
- package/content/references/base/filter-system/tips.md +5 -5
- package/content/references/base/filter-system/use-cases.md +12 -12
- package/content/references/base/grpc-controllers.md +13 -13
- package/content/references/base/index.md +24 -12
- package/content/references/base/middlewares.md +265 -327
- package/content/references/base/models.md +63 -49
- package/content/references/base/providers.md +136 -130
- package/content/references/base/repositories/advanced.md +59 -58
- package/content/references/base/repositories/index.md +115 -91
- package/content/references/base/repositories/mixins.md +55 -291
- package/content/references/base/repositories/relations.md +54 -64
- package/content/references/base/repositories/soft-deletable.md +31 -30
- package/content/references/base/services.md +296 -93
- package/content/references/configuration/environment-variables.md +49 -31
- package/content/references/configuration/index.md +6 -6
- package/content/references/index.md +17 -12
- package/content/references/quick-reference.md +65 -106
- package/content/references/utilities/crypto.md +65 -23
- package/content/references/utilities/index.md +3 -3
- package/content/references/utilities/jsx.md +6 -4
- package/content/references/utilities/module.md +68 -20
- package/content/references/utilities/parse.md +4 -14
- package/content/references/utilities/promise.md +9 -7
- package/content/references/utilities/schema.md +5 -3
- package/dist/mcp-server/common/guards.d.ts +8 -0
- package/dist/mcp-server/common/guards.d.ts.map +1 -0
- package/dist/mcp-server/common/guards.js +14 -0
- package/dist/mcp-server/common/guards.js.map +1 -0
- package/dist/mcp-server/common/index.d.ts +1 -0
- package/dist/mcp-server/common/index.d.ts.map +1 -1
- package/dist/mcp-server/common/index.js +1 -0
- package/dist/mcp-server/common/index.js.map +1 -1
- package/dist/mcp-server/helpers/docs.helper.d.ts.map +1 -1
- package/dist/mcp-server/helpers/docs.helper.js +4 -2
- package/dist/mcp-server/helpers/docs.helper.js.map +1 -1
- package/dist/mcp-server/helpers/github.helper.js +1 -1
- package/dist/mcp-server/index.js +7 -2
- package/dist/mcp-server/index.js.map +1 -1
- package/dist/mcp-server/tools/base.tool.d.ts +6 -2
- package/dist/mcp-server/tools/base.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/base.tool.js.map +1 -1
- package/dist/mcp-server/tools/docs/search-documents.tool.d.ts +1 -1
- package/dist/mcp-server/tools/github/list-project-files.tool.d.ts +1 -1
- package/dist/mcp-server/tools/github/search-code.tool.d.ts +1 -1
- package/dist/mcp-server/tools/github/search-code.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/github/search-code.tool.js +4 -1
- package/dist/mcp-server/tools/github/search-code.tool.js.map +1 -1
- package/dist/mcp-server/tools/github/verify-dependencies.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js +3 -1
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js.map +1 -1
- package/package.json +9 -9
- package/content/extensions/helpers/testing/index.md +0 -510
- package/content/references/base/middleware.md +0 -347
|
@@ -1,56 +1,98 @@
|
|
|
1
1
|
# Crypto Utility
|
|
2
2
|
|
|
3
|
-
The Crypto utility provides
|
|
3
|
+
The Crypto utility provides a single stateless `hash` function built on Node's built-in `node:crypto` module. It covers the two most common lightweight hashing needs - MD5 digests and HMAC-SHA256 signatures - without any external dependencies.
|
|
4
|
+
|
|
5
|
+
::: tip Full AES / RSA / ECDH encryption
|
|
6
|
+
This page covers only the utility-level `hash` function. For full symmetric/asymmetric encryption (AES-256-CBC, AES-256-GCM, RSA, ECDH key exchange) see the [Crypto helper](/extensions/helpers/crypto/).
|
|
7
|
+
:::
|
|
4
8
|
|
|
5
9
|
## `hash`
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
Creates a hash or HMAC digest of a string and returns it as a text-encoded string.
|
|
12
|
+
|
|
13
|
+
### Signature
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
hash(
|
|
17
|
+
text: string,
|
|
18
|
+
options: {
|
|
19
|
+
algorithm: 'SHA256' | 'MD5';
|
|
20
|
+
secret?: string;
|
|
21
|
+
outputType: BinaryToTextEncoding; // 'hex' | 'base64' | 'base64url' | 'latin1'
|
|
22
|
+
},
|
|
23
|
+
): string
|
|
24
|
+
```
|
|
8
25
|
|
|
9
|
-
|
|
26
|
+
**Parameters**
|
|
10
27
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
28
|
+
| Parameter | Type | Description |
|
|
29
|
+
|-----------|------|-------------|
|
|
30
|
+
| `text` | `string` | The input string to hash. |
|
|
31
|
+
| `options.algorithm` | `'SHA256' \| 'MD5'` | Hashing algorithm. |
|
|
32
|
+
| `options.secret` | `string` (optional) | Secret key for HMAC. Only used when `algorithm` is `'SHA256'`. |
|
|
33
|
+
| `options.outputType` | `BinaryToTextEncoding` | Encoding of the output string - typically `'hex'` or `'base64'`. |
|
|
16
34
|
|
|
17
35
|
### Behavior
|
|
18
36
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
| Algorithm | `secret` provided | Result |
|
|
38
|
+
|-----------|-------------------|--------|
|
|
39
|
+
| `'MD5'` | ignored | MD5 digest of `text` |
|
|
40
|
+
| `'SHA256'` | yes | HMAC-SHA256 of `text` signed with `secret` |
|
|
41
|
+
| `'SHA256'` | no / `undefined` | `text` returned unchanged (no-op) |
|
|
42
|
+
| any other | - | `text` returned unchanged (no-op) |
|
|
43
|
+
|
|
44
|
+
The SHA256 pass-through is intentional: it lets callers skip hashing conditionally (for example, when a secret is not yet configured) without adding an extra `if` at the call site. If you need an unconditional SHA256 hash without a secret, use MD5 or the full [Crypto helper](/extensions/helpers/crypto/).
|
|
22
45
|
|
|
23
46
|
### Examples
|
|
24
47
|
|
|
25
|
-
**MD5
|
|
48
|
+
**MD5 digest (hex)**
|
|
26
49
|
|
|
27
50
|
```typescript
|
|
28
51
|
import { hash } from '@venizia/ignis-helpers';
|
|
29
52
|
|
|
30
|
-
const
|
|
31
|
-
// => '
|
|
53
|
+
const digest = hash('user@example.com', { algorithm: 'MD5', outputType: 'hex' });
|
|
54
|
+
// => 'b58996c504c5638798eb6b511e6f49af'
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**MD5 digest (base64) - useful for HTTP ETags**
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
const etag = hash(JSON.stringify(payload), { algorithm: 'MD5', outputType: 'base64' });
|
|
61
|
+
// => 'tYlsUExWOHeY62a1EW9Jr...'
|
|
32
62
|
```
|
|
33
63
|
|
|
34
|
-
**SHA256
|
|
64
|
+
**HMAC-SHA256 - signing a webhook payload**
|
|
35
65
|
|
|
36
66
|
```typescript
|
|
37
67
|
import { hash } from '@venizia/ignis-helpers';
|
|
38
68
|
|
|
39
|
-
const
|
|
69
|
+
const signature = hash(rawBody, {
|
|
40
70
|
algorithm: 'SHA256',
|
|
41
|
-
secret:
|
|
71
|
+
secret: process.env.WEBHOOK_SECRET,
|
|
42
72
|
outputType: 'hex',
|
|
43
73
|
});
|
|
44
|
-
|
|
74
|
+
|
|
75
|
+
// Compare against the value in the X-Hub-Signature-256 header
|
|
76
|
+
const expected = `sha256=${signature}`;
|
|
45
77
|
```
|
|
46
78
|
|
|
47
|
-
**
|
|
79
|
+
**HMAC-SHA256 in base64 - API request signing**
|
|
48
80
|
|
|
49
81
|
```typescript
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
algorithm: 'MD5',
|
|
82
|
+
const hmac = hash(`${timestamp}.${body}`, {
|
|
83
|
+
algorithm: 'SHA256',
|
|
84
|
+
secret: apiKey,
|
|
54
85
|
outputType: 'base64',
|
|
55
86
|
});
|
|
56
87
|
```
|
|
88
|
+
|
|
89
|
+
## When to use
|
|
90
|
+
|
|
91
|
+
Use `hash` for lightweight, one-off hashing that does not require key management or IV handling:
|
|
92
|
+
|
|
93
|
+
- Building cache keys or ETags from response bodies (MD5)
|
|
94
|
+
- Verifying webhook signatures (HMAC-SHA256)
|
|
95
|
+
- Signing API requests with a shared secret (HMAC-SHA256)
|
|
96
|
+
- Anonymising personally identifiable data before storing in logs (MD5)
|
|
97
|
+
|
|
98
|
+
For encryption, decryption, or asymmetric operations (AES, RSA, ECDH) use the [Crypto helper](/extensions/helpers/crypto/) instead.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Utilities
|
|
2
2
|
|
|
3
|
-
Pure, standalone functions providing common, reusable logic for the
|
|
3
|
+
Pure, standalone functions providing common, reusable logic for the IGNIS framework. All utilities are stateless and easy to use.
|
|
4
4
|
|
|
5
5
|
## Quick Reference
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Pure, standalone functions providing common, reusable logic for the Ignis framew
|
|
|
10
10
|
| **Date** | `ignis-helpers` | Date/time manipulation | `dayjs`, `sleep()`, `isWeekday()`, `getDateTz()`, `hrTime()` |
|
|
11
11
|
| **JSX** | `ignis` | HTML/JSX responses | `htmlContent()`, `htmlResponse()` |
|
|
12
12
|
| **Module** | `ignis-helpers` | Module validation | `validateModule()` |
|
|
13
|
-
| **Parse** | `ignis-helpers` | Data type conversion | `int()`, `float()`, `toBoolean()`, `toCamel()
|
|
13
|
+
| **Parse** | `ignis-helpers` | Data type conversion | `int()`, `float()`, `toBoolean()`, `toCamel()` |
|
|
14
14
|
| **Performance** | `ignis-helpers` | Execution timing | `executeWithPerformanceMeasure()`, `getPerformanceCheckpoint()` |
|
|
15
15
|
| **Promise** | `ignis-helpers` | Promise helpers | `executePromiseWithLimit()`, `isPromiseLike()`, `getDeepProperty()` |
|
|
16
16
|
| **Request** | `ignis-helpers` | HTTP utilities | `parseMultipartBody()`, `sanitizeFilename()`, `createContentDispositionHeader()` |
|
|
@@ -47,7 +47,7 @@ Utilities are imported from `@venizia/ignis` (schema, JSX, and status helpers) o
|
|
|
47
47
|
|
|
48
48
|
```typescript
|
|
49
49
|
import { jsonContent, jsonResponse, htmlResponse, requiredString, Statuses } from '@venizia/ignis';
|
|
50
|
-
import { hash, dayjs, sleep, int, float, toBoolean
|
|
50
|
+
import { hash, dayjs, sleep, int, float, toBoolean } from '@venizia/ignis-helpers';
|
|
51
51
|
|
|
52
52
|
// Crypto
|
|
53
53
|
const md5Hash = hash('some text', { algorithm: 'MD5', outputType: 'hex' });
|
|
@@ -186,7 +186,8 @@ export class PageController extends BaseRestController {
|
|
|
186
186
|
### HTML Email Preview
|
|
187
187
|
|
|
188
188
|
```typescript
|
|
189
|
-
import { BaseRestController, get, htmlResponse, TRouteContext
|
|
189
|
+
import { BaseRestController, get, htmlResponse, TRouteContext } from '@venizia/ignis';
|
|
190
|
+
import { z } from '@hono/zod-openapi';
|
|
190
191
|
import { HTTP } from '@venizia/ignis-helpers';
|
|
191
192
|
|
|
192
193
|
const EmailRoutes = {
|
|
@@ -225,7 +226,8 @@ export class EmailController extends BaseRestController {
|
|
|
225
226
|
### Documentation Page
|
|
226
227
|
|
|
227
228
|
```typescript
|
|
228
|
-
import { BaseRestController, get, htmlResponse, TRouteContext
|
|
229
|
+
import { BaseRestController, get, htmlResponse, TRouteContext } from '@venizia/ignis';
|
|
230
|
+
import { z } from '@hono/zod-openapi';
|
|
229
231
|
import { HTTP } from '@venizia/ignis-helpers';
|
|
230
232
|
|
|
231
233
|
const DocsRoutes = {
|
|
@@ -355,7 +357,7 @@ async getUserProfile(c: TRouteContext) {
|
|
|
355
357
|
return c.html(<UserProfile user={user} />);
|
|
356
358
|
}
|
|
357
359
|
|
|
358
|
-
// Bad: Don't use htmlResponse for API endpoints
|
|
360
|
+
// Bad: Don't use htmlResponse for API endpoints - use jsonResponse instead
|
|
359
361
|
```
|
|
360
362
|
|
|
361
363
|
### 2. Combine with Authentication
|
|
@@ -564,7 +566,7 @@ async getUsers() {
|
|
|
564
566
|
- **Related References:**
|
|
565
567
|
- [Schema Utility](./schema.md) - JSON content and response helpers
|
|
566
568
|
- [Controllers](../base/controllers.md) - Defining routes and handlers
|
|
567
|
-
- [OpenAPI Component](/extensions/components/
|
|
569
|
+
- [OpenAPI Component](/extensions/components/api-reference) - API documentation
|
|
568
570
|
|
|
569
571
|
- **External Resources:**
|
|
570
572
|
- [Hono JSX Documentation](https://hono.dev/guides/jsx)
|
|
@@ -1,42 +1,90 @@
|
|
|
1
1
|
# Module Utility
|
|
2
2
|
|
|
3
|
-
The Module utility provides a
|
|
3
|
+
The Module utility provides a pre-flight check for optional peer dependencies. IGNIS helpers and components often depend on packages that are not bundled with the framework (for example, `@connectrpc/connect` for gRPC, `@hono/swagger-ui` for the Swagger component). Calling `validateModule` at the start of a lazy-loaded code path ensures a clear, actionable error is thrown before any import is attempted, rather than a cryptic "Cannot find module" crash.
|
|
4
|
+
|
|
5
|
+
Resolution is rooted at `process.cwd()/node_modules` via Node's `createRequire`, so peer dependencies installed in the consuming application are found correctly even though this utility lives inside `packages/helpers/dist/`.
|
|
4
6
|
|
|
5
7
|
## `validateModule`
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Resolves each module name in sequence using `require.resolve`. If any module cannot be found it logs the failure and throws an `ApplicationError` with an install instruction. Returns a `Promise<void>` - it is async to support consistent `await` usage at call sites, though resolution itself is synchronous.
|
|
10
|
+
|
|
11
|
+
### Signature
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
validateModule(opts: {
|
|
15
|
+
scope?: string;
|
|
16
|
+
modules: Array<string>;
|
|
17
|
+
}): Promise<void>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Options**
|
|
21
|
+
|
|
22
|
+
| Option | Type | Default | Description |
|
|
23
|
+
|--------|------|---------|-------------|
|
|
24
|
+
| `modules` | `Array<string>` | `[]` | Module names to check. Evaluated in order - the first missing module stops the loop and throws. |
|
|
25
|
+
| `scope` | `string` | `''` | Human-readable label for the calling feature (e.g. the component or helper class name). Included in the error message to tell the developer which feature needs the package. |
|
|
8
26
|
|
|
9
|
-
###
|
|
27
|
+
### Error message format
|
|
10
28
|
|
|
11
|
-
|
|
12
|
-
- `scope` (string, optional): A string to identify the feature or component that requires the module, making the error message more informative. Defaults to empty string.
|
|
13
|
-
- `modules` (Array<string>): An array of module names to validate. Defaults to empty array.
|
|
29
|
+
When a module is missing the thrown error reads:
|
|
14
30
|
|
|
15
|
-
|
|
31
|
+
```
|
|
32
|
+
[validateModule] <module> is required for <scope>. Please install '<module>'
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If `scope` is omitted:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
[validateModule] <module> is required. Please install '<module>'
|
|
39
|
+
```
|
|
16
40
|
|
|
17
|
-
### Example
|
|
41
|
+
### Example - gRPC controller (optional dep guard)
|
|
18
42
|
|
|
19
|
-
The `
|
|
43
|
+
The `GrpcRequestAdapter` uses `validateModule` to gate the ConnectRPC import. The check runs once before the adapter is wired up, so the error surfaces at startup rather than on the first request.
|
|
20
44
|
|
|
21
45
|
```typescript
|
|
22
46
|
import { validateModule } from '@venizia/ignis-helpers';
|
|
23
47
|
|
|
24
|
-
|
|
25
|
-
// ...
|
|
48
|
+
const GRPC_MODULES = ['@connectrpc/connect'];
|
|
26
49
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
50
|
+
export class MyGrpcController extends BaseGrpcController {
|
|
51
|
+
async configure() {
|
|
52
|
+
// Fails fast with a clear install instruction if the peer dep is absent
|
|
53
|
+
await validateModule({ scope: MyGrpcController.name, modules: GRPC_MODULES });
|
|
30
54
|
|
|
31
|
-
const {
|
|
32
|
-
|
|
33
|
-
// ... rest of the setup
|
|
55
|
+
const { ConnectRouter } = await import('@connectrpc/connect');
|
|
56
|
+
// ... register routes
|
|
34
57
|
}
|
|
35
58
|
}
|
|
36
59
|
```
|
|
37
60
|
|
|
38
|
-
|
|
61
|
+
### Example - custom helper with multiple optional deps
|
|
39
62
|
|
|
63
|
+
When a feature requires several packages, list them all. The first missing one stops the check.
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import { validateModule } from '@venizia/ignis-helpers';
|
|
67
|
+
import { BaseHelper } from '@venizia/ignis-helpers';
|
|
68
|
+
|
|
69
|
+
export class KafkaQueueHelper extends BaseHelper {
|
|
70
|
+
async configure() {
|
|
71
|
+
await validateModule({
|
|
72
|
+
scope: KafkaQueueHelper.name,
|
|
73
|
+
modules: ['kafkajs', 'kafkajs-snappy'],
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const { Kafka } = await import('kafkajs');
|
|
77
|
+
// ... initialise Kafka client
|
|
78
|
+
}
|
|
79
|
+
}
|
|
40
80
|
```
|
|
41
|
-
|
|
42
|
-
|
|
81
|
+
|
|
82
|
+
## When to use
|
|
83
|
+
|
|
84
|
+
Use `validateModule` whenever your code does a dynamic `import()` of a package that is listed as an optional peer dependency in `package.json`. The recommended pattern is:
|
|
85
|
+
|
|
86
|
+
1. Declare the dep as `peerDependenciesMeta` with `optional: true` in `package.json`.
|
|
87
|
+
2. Call `validateModule` at the top of the method that needs the package - before any `import()`.
|
|
88
|
+
3. Pass the feature or class name as `scope` so the error message pinpoints which feature triggered the check.
|
|
89
|
+
|
|
90
|
+
Avoid calling `validateModule` on every request. Place it in an initialisation hook (`configure`, `binding`, `boot`) that runs once at startup.
|
|
@@ -12,16 +12,13 @@ The Parse utility provides a collection of functions for data type checking, con
|
|
|
12
12
|
- **`int(input)`**: Parses a value to an integer. Handles strings with commas and defaults to `0` if the input is invalid.
|
|
13
13
|
- **`float(input, digit = 2)`**: Parses a value to a float, rounding to a specified number of digits. Handles strings with commas and defaults to `0` if the input is invalid.
|
|
14
14
|
- **`toBoolean(input)`**: Converts a value to a boolean. Returns `false` for empty string, `'false'`, `'0'`, `false`, `0`, `null`, and `undefined`. Returns `true` for everything else.
|
|
15
|
-
- **`toStringDecimal(input, digit = 2, options?)`**: Formats a number to a string with a specified number of decimal places. By default uses locale-specific formatting (`useLocaleFormat: true`). When `useLocaleFormat` is `false`, uses `toFixed()` instead.
|
|
16
15
|
|
|
17
16
|
```typescript
|
|
18
|
-
import { int, float, toBoolean
|
|
17
|
+
import { int, float, toBoolean } from '@venizia/ignis-helpers';
|
|
19
18
|
|
|
20
19
|
const myInt = int('1,000'); // => 1000
|
|
21
20
|
const myFloat = float('1,234.567', 2); // => 1234.57
|
|
22
21
|
const myBool = toBoolean('true'); // => true
|
|
23
|
-
const formatted = toStringDecimal(1234.5, 2); // => '1,234.50'
|
|
24
|
-
const fixed = toStringDecimal(1234.5, 2, { useLocaleFormat: false }); // => '1234.50'
|
|
25
22
|
```
|
|
26
23
|
|
|
27
24
|
## String and Object Transformation
|
|
@@ -41,17 +38,12 @@ const camelObject = keysToCamel({ 'first-name': 'John', 'last_name': 'Doe' });
|
|
|
41
38
|
|
|
42
39
|
## Number Parsing
|
|
43
40
|
|
|
44
|
-
- **`getNumberValue(input, opts?)`**: Parses a string to a number with locale support (US or EU format).
|
|
45
41
|
|
|
46
42
|
```typescript
|
|
47
|
-
import { getNumberValue } from '@venizia/ignis-helpers';
|
|
48
43
|
|
|
49
|
-
// US format (default)
|
|
50
|
-
getNumberValue('1,234.56', { method: 'float' }); // => 1234.56
|
|
51
|
-
getNumberValue('1,234', { method: 'int' }); // => 1234
|
|
44
|
+
// US format (default) - comma is thousands separator
|
|
52
45
|
|
|
53
|
-
// EU format
|
|
54
|
-
getNumberValue('1.234,56', { method: 'float', locale: 'eu' }); // => 1234.56
|
|
46
|
+
// EU format - dot is thousands separator, comma is decimal
|
|
55
47
|
```
|
|
56
48
|
|
|
57
49
|
| Option | Type | Default | Description |
|
|
@@ -61,11 +53,10 @@ getNumberValue('1.234,56', { method: 'float', locale: 'eu' }); // => 1234.56
|
|
|
61
53
|
|
|
62
54
|
## Array Transformation
|
|
63
55
|
|
|
64
|
-
- **`parseArrayToRecordWithKey(opts)`**: Transforms an array of objects into a record (plain object), using a specified property of the objects as keys. Takes an options object with `arr` and `keyMap` properties. Throws an error if `keyMap` is not found in an element. Last element wins on duplicate keys.
|
|
65
56
|
- **`parseArrayToMapWithKey(arr, keyMap)`**: Transforms an array of objects into a `Map`, using a specified property of the objects as keys. Takes positional arguments (not an options object). Throws an error if `keyMap` is not found in an element. Last element wins on duplicate keys.
|
|
66
57
|
|
|
67
58
|
```typescript
|
|
68
|
-
import {
|
|
59
|
+
import { parseArrayToMapWithKey } from '@venizia/ignis-helpers';
|
|
69
60
|
|
|
70
61
|
const users = [
|
|
71
62
|
{ id: 1, name: 'Alice' },
|
|
@@ -73,7 +64,6 @@ const users = [
|
|
|
73
64
|
];
|
|
74
65
|
|
|
75
66
|
// Record (options object pattern)
|
|
76
|
-
const usersRecord = parseArrayToRecordWithKey({ arr: users, keyMap: 'id' });
|
|
77
67
|
// => { 1: { id: 1, name: 'Alice' }, 2: { id: 2, name: 'Bob' } }
|
|
78
68
|
|
|
79
69
|
// Map (positional arguments)
|
|
@@ -38,17 +38,19 @@ const results = await executePromiseWithLimit({
|
|
|
38
38
|
console.log('All tasks finished:', results);
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
## `
|
|
41
|
+
## `toError`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Normalizes an unknown thrown value into an `Error` instance. Useful in `catch` blocks where the caught value is typed `unknown` and isn't guaranteed to already be an `Error`.
|
|
44
44
|
|
|
45
45
|
```typescript
|
|
46
|
-
import {
|
|
46
|
+
import { toError } from '@venizia/ignis-helpers';
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const
|
|
48
|
+
try {
|
|
49
|
+
await riskyOperation();
|
|
50
|
+
} catch (caught) {
|
|
51
|
+
const error = toError(caught);
|
|
52
|
+
console.error(error.message);
|
|
53
|
+
}
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
## `isPromiseLike`
|
|
@@ -14,7 +14,8 @@ The `jsonContent` function creates a standard OpenAPI content object for `applic
|
|
|
14
14
|
- `required` (boolean, optional): Whether the content is required.
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
import { jsonContent
|
|
17
|
+
import { jsonContent } from '@venizia/ignis';
|
|
18
|
+
import { z } from '@hono/zod-openapi';
|
|
18
19
|
|
|
19
20
|
const UserSchema = z.object({
|
|
20
21
|
id: z.number(),
|
|
@@ -40,7 +41,8 @@ The `jsonResponse` function generates a standard OpenAPI response object that in
|
|
|
40
41
|
- `headers` (Record<string, THeaderObject>, optional): Custom response headers to include in the success response.
|
|
41
42
|
|
|
42
43
|
```typescript
|
|
43
|
-
import { jsonResponse
|
|
44
|
+
import { jsonResponse } from '@venizia/ignis';
|
|
45
|
+
import { z } from '@hono/zod-openapi';
|
|
44
46
|
|
|
45
47
|
const UserSchema = z.object({
|
|
46
48
|
id: z.number(),
|
|
@@ -110,7 +112,7 @@ const schema = z.object({
|
|
|
110
112
|
import { TAnyObjectSchema, TInferSchema } from '@venizia/ignis';
|
|
111
113
|
|
|
112
114
|
// TAnyObjectSchema = z.ZodObject<z.ZodRawShape>
|
|
113
|
-
// TInferSchema<T> = z.infer<T>
|
|
115
|
+
// TInferSchema<T> = z.infer<T> - infer TypeScript type from a Zod schema
|
|
114
116
|
|
|
115
117
|
type UserType = TInferSchema<typeof UserSchema>;
|
|
116
118
|
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Everything this server reads is external and untyped - markdown frontmatter, GitHub error bodies,
|
|
3
|
+
* npm registry responses. A key may be absent, of the wrong type, or PRESENT BUT EMPTY, and an empty
|
|
4
|
+
* value has to fall back exactly like a missing one. That is a truthiness test, not a nullish one,
|
|
5
|
+
* which is why these call sites cannot use `??`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const isNonEmptyString: (value: unknown) => value is string;
|
|
8
|
+
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../../mcp-server/common/guards.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAE1D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isNonEmptyString = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Everything this server reads is external and untyped - markdown frontmatter, GitHub error bodies,
|
|
6
|
+
* npm registry responses. A key may be absent, of the wrong type, or PRESENT BUT EMPTY, and an empty
|
|
7
|
+
* value has to fall back exactly like a missing one. That is a truthiness test, not a nullish one,
|
|
8
|
+
* which is why these call sites cannot use `??`.
|
|
9
|
+
*/
|
|
10
|
+
const isNonEmptyString = (value) => {
|
|
11
|
+
return typeof value === 'string' && value.length > 0;
|
|
12
|
+
};
|
|
13
|
+
exports.isNonEmptyString = isNonEmptyString;
|
|
14
|
+
//# sourceMappingURL=guards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../mcp-server/common/guards.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAmB,EAAE;IAClE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../mcp-server/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../mcp-server/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./paths"), exports);
|
|
18
18
|
__exportStar(require("./config"), exports);
|
|
19
|
+
__exportStar(require("./guards"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../mcp-server/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../mcp-server/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.helper.d.ts","sourceRoot":"","sources":["../../../mcp-server/helpers/docs.helper.ts"],"names":[],"mappings":"AAQA,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAc;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAA2B;WAElC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"docs.helper.d.ts","sourceRoot":"","sources":["../../../mcp-server/helpers/docs.helper.ts"],"names":[],"mappings":"AAQA,UAAU,IAAI;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAc;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAA2B;WAElC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAoDpC,MAAM,CAAC,UAAU,IAAI,IAAI;IAMzB,OAAO,CAAC,MAAM,CAAC,eAAe;WAYjB,eAAe,CAAC,IAAI,EAAE,cAAc;;;;;;;WAqBpC,kBAAkB,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;WAYhE,iBAAiB,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;WAgB7C,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;WASnC,mBAAmB,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;CAiCtD"}
|
|
@@ -33,11 +33,13 @@ class DocsHelper {
|
|
|
33
33
|
promises_1.default.readFile(file, 'utf-8')
|
|
34
34
|
.then(rawContent => {
|
|
35
35
|
const { data, content } = (0, gray_matter_1.default)(rawContent);
|
|
36
|
+
// A page whose frontmatter carries an EMPTY title/category must fall back too, not
|
|
37
|
+
// just one that omits the key - so this is a truthiness test, not a nullish one.
|
|
36
38
|
resolve({
|
|
37
39
|
id: node_path_1.default.relative(common_1.Paths.WIKI, file),
|
|
38
|
-
title: data.title
|
|
40
|
+
title: (0, common_1.isNonEmptyString)(data.title) ? data.title : node_path_1.default.basename(file, '.md'),
|
|
39
41
|
content,
|
|
40
|
-
category: data.category
|
|
42
|
+
category: (0, common_1.isNonEmptyString)(data.category) ? data.category : 'Uncategorized',
|
|
41
43
|
filePath: file,
|
|
42
44
|
});
|
|
43
45
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.helper.js","sourceRoot":"","sources":["../../../mcp-server/helpers/docs.helper.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA2B;AAC3B,sDAA2B;AAC3B,8DAAiC;AACjC,gEAAkC;AAClC,0DAA6B;AAC7B,
|
|
1
|
+
{"version":3,"file":"docs.helper.js","sourceRoot":"","sources":["../../../mcp-server/helpers/docs.helper.ts"],"names":[],"mappings":";;;;;;AAAA,0DAA2B;AAC3B,sDAA2B;AAC3B,8DAAiC;AACjC,gEAAkC;AAClC,0DAA6B;AAC7B,sCAAgE;AAChE,mDAAyC;AAezC,MAAa,UAAU;aACN,UAAK,GAAW,EAAE,CAAC;aACnB,UAAK,GAAsB,IAAI,CAAC;IAE/C,MAAM,CAAC,KAAK,CAAC,IAAI;QACf,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;QAED,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAE,EAAC,SAAS,EAAE;gBAChC,GAAG,EAAE,cAAK,CAAC,IAAI;gBACf,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;aAC1C,CAAC,CAAC;YAEH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,sBAAM,CAAC,IAAI,CAAC,mCAAmC,cAAK,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC7D,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,IAAI,CAAC,KAAK,GAAG,MAAM,OAAO,CAAC,GAAG,CAC5B,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBACf,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBAC3C,kBAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC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,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM;gBAC1D,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM;gBAC7B,YAAY,EAAE,KAAK,CAAC,KAAK;gBACzB,IAAI,EAAE,KAAK,CAAC,IAAI;aACjB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,sBAAM,CAAC,KAAK,CAAC,8BAA8B,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;YAC9D,OAAO;gBACL,EAAE,EAAE,GAAG,CAAC,EAAE;gBACV,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ;gBACtB,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM;gBAC1D,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM;aAC9B,CAAC;QACJ,CAAC;IACH,CAAC;;AApKH,gCAqKC"}
|
package/dist/mcp-server/index.js
CHANGED
|
@@ -54,7 +54,7 @@ const parseArgs = () => {
|
|
|
54
54
|
const main = async () => {
|
|
55
55
|
const { branch } = parseArgs();
|
|
56
56
|
common_1.MCPConfigs.setBranch({ branch });
|
|
57
|
-
helpers_1.Logger.info('[main] Initializing
|
|
57
|
+
helpers_1.Logger.info('[main] Initializing IGNIS MCP Documentation Server...');
|
|
58
58
|
helpers_1.Logger.info(`[main] GitHub branch: ${common_1.MCPConfigs.github.branch}`);
|
|
59
59
|
try {
|
|
60
60
|
await helpers_1.DocsHelper.load();
|
|
@@ -67,5 +67,10 @@ const main = async () => {
|
|
|
67
67
|
process.exit(1);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
|
-
main()
|
|
70
|
+
// A rejection escaping main() - one thrown before the try block, e.g. by parseArgs() - would
|
|
71
|
+
// otherwise surface as an unhandled rejection and take the process down with no diagnostic.
|
|
72
|
+
main().catch(error => {
|
|
73
|
+
helpers_1.Logger.error('[main] Startup failed:', error);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
});
|
|
71
76
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../mcp-server/index.ts"],"names":[],"mappings":";;;AACA,qCAAwC;AACxC,qCAAsC;AACtC,uCAA+C;AAC/C,mCAWiB;AAEjB,MAAM,QAAQ,GAAG;IACf,UAAU,EAAE,IAAI,sBAAc,EAAE,CAAC,OAAO,EAAE;IAC1C,aAAa,EAAE,IAAI,yBAAiB,EAAE,CAAC,OAAO,EAAE;IAChD,QAAQ,EAAE,IAAI,oBAAY,EAAE,CAAC,OAAO,EAAE;IACtC,cAAc,EAAE,IAAI,0BAAkB,EAAE,CAAC,OAAO,EAAE;IAClD,cAAc,EAAE,IAAI,0BAAkB,EAAE,CAAC,OAAO,EAAE;IAClD,kBAAkB,EAAE,IAAI,8BAAsB,EAAE,CAAC,OAAO,EAAE;IAE1D,UAAU,EAAE,IAAI,sBAAc,EAAE,CAAC,OAAO,EAAE;IAC1C,gBAAgB,EAAE,IAAI,4BAAoB,EAAE,CAAC,OAAO,EAAE;IACtD,cAAc,EAAE,IAAI,0BAAkB,EAAE,CAAC,OAAO,EAAE;IAClD,kBAAkB,EAAE,IAAI,8BAAsB,EAAE,CAAC,OAAO,EAAE;CAC3D,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,aAAa,EAAE,KAAK,IAAI,EAAE;QACxB,MAAM,IAAI,GAAG,MAAM,oBAAU,CAAC,IAAI,EAAE,CAAC;QAErC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACpB,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;YAElE,OAAO;gBACL,GAAG,EAAE,gBAAgB,GAAG,CAA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AI,EAAE;IACtB,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,CAAC;IAC/B,mBAAU,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAEjC,gBAAM,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC;IACrE,gBAAM,CAAC,IAAI,CAAC,yBAAyB,mBAAU,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAEjE,IAAI,CAAC;QACH,MAAM,oBAAU,CAAC,IAAI,EAAE,CAAC;QACxB,gBAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAEzD,MAAM,SAAS,CAAC,UAAU,EAAE,CAAC;QAC7B,gBAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACtD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,gBAAM,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC;AAEF,6FAA6F;AAC7F,4FAA4F;AAC5F,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;IACnB,gBAAM,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -7,7 +7,11 @@ export declare abstract class BaseTool<TInputSchema extends z.ZodType, TOutputSc
|
|
|
7
7
|
abstract readonly inputSchema: TInputSchema;
|
|
8
8
|
abstract readonly outputSchema: TOutputSchema;
|
|
9
9
|
abstract execute(opts: z.infer<TInputSchema>): Promise<z.infer<TOutputSchema>>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Converts this tool instance to a Mastra-compatible tool object. Typed on `z.infer` (the parsed
|
|
12
|
+
* side, defaults applied) - @mastra/core >= 1.50 infers `createTool` results there, so a schema
|
|
13
|
+
* field with `.default()` is non-optional in the Tool type.
|
|
14
|
+
*/
|
|
15
|
+
abstract getTool(): Tool<z.infer<TInputSchema>, z.infer<TOutputSchema>>;
|
|
12
16
|
}
|
|
13
17
|
//# sourceMappingURL=base.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.tool.d.ts","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,2DAA2D;AAC3D,8BAAsB,QAAQ,CAAC,YAAY,SAAS,CAAC,CAAC,OAAO,EAAE,aAAa,SAAS,CAAC,CAAC,OAAO;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IAE9C,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAE9E
|
|
1
|
+
{"version":3,"file":"base.tool.d.ts","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,2DAA2D;AAC3D,8BAAsB,QAAQ,CAAC,YAAY,SAAS,CAAC,CAAC,OAAO,EAAE,aAAa,SAAS,CAAC,CAAC,OAAO;IAC5F,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IAC5C,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IAE9C,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IAE9E;;;;OAIG;IACH,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;CACxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.tool.js","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":";;;AAGA,2DAA2D;AAC3D,MAAsB,QAAQ;
|
|
1
|
+
{"version":3,"file":"base.tool.js","sourceRoot":"","sources":["../../../mcp-server/tools/base.tool.ts"],"names":[],"mappings":";;;AAGA,2DAA2D;AAC3D,MAAsB,QAAQ;CAc7B;AAdD,4BAcC"}
|
|
@@ -32,7 +32,7 @@ export declare class SearchDocsTool extends BaseTool<typeof InputSchema, typeof
|
|
|
32
32
|
execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
|
|
33
33
|
getTool(): import("@mastra/core/tools", { with: { "resolution-mode": "import" } }).Tool<{
|
|
34
34
|
query: string;
|
|
35
|
-
limit
|
|
35
|
+
limit: number;
|
|
36
36
|
}, {
|
|
37
37
|
results: {
|
|
38
38
|
id: string;
|
|
@@ -23,7 +23,7 @@ export declare class ListProjectFilesTool extends BaseTool<typeof InputSchema, t
|
|
|
23
23
|
}, z.core.$strip>;
|
|
24
24
|
execute(opts: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>>;
|
|
25
25
|
getTool(): import("@mastra/core/tools", { with: { "resolution-mode": "import" } }).Tool<{
|
|
26
|
-
directoryPath
|
|
26
|
+
directoryPath: string;
|
|
27
27
|
}, {
|
|
28
28
|
directoryPath: string;
|
|
29
29
|
files: string[];
|