playcademy 0.16.4 → 0.16.5

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
@@ -2965,7 +2965,7 @@ import { join as join13 } from "path";
2965
2965
  // package.json with { type: 'json' }
2966
2966
  var package_default2 = {
2967
2967
  name: "playcademy",
2968
- version: "0.16.3",
2968
+ version: "0.16.4",
2969
2969
  type: "module",
2970
2970
  exports: {
2971
2971
  ".": {
package/dist/index.js CHANGED
@@ -3995,7 +3995,7 @@ import { join as join12 } from "path";
3995
3995
  // package.json with { type: 'json' }
3996
3996
  var package_default2 = {
3997
3997
  name: "playcademy",
3998
- version: "0.16.3",
3998
+ version: "0.16.4",
3999
3999
  type: "module",
4000
4000
  exports: {
4001
4001
  ".": {
@@ -8421,9 +8421,11 @@ async function analyzeChanges(context2) {
8421
8421
  deployedGameInfo
8422
8422
  } = context2;
8423
8423
  let secretsDiff = void 0;
8424
- if (localSecrets && Object.keys(localSecrets).length > 0) {
8424
+ const hasLocalSecrets = Object.keys(localSecrets ?? {}).length > 0;
8425
+ const hasRemoteSecrets = remoteSecretKeys && remoteSecretKeys.length > 0;
8426
+ if (hasLocalSecrets || hasRemoteSecrets) {
8425
8427
  secretsDiff = computeSecretsDiff({
8426
- localSecrets,
8428
+ localSecrets: localSecrets ?? {},
8427
8429
  remoteKeys: remoteSecretKeys ?? [],
8428
8430
  cachedHashes: deployedGameInfo?.secretsHashes
8429
8431
  });
@@ -8514,8 +8516,8 @@ async function analyzeChanges(context2) {
8514
8516
  async function calculateDeploymentPlan(context2, changes) {
8515
8517
  const { config, isGameDeployed: isGameDeployed2, projectPath, deployBackend, forceBackend } = context2;
8516
8518
  if (!isGameDeployed2) {
8517
- const needsBackend2 = hasLocalCustomRoutes(projectPath, context2.fullConfig) || !!context2.fullConfig?.integrations;
8518
- const shouldDeployBackend2 = deployBackend && needsBackend2;
8519
+ const needsBackend3 = hasLocalCustomRoutes(projectPath, context2.fullConfig) || !!context2.fullConfig?.integrations;
8520
+ const shouldDeployBackend2 = deployBackend && needsBackend3;
8519
8521
  return {
8520
8522
  action: "deploy-new",
8521
8523
  gameType: config.gameType ?? "hosted",
@@ -8541,7 +8543,8 @@ async function calculateDeploymentPlan(context2, changes) {
8541
8543
  }
8542
8544
  const shouldUpdateGame = buildHasChanges || configHasChanges;
8543
8545
  const shouldUploadBuild = buildHasChanges;
8544
- const shouldDeployBackend = deployBackend && (backendHasChanges || forceBackend);
8546
+ const needsBackend2 = hasLocalCustomRoutes(projectPath, context2.fullConfig) || !!context2.fullConfig?.integrations;
8547
+ const shouldDeployBackend = deployBackend && (backendHasChanges || forceBackend || shouldUploadBuild && needsBackend2);
8545
8548
  return {
8546
8549
  action: "update-existing",
8547
8550
  gameType: config.gameType ?? "hosted",
@@ -10991,7 +10994,7 @@ var getStatusCommand = new Command13("status").description("Check your developer
10991
10994
  });
10992
10995
 
10993
10996
  // package.json
10994
- var version2 = "0.16.3";
10997
+ var version2 = "0.16.4";
10995
10998
 
10996
10999
  // src/commands/dev/server.ts
10997
11000
  function setupCleanupHandlers(workspace, getServer) {
@@ -14503,18 +14506,18 @@ async function runSecretsPush(options = {}) {
14503
14506
  }
14504
14507
  const localSecrets = await readEnvFile(workspace);
14505
14508
  const localKeys = Object.keys(localSecrets);
14506
- if (localKeys.length === 0) {
14507
- logger.admonition("info", "No Secrets", [
14508
- `Your <.env> file is empty or contains no valid secrets`
14509
- ]);
14510
- logger.newLine();
14511
- return false;
14512
- }
14513
14509
  const remoteKeys = await runStep(
14514
14510
  `Fetching secrets from ${environment}`,
14515
14511
  () => client.dev.games.secrets.list(game.slug),
14516
14512
  (keys) => `Found ${keys.length} existing ${pluralize(keys.length, "secret")} on ${environment}`
14517
14513
  );
14514
+ const noSyncNecessary = localKeys.length === 0 && remoteKeys.length === 0;
14515
+ if (noSyncNecessary) {
14516
+ logger.newLine();
14517
+ logger.success("No secrets to sync");
14518
+ logger.newLine();
14519
+ return true;
14520
+ }
14518
14521
  const cachedHashes = deployedGame.secretsHashes;
14519
14522
  const diff = computeSecretsDiff({
14520
14523
  localSecrets,
package/dist/utils.js CHANGED
@@ -2356,7 +2356,7 @@ import { join as join12 } from "path";
2356
2356
  // package.json with { type: 'json' }
2357
2357
  var package_default2 = {
2358
2358
  name: "playcademy",
2359
- version: "0.16.3",
2359
+ version: "0.16.4",
2360
2360
  type: "module",
2361
2361
  exports: {
2362
2362
  ".": {
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // package.json with { type: 'json' }
2
2
  var package_default = {
3
3
  name: "playcademy",
4
- version: "0.16.3",
4
+ version: "0.16.4",
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.16.4",
3
+ "version": "0.16.5",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {