elysia-intlayer 9.4.3 → 9.4.4
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/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.4.
|
|
3
|
+
"version": "9.4.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization i18n in a simple way for Elysia applications.",
|
|
6
6
|
"keywords": [
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@intlayer/config": "9.4.
|
|
79
|
-
"@intlayer/core": "9.4.
|
|
80
|
-
"@intlayer/engine": "9.4.
|
|
81
|
-
"@intlayer/types": "9.4.
|
|
78
|
+
"@intlayer/config": "9.4.4",
|
|
79
|
+
"@intlayer/core": "9.4.4",
|
|
80
|
+
"@intlayer/engine": "9.4.4",
|
|
81
|
+
"@intlayer/types": "9.4.4"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/node": "26.4.1",
|
|
@@ -87,9 +87,9 @@
|
|
|
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"
|