@astrale-os/kernel-client 0.6.0-beta.44 → 0.6.0-beta.46
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.
|
@@ -61,13 +61,17 @@ export class HttpTransport {
|
|
|
61
61
|
if (response.status >= 300 && response.status < 400) {
|
|
62
62
|
throw new ProtocolError('server returned a network redirect.');
|
|
63
63
|
}
|
|
64
|
-
requireNoStore(response);
|
|
65
64
|
const streamFraming = response.headers.get(protocol.http.STREAM_FRAMING_FIELD);
|
|
66
65
|
const binaryId = response.headers.get(protocol.http.REQUEST_ID_FIELD);
|
|
67
66
|
const binaryManifest = response.headers.get(protocol.http.BINARY_HEADERS_FIELD);
|
|
68
67
|
const binaryDelivery = response.headers.get(protocol.http.BINARY_DELIVERY_FIELD);
|
|
69
68
|
const hasStreamSignal = streamFraming !== null;
|
|
70
69
|
const hasBinarySignal = binaryId !== null || binaryManifest !== null || binaryDelivery !== null;
|
|
70
|
+
const responseCodec = await codecForResponse(response.headers.get('content-type'));
|
|
71
|
+
if (!response.ok && responseCodec === undefined && !hasStreamSignal && !hasBinarySignal) {
|
|
72
|
+
throw invocationFailure(`server returned HTTP ${response.status} without an invocation response.`, 'receive', { delivery: 'unknown' });
|
|
73
|
+
}
|
|
74
|
+
requireNoStore(response);
|
|
71
75
|
if (hasStreamSignal && hasBinarySignal) {
|
|
72
76
|
throw new ProtocolError('server returned conflicting stream and binary response signals.');
|
|
73
77
|
}
|
|
@@ -83,7 +87,6 @@ export class HttpTransport {
|
|
|
83
87
|
handedOff = true;
|
|
84
88
|
return binary;
|
|
85
89
|
}
|
|
86
|
-
const responseCodec = await codecForResponse(response.headers.get('content-type'));
|
|
87
90
|
if (responseCodec === undefined) {
|
|
88
91
|
throw new ProtocolError(`server returned unsupported Content-Type ${JSON.stringify(response.headers.get('content-type'))}.`);
|
|
89
92
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/kernel-client",
|
|
3
|
-
"version": "0.6.0-beta.
|
|
3
|
+
"version": "0.6.0-beta.46",
|
|
4
4
|
"description": "Universal Client — protocol-first, transport-agnostic",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astrale",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@astrale-os/kernel-core": "0.9.0-beta.
|
|
69
|
-
"@astrale-os/kernel-dsl": "0.2.0-beta.
|
|
70
|
-
"@astrale-os/kernel-protocol": "0.5.0-beta.
|
|
68
|
+
"@astrale-os/kernel-core": "0.9.0-beta.34",
|
|
69
|
+
"@astrale-os/kernel-dsl": "0.2.0-beta.25",
|
|
70
|
+
"@astrale-os/kernel-protocol": "0.5.0-beta.37",
|
|
71
71
|
"@tanstack/pacer": "0.20.1",
|
|
72
72
|
"msgpackr": "^2.0.5"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@astrale-os/kernel-server": "0.5.0-beta.
|
|
75
|
+
"@astrale-os/kernel-server": "0.5.0-beta.39",
|
|
76
76
|
"@astrale/typescript-config": "npm:@jsr/astrale__typescript-config@~1.1.0",
|
|
77
77
|
"@types/node": "^22.0.0",
|
|
78
78
|
"typescript": "7.0.2",
|