dsh-mobile 0.8.3 → 0.8.5
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 +18 -0
- package/CONTRIBUTORS.md +12 -0
- package/README.en.md +8 -6
- package/README.md +8 -6
- package/docs/CONNECTION_DIAGNOSTICS.en.md +4 -0
- package/docs/CONNECTION_DIAGNOSTICS.md +4 -0
- package/docs/IROH.en.md +1 -0
- package/docs/IROH.md +1 -0
- package/docs/SLOW_CONNECTIONS.en.md +8 -0
- package/docs/SLOW_CONNECTIONS.md +8 -0
- package/docs/TRUSTED_NETWORKS.en.md +6 -0
- package/docs/TRUSTED_NETWORKS.md +6 -0
- package/lib/cli.js +59 -22
- package/lib/cli.js.map +1 -1
- package/lib/client.js +60 -4
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +19 -0
- package/lib/index.mjs +770 -42
- package/lib/index.mjs.map +1 -1
- package/lib/mobile-layout.js +3 -2
- package/lib/mobile-layout.js.map +1 -1
- package/package.json +1 -1
- package/packages/question-fixes/package.json +1 -1
package/lib/index.d.mts
CHANGED
|
@@ -382,6 +382,8 @@ interface PluginConfig {
|
|
|
382
382
|
upstreamTimeoutMs?: number;
|
|
383
383
|
/** Authenticated /api response and established DSH plugin-event stream idle timeout; zero disables it. */
|
|
384
384
|
upstreamApiTimeoutMs?: number;
|
|
385
|
+
/** Serve the two model-catalog RPCs from a narrow stale-while-revalidate cache. */
|
|
386
|
+
catalogCache?: boolean;
|
|
385
387
|
rateLimitWindowMs?: number;
|
|
386
388
|
maxPairingAttempts?: number;
|
|
387
389
|
maxRateLimitKeys?: number;
|
|
@@ -426,6 +428,7 @@ interface ResolvedGatewayConfig {
|
|
|
426
428
|
readonly maxBodyBytes: number;
|
|
427
429
|
readonly upstreamTimeoutMs: number;
|
|
428
430
|
readonly upstreamApiTimeoutMs: number;
|
|
431
|
+
readonly catalogCache: boolean;
|
|
429
432
|
readonly rateLimitWindowMs: number;
|
|
430
433
|
readonly maxPairingAttempts: number;
|
|
431
434
|
readonly maxRateLimitKeys: number;
|
|
@@ -1080,6 +1083,7 @@ export declare class ClientModuleConflictError extends HttpError {
|
|
|
1080
1083
|
export declare function rewriteMobileIndex(html: string, excludedClientModules?: readonly string[]): string;
|
|
1081
1084
|
/** Authenticated TLS edge in front of the ordinary loopback-only DSH Web server. */
|
|
1082
1085
|
export declare class MobileAccessGateway {
|
|
1086
|
+
#private;
|
|
1083
1087
|
readonly config: ResolvedGatewayConfig;
|
|
1084
1088
|
private readonly extensions?;
|
|
1085
1089
|
private readonly upstreamAuthenticatedUrl?;
|
|
@@ -1128,6 +1132,8 @@ export declare class MobileAccessGateway {
|
|
|
1128
1132
|
private upstreamCookie;
|
|
1129
1133
|
private upstreamCookieExpiresAt;
|
|
1130
1134
|
private upstreamCookieTask;
|
|
1135
|
+
/** The catalog SWR cache, or undefined when `catalogCache` is disabled. */
|
|
1136
|
+
private get catalogCache();
|
|
1131
1137
|
private upstreamAuthRequest;
|
|
1132
1138
|
private nextOperationId;
|
|
1133
1139
|
private closing;
|
|
@@ -1314,6 +1320,15 @@ export declare class MobileAccessGateway {
|
|
|
1314
1320
|
private readUpstreamClientBundleWithRetry;
|
|
1315
1321
|
private readUpstreamClientBundle;
|
|
1316
1322
|
private allocateRequest;
|
|
1323
|
+
/** Read one bounded request body verbatim; the caller owns replaying it upstream. */
|
|
1324
|
+
private readRequestBody;
|
|
1325
|
+
/** One gateway-owned catalog fill: its own socket, rpcId, deadline and byte cap. */
|
|
1326
|
+
private catalogFill;
|
|
1327
|
+
/**
|
|
1328
|
+
* Serve one eligible catalog request from the SWR cache.
|
|
1329
|
+
* @returns true when the response was committed here; false for the ordinary path.
|
|
1330
|
+
*/
|
|
1331
|
+
private serveCatalogCache;
|
|
1317
1332
|
/**
|
|
1318
1333
|
* Proxy one request, retrying transient failures for plugin and asset GETs.
|
|
1319
1334
|
* Only bodyless GETs can be replayed, before response headers reach the client.
|
|
@@ -2587,6 +2602,10 @@ interface IrohControllerOptions {
|
|
|
2587
2602
|
readonly onStatus?: (status: IrohStatus) => void;
|
|
2588
2603
|
readonly launchSidecar?: (executable: string, args: readonly string[]) => ChildProcessWithoutNullStreams;
|
|
2589
2604
|
readonly resolveIdentity?: (executable: string, dataDir: string) => Promise<string>;
|
|
2605
|
+
readonly onFailure?: (failure: {
|
|
2606
|
+
readonly errorCode: string;
|
|
2607
|
+
readonly diagnostic?: string;
|
|
2608
|
+
}) => void;
|
|
2590
2609
|
readonly readyTimeoutMs?: number;
|
|
2591
2610
|
readonly pairingTimeoutMs?: number;
|
|
2592
2611
|
}
|