playcademy 0.14.11 → 0.14.12
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.d.ts +54 -1
- package/dist/constants.js +37 -0
- package/dist/index.js +72 -19
- package/dist/utils.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -155,6 +155,59 @@ declare const SCHEMA_INDEX_FILE = "index.ts";
|
|
|
155
155
|
*/
|
|
156
156
|
declare const DEFAULT_SEED_FILE_NAME = "seed.ts";
|
|
157
157
|
|
|
158
|
+
/**
|
|
159
|
+
* Godot engine integration constants
|
|
160
|
+
*
|
|
161
|
+
* Constants for detecting Godot projects and running headless exports
|
|
162
|
+
*/
|
|
163
|
+
/**
|
|
164
|
+
* Godot project file (presence indicates Godot project)
|
|
165
|
+
*/
|
|
166
|
+
declare const GODOT_PROJECT_FILE = "project.godot";
|
|
167
|
+
/**
|
|
168
|
+
* Godot export presets configuration file
|
|
169
|
+
*/
|
|
170
|
+
declare const GODOT_EXPORT_PRESETS_FILE = "export_presets.cfg";
|
|
171
|
+
/**
|
|
172
|
+
* Web platform identifier in export_presets.cfg
|
|
173
|
+
*/
|
|
174
|
+
declare const GODOT_WEB_PLATFORM = "platform=\"Web\"";
|
|
175
|
+
/**
|
|
176
|
+
* Build output directories
|
|
177
|
+
*/
|
|
178
|
+
declare const GODOT_BUILD_DIRECTORIES: {
|
|
179
|
+
/** Root build directory (cleared before each export) */
|
|
180
|
+
readonly ROOT: "build";
|
|
181
|
+
/** Web export subdirectory */
|
|
182
|
+
readonly WEB: "build/web";
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Build output file paths
|
|
186
|
+
*/
|
|
187
|
+
declare const GODOT_BUILD_OUTPUTS: {
|
|
188
|
+
/** Exported web build entry point */
|
|
189
|
+
readonly INDEX_HTML: "build/web/index.html";
|
|
190
|
+
/** Packaged zip file (created by Godot export) */
|
|
191
|
+
readonly ZIP: "build/web_playcademy.zip";
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Platform-specific Godot executable discovery patterns
|
|
195
|
+
*/
|
|
196
|
+
declare const GODOT_EXECUTABLE_PATTERNS: {
|
|
197
|
+
/** macOS app bundle suffix */
|
|
198
|
+
readonly MACOS_APP_SUFFIX: ".app/";
|
|
199
|
+
/** macOS executable path within .app bundle */
|
|
200
|
+
readonly MACOS_APP_EXECUTABLE: "Contents/MacOS/Godot";
|
|
201
|
+
/** Flatpak application ID */
|
|
202
|
+
readonly FLATPAK_ID: "org.godotengine.Godot";
|
|
203
|
+
/** Flatpak run command */
|
|
204
|
+
readonly FLATPAK_COMMAND: "flatpak run org.godotengine.Godot";
|
|
205
|
+
/** Snap package name */
|
|
206
|
+
readonly SNAP_NAME: "godot";
|
|
207
|
+
/** Snap run command */
|
|
208
|
+
readonly SNAP_COMMAND: "snap run godot";
|
|
209
|
+
};
|
|
210
|
+
|
|
158
211
|
/**
|
|
159
212
|
* HTTP server constants for CLI OAuth callback handling
|
|
160
213
|
*/
|
|
@@ -223,4 +276,4 @@ declare const DEFAULT_PORTS: {
|
|
|
223
276
|
*/
|
|
224
277
|
declare const CONFIG_FILE_NAMES: string[];
|
|
225
278
|
|
|
226
|
-
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, CLOUDFLARE_COMPATIBILITY_DATE, CONFIG_FILE_NAMES, DEFAULT_API_ROUTES_DIRECTORY, DEFAULT_DATABASE_DIRECTORY, DEFAULT_PORTS, DEFAULT_SEED_FILE_NAME, ENV_EXAMPLE_FILE, ENV_FILES, MINIFLARE_D1_DIRECTORY, OAUTH_CALLBACK_URL_PATTERN, PLACEHOLDER_GAME_URL, PLAYCADEMY_AUTH_VERSION, SAMPLE_API_SUBDIRECTORY, SAMPLE_BUCKET_FILENAME, SAMPLE_CUSTOM_FILENAME, SAMPLE_DATABASE_FILENAME, SAMPLE_KV_FILENAME, SCHEMA_INDEX_FILE, SCHEMA_SUBDIRECTORY, SERVER_LIB_DIRECTORY, SERVER_ROOT_DIRECTORY, SSO_AUTH_TIMEOUT_MS, TSCONFIG_FILES, WORKSPACE_NAME };
|
|
279
|
+
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, CLOUDFLARE_COMPATIBILITY_DATE, CONFIG_FILE_NAMES, DEFAULT_API_ROUTES_DIRECTORY, DEFAULT_DATABASE_DIRECTORY, DEFAULT_PORTS, DEFAULT_SEED_FILE_NAME, ENV_EXAMPLE_FILE, ENV_FILES, GODOT_BUILD_DIRECTORIES, GODOT_BUILD_OUTPUTS, GODOT_EXECUTABLE_PATTERNS, GODOT_EXPORT_PRESETS_FILE, GODOT_PROJECT_FILE, GODOT_WEB_PLATFORM, MINIFLARE_D1_DIRECTORY, OAUTH_CALLBACK_URL_PATTERN, PLACEHOLDER_GAME_URL, PLAYCADEMY_AUTH_VERSION, SAMPLE_API_SUBDIRECTORY, SAMPLE_BUCKET_FILENAME, SAMPLE_CUSTOM_FILENAME, SAMPLE_DATABASE_FILENAME, SAMPLE_KV_FILENAME, SCHEMA_INDEX_FILE, SCHEMA_SUBDIRECTORY, SERVER_LIB_DIRECTORY, SERVER_ROOT_DIRECTORY, SSO_AUTH_TIMEOUT_MS, TSCONFIG_FILES, WORKSPACE_NAME };
|
package/dist/constants.js
CHANGED
|
@@ -171,6 +171,37 @@ var SCHEMA_SUBDIRECTORY = "schema";
|
|
|
171
171
|
var SCHEMA_INDEX_FILE = "index.ts";
|
|
172
172
|
var DEFAULT_SEED_FILE_NAME = "seed.ts";
|
|
173
173
|
|
|
174
|
+
// src/constants/godot.ts
|
|
175
|
+
var GODOT_PROJECT_FILE = "project.godot";
|
|
176
|
+
var GODOT_EXPORT_PRESETS_FILE = "export_presets.cfg";
|
|
177
|
+
var GODOT_WEB_PLATFORM = 'platform="Web"';
|
|
178
|
+
var GODOT_BUILD_DIRECTORIES = {
|
|
179
|
+
/** Root build directory (cleared before each export) */
|
|
180
|
+
ROOT: "build",
|
|
181
|
+
/** Web export subdirectory */
|
|
182
|
+
WEB: "build/web"
|
|
183
|
+
};
|
|
184
|
+
var GODOT_BUILD_OUTPUTS = {
|
|
185
|
+
/** Exported web build entry point */
|
|
186
|
+
INDEX_HTML: "build/web/index.html",
|
|
187
|
+
/** Packaged zip file (created by Godot export) */
|
|
188
|
+
ZIP: "build/web_playcademy.zip"
|
|
189
|
+
};
|
|
190
|
+
var GODOT_EXECUTABLE_PATTERNS = {
|
|
191
|
+
/** macOS app bundle suffix */
|
|
192
|
+
MACOS_APP_SUFFIX: ".app/",
|
|
193
|
+
/** macOS executable path within .app bundle */
|
|
194
|
+
MACOS_APP_EXECUTABLE: "Contents/MacOS/Godot",
|
|
195
|
+
/** Flatpak application ID */
|
|
196
|
+
FLATPAK_ID: "org.godotengine.Godot",
|
|
197
|
+
/** Flatpak run command */
|
|
198
|
+
FLATPAK_COMMAND: "flatpak run org.godotengine.Godot",
|
|
199
|
+
/** Snap package name */
|
|
200
|
+
SNAP_NAME: "godot",
|
|
201
|
+
/** Snap run command */
|
|
202
|
+
SNAP_COMMAND: "snap run godot"
|
|
203
|
+
};
|
|
204
|
+
|
|
174
205
|
// src/constants/http-server.ts
|
|
175
206
|
var CALLBACK_PORT = 6175;
|
|
176
207
|
var CALLBACK_PATH = "/callback";
|
|
@@ -291,6 +322,12 @@ export {
|
|
|
291
322
|
ENV_EXAMPLE_FILE,
|
|
292
323
|
ENV_FILES,
|
|
293
324
|
GAME_WORKER_DOMAINS,
|
|
325
|
+
GODOT_BUILD_DIRECTORIES,
|
|
326
|
+
GODOT_BUILD_OUTPUTS,
|
|
327
|
+
GODOT_EXECUTABLE_PATTERNS,
|
|
328
|
+
GODOT_EXPORT_PRESETS_FILE,
|
|
329
|
+
GODOT_PROJECT_FILE,
|
|
330
|
+
GODOT_WEB_PLATFORM,
|
|
294
331
|
MINIFLARE_D1_DIRECTORY,
|
|
295
332
|
OAUTH_CALLBACK_URL_PATTERN,
|
|
296
333
|
PLACEHOLDER_GAME_URL,
|
package/dist/index.js
CHANGED
|
@@ -947,6 +947,43 @@ var init_database = __esm({
|
|
|
947
947
|
}
|
|
948
948
|
});
|
|
949
949
|
|
|
950
|
+
// src/constants/godot.ts
|
|
951
|
+
var GODOT_PROJECT_FILE, GODOT_EXPORT_PRESETS_FILE, GODOT_WEB_PLATFORM, GODOT_BUILD_DIRECTORIES, GODOT_BUILD_OUTPUTS, GODOT_EXECUTABLE_PATTERNS;
|
|
952
|
+
var init_godot = __esm({
|
|
953
|
+
"src/constants/godot.ts"() {
|
|
954
|
+
"use strict";
|
|
955
|
+
GODOT_PROJECT_FILE = "project.godot";
|
|
956
|
+
GODOT_EXPORT_PRESETS_FILE = "export_presets.cfg";
|
|
957
|
+
GODOT_WEB_PLATFORM = 'platform="Web"';
|
|
958
|
+
GODOT_BUILD_DIRECTORIES = {
|
|
959
|
+
/** Root build directory (cleared before each export) */
|
|
960
|
+
ROOT: "build",
|
|
961
|
+
/** Web export subdirectory */
|
|
962
|
+
WEB: "build/web"
|
|
963
|
+
};
|
|
964
|
+
GODOT_BUILD_OUTPUTS = {
|
|
965
|
+
/** Exported web build entry point */
|
|
966
|
+
INDEX_HTML: "build/web/index.html",
|
|
967
|
+
/** Packaged zip file (created by Godot export) */
|
|
968
|
+
ZIP: "build/web_playcademy.zip"
|
|
969
|
+
};
|
|
970
|
+
GODOT_EXECUTABLE_PATTERNS = {
|
|
971
|
+
/** macOS app bundle suffix */
|
|
972
|
+
MACOS_APP_SUFFIX: ".app/",
|
|
973
|
+
/** macOS executable path within .app bundle */
|
|
974
|
+
MACOS_APP_EXECUTABLE: "Contents/MacOS/Godot",
|
|
975
|
+
/** Flatpak application ID */
|
|
976
|
+
FLATPAK_ID: "org.godotengine.Godot",
|
|
977
|
+
/** Flatpak run command */
|
|
978
|
+
FLATPAK_COMMAND: "flatpak run org.godotengine.Godot",
|
|
979
|
+
/** Snap package name */
|
|
980
|
+
SNAP_NAME: "godot",
|
|
981
|
+
/** Snap run command */
|
|
982
|
+
SNAP_COMMAND: "snap run godot"
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
});
|
|
986
|
+
|
|
950
987
|
// src/constants/http-server.ts
|
|
951
988
|
var CALLBACK_PORT, CALLBACK_PATH, SSO_AUTH_TIMEOUT_MS;
|
|
952
989
|
var init_http_server = __esm({
|
|
@@ -1156,6 +1193,7 @@ var init_constants = __esm({
|
|
|
1156
1193
|
init_cloudflare();
|
|
1157
1194
|
init_config();
|
|
1158
1195
|
init_database();
|
|
1196
|
+
init_godot();
|
|
1159
1197
|
init_http_server();
|
|
1160
1198
|
init_paths();
|
|
1161
1199
|
init_ports();
|
|
@@ -6779,23 +6817,24 @@ function displayDeploymentDiff(options) {
|
|
|
6779
6817
|
|
|
6780
6818
|
// src/lib/deploy/godot.ts
|
|
6781
6819
|
init_src();
|
|
6820
|
+
init_constants2();
|
|
6782
6821
|
init_core();
|
|
6783
6822
|
import { execSync as execSync4 } from "child_process";
|
|
6784
|
-
import { existsSync as existsSync10, mkdirSync as mkdirSync2, readFileSync as readFileSync5 } from "fs";
|
|
6823
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync2, readFileSync as readFileSync5, rmSync as rmSync3 } from "fs";
|
|
6785
6824
|
import { join as join13 } from "path";
|
|
6786
6825
|
import { confirm, select } from "@inquirer/prompts";
|
|
6787
6826
|
function isGodotProject() {
|
|
6788
|
-
return existsSync10(join13(getWorkspace(),
|
|
6827
|
+
return existsSync10(join13(getWorkspace(), GODOT_PROJECT_FILE));
|
|
6789
6828
|
}
|
|
6790
6829
|
function hasWebExportPreset() {
|
|
6791
|
-
const presetsPath = join13(getWorkspace(),
|
|
6830
|
+
const presetsPath = join13(getWorkspace(), GODOT_EXPORT_PRESETS_FILE);
|
|
6792
6831
|
if (!existsSync10(presetsPath)) {
|
|
6793
6832
|
return { configured: false };
|
|
6794
6833
|
}
|
|
6795
6834
|
try {
|
|
6796
6835
|
const content = readFileSync5(presetsPath, "utf-8");
|
|
6797
6836
|
const lines = content.split("\n");
|
|
6798
|
-
const webPlatformIndex = lines.findIndex((line) => line.trim() ===
|
|
6837
|
+
const webPlatformIndex = lines.findIndex((line) => line.trim() === GODOT_WEB_PLATFORM);
|
|
6799
6838
|
if (webPlatformIndex === -1) {
|
|
6800
6839
|
return { configured: false };
|
|
6801
6840
|
}
|
|
@@ -6824,8 +6863,8 @@ async function findGodotExecutable() {
|
|
|
6824
6863
|
const result = execSync4(whichCmd, { stdio: "pipe", encoding: "utf-8" });
|
|
6825
6864
|
const paths = result.trim().split("\n").filter(Boolean);
|
|
6826
6865
|
for (const path4 of paths) {
|
|
6827
|
-
if (platform === "darwin" && path4.includes(
|
|
6828
|
-
const appPath = path4.split(
|
|
6866
|
+
if (platform === "darwin" && path4.includes(GODOT_EXECUTABLE_PATTERNS.MACOS_APP_SUFFIX)) {
|
|
6867
|
+
const appPath = path4.split(GODOT_EXECUTABLE_PATTERNS.MACOS_APP_SUFFIX)[0] + GODOT_EXECUTABLE_PATTERNS.MACOS_APP_SUFFIX.slice(0, -1);
|
|
6829
6868
|
const appName = appPath.split("/").pop() || "Godot";
|
|
6830
6869
|
foundExecutables.push({ path: path4, label: appName });
|
|
6831
6870
|
seenAppBundles.add(appPath);
|
|
@@ -6844,7 +6883,7 @@ async function findGodotExecutable() {
|
|
|
6844
6883
|
const apps = result.split("\n").filter(Boolean);
|
|
6845
6884
|
for (const appPath of apps) {
|
|
6846
6885
|
if (seenAppBundles.has(appPath)) continue;
|
|
6847
|
-
const executable = join13(appPath,
|
|
6886
|
+
const executable = join13(appPath, GODOT_EXECUTABLE_PATTERNS.MACOS_APP_EXECUTABLE);
|
|
6848
6887
|
const appName = appPath.split("/").pop() || "Godot";
|
|
6849
6888
|
foundExecutables.push({ path: executable, label: appName });
|
|
6850
6889
|
}
|
|
@@ -6853,16 +6892,23 @@ async function findGodotExecutable() {
|
|
|
6853
6892
|
}
|
|
6854
6893
|
if (platform === "linux") {
|
|
6855
6894
|
try {
|
|
6856
|
-
execSync4(
|
|
6895
|
+
execSync4(`flatpak list 2>/dev/null | grep ${GODOT_EXECUTABLE_PATTERNS.FLATPAK_ID}`, {
|
|
6896
|
+
stdio: "pipe"
|
|
6897
|
+
});
|
|
6857
6898
|
foundExecutables.push({
|
|
6858
|
-
path:
|
|
6899
|
+
path: GODOT_EXECUTABLE_PATTERNS.FLATPAK_COMMAND,
|
|
6859
6900
|
label: "Godot (flatpak)"
|
|
6860
6901
|
});
|
|
6861
6902
|
} catch {
|
|
6862
6903
|
}
|
|
6863
6904
|
try {
|
|
6864
|
-
execSync4(
|
|
6865
|
-
|
|
6905
|
+
execSync4(`snap list 2>/dev/null | grep ${GODOT_EXECUTABLE_PATTERNS.SNAP_NAME}`, {
|
|
6906
|
+
stdio: "pipe"
|
|
6907
|
+
});
|
|
6908
|
+
foundExecutables.push({
|
|
6909
|
+
path: GODOT_EXECUTABLE_PATTERNS.SNAP_COMMAND,
|
|
6910
|
+
label: "Godot (snap)"
|
|
6911
|
+
});
|
|
6866
6912
|
} catch {
|
|
6867
6913
|
}
|
|
6868
6914
|
}
|
|
@@ -6899,7 +6945,11 @@ async function findGodotExecutable() {
|
|
|
6899
6945
|
async function runGodotExport(godotPath, presetName, outputPath) {
|
|
6900
6946
|
const root = getWorkspace();
|
|
6901
6947
|
try {
|
|
6902
|
-
|
|
6948
|
+
const buildDir = join13(root, GODOT_BUILD_DIRECTORIES.ROOT);
|
|
6949
|
+
if (existsSync10(buildDir)) {
|
|
6950
|
+
rmSync3(buildDir, { recursive: true, force: true });
|
|
6951
|
+
}
|
|
6952
|
+
mkdirSync2(join13(root, GODOT_BUILD_DIRECTORIES.WEB), { recursive: true });
|
|
6903
6953
|
await runStep(
|
|
6904
6954
|
`Exporting project using "${presetName}" preset`,
|
|
6905
6955
|
async () => {
|
|
@@ -6945,19 +6995,22 @@ async function handleGodotBuildPrompt() {
|
|
|
6945
6995
|
logger.newLine();
|
|
6946
6996
|
return null;
|
|
6947
6997
|
}
|
|
6948
|
-
const success = await runGodotExport(
|
|
6998
|
+
const success = await runGodotExport(
|
|
6999
|
+
godotPath,
|
|
7000
|
+
webExport.presetName,
|
|
7001
|
+
GODOT_BUILD_OUTPUTS.INDEX_HTML
|
|
7002
|
+
);
|
|
6949
7003
|
if (!success) {
|
|
6950
7004
|
logger.error("Export failed. Please export manually or provide zip file.");
|
|
6951
7005
|
logger.newLine();
|
|
6952
7006
|
return null;
|
|
6953
7007
|
}
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
return zipPath;
|
|
7008
|
+
if (existsSync10(join13(getWorkspace(), GODOT_BUILD_OUTPUTS.ZIP))) {
|
|
7009
|
+
return GODOT_BUILD_OUTPUTS.ZIP;
|
|
6957
7010
|
}
|
|
6958
7011
|
logger.warn("Expected zip file not found, using build directory");
|
|
6959
7012
|
logger.newLine();
|
|
6960
|
-
return
|
|
7013
|
+
return GODOT_BUILD_DIRECTORIES.WEB;
|
|
6961
7014
|
}
|
|
6962
7015
|
|
|
6963
7016
|
// src/lib/deploy/interaction.ts
|
|
@@ -7142,7 +7195,7 @@ import { join as join15 } from "path";
|
|
|
7142
7195
|
// package.json
|
|
7143
7196
|
var package_default2 = {
|
|
7144
7197
|
name: "playcademy",
|
|
7145
|
-
version: "0.14.
|
|
7198
|
+
version: "0.14.11",
|
|
7146
7199
|
type: "module",
|
|
7147
7200
|
exports: {
|
|
7148
7201
|
".": {
|
|
@@ -8383,6 +8436,7 @@ async function reportDryRun(plan, context2) {
|
|
|
8383
8436
|
logger.data("Update Game", String(plan.shouldUpdateGame), 1);
|
|
8384
8437
|
logger.data("Upload Build", String(plan.shouldUploadBuild), 1);
|
|
8385
8438
|
logger.data("Deploy Backend", String(plan.shouldDeployBackend), 1);
|
|
8439
|
+
logger.newLine();
|
|
8386
8440
|
const diff = plan.changes.config ? calculateConfigDiff(context2.existingGame, context2.config) : {};
|
|
8387
8441
|
const currentIntegrationKeys = getIntegrationKeys(context2.fullConfig?.integrations);
|
|
8388
8442
|
const schemaStatementCount = await getSchemaStatementCount(
|
|
@@ -8445,7 +8499,6 @@ async function reportDryRun(plan, context2) {
|
|
|
8445
8499
|
} else {
|
|
8446
8500
|
logger.remark("No changes detected");
|
|
8447
8501
|
}
|
|
8448
|
-
logger.newLine();
|
|
8449
8502
|
logger.remark("Dry run complete");
|
|
8450
8503
|
logger.newLine();
|
|
8451
8504
|
}
|
package/dist/utils.js
CHANGED
package/dist/version.js
CHANGED