lynx-intlayer 9.5.10 → 9.5.12

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.
@@ -6,7 +6,7 @@ let _intlayer_config_node = require("@intlayer/config/node");
6
6
  let _intlayer_config_utils = require("@intlayer/config/utils");
7
7
  let _intlayer_dictionaries_entry = require("@intlayer/dictionaries-entry");
8
8
  let _intlayer_engine_build = require("@intlayer/engine/build");
9
- let _intlayer_engine_watcher = require("@intlayer/engine/watcher");
9
+ let _intlayer_engine_utils = require("@intlayer/engine/utils");
10
10
 
11
11
  //#region src/plugin/pluginIntlayerLynx.ts
12
12
  /**
@@ -35,7 +35,7 @@ const pluginIntlayerLynx = () => {
35
35
  async setup(api) {
36
36
  const configuration = (0, _intlayer_config_node.getConfiguration)();
37
37
  await (0, _intlayer_engine_build.prepareIntlayer)(configuration);
38
- if (configuration.content.watch) await (0, _intlayer_engine_watcher.watch)({ configuration });
38
+ if (api.context.action === "dev") (0, _intlayer_engine_utils.startContentWatcher)(configuration, { label: "lynx-intlayer" });
39
39
  const isBuild = api.context.action === "build";
40
40
  let defineVars = {};
41
41
  if (isBuild) {
@@ -1 +1 @@
1
- {"version":3,"file":"pluginIntlayerLynx.cjs","names":["getConfiguration","prepareIntlayer","watch","getAppLogger","getDictionaries","getUnusedNodeTypesAsync","colorize","BLUE","formatNodeTypeToEnvVar","formatDictionarySelectorEnvVar","getHasDictionarySelector","getConfigEnvVars","getAlias","getProjectRequire"],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { BLUE } from '@intlayer/config/colors';\nimport {\n formatDictionarySelectorEnvVar,\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport {\n getAlias,\n getHasDictionarySelector,\n getProjectRequire,\n getUnusedNodeTypesAsync,\n} from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\nimport { prepareIntlayer } from '@intlayer/engine/build';\nimport { watch } from '@intlayer/engine/watcher';\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 await watch({ configuration });\n }\n\n const isBuild = api.context.action === 'build';\n\n let defineVars = {};\n\n if (isBuild) {\n const appLogger = getAppLogger(configuration);\n\n const dictionaries = getDictionaries(configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out unused logic:',\n unusedNodeTypes\n .filter(\n (key) =>\n !['reactNode', 'solidNode', 'preactNode'].includes(key)\n )\n .map((key) => colorize(key, BLUE))\n .join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n defineVars = {\n // Tree shaking based on unused node types\n ...formatNodeTypeToEnvVar(\n unusedNodeTypes,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking the dictionary selector logic\n // (collections / variants)\n ...formatDictionarySelectorEnvVar(\n getHasDictionarySelector(dictionaries),\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking based on config\n ...getConfigEnvVars(\n configuration,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n };\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n source: {\n define: defineVars,\n },\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,2BAA0C;CACrD,OAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,oBAAgBA,wCAAiB;GAEvC,UAAMC,wCAAgB,aAAa;GAGnC,IAAI,cAAc,QAAQ,OACxB,UAAMC,gCAAM,EAAE,cAAc,CAAC;GAG/B,MAAM,UAAU,IAAI,QAAQ,WAAW;GAEvC,IAAI,aAAa,CAAC;GAElB,IAAI,SAAS;IACX,MAAM,gBAAYC,sCAAa,aAAa;IAE5C,MAAM,mBAAeC,8CAAgB,aAAa;IAElD,IAAI,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GACvC,UAAU,2DAA2D,EACnE,WAAW,KACb,CAAC;IAGH,MAAM,kBAAkB,UAAMC,gDAAwB,YAAY;IAElE,IAAI,gBAAgB,SAAS,GAC3B,UACE,CACE,+BACA,gBACG,QACE,QACC,CAAC;KAAC;KAAa;KAAa;IAAY,CAAC,CAAC,SAAS,GAAG,CAC1D,CAAC,CACA,KAAK,YAAQC,kCAAS,KAAKC,4BAAI,CAAC,CAAC,CACjC,KAAK,IAAI,CACd,GACA,EACE,WAAW,KACb,CACF;IAGF,aAAa;KAEX,OAAGC,iDACD,kBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAGA,OAAGC,6DACDC,iDAAyB,YAAY,IACpC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAEA,OAAGC,2CACD,gBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;IACF;GACF;GAGA,IAAI,oBAAoB,OAAO,QAAQ,EAAE,yBAAyB;IAChE,OAAO,mBAAmB,QAAQ;KAChC,QAAQ,EACN,QAAQ,WACV;KACA,SAAS,EACP,OAAO;MACL,OAAGC,iCAAS,EAAE,cAAc,CAAC;MAC7B,WAAOC,0CAAkB,CAAC,CAAC,QAAQ,gBAAgB;KACrD,EACF;IACF,CAAC;GACH,CAAC;EACH;CACF;AACF"}
1
+ {"version":3,"file":"pluginIntlayerLynx.cjs","names":["getConfiguration","prepareIntlayer","getAppLogger","getDictionaries","getUnusedNodeTypesAsync","colorize","BLUE","formatNodeTypeToEnvVar","formatDictionarySelectorEnvVar","getHasDictionarySelector","getConfigEnvVars","getAlias","getProjectRequire"],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { BLUE } from '@intlayer/config/colors';\nimport {\n formatDictionarySelectorEnvVar,\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport {\n getAlias,\n getHasDictionarySelector,\n getProjectRequire,\n getUnusedNodeTypesAsync,\n} from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\nimport { prepareIntlayer } from '@intlayer/engine/build';\nimport { startContentWatcher } from '@intlayer/engine/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 // Only the dev server watches: a build must be able to exit.\n if (api.context.action === 'dev') {\n startContentWatcher(configuration, { label: 'lynx-intlayer' });\n }\n\n const isBuild = api.context.action === 'build';\n\n let defineVars = {};\n\n if (isBuild) {\n const appLogger = getAppLogger(configuration);\n\n const dictionaries = getDictionaries(configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out unused logic:',\n unusedNodeTypes\n .filter(\n (key) =>\n !['reactNode', 'solidNode', 'preactNode'].includes(key)\n )\n .map((key) => colorize(key, BLUE))\n .join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n defineVars = {\n // Tree shaking based on unused node types\n ...formatNodeTypeToEnvVar(\n unusedNodeTypes,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking the dictionary selector logic\n // (collections / variants)\n ...formatDictionarySelectorEnvVar(\n getHasDictionarySelector(dictionaries),\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking based on config\n ...getConfigEnvVars(\n configuration,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n };\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n source: {\n define: defineVars,\n },\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,2BAA0C;CACrD,OAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,oBAAgBA,wCAAiB;GAEvC,UAAMC,wCAAgB,aAAa;GAGnC,IAAI,IAAI,QAAQ,WAAW,OACzB,gDAAoB,eAAe,EAAE,OAAO,gBAAgB,CAAC;GAG/D,MAAM,UAAU,IAAI,QAAQ,WAAW;GAEvC,IAAI,aAAa,CAAC;GAElB,IAAI,SAAS;IACX,MAAM,gBAAYC,sCAAa,aAAa;IAE5C,MAAM,mBAAeC,8CAAgB,aAAa;IAElD,IAAI,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GACvC,UAAU,2DAA2D,EACnE,WAAW,KACb,CAAC;IAGH,MAAM,kBAAkB,UAAMC,gDAAwB,YAAY;IAElE,IAAI,gBAAgB,SAAS,GAC3B,UACE,CACE,+BACA,gBACG,QACE,QACC,CAAC;KAAC;KAAa;KAAa;IAAY,CAAC,CAAC,SAAS,GAAG,CAC1D,CAAC,CACA,KAAK,YAAQC,kCAAS,KAAKC,4BAAI,CAAC,CAAC,CACjC,KAAK,IAAI,CACd,GACA,EACE,WAAW,KACb,CACF;IAGF,aAAa;KAEX,OAAGC,iDACD,kBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAGA,OAAGC,6DACDC,iDAAyB,YAAY,IACpC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAEA,OAAGC,2CACD,gBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;IACF;GACF;GAGA,IAAI,oBAAoB,OAAO,QAAQ,EAAE,yBAAyB;IAChE,OAAO,mBAAmB,QAAQ;KAChC,QAAQ,EACN,QAAQ,WACV;KACA,SAAS,EACP,OAAO;MACL,OAAGC,iCAAS,EAAE,cAAc,CAAC;MAC7B,WAAOC,0CAAkB,CAAC,CAAC,QAAQ,gBAAgB;KACrD,EACF;IACF,CAAC;GACH,CAAC;EACH;CACF;AACF"}
@@ -5,7 +5,7 @@ import { getConfiguration } from "@intlayer/config/node";
5
5
  import { getAlias, getHasDictionarySelector, getProjectRequire, getUnusedNodeTypesAsync } from "@intlayer/config/utils";
6
6
  import { getDictionaries } from "@intlayer/dictionaries-entry";
7
7
  import { prepareIntlayer } from "@intlayer/engine/build";
8
- import { watch } from "@intlayer/engine/watcher";
8
+ import { startContentWatcher } from "@intlayer/engine/utils";
9
9
 
10
10
  //#region src/plugin/pluginIntlayerLynx.ts
11
11
  /**
@@ -34,7 +34,7 @@ const pluginIntlayerLynx = () => {
34
34
  async setup(api) {
35
35
  const configuration = getConfiguration();
36
36
  await prepareIntlayer(configuration);
37
- if (configuration.content.watch) await watch({ configuration });
37
+ if (api.context.action === "dev") startContentWatcher(configuration, { label: "lynx-intlayer" });
38
38
  const isBuild = api.context.action === "build";
39
39
  let defineVars = {};
40
40
  if (isBuild) {
@@ -1 +1 @@
1
- {"version":3,"file":"pluginIntlayerLynx.mjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { BLUE } from '@intlayer/config/colors';\nimport {\n formatDictionarySelectorEnvVar,\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport {\n getAlias,\n getHasDictionarySelector,\n getProjectRequire,\n getUnusedNodeTypesAsync,\n} from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\nimport { prepareIntlayer } from '@intlayer/engine/build';\nimport { watch } from '@intlayer/engine/watcher';\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 await watch({ configuration });\n }\n\n const isBuild = api.context.action === 'build';\n\n let defineVars = {};\n\n if (isBuild) {\n const appLogger = getAppLogger(configuration);\n\n const dictionaries = getDictionaries(configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out unused logic:',\n unusedNodeTypes\n .filter(\n (key) =>\n !['reactNode', 'solidNode', 'preactNode'].includes(key)\n )\n .map((key) => colorize(key, BLUE))\n .join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n defineVars = {\n // Tree shaking based on unused node types\n ...formatNodeTypeToEnvVar(\n unusedNodeTypes,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking the dictionary selector logic\n // (collections / variants)\n ...formatDictionarySelectorEnvVar(\n getHasDictionarySelector(dictionaries),\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking based on config\n ...getConfigEnvVars(\n configuration,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n };\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n source: {\n define: defineVars,\n },\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,2BAA0C;CACrD,OAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,gBAAgB,iBAAiB;GAEvC,MAAM,gBAAgB,aAAa;GAGnC,IAAI,cAAc,QAAQ,OACxB,MAAM,MAAM,EAAE,cAAc,CAAC;GAG/B,MAAM,UAAU,IAAI,QAAQ,WAAW;GAEvC,IAAI,aAAa,CAAC;GAElB,IAAI,SAAS;IACX,MAAM,YAAY,aAAa,aAAa;IAE5C,MAAM,eAAe,gBAAgB,aAAa;IAElD,IAAI,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GACvC,UAAU,2DAA2D,EACnE,WAAW,KACb,CAAC;IAGH,MAAM,kBAAkB,MAAM,wBAAwB,YAAY;IAElE,IAAI,gBAAgB,SAAS,GAC3B,UACE,CACE,+BACA,gBACG,QACE,QACC,CAAC;KAAC;KAAa;KAAa;IAAY,CAAC,CAAC,SAAS,GAAG,CAC1D,CAAC,CACA,KAAK,QAAQ,SAAS,KAAK,IAAI,CAAC,CAAC,CACjC,KAAK,IAAI,CACd,GACA,EACE,WAAW,KACb,CACF;IAGF,aAAa;KAEX,GAAG,uBACD,kBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAGA,GAAG,+BACD,yBAAyB,YAAY,IACpC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAEA,GAAG,iBACD,gBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;IACF;GACF;GAGA,IAAI,oBAAoB,OAAO,QAAQ,EAAE,yBAAyB;IAChE,OAAO,mBAAmB,QAAQ;KAChC,QAAQ,EACN,QAAQ,WACV;KACA,SAAS,EACP,OAAO;MACL,GAAG,SAAS,EAAE,cAAc,CAAC;MAC7B,OAAO,kBAAkB,CAAC,CAAC,QAAQ,gBAAgB;KACrD,EACF;IACF,CAAC;GACH,CAAC;EACH;CACF;AACF"}
1
+ {"version":3,"file":"pluginIntlayerLynx.mjs","names":[],"sources":["../../../src/plugin/pluginIntlayerLynx.ts"],"sourcesContent":["import { BLUE } from '@intlayer/config/colors';\nimport {\n formatDictionarySelectorEnvVar,\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport {\n getAlias,\n getHasDictionarySelector,\n getProjectRequire,\n getUnusedNodeTypesAsync,\n} from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\nimport { prepareIntlayer } from '@intlayer/engine/build';\nimport { startContentWatcher } from '@intlayer/engine/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 // Only the dev server watches: a build must be able to exit.\n if (api.context.action === 'dev') {\n startContentWatcher(configuration, { label: 'lynx-intlayer' });\n }\n\n const isBuild = api.context.action === 'build';\n\n let defineVars = {};\n\n if (isBuild) {\n const appLogger = getAppLogger(configuration);\n\n const dictionaries = getDictionaries(configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out unused logic:',\n unusedNodeTypes\n .filter(\n (key) =>\n !['reactNode', 'solidNode', 'preactNode'].includes(key)\n )\n .map((key) => colorize(key, BLUE))\n .join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n defineVars = {\n // Tree shaking based on unused node types\n ...formatNodeTypeToEnvVar(\n unusedNodeTypes,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking the dictionary selector logic\n // (collections / variants)\n ...formatDictionarySelectorEnvVar(\n getHasDictionarySelector(dictionaries),\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n // Tree shaking based on config\n ...getConfigEnvVars(\n configuration,\n (key) => `process.env.${key}`,\n (value) => `\"${value}\"`\n ),\n };\n }\n\n // Merge Intlayer-specific environment variables and alias configuration.\n api.modifyRsbuildConfig(async (config, { mergeRsbuildConfig }) => {\n return mergeRsbuildConfig(config, {\n source: {\n define: defineVars,\n },\n resolve: {\n alias: {\n ...getAlias({ configuration }),\n react: getProjectRequire().resolve('@lynx-js/react'),\n },\n },\n });\n });\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAa,2BAA0C;CACrD,OAAO;EACL,MAAM;EAEN,MAAM,MAAM,KAAK;GAEf,MAAM,gBAAgB,iBAAiB;GAEvC,MAAM,gBAAgB,aAAa;GAGnC,IAAI,IAAI,QAAQ,WAAW,OACzB,oBAAoB,eAAe,EAAE,OAAO,gBAAgB,CAAC;GAG/D,MAAM,UAAU,IAAI,QAAQ,WAAW;GAEvC,IAAI,aAAa,CAAC;GAElB,IAAI,SAAS;IACX,MAAM,YAAY,aAAa,aAAa;IAE5C,MAAM,eAAe,gBAAgB,aAAa;IAElD,IAAI,OAAO,KAAK,YAAY,CAAC,CAAC,WAAW,GACvC,UAAU,2DAA2D,EACnE,WAAW,KACb,CAAC;IAGH,MAAM,kBAAkB,MAAM,wBAAwB,YAAY;IAElE,IAAI,gBAAgB,SAAS,GAC3B,UACE,CACE,+BACA,gBACG,QACE,QACC,CAAC;KAAC;KAAa;KAAa;IAAY,CAAC,CAAC,SAAS,GAAG,CAC1D,CAAC,CACA,KAAK,QAAQ,SAAS,KAAK,IAAI,CAAC,CAAC,CACjC,KAAK,IAAI,CACd,GACA,EACE,WAAW,KACb,CACF;IAGF,aAAa;KAEX,GAAG,uBACD,kBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAGA,GAAG,+BACD,yBAAyB,YAAY,IACpC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;KAEA,GAAG,iBACD,gBACC,QAAQ,eAAe,QACvB,UAAU,IAAI,MAAM,EACvB;IACF;GACF;GAGA,IAAI,oBAAoB,OAAO,QAAQ,EAAE,yBAAyB;IAChE,OAAO,mBAAmB,QAAQ;KAChC,QAAQ,EACN,QAAQ,WACV;KACA,SAAS,EACP,OAAO;MACL,GAAG,SAAS,EAAE,cAAc,CAAC;MAC7B,OAAO,kBAAkB,CAAC,CAAC,QAAQ,gBAAgB;KACrD,EACF;IACF,CAAC;GACH,CAAC;EACH;CACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lynx-intlayer",
3
- "version": "9.5.10",
3
+ "version": "9.5.12",
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,11 +87,11 @@
87
87
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
88
88
  },
89
89
  "dependencies": {
90
- "@intlayer/config": "9.5.10",
91
- "@intlayer/core": "9.5.10",
92
- "@intlayer/dictionaries-entry": "9.5.10",
93
- "@intlayer/engine": "9.5.10",
94
- "@intlayer/types": "9.5.10"
90
+ "@intlayer/config": "9.5.12",
91
+ "@intlayer/core": "9.5.12",
92
+ "@intlayer/dictionaries-entry": "9.5.12",
93
+ "@intlayer/engine": "9.5.12",
94
+ "@intlayer/types": "9.5.12"
95
95
  },
96
96
  "devDependencies": {
97
97
  "@rsbuild/core": "2.1.10",