@atlas-cmdb/extension-sdk 0.0.0-stage → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +331 -2
- package/atlas-extension.schema.json +573 -0
- package/atlas-index.schema.json +173 -0
- package/dist/build.d.ts +27 -0
- package/dist/build.js +114 -0
- package/dist/build.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +215 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +120 -0
- package/dist/client.js +144 -0
- package/dist/client.js.map +1 -0
- package/dist/dev.d.ts +11 -0
- package/dist/dev.js +23 -0
- package/dist/dev.js.map +1 -0
- package/dist/index-schema.d.ts +1 -0
- package/dist/index-schema.js +10 -0
- package/dist/index-schema.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.d.ts +216 -0
- package/dist/manifest.js +380 -0
- package/dist/manifest.js.map +1 -0
- package/dist/package.d.ts +34 -0
- package/dist/package.js +107 -0
- package/dist/package.js.map +1 -0
- package/dist/registry.d.ts +124 -0
- package/dist/registry.js +158 -0
- package/dist/registry.js.map +1 -0
- package/dist/schema.d.ts +1 -0
- package/dist/schema.js +10 -0
- package/dist/schema.js.map +1 -0
- package/dist/server.d.ts +152 -0
- package/dist/server.js +254 -0
- package/dist/server.js.map +1 -0
- package/package.json +49 -5
package/dist/server.js
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { createHash, createHmac, createPublicKey, timingSafeEqual, verify } from 'node:crypto';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { createServer } from 'node:http';
|
|
4
|
+
import { AtlasClient } from './client.js';
|
|
5
|
+
export { AtlasApiError, AtlasClient } from './client.js';
|
|
6
|
+
const FILE = Symbol('atlas-file');
|
|
7
|
+
/** Throw to answer with a status and message the user may see. */
|
|
8
|
+
export class ExtensionError extends Error {
|
|
9
|
+
status;
|
|
10
|
+
constructor(status, message) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.status = status;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const SIGNATURE_HEADER = 'x-atlas-signature';
|
|
16
|
+
const MAX_SKEW_SECONDS = 60;
|
|
17
|
+
const MAX_BODY_BYTES = 2 * 1024 * 1024;
|
|
18
|
+
const FUNCTION_TIMEOUT_MS = 14_000;
|
|
19
|
+
const HOOK_TIMEOUT_MS = 58_000;
|
|
20
|
+
// Atlas stops a job at its manifest timeout (≤ 1 h) and closes the request, which aborts it
|
|
21
|
+
const JOB_TIMEOUT_MS = 61 * 60_000;
|
|
22
|
+
const MAX_LOG_LINES = 500;
|
|
23
|
+
const LIFECYCLE_EVENTS = ['install', 'upgrade', 'uninstall'];
|
|
24
|
+
/** Header the egress gateway turns back into `Authorization` towards the target. */
|
|
25
|
+
export const UPSTREAM_AUTHORIZATION_HEADER = 'x-atlas-upstream-authorization';
|
|
26
|
+
export const RESULT_HEADER = 'x-atlas-result';
|
|
27
|
+
export const FILENAME_HEADER = 'x-atlas-filename';
|
|
28
|
+
/**
|
|
29
|
+
* Check a webhook's HMAC-SHA256 signature over the raw body, e.g.
|
|
30
|
+
* `verifyHmacSignature(request.body, secret, request.headers['x-zammad-signature'], 'sha256=')`.
|
|
31
|
+
* Compares in constant time; false for a missing or malformed signature.
|
|
32
|
+
*/
|
|
33
|
+
export function verifyHmacSignature(body, secret, signature, prefix = '') {
|
|
34
|
+
if (!secret || !signature || !signature.startsWith(prefix))
|
|
35
|
+
return false;
|
|
36
|
+
const given = signature.slice(prefix.length).trim().toLowerCase();
|
|
37
|
+
if (!/^[0-9a-f]{64}$/.test(given))
|
|
38
|
+
return false;
|
|
39
|
+
const expected = createHmac('sha256', secret)
|
|
40
|
+
.update(body ?? '')
|
|
41
|
+
.digest();
|
|
42
|
+
return timingSafeEqual(expected, Buffer.from(given, 'hex'));
|
|
43
|
+
}
|
|
44
|
+
/** An inbound answer: `inboundJson(200, { ok: true })`. */
|
|
45
|
+
export function inboundJson(status, body, headers) {
|
|
46
|
+
return { status, body, ...(headers ? { headers } : {}) };
|
|
47
|
+
}
|
|
48
|
+
/** Verify `t=<unix>,sig=<base64>` over `<t>.<METHOD>.<path>.<sha256(body)>`. */
|
|
49
|
+
export function verifyRequestSignature(header, method, path, body, key, now = Date.now()) {
|
|
50
|
+
const match = /^t=(\d+),sig=([A-Za-z0-9+/=]+)$/.exec(header ?? '');
|
|
51
|
+
if (!match)
|
|
52
|
+
return false;
|
|
53
|
+
const t = Number(match[1]);
|
|
54
|
+
if (!Number.isFinite(t) || Math.abs(now / 1000 - t) > MAX_SKEW_SECONDS)
|
|
55
|
+
return false;
|
|
56
|
+
const digest = createHash('sha256').update(body).digest('hex');
|
|
57
|
+
try {
|
|
58
|
+
return verify(null, Buffer.from(`${t}.${method.toUpperCase()}.${path}.${digest}`), key, Buffer.from(match[2], 'base64'));
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
let coreKey = null;
|
|
65
|
+
/**
|
|
66
|
+
* Atlas' public key: `ATLAS_CORE_KEY` (JWK, set by the runner) or fetched once from
|
|
67
|
+
* `ATLAS_CORE_KEYS_URL` (JWKS, e.g. `https://atlas.example/api/v1/extensions/keys` in dev).
|
|
68
|
+
*/
|
|
69
|
+
export function loadCoreKey(environment = process.env) {
|
|
70
|
+
coreKey ??= (async () => {
|
|
71
|
+
let jwk;
|
|
72
|
+
if (environment.ATLAS_CORE_KEY)
|
|
73
|
+
jwk = JSON.parse(environment.ATLAS_CORE_KEY);
|
|
74
|
+
else if (environment.ATLAS_CORE_KEYS_URL) {
|
|
75
|
+
const response = await fetch(environment.ATLAS_CORE_KEYS_URL);
|
|
76
|
+
if (!response.ok)
|
|
77
|
+
throw new Error(`Could not fetch ${environment.ATLAS_CORE_KEYS_URL}`);
|
|
78
|
+
jwk = (await response.json()).keys[0];
|
|
79
|
+
}
|
|
80
|
+
if (!jwk)
|
|
81
|
+
throw new Error('Set ATLAS_CORE_KEY or ATLAS_CORE_KEYS_URL');
|
|
82
|
+
return createPublicKey({ key: jwk, format: 'jwk' });
|
|
83
|
+
})().catch((error) => {
|
|
84
|
+
coreKey = null;
|
|
85
|
+
throw error;
|
|
86
|
+
});
|
|
87
|
+
return coreKey;
|
|
88
|
+
}
|
|
89
|
+
function egressFetch(payload, signal) {
|
|
90
|
+
return async (url, init = {}) => {
|
|
91
|
+
if (!payload.egressUrl)
|
|
92
|
+
return fetch(url, { ...init, signal }); // dev runtime: direct
|
|
93
|
+
const headers = new Headers(init.headers);
|
|
94
|
+
const upstream = headers.get('authorization');
|
|
95
|
+
headers.delete(UPSTREAM_AUTHORIZATION_HEADER);
|
|
96
|
+
if (upstream)
|
|
97
|
+
headers.set(UPSTREAM_AUTHORIZATION_HEADER, upstream);
|
|
98
|
+
headers.set('authorization', `Bearer ${payload.token}`);
|
|
99
|
+
headers.set('x-atlas-target', url);
|
|
100
|
+
headers.set('x-atlas-method', (init.method ?? 'GET').toUpperCase());
|
|
101
|
+
return fetch(payload.egressUrl, { method: 'POST', headers, body: init.body, signal });
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async function readBody(request) {
|
|
105
|
+
const chunks = [];
|
|
106
|
+
let size = 0;
|
|
107
|
+
for await (const chunk of request) {
|
|
108
|
+
size += chunk.length;
|
|
109
|
+
if (size > MAX_BODY_BYTES)
|
|
110
|
+
throw new ExtensionError(413, 'Request too large');
|
|
111
|
+
chunks.push(chunk);
|
|
112
|
+
}
|
|
113
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
114
|
+
}
|
|
115
|
+
const isFile = (value) => !!value && typeof value === 'object' && value[FILE] === true;
|
|
116
|
+
function sendFile(response, file) {
|
|
117
|
+
const bytes = typeof file.body === 'string' ? Buffer.from(file.body) : Buffer.from(file.body);
|
|
118
|
+
response.writeHead(200, {
|
|
119
|
+
'content-type': file.contentType || 'application/octet-stream',
|
|
120
|
+
'content-length': bytes.length,
|
|
121
|
+
[RESULT_HEADER]: 'file',
|
|
122
|
+
[FILENAME_HEADER]: encodeURIComponent(file.filename || 'download')
|
|
123
|
+
});
|
|
124
|
+
response.end(bytes);
|
|
125
|
+
}
|
|
126
|
+
function send(response, status, body) {
|
|
127
|
+
const text = JSON.stringify(body);
|
|
128
|
+
response.writeHead(status, { 'content-type': 'application/json', 'content-length': Buffer.byteLength(text) });
|
|
129
|
+
response.end(text);
|
|
130
|
+
}
|
|
131
|
+
export function createExtension(definition) {
|
|
132
|
+
const manifestPath = definition.manifestPath ?? 'atlas-extension.json';
|
|
133
|
+
async function handle(request, response) {
|
|
134
|
+
const url = new URL(request.url ?? '/', 'http://extension');
|
|
135
|
+
if (request.method === 'GET' && url.pathname === '/healthz')
|
|
136
|
+
return send(response, 200, { ok: true });
|
|
137
|
+
if (request.method === 'GET' && url.pathname === '/manifest') {
|
|
138
|
+
try {
|
|
139
|
+
return send(response, 200, JSON.parse(readFileSync(manifestPath, 'utf8')));
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return send(response, 404, { error: 'no manifest' });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const invoke = /^\/invoke\/([^/]+)$/.exec(url.pathname);
|
|
146
|
+
const hook = /^\/hooks\/([^/]+)$/.exec(url.pathname);
|
|
147
|
+
const job = /^\/jobs\/([^/]+)$/.exec(url.pathname);
|
|
148
|
+
if (request.method !== 'POST' || (!invoke && !hook && !job))
|
|
149
|
+
return send(response, 404, { error: 'not found' });
|
|
150
|
+
const body = await readBody(request);
|
|
151
|
+
const signature = request.headers[SIGNATURE_HEADER];
|
|
152
|
+
const key = await loadCoreKey();
|
|
153
|
+
if (!verifyRequestSignature(Array.isArray(signature) ? signature[0] : signature, 'POST', url.pathname, body, key))
|
|
154
|
+
return send(response, 401, { error: 'invalid signature' });
|
|
155
|
+
const payload = JSON.parse(body);
|
|
156
|
+
const controller = new AbortController();
|
|
157
|
+
const timer = setTimeout(() => controller.abort(), job ? JOB_TIMEOUT_MS : hook ? HOOK_TIMEOUT_MS : FUNCTION_TIMEOUT_MS);
|
|
158
|
+
// the request is done once its body is read; a closed response means Atlas gave up
|
|
159
|
+
response.on('close', () => {
|
|
160
|
+
if (!response.writableFinished)
|
|
161
|
+
controller.abort();
|
|
162
|
+
});
|
|
163
|
+
const ctx = {
|
|
164
|
+
organization: payload.organization,
|
|
165
|
+
user: payload.user,
|
|
166
|
+
settings: payload.settings ?? {},
|
|
167
|
+
api: new AtlasClient({
|
|
168
|
+
apiUrl: payload.apiUrl,
|
|
169
|
+
token: payload.token,
|
|
170
|
+
organizationId: payload.organization.id,
|
|
171
|
+
signal: controller.signal
|
|
172
|
+
}),
|
|
173
|
+
fetch: egressFetch(payload, controller.signal),
|
|
174
|
+
atlasUrl: (payload.atlasUrl ?? '').replace(/\/$/, ''),
|
|
175
|
+
file: (file) => ({ [FILE]: true, ...file }),
|
|
176
|
+
signal: controller.signal
|
|
177
|
+
};
|
|
178
|
+
try {
|
|
179
|
+
if (job) {
|
|
180
|
+
const name = decodeURIComponent(job[1]);
|
|
181
|
+
const run = Object.hasOwn(definition.jobs ?? {}, name) ? definition.jobs[name] : undefined;
|
|
182
|
+
if (!run)
|
|
183
|
+
return send(response, 404, { error: `unknown job ${name}` });
|
|
184
|
+
const log = [];
|
|
185
|
+
const input = (payload.input ?? {});
|
|
186
|
+
const { user: _user, file: _file, ...base } = ctx;
|
|
187
|
+
const jobCtx = {
|
|
188
|
+
...base,
|
|
189
|
+
run: { id: input.runId ?? '', trigger: input.trigger ?? 'manual' },
|
|
190
|
+
log: (message) => {
|
|
191
|
+
if (log.length < MAX_LOG_LINES)
|
|
192
|
+
log.push(String(message).slice(0, 1000));
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
try {
|
|
196
|
+
const result = await run(jobCtx);
|
|
197
|
+
return send(response, 200, { result: result ?? null, log });
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
if (!(error instanceof ExtensionError))
|
|
201
|
+
console.error(error);
|
|
202
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
203
|
+
return send(response, error instanceof ExtensionError ? error.status : 500, { error: message, log });
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (hook) {
|
|
207
|
+
const event = decodeURIComponent(hook[1]);
|
|
208
|
+
if (!LIFECYCLE_EVENTS.includes(event))
|
|
209
|
+
return send(response, 404, { error: `unknown hook ${event}` });
|
|
210
|
+
const { user: _user, ...hookCtx } = ctx;
|
|
211
|
+
const input = (payload.input ?? {});
|
|
212
|
+
const hooks = definition.lifecycle ?? {};
|
|
213
|
+
if (event === 'upgrade')
|
|
214
|
+
await hooks.upgrade?.(hookCtx, { from: input.from ?? '0.0.0', to: input.to ?? '' });
|
|
215
|
+
else
|
|
216
|
+
await hooks[event]?.(hookCtx);
|
|
217
|
+
return send(response, 200, { result: null });
|
|
218
|
+
}
|
|
219
|
+
const name = decodeURIComponent(invoke[1]);
|
|
220
|
+
const functions = definition.functions ?? {};
|
|
221
|
+
const fn = Object.hasOwn(functions, name) ? functions[name] : undefined;
|
|
222
|
+
if (!fn)
|
|
223
|
+
return send(response, 404, { error: `unknown function ${name}` });
|
|
224
|
+
const result = await fn(payload.input, ctx);
|
|
225
|
+
if (isFile(result))
|
|
226
|
+
return sendFile(response, result);
|
|
227
|
+
return send(response, 200, { result: result ?? null });
|
|
228
|
+
}
|
|
229
|
+
finally {
|
|
230
|
+
clearTimeout(timer);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const handler = (request, response) => {
|
|
234
|
+
handle(request, response).catch((error) => {
|
|
235
|
+
if (error instanceof ExtensionError)
|
|
236
|
+
return send(response, error.status, { error: error.message });
|
|
237
|
+
console.error(error);
|
|
238
|
+
if (!response.headersSent)
|
|
239
|
+
send(response, 500, { error: 'internal error' });
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
return {
|
|
243
|
+
handler,
|
|
244
|
+
listen(port = Number(process.env.PORT ?? 8080)) {
|
|
245
|
+
const server = createServer(handler);
|
|
246
|
+
server.listen(port, () => console.log(`extension listening on :${port}`));
|
|
247
|
+
const stop = () => server.close(() => process.exit(0));
|
|
248
|
+
process.once('SIGTERM', stop);
|
|
249
|
+
process.once('SIGINT', stop);
|
|
250
|
+
return server;
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,UAAU,EACV,UAAU,EACV,eAAe,EACf,eAAe,EACf,MAAM,EAGN,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EACN,aAAa,EACb,WAAW,EAMX,MAAM,aAAa,CAAC;AAqCrB,MAAM,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAiFlC,kEAAkE;AAClE,MAAM,OAAO,cAAe,SAAQ,KAAK;IAE9B;IADV,YACU,MAAc,EACvB,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAHN,WAAM,GAAN,MAAM,CAAQ;IAIxB,CAAC;CACD;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AACpD,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAC5B,MAAM,cAAc,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AACvC,MAAM,mBAAmB,GAAG,MAAM,CAAC;AACnC,MAAM,eAAe,GAAG,MAAM,CAAC;AAC/B,4FAA4F;AAC5F,MAAM,cAAc,GAAG,EAAE,GAAG,MAAM,CAAC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,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO;QACN,OAAO;QACP,MAAM,CAAC,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;YAC7C,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC,CAAC;YAC1E,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YACvD,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;YAC9B,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC7B,OAAO,MAAM,CAAC;QACf,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@atlas-cmdb/extension-sdk",
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "Build, sign and run Atlas CMDB extensions",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": { "type": "git", "url": "git+https://github.com/atlas-cmdb/extension-sdk.git", "directory": "packages/extension-sdk" },
|
|
8
|
+
"homepage": "https://github.com/atlas-cmdb/extension-sdk#readme",
|
|
9
|
+
"author": "ProjectSource V.o.F. (https://projectsource.nl)",
|
|
10
|
+
"publishConfig": { "access": "public", "provenance": true },
|
|
11
|
+
"bin": { "atlas-ext": "dist/cli.js" },
|
|
12
|
+
"exports": {
|
|
13
|
+
".": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
|
|
14
|
+
"./manifest": { "types": "./dist/manifest.d.ts", "default": "./dist/manifest.js" },
|
|
15
|
+
"./server": { "types": "./dist/server.d.ts", "default": "./dist/server.js" },
|
|
16
|
+
"./registry": { "types": "./dist/registry.d.ts", "default": "./dist/registry.js" },
|
|
17
|
+
"./atlas-extension.schema.json": "./atlas-extension.schema.json",
|
|
18
|
+
"./atlas-index.schema.json": "./atlas-index.schema.json"
|
|
19
|
+
},
|
|
20
|
+
"files": ["dist", "atlas-extension.schema.json", "atlas-index.schema.json", "README.md"],
|
|
21
|
+
"engines": { "node": ">=20" },
|
|
22
|
+
"scripts": {
|
|
23
|
+
"prepack": "node -e \"for (const f of ['README.md', 'LICENSE']) require('fs').copyFileSync('../../' + f, f)\"",
|
|
24
|
+
"postpack": "node -e \"for (const f of ['README.md', 'LICENSE']) require('fs').rmSync(f, { force: true })\"",
|
|
25
|
+
"build": "tsc -p tsconfig.json && node dist/schema.js > atlas-extension.schema.json && node dist/index-schema.js > atlas-index.schema.json",
|
|
26
|
+
"test": "vitest run"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"semver": "^7.8.6",
|
|
30
|
+
"tar-stream": "^3.3.0",
|
|
31
|
+
"zod": "^4.6.7"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@sveltejs/vite-plugin-svelte": ">=6",
|
|
35
|
+
"svelte": ">=5",
|
|
36
|
+
"vite": ">=7"
|
|
37
|
+
},
|
|
38
|
+
"peerDependenciesMeta": {
|
|
39
|
+
"@sveltejs/vite-plugin-svelte": { "optional": true },
|
|
40
|
+
"svelte": { "optional": true },
|
|
41
|
+
"vite": { "optional": true }
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/node": "^24.0.0",
|
|
45
|
+
"@types/semver": "^7.8.0",
|
|
46
|
+
"@types/tar-stream": "^3.1.5",
|
|
47
|
+
"typescript": "^5.9.0",
|
|
48
|
+
"vitest": "^4.0.0"
|
|
49
|
+
}
|
|
50
|
+
}
|