fix
This commit is contained in:
@@ -1,3 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
require("../src/cli").main(process.argv.slice(2));
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
const { pathToFileURL } = require("node:url");
|
||||
|
||||
const bundle = path.join(__dirname, "..", "dist", "app.mjs");
|
||||
|
||||
if (!fs.existsSync(bundle)) {
|
||||
process.stderr.write(
|
||||
"server-config: bundle not built. Run `npm run build` from the package root first.\n",
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
import(pathToFileURL(bundle).href).catch((error) => {
|
||||
process.stderr.write(`server-config: ${error?.stack || error}\n`);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user