Files
openwork/packages/orchestrator/scripts/postinstall.mjs
ben 6284b581f7 chore: rename openwrk to openwork-orchestrator (#573)
* chore(orchestrator): rename openwrk to openwork-orchestrator

Rename the host package and internal references from openwrk to openwork-orchestrator, and expose the CLI as 'openwork'.

Update desktop/UI runtime wiring, release workflows, and docs; bundle the Tauri sidecar as 'openwork-orchestrator' to avoid Cargo package name collisions.

* chore: keep orchestrator publish script executable

* chore: update pnpm lockfile

* chore: sync lockfile with orchestrator deps

* docs: update orchestrator usage + release notes

Document that openwork-orchestrator installs the 'openwork' CLI, update release command wording, and remove obsolete workflow branch trigger.
2026-02-15 14:24:42 -08:00

43 lines
1002 B
JavaScript
Executable File

#!/usr/bin/env node
import os from "os"
import { createRequire } from "module"
const require = createRequire(import.meta.url)
function detect() {
const platformMap = {
darwin: "darwin",
linux: "linux",
win32: "windows",
}
const archMap = {
x64: "x64",
arm64: "arm64",
arm: "arm",
}
const platform = platformMap[os.platform()] || os.platform()
const arch = archMap[os.arch()] || os.arch()
return { platform, arch }
}
function name() {
const { platform, arch } = detect()
return `openwork-orchestrator-${platform}-${arch}`
}
try {
const pkg = name()
require.resolve(`${pkg}/package.json`)
console.log(`openwork-orchestrator: verified platform package: ${pkg}`)
} catch (error) {
const pkg = name()
console.error(
`openwork-orchestrator: failed to locate platform binary package (${pkg}).\n` +
`Your package manager may have skipped optionalDependencies.\n` +
`Try installing it manually: npm i -g ${pkg}`,
)
process.exit(1)
}