@playcademy/sandbox 0.1.0-beta.5 → 0.1.0-beta.7
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 +26 -25
- package/dist/server.js +26 -25
- package/package.json +9 -8
package/dist/cli.js
CHANGED
|
@@ -1707,8 +1707,8 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
1707
1707
|
if (isFirstPacket) {
|
|
1708
1708
|
isFirstPacket = false;
|
|
1709
1709
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
1710
|
-
if (binaryVersion !== "0.25.
|
|
1711
|
-
throw new Error(`Cannot start service: Host version "${"0.25.
|
|
1710
|
+
if (binaryVersion !== "0.25.5") {
|
|
1711
|
+
throw new Error(`Cannot start service: Host version "${"0.25.5"}" does not match binary version ${quote(binaryVersion)}`);
|
|
1712
1712
|
}
|
|
1713
1713
|
return;
|
|
1714
1714
|
}
|
|
@@ -2896,7 +2896,7 @@ for your current platform.`);
|
|
|
2896
2896
|
} catch (e) {}
|
|
2897
2897
|
if (pnpapi) {
|
|
2898
2898
|
const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
|
|
2899
|
-
const binTargetPath = path.join(root, "node_modules", ".cache", "esbuild", `pnpapi-${pkg.replace("/", "-")}-${"0.25.
|
|
2899
|
+
const binTargetPath = path.join(root, "node_modules", ".cache", "esbuild", `pnpapi-${pkg.replace("/", "-")}-${"0.25.5"}-${path.basename(subpath)}`);
|
|
2900
2900
|
if (!fs3.existsSync(binTargetPath)) {
|
|
2901
2901
|
fs3.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
2902
2902
|
fs3.copyFileSync(binPath, binTargetPath);
|
|
@@ -2924,7 +2924,7 @@ for your current platform.`);
|
|
|
2924
2924
|
}
|
|
2925
2925
|
}
|
|
2926
2926
|
var _a;
|
|
2927
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? undefined : worker_threads.workerData) == null ? undefined : _a.esbuildVersion) === "0.25.
|
|
2927
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? undefined : worker_threads.workerData) == null ? undefined : _a.esbuildVersion) === "0.25.5";
|
|
2928
2928
|
var esbuildCommandAndArgs = () => {
|
|
2929
2929
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
2930
2930
|
throw new Error(`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
|
|
@@ -2986,7 +2986,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
2986
2986
|
}
|
|
2987
2987
|
}
|
|
2988
2988
|
};
|
|
2989
|
-
var version2 = "0.25.
|
|
2989
|
+
var version2 = "0.25.5";
|
|
2990
2990
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
2991
2991
|
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
2992
2992
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -3104,7 +3104,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
3104
3104
|
if (longLivedService)
|
|
3105
3105
|
return longLivedService;
|
|
3106
3106
|
let [command, args2] = esbuildCommandAndArgs();
|
|
3107
|
-
let child = child_process.spawn(command, args2.concat(`--service=${"0.25.
|
|
3107
|
+
let child = child_process.spawn(command, args2.concat(`--service=${"0.25.5"}`, "--ping"), {
|
|
3108
3108
|
windowsHide: true,
|
|
3109
3109
|
stdio: ["pipe", "pipe", "inherit"],
|
|
3110
3110
|
cwd: defaultWD
|
|
@@ -3212,7 +3212,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
3212
3212
|
esbuild: node_exports
|
|
3213
3213
|
});
|
|
3214
3214
|
callback(service);
|
|
3215
|
-
let stdout = child_process.execFileSync(command, args2.concat(`--service=${"0.25.
|
|
3215
|
+
let stdout = child_process.execFileSync(command, args2.concat(`--service=${"0.25.5"}`), {
|
|
3216
3216
|
cwd: defaultWD,
|
|
3217
3217
|
windowsHide: true,
|
|
3218
3218
|
input: stdin,
|
|
@@ -3228,7 +3228,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
3228
3228
|
var startWorkerThreadService = (worker_threads2) => {
|
|
3229
3229
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel;
|
|
3230
3230
|
let worker = new worker_threads2.Worker(__filename, {
|
|
3231
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.25.
|
|
3231
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.25.5" },
|
|
3232
3232
|
transferList: [workerPort],
|
|
3233
3233
|
execArgv: []
|
|
3234
3234
|
});
|
|
@@ -52246,9 +52246,9 @@ import { Http2ServerRequest } from "http2";
|
|
|
52246
52246
|
import { Readable } from "stream";
|
|
52247
52247
|
import crypto2 from "crypto";
|
|
52248
52248
|
var RequestError = class extends Error {
|
|
52249
|
-
static name = "RequestError";
|
|
52250
52249
|
constructor(message, options) {
|
|
52251
52250
|
super(message, options);
|
|
52251
|
+
this.name = "RequestError";
|
|
52252
52252
|
}
|
|
52253
52253
|
};
|
|
52254
52254
|
var toRequestError = (e) => {
|
|
@@ -77722,7 +77722,7 @@ async function seedCurrentProjectGame(db, project) {
|
|
|
77722
77722
|
// package.json
|
|
77723
77723
|
var package_default = {
|
|
77724
77724
|
name: "@playcademy/sandbox",
|
|
77725
|
-
version: "0.1.0-beta.
|
|
77725
|
+
version: "0.1.0-beta.6",
|
|
77726
77726
|
description: "Local development server for Playcademy game development",
|
|
77727
77727
|
type: "module",
|
|
77728
77728
|
exports: {
|
|
@@ -77735,18 +77735,18 @@ var package_default = {
|
|
|
77735
77735
|
types: "./dist/cli.js"
|
|
77736
77736
|
}
|
|
77737
77737
|
},
|
|
77738
|
-
files: [
|
|
77739
|
-
"dist"
|
|
77740
|
-
],
|
|
77741
77738
|
bin: {
|
|
77742
77739
|
"playcademy-sandbox": "./dist/cli.js"
|
|
77743
77740
|
},
|
|
77741
|
+
files: [
|
|
77742
|
+
"dist"
|
|
77743
|
+
],
|
|
77744
77744
|
scripts: {
|
|
77745
|
-
dev: "bun --watch src/cli.ts",
|
|
77746
|
-
start: "bun src/cli.ts",
|
|
77747
77745
|
build: "bun run build.ts",
|
|
77746
|
+
bump: 'bunx bumpp --no-tag --no-push -c "chore(@playcademy/sandbox): release v%s"',
|
|
77747
|
+
dev: "bun --watch src/cli.ts",
|
|
77748
77748
|
pub: "bun run build && bun run bump && bun publish --access public",
|
|
77749
|
-
|
|
77749
|
+
start: "bun src/cli.ts"
|
|
77750
77750
|
},
|
|
77751
77751
|
dependencies: {
|
|
77752
77752
|
"@electric-sql/pglite": "^0.3.2",
|
|
@@ -77761,7 +77761,8 @@ var package_default = {
|
|
|
77761
77761
|
devDependencies: {
|
|
77762
77762
|
"@playcademy/api-core": "workspace:*",
|
|
77763
77763
|
"@playcademy/data": "workspace:*",
|
|
77764
|
-
"@types/bun": "latest"
|
|
77764
|
+
"@types/bun": "latest",
|
|
77765
|
+
"yocto-spinner": "catalog:"
|
|
77765
77766
|
},
|
|
77766
77767
|
peerDependencies: {
|
|
77767
77768
|
typescript: "^5"
|
|
@@ -78279,7 +78280,7 @@ async function addInventoryItem(ctx) {
|
|
|
78279
78280
|
throw ApiError.internal("Internal server error", error2);
|
|
78280
78281
|
}
|
|
78281
78282
|
}
|
|
78282
|
-
async function
|
|
78283
|
+
async function removeInventoryItem(ctx) {
|
|
78283
78284
|
const user = ctx.user;
|
|
78284
78285
|
if (!user) {
|
|
78285
78286
|
throw ApiError.unauthorized("Valid session or bearer token required");
|
|
@@ -78312,8 +78313,8 @@ async function spendInventoryItem(ctx) {
|
|
|
78312
78313
|
}
|
|
78313
78314
|
const [updatedItemRecord] = await tx.update(inventoryItems).set({ quantity: sql`${inventoryItems.quantity} - ${qty}` }).where(eq(inventoryItems.id, currentItem.id)).returning({ quantity: inventoryItems.quantity });
|
|
78314
78315
|
if (!updatedItemRecord) {
|
|
78315
|
-
logger2.error(`Failed to update inventory item ${currentItem.id} during
|
|
78316
|
-
throw ApiError.internal("Failed to update item quantity during
|
|
78316
|
+
logger2.error(`Failed to update inventory item ${currentItem.id} during remove operation.`);
|
|
78317
|
+
throw ApiError.internal("Failed to update item quantity during remove.");
|
|
78317
78318
|
}
|
|
78318
78319
|
return updatedItemRecord.quantity;
|
|
78319
78320
|
});
|
|
@@ -78322,7 +78323,7 @@ async function spendInventoryItem(ctx) {
|
|
|
78322
78323
|
if (error2 instanceof ApiError) {
|
|
78323
78324
|
throw error2;
|
|
78324
78325
|
}
|
|
78325
|
-
logger2.error(`Error
|
|
78326
|
+
logger2.error(`Error removing inventory item ${itemId} for user ${user.id}:`, error2);
|
|
78326
78327
|
throw ApiError.internal("Internal server error", error2);
|
|
78327
78328
|
}
|
|
78328
78329
|
}
|
|
@@ -78367,7 +78368,7 @@ inventoryRouter.post("/add", async (c2) => {
|
|
|
78367
78368
|
return c2.json({ error: message }, 500);
|
|
78368
78369
|
}
|
|
78369
78370
|
});
|
|
78370
|
-
inventoryRouter.post("/
|
|
78371
|
+
inventoryRouter.post("/remove", async (c2) => {
|
|
78371
78372
|
const ctx = {
|
|
78372
78373
|
user: c2.get("user"),
|
|
78373
78374
|
params: {},
|
|
@@ -78375,13 +78376,13 @@ inventoryRouter.post("/spend", async (c2) => {
|
|
|
78375
78376
|
request: c2.req.raw
|
|
78376
78377
|
};
|
|
78377
78378
|
try {
|
|
78378
|
-
const result = await
|
|
78379
|
+
const result = await removeInventoryItem(ctx);
|
|
78379
78380
|
return c2.json(result);
|
|
78380
78381
|
} catch (error2) {
|
|
78381
78382
|
if (error2 instanceof ApiError) {
|
|
78382
78383
|
return c2.json({ error: error2.message }, error2.statusCode);
|
|
78383
78384
|
}
|
|
78384
|
-
console.error("Error in
|
|
78385
|
+
console.error("Error in removeInventoryItem:", error2);
|
|
78385
78386
|
const message = error2 instanceof Error ? error2.message : "Internal server error";
|
|
78386
78387
|
return c2.json({ error: message }, 500);
|
|
78387
78388
|
}
|
|
@@ -81179,7 +81180,7 @@ manifestRouter.get("/", async (c2) => {
|
|
|
81179
81180
|
{ method: "GET", url: `${baseUrl}/api/users/me` },
|
|
81180
81181
|
{ method: "GET", url: `${baseUrl}/api/inventory` },
|
|
81181
81182
|
{ method: "POST", url: `${baseUrl}/api/inventory/add` },
|
|
81182
|
-
{ method: "POST", url: `${baseUrl}/api/inventory/
|
|
81183
|
+
{ method: "POST", url: `${baseUrl}/api/inventory/remove` },
|
|
81183
81184
|
{ method: "POST", url: `${baseUrl}/api/games/:gameId/sessions` },
|
|
81184
81185
|
{
|
|
81185
81186
|
method: "POST",
|
package/dist/server.js
CHANGED
|
@@ -1706,8 +1706,8 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
1706
1706
|
if (isFirstPacket) {
|
|
1707
1707
|
isFirstPacket = false;
|
|
1708
1708
|
let binaryVersion = String.fromCharCode(...bytes);
|
|
1709
|
-
if (binaryVersion !== "0.25.
|
|
1710
|
-
throw new Error(`Cannot start service: Host version "${"0.25.
|
|
1709
|
+
if (binaryVersion !== "0.25.5") {
|
|
1710
|
+
throw new Error(`Cannot start service: Host version "${"0.25.5"}" does not match binary version ${quote(binaryVersion)}`);
|
|
1711
1711
|
}
|
|
1712
1712
|
return;
|
|
1713
1713
|
}
|
|
@@ -2895,7 +2895,7 @@ for your current platform.`);
|
|
|
2895
2895
|
} catch (e) {}
|
|
2896
2896
|
if (pnpapi) {
|
|
2897
2897
|
const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
|
|
2898
|
-
const binTargetPath = path.join(root, "node_modules", ".cache", "esbuild", `pnpapi-${pkg.replace("/", "-")}-${"0.25.
|
|
2898
|
+
const binTargetPath = path.join(root, "node_modules", ".cache", "esbuild", `pnpapi-${pkg.replace("/", "-")}-${"0.25.5"}-${path.basename(subpath)}`);
|
|
2899
2899
|
if (!fs3.existsSync(binTargetPath)) {
|
|
2900
2900
|
fs3.mkdirSync(path.dirname(binTargetPath), { recursive: true });
|
|
2901
2901
|
fs3.copyFileSync(binPath, binTargetPath);
|
|
@@ -2923,7 +2923,7 @@ for your current platform.`);
|
|
|
2923
2923
|
}
|
|
2924
2924
|
}
|
|
2925
2925
|
var _a;
|
|
2926
|
-
var isInternalWorkerThread = ((_a = worker_threads == null ? undefined : worker_threads.workerData) == null ? undefined : _a.esbuildVersion) === "0.25.
|
|
2926
|
+
var isInternalWorkerThread = ((_a = worker_threads == null ? undefined : worker_threads.workerData) == null ? undefined : _a.esbuildVersion) === "0.25.5";
|
|
2927
2927
|
var esbuildCommandAndArgs = () => {
|
|
2928
2928
|
if ((!ESBUILD_BINARY_PATH || false) && (path2.basename(__filename) !== "main.js" || path2.basename(__dirname) !== "lib")) {
|
|
2929
2929
|
throw new Error(`The esbuild JavaScript API cannot be bundled. Please mark the "esbuild" package as external so it's not included in the bundle.
|
|
@@ -2985,7 +2985,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
2987
2987
|
};
|
|
2988
|
-
var version2 = "0.25.
|
|
2988
|
+
var version2 = "0.25.5";
|
|
2989
2989
|
var build = (options) => ensureServiceIsRunning().build(options);
|
|
2990
2990
|
var context = (buildOptions) => ensureServiceIsRunning().context(buildOptions);
|
|
2991
2991
|
var transform = (input, options) => ensureServiceIsRunning().transform(input, options);
|
|
@@ -3103,7 +3103,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
3103
3103
|
if (longLivedService)
|
|
3104
3104
|
return longLivedService;
|
|
3105
3105
|
let [command, args2] = esbuildCommandAndArgs();
|
|
3106
|
-
let child = child_process.spawn(command, args2.concat(`--service=${"0.25.
|
|
3106
|
+
let child = child_process.spawn(command, args2.concat(`--service=${"0.25.5"}`, "--ping"), {
|
|
3107
3107
|
windowsHide: true,
|
|
3108
3108
|
stdio: ["pipe", "pipe", "inherit"],
|
|
3109
3109
|
cwd: defaultWD
|
|
@@ -3211,7 +3211,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
3211
3211
|
esbuild: node_exports
|
|
3212
3212
|
});
|
|
3213
3213
|
callback(service);
|
|
3214
|
-
let stdout = child_process.execFileSync(command, args2.concat(`--service=${"0.25.
|
|
3214
|
+
let stdout = child_process.execFileSync(command, args2.concat(`--service=${"0.25.5"}`), {
|
|
3215
3215
|
cwd: defaultWD,
|
|
3216
3216
|
windowsHide: true,
|
|
3217
3217
|
input: stdin,
|
|
@@ -3227,7 +3227,7 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
3227
3227
|
var startWorkerThreadService = (worker_threads2) => {
|
|
3228
3228
|
let { port1: mainPort, port2: workerPort } = new worker_threads2.MessageChannel;
|
|
3229
3229
|
let worker = new worker_threads2.Worker(__filename, {
|
|
3230
|
-
workerData: { workerPort, defaultWD, esbuildVersion: "0.25.
|
|
3230
|
+
workerData: { workerPort, defaultWD, esbuildVersion: "0.25.5" },
|
|
3231
3231
|
transferList: [workerPort],
|
|
3232
3232
|
execArgv: []
|
|
3233
3233
|
});
|
|
@@ -50336,9 +50336,9 @@ import { Http2ServerRequest } from "http2";
|
|
|
50336
50336
|
import { Readable } from "stream";
|
|
50337
50337
|
import crypto2 from "crypto";
|
|
50338
50338
|
var RequestError = class extends Error {
|
|
50339
|
-
static name = "RequestError";
|
|
50340
50339
|
constructor(message, options) {
|
|
50341
50340
|
super(message, options);
|
|
50341
|
+
this.name = "RequestError";
|
|
50342
50342
|
}
|
|
50343
50343
|
};
|
|
50344
50344
|
var toRequestError = (e) => {
|
|
@@ -75812,7 +75812,7 @@ async function seedCurrentProjectGame(db, project) {
|
|
|
75812
75812
|
// package.json
|
|
75813
75813
|
var package_default = {
|
|
75814
75814
|
name: "@playcademy/sandbox",
|
|
75815
|
-
version: "0.1.0-beta.
|
|
75815
|
+
version: "0.1.0-beta.6",
|
|
75816
75816
|
description: "Local development server for Playcademy game development",
|
|
75817
75817
|
type: "module",
|
|
75818
75818
|
exports: {
|
|
@@ -75825,18 +75825,18 @@ var package_default = {
|
|
|
75825
75825
|
types: "./dist/cli.js"
|
|
75826
75826
|
}
|
|
75827
75827
|
},
|
|
75828
|
-
files: [
|
|
75829
|
-
"dist"
|
|
75830
|
-
],
|
|
75831
75828
|
bin: {
|
|
75832
75829
|
"playcademy-sandbox": "./dist/cli.js"
|
|
75833
75830
|
},
|
|
75831
|
+
files: [
|
|
75832
|
+
"dist"
|
|
75833
|
+
],
|
|
75834
75834
|
scripts: {
|
|
75835
|
-
dev: "bun --watch src/cli.ts",
|
|
75836
|
-
start: "bun src/cli.ts",
|
|
75837
75835
|
build: "bun run build.ts",
|
|
75836
|
+
bump: 'bunx bumpp --no-tag --no-push -c "chore(@playcademy/sandbox): release v%s"',
|
|
75837
|
+
dev: "bun --watch src/cli.ts",
|
|
75838
75838
|
pub: "bun run build && bun run bump && bun publish --access public",
|
|
75839
|
-
|
|
75839
|
+
start: "bun src/cli.ts"
|
|
75840
75840
|
},
|
|
75841
75841
|
dependencies: {
|
|
75842
75842
|
"@electric-sql/pglite": "^0.3.2",
|
|
@@ -75851,7 +75851,8 @@ var package_default = {
|
|
|
75851
75851
|
devDependencies: {
|
|
75852
75852
|
"@playcademy/api-core": "workspace:*",
|
|
75853
75853
|
"@playcademy/data": "workspace:*",
|
|
75854
|
-
"@types/bun": "latest"
|
|
75854
|
+
"@types/bun": "latest",
|
|
75855
|
+
"yocto-spinner": "catalog:"
|
|
75855
75856
|
},
|
|
75856
75857
|
peerDependencies: {
|
|
75857
75858
|
typescript: "^5"
|
|
@@ -76369,7 +76370,7 @@ async function addInventoryItem(ctx) {
|
|
|
76369
76370
|
throw ApiError.internal("Internal server error", error2);
|
|
76370
76371
|
}
|
|
76371
76372
|
}
|
|
76372
|
-
async function
|
|
76373
|
+
async function removeInventoryItem(ctx) {
|
|
76373
76374
|
const user = ctx.user;
|
|
76374
76375
|
if (!user) {
|
|
76375
76376
|
throw ApiError.unauthorized("Valid session or bearer token required");
|
|
@@ -76402,8 +76403,8 @@ async function spendInventoryItem(ctx) {
|
|
|
76402
76403
|
}
|
|
76403
76404
|
const [updatedItemRecord] = await tx.update(inventoryItems).set({ quantity: sql`${inventoryItems.quantity} - ${qty}` }).where(eq(inventoryItems.id, currentItem.id)).returning({ quantity: inventoryItems.quantity });
|
|
76404
76405
|
if (!updatedItemRecord) {
|
|
76405
|
-
logger2.error(`Failed to update inventory item ${currentItem.id} during
|
|
76406
|
-
throw ApiError.internal("Failed to update item quantity during
|
|
76406
|
+
logger2.error(`Failed to update inventory item ${currentItem.id} during remove operation.`);
|
|
76407
|
+
throw ApiError.internal("Failed to update item quantity during remove.");
|
|
76407
76408
|
}
|
|
76408
76409
|
return updatedItemRecord.quantity;
|
|
76409
76410
|
});
|
|
@@ -76412,7 +76413,7 @@ async function spendInventoryItem(ctx) {
|
|
|
76412
76413
|
if (error2 instanceof ApiError) {
|
|
76413
76414
|
throw error2;
|
|
76414
76415
|
}
|
|
76415
|
-
logger2.error(`Error
|
|
76416
|
+
logger2.error(`Error removing inventory item ${itemId} for user ${user.id}:`, error2);
|
|
76416
76417
|
throw ApiError.internal("Internal server error", error2);
|
|
76417
76418
|
}
|
|
76418
76419
|
}
|
|
@@ -76457,7 +76458,7 @@ inventoryRouter.post("/add", async (c2) => {
|
|
|
76457
76458
|
return c2.json({ error: message }, 500);
|
|
76458
76459
|
}
|
|
76459
76460
|
});
|
|
76460
|
-
inventoryRouter.post("/
|
|
76461
|
+
inventoryRouter.post("/remove", async (c2) => {
|
|
76461
76462
|
const ctx = {
|
|
76462
76463
|
user: c2.get("user"),
|
|
76463
76464
|
params: {},
|
|
@@ -76465,13 +76466,13 @@ inventoryRouter.post("/spend", async (c2) => {
|
|
|
76465
76466
|
request: c2.req.raw
|
|
76466
76467
|
};
|
|
76467
76468
|
try {
|
|
76468
|
-
const result = await
|
|
76469
|
+
const result = await removeInventoryItem(ctx);
|
|
76469
76470
|
return c2.json(result);
|
|
76470
76471
|
} catch (error2) {
|
|
76471
76472
|
if (error2 instanceof ApiError) {
|
|
76472
76473
|
return c2.json({ error: error2.message }, error2.statusCode);
|
|
76473
76474
|
}
|
|
76474
|
-
console.error("Error in
|
|
76475
|
+
console.error("Error in removeInventoryItem:", error2);
|
|
76475
76476
|
const message = error2 instanceof Error ? error2.message : "Internal server error";
|
|
76476
76477
|
return c2.json({ error: message }, 500);
|
|
76477
76478
|
}
|
|
@@ -79269,7 +79270,7 @@ manifestRouter.get("/", async (c2) => {
|
|
|
79269
79270
|
{ method: "GET", url: `${baseUrl}/api/users/me` },
|
|
79270
79271
|
{ method: "GET", url: `${baseUrl}/api/inventory` },
|
|
79271
79272
|
{ method: "POST", url: `${baseUrl}/api/inventory/add` },
|
|
79272
|
-
{ method: "POST", url: `${baseUrl}/api/inventory/
|
|
79273
|
+
{ method: "POST", url: `${baseUrl}/api/inventory/remove` },
|
|
79273
79274
|
{ method: "POST", url: `${baseUrl}/api/games/:gameId/sessions` },
|
|
79274
79275
|
{
|
|
79275
79276
|
method: "POST",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playcademy/sandbox",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.7",
|
|
4
4
|
"description": "Local development server for Playcademy game development",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"types": "./dist/cli.js"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist"
|
|
18
|
-
],
|
|
19
16
|
"bin": {
|
|
20
17
|
"playcademy-sandbox": "./dist/cli.js"
|
|
21
18
|
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
22
|
"scripts": {
|
|
23
|
-
"dev": "bun --watch src/cli.ts",
|
|
24
|
-
"start": "bun src/cli.ts",
|
|
25
23
|
"build": "bun run build.ts",
|
|
24
|
+
"bump": "bunx bumpp --no-tag --no-push -c \"chore(@playcademy/sandbox): release v%s\"",
|
|
25
|
+
"dev": "bun --watch src/cli.ts",
|
|
26
26
|
"pub": "bun run build && bun run bump && bun publish --access public",
|
|
27
|
-
"
|
|
27
|
+
"start": "bun src/cli.ts"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@electric-sql/pglite": "^0.3.2",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@playcademy/api-core": "0.1.0",
|
|
41
41
|
"@playcademy/data": "0.0.1",
|
|
42
|
-
"@types/bun": "latest"
|
|
42
|
+
"@types/bun": "latest",
|
|
43
|
+
"yocto-spinner": "^0.2.2"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
46
|
"typescript": "^5"
|