elysia-intlayer 9.4.3 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -2
- package/dist/types/index.d.ts +6 -7
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -69,8 +69,6 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
|
|
|
69
69
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) <br> - [Intlayer compat adapters](https://intlayer.org/doc/compatibility) |
|
|
70
70
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
|
|
71
71
|
|
|
72
|
-
---
|
|
73
|
-
|
|
74
72
|
## 📦 Installation
|
|
75
73
|
|
|
76
74
|
Start your journey with Intlayer today and experience a smoother, more powerful approach to internationalization.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ import { Elysia } from "elysia";
|
|
|
6
6
|
/**
|
|
7
7
|
* Translates a locale map into the content matching the current request locale.
|
|
8
8
|
*/
|
|
9
|
-
type TranslateFunction = <Content extends string>(content: StrictModeLocaleMap<Content> | string, locale?: Locale) => Content;
|
|
9
|
+
export type TranslateFunction = <Content extends string>(content: StrictModeLocaleMap<Content> | string, locale?: Locale) => Content;
|
|
10
10
|
/**
|
|
11
11
|
* Intlayer state injected into every Elysia route context by the `intlayer` plugin.
|
|
12
12
|
*/
|
|
13
|
-
type IntlayerContext = {
|
|
13
|
+
export type IntlayerContext = {
|
|
14
14
|
/** Locale explicitly requested by the client through a cookie or a header. */
|
|
15
15
|
locale_storage?: Locale;
|
|
16
16
|
/** Locale negotiated from the request headers (`Accept-Language`). */
|
|
@@ -50,7 +50,7 @@ type IntlayerContext = {
|
|
|
50
50
|
* );
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
declare const intlayer: () => Elysia<"", {
|
|
53
|
+
export declare const intlayer: () => Elysia<"", {
|
|
54
54
|
decorator: {};
|
|
55
55
|
store: {};
|
|
56
56
|
derive: Partial<{
|
|
@@ -93,15 +93,14 @@ declare const intlayer: () => Elysia<"", {
|
|
|
93
93
|
* app.get('/', () => t({ en: 'Hello', fr: 'Bonjour' }));
|
|
94
94
|
* ```
|
|
95
95
|
*/
|
|
96
|
-
declare const t: <Content extends string>(content: StrictModeLocaleMap<Content> | string, locale?: Locale) => Content;
|
|
96
|
+
export declare const t: <Content extends string>(content: StrictModeLocaleMap<Content> | string, locale?: Locale) => Content;
|
|
97
97
|
/**
|
|
98
98
|
* Retrieves a dictionary by key, using the locale of the current request by default.
|
|
99
99
|
*/
|
|
100
|
-
declare const getIntlayer: typeof getIntlayer$1;
|
|
100
|
+
export declare const getIntlayer: typeof getIntlayer$1;
|
|
101
101
|
/**
|
|
102
102
|
* Retrieves an imported dictionary, using the locale of the current request by default.
|
|
103
103
|
*/
|
|
104
|
-
declare const getDictionary: typeof getDictionary$1;
|
|
104
|
+
export declare const getDictionary: typeof getDictionary$1;
|
|
105
105
|
//#endregion
|
|
106
|
-
export { IntlayerContext, TranslateFunction, getDictionary, getIntlayer, intlayer, t };
|
|
107
106
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;;;YAiBY,qBAAqB,wBAC/B,SAAS,oBAAoB,mBAC7B,SAAS,WACN;;;;YAKO;;EAEV,iBAAiB;;EAEjB,iBAAiB;;EAEjB,QAAQ;;EAER,eAAe;;EAEf,GAAG;;EAEH,oBAAoB;;EAEpB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;qBA0GX,gBAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAgFR,IAAK,wBAAsB,SAC7B,oBAAoB,mBAAiB,SACrC,WACR;;;;qBAsBU,oBAAoB;;;;qBAmBpB,sBAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elysia-intlayer",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization i18n in a simple way for Elysia applications.",
|
|
6
6
|
"keywords": [
|
|
@@ -75,21 +75,21 @@
|
|
|
75
75
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@intlayer/config": "9.
|
|
79
|
-
"@intlayer/core": "9.
|
|
80
|
-
"@intlayer/engine": "9.
|
|
81
|
-
"@intlayer/types": "9.
|
|
78
|
+
"@intlayer/config": "9.5.0",
|
|
79
|
+
"@intlayer/core": "9.5.0",
|
|
80
|
+
"@intlayer/engine": "9.5.0",
|
|
81
|
+
"@intlayer/types": "9.5.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@types/node": "26.
|
|
84
|
+
"@types/node": "26.5.0",
|
|
85
85
|
"@utils/ts-config": "1.0.4",
|
|
86
86
|
"@utils/ts-config-types": "1.0.4",
|
|
87
87
|
"@utils/tsdown-config": "1.0.4",
|
|
88
88
|
"elysia": "1.4.29",
|
|
89
89
|
"rimraf": "6.1.3",
|
|
90
|
-
"tsdown": "0.
|
|
90
|
+
"tsdown": "0.23.0",
|
|
91
91
|
"typescript": "7.0.2",
|
|
92
|
-
"vitest": "
|
|
92
|
+
"vitest": "5.0.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"elysia": ">=1.0.0"
|