forked from boos/BoosAPI
e0a5f57793
Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as a monorepo subdirectory under desktop/. Source only — node_modules, dist, Cargo target and the upstream .git history are excluded. desktop/ keeps its own independent Cargo workspace (desktop/src-tauri with crates/*); it is not part of the backend boosapi crate, so a `cargo check` at the metapi root still compiles only the backend. Build the desktop app from desktop/src-tauri per desktop/README.md. Note: app icons are still placeholder assets pending the final BoosAPI logo. The updater signing keys live outside the repo and are not included.
31 lines
1023 B
TypeScript
31 lines
1023 B
TypeScript
// Invoked on the commit-msg git hook by simple-git-hooks.
|
|
|
|
import { readFileSync } from 'node:fs'
|
|
import process from 'node:process'
|
|
import colors from 'picocolors'
|
|
|
|
// get $1 from commit-msg script
|
|
const msgPath = process.argv[2]
|
|
const msg = readFileSync(msgPath, 'utf-8').trim()
|
|
|
|
const releaseRE = /^v\d/
|
|
const commitRE
|
|
= /^(?:revert: )?(?:feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(?:\(.+\))?!?: .{1,50}/
|
|
|
|
if (!releaseRE.test(msg) && !commitRE.test(msg)) {
|
|
console.log()
|
|
console.error(
|
|
` ${colors.bgRed(colors.white(' ERROR '))} ${colors.red(
|
|
'invalid commit message format.',
|
|
)}\n\n${colors.red(
|
|
' Proper commit message format is required for automated changelog generation. Examples:\n\n',
|
|
)} ${colors.green('feat: add \'comments\' option')}\n`
|
|
+ ` ${colors.green(
|
|
'fix: handle events on blur (close #28)',
|
|
)}\n\n${colors.red(
|
|
' See .github/commit-convention.md for more details.\n',
|
|
)}`,
|
|
)
|
|
process.exit(1)
|
|
}
|