@durable-streams/client-conformance-tests 0.2.9 → 0.2.10
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/adapters/typescript-adapter.cjs +1 -1
- package/dist/adapters/typescript-adapter.js +1 -1
- package/dist/{benchmark-runner-BQiarXdy.cjs → benchmark-runner-BZB5Nwsl.cjs} +1 -1
- package/dist/{benchmark-runner-IGT51RTF.js → benchmark-runner-Dqg7zMvB.js} +1 -1
- package/dist/cli.cjs +2 -2
- package/dist/cli.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/{protocol-sDk3deGa.cjs → protocol-DiMr0Kml.cjs} +5 -2
- package/dist/{protocol-BnqUAMKe.js → protocol-JumvT5Vs.js} +5 -2
- package/dist/protocol.cjs +1 -1
- package/dist/protocol.js +1 -1
- package/package.json +2 -2
- package/src/protocol.ts +8 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
const require_chunk = require('../chunk-BCwAaXi7.cjs');
|
|
4
|
-
const require_protocol = require('../protocol-
|
|
4
|
+
const require_protocol = require('../protocol-DiMr0Kml.cjs');
|
|
5
5
|
const node_readline = require_chunk.__toESM(require("node:readline"));
|
|
6
6
|
const __durable_streams_client = require_chunk.__toESM(require("@durable-streams/client"));
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { ErrorCodes, decodeBase64, parseCommand, serializeResult } from "../protocol-
|
|
2
|
+
import { ErrorCodes, decodeBase64, parseCommand, serializeResult } from "../protocol-JumvT5Vs.js";
|
|
3
3
|
import { createInterface } from "node:readline";
|
|
4
4
|
import { DurableStream, DurableStreamError, FetchError, IdempotentProducer, StreamClosedError, stream } from "@durable-streams/client";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./chunk-BCwAaXi7.cjs');
|
|
3
|
-
const require_protocol = require('./protocol-
|
|
3
|
+
const require_protocol = require('./protocol-DiMr0Kml.cjs');
|
|
4
4
|
const node_child_process = require_chunk.__toESM(require("node:child_process"));
|
|
5
5
|
const node_readline = require_chunk.__toESM(require("node:readline"));
|
|
6
6
|
const node_crypto = require_chunk.__toESM(require("node:crypto"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { calculateStats, formatStats, parseResult, serializeCommand } from "./protocol-
|
|
1
|
+
import { calculateStats, formatStats, parseResult, serializeCommand } from "./protocol-JumvT5Vs.js";
|
|
2
2
|
import { spawn } from "node:child_process";
|
|
3
3
|
import { createInterface } from "node:readline";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
package/dist/cli.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
require('./protocol-
|
|
4
|
-
const require_benchmark_runner = require('./benchmark-runner-
|
|
3
|
+
require('./protocol-DiMr0Kml.cjs');
|
|
4
|
+
const require_benchmark_runner = require('./benchmark-runner-BZB5Nwsl.cjs');
|
|
5
5
|
|
|
6
6
|
//#region src/cli.ts
|
|
7
7
|
const HELP = `
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./protocol-
|
|
3
|
-
import { aggregateBenchmarkResults, runBenchmarks, runConformanceTests } from "./benchmark-runner-
|
|
2
|
+
import "./protocol-JumvT5Vs.js";
|
|
3
|
+
import { aggregateBenchmarkResults, runBenchmarks, runConformanceTests } from "./benchmark-runner-Dqg7zMvB.js";
|
|
4
4
|
|
|
5
5
|
//#region src/cli.ts
|
|
6
6
|
const HELP = `
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_protocol = require('./protocol-
|
|
2
|
-
const require_benchmark_runner = require('./benchmark-runner-
|
|
1
|
+
const require_protocol = require('./protocol-DiMr0Kml.cjs');
|
|
2
|
+
const require_benchmark_runner = require('./benchmark-runner-BZB5Nwsl.cjs');
|
|
3
3
|
|
|
4
4
|
exports.ErrorCodes = require_protocol.ErrorCodes
|
|
5
5
|
exports.allScenarios = require_benchmark_runner.allScenarios
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorCodes, calculateStats, decodeBase64, encodeBase64, formatStats, parseCommand, parseResult, serializeCommand, serializeResult } from "./protocol-
|
|
2
|
-
import { allScenarios, countTests, filterByCategory, getScenarioById, getScenariosByCategory, loadEmbeddedTestSuites, loadTestSuites, runBenchmarks, runConformanceTests, scenariosByCategory } from "./benchmark-runner-
|
|
1
|
+
import { ErrorCodes, calculateStats, decodeBase64, encodeBase64, formatStats, parseCommand, parseResult, serializeCommand, serializeResult } from "./protocol-JumvT5Vs.js";
|
|
2
|
+
import { allScenarios, countTests, filterByCategory, getScenarioById, getScenariosByCategory, loadEmbeddedTestSuites, loadTestSuites, runBenchmarks, runConformanceTests, scenariosByCategory } from "./benchmark-runner-Dqg7zMvB.js";
|
|
3
3
|
|
|
4
4
|
export { ErrorCodes, allScenarios, calculateStats, countTests, decodeBase64, encodeBase64, filterByCategory, formatStats, getScenarioById, getScenariosByCategory, loadEmbeddedTestSuites, loadTestSuites, parseCommand, parseResult, runBenchmarks, runConformanceTests, scenariosByCategory, serializeCommand, serializeResult };
|
|
@@ -11,7 +11,7 @@ function parseCommand(line) {
|
|
|
11
11
|
* Serialize a TestResult to a JSON line.
|
|
12
12
|
*/
|
|
13
13
|
function serializeResult(result) {
|
|
14
|
-
return
|
|
14
|
+
return serializeJsonLine(result);
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Parse a JSON line into a TestResult.
|
|
@@ -23,7 +23,10 @@ function parseResult(line) {
|
|
|
23
23
|
* Serialize a TestCommand to a JSON line.
|
|
24
24
|
*/
|
|
25
25
|
function serializeCommand(command) {
|
|
26
|
-
return
|
|
26
|
+
return serializeJsonLine(command);
|
|
27
|
+
}
|
|
28
|
+
function serializeJsonLine(value) {
|
|
29
|
+
return JSON.stringify(value).replace(/[\u2028\u2029]/g, (char) => char === `\u2028` ? `\\u2028` : `\\u2029`);
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
29
32
|
* Encode binary data to base64 for transmission.
|
|
@@ -9,7 +9,7 @@ function parseCommand(line) {
|
|
|
9
9
|
* Serialize a TestResult to a JSON line.
|
|
10
10
|
*/
|
|
11
11
|
function serializeResult(result) {
|
|
12
|
-
return
|
|
12
|
+
return serializeJsonLine(result);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Parse a JSON line into a TestResult.
|
|
@@ -21,7 +21,10 @@ function parseResult(line) {
|
|
|
21
21
|
* Serialize a TestCommand to a JSON line.
|
|
22
22
|
*/
|
|
23
23
|
function serializeCommand(command) {
|
|
24
|
-
return
|
|
24
|
+
return serializeJsonLine(command);
|
|
25
|
+
}
|
|
26
|
+
function serializeJsonLine(value) {
|
|
27
|
+
return JSON.stringify(value).replace(/[\u2028\u2029]/g, (char) => char === `\u2028` ? `\\u2028` : `\\u2029`);
|
|
25
28
|
}
|
|
26
29
|
/**
|
|
27
30
|
* Encode binary data to base64 for transmission.
|
package/dist/protocol.cjs
CHANGED
package/dist/protocol.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ErrorCodes, calculateStats, decodeBase64, encodeBase64, formatStats, parseCommand, parseResult, serializeCommand, serializeResult } from "./protocol-
|
|
1
|
+
import { ErrorCodes, calculateStats, decodeBase64, encodeBase64, formatStats, parseCommand, parseResult, serializeCommand, serializeResult } from "./protocol-JumvT5Vs.js";
|
|
2
2
|
|
|
3
3
|
export { ErrorCodes, calculateStats, decodeBase64, encodeBase64, formatStats, parseCommand, parseResult, serializeCommand, serializeResult };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@durable-streams/client-conformance-tests",
|
|
3
3
|
"description": "Conformance test suite for Durable Streams client implementations (producer and consumer)",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.10",
|
|
5
5
|
"author": "Durable Stream contributors",
|
|
6
6
|
"bin": {
|
|
7
7
|
"client-conformance-tests": "./dist/cli.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"tsx": "^4.19.2",
|
|
16
16
|
"yaml": "^2.7.1",
|
|
17
17
|
"@durable-streams/client": "0.2.6",
|
|
18
|
-
"@durable-streams/server": "0.3.
|
|
18
|
+
"@durable-streams/server": "0.3.6"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"tsdown": "^0.9.0",
|
package/src/protocol.ts
CHANGED
|
@@ -744,7 +744,7 @@ export function parseCommand(line: string): TestCommand {
|
|
|
744
744
|
* Serialize a TestResult to a JSON line.
|
|
745
745
|
*/
|
|
746
746
|
export function serializeResult(result: TestResult): string {
|
|
747
|
-
return
|
|
747
|
+
return serializeJsonLine(result)
|
|
748
748
|
}
|
|
749
749
|
|
|
750
750
|
/**
|
|
@@ -758,7 +758,13 @@ export function parseResult(line: string): TestResult {
|
|
|
758
758
|
* Serialize a TestCommand to a JSON line.
|
|
759
759
|
*/
|
|
760
760
|
export function serializeCommand(command: TestCommand): string {
|
|
761
|
-
return
|
|
761
|
+
return serializeJsonLine(command)
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
function serializeJsonLine(value: unknown): string {
|
|
765
|
+
return JSON.stringify(value).replace(/[\u2028\u2029]/g, (char) =>
|
|
766
|
+
char === `\u2028` ? `\\u2028` : `\\u2029`
|
|
767
|
+
)
|
|
762
768
|
}
|
|
763
769
|
|
|
764
770
|
/**
|