lynx-intlayer 8.1.2 → 8.1.3

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,4 +1 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_intlayerPolyfill = require('./intlayerPolyfill.cjs');
3
-
4
- exports.intlayerPolyfill = require_intlayerPolyfill.intlayerPolyfill;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./intlayerPolyfill.cjs`);exports.intlayerPolyfill=e.intlayerPolyfill;
@@ -1,23 +1,2 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
-
3
- //#region src/intlayerPolyfill.ts
4
- /**
5
- * Applies necessary polyfills for Lynx to support Intlayer.
6
- *
7
- * This includes polyfilling `structuredClone` if missing,
8
- * and providing no-op implementations for standard DOM `window` methods
9
- * (`addEventListener`, `removeEventListener`, `postMessage`)
10
- * to ensure compatibility with libraries that expect a browser-like environment.
11
- */
12
- const intlayerPolyfill = () => {
13
- if (typeof global.structuredClone !== "function") global.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));
14
- if (typeof window !== "undefined") {
15
- if (typeof window.addEventListener !== "function") window.addEventListener = () => null;
16
- if (typeof window.removeEventListener !== "function") window.removeEventListener = () => null;
17
- if (typeof window.postMessage !== "function") window.postMessage = () => null;
18
- }
19
- };
20
-
21
- //#endregion
22
- exports.intlayerPolyfill = intlayerPolyfill;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=()=>{typeof global.structuredClone!=`function`&&(global.structuredClone=e=>JSON.parse(JSON.stringify(e))),typeof window<`u`&&(typeof window.addEventListener!=`function`&&(window.addEventListener=()=>null),typeof window.removeEventListener!=`function`&&(window.removeEventListener=()=>null),typeof window.postMessage!=`function`&&(window.postMessage=()=>null))};exports.intlayerPolyfill=e;
23
2
  //# sourceMappingURL=intlayerPolyfill.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"intlayerPolyfill.cjs","names":[],"sources":["../../src/intlayerPolyfill.ts"],"sourcesContent":["/**\n * Applies necessary polyfills for Lynx to support Intlayer.\n *\n * This includes polyfilling `structuredClone` if missing,\n * and providing no-op implementations for standard DOM `window` methods\n * (`addEventListener`, `removeEventListener`, `postMessage`)\n * to ensure compatibility with libraries that expect a browser-like environment.\n */\nexport const intlayerPolyfill = () => {\n if (typeof global.structuredClone !== 'function') {\n global.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));\n }\n\n if (typeof window !== 'undefined') {\n if (typeof window.addEventListener !== 'function') {\n window.addEventListener = () => null;\n }\n if (typeof window.removeEventListener !== 'function') {\n window.removeEventListener = () => null;\n }\n if (typeof window.postMessage !== 'function') {\n window.postMessage = () => null;\n }\n }\n};\n"],"mappings":";;;;;;;;;;;AAQA,MAAa,yBAAyB;AACpC,KAAI,OAAO,OAAO,oBAAoB,WACpC,QAAO,mBAAmB,QAAQ,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAGnE,KAAI,OAAO,WAAW,aAAa;AACjC,MAAI,OAAO,OAAO,qBAAqB,WACrC,QAAO,yBAAyB;AAElC,MAAI,OAAO,OAAO,wBAAwB,WACxC,QAAO,4BAA4B;AAErC,MAAI,OAAO,OAAO,gBAAgB,WAChC,QAAO,oBAAoB"}
1
+ {"version":3,"file":"intlayerPolyfill.cjs","names":[],"sources":["../../src/intlayerPolyfill.ts"],"sourcesContent":["/**\n * Applies necessary polyfills for Lynx to support Intlayer.\n *\n * This includes polyfilling `structuredClone` if missing,\n * and providing no-op implementations for standard DOM `window` methods\n * (`addEventListener`, `removeEventListener`, `postMessage`)\n * to ensure compatibility with libraries that expect a browser-like environment.\n */\nexport const intlayerPolyfill = () => {\n if (typeof global.structuredClone !== 'function') {\n global.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));\n }\n\n if (typeof window !== 'undefined') {\n if (typeof window.addEventListener !== 'function') {\n window.addEventListener = () => null;\n }\n if (typeof window.removeEventListener !== 'function') {\n window.removeEventListener = () => null;\n }\n if (typeof window.postMessage !== 'function') {\n window.postMessage = () => null;\n }\n }\n};\n"],"mappings":"mEAQA,MAAa,MAAyB,CAChC,OAAO,OAAO,iBAAoB,aACpC,OAAO,gBAAmB,GAAQ,KAAK,MAAM,KAAK,UAAU,EAAI,CAAC,EAG/D,OAAO,OAAW,MAChB,OAAO,OAAO,kBAAqB,aACrC,OAAO,qBAAyB,MAE9B,OAAO,OAAO,qBAAwB,aACxC,OAAO,wBAA4B,MAEjC,OAAO,OAAO,aAAgB,aAChC,OAAO,gBAAoB"}
@@ -1,4 +1 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_plugin_pluginIntlayerLynx = require('./pluginIntlayerLynx.cjs');
3
-
4
- exports.pluginIntlayerLynx = require_plugin_pluginIntlayerLynx.pluginIntlayerLynx;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./pluginIntlayerLynx.cjs`);exports.pluginIntlayerLynx=e.pluginIntlayerLynx;
@@ -1,45 +1,2 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _intlayer_chokidar = require("@intlayer/chokidar");
3
- let _intlayer_config = require("@intlayer/config");
4
-
5
- //#region src/plugin/pluginIntlayerLynx.ts
6
- /**
7
- * A Lynx plugin to integrate Intlayer into the Lynx build process.
8
- *
9
- * - Loads the Intlayer configuration and injects environment variables.
10
- * - If enabled, starts a file watcher for dictionary changes.
11
- * - On build, prepares the Intlayer configuration.
12
- * - Optionally checks for dictionary changes before compiling (hot reload).
13
- *
14
- * Usage in your lynx.config.ts:
15
- *
16
- * import { defineConfig } from '@lynx-js/rspeedy'
17
- * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'
18
- *
19
- * export default defineConfig({
20
- * plugins: [
21
- * pluginIntlayerLynx(),
22
- * ],
23
- * // ...other configuration
24
- * })
25
- */
26
- const pluginIntlayerLynx = () => {
27
- return {
28
- name: "plugin-intlayer-lynx",
29
- async setup(api) {
30
- const configuration = (0, _intlayer_config.getConfiguration)();
31
- await (0, _intlayer_chokidar.prepareIntlayer)(configuration);
32
- if (configuration.content.watch) (0, _intlayer_chokidar.watch)({ configuration });
33
- api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {
34
- return mergeRsbuildConfig(config, { resolve: { alias: {
35
- ...(0, _intlayer_config.getAlias)({ configuration }),
36
- react: (0, _intlayer_config.getProjectRequire)().resolve("@lynx-js/react")
37
- } } });
38
- });
39
- }
40
- };
41
- };
42
-
43
- //#endregion
44
- exports.pluginIntlayerLynx = pluginIntlayerLynx;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`@intlayer/chokidar/build`),t=require(`@intlayer/chokidar/watcher`),n=require(`@intlayer/config/node`),r=require(`@intlayer/config/utils`);const i=()=>({name:`plugin-intlayer-lynx`,async setup(i){let a=(0,n.getConfiguration)();await(0,e.prepareIntlayer)(a),a.content.watch&&(0,t.watch)({configuration:a}),i.modifyRsbuildConfig(async(e,{mergeRsbuildConfig:t})=>t(e,{resolve:{alias:{...(0,r.getAlias)({configuration:a}),react:(0,r.getProjectRequire)().resolve(`@lynx-js/react`)}}}))}});exports.pluginIntlayerLynx=i;
45
2
  //# sourceMappingURL=pluginIntlayerLynx.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pluginIntlayerLynx.cjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport {\n getAlias,\n getConfiguration,\n getProjectRequire,\n} from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const configuration = getConfiguration();\n\n await prepareIntlayer(configuration);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (configuration.content.watch) {\n watch({ configuration });\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,2BAA0C;AACrD,QAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,wDAAkC;AAExC,iDAAsB,cAAc;AAGpC,OAAI,cAAc,QAAQ,MACxB,+BAAM,EAAE,eAAe,CAAC;AAI1B,OAAI,oBAAoB,OAAO,QAAQ,EAAE,yBAAyB;AAChE,WAAO,mBAAmB,QAAQ,EAChC,SAAS,EACP,OAAO;KACL,kCAAY,EAAE,eAAe,CAAC;KAC9B,gDAA0B,CAAC,QAAQ,iBAAiB;KACrD,EACF,EACF,CAAC;KACF;;EAEL"}
