This commit is contained in:
熊潇 2025-05-23 12:05:53 +08:00
parent 5e03ef2dd9
commit 5cce86d476
3 changed files with 27 additions and 51 deletions

View File

@ -1,28 +0,0 @@
name: Sync to CNB
on:
push:
branches:
# - main
- 'releases/**'
workflow_dispatch:
# This workflow is triggered on push events to the repository.
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Sync to CNB Repository
run: |
docker run --rm \
-v ${{ github.workspace }}:${{ github.workspace }} \
-w ${{ github.workspace }} \
-e PLUGIN_TARGET_URL="https://cnb.cool/kevisual/router-template.git" \
-e PLUGIN_AUTH_TYPE="https" \
-e PLUGIN_USERNAME="cnb" \
-e PLUGIN_PASSWORD=${{ secrets.GIT_PASSWORD }} \
-e PLUGIN_SYNC_MODE="rebase" \
tencentcom/git-sync

View File

@ -1,20 +1,24 @@
// @ts-check
// https://bun.sh/docs/bundler
// @ts-ignore
import pkg from './package.json';
import { resolvePath as rp } from '@kevisual/use-config/env';
// bun run src/index.ts --
import { resolvePath } from '@kevisual/use-config/env';
import { execSync } from 'node:child_process';
const entry = 'src/index.ts';
const naming = 'app';
/**
* @type {import('bun').BuildConfig}
*/
await Bun.build({
target: 'node',
format: 'esm',
entrypoints: [rp('./src/main.ts')],
outdir: rp('./dist'),
entrypoints: [resolvePath(entry, { meta: import.meta })],
outdir: resolvePath('./dist', { meta: import.meta }),
naming: {
entry: 'app.mjs',
},
define: {
VERSION: JSON.stringify(pkg.version),
entry: `${naming}.js`,
},
external: [],
env: 'KEVISUAL_*',
});
// const cmd = `dts -i src/index.ts -o app.d.ts`;
const cmd = `dts -i ${entry} -o ${naming}.d.ts`;
execSync(cmd, { stdio: 'inherit' });

View File

@ -6,7 +6,7 @@
"basename": "/root/demo-app",
"app": {
"key": "demo-app",
"entry": "dist/app.mjs",
"entry": "dist/app.js",
"type": "system-app",
"files": [
"dist"
@ -33,33 +33,33 @@
"access": "public"
},
"dependencies": {
"@kevisual/code-center-module": "0.0.18",
"@kevisual/router": "0.0.13",
"@kevisual/use-config": "^1.0.12",
"@kevisual/code-center-module": "0.0.19",
"@kevisual/router": "0.0.21",
"@kevisual/use-config": "^1.0.17",
"cookie": "^1.0.2",
"dayjs": "^1.11.13",
"formidable": "^3.5.4",
"lodash-es": "^4.17.21"
},
"devDependencies": {
"@kevisual/types": "^0.0.9",
"@kevisual/use-config": "^1.0.12",
"@types/bun": "^1.2.11",
"@kevisual/types": "^0.0.10",
"@kevisual/use-config": "^1.0.17",
"@types/bun": "^1.2.14",
"@types/crypto-js": "^4.2.2",
"@types/formidable": "^3.4.5",
"@types/lodash-es": "^4.17.12",
"@types/node": "^22.15.3",
"commander": "^13.1.0",
"@types/node": "^22.15.21",
"commander": "^14.0.0",
"concurrently": "^9.1.2",
"cross-env": "^7.0.3",
"inquire": "^0.4.8",
"ioredis": "^5.6.1",
"nodemon": "^3.1.10",
"pg": "^8.15.6",
"pg": "^8.16.0",
"rimraf": "^6.0.1",
"sequelize": "^6.37.7",
"tape": "^5.9.0",
"typescript": "^5.8.3"
},
"packageManager": "pnpm@10.10.0"
"packageManager": "pnpm@10.11.0"
}