@pawover/kit 0.6.0 → 0.7.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.
Files changed (121) hide show
  1. package/README.en.md +123 -0
  2. package/README.md +123 -1
  3. package/entry/eslint-rules.cjs +1 -0
  4. package/entry/eslint-rules.d.cts +1 -0
  5. package/entry/eslint-rules.d.ts +2 -0
  6. package/entry/eslint-rules.js +2 -0
  7. package/entry/hooks-alova.cjs +1 -0
  8. package/entry/hooks-alova.d.cts +1 -0
  9. package/entry/hooks-alova.d.ts +1 -0
  10. package/entry/hooks-alova.js +1 -0
  11. package/entry/hooks-react.cjs +1 -0
  12. package/entry/hooks-react.d.cts +1 -0
  13. package/entry/hooks-react.d.ts +1 -0
  14. package/entry/hooks-react.js +1 -0
  15. package/entry/index.cjs +1 -0
  16. package/entry/index.d.cts +1 -0
  17. package/entry/index.d.ts +1 -0
  18. package/entry/index.js +1 -0
  19. package/entry/math.cjs +1 -0
  20. package/entry/math.d.cts +1 -0
  21. package/entry/math.d.ts +1 -0
  22. package/entry/math.js +1 -0
  23. package/entry/types-react.cjs +1 -0
  24. package/entry/types-react.d.cts +1 -0
  25. package/entry/types-react.d.ts +1 -0
  26. package/entry/types-react.js +1 -0
  27. package/entry/types.cjs +1 -0
  28. package/entry/types.d.cts +1 -0
  29. package/entry/types.d.ts +1 -0
  30. package/entry/types.js +1 -0
  31. package/entry/vite.cjs +1 -0
  32. package/entry/vite.d.cts +1 -0
  33. package/entry/vite.d.ts +1 -0
  34. package/entry/vite.js +1 -0
  35. package/entry/zod.cjs +1 -0
  36. package/entry/zod.d.cts +1 -0
  37. package/entry/zod.d.ts +1 -0
  38. package/entry/zod.js +1 -0
  39. package/package.json +72 -96
  40. package/packages/eslint-rules/dist/core.antfu.cjs +0 -78
  41. package/packages/eslint-rules/dist/core.antfu.d.cts +0 -1
  42. package/packages/eslint-rules/dist/core.antfu.d.ts +0 -74
  43. package/packages/eslint-rules/dist/core.antfu.js +0 -79
  44. package/packages/eslint-rules/dist/core.imports.cjs +0 -59
  45. package/packages/eslint-rules/dist/core.imports.d.cts +0 -1
  46. package/packages/eslint-rules/dist/core.imports.d.ts +0 -61
  47. package/packages/eslint-rules/dist/core.imports.js +0 -59
  48. package/packages/eslint-rules/dist/core.importsSort.cjs +0 -7
  49. package/packages/eslint-rules/dist/core.importsSort.d.cts +0 -1
  50. package/packages/eslint-rules/dist/core.importsSort.d.ts +0 -7
  51. package/packages/eslint-rules/dist/core.importsSort.js +0 -7
  52. package/packages/eslint-rules/dist/core.javascript.cjs +0 -1208
  53. package/packages/eslint-rules/dist/core.javascript.d.cts +0 -1
  54. package/packages/eslint-rules/dist/core.javascript.d.ts +0 -1216
  55. package/packages/eslint-rules/dist/core.javascript.js +0 -1208
  56. package/packages/eslint-rules/dist/core.react.cjs +0 -551
  57. package/packages/eslint-rules/dist/core.react.d.cts +0 -1
  58. package/packages/eslint-rules/dist/core.react.d.ts +0 -551
  59. package/packages/eslint-rules/dist/core.react.js +0 -551
  60. package/packages/eslint-rules/dist/core.reactHooks.cjs +0 -107
  61. package/packages/eslint-rules/dist/core.reactHooks.d.cts +0 -1
  62. package/packages/eslint-rules/dist/core.reactHooks.d.ts +0 -107
  63. package/packages/eslint-rules/dist/core.reactHooks.js +0 -107
  64. package/packages/eslint-rules/dist/core.stylistic.cjs +0 -608
  65. package/packages/eslint-rules/dist/core.stylistic.d.cts +0 -1
  66. package/packages/eslint-rules/dist/core.stylistic.d.ts +0 -595
  67. package/packages/eslint-rules/dist/core.stylistic.js +0 -608
  68. package/packages/eslint-rules/dist/core.typescript.cjs +0 -905
  69. package/packages/eslint-rules/dist/core.typescript.d.cts +0 -1
  70. package/packages/eslint-rules/dist/core.typescript.d.ts +0 -917
  71. package/packages/eslint-rules/dist/core.typescript.js +0 -906
  72. package/packages/eslint-rules/dist/core.vue.cjs +0 -312
  73. package/packages/eslint-rules/dist/core.vue.d.cts +0 -1
  74. package/packages/eslint-rules/dist/core.vue.d.ts +0 -293
  75. package/packages/eslint-rules/dist/core.vue.js +0 -313
  76. package/packages/eslint-rules/dist/index.cjs +0 -126
  77. package/packages/eslint-rules/dist/index.d.cts +0 -1
  78. package/packages/eslint-rules/dist/index.d.ts +0 -113
  79. package/packages/eslint-rules/dist/index.js +0 -126
  80. package/packages/eslint-rules/dist/preset-Bk6lxNP0.cjs +0 -107
  81. package/packages/eslint-rules/dist/preset-CQJST7pW.js +0 -102
  82. package/packages/hooks/dist/alova.cjs +0 -53
  83. package/packages/hooks/dist/alova.d.cts +0 -1
  84. package/packages/hooks/dist/alova.d.ts +0 -33
  85. package/packages/hooks/dist/alova.js +0 -50
  86. package/packages/hooks/dist/index.cjs +0 -0
  87. package/packages/hooks/dist/index.d.cts +0 -1
  88. package/packages/hooks/dist/index.d.ts +0 -1
  89. package/packages/hooks/dist/index.js +0 -0
  90. package/packages/hooks/dist/react.cjs +0 -169
  91. package/packages/hooks/dist/react.d.cts +0 -1
  92. package/packages/hooks/dist/react.d.ts +0 -95
  93. package/packages/hooks/dist/react.js +0 -163
  94. package/packages/types/dist/index.cjs +0 -0
  95. package/packages/types/dist/index.d.cts +0 -1
  96. package/packages/types/dist/index.d.ts +0 -271
  97. package/packages/types/dist/index.js +0 -0
  98. package/packages/types/dist/react.cjs +0 -0
  99. package/packages/types/dist/react.d.cts +0 -1
  100. package/packages/types/dist/react.d.ts +0 -64
  101. package/packages/types/dist/react.js +0 -0
  102. package/packages/utils/dist/index.cjs +0 -2300
  103. package/packages/utils/dist/index.d.cts +0 -1
  104. package/packages/utils/dist/index.d.ts +0 -2740
  105. package/packages/utils/dist/index.js +0 -2287
  106. package/packages/utils/dist/math-BznvO4qI.cjs +0 -1029
  107. package/packages/utils/dist/math-DRbCtLQH.js +0 -1012
  108. package/packages/utils/dist/math.cjs +0 -3
  109. package/packages/utils/dist/math.d.cts +0 -1
  110. package/packages/utils/dist/math.d.ts +0 -60
  111. package/packages/utils/dist/math.js +0 -2
  112. package/packages/utils/dist/vite.cjs +0 -44
  113. package/packages/utils/dist/vite.d.cts +0 -1
  114. package/packages/utils/dist/vite.d.ts +0 -28
  115. package/packages/utils/dist/vite.js +0 -43
  116. package/packages/zod/dist/index.cjs +0 -91
  117. package/packages/zod/dist/index.d.cts +0 -1
  118. package/packages/zod/dist/index.d.ts +0 -57
  119. package/packages/zod/dist/index.js +0 -61
  120. /package/{packages/hooks/dist/metadata.json → entry/hooks-metadata.json} +0 -0
  121. /package/{packages/utils/dist → entry}/metadata.json +0 -0
