@weapp-core/api 0.3.7 → 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 +11 -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",
|
|
@@ -103,7 +109,8 @@
|
|
|
103
109
|
"test": "vitest run",
|
|
104
110
|
"test:dev": "vitest",
|
|
105
111
|
"pretest:types": "pnpm build",
|
|
106
|
-
"test:types": "
|
|
112
|
+
"test:types": "pnpm run test:types:check",
|
|
113
|
+
"test:types:check": "tsd && pnpm run test:types:pure",
|
|
107
114
|
"release": "pnpm publish",
|
|
108
115
|
"lint": "eslint .",
|
|
109
116
|
"lint:fix": "eslint . --fix",
|
|
@@ -122,6 +129,7 @@
|
|
|
122
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",
|
|
123
130
|
"postbuild": "pnpm run callback-types:check && pnpm run promise-types:check",
|
|
124
131
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
125
|
-
"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\""
|
|
126
134
|
}
|
|
127
135
|
}
|