playcademy 0.14.34 → 0.15.1

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
@@ -2958,7 +2958,7 @@ import { join as join13 } from "path";
2958
2958
  // package.json with { type: 'json' }
2959
2959
  var package_default2 = {
2960
2960
  name: "playcademy",
2961
- version: "0.14.33",
2961
+ version: "0.15.0",
2962
2962
  type: "module",
2963
2963
  exports: {
2964
2964
  ".": {
@@ -105,3 +105,13 @@ export const TIMEBACK_COMPONENT_RESOURCE_DEFAULTS = {
105
105
  sortOrder: 1,
106
106
  lessonType: 'quiz',
107
107
  } as const
108
+
109
+ // ============================================================================
110
+ // 2HL (Two-Hour Learning) Model
111
+ // ============================================================================
112
+
113
+ /**
114
+ * Daily XP threshold for the 2HL model.
115
+ * Students must earn this much XP daily to unlock non-enrolled games.
116
+ */
117
+ export const DAILY_XP_THRESHOLD = 120
package/dist/index.d.ts CHANGED
@@ -964,7 +964,6 @@ interface DeployedGameInfo {
964
964
  schemaSnapshot?: unknown;
965
965
  integrationKeys?: string[];
966
966
  integrationsHash?: string;
967
- deployedSecrets?: string[];
968
967
  }
969
968
  interface GameStore {
970
969
  /** Staging environment game deployments, keyed by absolute project path */
@@ -1004,7 +1003,6 @@ interface DeploymentContext {
1004
1003
  previousResources?: string[];
1005
1004
  previousIntegrationKeys?: string[];
1006
1005
  previousIntegrationsHash?: string;
1007
- currentSecretKeys?: string[];
1008
1006
  isDryRun: boolean;
1009
1007
  deployBackend: boolean;
1010
1008
  forceBackend: boolean;
@@ -1024,7 +1022,6 @@ interface DeploymentChanges {
1024
1022
  changes: IntegrationConfigChange[];
1025
1023
  }>;
1026
1024
  schema?: boolean;
1027
- secrets?: boolean;
1028
1025
  }
1029
1026
  /**
1030
1027
  * Plan for what needs to be deployed
@@ -1063,8 +1060,6 @@ interface BackendDeploymentMetadata {
1063
1060
  integrationKeys: string[];
1064
1061
  /** Hash of integrations config (for detecting metadata changes) */
1065
1062
  integrationsHash: string | null;
1066
- /** Secret keys that have been deployed */
1067
- deployedSecrets?: string[];
1068
1063
  /** When this backend was deployed */
1069
1064
  deployedAt: string;
1070
1065
  }
@@ -1253,13 +1248,6 @@ interface IntegrationsDiff {
1253
1248
  }>;
1254
1249
  }>;
1255
1250
  }
1256
- /**
1257
- * Secret changes
1258
- */
1259
- interface SecretsDiff {
1260
- previousKeys?: string[];
1261
- currentKeys?: string[];
1262
- }
1263
1251
  /**
1264
1252
  * Options for displaying deployment diff
1265
1253
  */
@@ -1269,7 +1257,6 @@ interface DeploymentDiffOptions {
1269
1257
  build?: BuildDiff;
1270
1258
  backend?: BackendDiff;
1271
1259
  integrations?: IntegrationsDiff;
1272
- secrets?: SecretsDiff;
1273
1260
  }
1274
1261
 
1275
1262
  /**
@@ -1494,4 +1481,32 @@ interface ProjectDirectoryInfo {
1494
1481
  cancelled: boolean;
1495
1482
  }
1496
1483
 
1497
- export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, AuthProfile, AuthStore, AuthStrategy, BackendBundle, BackendDeploymentMetadata, BackendDiff, BackendFeatures, BucketBulkOptions, BucketDeleteOptions, BucketGetOptions, BucketListOptions, BucketPutOptions, BuildDiff, BulkCollectionResult, BundleOptions, CallbackServerResult, CollectedFile, ComponentConfig, ComponentResourceConfig, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DatabaseIntegrationOptions, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, DevServerOptions, EmbeddedSourcePaths, EngineConfig, EngineType, EnvironmentAuthProfiles, GameStore, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KeyMetadata, KeyStats, LoadConfigResult, LogEntry, LogStreamConfig, LogStreamUrlOptions, LoginCredentials, LoginResponse, OrganizationConfig, PlaycademyConfig, PluginLogger, PreviewOptions, PreviewResponse, ProjectDirectoryInfo, ResourceConfig, ScaffoldResult, SecretsDiff, SignInResponse, SsoCallbackData, Template, TemplateFramework, TemplateHook, TemplateHookOptions, TemplateSource, TimebackBaseConfig, TimebackCourseConfig, TimebackCourseConfigWithOverrides, TimebackGrade, TimebackIntegrationConfig, TimebackSourcedIds, TimebackSubject, TokenType, UpdateExistingGameOptions };
1484
+ /**
1485
+ * Secret Command Types
1486
+ *
1487
+ * Options for secret management CLI commands.
1488
+ */
1489
+ /**
1490
+ * Base options shared by all secret commands.
1491
+ */
1492
+ interface SecretCommandOptions {
1493
+ /** Environment (staging or production) */
1494
+ env?: string;
1495
+ }
1496
+ /**
1497
+ * Options for the `secret set` command.
1498
+ */
1499
+ type SecretSetOptions = SecretCommandOptions;
1500
+ /**
1501
+ * Options for the `secret list` command.
1502
+ */
1503
+ type SecretListOptions = SecretCommandOptions;
1504
+ /**
1505
+ * Options for the `secret delete` command.
1506
+ */
1507
+ interface SecretDeleteOptions extends SecretCommandOptions {
1508
+ /** Skip confirmation prompt */
1509
+ force?: boolean;
1510
+ }
1511
+
1512
+ export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, AuthProfile, AuthStore, AuthStrategy, BackendBundle, BackendDeploymentMetadata, BackendDiff, BackendFeatures, BucketBulkOptions, BucketDeleteOptions, BucketGetOptions, BucketListOptions, BucketPutOptions, BuildDiff, BulkCollectionResult, BundleOptions, CallbackServerResult, CollectedFile, ComponentConfig, ComponentResourceConfig, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DatabaseIntegrationOptions, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, DevServerOptions, EmbeddedSourcePaths, EngineConfig, EngineType, EnvironmentAuthProfiles, GameStore, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KeyMetadata, KeyStats, LoadConfigResult, LogEntry, LogStreamConfig, LogStreamUrlOptions, LoginCredentials, LoginResponse, OrganizationConfig, PlaycademyConfig, PluginLogger, PreviewOptions, PreviewResponse, ProjectDirectoryInfo, ResourceConfig, ScaffoldResult, SecretCommandOptions, SecretDeleteOptions, SecretListOptions, SecretSetOptions, SignInResponse, SsoCallbackData, Template, TemplateFramework, TemplateHook, TemplateHookOptions, TemplateSource, TimebackBaseConfig, TimebackCourseConfig, TimebackCourseConfigWithOverrides, TimebackGrade, TimebackIntegrationConfig, TimebackSourcedIds, TimebackSubject, TokenType, UpdateExistingGameOptions };
package/dist/index.js CHANGED
@@ -3960,7 +3960,7 @@ import { join as join12 } from "path";
3960
3960
  // package.json with { type: 'json' }
3961
3961
  var package_default2 = {
3962
3962
  name: "playcademy",
3963
- version: "0.14.33",
3963
+ version: "0.15.0",
3964
3964
  type: "module",
3965
3965
  exports: {
3966
3966
  ".": {
@@ -5877,9 +5877,6 @@ async function saveDeploymentState(game, backendMetadata, context2) {
5877
5877
  if (backendMetadata.schemaSnapshot !== void 0) {
5878
5878
  deploymentState.schemaSnapshot = backendMetadata.schemaSnapshot;
5879
5879
  }
5880
- if (backendMetadata.deployedSecrets !== void 0) {
5881
- deploymentState.deployedSecrets = backendMetadata.deployedSecrets;
5882
- }
5883
5880
  } else if (context2.deployedGameInfo) {
5884
5881
  deploymentState.backendBundleHash = context2.deployedGameInfo.backendBundleHash;
5885
5882
  deploymentState.backendSize = context2.deployedGameInfo.backendSize;
@@ -5891,12 +5888,6 @@ async function saveDeploymentState(game, backendMetadata, context2) {
5891
5888
  if (context2.deployedGameInfo.schemaSnapshot !== void 0) {
5892
5889
  deploymentState.schemaSnapshot = context2.deployedGameInfo.schemaSnapshot;
5893
5890
  }
5894
- if (context2.deployedGameInfo.deployedSecrets !== void 0) {
5895
- deploymentState.deployedSecrets = context2.deployedGameInfo.deployedSecrets;
5896
- }
5897
- }
5898
- if (context2.currentSecretKeys !== void 0) {
5899
- deploymentState.deployedSecrets = context2.currentSecretKeys;
5900
5891
  }
5901
5892
  await saveDeployedGame(projectPath, deploymentState);
5902
5893
  }
@@ -7092,25 +7083,6 @@ function displayDeploymentDiff(options) {
7092
7083
  logger.newLine();
7093
7084
  }
7094
7085
  }
7095
- const previousSecretKeys = options.secrets?.previousKeys;
7096
- const currentSecretKeys = options.secrets?.currentKeys;
7097
- if (previousSecretKeys !== void 0 && currentSecretKeys !== void 0) {
7098
- const added = currentSecretKeys.filter((k) => !previousSecretKeys.includes(k));
7099
- const removed = previousSecretKeys.filter((k) => !currentSecretKeys.includes(k));
7100
- const hasSecretsChanges = added.length > 0 || removed.length > 0;
7101
- if (hasSecretsChanges) {
7102
- logger.bold("Secrets", 1);
7103
- if (added.length > 0) {
7104
- const addedList = added.map((k) => green5(k)).join(", ");
7105
- logger.data("Added", addedList, 2);
7106
- }
7107
- if (removed.length > 0) {
7108
- const removedList = removed.map((k) => red3(k)).join(", ");
7109
- logger.data("Removed", removedList, 2);
7110
- }
7111
- logger.newLine();
7112
- }
7113
- }
7114
7086
  }
7115
7087
 
7116
7088
  // src/lib/deploy/interaction.ts
@@ -7385,10 +7357,6 @@ async function confirmDeploymentPlan(plan, context2) {
7385
7357
  previousKeys: context2.previousIntegrationKeys,
7386
7358
  currentKeys: currentIntegrationKeys,
7387
7359
  metadata: plan.changes.integrationsMetadata
7388
- },
7389
- secrets: {
7390
- previousKeys: context2.deployedGameInfo?.deployedSecrets,
7391
- currentKeys: context2.currentSecretKeys
7392
7360
  }
7393
7361
  });
