@ac-kit/integration-test-util 0.3.0 → 0.4.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,59 @@
|
|
|
1
1
|
# @ac-kit/integration-test-util
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [47e39a2]
|
|
8
|
+
- Updated dependencies [1b026a8]
|
|
9
|
+
- @ac-kit/core@0.6.0
|
|
10
|
+
- @ac-kit/node@0.6.0
|
|
11
|
+
- @ac-kit/cmd-docker@0.2.4
|
|
12
|
+
|
|
13
|
+
## 0.4.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 5075202: HTTP/3, over a multiplexed connection contract.
|
|
18
|
+
|
|
19
|
+
- `net-core`: `IMultiplexedConnection` and `IMultiplexedStream` — a secure
|
|
20
|
+
connection carrying many streams, each a `Transport` that either side can
|
|
21
|
+
reset or stop on its own — with `MultiplexedStreamHandlers` and the errors a
|
|
22
|
+
reset, a stop or the connection's end report. `Connector` is now generic over
|
|
23
|
+
what it establishes, like `IListener`.
|
|
24
|
+
- `async`: `staggeredRace`, RFC 8305 connection racing for any candidates.
|
|
25
|
+
- `format-varint`: QUIC variable-length integers (RFC 9000 §16) —
|
|
26
|
+
`readQuicVarint`, `readBigQuicVarint` (the whole 62-bit range, as a
|
|
27
|
+
`bigint`), `writeQuicVarint`, `encodeQuicVarint`, `quicVarintByteLength` and
|
|
28
|
+
`quicVarintEncodedLength`.
|
|
29
|
+
- `format-http`: `QpackDecoder` (RFC 9204, dynamic table and blocked streams)
|
|
30
|
+
and `QpackEncoder` (static table and literals); `Http3FrameDecoder` and
|
|
31
|
+
`encodeHttp3Frame` for HTTP/3 frames (RFC 9114), with DATA streamed in
|
|
32
|
+
pieces; `Http3Settings`, `Http3StreamType`, `Http3Error` and
|
|
33
|
+
`Http3ErrorCode`. `parseAltSvc` and `tryParseAltSvc` read the `Alt-Svc`
|
|
34
|
+
field (RFC 7838), `AltSvcSyntaxError` reporting a malformed one.
|
|
35
|
+
- `net-http`: `Http3ServerConnection` and `Http3ClientConnection`, with
|
|
36
|
+
trailers, GOAWAY and extended `CONNECT` tunnels (RFC 9220). `HttpServer`
|
|
37
|
+
serves HTTP/3 on multiplexed listeners with its `http3` option; `HttpAgent`
|
|
38
|
+
reaches `https:` origins over HTTP/3 with its own: those advertising it
|
|
39
|
+
through `Alt-Svc`, raced against TCP and falling back to it, or every one
|
|
40
|
+
with `priorKnowledge`.
|
|
41
|
+
- `net-quic`: first release. `QuicListener` and `createQuicConnector` over a
|
|
42
|
+
native quiche binding; the binding of each platform is its own optional
|
|
43
|
+
package, `@ac-kit/net-quic-<platform>`. A client's UDP socket is connected,
|
|
44
|
+
so a refused port fails the attempt at once.
|
|
45
|
+
- `node`: `DgramSocket.connect`, `disconnect`, `remoteAddress` and
|
|
46
|
+
`sendConnected`, for a UDP socket bound to one remote endpoint.
|
|
47
|
+
- `integration-test-util`: `createSelfSignedCertificate` takes the names the
|
|
48
|
+
certificate is valid for.
|
|
49
|
+
- `net-websocket`: documented over HTTP/3, which needed no change.
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [5075202]
|
|
54
|
+
- @ac-kit/node@0.5.0
|
|
55
|
+
- @ac-kit/cmd-docker@0.2.3
|
|
56
|
+
|
|
3
57
|
## 0.3.0
|
|
4
58
|
|
|
5
59
|
### Minor Changes
|
|
@@ -11,7 +11,10 @@ export type SelfSignedCertificate = {
|
|
|
11
11
|
* Uses the `openssl` command, which must be on the `PATH`, with an ECDSA P-256
|
|
12
12
|
* key valid for one day. Takes tens of milliseconds: create one per suite.
|
|
13
13
|
*
|
|
14
|
+
* @param subjectAltNames The names the certificate is valid for, in OpenSSL's
|
|
15
|
+
* `subjectAltName` syntax. Defaults to `localhost` and `127.0.0.1`; a test of
|
|
16
|
+
* name verification passes others.
|
|
14
17
|
* @throws When `openssl` is missing or fails.
|
|
15
18
|
*/
|
|
16
|
-
export declare function createSelfSignedCertificate(): Promise<SelfSignedCertificate>;
|
|
19
|
+
export declare function createSelfSignedCertificate(subjectAltNames?: readonly string[]): Promise<SelfSignedCertificate>;
|
|
17
20
|
//# sourceMappingURL=create-self-signed-certificate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-self-signed-certificate.d.ts","sourceRoot":"","sources":["../../src/tls/create-self-signed-certificate.ts"],"names":[],"mappings":"AAQA,sDAAsD;AACtD,MAAM,MAAM,qBAAqB,GAAG;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"create-self-signed-certificate.d.ts","sourceRoot":"","sources":["../../src/tls/create-self-signed-certificate.ts"],"names":[],"mappings":"AAQA,sDAAsD;AACtD,MAAM,MAAM,qBAAqB,GAAG;IACnC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAsB,2BAA2B,CAChD,eAAe,GAAE,SAAS,MAAM,EAAsC,GACpE,OAAO,CAAC,qBAAqB,CAAC,CAgChC"}
|
|
@@ -12,9 +12,12 @@ const execFileAsync = promisify(execFile);
|
|
|
12
12
|
* Uses the `openssl` command, which must be on the `PATH`, with an ECDSA P-256
|
|
13
13
|
* key valid for one day. Takes tens of milliseconds: create one per suite.
|
|
14
14
|
*
|
|
15
|
+
* @param subjectAltNames The names the certificate is valid for, in OpenSSL's
|
|
16
|
+
* `subjectAltName` syntax. Defaults to `localhost` and `127.0.0.1`; a test of
|
|
17
|
+
* name verification passes others.
|
|
15
18
|
* @throws When `openssl` is missing or fails.
|
|
16
19
|
*/
|
|
17
|
-
export async function createSelfSignedCertificate() {
|
|
20
|
+
export async function createSelfSignedCertificate(subjectAltNames = ["DNS:localhost", "IP:127.0.0.1"]) {
|
|
18
21
|
const directory = await mkdtemp(join(tmpdir(), "ac-kit-tls-"));
|
|
19
22
|
try {
|
|
20
23
|
const keyPath = join(directory, "key.pem");
|
|
@@ -32,7 +35,7 @@ export async function createSelfSignedCertificate() {
|
|
|
32
35
|
"-subj",
|
|
33
36
|
"/CN=localhost",
|
|
34
37
|
"-addext",
|
|
35
|
-
|
|
38
|
+
`subjectAltName=${subjectAltNames.join(",")}`,
|
|
36
39
|
"-keyout",
|
|
37
40
|
keyPath,
|
|
38
41
|
"-out",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-self-signed-certificate.js","sourceRoot":"","sources":["../../src/tls/create-self-signed-certificate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAQ1C
|
|
1
|
+
{"version":3,"file":"create-self-signed-certificate.js","sourceRoot":"","sources":["../../src/tls/create-self-signed-certificate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OA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
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Test helpers that drive and probe external services — Docker containers, TCP and TLS banner checks — from a package's integration tests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docker",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"prepack": "yarn build"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@ac-kit/cmd-docker": "^0.2.
|
|
42
|
-
"@ac-kit/core": "^0.
|
|
41
|
+
"@ac-kit/cmd-docker": "^0.2.4",
|
|
42
|
+
"@ac-kit/core": "^0.6.0",
|
|
43
43
|
"@ac-kit/crypto-random": "^0.1.0",
|
|
44
|
-
"@ac-kit/node": "^0.
|
|
44
|
+
"@ac-kit/node": "^0.6.0",
|
|
45
45
|
"type-fest": "^5.8.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"rimraf": "6.1.4",
|
|
54
54
|
"typedoc": "0.28.20",
|
|
55
55
|
"typescript": "@typescript/typescript6@6.0.2",
|
|
56
|
-
"vite": "8.3.
|
|
56
|
+
"vite": "8.3.7",
|
|
57
57
|
"vitest": "5.1.0"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|