playcademy 0.25.1-beta.3 → 0.25.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/bucket.js CHANGED
@@ -94,7 +94,7 @@ var DEFAULT_API_ROUTES_DIRECTORY = join2(SERVER_ROOT_DIRECTORY, "api");
94
94
  // ../better-auth/package.json
95
95
  var package_default = {
96
96
  name: "@playcademy/better-auth",
97
- version: "0.0.18-beta.3",
97
+ version: "0.0.17",
98
98
  type: "module",
99
99
  exports: {
100
100
  "./server": {
package/dist/cli.js CHANGED
@@ -555,6 +555,16 @@ var logger = {
555
555
  const value = `${red(oldSize)} \u2192 ${green(newSize)} ${delta}`;
556
556
  writeOut(`${spaces}${dim(`${label}:`)} ${bold(value)}`);
557
557
  },
558
+ /**
559
+ * Format an old → new change as `red(from) → green(to)`, optionally prefixed
560
+ * with a bold label. Returns the string (does not print) so it composes into
561
+ * admonition lines, `data` values, or prints directly. This is the canonical
562
+ * before→after styling across the CLI — versions, sizes, config values, etc.
563
+ */
564
+ change: (from, to, label) => {
565
+ const transition = `${red(from)} \u2192 ${green(to)}`;
566
+ return label ? `${bold(label)} ${transition}` : transition;
567
+ },
558
568
  /**
559
569
  * JSON output - pretty-printed JSON
560
570
  */
@@ -1115,7 +1125,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
1115
1125
  // ../better-auth/package.json
1116
1126
  var package_default = {
1117
1127
  name: "@playcademy/better-auth",
1118
- version: "0.0.18-beta.3",
1128
+ version: "0.0.17",
1119
1129
  type: "module",
1120
1130
  exports: {
1121
1131
  "./server": {
@@ -2983,7 +2993,7 @@ import { existsSync as existsSync11, mkdirSync as mkdirSync5, readFileSync as re
2983
2993
  import { join as join13 } from "node:path";
2984
2994
 
2985
2995
  // src/version.ts
2986
- var cliVersion = false ? "0.0.0-dev" : "0.25.1-beta.3";
2996
+ var cliVersion = false ? "0.0.0-dev" : "0.25.1-beta.4";
2987
2997
 
2988
2998
  // src/lib/init/database.ts
2989
2999
  var drizzleConfigTemplate = loadTemplateString("database/drizzle-config.ts");
@@ -291,6 +291,12 @@ declare const CLI_USER_DIRECTORIES: {
291
291
  readonly BIN: string;
292
292
  readonly CACHE: string;
293
293
  };
294
+ /**
295
+ * Resolve the CLI config directory, honoring the `PLAYCADEMY_TEST_STORAGE_DIR`
296
+ * test override. Shared by every persisted-state module (auth store, channel
297
+ * preference, nudge cooldown) so the override is defined in one place.
298
+ */
299
+ declare function getConfigDir(): string;
294
300
  declare function nativeBinaryPath(name: string): string;
295
301
  declare function cacheVersionDir(version: string): string;
296
302
  declare const CLI_DEFAULT_OUTPUTS: {
@@ -350,4 +356,4 @@ declare const CONFIG_FILE_NAMES: string[];
350
356
  */
351
357
  declare const DOCS_URL = "https://docs.dev.playcademy.net/platform";
352
358
 
353
- export { AUTH_API_SUBDIRECTORY, AUTH_CONFIG_FILE, AUTH_PROVIDER_NAMES, BETTER_AUTH_VERSION, BUCKET_ALWAYS_SKIP, CALLBACK_PATH, CALLBACK_PORT, CLI_DEFAULT_OUTPUTS, CLI_DIRECTORIES, CLI_FILES, CLI_USER_DIRECTORIES, CLOUDFLARE_BINDINGS, CONFIG_FILE_NAMES, DB_FILES, DEFAULT_API_ROUTES_DIRECTORY, DEFAULT_BUCKET_DIRECTORY, DEFAULT_DATABASE_DIRECTORY, DEFAULT_PORTS, DEFAULT_TEMPLATE_REF, DOCS_URL, DRIZZLE_CONFIG_FILES, ENV_EXAMPLE_FILE, ENV_FILES, GODOT_ADDON_URL, GODOT_BUILD_DIRECTORIES, GODOT_BUILD_OUTPUTS, GODOT_EXECUTABLE_PATTERNS, GODOT_EXPORT_PRESETS_FILE, GODOT_PROJECT_FILE, GODOT_WEB_PLATFORM, HOOKS_FILE, MINIFLARE_D1_DIRECTORY, OAUTH_CALLBACK_URL_PATTERN, PLACEHOLDER_APP_URL, PLAYCADEMY_AUTH_VERSION, PRESIGNED_UPLOAD_THRESHOLD, PUBLIC_DIRECTORY, QUEUE_NAME_PREFIX, SAMPLE_API_SUBDIRECTORY, SAMPLE_BUCKET_FILENAME, SAMPLE_CUSTOM_FILENAME, SAMPLE_DATABASE_FILENAME, SAMPLE_KV_FILENAME, SCHEMA_SUBDIRECTORY, SELF_WORKER_NAME_BINDING, SERVER_LIB_DIRECTORY, SERVER_ROOT_DIRECTORY, SSO_AUTH_TIMEOUT_MS, TEMPLATE_RENAME_FILES, TEMPLATE_REPOS, TSCONFIG_APP_JSON, TSCONFIG_FILES, TSCONFIG_JSON, TSCONFIG_REQUIRED_INCLUDES, WORKSPACE_NAME, cacheVersionDir, nativeBinaryPath };
359
+ export { AUTH_API_SUBDIRECTORY, AUTH_CONFIG_FILE, AUTH_PROVIDER_NAMES, BETTER_AUTH_VERSION, BUCKET_ALWAYS_SKIP, CALLBACK_PATH, CALLBACK_PORT, CLI_DEFAULT_OUTPUTS, CLI_DIRECTORIES, CLI_FILES, CLI_USER_DIRECTORIES, CLOUDFLARE_BINDINGS, CONFIG_FILE_NAMES, DB_FILES, DEFAULT_API_ROUTES_DIRECTORY, DEFAULT_BUCKET_DIRECTORY, DEFAULT_DATABASE_DIRECTORY, DEFAULT_PORTS, DEFAULT_TEMPLATE_REF, DOCS_URL, DRIZZLE_CONFIG_FILES, ENV_EXAMPLE_FILE, ENV_FILES, GODOT_ADDON_URL, GODOT_BUILD_DIRECTORIES, GODOT_BUILD_OUTPUTS, GODOT_EXECUTABLE_PATTERNS, GODOT_EXPORT_PRESETS_FILE, GODOT_PROJECT_FILE, GODOT_WEB_PLATFORM, HOOKS_FILE, MINIFLARE_D1_DIRECTORY, OAUTH_CALLBACK_URL_PATTERN, PLACEHOLDER_APP_URL, PLAYCADEMY_AUTH_VERSION, PRESIGNED_UPLOAD_THRESHOLD, PUBLIC_DIRECTORY, QUEUE_NAME_PREFIX, SAMPLE_API_SUBDIRECTORY, SAMPLE_BUCKET_FILENAME, SAMPLE_CUSTOM_FILENAME, SAMPLE_DATABASE_FILENAME, SAMPLE_KV_FILENAME, SCHEMA_SUBDIRECTORY, SELF_WORKER_NAME_BINDING, SERVER_LIB_DIRECTORY, SERVER_ROOT_DIRECTORY, SSO_AUTH_TIMEOUT_MS, TEMPLATE_RENAME_FILES, TEMPLATE_REPOS, TSCONFIG_APP_JSON, TSCONFIG_FILES, TSCONFIG_JSON, TSCONFIG_REQUIRED_INCLUDES, WORKSPACE_NAME, cacheVersionDir, getConfigDir, nativeBinaryPath };
package/dist/constants.js CHANGED
@@ -20,7 +20,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
20
20
  // ../better-auth/package.json
21
21
  var package_default = {
22
22
  name: "@playcademy/better-auth",
23
- version: "0.0.18-beta.3",
23
+ version: "0.0.17",
24
24
  type: "module",
25
25
  exports: {
26
26
  "./server": {
@@ -199,6 +199,9 @@ var CLI_USER_DIRECTORIES = {
199
199
  BIN: join5(PLAYCADEMY_HOME, "bin"),
200
200
  CACHE: join5(PLAYCADEMY_HOME, "cache")
201
201
  };
202
+ function getConfigDir() {
203
+ return process.env.PLAYCADEMY_TEST_STORAGE_DIR ?? CLI_USER_DIRECTORIES.CONFIG;
204
+ }
202
205
  function nativeBinaryPath(name) {
203
206
  const ext = process.platform === "win32" ? ".exe" : "";
204
207
  return join5(CLI_USER_DIRECTORIES.BIN, `${name}${ext}`);
@@ -324,5 +327,6 @@ export {
324
327
  TSCONFIG_REQUIRED_INCLUDES,
325
328
  WORKSPACE_NAME,
326
329
  cacheVersionDir,
330
+ getConfigDir,
327
331
  nativeBinaryPath
328
332
  };
package/dist/db.js CHANGED
@@ -36,7 +36,7 @@ var DEFAULT_API_ROUTES_DIRECTORY = join2(SERVER_ROOT_DIRECTORY, "api");
36
36
  // ../better-auth/package.json
37
37
  var package_default = {
38
38
  name: "@playcademy/better-auth",
39
- version: "0.0.18-beta.3",
39
+ version: "0.0.17",
40
40
  type: "module",
41
41
  exports: {
42
42
  "./server": {
@@ -1046,6 +1046,16 @@ var logger = {
1046
1046
  const value = `${red(oldSize)} \u2192 ${green(newSize)} ${delta}`;
1047
1047
  writeOut(`${spaces}${dim3(`${label}:`)} ${bold3(value)}`);
1048
1048
  },
1049
+ /**
1050
+ * Format an old → new change as `red(from) → green(to)`, optionally prefixed
1051
+ * with a bold label. Returns the string (does not print) so it composes into
1052
+ * admonition lines, `data` values, or prints directly. This is the canonical
1053
+ * before→after styling across the CLI — versions, sizes, config values, etc.
1054
+ */
1055
+ change: (from, to, label) => {
1056
+ const transition = `${red(from)} \u2192 ${green(to)}`;
1057
+ return label ? `${bold3(label)} ${transition}` : transition;
1058
+ },
1049
1059
  /**
1050
1060
  * JSON output - pretty-printed JSON
1051
1061
  */
package/dist/index.d.ts CHANGED
@@ -996,6 +996,93 @@ interface BackendRuntimePaths {
996
996
  /** Runtime metadata exposed by /api/health */
997
997
  manifest: BackendRuntimeManifest;
998
998
  }
999
+ /**
1000
+ * The keys the compatibility manifest can constrain. `cli` is the standalone
1001
+ * binary; the rest are npm package names as they appear in a project's
1002
+ * package.json.
1003
+ *
1004
+ * This is intentionally a SUBSET of the packages `playcademy deps update`
1005
+ * updates (`MANAGED_PACKAGES` in `lib/deps/discovery.ts`): the gate only
1006
+ * blocks deploys on the deploy-critical packages, while `deps` updates
1007
+ * everything publishable. `better-auth` and `sandbox` are updatable but not
1008
+ * gated.
1009
+ */
1010
+ type CompatibilityKey = 'cli' | '@playcademy/sdk' | '@playcademy/vite-plugin';
1011
+ interface CompatibilityManifest {
1012
+ /** ISO date (YYYY-MM-DD) the manifest was last edited — informational. */
1013
+ updatedAt: string;
1014
+ /** Map of component → minimum supported version (bare semver, no range). */
1015
+ minimumVersions: Partial<Record<CompatibilityKey, string>>;
1016
+ }
1017
+ /** A component installed below the manifest's minimum version. */
1018
+ interface Violation {
1019
+ /** The component that's out of date. */
1020
+ name: CompatibilityKey;
1021
+ /** The installed version. */
1022
+ installed: string;
1023
+ /** The minimum required version from the manifest. */
1024
+ required: string;
1025
+ /** The command that resolves it. */
1026
+ fix: string;
1027
+ }
1028
+ /** Installed versions to check against the manifest. Absent keys are skipped. */
1029
+ type InstalledVersions = Partial<Record<CompatibilityKey, string>>;
1030
+
1031
+ /**
1032
+ * Dependency Discovery
1033
+ *
1034
+ * Finds installed `@playcademy/*` packages in a project's package.json so the
1035
+ * `deps` command knows what to update. Only the publishable, developer-facing
1036
+ * packages are considered — internal/private packages are never installed in a
1037
+ * game project and must not be touched.
1038
+ */
1039
+
1040
+ /**
1041
+ * Publishable `@playcademy/*` packages a game developer can have as
1042
+ * dependencies. Kept as an explicit allowlist rather than matching every
1043
+ * `@playcademy/*` entry so that a stray internal package (or a typo) is never
1044
+ * upgraded out from under the user.
1045
+ */
1046
+ declare const MANAGED_PACKAGES: readonly ['@playcademy/sdk', '@playcademy/better-auth', '@playcademy/sandbox', '@playcademy/vite-plugin'];
1047
+ type ManagedPackage = (typeof MANAGED_PACKAGES)[number];
1048
+
1049
+ /**
1050
+ * A discovered `@playcademy/*` dependency, with where it lives in package.json
1051
+ * so the update can re-add it to the correct field.
1052
+ */
1053
+ interface DiscoveredDependency {
1054
+ name: ManagedPackage;
1055
+ /** The version range currently declared in package.json (e.g. `^0.10.0`). */
1056
+ currentRange: string;
1057
+ /** Whether it lives in `devDependencies` (vs `dependencies`). */
1058
+ dev: boolean;
1059
+ }
1060
+ /** A workspace and the managed dependencies discovered in it. */
1061
+ interface WorkspaceDependencies {
1062
+ workspace: string;
1063
+ discovered: DiscoveredDependency[];
1064
+ }
1065
+ /** A discovered dependency's installed version checked against the registry. */
1066
+ interface DependencyCheck {
1067
+ dep: DiscoveredDependency;
1068
+ /** Version in node_modules, or `null` if not installed. */
1069
+ installed: string | null;
1070
+ /** Latest published version, or `null` if the registry was unreachable. */
1071
+ latest: string | null;
1072
+ /** Whether installed >= latest (false when either side is unknown). */
1073
+ current: boolean;
1074
+ }
1075
+ /**
1076
+ * A package-manager command planned for a group of dependencies.
1077
+ */
1078
+ interface UpdateCommand {
1079
+ /** Whether this command targets devDependencies. */
1080
+ dev: boolean;
1081
+ /** The packages this command updates (for display). */
1082
+ packages: string[];
1083
+ /** The full shell command to run. */
1084
+ command: string;
1085
+ }
999
1086
 
1000
1087
  /**
1001
1088
  * Logger interface for embedding in other tools (e.g., vite plugin)
@@ -1354,6 +1441,13 @@ interface LogStreamConfig {
1354
1441
  json?: boolean;
1355
1442
  }
1356
1443
 
1444
+ /** A component with a newer version available than what's installed. */
1445
+ interface AvailableUpdate {
1446
+ name: 'cli' | ManagedPackage;
1447
+ installed: string;
1448
+ latest: string;
1449
+ }
1450
+
1357
1451
  /**
1358
1452
  * Preview options
1359
1453
  */
@@ -1483,4 +1577,11 @@ interface ApplySecretsOptions {
1483
1577
  workspace: string;
1484
1578
  }
1485
1579
 
1486
- export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, ApplySecretsOptions, AssetManifest, AuthProfile, AuthStore, AuthStrategy, BackendBundle, BackendDeploymentMetadata, BackendDiff, BackendFeatures, BackendRuntimeManifest, BackendRuntimePaths, BaseKVOptions, BucketAdapter, BucketGetOptions, BucketListOptions, BucketMigrateMode, BucketObjectRef, BucketPutOptions, BucketSyncOptions, BuildDiff, BundleOptions, CallbackServerResult, CheckSecretsOptions, CollectedFile, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DatabaseIntegrationOptions, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, DevServerOptions, EngineConfig, EngineType, EnvironmentAuthProfiles, GameStore, HashedFile, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KVClearOptions, KVDeleteOptions, KVDumpOptions, KVGetOptions, KVInspectOptions, KVListOptions, KVSeedOptions, KVSetOptions, KVStatsOptions, KeyMetadata, KeyStats, LoadConfigResult, LogEntry, LogStreamConfig, LogStreamUrlOptions, LoginCredentials, LoginResponse, MissingSecret, PlaycademyConfig, PluginLogger, PreviewOptions, PreviewResponse, ProjectDirectoryInfo, QueueConfig, ScaffoldResult, SecretCommandOptions, SecretListOptions, SecretPushOptions, SecretsSyncOptions, SecretsSyncResult, SignInResponse, SsoCallbackData, Template, TemplateFramework, TemplateHook, TemplateHookOptions, TemplateSource, TimebackBaseConfig, TimebackCourseConfigWithOverrides, TimebackIntegrationConfig, TokenType, UpdateExistingGameOptions };
1580
+ interface RunShellOptions {
1581
+ /** Working directory for the command. */
1582
+ cwd?: string;
1583
+ /** Environment for the child; defaults to the current process env. */
1584
+ env?: NodeJS.ProcessEnv;
1585
+ }
1586
+
1587
+ export type { ApiConfig, ApiErrorResponse, ApiKeyListItem, ApiKeyWithSecret, ApiRequestOptions, ApplySecretsOptions, AssetManifest, AuthProfile, AuthStore, AuthStrategy, AvailableUpdate, BackendBundle, BackendDeploymentMetadata, BackendDiff, BackendFeatures, BackendRuntimeManifest, BackendRuntimePaths, BaseKVOptions, BucketAdapter, BucketGetOptions, BucketListOptions, BucketMigrateMode, BucketObjectRef, BucketPutOptions, BucketSyncOptions, BuildDiff, BundleOptions, CallbackServerResult, CheckSecretsOptions, CollectedFile, CompatibilityKey, CompatibilityManifest, ConfigDiff, CreateApiKeyResponse, CustomRoutesIntegrationOptions, DatabaseIntegrationOptions, DependencyCheck, DeployConfig, DeployNewGameOptions, DeployedGameInfo, DeploymentChanges, DeploymentContext, DeploymentDiffOptions, DeploymentPlan, DeploymentResult, DevServerOptions, DiscoveredDependency, EngineConfig, EngineType, EnvironmentAuthProfiles, GameStore, HashedFile, InstalledVersions, IntegrationChangeDetector, IntegrationChangeDetectors, IntegrationConfigChange, IntegrationsConfig, IntegrationsDiff, KVClearOptions, KVDeleteOptions, KVDumpOptions, KVGetOptions, KVInspectOptions, KVListOptions, KVSeedOptions, KVSetOptions, KVStatsOptions, KeyMetadata, KeyStats, LoadConfigResult, LogEntry, LogStreamConfig, LogStreamUrlOptions, LoginCredentials, LoginResponse, MissingSecret, PlaycademyConfig, PluginLogger, PreviewOptions, PreviewResponse, ProjectDirectoryInfo, QueueConfig, RunShellOptions, ScaffoldResult, SecretCommandOptions, SecretListOptions, SecretPushOptions, SecretsSyncOptions, SecretsSyncResult, SignInResponse, SsoCallbackData, Template, TemplateFramework, TemplateHook, TemplateHookOptions, TemplateSource, TimebackBaseConfig, TimebackCourseConfigWithOverrides, TimebackIntegrationConfig, TokenType, UpdateCommand, UpdateExistingGameOptions, Violation, WorkspaceDependencies };