@playcademy/sandbox 0.3.17-beta.13 → 0.3.17-beta.14

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.
@@ -10,6 +10,7 @@ declare const DEMO_USER_IDS: {
10
10
  readonly admin: "00000000-0000-0000-0000-000000000003";
11
11
  readonly pendingDeveloper: "00000000-0000-0000-0000-000000000004";
12
12
  readonly unverifiedPlayer: "00000000-0000-0000-0000-000000000005";
13
+ readonly anonymousPlayer: "00000000-0000-0000-0000-000000000006";
13
14
  };
14
15
  declare const DEMO_USERS: {
15
16
  readonly admin: {
@@ -72,6 +73,19 @@ declare const DEMO_USERS: {
72
73
  readonly createdAt: Date;
73
74
  readonly updatedAt: Date;
74
75
  };
76
+ readonly anonymousPlayer: {
77
+ readonly id: "00000000-0000-0000-0000-000000000006";
78
+ readonly name: "Demo Player";
79
+ readonly username: "anonymous_demo_player";
80
+ readonly email: "player@anon.demo.playcademy.gg";
81
+ readonly emailVerified: false;
82
+ readonly image: null;
83
+ readonly isAnonymous: true;
84
+ readonly role: "player";
85
+ readonly developerStatus: "none";
86
+ readonly createdAt: Date;
87
+ readonly updatedAt: Date;
88
+ };
75
89
  };
76
90
  declare const DEMO_USER: {
77
91
  readonly id: "00000000-0000-0000-0000-000000000001";
@@ -127,6 +141,19 @@ declare const DEMO_TOKENS: {
127
141
  readonly createdAt: Date;
128
142
  readonly updatedAt: Date;
129
143
  };
144
+ readonly 'sandbox-anonymous-token': {
145
+ readonly id: "00000000-0000-0000-0000-000000000006";
146
+ readonly name: "Demo Player";
147
+ readonly username: "anonymous_demo_player";
148
+ readonly email: "player@anon.demo.playcademy.gg";
149
+ readonly emailVerified: false;
150
+ readonly image: null;
151
+ readonly isAnonymous: true;
152
+ readonly role: "player";
153
+ readonly developerStatus: "none";
154
+ readonly createdAt: Date;
155
+ readonly updatedAt: Date;
156
+ };
130
157
  readonly 'sandbox-developer-token': {
131
158
  readonly id: "00000000-0000-0000-0000-000000000002";
132
159
  readonly name: "Developer User";
@@ -191,6 +218,7 @@ declare const DEMO_TOKENS: {
191
218
  /** Well-known token strings by role (for use in tests) */
192
219
  declare const SANDBOX_TOKENS: {
193
220
  readonly player: "sandbox-player-token";
221
+ readonly anonymous: "sandbox-anonymous-token";
194
222
  readonly developer: "sandbox-developer-token";
195
223
  readonly admin: "sandbox-admin-token";
196
224
  readonly pendingDeveloper: "sandbox-pending-dev-token";
package/dist/constants.js CHANGED
@@ -135,7 +135,7 @@ var init_achievements = __esm(() => {
135
135
  });
136
136
 
137
137
  // ../constants/src/auth.ts
138
- var AUTH_PROVIDER_IDS;
138
+ var AUTH_PROVIDER_IDS, DEMO_DISPLAY_NAME_PLACEHOLDER = "Demo Player";
139
139
  var init_auth = __esm(() => {
140
140
  AUTH_PROVIDER_IDS = {
141
141
  TIMEBACK: "timeback",
@@ -222,7 +222,8 @@ var init_overworld = __esm(() => {
222
222
  ERROR: 4000
223
223
  };
224
224
  CORE_GAME_UUIDS = {
225
- PLAYGROUND: "00000000-0000-0000-0000-000000000001"
225
+ PLAYGROUND: "00000000-0000-0000-0000-000000000001",
226
+ DEMO: "00000000-0000-0000-0000-000000000002"
226
227
  };
227
228
  });
228
229
 
@@ -300,13 +301,15 @@ var init_src = __esm(() => {
300
301
  // src/constants/demo-users.ts
301
302
  var now, DEMO_USER_IDS, DEMO_USERS, DEMO_USER;
302
303
  var init_demo_users = __esm(() => {
304
+ init_src();
303
305
  now = new Date;
304
306
  DEMO_USER_IDS = {
305
307
  player: "00000000-0000-0000-0000-000000000001",
306
308
  developer: "00000000-0000-0000-0000-000000000002",
307
309
  admin: "00000000-0000-0000-0000-000000000003",
308
310
  pendingDeveloper: "00000000-0000-0000-0000-000000000004",
309
- unverifiedPlayer: "00000000-0000-0000-0000-000000000005"
311
+ unverifiedPlayer: "00000000-0000-0000-0000-000000000005",
312
+ anonymousPlayer: "00000000-0000-0000-0000-000000000006"
310
313
  };
311
314
  DEMO_USERS = {
312
315
  admin: {
@@ -368,6 +371,19 @@ var init_demo_users = __esm(() => {
368
371
  developerStatus: "none",
369
372
  createdAt: now,
370
373
  updatedAt: now
374
+ },
375
+ anonymousPlayer: {
376
+ id: DEMO_USER_IDS.anonymousPlayer,
377
+ name: DEMO_DISPLAY_NAME_PLACEHOLDER,
378
+ username: "anonymous_demo_player",
379
+ email: "player@anon.demo.playcademy.gg",
380
+ emailVerified: false,
381
+ image: null,
382
+ isAnonymous: true,
383
+ role: "player",
384
+ developerStatus: "none",
385
+ createdAt: now,
386
+ updatedAt: now
371
387
  }
372
388
  };
373
389
  DEMO_USER = DEMO_USERS.player;
@@ -381,6 +397,7 @@ var init_demo_tokens = __esm(() => {
381
397
  "sandbox-demo-token": DEMO_USERS.player,
382
398
  "sandbox-admin-token": DEMO_USERS.admin,
383
399
  "sandbox-player-token": DEMO_USERS.player,
400
+ "sandbox-anonymous-token": DEMO_USERS.anonymousPlayer,
384
401
  "sandbox-developer-token": DEMO_USERS.developer,
385
402
  "sandbox-pending-dev-token": DEMO_USERS.pendingDeveloper,
386
403
  "sandbox-unverified-token": DEMO_USERS.unverifiedPlayer,
@@ -389,6 +406,7 @@ var init_demo_tokens = __esm(() => {
389
406
  };
390
407
  SANDBOX_TOKENS = {
391
408
  player: "sandbox-player-token",
409
+ anonymous: "sandbox-anonymous-token",
392
410
  developer: "sandbox-developer-token",
393
411
  admin: "sandbox-admin-token",
394
412
  pendingDeveloper: "sandbox-pending-dev-token",
package/dist/server.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import * as _electric_sql_pglite from '@electric-sql/pglite';
2
+ import * as drizzle_orm_pglite from 'drizzle-orm/pglite';
3
+ import * as schema from '@playcademy/data/tables';
1
4
  import * as _hono_node_server from '@hono/node-server';
2
5
  import { TimebackOrgType, TimebackUserRole } from '@playcademy/types/user';
3
6
 
@@ -289,6 +292,9 @@ declare const version: string;
289
292
  */
290
293
  declare function startServer(port: number, project?: ProjectInfo, options?: Omit<ServerOptions, 'port' | 'project'>): Promise<{
291
294
  main: _hono_node_server.ServerType;
295
+ db: drizzle_orm_pglite.PgliteDatabase<typeof schema> & {
296
+ $client: _electric_sql_pglite.PGlite;
297
+ };
292
298
  gameId: string | undefined;
293
299
  timebackMode: "local" | "mock" | "remote" | null;
294
300
  setRole: (role: TimebackUserRole) => void;