1
+ {"version":3,"file":"pluginIntlayerLynx.cjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getAlias, getProjectRequire } from '@intlayer/config/utils';\nimport type { RsbuildPlugin } from '@rsbuild/core';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const configuration = getConfiguration();\n\n await prepareIntlayer(configuration);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (configuration.content.watch) {\n watch({ configuration });\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":"4NA0BA,MAAa,OACJ,CACL,KAAM,uBAEN,MAAM,MAAM,EAAK,CAEf,IAAM,GAAA,EAAA,EAAA,mBAAkC,CAExC,MAAA,EAAA,EAAA,iBAAsB,EAAc,CAGhC,EAAc,QAAQ,QACxB,EAAA,EAAA,OAAM,CAAE,gBAAe,CAAC,CAI1B,EAAI,oBAAoB,MAAO,EAAQ,CAAE,wBAChC,EAAmB,EAAQ,CAChC,QAAS,CACP,MAAO,CACL,IAAA,EAAA,EAAA,UAAY,CAAE,gBAAe,CAAC,CAC9B,OAAA,EAAA,EAAA,oBAA0B,CAAC,QAAQ,iBAAiB,CACrD,CACF,CACF,CAAC,CACF,EAEL"}
@@ -1,3 +1 @@
1
- import { intlayerPolyfill } from "./intlayerPolyfill.mjs";
2
-
3
- export { intlayerPolyfill };
1
+ import{intlayerPolyfill as e}from"./intlayerPolyfill.mjs";export{e as intlayerPolyfill};
@@ -1,21 +1,2 @@
1
- //#region src/intlayerPolyfill.ts
2
- /**
3
- * Applies necessary polyfills for Lynx to support Intlayer.
4
- *
5
- * This includes polyfilling `structuredClone` if missing,
6
- * and providing no-op implementations for standard DOM `window` methods
7
- * (`addEventListener`, `removeEventListener`, `postMessage`)
8
- * to ensure compatibility with libraries that expect a browser-like environment.
9
- */
10
- const intlayerPolyfill = () => {
11
- if (typeof global.structuredClone !== "function") global.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));
12
- if (typeof window !== "undefined") {
13
- if (typeof window.addEventListener !== "function") window.addEventListener = () => null;
14
- if (typeof window.removeEventListener !== "function") window.removeEventListener = () => null;
15
- if (typeof window.postMessage !== "function") window.postMessage = () => null;
16
- }
17
- };
18
-
19
- //#endregion
20
- export { intlayerPolyfill };
1
+ const e=()=>{typeof global.structuredClone!=`function`&&(global.structuredClone=e=>JSON.parse(JSON.stringify(e))),typeof window<`u`&&(typeof window.addEventListener!=`function`&&(window.addEventListener=()=>null),typeof window.removeEventListener!=`function`&&(window.removeEventListener=()=>null),typeof window.postMessage!=`function`&&(window.postMessage=()=>null))};export{e as intlayerPolyfill};
21
2
  //# sourceMappingURL=intlayerPolyfill.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"intlayerPolyfill.mjs","names":[],"sources":["../../src/intlayerPolyfill.ts"],"sourcesContent":["/**\n * Applies necessary polyfills for Lynx to support Intlayer.\n *\n * This includes polyfilling `structuredClone` if missing,\n * and providing no-op implementations for standard DOM `window` methods\n * (`addEventListener`, `removeEventListener`, `postMessage`)\n * to ensure compatibility with libraries that expect a browser-like environment.\n */\nexport const intlayerPolyfill = () => {\n if (typeof global.structuredClone !== 'function') {\n global.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));\n }\n\n if (typeof window !== 'undefined') {\n if (typeof window.addEventListener !== 'function') {\n window.addEventListener = () => null;\n }\n if (typeof window.removeEventListener !== 'function') {\n window.removeEventListener = () => null;\n }\n if (typeof window.postMessage !== 'function') {\n window.postMessage = () => null;\n }\n }\n};\n"],"mappings":";;;;;;;;;AAQA,MAAa,yBAAyB;AACpC,KAAI,OAAO,OAAO,oBAAoB,WACpC,QAAO,mBAAmB,QAAQ,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAGnE,KAAI,OAAO,WAAW,aAAa;AACjC,MAAI,OAAO,OAAO,qBAAqB,WACrC,QAAO,yBAAyB;AAElC,MAAI,OAAO,OAAO,wBAAwB,WACxC,QAAO,4BAA4B;AAErC,MAAI,OAAO,OAAO,gBAAgB,WAChC,QAAO,oBAAoB"}
