@glassly/create-miniapp 0.1.0-dev.4 → 0.1.0-dev.6

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.
@@ -1,3 +1,20 @@
1
- #!/usr/bin/env bun
1
+ #!/usr/bin/env node
2
2
  // Extensionless launcher: npm strips bin entries that point at .ts files.
3
- import "./index.ts"
3
+ // The scaffolder runs under Bun; when invoked from Node (npx, npm create)
4
+ // delegate to Bun if it is installed, otherwise say how to get it.
5
+ import {spawnSync} from "node:child_process"
6
+ import {fileURLToPath} from "node:url"
7
+
8
+ const entry = fileURLToPath(new URL("./index.ts", import.meta.url))
9
+
10
+ if (process.versions.bun) {
11
+ await import(entry)
12
+ } else {
13
+ const result = spawnSync("bun", [entry, ...process.argv.slice(2)], {stdio: "inherit"})
14
+ if (result.error && result.error.code === "ENOENT") {
15
+ console.error("create-miniapp runs on Bun, which is not installed or not on PATH.")
16
+ console.error("Install it from https://bun.sh, then run: bunx @glassly/create-miniapp my-miniapp")
17
+ process.exit(1)
18
+ }
19
+ process.exit(result.status ?? 1)
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glassly/create-miniapp",
3
- "version": "0.1.0-dev.4",
3
+ "version": "0.1.0-dev.6",
4
4
  "description": "Scaffold a new Glassly miniapp project",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -9,13 +9,13 @@
9
9
  "pack": "glassly pack"
10
10
  },
11
11
  "dependencies": {
12
- "@glassly/miniapp": "0.3.1-dev.517",
12
+ "@glassly/miniapp": "0.3.1-dev.528",
13
13
  "react": "^19.0.0",
14
14
  "react-dom": "^19.0.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@glassly/cli": "2.0.0-dev.1",
18
- "@glassly/miniapp-cli": "0.1.0-dev.2",
17
+ "@glassly/cli": "2.0.0-dev.3",
18
+ "@glassly/miniapp-cli": "0.1.0-dev.4",
19
19
  "@types/react": "^19.0.0",
20
20
  "@types/react-dom": "^19.0.0",
21
21
  "typescript": "^5.6.0"