mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 08:02:31 +00:00
* style: format codebase * style: format codebase * refactor: extract skill install dialog footer and content Extract footer and content sections from SkillInstallDialog and SkillInstallManagementDialog into separate components for improved maintainability and clarity of component responsibilities.
26 lines
913 B
JavaScript
26 lines
913 B
JavaScript
'use strict'
|
|
|
|
const NODE_PTY_JOB_EXPORTS = ['listJobProcessIds', 'terminateJob', 'assignCurrentProcessToJob']
|
|
|
|
function assertNodePtyJobOwnership({ nativeName, native, platform = process.platform }) {
|
|
if (platform !== 'win32' || nativeName !== 'conpty') {
|
|
return
|
|
}
|
|
const exported = native?.module ?? native
|
|
const missing = NODE_PTY_JOB_EXPORTS.filter((name) => typeof exported?.[name] !== 'function')
|
|
if (missing.length === 0) {
|
|
return
|
|
}
|
|
throw new Error(
|
|
[
|
|
`node-pty's conpty native is missing ${missing.join(', ')}.`,
|
|
`Resolved from: ${native?.dir ?? 'unknown'}`,
|
|
'That build cannot own a PTY tree, so terminatePtyJob degrades to "unavailable"',
|
|
'and pane teardown falls back to guessing by PID ancestry.',
|
|
'Rebuild node-pty from source so config/patches/node-pty@1.1.0.patch applies.'
|
|
].join(' ')
|
|
)
|
|
}
|
|
|
|
module.exports = { assertNodePtyJobOwnership }
|