@junejs/cli 0.0.2 → 0.0.4
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.
- package/bin.mjs +24 -0
- package/package.json +6 -5
package/bin.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The `june` bin launcher. It runs on Node ON PURPOSE: the CLI itself
|
|
3
|
+
// (src/june.ts) runs on Bun, and without this hop an npm user without Bun
|
|
4
|
+
// gets a bare shebang error ("env: bun: No such file or directory") instead
|
|
5
|
+
// of a sentence telling them what to install.
|
|
6
|
+
import { spawnSync } from "node:child_process";
|
|
7
|
+
import { dirname, join } from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const entry = join(dirname(fileURLToPath(import.meta.url)), "src/june.ts");
|
|
11
|
+
const args = process.argv.slice(2);
|
|
12
|
+
|
|
13
|
+
const probe = spawnSync("bun", ["--version"], { stdio: "ignore", shell: false });
|
|
14
|
+
if (probe.error || probe.status !== 0) {
|
|
15
|
+
console.error(
|
|
16
|
+
"june: the June CLI runs on Bun, which wasn't found on your PATH.\n" +
|
|
17
|
+
" install it: curl -fsSL https://bun.sh/install | bash\n" +
|
|
18
|
+
" (or: brew install oven-sh/bun/bun · https://bun.sh)",
|
|
19
|
+
);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const child = spawnSync("bun", [entry, ...args], { stdio: "inherit", shell: false });
|
|
24
|
+
process.exit(child.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junejs/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "The `june` CLI — dev / build / deploy / gen / info. A thin bin over @junejs/server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://june.build",
|
|
8
8
|
"bin": {
|
|
9
|
-
"june": "./
|
|
9
|
+
"june": "./bin.mjs"
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
12
|
".": "./src/cli.ts"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
|
-
"src"
|
|
15
|
+
"src",
|
|
16
|
+
"bin.mjs"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
18
19
|
"test": "bun test",
|
|
19
20
|
"typecheck": "tsc --noEmit"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"@junejs/core": "0.0.
|
|
23
|
-
"@junejs/server": "0.0.
|
|
23
|
+
"@junejs/core": "0.0.4",
|
|
24
|
+
"@junejs/server": "0.0.4"
|
|
24
25
|
},
|
|
25
26
|
"repository": {
|
|
26
27
|
"type": "git",
|