@ferricstore/ferricstore 0.11.10 → 0.11.11
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/README.md +17 -3
- package/dist/index.cjs +13 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/docs/api/functions/httpCommandDisposition.html +1 -1
- package/docs/api/index.html +13 -3
- package/docs/api/types/HTTPCommandDisposition.html +1 -1
- package/docs/api/variables/FERRICSTORE_SDK_VERSION.html +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ Requires Node.js 22.22 or newer. The SDK ships ESM and CommonJS builds and is te
|
|
|
18
18
|
|
|
19
19
|
## Compatibility
|
|
20
20
|
|
|
21
|
-
TypeScript SDK `0.11.
|
|
22
|
-
FerricStore 0.11.
|
|
21
|
+
TypeScript SDK `0.11.11` requires FerricStore server `0.11.4` or newer. With
|
|
22
|
+
FerricStore 0.11.11 it negotiates compact Stream mode 34 for homogeneous auto-ID
|
|
23
23
|
`XADD` pipelines and compact Pub/Sub mode 35 for homogeneous `PUBLISH`
|
|
24
24
|
pipelines. Native wire protocol v1 and the generic fallback are unchanged.
|
|
25
25
|
Capabilities and response-size limits are negotiated
|
|
@@ -44,7 +44,7 @@ const { FerricStoreClient, JsonCodec } = require("@ferricstore/ferricstore");
|
|
|
44
44
|
docker run -p 6388:6388 \
|
|
45
45
|
-e FERRICSTORE_PROTECTED_MODE=false \
|
|
46
46
|
-v ferricstore_data:/data \
|
|
47
|
-
quay.io/ferricstore/ferricstore:0.11.
|
|
47
|
+
quay.io/ferricstore/ferricstore:0.11.11@sha256:d9f488539f0d6c1a513d2315e7a9c2947cc795b393f3774c9de8ba5e5b5c21b5
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Query durable runs
|
|
@@ -130,6 +130,20 @@ headers across origins, so configure only endpoints and redirect targets you
|
|
|
130
130
|
trust. Use `ferric://` or `ferrics://` whenever connection-local behavior is
|
|
131
131
|
required.
|
|
132
132
|
|
|
133
|
+
Run the complete HTTP-compatible integration surface through a real TLS
|
|
134
|
+
listener with ACL authentication using:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
FERRICSTORE_IMAGE=quay.io/ferricstore/ferricstore:0.11.11@sha256:d9f488539f0d6c1a513d2315e7a9c2947cc795b393f3774c9de8ba5e5b5c21b5 \
|
|
138
|
+
npm run test:integration:http
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
The runner creates a private CA, verifies that unauthenticated access and a
|
|
142
|
+
restricted user's forbidden `SET` are rejected, and sets
|
|
143
|
+
`FERRICSTORE_USERNAME`, `FERRICSTORE_PASSWORD`, and `FERRICSTORE_CA_FILE` for
|
|
144
|
+
the tests. Native-only subscriptions, topology, and session controls stay in
|
|
145
|
+
the native integration jobs.
|
|
146
|
+
|
|
133
147
|
## Cluster-aware client
|
|
134
148
|
|
|
135
149
|
For a single node, use `fromUrl`. For a FerricStore cluster, pass multiple seed URLs. The SDK fetches the server `SHARDS` topology, routes keyed commands to the current shard leader, and refuses learned hosts outside the seed-host trust set by default. The creation promise resolves only after startup and authentication succeed; cluster creation also waits for the initial topology, so connection failures reject the corresponding `await` directly.
|
package/dist/index.cjs
CHANGED
|
@@ -8704,6 +8704,9 @@ var sessionOnlyCommands = /* @__PURE__ */ new Set([
|
|
|
8704
8704
|
"CLIENT",
|
|
8705
8705
|
"DISCARD",
|
|
8706
8706
|
"EXEC",
|
|
8707
|
+
"FETCH_OR_COMPUTE",
|
|
8708
|
+
"FETCH_OR_COMPUTE_ERROR",
|
|
8709
|
+
"FETCH_OR_COMPUTE_RESULT",
|
|
8707
8710
|
"HELLO",
|
|
8708
8711
|
"MONITOR",
|
|
8709
8712
|
"MULTI",
|
|
@@ -8753,6 +8756,7 @@ var encoding = "ferricstore-json-v1";
|
|
|
8753
8756
|
var bytesMarker = "$ferricstore_bytes";
|
|
8754
8757
|
var mapMarker = "$ferricstore_map";
|
|
8755
8758
|
var maxDepth = 64;
|
|
8759
|
+
var integerJSON = /^-?(?:0|[1-9][0-9]*)$/u;
|
|
8756
8760
|
var bytesMarkerBaseBytes = import_node_buffer34.Buffer.byteLength(bytesMarker) + 7;
|
|
8757
8761
|
var mapMarkerBaseBytes = import_node_buffer34.Buffer.byteLength(mapMarker) + 7;
|
|
8758
8762
|
function encodeHTTPCommands(commands, maxBytes = Number.MAX_SAFE_INTEGER) {
|
|
@@ -8765,13 +8769,20 @@ function encodeHTTPCommands(commands, maxBytes = Number.MAX_SAFE_INTEGER) {
|
|
|
8765
8769
|
function decodeHTTPEnvelope(source) {
|
|
8766
8770
|
let parsed;
|
|
8767
8771
|
try {
|
|
8768
|
-
parsed = JSON.parse(source.toString("utf8"));
|
|
8772
|
+
parsed = JSON.parse(source.toString("utf8"), preserveIntegerPrecision);
|
|
8769
8773
|
} catch (error) {
|
|
8770
8774
|
throw new TypeError("invalid HTTP command response JSON", { cause: error });
|
|
8771
8775
|
}
|
|
8772
8776
|
if (!isRecord(parsed)) throw new TypeError("HTTP command response must be an object");
|
|
8773
8777
|
return decodePlainRecord(parsed, 0);
|
|
8774
8778
|
}
|
|
8779
|
+
function preserveIntegerPrecision(_key, value, context) {
|
|
8780
|
+
if (typeof value !== "number" || Number.isSafeInteger(value) || !Number.isInteger(value)) {
|
|
8781
|
+
return value;
|
|
8782
|
+
}
|
|
8783
|
+
const literal = context?.source;
|
|
8784
|
+
return literal != null && integerJSON.test(literal) ? BigInt(literal) : value;
|
|
8785
|
+
}
|
|
8775
8786
|
function encodeValue(value, depth, budget) {
|
|
8776
8787
|
if (depth > maxDepth) throw new TypeError("HTTP command value exceeds maximum depth");
|
|
8777
8788
|
if (value == null) {
|
|
@@ -21367,7 +21378,7 @@ var WorkflowWorker = class {
|
|
|
21367
21378
|
};
|
|
21368
21379
|
|
|
21369
21380
|
// src/version.ts
|
|
21370
|
-
var FERRICSTORE_SDK_VERSION = "0.11.
|
|
21381
|
+
var FERRICSTORE_SDK_VERSION = "0.11.11";
|
|
21371
21382
|
var FERRICSTORE_MINIMUM_SERVER_VERSION = "0.11.4";
|
|
21372
21383
|
var FERRICSTORE_NATIVE_PROTOCOL_VERSION = 1;
|
|
21373
21384
|
// Annotate the CommonJS export names for ESM import in node:
|