adonis-intlayer 9.7.0 → 9.7.1
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/cjs/index.cjs +2 -3
- package/dist/cjs/middleware.cjs +2 -3
- package/dist/esm/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/middleware.mjs +1 -2
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/middleware.d.ts +0 -2
- package/dist/types/middleware.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_middleware = require(
|
|
2
|
+
const require_middleware = require("./middleware.cjs");
|
|
3
3
|
let node_async_hooks = require("node:async_hooks");
|
|
4
4
|
let _intlayer_config_built = require("@intlayer/config/built");
|
|
5
5
|
let _intlayer_config_node = require("@intlayer/config/node");
|
|
@@ -7,7 +7,7 @@ let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
|
7
7
|
let _intlayer_core_utils = require("@intlayer/core/utils");
|
|
8
8
|
let _intlayer_engine_build = require("@intlayer/engine/build");
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/index.ts
|
|
11
11
|
let debug = () => {};
|
|
12
12
|
if (process.env.NODE_ENV === "development") try {
|
|
13
13
|
const logger = require("@adonisjs/core/services/logger").default;
|
|
@@ -90,7 +90,6 @@ const getDictionary = (...args) => {
|
|
|
90
90
|
*/
|
|
91
91
|
const getLocale = (locale) => intlayerStorage.getStore()?.locale ?? locale ?? _intlayer_config_built.internationalization.defaultLocale;
|
|
92
92
|
|
|
93
|
-
//#endregion
|
|
94
93
|
exports.IntlayerMiddleware = require_middleware;
|
|
95
94
|
exports.getDictionary = getDictionary;
|
|
96
95
|
exports.getIntlayer = getIntlayer;
|
package/dist/cjs/middleware.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_index = require(
|
|
1
|
+
const require_index = require("./index.cjs");
|
|
2
2
|
let _intlayer_config_built = require("@intlayer/config/built");
|
|
3
3
|
let _intlayer_core_interpreter = require("@intlayer/core/interpreter");
|
|
4
4
|
let _intlayer_core_localization = require("@intlayer/core/localization");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/middleware.ts
|
|
7
7
|
/**
|
|
8
8
|
* AdonisJS middleware that detects the user's locale and populates the context with Intlayer data.
|
|
9
9
|
*/
|
|
@@ -27,6 +27,5 @@ var IntlayerMiddleware = class {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
module.exports = IntlayerMiddleware;
|
|
32
31
|
//# sourceMappingURL=middleware.cjs.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
3
3
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
4
4
|
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
//#endregion
|
|
8
7
|
export { __require };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { getDictionary as getDictionary$1, getIntlayer as getIntlayer$1, getTran
|
|
|
7
7
|
import { getLocaleFromStorageServer } from "@intlayer/core/utils";
|
|
8
8
|
import { prepareIntlayerServer } from "@intlayer/engine/build";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/index.ts
|
|
11
11
|
let debug = () => {};
|
|
12
12
|
if (process.env.NODE_ENV === "development") try {
|
|
13
13
|
const logger = __require("@adonisjs/core/services/logger").default;
|
|
@@ -90,6 +90,5 @@ const getDictionary = (...args) => {
|
|
|
90
90
|
*/
|
|
91
91
|
const getLocale = (locale) => intlayerStorage.getStore()?.locale ?? locale ?? internationalization.defaultLocale;
|
|
92
92
|
|
|
93
|
-
//#endregion
|
|
94
93
|
export { IntlayerMiddleware, getDictionary, getIntlayer, getLocale, getStorageLocale, intlayerStorage, t, translateFunction };
|
|
95
94
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/middleware.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { internationalization } from "@intlayer/config/built";
|
|
|
3
3
|
import { getDictionary, getIntlayer } from "@intlayer/core/interpreter";
|
|
4
4
|
import { localeDetector } from "@intlayer/core/localization";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/middleware.ts
|
|
7
7
|
/**
|
|
8
8
|
* AdonisJS middleware that detects the user's locale and populates the context with Intlayer data.
|
|
9
9
|
*/
|
|
@@ -27,6 +27,5 @@ var IntlayerMiddleware = class {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
export { IntlayerMiddleware as default };
|
|
32
31
|
//# sourceMappingURL=middleware.mjs.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { HttpContext } from "@adonisjs/core/http";
|
|
|
4
4
|
import { getDictionary as getDictionary$1, getIntlayer as getIntlayer$1 } from "@intlayer/core/interpreter";
|
|
5
5
|
import { Locale } from "@intlayer/types/allLocales";
|
|
6
6
|
import { StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
7
|
-
//#region src/index.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* Intlayer helpers bound to the request being handled.
|
|
10
9
|
*/
|
|
@@ -62,6 +61,5 @@ export declare const getDictionary: typeof getDictionary$1;
|
|
|
62
61
|
* Returns the locale of the request being handled, else `locale`, else the default locale.
|
|
63
62
|
*/
|
|
64
63
|
export declare const getLocale: (locale?: Locale) => Locale;
|
|
65
|
-
//#endregion
|
|
66
64
|
export { IntlayerMiddleware };
|
|
67
65
|
//# 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":["getIntlayerFunction","getDictionaryFunction"],"sources":["../../src/index.ts"],"mappings":";;;;;;;;;YA8BY;EACV,QAAQ;EACR,GAAG,kBAAkB;EACrB,oBAAoBA;EACpB,sBAAsBC;;;;;;;;;qBAUX,iBAAe,kBAAA;;;;;;;qBAcf,mBAAgB,KAAS,gBAAc;;;;qBAWvC,oBAAiB,KACtB,iBACL,kBAAgB,SACN,oBAAoB,aAAW,SAC/B,WACR;;;;;;;;;;;;;;;;;;;;;;;qBA+BQ,IAAK,kBAAgB,SACvB,oBAAoB,UAAQ,SAC5B,WACR;qBAiBU,oBAAoBD;qBAcpB,sBAAsBC;;;;qBAiBtB,YAAS,SAAa,WAAS"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { HttpContext } from "@adonisjs/core/http";
|
|
2
2
|
import { NextFn } from "@adonisjs/core/types/http";
|
|
3
|
-
//#region src/middleware.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* AdonisJS middleware that detects the user's locale and populates the context with Intlayer data.
|
|
6
5
|
*/
|
|
7
6
|
export default class IntlayerMiddleware {
|
|
8
7
|
handle(ctx: HttpContext, next: NextFn): Promise<void>;
|
|
9
8
|
}
|
|
10
|
-
//#endregion
|
|
11
9
|
//# 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":";;;;;qBAcqB;EACb,OAAO,KAAK,aAAa,MAAM,SAAM"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adonis-intlayer",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization i18n in a simple way for AdonisJS application.",
|
|
6
6
|
"keywords": [
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@intlayer/config": "9.7.
|
|
85
|
-
"@intlayer/core": "9.7.
|
|
86
|
-
"@intlayer/engine": "9.7.
|
|
87
|
-
"@intlayer/types": "9.7.
|
|
84
|
+
"@intlayer/config": "9.7.1",
|
|
85
|
+
"@intlayer/core": "9.7.1",
|
|
86
|
+
"@intlayer/engine": "9.7.1",
|
|
87
|
+
"@intlayer/types": "9.7.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@types/node": "^26",
|
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
"@utils/ts-config-types": "1.0.4",
|
|
93
93
|
"@utils/tsdown-config": "1.0.4",
|
|
94
94
|
"rimraf": "6.1.3",
|
|
95
|
-
"tsdown": "0.23.
|
|
95
|
+
"tsdown": "0.23.4",
|
|
96
96
|
"typescript": "7.0.2",
|
|
97
|
-
"vitest": "5.0
|
|
97
|
+
"vitest": "5.1.0"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"@adonisjs/core": ">=6.0.0"
|