@aaqiljamal/visual-editor-server 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /**
4
+ * Launcher for `npx visual-editor-server`. The CLI is shipped pre-built
5
+ * in dist/cli.js (ESM); we delegate to it via node's --import.
6
+ */
7
+ const path = require("node:path");
8
+ const { spawn } = require("node:child_process");
9
+ const { pathToFileURL } = require("node:url");
10
+
11
+ const cli = path.join(__dirname, "..", "dist", "cli.js");
12
+ const child = spawn(
13
+ process.execPath,
14
+ [pathToFileURL(cli).href, ...process.argv.slice(2)],
15
+ { stdio: "inherit" },
16
+ );
17
+ child.on("exit", (code) => process.exit(code ?? 0));
18
+ child.on("error", (err) => {
19
+ process.stderr.write(`visual-editor-server: ${err.message}\n`);
20
+ process.exit(1);
21
+ });