@ningboyz/wxmp 1.0.18 → 1.0.19
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 +20 -2
- package/es/index.js +17 -15
- package/es/packages/core/types.d.ts +12 -0
- package/es/packages/core/types.js +12 -4
- package/es/packages/core/user.d.ts +18 -2
- package/es/packages/core/user.js +24 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -77,16 +77,34 @@ npm run build
|
|
|
77
77
|
在仓库根目录运行:
|
|
78
78
|
|
|
79
79
|
```powershell
|
|
80
|
+
# 仅修改 wxmp 时:沿用 wxmp/package.json 的 types 依赖,只发布 wxmp
|
|
81
|
+
python publish_wxmp.py
|
|
82
|
+
|
|
80
83
|
# 先发布 types 编译版,再使用本次精确版本构建发布 wxmp
|
|
81
84
|
python publish_es.py
|
|
82
85
|
```
|
|
83
86
|
|
|
87
|
+
`publish_wxmp.py` 不发布 types,也不会自动切换到 `types@es` 的最新版本。
|
|
88
|
+
它确认当前精确依赖已经发布后,只递增并构建发布 wxmp,成功后通知钉钉。
|
|
89
|
+
单独发布入口会先检查工作区、fetch 并合并所有未排除的远程分支;请先提交源码修改。
|
|
90
|
+
发布成功后,将 wxmp 的已发布版本写回 `package.json` 和存在的 `package-lock.json`,
|
|
91
|
+
提交并推送当前分支,默认再将最终 HEAD 快进同步到其他未排除的远程分支。
|
|
92
|
+
添加 `--no-sync` 可跳过最后的其他分支同步,当前分支仍然推送:
|
|
93
|
+
|
|
94
|
+
```powershell
|
|
95
|
+
python publish_wxmp.py --no-sync
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
两个入口复用下面的 wxmp 发布流程:
|
|
99
|
+
|
|
84
100
|
脚本先发布 types 编译版并等待 Registry 可查询,再从本地和 npm 已发布 wxmp 正式版本中的较大版本自动递增 patch,
|
|
85
101
|
在临时目录复制当前 `wxmp/src`,将 `@ningboyz/types` 依赖锁定为具体的 `x.y.z-es.N`,
|
|
86
102
|
安装该版本后构建并预演。构建依赖不复用本机 `wxmp/node_modules`,不会使用旧 types 构建新包。
|
|
87
103
|
正式发布先使用 `release` 标签,检查已发布依赖正确后才切换 wxmp 的 `latest`,最后通知钉钉。
|
|
88
104
|
`types` 的 `latest` 不受影响。
|
|
89
105
|
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
`publish_es.py` 的版本和依赖只写入临时发布清单,不改写仓库版本文件或执行 Git 操作;
|
|
107
|
+
该入口的本地未提交源码也会参与构建,本地版本号可能落后于 npm,下一次发布会重新查询 Registry。
|
|
108
|
+
`publish_wxmp.py` 则在 npm 成功后写回并提交 wxmp 版本,以便日常只运行此入口时也能同步 Git。
|
|
109
|
+
两个入口均沿用临时目录构建。Git 推送或同步失败不撤销已成功的 npm 发布,请单独补完 Git 操作。
|
|
92
110
|
通知失败不撤销已成功的 npm 发布;仅需要补通知时不要重新运行发布命令。
|
package/es/index.js
CHANGED
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import { CoreRequest as
|
|
1
|
+
import { CoreRequest as t } from "./packages/core/index.js";
|
|
2
2
|
import { NotiRequest as r } from "./packages/noti/index.js";
|
|
3
3
|
import { WtuiRequest as o } from "./packages/wtui/index.js";
|
|
4
|
-
import { REQUEST_TIMEOUT_MILLISECONDS as
|
|
5
|
-
import { WxRequestError as
|
|
6
|
-
import { TCoreUnitSelectdbQuerys as q, TWxLoginParams as
|
|
7
|
-
import { TNotiMainDetaildbQuerys as
|
|
4
|
+
import { REQUEST_TIMEOUT_MILLISECONDS as d, TWxConfig as n } from "./packages/types.js";
|
|
5
|
+
import { WxRequestError as c } from "./packages/wx.js";
|
|
6
|
+
import { TCoreUnitSelectdbQuerys as C, TCoreUserDetailddCardQuerys as R, TCoreUserUpdatedbQuerys as q, TWxLoginParams as Q } from "./packages/core/types.js";
|
|
7
|
+
import { TNotiMainDetaildbQuerys as l, TNotiMainGet4NotiQuerys as w } from "./packages/noti/types.js";
|
|
8
8
|
class m {
|
|
9
9
|
static core;
|
|
10
10
|
static noti;
|
|
11
11
|
static wtui;
|
|
12
|
-
static createRequest(
|
|
13
|
-
this.core = new e
|
|
12
|
+
static createRequest(e) {
|
|
13
|
+
this.core = new t(e), this.noti = new r(e), this.wtui = new o(e);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
t as CoreRequest,
|
|
18
18
|
r as NotiRequest,
|
|
19
|
-
|
|
19
|
+
d as REQUEST_TIMEOUT_MILLISECONDS,
|
|
20
20
|
m as Request,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
w as
|
|
21
|
+
C as TCoreUnitSelectdbQuerys,
|
|
22
|
+
R as TCoreUserDetailddCardQuerys,
|
|
23
|
+
q as TCoreUserUpdatedbQuerys,
|
|
24
|
+
l as TNotiMainDetaildbQuerys,
|
|
25
|
+
w as TNotiMainGet4NotiQuerys,
|
|
26
|
+
n as TWxConfig,
|
|
27
|
+
Q as TWxLoginParams,
|
|
26
28
|
o as WtuiRequest,
|
|
27
|
-
|
|
29
|
+
c as WxRequestError,
|
|
28
30
|
m as default
|
|
29
31
|
};
|
|
@@ -9,6 +9,18 @@ export declare class TWxLoginParams implements IWxLoginParams {
|
|
|
9
9
|
encryptedData: string;
|
|
10
10
|
iv: string;
|
|
11
11
|
}
|
|
12
|
+
export interface ICoreUserUpdatedbQuerys {
|
|
13
|
+
domodify: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class TCoreUserUpdatedbQuerys implements ICoreUserUpdatedbQuerys {
|
|
16
|
+
domodify: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ICoreUserDetailddCardQuerys {
|
|
19
|
+
cardmain: number;
|
|
20
|
+
}
|
|
21
|
+
export declare class TCoreUserDetailddCardQuerys implements ICoreUserDetailddCardQuerys {
|
|
22
|
+
cardmain: number;
|
|
23
|
+
}
|
|
12
24
|
/** ========== unit ========== */
|
|
13
25
|
export interface ICoreUnitSelectdbQuerys {
|
|
14
26
|
unitmain: number;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
class
|
|
1
|
+
class s {
|
|
2
2
|
code = "";
|
|
3
3
|
encryptedData = "";
|
|
4
4
|
iv = "";
|
|
5
5
|
}
|
|
6
|
-
class
|
|
6
|
+
class a {
|
|
7
|
+
domodify = -1;
|
|
8
|
+
}
|
|
9
|
+
class r {
|
|
10
|
+
cardmain = -1;
|
|
11
|
+
}
|
|
12
|
+
class d {
|
|
7
13
|
unitmain = -1;
|
|
8
14
|
queuesby = "-1";
|
|
9
15
|
}
|
|
10
16
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
d as TCoreUnitSelectdbQuerys,
|
|
18
|
+
r as TCoreUserDetailddCardQuerys,
|
|
19
|
+
a as TCoreUserUpdatedbQuerys,
|
|
20
|
+
s as TWxLoginParams
|
|
13
21
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TCore } from '@ningboyz/types';
|
|
1
|
+
import { TCard, TCore } from '@ningboyz/types';
|
|
2
2
|
import { WxRequest } from '../wx';
|
|
3
|
-
import { IWxLoginParams } from './types';
|
|
3
|
+
import { ICoreUserDetailddCardQuerys, ICoreUserUpdatedbQuerys, IWxLoginParams } from './types';
|
|
4
4
|
declare class UserRequest {
|
|
5
5
|
private wxRequest;
|
|
6
6
|
constructor(wxRequest: WxRequest);
|
|
@@ -10,5 +10,21 @@ declare class UserRequest {
|
|
|
10
10
|
* @returns
|
|
11
11
|
*/
|
|
12
12
|
login(params: IWxLoginParams): Promise<import('@ningboyz/types/es/response/IResponse.js').IResponse<TCore.IUserResponse[]>>;
|
|
13
|
+
/**获取用户详情 */
|
|
14
|
+
/**
|
|
15
|
+
* 获取用户详情
|
|
16
|
+
* @param params
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
detaildb(params: object): Promise<import('@ningboyz/types/es/response/IResponse.js').IResponse<TCore.IUserResponse[]>>;
|
|
20
|
+
/**
|
|
21
|
+
* 更新用户
|
|
22
|
+
* @param querys
|
|
23
|
+
* @param params
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
updatedb(querys: ICoreUserUpdatedbQuerys, params: object): Promise<import('@ningboyz/types/es/response/IResponse.js').IResponse<TCore.IUserResponse[]>>;
|
|
27
|
+
/** 获取用户详情(房产) */
|
|
28
|
+
detailddCard(querys: ICoreUserDetailddCardQuerys, params: object): Promise<import('@ningboyz/types/es/response/IResponse.js').IResponse<TCard.ICardUserResponse[]>>;
|
|
13
29
|
}
|
|
14
30
|
export default UserRequest;
|
package/es/packages/core/user.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class r {
|
|
2
2
|
wxRequest;
|
|
3
3
|
constructor(e) {
|
|
4
4
|
this.wxRequest = e;
|
|
@@ -11,7 +11,29 @@ class t {
|
|
|
11
11
|
login(e) {
|
|
12
12
|
return this.wxRequest.post("/gapi/core/tuser/verifyd2/weixin", void 0, e);
|
|
13
13
|
}
|
|
14
|
+
/**获取用户详情 */
|
|
15
|
+
/**
|
|
16
|
+
* 获取用户详情
|
|
17
|
+
* @param params
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
detaildb(e) {
|
|
21
|
+
return this.wxRequest.post("/gapi/core/tuser/detaildb", void 0, e);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 更新用户
|
|
25
|
+
* @param querys
|
|
26
|
+
* @param params
|
|
27
|
+
* @returns
|
|
28
|
+
*/
|
|
29
|
+
updatedb(e, t) {
|
|
30
|
+
return this.wxRequest.post("/gapi/core/tuser/updatedb", e, t);
|
|
31
|
+
}
|
|
32
|
+
/** 获取用户详情(房产) */
|
|
33
|
+
detailddCard(e, t) {
|
|
34
|
+
return this.wxRequest.post("/gapi/core/tuser/detaildd", e, t);
|
|
35
|
+
}
|
|
14
36
|
}
|
|
15
37
|
export {
|
|
16
|
-
|
|
38
|
+
r as default
|
|
17
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ningboyz/wxmp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "宁波甬政微信小程序库",
|
|
6
6
|
"author": "nbyt-syq",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"registry": "https://registry.npmjs.org/"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@ningboyz/types": "1.8.
|
|
32
|
+
"@ningboyz/types": "1.8.89-es.0",
|
|
33
33
|
"lodash": "4.17.21"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|