libmodulor 0.30.0 → 0.31.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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/dist/esm/apps/Helper/src/lib/layers/project.js +6 -6
- package/dist/esm/i18n/WordingManager.js +12 -4
- package/dist/esm/index.instrumentation-otl.d.ts +1 -0
- package/dist/esm/index.instrumentation-otl.js +1 -0
- package/dist/esm/instrumentation/instrumentation-otl.d.ts +12 -0
- package/dist/esm/instrumentation/instrumentation-otl.js +119 -0
- package/dist/esm/std/CryptoManager.d.ts +1 -1
- package/dist/esm/std/HTTPAPICaller.d.ts +2 -1
- package/dist/esm/std/impl/JoseJWTManager.js +9 -4
- package/dist/esm/std/impl/SimpleHTTPAPICaller.js +13 -7
- package/dist/esm/target/lib/mcp-server/MCPServerRequestChecker.d.ts +22 -0
- package/dist/esm/target/lib/mcp-server/MCPServerRequestChecker.js +71 -0
- package/dist/esm/target/lib/mcp-server/http/express/MCPHTTPExpressProtocolRequestHandlerBuilder.d.ts +3 -1
- package/dist/esm/target/lib/mcp-server/http/express/MCPHTTPExpressProtocolRequestHandlerBuilder.js +16 -4
- package/dist/esm/target/lib/mcp-server/http/hono/MCPHTTPHonoProtocolRequestHandlerBuilder.d.ts +3 -1
- package/dist/esm/target/lib/mcp-server/http/hono/MCPHTTPHonoProtocolRequestHandlerBuilder.js +16 -4
- package/dist/esm/target/lib/react/useAction.js +0 -1
- package/dist/esm/target/lib/react/useUC.js +0 -3
- package/dist/esm/target/lib/server/AuthenticationChecker.js +15 -10
- package/dist/esm/target/lib/server/JWTAuthenticationChecker.d.ts +1 -0
- package/dist/esm/target/lib/server/JWTAuthenticationChecker.js +11 -2
- package/dist/esm/target/react-native-pure/UCFormFieldControl.js +0 -1
- package/dist/esm/testing/impl/NodeAppTesterConfigurator.js +7 -0
- package/dist/esm/testing/impl/newNodeAppTester.js +7 -0
- package/dist/esm/utils/strings/humanize.js +4 -1
- package/package.json +34 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## v0.31.0 (2026-07-08)
|
|
4
|
+
|
|
5
|
+
### 🔭 OpenTelemetry support
|
|
6
|
+
|
|
7
|
+
libmodulor now includes first-class OpenTelemetry instrumentation, making it easier to trace application behavior and integrate with existing observability platforms.
|
|
8
|
+
|
|
9
|
+
### 🔐 Authentication improvements
|
|
10
|
+
|
|
11
|
+
- Added JWT support from `Authorization` headers for target servers.
|
|
12
|
+
- Improved MCP target security with API public key validation.
|
|
13
|
+
|
|
14
|
+
### 🛠 Developer experience
|
|
15
|
+
|
|
16
|
+
- Added Base64 and Base64URL hash encodings.
|
|
17
|
+
- Added helpers for human-readable `snake_case` formatting.
|
|
18
|
+
- Improved network error handling and translation robustness.
|
|
19
|
+
|
|
20
|
+
### 📱 Platform updates
|
|
21
|
+
|
|
22
|
+
- Updated React Native to 0.86 and Expo to 57.0.
|
|
23
|
+
- Refreshed dependencies and documentation.
|
|
24
|
+
|
|
25
|
+
This release improves observability, security, and overall developer experience.
|
|
26
|
+
|
|
27
|
+
See all the changes here : https://github.com/c100k/libmodulor/compare/v0.30.0...master
|
|
28
|
+
|
|
3
29
|
## v0.30.0 (2026-05-25)
|
|
4
30
|
|
|
5
31
|
### ✨ Features
|
package/README.md
CHANGED
|
@@ -87,19 +87,19 @@ export const PACKAGE_JSON = (name) => `{
|
|
|
87
87
|
"reflect-metadata": "^0.2.2"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@biomejs/biome": "^2.
|
|
91
|
-
"@types/node": "^25.
|
|
92
|
-
"@vitest/coverage-v8": "^4.1.
|
|
90
|
+
"@biomejs/biome": "^2.5.2",
|
|
91
|
+
"@types/node": "^25.9.4",
|
|
92
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
93
93
|
"buffer": "^6.0.3",
|
|
94
94
|
"cookie-parser": "^1.4.7",
|
|
95
95
|
"express": "^5.2.1",
|
|
96
96
|
"express-fileupload": "^1.5.2",
|
|
97
97
|
"fast-check": "^4.8.0",
|
|
98
|
-
"helmet": "^8.
|
|
98
|
+
"helmet": "^8.2.0",
|
|
99
99
|
"jose": "^6.2.3",
|
|
100
100
|
"typescript": "^6.0.3",
|
|
101
|
-
"vite": "^8.
|
|
102
|
-
"vitest": "^4.1.
|
|
101
|
+
"vite": "^8.1.3",
|
|
102
|
+
"vitest": "^4.1.10"
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
`;
|
|
@@ -50,10 +50,16 @@ let WordingManager = class WordingManager {
|
|
|
50
50
|
}
|
|
51
51
|
const parts = [];
|
|
52
52
|
for (const [k, v] of Object.entries(constraints)) {
|
|
53
|
-
parts.push(
|
|
54
53
|
// TODO : Consider moving up the type hierarchy to fetch the constr of the parent when missing
|
|
55
54
|
// e.g. TFreeTextShort > TString
|
|
56
|
-
this.
|
|
55
|
+
const val = this.tOrNull(`dt_${type.tName()}_constr_${k}`, v);
|
|
56
|
+
if (!val) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
parts.push(val);
|
|
60
|
+
}
|
|
61
|
+
if (parts.length === 0) {
|
|
62
|
+
return null;
|
|
57
63
|
}
|
|
58
64
|
return parts;
|
|
59
65
|
}
|
|
@@ -118,8 +124,10 @@ let WordingManager = class WordingManager {
|
|
|
118
124
|
}
|
|
119
125
|
return val;
|
|
120
126
|
}
|
|
121
|
-
tOrNull(key) {
|
|
122
|
-
return this.i18nManager.tOrNull(key
|
|
127
|
+
tOrNull(key, expected = undefined) {
|
|
128
|
+
return this.i18nManager.tOrNull(key, {
|
|
129
|
+
vars: expected ? { expected } : {},
|
|
130
|
+
});
|
|
123
131
|
}
|
|
124
132
|
};
|
|
125
133
|
WordingManager = __decorate([
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InstrumentationOTL, type InstrumentationOTLConfig, } from './instrumentation/instrumentation-otl.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InstrumentationOTL, } from './instrumentation/instrumentation-otl.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type InstrumentationConfig as BaseInstrumentationConfig, InstrumentationBase, type InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
|
|
2
|
+
export type InstrumentationOTLConfig = BaseInstrumentationConfig & {
|
|
3
|
+
libPath?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare class InstrumentationOTL extends InstrumentationBase<InstrumentationOTLConfig> {
|
|
6
|
+
constructor(config: InstrumentationOTLConfig);
|
|
7
|
+
protected init(): InstrumentationModuleDefinition | InstrumentationModuleDefinition[] | undefined;
|
|
8
|
+
private moduleName;
|
|
9
|
+
private patchMethod;
|
|
10
|
+
private unwrapAll;
|
|
11
|
+
private wrapAll;
|
|
12
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { context, SpanStatusCode, trace } from '@opentelemetry/api';
|
|
2
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition, } from '@opentelemetry/instrumentation';
|
|
3
|
+
const LIB_NAME = 'libmodulor';
|
|
4
|
+
const LIB_VERSION = '';
|
|
5
|
+
const LIB_MIN_VERSION = '*';
|
|
6
|
+
const NAME = `instrumentation-${LIB_NAME}`;
|
|
7
|
+
const TRACABLES = {
|
|
8
|
+
[LIB_NAME]: {
|
|
9
|
+
SimpleUCManager: [
|
|
10
|
+
'commitTx',
|
|
11
|
+
'confirmClient',
|
|
12
|
+
'execClient',
|
|
13
|
+
'execServer',
|
|
14
|
+
'initServer',
|
|
15
|
+
'persist',
|
|
16
|
+
'persistProjection',
|
|
17
|
+
'rollbackTx',
|
|
18
|
+
],
|
|
19
|
+
UCExecChecker: ['exec'],
|
|
20
|
+
UCInputFilesProcessor: ['exec'],
|
|
21
|
+
UCInputValidator: ['exec'],
|
|
22
|
+
UCOutputFilesProcessor: ['exec'],
|
|
23
|
+
},
|
|
24
|
+
[`${LIB_NAME}/uc-data-store-knex`]: {
|
|
25
|
+
KnexUCDataStore: [
|
|
26
|
+
'clear',
|
|
27
|
+
'destroy',
|
|
28
|
+
'exists',
|
|
29
|
+
'init',
|
|
30
|
+
'initSync',
|
|
31
|
+
'read',
|
|
32
|
+
'readProjection',
|
|
33
|
+
'startTx',
|
|
34
|
+
'supportedSpecificBindings',
|
|
35
|
+
'testKey',
|
|
36
|
+
'write',
|
|
37
|
+
'writeBulk',
|
|
38
|
+
'writeProjection',
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export class InstrumentationOTL extends InstrumentationBase {
|
|
43
|
+
constructor(config) {
|
|
44
|
+
super(NAME, LIB_VERSION, config);
|
|
45
|
+
}
|
|
46
|
+
init() {
|
|
47
|
+
const namespaces = Object.keys(TRACABLES);
|
|
48
|
+
const defs = namespaces.map((namespace) => new InstrumentationNodeModuleDefinition(this.moduleName(namespace, this._config.libPath), [LIB_MIN_VERSION], (moduleExports) => this.wrapAll(moduleExports, namespace), (moduleExports) => this.unwrapAll(moduleExports, namespace)));
|
|
49
|
+
return defs;
|
|
50
|
+
}
|
|
51
|
+
moduleName(namespace, libPath) {
|
|
52
|
+
if (!libPath) {
|
|
53
|
+
return namespace; // e.g. libmodulor, libmodulor/uc-data-store-knex
|
|
54
|
+
}
|
|
55
|
+
if (!namespace.includes('/')) {
|
|
56
|
+
return libPath; // ../../../index.js
|
|
57
|
+
}
|
|
58
|
+
const moduleName = namespace.split('/')[1];
|
|
59
|
+
return libPath.replace('.js', `.${moduleName}.js`); // e.g. ../../../index.uc-data-store-knex.js
|
|
60
|
+
}
|
|
61
|
+
patchMethod(namespace, className, methodName) {
|
|
62
|
+
return (original) => {
|
|
63
|
+
const tracer = this.tracer;
|
|
64
|
+
const spanName = `${className}.${methodName}`;
|
|
65
|
+
// biome-ignore lint/suspicious/noExplicitAny: can be anything
|
|
66
|
+
return function patched(...args) {
|
|
67
|
+
const span = tracer.startSpan(spanName, {
|
|
68
|
+
attributes: {
|
|
69
|
+
'scope.name': namespace,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
const ctx = trace.setSpan(context.active(), span);
|
|
73
|
+
return context.with(ctx, async () => {
|
|
74
|
+
try {
|
|
75
|
+
const res = await original.apply(this, args);
|
|
76
|
+
span.setStatus({
|
|
77
|
+
code: SpanStatusCode.OK,
|
|
78
|
+
});
|
|
79
|
+
return res;
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
span.recordException(err);
|
|
83
|
+
span.setStatus({
|
|
84
|
+
code: SpanStatusCode.ERROR,
|
|
85
|
+
message: err.message,
|
|
86
|
+
});
|
|
87
|
+
throw err;
|
|
88
|
+
}
|
|
89
|
+
finally {
|
|
90
|
+
span.end();
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
unwrapAll(moduleExports, namespace) {
|
|
97
|
+
// biome-ignore lint/style/noNonNullAssertion: we want it
|
|
98
|
+
const entries = Object.entries(TRACABLES[namespace]);
|
|
99
|
+
for (const [className, methodNames] of entries) {
|
|
100
|
+
for (const methodName of methodNames) {
|
|
101
|
+
// biome-ignore lint/style/noNonNullAssertion: we want it
|
|
102
|
+
this._unwrap(moduleExports[className].prototype, methodName);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return moduleExports;
|
|
106
|
+
}
|
|
107
|
+
wrapAll(moduleExports, namespace) {
|
|
108
|
+
// biome-ignore lint/style/noNonNullAssertion: we want it
|
|
109
|
+
const entries = Object.entries(TRACABLES[namespace]);
|
|
110
|
+
for (const [className, methodNames] of entries) {
|
|
111
|
+
for (const methodName of methodNames) {
|
|
112
|
+
this._wrap(
|
|
113
|
+
// biome-ignore lint/style/noNonNullAssertion: we want it
|
|
114
|
+
moduleExports[className].prototype, methodName, this.patchMethod(namespace, className, methodName).bind(this));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return moduleExports;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Password, UIntQuantity, UUID } from '../dt/index.js';
|
|
2
2
|
import type { Clearable } from '../utils/index.js';
|
|
3
3
|
import type { BufferManagerBase64String } from './BufferManager.js';
|
|
4
|
-
export type CryptoManagerBinaryToTextEncoding = 'hex';
|
|
4
|
+
export type CryptoManagerBinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
|
|
5
5
|
export type CryptoManagerHash = string;
|
|
6
6
|
export type CryptoManagerHashAlgorithm = 'sha1' | 'sha256' | 'sha512';
|
|
7
7
|
export type CryptoManagerHMACKey = string;
|
|
@@ -12,8 +12,9 @@ export interface HTTPAPICallerHeaders {
|
|
|
12
12
|
'Content-Type'?: HTTPContentType;
|
|
13
13
|
Cookie?: string;
|
|
14
14
|
}
|
|
15
|
+
export type HTTPAPICallerAuthorizationHeaderPrefix = 'AWS4-HMAC-SHA256' | 'Basic' | 'Bearer' | 'JWT' | 'OAuth';
|
|
15
16
|
export interface HTTPAPICallerAuthorizationHeader {
|
|
16
|
-
prefix?:
|
|
17
|
+
prefix?: HTTPAPICallerAuthorizationHeaderPrefix;
|
|
17
18
|
value: ApiKey | JWT | Password;
|
|
18
19
|
}
|
|
19
20
|
export interface HTTPAPICallerBasicAuth {
|
|
@@ -34,10 +34,10 @@ let JoseJWTManager = class JoseJWTManager {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
async decode(value, opts) {
|
|
37
|
-
const { alg } = decodeProtectedHeader(value);
|
|
38
|
-
assertIsDefined(alg, 'alg');
|
|
39
|
-
const secret = opts?.secret || this.s().jwt_manager_secret;
|
|
40
37
|
try {
|
|
38
|
+
const { alg } = decodeProtectedHeader(value);
|
|
39
|
+
assertIsDefined(alg, 'alg');
|
|
40
|
+
const secret = opts?.secret || this.s().jwt_manager_secret;
|
|
41
41
|
if (alg.startsWith('HS')) {
|
|
42
42
|
return (await jwtVerify(value, new TextEncoder().encode(secret))).payload;
|
|
43
43
|
}
|
|
@@ -51,8 +51,13 @@ let JoseJWTManager = class JoseJWTManager {
|
|
|
51
51
|
if (err instanceof JWSSignatureVerificationFailed) {
|
|
52
52
|
throw new UnauthorizedError();
|
|
53
53
|
}
|
|
54
|
+
// See node_modules/jose/dist/webapi/util/decode_protected_header.js
|
|
55
|
+
if (err instanceof TypeError &&
|
|
56
|
+
err.message.toLowerCase().includes('invalid token')) {
|
|
57
|
+
throw new UnauthorizedError();
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
|
-
throw new
|
|
60
|
+
throw new UnauthorizedError();
|
|
56
61
|
}
|
|
57
62
|
async decodeUnsafe(value) {
|
|
58
63
|
const decoded = decodeJwt(value);
|
|
@@ -55,13 +55,19 @@ let SimpleHTTPAPICaller = class SimpleHTTPAPICaller {
|
|
|
55
55
|
registerAbort?.(() => {
|
|
56
56
|
abortController.abort();
|
|
57
57
|
});
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
let response;
|
|
59
|
+
try {
|
|
60
|
+
response = await this.httpAPICallExecutor.fn()(url, {
|
|
61
|
+
agent,
|
|
62
|
+
body,
|
|
63
|
+
headers: reqHeaders,
|
|
64
|
+
method,
|
|
65
|
+
signal: abortController.signal,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
throw new Error('err_unreachable', { cause: err });
|
|
70
|
+
}
|
|
65
71
|
const { headers, status } = response;
|
|
66
72
|
this.logger.trace('HTTPAPICaller', {
|
|
67
73
|
body,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HTTPStatusNumber } from '../../../dt/index.js';
|
|
2
|
+
import type { Configurable, SettingsManager, Worker } from '../../../std/index.js';
|
|
3
|
+
import { JWTAuthenticationChecker } from '../server/JWTAuthenticationChecker.js';
|
|
4
|
+
import { PublicApiKeyChecker } from '../server/PublicApiKeyChecker.js';
|
|
5
|
+
import type { ServerManagerSettings } from '../server/ServerManager.js';
|
|
6
|
+
import type { ServerRequestHandlerReq } from '../server/ServerRequestHandler.js';
|
|
7
|
+
interface Input {
|
|
8
|
+
req: ServerRequestHandlerReq;
|
|
9
|
+
}
|
|
10
|
+
interface Output {
|
|
11
|
+
status: Extract<HTTPStatusNumber, 401> | null;
|
|
12
|
+
}
|
|
13
|
+
type S = Pick<ServerManagerSettings, 'server_mcp_dangerously_skip_auth_check' | 'server_mcp_dangerously_skip_pub_api_key_check' | 'server_public_api_key_header_name'>;
|
|
14
|
+
export declare class MCPServerRequestChecker implements Configurable<S>, Worker<Input, Promise<Output>> {
|
|
15
|
+
private jwtAuthenticationChecker;
|
|
16
|
+
private publicApiKeyChecker;
|
|
17
|
+
private settingsManager;
|
|
18
|
+
constructor(jwtAuthenticationChecker: JWTAuthenticationChecker, publicApiKeyChecker: PublicApiKeyChecker, settingsManager: SettingsManager<S>);
|
|
19
|
+
s(): S;
|
|
20
|
+
exec({ req }: Input): Promise<Output>;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from 'inversify';
|
|
14
|
+
import { logDevWarning } from '../../../error/index.js';
|
|
15
|
+
import { JWTAuthenticationChecker } from '../server/JWTAuthenticationChecker.js';
|
|
16
|
+
import { PublicApiKeyChecker } from '../server/PublicApiKeyChecker.js';
|
|
17
|
+
let MCPServerRequestChecker = class MCPServerRequestChecker {
|
|
18
|
+
jwtAuthenticationChecker;
|
|
19
|
+
publicApiKeyChecker;
|
|
20
|
+
settingsManager;
|
|
21
|
+
constructor(jwtAuthenticationChecker, publicApiKeyChecker, settingsManager) {
|
|
22
|
+
this.jwtAuthenticationChecker = jwtAuthenticationChecker;
|
|
23
|
+
this.publicApiKeyChecker = publicApiKeyChecker;
|
|
24
|
+
this.settingsManager = settingsManager;
|
|
25
|
+
}
|
|
26
|
+
s() {
|
|
27
|
+
return {
|
|
28
|
+
server_mcp_dangerously_skip_auth_check: this.settingsManager.get()('server_mcp_dangerously_skip_auth_check'),
|
|
29
|
+
server_mcp_dangerously_skip_pub_api_key_check: this.settingsManager.get()('server_mcp_dangerously_skip_pub_api_key_check'),
|
|
30
|
+
server_public_api_key_header_name: this.settingsManager.get()('server_public_api_key_header_name'),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
async exec({ req }) {
|
|
34
|
+
const { header } = req;
|
|
35
|
+
if (this.s().server_mcp_dangerously_skip_pub_api_key_check) {
|
|
36
|
+
logDevWarning('Skipping pub api key check');
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
await this.publicApiKeyChecker.exec({
|
|
40
|
+
checkType: 'on',
|
|
41
|
+
value: await header(this.s().server_public_api_key_header_name),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (this.s().server_mcp_dangerously_skip_auth_check) {
|
|
45
|
+
logDevWarning('Skipping auth check');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
const authorizationHeader = await header('Authorization');
|
|
49
|
+
const auth = await this.jwtAuthenticationChecker.exec({
|
|
50
|
+
rawValue: authorizationHeader,
|
|
51
|
+
});
|
|
52
|
+
if (!auth) {
|
|
53
|
+
return {
|
|
54
|
+
status: 401,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
status: null,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
MCPServerRequestChecker = __decorate([
|
|
64
|
+
injectable(),
|
|
65
|
+
__param(0, inject(JWTAuthenticationChecker)),
|
|
66
|
+
__param(1, inject(PublicApiKeyChecker)),
|
|
67
|
+
__param(2, inject('SettingsManager')),
|
|
68
|
+
__metadata("design:paramtypes", [JWTAuthenticationChecker,
|
|
69
|
+
PublicApiKeyChecker, Object])
|
|
70
|
+
], MCPServerRequestChecker);
|
|
71
|
+
export { MCPServerRequestChecker };
|
package/dist/esm/target/lib/mcp-server/http/express/MCPHTTPExpressProtocolRequestHandlerBuilder.d.ts
CHANGED
|
@@ -2,14 +2,16 @@ import type { RequestHandler } from 'express';
|
|
|
2
2
|
import { WordingManager } from '../../../../../i18n/index.js';
|
|
3
3
|
import type { ProductManifest } from '../../../../../product/index.js';
|
|
4
4
|
import type { Logger } from '../../../../../std/index.js';
|
|
5
|
+
import { MCPServerRequestChecker } from '../../MCPServerRequestChecker.js';
|
|
5
6
|
import { MCPServerRequestHandler } from '../../MCPServerRequestHandler.js';
|
|
6
7
|
import type { MCPHTTPRequestHandlerBuilderInput } from '../MCPHTTPRequestHandlerBuilder.js';
|
|
7
8
|
import type { MCPHTTPExpressRequestHandlerBuilder } from './types.js';
|
|
8
9
|
export declare class MCPHTTPExpressProtocolRequestHandlerBuilder implements MCPHTTPExpressRequestHandlerBuilder {
|
|
9
10
|
private logger;
|
|
10
11
|
private productManifest;
|
|
12
|
+
private serverRequestChecker;
|
|
11
13
|
private serverRequestHandler;
|
|
12
14
|
private wordingManager;
|
|
13
|
-
constructor(logger: Logger, productManifest: ProductManifest, serverRequestHandler: MCPServerRequestHandler, wordingManager: WordingManager);
|
|
15
|
+
constructor(logger: Logger, productManifest: ProductManifest, serverRequestChecker: MCPServerRequestChecker, serverRequestHandler: MCPServerRequestHandler, wordingManager: WordingManager);
|
|
14
16
|
exec({ ucs, ucManager, }: MCPHTTPRequestHandlerBuilderInput): RequestHandler;
|
|
15
17
|
}
|
package/dist/esm/target/lib/mcp-server/http/express/MCPHTTPExpressProtocolRequestHandlerBuilder.js
CHANGED
|
@@ -16,21 +16,31 @@ import { WordingManager } from '../../../../../i18n/index.js';
|
|
|
16
16
|
import { ucMountingPoint, } from '../../../../../uc/index.js';
|
|
17
17
|
import { toReq, toRes } from '../../../server-express/funcs.js';
|
|
18
18
|
import { init, toolConfig } from '../../funcs.js';
|
|
19
|
+
import { MCPServerRequestChecker } from '../../MCPServerRequestChecker.js';
|
|
19
20
|
import { MCPServerRequestHandler } from '../../MCPServerRequestHandler.js';
|
|
20
21
|
import { ucStreamExecOpts } from '../funcs.js';
|
|
21
22
|
let MCPHTTPExpressProtocolRequestHandlerBuilder = class MCPHTTPExpressProtocolRequestHandlerBuilder {
|
|
22
23
|
logger;
|
|
23
24
|
productManifest;
|
|
25
|
+
serverRequestChecker;
|
|
24
26
|
serverRequestHandler;
|
|
25
27
|
wordingManager;
|
|
26
|
-
constructor(logger, productManifest, serverRequestHandler, wordingManager) {
|
|
28
|
+
constructor(logger, productManifest, serverRequestChecker, serverRequestHandler, wordingManager) {
|
|
27
29
|
this.logger = logger;
|
|
28
30
|
this.productManifest = productManifest;
|
|
31
|
+
this.serverRequestChecker = serverRequestChecker;
|
|
29
32
|
this.serverRequestHandler = serverRequestHandler;
|
|
30
33
|
this.wordingManager = wordingManager;
|
|
31
34
|
}
|
|
32
35
|
exec({ ucs, ucManager, }) {
|
|
33
36
|
return async (req, res) => {
|
|
37
|
+
const { status } = await this.serverRequestChecker.exec({
|
|
38
|
+
req: toReq(req),
|
|
39
|
+
});
|
|
40
|
+
if (status) {
|
|
41
|
+
res.status(status).json({});
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
34
44
|
const server = init(this.productManifest);
|
|
35
45
|
const transport = new StreamableHTTPServerTransport();
|
|
36
46
|
// In Streamable HTTP, there is usually one request => one transport => one server.
|
|
@@ -80,9 +90,11 @@ MCPHTTPExpressProtocolRequestHandlerBuilder = __decorate([
|
|
|
80
90
|
injectable(),
|
|
81
91
|
__param(0, inject('Logger')),
|
|
82
92
|
__param(1, inject('ProductManifest')),
|
|
83
|
-
__param(2, inject(
|
|
84
|
-
__param(3, inject(
|
|
85
|
-
|
|
93
|
+
__param(2, inject(MCPServerRequestChecker)),
|
|
94
|
+
__param(3, inject(MCPServerRequestHandler)),
|
|
95
|
+
__param(4, inject(WordingManager)),
|
|
96
|
+
__metadata("design:paramtypes", [Object, Object, MCPServerRequestChecker,
|
|
97
|
+
MCPServerRequestHandler,
|
|
86
98
|
WordingManager])
|
|
87
99
|
], MCPHTTPExpressProtocolRequestHandlerBuilder);
|
|
88
100
|
export { MCPHTTPExpressProtocolRequestHandlerBuilder };
|
package/dist/esm/target/lib/mcp-server/http/hono/MCPHTTPHonoProtocolRequestHandlerBuilder.d.ts
CHANGED
|
@@ -2,14 +2,16 @@ import type { MiddlewareHandler } from 'hono';
|
|
|
2
2
|
import { WordingManager } from '../../../../../i18n/index.js';
|
|
3
3
|
import type { ProductManifest } from '../../../../../product/index.js';
|
|
4
4
|
import type { Logger } from '../../../../../std/index.js';
|
|
5
|
+
import { MCPServerRequestChecker } from '../../MCPServerRequestChecker.js';
|
|
5
6
|
import { MCPServerRequestHandler } from '../../MCPServerRequestHandler.js';
|
|
6
7
|
import type { MCPHTTPRequestHandlerBuilderInput } from '../MCPHTTPRequestHandlerBuilder.js';
|
|
7
8
|
import type { MCPHTTPHonoRequestHandlerBuilder } from './types.js';
|
|
8
9
|
export declare class MCPHTTPHonoProtocolRequestHandlerBuilder implements MCPHTTPHonoRequestHandlerBuilder {
|
|
9
10
|
private logger;
|
|
10
11
|
private productManifest;
|
|
12
|
+
private serverRequestChecker;
|
|
11
13
|
private serverRequestHandler;
|
|
12
14
|
private wordingManager;
|
|
13
|
-
constructor(logger: Logger, productManifest: ProductManifest, serverRequestHandler: MCPServerRequestHandler, wordingManager: WordingManager);
|
|
15
|
+
constructor(logger: Logger, productManifest: ProductManifest, serverRequestChecker: MCPServerRequestChecker, serverRequestHandler: MCPServerRequestHandler, wordingManager: WordingManager);
|
|
14
16
|
exec({ ucs, ucManager, }: MCPHTTPRequestHandlerBuilderInput): MiddlewareHandler;
|
|
15
17
|
}
|
package/dist/esm/target/lib/mcp-server/http/hono/MCPHTTPHonoProtocolRequestHandlerBuilder.js
CHANGED
|
@@ -16,21 +16,31 @@ import { WordingManager } from '../../../../../i18n/index.js';
|
|
|
16
16
|
import { ucMountingPoint, } from '../../../../../uc/index.js';
|
|
17
17
|
import { toReq, toRes } from '../../../server-hono/funcs.js';
|
|
18
18
|
import { init, toolConfig } from '../../funcs.js';
|
|
19
|
+
import { MCPServerRequestChecker } from '../../MCPServerRequestChecker.js';
|
|
19
20
|
import { MCPServerRequestHandler } from '../../MCPServerRequestHandler.js';
|
|
20
21
|
import { ucStreamExecOpts } from '../funcs.js';
|
|
21
22
|
let MCPHTTPHonoProtocolRequestHandlerBuilder = class MCPHTTPHonoProtocolRequestHandlerBuilder {
|
|
22
23
|
logger;
|
|
23
24
|
productManifest;
|
|
25
|
+
serverRequestChecker;
|
|
24
26
|
serverRequestHandler;
|
|
25
27
|
wordingManager;
|
|
26
|
-
constructor(logger, productManifest, serverRequestHandler, wordingManager) {
|
|
28
|
+
constructor(logger, productManifest, serverRequestChecker, serverRequestHandler, wordingManager) {
|
|
27
29
|
this.logger = logger;
|
|
28
30
|
this.productManifest = productManifest;
|
|
31
|
+
this.serverRequestChecker = serverRequestChecker;
|
|
29
32
|
this.serverRequestHandler = serverRequestHandler;
|
|
30
33
|
this.wordingManager = wordingManager;
|
|
31
34
|
}
|
|
32
35
|
exec({ ucs, ucManager, }) {
|
|
33
36
|
return async (c) => {
|
|
37
|
+
const { status } = await this.serverRequestChecker.exec({
|
|
38
|
+
req: toReq(c),
|
|
39
|
+
});
|
|
40
|
+
if (status) {
|
|
41
|
+
c.status(status);
|
|
42
|
+
return c.json({});
|
|
43
|
+
}
|
|
34
44
|
const server = init(this.productManifest);
|
|
35
45
|
const transport = new WebStandardStreamableHTTPServerTransport();
|
|
36
46
|
// In Streamable HTTP, there is usually one request => one transport => one server.
|
|
@@ -80,9 +90,11 @@ MCPHTTPHonoProtocolRequestHandlerBuilder = __decorate([
|
|
|
80
90
|
injectable(),
|
|
81
91
|
__param(0, inject('Logger')),
|
|
82
92
|
__param(1, inject('ProductManifest')),
|
|
83
|
-
__param(2, inject(
|
|
84
|
-
__param(3, inject(
|
|
85
|
-
|
|
93
|
+
__param(2, inject(MCPServerRequestChecker)),
|
|
94
|
+
__param(3, inject(MCPServerRequestHandler)),
|
|
95
|
+
__param(4, inject(WordingManager)),
|
|
96
|
+
__metadata("design:paramtypes", [Object, Object, MCPServerRequestChecker,
|
|
97
|
+
MCPServerRequestHandler,
|
|
86
98
|
WordingManager])
|
|
87
99
|
], MCPHTTPHonoProtocolRequestHandlerBuilder);
|
|
88
100
|
export { MCPHTTPHonoProtocolRequestHandlerBuilder };
|
|
@@ -5,7 +5,6 @@ export function useAction({ action, autoExec = false, confirm, onError, onInit,
|
|
|
5
5
|
const [errMsg, setErrMsg] = useState(null);
|
|
6
6
|
const [execRes, setExecRes] = useState(null);
|
|
7
7
|
const [execState, setExecState] = useState(onInit ? UCExecState.INITIALIZING : UCExecState.IDLE);
|
|
8
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies : must run only once
|
|
9
8
|
useEffect(() => {
|
|
10
9
|
(async () => {
|
|
11
10
|
if (execState === UCExecState.INITIALIZING) {
|
|
@@ -21,9 +21,6 @@ export function useUC(appManifest, def, auth, opts) {
|
|
|
21
21
|
}
|
|
22
22
|
return v;
|
|
23
23
|
});
|
|
24
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies(appManifest): avoid infinite re-rendering
|
|
25
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies(def): avoid infinite re-rendering
|
|
26
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies(opts?.fillWith): avoid infinite re-rendering
|
|
27
24
|
useEffect(() => {
|
|
28
25
|
const v = new UC(appManifest, def, auth);
|
|
29
26
|
if (opts?.fillWith) {
|
|
@@ -30,19 +30,20 @@ let AuthenticationChecker = class AuthenticationChecker {
|
|
|
30
30
|
this.ucPolicyFactory = ucPolicyFactory;
|
|
31
31
|
}
|
|
32
32
|
async exec({ authCookie, authorizationHeader, uc, }) {
|
|
33
|
+
const { lifecycle: { server }, sec, } = uc.def;
|
|
34
|
+
const authType = sec?.authType ?? DEFAULT_UC_SEC_AT;
|
|
33
35
|
this.logger.trace('Checking auth', {
|
|
34
36
|
authCookie,
|
|
35
37
|
authorizationHeader,
|
|
38
|
+
authType,
|
|
36
39
|
});
|
|
37
40
|
const output = {
|
|
38
41
|
allowed: false, // By default it's not allowed
|
|
39
42
|
auth: null,
|
|
40
43
|
};
|
|
41
|
-
const { lifecycle: { server }, sec, } = uc.def;
|
|
42
44
|
if (typeof server !== 'object') {
|
|
43
45
|
return output;
|
|
44
46
|
}
|
|
45
|
-
const authType = sec?.authType ?? DEFAULT_UC_SEC_AT;
|
|
46
47
|
const policy = (await this.ucPolicyFactory(server.policy));
|
|
47
48
|
const canBeExecutedPreAuth = await policy.canBeExecutedPreAuth();
|
|
48
49
|
if (canBeExecutedPreAuth) {
|
|
@@ -53,29 +54,33 @@ let AuthenticationChecker = class AuthenticationChecker {
|
|
|
53
54
|
}
|
|
54
55
|
else {
|
|
55
56
|
// Follows the OpenAPI spec : https://swagger.io/docs/specification/authentication
|
|
57
|
+
const fromAuthHeader = authorizationHeader && !Array.isArray(authorizationHeader)
|
|
58
|
+
? authorizationHeader
|
|
59
|
+
: undefined;
|
|
60
|
+
const fromCookie = authCookie && !Array.isArray(authCookie)
|
|
61
|
+
? authCookie
|
|
62
|
+
: undefined;
|
|
56
63
|
switch (authType) {
|
|
57
64
|
case 'apiKey':
|
|
58
|
-
if (
|
|
59
|
-
!Array.isArray(authorizationHeader)) {
|
|
65
|
+
if (fromAuthHeader) {
|
|
60
66
|
output.auth =
|
|
61
67
|
await this.privateApiKeyAuthenticationChecker.exec({
|
|
62
|
-
rawValue:
|
|
68
|
+
rawValue: fromAuthHeader,
|
|
63
69
|
});
|
|
64
70
|
}
|
|
65
71
|
break;
|
|
66
72
|
case 'basic':
|
|
67
|
-
if (
|
|
68
|
-
!Array.isArray(authorizationHeader)) {
|
|
73
|
+
if (fromAuthHeader) {
|
|
69
74
|
output.auth =
|
|
70
75
|
await this.basicAuthenticationChecker.exec({
|
|
71
|
-
rawValue:
|
|
76
|
+
rawValue: fromAuthHeader,
|
|
72
77
|
});
|
|
73
78
|
}
|
|
74
79
|
break;
|
|
75
80
|
case 'jwt':
|
|
76
|
-
if (
|
|
81
|
+
if (fromCookie || fromAuthHeader) {
|
|
77
82
|
output.auth = await this.jwtAuthenticationChecker.exec({
|
|
78
|
-
rawValue:
|
|
83
|
+
rawValue: fromCookie ?? fromAuthHeader,
|
|
79
84
|
});
|
|
80
85
|
}
|
|
81
86
|
break;
|
|
@@ -9,6 +9,7 @@ export declare class JWTAuthenticationChecker implements Configurable<S>, Worker
|
|
|
9
9
|
private jwtManager;
|
|
10
10
|
private logger;
|
|
11
11
|
private settingsManager;
|
|
12
|
+
private static PREFIXES;
|
|
12
13
|
constructor(jwtManager: JWTManager, logger: Logger, settingsManager: SettingsManager<S>);
|
|
13
14
|
s(): S;
|
|
14
15
|
exec({ rawValue }: Input): Promise<Output | null>;
|
|
@@ -10,12 +10,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
11
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
12
|
};
|
|
13
|
+
var JWTAuthenticationChecker_1;
|
|
13
14
|
import { inject, injectable } from 'inversify';
|
|
14
15
|
import { UnauthorizedError } from '../../../error/index.js';
|
|
15
16
|
let JWTAuthenticationChecker = class JWTAuthenticationChecker {
|
|
17
|
+
static { JWTAuthenticationChecker_1 = this; }
|
|
16
18
|
jwtManager;
|
|
17
19
|
logger;
|
|
18
20
|
settingsManager;
|
|
21
|
+
static PREFIXES = [
|
|
22
|
+
'Bearer',
|
|
23
|
+
'JWT',
|
|
24
|
+
];
|
|
19
25
|
constructor(jwtManager, logger, settingsManager) {
|
|
20
26
|
this.jwtManager = jwtManager;
|
|
21
27
|
this.logger = logger;
|
|
@@ -27,7 +33,10 @@ let JWTAuthenticationChecker = class JWTAuthenticationChecker {
|
|
|
27
33
|
};
|
|
28
34
|
}
|
|
29
35
|
async exec({ rawValue }) {
|
|
30
|
-
|
|
36
|
+
let value = rawValue;
|
|
37
|
+
for (const p of JWTAuthenticationChecker_1.PREFIXES) {
|
|
38
|
+
value = value?.replaceAll(`${p} `, '');
|
|
39
|
+
}
|
|
31
40
|
if (!value) {
|
|
32
41
|
return null;
|
|
33
42
|
}
|
|
@@ -68,7 +77,7 @@ let JWTAuthenticationChecker = class JWTAuthenticationChecker {
|
|
|
68
77
|
return false;
|
|
69
78
|
}
|
|
70
79
|
};
|
|
71
|
-
JWTAuthenticationChecker = __decorate([
|
|
80
|
+
JWTAuthenticationChecker = JWTAuthenticationChecker_1 = __decorate([
|
|
72
81
|
injectable(),
|
|
73
82
|
__param(0, inject('JWTManager')),
|
|
74
83
|
__param(1, inject('Logger')),
|
|
@@ -11,7 +11,6 @@ const MULTIPLE_VALUES_SEPARATOR = ',';
|
|
|
11
11
|
export function UCFormFieldControl({ disabled, errMsg = null, execState, f, onChange: onChangeBase, }) {
|
|
12
12
|
const { colors, formFieldControl, renderFormFieldControl } = useStyleContext();
|
|
13
13
|
const [internalValue, setInternalValue] = useState(f.getValue());
|
|
14
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: It is actually necessary because only `f` or `f.getValue` does not trigger the effect
|
|
15
14
|
useEffect(() => {
|
|
16
15
|
setInternalValue(f.getValue());
|
|
17
16
|
}, [f.getValue()]);
|
|
@@ -4,6 +4,7 @@ import { FakeFSManager } from '../../std/impl/FakeFSManager.js';
|
|
|
4
4
|
import { FakeHTTPAPICallExecutor } from '../../std/impl/FakeHTTPAPICallExecutor.js';
|
|
5
5
|
import { NodeDeterministicCryptoManager } from '../../std/impl/NodeDeterministicCryptoManager.js';
|
|
6
6
|
import { SimpleFormDataBuilder } from '../../std/impl/SimpleFormDataBuilder.js';
|
|
7
|
+
import { StaticSettingsManager } from '../../std/impl/StaticSettingsManager.js';
|
|
7
8
|
import { bindCommon } from '../../utils/ioc/bindCommon.js';
|
|
8
9
|
import { bindNodeCore } from '../../utils/ioc/bindNodeCore.js';
|
|
9
10
|
import { bindServer } from '../../utils/ioc/bindServer.js';
|
|
@@ -16,6 +17,12 @@ export class NodeAppTesterConfigurator {
|
|
|
16
17
|
bindCommon(container);
|
|
17
18
|
bindNodeCore(container);
|
|
18
19
|
bindServer(container);
|
|
20
|
+
// bindCommon binds it to StaticSettingsManager.
|
|
21
|
+
// But bindNodeCore binds it to EnvSettingsManager.
|
|
22
|
+
// Tests must be env-agnostic and run with static settings.
|
|
23
|
+
(await container.rebind('SettingsManager'))
|
|
24
|
+
.to(StaticSettingsManager)
|
|
25
|
+
.inSingletonScope();
|
|
19
26
|
(await container.rebind('ProductManifest')).toConstantValue({
|
|
20
27
|
appReg: [{ name: ctx.appManifest.name }],
|
|
21
28
|
name: PRODUCT_NAME_PLACEHOLDER,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Container } from 'inversify';
|
|
2
2
|
import { TApiKey, TPassword, TUsername, } from '../../dt/index.js';
|
|
3
|
+
import { StaticSettingsManager } from '../../std/impl/StaticSettingsManager.js';
|
|
3
4
|
import { STD_DEFAULT_JWT_MANAGER_SETTINGS, } from '../../std/index.js';
|
|
4
5
|
import { MCPHTTPExpressFakeRequestHandlerBuilder } from '../../target/lib/mcp-server/http/express/MCPHTTPExpressFakeRequestHandlerBuilder.js';
|
|
5
6
|
import { TARGET_DEFAULT_SERVER_MANAGER_SETTINGS } from '../../target/lib/server/consts.js';
|
|
@@ -34,6 +35,12 @@ export async function newNodeAppTester(serverPortRangeStart, idx, args) {
|
|
|
34
35
|
updateSettings(container, settings);
|
|
35
36
|
bindNodeCore(container);
|
|
36
37
|
bindServer(container);
|
|
38
|
+
// bindCommon binds it to StaticSettingsManager.
|
|
39
|
+
// But bindNodeCore binds it to EnvSettingsManager.
|
|
40
|
+
// Tests must be env-agnostic and run with static settings.
|
|
41
|
+
(await container.rebind('SettingsManager'))
|
|
42
|
+
.to(StaticSettingsManager)
|
|
43
|
+
.inSingletonScope();
|
|
37
44
|
container.bind('AppDocsEmitter').to(SimpleAppDocsEmitter);
|
|
38
45
|
container
|
|
39
46
|
.bind('ServerManager')
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export function humanize(value) {
|
|
2
|
-
let res = value
|
|
2
|
+
let res = value
|
|
3
|
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
4
|
+
.replace(/([a-z])_([a-z])/g, '$1 $2')
|
|
5
|
+
.trim();
|
|
3
6
|
res = res.charAt(0).toUpperCase() + res.slice(1);
|
|
4
7
|
return res;
|
|
5
8
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libmodulor",
|
|
3
3
|
"description": "A TypeScript library to create platform-agnostic applications",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.31.0",
|
|
5
5
|
"license": "LGPL-3.0",
|
|
6
6
|
"author": "Chafik H'nini <chafik.hnini@gmail.com>",
|
|
7
7
|
"homepage": "https://libmodulor.c100k.eu",
|
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
"./cloudflare-worker-hono": {
|
|
30
30
|
"import": "./dist/esm/index.cloudflare-worker-hono.js"
|
|
31
31
|
},
|
|
32
|
+
"./instrumentation-otl": {
|
|
33
|
+
"import": "./dist/esm/index.instrumentation-otl.js"
|
|
34
|
+
},
|
|
32
35
|
"./locales/de": {
|
|
33
36
|
"import": "./dist/esm/i18n/locales/de.js"
|
|
34
37
|
},
|
|
@@ -103,46 +106,59 @@
|
|
|
103
106
|
"test": "tsc && vitest run"
|
|
104
107
|
},
|
|
105
108
|
"devDependencies": {
|
|
106
|
-
"@
|
|
109
|
+
"@babel/core": "^7.29.7",
|
|
110
|
+
"@biomejs/biome": "^2.5.2",
|
|
111
|
+
"@opentelemetry/auto-instrumentations-node": "^0.77.0",
|
|
112
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.220.0",
|
|
113
|
+
"@opentelemetry/resources": "^2.9.0",
|
|
114
|
+
"@opentelemetry/sdk-node": "^0.220.0",
|
|
115
|
+
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
107
116
|
"@react-native-community/slider": "^4.5.7",
|
|
108
|
-
"@types/react": "^19.2.
|
|
117
|
+
"@types/react": "^19.2.17",
|
|
109
118
|
"@types/react-dom": "^19.2.3",
|
|
110
|
-
"babel-plugin-parameter-decorator": "^1.0.16",
|
|
111
119
|
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
112
|
-
"expo": "^
|
|
120
|
+
"expo": "^57.0.2",
|
|
113
121
|
"expo-document-picker": "^14.0.8",
|
|
114
122
|
"expo-image-picker": "^17.0.11",
|
|
115
|
-
"react-native-safe-area-context": "^5.
|
|
116
|
-
"wrangler": "^4.
|
|
123
|
+
"react-native-safe-area-context": "^5.8.0",
|
|
124
|
+
"wrangler": "^4.107.0",
|
|
117
125
|
"zod": "^4.4.3"
|
|
118
126
|
},
|
|
119
127
|
"peerDependencies": {
|
|
120
128
|
"@hono/node-server": "^1.19.14",
|
|
121
129
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
122
|
-
"@
|
|
130
|
+
"@opentelemetry/api": "^1.9.1",
|
|
131
|
+
"@opentelemetry/instrumentation": "^0.220.0",
|
|
132
|
+
"@stricli/core": "^1.2.9",
|
|
123
133
|
"buffer": "^6.0.3",
|
|
124
134
|
"cookie-parser": "^1.4.7",
|
|
125
135
|
"express": "^5.2.1",
|
|
126
136
|
"express-fileupload": "^1.5.2",
|
|
127
137
|
"fast-check": "^4.8.0",
|
|
128
|
-
"helmet": "^8.
|
|
129
|
-
"hono": "^4.12.
|
|
138
|
+
"helmet": "^8.2.0",
|
|
139
|
+
"hono": "^4.12.28",
|
|
130
140
|
"inversify": "^7.11.0",
|
|
131
141
|
"jose": "^6.2.3",
|
|
132
|
-
"knex": "^3.
|
|
133
|
-
"next": "^15.5.
|
|
134
|
-
"pg": "^8.
|
|
135
|
-
"react": "19.2.
|
|
136
|
-
"react-dom": "19.2.
|
|
137
|
-
"react-native": "^0.
|
|
142
|
+
"knex": "^3.3.0",
|
|
143
|
+
"next": "^15.5.20",
|
|
144
|
+
"pg": "^8.22.0",
|
|
145
|
+
"react": "^19.2.7",
|
|
146
|
+
"react-dom": "^19.2.7",
|
|
147
|
+
"react-native": "^0.86.0",
|
|
138
148
|
"reflect-metadata": "^0.2.2",
|
|
139
149
|
"sqlite3": "^5.1.7",
|
|
140
150
|
"typescript": "^6.0.3",
|
|
141
|
-
"vite": "^8.
|
|
142
|
-
"vitest": "^4.1.
|
|
151
|
+
"vite": "^8.1.3",
|
|
152
|
+
"vitest": "^4.1.10",
|
|
143
153
|
"zod": "^4.4.3"
|
|
144
154
|
},
|
|
145
155
|
"peerDependenciesMeta": {
|
|
156
|
+
"@opentelemetry/api": {
|
|
157
|
+
"optional": true
|
|
158
|
+
},
|
|
159
|
+
"@opentelemetry/instrumentation": {
|
|
160
|
+
"optional": true
|
|
161
|
+
},
|
|
146
162
|
"@hono/node-server": {
|
|
147
163
|
"optional": true
|
|
148
164
|
},
|