@kubun/hub 0.17.1 → 0.17.2
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/lib/create-relay.d.ts +16 -0
- package/lib/index.d.ts +12 -0
- package/package.json +1 -1
package/lib/create-relay.d.ts
CHANGED
|
@@ -38,6 +38,20 @@ export type CreateRelayOptions = {
|
|
|
38
38
|
* disable the limit for high-op-rate use.
|
|
39
39
|
*/
|
|
40
40
|
rateLimits?: Partial<HubRateLimits>;
|
|
41
|
+
/**
|
|
42
|
+
* Max size (bytes) of a single relayed RPC request body, forwarded to
|
|
43
|
+
* `@enkaku/http-serve` `ServerTransport`. A body past this is rejected with
|
|
44
|
+
* HTTP 413 before it reaches the hub handlers. Omitted, `@kubun/hub`'s 8 MiB
|
|
45
|
+
* default applies (raised from the transport's own 1 MiB), so a full-scope
|
|
46
|
+
* merkle reconciliation of a modest graph is carried without opting in.
|
|
47
|
+
*/
|
|
48
|
+
maxRequestBodySize?: number;
|
|
49
|
+
/**
|
|
50
|
+
* Max buffered bytes per server→client session, forwarded to
|
|
51
|
+
* `@enkaku/http-serve` `ServerTransport`. Omitted, `@kubun/hub`'s 8 MiB
|
|
52
|
+
* default applies (raised from the transport's own 1 MiB).
|
|
53
|
+
*/
|
|
54
|
+
maxSessionBufferBytes?: number;
|
|
41
55
|
retention?: RelayRetentionConfig;
|
|
42
56
|
defaultRetention?: number;
|
|
43
57
|
maxRetention?: number;
|
|
@@ -64,6 +78,8 @@ export type RelayInternalOptions = {
|
|
|
64
78
|
authorize?: AuthorizeHook;
|
|
65
79
|
allowedOrigin?: string | Array<string>;
|
|
66
80
|
rateLimits?: Partial<HubRateLimits>;
|
|
81
|
+
maxRequestBodySize?: number;
|
|
82
|
+
maxSessionBufferBytes?: number;
|
|
67
83
|
retention?: RelayRetentionConfig;
|
|
68
84
|
defaultRetention?: number;
|
|
69
85
|
maxRetention?: number;
|
package/lib/index.d.ts
CHANGED
|
@@ -36,6 +36,18 @@ export type HubOptions = {
|
|
|
36
36
|
* Omitted, its defaults apply. See `CreateRelayOptions.rateLimits`.
|
|
37
37
|
*/
|
|
38
38
|
rateLimits?: Partial<HubRateLimits>;
|
|
39
|
+
/**
|
|
40
|
+
* Max size (bytes) of a single relayed RPC request body, forwarded to
|
|
41
|
+
* `@enkaku/http-serve`. Omitted, `@kubun/hub`'s 8 MiB default applies (raised
|
|
42
|
+
* from the transport's own 1 MiB). See `CreateRelayOptions.maxRequestBodySize`.
|
|
43
|
+
*/
|
|
44
|
+
maxRequestBodySize?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Max buffered bytes per server→client session, forwarded to
|
|
47
|
+
* `@enkaku/http-serve`. Omitted, `@kubun/hub`'s 8 MiB default applies. See
|
|
48
|
+
* `CreateRelayOptions.maxSessionBufferBytes`.
|
|
49
|
+
*/
|
|
50
|
+
maxSessionBufferBytes?: number;
|
|
39
51
|
/** Optional retention scheduler. */
|
|
40
52
|
retention?: RelayRetentionConfig;
|
|
41
53
|
/** Optional observers for counters / diagnostics. */
|