@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 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 | Type | Default | Description |
147
- | ------------ | ---------------------------------------- | ----------------------------- | -------------------------------- |
148
- | `autoStart` | `boolean` | `true` | Start sandbox during development |
149
- | `url` | `string` | `'http://localhost:4321/api'` | Sandbox server URL |
150
- | `verbose` | `boolean` | `false` | Enable verbose logging |
151
- | `logLevel` | `'debug' \| 'info' \| 'warn' \| 'error'` | `'info'` | Log level for sandbox server |
152
- | `recreateDb` | `boolean` | `false` | Recreate database on each start |
153
- | `realtime` | `object` | `{...}` | Real-time server configuration |
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