mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 06:15:20 +01:00
[Dev] Don't use "production" mode for beta server (#6616)
* [Dev] Don't use "production" mode for beta server * Fix `build` command in `package.json`
This commit is contained in:
parent
f4456f6c7c
commit
f7fd72b08c
2
.github/workflows/deploy-beta.yml
vendored
2
.github/workflows/deploy-beta.yml
vendored
@ -32,8 +32,6 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: pnpm build:beta
|
||||
env:
|
||||
NODE_ENV: production
|
||||
|
||||
- name: Set up SSH
|
||||
run: |
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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<MoveId, number>, 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<string, number>();
|
||||
const sortedByValue = Array.from(pool.entries()).sort((a, b) => b[1] - a[1]);
|
||||
for (const [moveId, weight] of sortedByValue) {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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<boolean>();
|
||||
try {
|
||||
const initSessionFromData = (fromSession: SessionSaveData) => {
|
||||
if (isLocal || isBeta) {
|
||||
if (import.meta.env.DEV) {
|
||||
try {
|
||||
console.debug(
|
||||
this.parseSessionData(
|
||||
|
||||
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user