@gjzq/sdk 1.0.2
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/LICENSE +21 -0
- package/README.md +81 -0
- package/dist/LICENSE +21 -0
- package/dist/README.md +3 -0
- package/dist/index.d.ts +956 -0
- package/dist/index.esm.js +1 -0
- package/dist/index.js +1 -0
- package/dist/package.json +13 -0
- package/package.json +83 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 @sinolink/sdk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# @gjzq/sdk
|
|
2
|
+
|
|
3
|
+
佣金宝sdk
|
|
4
|
+
|
|
5
|
+
## 目录结构
|
|
6
|
+
|
|
7
|
+
- `src/`:功能组件,每个组件独立目录,包含实现、类型、测试、说明
|
|
8
|
+
- `utils/`:公共方法
|
|
9
|
+
- `demo/`:本地启动和功能测试页面
|
|
10
|
+
- `dist/`:打包输出
|
|
11
|
+
|
|
12
|
+
## 快速开始
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install
|
|
16
|
+
npm run build
|
|
17
|
+
npm run demo
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 注意
|
|
21
|
+
1. 所有组件导出功能在根目录index.ts;为防止多人协作冲突,可以运行 `node script` 来一键生成
|
|
22
|
+
2. 新建组件可通过执行`node cli/index.js {组件名}`
|
|
23
|
+
3. 自测当前组件测试用例可以通过执行 `node test {组件名}`
|
|
24
|
+
|
|
25
|
+
## 分支管理
|
|
26
|
+
1. 开发各自从master分支拉取分支进行开发
|
|
27
|
+
2. 本地分支开发完提merge request到beta分支发布beta版本
|
|
28
|
+
3. beta版本测试通过,合并merge request到release分支发布正式版本
|
|
29
|
+
```
|
|
30
|
+
beta、release为受保护分支,必须通过mr提交
|
|
31
|
+
```
|
|
32
|
+
## 代码规范管理
|
|
33
|
+
- **函数名称规范**
|
|
34
|
+
统一驼峰写法,语义,严格按照eslint规范
|
|
35
|
+
- **changelog 规范说明**
|
|
36
|
+
```
|
|
37
|
+
为防止生成的log过多,经过讨论,需要人工维护。在每次发布**正式版**本时手动在&CHANGELOG.md文件中插入一条。
|
|
38
|
+
# 修改版本号 + 修改时间
|
|
39
|
+
如: V1.0.0 [2025-10-14 12:00:00]
|
|
40
|
+
|
|
41
|
+
---------- 版本号规范开始 --------
|
|
42
|
+
## 0.0.1 小版本更新
|
|
43
|
+
## 0.1.1 中版本更新
|
|
44
|
+
## 1.1.1 大版本更新
|
|
45
|
+
---------- 版本号规范结束 --------
|
|
46
|
+
|
|
47
|
+
# 变更类型
|
|
48
|
+
---------- 变更类型规范开始 --------
|
|
49
|
+
新增(Features):✨新增功能。
|
|
50
|
+
修复(Bug Fixes):🐛修复 bug。
|
|
51
|
+
删除(Removed):已删除的功能。
|
|
52
|
+
文档(Documentation):📚文档新增或者修改。
|
|
53
|
+
变更(Changed):对于某些已存在功能所发生的逻辑变化。
|
|
54
|
+
优化(Refactored):🚀性能或结构上的优化,并未带来功能的逻辑变化。
|
|
55
|
+
即将删除(Deprecation Warnings):即将废弃的功能。
|
|
56
|
+
重大变更(Breaking Changes):破坏性变动。
|
|
57
|
+
---------- 变更类型规范结束 --------
|
|
58
|
+
|
|
59
|
+
# 变更描述 + 变更提交地址
|
|
60
|
+
1,使用完整的句子。即在标点方面遵循一般的文档格式规约;如果使用英语,则句首大写。
|
|
61
|
+
2,时态方面使用一般现在时,不要用过去时态。虽然查看 Changelog 时,Changelog 内容本身都发生在过去,然而使用现在时的时态更简洁明确,并且更易达成一致性。
|
|
62
|
+
3,句式使用祈使句式。即一般情况不要增加主语。因为在绝大情况下,主语都是作者「我」。
|
|
63
|
+
4,注明修复的问题。
|
|
64
|
+
```
|
|
65
|
+
- **示例: 新增channgeLog规范。【代码变更提交地址】**
|
|
66
|
+
#### 版本:V0.0.1 (`2025-10-21`)
|
|
67
|
+
##### ✨新增功能 | Features
|
|
68
|
+
- 基础脚手架搭建。
|
|
69
|
+
- 增加channgelog规范、eslint规范。[#1d071b15](http://192.168.22.21:8181/yjb-frontend/public/bourn-tools/sdk/-/commit/a3e12feb3ba90e3518da6b769ab2c4cb1d071b15)
|
|
70
|
+
- 老版sdk迁移。
|
|
71
|
+
|
|
72
|
+
#### 🐛修复 bug | Bug Fixes
|
|
73
|
+
- 修复了在xx环境下获取UA失败的问题
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 单测
|
|
77
|
+
1. 单测文件按模板生成维护在`src/{组件名}/{组件名}.test.ts`文件下
|
|
78
|
+
2. 建议vdi内安装通义灵码插件,ai协助生成单元测试
|
|
79
|
+
3. 单测执行:全量 `npm run test` 或 单独调试 `node test {组件名}`
|
|
80
|
+
|
|
81
|
+
## 文档编写
|
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 @sinolink/sdk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/README.md
ADDED