mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-19 15:18:03 +00:00
feat(desktop): ts-ify everything
This commit is contained in:
parent
fac85518fc
commit
39d09453f9
116 changed files with 2500 additions and 1756 deletions
22
apps/desktop/scripts/rebuild-native.mjs
Normal file
22
apps/desktop/scripts/rebuild-native.mjs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// rebuild-native.mjs
|
||||
import { rebuild } from '@electron/rebuild'
|
||||
import { resolve, dirname } from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
import { isMain } from './utils.mjs'
|
||||
import packageJson from '../package.json' with { type: 'json' }
|
||||
const projectRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
|
||||
export async function rebuildNodePty({ arch = process.arch } = {}) {
|
||||
await rebuild({
|
||||
buildPath: projectRoot, // where node_modules lives
|
||||
electronVersion: packageJson.devDependencies.electron.replace('^', ''),
|
||||
arch,
|
||||
onlyModules: ['node-pty'],
|
||||
force: true
|
||||
})
|
||||
}
|
||||
|
||||
if (isMain(import.meta.url)) {
|
||||
const [arch] = process.argv.slice(2)
|
||||
await rebuildNodePty({ arch })
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue