mirror of
https://gh-proxy.org/https://github.com/klinsmaya/workdsh.git
synced 2026-11-09 18:07:02 +08:00
17 lines
754 B
JavaScript
17 lines
754 B
JavaScript
import { readFile } from 'node:fs/promises'
|
|
import { resolve } from 'node:path'
|
|
|
|
import { loadInstalledPackage, verifyRuntimeClosure } from './runtime-closure.mjs'
|
|
|
|
const manifestPath = resolve(import.meta.dirname, '../package.json')
|
|
const manifest = JSON.parse(await readFile(manifestPath, 'utf8'))
|
|
const result = await verifyRuntimeClosure(manifest, loadInstalledPackage, manifestPath)
|
|
|
|
if (result.failures.length > 0) {
|
|
console.error('verify-runtime-closure: required first-party peers are missing from dsh-plugin-desktop dependencies:')
|
|
for (const failure of result.failures) console.error(` ${failure}`)
|
|
process.exit(1)
|
|
}
|
|
|
|
console.log(`verify-runtime-closure: ${result.packageCount} first-party nodes form a closed reachable runtime graph.`)
|