feat: 助手配置与服务命令扩展及依赖更新
This commit is contained in:
4
assistant/task-command/.gitignore
vendored
4
assistant/task-command/.gitignore
vendored
@@ -6,4 +6,6 @@ dist
|
||||
pack-dist
|
||||
|
||||
.env*
|
||||
!.env*example
|
||||
!.env*example
|
||||
|
||||
mod.mjs
|
||||
28
assistant/task-command/bun.config.mjs
Normal file
28
assistant/task-command/bun.config.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
// @ts-check
|
||||
// https://bun.sh/docs/bundler
|
||||
import path from 'node:path';
|
||||
import pkg from './package.json';
|
||||
import fs from 'node:fs';
|
||||
// bun run src/index.ts --
|
||||
import { fileURLToPath } from 'node:url';
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
/**
|
||||
*
|
||||
* @param {string} p
|
||||
* @returns
|
||||
*/
|
||||
export const w = (p) => path.join(__dirname, p);
|
||||
await Bun.build({
|
||||
target: 'node',
|
||||
format: 'esm',
|
||||
entrypoints: [w('./mod.ts')],
|
||||
outdir: w('.'),
|
||||
naming: {
|
||||
entry: 'mod.mjs',
|
||||
},
|
||||
external: ['pm2'],
|
||||
define: {
|
||||
ENVISION_VERSION: JSON.stringify(pkg.version),
|
||||
},
|
||||
env: 'ENVISION_*',
|
||||
});
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "@kevisual/task-command",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "",
|
||||
"types": "mod.d.ts",
|
||||
"scripts": {
|
||||
"dts": "dts -i mod.ts -o mod.d.ts -d ."
|
||||
"dts": "dts -i mod.ts -o mod.d.ts -d .",
|
||||
"build": "bun run bun.config.mjs"
|
||||
},
|
||||
"keywords": [],
|
||||
"publishConfig": {
|
||||
@@ -13,14 +14,15 @@
|
||||
},
|
||||
"files": [
|
||||
"mod.ts",
|
||||
"mod.d.ts"
|
||||
"mod.d.ts",
|
||||
"mod.mjs"
|
||||
],
|
||||
"author": "abearxiong <xiongxiao@xiongxiao.me> (https://www.xiongxiao.me)",
|
||||
"license": "MIT",
|
||||
"packageManager": "pnpm@10.7.0",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./mod.ts",
|
||||
".": "./mod.mjs",
|
||||
"./mod.ts": "./mod.ts"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user