commit 9b1f97b5f1cd7c1dc1700b084097fcd1aa3217ea Author: TheresaQWQ Date: Fri Jan 10 14:28:03 2025 +0800 上传文件至 / diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6b40c3b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM docker.m.ixdev.cn/oven/bun:1.1.43-slim as builder +WORKDIR /app +COPY package*.json ./ +RUN bun install --registry https://registry.npmmirror.com + +COPY . . + +FROM docker.m.ixdev.cn/library/node:22-slim +WORKDIR /app +COPY --from=builder /app/package*.json ./ +COPY --from=builder /app/koishi.yml ./ +COPY --from=builder /app/start.sh ./ +COPY --from=builder /app/node_modules ./node_modules + +CMD ["/bin/sh", "/app/start.sh"] \ No newline at end of file diff --git a/koishi.yml b/koishi.yml new file mode 100644 index 0000000..6162fc4 --- /dev/null +++ b/koishi.yml @@ -0,0 +1,54 @@ +plugins: + group:server: + server:e3jxt3: + port: 5140 + host: 0.0.0.0 + ~server-satori:i30hh8: {} + ~server-temp:xqh7ug: {} + group:basic: + ~admin:wc1203: {} + ~bind:d50xpc: {} + commands:gectas: {} + help:48e4ee: {} + http:6gv1u5: {} + inspect:jglx8t: {} + locales:wxf8ts: {} + proxy-agent:hwmr3n: {} + rate-limit:qj3rc3: {} + ~telemetry:a09xbu: {} + group:console: + actions:qm35bh: {} + analytics:ofxraq: {} + auth:qy7sxh: + admin: + password: password + config:a5o0ry: {} + console:tzuroj: + open: true + dataview:khqb67: {} + explorer:0652mp: {} + logger:qdy8ej: {} + insight:d5h1gx: {} + market:tl6f8q: + search: + endpoint: https://registry.koishi.chat/index.json + notifier:t8d2x3: {} + oobe:44b86x: {} + sandbox:yytjhi: {} + status:fv56dg: {} + theme-vanilla:nfxd88: {} + group:storage: + database-sqlite:kiqqp3: + path: data/koishi.db + assets-local:k1dx0k: {} + group:adapter: + ~adapter-iirose:ip75cr: {} + group:iirose: + ~iirose-cut:5s8n0n: {} + ~iirose-follow:lqtkbc: {} + ~iirose-media-request:s2o0et: {} + ~iirose-self-cut:0008vr: {} + ~iirose-stock-monitor:5jh1ju: {} + ~iirose-trace:8o14xc: {} + ~word-core:bo8tl1: {} + ~word-core-iirose-event-trigger:t5roca: {} diff --git a/package.json b/package.json new file mode 100644 index 0000000..8f92849 --- /dev/null +++ b/package.json @@ -0,0 +1,104 @@ +{ + "name": "@koishijs/boilerplate", + "version": "0.0.0-9e998c1feabbb409bb3df5e7bd6d081954386cd6", + "packageManager": "yarn@4.1.0", + "private": false, + "files": [ + ".env", + "koishi.yml" + ], + "license": "AGPL-3.0", + "workspaces": [ + "external/*", + "external/*/external/*", + "external/*/external/*/packages/*", + "external/*/external/*/plugins/*", + "external/*/packages/*", + "external/*/plugins/*", + "external/satori/adapters/*", + "external/koishi/plugins/*", + "external/koishi/plugins/database/*", + "packages/*", + "packages/@*/*", + "plugins/*", + "plugins/@*/*" + ], + "scripts": { + "new": "koishi-scripts new", + "setup": "koishi-scripts setup", + "clone": "koishi-scripts clone", + "build": "yakumo build", + "clean": "yakumo clean", + "bump": "yakumo version", + "dep": "yakumo upgrade", + "pub": "yakumo publish", + "dev": "cross-env NODE_ENV=development koishi start -r esbuild-register -r yml-register", + "start": "koishi start" + }, + "devDependencies": { + "@koishijs/client": "^5.30.2", + "@koishijs/plugin-hmr": "^1.2.9", + "@koishijs/scripts": "^4.6.1", + "@types/node": "^22.10.5", + "@types/react": "^19.0.4", + "cross-env": "^7.0.3", + "esbuild": "^0.24.2", + "esbuild-register": "npm:@shigma/esbuild-register@^1.1.1", + "tsx": "^4.19.2", + "typescript": "^5.7.3", + "yakumo": "^0.3.13", + "yakumo-esbuild": "^0.3.26", + "yakumo-tsc": "^0.3.12", + "yml-register": "^1.2.5" + }, + "dependencies": { + "@koishijs/plugin-actions": "^0.0.2", + "@koishijs/plugin-adapter-discord": "^4.5.10", + "@koishijs/plugin-adapter-kook": "^4.6.5", + "@koishijs/plugin-adapter-qq": "^4.9.2", + "@koishijs/plugin-adapter-satori": "^1.5.1", + "@koishijs/plugin-adapter-telegram": "^4.5.8", + "@koishijs/plugin-admin": "^1.4.0", + "@koishijs/plugin-analytics": "^2.0.6", + "@koishijs/plugin-auth": "^4.1.6", + "@koishijs/plugin-bind": "^1.5.1", + "@koishijs/plugin-commands": "^3.5.4", + "@koishijs/plugin-config": "^2.8.6", + "@koishijs/plugin-console": "^5.30.2", + "@koishijs/plugin-database-sqlite": "^4.6.0", + "@koishijs/plugin-explorer": "^1.5.5", + "@koishijs/plugin-help": "^2.4.4", + "@koishijs/plugin-http": "^0.6.3", + "@koishijs/plugin-insight": "^3.5.2", + "@koishijs/plugin-inspect": "^1.1.7", + "@koishijs/plugin-locales": "^2.5.3", + "@koishijs/plugin-logger": "^2.6.9", + "@koishijs/plugin-market": "^2.11.4", + "@koishijs/plugin-notifier": "^1.2.1", + "@koishijs/plugin-oobe": "^0.0.2", + "@koishijs/plugin-proxy-agent": "^0.3.3", + "@koishijs/plugin-sandbox": "^3.4.1", + "@koishijs/plugin-server": "^3.2.4", + "@koishijs/plugin-server-satori": "^2.9.0", + "@koishijs/plugin-server-temp": "^1.5.0", + "@koishijs/plugin-status": "^7.4.10", + "koishi": "^4.18.6", + "koishi-plugin-adapter-iirose": "^0.3.61", + "koishi-plugin-android": "^0.0.1", + "koishi-plugin-assets-local": "^3.3.2", + "koishi-plugin-dataview": "^2.7.6", + "koishi-plugin-desktop": "^1.0.0", + "koishi-plugin-iirose-cut": "^0.0.7", + "koishi-plugin-iirose-follow": "^0.0.14", + "koishi-plugin-iirose-media-request": "^0.5.34", + "koishi-plugin-iirose-self-cut": "^0.0.1", + "koishi-plugin-iirose-stock-monitor": "^0.0.5", + "koishi-plugin-iirose-trace": "^0.0.4", + "koishi-plugin-puppeteer": "^3.9.0", + "koishi-plugin-rate-limit": "^2.0.4", + "koishi-plugin-telemetry": "^0.2.3", + "koishi-plugin-theme-vanilla": "^1.1.0", + "koishi-plugin-word-core": "^1.0.16", + "koishi-plugin-word-core-iirose-event-trigger": "^0.0.15" + } +} diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..cea2a87 --- /dev/null +++ b/start.sh @@ -0,0 +1,3 @@ +mv /app/* /koishi/ -r +cd /koishi +npm run start diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..470c755 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,61 @@ +{ + "extends": "./tsconfig.base", + "compilerOptions": { + "baseUrl": ".", + "paths": { + // If you are developing a plugin monorepo with custom prefix, + // just copy the next line and change `assets` to the prefix. + // Below are some examples for common prefixed plugins. + // See: https://github.com/koishijs/assets + "koishi-plugin-assets-*": ["external/assets/packages/*/src"], + "koishi-plugin-booru-*": ["external/booru/packages/*/src"], + "koishi-plugin-cache-*": ["external/cache/packages/*/src"], + "koishi-plugin-dialogue-*": ["external/dialogue/packages/*/src"], + + // The `external` directory is used to store created plugins. + // Try `npm run setup` or `yarn setup` to create a new plugin. + "koishi-plugin-*": [ + "external/*/src", + "external/*/packages/core/src", + "packages/*/src", + "plugins/*/src", + ], + + // If you are developing a scoped plugin, + // just uncomment the next line and change `@scope` + // to the scope name (i.e. npm account or organization). + // "@scope/koishi-plugin-*": ["external/*/src"], + + // Below are links for koishi internal packages. + // You only need them when you are developing koishi itself. + // See: https://github.com/koishijs/koishi + // See: https://github.com/koishijs/webui + // See: https://github.com/satorijs/satori + // See: https://github.com/cordiverse/minato + "@koishijs/client/lib": ["external/webui/packages/client/src"], + "@koishijs/plugin-*": [ + "external/koishi/plugins/common/*/src", + "external/koishi/plugins/*/src", + "external/webui/plugins/*/src", + ], + "@koishijs/*": [ + "external/koishi/packages/*/src", + "external/webui/packages/*/src", + "external/*/packages/core/src", + ], + "@minatojs/driver-*": ["external/minato/packages/*/src"], + "@minatojs/*": ["external/minato/packages/*/src"], + "@satorijs/adapter-*": ["external/satori/adapters/*/src"], + "@satorijs/*": ["external/satori/packages/*/src"], + "koishi": ["external/koishi/packages/koishi/src"], + "minato": ["external/minato/packages/minato/src"], + + // It is common practice that monorepo has a `packages` directory. + // Even if you don't use it, do not delete this line, + // as it bypasses a bug in tsconfig-path/register. + // See: https://github.com/dividab/tsconfig-paths/issues/209 + "*": ["packages/*/src"], + }, + }, + "files": [], +}