mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-04 06:31:13 +00:00
Bump napcat-types version to 0.0.2
Updated the package version in package.public.json from 0.0.1 to 0.0.2. Update napcat-types package metadata and dependencies Set package as public by changing 'private' to false. Move 'napcat-core' and 'napcat-onebot' from dependencies to devDependencies, and remove 'compressing' from dependencies. Add public packaging and build script for napcat-types Introduces package.public.json and a copy-dist.mjs script to automate copying metadata and README into the dist folder for publishing. Updates build script in package.json to use the new copy step. Adds initial package.json and README for napcat-types. Update scripts in napcat-types package configs Added a publish script to package.json and removed scripts from package.public.json to streamline configuration and avoid duplication.
This commit is contained in:
parent
aa9fe60dfd
commit
01da490d92
24
package/package.json
Normal file
24
package/package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "napcat-types",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"types": "./napcat-types/index.d.ts",
|
||||
"files": [
|
||||
"**/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/node": "^22.10.7",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/ws": "^8.5.12",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/multer": "^1.4.12",
|
||||
"@types/winston": "^2.4.4",
|
||||
"@types/yaml": "^1.9.7",
|
||||
"@types/ip": "^1.1.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/",
|
||||
"access": "public",
|
||||
"tag": "latest"
|
||||
}
|
||||
}
|
||||
3
packages/napcat-types/README.md
Normal file
3
packages/napcat-types/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# NapCat-Types
|
||||
|
||||
NapCat 类型定义包,包含 NapCat 及其插件开发所需的所有类型定义。
|
||||
@ -1,19 +1,18 @@
|
||||
{
|
||||
"name": "napcat-types",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"private": false,
|
||||
"type": "module",
|
||||
"types": "./dist/napcat-types/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc --project tsconfig.json && tsc-alias --project tsconfig.json --outDir dist",
|
||||
"test": "pnpm -s exec tsc --project tsconfig.json --noEmit"
|
||||
"build": "tsc --project tsconfig.json && tsc-alias --project tsconfig.json --outDir dist && node ./scripts/copy-dist.mjs",
|
||||
"test": "pnpm -s exec tsc --project tsconfig.json --noEmit",
|
||||
"publish": "pnpm publish --filter napcat-types"
|
||||
},
|
||||
"dependencies": {
|
||||
"napcat-core": "workspace:*",
|
||||
"napcat-onebot": "workspace:*",
|
||||
"@types/node": "^22.10.7",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/ws": "^8.5.12",
|
||||
@ -21,10 +20,11 @@
|
||||
"@types/multer": "^1.4.12",
|
||||
"@types/winston": "^2.4.4",
|
||||
"@types/yaml": "^1.9.7",
|
||||
"@types/ip": "^1.1.3",
|
||||
"compressing": "^1.10.3"
|
||||
"@types/ip": "^1.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"napcat-core": "workspace:*",
|
||||
"napcat-onebot": "workspace:*",
|
||||
"tsc-alias": "^1.8.16"
|
||||
}
|
||||
}
|
||||
25
packages/napcat-types/package.public.json
Normal file
25
packages/napcat-types/package.public.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "napcat-types",
|
||||
"version": "0.0.2",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
"types": "./napcat-types/index.d.ts",
|
||||
"files": [
|
||||
"./**/*"
|
||||
],
|
||||
"dependencies": {
|
||||
"@types/node": "^22.10.7",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/ws": "^8.5.12",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/multer": "^1.4.12",
|
||||
"@types/winston": "^2.4.4",
|
||||
"@types/yaml": "^1.9.7",
|
||||
"@types/ip": "^1.1.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/",
|
||||
"access": "public",
|
||||
"tag": "latest"
|
||||
}
|
||||
}
|
||||
13
packages/napcat-types/scripts/copy-dist.mjs
Normal file
13
packages/napcat-types/scripts/copy-dist.mjs
Normal file
@ -0,0 +1,13 @@
|
||||
// 复制 cp README.md dist/ && cp package.public.json dist/package.json
|
||||
import { copyFile } from 'node:fs/promises';
|
||||
import { join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
const __dirname = fileURLToPath(new URL('../', import.meta.url));
|
||||
await copyFile(
|
||||
join(__dirname, 'package.public.json'),
|
||||
join(__dirname, 'dist', 'package.json')
|
||||
);
|
||||
await copyFile(
|
||||
join(__dirname, 'README.md'),
|
||||
join(__dirname, 'dist', 'README.md')
|
||||
);
|
||||
Loading…
Reference in New Issue
Block a user