playcademy 0.25.1-beta.2 → 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 +38 -1
- package/dist/cli.js +55 -9
- package/dist/constants.d.ts +7 -1
- package/dist/constants.js +5 -1
- package/dist/db.js +46 -4
- package/dist/index.d.ts +104 -1
- package/dist/index.js +2939 -1336
- package/dist/runtime/backend-runtime/index.js +99 -43
- package/dist/runtime/backend-runtime/manifest.json +4 -4
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +63 -17
- package/dist/version.js +1 -1
- package/package.json +2 -2
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.
|
|
97
|
+
version: "0.0.17",
|
|
98
98
|
type: "module",
|
|
99
99
|
exports: {
|
|
100
100
|
"./server": {
|
|
@@ -230,6 +230,43 @@ import { colorize } from "json-colorizer";
|
|
|
230
230
|
import { bold, dim, redBright } from "colorette";
|
|
231
231
|
import { ApiError, extractApiErrorInfo } from "@playcademy/sdk/internal";
|
|
232
232
|
|
|
233
|
+
// src/lib/core/logger.ts
|
|
234
|
+
var lastWasBlank = false;
|
|
235
|
+
var ANSI_ESCAPE_RE = /\x1b\[[^a-zA-Z]*[a-zA-Z]/g;
|
|
236
|
+
function hasVisibleContent(str) {
|
|
237
|
+
return str.replace(ANSI_ESCAPE_RE, "").trim().length > 0;
|
|
238
|
+
}
|
|
239
|
+
var _consoleLog = console.log.bind(console);
|
|
240
|
+
var _consoleError = console.error.bind(console);
|
|
241
|
+
var _stdoutWrite = process.stdout.write.bind(process.stdout);
|
|
242
|
+
var _stderrWrite = process.stderr.write.bind(process.stderr);
|
|
243
|
+
console.log = (...args) => {
|
|
244
|
+
_consoleLog(...args);
|
|
245
|
+
if (args.length > 0) {
|
|
246
|
+
lastWasBlank = false;
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
console.error = (...args) => {
|
|
250
|
+
_consoleError(...args);
|
|
251
|
+
if (args.length > 0) {
|
|
252
|
+
lastWasBlank = false;
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
process.stdout.write = (chunk, ...rest) => {
|
|
256
|
+
const result = _stdoutWrite(chunk, ...rest);
|
|
257
|
+
if (typeof chunk === "string" && hasVisibleContent(chunk)) {
|
|
258
|
+
lastWasBlank = false;
|
|
259
|
+
}
|
|
260
|
+
return result;
|
|
261
|
+
};
|
|
262
|
+
process.stderr.write = (chunk, ...rest) => {
|
|
263
|
+
const result = _stderrWrite(chunk, ...rest);
|
|
264
|
+
if (typeof chunk === "string" && hasVisibleContent(chunk)) {
|
|
265
|
+
lastWasBlank = false;
|
|
266
|
+
}
|
|
267
|
+
return result;
|
|
268
|
+
};
|
|
269
|
+
|
|
233
270
|
// src/lib/core/errors.ts
|
|
234
271
|
import { ApiError as ApiError2 } from "@playcademy/sdk/internal";
|
|
235
272
|
|
package/dist/cli.js
CHANGED
|
@@ -319,19 +319,51 @@ import {
|
|
|
319
319
|
} from "colorette";
|
|
320
320
|
import { colorize } from "json-colorizer";
|
|
321
321
|
var lastWasBlank = false;
|
|
322
|
+
var ANSI_ESCAPE_RE = /\x1b\[[^a-zA-Z]*[a-zA-Z]/g;
|
|
323
|
+
function hasVisibleContent(str) {
|
|
324
|
+
return str.replace(ANSI_ESCAPE_RE, "").trim().length > 0;
|
|
325
|
+
}
|
|
326
|
+
var _consoleLog = console.log.bind(console);
|
|
327
|
+
var _consoleError = console.error.bind(console);
|
|
328
|
+
var _stdoutWrite = process.stdout.write.bind(process.stdout);
|
|
329
|
+
var _stderrWrite = process.stderr.write.bind(process.stderr);
|
|
330
|
+
console.log = (...args) => {
|
|
331
|
+
_consoleLog(...args);
|
|
332
|
+
if (args.length > 0) {
|
|
333
|
+
lastWasBlank = false;
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
console.error = (...args) => {
|
|
337
|
+
_consoleError(...args);
|
|
338
|
+
if (args.length > 0) {
|
|
339
|
+
lastWasBlank = false;
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
process.stdout.write = (chunk, ...rest) => {
|
|
343
|
+
const result = _stdoutWrite(chunk, ...rest);
|
|
344
|
+
if (typeof chunk === "string" && hasVisibleContent(chunk)) {
|
|
345
|
+
lastWasBlank = false;
|
|
346
|
+
}
|
|
347
|
+
return result;
|
|
348
|
+
};
|
|
349
|
+
process.stderr.write = (chunk, ...rest) => {
|
|
350
|
+
const result = _stderrWrite(chunk, ...rest);
|
|
351
|
+
if (typeof chunk === "string" && hasVisibleContent(chunk)) {
|
|
352
|
+
lastWasBlank = false;
|
|
353
|
+
}
|
|
354
|
+
return result;
|
|
355
|
+
};
|
|
322
356
|
function writeOut(line) {
|
|
323
357
|
console.log(line);
|
|
324
|
-
lastWasBlank = false;
|
|
325
358
|
}
|
|
326
359
|
function writeErr(line) {
|
|
327
360
|
console.error(line);
|
|
328
|
-
lastWasBlank = false;
|
|
329
361
|
}
|
|
330
362
|
function writeBlank() {
|
|
331
363
|
if (lastWasBlank) {
|
|
332
364
|
return;
|
|
333
365
|
}
|
|
334
|
-
|
|
366
|
+
_consoleLog();
|
|
335
367
|
lastWasBlank = true;
|
|
336
368
|
}
|
|
337
369
|
function customTransform(text) {
|
|
@@ -523,6 +555,16 @@ var logger = {
|
|
|
523
555
|
const value = `${red(oldSize)} \u2192 ${green(newSize)} ${delta}`;
|
|
524
556
|
writeOut(`${spaces}${dim(`${label}:`)} ${bold(value)}`);
|
|
525
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
|
+
},
|
|
526
568
|
/**
|
|
527
569
|
* JSON output - pretty-printed JSON
|
|
528
570
|
*/
|
|
@@ -693,7 +735,7 @@ function setupGlobalErrorHandlers() {
|
|
|
693
735
|
import { execSync as execSync5 } from "child_process";
|
|
694
736
|
import { writeFileSync as writeFileSync10 } from "fs";
|
|
695
737
|
import { resolve as resolve9 } from "path";
|
|
696
|
-
import { confirm as
|
|
738
|
+
import { confirm as confirm6 } from "@inquirer/prompts";
|
|
697
739
|
|
|
698
740
|
// ../utils/src/ansi.ts
|
|
699
741
|
var colors = {
|
|
@@ -1083,7 +1125,7 @@ var SAMPLE_BUCKET_FILENAME = "bucket.ts";
|
|
|
1083
1125
|
// ../better-auth/package.json
|
|
1084
1126
|
var package_default = {
|
|
1085
1127
|
name: "@playcademy/better-auth",
|
|
1086
|
-
version: "0.0.
|
|
1128
|
+
version: "0.0.17",
|
|
1087
1129
|
type: "module",
|
|
1088
1130
|
exports: {
|
|
1089
1131
|
"./server": {
|
|
@@ -2951,7 +2993,7 @@ import { existsSync as existsSync11, mkdirSync as mkdirSync5, readFileSync as re
|
|
|
2951
2993
|
import { join as join13 } from "node:path";
|
|
2952
2994
|
|
|
2953
2995
|
// src/version.ts
|
|
2954
|
-
var cliVersion = false ? "0.0.0-dev" : "0.25.1-beta.
|
|
2996
|
+
var cliVersion = false ? "0.0.0-dev" : "0.25.1-beta.4";
|
|
2955
2997
|
|
|
2956
2998
|
// src/lib/init/database.ts
|
|
2957
2999
|
var drizzleConfigTemplate = loadTemplateString("database/drizzle-config.ts");
|
|
@@ -3373,11 +3415,15 @@ function hasHooksModule(workspace) {
|
|
|
3373
3415
|
// src/lib/bundle/hash.ts
|
|
3374
3416
|
init_file_loader();
|
|
3375
3417
|
|
|
3418
|
+
// src/lib/timeback/update.ts
|
|
3419
|
+
import { confirm as confirm4, select as select5 } from "@inquirer/prompts";
|
|
3420
|
+
import { green as green3, red as red3 } from "colorette";
|
|
3421
|
+
|
|
3376
3422
|
// src/lib/secrets/diff.ts
|
|
3377
|
-
import { green as
|
|
3423
|
+
import { green as green4, red as red4, yellow as yellow4 } from "colorette";
|
|
3378
3424
|
|
|
3379
3425
|
// src/lib/secrets/sync.ts
|
|
3380
|
-
import { confirm as
|
|
3426
|
+
import { confirm as confirm5 } from "@inquirer/prompts";
|
|
3381
3427
|
import { bold as bold5 } from "colorette";
|
|
3382
3428
|
|
|
3383
3429
|
// src/lib/init/bucket.ts
|
|
@@ -3735,7 +3781,7 @@ async function checkExistingConfig(force) {
|
|
|
3735
3781
|
logger.newLine();
|
|
3736
3782
|
return false;
|
|
3737
3783
|
}
|
|
3738
|
-
const shouldOverwrite = await
|
|
3784
|
+
const shouldOverwrite = await confirm6({
|
|
3739
3785
|
message: "Do you want to overwrite it?",
|
|
3740
3786
|
default: false
|
|
3741
3787
|
});
|
package/dist/constants.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
39
|
+
version: "0.0.17",
|
|
40
40
|
type: "module",
|
|
41
41
|
exports: {
|
|
42
42
|
"./server": {
|
|
@@ -810,19 +810,51 @@ function formatError(error, indent = 0) {
|
|
|
810
810
|
|
|
811
811
|
// src/lib/core/logger.ts
|
|
812
812
|
var lastWasBlank = false;
|
|
813
|
+
var ANSI_ESCAPE_RE = /\x1b\[[^a-zA-Z]*[a-zA-Z]/g;
|
|
814
|
+
function hasVisibleContent(str) {
|
|
815
|
+
return str.replace(ANSI_ESCAPE_RE, "").trim().length > 0;
|
|
816
|
+
}
|
|
817
|
+
var _consoleLog = console.log.bind(console);
|
|
818
|
+
var _consoleError = console.error.bind(console);
|
|
819
|
+
var _stdoutWrite = process.stdout.write.bind(process.stdout);
|
|
820
|
+
var _stderrWrite = process.stderr.write.bind(process.stderr);
|
|
821
|
+
console.log = (...args) => {
|
|
822
|
+
_consoleLog(...args);
|
|
823
|
+
if (args.length > 0) {
|
|
824
|
+
lastWasBlank = false;
|
|
825
|
+
}
|
|
826
|
+
};
|
|
827
|
+
console.error = (...args) => {
|
|
828
|
+
_consoleError(...args);
|
|
829
|
+
if (args.length > 0) {
|
|
830
|
+
lastWasBlank = false;
|
|
831
|
+
}
|
|
832
|
+
};
|
|
833
|
+
process.stdout.write = (chunk, ...rest) => {
|
|
834
|
+
const result = _stdoutWrite(chunk, ...rest);
|
|
835
|
+
if (typeof chunk === "string" && hasVisibleContent(chunk)) {
|
|
836
|
+
lastWasBlank = false;
|
|
837
|
+
}
|
|
838
|
+
return result;
|
|
839
|
+
};
|
|
840
|
+
process.stderr.write = (chunk, ...rest) => {
|
|
841
|
+
const result = _stderrWrite(chunk, ...rest);
|
|
842
|
+
if (typeof chunk === "string" && hasVisibleContent(chunk)) {
|
|
843
|
+
lastWasBlank = false;
|
|
844
|
+
}
|
|
845
|
+
return result;
|
|
846
|
+
};
|
|
813
847
|
function writeOut(line) {
|
|
814
848
|
console.log(line);
|
|
815
|
-
lastWasBlank = false;
|
|
816
849
|
}
|
|
817
850
|
function writeErr(line) {
|
|
818
851
|
console.error(line);
|
|
819
|
-
lastWasBlank = false;
|
|
820
852
|
}
|
|
821
853
|
function writeBlank() {
|
|
822
854
|
if (lastWasBlank) {
|
|
823
855
|
return;
|
|
824
856
|
}
|
|
825
|
-
|
|
857
|
+
_consoleLog();
|
|
826
858
|
lastWasBlank = true;
|
|
827
859
|
}
|
|
828
860
|
function customTransform(text) {
|
|
@@ -1014,6 +1046,16 @@ var logger = {
|
|
|
1014
1046
|
const value = `${red(oldSize)} \u2192 ${green(newSize)} ${delta}`;
|
|
1015
1047
|
writeOut(`${spaces}${dim3(`${label}:`)} ${bold3(value)}`);
|
|
1016
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
|
+
},
|
|
1017
1059
|
/**
|
|
1018
1060
|
* JSON output - pretty-printed JSON
|
|
1019
1061
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -830,6 +830,8 @@ interface DeploymentContext {
|
|
|
830
830
|
isDryRun: boolean;
|
|
831
831
|
deployBackend: boolean;
|
|
832
832
|
forceBackend: boolean;
|
|
833
|
+
forceIntegrationConfigSync?: string[];
|
|
834
|
+
cancellationHandled?: boolean;
|
|
833
835
|
minify: boolean;
|
|
834
836
|
verbose: boolean;
|
|
835
837
|
debug: boolean;
|
|
@@ -994,6 +996,93 @@ interface BackendRuntimePaths {
|
|
|
994
996
|
/** Runtime metadata exposed by /api/health */
|
|
995
997
|
manifest: BackendRuntimeManifest;
|
|
996
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
|
+
}
|
|
997
1086
|
|
|
998
1087
|
/**
|
|
999
1088
|
* Logger interface for embedding in other tools (e.g., vite plugin)
|
|
@@ -1352,6 +1441,13 @@ interface LogStreamConfig {
|
|
|
1352
1441
|
json?: boolean;
|
|
1353
1442
|
}
|
|
1354
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
|
+
|
|
1355
1451
|
/**
|
|
1356
1452
|
* Preview options
|
|
1357
1453
|
*/
|
|
@@ -1481,4 +1577,11 @@ interface ApplySecretsOptions {
|
|
|
1481
1577
|
workspace: string;
|
|
1482
1578
|
}
|
|
1483
1579
|
|
|
1484
|
-
|
|
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 };
|