mirror of
https://github.com/xtr-dev/rondevu-server.git
synced 2025-12-08 00:33:24 +00:00
- Added hash-id.ts utility for SHA-256 content hashing
- Offer IDs now generated from hash of {sdp, topics} (sorted)
- Removed peerId from hash (inferred from authentication)
- Server generates deterministic IDs for idempotent offer creation
- Updated SQLite and D1 storage implementations
- Removed optional id field from CreateOfferRequest
- Same offer content always produces same ID
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
688 B
JavaScript
30 lines
688 B
JavaScript
// Build script using esbuild
|
|
const esbuild = require('esbuild');
|
|
const { execSync } = require('child_process');
|
|
|
|
// Get git commit hash
|
|
let version = 'unknown';
|
|
try {
|
|
version = execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).trim();
|
|
} catch (err) {
|
|
console.warn('Could not get git commit hash, using "unknown"');
|
|
}
|
|
|
|
esbuild.build({
|
|
entryPoints: ['src/index.ts'],
|
|
bundle: true,
|
|
platform: 'node',
|
|
target: 'node20',
|
|
outfile: 'dist/index.js',
|
|
format: 'cjs',
|
|
external: [
|
|
'better-sqlite3',
|
|
'@hono/node-server',
|
|
'hono'
|
|
],
|
|
sourcemap: true,
|
|
define: {
|
|
'process.env.RONDEVU_VERSION': JSON.stringify(version)
|
|
}
|
|
}).catch(() => process.exit(1));
|