@floegence/flowersec-core 0.20.2 → 0.21.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/dist/proxy/preset.d.ts +0 -1
- package/dist/proxy/preset.js +0 -13
- package/dist/proxy/profiles.d.ts +1 -8
- package/dist/proxy/profiles.js +1 -7
- package/package.json +1 -1
package/dist/proxy/preset.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ export type ResolvedProxyPreset = Readonly<{
|
|
|
24
24
|
}>;
|
|
25
25
|
}>;
|
|
26
26
|
export declare const DEFAULT_PROXY_PRESET_MANIFEST: ProxyPresetManifest;
|
|
27
|
-
export declare const CODESERVER_PROXY_PRESET_MANIFEST: ProxyPresetManifest;
|
|
28
27
|
export type ProxyPresetInput = ProxyPresetManifest | Partial<ProxyPresetLimits>;
|
|
29
28
|
export declare function assertProxyPresetManifest(value: unknown): ProxyPresetManifest;
|
|
30
29
|
export declare function resolveNamedProxyPreset(name: string): ProxyPresetManifest;
|
package/dist/proxy/preset.js
CHANGED
|
@@ -17,17 +17,6 @@ export const DEFAULT_PROXY_PRESET_MANIFEST = Object.freeze({
|
|
|
17
17
|
max_ws_frame_bytes: DEFAULT_MAX_WS_FRAME_BYTES,
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
|
-
export const CODESERVER_PROXY_PRESET_MANIFEST = Object.freeze({
|
|
21
|
-
v: 1,
|
|
22
|
-
preset_id: "codeserver",
|
|
23
|
-
deprecated: true,
|
|
24
|
-
limits: {
|
|
25
|
-
max_json_frame_bytes: DEFAULT_MAX_JSON_FRAME_BYTES,
|
|
26
|
-
max_chunk_bytes: DEFAULT_MAX_CHUNK_BYTES,
|
|
27
|
-
max_body_bytes: DEFAULT_MAX_BODY_BYTES,
|
|
28
|
-
max_ws_frame_bytes: 32 * 1024 * 1024,
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
20
|
function isRecord(v) {
|
|
32
21
|
return typeof v === "object" && v != null && !Array.isArray(v);
|
|
33
22
|
}
|
|
@@ -91,8 +80,6 @@ export function resolveNamedProxyPreset(name) {
|
|
|
91
80
|
case "":
|
|
92
81
|
case "default":
|
|
93
82
|
return DEFAULT_PROXY_PRESET_MANIFEST;
|
|
94
|
-
case "codeserver":
|
|
95
|
-
return CODESERVER_PROXY_PRESET_MANIFEST;
|
|
96
83
|
default:
|
|
97
84
|
throw new Error(`unknown proxy preset: ${name}`);
|
|
98
85
|
}
|
package/dist/proxy/profiles.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type ProxyProfile = Readonly<{
|
|
|
6
6
|
maxWsFrameBytes: number;
|
|
7
7
|
timeoutMs: number;
|
|
8
8
|
}>;
|
|
9
|
-
export type ProxyProfileName = "default"
|
|
9
|
+
export type ProxyProfileName = "default";
|
|
10
10
|
export declare const PROXY_PROFILE_DEFAULT: Readonly<{
|
|
11
11
|
maxJsonFrameBytes: number;
|
|
12
12
|
maxChunkBytes: number;
|
|
@@ -14,12 +14,5 @@ export declare const PROXY_PROFILE_DEFAULT: Readonly<{
|
|
|
14
14
|
maxWsFrameBytes: number;
|
|
15
15
|
timeoutMs: number;
|
|
16
16
|
}>;
|
|
17
|
-
export declare const PROXY_PROFILE_CODESERVER: Readonly<{
|
|
18
|
-
maxJsonFrameBytes: number;
|
|
19
|
-
maxChunkBytes: number;
|
|
20
|
-
maxBodyBytes: number;
|
|
21
|
-
maxWsFrameBytes: number;
|
|
22
|
-
timeoutMs: number;
|
|
23
|
-
}>;
|
|
24
17
|
export declare function resolveProxyProfile(profile?: ProxyProfileName | Partial<ProxyProfile>): ProxyProfile;
|
|
25
18
|
export declare function profileToPresetManifest(profile?: ProxyProfileName | Partial<ProxyProfile>): ProxyPresetManifest;
|
package/dist/proxy/profiles.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DEFAULT_PROXY_PRESET_MANIFEST, resolveProxyPreset, } from "./preset.js";
|
|
2
2
|
function toLegacyProfile(manifest) {
|
|
3
3
|
const resolved = resolveProxyPreset(manifest);
|
|
4
4
|
return Object.freeze({
|
|
@@ -10,9 +10,7 @@ function toLegacyProfile(manifest) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
const DEFAULT_PROFILE = toLegacyProfile(DEFAULT_PROXY_PRESET_MANIFEST);
|
|
13
|
-
const CODESERVER_PROFILE = toLegacyProfile(CODESERVER_PROXY_PRESET_MANIFEST);
|
|
14
13
|
export const PROXY_PROFILE_DEFAULT = DEFAULT_PROFILE;
|
|
15
|
-
export const PROXY_PROFILE_CODESERVER = CODESERVER_PROFILE;
|
|
16
14
|
function normalizeSafeInt(name, value) {
|
|
17
15
|
if (!Number.isFinite(value))
|
|
18
16
|
throw new Error(`${name} must be a finite number`);
|
|
@@ -27,8 +25,6 @@ function resolveNamedProfile(name) {
|
|
|
27
25
|
switch (name) {
|
|
28
26
|
case "default":
|
|
29
27
|
return DEFAULT_PROFILE;
|
|
30
|
-
case "codeserver":
|
|
31
|
-
return CODESERVER_PROFILE;
|
|
32
28
|
default:
|
|
33
29
|
throw new Error(`unknown proxy profile: ${name}`);
|
|
34
30
|
}
|
|
@@ -55,8 +51,6 @@ export function profileToPresetManifest(profile) {
|
|
|
55
51
|
switch (profile) {
|
|
56
52
|
case "default":
|
|
57
53
|
return DEFAULT_PROXY_PRESET_MANIFEST;
|
|
58
|
-
case "codeserver":
|
|
59
|
-
return CODESERVER_PROXY_PRESET_MANIFEST;
|
|
60
54
|
default:
|
|
61
55
|
throw new Error(`unknown proxy profile: ${profile}`);
|
|
62
56
|
}
|