@playcademy/sandbox 0.5.1-beta.2 → 0.5.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 CHANGED
@@ -1078,7 +1078,7 @@ var package_default;
1078
1078
  var init_package = __esm(() => {
1079
1079
  package_default = {
1080
1080
  name: "@playcademy/sandbox",
1081
- version: "0.5.1-beta.2",
1081
+ version: "0.5.1-beta.3",
1082
1082
  description: "Local development server for Playcademy game development",
1083
1083
  type: "module",
1084
1084
  exports: {
@@ -98297,7 +98297,12 @@ var init_timeback7 = __esm(() => {
98297
98297
  const includePerCourse = includeOptions.includes("percourse");
98298
98298
  const includeToday = includeOptions.includes("today");
98299
98299
  const db2 = c2.get("db");
98300
+ const contextGameId = c2.get("gameId");
98301
+ const gameId = url2.searchParams.get("gameId") || (typeof contextGameId === "string" ? contextGameId : undefined);
98300
98302
  let enrollments = await getMockEnrollments(db2);
98303
+ if (gameId) {
98304
+ enrollments = filterEnrollmentsByGame(enrollments, gameId);
98305
+ }
98301
98306
  if (gradeParam !== null !== (subjectParam !== null)) {
98302
98307
  const error2 = ApiError.badRequest("Both grade and subject must be provided together");
98303
98308
  return c2.json(createErrorResponse(error2), error2.status);
@@ -98350,7 +98355,12 @@ var init_timeback7 = __esm(() => {
98350
98355
  const includeOptions = includeParam.split(",").map((opt) => opt.trim().toLowerCase());
98351
98356
  const includePerCourse = includeOptions.includes("percourse");
98352
98357
  const db2 = c2.get("db");
98358
+ const contextGameId = c2.get("gameId");
98359
+ const gameId = url2.searchParams.get("gameId") || (typeof contextGameId === "string" ? contextGameId : undefined);
98353
98360
  let enrollments = await getMockEnrollments(db2);
98361
+ if (gameId) {
98362
+ enrollments = filterEnrollmentsByGame(enrollments, gameId);
98363
+ }
98354
98364
  if (gradeParam !== null !== (subjectParam !== null)) {
98355
98365
  const error2 = ApiError.badRequest("Both grade and subject must be provided together");
98356
98366
  return c2.json(createErrorResponse(error2), error2.status);
package/dist/server.js CHANGED
@@ -1077,7 +1077,7 @@ var package_default;
1077
1077
  var init_package = __esm(() => {
1078
1078
  package_default = {
1079
1079
  name: "@playcademy/sandbox",
1080
- version: "0.5.1-beta.2",
1080
+ version: "0.5.1-beta.3",
1081
1081
  description: "Local development server for Playcademy game development",
1082
1082
  type: "module",
1083
1083
  exports: {
@@ -98296,7 +98296,12 @@ var init_timeback7 = __esm(() => {
98296
98296
  const includePerCourse = includeOptions.includes("percourse");
98297
98297
  const includeToday = includeOptions.includes("today");
98298
98298
  const db2 = c2.get("db");
98299
+ const contextGameId = c2.get("gameId");
98300
+ const gameId = url2.searchParams.get("gameId") || (typeof contextGameId === "string" ? contextGameId : undefined);
98299
98301
  let enrollments = await getMockEnrollments(db2);
98302
+ if (gameId) {
98303
+ enrollments = filterEnrollmentsByGame(enrollments, gameId);
98304
+ }
98300
98305
  if (gradeParam !== null !== (subjectParam !== null)) {
98301
98306
  const error2 = ApiError.badRequest("Both grade and subject must be provided together");
98302
98307
  return c2.json(createErrorResponse(error2), error2.status);
@@ -98349,7 +98354,12 @@ var init_timeback7 = __esm(() => {
98349
98354
  const includeOptions = includeParam.split(",").map((opt) => opt.trim().toLowerCase());
98350
98355
  const includePerCourse = includeOptions.includes("percourse");
98351
98356
  const db2 = c2.get("db");
98357
+ const contextGameId = c2.get("gameId");
98358
+ const gameId = url2.searchParams.get("gameId") || (typeof contextGameId === "string" ? contextGameId : undefined);
98352
98359
  let enrollments = await getMockEnrollments(db2);
98360
+ if (gameId) {
98361
+ enrollments = filterEnrollmentsByGame(enrollments, gameId);
98362
+ }
98353
98363
  if (gradeParam !== null !== (subjectParam !== null)) {
98354
98364
  const error2 = ApiError.badRequest("Both grade and subject must be provided together");
98355
98365
  return c2.json(createErrorResponse(error2), error2.status);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/sandbox",
3
- "version": "0.5.1-beta.2",
3
+ "version": "0.5.1-beta.3",
4
4
  "description": "Local development server for Playcademy game development",
5
5
  "type": "module",
6
6
  "exports": {