package/README.en.md ADDED
@@ -0,0 +1,123 @@
1
+ # pawover-kit
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit)
4
+ [![Node version](https://img.shields.io/badge/node-%3E%3D22.20.0-brightgreen.svg)](https://nodejs.org)
5
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+
7
+ > An open-source TypeScript toolkit: type utilities, static utility classes, React / Alova hooks, ESLint rulesets and Zod schemas, ready to use with complete type definitions.
8
+
9
+ pawover-kit is a pnpm monorepo made of 5 independently publishable packages. The root package `@pawover/kit` re-exports every subpackage, while each subpackage can also be installed and used on its own.
10
+
11
+ ## Features
12
+
13
+ - **Type-only utilities** `@pawover/kit-types`: no runtime code, providing `AnyObject`, `TreeLike`, the `AnyFunction` family, `AdvancedRecord`, `ApiNameCheck` and more
14
+ - **Static utility classes** `@pawover/kit-utils`: 14+ utility classes covering arrays, strings, objects, trees, currency, dates, math and more
15
+ - **React / Alova hooks** `@pawover/kit-hooks`: `useMount`, `useUnmount`, `useLatest`, `useResponsive`, `useTitle` and Alova request hooks
16
+ - **ESLint rulesets** `@pawover/kit-eslint-rules`: 9 rule groups (javascript / typescript / react / reactHooks / vue / stylistic / antfu / imports / importsSort) plus `GLOB_EXCLUDE` and `createRules`
17
+ - **Zod v4 schemas** `@pawover/kit-zod`: common validators for id, string, number, boolean, bigint and more
18
+ - Dual ESM / CJS builds with full type declarations
19
+ - `development` export condition so bundlers can use the source directly in development
20
+
21
+ ## Packages
22
+
23
+ | Package | Description | Import path |
24
+ | :--- | :--- | :--- |
25
+ | `@pawover/kit-types` | Type-only utilities (no runtime code) | `@pawover/kit/types`, React types via `@pawover/kit/types/react` |
26
+ | `@pawover/kit-utils` | Static utility classes | `@pawover/kit/utils` (also `./math` and `./vite` subpaths) |
27
+ | `@pawover/kit-hooks` | React + Alova hooks | `@pawover/kit/hooks/react`, `@pawover/kit/hooks/alova` |
28
+ | `@pawover/kit-eslint-rules` | ESLint rulesets | `@pawover/kit/eslint-rules` |
29
+ | `@pawover/kit-zod` | Zod v4 schemas | `@pawover/kit/zod` |
30
+
31
+ > [!NOTE]
32
+ > The root export of `@pawover/kit-hooks` is empty. Always import from the `@pawover/kit/hooks/react` or `@pawover/kit/hooks/alova` subpaths.
33
+
34
+ ## Installation
35
+
36
+ Install the umbrella package:
37
+
38
+ ```bash
39
+ npm install @pawover/kit
40
+ ```
41
+
42
+ Or install individual subpackages:
43
+
44
+ ```bash
45
+ npm install @pawover/kit-types
46
+ npm install @pawover/kit-utils
47
+ npm install @pawover/kit-hooks
48
+ npm install @pawover/kit-eslint-rules
49
+ npm install @pawover/kit-zod
50
+ ```
51
+
52
+ > [!WARNING]
53
+ > `alova`, `mathjs`, `react`, `vite` and `zod` are optional peer dependencies: install them yourself when using the related features (for example `alova` and `react` are required for `@pawover/kit/hooks/alova`).
54
+
55
+ ## Quick start
56
+
57
+ ```ts
58
+ import { TypeUtil } from "@pawover/kit/utils";
59
+ import { useMount } from "@pawover/kit/hooks/react";
60
+ import { useAlovaRequest } from "@pawover/kit/hooks/alova";
61
+ import type { AnyObject } from "@pawover/kit/types";
62
+ import eslintRules from "@pawover/kit/eslint-rules";
63
+ import { id } from "@pawover/kit/zod";
64
+
65
+ // Type utilities
66
+ const obj: AnyObject = { a: 1, b: "2" };
67
+
68
+ // Static utility classes
69
+ TypeUtil.isString("hello"); // true
70
+
71
+ // React hooks
72
+ useMount(() => {
73
+ console.log("mounted");
74
+ });
75
+
76
+ // ESLint rulesets (flat config)
77
+ export default [
78
+ { ignores: eslintRules.GLOB_EXCLUDE },
79
+ { files: ["**/*.ts"], rules: { ...eslintRules.javascript, ...eslintRules.typescript } },
80
+ ];
81
+
82
+ // Zod schemas
83
+ id.parse("abc"); // "abc"
84
+ ```
85
+
86
+ ## Requirements
87
+
88
+ - Node.js >= 22.20.0
89
+ - pnpm >= 11
90
+
91
+ ## Development
92
+
93
+ ```bash
94
+ git clone https://github.com/pawover/pawover-kit.git
95
+ cd pawover-kit
96
+ pnpm install
97
+ ```
98
+
99
+ Common commands:
100
+
101
+ | Command | Description |
102
+ | :--- | :--- |
103
+ | `pnpm test` | Run all vitest suites (801 tests / 31 files, node + jsdom environments) |
104
+ | `pnpm test:types` | Type-check the test files |
105
+ | `pnpm test:ci` | Full CI pipeline: type check → tests → build → smoke → pack check |
106
+ | `pnpm build` | Build every subpackage with turbo (tsdown emits ESM/CJS builds and type declarations) |
107
+ | `pnpm check` | Run types / eslint / format checks in parallel |
108
+
109
+ ## Testing
110
+
111
+ - **Unit tests**: vitest with two projects (node environment for utils / zod / eslint-rules, jsdom environment for hooks)
112
+ - **Type tests**: type-level API tests ending with `.test.type.ts` under `test/types/`, fully checked by `test:types`
113
+ - **Smoke tests**: verify every dist entry is importable after the build
114
+
115
+ ## Build pipeline
116
+
117
+ ```
118
+ tsdown (build:source) → metadata extraction (build:metadata) → turbo build
119
+ ```
120
+
121
+ - **tsdown** produces the bundles and type declarations
122
+ - **metadata.ts** extracts the runtime exports of utils / hooks into `dist/metadata.json`
123
+ - Every subpath export ships a `"development": "./src/index.ts"` alias so dev toolchains can consume the source directly
package/README.md CHANGED
@@ -1 +1,123 @@
1
- # pawover-kit
1
+ # pawover-kit
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@pawover/kit.svg)](https://www.npmjs.com/package/@pawover/kit)
4
+ [![Node version](https://img.shields.io/badge/node-%3E%3D22.20.0-brightgreen.svg)](https://nodejs.org)
5
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
+
7
+ > 一个基于 TypeScript 的开源工具包合集:类型工具、静态工具类、React / Alova Hooks、ESLint 规则集与 Zod Schema,开箱即用、类型完备。
8
+
9
+ pawover-kit 是一个 pnpm 单体仓库(monorepo),由 5 个独立可发布的子包组成。根包 `@pawover/kit` 聚合重新导出所有子包,也可以按需单独安装使用。
10
+
11
+ ## 特性
12
+
13
+ - **纯类型工具** `@pawover/kit-types`:无运行时代码,提供 `AnyObject`、`TreeLike`、`AnyFunction` 族、`AdvancedRecord`、`ApiNameCheck` 等常用类型
14
+ - **静态工具类** `@pawover/kit-utils`:数组、字符串、对象、树、货币、日期、数学等 14+ 个工具类
15
+ - **React / Alova Hooks** `@pawover/kit-hooks`:`useMount`、`useUnmount`、`useLatest`、`useResponsive`、`useTitle` 与 Alova 请求系列 Hooks
16
+ - **ESLint 规则集** `@pawover/kit-eslint-rules`:9 大规则组(javascript / typescript / react / reactHooks / vue / stylistic / antfu / imports / importsSort)+ `GLOB_EXCLUDE` + `createRules`
17
+ - **Zod v4 Schema** `@pawover/kit-zod`:id、string、number、boolean、bigint 等常用校验器
18
+ - ESM / CJS 双格式产物,附带完整类型声明
19
+ - `development` 导出条件,开发环境可直接使用源码,方便调试
20
+
21
+ ## 包结构
22
+
23
+ | 包 | 说明 | 导入路径 |
24
+ | :--- | :--- | :--- |
25
+ | `@pawover/kit-types` | 纯类型工具包(无运行时代码) | `@pawover/kit/types`,react 相关类型见 `@pawover/kit/types/react` |
26
+ | `@pawover/kit-utils` | 静态工具类 | `@pawover/kit/utils`(另有 `./math`、`./vite` 子路径) |
27
+ | `@pawover/kit-hooks` | React + Alova Hooks | `@pawover/kit/hooks/react`、`@pawover/kit/hooks/alova` |
28
+ | `@pawover/kit-eslint-rules` | ESLint 规则集 | `@pawover/kit/eslint-rules` |
29
+ | `@pawover/kit-zod` | Zod v4 Schema | `@pawover/kit/zod` |
30
+
31
+ > [!NOTE]
32
+ > `@pawover/kit-hooks` 的根导出为空,请始终从 `@pawover/kit/hooks/react` 或 `@pawover/kit/hooks/alova` 子路径导入。
33
+
34
+ ## 安装
35
+
36
+ 使用根包聚合导入:
37
+
38
+ ```bash
39
+ npm install @pawover/kit
40
+ ```
41
+
42
+ 或按需安装单个子包:
43
+
44
+ ```bash
45
+ npm install @pawover/kit-types
46
+ npm install @pawover/kit-utils
47
+ npm install @pawover/kit-hooks
48
+ npm install @pawover/kit-eslint-rules
49
+ npm install @pawover/kit-zod
50
+ ```
51
+
52
+ > [!WARNING]
53
+ > `alova`、`mathjs`、`react`、`vite`、`zod` 为可选 peer 依赖:使用对应功能前需自行安装(如使用 `@pawover/kit/hooks/alova` 需要 `alova` 与 `react`)。
54
+
55
+ ## 快速开始
56
+
57
+ ```ts
58
+ import { TypeUtil } from "@pawover/kit/utils";
59
+ import { useMount } from "@pawover/kit/hooks/react";
60
+ import { useAlovaRequest } from "@pawover/kit/hooks/alova";
61
+ import type { AnyObject } from "@pawover/kit/types";
62
+ import eslintRules from "@pawover/kit/eslint-rules";
63
+ import { id } from "@pawover/kit/zod";
64
+
65
+ // 类型工具
66
+ const obj: AnyObject = { a: 1, b: "2" };
67
+
68
+ // 静态工具类
69
+ TypeUtil.isString("hello"); // true
70
+
71
+ // React Hook
72
+ useMount(() => {
73
+ console.log("mounted");
74
+ });
75
+
76
+ // ESLint 规则集(flat config)
77
+ export default [
78
+ { ignores: eslintRules.GLOB_EXCLUDE },
79
+ { files: ["**/*.ts"], rules: { ...eslintRules.javascript, ...eslintRules.typescript } },
80
+ ];
81
+
82
+ // Zod Schema
83
+ id.parse("abc"); // "abc"
84
+ ```
85
+
86
+ ## 环境要求
87
+
88
+ - Node.js >= 22.20.0
89
+ - pnpm >= 11
90
+
91
+ ## 开发
92
+
93
+ ```bash
94
+ git clone https://github.com/pawover/pawover-kit.git
95
+ cd pawover-kit
96
+ pnpm install
97
+ ```
98
+
99
+ 常用命令:
100
+
101
+ | 命令 | 说明 |
102
+ | :--- | :--- |
103
+ | `pnpm test` | vitest 全量运行(801 条测试 / 31 个文件,node + jsdom 双环境) |
104
+ | `pnpm test:types` | 测试文件的类型检查 |
105
+ | `pnpm test:ci` | 完整 CI 流程:类型检查 → 测试 → 构建 → 冒烟 → pack 检查 |
106
+ | `pnpm build` | turbo 构建全部子包(tsdown 生成 ESM/CJS 双格式与类型声明) |
107
+ | `pnpm check` | 并行运行 types / eslint / format 检查 |
108
+
109
+ ## 测试
110
+
111
+ - **单元测试**:vitest 双项目(node 环境覆盖 utils / zod / eslint-rules,jsdom 环境覆盖 hooks)
112
+ - **类型测试**:`test/types/` 下以 `.test.type.ts` 结尾的类型级 API 测试,由 `test:types` 全量检查
113
+ - **冒烟测试**:构建后验证所有 dist 产物可正常导入
114
+
115
+ ## 构建流水线
116
+
117
+ ```
118
+ tsdown (build:source) → metadata 提取 (build:metadata) → turbo build
119
+ ```
120
+
121
+ - **tsdown** 负责打包与类型声明生成
122
+ - **metadata.ts** 提取 utils / hooks 的运行时导出名,写入 `dist/metadata.json`
123
+ - 所有子路径导出均带 `"development": "./src/index.ts"` 别名,开发工具链可直接使用源码
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-eslint-rules");
@@ -0,0 +1 @@
1
+ export type * from './eslint-rules.d.ts';
@@ -0,0 +1,2 @@
1
+ export * from "@pawover/kit-eslint-rules";
2
+ export { default } from "@pawover/kit-eslint-rules";
@@ -0,0 +1,2 @@
1
+ export * from "@pawover/kit-eslint-rules";
2
+ export { default } from "@pawover/kit-eslint-rules";
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-hooks/alova");
@@ -0,0 +1 @@
1
+ export type * from './hooks-alova.d.ts';
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-hooks/alova";
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-hooks/alova";
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-hooks/react");
@@ -0,0 +1 @@
1
+ export type * from './hooks-react.d.ts';
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-hooks/react";
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-hooks/react";
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-utils");
@@ -0,0 +1 @@
1
+ export type * from './index.d.ts';
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-utils";
package/entry/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-utils";
package/entry/math.cjs ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-utils/math");
@@ -0,0 +1 @@
1
+ export type * from './math.d.ts';
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-utils/math";
package/entry/math.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-utils/math";
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-types/react");
@@ -0,0 +1 @@
1
+ export type * from './types-react.d.ts';
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-types/react";
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-types/react";
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-types");
@@ -0,0 +1 @@
1
+ export type * from './types.d.ts';
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-types";
package/entry/types.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-types";
package/entry/vite.cjs ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-utils/vite");
@@ -0,0 +1 @@
1
+ export type * from './vite.d.ts';
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-utils/vite";
package/entry/vite.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-utils/vite";
package/entry/zod.cjs ADDED
@@ -0,0 +1 @@
1
+ module.exports = require("@pawover/kit-zod");
@@ -0,0 +1 @@
1
+ export type * from './zod.d.ts';
package/entry/zod.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-zod";
package/entry/zod.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@pawover/kit-zod";
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/pawover"
7
7
  },
8
8
  "description": "一个基于 TypeScript 的开发工具包",
9
- "version": "0.6.0",
9
+ "version": "0.7.0",
10
10
  "type": "module",
11
11
  "engines": {
12
12
  "node": ">=22.20.0"
@@ -27,166 +27,142 @@
27
27
  "url": "git+https://github.com/pawover/pawover-kit.git"
28
28
  },
29
29
  "license": "MIT",
30
- "main": "./packages/utils/dist/index.cjs",
31
- "module": "./packages/utils/dist/index.js",
32
- "types": "./packages/utils/dist/index.d.ts",
30
+ "main": "./entry/index.cjs",
31
+ "module": "./entry/index.js",
32
+ "types": "./entry/index.d.ts",
33
33
  "files": [
34
- "packages/utils/dist",
35
- "packages/hooks/dist",
36
- "packages/types/dist",
37
- "packages/eslint-rules/dist",
38
- "packages/zod/dist"
34
+ "entry"
39
35
  ],
40
36
  "exports": {
41
37
  ".": {
42
38
  "import": {
43
- "types": "./packages/utils/dist/index.d.ts",
44
- "default": "./packages/utils/dist/index.js"
39
+ "types": "./entry/index.d.ts",
40
+ "default": "./entry/index.js"
45
41
  },
46
42
  "require": {
47
- "types": "./packages/utils/dist/index.d.cts",
48
- "default": "./packages/utils/dist/index.cjs"
43
+ "types": "./entry/index.d.cts",
44
+ "default": "./entry/index.cjs"
49
45
  }
50
46
  },
51
- "./math": {
47
+ "./utils": {
52
48
  "import": {
53
- "types": "./packages/utils/dist/math.d.ts",
54
- "default": "./packages/utils/dist/math.js"
49
+ "types": "./entry/index.d.ts",
50
+ "default": "./entry/index.js"
55
51
  },
56
52
  "require": {
57
- "types": "./packages/utils/dist/math.d.cts",
58
- "default": "./packages/utils/dist/math.cjs"
53
+ "types": "./entry/index.d.cts",
54
+ "default": "./entry/index.cjs"
59
55
  }
60
56
  },
61
- "./vite": {
57
+ "./math": {
62
58
  "import": {
63
- "types": "./packages/utils/dist/vite.d.ts",
64
- "default": "./packages/utils/dist/vite.js"
59
+ "types": "./entry/math.d.ts",
60
+ "default": "./entry/math.js"
65
61
  },
66
62
  "require": {
67
- "types": "./packages/utils/dist/vite.d.cts",
68
- "default": "./packages/utils/dist/vite.cjs"
63
+ "types": "./entry/math.d.cts",
64
+ "default": "./entry/math.cjs"
69
65
  }
70
66
  },
71
- "./metadata.json": "./packages/utils/dist/metadata.json",
72
- "./utils": {
67
+ "./vite": {
73
68
  "import": {
74
- "types": "./packages/utils/dist/index.d.ts",
75
- "default": "./packages/utils/dist/index.js"
69
+ "types": "./entry/vite.d.ts",
70
+ "default": "./entry/vite.js"
76
71
  },
77
72
  "require": {
78
- "types": "./packages/utils/dist/index.d.cts",
79
- "default": "./packages/utils/dist/index.cjs"
73
+ "types": "./entry/vite.d.cts",
74
+ "default": "./entry/vite.cjs"
80
75
  }
81
76
  },
82
77
  "./utils/math": {
83
78
  "import": {
84
- "types": "./packages/utils/dist/math.d.ts",
85
- "default": "./packages/utils/dist/math.js"
79
+ "types": "./entry/math.d.ts",
80
+ "default": "./entry/math.js"
86
81
  },
87
82
  "require": {
88
- "types": "./packages/utils/dist/math.d.cts",
89
- "default": "./packages/utils/dist/math.cjs"
83
+ "types": "./entry/math.d.cts",
84
+ "default": "./entry/math.cjs"
90
85
  }
91
86
  },
92
87
  "./utils/vite": {
93
88
  "import": {
94
- "types": "./packages/utils/dist/vite.d.ts",
95
- "default": "./packages/utils/dist/vite.js"
89
+ "types": "./entry/vite.d.ts",
90
+ "default": "./entry/vite.js"
96
91
  },
97
92
  "require": {
98
- "types": "./packages/utils/dist/vite.d.cts",
99
- "default": "./packages/utils/dist/vite.cjs"
93
+ "types": "./entry/vite.d.cts",
94
+ "default": "./entry/vite.cjs"
100
95
  }
101
96
  },
102
- "./utils/*": {
103
- "import": {
104
- "types": "./packages/utils/dist/*",
105
- "default": "./packages/utils/dist/*"
106
- },
107
- "require": "./packages/utils/dist/*"
108
- },
109
- "./hooks/alova": {
97
+ "./hooks/react": {
110
98
  "import": {
111
- "types": "./packages/hooks/dist/alova.d.ts",
112
- "default": "./packages/hooks/dist/alova.js"
99
+ "types": "./entry/hooks-react.d.ts",
100
+ "default": "./entry/hooks-react.js"
113
101
  },
114
102
  "require": {
115
- "types": "./packages/hooks/dist/alova.d.cts",
116
- "default": "./packages/hooks/dist/alova.cjs"
103
+ "types": "./entry/hooks-react.d.cts",
104
+ "default": "./entry/hooks-react.cjs"
117
105
  }
118
106
  },
119
- "./hooks/react": {
107
+ "./hooks/alova": {
120
108
  "import": {
121
- "types": "./packages/hooks/dist/react.d.ts",
122
- "default": "./packages/hooks/dist/react.js"
109
+ "types": "./entry/hooks-alova.d.ts",
110
+ "default": "./entry/hooks-alova.js"
123
111
  },
124
112
  "require": {
125
- "types": "./packages/hooks/dist/react.d.cts",
126
- "default": "./packages/hooks/dist/react.cjs"
113
+ "types": "./entry/hooks-alova.d.cts",
114
+ "default": "./entry/hooks-alova.cjs"
127
115
  }
128
116
  },
129
- "./hooks/*": {
130
- "import": {
131
- "types": "./packages/hooks/dist/*",
132
- "default": "./packages/hooks/dist/*"
133
- },
134
- "require": "./packages/hooks/dist/*"
135
- },
117
+ "./hooks/metadata.json": "./entry/hooks-metadata.json",
136
118
  "./zod": {
137
119
  "import": {
138
- "types": "./packages/zod/dist/index.d.ts",
139
- "default": "./packages/zod/dist/index.js"
120
+ "types": "./entry/zod.d.ts",
121
+ "default": "./entry/zod.js"
140
122
  },
141
123
  "require": {
142
- "types": "./packages/zod/dist/index.d.cts",
143
- "default": "./packages/zod/dist/index.cjs"
124
+ "types": "./entry/zod.d.cts",
125
+ "default": "./entry/zod.cjs"
144
126
  }
145
127
  },
146
- "./zod/*": {
147
- "import": {
148
- "types": "./packages/zod/dist/*",
149
- "default": "./packages/zod/dist/*"
150
- },
151
- "require": "./packages/zod/dist/*"
152
- },
153
- "./eslint-rules": {
128
+ "./types": {
154
129
  "import": {
155
- "types": "./packages/eslint-rules/dist/index.d.ts",
156
- "default": "./packages/eslint-rules/dist/index.js"
130
+ "types": "./entry/types.d.ts",
131
+ "default": "./entry/types.js"
157
132
  },
158
133
  "require": {
159
- "types": "./packages/eslint-rules/dist/index.d.cts",
160
- "default": "./packages/eslint-rules/dist/index.cjs"
134
+ "types": "./entry/types.d.cts",
135
+ "default": "./entry/types.cjs"
161
136
  }
162
137
  },
163
- "./types": {
138
+ "./types/react": {
164
139
  "import": {
165
- "types": "./packages/types/dist/index.d.ts",
166
- "default": "./packages/types/dist/index.js"
140
+ "types": "./entry/types-react.d.ts",
141
+ "default": "./entry/types-react.js"
167
142
  },
168
143
  "require": {
169
- "types": "./packages/types/dist/index.d.cts",
170
- "default": "./packages/types/dist/index.cjs"
144
+ "types": "./entry/types-react.d.cts",
145
+ "default": "./entry/types-react.cjs"
171
146
  }
172
147
  },
173
- "./types/react": {
148
+ "./eslint-rules": {
174
149
  "import": {
175
- "types": "./packages/types/dist/react.d.ts",
176
- "default": "./packages/types/dist/react.js"
150
+ "types": "./entry/eslint-rules.d.ts",
151
+ "default": "./entry/eslint-rules.js"
177
152
  },
178
153
  "require": {
179
- "types": "./packages/types/dist/react.d.cts",
180
- "default": "./packages/types/dist/react.cjs"
154
+ "types": "./entry/eslint-rules.d.cts",
155
+ "default": "./entry/eslint-rules.cjs"
181
156
  }
182
157
  },
183
- "./types/*": {
184
- "import": {
185
- "types": "./packages/types/dist/*",
186
- "default": "./packages/types/dist/*"
187
- },
188
- "require": "./packages/types/dist/*"
189
- }
158
+ "./metadata.json": "./entry/metadata.json"
159
+ },
160
+ "dependencies": {
161
+ "@pawover/kit-eslint-rules": "0.0.0-alpha.3",
162
+ "@pawover/kit-hooks": "0.0.0-alpha.3",
163
+ "@pawover/kit-utils": "0.0.0-alpha.3",
164
+ "@pawover/kit-types": "0.0.0-alpha.3",
165
+ "@pawover/kit-zod": "0.0.0-alpha.3"
190
166
  },
191
167
  "devDependencies": {
192
168
  "@commitlint/cli": "^21.2.1",
@@ -220,8 +196,7 @@
220
196
  "turbo": "^2.10.8",
221
197
  "typescript": "^6.0.3",
222
198
  "typescript-eslint": "^8.66.0",
223
- "vitest": "^4.1.10",
224
- "@pawover/kit-eslint-rules": "0.0.0-alpha.1"
199
+ "vitest": "^4.1.10"
225
200
  },
226
201
  "peerDependencies": {
227
202
  "alova": "^3.5.1",
@@ -264,6 +239,7 @@
264
239
  "test:types": "tsc -p test/tsconfig.json --noEmit",
265
240
  "test:smoke": "node test/scripts/smoke.mjs",
266
241
  "test:ci": "pnpm test:types && pnpm test && pnpm build && pnpm test:smoke && pnpm check:pack",
242
+ "postbuild": "node scripts/sync-entry.ts",
267
243
  "build": "turbo build",
268
244
  "build:force": "turbo build --force",
269
245
  "build:package": "turbo build:package && pnpm package",