1
+ {"version":3,"file":"intlayerPolyfill.mjs","names":[],"sources":["../../src/intlayerPolyfill.ts"],"sourcesContent":["/**\n * Applies necessary polyfills for Lynx to support Intlayer.\n *\n * This includes polyfilling `structuredClone` if missing,\n * and providing no-op implementations for standard DOM `window` methods\n * (`addEventListener`, `removeEventListener`, `postMessage`)\n * to ensure compatibility with libraries that expect a browser-like environment.\n */\nexport const intlayerPolyfill = () => {\n if (typeof global.structuredClone !== 'function') {\n global.structuredClone = (obj) => JSON.parse(JSON.stringify(obj));\n }\n\n if (typeof window !== 'undefined') {\n if (typeof window.addEventListener !== 'function') {\n window.addEventListener = () => null;\n }\n if (typeof window.removeEventListener !== 'function') {\n window.removeEventListener = () => null;\n }\n if (typeof window.postMessage !== 'function') {\n window.postMessage = () => null;\n }\n }\n};\n"],"mappings":"AAQA,MAAa,MAAyB,CAChC,OAAO,OAAO,iBAAoB,aACpC,OAAO,gBAAmB,GAAQ,KAAK,MAAM,KAAK,UAAU,EAAI,CAAC,EAG/D,OAAO,OAAW,MAChB,OAAO,OAAO,kBAAqB,aACrC,OAAO,qBAAyB,MAE9B,OAAO,OAAO,qBAAwB,aACxC,OAAO,wBAA4B,MAEjC,OAAO,OAAO,aAAgB,aAChC,OAAO,gBAAoB"}
@@ -1,3 +1 @@
1
- import { pluginIntlayerLynx } from "./pluginIntlayerLynx.mjs";
2
-
3
- export { pluginIntlayerLynx };
1
+ import{pluginIntlayerLynx as e}from"./pluginIntlayerLynx.mjs";export{e as pluginIntlayerLynx};
@@ -1,44 +1,2 @@
1
- import { prepareIntlayer, watch } from "@intlayer/chokidar";
2
- import { getAlias, getConfiguration, getProjectRequire } from "@intlayer/config";
3
-
4
- //#region src/plugin/pluginIntlayerLynx.ts
5
- /**
6
- * A Lynx plugin to integrate Intlayer into the Lynx build process.
7
- *
8
- * - Loads the Intlayer configuration and injects environment variables.
9
- * - If enabled, starts a file watcher for dictionary changes.
10
- * - On build, prepares the Intlayer configuration.
11
- * - Optionally checks for dictionary changes before compiling (hot reload).
12
- *
13
- * Usage in your lynx.config.ts:
14
- *
15
- * import { defineConfig } from '@lynx-js/rspeedy'
16
- * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'
17
- *
18
- * export default defineConfig({
19
- * plugins: [
20
- * pluginIntlayerLynx(),
21
- * ],
22
- * // ...other configuration
23
- * })
24
- */
25
- const pluginIntlayerLynx = () => {
26
- return {
27
- name: "plugin-intlayer-lynx",
28
- async setup(api) {
29
- const configuration = getConfiguration();
30
- await prepareIntlayer(configuration);
31
- if (configuration.content.watch) watch({ configuration });
32
- api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {
33
- return mergeRsbuildConfig(config, { resolve: { alias: {
34
- ...getAlias({ configuration }),
35
- react: getProjectRequire().resolve("@lynx-js/react")
36
- } } });
37
- });
38
- }
39
- };
40
- };
41
-
42
- //#endregion
43
- export { pluginIntlayerLynx };
1
+ import{prepareIntlayer as e}from"@intlayer/chokidar/build";import{watch as t}from"@intlayer/chokidar/watcher";import{getConfiguration as n}from"@intlayer/config/node";import{getAlias as r,getProjectRequire as i}from"@intlayer/config/utils";const a=()=>({name:`plugin-intlayer-lynx`,async setup(a){let o=n();await e(o),o.content.watch&&t({configuration:o}),a.modifyRsbuildConfig(async(e,{mergeRsbuildConfig:t})=>t(e,{resolve:{alias:{...r({configuration:o}),react:i().resolve(`@lynx-js/react`)}}}))}});export{a as pluginIntlayerLynx};
44
2
  //# sourceMappingURL=pluginIntlayerLynx.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pluginIntlayerLynx.mjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport {\n getAlias,\n getConfiguration,\n getProjectRequire,\n} from '@intlayer/config';\nimport type { RsbuildPlugin } from '@rsbuild/core';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const configuration = getConfiguration();\n\n await prepareIntlayer(configuration);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (configuration.content.watch) {\n watch({ configuration });\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAa,2BAA0C;AACrD,QAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,gBAAgB,kBAAkB;AAExC,SAAM,gBAAgB,cAAc;AAGpC,OAAI,cAAc,QAAQ,MACxB,OAAM,EAAE,eAAe,CAAC;AAI1B,OAAI,oBAAoB,OAAO,QAAQ,EAAE,yBAAyB;AAChE,WAAO,mBAAmB,QAAQ,EAChC,SAAS,EACP,OAAO;KACL,GAAG,SAAS,EAAE,eAAe,CAAC;KAC9B,OAAO,mBAAmB,CAAC,QAAQ,iBAAiB;KACrD,EACF,EACF,CAAC;KACF;;EAEL"}
