Bernd Storath 3 days ago
committed by GitHub
parent
commit
3726ce0d51
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 25
      src/cli/build.js
  2. 13
      src/cli/rolldown.config.ts
  3. 6
      src/package.json
  4. 650
      src/pnpm-lock.yaml

25
src/cli/build.js

@ -1,25 +0,0 @@
// @ts-check
import { fileURLToPath } from 'node:url';
import esbuild from 'esbuild';
esbuild.build({
entryPoints: [fileURLToPath(new URL('./index.ts', import.meta.url))],
bundle: true,
outfile: fileURLToPath(new URL('../.output/server/cli.mjs', import.meta.url)),
platform: 'node',
format: 'esm',
plugins: [
{
name: 'make-all-packages-external',
setup(build) {
let filter = /^[^./]|^\.[^./]|^\.\.[^/]/; // Must not start with "/" or "./" or "../"
build.onResolve({ filter }, (args) => ({
path: args.path,
external: true,
}));
},
},
],
logLevel: 'info',
});

13
src/cli/rolldown.config.ts

@ -0,0 +1,13 @@
import { fileURLToPath } from 'node:url';
import { defineConfig } from 'rolldown';
export default defineConfig({
input: fileURLToPath(new URL('./index.ts', import.meta.url)),
output: {
format: 'esm',
file: fileURLToPath(new URL('../.output/server/cli.mjs', import.meta.url)),
},
platform: 'node',
external: [/^[^./]|^\.[^./]|^\.\.[^/]/],
logLevel: 'info',
});

6
src/package.json

@ -16,7 +16,7 @@
"typecheck": "nuxt typecheck", "typecheck": "nuxt typecheck",
"check:all": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm build", "check:all": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm build",
"db:generate": "drizzle-kit generate", "db:generate": "drizzle-kit generate",
"cli:build": "node cli/build.js", "cli:build": "rolldown --config ./cli/rolldown.config.ts",
"cli:dev": "tsx cli/index.ts" "cli:dev": "tsx cli/index.ts"
}, },
"dependencies": { "dependencies": {
@ -40,7 +40,7 @@
"is-cidr": "^6.0.0", "is-cidr": "^6.0.0",
"is-ip": "^5.0.1", "is-ip": "^5.0.1",
"js-sha256": "^0.11.1", "js-sha256": "^0.11.1",
"nuxt": "^3.18.0", "nuxt": "^3.18.1",
"otpauth": "^9.4.0", "otpauth": "^9.4.0",
"pinia": "^3.0.3", "pinia": "^3.0.3",
"qr": "^0.5.0", "qr": "^0.5.0",
@ -58,11 +58,11 @@
"@types/phc__format": "^1.0.1", "@types/phc__format": "^1.0.1",
"@types/semver": "^7.7.0", "@types/semver": "^7.7.0",
"drizzle-kit": "^0.31.4", "drizzle-kit": "^0.31.4",
"esbuild": "^0.25.8",
"eslint": "^9.32.0", "eslint": "^9.32.0",
"eslint-config-prettier": "^10.1.8", "eslint-config-prettier": "^10.1.8",
"prettier": "^3.6.2", "prettier": "^3.6.2",
"prettier-plugin-tailwindcss": "^0.6.14", "prettier-plugin-tailwindcss": "^0.6.14",
"rolldown": "1.0.0-beta.31",
"tsx": "^4.20.3", "tsx": "^4.20.3",
"typescript": "^5.9.2", "typescript": "^5.9.2",
"vue-tsc": "^3.0.5" "vue-tsc": "^3.0.5"

650
src/pnpm-lock.yaml

File diff suppressed because it is too large
Loading…
Cancel
Save