zcw-shared 1.34.1 → 1.36.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/functions/android/integrateUniAppNativePlugin.d.ts +22 -0
- package/dist/functions/android/integrateUniAppNativePlugin.js +464 -0
- package/dist/functions/android/integrateUniAppNativePlugin.js.map +1 -0
- package/dist/functions/android/integrateWechatShare.d.ts +13 -0
- package/dist/functions/android/integrateWechatShare.js +154 -0
- package/dist/functions/android/integrateWechatShare.js.map +1 -0
- package/dist/functions/async/cancellableFetch.d.ts +12 -0
- package/dist/functions/async/cancellableFetch.js +27 -0
- package/dist/functions/async/cancellableFetch.js.map +1 -0
- package/dist/functions/async/cancellableXHR.d.ts +21 -0
- package/dist/functions/async/cancellableXHR.js +96 -0
- package/dist/functions/async/cancellableXHR.js.map +1 -0
- package/dist/functions/functional/constant.d.ts +1 -0
- package/dist/functions/functional/constant.js +4 -0
- package/dist/functions/functional/constant.js.map +1 -0
- package/dist/functions/functional/identity.d.ts +1 -0
- package/dist/functions/functional/identity.js +4 -0
- package/dist/functions/functional/identity.js.map +1 -0
- package/dist/functions/functional/noop.d.ts +1 -0
- package/dist/functions/functional/noop.js +3 -0
- package/dist/functions/functional/noop.js.map +1 -0
- package/dist/functions/image/renderBankCard.d.ts +52 -0
- package/dist/functions/image/renderBankCard.js +177 -0
- package/dist/functions/image/renderBankCard.js.map +1 -0
- package/dist/functions/software/publishToPgyer.d.ts +16 -0
- package/dist/functions/software/publishToPgyer.js +96 -0
- package/dist/functions/software/publishToPgyer.js.map +1 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js +66 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
- package/dist/functions/validation/generateFakeBankCard.d.ts +87 -0
- package/dist/functions/validation/generateFakeBankCard.js +152 -0
- package/dist/functions/validation/generateFakeBankCard.js.map +1 -0
- package/package.json +10 -2
- package/references/blob.d.ts +4 -0
- package/references/fetch.d.ts +22 -0
- package/references/xhr.d.ts +47 -0
- package/types/pgyer.d.ts +64 -0
- package/types/uniapp-android-build.d.ts +36 -2
package/references/fetch.d.ts
CHANGED
|
@@ -7,6 +7,28 @@ type ReferrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' |
|
|
|
7
7
|
type RequestMode = 'cors' | 'no-cors' | 'same-origin' | 'navigate'
|
|
8
8
|
type BodyInit = Blob | BufferSource | FormData | URLSearchParams | string
|
|
9
9
|
type HeadersInit = string[][] | Record<string, string> | Headers
|
|
10
|
+
type FormDataEntryValue = string | Blob
|
|
11
|
+
|
|
12
|
+
export interface FormData {
|
|
13
|
+
append(name: string, value: FormDataEntryValue, fileName?: string): void
|
|
14
|
+
set(name: string, value: FormDataEntryValue, fileName?: string): void
|
|
15
|
+
get(name: string): FormDataEntryValue | null
|
|
16
|
+
getAll(name: string): FormDataEntryValue[]
|
|
17
|
+
has(name: string): boolean
|
|
18
|
+
delete(name: string): void
|
|
19
|
+
forEach(
|
|
20
|
+
callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void,
|
|
21
|
+
thisArg?: any
|
|
22
|
+
): void
|
|
23
|
+
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>
|
|
24
|
+
entries(): IterableIterator<[string, FormDataEntryValue]>
|
|
25
|
+
keys(): IterableIterator<string>
|
|
26
|
+
values(): IterableIterator<FormDataEntryValue>
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare const FormData: {
|
|
30
|
+
new (): FormData
|
|
31
|
+
}
|
|
10
32
|
type RequestInfo = Request | string
|
|
11
33
|
type ResponseType = 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect'
|
|
12
34
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { BodyInit, FormData } from './fetch.d'
|
|
2
|
+
import type { Document } from './dom.d'
|
|
3
|
+
|
|
4
|
+
export type XMLHttpRequestResponseType =
|
|
5
|
+
| ''
|
|
6
|
+
| 'arraybuffer'
|
|
7
|
+
| 'blob'
|
|
8
|
+
| 'document'
|
|
9
|
+
| 'json'
|
|
10
|
+
| 'text'
|
|
11
|
+
|
|
12
|
+
export interface XMLHttpRequest {
|
|
13
|
+
readonly readyState: number
|
|
14
|
+
response: any
|
|
15
|
+
responseText: string
|
|
16
|
+
responseType: XMLHttpRequestResponseType
|
|
17
|
+
status: number
|
|
18
|
+
statusText: string
|
|
19
|
+
timeout: number
|
|
20
|
+
withCredentials: boolean
|
|
21
|
+
onreadystatechange: ((this: XMLHttpRequest, event: any) => any) | null
|
|
22
|
+
onprogress: ((this: XMLHttpRequest, event: any) => any) | null
|
|
23
|
+
onabort: ((this: XMLHttpRequest, event: any) => any) | null
|
|
24
|
+
onerror: ((this: XMLHttpRequest, event: any) => any) | null
|
|
25
|
+
onload: ((this: XMLHttpRequest, event: any) => any) | null
|
|
26
|
+
onloadend: ((this: XMLHttpRequest, event: any) => any) | null
|
|
27
|
+
ontimeout: ((this: XMLHttpRequest, event: any) => any) | null
|
|
28
|
+
|
|
29
|
+
open(
|
|
30
|
+
method: string,
|
|
31
|
+
url: string,
|
|
32
|
+
async?: boolean,
|
|
33
|
+
username?: string | null,
|
|
34
|
+
password?: string | null
|
|
35
|
+
): void
|
|
36
|
+
|
|
37
|
+
setRequestHeader(header: string, value: string): void
|
|
38
|
+
getResponseHeader(header: string): string | null
|
|
39
|
+
getAllResponseHeaders(): string
|
|
40
|
+
send(body?: BodyInit | Document | FormData | null): void
|
|
41
|
+
abort(): void
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface XMLHttpRequestConstructor {
|
|
45
|
+
new (): XMLHttpRequest
|
|
46
|
+
}
|
|
47
|
+
|
package/types/pgyer.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 蒲公英发布相关类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 蒲公英发布选项
|
|
7
|
+
*/
|
|
8
|
+
export interface PublishToPgyerOptions {
|
|
9
|
+
/** 应用文件路径(.ipa 或 .apk) */
|
|
10
|
+
filePath: string
|
|
11
|
+
/** 蒲公英 API Key(必填) */
|
|
12
|
+
apiKey: string
|
|
13
|
+
/** 蒲公英用户 Key(可选,如果使用 apiKey 则不需要) */
|
|
14
|
+
uKey?: string
|
|
15
|
+
/** 安装密码(可选) */
|
|
16
|
+
password?: string
|
|
17
|
+
/** 更新说明(可选) */
|
|
18
|
+
updateDescription?: string
|
|
19
|
+
/** 渠道标识(可选) */
|
|
20
|
+
channelShortcut?: string
|
|
21
|
+
/** 安装类型(可选):1=公开,2=密码安装,3=邀请安装 */
|
|
22
|
+
installType?: 1 | 2 | 3
|
|
23
|
+
/** 应用名称(可选) */
|
|
24
|
+
appName?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 蒲公英发布结果
|
|
29
|
+
*/
|
|
30
|
+
export interface PublishToPgyerResult {
|
|
31
|
+
/** 是否成功 */
|
|
32
|
+
success: boolean
|
|
33
|
+
/** 错误信息(如果失败) */
|
|
34
|
+
error?: string
|
|
35
|
+
/** 应用信息(如果成功) */
|
|
36
|
+
data?: {
|
|
37
|
+
/** 应用 Key */
|
|
38
|
+
appKey?: string
|
|
39
|
+
/** 应用类型 */
|
|
40
|
+
appType?: string
|
|
41
|
+
/** 应用名称 */
|
|
42
|
+
appName?: string
|
|
43
|
+
/** 应用版本 */
|
|
44
|
+
appVersion?: string
|
|
45
|
+
/** 应用版本号 */
|
|
46
|
+
appVersionNo?: string
|
|
47
|
+
/** 应用大小 */
|
|
48
|
+
appFileSize?: string
|
|
49
|
+
/** 应用图标 */
|
|
50
|
+
appIcon?: string
|
|
51
|
+
/** 应用二维码 */
|
|
52
|
+
appQRCodeURL?: string
|
|
53
|
+
/** 应用下载地址 */
|
|
54
|
+
appDownloadURL?: string
|
|
55
|
+
/** 应用短链接 */
|
|
56
|
+
appShortcutUrl?: string
|
|
57
|
+
/** 应用更新说明 */
|
|
58
|
+
appUpdateDescription?: string
|
|
59
|
+
/** 应用安装密码 */
|
|
60
|
+
}
|
|
61
|
+
/** 原始响应数据 */
|
|
62
|
+
rawResponse?: any
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UniApp Android 离线打包相关类型定义
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* @description
|
|
5
5
|
* 定义 UniApp Android 离线打包功能使用的接口和类型
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* @since 1.0.0
|
|
8
8
|
* @author Assistant
|
|
9
9
|
*/
|
|
@@ -24,6 +24,20 @@ export interface WechatLoginOptions {
|
|
|
24
24
|
wxEntryActivityPath: string
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* 微信分享配置
|
|
29
|
+
*/
|
|
30
|
+
export interface WechatShareOptions {
|
|
31
|
+
/** 微信AppID(微信开放平台申请应用的AppID) */
|
|
32
|
+
appId: string
|
|
33
|
+
/** 微信Secret(微信开放平台申请应用的Secret) */
|
|
34
|
+
secret: string
|
|
35
|
+
/** share-weixin-release.aar文件路径 */
|
|
36
|
+
shareAarPath: string
|
|
37
|
+
/** WXEntryActivity.java文件路径(与微信登录共用) */
|
|
38
|
+
wxEntryActivityPath: string
|
|
39
|
+
}
|
|
40
|
+
|
|
27
41
|
/**
|
|
28
42
|
* 一键登录配置(HBuilderX 3.99+版本)
|
|
29
43
|
*/
|
|
@@ -102,6 +116,22 @@ export interface ShareTraceOptions {
|
|
|
102
116
|
appKey: string
|
|
103
117
|
}
|
|
104
118
|
|
|
119
|
+
/**
|
|
120
|
+
* UniApp 原生插件配置
|
|
121
|
+
*
|
|
122
|
+
* @description
|
|
123
|
+
* 只需提供插件路径(zip 文件或目录),系统会自动:
|
|
124
|
+
* 1. 解压插件(如果是 zip)
|
|
125
|
+
* 2. 读取插件 package.json 获取配置
|
|
126
|
+
* 3. 查找 android 目录下的 aar/jar 文件并拷贝到 libs
|
|
127
|
+
* 4. 更新 dcloud_uniplugins.json 配置文件
|
|
128
|
+
* 5. 配置 Gradle 依赖
|
|
129
|
+
*/
|
|
130
|
+
export interface UniAppNativePluginOptions {
|
|
131
|
+
/** 插件路径(zip 文件或已解压的目录) */
|
|
132
|
+
pluginPath: string
|
|
133
|
+
}
|
|
134
|
+
|
|
105
135
|
/**
|
|
106
136
|
* UniApp Android 构建选项
|
|
107
137
|
*/
|
|
@@ -114,6 +144,8 @@ export interface UniAppAndroidBuildOptions extends AndroidBuildOptions {
|
|
|
114
144
|
appkey?: string
|
|
115
145
|
/** 微信登录配置(可选) */
|
|
116
146
|
wechatLogin?: WechatLoginOptions
|
|
147
|
+
/** 微信分享配置(可选) */
|
|
148
|
+
wechatShare?: WechatShareOptions
|
|
117
149
|
/** 一键登录配置(可选) */
|
|
118
150
|
univerifyLogin?: UniverifyLoginOptions
|
|
119
151
|
/** QQ登录配置(可选) */
|
|
@@ -128,6 +160,8 @@ export interface UniAppAndroidBuildOptions extends AndroidBuildOptions {
|
|
|
128
160
|
facebookLogin?: FacebookLoginOptions
|
|
129
161
|
/** ShareTrace配置(可选) */
|
|
130
162
|
shareTrace?: ShareTraceOptions
|
|
163
|
+
/** UniApp 原生插件配置列表(可选) */
|
|
164
|
+
nativePlugins?: UniAppNativePluginOptions[]
|
|
131
165
|
}
|
|
132
166
|
|
|
133
167
|
/**
|