1
+ {"version":3,"file":"pluginIntlayerLynx.mjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getAlias, getProjectRequire } from '@intlayer/config/utils';\nimport type { RsbuildPlugin } from '@rsbuild/core';\n\n/**\n * A Lynx plugin to integrate Intlayer into the Lynx build process.\n *\n * - Loads the Intlayer configuration and injects environment variables.\n * - If enabled, starts a file watcher for dictionary changes.\n * - On build, prepares the Intlayer configuration.\n * - Optionally checks for dictionary changes before compiling (hot reload).\n *\n * Usage in your lynx.config.ts:\n *\n * import { defineConfig } from '@lynx-js/rspeedy'\n * import { pluginIntlayerLynx } from '@intlayer/lynx-plugin'\n *\n * export default defineConfig({\n * plugins: [\n * pluginIntlayerLynx(),\n * ],\n * // ...other configuration\n * })\n */\nexport const pluginIntlayerLynx = (): RsbuildPlugin => {\n return {\n name: 'plugin-intlayer-lynx',\n\n async setup(api) {\n // Load the Intlayer configuration and format env variables for Lynx.\n const configuration = getConfiguration();\n\n await prepareIntlayer(configuration);\n\n // If file watching is enabled in Intlayer's config, start it.\n if (configuration.content.watch) {\n watch({ configuration });\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":"gPA0BA,MAAa,OACJ,CACL,KAAM,uBAEN,MAAM,MAAM,EAAK,CAEf,IAAM,EAAgB,GAAkB,CAExC,MAAM,EAAgB,EAAc,CAGhC,EAAc,QAAQ,OACxB,EAAM,CAAE,gBAAe,CAAC,CAI1B,EAAI,oBAAoB,MAAO,EAAQ,CAAE,wBAChC,EAAmB,EAAQ,CAChC,QAAS,CACP,MAAO,CACL,GAAG,EAAS,CAAE,gBAAe,CAAC,CAC9B,MAAO,GAAmB,CAAC,QAAQ,iBAAiB,CACrD,CACF,CACF,CAAC,CACF,EAEL"}
@@ -1 +1 @@
1
- {"version":3,"file":"pluginIntlayerLynx.d.ts","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"mappings":";;;;;AA4BA;;;;;;;;;;;;;;;;;;cAAa,kBAAA,QAAyB,aAAA"}
1
+ {"version":3,"file":"pluginIntlayerLynx.d.ts","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"mappings":";;;;;AA0BA;;;;;;;;;;;;;;;;;;cAAa,kBAAA,QAAyB,aAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lynx-intlayer",
3
- "version": "8.1.2",
3
+ "version": "8.1.3",
4
4
  "private": false,
5
5
  "description": "A Lynx plugin for seamless internationalization (i18n) and localization (l10n) of your mobile app.",
6
6
  "keywords": [
@@ -87,10 +87,10 @@
87
87
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
88
88
  },
89
89
  "dependencies": {
90
- "@intlayer/chokidar": "8.1.2",
91
- "@intlayer/config": "8.1.2",
92
- "@intlayer/core": "8.1.2",
93
- "@intlayer/types": "8.1.2"
90
+ "@intlayer/chokidar": "8.1.3",
91
+ "@intlayer/config": "8.1.3",
92
+ "@intlayer/core": "8.1.3",
93
+ "@intlayer/types": "8.1.3"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@rsbuild/core": "1.6.15",