create-airjam 0.2.0 → 0.2.1

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/dist/index.js CHANGED
@@ -82,6 +82,11 @@ Creating project in ${targetDir}...
82
82
  return true;
83
83
  }
84
84
  });
85
+ const gitignorePlaceholderPath = path.join(targetDir, "_gitignore");
86
+ const gitignorePath = path.join(targetDir, ".gitignore");
87
+ if (fs.existsSync(gitignorePlaceholderPath)) {
88
+ await fs.move(gitignorePlaceholderPath, gitignorePath, { overwrite: true });
89
+ }
85
90
  const pkgPath = path.join(targetDir, "package.json");
86
91
  if (fs.existsSync(pkgPath)) {
87
92
  const pkg = await fs.readJson(pkgPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-airjam",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "CLI to scaffold Air Jam game projects",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -5,9 +5,9 @@
5
5
  # For production, set to your official Air Jam server URL: wss://api.air-jam.app
6
6
  VITE_AIR_JAM_SERVER_URL=http://localhost:4000
7
7
 
8
- # API Key - optional for local development (not required when using local server)
8
+ # Public API Key - optional for local development (not required when using local server)
9
9
  # Required for production - get from Air Jam platform
10
- VITE_AIR_JAM_API_KEY=
10
+ VITE_AIR_JAM_PUBLIC_KEY=
11
11
 
12
12
  # HTTPS host used only by `pnpm run dev:secure` (set by `pnpm run secure:init`)
13
13
  # Example: https://my-game-dev.example.com
@@ -48,7 +48,7 @@ If you prefer to use the official Air Jam server instead of running locally:
48
48
  2. Set in `.env.local`:
49
49
  ```bash
50
50
  VITE_AIR_JAM_SERVER_URL=https://api.air-jam.app
51
- VITE_AIR_JAM_API_KEY=your-api-key-here
51
+ VITE_AIR_JAM_PUBLIC_KEY=your-public-key-here
52
52
  ```
53
53
  3. Run only the game:
54
54
  ```bash
@@ -108,7 +108,8 @@ src/
108
108
  See `.env.example` for all available environment variables. Key variables:
109
109
 
110
110
  - `VITE_AIR_JAM_SERVER_URL` - Server URL (defaults to localhost:4000 for local dev)
111
- - `VITE_AIR_JAM_API_KEY` - API key (optional for local dev, required for production)
111
+ - `VITE_AIR_JAM_PUBLIC_KEY` - Public API key (optional for local dev, required for production)
112
+ - `VITE_AIR_JAM_API_KEY` - Legacy public key variable (still supported)
112
113
  - `AIR_JAM_SECURE_PUBLIC_HOST` - HTTPS hostname used by `dev:secure` for host/controller URLs
113
114
  - `CLOUDFLARE_TUNNEL_NAME` - Named Cloudflare tunnel used by `dev:secure`
114
115
 
@@ -118,7 +119,7 @@ See `.env.example` for all available environment variables. Key variables:
118
119
 
119
120
  1. Set environment variables in Vercel:
120
121
  - `VITE_AIR_JAM_SERVER_URL` - Your official Air Jam server URL
121
- - `VITE_AIR_JAM_API_KEY` - Your API key from the Air Jam platform
122
+ - `VITE_AIR_JAM_PUBLIC_KEY` - Your public API key from the Air Jam platform
122
123
 
123
124
  2. Deploy:
124
125
  ```bash
@@ -126,6 +127,7 @@ See `.env.example` for all available environment variables. Key variables:
126
127
  ```
127
128
 
128
129
  The game will connect to the official Air Jam server - no local server needed!
130
+ `vercel.json` is included in this template so `/controller?room=XXXX` and other SPA routes resolve correctly.
129
131
 
130
132
  ### Building for Production
131
133
 
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ dist
3
+ dist-ssr
4
+ .env.local
5
+ .cloudflared
@@ -93,7 +93,7 @@ When you're ready to share your game, you'll need to deploy it and connect it to
93
93
  - Set the following environment variables in your deployment settings:
94
94
 
95
95
  ```bash
96
- VITE_AIR_JAM_API_KEY=your_api_key_here
96
+ VITE_AIR_JAM_PUBLIC_KEY=your_public_key_here
97
97
  VITE_AIR_JAM_SERVER_URL=wss://api.air-jam.app
98
98
  ```
99
99
 
@@ -43,7 +43,8 @@ const inputSchema = z.object({
43
43
  The provider automatically reads from these environment variables if props aren't provided:
44
44
 
45
45
  - `VITE_AIR_JAM_SERVER_URL` / `NEXT_PUBLIC_AIR_JAM_SERVER_URL` - WebSocket server URL
46
- - `VITE_AIR_JAM_API_KEY` / `NEXT_PUBLIC_AIR_JAM_API_KEY` - API key
46
+ - `VITE_AIR_JAM_PUBLIC_KEY` / `NEXT_PUBLIC_AIR_JAM_PUBLIC_KEY` - Public API key
47
+ - `VITE_AIR_JAM_API_KEY` / `NEXT_PUBLIC_AIR_JAM_API_KEY` - Legacy public key variable (still supported)
47
48
 
48
49
  ---
49
50
 
@@ -0,0 +1,19 @@
1
+ {
2
+ "rewrites": [
3
+ {
4
+ "source": "/(.*)",
5
+ "destination": "/index.html"
6
+ }
7
+ ],
8
+ "headers": [
9
+ {
10
+ "source": "/(.*)",
11
+ "headers": [
12
+ {
13
+ "key": "Content-Security-Policy",
14
+ "value": "frame-ancestors *;"
15
+ }
16
+ ]
17
+ }
18
+ ]
19
+ }