@zl-ui-kit/utils 0.25.4 → 0.25.5

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.
Files changed (3) hide show
  1. package/README.md +35 -35
  2. package/package.json +25 -25
  3. package/LICENSE +0 -21
package/README.md CHANGED
@@ -1,35 +1,35 @@
1
- # @zl-ui-kit/utils
2
-
3
- > **完整使用文档**:[`@zl-ui-kit/components` 的 README(npm 页面)](https://www.npmjs.com/package/@zl-ui-kit/components) 即 UI 组件权威文档 ——
4
- > 本包的 Hooks / 工具 / 主题 / 国际化用法都在其中,本文只保留本包速查与运行前提。
5
-
6
- ZL UI 通用工具函数库(TypeScript):数组/对象/DOM/函数、AES 加解密(crypto-js)、文件工具、axios 请求封装(`createRequest`:防重复、qs 序列化、`{cipher}` 响应解密)、分页/格式化等。
7
-
8
- ## 快速上手
9
-
10
- ```ts
11
- import { createRequest, convertArrayToTree, paginate, aesEncrypt } from '@zl-ui-kit/utils'
12
-
13
- const request = createRequest({
14
- baseURL: '/api',
15
- onError(code, err) {
16
- /* ... */
17
- },
18
- })
19
- ```
20
-
21
- 注入式设计(决策 §12-Q3):`baseURL`、调试开关等均由参数注入,**不读取构建环境变量**,Vite/webpack 消费方均可使用。
22
-
23
- ## 模块说明
24
-
25
- - 不迁移(业务/循环依赖,见需求 §5.1):原 `policy.js`、`list-hook.js`
26
- - `echarts` 图表工具并入 `@zl-ui-kit/components`(随 JcChart/ZlChart 批次)
27
- - UKey SDK 以 `vendor/mtoken.js` 原样附带(`@zl-ui-kit/utils/vendor/mtoken.js`,未纳入类型与主入口)
28
-
29
- ## 本地调试
30
-
31
- 源码即入口(playground alias 直指 `src/`);`pnpm build`(tsup 产 `dist/index.js` + d.ts);`pnpm test:unit`(vitest,纯函数用例)。调试细节见 `@zl-ui-kit/components` README §11。
32
-
33
- ## 发布
34
-
35
- 见根目录 `docs/发布流程.md`(publint/attw/脱敏扫描为硬门槛)。
1
+ # @zl-ui-kit/utils
2
+
3
+ > **完整使用文档**:[`@zl-ui-kit/components` 的 README(npm 页面)](https://www.npmjs.com/package/@zl-ui-kit/components) 即 UI 组件权威文档 ——
4
+ > 本包的 Hooks / 工具 / 主题 / 国际化用法都在其中,本文只保留本包速查与运行前提。
5
+
6
+ ZL UI 通用工具函数库(TypeScript):数组/对象/DOM/函数、AES 加解密(crypto-js)、文件工具、axios 请求封装(`createRequest`:防重复、qs 序列化、`{cipher}` 响应解密)、分页/格式化等。
7
+
8
+ ## 快速上手
9
+
10
+ ```ts
11
+ import { createRequest, convertArrayToTree, paginate, aesEncrypt } from '@zl-ui-kit/utils'
12
+
13
+ const request = createRequest({
14
+ baseURL: '/api',
15
+ onError(code, err) {
16
+ /* ... */
17
+ },
18
+ })
19
+ ```
20
+
21
+ 注入式设计(决策 §12-Q3):`baseURL`、调试开关等均由参数注入,**不读取构建环境变量**,Vite/webpack 消费方均可使用。
22
+
23
+ ## 模块说明
24
+
25
+ - 不迁移(业务/循环依赖,见需求 §5.1):原 `policy.js`、`list-hook.js`
26
+ - `echarts` 图表工具并入 `@zl-ui-kit/components`(随 JcChart/ZlChart 批次)
27
+ - UKey SDK 以 `vendor/mtoken.js` 原样附带(`@zl-ui-kit/utils/vendor/mtoken.js`,未纳入类型与主入口)
28
+
29
+ ## 本地调试
30
+
31
+ 源码即入口(playground alias 直指 `src/`);`pnpm build`(tsup 产 `dist/index.js` + d.ts);`pnpm test:unit`(vitest,纯函数用例)。调试细节见 `@zl-ui-kit/components` README §11。
32
+
33
+ ## 发布
34
+
35
+ 见根目录 `docs/发布流程.md`(publint/attw/脱敏扫描为硬门槛)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zl-ui-kit/utils",
3
- "version": "0.25.4",
3
+ "version": "0.25.5",
4
4
  "type": "module",
5
5
  "description": "ZL UI 通用工具函数库(数组/对象/DOM/加密/文件/请求封装/微前端 URL 等)",
6
6
  "license": "MIT",
@@ -20,25 +20,32 @@
20
20
  "!dist/**/*.map"
21
21
  ],
22
22
  "sideEffects": false,
23
+ "scripts": {
24
+ "build": "tsup",
25
+ "dev": "tsup --watch",
26
+ "typecheck": "tsc --noEmit",
27
+ "lint": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint src test --ext .ts",
28
+ "test:unit": "vitest run"
29
+ },
23
30
  "dependencies": {
24
- "axios": "^1.7.9",
25
- "crypto-js": "^4.2.0",
26
- "file-saver": "^2.0.5",
27
- "qs": "^6.13.1"
31
+ "axios": "catalog:",
32
+ "crypto-js": "catalog:",
33
+ "file-saver": "catalog:",
34
+ "qs": "catalog:"
28
35
  },
29
36
  "devDependencies": {
30
- "@types/crypto-js": "^4.2.2",
31
- "@types/file-saver": "^2.0.7",
32
- "@types/node": "^22.10.5",
33
- "@types/qs": "^6.15.1",
34
- "@typescript-eslint/eslint-plugin": "^8.19.1",
35
- "@typescript-eslint/parser": "^8.19.1",
36
- "cross-env": "^7.0.3",
37
- "tsup": "^8.3.5",
38
- "typescript": "^5.7.3",
39
- "vitest": "^2.1.8",
40
- "@jichuang/tsconfig": "1.0.0",
41
- "@jichuang/eslint-config": "1.0.0"
37
+ "@jichuang/eslint-config": "workspace:*",
38
+ "@jichuang/tsconfig": "workspace:*",
39
+ "@types/crypto-js": "catalog:",
40
+ "@types/file-saver": "catalog:",
41
+ "@types/node": "catalog:",
42
+ "@types/qs": "catalog:",
43
+ "@typescript-eslint/eslint-plugin": "catalog:",
44
+ "@typescript-eslint/parser": "catalog:",
45
+ "cross-env": "catalog:",
46
+ "tsup": "catalog:",
47
+ "typescript": "catalog:",
48
+ "vitest": "catalog:"
42
49
  },
43
50
  "repository": {
44
51
  "type": "git",
@@ -53,12 +60,5 @@
53
60
  "publishConfig": {
54
61
  "access": "public",
55
62
  "registry": "https://registry.npmjs.org/"
56
- },
57
- "scripts": {
58
- "build": "tsup",
59
- "dev": "tsup --watch",
60
- "typecheck": "tsc --noEmit",
61
- "lint": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint src test --ext .ts",
62
- "test:unit": "vitest run"
63
63
  }
64
- }
64
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Vik05
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.