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.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_middleware = require('./middleware.cjs');
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
- //#region src/index.ts
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;
@@ -1,9 +1,9 @@
1
- const require_index = require('./index.cjs');
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
- //#region src/middleware.ts
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
- //#region \0rolldown/runtime.js
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 };
@@ -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
- //#region src/index.ts
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
@@ -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
- //#region src/middleware.ts
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
@@ -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":";;;;;;;;;;YA8BY;EACV,QAAQ;EACR,GAAG,kBAAkB;EACrB,oBAAoB;EACpB,sBAAsB;;;;;;;;;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,oBAAoB;qBAcpB,sBAAsB;;;;qBAiBtB,YAAS,SAAa,WAAS"}
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":";;;;;;qBAcqB;EACb,OAAO,KAAK,aAAa,MAAM,SAAM"}
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.0",
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.0",
85
- "@intlayer/core": "9.7.0",
86
- "@intlayer/engine": "9.7.0",
87
- "@intlayer/types": "9.7.0"
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.0",
95
+ "tsdown": "0.23.4",
96
96
  "typescript": "7.0.2",
97
- "vitest": "5.0.3"
97
+ "vitest": "5.1.0"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "@adonisjs/core": ">=6.0.0"