@playcademy/vite-plugin 0.1.26-alpha.6 → 0.1.27
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/README.md +53 -10
- package/dist/index.js +86476 -82127
- package/dist/lib/logging/utils.d.ts +2 -0
- package/dist/lib/sandbox/server.d.ts +5 -0
- package/dist/server/platform-mode.d.ts +5 -0
- package/dist/types/internal.d.ts +6 -0
- package/dist/types/options.d.ts +270 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -78,13 +78,15 @@ export default defineConfig({
|
|
|
78
78
|
plugins: [
|
|
79
79
|
playcademy({
|
|
80
80
|
export: {
|
|
81
|
-
platform: 'web', // Platform identifier (auto-detected)
|
|
82
81
|
autoZip: true, // Create deployment zip (enabled by default)
|
|
83
82
|
},
|
|
84
83
|
sandbox: {
|
|
85
84
|
autoStart: true, // Start sandbox automatically
|
|
86
|
-
url: 'http://localhost:4321', // Sandbox URL
|
|
87
85
|
verbose: false, // Enable debug logging
|
|
86
|
+
logLevel: 'info', // Log level (debug, info, warn, error)
|
|
87
|
+
seed: true, // Seed database with demo data
|
|
88
|
+
recreateDb: false, // Recreate database on each start
|
|
89
|
+
memoryOnly: false, // Use in-memory database
|
|
88
90
|
realtime: {
|
|
89
91
|
enabled: false, // Disabled by default, enable for multiplayer
|
|
90
92
|
port: 4322, // Defaults to API port + 1
|
|
@@ -143,14 +145,24 @@ Configuration for manifest generation and build output:
|
|
|
143
145
|
|
|
144
146
|
Configuration for the development sandbox server:
|
|
145
147
|
|
|
146
|
-
| Option
|
|
147
|
-
|
|
|
148
|
-
| `autoStart`
|
|
149
|
-
| `url`
|
|
150
|
-
| `verbose`
|
|
151
|
-
| `logLevel`
|
|
152
|
-
| `recreateDb`
|
|
153
|
-
| `
|
|
148
|
+
| Option | Type | Default | Description |
|
|
149
|
+
| -------------- | ---------------------------------------- | ----------------------------- | --------------------------------------- |
|
|
150
|
+
| `autoStart` | `boolean` | `true` | Start sandbox during development |
|
|
151
|
+
| `url` | `string` | `'http://localhost:4321/api'` | Sandbox server URL |
|
|
152
|
+
| `verbose` | `boolean` | `false` | Enable verbose logging |
|
|
153
|
+
| `logLevel` | `'debug' \| 'info' \| 'warn' \| 'error'` | `'info'` | Log level for sandbox server |
|
|
154
|
+
| `recreateDb` | `boolean` | `false` | Recreate database on each start |
|
|
155
|
+
| `seed` | `boolean` | `true` | Seed database with demo data |
|
|
156
|
+
| `memoryOnly` | `boolean` | `false` | Use in-memory database (non-persistent) |
|
|
157
|
+
| `databasePath` | `string` | `undefined` | Custom path for database file |
|
|
158
|
+
| `realtime` | `object` | `{ enabled: false }` | Real-time server configuration |
|
|
159
|
+
|
|
160
|
+
#### Realtime Options (`sandbox.realtime`)
|
|
161
|
+
|
|
162
|
+
| Option | Type | Default | Description |
|
|
163
|
+
| --------- | --------- | ------------ | -------------------------------- |
|
|
164
|
+
| `enabled` | `boolean` | `false` | Enable WebSocket server |
|
|
165
|
+
| `port` | `number` | API port + 1 | Custom port for WebSocket server |
|
|
154
166
|
|
|
155
167
|
## Build Output
|
|
156
168
|
|
|
@@ -317,6 +329,7 @@ export default defineConfig({
|
|
|
317
329
|
sandbox: {
|
|
318
330
|
realtime: {
|
|
319
331
|
enabled: true,
|
|
332
|
+
port: 4322, // Optional: custom WebSocket port
|
|
320
333
|
},
|
|
321
334
|
},
|
|
322
335
|
}),
|
|
@@ -324,6 +337,36 @@ export default defineConfig({
|
|
|
324
337
|
})
|
|
325
338
|
```
|
|
326
339
|
|
|
340
|
+
### Testing with Clean Database
|
|
341
|
+
|
|
342
|
+
```typescript
|
|
343
|
+
// Start with a fresh database on each dev server restart
|
|
344
|
+
export default defineConfig({
|
|
345
|
+
plugins: [
|
|
346
|
+
playcademy({
|
|
347
|
+
sandbox: {
|
|
348
|
+
recreateDb: true, // Recreate database on each start
|
|
349
|
+
},
|
|
350
|
+
}),
|
|
351
|
+
],
|
|
352
|
+
})
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### In-Memory Database for CI
|
|
356
|
+
|
|
357
|
+
```typescript
|
|
358
|
+
// Use in-memory database for fast, ephemeral testing
|
|
359
|
+
export default defineConfig({
|
|
360
|
+
plugins: [
|
|
361
|
+
playcademy({
|
|
362
|
+
sandbox: {
|
|
363
|
+
memoryOnly: true, // Database in RAM only
|
|
364
|
+
},
|
|
365
|
+
}),
|
|
366
|
+
],
|
|
367
|
+
})
|
|
368
|
+
```
|
|
369
|
+
|
|
327
370
|
### Godot Export
|
|
328
371
|
|
|
329
372
|
```typescript
|