@ac-kit/format-netstring 0.1.12 → 0.1.13
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,34 @@
|
|
|
1
1
|
# @ac-kit/format-netstring
|
|
2
2
|
|
|
3
|
+
## 0.1.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5c203e7: Encoded bytes, digests and tags are typed `Uint8Array<ArrayBuffer>`, so they
|
|
8
|
+
are `BufferSource`s and go straight to `crypto.subtle` or any other Web API
|
|
9
|
+
without a cast:
|
|
10
|
+
|
|
11
|
+
- `@ac-kit/crypto-hash`: `sha224`, `sha3_224`, `sha3_256`, `sha3_384`,
|
|
12
|
+
`sha3_512`, `shake128`, `shake256` and every sink's `digest`, like the other
|
|
13
|
+
digests already were. Every digest is a fresh array spanning the whole of its
|
|
14
|
+
own plain buffer.
|
|
15
|
+
- `@ac-kit/crypto-mac`: `hmacMd5` and `hmacSha224`, like the other wrappers.
|
|
16
|
+
A tag truncated with `tagLengthBytes` is a view of the full digest's buffer,
|
|
17
|
+
not a copy.
|
|
18
|
+
- `@ac-kit/fixture-util`: `fetchArtifact`.
|
|
19
|
+
- `@ac-kit/format-asn1`: `berEncode`, `cerEncode` and `derEncode`, always a
|
|
20
|
+
fresh array over the whole of a plain buffer. `berEncode` now copies a
|
|
21
|
+
top-level ANY value instead of returning the caller's array, as `cerEncode`
|
|
22
|
+
and `derEncode` already did.
|
|
23
|
+
- `@ac-kit/format-cbor`: `encodeCbor`.
|
|
24
|
+
- `@ac-kit/format-netstring`: `encodeNetstring`.
|
|
25
|
+
- Updated dependencies [5c203e7]
|
|
26
|
+
- Updated dependencies [5c203e7]
|
|
27
|
+
- Updated dependencies [5c203e7]
|
|
28
|
+
- Updated dependencies [5c203e7]
|
|
29
|
+
- @ac-kit/core@0.14.0
|
|
30
|
+
- @ac-kit/format-core@0.5.1
|
|
31
|
+
|
|
3
32
|
## 0.1.12
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -10,9 +10,12 @@ export declare function createNetstringEncoder(): Encoder<Uint8Array | string>;
|
|
|
10
10
|
* buffer. Strings are treated as UTF-8.
|
|
11
11
|
*
|
|
12
12
|
* A utility over the same framing the encoder emits, not a second
|
|
13
|
-
* implementation: it only concatenates the vectored parts.
|
|
13
|
+
* implementation: it only concatenates the vectored parts. The result is always
|
|
14
|
+
* freshly allocated over the whole of its own plain (never shared)
|
|
15
|
+
* `ArrayBuffer`, so it is a `BufferSource`: the payload is copied in, never
|
|
16
|
+
* aliased.
|
|
14
17
|
*/
|
|
15
|
-
export declare function encodeNetstring(data: Uint8Array | string): Uint8Array
|
|
18
|
+
export declare function encodeNetstring(data: Uint8Array | string): Uint8Array<ArrayBuffer>;
|
|
16
19
|
/**
|
|
17
20
|
* Encodes `Uint8Array` or string payloads as netstring frames
|
|
18
21
|
* (`length:payload,`). Strings are treated as UTF-8.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"netstring-encoder.d.ts","sourceRoot":"","sources":["../../src/netstring/netstring-encoder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAgBjE;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CAErE;AAED
|
|
1
|
+
{"version":3,"file":"netstring-encoder.d.ts","sourceRoot":"","sources":["../../src/netstring/netstring-encoder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAgBjE;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CAErE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC9B,IAAI,EAAE,UAAU,GAAG,MAAM,GACvB,UAAU,CAAC,WAAW,CAAC,CAEzB;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,UAAU,GAAG,MAAM,CAAC;IAC3E,cAEC;CACD"}
|
|
@@ -25,7 +25,10 @@ export function createNetstringEncoder() {
|
|
|
25
25
|
* buffer. Strings are treated as UTF-8.
|
|
26
26
|
*
|
|
27
27
|
* A utility over the same framing the encoder emits, not a second
|
|
28
|
-
* implementation: it only concatenates the vectored parts.
|
|
28
|
+
* implementation: it only concatenates the vectored parts. The result is always
|
|
29
|
+
* freshly allocated over the whole of its own plain (never shared)
|
|
30
|
+
* `ArrayBuffer`, so it is a `BufferSource`: the payload is copied in, never
|
|
31
|
+
* aliased.
|
|
29
32
|
*/
|
|
30
33
|
export function encodeNetstring(data) {
|
|
31
34
|
return concatBytes(...encodeParts(data));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"netstring-encoder.js","sourceRoot":"","sources":["../../src/netstring/netstring-encoder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAgB,MAAM,qBAAqB,CAAC;AAEjE,MAAM,YAAY,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;AAEzC;;;;;;GAMG;AACH,SAAS,WAAW,CAAC,IAAyB;IAC7C,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACvE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AACtE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB;IACrC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAChC,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"netstring-encoder.js","sourceRoot":"","sources":["../../src/netstring/netstring-encoder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAgB,MAAM,qBAAqB,CAAC;AAEjE,MAAM,YAAY,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;AAEzC;;;;;;GAMG;AACH,SAAS,WAAW,CAAC,IAAyB;IAC7C,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACvE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;AACtE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB;IACrC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAChC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAC9B,IAAyB;IAEzB,OAAO,WAAW,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,qBAAsB,SAAQ,YAAiC;IAC3E;QACC,KAAK,CAAC,sBAAsB,EAAE,CAAC,CAAC;IACjC,CAAC;CACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ac-kit/format-netstring",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Netstring framing: a decoder, an encoder, the codec pairing them, and TransformStreams over both.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codec",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"prepack": "yarn build"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ac-kit/core": "^0.
|
|
48
|
-
"@ac-kit/format-core": "^0.5.
|
|
47
|
+
"@ac-kit/core": "^0.14.0",
|
|
48
|
+
"@ac-kit/format-core": "^0.5.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@ac-kit/tsconfig": "0.1.0",
|
|
52
52
|
"@ac-kit/typedoc-config": "0.1.0",
|
|
53
|
-
"@ac-kit/vitest-config": "0.
|
|
53
|
+
"@ac-kit/vitest-config": "0.3.0",
|
|
54
54
|
"@types/node": "^26.5.1",
|
|
55
55
|
"@typescript/native": "typescript@7.0.2",
|
|
56
56
|
"rimraf": "6.1.4",
|