@portel/photon 1.17.0 → 1.17.2

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.
Files changed (2) hide show
  1. package/bin/photon +19 -0
  2. package/package.json +3 -2
package/bin/photon ADDED
@@ -0,0 +1,19 @@
1
+ #!/bin/sh
2
+ # Runtime-agnostic launcher — works with bun, node, or tsx
3
+ # Resolve symlinks to find the actual package directory
4
+ SELF="$0"
5
+ while [ -L "$SELF" ]; do
6
+ DIR="$(cd "$(dirname "$SELF")" && pwd)"
7
+ SELF="$(readlink "$SELF")"
8
+ case "$SELF" in /*) ;; *) SELF="$DIR/$SELF" ;; esac
9
+ done
10
+ CLI="$(cd "$(dirname "$SELF")/.." && pwd)/dist/cli.js"
11
+
12
+ if command -v bun >/dev/null 2>&1; then
13
+ exec bun "$CLI" "$@"
14
+ elif command -v node >/dev/null 2>&1; then
15
+ exec node "$CLI" "$@"
16
+ else
17
+ echo "Error: Neither bun nor node found in PATH. Install one of them." >&2
18
+ exit 1
19
+ fi
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@portel/photon",
3
- "version": "1.17.0",
3
+ "version": "1.17.2",
4
4
  "description": "You focus on the business logic. We'll enable the rest. Build MCP servers and CLI tools in a single TypeScript file.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
- "photon": "dist/cli.js"
8
+ "photon": "bin/photon"
9
9
  },
10
10
  "files": [
11
+ "bin",
11
12
  "dist",
12
13
  "templates"
13
14
  ],