playcademy 0.22.1-beta.2 → 0.22.1-beta.3
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 +4 -140
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +2 -138
- package/dist/db.d.ts +1 -18
- package/dist/db.js +2 -138
- package/dist/index.d.ts +7 -279
- package/dist/index.js +100 -724
- package/dist/runtime/backend-runtime/index.js +11 -160
- package/dist/runtime/backend-runtime/manifest.json +4 -4
- package/dist/utils.d.ts +2 -208
- package/dist/utils.js +4 -140
- package/dist/version.js +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1065,7 +1065,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
|
|
|
1065
1065
|
// ../better-auth/package.json
|
|
1066
1066
|
var package_default = {
|
|
1067
1067
|
name: "@playcademy/better-auth",
|
|
1068
|
-
version: "0.0.14-beta.
|
|
1068
|
+
version: "0.0.14-beta.3",
|
|
1069
1069
|
type: "module",
|
|
1070
1070
|
exports: {
|
|
1071
1071
|
"./server": {
|
|
@@ -1097,7 +1097,7 @@ var package_default = {
|
|
|
1097
1097
|
devDependencies: {
|
|
1098
1098
|
"@inquirer/prompts": "^7.9.0",
|
|
1099
1099
|
"@playcademy/utils": "workspace:*",
|
|
1100
|
-
"@types/bun": "
|
|
1100
|
+
"@types/bun": "1.3.5",
|
|
1101
1101
|
typescript: "^5.7.2"
|
|
1102
1102
|
},
|
|
1103
1103
|
peerDependencies: {
|
|
@@ -1215,111 +1215,6 @@ var CONFIG_FILE_NAMES = [
|
|
|
1215
1215
|
"playcademy.config.mjs"
|
|
1216
1216
|
];
|
|
1217
1217
|
|
|
1218
|
-
// ../constants/src/achievements.ts
|
|
1219
|
-
var ACHIEVEMENT_IDS = {
|
|
1220
|
-
PLAY_ANY_GAME_DAILY: "play_any_game_daily",
|
|
1221
|
-
DAILY_CHEST_OPEN: "daily_chest_open",
|
|
1222
|
-
LEADERBOARD_TOP3_DAILY: "leaderboard_top3_daily",
|
|
1223
|
-
LEADERBOARD_TOP3_WEEKLY: "leaderboard_top3_weekly",
|
|
1224
|
-
FIRST_SCORE_ANY_GAME: "first_score_any_game",
|
|
1225
|
-
PERSONAL_BEST_ANY_GAME: "personal_best_any_game"
|
|
1226
|
-
};
|
|
1227
|
-
var ACHIEVEMENT_DEFINITIONS = [
|
|
1228
|
-
{
|
|
1229
|
-
id: ACHIEVEMENT_IDS.PLAY_ANY_GAME_DAILY,
|
|
1230
|
-
title: "Play any game",
|
|
1231
|
-
description: "Play any arcade game for at least 60 seconds in a single session.",
|
|
1232
|
-
scope: "daily",
|
|
1233
|
-
rewardCredits: 10,
|
|
1234
|
-
limit: 1,
|
|
1235
|
-
completionType: "time_played_session",
|
|
1236
|
-
completionConfig: { minSeconds: 60 },
|
|
1237
|
-
target: { anyArcadeGame: true },
|
|
1238
|
-
active: true
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
id: ACHIEVEMENT_IDS.DAILY_CHEST_OPEN,
|
|
1242
|
-
title: "Opened the daily chest",
|
|
1243
|
-
description: "Find the chest on the map and open it to claim your reward.",
|
|
1244
|
-
scope: "daily",
|
|
1245
|
-
rewardCredits: 10,
|
|
1246
|
-
limit: 1,
|
|
1247
|
-
completionType: "interaction",
|
|
1248
|
-
completionConfig: { triggerId: "bunny_chest" },
|
|
1249
|
-
target: { map: "arcade" },
|
|
1250
|
-
active: true
|
|
1251
|
-
},
|
|
1252
|
-
{
|
|
1253
|
-
id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_DAILY,
|
|
1254
|
-
title: "Daily Champion",
|
|
1255
|
-
description: "Finish in the top 3 of any game leaderboard for the day.",
|
|
1256
|
-
scope: "daily",
|
|
1257
|
-
rewardCredits: 25,
|
|
1258
|
-
// Base reward, overridden by rankRewards
|
|
1259
|
-
limit: 1,
|
|
1260
|
-
completionType: "leaderboard_rank",
|
|
1261
|
-
completionConfig: {
|
|
1262
|
-
rankRewards: [50, 30, 15]
|
|
1263
|
-
// [1st place, 2nd place, 3rd place]
|
|
1264
|
-
},
|
|
1265
|
-
target: { anyArcadeGame: true },
|
|
1266
|
-
active: true
|
|
1267
|
-
},
|
|
1268
|
-
{
|
|
1269
|
-
id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_WEEKLY,
|
|
1270
|
-
title: "Weekly Legend",
|
|
1271
|
-
description: "Finish in the top 3 of any game leaderboard for the week.",
|
|
1272
|
-
scope: "weekly",
|
|
1273
|
-
rewardCredits: 50,
|
|
1274
|
-
// Base reward, overridden by rankRewards
|
|
1275
|
-
limit: 1,
|
|
1276
|
-
completionType: "leaderboard_rank",
|
|
1277
|
-
completionConfig: {
|
|
1278
|
-
rankRewards: [100, 60, 30]
|
|
1279
|
-
// [1st place, 2nd place, 3rd place]
|
|
1280
|
-
},
|
|
1281
|
-
target: { anyArcadeGame: true },
|
|
1282
|
-
active: true
|
|
1283
|
-
},
|
|
1284
|
-
{
|
|
1285
|
-
id: ACHIEVEMENT_IDS.FIRST_SCORE_ANY_GAME,
|
|
1286
|
-
title: "First Score",
|
|
1287
|
-
description: "Submit your first score in any arcade game.",
|
|
1288
|
-
scope: "game",
|
|
1289
|
-
// Scoped per game, no time limit
|
|
1290
|
-
rewardCredits: 5,
|
|
1291
|
-
limit: 1,
|
|
1292
|
-
completionType: "first_score",
|
|
1293
|
-
completionConfig: {},
|
|
1294
|
-
target: { anyArcadeGame: true },
|
|
1295
|
-
active: true
|
|
1296
|
-
},
|
|
1297
|
-
{
|
|
1298
|
-
id: ACHIEVEMENT_IDS.PERSONAL_BEST_ANY_GAME,
|
|
1299
|
-
title: "Personal Best",
|
|
1300
|
-
description: "Beat your personal best score in any arcade game.",
|
|
1301
|
-
scope: "daily",
|
|
1302
|
-
rewardCredits: 5,
|
|
1303
|
-
limit: 3,
|
|
1304
|
-
// Can earn 3 times per day
|
|
1305
|
-
completionType: "personal_best",
|
|
1306
|
-
completionConfig: {},
|
|
1307
|
-
target: { anyArcadeGame: true },
|
|
1308
|
-
active: true
|
|
1309
|
-
}
|
|
1310
|
-
];
|
|
1311
|
-
|
|
1312
|
-
// ../constants/src/typescript.ts
|
|
1313
|
-
var TypeScriptPackages = {
|
|
1314
|
-
tsc: "tsc",
|
|
1315
|
-
nativePreview: "@typescript/native-preview",
|
|
1316
|
-
nativePreviewBeta: "@typescript/native-preview@beta"
|
|
1317
|
-
};
|
|
1318
|
-
var TYPESCRIPT_RUNNER = {
|
|
1319
|
-
package: TypeScriptPackages.nativePreviewBeta,
|
|
1320
|
-
bin: "tsgo"
|
|
1321
|
-
};
|
|
1322
|
-
|
|
1323
1218
|
// ../constants/src/domains.ts
|
|
1324
1219
|
var PLAYCADEMY_BASE_URLS = {
|
|
1325
1220
|
production: "https://hub.playcademy.net",
|
|
@@ -1327,37 +1222,6 @@ var PLAYCADEMY_BASE_URLS = {
|
|
|
1327
1222
|
local: "http://localhost:5174"
|
|
1328
1223
|
};
|
|
1329
1224
|
|
|
1330
|
-
// ../constants/src/overworld.ts
|
|
1331
|
-
var ITEM_SLUGS = {
|
|
1332
|
-
/** Primary platform currency */
|
|
1333
|
-
PLAYCADEMY_CREDITS: "PLAYCADEMY_CREDITS",
|
|
1334
|
-
/** Experience points currency */
|
|
1335
|
-
PLAYCADEMY_XP: "PLAYCADEMY_XP",
|
|
1336
|
-
/** Core platform badges */
|
|
1337
|
-
FOUNDING_MEMBER_BADGE: "FOUNDING_MEMBER_BADGE",
|
|
1338
|
-
EARLY_ADOPTER_BADGE: "EARLY_ADOPTER_BADGE",
|
|
1339
|
-
FIRST_GAME_BADGE: "FIRST_GAME_BADGE",
|
|
1340
|
-
/** Example items */
|
|
1341
|
-
COMMON_SWORD: "COMMON_SWORD",
|
|
1342
|
-
SMALL_HEALTH_POTION: "SMALL_HEALTH_POTION",
|
|
1343
|
-
SMALL_BACKPACK: "SMALL_BACKPACK",
|
|
1344
|
-
/** Placeable items */
|
|
1345
|
-
LAVA_LAMP: "LAVA_LAMP",
|
|
1346
|
-
BOOMBOX: "BOOMBOX",
|
|
1347
|
-
CABIN_BED: "CABIN_BED"
|
|
1348
|
-
};
|
|
1349
|
-
var CURRENCIES = {
|
|
1350
|
-
/** Primary platform currency slug */
|
|
1351
|
-
PRIMARY: ITEM_SLUGS.PLAYCADEMY_CREDITS,
|
|
1352
|
-
/** Experience points slug */
|
|
1353
|
-
XP: ITEM_SLUGS.PLAYCADEMY_XP
|
|
1354
|
-
};
|
|
1355
|
-
var BADGES = {
|
|
1356
|
-
FOUNDING_MEMBER: ITEM_SLUGS.FOUNDING_MEMBER_BADGE,
|
|
1357
|
-
EARLY_ADOPTER: ITEM_SLUGS.EARLY_ADOPTER_BADGE,
|
|
1358
|
-
FIRST_GAME: ITEM_SLUGS.FIRST_GAME_BADGE
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
1225
|
// ../constants/src/timeback.ts
|
|
1362
1226
|
var TIMEBACK_ORG_SOURCED_ID = "PLAYCADEMY";
|
|
1363
1227
|
var TIMEBACK_ORG_NAME = "Playcademy Studios";
|
|
@@ -1399,7 +1263,7 @@ var TIMEBACK_COMPONENT_RESOURCE_DEFAULTS = {
|
|
|
1399
1263
|
lessonType: "quiz"
|
|
1400
1264
|
};
|
|
1401
1265
|
|
|
1402
|
-
// ../constants/src/
|
|
1266
|
+
// ../constants/src/cloudflare.ts
|
|
1403
1267
|
var WORKER_NAMING = {
|
|
1404
1268
|
/** Prefix for staging worker names (e.g., "staging-bamboo") */
|
|
1405
1269
|
STAGING_PREFIX: "staging-",
|
|
@@ -3045,7 +2909,7 @@ import { existsSync as existsSync11, mkdirSync as mkdirSync5, readFileSync as re
|
|
|
3045
2909
|
import { join as join13 } from "node:path";
|
|
3046
2910
|
|
|
3047
2911
|
// src/version.ts
|
|
3048
|
-
var cliVersion = false ? "0.0.0-dev" : "0.22.1-beta.
|
|
2912
|
+
var cliVersion = false ? "0.0.0-dev" : "0.22.1-beta.3";
|
|
3049
2913
|
|
|
3050
2914
|
// src/lib/init/database.ts
|
|
3051
2915
|
var drizzleConfigTemplate = loadTemplateString("database/drizzle-config.ts");
|
package/dist/constants.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare const SAMPLE_BUCKET_FILENAME = "bucket.ts";
|
|
|
30
30
|
*/
|
|
31
31
|
declare const BETTER_AUTH_VERSION: string;
|
|
32
32
|
/**
|
|
33
|
-
* @playcademy/auth version to install in user projects
|
|
33
|
+
* @playcademy/better-auth version to install in user projects
|
|
34
34
|
*/
|
|
35
35
|
declare const PLAYCADEMY_AUTH_VERSION = "latest";
|
|
36
36
|
/**
|
package/dist/constants.js
CHANGED
|
@@ -20,7 +20,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
|
|
|
20
20
|
// ../better-auth/package.json
|
|
21
21
|
var package_default = {
|
|
22
22
|
name: "@playcademy/better-auth",
|
|
23
|
-
version: "0.0.14-beta.
|
|
23
|
+
version: "0.0.14-beta.3",
|
|
24
24
|
type: "module",
|
|
25
25
|
exports: {
|
|
26
26
|
"./server": {
|
|
@@ -52,7 +52,7 @@ var package_default = {
|
|
|
52
52
|
devDependencies: {
|
|
53
53
|
"@inquirer/prompts": "^7.9.0",
|
|
54
54
|
"@playcademy/utils": "workspace:*",
|
|
55
|
-
"@types/bun": "
|
|
55
|
+
"@types/bun": "1.3.5",
|
|
56
56
|
typescript: "^5.7.2"
|
|
57
57
|
},
|
|
58
58
|
peerDependencies: {
|
|
@@ -228,111 +228,6 @@ var CONFIG_FILE_NAMES = [
|
|
|
228
228
|
"playcademy.config.mjs"
|
|
229
229
|
];
|
|
230
230
|
|
|
231
|
-
// ../constants/src/achievements.ts
|
|
232
|
-
var ACHIEVEMENT_IDS = {
|
|
233
|
-
PLAY_ANY_GAME_DAILY: "play_any_game_daily",
|
|
234
|
-
DAILY_CHEST_OPEN: "daily_chest_open",
|
|
235
|
-
LEADERBOARD_TOP3_DAILY: "leaderboard_top3_daily",
|
|
236
|
-
LEADERBOARD_TOP3_WEEKLY: "leaderboard_top3_weekly",
|
|
237
|
-
FIRST_SCORE_ANY_GAME: "first_score_any_game",
|
|
238
|
-
PERSONAL_BEST_ANY_GAME: "personal_best_any_game"
|
|
239
|
-
};
|
|
240
|
-
var ACHIEVEMENT_DEFINITIONS = [
|
|
241
|
-
{
|
|
242
|
-
id: ACHIEVEMENT_IDS.PLAY_ANY_GAME_DAILY,
|
|
243
|
-
title: "Play any game",
|
|
244
|
-
description: "Play any arcade game for at least 60 seconds in a single session.",
|
|
245
|
-
scope: "daily",
|
|
246
|
-
rewardCredits: 10,
|
|
247
|
-
limit: 1,
|
|
248
|
-
completionType: "time_played_session",
|
|
249
|
-
completionConfig: { minSeconds: 60 },
|
|
250
|
-
target: { anyArcadeGame: true },
|
|
251
|
-
active: true
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
id: ACHIEVEMENT_IDS.DAILY_CHEST_OPEN,
|
|
255
|
-
title: "Opened the daily chest",
|
|
256
|
-
description: "Find the chest on the map and open it to claim your reward.",
|
|
257
|
-
scope: "daily",
|
|
258
|
-
rewardCredits: 10,
|
|
259
|
-
limit: 1,
|
|
260
|
-
completionType: "interaction",
|
|
261
|
-
completionConfig: { triggerId: "bunny_chest" },
|
|
262
|
-
target: { map: "arcade" },
|
|
263
|
-
active: true
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_DAILY,
|
|
267
|
-
title: "Daily Champion",
|
|
268
|
-
description: "Finish in the top 3 of any game leaderboard for the day.",
|
|
269
|
-
scope: "daily",
|
|
270
|
-
rewardCredits: 25,
|
|
271
|
-
// Base reward, overridden by rankRewards
|
|
272
|
-
limit: 1,
|
|
273
|
-
completionType: "leaderboard_rank",
|
|
274
|
-
completionConfig: {
|
|
275
|
-
rankRewards: [50, 30, 15]
|
|
276
|
-
// [1st place, 2nd place, 3rd place]
|
|
277
|
-
},
|
|
278
|
-
target: { anyArcadeGame: true },
|
|
279
|
-
active: true
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_WEEKLY,
|
|
283
|
-
title: "Weekly Legend",
|
|
284
|
-
description: "Finish in the top 3 of any game leaderboard for the week.",
|
|
285
|
-
scope: "weekly",
|
|
286
|
-
rewardCredits: 50,
|
|
287
|
-
// Base reward, overridden by rankRewards
|
|
288
|
-
limit: 1,
|
|
289
|
-
completionType: "leaderboard_rank",
|
|
290
|
-
completionConfig: {
|
|
291
|
-
rankRewards: [100, 60, 30]
|
|
292
|
-
// [1st place, 2nd place, 3rd place]
|
|
293
|
-
},
|
|
294
|
-
target: { anyArcadeGame: true },
|
|
295
|
-
active: true
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
id: ACHIEVEMENT_IDS.FIRST_SCORE_ANY_GAME,
|
|
299
|
-
title: "First Score",
|
|
300
|
-
description: "Submit your first score in any arcade game.",
|
|
301
|
-
scope: "game",
|
|
302
|
-
// Scoped per game, no time limit
|
|
303
|
-
rewardCredits: 5,
|
|
304
|
-
limit: 1,
|
|
305
|
-
completionType: "first_score",
|
|
306
|
-
completionConfig: {},
|
|
307
|
-
target: { anyArcadeGame: true },
|
|
308
|
-
active: true
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
id: ACHIEVEMENT_IDS.PERSONAL_BEST_ANY_GAME,
|
|
312
|
-
title: "Personal Best",
|
|
313
|
-
description: "Beat your personal best score in any arcade game.",
|
|
314
|
-
scope: "daily",
|
|
315
|
-
rewardCredits: 5,
|
|
316
|
-
limit: 3,
|
|
317
|
-
// Can earn 3 times per day
|
|
318
|
-
completionType: "personal_best",
|
|
319
|
-
completionConfig: {},
|
|
320
|
-
target: { anyArcadeGame: true },
|
|
321
|
-
active: true
|
|
322
|
-
}
|
|
323
|
-
];
|
|
324
|
-
|
|
325
|
-
// ../constants/src/typescript.ts
|
|
326
|
-
var TypeScriptPackages = {
|
|
327
|
-
tsc: "tsc",
|
|
328
|
-
nativePreview: "@typescript/native-preview",
|
|
329
|
-
nativePreviewBeta: "@typescript/native-preview@beta"
|
|
330
|
-
};
|
|
331
|
-
var TYPESCRIPT_RUNNER = {
|
|
332
|
-
package: TypeScriptPackages.nativePreviewBeta,
|
|
333
|
-
bin: "tsgo"
|
|
334
|
-
};
|
|
335
|
-
|
|
336
231
|
// ../constants/src/domains.ts
|
|
337
232
|
var PLAYCADEMY_DOMAINS = {
|
|
338
233
|
/** Primary domain (hub, landing pages) */
|
|
@@ -352,37 +247,6 @@ var GAME_WORKER_DOMAINS = {
|
|
|
352
247
|
staging: "staging.playcademy.gg"
|
|
353
248
|
};
|
|
354
249
|
|
|
355
|
-
// ../constants/src/overworld.ts
|
|
356
|
-
var ITEM_SLUGS = {
|
|
357
|
-
/** Primary platform currency */
|
|
358
|
-
PLAYCADEMY_CREDITS: "PLAYCADEMY_CREDITS",
|
|
359
|
-
/** Experience points currency */
|
|
360
|
-
PLAYCADEMY_XP: "PLAYCADEMY_XP",
|
|
361
|
-
/** Core platform badges */
|
|
362
|
-
FOUNDING_MEMBER_BADGE: "FOUNDING_MEMBER_BADGE",
|
|
363
|
-
EARLY_ADOPTER_BADGE: "EARLY_ADOPTER_BADGE",
|
|
364
|
-
FIRST_GAME_BADGE: "FIRST_GAME_BADGE",
|
|
365
|
-
/** Example items */
|
|
366
|
-
COMMON_SWORD: "COMMON_SWORD",
|
|
367
|
-
SMALL_HEALTH_POTION: "SMALL_HEALTH_POTION",
|
|
368
|
-
SMALL_BACKPACK: "SMALL_BACKPACK",
|
|
369
|
-
/** Placeable items */
|
|
370
|
-
LAVA_LAMP: "LAVA_LAMP",
|
|
371
|
-
BOOMBOX: "BOOMBOX",
|
|
372
|
-
CABIN_BED: "CABIN_BED"
|
|
373
|
-
};
|
|
374
|
-
var CURRENCIES = {
|
|
375
|
-
/** Primary platform currency slug */
|
|
376
|
-
PRIMARY: ITEM_SLUGS.PLAYCADEMY_CREDITS,
|
|
377
|
-
/** Experience points slug */
|
|
378
|
-
XP: ITEM_SLUGS.PLAYCADEMY_XP
|
|
379
|
-
};
|
|
380
|
-
var BADGES = {
|
|
381
|
-
FOUNDING_MEMBER: ITEM_SLUGS.FOUNDING_MEMBER_BADGE,
|
|
382
|
-
EARLY_ADOPTER: ITEM_SLUGS.EARLY_ADOPTER_BADGE,
|
|
383
|
-
FIRST_GAME: ITEM_SLUGS.FIRST_GAME_BADGE
|
|
384
|
-
};
|
|
385
|
-
|
|
386
250
|
// src/constants/urls.ts
|
|
387
251
|
var DOCS_URL = "https://docs.dev.playcademy.net/platform";
|
|
388
252
|
export {
|
package/dist/db.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Miniflare } from 'miniflare';
|
|
2
|
+
import { SeedLogEntry } from '@playcademy/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Development Database Path Helper
|
|
@@ -134,24 +135,6 @@ declare function getBucket(mf: Miniflare): Promise<unknown | null>;
|
|
|
134
135
|
*/
|
|
135
136
|
declare function executeSeedFile(seedFilePath: string, mf: Miniflare, envSecrets?: Record<string, string>): Promise<void>;
|
|
136
137
|
|
|
137
|
-
/**
|
|
138
|
-
* Game Types
|
|
139
|
-
*
|
|
140
|
-
* Literal types and API DTOs. Database row types are in @playcademy/data/types.
|
|
141
|
-
*
|
|
142
|
-
* @module types/game
|
|
143
|
-
*/
|
|
144
|
-
|
|
145
|
-
/** Log entry captured from seed worker console output */
|
|
146
|
-
interface SeedLogEntry {
|
|
147
|
-
/** Log level (log, warn, error, info) */
|
|
148
|
-
level: 'log' | 'warn' | 'error' | 'info';
|
|
149
|
-
/** Log message content */
|
|
150
|
-
message: string;
|
|
151
|
-
/** Milliseconds since seed execution started */
|
|
152
|
-
timestamp: number;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
138
|
/**
|
|
156
139
|
* Seed Output Utilities
|
|
157
140
|
*
|
package/dist/db.js
CHANGED
|
@@ -36,7 +36,7 @@ var DEFAULT_API_ROUTES_DIRECTORY = join2(SERVER_ROOT_DIRECTORY, "api");
|
|
|
36
36
|
// ../better-auth/package.json
|
|
37
37
|
var package_default = {
|
|
38
38
|
name: "@playcademy/better-auth",
|
|
39
|
-
version: "0.0.14-beta.
|
|
39
|
+
version: "0.0.14-beta.3",
|
|
40
40
|
type: "module",
|
|
41
41
|
exports: {
|
|
42
42
|
"./server": {
|
|
@@ -68,7 +68,7 @@ var package_default = {
|
|
|
68
68
|
devDependencies: {
|
|
69
69
|
"@inquirer/prompts": "^7.9.0",
|
|
70
70
|
"@playcademy/utils": "workspace:*",
|
|
71
|
-
"@types/bun": "
|
|
71
|
+
"@types/bun": "1.3.5",
|
|
72
72
|
typescript: "^5.7.2"
|
|
73
73
|
},
|
|
74
74
|
peerDependencies: {
|
|
@@ -147,142 +147,6 @@ var CLI_FILES = {
|
|
|
147
147
|
INITIAL_DATABASE: "initial.sqlite"
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
// ../constants/src/achievements.ts
|
|
151
|
-
var ACHIEVEMENT_IDS = {
|
|
152
|
-
PLAY_ANY_GAME_DAILY: "play_any_game_daily",
|
|
153
|
-
DAILY_CHEST_OPEN: "daily_chest_open",
|
|
154
|
-
LEADERBOARD_TOP3_DAILY: "leaderboard_top3_daily",
|
|
155
|
-
LEADERBOARD_TOP3_WEEKLY: "leaderboard_top3_weekly",
|
|
156
|
-
FIRST_SCORE_ANY_GAME: "first_score_any_game",
|
|
157
|
-
PERSONAL_BEST_ANY_GAME: "personal_best_any_game"
|
|
158
|
-
};
|
|
159
|
-
var ACHIEVEMENT_DEFINITIONS = [
|
|
160
|
-
{
|
|
161
|
-
id: ACHIEVEMENT_IDS.PLAY_ANY_GAME_DAILY,
|
|
162
|
-
title: "Play any game",
|
|
163
|
-
description: "Play any arcade game for at least 60 seconds in a single session.",
|
|
164
|
-
scope: "daily",
|
|
165
|
-
rewardCredits: 10,
|
|
166
|
-
limit: 1,
|
|
167
|
-
completionType: "time_played_session",
|
|
168
|
-
completionConfig: { minSeconds: 60 },
|
|
169
|
-
target: { anyArcadeGame: true },
|
|
170
|
-
active: true
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
id: ACHIEVEMENT_IDS.DAILY_CHEST_OPEN,
|
|
174
|
-
title: "Opened the daily chest",
|
|
175
|
-
description: "Find the chest on the map and open it to claim your reward.",
|
|
176
|
-
scope: "daily",
|
|
177
|
-
rewardCredits: 10,
|
|
178
|
-
limit: 1,
|
|
179
|
-
completionType: "interaction",
|
|
180
|
-
completionConfig: { triggerId: "bunny_chest" },
|
|
181
|
-
target: { map: "arcade" },
|
|
182
|
-
active: true
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_DAILY,
|
|
186
|
-
title: "Daily Champion",
|
|
187
|
-
description: "Finish in the top 3 of any game leaderboard for the day.",
|
|
188
|
-
scope: "daily",
|
|
189
|
-
rewardCredits: 25,
|
|
190
|
-
// Base reward, overridden by rankRewards
|
|
191
|
-
limit: 1,
|
|
192
|
-
completionType: "leaderboard_rank",
|
|
193
|
-
completionConfig: {
|
|
194
|
-
rankRewards: [50, 30, 15]
|
|
195
|
-
// [1st place, 2nd place, 3rd place]
|
|
196
|
-
},
|
|
197
|
-
target: { anyArcadeGame: true },
|
|
198
|
-
active: true
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
id: ACHIEVEMENT_IDS.LEADERBOARD_TOP3_WEEKLY,
|
|
202
|
-
title: "Weekly Legend",
|
|
203
|
-
description: "Finish in the top 3 of any game leaderboard for the week.",
|
|
204
|
-
scope: "weekly",
|
|
205
|
-
rewardCredits: 50,
|
|
206
|
-
// Base reward, overridden by rankRewards
|
|
207
|
-
limit: 1,
|
|
208
|
-
completionType: "leaderboard_rank",
|
|
209
|
-
completionConfig: {
|
|
210
|
-
rankRewards: [100, 60, 30]
|
|
211
|
-
// [1st place, 2nd place, 3rd place]
|
|
212
|
-
},
|
|
213
|
-
target: { anyArcadeGame: true },
|
|
214
|
-
active: true
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
id: ACHIEVEMENT_IDS.FIRST_SCORE_ANY_GAME,
|
|
218
|
-
title: "First Score",
|
|
219
|
-
description: "Submit your first score in any arcade game.",
|
|
220
|
-
scope: "game",
|
|
221
|
-
// Scoped per game, no time limit
|
|
222
|
-
rewardCredits: 5,
|
|
223
|
-
limit: 1,
|
|
224
|
-
completionType: "first_score",
|
|
225
|
-
completionConfig: {},
|
|
226
|
-
target: { anyArcadeGame: true },
|
|
227
|
-
active: true
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
id: ACHIEVEMENT_IDS.PERSONAL_BEST_ANY_GAME,
|
|
231
|
-
title: "Personal Best",
|
|
232
|
-
description: "Beat your personal best score in any arcade game.",
|
|
233
|
-
scope: "daily",
|
|
234
|
-
rewardCredits: 5,
|
|
235
|
-
limit: 3,
|
|
236
|
-
// Can earn 3 times per day
|
|
237
|
-
completionType: "personal_best",
|
|
238
|
-
completionConfig: {},
|
|
239
|
-
target: { anyArcadeGame: true },
|
|
240
|
-
active: true
|
|
241
|
-
}
|
|
242
|
-
];
|
|
243
|
-
|
|
244
|
-
// ../constants/src/typescript.ts
|
|
245
|
-
var TypeScriptPackages = {
|
|
246
|
-
tsc: "tsc",
|
|
247
|
-
nativePreview: "@typescript/native-preview",
|
|
248
|
-
nativePreviewBeta: "@typescript/native-preview@beta"
|
|
249
|
-
};
|
|
250
|
-
var TYPESCRIPT_RUNNER = {
|
|
251
|
-
package: TypeScriptPackages.nativePreviewBeta,
|
|
252
|
-
bin: "tsgo"
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
// ../constants/src/overworld.ts
|
|
256
|
-
var ITEM_SLUGS = {
|
|
257
|
-
/** Primary platform currency */
|
|
258
|
-
PLAYCADEMY_CREDITS: "PLAYCADEMY_CREDITS",
|
|
259
|
-
/** Experience points currency */
|
|
260
|
-
PLAYCADEMY_XP: "PLAYCADEMY_XP",
|
|
261
|
-
/** Core platform badges */
|
|
262
|
-
FOUNDING_MEMBER_BADGE: "FOUNDING_MEMBER_BADGE",
|
|
263
|
-
EARLY_ADOPTER_BADGE: "EARLY_ADOPTER_BADGE",
|
|
264
|
-
FIRST_GAME_BADGE: "FIRST_GAME_BADGE",
|
|
265
|
-
/** Example items */
|
|
266
|
-
COMMON_SWORD: "COMMON_SWORD",
|
|
267
|
-
SMALL_HEALTH_POTION: "SMALL_HEALTH_POTION",
|
|
268
|
-
SMALL_BACKPACK: "SMALL_BACKPACK",
|
|
269
|
-
/** Placeable items */
|
|
270
|
-
LAVA_LAMP: "LAVA_LAMP",
|
|
271
|
-
BOOMBOX: "BOOMBOX",
|
|
272
|
-
CABIN_BED: "CABIN_BED"
|
|
273
|
-
};
|
|
274
|
-
var CURRENCIES = {
|
|
275
|
-
/** Primary platform currency slug */
|
|
276
|
-
PRIMARY: ITEM_SLUGS.PLAYCADEMY_CREDITS,
|
|
277
|
-
/** Experience points slug */
|
|
278
|
-
XP: ITEM_SLUGS.PLAYCADEMY_XP
|
|
279
|
-
};
|
|
280
|
-
var BADGES = {
|
|
281
|
-
FOUNDING_MEMBER: ITEM_SLUGS.FOUNDING_MEMBER_BADGE,
|
|
282
|
-
EARLY_ADOPTER: ITEM_SLUGS.EARLY_ADOPTER_BADGE,
|
|
283
|
-
FIRST_GAME: ITEM_SLUGS.FIRST_GAME_BADGE
|
|
284
|
-
};
|
|
285
|
-
|
|
286
150
|
// src/lib/db/path.ts
|
|
287
151
|
var DB_DIRECTORY = CLI_DIRECTORIES.DATABASE;
|
|
288
152
|
var INITIAL_DB_NAME = CLI_FILES.INITIAL_DATABASE;
|