@ac-kit/integration-test-util 0.3.0 → 0.4.0

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,49 @@
1
1
  # @ac-kit/integration-test-util
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5075202: HTTP/3, over a multiplexed connection contract.
8
+
9
+ - `net-core`: `IMultiplexedConnection` and `IMultiplexedStream` — a secure
10
+ connection carrying many streams, each a `Transport` that either side can
11
+ reset or stop on its own — with `MultiplexedStreamHandlers` and the errors a
12
+ reset, a stop or the connection's end report. `Connector` is now generic over
13
+ what it establishes, like `IListener`.
14
+ - `async`: `staggeredRace`, RFC 8305 connection racing for any candidates.
15
+ - `format-varint`: QUIC variable-length integers (RFC 9000 §16) —
16
+ `readQuicVarint`, `readBigQuicVarint` (the whole 62-bit range, as a
17
+ `bigint`), `writeQuicVarint`, `encodeQuicVarint`, `quicVarintByteLength` and
18
+ `quicVarintEncodedLength`.
19
+ - `format-http`: `QpackDecoder` (RFC 9204, dynamic table and blocked streams)
20
+ and `QpackEncoder` (static table and literals); `Http3FrameDecoder` and
21
+ `encodeHttp3Frame` for HTTP/3 frames (RFC 9114), with DATA streamed in
22
+ pieces; `Http3Settings`, `Http3StreamType`, `Http3Error` and
23
+ `Http3ErrorCode`. `parseAltSvc` and `tryParseAltSvc` read the `Alt-Svc`
24
+ field (RFC 7838), `AltSvcSyntaxError` reporting a malformed one.
25
+ - `net-http`: `Http3ServerConnection` and `Http3ClientConnection`, with
26
+ trailers, GOAWAY and extended `CONNECT` tunnels (RFC 9220). `HttpServer`
27
+ serves HTTP/3 on multiplexed listeners with its `http3` option; `HttpAgent`
28
+ reaches `https:` origins over HTTP/3 with its own: those advertising it
29
+ through `Alt-Svc`, raced against TCP and falling back to it, or every one
30
+ with `priorKnowledge`.
31
+ - `net-quic`: first release. `QuicListener` and `createQuicConnector` over a
32
+ native quiche binding; the binding of each platform is its own optional
33
+ package, `@ac-kit/net-quic-<platform>`. A client's UDP socket is connected,
34
+ so a refused port fails the attempt at once.
35
+ - `node`: `DgramSocket.connect`, `disconnect`, `remoteAddress` and
36
+ `sendConnected`, for a UDP socket bound to one remote endpoint.
37
+ - `integration-test-util`: `createSelfSignedCertificate` takes the names the
38
+ certificate is valid for.
39
+ - `net-websocket`: documented over HTTP/3, which needed no change.
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [5075202]
44
+ - @ac-kit/node@0.5.0
45
+ - @ac-kit/cmd-docker@0.2.3
46
+
3
47
  ## 0.3.0
4
48
 
5
49
  ### 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;;;;;;;;;GASG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAgClF"}
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
- "subjectAltName=DNS:localhost,IP:127.0.0.1",
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;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B;IAChD,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC;IAC/D,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAC7C,MAAM,aAAa,CAAC,SAAS,EAAE;YAC9B,KAAK;YACL,OAAO;YACP,SAAS;YACT,IAAI;YACJ,UAAU;YACV,yBAAyB;YACzB,QAAQ;YACR,OAAO;YACP,GAAG;YACH,OAAO;YACP,eAAe;YACf,SAAS;YACT,2CAA2C;YAC3C,SAAS;YACT,OAAO;YACP,MAAM;YACN,QAAQ;SACR,CAAC,CAAC;QACH,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;YACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;SAC1B,CAAC,CAAC;QACH,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IACtB,CAAC;YAAS,CAAC;QACV,MAAM,EAAE,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;AACF,CAAC"}
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;A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,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ac-kit/integration-test-util",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
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.2",
41
+ "@ac-kit/cmd-docker": "^0.2.3",
42
42
  "@ac-kit/core": "^0.5.0",
43
43
  "@ac-kit/crypto-random": "^0.1.0",
44
- "@ac-kit/node": "^0.4.0",
44
+ "@ac-kit/node": "^0.5.0",
45
45
  "type-fest": "^5.8.0"
46
46
  },
47
47
  "devDependencies": {