@floegence/flowersec-core 0.26.0 → 2.0.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/README.md +91 -22
- package/THIRD_PARTY_NOTICES.md +141 -0
- package/dist/browser/connectSession.d.ts +13 -0
- package/dist/browser/connectSession.js +40 -0
- package/dist/browser/index.d.ts +3 -10
- package/dist/browser/index.js +2 -5
- package/dist/browser/runtimeCapability.d.ts +13 -0
- package/dist/browser/runtimeCapability.js +27 -0
- package/dist/browser/sessionRuntime.d.ts +2 -0
- package/dist/browser/sessionRuntime.js +21 -0
- package/dist/browser/webTransportClient.d.ts +8 -0
- package/dist/browser/webTransportClient.js +55 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +126 -0
- package/dist/cliSpendMarker.d.ts +1 -0
- package/dist/cliSpendMarker.js +22 -0
- package/dist/connectionController.d.ts +54 -0
- package/dist/connectionController.js +438 -0
- package/dist/connector/adapters/webSocketCandidate.d.ts +7 -0
- package/dist/connector/adapters/webSocketCandidate.js +116 -0
- package/dist/connector/adapters/webTransportCandidate.d.ts +5 -0
- package/dist/connector/adapters/webTransportCandidate.js +73 -0
- package/dist/connector/admissionCommit.d.ts +31 -0
- package/dist/connector/admissionCommit.js +239 -0
- package/dist/connector/sessionAcceptor.d.ts +16 -0
- package/dist/connector/sessionAcceptor.js +114 -0
- package/dist/connector/sessionConfig.d.ts +3 -0
- package/dist/connector/sessionConfig.js +30 -0
- package/dist/connector/sessionConnector.d.ts +45 -0
- package/dist/connector/sessionConnector.js +603 -0
- package/dist/defaults.d.ts +7 -7
- package/dist/defaults.js +7 -7
- package/dist/facade.d.ts +12 -30
- package/dist/facade.js +6 -30
- package/dist/node/connectSession.d.ts +21 -0
- package/dist/node/connectSession.js +62 -0
- package/dist/node/index.d.ts +3 -11
- package/dist/node/index.js +2 -8
- package/dist/node/runtimeCapability.d.ts +7 -0
- package/dist/node/runtimeCapability.js +10 -0
- package/dist/node/sessionRuntime.d.ts +2 -0
- package/dist/node/sessionRuntime.js +13 -0
- package/dist/node/webTransportClient.d.ts +9 -0
- package/dist/node/webTransportClient.js +56 -0
- package/dist/node/webTransportServer.d.ts +22 -0
- package/dist/node/webTransportServer.js +100 -0
- package/dist/node/wsFactory.d.ts +3 -1
- package/dist/node/wsFactory.js +4 -3
- package/dist/proxy/controllerGuard.d.ts +4 -4
- package/dist/proxy/controllerGuard.js +83 -177
- package/dist/proxy/disableUpstreamServiceWorkerRegister.d.ts +3 -1
- package/dist/proxy/disableUpstreamServiceWorkerRegister.js +19 -17
- package/dist/proxy/index.d.ts +16 -15
- package/dist/proxy/index.js +8 -14
- package/dist/proxy/integration.d.ts +23 -71
- package/dist/proxy/integration.js +37 -340
- package/dist/proxy/registerServiceWorker.d.ts +1 -10
- package/dist/proxy/registerServiceWorker.js +43 -105
- package/dist/proxy/runtime.d.ts +3 -63
- package/dist/proxy/runtime.js +349 -462
- package/dist/proxy/scope.d.ts +6 -0
- package/dist/proxy/scope.js +131 -0
- package/dist/proxy/serviceWorker.d.ts +5 -16
- package/dist/proxy/serviceWorker.js +230 -617
- package/dist/proxy/stream.d.ts +9 -0
- package/dist/proxy/stream.js +40 -0
- package/dist/proxy/types.d.ts +78 -30
- package/dist/proxy/windowBridge.d.ts +61 -0
- package/dist/proxy/windowBridge.js +344 -0
- package/dist/proxy/wsPatch.d.ts +4 -14
- package/dist/proxy/wsPatch.js +173 -268
- package/dist/public/artifact.d.ts +11 -0
- package/dist/public/artifact.js +44 -0
- package/dist/public/artifactLease.d.ts +10 -0
- package/dist/public/artifactLease.js +48 -0
- package/dist/public/connectError.d.ts +6 -0
- package/dist/public/connectError.js +9 -0
- package/dist/public/contract.d.ts +83 -0
- package/dist/public/contract.js +17 -0
- package/dist/public/streamMetadata.d.ts +10 -0
- package/dist/public/streamMetadata.js +40 -0
- package/dist/rpc/caller.d.ts +1 -1
- package/dist/rpc/client.d.ts +1 -4
- package/dist/rpc/client.js +0 -21
- package/dist/rpc/rpcProxy.d.ts +1 -1
- package/dist/rpc/server.d.ts +1 -1
- package/dist/rpc/validate.d.ts +1 -1
- package/dist/rpc/wire.d.ts +15 -0
- package/dist/runtime/errors.d.ts +6 -0
- package/dist/runtime/errors.js +10 -0
- package/dist/transport/webSocketAdapter.d.ts +24 -0
- package/dist/transport/webSocketAdapter.js +234 -0
- package/dist/transport/webTransportAdapter.d.ts +27 -0
- package/dist/transport/webTransportAdapter.js +519 -0
- package/dist/utils/errors.d.ts +2 -20
- package/dist/utils/errors.js +73 -20
- package/dist/v2/admissionError.d.ts +4 -0
- package/dist/v2/admissionError.js +8 -0
- package/dist/v2/artifact.d.ts +128 -0
- package/dist/v2/artifact.js +1126 -0
- package/dist/v2/artifactLease.d.ts +1 -0
- package/dist/v2/artifactLease.js +7 -0
- package/dist/v2/capability.d.ts +29 -0
- package/dist/v2/capability.js +190 -0
- package/dist/v2/carrier.d.ts +79 -0
- package/dist/v2/carrier.js +405 -0
- package/dist/v2/contract.d.ts +37 -0
- package/dist/v2/contract.js +1 -0
- package/dist/v2/handshake.d.ts +80 -0
- package/dist/v2/handshake.js +470 -0
- package/dist/v2/opaqueArtifact.d.ts +1 -0
- package/dist/v2/opaqueArtifact.js +2 -0
- package/dist/v2/protocol.d.ts +99 -0
- package/dist/v2/protocol.js +739 -0
- package/dist/v2/publicSession.d.ts +1 -0
- package/dist/v2/publicSession.js +179 -0
- package/dist/v2/retryDisposition.d.ts +16 -0
- package/dist/v2/retryDisposition.js +30 -0
- package/dist/v2/session.d.ts +277 -0
- package/dist/v2/session.js +1879 -0
- package/dist/v2/streamLifetimeLedger.d.ts +31 -0
- package/dist/v2/streamLifetimeLedger.js +131 -0
- package/dist/v2/streamMetadata.d.ts +1 -0
- package/dist/v2/streamMetadata.js +7 -0
- package/dist/v2/unreliableMessage.d.ts +43 -0
- package/dist/v2/unreliableMessage.js +252 -0
- package/dist/vendor/tr46.d.ts +10 -0
- package/dist/vendor/tr46.js +501 -0
- package/dist/ws-client/binaryTransport.d.ts +0 -3
- package/dist/ws-client/binaryTransport.js +15 -39
- package/dist/yamux/errors.d.ts +0 -4
- package/dist/yamux/errors.js +0 -9
- package/dist/yamux/session.d.ts +0 -5
- package/dist/yamux/session.js +4 -70
- package/dist/yamux/stream.d.ts +1 -0
- package/dist/yamux/stream.js +4 -0
- package/package.json +29 -83
- package/sbom/cyclonedx.json +2764 -0
- package/sbom/spdx.json +1947 -0
- package/YAMUX_ALIGNMENT.md +0 -127
- package/dist/_examples/flowersec/demo/v1.facade.gen.d.ts +0 -12
- package/dist/_examples/flowersec/demo/v1.facade.gen.js +0 -15
- package/dist/_examples/flowersec/demo/v1.gen.d.ts +0 -16
- package/dist/_examples/flowersec/demo/v1.gen.js +0 -86
- package/dist/_examples/flowersec/demo/v1.rpc.gen.d.ts +0 -11
- package/dist/_examples/flowersec/demo/v1.rpc.gen.js +0 -22
- package/dist/browser/connect.d.ts +0 -12
- package/dist/browser/connect.js +0 -31
- package/dist/browser/controlplane.d.ts +0 -15
- package/dist/browser/controlplane.js +0 -64
- package/dist/browser/reconnectConfig.d.ts +0 -15
- package/dist/browser/reconnectConfig.js +0 -20
- package/dist/client-connect/common.d.ts +0 -26
- package/dist/client-connect/common.js +0 -167
- package/dist/client-connect/connectCore.d.ts +0 -61
- package/dist/client-connect/connectCore.js +0 -572
- package/dist/client-connect/contract.d.ts +0 -8
- package/dist/client-connect/contract.js +0 -51
- package/dist/client-connect/termination.d.ts +0 -6
- package/dist/client-connect/termination.js +0 -7
- package/dist/client-connect/transportSecurity.d.ts +0 -27
- package/dist/client-connect/transportSecurity.js +0 -199
- package/dist/client-connect/tunnelAttachCloseReason.d.ts +0 -3
- package/dist/client-connect/tunnelAttachCloseReason.js +0 -23
- package/dist/client.d.ts +0 -23
- package/dist/connect/artifact.d.ts +0 -37
- package/dist/connect/artifact.js +0 -217
- package/dist/connect/internalNormalize.d.ts +0 -22
- package/dist/connect/internalNormalize.js +0 -173
- package/dist/controlplane/channelInit.d.ts +0 -27
- package/dist/controlplane/channelInit.js +0 -116
- package/dist/controlplane/http.d.ts +0 -16
- package/dist/controlplane/http.js +0 -59
- package/dist/controlplane/index.d.ts +0 -6
- package/dist/controlplane/index.js +0 -5
- package/dist/controlplane/issuer.d.ts +0 -18
- package/dist/controlplane/issuer.js +0 -113
- package/dist/controlplane/request.d.ts +0 -51
- package/dist/controlplane/request.js +0 -273
- package/dist/controlplane/token.d.ts +0 -33
- package/dist/controlplane/token.js +0 -119
- package/dist/direct-client/connect.d.ts +0 -9
- package/dist/direct-client/connect.js +0 -90
- package/dist/direct-client/index.d.ts +0 -1
- package/dist/direct-client/index.js +0 -1
- package/dist/e2ee/constants.d.ts +0 -9
- package/dist/e2ee/constants.js +0 -18
- package/dist/e2ee/errors.d.ts +0 -5
- package/dist/e2ee/errors.js +0 -8
- package/dist/e2ee/framing.d.ts +0 -12
- package/dist/e2ee/framing.js +0 -57
- package/dist/e2ee/handshake.d.ts +0 -88
- package/dist/e2ee/handshake.js +0 -353
- package/dist/e2ee/index.d.ts +0 -7
- package/dist/e2ee/index.js +0 -7
- package/dist/e2ee/kdf.d.ts +0 -15
- package/dist/e2ee/kdf.js +0 -39
- package/dist/e2ee/record.d.ts +0 -11
- package/dist/e2ee/record.js +0 -76
- package/dist/e2ee/secureChannel.d.ts +0 -92
- package/dist/e2ee/secureChannel.js +0 -328
- package/dist/e2ee/transcript.d.ts +0 -23
- package/dist/e2ee/transcript.js +0 -31
- package/dist/endpoint/index.d.ts +0 -84
- package/dist/endpoint/index.js +0 -557
- package/dist/endpoint/node.d.ts +0 -9
- package/dist/endpoint/node.js +0 -51
- package/dist/gen/flowersec/controlplane/v1.gen.d.ts +0 -36
- package/dist/gen/flowersec/controlplane/v1.gen.js +0 -135
- package/dist/gen/flowersec/direct/v1.gen.d.ts +0 -21
- package/dist/gen/flowersec/direct/v1.gen.js +0 -101
- package/dist/gen/flowersec/e2ee/v1.gen.d.ts +0 -68
- package/dist/gen/flowersec/e2ee/v1.gen.js +0 -194
- package/dist/gen/flowersec/rpc/v1.gen.d.ts +0 -30
- package/dist/gen/flowersec/rpc/v1.gen.js +0 -107
- package/dist/gen/flowersec/tunnel/v1.gen.d.ts +0 -23
- package/dist/gen/flowersec/tunnel/v1.gen.js +0 -104
- package/dist/index.d.ts +0 -22
- package/dist/index.js +0 -22
- package/dist/node/connect.d.ts +0 -12
- package/dist/node/connect.js +0 -29
- package/dist/node/reconnectConfig.d.ts +0 -16
- package/dist/node/reconnectConfig.js +0 -20
- package/dist/observability/index.d.ts +0 -1
- package/dist/observability/index.js +0 -1
- package/dist/observability/observer.d.ts +0 -52
- package/dist/observability/observer.js +0 -314
- package/dist/proxy/appWindow.d.ts +0 -37
- package/dist/proxy/appWindow.js +0 -273
- package/dist/proxy/bootstrap.d.ts +0 -35
- package/dist/proxy/bootstrap.js +0 -119
- package/dist/proxy/constants.d.ts +0 -7
- package/dist/proxy/constants.js +0 -8
- package/dist/proxy/controllerWindow.d.ts +0 -12
- package/dist/proxy/controllerWindow.js +0 -384
- package/dist/proxy/cookieJar.d.ts +0 -7
- package/dist/proxy/cookieJar.js +0 -136
- package/dist/proxy/headerPolicy.d.ts +0 -14
- package/dist/proxy/headerPolicy.js +0 -134
- package/dist/proxy/portStream.d.ts +0 -5
- package/dist/proxy/portStream.js +0 -256
- package/dist/proxy/preset.d.ts +0 -29
- package/dist/proxy/preset.js +0 -111
- package/dist/proxy/runtimeScope.d.ts +0 -57
- package/dist/proxy/runtimeScope.js +0 -218
- package/dist/proxy/server.d.ts +0 -28
- package/dist/proxy/server.js +0 -833
- package/dist/proxy/windowBridgeProtocol.d.ts +0 -65
- package/dist/proxy/windowBridgeProtocol.js +0 -11
- package/dist/reconnect/artifactControlplane.d.ts +0 -16
- package/dist/reconnect/artifactControlplane.js +0 -35
- package/dist/reconnect/index.d.ts +0 -36
- package/dist/reconnect/index.js +0 -388
- package/dist/rpc-proxy/index.d.ts +0 -1
- package/dist/rpc-proxy/index.js +0 -1
- package/dist/rpc-proxy/rpcProxy.d.ts +0 -1
- package/dist/rpc-proxy/rpcProxy.js +0 -1
- package/dist/streamhello/index.d.ts +0 -1
- package/dist/streamhello/index.js +0 -1
- package/dist/streamhello/streamHello.d.ts +0 -3
- package/dist/streamhello/streamHello.js +0 -13
- package/dist/streamio/index.d.ts +0 -32
- package/dist/streamio/index.js +0 -87
- package/dist/tunnel-client/connect.d.ts +0 -9
- package/dist/tunnel-client/connect.js +0 -157
- package/dist/tunnel-client/index.d.ts +0 -1
- package/dist/tunnel-client/index.js +0 -1
- package/dist/ws/index.d.ts +0 -1
- package/dist/ws/index.js +0 -1
- /package/dist/{client.js → rpc/wire.js} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export const PROXY_RUNTIME_SCOPE = Object.freeze({ name: "proxy.runtime", version: 2 });
|
|
2
|
+
const MAX_PAYLOAD_BYTES = 8 * 1024;
|
|
3
|
+
const MAX_FIELDS = 48;
|
|
4
|
+
const MAX_DEPTH = 6;
|
|
5
|
+
function isRecord(value) {
|
|
6
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7
|
+
}
|
|
8
|
+
function reject(message) {
|
|
9
|
+
throw new TypeError(`invalid proxy.runtime@2: ${message}`);
|
|
10
|
+
}
|
|
11
|
+
function exactFields(value, allowed, label) {
|
|
12
|
+
const set = new Set(allowed);
|
|
13
|
+
for (const key of Object.keys(value))
|
|
14
|
+
if (!set.has(key))
|
|
15
|
+
reject(`${label}.${key}`);
|
|
16
|
+
}
|
|
17
|
+
function containerDepth(value) {
|
|
18
|
+
if (Array.isArray(value))
|
|
19
|
+
return 1 + value.reduce((best, item) => Math.max(best, containerDepth(item)), 0);
|
|
20
|
+
if (!isRecord(value))
|
|
21
|
+
return 0;
|
|
22
|
+
return 1 + Object.values(value).reduce((best, item) => Math.max(best, containerDepth(item)), 0);
|
|
23
|
+
}
|
|
24
|
+
function fieldCount(value) {
|
|
25
|
+
if (Array.isArray(value))
|
|
26
|
+
return value.reduce((total, item) => total + fieldCount(item), 0);
|
|
27
|
+
if (!isRecord(value))
|
|
28
|
+
return 0;
|
|
29
|
+
return Object.values(value).reduce((total, item) => total + 1 + fieldCount(item), 0);
|
|
30
|
+
}
|
|
31
|
+
function nonEmpty(name, value) {
|
|
32
|
+
if (typeof value !== "string" || value.trim() === "" || value !== value.trim())
|
|
33
|
+
reject(name);
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
function positiveInt(name, value) {
|
|
37
|
+
if (!Number.isSafeInteger(value) || value <= 0)
|
|
38
|
+
reject(name);
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
function optionalLimits(value) {
|
|
42
|
+
if (value === undefined)
|
|
43
|
+
return undefined;
|
|
44
|
+
if (!isRecord(value))
|
|
45
|
+
reject("limits");
|
|
46
|
+
exactFields(value, ["timeoutMs", "maxJsonFrameBytes", "maxChunkBytes", "maxBodyBytes", "maxWsFrameBytes"], "limits");
|
|
47
|
+
const result = {};
|
|
48
|
+
for (const key of ["timeoutMs", "maxJsonFrameBytes", "maxChunkBytes", "maxBodyBytes", "maxWsFrameBytes"]) {
|
|
49
|
+
if (value[key] !== undefined)
|
|
50
|
+
result[key] = positiveInt(`limits.${key}`, value[key]);
|
|
51
|
+
}
|
|
52
|
+
return Object.freeze(result);
|
|
53
|
+
}
|
|
54
|
+
function optionalAppBasePath(value) {
|
|
55
|
+
if (value === undefined)
|
|
56
|
+
return undefined;
|
|
57
|
+
const path = nonEmpty("appBasePath", value);
|
|
58
|
+
if (!path.startsWith("/") || path.startsWith("//") || /[\u0000-\u0020]/u.test(path))
|
|
59
|
+
reject("appBasePath");
|
|
60
|
+
return path;
|
|
61
|
+
}
|
|
62
|
+
function allowedOrigins(value) {
|
|
63
|
+
if (!Array.isArray(value) || value.length === 0 || value.length > 16)
|
|
64
|
+
reject("controllerBridge.allowedOrigins");
|
|
65
|
+
const result = [];
|
|
66
|
+
for (const entry of value) {
|
|
67
|
+
const origin = nonEmpty("controllerBridge.allowedOrigins", entry);
|
|
68
|
+
let parsed;
|
|
69
|
+
try {
|
|
70
|
+
parsed = new URL(origin);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
reject("controllerBridge.allowedOrigins");
|
|
74
|
+
}
|
|
75
|
+
if ((parsed.protocol !== "https:" && parsed.protocol !== "http:") || parsed.origin !== origin || parsed.username !== "" || parsed.password !== "") {
|
|
76
|
+
reject("controllerBridge.allowedOrigins");
|
|
77
|
+
}
|
|
78
|
+
if (!result.includes(origin))
|
|
79
|
+
result.push(origin);
|
|
80
|
+
}
|
|
81
|
+
if (result.length === 0)
|
|
82
|
+
reject("controllerBridge.allowedOrigins");
|
|
83
|
+
return Object.freeze(result);
|
|
84
|
+
}
|
|
85
|
+
export function assertProxyRuntimeScope(payload) {
|
|
86
|
+
if (!isRecord(payload))
|
|
87
|
+
reject("payload");
|
|
88
|
+
let encoded;
|
|
89
|
+
try {
|
|
90
|
+
encoded = JSON.stringify(payload);
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
reject("payload");
|
|
94
|
+
}
|
|
95
|
+
if (new TextEncoder().encode(encoded).length > MAX_PAYLOAD_BYTES || containerDepth(payload) > MAX_DEPTH || fieldCount(payload) > MAX_FIELDS) {
|
|
96
|
+
reject("payload bounds");
|
|
97
|
+
}
|
|
98
|
+
exactFields(payload, ["version", "mode", "appBasePath", "serviceWorker", "controllerBridge", "limits"], "scope");
|
|
99
|
+
if (payload.version !== undefined && payload.version !== 2)
|
|
100
|
+
reject("version");
|
|
101
|
+
const appBasePath = optionalAppBasePath(payload.appBasePath);
|
|
102
|
+
const limits = optionalLimits(payload.limits);
|
|
103
|
+
if (payload.mode === "service_worker") {
|
|
104
|
+
if (!isRecord(payload.serviceWorker) || payload.controllerBridge !== undefined)
|
|
105
|
+
reject("serviceWorker");
|
|
106
|
+
exactFields(payload.serviceWorker, ["scriptUrl", "scope"], "serviceWorker");
|
|
107
|
+
const result = {
|
|
108
|
+
mode: "service_worker",
|
|
109
|
+
...(appBasePath === undefined ? {} : { appBasePath }),
|
|
110
|
+
serviceWorker: Object.freeze({
|
|
111
|
+
scriptUrl: nonEmpty("serviceWorker.scriptUrl", payload.serviceWorker.scriptUrl),
|
|
112
|
+
scope: nonEmpty("serviceWorker.scope", payload.serviceWorker.scope),
|
|
113
|
+
}),
|
|
114
|
+
...(limits === undefined ? {} : { limits }),
|
|
115
|
+
};
|
|
116
|
+
return Object.freeze(result);
|
|
117
|
+
}
|
|
118
|
+
if (payload.mode === "controller_bridge") {
|
|
119
|
+
if (!isRecord(payload.controllerBridge) || payload.serviceWorker !== undefined)
|
|
120
|
+
reject("controllerBridge");
|
|
121
|
+
exactFields(payload.controllerBridge, ["allowedOrigins"], "controllerBridge");
|
|
122
|
+
const result = {
|
|
123
|
+
mode: "controller_bridge",
|
|
124
|
+
...(appBasePath === undefined ? {} : { appBasePath }),
|
|
125
|
+
controllerBridge: Object.freeze({ allowedOrigins: allowedOrigins(payload.controllerBridge.allowedOrigins) }),
|
|
126
|
+
...(limits === undefined ? {} : { limits }),
|
|
127
|
+
};
|
|
128
|
+
return Object.freeze(result);
|
|
129
|
+
}
|
|
130
|
+
reject("mode");
|
|
131
|
+
}
|
|
@@ -2,22 +2,11 @@ export type ProxyServiceWorkerPassthroughOptions = Readonly<{
|
|
|
2
2
|
paths?: readonly string[];
|
|
3
3
|
prefixes?: readonly string[];
|
|
4
4
|
}>;
|
|
5
|
-
export type
|
|
6
|
-
mode?: "inline_module";
|
|
7
|
-
proxyModuleUrl
|
|
5
|
+
export type ProxyServiceWorkerInjectHTMLOptions = Readonly<{
|
|
6
|
+
mode?: "inline_module" | "external_script" | "external_module";
|
|
7
|
+
proxyModuleUrl?: string;
|
|
8
|
+
scriptUrl?: string;
|
|
8
9
|
runtimeGlobal?: string;
|
|
9
|
-
}>;
|
|
10
|
-
export type ProxyServiceWorkerInjectHTMLExternalScript = Readonly<{
|
|
11
|
-
mode: "external_script";
|
|
12
|
-
scriptUrl: string;
|
|
13
|
-
runtimeGlobal?: string;
|
|
14
|
-
}>;
|
|
15
|
-
export type ProxyServiceWorkerInjectHTMLExternalModule = Readonly<{
|
|
16
|
-
mode: "external_module";
|
|
17
|
-
scriptUrl: string;
|
|
18
|
-
runtimeGlobal?: string;
|
|
19
|
-
}>;
|
|
20
|
-
export type ProxyServiceWorkerInjectHTMLOptions = (ProxyServiceWorkerInjectHTMLInlineModule | ProxyServiceWorkerInjectHTMLExternalScript | ProxyServiceWorkerInjectHTMLExternalModule) & Readonly<{
|
|
21
10
|
excludePathPrefixes?: readonly string[];
|
|
22
11
|
stripValidatorHeaders?: boolean;
|
|
23
12
|
setNoStore?: boolean;
|
|
@@ -39,4 +28,4 @@ export type ProxyServiceWorkerScriptOptions = Readonly<{
|
|
|
39
28
|
keepScriptPathSuffixes?: readonly string[];
|
|
40
29
|
}>;
|
|
41
30
|
}>;
|
|
42
|
-
export declare function createProxyServiceWorkerScript(
|
|
31
|
+
export declare function createProxyServiceWorkerScript(options?: ProxyServiceWorkerScriptOptions): string;
|