@playcademy/sandbox 0.3.17-beta.8 → 0.3.17
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/cli.js +3468 -1686
- package/dist/constants.d.ts +108 -80
- package/dist/constants.js +29 -8
- package/dist/infrastructure/api/providers/auth.provider.d.ts +15 -15
- package/dist/server.d.ts +7 -0
- package/dist/server.js +3464 -1686
- package/dist/test.d.ts +2 -0
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -5,83 +5,97 @@ import { ItemRow } from '@playcademy/data/types';
|
|
|
5
5
|
* Demo user data for sandbox testing
|
|
6
6
|
*/
|
|
7
7
|
declare const DEMO_USER_IDS: {
|
|
8
|
-
readonly player:
|
|
9
|
-
readonly developer:
|
|
10
|
-
readonly admin:
|
|
11
|
-
readonly pendingDeveloper:
|
|
12
|
-
readonly unverifiedPlayer:
|
|
8
|
+
readonly player: '00000000-0000-0000-0000-000000000001';
|
|
9
|
+
readonly developer: '00000000-0000-0000-0000-000000000002';
|
|
10
|
+
readonly admin: '00000000-0000-0000-0000-000000000003';
|
|
11
|
+
readonly pendingDeveloper: '00000000-0000-0000-0000-000000000004';
|
|
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: {
|
|
16
17
|
readonly id: "00000000-0000-0000-0000-000000000003";
|
|
17
|
-
readonly name:
|
|
18
|
-
readonly username:
|
|
19
|
-
readonly email:
|
|
18
|
+
readonly name: 'Admin User';
|
|
19
|
+
readonly username: 'admin_user';
|
|
20
|
+
readonly email: 'admin@playcademy.com';
|
|
20
21
|
readonly emailVerified: true;
|
|
21
22
|
readonly image: null;
|
|
22
|
-
readonly role:
|
|
23
|
-
readonly developerStatus:
|
|
23
|
+
readonly role: 'admin';
|
|
24
|
+
readonly developerStatus: 'approved';
|
|
24
25
|
readonly createdAt: Date;
|
|
25
26
|
readonly updatedAt: Date;
|
|
26
27
|
};
|
|
27
28
|
readonly player: {
|
|
28
29
|
readonly id: "00000000-0000-0000-0000-000000000001";
|
|
29
|
-
readonly name:
|
|
30
|
-
readonly username:
|
|
31
|
-
readonly email:
|
|
30
|
+
readonly name: 'Player User';
|
|
31
|
+
readonly username: 'player_user';
|
|
32
|
+
readonly email: 'player@playcademy.com';
|
|
32
33
|
readonly emailVerified: true;
|
|
33
34
|
readonly image: null;
|
|
34
|
-
readonly role:
|
|
35
|
-
readonly developerStatus:
|
|
35
|
+
readonly role: 'player';
|
|
36
|
+
readonly developerStatus: 'none';
|
|
36
37
|
readonly createdAt: Date;
|
|
37
38
|
readonly updatedAt: Date;
|
|
38
39
|
};
|
|
39
40
|
readonly developer: {
|
|
40
41
|
readonly id: "00000000-0000-0000-0000-000000000002";
|
|
41
|
-
readonly name:
|
|
42
|
-
readonly username:
|
|
43
|
-
readonly email:
|
|
42
|
+
readonly name: 'Developer User';
|
|
43
|
+
readonly username: 'developer_user';
|
|
44
|
+
readonly email: 'developer@playcademy.com';
|
|
44
45
|
readonly emailVerified: true;
|
|
45
46
|
readonly image: null;
|
|
46
|
-
readonly role:
|
|
47
|
-
readonly developerStatus:
|
|
47
|
+
readonly role: 'developer';
|
|
48
|
+
readonly developerStatus: 'approved';
|
|
48
49
|
readonly createdAt: Date;
|
|
49
50
|
readonly updatedAt: Date;
|
|
50
51
|
};
|
|
51
52
|
readonly pendingDeveloper: {
|
|
52
53
|
readonly id: "00000000-0000-0000-0000-000000000004";
|
|
53
|
-
readonly name:
|
|
54
|
-
readonly username:
|
|
55
|
-
readonly email:
|
|
54
|
+
readonly name: 'Pending Developer';
|
|
55
|
+
readonly username: 'pending_dev';
|
|
56
|
+
readonly email: 'pending@playcademy.com';
|
|
56
57
|
readonly emailVerified: true;
|
|
57
58
|
readonly image: null;
|
|
58
|
-
readonly role:
|
|
59
|
-
readonly developerStatus:
|
|
59
|
+
readonly role: 'developer';
|
|
60
|
+
readonly developerStatus: 'pending';
|
|
60
61
|
readonly createdAt: Date;
|
|
61
62
|
readonly updatedAt: Date;
|
|
62
63
|
};
|
|
63
64
|
readonly unverifiedPlayer: {
|
|
64
65
|
readonly id: "00000000-0000-0000-0000-000000000005";
|
|
65
|
-
readonly name:
|
|
66
|
-
readonly username:
|
|
67
|
-
readonly email:
|
|
66
|
+
readonly name: 'Unverified Player';
|
|
67
|
+
readonly username: 'unverified_player';
|
|
68
|
+
readonly email: 'unverified@playcademy.com';
|
|
68
69
|
readonly emailVerified: false;
|
|
69
70
|
readonly image: null;
|
|
70
|
-
readonly role:
|
|
71
|
-
readonly developerStatus:
|
|
71
|
+
readonly role: 'player';
|
|
72
|
+
readonly developerStatus: 'none';
|
|
73
|
+
readonly createdAt: Date;
|
|
74
|
+
readonly updatedAt: Date;
|
|
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';
|
|
72
86
|
readonly createdAt: Date;
|
|
73
87
|
readonly updatedAt: Date;
|
|
74
88
|
};
|
|
75
89
|
};
|
|
76
90
|
declare const DEMO_USER: {
|
|
77
91
|
readonly id: "00000000-0000-0000-0000-000000000001";
|
|
78
|
-
readonly name:
|
|
79
|
-
readonly username:
|
|
80
|
-
readonly email:
|
|
92
|
+
readonly name: 'Player User';
|
|
93
|
+
readonly username: 'player_user';
|
|
94
|
+
readonly email: 'player@playcademy.com';
|
|
81
95
|
readonly emailVerified: true;
|
|
82
96
|
readonly image: null;
|
|
83
|
-
readonly role:
|
|
84
|
-
readonly developerStatus:
|
|
97
|
+
readonly role: 'player';
|
|
98
|
+
readonly developerStatus: 'none';
|
|
85
99
|
readonly createdAt: Date;
|
|
86
100
|
readonly updatedAt: Date;
|
|
87
101
|
};
|
|
@@ -93,108 +107,122 @@ declare const DEMO_USER: {
|
|
|
93
107
|
declare const DEMO_TOKENS: {
|
|
94
108
|
readonly 'sandbox-demo-token': {
|
|
95
109
|
readonly id: "00000000-0000-0000-0000-000000000001";
|
|
96
|
-
readonly name:
|
|
97
|
-
readonly username:
|
|
98
|
-
readonly email:
|
|
110
|
+
readonly name: 'Player User';
|
|
111
|
+
readonly username: 'player_user';
|
|
112
|
+
readonly email: 'player@playcademy.com';
|
|
99
113
|
readonly emailVerified: true;
|
|
100
114
|
readonly image: null;
|
|
101
|
-
readonly role:
|
|
102
|
-
readonly developerStatus:
|
|
115
|
+
readonly role: 'player';
|
|
116
|
+
readonly developerStatus: 'none';
|
|
103
117
|
readonly createdAt: Date;
|
|
104
118
|
readonly updatedAt: Date;
|
|
105
119
|
};
|
|
106
120
|
readonly 'sandbox-admin-token': {
|
|
107
121
|
readonly id: "00000000-0000-0000-0000-000000000003";
|
|
108
|
-
readonly name:
|
|
109
|
-
readonly username:
|
|
110
|
-
readonly email:
|
|
122
|
+
readonly name: 'Admin User';
|
|
123
|
+
readonly username: 'admin_user';
|
|
124
|
+
readonly email: 'admin@playcademy.com';
|
|
111
125
|
readonly emailVerified: true;
|
|
112
126
|
readonly image: null;
|
|
113
|
-
readonly role:
|
|
114
|
-
readonly developerStatus:
|
|
127
|
+
readonly role: 'admin';
|
|
128
|
+
readonly developerStatus: 'approved';
|
|
115
129
|
readonly createdAt: Date;
|
|
116
130
|
readonly updatedAt: Date;
|
|
117
131
|
};
|
|
118
132
|
readonly 'sandbox-player-token': {
|
|
119
133
|
readonly id: "00000000-0000-0000-0000-000000000001";
|
|
120
|
-
readonly name:
|
|
121
|
-
readonly username:
|
|
122
|
-
readonly email:
|
|
134
|
+
readonly name: 'Player User';
|
|
135
|
+
readonly username: 'player_user';
|
|
136
|
+
readonly email: 'player@playcademy.com';
|
|
123
137
|
readonly emailVerified: true;
|
|
124
138
|
readonly image: null;
|
|
125
|
-
readonly role:
|
|
126
|
-
readonly developerStatus:
|
|
139
|
+
readonly role: 'player';
|
|
140
|
+
readonly developerStatus: 'none';
|
|
141
|
+
readonly createdAt: Date;
|
|
142
|
+
readonly updatedAt: Date;
|
|
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';
|
|
127
154
|
readonly createdAt: Date;
|
|
128
155
|
readonly updatedAt: Date;
|
|
129
156
|
};
|
|
130
157
|
readonly 'sandbox-developer-token': {
|
|
131
158
|
readonly id: "00000000-0000-0000-0000-000000000002";
|
|
132
|
-
readonly name:
|
|
133
|
-
readonly username:
|
|
134
|
-
readonly email:
|
|
159
|
+
readonly name: 'Developer User';
|
|
160
|
+
readonly username: 'developer_user';
|
|
161
|
+
readonly email: 'developer@playcademy.com';
|
|
135
162
|
readonly emailVerified: true;
|
|
136
163
|
readonly image: null;
|
|
137
|
-
readonly role:
|
|
138
|
-
readonly developerStatus:
|
|
164
|
+
readonly role: 'developer';
|
|
165
|
+
readonly developerStatus: 'approved';
|
|
139
166
|
readonly createdAt: Date;
|
|
140
167
|
readonly updatedAt: Date;
|
|
141
168
|
};
|
|
142
169
|
readonly 'sandbox-pending-dev-token': {
|
|
143
170
|
readonly id: "00000000-0000-0000-0000-000000000004";
|
|
144
|
-
readonly name:
|
|
145
|
-
readonly username:
|
|
146
|
-
readonly email:
|
|
171
|
+
readonly name: 'Pending Developer';
|
|
172
|
+
readonly username: 'pending_dev';
|
|
173
|
+
readonly email: 'pending@playcademy.com';
|
|
147
174
|
readonly emailVerified: true;
|
|
148
175
|
readonly image: null;
|
|
149
|
-
readonly role:
|
|
150
|
-
readonly developerStatus:
|
|
176
|
+
readonly role: 'developer';
|
|
177
|
+
readonly developerStatus: 'pending';
|
|
151
178
|
readonly createdAt: Date;
|
|
152
179
|
readonly updatedAt: Date;
|
|
153
180
|
};
|
|
154
181
|
readonly 'sandbox-unverified-token': {
|
|
155
182
|
readonly id: "00000000-0000-0000-0000-000000000005";
|
|
156
|
-
readonly name:
|
|
157
|
-
readonly username:
|
|
158
|
-
readonly email:
|
|
183
|
+
readonly name: 'Unverified Player';
|
|
184
|
+
readonly username: 'unverified_player';
|
|
185
|
+
readonly email: 'unverified@playcademy.com';
|
|
159
186
|
readonly emailVerified: false;
|
|
160
187
|
readonly image: null;
|
|
161
|
-
readonly role:
|
|
162
|
-
readonly developerStatus:
|
|
188
|
+
readonly role: 'player';
|
|
189
|
+
readonly developerStatus: 'none';
|
|
163
190
|
readonly createdAt: Date;
|
|
164
191
|
readonly updatedAt: Date;
|
|
165
192
|
};
|
|
166
193
|
readonly 'mock-game-token-for-local-dev': {
|
|
167
194
|
readonly id: "00000000-0000-0000-0000-000000000001";
|
|
168
|
-
readonly name:
|
|
169
|
-
readonly username:
|
|
170
|
-
readonly email:
|
|
195
|
+
readonly name: 'Player User';
|
|
196
|
+
readonly username: 'player_user';
|
|
197
|
+
readonly email: 'player@playcademy.com';
|
|
171
198
|
readonly emailVerified: true;
|
|
172
199
|
readonly image: null;
|
|
173
|
-
readonly role:
|
|
174
|
-
readonly developerStatus:
|
|
200
|
+
readonly role: 'player';
|
|
201
|
+
readonly developerStatus: 'none';
|
|
175
202
|
readonly createdAt: Date;
|
|
176
203
|
readonly updatedAt: Date;
|
|
177
204
|
};
|
|
178
205
|
readonly 'sandbox-game-backend-token': {
|
|
179
206
|
readonly id: "00000000-0000-0000-0000-000000000002";
|
|
180
|
-
readonly name:
|
|
181
|
-
readonly username:
|
|
182
|
-
readonly email:
|
|
207
|
+
readonly name: 'Developer User';
|
|
208
|
+
readonly username: 'developer_user';
|
|
209
|
+
readonly email: 'developer@playcademy.com';
|
|
183
210
|
readonly emailVerified: true;
|
|
184
211
|
readonly image: null;
|
|
185
|
-
readonly role:
|
|
186
|
-
readonly developerStatus:
|
|
212
|
+
readonly role: 'developer';
|
|
213
|
+
readonly developerStatus: 'approved';
|
|
187
214
|
readonly createdAt: Date;
|
|
188
215
|
readonly updatedAt: Date;
|
|
189
216
|
};
|
|
190
217
|
};
|
|
191
218
|
/** Well-known token strings by role (for use in tests) */
|
|
192
219
|
declare const SANDBOX_TOKENS: {
|
|
193
|
-
readonly player:
|
|
194
|
-
readonly
|
|
195
|
-
readonly
|
|
196
|
-
readonly
|
|
197
|
-
readonly
|
|
220
|
+
readonly player: 'sandbox-player-token';
|
|
221
|
+
readonly anonymous: 'sandbox-anonymous-token';
|
|
222
|
+
readonly developer: 'sandbox-developer-token';
|
|
223
|
+
readonly admin: 'sandbox-admin-token';
|
|
224
|
+
readonly pendingDeveloper: 'sandbox-pending-dev-token';
|
|
225
|
+
readonly unverified: 'sandbox-unverified-token';
|
|
198
226
|
};
|
|
199
227
|
declare const DEMO_TOKEN = "sandbox-demo-token";
|
|
200
228
|
declare const MOCK_GAME_ID = "mock-game-id-from-template";
|
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",
|
|
@@ -149,10 +149,10 @@ var init_typescript = __esm(() => {
|
|
|
149
149
|
TypeScriptPackages = {
|
|
150
150
|
tsc: "tsc",
|
|
151
151
|
nativePreview: "@typescript/native-preview",
|
|
152
|
-
|
|
152
|
+
nativePreviewBeta: "@typescript/native-preview@beta"
|
|
153
153
|
};
|
|
154
154
|
TYPESCRIPT_RUNNER = {
|
|
155
|
-
package: TypeScriptPackages.
|
|
155
|
+
package: TypeScriptPackages.nativePreviewBeta,
|
|
156
156
|
bin: "tsgo"
|
|
157
157
|
};
|
|
158
158
|
});
|
|
@@ -174,7 +174,8 @@ var PLAYCADEMY_BASE_URLS, GAME_WORKER_DOMAINS;
|
|
|
174
174
|
var init_domains = __esm(() => {
|
|
175
175
|
PLAYCADEMY_BASE_URLS = {
|
|
176
176
|
production: "https://hub.playcademy.net",
|
|
177
|
-
staging: "https://hub.dev.playcademy.net"
|
|
177
|
+
staging: "https://hub.dev.playcademy.net",
|
|
178
|
+
local: "http://localhost:5174"
|
|
178
179
|
};
|
|
179
180
|
GAME_WORKER_DOMAINS = {
|
|
180
181
|
production: "playcademy.gg",
|
|
@@ -222,7 +223,8 @@ var init_overworld = __esm(() => {
|
|
|
222
223
|
ERROR: 4000
|
|
223
224
|
};
|
|
224
225
|
CORE_GAME_UUIDS = {
|
|
225
|
-
PLAYGROUND: "00000000-0000-0000-0000-000000000001"
|
|
226
|
+
PLAYGROUND: "00000000-0000-0000-0000-000000000001",
|
|
227
|
+
DEMO: "00000000-0000-0000-0000-000000000002"
|
|
226
228
|
};
|
|
227
229
|
});
|
|
228
230
|
|
|
@@ -235,7 +237,8 @@ var init_timeback = __esm(() => {
|
|
|
235
237
|
TIMEBACK_ROUTES = {
|
|
236
238
|
END_ACTIVITY: "/integrations/timeback/end-activity",
|
|
237
239
|
GET_XP: "/integrations/timeback/xp",
|
|
238
|
-
HEARTBEAT: "/integrations/timeback/heartbeat"
|
|
240
|
+
HEARTBEAT: "/integrations/timeback/heartbeat",
|
|
241
|
+
ADVANCE_COURSE: "/integrations/timeback/advance-course"
|
|
239
242
|
};
|
|
240
243
|
TIMEBACK_COURSE_DEFAULTS = {
|
|
241
244
|
gradingScheme: "STANDARD",
|
|
@@ -280,7 +283,8 @@ var WORKER_NAMING, SECRETS_PREFIX = "secrets_", CLOUDFLARE_COMPATIBILITY_DATE =
|
|
|
280
283
|
var init_workers = __esm(() => {
|
|
281
284
|
WORKER_NAMING = {
|
|
282
285
|
STAGING_PREFIX: "staging-",
|
|
283
|
-
STAGING_SUFFIX: "-staging"
|
|
286
|
+
STAGING_SUFFIX: "-staging",
|
|
287
|
+
LOCAL_PREFIX: "local-"
|
|
284
288
|
};
|
|
285
289
|
});
|
|
286
290
|
|
|
@@ -300,13 +304,15 @@ var init_src = __esm(() => {
|
|
|
300
304
|
// src/constants/demo-users.ts
|
|
301
305
|
var now, DEMO_USER_IDS, DEMO_USERS, DEMO_USER;
|
|
302
306
|
var init_demo_users = __esm(() => {
|
|
307
|
+
init_src();
|
|
303
308
|
now = new Date;
|
|
304
309
|
DEMO_USER_IDS = {
|
|
305
310
|
player: "00000000-0000-0000-0000-000000000001",
|
|
306
311
|
developer: "00000000-0000-0000-0000-000000000002",
|
|
307
312
|
admin: "00000000-0000-0000-0000-000000000003",
|
|
308
313
|
pendingDeveloper: "00000000-0000-0000-0000-000000000004",
|
|
309
|
-
unverifiedPlayer: "00000000-0000-0000-0000-000000000005"
|
|
314
|
+
unverifiedPlayer: "00000000-0000-0000-0000-000000000005",
|
|
315
|
+
anonymousPlayer: "00000000-0000-0000-0000-000000000006"
|
|
310
316
|
};
|
|
311
317
|
DEMO_USERS = {
|
|
312
318
|
admin: {
|
|
@@ -368,6 +374,19 @@ var init_demo_users = __esm(() => {
|
|
|
368
374
|
developerStatus: "none",
|
|
369
375
|
createdAt: now,
|
|
370
376
|
updatedAt: now
|
|
377
|
+
},
|
|
378
|
+
anonymousPlayer: {
|
|
379
|
+
id: DEMO_USER_IDS.anonymousPlayer,
|
|
380
|
+
name: DEMO_DISPLAY_NAME_PLACEHOLDER,
|
|
381
|
+
username: "anonymous_demo_player",
|
|
382
|
+
email: "player@anon.demo.playcademy.gg",
|
|
383
|
+
emailVerified: false,
|
|
384
|
+
image: null,
|
|
385
|
+
isAnonymous: true,
|
|
386
|
+
role: "player",
|
|
387
|
+
developerStatus: "none",
|
|
388
|
+
createdAt: now,
|
|
389
|
+
updatedAt: now
|
|
371
390
|
}
|
|
372
391
|
};
|
|
373
392
|
DEMO_USER = DEMO_USERS.player;
|
|
@@ -381,6 +400,7 @@ var init_demo_tokens = __esm(() => {
|
|
|
381
400
|
"sandbox-demo-token": DEMO_USERS.player,
|
|
382
401
|
"sandbox-admin-token": DEMO_USERS.admin,
|
|
383
402
|
"sandbox-player-token": DEMO_USERS.player,
|
|
403
|
+
"sandbox-anonymous-token": DEMO_USERS.anonymousPlayer,
|
|
384
404
|
"sandbox-developer-token": DEMO_USERS.developer,
|
|
385
405
|
"sandbox-pending-dev-token": DEMO_USERS.pendingDeveloper,
|
|
386
406
|
"sandbox-unverified-token": DEMO_USERS.unverifiedPlayer,
|
|
@@ -389,6 +409,7 @@ var init_demo_tokens = __esm(() => {
|
|
|
389
409
|
};
|
|
390
410
|
SANDBOX_TOKENS = {
|
|
391
411
|
player: "sandbox-player-token",
|
|
412
|
+
anonymous: "sandbox-anonymous-token",
|
|
392
413
|
developer: "sandbox-developer-token",
|
|
393
414
|
admin: "sandbox-admin-token",
|
|
394
415
|
pendingDeveloper: "sandbox-pending-dev-token",
|
|
@@ -18,35 +18,35 @@ export declare function createSandboxAuthProvider(): AuthProvider;
|
|
|
18
18
|
*/
|
|
19
19
|
export declare function getDemoUser(role?: 'admin' | 'developer' | 'player'): {
|
|
20
20
|
readonly id: "00000000-0000-0000-0000-000000000003";
|
|
21
|
-
readonly name:
|
|
22
|
-
readonly username:
|
|
23
|
-
readonly email:
|
|
21
|
+
readonly name: 'Admin User';
|
|
22
|
+
readonly username: 'admin_user';
|
|
23
|
+
readonly email: 'admin@playcademy.com';
|
|
24
24
|
readonly emailVerified: true;
|
|
25
25
|
readonly image: null;
|
|
26
|
-
readonly role:
|
|
27
|
-
readonly developerStatus:
|
|
26
|
+
readonly role: 'admin';
|
|
27
|
+
readonly developerStatus: 'approved';
|
|
28
28
|
readonly createdAt: Date;
|
|
29
29
|
readonly updatedAt: Date;
|
|
30
30
|
} | {
|
|
31
31
|
readonly id: "00000000-0000-0000-0000-000000000001";
|
|
32
|
-
readonly name:
|
|
33
|
-
readonly username:
|
|
34
|
-
readonly email:
|
|
32
|
+
readonly name: 'Player User';
|
|
33
|
+
readonly username: 'player_user';
|
|
34
|
+
readonly email: 'player@playcademy.com';
|
|
35
35
|
readonly emailVerified: true;
|
|
36
36
|
readonly image: null;
|
|
37
|
-
readonly role:
|
|
38
|
-
readonly developerStatus:
|
|
37
|
+
readonly role: 'player';
|
|
38
|
+
readonly developerStatus: 'none';
|
|
39
39
|
readonly createdAt: Date;
|
|
40
40
|
readonly updatedAt: Date;
|
|
41
41
|
} | {
|
|
42
42
|
readonly id: "00000000-0000-0000-0000-000000000002";
|
|
43
|
-
readonly name:
|
|
44
|
-
readonly username:
|
|
45
|
-
readonly email:
|
|
43
|
+
readonly name: 'Developer User';
|
|
44
|
+
readonly username: 'developer_user';
|
|
45
|
+
readonly email: 'developer@playcademy.com';
|
|
46
46
|
readonly emailVerified: true;
|
|
47
47
|
readonly image: null;
|
|
48
|
-
readonly role:
|
|
49
|
-
readonly developerStatus:
|
|
48
|
+
readonly role: 'developer';
|
|
49
|
+
readonly developerStatus: 'approved';
|
|
50
50
|
readonly createdAt: Date;
|
|
51
51
|
readonly updatedAt: Date;
|
|
52
52
|
};
|
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
|
|
|
@@ -58,6 +61,7 @@ interface TimebackCourseConfig {
|
|
|
58
61
|
* Used for seeding and display
|
|
59
62
|
*/
|
|
60
63
|
interface ProjectInfo {
|
|
64
|
+
gameId?: string;
|
|
61
65
|
slug: string;
|
|
62
66
|
displayName: string;
|
|
63
67
|
version: string;
|
|
@@ -288,6 +292,9 @@ declare const version: string;
|
|
|
288
292
|
*/
|
|
289
293
|
declare function startServer(port: number, project?: ProjectInfo, options?: Omit<ServerOptions, 'port' | 'project'>): Promise<{
|
|
290
294
|
main: _hono_node_server.ServerType;
|
|
295
|
+
db: drizzle_orm_pglite.PgliteDatabase<typeof schema> & {
|
|
296
|
+
$client: _electric_sql_pglite.PGlite;
|
|
297
|
+
};
|
|
291
298
|
gameId: string | undefined;
|
|
292
299
|
timebackMode: "local" | "mock" | "remote" | null;
|
|
293
300
|
setRole: (role: TimebackUserRole) => void;
|