@syllm/brickly-test-host 0.12.0 → 0.12.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/host.cjs +14 -5
- package/dist/index.cjs +7 -2
- package/package.json +1 -1
package/dist/host.cjs
CHANGED
|
@@ -37546,7 +37546,7 @@ function decodeRpcStatus(bytes) {
|
|
|
37546
37546
|
while (reader.pos < reader.len) {
|
|
37547
37547
|
const tag = reader.uint32();
|
|
37548
37548
|
const field = tag >>> 3;
|
|
37549
|
-
if (field === 3) details.push(import_any.Any.decode(reader
|
|
37549
|
+
if (field === 3) details.push(import_any.Any.decode(reader.bytes()));
|
|
37550
37550
|
else if (field === 1) reader.int32();
|
|
37551
37551
|
else if (field === 2) reader.string();
|
|
37552
37552
|
else reader.skip(tag & 7);
|
|
@@ -41147,7 +41147,12 @@ function createHostDriver(testHost) {
|
|
|
41147
41147
|
}
|
|
41148
41148
|
function serializeError(error) {
|
|
41149
41149
|
const serviceError = error;
|
|
41150
|
-
|
|
41150
|
+
let brick;
|
|
41151
|
+
try {
|
|
41152
|
+
brick = unpackBrickError(serviceError);
|
|
41153
|
+
} catch {
|
|
41154
|
+
brick = void 0;
|
|
41155
|
+
}
|
|
41151
41156
|
return {
|
|
41152
41157
|
brickCode: brick?.code,
|
|
41153
41158
|
message: serviceError?.message ?? String(error),
|
|
@@ -41163,9 +41168,13 @@ async function main() {
|
|
|
41163
41168
|
const testHost = await startTestHost();
|
|
41164
41169
|
const driver = createHostDriver(testHost);
|
|
41165
41170
|
const control = (0, import_node_http.createServer)((request, response) => {
|
|
41166
|
-
void handle(request, response).catch(
|
|
41167
|
-
(
|
|
41168
|
-
|
|
41171
|
+
void handle(request, response).catch((error) => {
|
|
41172
|
+
process.stderr.write(
|
|
41173
|
+
`[test-host] \u63A7\u5236\u9762\u5185\u90E8\u9519\u8BEF: ${error instanceof Error ? error.stack ?? error.message : String(error)}
|
|
41174
|
+
`
|
|
41175
|
+
);
|
|
41176
|
+
reply(response, 500, { error: "control internal error" });
|
|
41177
|
+
});
|
|
41169
41178
|
});
|
|
41170
41179
|
async function handle(request, response) {
|
|
41171
41180
|
const url = request.url ?? "/";
|
package/dist/index.cjs
CHANGED
|
@@ -37558,7 +37558,7 @@ function decodeRpcStatus(bytes) {
|
|
|
37558
37558
|
while (reader.pos < reader.len) {
|
|
37559
37559
|
const tag = reader.uint32();
|
|
37560
37560
|
const field = tag >>> 3;
|
|
37561
|
-
if (field === 3) details.push(import_any.Any.decode(reader
|
|
37561
|
+
if (field === 3) details.push(import_any.Any.decode(reader.bytes()));
|
|
37562
37562
|
else if (field === 1) reader.int32();
|
|
37563
37563
|
else if (field === 2) reader.string();
|
|
37564
37564
|
else reader.skip(tag & 7);
|
|
@@ -41159,7 +41159,12 @@ function createHostDriver(testHost) {
|
|
|
41159
41159
|
}
|
|
41160
41160
|
function serializeError(error) {
|
|
41161
41161
|
const serviceError = error;
|
|
41162
|
-
|
|
41162
|
+
let brick;
|
|
41163
|
+
try {
|
|
41164
|
+
brick = unpackBrickError(serviceError);
|
|
41165
|
+
} catch {
|
|
41166
|
+
brick = void 0;
|
|
41167
|
+
}
|
|
41163
41168
|
return {
|
|
41164
41169
|
brickCode: brick?.code,
|
|
41165
41170
|
message: serviceError?.message ?? String(error),
|