@vinkius-core/mcp-fusion 2.13.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/initFusion.d.ts +16 -0
- package/dist/core/initFusion.d.ts.map +1 -1
- package/dist/core/initFusion.js +3 -0
- package/dist/core/initFusion.js.map +1 -1
- package/dist/core/response.d.ts +2 -1
- package/dist/core/response.d.ts.map +1 -1
- package/dist/core/response.js +3 -2
- package/dist/core/response.js.map +1 -1
- package/dist/core/serialization/JsonSerializer.d.ts +71 -0
- package/dist/core/serialization/JsonSerializer.d.ts.map +1 -0
- package/dist/core/serialization/JsonSerializer.js +192 -0
- package/dist/core/serialization/JsonSerializer.js.map +1 -0
- package/dist/core/serialization/index.d.ts +7 -0
- package/dist/core/serialization/index.d.ts.map +1 -0
- package/dist/core/serialization/index.js +7 -0
- package/dist/core/serialization/index.js.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/presenter/Presenter.d.ts +67 -0
- package/dist/presenter/Presenter.d.ts.map +1 -1
- package/dist/presenter/Presenter.js +94 -1
- package/dist/presenter/Presenter.js.map +1 -1
- package/dist/presenter/RedactEngine.d.ts +110 -0
- package/dist/presenter/RedactEngine.d.ts.map +1 -0
- package/dist/presenter/RedactEngine.js +128 -0
- package/dist/presenter/RedactEngine.js.map +1 -0
- package/dist/presenter/ResponseBuilder.d.ts +2 -1
- package/dist/presenter/ResponseBuilder.d.ts.map +1 -1
- package/dist/presenter/ResponseBuilder.js +3 -2
- package/dist/presenter/ResponseBuilder.js.map +1 -1
- package/dist/presenter/definePresenter.d.ts +21 -0
- package/dist/presenter/definePresenter.d.ts.map +1 -1
- package/dist/presenter/definePresenter.js +3 -0
- package/dist/presenter/definePresenter.js.map +1 -1
- package/dist/presenter/index.d.ts +2 -0
- package/dist/presenter/index.d.ts.map +1 -1
- package/dist/presenter/index.js +2 -0
- package/dist/presenter/index.js.map +1 -1
- package/dist/sandbox/SandboxEngine.d.ts +38 -24
- package/dist/sandbox/SandboxEngine.d.ts.map +1 -1
- package/dist/sandbox/SandboxEngine.js +83 -30
- package/dist/sandbox/SandboxEngine.js.map +1 -1
- package/package.json +19 -5
|
@@ -11,32 +11,36 @@
|
|
|
11
11
|
* 3. ExternalCopy + Script + Context are ALWAYS released in `finally`
|
|
12
12
|
* 4. Execution is ALWAYS async (script.run, never runSync)
|
|
13
13
|
* 5. Context is empty — no process, require, fs, globalThis injected
|
|
14
|
+
* 6. AbortSignal kills isolate.dispose() instantly (Connection Watchdog)
|
|
14
15
|
*
|
|
15
16
|
* The `isolated-vm` package is a peerDependency (optional).
|
|
16
17
|
* If not installed, the engine throws a clear error at construction time.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
* │ SandboxEngine (owns 1 Isolate)
|
|
20
|
-
* │
|
|
21
|
-
* │ execute(code, data)
|
|
22
|
-
* │ ┌──────────┐
|
|
23
|
-
* │ │
|
|
24
|
-
* │ ├──────────┤
|
|
25
|
-
* │ │
|
|
26
|
-
* │ ├──────────┤
|
|
27
|
-
* │ │
|
|
28
|
-
* │ ├──────────┤
|
|
29
|
-
* │ │
|
|
30
|
-
* │ ├──────────┤
|
|
31
|
-
* │ │
|
|
32
|
-
* │ ├──────────┤
|
|
33
|
-
* │ │
|
|
34
|
-
* │
|
|
35
|
-
* │
|
|
36
|
-
* │
|
|
37
|
-
* │
|
|
38
|
-
* │
|
|
39
|
-
*
|
|
19
|
+
* ┌─────────────────────────────────────────────────────────┐
|
|
20
|
+
* │ SandboxEngine (owns 1 Isolate) │
|
|
21
|
+
* │ │
|
|
22
|
+
* │ execute(code, data, { signal? }) │
|
|
23
|
+
* │ ┌──────────┐ │
|
|
24
|
+
* │ │ Abort? │ pre-flight signal check │
|
|
25
|
+
* │ ├──────────┤ │
|
|
26
|
+
* │ │ Guard │ fail-fast syntax check │
|
|
27
|
+
* │ ├──────────┤ │
|
|
28
|
+
* │ │ Context │ new per request (empty!) │
|
|
29
|
+
* │ ├──────────┤ │
|
|
30
|
+
* │ │ Copy In │ ExternalCopy (deep, no refs) │
|
|
31
|
+
* │ ├──────────┤ │
|
|
32
|
+
* │ │ Compile │ isolate.compileScript │
|
|
33
|
+
* │ ├──────────┤ │
|
|
34
|
+
* │ │ Run │ script.run (ASYNC, with timeout + abort) │
|
|
35
|
+
* │ ├──────────┤ │
|
|
36
|
+
* │ │ Copy Out │ JSON.parse result │
|
|
37
|
+
* │ └──────────┘ │
|
|
38
|
+
* │ │
|
|
39
|
+
* │ finally: signal.removeEventListener() │
|
|
40
|
+
* │ inputCopy.release() │
|
|
41
|
+
* │ script.release() │
|
|
42
|
+
* │ context.release() │
|
|
43
|
+
* └─────────────────────────────────────────────────────────┘
|
|
40
44
|
*
|
|
41
45
|
* @module
|
|
42
46
|
*/
|
|
@@ -84,8 +88,9 @@ export interface SandboxConfig {
|
|
|
84
88
|
* - `OUTPUT_TOO_LARGE`: Result exceeds `maxOutputBytes`
|
|
85
89
|
* - `INVALID_CODE`: Failed the SandboxGuard fail-fast check
|
|
86
90
|
* - `UNAVAILABLE`: `isolated-vm` is not installed
|
|
91
|
+
* - `ABORTED`: Execution was cancelled via AbortSignal (client disconnect)
|
|
87
92
|
*/
|
|
88
|
-
export type SandboxErrorCode = 'TIMEOUT' | 'MEMORY' | 'SYNTAX' | 'RUNTIME' | 'OUTPUT_TOO_LARGE' | 'INVALID_CODE' | 'UNAVAILABLE';
|
|
93
|
+
export type SandboxErrorCode = 'TIMEOUT' | 'MEMORY' | 'SYNTAX' | 'RUNTIME' | 'OUTPUT_TOO_LARGE' | 'INVALID_CODE' | 'UNAVAILABLE' | 'ABORTED';
|
|
89
94
|
/**
|
|
90
95
|
* Result of a sandbox execution.
|
|
91
96
|
*
|
|
@@ -152,6 +157,7 @@ export declare class SandboxEngine {
|
|
|
152
157
|
* - Strict timeout enforcement (async, non-blocking)
|
|
153
158
|
* - Memory limit enforcement
|
|
154
159
|
* - Automatic C++ pointer cleanup (ExternalCopy, Script, Context)
|
|
160
|
+
* - Cooperative cancellation via AbortSignal (Connection Watchdog)
|
|
155
161
|
*
|
|
156
162
|
* @param code - A JavaScript function expression as a string.
|
|
157
163
|
* Must be an arrow function or function expression.
|
|
@@ -160,9 +166,17 @@ export declare class SandboxEngine {
|
|
|
160
166
|
* @param data - The data to pass into the function.
|
|
161
167
|
* Deeply copied into the isolate (no references leak).
|
|
162
168
|
*
|
|
169
|
+
* @param options - Optional execution options.
|
|
170
|
+
* @param options.signal - AbortSignal for cooperative cancellation.
|
|
171
|
+
* When the signal fires (e.g., MCP client disconnects), the engine
|
|
172
|
+
* calls `isolate.dispose()` to kill the V8 C++ threads instantly.
|
|
173
|
+
* The isolate is auto-recovered on the next `.execute()` call.
|
|
174
|
+
*
|
|
163
175
|
* @returns A `SandboxResult` with the computed value or an error.
|
|
164
176
|
*/
|
|
165
|
-
execute<T = unknown>(code: string, data: unknown
|
|
177
|
+
execute<T = unknown>(code: string, data: unknown, options?: {
|
|
178
|
+
signal?: AbortSignal;
|
|
179
|
+
}): Promise<SandboxResult<T>>;
|
|
166
180
|
/**
|
|
167
181
|
* Release all resources held by this engine.
|
|
168
182
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SandboxEngine.d.ts","sourceRoot":"","sources":["../../src/sandbox/SandboxEngine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SandboxEngine.d.ts","sourceRoot":"","sources":["../../src/sandbox/SandboxEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IAC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AAO,CAAC,cAAc;CA6CzB"}
|
|
@@ -11,32 +11,36 @@
|
|
|
11
11
|
* 3. ExternalCopy + Script + Context are ALWAYS released in `finally`
|
|
12
12
|
* 4. Execution is ALWAYS async (script.run, never runSync)
|
|
13
13
|
* 5. Context is empty — no process, require, fs, globalThis injected
|
|
14
|
+
* 6. AbortSignal kills isolate.dispose() instantly (Connection Watchdog)
|
|
14
15
|
*
|
|
15
16
|
* The `isolated-vm` package is a peerDependency (optional).
|
|
16
17
|
* If not installed, the engine throws a clear error at construction time.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
-
* │ SandboxEngine (owns 1 Isolate)
|
|
20
|
-
* │
|
|
21
|
-
* │ execute(code, data)
|
|
22
|
-
* │ ┌──────────┐
|
|
23
|
-
* │ │
|
|
24
|
-
* │ ├──────────┤
|
|
25
|
-
* │ │
|
|
26
|
-
* │ ├──────────┤
|
|
27
|
-
* │ │
|
|
28
|
-
* │ ├──────────┤
|
|
29
|
-
* │ │
|
|
30
|
-
* │ ├──────────┤
|
|
31
|
-
* │ │
|
|
32
|
-
* │ ├──────────┤
|
|
33
|
-
* │ │
|
|
34
|
-
* │
|
|
35
|
-
* │
|
|
36
|
-
* │
|
|
37
|
-
* │
|
|
38
|
-
* │
|
|
39
|
-
*
|
|
19
|
+
* ┌─────────────────────────────────────────────────────────┐
|
|
20
|
+
* │ SandboxEngine (owns 1 Isolate) │
|
|
21
|
+
* │ │
|
|
22
|
+
* │ execute(code, data, { signal? }) │
|
|
23
|
+
* │ ┌──────────┐ │
|
|
24
|
+
* │ │ Abort? │ pre-flight signal check │
|
|
25
|
+
* │ ├──────────┤ │
|
|
26
|
+
* │ │ Guard │ fail-fast syntax check │
|
|
27
|
+
* │ ├──────────┤ │
|
|
28
|
+
* │ │ Context │ new per request (empty!) │
|
|
29
|
+
* │ ├──────────┤ │
|
|
30
|
+
* │ │ Copy In │ ExternalCopy (deep, no refs) │
|
|
31
|
+
* │ ├──────────┤ │
|
|
32
|
+
* │ │ Compile │ isolate.compileScript │
|
|
33
|
+
* │ ├──────────┤ │
|
|
34
|
+
* │ │ Run │ script.run (ASYNC, with timeout + abort) │
|
|
35
|
+
* │ ├──────────┤ │
|
|
36
|
+
* │ │ Copy Out │ JSON.parse result │
|
|
37
|
+
* │ └──────────┘ │
|
|
38
|
+
* │ │
|
|
39
|
+
* │ finally: signal.removeEventListener() │
|
|
40
|
+
* │ inputCopy.release() │
|
|
41
|
+
* │ script.release() │
|
|
42
|
+
* │ context.release() │
|
|
43
|
+
* └─────────────────────────────────────────────────────────┘
|
|
40
44
|
*
|
|
41
45
|
* @module
|
|
42
46
|
*/
|
|
@@ -122,6 +126,7 @@ export class SandboxEngine {
|
|
|
122
126
|
* - Strict timeout enforcement (async, non-blocking)
|
|
123
127
|
* - Memory limit enforcement
|
|
124
128
|
* - Automatic C++ pointer cleanup (ExternalCopy, Script, Context)
|
|
129
|
+
* - Cooperative cancellation via AbortSignal (Connection Watchdog)
|
|
125
130
|
*
|
|
126
131
|
* @param code - A JavaScript function expression as a string.
|
|
127
132
|
* Must be an arrow function or function expression.
|
|
@@ -130,12 +135,29 @@ export class SandboxEngine {
|
|
|
130
135
|
* @param data - The data to pass into the function.
|
|
131
136
|
* Deeply copied into the isolate (no references leak).
|
|
132
137
|
*
|
|
138
|
+
* @param options - Optional execution options.
|
|
139
|
+
* @param options.signal - AbortSignal for cooperative cancellation.
|
|
140
|
+
* When the signal fires (e.g., MCP client disconnects), the engine
|
|
141
|
+
* calls `isolate.dispose()` to kill the V8 C++ threads instantly.
|
|
142
|
+
* The isolate is auto-recovered on the next `.execute()` call.
|
|
143
|
+
*
|
|
133
144
|
* @returns A `SandboxResult` with the computed value or an error.
|
|
134
145
|
*/
|
|
135
|
-
async execute(code, data) {
|
|
146
|
+
async execute(code, data, options) {
|
|
136
147
|
if (this._disposed) {
|
|
137
148
|
return { ok: false, error: 'SandboxEngine has been disposed.', code: 'UNAVAILABLE' };
|
|
138
149
|
}
|
|
150
|
+
const signal = options?.signal;
|
|
151
|
+
// ── Step 0: Pre-flight abort check ───────────────
|
|
152
|
+
// If the signal is already aborted (client disconnected before
|
|
153
|
+
// we even started), skip all V8 allocation entirely.
|
|
154
|
+
if (signal?.aborted) {
|
|
155
|
+
return {
|
|
156
|
+
ok: false,
|
|
157
|
+
error: 'Execution aborted: client disconnected before sandbox started.',
|
|
158
|
+
code: 'ABORTED',
|
|
159
|
+
};
|
|
160
|
+
}
|
|
139
161
|
// ── Step 1: Fail-fast guard ─────────────────────
|
|
140
162
|
const guard = validateSandboxCode(code);
|
|
141
163
|
if (!guard.ok) {
|
|
@@ -145,7 +167,22 @@ export class SandboxEngine {
|
|
|
145
167
|
this._ensureIsolate();
|
|
146
168
|
const ivm = getIvm();
|
|
147
169
|
const isolate = this._isolate;
|
|
148
|
-
// ── Step 3:
|
|
170
|
+
// ── Step 3: Wire abort kill-switch ──────────────
|
|
171
|
+
// When the signal fires, we call isolate.dispose() which
|
|
172
|
+
// immediately kills the V8 C++ threads. The _ensureIsolate()
|
|
173
|
+
// method will recreate a fresh isolate on the next call.
|
|
174
|
+
let aborted = false;
|
|
175
|
+
const onAbort = signal ? () => {
|
|
176
|
+
aborted = true;
|
|
177
|
+
try {
|
|
178
|
+
isolate.dispose();
|
|
179
|
+
}
|
|
180
|
+
catch { /* may already be dead */ }
|
|
181
|
+
} : undefined;
|
|
182
|
+
if (signal && onAbort) {
|
|
183
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
184
|
+
}
|
|
185
|
+
// ── Step 4: Execute in sealed context ───────────
|
|
149
186
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
150
187
|
let inputCopy; // ivm.ExternalCopy
|
|
151
188
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -165,7 +202,7 @@ export class SandboxEngine {
|
|
|
165
202
|
// ASYNC execution — never blocks the Node.js event loop
|
|
166
203
|
const rawResult = await script.run(context, { timeout: this._timeout });
|
|
167
204
|
const executionMs = performance.now() - startMs;
|
|
168
|
-
// ── Step
|
|
205
|
+
// ── Step 5: Output size guard ───────────────
|
|
169
206
|
if (typeof rawResult === 'string' && rawResult.length > this._maxOutputBytes) {
|
|
170
207
|
return {
|
|
171
208
|
ok: false,
|
|
@@ -174,17 +211,33 @@ export class SandboxEngine {
|
|
|
174
211
|
code: 'OUTPUT_TOO_LARGE',
|
|
175
212
|
};
|
|
176
213
|
}
|
|
177
|
-
// ── Step
|
|
214
|
+
// ── Step 6: Parse result ────────────────────
|
|
178
215
|
const parsed = typeof rawResult === 'string' ? JSON.parse(rawResult) : rawResult;
|
|
179
216
|
return { ok: true, value: parsed, executionMs };
|
|
180
217
|
}
|
|
181
218
|
catch (err) {
|
|
182
|
-
|
|
183
|
-
|
|
219
|
+
// If the abort listener disposed the isolate, classify as ABORTED
|
|
220
|
+
// (not MEMORY — the user disconnected, not an OOM condition)
|
|
221
|
+
if (aborted) {
|
|
222
|
+
return {
|
|
223
|
+
ok: false,
|
|
224
|
+
error: 'Execution aborted: client disconnected during sandbox execution.',
|
|
225
|
+
code: 'ABORTED',
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
return this._classifyError(err);
|
|
184
229
|
}
|
|
185
230
|
finally {
|
|
231
|
+
// ── MANDATORY ABORT LISTENER CLEANUP ─────────
|
|
232
|
+
// Remove the listener to prevent memory leaks when
|
|
233
|
+
// execution completes before the signal fires.
|
|
234
|
+
if (signal && onAbort) {
|
|
235
|
+
signal.removeEventListener('abort', onAbort);
|
|
236
|
+
}
|
|
186
237
|
// ── MANDATORY C++ POINTER RELEASE ────────────
|
|
187
|
-
// Order matters: release inner resources first
|
|
238
|
+
// Order matters: release inner resources first.
|
|
239
|
+
// After abort-triggered dispose, these will throw
|
|
240
|
+
// but the catch blocks handle dead-isolate gracefully.
|
|
188
241
|
try {
|
|
189
242
|
inputCopy?.release();
|
|
190
243
|
}
|
|
@@ -244,7 +297,7 @@ export class SandboxEngine {
|
|
|
244
297
|
* Classify an error from V8 execution into a typed SandboxResult.
|
|
245
298
|
* @internal
|
|
246
299
|
*/
|
|
247
|
-
_classifyError(err
|
|
300
|
+
_classifyError(err) {
|
|
248
301
|
const message = err instanceof Error ? err.message : String(err);
|
|
249
302
|
// Timeout: isolated-vm throws a specific error
|
|
250
303
|
if (message.includes('Script execution timed out')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SandboxEngine.js","sourceRoot":"","sources":["../../src/sandbox/SandboxEngine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SandboxEngine.js","sourceRoot":"","sources":["../../src/sandbox/SandboxEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAkFxD,4DAA4D;AAE5D,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AACpC,MAAM,wBAAwB,GAAG,SAAS,CAAC,CAAC,MAAM;AAElD,4DAA4D;AAE5D;;;;GAIG;AACH,8DAA8D;AAC9D,IAAI,IAAI,GAAQ,SAAS,CAAC;AAE1B,8DAA8D;AAC9D,SAAS,MAAM;IACX,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACpC,IAAI,CAAC;QACD,uDAAuD;QACvD,uDAAuD;QACvD,iEAAiE;QACjE,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACL,IAAI,GAAG,IAAI,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,4DAA4D;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,aAAa;IACL,QAAQ,CAAS;IACjB,YAAY,CAAS;IACrB,eAAe,CAAS;IACzC,8DAA8D;IACtD,QAAQ,CAAM,CA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json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinkius-core/mcp-fusion",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "MVA (Model-View-Agent) framework for the Model Context Protocol. Structured perception packages with Presenters, cognitive guardrails, self-healing errors, action consolidation, and tRPC-style type safety — so AI agents perceive and act on your data deterministically.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -82,7 +82,10 @@
|
|
|
82
82
|
"guardrails",
|
|
83
83
|
"agentic",
|
|
84
84
|
"structured-data",
|
|
85
|
-
"action-consolidation"
|
|
85
|
+
"action-consolidation",
|
|
86
|
+
"dlp",
|
|
87
|
+
"compliance",
|
|
88
|
+
"pii-redaction"
|
|
86
89
|
],
|
|
87
90
|
"author": "Vinkius Labs",
|
|
88
91
|
"repository": {
|
|
@@ -112,8 +115,10 @@
|
|
|
112
115
|
},
|
|
113
116
|
"peerDependencies": {
|
|
114
117
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
115
|
-
"
|
|
116
|
-
"
|
|
118
|
+
"fast-json-stringify": "^6.0.0",
|
|
119
|
+
"fast-redact": "^3.0.0",
|
|
120
|
+
"isolated-vm": "^5.0.4",
|
|
121
|
+
"zod": "^3.25.1 || ^4.0.0"
|
|
117
122
|
},
|
|
118
123
|
"peerDependenciesMeta": {
|
|
119
124
|
"zod": {
|
|
@@ -121,7 +126,16 @@
|
|
|
121
126
|
},
|
|
122
127
|
"isolated-vm": {
|
|
123
128
|
"optional": true
|
|
129
|
+
},
|
|
130
|
+
"fast-json-stringify": {
|
|
131
|
+
"optional": true
|
|
132
|
+
},
|
|
133
|
+
"fast-redact": {
|
|
134
|
+
"optional": true
|
|
124
135
|
}
|
|
125
136
|
},
|
|
126
|
-
"license": "Apache-2.0"
|
|
137
|
+
"license": "Apache-2.0",
|
|
138
|
+
"devDependencies": {
|
|
139
|
+
"fast-redact": "^3.5.0"
|
|
140
|
+
}
|
|
127
141
|
}
|