@playcademy/sandbox 0.4.2-beta.5 → 0.5.0
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 +6 -5
- package/dist/server.js +6 -5
- package/package.json +1 -1
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.
|
|
1081
|
+
version: "0.5.0",
|
|
1082
1082
|
description: "Local development server for Playcademy game development",
|
|
1083
1083
|
type: "module",
|
|
1084
1084
|
exports: {
|
|
@@ -29043,8 +29043,8 @@ class BucketService {
|
|
|
29043
29043
|
const extensionIndex = fileName.lastIndexOf(".");
|
|
29044
29044
|
return extensionIndex > 0 ? fileName.slice(extensionIndex + 1).toLowerCase() : "(none)";
|
|
29045
29045
|
}
|
|
29046
|
-
getBucketName(slug
|
|
29047
|
-
return
|
|
29046
|
+
getBucketName(slug) {
|
|
29047
|
+
return getDeploymentId(slug, this.deps.sstStage);
|
|
29048
29048
|
}
|
|
29049
29049
|
async listFiles(slug, user, prefix) {
|
|
29050
29050
|
const game2 = await this.deps.validateDeveloperAccessBySlug(user, slug);
|
|
@@ -29102,9 +29102,9 @@ class BucketService {
|
|
|
29102
29102
|
}
|
|
29103
29103
|
}
|
|
29104
29104
|
var init_bucket_service = __esm(() => {
|
|
29105
|
-
init_src();
|
|
29106
29105
|
init_spans();
|
|
29107
29106
|
init_errors();
|
|
29107
|
+
init_deployment_util();
|
|
29108
29108
|
});
|
|
29109
29109
|
|
|
29110
29110
|
// ../api-core/src/services/database.service.ts
|
|
@@ -39198,6 +39198,7 @@ function createPlatformServices(deps) {
|
|
|
39198
39198
|
validateGameManagementAccess
|
|
39199
39199
|
} = deps;
|
|
39200
39200
|
const bucket = new BucketService({
|
|
39201
|
+
sstStage: config2.sstStage,
|
|
39201
39202
|
storage: r2Storage,
|
|
39202
39203
|
validateDeveloperAccessBySlug
|
|
39203
39204
|
});
|
|
@@ -95737,7 +95738,7 @@ function requireDeveloper(handler) {
|
|
|
95737
95738
|
throw ApiError.unauthorized("Valid session or bearer token required");
|
|
95738
95739
|
}
|
|
95739
95740
|
const isAdmin = ctx.user.role === "admin";
|
|
95740
|
-
const isApprovedDev = ctx.user.developerStatus === "approved";
|
|
95741
|
+
const isApprovedDev = ctx.user.role === "developer" && ctx.user.developerStatus === "approved";
|
|
95741
95742
|
if (!isAdmin && !isApprovedDev) {
|
|
95742
95743
|
throw ApiError.forbidden("Must be an approved developer");
|
|
95743
95744
|
}
|
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.
|
|
1080
|
+
version: "0.5.0",
|
|
1081
1081
|
description: "Local development server for Playcademy game development",
|
|
1082
1082
|
type: "module",
|
|
1083
1083
|
exports: {
|
|
@@ -29042,8 +29042,8 @@ class BucketService {
|
|
|
29042
29042
|
const extensionIndex = fileName.lastIndexOf(".");
|
|
29043
29043
|
return extensionIndex > 0 ? fileName.slice(extensionIndex + 1).toLowerCase() : "(none)";
|
|
29044
29044
|
}
|
|
29045
|
-
getBucketName(slug
|
|
29046
|
-
return
|
|
29045
|
+
getBucketName(slug) {
|
|
29046
|
+
return getDeploymentId(slug, this.deps.sstStage);
|
|
29047
29047
|
}
|
|
29048
29048
|
async listFiles(slug, user, prefix) {
|
|
29049
29049
|
const game2 = await this.deps.validateDeveloperAccessBySlug(user, slug);
|
|
@@ -29101,9 +29101,9 @@ class BucketService {
|
|
|
29101
29101
|
}
|
|
29102
29102
|
}
|
|
29103
29103
|
var init_bucket_service = __esm(() => {
|
|
29104
|
-
init_src();
|
|
29105
29104
|
init_spans();
|
|
29106
29105
|
init_errors();
|
|
29106
|
+
init_deployment_util();
|
|
29107
29107
|
});
|
|
29108
29108
|
|
|
29109
29109
|
// ../api-core/src/services/database.service.ts
|
|
@@ -39197,6 +39197,7 @@ function createPlatformServices(deps) {
|
|
|
39197
39197
|
validateGameManagementAccess
|
|
39198
39198
|
} = deps;
|
|
39199
39199
|
const bucket = new BucketService({
|
|
39200
|
+
sstStage: config2.sstStage,
|
|
39200
39201
|
storage: r2Storage,
|
|
39201
39202
|
validateDeveloperAccessBySlug
|
|
39202
39203
|
});
|
|
@@ -95736,7 +95737,7 @@ function requireDeveloper(handler) {
|
|
|
95736
95737
|
throw ApiError.unauthorized("Valid session or bearer token required");
|
|
95737
95738
|
}
|
|
95738
95739
|
const isAdmin = ctx.user.role === "admin";
|
|
95739
|
-
const isApprovedDev = ctx.user.developerStatus === "approved";
|
|
95740
|
+
const isApprovedDev = ctx.user.role === "developer" && ctx.user.developerStatus === "approved";
|
|
95740
95741
|
if (!isAdmin && !isApprovedDev) {
|
|
95741
95742
|
throw ApiError.forbidden("Must be an approved developer");
|
|
95742
95743
|
}
|