@pawover/kit 0.6.0 → 0.8.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/README.en.md +123 -0
- package/README.md +145 -1
- package/entry/eslint-rules.cjs +1 -0
- package/entry/eslint-rules.d.cts +1 -0
- package/entry/eslint-rules.d.ts +2 -0
- package/entry/eslint-rules.js +2 -0
- package/entry/hooks-alova.cjs +1 -0
- package/entry/hooks-alova.d.cts +1 -0
- package/entry/hooks-alova.d.ts +1 -0
- package/entry/hooks-alova.js +1 -0
- package/entry/hooks-react.cjs +1 -0
- package/entry/hooks-react.d.cts +1 -0
- package/entry/hooks-react.d.ts +1 -0
- package/entry/hooks-react.js +1 -0
- package/entry/index.cjs +1 -0
- package/entry/index.d.cts +1 -0
- package/entry/index.d.ts +1 -0
- package/entry/index.js +1 -0
- package/entry/math.cjs +1 -0
- package/entry/math.d.cts +1 -0
- package/entry/math.d.ts +1 -0
- package/entry/math.js +1 -0
- package/entry/types-react.cjs +1 -0
- package/entry/types-react.d.cts +1 -0
- package/entry/types-react.d.ts +1 -0
- package/entry/types-react.js +1 -0
- package/entry/types.cjs +1 -0
- package/entry/types.d.cts +1 -0
- package/entry/types.d.ts +1 -0
- package/entry/types.js +1 -0
- package/entry/vite.cjs +1 -0
- package/entry/vite.d.cts +1 -0
- package/entry/vite.d.ts +1 -0
- package/entry/vite.js +1 -0
- package/entry/zod.cjs +1 -0
- package/entry/zod.d.cts +1 -0
- package/entry/zod.d.ts +1 -0
- package/entry/zod.js +1 -0
- package/package.json +81 -96
- package/packages/eslint-rules/dist/core.antfu.cjs +0 -78
- package/packages/eslint-rules/dist/core.antfu.d.cts +0 -1
- package/packages/eslint-rules/dist/core.antfu.d.ts +0 -74
- package/packages/eslint-rules/dist/core.antfu.js +0 -79
- package/packages/eslint-rules/dist/core.imports.cjs +0 -59
- package/packages/eslint-rules/dist/core.imports.d.cts +0 -1
- package/packages/eslint-rules/dist/core.imports.d.ts +0 -61
- package/packages/eslint-rules/dist/core.imports.js +0 -59
- package/packages/eslint-rules/dist/core.importsSort.cjs +0 -7
- package/packages/eslint-rules/dist/core.importsSort.d.cts +0 -1
- package/packages/eslint-rules/dist/core.importsSort.d.ts +0 -7
- package/packages/eslint-rules/dist/core.importsSort.js +0 -7
- package/packages/eslint-rules/dist/core.javascript.cjs +0 -1208
- package/packages/eslint-rules/dist/core.javascript.d.cts +0 -1
- package/packages/eslint-rules/dist/core.javascript.d.ts +0 -1216
- package/packages/eslint-rules/dist/core.javascript.js +0 -1208
- package/packages/eslint-rules/dist/core.react.cjs +0 -551
- package/packages/eslint-rules/dist/core.react.d.cts +0 -1
- package/packages/eslint-rules/dist/core.react.d.ts +0 -551
- package/packages/eslint-rules/dist/core.react.js +0 -551
- package/packages/eslint-rules/dist/core.reactHooks.cjs +0 -107
- package/packages/eslint-rules/dist/core.reactHooks.d.cts +0 -1
- package/packages/eslint-rules/dist/core.reactHooks.d.ts +0 -107
- package/packages/eslint-rules/dist/core.reactHooks.js +0 -107
- package/packages/eslint-rules/dist/core.stylistic.cjs +0 -608
- package/packages/eslint-rules/dist/core.stylistic.d.cts +0 -1
- package/packages/eslint-rules/dist/core.stylistic.d.ts +0 -595
- package/packages/eslint-rules/dist/core.stylistic.js +0 -608
- package/packages/eslint-rules/dist/core.typescript.cjs +0 -905
- package/packages/eslint-rules/dist/core.typescript.d.cts +0 -1
- package/packages/eslint-rules/dist/core.typescript.d.ts +0 -917
- package/packages/eslint-rules/dist/core.typescript.js +0 -906
- package/packages/eslint-rules/dist/core.vue.cjs +0 -312
- package/packages/eslint-rules/dist/core.vue.d.cts +0 -1
- package/packages/eslint-rules/dist/core.vue.d.ts +0 -293
- package/packages/eslint-rules/dist/core.vue.js +0 -313
- package/packages/eslint-rules/dist/index.cjs +0 -126
- package/packages/eslint-rules/dist/index.d.cts +0 -1
- package/packages/eslint-rules/dist/index.d.ts +0 -113
- package/packages/eslint-rules/dist/index.js +0 -126
- package/packages/eslint-rules/dist/preset-Bk6lxNP0.cjs +0 -107
- package/packages/eslint-rules/dist/preset-CQJST7pW.js +0 -102
- package/packages/hooks/dist/alova.cjs +0 -53
- package/packages/hooks/dist/alova.d.cts +0 -1
- package/packages/hooks/dist/alova.d.ts +0 -33
- package/packages/hooks/dist/alova.js +0 -50
- package/packages/hooks/dist/index.cjs +0 -0
- package/packages/hooks/dist/index.d.cts +0 -1
- package/packages/hooks/dist/index.d.ts +0 -1
- package/packages/hooks/dist/index.js +0 -0
- package/packages/hooks/dist/react.cjs +0 -169
- package/packages/hooks/dist/react.d.cts +0 -1
- package/packages/hooks/dist/react.d.ts +0 -95
- package/packages/hooks/dist/react.js +0 -163
- package/packages/types/dist/index.cjs +0 -0
- package/packages/types/dist/index.d.cts +0 -1
- package/packages/types/dist/index.d.ts +0 -271
- package/packages/types/dist/index.js +0 -0
- package/packages/types/dist/react.cjs +0 -0
- package/packages/types/dist/react.d.cts +0 -1
- package/packages/types/dist/react.d.ts +0 -64
- package/packages/types/dist/react.js +0 -0
- package/packages/utils/dist/index.cjs +0 -2300
- package/packages/utils/dist/index.d.cts +0 -1
- package/packages/utils/dist/index.d.ts +0 -2740
- package/packages/utils/dist/index.js +0 -2287
- package/packages/utils/dist/math-BznvO4qI.cjs +0 -1029
- package/packages/utils/dist/math-DRbCtLQH.js +0 -1012
- package/packages/utils/dist/math.cjs +0 -3
- package/packages/utils/dist/math.d.cts +0 -1
- package/packages/utils/dist/math.d.ts +0 -60
- package/packages/utils/dist/math.js +0 -2
- package/packages/utils/dist/vite.cjs +0 -44
- package/packages/utils/dist/vite.d.cts +0 -1
- package/packages/utils/dist/vite.d.ts +0 -28
- package/packages/utils/dist/vite.js +0 -43
- package/packages/zod/dist/index.cjs +0 -91
- package/packages/zod/dist/index.d.cts +0 -1
- package/packages/zod/dist/index.d.ts +0 -57
- package/packages/zod/dist/index.js +0 -61
- /package/{packages/hooks/dist/metadata.json → entry/hooks-metadata.json} +0 -0
- /package/{packages/utils/dist → entry}/metadata.json +0 -0
package/README.en.md
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# pawover-kit
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@pawover/kit)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](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,145 @@
|
|
|
1
|
-
# pawover-kit
|
|
1
|
+
# pawover-kit
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@pawover/kit)
|
|
4
|
+
[](https://nodejs.org)
|
|
5
|
+
[](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
|
+
发布由 [Changesets](https://changesets.dev) + GitHub Actions 全自动驱动,无需手动登录 npm 或运行发布命令。
|
|
112
|
+
|
|
113
|
+
**日常流程**:改动代码后运行 `pnpm changeset`,按提示选择受影响的包与版本级别并填写变更说明,将生成的 `.changeset/*.md` 随 PR 一起提交。合并到 `main` 后:
|
|
114
|
+
|
|
115
|
+
1. CI 自动创建 / 更新 **Version Packages** PR(内含各包版本号与 CHANGELOG)
|
|
116
|
+
2. 合并该 PR 后自动构建,并按拓扑序发布(`types` / `zod` / `eslint-rules` → `utils` → `hooks` → 根包 `@pawover/kit`)
|
|
117
|
+
3. 自动打 git tag 并生成 GitHub Release
|
|
118
|
+
|
|
119
|
+
**版本策略**:各包独立版本。子包版本变化时,依赖它的包(含根包)自动随同提升——任何子包发布必伴随根包发布(CI 有硬校验守卫)。
|
|
120
|
+
|
|
121
|
+
**当前阶段**:处于 alpha pre 模式,所有包以 `X.Y.Z-alpha.N` 发布到 `alpha` dist-tag。转正时运行 `pnpm pre:exit` 并删除 CI 中的 `NPM_CONFIG_TAG` 环境变量。
|
|
122
|
+
|
|
123
|
+
**应急手动发布**(一般不使用):
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pnpm build && pnpm postbuild # 构建并同步 entry/metadata.json
|
|
127
|
+
pnpm publish --access public --tag alpha # 根包
|
|
128
|
+
pnpm --filter @pawover/kit-types public # 单个子包
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## 测试
|
|
132
|
+
|
|
133
|
+
- **单元测试**:vitest 双项目(node 环境覆盖 utils / zod / eslint-rules,jsdom 环境覆盖 hooks)
|
|
134
|
+
- **类型测试**:`test/types/` 下以 `.test.type.ts` 结尾的类型级 API 测试,由 `test:types` 全量检查
|
|
135
|
+
- **冒烟测试**:构建后验证所有 dist 产物可正常导入
|
|
136
|
+
|
|
137
|
+
## 构建流水线
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
tsdown (build:source) → metadata 提取 (build:metadata) → turbo build
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
- **tsdown** 负责打包与类型声明生成
|
|
144
|
+
- **metadata.ts** 提取 utils / hooks 的运行时导出名,写入 `dist/metadata.json`
|
|
145
|
+
- 所有子路径导出均带 `"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 @@
|
|
|
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";
|
package/entry/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("@pawover/kit-utils");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './index.d.ts';
|
package/entry/index.d.ts
ADDED
|
@@ -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");
|
package/entry/math.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './math.d.ts';
|
package/entry/math.d.ts
ADDED
|
@@ -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";
|
package/entry/types.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("@pawover/kit-types");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './types.d.ts';
|
package/entry/types.d.ts
ADDED
|
@@ -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");
|
package/entry/vite.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from './vite.d.ts';
|
package/entry/vite.d.ts
ADDED
|
@@ -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");
|
package/entry/zod.d.cts
ADDED
|
@@ -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";
|