🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@i18n-micro/types

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@i18n-micro/types - npm Package Compare versions

Comparing version
1.2.2
to
1.2.3
+62
-0
dist/index.d.cts

@@ -248,2 +248,10 @@ /** BCP-47 locale code string (e.g. `'en'`, `'de-DE'`, `'zh-Hans'`). */

/**
* Controls how pre-merged translation payload files are emitted during build.
*
* Keep the defaults for the existing all-in-one behavior. For serverless or CDN-backed
* deployments, disable individual outputs to avoid duplicating large locale payloads in
* both Nitro server assets and public assets.
*/
translationPayloads?: TranslationPayloadOptions;
/**
* Automatically detect the user's preferred language from the `Accept-Language` HTTP header.

@@ -408,2 +416,54 @@ * Used in combination with `autoDetectPath` to decide when detection occurs.

}
export interface TranslationPayloadOptions {
/**
* Translation payload strategy.
* - `premerged`: build-time page/locale matrix (default)
* - `source`: compact source files merged at runtime (recommended for large serverless apps)
* @default 'premerged'
*/
mode?: 'premerged' | 'source';
/**
* Register translation payload files as Nitro server assets.
* In `premerged` mode this is the fully merged page/locale matrix.
* In `source` mode this is the compact layer-merged source directory.
* Required for the built-in local `_locales` server route unless translations are fetched
* from `apiBaseServerHost`.
* @default true
*/
serverAssets?: boolean;
/**
* Register the built-in server route at `/{apiBaseUrl}/:page/:locale/data.json`.
* Disable this when translation payloads are served from an external host/CDN.
* @default true
*/
serverHandler?: boolean;
/**
* Copy translation payload files into Nitro public assets during production builds.
* In `source` mode this copies the compact source directory, not a pre-merged matrix.
* @default true in `premerged` mode, `false` in `source` mode
*/
publicAssets?: boolean;
/**
* Add translation data routes to Nuxt/Nitro prerender output.
* Disable this when `_locales` payloads are served from an external host/CDN or should not be
* materialized into public output.
* @default true in `premerged` mode, `false` in `source` mode
*/
prerenderRoutes?: boolean;
/**
* Public output directory for copied translation payloads, relative to Nitro's public directory.
* Defaults to `translationDir`.
*/
publicDir?: string;
/**
* Warn during build when generated payload file count exceeds this threshold.
* @default 500
*/
warnFileCount?: number;
/**
* Warn during build when generated payload total size exceeds this threshold in bytes.
* @default 10485760 (10 MB)
*/
warnSizeBytes?: number;
}
/**

@@ -426,2 +486,4 @@ * Extended module options injected into the Nuxt runtime config.

redirects?: boolean;
/** Resolved translation payload loading strategy. */
translationPayloadMode?: 'premerged' | 'source';
}

@@ -428,0 +490,0 @@ /**

@@ -248,2 +248,10 @@ /** BCP-47 locale code string (e.g. `'en'`, `'de-DE'`, `'zh-Hans'`). */

/**
* Controls how pre-merged translation payload files are emitted during build.
*
* Keep the defaults for the existing all-in-one behavior. For serverless or CDN-backed
* deployments, disable individual outputs to avoid duplicating large locale payloads in
* both Nitro server assets and public assets.
*/
translationPayloads?: TranslationPayloadOptions;
/**
* Automatically detect the user's preferred language from the `Accept-Language` HTTP header.

@@ -408,2 +416,54 @@ * Used in combination with `autoDetectPath` to decide when detection occurs.

}
export interface TranslationPayloadOptions {
/**
* Translation payload strategy.
* - `premerged`: build-time page/locale matrix (default)
* - `source`: compact source files merged at runtime (recommended for large serverless apps)
* @default 'premerged'
*/
mode?: 'premerged' | 'source';
/**
* Register translation payload files as Nitro server assets.
* In `premerged` mode this is the fully merged page/locale matrix.
* In `source` mode this is the compact layer-merged source directory.
* Required for the built-in local `_locales` server route unless translations are fetched
* from `apiBaseServerHost`.
* @default true
*/
serverAssets?: boolean;
/**
* Register the built-in server route at `/{apiBaseUrl}/:page/:locale/data.json`.
* Disable this when translation payloads are served from an external host/CDN.
* @default true
*/
serverHandler?: boolean;
/**
* Copy translation payload files into Nitro public assets during production builds.
* In `source` mode this copies the compact source directory, not a pre-merged matrix.
* @default true in `premerged` mode, `false` in `source` mode
*/
publicAssets?: boolean;
/**
* Add translation data routes to Nuxt/Nitro prerender output.
* Disable this when `_locales` payloads are served from an external host/CDN or should not be
* materialized into public output.
* @default true in `premerged` mode, `false` in `source` mode
*/
prerenderRoutes?: boolean;
/**
* Public output directory for copied translation payloads, relative to Nitro's public directory.
* Defaults to `translationDir`.
*/
publicDir?: string;
/**
* Warn during build when generated payload file count exceeds this threshold.
* @default 500
*/
warnFileCount?: number;
/**
* Warn during build when generated payload total size exceeds this threshold in bytes.
* @default 10485760 (10 MB)
*/
warnSizeBytes?: number;
}
/**

@@ -426,2 +486,4 @@ * Extended module options injected into the Nuxt runtime config.

redirects?: boolean;
/** Resolved translation payload loading strategy. */
translationPayloadMode?: 'premerged' | 'source';
}

@@ -428,0 +490,0 @@ /**

+1
-1
{
"name": "@i18n-micro/types",
"version": "1.2.2",
"version": "1.2.3",
"description": "TypeScript definitions for the Nuxt I18n Micro ecosystem.",

@@ -5,0 +5,0 @@ "repository": {