@astrale-os/kernel-server 0.5.0-beta.8 → 1.0.0-beta.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/dist/capture.d.ts +0 -1
- package/dist/capture.js +0 -1
- package/dist/cors/cors.d.ts +0 -1
- package/dist/cors/cors.js +11 -4
- package/dist/cors/index.d.ts +0 -1
- package/dist/cors/index.js +0 -1
- package/dist/cors/types.d.ts +0 -1
- package/dist/cors/types.js +0 -1
- package/dist/errors/admission.d.ts +7 -0
- package/dist/errors/admission.js +22 -0
- package/dist/errors/availability.d.ts +0 -1
- package/dist/errors/availability.js +0 -1
- package/dist/errors/classify.d.ts +8 -1
- package/dist/errors/classify.js +15 -1
- package/dist/errors/index.d.ts +2 -2
- package/dist/errors/index.js +2 -2
- package/dist/errors/request-body.d.ts +0 -1
- package/dist/errors/request-body.js +0 -1
- package/dist/errors/response-body.d.ts +0 -1
- package/dist/errors/response-body.js +0 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.js +2 -3
- package/dist/invocation/context.d.ts +3 -3
- package/dist/invocation/context.js +2 -2
- package/dist/invocation/identity.d.ts +1 -2
- package/dist/invocation/identity.js +1 -2
- package/dist/invocation/index.d.ts +1 -2
- package/dist/invocation/index.js +1 -2
- package/dist/invocation/release-route.d.ts +22 -0
- package/dist/invocation/release-route.js +32 -0
- package/dist/invocation/types.d.ts +8 -7
- package/dist/invocation/types.js +0 -1
- package/dist/issuer/exchange.d.ts +0 -1
- package/dist/issuer/exchange.js +20 -10
- package/dist/issuer/index.d.ts +0 -1
- package/dist/issuer/index.js +0 -1
- package/dist/issuer/routes.d.ts +0 -1
- package/dist/issuer/routes.js +57 -48
- package/dist/issuer/types.d.ts +5 -1
- package/dist/issuer/types.js +0 -1
- package/dist/lifecycle/active.d.ts +4 -1
- package/dist/lifecycle/active.js +48 -11
- package/dist/lifecycle/index.d.ts +0 -1
- package/dist/lifecycle/index.js +0 -1
- package/dist/release/delivery/handler.d.ts +9 -0
- package/dist/{publication → release}/delivery/handler.js +19 -13
- package/dist/release/delivery/index.d.ts +1 -0
- package/dist/release/delivery/index.js +1 -0
- package/dist/{publication → release}/delivery/types.d.ts +4 -5
- package/dist/release/delivery/types.js +1 -0
- package/dist/release/index.d.ts +3 -0
- package/dist/release/index.js +2 -0
- package/dist/release/served.d.ts +21 -0
- package/dist/release/served.js +10 -0
- package/dist/release/snapshot.d.ts +22 -0
- package/dist/release/snapshot.js +49 -0
- package/dist/release/table.d.ts +4 -0
- package/dist/release/table.js +11 -0
- package/dist/release/types.d.ts +23 -0
- package/dist/release/types.js +1 -0
- package/dist/routes/address.d.ts +2 -0
- package/dist/routes/address.js +6 -0
- package/dist/routes/binary.d.ts +9 -0
- package/dist/routes/binary.js +110 -0
- package/dist/routes/bundle.d.ts +5 -0
- package/dist/routes/bundle.js +50 -0
- package/dist/routes/csrf.d.ts +16 -0
- package/dist/routes/csrf.js +35 -0
- package/dist/routes/document.d.ts +6 -0
- package/dist/routes/document.js +57 -0
- package/dist/routes/index.d.ts +3 -2
- package/dist/routes/index.js +2 -2
- package/dist/routes/model.d.ts +15 -0
- package/dist/routes/model.js +1 -0
- package/dist/routes/native.d.ts +17 -0
- package/dist/routes/native.js +126 -0
- package/dist/routes/preflight.d.ts +4 -0
- package/dist/routes/preflight.js +55 -0
- package/dist/routes/response.d.ts +14 -0
- package/dist/routes/response.js +33 -0
- package/dist/routes/routes.d.ts +7 -24
- package/dist/routes/routes.js +24 -439
- package/dist/routes/snapshot.d.ts +13 -0
- package/dist/routes/snapshot.js +39 -0
- package/dist/routes/stream.d.ts +6 -0
- package/dist/routes/stream.js +122 -0
- package/dist/server.d.ts +0 -1
- package/dist/server.js +95 -51
- package/dist/transport/body.d.ts +0 -1
- package/dist/transport/body.js +0 -1
- package/dist/transport/codecs.d.ts +2 -3
- package/dist/transport/codecs.js +4 -4
- package/dist/transport/credential.d.ts +0 -1
- package/dist/transport/credential.js +0 -1
- package/dist/transport/http/binary-request.d.ts +11 -0
- package/dist/transport/http/binary-request.js +102 -0
- package/dist/transport/http/binary.d.ts +6 -0
- package/dist/transport/http/binary.js +35 -0
- package/dist/transport/http/byte-stream.d.ts +4 -0
- package/dist/transport/http/byte-stream.js +123 -0
- package/dist/transport/http/control.d.ts +12 -0
- package/dist/transport/http/control.js +24 -0
- package/dist/transport/http/handler.d.ts +8 -3
- package/dist/transport/http/handler.js +97 -45
- package/dist/transport/http/index.d.ts +3 -2
- package/dist/transport/http/index.js +2 -2
- package/dist/transport/http/model.d.ts +20 -0
- package/dist/transport/http/model.js +1 -0
- package/dist/transport/http/render.d.ts +3 -31
- package/dist/transport/http/render.js +18 -269
- package/dist/transport/http/response.d.ts +14 -0
- package/dist/transport/http/response.js +77 -0
- package/dist/transport/http/stream.d.ts +5 -0
- package/dist/transport/http/stream.js +134 -0
- package/dist/transport/index.d.ts +2 -2
- package/dist/transport/index.js +2 -2
- package/dist/transport/result.d.ts +13 -0
- package/dist/transport/result.js +35 -0
- package/dist/transport/router.d.ts +0 -1
- package/dist/transport/router.js +0 -1
- package/dist/transport/stream-error.d.ts +0 -1
- package/dist/transport/stream-error.js +0 -1
- package/dist/transport/types.d.ts +1 -2
- package/dist/transport/types.js +0 -1
- package/dist/transport/websocket/index.d.ts +0 -1
- package/dist/transport/websocket/index.js +0 -1
- package/dist/transport/websocket/session.d.ts +3 -3
- package/dist/transport/websocket/session.js +30 -30
- package/dist/transport/websocket/upgrade.d.ts +2 -3
- package/dist/transport/websocket/upgrade.js +7 -7
- package/dist/types.d.ts +33 -10
- package/dist/types.js +0 -1
- package/package.json +11 -22
- package/dist/capture.d.ts.map +0 -1
- package/dist/capture.js.map +0 -1
- package/dist/cors/cors.d.ts.map +0 -1
- package/dist/cors/cors.js.map +0 -1
- package/dist/cors/index.d.ts.map +0 -1
- package/dist/cors/index.js.map +0 -1
- package/dist/cors/types.d.ts.map +0 -1
- package/dist/cors/types.js.map +0 -1
- package/dist/errors/availability.d.ts.map +0 -1
- package/dist/errors/availability.js.map +0 -1
- package/dist/errors/classify.d.ts.map +0 -1
- package/dist/errors/classify.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/errors/request-body.d.ts.map +0 -1
- package/dist/errors/request-body.js.map +0 -1
- package/dist/errors/response-body.d.ts.map +0 -1
- package/dist/errors/response-body.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/invocation/context.d.ts.map +0 -1
- package/dist/invocation/context.js.map +0 -1
- package/dist/invocation/identity.d.ts.map +0 -1
- package/dist/invocation/identity.js.map +0 -1
- package/dist/invocation/index.d.ts.map +0 -1
- package/dist/invocation/index.js.map +0 -1
- package/dist/invocation/publication-route.d.ts +0 -14
- package/dist/invocation/publication-route.d.ts.map +0 -1
- package/dist/invocation/publication-route.js +0 -45
- package/dist/invocation/publication-route.js.map +0 -1
- package/dist/invocation/types.d.ts.map +0 -1
- package/dist/invocation/types.js.map +0 -1
- package/dist/issuer/exchange.d.ts.map +0 -1
- package/dist/issuer/exchange.js.map +0 -1
- package/dist/issuer/index.d.ts.map +0 -1
- package/dist/issuer/index.js.map +0 -1
- package/dist/issuer/routes.d.ts.map +0 -1
- package/dist/issuer/routes.js.map +0 -1
- package/dist/issuer/types.d.ts.map +0 -1
- package/dist/issuer/types.js.map +0 -1
- package/dist/lifecycle/active.d.ts.map +0 -1
- package/dist/lifecycle/active.js.map +0 -1
- package/dist/lifecycle/index.d.ts.map +0 -1
- package/dist/lifecycle/index.js.map +0 -1
- package/dist/publication/delivery/handler.d.ts +0 -10
- package/dist/publication/delivery/handler.d.ts.map +0 -1
- package/dist/publication/delivery/handler.js.map +0 -1
- package/dist/publication/delivery/index.d.ts +0 -3
- package/dist/publication/delivery/index.d.ts.map +0 -1
- package/dist/publication/delivery/index.js +0 -2
- package/dist/publication/delivery/index.js.map +0 -1
- package/dist/publication/delivery/types.d.ts.map +0 -1
- package/dist/publication/delivery/types.js +0 -2
- package/dist/publication/delivery/types.js.map +0 -1
- package/dist/publication/index.d.ts +0 -4
- package/dist/publication/index.d.ts.map +0 -1
- package/dist/publication/index.js +0 -3
- package/dist/publication/index.js.map +0 -1
- package/dist/publication/snapshot.d.ts +0 -16
- package/dist/publication/snapshot.d.ts.map +0 -1
- package/dist/publication/snapshot.js +0 -39
- package/dist/publication/snapshot.js.map +0 -1
- package/dist/publication/table.d.ts +0 -4
- package/dist/publication/table.d.ts.map +0 -1
- package/dist/publication/table.js +0 -17
- package/dist/publication/table.js.map +0 -1
- package/dist/publication/types.d.ts +0 -23
- package/dist/publication/types.d.ts.map +0 -1
- package/dist/publication/types.js +0 -2
- package/dist/publication/types.js.map +0 -1
- package/dist/publication/validator.d.ts +0 -4
- package/dist/publication/validator.d.ts.map +0 -1
- package/dist/publication/validator.js +0 -17
- package/dist/publication/validator.js.map +0 -1
- package/dist/routes/index.d.ts.map +0 -1
- package/dist/routes/index.js.map +0 -1
- package/dist/routes/routes.d.ts.map +0 -1
- package/dist/routes/routes.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/transport/body.d.ts.map +0 -1
- package/dist/transport/body.js.map +0 -1
- package/dist/transport/codecs.d.ts.map +0 -1
- package/dist/transport/codecs.js.map +0 -1
- package/dist/transport/credential.d.ts.map +0 -1
- package/dist/transport/credential.js.map +0 -1
- package/dist/transport/http/handler.d.ts.map +0 -1
- package/dist/transport/http/handler.js.map +0 -1
- package/dist/transport/http/index.d.ts.map +0 -1
- package/dist/transport/http/index.js.map +0 -1
- package/dist/transport/http/render.d.ts.map +0 -1
- package/dist/transport/http/render.js.map +0 -1
- package/dist/transport/index.d.ts.map +0 -1
- package/dist/transport/index.js.map +0 -1
- package/dist/transport/router.d.ts.map +0 -1
- package/dist/transport/router.js.map +0 -1
- package/dist/transport/stream-error.d.ts.map +0 -1
- package/dist/transport/stream-error.js.map +0 -1
- package/dist/transport/types.d.ts.map +0 -1
- package/dist/transport/types.js.map +0 -1
- package/dist/transport/websocket/index.d.ts.map +0 -1
- package/dist/transport/websocket/index.js.map +0 -1
- package/dist/transport/websocket/session.d.ts.map +0 -1
- package/dist/transport/websocket/session.js.map +0 -1
- package/dist/transport/websocket/upgrade.d.ts.map +0 -1
- package/dist/transport/websocket/upgrade.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as errors from '@astrale-os/kernel-protocol/errors';
|
|
2
|
+
import { ResponseBodyTooLargeError } from '../../errors/index.js';
|
|
3
|
+
/** Encode a bounded envelope with its binding content type and cache policy. */
|
|
4
|
+
export function envelopeResponse(codec, input, cors, status = 200, negotiated = true, maximumResponseBytes) {
|
|
5
|
+
const encoded = codec.encode(input);
|
|
6
|
+
requireResponseBound(encoded, maximumResponseBytes);
|
|
7
|
+
const headers = bindingHeaders(cors, negotiated);
|
|
8
|
+
headers.set('content-type', codec.contentType);
|
|
9
|
+
return new Response(toBody(encoded), {
|
|
10
|
+
status,
|
|
11
|
+
headers,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function bindingHeaders(input, negotiated) {
|
|
15
|
+
const headers = new Headers(input);
|
|
16
|
+
headers.set('cache-control', 'no-store');
|
|
17
|
+
if (negotiated)
|
|
18
|
+
appendVary(headers, 'accept');
|
|
19
|
+
return headers;
|
|
20
|
+
}
|
|
21
|
+
/** Bound an error, falling back to a correlated limit refusal or an empty response. */
|
|
22
|
+
export function errorEnvelopeResponse(codec, response, cors, status, negotiated, maximumResponseBytes) {
|
|
23
|
+
try {
|
|
24
|
+
return envelopeResponse(codec, response, cors, status, negotiated, maximumResponseBytes);
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
if (!(error instanceof ResponseBodyTooLargeError))
|
|
28
|
+
throw error;
|
|
29
|
+
const fallback = {
|
|
30
|
+
requestId: response.requestId,
|
|
31
|
+
invocation: response.invocation,
|
|
32
|
+
error: {
|
|
33
|
+
code: errors.CODES.LIMIT_EXCEEDED,
|
|
34
|
+
message: 'Response body exceeds the configured limit.',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
try {
|
|
38
|
+
return envelopeResponse(codec, fallback, cors, errors.httpStatusOf(fallback.error), negotiated, maximumResponseBytes);
|
|
39
|
+
}
|
|
40
|
+
catch (fallbackError) {
|
|
41
|
+
if (!(fallbackError instanceof ResponseBodyTooLargeError))
|
|
42
|
+
throw fallbackError;
|
|
43
|
+
return new Response(null, {
|
|
44
|
+
status: 500,
|
|
45
|
+
headers: bindingHeaders(cors, negotiated),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/** Enforce the configured byte budget before a buffered response is handed off. */
|
|
51
|
+
export function requireResponseBound(input, maximumResponseBytes) {
|
|
52
|
+
if (maximumResponseBytes === undefined)
|
|
53
|
+
return;
|
|
54
|
+
const bytes = typeof input === 'string' ? new TextEncoder().encode(input).byteLength : input.byteLength;
|
|
55
|
+
if (bytes > maximumResponseBytes)
|
|
56
|
+
throw new ResponseBodyTooLargeError(maximumResponseBytes);
|
|
57
|
+
}
|
|
58
|
+
/** Retain existing Vary fields while declaring another response selector. */
|
|
59
|
+
export function appendVary(headers, value) {
|
|
60
|
+
headers.set('vary', mergeVary(Object.fromEntries(headers), value));
|
|
61
|
+
}
|
|
62
|
+
/** Merge one case-insensitive selector into the response Vary field. */
|
|
63
|
+
export function mergeVary(headers, value) {
|
|
64
|
+
const names = new Set((headers.vary ?? '')
|
|
65
|
+
.split(',')
|
|
66
|
+
.map((name) => name.trim().toLowerCase())
|
|
67
|
+
.filter(Boolean));
|
|
68
|
+
names.add(value.toLowerCase());
|
|
69
|
+
return [...names].join(', ');
|
|
70
|
+
}
|
|
71
|
+
/** Detach encoded bytes for Fetch while retaining encoded text as text. */
|
|
72
|
+
export function toBody(input) {
|
|
73
|
+
if (typeof input === 'string')
|
|
74
|
+
return input;
|
|
75
|
+
const copy = new Uint8Array(input);
|
|
76
|
+
return copy.buffer;
|
|
77
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RenderContext } from './model.js';
|
|
2
|
+
/** Frame ordered Invocation items and retain cleanup until the producer settles. */
|
|
3
|
+
export declare function streamHttpResponse(stream: AsyncIterable<unknown> & {
|
|
4
|
+
cancel(reason?: string): Promise<void>;
|
|
5
|
+
}, context: RenderContext): Response;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import * as protocol from '@astrale-os/kernel-protocol/invocation';
|
|
2
|
+
import { classifyError, ResponseBodyTooLargeError } from '../../errors/index.js';
|
|
3
|
+
import { interruptedStreamError } from '../stream-error.js';
|
|
4
|
+
import { mergeVary } from './response.js';
|
|
5
|
+
/** Frame ordered Invocation items and retain cleanup until the producer settles. */
|
|
6
|
+
export function streamHttpResponse(stream, context) {
|
|
7
|
+
const iterator = stream[Symbol.asyncIterator]();
|
|
8
|
+
const startFrame = encodeBoundedStreamFrame(context.codec, { kind: 'stream.start', requestId: context.requestId, invocation: context.invocation }, context.maximumResponseBytes);
|
|
9
|
+
let count = 0;
|
|
10
|
+
let terminal = false;
|
|
11
|
+
let controller;
|
|
12
|
+
let stopping;
|
|
13
|
+
const stop = (reason) => {
|
|
14
|
+
stopping ??= stopStream(reason);
|
|
15
|
+
return stopping;
|
|
16
|
+
};
|
|
17
|
+
async function stopStream(reason) {
|
|
18
|
+
if (terminal)
|
|
19
|
+
return;
|
|
20
|
+
terminal = true;
|
|
21
|
+
// End the wire response immediately. Producer cleanup remains part of the active operation,
|
|
22
|
+
// but an uncooperative producer must not leave the client waiting for a terminal frame.
|
|
23
|
+
if (controller !== undefined) {
|
|
24
|
+
try {
|
|
25
|
+
controller.enqueue(encodeBoundedStreamFrame(context.codec, cancellationFrame(context), context.maximumResponseBytes));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// The transport consumer may already have disconnected.
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
controller.close();
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
// The stream may already be closed or cancelled by the consumer.
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
await Promise.allSettled([
|
|
39
|
+
Promise.resolve().then(() => stream.cancel(reason)),
|
|
40
|
+
Promise.resolve().then(() => iterator.return?.()),
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
finally {
|
|
44
|
+
context.active.settle();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const body = new ReadableStream({
|
|
48
|
+
start(output) {
|
|
49
|
+
controller = output;
|
|
50
|
+
output.enqueue(startFrame);
|
|
51
|
+
},
|
|
52
|
+
async pull(output) {
|
|
53
|
+
if (terminal)
|
|
54
|
+
return;
|
|
55
|
+
try {
|
|
56
|
+
const next = await iterator.next();
|
|
57
|
+
if (terminal)
|
|
58
|
+
return;
|
|
59
|
+
if (next.done) {
|
|
60
|
+
terminal = true;
|
|
61
|
+
output.enqueue(encodeBoundedStreamFrame(context.codec, {
|
|
62
|
+
kind: 'stream.end',
|
|
63
|
+
requestId: context.requestId,
|
|
64
|
+
count,
|
|
65
|
+
}, context.maximumResponseBytes));
|
|
66
|
+
output.close();
|
|
67
|
+
context.active.settle();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const frame = protocol.decodeStreamFrame({
|
|
71
|
+
kind: 'stream.item',
|
|
72
|
+
requestId: context.requestId,
|
|
73
|
+
index: count,
|
|
74
|
+
value: next.value,
|
|
75
|
+
});
|
|
76
|
+
output.enqueue(encodeBoundedStreamFrame(context.codec, frame, context.maximumResponseBytes));
|
|
77
|
+
count += 1;
|
|
78
|
+
}
|
|
79
|
+
catch (input) {
|
|
80
|
+
if (terminal)
|
|
81
|
+
return;
|
|
82
|
+
terminal = true;
|
|
83
|
+
if (!context.active.signal.aborted) {
|
|
84
|
+
try {
|
|
85
|
+
output.enqueue(encodeBoundedStreamFrame(context.codec, {
|
|
86
|
+
kind: 'stream.error',
|
|
87
|
+
requestId: context.requestId,
|
|
88
|
+
error: classifyError(input),
|
|
89
|
+
}, context.maximumResponseBytes));
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
// No valid terminal frame can be formed; closing is the only remaining signal.
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
output.close();
|
|
96
|
+
await Promise.allSettled([
|
|
97
|
+
Promise.resolve().then(() => stream.cancel('stream failed')),
|
|
98
|
+
Promise.resolve().then(() => iterator.return?.()),
|
|
99
|
+
]);
|
|
100
|
+
context.active.settle();
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
async cancel(reason) {
|
|
104
|
+
const message = typeof reason === 'string' ? reason : 'response consumer cancelled';
|
|
105
|
+
context.active.cancel(message);
|
|
106
|
+
await stop(message);
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
context.active.onCancel(stop);
|
|
110
|
+
return new Response(body, {
|
|
111
|
+
status: 200,
|
|
112
|
+
headers: {
|
|
113
|
+
...context.cors([protocol.http.STREAM_FRAMING_FIELD]),
|
|
114
|
+
'cache-control': 'no-store',
|
|
115
|
+
'content-type': context.codec.contentType,
|
|
116
|
+
vary: mergeVary(context.cors(), 'accept'),
|
|
117
|
+
[protocol.http.STREAM_FRAMING_FIELD]: protocol.http.LENGTH_PREFIX_V1,
|
|
118
|
+
},
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function encodeBoundedStreamFrame(codec, frame, maximumResponseBytes) {
|
|
122
|
+
const encoded = protocol.http.encodeStreamFrame(codec, frame);
|
|
123
|
+
if (encoded.byteLength - 4 > maximumResponseBytes) {
|
|
124
|
+
throw new ResponseBodyTooLargeError(maximumResponseBytes);
|
|
125
|
+
}
|
|
126
|
+
return encoded;
|
|
127
|
+
}
|
|
128
|
+
function cancellationFrame(context) {
|
|
129
|
+
return {
|
|
130
|
+
kind: 'stream.error',
|
|
131
|
+
requestId: context.requestId,
|
|
132
|
+
error: interruptedStreamError(context.active.timedOut),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
export { renderBinary, renderRedirect } from './result.js';
|
|
1
2
|
export { byteLength, readBoundedBody } from './body.js';
|
|
2
3
|
export { loadCodecs, type LoadedCodec } from './codecs.js';
|
|
3
4
|
export { resolveCredential, type CredentialResult } from './credential.js';
|
|
4
5
|
export { createHttpHandler, type HttpHandlerConfig } from './http/index.js';
|
|
5
|
-
export {
|
|
6
|
+
export { renderHttpError, renderHttpResult, renderHttpStale, type CorsHeaders, type ErrorRenderOptions, type RenderContext, } from './http/index.js';
|
|
6
7
|
export { interruptedStreamError } from './stream-error.js';
|
|
7
8
|
export { createServerRouter, type ServerRouter } from './router.js';
|
|
8
9
|
export { createWebSocketSession, handleWebSocketUpgrade, type WebSocketHandlerConfig, type WebSocketSessionConfig, } from './websocket/index.js';
|
|
9
10
|
export type { Application, WebSocketAdapter, WebSocketHandlers, WebSocketLike, WebSocketUpgradeOptions, } from './types.js';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/transport/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
export { renderBinary, renderRedirect } from './result.js';
|
|
1
2
|
export { byteLength, readBoundedBody } from './body.js';
|
|
2
3
|
export { loadCodecs } from './codecs.js';
|
|
3
4
|
export { resolveCredential } from './credential.js';
|
|
4
5
|
export { createHttpHandler } from './http/index.js';
|
|
5
|
-
export {
|
|
6
|
+
export { renderHttpError, renderHttpResult, renderHttpStale, } from './http/index.js';
|
|
6
7
|
export { interruptedStreamError } from './stream-error.js';
|
|
7
8
|
export { createServerRouter } from './router.js';
|
|
8
9
|
export { createWebSocketSession, handleWebSocketUpgrade, } from './websocket/index.js';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BufferedBinaryResult, StreamingBinaryResult } from '@astrale-os/kernel-core/callable';
|
|
2
|
+
import * as protocol from '@astrale-os/kernel-protocol/invocation';
|
|
3
|
+
import type { HandlerResult } from '../invocation/index.js';
|
|
4
|
+
/** Admit one buffered binary result into the shared Invocation envelope. */
|
|
5
|
+
export declare function renderBinary(requestId: protocol.RequestId, invocation: protocol.InvocationId, binary: BufferedBinaryResult): protocol.BinaryResponse;
|
|
6
|
+
/** Admit a semantic redirect without selecting an HTTP or WebSocket binding. */
|
|
7
|
+
export declare function renderRedirect(requestId: protocol.RequestId, invocation: protocol.InvocationId, redirect: Extract<HandlerResult, {
|
|
8
|
+
readonly kind: 'redirect';
|
|
9
|
+
}>['redirect']): protocol.RedirectResponse;
|
|
10
|
+
/** Identify a binary producer whose lifetime stays with its transport. */
|
|
11
|
+
export declare function isStreamingBinary(input: Extract<HandlerResult, {
|
|
12
|
+
readonly kind: 'binary';
|
|
13
|
+
}>['value']): input is StreamingBinaryResult;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as protocol from '@astrale-os/kernel-protocol/invocation';
|
|
2
|
+
import { HTTP_ROUTE_MISS, HTTP_ROUTE_STALE } from '@astrale-os/kernel-protocol/routes';
|
|
3
|
+
/** Admit one buffered binary result into the shared Invocation envelope. */
|
|
4
|
+
export function renderBinary(requestId, invocation, binary) {
|
|
5
|
+
const reserved = Object.keys(binary.headers ?? {}).find((name) => {
|
|
6
|
+
const normalized = name.toLowerCase();
|
|
7
|
+
return (normalized === protocol.http.INVOCATION_FIELD ||
|
|
8
|
+
normalized === HTTP_ROUTE_STALE ||
|
|
9
|
+
normalized === HTTP_ROUTE_MISS);
|
|
10
|
+
});
|
|
11
|
+
if (reserved !== undefined)
|
|
12
|
+
throw new TypeError(`${reserved} is reserved by Protocol.`);
|
|
13
|
+
return protocol.decodeBinaryResponse({
|
|
14
|
+
kind: 'binary',
|
|
15
|
+
requestId,
|
|
16
|
+
invocation,
|
|
17
|
+
body: binary.body,
|
|
18
|
+
mediaType: binary.mediaType,
|
|
19
|
+
status: binary.status ?? 200,
|
|
20
|
+
...(binary.headers === undefined ? {} : { headers: binary.headers }),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/** Admit a semantic redirect without selecting an HTTP or WebSocket binding. */
|
|
24
|
+
export function renderRedirect(requestId, invocation, redirect) {
|
|
25
|
+
return protocol.decodeRedirectResponse({
|
|
26
|
+
kind: 'redirect',
|
|
27
|
+
requestId,
|
|
28
|
+
invocation,
|
|
29
|
+
redirect,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/** Identify a binary producer whose lifetime stays with its transport. */
|
|
33
|
+
export function isStreamingBinary(input) {
|
|
34
|
+
return !(input.body instanceof Uint8Array);
|
|
35
|
+
}
|
package/dist/transport/router.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { ErrorPayload } from '@astrale-os/kernel-protocol/errors';
|
|
2
2
|
/** A transport cancellation after stream.start necessarily follows the Function effect boundary. */
|
|
3
3
|
export declare function interruptedStreamError(timedOut: boolean): ErrorPayload;
|
|
4
|
-
//# sourceMappingURL=stream-error.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type * as protocol from '@astrale-os/kernel-protocol/invocation';
|
|
2
2
|
import type { ApplicationHost } from '../invocation/index.js';
|
|
3
3
|
/** Portable Fetch application; framework and listener APIs are adapter-owned. */
|
|
4
4
|
export interface Application {
|
|
@@ -26,4 +26,3 @@ export interface WebSocketUpgradeOptions {
|
|
|
26
26
|
export interface WebSocketAdapter {
|
|
27
27
|
upgrade(request: Request, options: WebSocketUpgradeOptions): Response | Promise<Response>;
|
|
28
28
|
}
|
|
29
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/transport/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Codec } from '@astrale-os/kernel-protocol/codecs';
|
|
2
2
|
import type { NextInvocationId } from '../../invocation/index.js';
|
|
3
3
|
import type { ActiveOperations } from '../../lifecycle/index.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { RequestServing } from '../../release/served.js';
|
|
5
5
|
import type { WebSocketHandlers } from '../types.js';
|
|
6
6
|
import { type ApplicationHost, type Handler } from '../../invocation/index.js';
|
|
7
7
|
export interface WebSocketSessionConfig {
|
|
@@ -13,9 +13,9 @@ export interface WebSocketSessionConfig {
|
|
|
13
13
|
readonly maximumRequestBytes: number;
|
|
14
14
|
readonly maximumResponseBytes: number;
|
|
15
15
|
readonly invocationTimeoutMs: number;
|
|
16
|
-
|
|
16
|
+
/** Present exactly when the Server serves a Release; bound to the upgrade. */
|
|
17
|
+
readonly serving?: RequestServing;
|
|
17
18
|
readonly host?: ApplicationHost;
|
|
18
19
|
}
|
|
19
20
|
/** Build one socket-pinned transport session. */
|
|
20
21
|
export declare function createWebSocketSession(config: WebSocketSessionConfig): WebSocketHandlers;
|
|
21
|
-
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as errors from '@astrale-os/kernel-protocol/errors';
|
|
2
2
|
import * as protocol from '@astrale-os/kernel-protocol/invocation';
|
|
3
|
-
import {
|
|
3
|
+
import { deploymentRetiredBody } from '@astrale-os/kernel-protocol/routes';
|
|
4
|
+
import { admissionRefusal, classifyError, classifyRequestError } from '../../errors/index.js';
|
|
4
5
|
import { ResponseBodyTooLargeError } from '../../errors/index.js';
|
|
5
|
-
import {
|
|
6
|
+
import { admitVia, invocationContext, } from '../../invocation/index.js';
|
|
7
|
+
import { pinned } from '../../release/served.js';
|
|
6
8
|
import { byteLength } from '../body.js';
|
|
7
9
|
import { resolveCredential } from '../credential.js';
|
|
8
|
-
import { renderBinary, renderRedirect } from '../
|
|
10
|
+
import { isStreamingBinary, renderBinary, renderRedirect } from '../result.js';
|
|
9
11
|
import { interruptedStreamError } from '../stream-error.js';
|
|
10
12
|
const WS_OPEN = 1;
|
|
11
13
|
/** Build one socket-pinned transport session. */
|
|
@@ -100,25 +102,23 @@ export function createWebSocketSession(config) {
|
|
|
100
102
|
}, sendOutput);
|
|
101
103
|
return;
|
|
102
104
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
+
const serving = config.serving;
|
|
106
|
+
const served = serving?.current();
|
|
107
|
+
if (serving !== undefined && served === undefined) {
|
|
105
108
|
await sendError(socket, admittedCodec, envelope.requestId, assigned, {
|
|
106
109
|
code: errors.CODES.BACKEND_UNAVAILABLE,
|
|
107
|
-
message: '
|
|
110
|
+
message: 'Release is unavailable.',
|
|
108
111
|
}, sendOutput);
|
|
109
112
|
return;
|
|
110
113
|
}
|
|
111
114
|
if (envelope.routing?.kind === 'via') {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
const decision = publicationRouteDecision(publication.publication, envelope.routing.publication);
|
|
120
|
-
if (decision.kind === 'rejected') {
|
|
121
|
-
await sendError(socket, admittedCodec, envelope.requestId, assigned, decision.error, sendOutput);
|
|
115
|
+
const decision = admitVia(served, envelope.routing);
|
|
116
|
+
if (decision.kind !== 'admitted') {
|
|
117
|
+
// A socket has no HTTP status: a retired deployment answers this request with the
|
|
118
|
+
// DEPLOYMENT_RETIRED error payload of the reserved control, correlated to its request.
|
|
119
|
+
await sendError(socket, admittedCodec, envelope.requestId, assigned, decision.kind === 'retired'
|
|
120
|
+
? deploymentRetiredBody(serving.deployment(), decision.release).error
|
|
121
|
+
: decision.error, sendOutput);
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
@@ -129,10 +129,7 @@ export function createWebSocketSession(config) {
|
|
|
129
129
|
}
|
|
130
130
|
const operation = config.active.begin(config.invocationTimeoutMs);
|
|
131
131
|
if (operation === undefined) {
|
|
132
|
-
await sendError(socket, admittedCodec, envelope.requestId, assigned,
|
|
133
|
-
code: errors.CODES.BACKEND_UNAVAILABLE,
|
|
134
|
-
message: 'server is unavailable.',
|
|
135
|
-
}, sendOutput);
|
|
132
|
+
await sendError(socket, admittedCodec, envelope.requestId, assigned, admissionRefusal(config.active.isAccepting), sendOutput);
|
|
136
133
|
return;
|
|
137
134
|
}
|
|
138
135
|
operations.set(key, operation);
|
|
@@ -145,7 +142,7 @@ export function createWebSocketSession(config) {
|
|
|
145
142
|
...(envelope.delegate === undefined ? {} : { delegate: envelope.delegate }),
|
|
146
143
|
...(envelope.routing?.kind === 'via' ? { via: envelope.routing } : {}),
|
|
147
144
|
...(envelope.schema === undefined ? {} : { schema: envelope.schema }),
|
|
148
|
-
...(
|
|
145
|
+
...(served === undefined ? {} : pinned(served)),
|
|
149
146
|
context: invocationContext(assigned, operation, config.active, config.host, undefined, envelope.idempotencyKey),
|
|
150
147
|
}));
|
|
151
148
|
await sendResult(socket, admittedCodec, envelope.requestId, assigned, result, operation, sendOutput);
|
|
@@ -155,14 +152,7 @@ export function createWebSocketSession(config) {
|
|
|
155
152
|
return;
|
|
156
153
|
}
|
|
157
154
|
if (socket.readyState === WS_OPEN) {
|
|
158
|
-
const error = operation
|
|
159
|
-
? {
|
|
160
|
-
code: errors.CODES.DEADLINE_EXCEEDED,
|
|
161
|
-
message: 'Invocation deadline exceeded.',
|
|
162
|
-
}
|
|
163
|
-
: operation.signal.aborted
|
|
164
|
-
? { code: errors.CODES.CANCELLED, message: 'Invocation was cancelled.' }
|
|
165
|
-
: classifyError(input);
|
|
155
|
+
const error = classifyRequestError(input, operation);
|
|
166
156
|
if (error.code === errors.CODES.INTERNAL_ERROR) {
|
|
167
157
|
socket.close(1011, 'Internal error');
|
|
168
158
|
return;
|
|
@@ -211,6 +201,17 @@ async function sendResult(socket, codec, requestId, assigned, result, operation,
|
|
|
211
201
|
await send(socket, codec, protocol.miss(requestId, assigned), sendOutput);
|
|
212
202
|
return;
|
|
213
203
|
case 'binary': {
|
|
204
|
+
if (isStreamingBinary(result.value)) {
|
|
205
|
+
const streaming = result.value;
|
|
206
|
+
await Promise.allSettled([
|
|
207
|
+
sendError(socket, codec, requestId, assigned, {
|
|
208
|
+
code: errors.CODES.UNSUPPORTED,
|
|
209
|
+
message: 'Streaming binary output requires the HTTP transport.',
|
|
210
|
+
}, sendOutput),
|
|
211
|
+
Promise.resolve().then(() => streaming.body[Symbol.asyncIterator]().return?.()),
|
|
212
|
+
]);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
214
215
|
const binary = renderBinary(requestId, assigned, result.value);
|
|
215
216
|
if (socket.readyState === WS_OPEN) {
|
|
216
217
|
await sendOutput(socket, protocol.websocket.encodeBinary(binary));
|
|
@@ -333,4 +334,3 @@ function isCancelRequest(input) {
|
|
|
333
334
|
!Array.isArray(input) &&
|
|
334
335
|
input.kind === 'cancel');
|
|
335
336
|
}
|
|
336
|
-
//# sourceMappingURL=session.js.map
|
|
@@ -2,7 +2,7 @@ import type { CorsPolicy } from '../../cors/index.js';
|
|
|
2
2
|
import type { ApplicationHost, Handler } from '../../invocation/index.js';
|
|
3
3
|
import type { NextInvocationId } from '../../invocation/index.js';
|
|
4
4
|
import type { ActiveOperations } from '../../lifecycle/index.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { RequestServing } from '../../release/served.js';
|
|
6
6
|
import type { WebSocketAdapter } from '../types.js';
|
|
7
7
|
export interface WebSocketHandlerConfig {
|
|
8
8
|
readonly request: Request;
|
|
@@ -14,8 +14,7 @@ export interface WebSocketHandlerConfig {
|
|
|
14
14
|
readonly maximumResponseBytes: number;
|
|
15
15
|
readonly invocationTimeoutMs: number;
|
|
16
16
|
readonly cors: CorsPolicy;
|
|
17
|
-
readonly
|
|
17
|
+
readonly serving?: RequestServing;
|
|
18
18
|
readonly host?: ApplicationHost;
|
|
19
19
|
}
|
|
20
20
|
export declare function handleWebSocketUpgrade(config: WebSocketHandlerConfig): Promise<Response>;
|
|
21
|
-
//# sourceMappingURL=upgrade.d.ts.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import * as protocol from '@astrale-os/kernel-protocol/invocation';
|
|
2
|
+
import { admissionRefusal, retryAfterHeaders } from '../../errors/index.js';
|
|
2
3
|
import { loadCodecs } from '../codecs.js';
|
|
3
4
|
import { createWebSocketSession } from './session.js';
|
|
4
5
|
export async function handleWebSocketUpgrade(config) {
|
|
5
6
|
if (!config.cors.allowsBrowserOrigin(config.request))
|
|
6
7
|
return failure(403);
|
|
7
8
|
const operation = config.active.begin(config.invocationTimeoutMs, config.request.signal);
|
|
8
|
-
if (operation === undefined)
|
|
9
|
-
|
|
9
|
+
if (operation === undefined) {
|
|
10
|
+
const retry = retryAfterHeaders(admissionRefusal(config.active.isAccepting));
|
|
11
|
+
return failure(503, { ...config.cors.response(config.request, Object.keys(retry)), ...retry });
|
|
12
|
+
}
|
|
10
13
|
try {
|
|
11
|
-
const supported =
|
|
14
|
+
const supported = loadCodecs();
|
|
12
15
|
const selection = protocol.websocket.selectSubprotocol(config.request.headers.get('sec-websocket-protocol'), supported);
|
|
13
16
|
if (selection === undefined)
|
|
14
17
|
return failure(400, config.cors.response(config.request));
|
|
@@ -23,9 +26,7 @@ export async function handleWebSocketUpgrade(config) {
|
|
|
23
26
|
maximumRequestBytes: config.maximumRequestBytes,
|
|
24
27
|
maximumResponseBytes: config.maximumResponseBytes,
|
|
25
28
|
invocationTimeoutMs: config.invocationTimeoutMs,
|
|
26
|
-
...(config.
|
|
27
|
-
? {}
|
|
28
|
-
: { currentPublication: config.currentPublication }),
|
|
29
|
+
...(config.serving === undefined ? {} : { serving: config.serving }),
|
|
29
30
|
...(config.host === undefined ? {} : { host: config.host }),
|
|
30
31
|
}),
|
|
31
32
|
signal: operation.signal,
|
|
@@ -44,4 +45,3 @@ function failure(status, input = {}) {
|
|
|
44
45
|
headers: { ...input, 'cache-control': 'no-store' },
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
|
-
//# sourceMappingURL=upgrade.js.map
|
package/dist/types.d.ts
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
import type { CorsConfig } from './cors/index.js';
|
|
2
2
|
import type { Handler, InvocationSource } from './invocation/index.js';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
3
|
+
import type { Context as ExchangeContext, Provider as ExchangeProvider } from './issuer/exchange.js';
|
|
4
|
+
import type { Issuer } from './issuer/index.js';
|
|
5
|
+
import type { Provider as DeliveryProvider } from './release/delivery/index.js';
|
|
6
|
+
import type { ReleaseSource } from './release/index.js';
|
|
6
7
|
import type { Application, WebSocketAdapter } from './transport/index.js';
|
|
7
8
|
export interface ServerLimits {
|
|
8
9
|
readonly maximumRequestBytes: number;
|
|
9
|
-
/**
|
|
10
|
+
/** Deployment cap for a streamed binary HTTP request; defaults to maximumRequestBytes. */
|
|
11
|
+
readonly maximumBinaryRequestBytes?: number;
|
|
12
|
+
/** Maximum bytes in one encoded envelope, buffered binary body, or stream frame. */
|
|
10
13
|
readonly maximumResponseBytes?: number;
|
|
11
14
|
/** Maximum Server-owned active operations across all mounted protocol surfaces. */
|
|
12
15
|
readonly maximumConcurrentOperations?: number;
|
|
13
|
-
|
|
16
|
+
/** Maximum bytes of each served discovery document (`release.json`). */
|
|
17
|
+
readonly maximumReleaseBytes?: number;
|
|
14
18
|
readonly maximumBundleBytes?: number;
|
|
15
19
|
readonly maximumDeliveryBytes?: number;
|
|
16
20
|
/** Maximum lifetime of one invocation, including a returned stream. */
|
|
17
21
|
readonly invocationTimeoutMs: number;
|
|
22
|
+
/** Binary request lifetime; defaults to invocationTimeoutMs. */
|
|
23
|
+
readonly binaryRequestTimeoutMs?: number;
|
|
24
|
+
/** Maximum wait for the next binary body chunk while a consumer is reading. */
|
|
25
|
+
readonly binaryRequestIdleTimeoutMs?: number;
|
|
26
|
+
/** Exact Host-selected callable Path whose ordinary JSON invocation may stream a large result. */
|
|
27
|
+
readonly binaryDownloadTarget?: string;
|
|
28
|
+
/** Required with binaryDownloadTarget; selected before semantic dispatch. */
|
|
29
|
+
readonly binaryDownloadTimeoutMs?: number;
|
|
18
30
|
}
|
|
19
31
|
export interface ServerCloseOptions {
|
|
20
32
|
/** Absolute Unix time in milliseconds after which active work is cancelled. */
|
|
@@ -37,10 +49,16 @@ export interface ServerOptions {
|
|
|
37
49
|
readonly probe: HealthProbe;
|
|
38
50
|
} | false;
|
|
39
51
|
readonly issuer?: Issuer;
|
|
52
|
+
/** Public HTTP origin for transport placement, independent of the stable issuer. */
|
|
53
|
+
readonly publicOrigin?: string;
|
|
40
54
|
/** Present only for the configured self issuer; owns verification and signing. */
|
|
41
55
|
readonly tokenExchange?: exchange.Provider;
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Exact release, bundle, Delivery v2 and native routes served by this deployment. With no
|
|
58
|
+
* source the Server serves no document and admits no routed call.
|
|
59
|
+
*/
|
|
60
|
+
readonly release?: ReleaseSource;
|
|
61
|
+
/** Required exactly when the current release advertises Delivery. */
|
|
44
62
|
readonly delivery?: DeliveryProvider;
|
|
45
63
|
readonly websocket?: WebSocketAdapter;
|
|
46
64
|
}
|
|
@@ -60,7 +78,12 @@ export interface Server {
|
|
|
60
78
|
export type { CorsConfig } from './cors/index.js';
|
|
61
79
|
export type { InvocationSource } from './invocation/index.js';
|
|
62
80
|
export type { ApplicationHost, ExecutionControl, Handler, HandlerRequest, HandlerResult, HandlerStream, InvocationContext, RequestBackground, RequestEvidence, RequestSleep, } from './invocation/index.js';
|
|
63
|
-
|
|
64
|
-
export
|
|
81
|
+
/** Public token-exchange provider contract; transport capture and mounting stay private. */
|
|
82
|
+
export declare namespace exchange {
|
|
83
|
+
type Context = ExchangeContext;
|
|
84
|
+
type Provider = ExchangeProvider;
|
|
85
|
+
}
|
|
86
|
+
export type { Issuer } from './issuer/index.js';
|
|
87
|
+
export type { Provider as DeliveryProvider } from './release/delivery/index.js';
|
|
88
|
+
export type { ReleaseSnapshot, ReleaseSnapshotInput, ReleaseSource } from './release/index.js';
|
|
65
89
|
export type { Application, WebSocketAdapter, WebSocketHandlers, WebSocketLike, WebSocketUpgradeOptions, } from './transport/index.js';
|
|
66
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.js
CHANGED