playcademy 0.14.15 → 0.14.16

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/index.js CHANGED
@@ -7222,7 +7222,7 @@ import { join as join18 } from "path";
7222
7222
  // package.json
7223
7223
  var package_default2 = {
7224
7224
  name: "playcademy",
7225
- version: "0.14.14",
7225
+ version: "0.14.15",
7226
7226
  type: "module",
7227
7227
  exports: {
7228
7228
  ".": {
@@ -9133,6 +9133,7 @@ async function saveDeploymentState(game, backendMetadata, context2) {
9133
9133
 
9134
9134
  // src/lib/deploy/secrets.ts
9135
9135
  init_core();
9136
+ import { ApiError as ApiError2 } from "@playcademy/sdk";
9136
9137
  function compareSecrets(current, previous) {
9137
9138
  const currentKeys = Object.keys(current);
9138
9139
  const changes = [];
@@ -9158,6 +9159,10 @@ async function fetchSecretsForDeployment(slug) {
9158
9159
  const keys = Object.keys(secrets);
9159
9160
  return { secrets, keys };
9160
9161
  } catch (error) {
9162
+ if (error instanceof ApiError2 && error.status === 404) {
9163
+ logger.debug(`[Secrets] No secrets configured for game (404)`);
9164
+ return { secrets: {}, keys: [] };
9165
+ }
9161
9166
  logger.warn(
9162
9167
  `Could not fetch secrets: ${error instanceof Error ? error.message : String(error)}`
9163
9168
  );
@@ -9210,6 +9215,14 @@ async function prepareDeploymentContext(options) {
9210
9215
  if (!existingGame && finalConfig.slug) {
9211
9216
  existingGame = existingGames.find((g) => g.slug === finalConfig.slug);
9212
9217
  }
9218
+ if (existingGame) {
9219
+ const currentUser = await client.users.me();
9220
+ const isAdmin = currentUser.role === "admin";
9221
+ const isOwner = existingGame.developerId === currentUser.id;
9222
+ if (!isAdmin && !isOwner) {
9223
+ throw new Error(`Unable to deploy '${existingGame.slug}': You do not own this game`);
9224
+ }
9225
+ }
9213
9226
  const gameIsDeployed = existingGame ? isGameDeployed(existingGame) : false;
9214
9227
  if (existingGame && gameIsDeployed) {
9215
9228
  finalConfig.slug = existingGame.slug;
package/dist/utils.js CHANGED
@@ -3863,7 +3863,7 @@ import { join as join11 } from "path";
3863
3863
  // package.json
3864
3864
  var package_default2 = {
3865
3865
  name: "playcademy",
3866
- version: "0.14.14",
3866
+ version: "0.14.15",
3867
3867
  type: "module",
3868
3868
  exports: {
3869
3869
  ".": {
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "playcademy",
4
- version: "0.14.14",
4
+ version: "0.14.15",
5
5
  type: "module",
6
6
  exports: {
7
7
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playcademy",
3
- "version": "0.14.15",
3
+ "version": "0.14.16",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {