playcademy 0.14.8 → 0.14.9

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
@@ -7142,7 +7142,7 @@ import { join as join15 } from "path";
7142
7142
  // package.json
7143
7143
  var package_default2 = {
7144
7144
  name: "playcademy",
7145
- version: "0.14.7",
7145
+ version: "0.14.8",
7146
7146
  type: "module",
7147
7147
  exports: {
7148
7148
  ".": {
@@ -7825,7 +7825,7 @@ function generateBindingsTypeString(features) {
7825
7825
  return bindings.length > 0 ? "\n" + bindings.join("\n") : "";
7826
7826
  }
7827
7827
  function generateAuthVariablesString(hasAuth, hasAuthFile) {
7828
- const authImport = hasAuthFile ? "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/server.d.ts'\nimport type { User } from './server/lib/auth'" : "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/server.d.ts'";
7828
+ const authImport = hasAuthFile ? "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/types.d.ts'\nimport type { User } from './server/lib/auth'" : "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/types.d.ts'";
7829
7829
  const variableFields = [" playcademyUser?: UserInfo"];
7830
7830
  if (hasAuth && hasAuthFile) {
7831
7831
  variableFields.push(" user?: User");
@@ -13940,8 +13940,8 @@ import { Command as Command24 } from "commander";
13940
13940
  init_src();
13941
13941
  import { confirm as confirm13 } from "@inquirer/prompts";
13942
13942
  import { Command as Command21 } from "commander";
13943
- var deleteCommand2 = new Command21("delete").description("Delete a game secret").argument("<key>", "Secret key to delete").option("--env <environment>", "Environment (staging or production)").option("-f, --force", "Skip confirmation").action(async (key, options) => {
13944
- const { env } = options;
13943
+ var deleteCommand2 = new Command21("delete").description("Delete a game 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) => {
13944
+ const { env, deploy: shouldPromptDeploy = true } = options;
13945
13945
  try {
13946
13946
  const environment = ensureEnvironment(env);
13947
13947
  const client = await requireAuthenticatedClient();
@@ -13975,6 +13975,28 @@ var deleteCommand2 = new Command21("delete").description("Delete a game secret")
13975
13975
  `Secret deleted successfully from ${environment}`
13976
13976
  );
13977
13977
  logger.newLine();
13978
+ if (shouldPromptDeploy) {
13979
+ const shouldRedeploy = await confirm13({
13980
+ message: `Redeploy now to apply this change?`,
13981
+ default: true
13982
+ });
13983
+ if (shouldRedeploy) {
13984
+ await deployCommand.parseAsync(["--env", environment], {
13985
+ from: "user"
13986
+ });
13987
+ } else {
13988
+ logger.newLine();
13989
+ logger.admonition("tip", "Next Steps", [
13990
+ `Remember to deploy your game to apply the secret: \`playcademy deploy\``
13991
+ ]);
13992
+ logger.newLine();
13993
+ }
13994
+ } else {
13995
+ logger.admonition("tip", "Next Steps", [
13996
+ `Remember to deploy your game to apply the secret: \`playcademy deploy\``
13997
+ ]);
13998
+ logger.newLine();
13999
+ }
13978
14000
  } catch (error) {
13979
14001
  logAndExit(error, logger, { prefix: "Failed to delete secret" });
13980
14002
  }
@@ -14023,9 +14045,10 @@ var listCommand2 = new Command22("list").description("List game secret keys").op
14023
14045
 
14024
14046
  // src/commands/secret/set.ts
14025
14047
  init_src();
14048
+ import { confirm as confirm14 } from "@inquirer/prompts";
14026
14049
  import { Command as Command23 } from "commander";
14027
- var setCommand = new Command23("set").description("Set or update a game 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) => {
14028
- const { env } = options;
14050
+ var setCommand = new Command23("set").description("Set or update a game 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) => {
14051
+ const { env, deploy: shouldPromptDeploy = true } = options;
14029
14052
  try {
14030
14053
  const environment = ensureEnvironment(env);
14031
14054
  const client = await requireAuthenticatedClient();
@@ -14047,10 +14070,28 @@ var setCommand = new Command23("set").description("Set or update a game secret")
14047
14070
  `Secret "${key}" set successfully in ${environment}`
14048
14071
  );
14049
14072
  logger.newLine();
14050
- logger.admonition("tip", "Remember", [
14051
- `Remember to deploy your game to apply the secret: \`playcademy deploy\``
14052
- ]);
14053
- logger.newLine();
14073
+ if (shouldPromptDeploy) {
14074
+ const shouldRedeploy = await confirm14({
14075
+ message: `Redeploy now to apply this change?`,
14076
+ default: true
14077
+ });
14078
+ if (shouldRedeploy) {
14079
+ await deployCommand.parseAsync(["--env", environment], {
14080
+ from: "user"
14081
+ });
14082
+ } else {
14083
+ logger.newLine();
14084
+ logger.admonition("tip", "Next Steps", [
14085
+ `Remember to deploy your game to apply the secret: \`playcademy deploy\``
14086
+ ]);
14087
+ logger.newLine();
14088
+ }
14089
+ } else {
14090
+ logger.admonition("tip", "Next Steps", [
14091
+ `Remember to deploy your game to apply the secret: \`playcademy deploy\``
14092
+ ]);
14093
+ logger.newLine();
14094
+ }
14054
14095
  } catch (error) {
14055
14096
  logAndExit(error, logger, { prefix: "Failed to set secret" });
14056
14097
  }
@@ -14153,7 +14194,7 @@ var removeCommand = new Command27("remove").alias("rm").description('Remove an a
14153
14194
 
14154
14195
  // src/commands/profiles/reset.ts
14155
14196
  init_string();
14156
- import { confirm as confirm14 } from "@inquirer/prompts";
14197
+ import { confirm as confirm15 } from "@inquirer/prompts";
14157
14198
  import { Command as Command28 } from "commander";
14158
14199
  var resetCommand = new Command28("reset").description(
14159
14200
  "Remove all authentication profiles across all environments (requires confirmation)"
@@ -14191,7 +14232,7 @@ var resetCommand = new Command28("reset").description(
14191
14232
  logger.newLine();
14192
14233
  }
14193
14234
  }
14194
- const confirmed = await confirm14({
14235
+ const confirmed = await confirm15({
14195
14236
  message: "Are you sure you want to remove all profiles?",
14196
14237
  default: false
14197
14238
  });
@@ -14241,7 +14282,7 @@ import { Command as Command35 } from "commander";
14241
14282
 
14242
14283
  // src/commands/timeback/cleanup.ts
14243
14284
  init_src();
14244
- import { confirm as confirm15 } from "@inquirer/prompts";
14285
+ import { confirm as confirm16 } from "@inquirer/prompts";
14245
14286
  import { Command as Command30 } from "commander";
14246
14287
  var cleanupCommand = new Command30("cleanup").description("Remove TimeBack integration for your game").option(
14247
14288
  "--env <environment>",
@@ -14265,7 +14306,7 @@ var cleanupCommand = new Command30("cleanup").description("Remove TimeBack integ
14265
14306
  return;
14266
14307
  }
14267
14308
  displayCleanupWarning(integration, game.displayName, logger);
14268
- const confirmed = await confirm15({
14309
+ const confirmed = await confirm16({
14269
14310
  message: "Are you sure you want to remove TimeBack integration?",
14270
14311
  default: false
14271
14312
  });
@@ -14436,7 +14477,7 @@ var setupCommand = new Command32("setup").description("Set up TimeBack integrati
14436
14477
  // src/commands/timeback/update.ts
14437
14478
  init_src();
14438
14479
  init_string();
14439
- import { confirm as confirm16 } from "@inquirer/prompts";
14480
+ import { confirm as confirm17 } from "@inquirer/prompts";
14440
14481
  import { green as green4, red as red4 } from "colorette";
14441
14482
  import { Command as Command33 } from "commander";
14442
14483
  var updateCommand = new Command33("update").description("Update TimeBack integration configuration for your game").option("--verbose, -v", "Output detailed information").option(
@@ -14517,7 +14558,7 @@ var updateCommand = new Command33("update").description("Update TimeBack integra
14517
14558
  logger.data(change.label, `${red4(change.current)} \u2192 ${green4(change.next)}`, 1);
14518
14559
  }
14519
14560
  logger.newLine();
14520
- const confirmed = await confirm16({
14561
+ const confirmed = await confirm17({
14521
14562
  message: `Update ${changeDetails.length} ${pluralize(changeDetails.length, "field")} in TimeBack?`,
14522
14563
  default: false
14523
14564
  });
@@ -14703,7 +14744,7 @@ import { Command as Command38 } from "commander";
14703
14744
  // src/commands/vite/init.ts
14704
14745
  init_package_manager();
14705
14746
  import path3 from "node:path";
14706
- import { confirm as confirm17 } from "@inquirer/prompts";
14747
+ import { confirm as confirm18 } from "@inquirer/prompts";
14707
14748
  import { dim as dim9, underline as underline7 } from "colorette";
14708
14749
  async function runViteInit() {
14709
14750
  try {
@@ -14713,7 +14754,7 @@ async function runViteInit() {
14713
14754
  if (!existingViteConfig) {
14714
14755
  logger.warn("No vite config file found in your project");
14715
14756
  logger.newLine();
14716
- const shouldCreate = await confirm17({
14757
+ const shouldCreate = await confirm18({
14717
14758
  message: "Would you like to create a new vite.config.ts?",
14718
14759
  default: true
14719
14760
  });
package/dist/utils.js CHANGED
@@ -3829,7 +3829,7 @@ import { join as join8 } from "path";
3829
3829
  // package.json
3830
3830
  var package_default2 = {
3831
3831
  name: "playcademy",
3832
- version: "0.14.7",
3832
+ version: "0.14.8",
3833
3833
  type: "module",
3834
3834
  exports: {
3835
3835
  ".": {
@@ -4096,7 +4096,7 @@ function generateBindingsTypeString(features) {
4096
4096
  return bindings.length > 0 ? "\n" + bindings.join("\n") : "";
4097
4097
  }
4098
4098
  function generateAuthVariablesString(hasAuth, hasAuthFile) {
4099
- const authImport = hasAuthFile ? "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/server.d.ts'\nimport type { User } from './server/lib/auth'" : "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/server.d.ts'";
4099
+ const authImport = hasAuthFile ? "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/types.d.ts'\nimport type { User } from './server/lib/auth'" : "\nimport type { UserInfo } from './node_modules/@playcademy/sdk/dist/types.d.ts'";
4100
4100
  const variableFields = [" playcademyUser?: UserInfo"];
4101
4101
  if (hasAuth && hasAuthFile) {
4102
4102
  variableFields.push(" user?: User");
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.7",
4
+ version: "0.14.8",
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.8",
3
+ "version": "0.14.9",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {