Harden public package installation and release validation
Some checks failed
Release package / package (macos-latest) (push) Has been cancelled
Release package / package (ubuntu-latest) (push) Has been cancelled
Release package / package (windows-latest) (push) Has been cancelled

This commit is contained in:
oliver 2026-10-11 13:32:36 +08:00
parent 9271494b37
commit 9b2166e5b6
41 changed files with 994 additions and 363 deletions

View file

@ -12,6 +12,7 @@
import { mkdirSync, writeFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { recordBuild } from './build-integrity.mjs'
const root = join(dirname(fileURLToPath(import.meta.url)), '..')
const entry = join(root, 'src/client/index.ts')
@ -35,6 +36,7 @@ const result = await Bun.build({
format: 'cjs',
sourcemap: 'none',
minify: false,
metafile: true,
define: {
'process.env.NODE_ENV': JSON.stringify('production'),
},
@ -80,4 +82,5 @@ ${body}
mkdirSync(dirname(outFile), { recursive: true })
writeFileSync(outFile, artifact, 'utf8')
recordBuild(outFile, result, 'scripts/build-client.mjs')
console.log(`wrote ${outFile} (${artifact.length} bytes); requires: ${[...new Set(requires)].join(', ') || '(none)'}`)