@weapp-core/api 0.3.8 → 0.3.9
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/network-options.d.mts +24 -0
- package/dist/network-options.mjs +1 -0
- package/dist/vitest.d.mts +2 -1
- package/package.json +10 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region src/networkOptions.d.ts
|
|
2
|
+
/** 不包含请求地址、业务数据或回调的宿主中立网络默认选项。 */
|
|
3
|
+
export interface WeapiMiniProgramRequestDefaults {
|
|
4
|
+
enableCache?: boolean;
|
|
5
|
+
enableChunked?: boolean;
|
|
6
|
+
enableHttp2?: boolean;
|
|
7
|
+
enableHttpDNS?: boolean;
|
|
8
|
+
enableProfile?: boolean;
|
|
9
|
+
enableQuic?: boolean;
|
|
10
|
+
forceCellularNetwork?: boolean;
|
|
11
|
+
httpDNSServiceId?: string;
|
|
12
|
+
httpDNSTimeout?: number;
|
|
13
|
+
redirect?: 'follow' | 'manual';
|
|
14
|
+
timeout?: number;
|
|
15
|
+
useHighPerformanceMode?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** 不包含连接地址、协议或回调的宿主中立 WebSocket 默认选项。 */
|
|
18
|
+
export interface WeapiMiniProgramSocketDefaults {
|
|
19
|
+
forceCellularNetwork?: boolean;
|
|
20
|
+
header?: Record<string, any>;
|
|
21
|
+
perMessageDeflate?: boolean;
|
|
22
|
+
timeout?: number;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/vitest.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-core/api",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.9",
|
|
5
5
|
"description": "Framework-agnostic cross-platform mini-program API proxy",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -40,6 +40,9 @@
|
|
|
40
40
|
"./vitest/setup": {
|
|
41
41
|
"types": "./src/vitest/setup.ts",
|
|
42
42
|
"default": "./src/vitest/setup.ts"
|
|
43
|
+
},
|
|
44
|
+
"./network-options": {
|
|
45
|
+
"types": "./src/networkOptions.ts"
|
|
43
46
|
}
|
|
44
47
|
},
|
|
45
48
|
"main": "./src/index.ts",
|
|
@@ -61,6 +64,9 @@
|
|
|
61
64
|
"./vitest/setup": {
|
|
62
65
|
"types": "./dist/vitest/setup.d.mts",
|
|
63
66
|
"import": "./dist/vitest/setup.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./network-options": {
|
|
69
|
+
"types": "./dist/network-options.d.mts"
|
|
64
70
|
}
|
|
65
71
|
},
|
|
66
72
|
"main": "./dist/index.mjs",
|
|
@@ -104,7 +110,7 @@
|
|
|
104
110
|
"test:dev": "vitest",
|
|
105
111
|
"pretest:types": "pnpm build",
|
|
106
112
|
"test:types": "pnpm run test:types:check",
|
|
107
|
-
"test:types:check": "tsd",
|
|
113
|
+
"test:types:check": "tsd && pnpm run test:types:pure",
|
|
108
114
|
"release": "pnpm publish",
|
|
109
115
|
"lint": "eslint .",
|
|
110
116
|
"lint:fix": "eslint . --fix",
|
|
@@ -123,6 +129,7 @@
|
|
|
123
129
|
"prebuild": "pnpm run structure:check && pnpm run typecheck && pnpm run typecheck:test && pnpm run catalog:check && pnpm run docs:check && pnpm run strict-alias:check && pnpm run omittable-option:check && pnpm run coverage:check",
|
|
124
130
|
"postbuild": "pnpm run callback-types:check && pnpm run promise-types:check",
|
|
125
131
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
126
|
-
"typecheck:test": "tsc --noEmit -p tsconfig.test.json"
|
|
132
|
+
"typecheck:test": "tsc --noEmit -p tsconfig.test.json",
|
|
133
|
+
"test:types:pure": "cd test-d-pure && tsd --files \"**/*.test-d.ts\""
|
|
127
134
|
}
|
|
128
135
|
}
|