@playcademy/sandbox 0.7.1-beta.2 → 0.7.1-beta.4

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
@@ -259,12 +259,13 @@ var init_domains = __esm(() => {
259
259
  var init_env_vars = () => {};
260
260
 
261
261
  // ../constants/src/game.ts
262
- var GAME_MEMBER_ROLES;
262
+ var GAME_MEMBER_ROLES, GAME_PERMISSIONS;
263
263
  var init_game = __esm(() => {
264
264
  GAME_MEMBER_ROLES = {
265
265
  OWNER: "owner",
266
266
  COLLABORATOR: "collaborator"
267
267
  };
268
+ GAME_PERMISSIONS = ["microphone", "camera"];
268
269
  });
269
270
 
270
271
  // ../constants/src/platform.ts
@@ -1117,7 +1118,7 @@ var package_default;
1117
1118
  var init_package = __esm(() => {
1118
1119
  package_default = {
1119
1120
  name: "@playcademy/sandbox",
1120
- version: "0.7.1-beta.2",
1121
+ version: "0.7.1-beta.4",
1121
1122
  description: "Local development server for Playcademy game development",
1122
1123
  type: "module",
1123
1124
  exports: {
@@ -23937,6 +23938,7 @@ var init_kv = () => {};
23937
23938
  // ../cloudflare/src/utils/hostname.ts
23938
23939
  var RESERVED_SUBDOMAINS;
23939
23940
  var init_hostname = __esm(() => {
23941
+ init_src();
23940
23942
  RESERVED_SUBDOMAINS = new Set(["www", "hub", "cdn", "realtime", "admin", "docs", "api"]);
23941
23943
  });
23942
23944
  // ../utils/src/mime.ts
@@ -26217,9 +26219,9 @@ var init_helpers3 = __esm(() => {
26217
26219
 
26218
26220
  // ../cloudflare/src/playcademy/provider/provider.ts
26219
26221
  var init_provider = __esm(() => {
26220
- init_src();
26221
26222
  init_src();
26222
26223
  init_core();
26224
+ init_hostname();
26223
26225
  init_constants2();
26224
26226
  init_assets_config();
26225
26227
  init_bindings();
@@ -34280,7 +34282,7 @@ var init_emoji = __esm(() => {
34280
34282
  function requestsBinding(binding) {
34281
34283
  return binding === true || Array.isArray(binding) && binding.length > 0;
34282
34284
  }
34283
- var HttpUrlSchema, GameEmojiSchema, GameMetadataRecordSchema, InsertGameSchema, UpdateGameSchema, InsertGameDeploymentSchema, InsertGameDeployJobSchema, InsertGameDeploymentStateSchema, UpsertGameMetadataSchema, PatchGameMetadataSchema, AddGameMemberSchema, UpdateGameMemberRoleSchema, AddGameDashboardUserSchema, VerifyGameDashboardLoginSchema, AcceptGameDashboardInviteSchema, AcceptGameDashboardResetSchema, ALLOWED_UPLOAD_EXTENSIONS, InitiateUploadSchema, AddCustomHostnameSchema, SetSecretsRequestSchema, SecretsDiffRequestSchema, SeedRequestSchema, SchemaInfoSchema, VerifyTokenSchema, KVSeedRequestSchema, DeployMigrationSchema, DeployDatabaseSchema, DatabaseResetDatabaseSchema, DatabaseResetRequestSchema, BaselineEvidenceSchema, DeployBaselineSchema, DeploymentStateBaselineSchema, MigrationRealignSchema, MigrationResolveSchema, DatabaseRestoreSchema, DeployBlockedReportSchema, DeployRequestSchema;
34285
+ var HttpUrlSchema, GameEmojiSchema, GamePermissionsSchema, GameMetadataRecordSchema, InsertGameSchema, UpdateGameSchema, InsertGameDeploymentSchema, InsertGameDeployJobSchema, InsertGameDeploymentStateSchema, UpsertGameMetadataSchema, PatchGameMetadataSchema, AddGameMemberSchema, UpdateGameMemberRoleSchema, AddGameDashboardUserSchema, VerifyGameDashboardLoginSchema, AcceptGameDashboardInviteSchema, AcceptGameDashboardResetSchema, ALLOWED_UPLOAD_EXTENSIONS, InitiateUploadSchema, AddCustomHostnameSchema, SetSecretsRequestSchema, SecretsDiffRequestSchema, SeedRequestSchema, SchemaInfoSchema, VerifyTokenSchema, KVSeedRequestSchema, DeployMigrationSchema, DeployDatabaseSchema, DatabaseResetDatabaseSchema, DatabaseResetRequestSchema, BaselineEvidenceSchema, DeployBaselineSchema, DeploymentStateBaselineSchema, MigrationRealignSchema, MigrationResolveSchema, DatabaseRestoreSchema, DeployBlockedReportSchema, DeployRequestSchema;
34284
34286
  var init_schemas2 = __esm(() => {
34285
34287
  init_drizzle_zod();
34286
34288
  init_esm();
@@ -34291,20 +34293,25 @@ var init_schemas2 = __esm(() => {
34291
34293
  GameEmojiSchema = exports_external.string().max(16).refine((value) => value.length === 0 || isSingleEmoji(value), {
34292
34294
  message: "Emoji must be a single emoji."
34293
34295
  });
34296
+ GamePermissionsSchema = exports_external.array(exports_external.enum(GAME_PERMISSIONS));
34294
34297
  GameMetadataRecordSchema = exports_external.record(exports_external.string(), exports_external.unknown()).superRefine((metadata2, ctx) => {
34295
34298
  const emoji = metadata2.emoji;
34296
- if (emoji === undefined) {
34297
- return;
34298
- }
34299
- const emojiResult = GameEmojiSchema.safeParse(emoji);
34300
- if (emojiResult.success) {
34301
- return;
34299
+ if (emoji !== undefined) {
34300
+ const emojiResult = GameEmojiSchema.safeParse(emoji);
34301
+ if (!emojiResult.success) {
34302
+ for (const issue of emojiResult.error.issues) {
34303
+ ctx.addIssue({ ...issue, path: ["emoji", ...issue.path] });
34304
+ }
34305
+ }
34302
34306
  }
34303
- for (const issue of emojiResult.error.issues) {
34304
- ctx.addIssue({
34305
- ...issue,
34306
- path: ["emoji", ...issue.path]
34307
- });
34307
+ const permissions = metadata2.permissions;
34308
+ if (permissions !== undefined) {
34309
+ const permissionsResult = GamePermissionsSchema.safeParse(permissions);
34310
+ if (!permissionsResult.success) {
34311
+ for (const issue of permissionsResult.error.issues) {
34312
+ ctx.addIssue({ ...issue, path: ["permissions", ...issue.path] });
34313
+ }
34314
+ }
34308
34315
  }
34309
34316
  });
34310
34317
  InsertGameSchema = createInsertSchema(games, {
package/dist/constants.js CHANGED
@@ -74,12 +74,13 @@ var init_domains = __esm(() => {
74
74
  var init_env_vars = () => {};
75
75
 
76
76
  // ../constants/src/game.ts
77
- var GAME_MEMBER_ROLES;
77
+ var GAME_MEMBER_ROLES, GAME_PERMISSIONS;
78
78
  var init_game = __esm(() => {
79
79
  GAME_MEMBER_ROLES = {
80
80
  OWNER: "owner",
81
81
  COLLABORATOR: "collaborator"
82
82
  };
83
+ GAME_PERMISSIONS = ["microphone", "camera"];
83
84
  });
84
85
 
85
86
  // ../constants/src/platform.ts
package/dist/server.js CHANGED
@@ -258,12 +258,13 @@ var init_domains = __esm(() => {
258
258
  var init_env_vars = () => {};
259
259
 
260
260
  // ../constants/src/game.ts
261
- var GAME_MEMBER_ROLES;
261
+ var GAME_MEMBER_ROLES, GAME_PERMISSIONS;
262
262
  var init_game = __esm(() => {
263
263
  GAME_MEMBER_ROLES = {
264
264
  OWNER: "owner",
265
265
  COLLABORATOR: "collaborator"
266
266
  };
267
+ GAME_PERMISSIONS = ["microphone", "camera"];
267
268
  });
268
269
 
269
270
  // ../constants/src/platform.ts
@@ -1116,7 +1117,7 @@ var package_default;
1116
1117
  var init_package = __esm(() => {
1117
1118
  package_default = {
1118
1119
  name: "@playcademy/sandbox",
1119
- version: "0.7.1-beta.2",
1120
+ version: "0.7.1-beta.4",
1120
1121
  description: "Local development server for Playcademy game development",
1121
1122
  type: "module",
1122
1123
  exports: {
@@ -23936,6 +23937,7 @@ var init_kv = () => {};
23936
23937
  // ../cloudflare/src/utils/hostname.ts
23937
23938
  var RESERVED_SUBDOMAINS;
23938
23939
  var init_hostname = __esm(() => {
23940
+ init_src();
23939
23941
  RESERVED_SUBDOMAINS = new Set(["www", "hub", "cdn", "realtime", "admin", "docs", "api"]);
23940
23942
  });
23941
23943
  // ../utils/src/mime.ts
@@ -26216,9 +26218,9 @@ var init_helpers3 = __esm(() => {
26216
26218
 
26217
26219
  // ../cloudflare/src/playcademy/provider/provider.ts
26218
26220
  var init_provider = __esm(() => {
26219
- init_src();
26220
26221
  init_src();
26221
26222
  init_core();
26223
+ init_hostname();
26222
26224
  init_constants2();
26223
26225
  init_assets_config();
26224
26226
  init_bindings();
@@ -34279,7 +34281,7 @@ var init_emoji = __esm(() => {
34279
34281
  function requestsBinding(binding) {
34280
34282
  return binding === true || Array.isArray(binding) && binding.length > 0;
34281
34283
  }
34282
- var HttpUrlSchema, GameEmojiSchema, GameMetadataRecordSchema, InsertGameSchema, UpdateGameSchema, InsertGameDeploymentSchema, InsertGameDeployJobSchema, InsertGameDeploymentStateSchema, UpsertGameMetadataSchema, PatchGameMetadataSchema, AddGameMemberSchema, UpdateGameMemberRoleSchema, AddGameDashboardUserSchema, VerifyGameDashboardLoginSchema, AcceptGameDashboardInviteSchema, AcceptGameDashboardResetSchema, ALLOWED_UPLOAD_EXTENSIONS, InitiateUploadSchema, AddCustomHostnameSchema, SetSecretsRequestSchema, SecretsDiffRequestSchema, SeedRequestSchema, SchemaInfoSchema, VerifyTokenSchema, KVSeedRequestSchema, DeployMigrationSchema, DeployDatabaseSchema, DatabaseResetDatabaseSchema, DatabaseResetRequestSchema, BaselineEvidenceSchema, DeployBaselineSchema, DeploymentStateBaselineSchema, MigrationRealignSchema, MigrationResolveSchema, DatabaseRestoreSchema, DeployBlockedReportSchema, DeployRequestSchema;
34284
+ var HttpUrlSchema, GameEmojiSchema, GamePermissionsSchema, GameMetadataRecordSchema, InsertGameSchema, UpdateGameSchema, InsertGameDeploymentSchema, InsertGameDeployJobSchema, InsertGameDeploymentStateSchema, UpsertGameMetadataSchema, PatchGameMetadataSchema, AddGameMemberSchema, UpdateGameMemberRoleSchema, AddGameDashboardUserSchema, VerifyGameDashboardLoginSchema, AcceptGameDashboardInviteSchema, AcceptGameDashboardResetSchema, ALLOWED_UPLOAD_EXTENSIONS, InitiateUploadSchema, AddCustomHostnameSchema, SetSecretsRequestSchema, SecretsDiffRequestSchema, SeedRequestSchema, SchemaInfoSchema, VerifyTokenSchema, KVSeedRequestSchema, DeployMigrationSchema, DeployDatabaseSchema, DatabaseResetDatabaseSchema, DatabaseResetRequestSchema, BaselineEvidenceSchema, DeployBaselineSchema, DeploymentStateBaselineSchema, MigrationRealignSchema, MigrationResolveSchema, DatabaseRestoreSchema, DeployBlockedReportSchema, DeployRequestSchema;
34283
34285
  var init_schemas2 = __esm(() => {
34284
34286
  init_drizzle_zod();
34285
34287
  init_esm();
@@ -34290,20 +34292,25 @@ var init_schemas2 = __esm(() => {
34290
34292
  GameEmojiSchema = exports_external.string().max(16).refine((value) => value.length === 0 || isSingleEmoji(value), {
34291
34293
  message: "Emoji must be a single emoji."
34292
34294
  });
34295
+ GamePermissionsSchema = exports_external.array(exports_external.enum(GAME_PERMISSIONS));
34293
34296
  GameMetadataRecordSchema = exports_external.record(exports_external.string(), exports_external.unknown()).superRefine((metadata2, ctx) => {
34294
34297
  const emoji = metadata2.emoji;
34295
- if (emoji === undefined) {
34296
- return;
34297
- }
34298
- const emojiResult = GameEmojiSchema.safeParse(emoji);
34299
- if (emojiResult.success) {
34300
- return;
34298
+ if (emoji !== undefined) {
34299
+ const emojiResult = GameEmojiSchema.safeParse(emoji);
34300
+ if (!emojiResult.success) {
34301
+ for (const issue of emojiResult.error.issues) {
34302
+ ctx.addIssue({ ...issue, path: ["emoji", ...issue.path] });
34303
+ }
34304
+ }
34301
34305
  }
34302
- for (const issue of emojiResult.error.issues) {
34303
- ctx.addIssue({
34304
- ...issue,
34305
- path: ["emoji", ...issue.path]
34306
- });
34306
+ const permissions = metadata2.permissions;
34307
+ if (permissions !== undefined) {
34308
+ const permissionsResult = GamePermissionsSchema.safeParse(permissions);
34309
+ if (!permissionsResult.success) {
34310
+ for (const issue of permissionsResult.error.issues) {
34311
+ ctx.addIssue({ ...issue, path: ["permissions", ...issue.path] });
34312
+ }
34313
+ }
34307
34314
  }
34308
34315
  });
34309
34316
  InsertGameSchema = createInsertSchema(games, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playcademy/sandbox",
3
- "version": "0.7.1-beta.2",
3
+ "version": "0.7.1-beta.4",
4
4
  "description": "Local development server for Playcademy game development",
5
5
  "type": "module",
6
6
  "exports": {