adonis-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
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
|
@@ -4,15 +4,15 @@ import { getDictionary as getDictionary$1, getIntlayer as getIntlayer$1 } from "
|
|
|
4
4
|
import { Locale } from "@intlayer/types/allLocales";
|
|
5
5
|
import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
6
6
|
//#region src/index.d.ts
|
|
7
|
-
declare const appNamespace: import("cls-hooked").Namespace<Record<string, any>>;
|
|
7
|
+
export declare const appNamespace: import("cls-hooked").Namespace<Record<string, any>>;
|
|
8
8
|
/**
|
|
9
9
|
* Retrieves the locale from storage (cookies, headers).
|
|
10
10
|
*/
|
|
11
|
-
declare const getStorageLocale: (ctx: HttpContext) => Locale | undefined;
|
|
11
|
+
export declare const getStorageLocale: (ctx: HttpContext) => Locale | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* Translation function for context
|
|
14
14
|
*/
|
|
15
|
-
declare const translateFunction: (ctx: HttpContext) => <T extends string>(content: StrictModeLocaleMap<T> | string, locale?: Locale) => T;
|
|
15
|
+
export declare const translateFunction: (ctx: HttpContext) => <T extends string>(content: StrictModeLocaleMap<T> | string, locale?: Locale) => T;
|
|
16
16
|
/**
|
|
17
17
|
* Translation function to retrieve content for the current locale.
|
|
18
18
|
*
|
|
@@ -35,10 +35,10 @@ declare const translateFunction: (ctx: HttpContext) => <T extends string>(conten
|
|
|
35
35
|
* });
|
|
36
36
|
* ```
|
|
37
37
|
*/
|
|
38
|
-
declare const t: <Content = string>(content: StrictModeLocaleMap<Content>, locale?: Locale) => Content;
|
|
39
|
-
declare const getIntlayer: typeof getIntlayer$1;
|
|
40
|
-
declare const getDictionary: typeof getDictionary$1;
|
|
41
|
-
declare const getLocale: (locale?: Locale) => Locale;
|
|
38
|
+
export declare const t: <Content = string>(content: StrictModeLocaleMap<Content>, locale?: Locale) => Content;
|
|
39
|
+
export declare const getIntlayer: typeof getIntlayer$1;
|
|
40
|
+
export declare const getDictionary: typeof getDictionary$1;
|
|
41
|
+
export declare const getLocale: (locale?: Locale) => Locale;
|
|
42
42
|
//#endregion
|
|
43
|
-
export { IntlayerMiddleware
|
|
43
|
+
export { IntlayerMiddleware };
|
|
44
44
|
//# 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":";;;;;;qBA4Ba,mCAAY,UAAA;;;;qBAOZ,mBAAgB,KAAS,gBAAc;;;;qBASvC,oBAAiB,KACtB,iBACL,kBAAgB,SACN,oBAAoB,aAAW,SAC/B,WACR;;;;;;;;;;;;;;;;;;;;;;;qBAyDQ,IAAK,kBAAgB,SACvB,oBAAoB,UAAQ,SAC5B,WACR;qBAyBU,oBAAoB;qBA4BpB,sBAAsB;qBA4BtB,YAAS,SAAa,WAAS"}
|
|
@@ -4,9 +4,8 @@ import { NextFn } from "@adonisjs/core/types/http";
|
|
|
4
4
|
/**
|
|
5
5
|
* AdonisJS middleware that detects the user's locale and populates the context with Intlayer data.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
export default class IntlayerMiddleware {
|
|
8
8
|
handle(ctx: HttpContext, next: NextFn): Promise<void>;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
-
export { IntlayerMiddleware as default };
|
|
12
11
|
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../../src/middleware.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../../src/middleware.ts"],"mappings":";;;;;;qBAeqB;EACb,OAAO,KAAK,aAAa,MAAM,SAAM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adonis-intlayer",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization i18n in a simple way for AdonisJS application.",
|
|
6
6
|
"keywords": [
|
|
@@ -80,22 +80,22 @@
|
|
|
80
80
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@intlayer/config": "9.
|
|
84
|
-
"@intlayer/core": "9.
|
|
85
|
-
"@intlayer/engine": "9.
|
|
86
|
-
"@intlayer/types": "9.
|
|
83
|
+
"@intlayer/config": "9.5.0",
|
|
84
|
+
"@intlayer/core": "9.5.0",
|
|
85
|
+
"@intlayer/engine": "9.5.0",
|
|
86
|
+
"@intlayer/types": "9.5.0",
|
|
87
87
|
"cls-hooked": "4.2.2"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@types/cls-hooked": "4.3.9",
|
|
91
|
-
"@types/node": "26.
|
|
91
|
+
"@types/node": "26.5.0",
|
|
92
92
|
"@utils/ts-config": "1.0.4",
|
|
93
93
|
"@utils/ts-config-types": "1.0.4",
|
|
94
94
|
"@utils/tsdown-config": "1.0.4",
|
|
95
95
|
"rimraf": "6.1.3",
|
|
96
|
-
"tsdown": "0.
|
|
96
|
+
"tsdown": "0.23.0",
|
|
97
97
|
"typescript": "7.0.2",
|
|
98
|
-
"vitest": "
|
|
98
|
+
"vitest": "5.0.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@adonisjs/core": ">=6.0.0"
|