From a10979656f8e1708478e28b176ae1578d7270f01 Mon Sep 17 00:00:00 2001 From: Vordgi Date: Mon, 6 May 2024 12:27:31 +0400 Subject: [PATCH 1/2] nt-76 fix cache server creation --- package/src/withI18n.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/src/withI18n.ts b/package/src/withI18n.ts index 283f303..a9e5ee9 100644 --- a/package/src/withI18n.ts +++ b/package/src/withI18n.ts @@ -3,8 +3,8 @@ import createCacheServer from "./configuration/createCacheServer"; const PORT = "24"; let cacheSecret = process.env.I18N_CACHE_SECRET; -const withI18n = async (phase: string) => { - if (!cacheSecret && process.env.NODE_ENV === "development") { +const withI18n = async () => { + if (!cacheSecret) { try { const devResp = await fetch(`http://localhost:${PORT}/?type=dev`); const data = await devResp.json(); @@ -16,7 +16,7 @@ const withI18n = async (phase: string) => { } } - if ((phase === "phase-development-server" || phase === "phase-production-server") && !cacheSecret) { + if (!cacheSecret) { const { secret } = await createCacheServer(PORT); cacheSecret = secret; } From ee1cdc6c1830c3ac0d35ec2b54020349076bfb57 Mon Sep 17 00:00:00 2001 From: Vordgi Date: Mon, 6 May 2024 14:05:58 +0400 Subject: [PATCH 2/2] nt-78 release 1.2.0 --- package/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/package.json b/package/package.json index a86fbd5..5b5e300 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "@nimpl/i18n", - "version": "1.1.2", + "version": "1.2.0", "description": "i18n library for working with translations in server and client components", "exports": { "./ClientTranslation": {