diff --git a/.github/workflows/deploy-beta.yml b/.github/workflows/deploy-beta.yml index 5abba4488be..73ecc293986 100644 --- a/.github/workflows/deploy-beta.yml +++ b/.github/workflows/deploy-beta.yml @@ -32,8 +32,6 @@ jobs: - name: Build run: pnpm build:beta - env: - NODE_ENV: production - name: Set up SSH run: | diff --git a/package.json b/package.json index f1726069e7a..d6d37b768c2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "start:beta": "vite --mode beta", "start:dev": "vite --mode development", "start:podman": "vite --mode development --host 0.0.0.0 --port $PORT", - "build": "vite build && node --mode development && node scripts/sync-dist-assets.js", + "build": "vite build && node scripts/sync-dist-assets.js", "build:beta": "vite build --mode beta && node scripts/sync-dist-assets.js", "build:dev": "vite build --mode development && node scripts/sync-dist-assets.js", "preview": "vite preview", diff --git a/src/ai/ai-moveset-gen.ts b/src/ai/ai-moveset-gen.ts index 38557f2b4cb..1b503ac8099 100644 --- a/src/ai/ai-moveset-gen.ts +++ b/src/ai/ai-moveset-gen.ts @@ -32,7 +32,6 @@ import type { EnemyPokemon, Pokemon } from "#field/pokemon"; import { PokemonMove } from "#moves/pokemon-move"; import { NumberHolder, randSeedInt } from "#utils/common"; import { willTerastallize } from "#utils/pokemon-utils"; -import { isBeta } from "#utils/utility-vars"; /** * Compute and assign a weight to the level-up moves currently available to the Pokémon @@ -633,7 +632,7 @@ function fillInRemainingMovesetSlots( * @param note - Short note to include in the log for context */ function debugMoveWeights(pokemon: Pokemon, pool: Map, note: string): void { - if ((isBeta || import.meta.env.DEV) && import.meta.env.NODE_ENV !== "test") { + if (import.meta.env.DEV && import.meta.env.NODE_ENV !== "test") { const moveNameToWeightMap = new Map(); const sortedByValue = Array.from(pool.entries()).sort((a, b) => b[1] - a[1]); for (const [moveId, weight] of sortedByValue) { diff --git a/src/plugins/api/api-base.ts b/src/plugins/api/api-base.ts index 63f56c129f3..842b16d5ce0 100644 --- a/src/plugins/api/api-base.ts +++ b/src/plugins/api/api-base.ts @@ -69,7 +69,8 @@ export abstract class ApiBase { "Content-Type": config.headers?.["Content-Type"] ?? "application/json", }; - if (import.meta.env.DEV) { + // can't import `isLocal` due to circular import issues + if (import.meta.env.MODE === "development") { console.log(`Sending ${config.method ?? "GET"} request to: `, this.base + path, config); } diff --git a/src/system/game-data.ts b/src/system/game-data.ts index e40fc141a0c..d824d9ca2a9 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -78,7 +78,6 @@ import { executeIf, fixedInt, isLocal, NumberHolder, randInt, randSeedItem } fro import { decrypt, encrypt } from "#utils/data"; import { getEnumKeys } from "#utils/enums"; import { getPokemonSpecies } from "#utils/pokemon-utils"; -import { isBeta } from "#utils/utility-vars"; import { AES, enc } from "crypto-js"; import i18next from "i18next"; @@ -414,7 +413,7 @@ export class GameData { } } - if (isLocal || isBeta) { + if (import.meta.env.DEV) { try { console.debug( GameData.parseSystemData( @@ -955,7 +954,7 @@ export class GameData { const { promise, resolve, reject } = Promise.withResolvers(); try { const initSessionFromData = (fromSession: SessionSaveData) => { - if (isLocal || isBeta) { + if (import.meta.env.DEV) { try { console.debug( this.parseSessionData( diff --git a/src/ui/handlers/menu-ui-handler.ts b/src/ui/handlers/menu-ui-handler.ts index ad9e9e30a1b..8a910f91df3 100644 --- a/src/ui/handlers/menu-ui-handler.ts +++ b/src/ui/handlers/menu-ui-handler.ts @@ -14,11 +14,10 @@ import { BgmBar } from "#ui/bgm-bar"; import { MessageUiHandler } from "#ui/message-ui-handler"; import { addTextObject, getTextStyleOptions } from "#ui/text"; import { addWindow, WindowVariant } from "#ui/ui-theme"; -import { fixedInt, isLocal, sessionIdKey } from "#utils/common"; +import { fixedInt, sessionIdKey } from "#utils/common"; import { getCookie } from "#utils/cookies"; import { getEnumValues } from "#utils/enums"; import { toCamelCase } from "#utils/strings"; -import { isBeta } from "#utils/utility-vars"; import i18next from "i18next"; enum MenuOptions { @@ -238,7 +237,7 @@ export class MenuUiHandler extends MessageUiHandler { }); }; - if (isLocal || isBeta) { + if (import.meta.env.DEV) { manageDataOptions.push({ label: i18next.t("menuUiHandler:importSession"), handler: () => { @@ -292,7 +291,7 @@ export class MenuUiHandler extends MessageUiHandler { }, keepOpen: true, }); - if (isLocal || isBeta) { + if (import.meta.env.DEV) { manageDataOptions.push({ label: i18next.t("menuUiHandler:importData"), handler: () => { @@ -339,7 +338,7 @@ export class MenuUiHandler extends MessageUiHandler { keepOpen: true, }, ); - if (isLocal || isBeta) { + if (import.meta.env.DEV) { // this should make sure we don't have this option in live manageDataOptions.push({ label: "Test Dialogue",