7394
7362
  if (isNonInteractive()) {
@@ -7553,10 +7521,6 @@ async function reportDryRun(plan, context2) {
7553
7521
  previousKeys: context2.previousIntegrationKeys,
7554
7522
  currentKeys: currentIntegrationKeys,
7555
7523
  metadata: plan.changes.integrationsMetadata
7556
- },
7557
- secrets: {
7558
- previousKeys: context2.deployedGameInfo?.deployedSecrets,
7559
- currentKeys: context2.currentSecretKeys
7560
7524
  }
7561
7525
  });
7562
7526
  } else {
@@ -8016,45 +7980,6 @@ var INTERACTION_TYPE = Object.fromEntries(
8016
7980
  interactionTypeEnum.enumValues.map((value) => [value, value])
8017
7981
  );
8018
7982
 
8019
- // src/lib/deploy/secrets.ts
8020
- import { ApiError as ApiError3 } from "@playcademy/sdk/internal";
8021
- function compareSecrets(current, previous) {
8022
- const currentKeys = Object.keys(current);
8023
- const changes = [];
8024
- for (const key of currentKeys) {
8025
- if (!previous.includes(key)) {
8026
- changes.push({ key, type: "added" });
8027
- }
8028
- }
8029
- for (const key of previous) {
8030
- if (!currentKeys.includes(key)) {
8031
- changes.push({ key, type: "removed" });
8032
- }
8033
- }
8034
- return {
8035
- hasChanges: changes.length > 0,
8036
- changes
8037
- };
8038
- }
8039
- async function fetchSecretsForDeployment(slug) {
8040
- try {
8041
- const client = await requireAuthenticatedClient();
8042
- const secrets = await client.dev.games.secrets.get(slug);
8043
- const keys = Object.keys(secrets);
8044
- return { secrets, keys };
8045
- } catch (error) {
8046
- if (error instanceof ApiError3 && error.status === 404) {
8047
- logger.debug(`[Secrets] No secrets configured for project (404)`);
8048
- return { secrets: {}, keys: [] };
8049
- }
8050
- logger.warn(
8051
- `Could not fetch secrets: ${error instanceof Error ? error.message : String(error)}`
8052
- );
8053
- logger.debug(`[Secrets] Error details: ${error}`);
8054
- return { secrets: {}, keys: [] };
8055
- }
8056
- }
8057
-
8058
7983
  // src/lib/deploy/preparation.ts
8059
7984
  async function updateBuildMetadata(context2) {
8060
7985
  const { config, verbose } = context2;
@@ -8128,11 +8053,6 @@ async function prepareDeploymentContext(options) {
8128
8053
  buildHash = await hashFile(finalConfig.buildPath);
8129
8054
  }
8130
8055
  }
8131
- let currentSecretKeys;
8132
- if (finalConfig.slug && gameIsDeployed) {
8133
- const { keys } = await fetchSecretsForDeployment(finalConfig.slug);
8134
- currentSecretKeys = keys;
8135
- }
8136
8056
  return {
8137
8057
  config: finalConfig,
8138
8058
  fullConfig,
@@ -8154,7 +8074,6 @@ async function prepareDeploymentContext(options) {
8154
8074
  previousResources: deployedGameInfo?.deployedResources,
8155
8075
  previousIntegrationKeys: deployedGameInfo?.integrationKeys,
8156
8076
  previousIntegrationsHash: deployedGameInfo?.integrationsHash,
8157
- currentSecretKeys,
8158
8077
  isDryRun: options.dryRun ?? false,
8159
8078
  deployBackend: options.backend !== false,
8160
8079
  forceBackend: options.forceBackend ?? false,
@@ -8207,7 +8126,6 @@ async function analyzeChanges(context2) {
8207
8126
  }
8208
8127
  let backendChanged;
8209
8128
  let schemaChanged = false;
8210
- let secretsChanged = false;
8211
8129
  if (!deployBackend) {
8212
8130
  backendChanged = void 0;
8213
8131
  } else if (!context2.fullConfig) {
@@ -8237,19 +8155,6 @@ async function analyzeChanges(context2) {
8237
8155
  }
8238
8156
  }
8239
8157
  schemaChanged = await hasSchemaChanged(context2.deployedGameInfo?.schemaSnapshot);
8240
- if (context2.currentSecretKeys) {
8241
- const currentSecretKeys = context2.currentSecretKeys;
8242
- const previousSecretKeys = context2.deployedGameInfo?.deployedSecrets || [];
8243
- const secretsComparison = compareSecrets(
8244
- Object.fromEntries(currentSecretKeys.map((k) => [k, ""])),
8245
- // We only care about keys
8246
- previousSecretKeys
8247
- );
8248
- secretsChanged = secretsComparison.hasChanges;
8249
- if (secretsChanged && backendChanged !== void 0) {
8250
- backendChanged = backendChanged || secretsChanged;
8251
- }
8252
- }
8253
8158
  }
8254
8159
  let integrationsMetadataChanged;
8255
8160
  if (!context2.fullConfig?.integrations) {
@@ -8274,8 +8179,7 @@ async function analyzeChanges(context2) {
8274
8179
  backend: backendChanged,
8275
8180
  integrations: integrationsMetadataChanged,
8276
8181
  integrationsMetadata,
8277
- schema: schemaChanged,
8278
- secrets: secretsChanged
8182
+ schema: schemaChanged
8279
8183
  };
8280
8184
  }
8281
8185
  async function calculateDeploymentPlan(context2, changes) {
@@ -8307,8 +8211,7 @@ async function calculateDeploymentPlan(context2, changes) {
8307
8211
  }
8308
8212
  const shouldUpdateGame = changes.build !== false || changes.config;
8309
8213
  const shouldUploadBuild = changes.build === true;
8310
- const hasSecretsForUpdate = (context2.currentSecretKeys?.length ?? 0) > 0;
8311
- const needsBackend2 = hasLocalCustomRoutes(projectPath, context2.fullConfig) || !!context2.fullConfig?.integrations || hasSecretsForUpdate;
8214
+ const needsBackend2 = hasLocalCustomRoutes(projectPath, context2.fullConfig) || !!context2.fullConfig?.integrations;
8312
8215
  const shouldDeployBackend = deployBackend && (backendHasChanges || forceBackend || needsBackend2);
8313
8216
  return {
8314
8217
  action: "update-existing",
@@ -8542,20 +8445,11 @@ async function deployGame(context2, shouldUploadBuild, shouldDeployBackend) {
8542
8445
  bindings.bucket = [deploymentId];
8543
8446
  }
8544
8447
  const schemaInfo = await getSchemaInfo(context2.deployedGameInfo?.schemaSnapshot);
8545
- let secrets = {};
8546
- let secretKeys = [];
8547
- if (context2.existingGame) {
8548
- const secretsResult = await fetchSecretsForDeployment(config.slug);
8549
- secrets = secretsResult.secrets;
8550
- secretKeys = secretsResult.keys;
8551
- }
8552
8448
  const integrationKeys = getIntegrationKeys(fullConfig.integrations);
8553
8449
  const integrationsHash = fullConfig.integrations ? hashContent(fullConfig.integrations) : null;
8554
8450
  return {
8555
8451
  bindings,
8556
8452
  schemaInfo,
8557
- secrets,
8558
- secretKeys,
8559
8453
  integrationKeys,
8560
8454
  integrationsHash
8561
8455
  };
@@ -8568,8 +8462,7 @@ async function deployGame(context2, shouldUploadBuild, shouldDeployBackend) {
8568
8462
  backendBundle = {
8569
8463
  ...bundle,
8570
8464
  bindings: Object.keys(deploymentPrep.bindings).length > 0 ? deploymentPrep.bindings : void 0,
8571
- schema: deploymentPrep.schemaInfo || void 0,
8572
- secrets: Object.keys(deploymentPrep.secrets).length > 0 ? deploymentPrep.secrets : void 0
8465
+ schema: deploymentPrep.schemaInfo || void 0
8573
8466
  };
8574
8467
  const [serverSize, dbSize] = await Promise.all([
8575
8468
  getDirectorySize(join31(context2.projectPath, SERVER_ROOT_DIRECTORY)),
@@ -8585,7 +8478,6 @@ async function deployGame(context2, shouldUploadBuild, shouldDeployBackend) {
8585
8478
  schemaSnapshot: deploymentPrep.schemaInfo?.hash ? JSON.parse(deploymentPrep.schemaInfo.hash) : void 0,
8586
8479
  integrationKeys: deploymentPrep.integrationKeys,
8587
8480
  integrationsHash: deploymentPrep.integrationsHash,
8588
- deployedSecrets: deploymentPrep.secretKeys,
8589
8481
  deployedAt: (/* @__PURE__ */ new Date()).toISOString()
8590
8482
  };
8591
8483
  } else if (buildFile && !shouldDeployBackend) {
@@ -10275,7 +10167,7 @@ var logoutCommand = new Command4("logout").description("Log out from Playcademy"
10275
10167
 
10276
10168
  // src/commands/logs/index.ts
10277
10169
  import { Command as Command5 } from "commander";
10278
- import { ApiError as ApiError4 } from "@playcademy/sdk/internal";
10170
+ import { ApiError as ApiError3 } from "@playcademy/sdk/internal";
10279
10171
  async function runLogs(slugArg, options) {
10280
10172
  try {
10281
10173
  logger.newLine();
@@ -10302,7 +10194,7 @@ async function runLogs(slugArg, options) {
10302
10194
  token = result.token;
10303
10195
  workerId = result.workerId;
10304
10196
  } catch (error) {
10305
- if (error instanceof ApiError4 && error.status === 404) {
10197
+ if (error instanceof ApiError3 && error.status === 404) {
10306
10198
  logger.error(`Project not found: "${slug}"`);
10307
10199
  logger.newLine();
10308
10200
  process.exit(1);
@@ -10711,7 +10603,7 @@ var getStatusCommand = new Command13("status").description("Check your developer
10711
10603
  });
10712
10604
 
10713
10605
  // package.json
10714
- var version2 = "0.14.33";
10606
+ var version2 = "0.15.0";
10715
10607
 
10716
10608
  // src/commands/dev/server.ts
10717
10609
  function setupCleanupHandlers(workspace, getServer) {
@@ -13686,8 +13578,8 @@ import { Command as Command26 } from "commander";
13686
13578
  // src/commands/secret/delete.ts
13687
13579
  import { confirm as confirm14 } from "@inquirer/prompts";
13688
13580
  import { Command as Command23 } from "commander";
13689
- var deleteCommand2 = new Command23("delete").description("Delete a project secret").argument("<key>", "Secret key to delete").option("--env <environment>", "Environment (staging or production)").option("-f, --force", "Skip confirmation").option("--no-deploy", "Skip deployment prompt").action(async (key, options) => {
13690
- const { env, deploy: shouldPromptDeploy = true } = options;
13581
+ var deleteCommand2 = new Command23("delete").description("Delete a project secret").argument("<key>", "Secret key to delete").option("--env <environment>", "Environment (staging or production)").option("-f, --force", "Skip confirmation").action(async (key, options) => {
13582
+ const { env } = options;
13691
13583
  try {
13692
13584
  const environment = ensureEnvironment(env);
13693
13585
  const client = await requireAuthenticatedClient();
@@ -13730,28 +13622,6 @@ var deleteCommand2 = new Command23("delete").description("Delete a project secre
13730
13622
  `Secret deleted successfully from ${environment}`
13731
13623
  );
13732
13624
  logger.newLine();
13733
- if (shouldPromptDeploy) {
13734
- const shouldRedeploy = await confirm14({
13735
- message: `Redeploy now to apply this change?`,
13736
- default: true
13737
- });
13738
- if (shouldRedeploy) {
13739
- await deployCommand.parseAsync(["--env", environment], {
13740
- from: "user"
13741
- });
13742
- } else {
13743
- logger.newLine();
13744
- logger.admonition("tip", "Next Steps", [
13745
- `Remember to deploy your project to apply the secret: \`playcademy deploy\``
13746
- ]);
13747
- logger.newLine();
13748
- }
13749
- } else {
13750
- logger.admonition("tip", "Next Steps", [
13751
- `Remember to deploy your project to apply the secret: \`playcademy deploy\``
13752
- ]);
13753
- logger.newLine();
13754
- }
13755
13625
  } catch (error) {
13756
13626
  logAndExit(error, { prefix: "Failed to delete secret" });
13757
13627
  }
@@ -13806,10 +13676,9 @@ var listCommand2 = new Command24("list").description("List project secret keys")
13806
13676
  });
13807
13677
 
13808
13678
  // src/commands/secret/set.ts
13809
- import { confirm as confirm15 } from "@inquirer/prompts";
13810
13679
  import { Command as Command25 } from "commander";
13811
- var setCommand = new Command25("set").description("Set or update a project secret").argument("<key>", "Secret key (e.g., STRIPE_KEY)").argument("<value>", "Secret value").option("--env <environment>", "Environment (staging or production)").option("--no-deploy", "Skip deployment prompt").action(async (key, value, options) => {
13812
- const { env, deploy: shouldPromptDeploy = true } = options;
13680
+ var setCommand = new Command25("set").description("Set or update a project secret").argument("<key>", "Secret key (e.g., STRIPE_KEY)").argument("<value>", "Secret value").option("--env <environment>", "Environment (staging or production)").action(async (key, value, options) => {
13681
+ const { env } = options;
13813
13682
  try {
13814
13683
  const environment = ensureEnvironment(env);
13815
13684
  const client = await requireAuthenticatedClient();
@@ -13837,31 +13706,9 @@ var setCommand = new Command25("set").description("Set or update a project secre
13837
13706
  await runStep(
13838
13707
  `Setting secret "${key}" in ${environment}`,
13839
13708
  () => client.dev.games.secrets.set(game.slug, { [key]: value }),
13840
- `Secret "${key}" set successfully in ${environment}`
13709
+ `Secret "${key}" applied to ${environment}`
13841
13710
  );
13842
13711
  logger.newLine();
13843
- if (shouldPromptDeploy) {
13844
- const shouldRedeploy = await confirm15({
13845
- message: `Redeploy now to apply this change?`,
13846
- default: true
13847
- });
13848
- if (shouldRedeploy) {
13849
- await deployCommand.parseAsync(["--env", environment], {
13850
- from: "user"
13851
- });
13852
- } else {
13853
- logger.newLine();
13854
- logger.admonition("tip", "Next Steps", [
13855
- `Remember to deploy your project to apply the secret: \`playcademy deploy\``
13856
- ]);
13857
- logger.newLine();
13858
- }
13859
- } else {
13860
- logger.admonition("tip", "Next Steps", [
13861
- `Remember to deploy your project to apply the secret: \`playcademy deploy\``
13862
- ]);
13863
- logger.newLine();
13864
- }
13865
13712
  } catch (error) {
13866
13713
  logAndExit(error, { prefix: "Failed to set secret" });
13867
13714
  }
@@ -13961,7 +13808,7 @@ var removeCommand = new Command29("remove").alias("rm").description('Remove an a
13961
13808
  });
13962
13809
 
13963
13810
  // src/commands/profiles/reset.ts
13964
- import { confirm as confirm16 } from "@inquirer/prompts";
13811
+ import { confirm as confirm15 } from "@inquirer/prompts";
13965
13812
  import { Command as Command30 } from "commander";
13966
13813
  var resetCommand = new Command30("reset").description(
13967
13814
  "Remove all authentication profiles across all environments (requires confirmation)"
@@ -13999,7 +13846,7 @@ var resetCommand = new Command30("reset").description(
13999
13846
  logger.newLine();
14000
13847
  }
14001
13848
  }
14002
- const confirmed = await confirm16({
13849
+ const confirmed = await confirm15({
14003
13850
  message: "Are you sure you want to remove all profiles?",
14004
13851
  default: false
14005
13852
  });
@@ -14048,7 +13895,7 @@ profilesCommand.addCommand(resetCommand);
14048
13895
  import { Command as Command37 } from "commander";
14049
13896
 
14050
13897
  // src/commands/timeback/cleanup.ts
14051
- import { confirm as confirm17 } from "@inquirer/prompts";
13898
+ import { confirm as confirm16 } from "@inquirer/prompts";
14052
13899
  import { Command as Command32 } from "commander";
14053
13900
  var cleanupCommand = new Command32("cleanup").description("Remove TimeBack integration from your project").option(
14054
13901
  "--env <environment>",
@@ -14072,7 +13919,7 @@ var cleanupCommand = new Command32("cleanup").description("Remove TimeBack integ
14072
13919
  return;
14073
13920
  }
14074
13921
  displayCleanupWarning(integrations, game.displayName, logger);
14075
- const confirmed = await confirm17({
13922
+ const confirmed = await confirm16({
14076
13923
  message: "Are you sure you want to remove TimeBack integration?",
14077
13924
  default: false
14078
13925
  });
@@ -14436,7 +14283,7 @@ import { Command as Command40 } from "commander";
14436
14283
 
14437
14284
  // src/commands/vite/config.ts
14438
14285
  import path3 from "node:path";
14439
- import { confirm as confirm18 } from "@inquirer/prompts";
14286
+ import { confirm as confirm17 } from "@inquirer/prompts";
14440
14287
  import { dim as dim12 } from "colorette";
14441
14288
  async function runViteConfig() {
14442
14289
  try {
@@ -14446,7 +14293,7 @@ async function runViteConfig() {
14446
14293
  if (!existingViteConfig) {
14447
14294
  logger.warn("No vite config file found in your project");
14448
14295
  logger.newLine();
14449
- const shouldCreate = await confirm18({
14296
+ const shouldCreate = await confirm17({
14450
14297
  message: "Would you like to create a new vite.config.ts?",
14451
14298
  default: true
14452
14299
  });
package/dist/utils.js CHANGED
@@ -2321,7 +2321,7 @@ import { join as join12 } from "path";
2321
2321
  // package.json with { type: 'json' }
2322
2322
  var package_default2 = {
2323
2323
  name: "playcademy",
2324
- version: "0.14.33",
2324
+ version: "0.15.0",
2325
2325
  type: "module",
2326
2326
  exports: {
2327
2327
  ".": {
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.14.33",
4
+ version: "0.15.0",
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.34",
3
+ "version": "0.15.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@inquirer/prompts": "^7.8.6",
53
- "@playcademy/sdk": "0.2.4",
53
+ "@playcademy/sdk": "0.2.5",
54
54
  "chokidar": "^4.0.3",
55
55
  "colorette": "^2.0.20",
56
56
  "commander": "^14.0.1",