Installing 0.1.0 failed twice, both my mistakes.
- Node refuses to strip types under node_modules, so shipping .ts for the
CLI could never work from an installed package. tsconfig.cli.json now
compiles those modules to dist/ as ES modules, and the helper scripts
are plain .mjs.
- serverExternalPackages made Turbopack emit require("onvif-<hash>"),
a name that resolves nowhere, because onvif comes from a git URL.
Bundling it fixes that; checked from an installed tarball, where
/api/discover answered 200 and a real camera's info and snapshot came
back through the packaged server.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
21 lines
730 B
JSON
21 lines
730 B
JSON
{
|
|
// The CLI and its helper scripts run as plain Node, not through Next, so the few modules
|
|
// they use are compiled to JavaScript: Node refuses to strip types under node_modules,
|
|
// which is exactly where a published package lives (vrek iss-9zcawn7).
|
|
"compilerOptions": {
|
|
"target": "es2023",
|
|
"module": "es2022",
|
|
"moduleResolution": "bundler",
|
|
"strict": true,
|
|
"skipLibCheck": true,
|
|
"outDir": "dist",
|
|
"rootDir": "src",
|
|
"allowImportingTsExtensions": true,
|
|
"rewriteRelativeImportExtensions": true,
|
|
"noEmit": false,
|
|
"declaration": false,
|
|
"sourceMap": false
|
|
},
|
|
"include": ["src/lib/paths.ts", "src/lib/first-run.ts", "src/lib/mediamtx-install.ts", "src/lib/admin-file.ts"]
|
|
}
|