playcademy 0.17.4 → 0.18.0

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/constants.js CHANGED
@@ -183,32 +183,34 @@ var CALLBACK_PATH = "/callback";
183
183
  var SSO_AUTH_TIMEOUT_MS = 3e4;
184
184
 
185
185
  // src/constants/paths.ts
186
- import { join as join5 } from "path";
186
+ import { homedir } from "node:os";
187
+ import { join as join5 } from "node:path";
187
188
  var WORKSPACE_NAME = ".playcademy";
188
189
  var CLI_DIRECTORIES = {
189
- /** Root directory for CLI artifacts in workspace */
190
190
  WORKSPACE: WORKSPACE_NAME,
191
- /** Database directory within workspace */
192
191
  DATABASE: join5(WORKSPACE_NAME, "db"),
193
- /** KV storage directory within workspace */
194
192
  KV: join5(WORKSPACE_NAME, "kv"),
195
- /** Bucket storage directory within workspace */
196
193
  BUCKET: join5(WORKSPACE_NAME, "bucket")
197
194
  };
195
+ var PLAYCADEMY_HOME = join5(homedir(), ".playcademy");
198
196
  var CLI_USER_DIRECTORIES = {
199
- /** User config directory for auth, games store, etc. */
200
- CONFIG: ".playcademy"
197
+ CONFIG: PLAYCADEMY_HOME,
198
+ BIN: join5(PLAYCADEMY_HOME, "bin"),
199
+ CACHE: join5(PLAYCADEMY_HOME, "cache")
201
200
  };
201
+ function nativeBinaryPath(name) {
202
+ const ext = process.platform === "win32" ? ".exe" : "";
203
+ return join5(CLI_USER_DIRECTORIES.BIN, `${name}${ext}`);
204
+ }
205
+ function cacheVersionDir(version) {
206
+ return join5(CLI_USER_DIRECTORIES.CACHE, `v${version}`);
207
+ }
202
208
  var CLI_DEFAULT_OUTPUTS = {
203
- /** Default worker bundle output for debug command */
204
209
  WORKER_BUNDLE: join5(WORKSPACE_NAME, "worker-bundle.js")
205
210
  };
206
211
  var CLI_FILES = {
207
- /** Auth store file in user config directory */
208
212
  AUTH_STORE: "auth.json",
209
- /** Games deployment info store */
210
213
  GAMES_STORE: "games.json",
211
- /** Initial database file (before miniflare) */
212
214
  INITIAL_DATABASE: "initial.sqlite"
213
215
  };
214
216
 
@@ -439,5 +441,7 @@ export {
439
441
  TSCONFIG_FILES,
440
442
  TSCONFIG_JSON,
441
443
  TSCONFIG_REQUIRED_INCLUDES,
442
- WORKSPACE_NAME
444
+ WORKSPACE_NAME,
445
+ cacheVersionDir,
446
+ nativeBinaryPath
443
447
  };
package/dist/db.js CHANGED
@@ -124,28 +124,27 @@ var GODOT_BUILD_OUTPUTS = {
124
124
  };
125
125
 
126
126
  // src/constants/paths.ts
127
- import { join as join5 } from "path";
127
+ import { homedir } from "node:os";
128
+ import { join as join5 } from "node:path";
128
129
  var WORKSPACE_NAME = ".playcademy";
129
130
  var CLI_DIRECTORIES = {
130
- /** Root directory for CLI artifacts in workspace */
131
131
  WORKSPACE: WORKSPACE_NAME,
132
- /** Database directory within workspace */
133
132
  DATABASE: join5(WORKSPACE_NAME, "db"),
134
- /** KV storage directory within workspace */
135
133
  KV: join5(WORKSPACE_NAME, "kv"),
136
- /** Bucket storage directory within workspace */
137
134
  BUCKET: join5(WORKSPACE_NAME, "bucket")
138
135
  };
136
+ var PLAYCADEMY_HOME = join5(homedir(), ".playcademy");
137
+ var CLI_USER_DIRECTORIES = {
138
+ CONFIG: PLAYCADEMY_HOME,
139
+ BIN: join5(PLAYCADEMY_HOME, "bin"),
140
+ CACHE: join5(PLAYCADEMY_HOME, "cache")
141
+ };
139
142
  var CLI_DEFAULT_OUTPUTS = {
140
- /** Default worker bundle output for debug command */
141
143
  WORKER_BUNDLE: join5(WORKSPACE_NAME, "worker-bundle.js")
142
144
  };
143
145
  var CLI_FILES = {
144
- /** Auth store file in user config directory */
145
146
  AUTH_STORE: "auth.json",
146
- /** Games deployment info store */
147
147
  GAMES_STORE: "games.json",
148
- /** Initial database file (before miniflare) */
149
148
  INITIAL_DATABASE: "initial.sqlite"
150
149
  };
151
150
 
@@ -1262,11 +1261,6 @@ init_file_loader();
1262
1261
  // src/lib/config/loader.ts
1263
1262
  init_file_loader();
1264
1263
 
1265
- // src/lib/templates/loader.ts
1266
- import { dirname, resolve } from "path";
1267
- import { fileURLToPath } from "url";
1268
- var currentDir = dirname(fileURLToPath(import.meta.url));
1269
-
1270
1264
  // src/lib/core/import.ts
1271
1265
  import { mkdtempSync, rmSync } from "fs";
1272
1266
  import { tmpdir } from "os";
package/dist/index.d.ts CHANGED
@@ -1191,10 +1191,10 @@ interface BundleOptions {
1191
1191
  }
1192
1192
  /**
1193
1193
  * Resolved paths for bundling embedded sources
1194
- * Used to support both monorepo development and published package scenarios
1194
+ * Used to support monorepo development and the published `playcademy` npm package (dist/).
1195
1195
  */
1196
1196
  interface EmbeddedSourcePaths {
1197
- /** Whether we're running from a published package (vs monorepo dev) */
1197
+ /** True when running from installed npm package (dist/ has embedded sources), not monorepo dev */
1198
1198
  isBuiltPackage: boolean;
1199
1199
  /** Path to edge-play sources (embedded or monorepo) */
1200
1200
  edgePlaySrc: string;
@@ -1202,8 +1202,8 @@ interface EmbeddedSourcePaths {
1202
1202
  constantsEntry: string;
1203
1203
  /** User's workspace node_modules */
1204
1204
  workspaceNodeModules: string;
1205
- /** CLI's node_modules (monorepo root in dev, same as workspace in published) */
1206
- cliNodeModules: string;
1205
+ /** Resolution root for CLI dependencies monorepo root in dev (hoisted deps); specific node_modules when published/binary */
1206
+ cliDepsRoot: string;
1207
1207
  }
1208
1208
 
1209
1209
  /**