From 9b9e4ae34af4ff0c363fece35a87b4f6330cd305 Mon Sep 17 00:00:00 2001 From: didirus4 Date: Sat, 16 Nov 2024 20:22:54 +0300 Subject: [PATCH] Migrate from staging to default api modrinth. Rollback frontend nuxi prepare --- apps/app-frontend/package.json | 2 +- apps/frontend/nuxt.config.ts | 6 +++--- apps/frontend/package.json | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/app-frontend/package.json b/apps/app-frontend/package.json index 7987231be..bf0ffc60d 100644 --- a/apps/app-frontend/package.json +++ b/apps/app-frontend/package.json @@ -1,7 +1,7 @@ { "name": "@modrinth/app-frontend", "private": true, - "version": "0.8.9031", + "version": "0.8.904", "development_build": true, "type": "module", "scripts": { diff --git a/apps/frontend/nuxt.config.ts b/apps/frontend/nuxt.config.ts index 966fe4fb1..ca2c10fc9 100644 --- a/apps/frontend/nuxt.config.ts +++ b/apps/frontend/nuxt.config.ts @@ -8,7 +8,7 @@ import { globIterate } from "glob"; import { match as matchLocale } from "@formatjs/intl-localematcher"; import { consola } from "consola"; -const STAGING_API_URL = "https://staging-api.modrinth.com/v2/"; +const API_URL = "https://api.modrinth.com/v2/"; const preloadedFonts = [ "inter/Inter-Regular.woff2", @@ -433,7 +433,7 @@ export default defineNuxtConfig({ function getApiUrl() { // @ts-ignore - return process.env.BROWSER_BASE_URL ?? globalThis.BROWSER_BASE_URL ?? STAGING_API_URL; + return process.env.BROWSER_BASE_URL ?? globalThis.BROWSER_BASE_URL ?? API_URL; } function isProduction() { @@ -457,7 +457,7 @@ function getDomain() { return `https://${process.env.HEROKU_APP_NAME}.herokuapp.com`; } else if (process.env.VERCEL_URL) { return `https://${process.env.VERCEL_URL}`; - } else if (getApiUrl() === STAGING_API_URL) { + } else if (getApiUrl() === API_URL) { return "https://staging.modrinth.com"; } else { return "https://modrinth.com"; diff --git a/apps/frontend/package.json b/apps/frontend/package.json index c169ddb4b..3a13549f4 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -7,6 +7,7 @@ "dev": "nuxi dev", "generate": "nuxi generate", "preview": "nuxi preview", + "postinstall": "nuxi prepare", "lint": "eslint . && prettier --check .", "fix": "eslint . --fix && prettier --write .", "intl:extract": "formatjs extract \"{,src/components,src/composables,src/layouts,src/middleware,src/modules,src/pages,src/plugins,src/utils}/**/*.{vue,ts,tsx,js,jsx,mts,cts,mjs,cjs}\" --ignore '**/*.d.ts' --ignore 'node_modules' --out-file src/locales/en-US/index.json --format crowdin --preserve-whitespace"