react-scripts-intlayer 4.0.2 → 4.0.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.
package/README.md CHANGED
@@ -17,7 +17,7 @@
17
17
  </a>
18
18
  </div>
19
19
 
20
- # react-scripts-intlayer: NPM Package to use Intlayer in a React Create App application
20
+ # react-scripts-intlayer: Use Intlayer in a React Create App application
21
21
 
22
22
  **Intlayer** is a suite of packages designed specifically for JavaScript developers. It is compatible with frameworks like React, React, and Express.js.
23
23
 
@@ -27,7 +27,6 @@ var import_path = require("path");
27
27
  var import_config = require("@intlayer/config");
28
28
  var import_webpack = require("@intlayer/webpack");
29
29
  var import_webpack2 = require("webpack");
30
- var import_removeUndefinedValueObject = require('./removeUndefinedValueObject.cjs');
31
30
  const intlayerConfig = (0, import_config.getConfiguration)();
32
31
  const env = (0, import_config.formatEnvVariable)("react_app");
33
32
  const overrideWebpackConfig = ({
@@ -58,10 +57,7 @@ const overrideCracoConfig = ({
58
57
  ...cracoConfig.webpack,
59
58
  plugins: {
60
59
  ...cracoConfig.webpack?.plugins,
61
- add: [
62
- new import_webpack2.EnvironmentPlugin((0, import_removeUndefinedValueObject.removeUndefinedValueObject)(env)),
63
- new import_webpack.IntLayerPlugin()
64
- ]
60
+ add: [new import_webpack2.EnvironmentPlugin(env), new import_webpack.IntlayerPlugin()]
65
61
  },
66
62
  configure: {
67
63
  ...cracoConfig.webpack?.configure ?? {},
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/intlayerCracoPlugin.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\n\nimport { resolve, relative, join } from 'path';\nimport type {\n CracoConfig,\n CracoConfigOverride,\n CracoPlugin,\n WebpackConfigOverride,\n} from '@craco/types';\nimport {\n getConfiguration,\n formatEnvVariable,\n ESMxCJSRequire,\n} from '@intlayer/config';\nimport { IntLayerPlugin as IntLayerWebpackPlugin } from '@intlayer/webpack';\nimport {\n type Configuration as WebpackConfig,\n EnvironmentPlugin,\n} from 'webpack';\nimport { removeUndefinedValueObject } from './removeUndefinedValueObject';\n\n// Get IntLayer configuration\nconst intlayerConfig = getConfiguration();\n\n// Format environment variables\nconst env: Record<string, string> = formatEnvVariable('react_app');\n\n// Custom CRACO plugin function to override webpack configuration\nexport const overrideWebpackConfig = ({\n webpackConfig,\n}: WebpackConfigOverride): WebpackConfig => {\n webpackConfig.externals = {\n ...(typeof webpackConfig.externals === 'object'\n ? webpackConfig.externals\n : {}),\n esbuild: 'esbuild',\n module: 'module',\n fs: 'fs',\n vm: 'vm',\n };\n\n (webpackConfig.module?.rules ?? []).push({\n test: /\\.node$/,\n use: 'node-loader',\n });\n\n // You can add any custom CRACO plugins here if needed\n // config.plugins.push(new CustomCracoPlugin());\n\n return webpackConfig;\n};\n\n// Return a CRACO configuration object\nexport const overrideCracoConfig = ({\n cracoConfig,\n}: CracoConfigOverride): CracoConfig => {\n const { mainDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n return {\n ...cracoConfig,\n webpack: {\n ...cracoConfig.webpack,\n plugins: {\n ...cracoConfig.webpack?.plugins,\n add: [\n new EnvironmentPlugin(removeUndefinedValueObject(env)),\n new IntLayerWebpackPlugin(),\n ],\n },\n configure: {\n ...(cracoConfig.webpack?.configure ?? {}),\n resolve: {\n ...(cracoConfig.webpack?.configure?.resolve ?? {}),\n fallback: {\n ...(cracoConfig.webpack?.configure?.resolve?.fallback ?? {}),\n process: ESMxCJSRequire.resolve('process/browser'),\n },\n },\n },\n\n alias: {\n ...cracoConfig.webpack?.alias,\n '@intlayer/dictionaries-entry': resolve('./', relativeDictionariesPath),\n },\n },\n };\n};\n\n/**\n * A CRACO plugin that adds the IntLayer configuration to the webpack configuration and sets the environment variables.\n *\n * Usage:\n *\n * ```ts\n * const cracoConfig: CracoConfig = {\n * plugins: [\n * {\n * plugin: intlayerCracoPlugin(),\n * },\n * ],\n * };\n *\n * export default cracoConfig;\n * ```\n *\n */\nexport const plugin: CracoPlugin = {\n overrideCracoConfig,\n overrideWebpackConfig,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAwC;AAOxC,oBAIO;AACP,qBAAwD;AACxD,IAAAA,kBAGO;AACP,wCAA2C;AAG3C,MAAM,qBAAiB,gCAAiB;AAGxC,MAAM,UAA8B,iCAAkB,WAAW;AAG1D,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,MAA4C;AAC1C,gBAAc,YAAY;AAAA,IACxB,GAAI,OAAO,cAAc,cAAc,WACnC,cAAc,YACd,CAAC;AAAA,IACL,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,GAAC,cAAc,QAAQ,SAAS,CAAC,GAAG,KAAK;AAAA,IACvC,MAAM;AAAA,IACN,KAAK;AAAA,EACP,CAAC;AAKD,SAAO;AACT;AAGO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AACF,MAAwC;AACtC,QAAM,EAAE,SAAS,QAAQ,IAAI,eAAe;AAE5C,QAAM,uBAAmB,kBAAK,SAAS,kBAAkB;AACzD,QAAM,+BAA2B,sBAAS,SAAS,gBAAgB;AAEnE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAG,YAAY;AAAA,MACf,SAAS;AAAA,QACP,GAAG,YAAY,SAAS;AAAA,QACxB,KAAK;AAAA,UACH,IAAI,sCAAkB,8DAA2B,GAAG,CAAC;AAAA,UACrD,IAAI,eAAAC,eAAsB;AAAA,QAC5B;AAAA,MACF;AAAA,MACA,WAAW;AAAA,QACT,GAAI,YAAY,SAAS,aAAa,CAAC;AAAA,QACvC,SAAS;AAAA,UACP,GAAI,YAAY,SAAS,WAAW,WAAW,CAAC;AAAA,UAChD,UAAU;AAAA,YACR,GAAI,YAAY,SAAS,WAAW,SAAS,YAAY,CAAC;AAAA,YAC1D,SAAS,6BAAe,QAAQ,iBAAiB;AAAA,UACnD;AAAA,QACF;AAAA,MACF;AAAA,MAEA,OAAO;AAAA,QACL,GAAG,YAAY,SAAS;AAAA,QACxB,oCAAgC,qBAAQ,MAAM,wBAAwB;AAAA,MACxE;AAAA,IACF;AAAA,EACF;AACF;AAoBO,MAAM,SAAsB;AAAA,EACjC;AAAA,EACA;AACF;","names":["import_webpack","IntLayerWebpackPlugin"]}
1
+ {"version":3,"sources":["../../src/intlayerCracoPlugin.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\n\nimport { resolve, relative, join } from 'path';\nimport type {\n CracoConfig,\n CracoConfigOverride,\n CracoPlugin,\n WebpackConfigOverride,\n} from '@craco/types';\nimport {\n getConfiguration,\n formatEnvVariable,\n ESMxCJSRequire,\n} from '@intlayer/config';\nimport { IntlayerPlugin as IntlayerWebpackPlugin } from '@intlayer/webpack';\nimport {\n type Configuration as WebpackConfig,\n EnvironmentPlugin,\n} from 'webpack';\n\n// Get Intlayer configuration\nconst intlayerConfig = getConfiguration();\n\n// Format environment variables\nconst env: Record<string, string> = formatEnvVariable('react_app');\n\n// Custom CRACO plugin function to override webpack configuration\nexport const overrideWebpackConfig = ({\n webpackConfig,\n}: WebpackConfigOverride): WebpackConfig => {\n webpackConfig.externals = {\n ...(typeof webpackConfig.externals === 'object'\n ? webpackConfig.externals\n : {}),\n esbuild: 'esbuild',\n module: 'module',\n fs: 'fs',\n vm: 'vm',\n };\n\n (webpackConfig.module?.rules ?? []).push({\n test: /\\.node$/,\n use: 'node-loader',\n });\n\n // You can add any custom CRACO plugins here if needed\n // config.plugins.push(new CustomCracoPlugin());\n\n return webpackConfig;\n};\n\n// Return a CRACO configuration object\nexport const overrideCracoConfig = ({\n cracoConfig,\n}: CracoConfigOverride): CracoConfig => {\n const { mainDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n return {\n ...cracoConfig,\n webpack: {\n ...cracoConfig.webpack,\n plugins: {\n ...cracoConfig.webpack?.plugins,\n add: [new EnvironmentPlugin(env), new IntlayerWebpackPlugin()],\n },\n configure: {\n ...(cracoConfig.webpack?.configure ?? {}),\n resolve: {\n ...(cracoConfig.webpack?.configure?.resolve ?? {}),\n fallback: {\n ...(cracoConfig.webpack?.configure?.resolve?.fallback ?? {}),\n process: ESMxCJSRequire.resolve('process/browser'),\n },\n },\n },\n\n alias: {\n ...cracoConfig.webpack?.alias,\n '@intlayer/dictionaries-entry': resolve('./', relativeDictionariesPath),\n },\n },\n };\n};\n\n/**\n * A CRACO plugin that adds the Intlayer configuration to the webpack configuration and sets the environment variables.\n *\n * Usage:\n *\n * ```ts\n * const cracoConfig: CracoConfig = {\n * plugins: [\n * {\n * plugin: intlayerCracoPlugin(),\n * },\n * ],\n * };\n *\n * export default cracoConfig;\n * ```\n *\n */\nexport const plugin: CracoPlugin = {\n overrideCracoConfig,\n overrideWebpackConfig,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAwC;AAOxC,oBAIO;AACP,qBAAwD;AACxD,IAAAA,kBAGO;AAGP,MAAM,qBAAiB,gCAAiB;AAGxC,MAAM,UAA8B,iCAAkB,WAAW;AAG1D,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,MAA4C;AAC1C,gBAAc,YAAY;AAAA,IACxB,GAAI,OAAO,cAAc,cAAc,WACnC,cAAc,YACd,CAAC;AAAA,IACL,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,GAAC,cAAc,QAAQ,SAAS,CAAC,GAAG,KAAK;AAAA,IACvC,MAAM;AAAA,IACN,KAAK;AAAA,EACP,CAAC;AAKD,SAAO;AACT;AAGO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AACF,MAAwC;AACtC,QAAM,EAAE,SAAS,QAAQ,IAAI,eAAe;AAE5C,QAAM,uBAAmB,kBAAK,SAAS,kBAAkB;AACzD,QAAM,+BAA2B,sBAAS,SAAS,gBAAgB;AAEnE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAG,YAAY;AAAA,MACf,SAAS;AAAA,QACP,GAAG,YAAY,SAAS;AAAA,QACxB,KAAK,CAAC,IAAI,kCAAkB,GAAG,GAAG,IAAI,eAAAC,eAAsB,CAAC;AAAA,MAC/D;AAAA,MACA,WAAW;AAAA,QACT,GAAI,YAAY,SAAS,aAAa,CAAC;AAAA,QACvC,SAAS;AAAA,UACP,GAAI,YAAY,SAAS,WAAW,WAAW,CAAC;AAAA,UAChD,UAAU;AAAA,YACR,GAAI,YAAY,SAAS,WAAW,SAAS,YAAY,CAAC;AAAA,YAC1D,SAAS,6BAAe,QAAQ,iBAAiB;AAAA,UACnD;AAAA,QACF;AAAA,MACF;AAAA,MAEA,OAAO;AAAA,QACL,GAAG,YAAY,SAAS;AAAA,QACxB,oCAAgC,qBAAQ,MAAM,wBAAwB;AAAA,MACxE;AAAA,IACF;AAAA,EACF;AACF;AAoBO,MAAM,SAAsB;AAAA,EACjC;AAAA,EACA;AACF;","names":["import_webpack","IntlayerWebpackPlugin"]}
@@ -5,11 +5,10 @@ import {
5
5
  formatEnvVariable,
6
6
  ESMxCJSRequire
7
7
  } from "@intlayer/config";
8
- import { IntLayerPlugin as IntLayerWebpackPlugin } from "@intlayer/webpack";
8
+ import { IntlayerPlugin as IntlayerWebpackPlugin } from "@intlayer/webpack";
9
9
  import {
10
10
  EnvironmentPlugin
11
11
  } from "webpack";
12
- import { removeUndefinedValueObject } from './removeUndefinedValueObject.mjs';
13
12
  const intlayerConfig = getConfiguration();
14
13
  const env = formatEnvVariable("react_app");
15
14
  const overrideWebpackConfig = ({
@@ -40,10 +39,7 @@ const overrideCracoConfig = ({
40
39
  ...cracoConfig.webpack,
41
40
  plugins: {
42
41
  ...cracoConfig.webpack?.plugins,
43
- add: [
44
- new EnvironmentPlugin(removeUndefinedValueObject(env)),
45
- new IntLayerWebpackPlugin()
46
- ]
42
+ add: [new EnvironmentPlugin(env), new IntlayerWebpackPlugin()]
47
43
  },
48
44
  configure: {
49
45
  ...cracoConfig.webpack?.configure ?? {},
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/intlayerCracoPlugin.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\n\nimport { resolve, relative, join } from 'path';\nimport type {\n CracoConfig,\n CracoConfigOverride,\n CracoPlugin,\n WebpackConfigOverride,\n} from '@craco/types';\nimport {\n getConfiguration,\n formatEnvVariable,\n ESMxCJSRequire,\n} from '@intlayer/config';\nimport { IntLayerPlugin as IntLayerWebpackPlugin } from '@intlayer/webpack';\nimport {\n type Configuration as WebpackConfig,\n EnvironmentPlugin,\n} from 'webpack';\nimport { removeUndefinedValueObject } from './removeUndefinedValueObject';\n\n// Get IntLayer configuration\nconst intlayerConfig = getConfiguration();\n\n// Format environment variables\nconst env: Record<string, string> = formatEnvVariable('react_app');\n\n// Custom CRACO plugin function to override webpack configuration\nexport const overrideWebpackConfig = ({\n webpackConfig,\n}: WebpackConfigOverride): WebpackConfig => {\n webpackConfig.externals = {\n ...(typeof webpackConfig.externals === 'object'\n ? webpackConfig.externals\n : {}),\n esbuild: 'esbuild',\n module: 'module',\n fs: 'fs',\n vm: 'vm',\n };\n\n (webpackConfig.module?.rules ?? []).push({\n test: /\\.node$/,\n use: 'node-loader',\n });\n\n // You can add any custom CRACO plugins here if needed\n // config.plugins.push(new CustomCracoPlugin());\n\n return webpackConfig;\n};\n\n// Return a CRACO configuration object\nexport const overrideCracoConfig = ({\n cracoConfig,\n}: CracoConfigOverride): CracoConfig => {\n const { mainDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n return {\n ...cracoConfig,\n webpack: {\n ...cracoConfig.webpack,\n plugins: {\n ...cracoConfig.webpack?.plugins,\n add: [\n new EnvironmentPlugin(removeUndefinedValueObject(env)),\n new IntLayerWebpackPlugin(),\n ],\n },\n configure: {\n ...(cracoConfig.webpack?.configure ?? {}),\n resolve: {\n ...(cracoConfig.webpack?.configure?.resolve ?? {}),\n fallback: {\n ...(cracoConfig.webpack?.configure?.resolve?.fallback ?? {}),\n process: ESMxCJSRequire.resolve('process/browser'),\n },\n },\n },\n\n alias: {\n ...cracoConfig.webpack?.alias,\n '@intlayer/dictionaries-entry': resolve('./', relativeDictionariesPath),\n },\n },\n };\n};\n\n/**\n * A CRACO plugin that adds the IntLayer configuration to the webpack configuration and sets the environment variables.\n *\n * Usage:\n *\n * ```ts\n * const cracoConfig: CracoConfig = {\n * plugins: [\n * {\n * plugin: intlayerCracoPlugin(),\n * },\n * ],\n * };\n *\n * export default cracoConfig;\n * ```\n *\n */\nexport const plugin: CracoPlugin = {\n overrideCracoConfig,\n overrideWebpackConfig,\n};\n"],"mappings":";AAGA,SAAS,SAAS,UAAU,YAAY;AAOxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB,6BAA6B;AACxD;AAAA,EAEE;AAAA,OACK;AACP,SAAS,kCAAkC;AAG3C,MAAM,iBAAiB,iBAAiB;AAGxC,MAAM,MAA8B,kBAAkB,WAAW;AAG1D,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,MAA4C;AAC1C,gBAAc,YAAY;AAAA,IACxB,GAAI,OAAO,cAAc,cAAc,WACnC,cAAc,YACd,CAAC;AAAA,IACL,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,GAAC,cAAc,QAAQ,SAAS,CAAC,GAAG,KAAK;AAAA,IACvC,MAAM;AAAA,IACN,KAAK;AAAA,EACP,CAAC;AAKD,SAAO;AACT;AAGO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AACF,MAAwC;AACtC,QAAM,EAAE,SAAS,QAAQ,IAAI,eAAe;AAE5C,QAAM,mBAAmB,KAAK,SAAS,kBAAkB;AACzD,QAAM,2BAA2B,SAAS,SAAS,gBAAgB;AAEnE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAG,YAAY;AAAA,MACf,SAAS;AAAA,QACP,GAAG,YAAY,SAAS;AAAA,QACxB,KAAK;AAAA,UACH,IAAI,kBAAkB,2BAA2B,GAAG,CAAC;AAAA,UACrD,IAAI,sBAAsB;AAAA,QAC5B;AAAA,MACF;AAAA,MACA,WAAW;AAAA,QACT,GAAI,YAAY,SAAS,aAAa,CAAC;AAAA,QACvC,SAAS;AAAA,UACP,GAAI,YAAY,SAAS,WAAW,WAAW,CAAC;AAAA,UAChD,UAAU;AAAA,YACR,GAAI,YAAY,SAAS,WAAW,SAAS,YAAY,CAAC;AAAA,YAC1D,SAAS,eAAe,QAAQ,iBAAiB;AAAA,UACnD;AAAA,QACF;AAAA,MACF;AAAA,MAEA,OAAO;AAAA,QACL,GAAG,YAAY,SAAS;AAAA,QACxB,gCAAgC,QAAQ,MAAM,wBAAwB;AAAA,MACxE;AAAA,IACF;AAAA,EACF;AACF;AAoBO,MAAM,SAAsB;AAAA,EACjC;AAAA,EACA;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/intlayerCracoPlugin.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\n// @ts-nocheck\n\nimport { resolve, relative, join } from 'path';\nimport type {\n CracoConfig,\n CracoConfigOverride,\n CracoPlugin,\n WebpackConfigOverride,\n} from '@craco/types';\nimport {\n getConfiguration,\n formatEnvVariable,\n ESMxCJSRequire,\n} from '@intlayer/config';\nimport { IntlayerPlugin as IntlayerWebpackPlugin } from '@intlayer/webpack';\nimport {\n type Configuration as WebpackConfig,\n EnvironmentPlugin,\n} from 'webpack';\n\n// Get Intlayer configuration\nconst intlayerConfig = getConfiguration();\n\n// Format environment variables\nconst env: Record<string, string> = formatEnvVariable('react_app');\n\n// Custom CRACO plugin function to override webpack configuration\nexport const overrideWebpackConfig = ({\n webpackConfig,\n}: WebpackConfigOverride): WebpackConfig => {\n webpackConfig.externals = {\n ...(typeof webpackConfig.externals === 'object'\n ? webpackConfig.externals\n : {}),\n esbuild: 'esbuild',\n module: 'module',\n fs: 'fs',\n vm: 'vm',\n };\n\n (webpackConfig.module?.rules ?? []).push({\n test: /\\.node$/,\n use: 'node-loader',\n });\n\n // You can add any custom CRACO plugins here if needed\n // config.plugins.push(new CustomCracoPlugin());\n\n return webpackConfig;\n};\n\n// Return a CRACO configuration object\nexport const overrideCracoConfig = ({\n cracoConfig,\n}: CracoConfigOverride): CracoConfig => {\n const { mainDir, baseDir } = intlayerConfig.content;\n\n const dictionariesPath = join(mainDir, 'dictionaries.mjs');\n const relativeDictionariesPath = relative(baseDir, dictionariesPath);\n\n return {\n ...cracoConfig,\n webpack: {\n ...cracoConfig.webpack,\n plugins: {\n ...cracoConfig.webpack?.plugins,\n add: [new EnvironmentPlugin(env), new IntlayerWebpackPlugin()],\n },\n configure: {\n ...(cracoConfig.webpack?.configure ?? {}),\n resolve: {\n ...(cracoConfig.webpack?.configure?.resolve ?? {}),\n fallback: {\n ...(cracoConfig.webpack?.configure?.resolve?.fallback ?? {}),\n process: ESMxCJSRequire.resolve('process/browser'),\n },\n },\n },\n\n alias: {\n ...cracoConfig.webpack?.alias,\n '@intlayer/dictionaries-entry': resolve('./', relativeDictionariesPath),\n },\n },\n };\n};\n\n/**\n * A CRACO plugin that adds the Intlayer configuration to the webpack configuration and sets the environment variables.\n *\n * Usage:\n *\n * ```ts\n * const cracoConfig: CracoConfig = {\n * plugins: [\n * {\n * plugin: intlayerCracoPlugin(),\n * },\n * ],\n * };\n *\n * export default cracoConfig;\n * ```\n *\n */\nexport const plugin: CracoPlugin = {\n overrideCracoConfig,\n overrideWebpackConfig,\n};\n"],"mappings":";AAGA,SAAS,SAAS,UAAU,YAAY;AAOxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB,6BAA6B;AACxD;AAAA,EAEE;AAAA,OACK;AAGP,MAAM,iBAAiB,iBAAiB;AAGxC,MAAM,MAA8B,kBAAkB,WAAW;AAG1D,MAAM,wBAAwB,CAAC;AAAA,EACpC;AACF,MAA4C;AAC1C,gBAAc,YAAY;AAAA,IACxB,GAAI,OAAO,cAAc,cAAc,WACnC,cAAc,YACd,CAAC;AAAA,IACL,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,GAAC,cAAc,QAAQ,SAAS,CAAC,GAAG,KAAK;AAAA,IACvC,MAAM;AAAA,IACN,KAAK;AAAA,EACP,CAAC;AAKD,SAAO;AACT;AAGO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AACF,MAAwC;AACtC,QAAM,EAAE,SAAS,QAAQ,IAAI,eAAe;AAE5C,QAAM,mBAAmB,KAAK,SAAS,kBAAkB;AACzD,QAAM,2BAA2B,SAAS,SAAS,gBAAgB;AAEnE,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS;AAAA,MACP,GAAG,YAAY;AAAA,MACf,SAAS;AAAA,QACP,GAAG,YAAY,SAAS;AAAA,QACxB,KAAK,CAAC,IAAI,kBAAkB,GAAG,GAAG,IAAI,sBAAsB,CAAC;AAAA,MAC/D;AAAA,MACA,WAAW;AAAA,QACT,GAAI,YAAY,SAAS,aAAa,CAAC;AAAA,QACvC,SAAS;AAAA,UACP,GAAI,YAAY,SAAS,WAAW,WAAW,CAAC;AAAA,UAChD,UAAU;AAAA,YACR,GAAI,YAAY,SAAS,WAAW,SAAS,YAAY,CAAC;AAAA,YAC1D,SAAS,eAAe,QAAQ,iBAAiB;AAAA,UACnD;AAAA,QACF;AAAA,MACF;AAAA,MAEA,OAAO;AAAA,QACL,GAAG,YAAY,SAAS;AAAA,QACxB,gCAAgC,QAAQ,MAAM,wBAAwB;AAAA,MACxE;AAAA,IACF;AAAA,EACF;AACF;AAoBO,MAAM,SAAsB;AAAA,EACjC;AAAA,EACA;AACF;","names":[]}
@@ -3,7 +3,7 @@ import { type Configuration as WebpackConfig } from 'webpack';
3
3
  export declare const overrideWebpackConfig: ({ webpackConfig, }: WebpackConfigOverride) => WebpackConfig;
4
4
  export declare const overrideCracoConfig: ({ cracoConfig, }: CracoConfigOverride) => CracoConfig;
5
5
  /**
6
- * A CRACO plugin that adds the IntLayer configuration to the webpack configuration and sets the environment variables.
6
+ * A CRACO plugin that adds the Intlayer configuration to the webpack configuration and sets the environment variables.
7
7
  *
8
8
  * Usage:
9
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"intlayerCracoPlugin.d.ts","sourceRoot":"","sources":["../../src/intlayerCracoPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAOtB,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EAEpC,MAAM,SAAS,CAAC;AAUjB,eAAO,MAAM,qBAAqB,uBAE/B,qBAAqB,KAAG,aAoB1B,CAAC;AAGF,eAAO,MAAM,mBAAmB,qBAE7B,mBAAmB,KAAG,WAkCxB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM,EAAE,WAGpB,CAAC"}
1
+ {"version":3,"file":"intlayerCracoPlugin.d.ts","sourceRoot":"","sources":["../../src/intlayerCracoPlugin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAOtB,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EAEpC,MAAM,SAAS,CAAC;AASjB,eAAO,MAAM,qBAAqB,uBAE/B,qBAAqB,KAAG,aAoB1B,CAAC;AAGF,eAAO,MAAM,mBAAmB,qBAE7B,mBAAmB,KAAG,WA+BxB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM,EAAE,WAGpB,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "react-scripts-intlayer",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "private": false,
5
- "description": "Script for create react app application with intlayer",
5
+ "description": "Integrate Intlayer with Create React App using custom React scripts for internationalization i18n and advanced Webpack configurations",
6
6
  "keywords": [
7
7
  "intlayer",
8
8
  "data",
@@ -63,8 +63,8 @@
63
63
  "@craco/craco": "^7.1.0",
64
64
  "node-loader": "^2.1.0",
65
65
  "webpack": "^5.97.1",
66
- "@intlayer/config": "4.0.2",
67
- "@intlayer/webpack": "4.0.2"
66
+ "@intlayer/config": "4.0.3",
67
+ "@intlayer/webpack": "4.0.3"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@craco/types": "^7.1.0",
@@ -81,18 +81,18 @@
81
81
  "tsc-alias": "^1.8.10",
82
82
  "tsup": "^8.3.5",
83
83
  "typescript": "^5.7.3",
84
- "@utils/ts-config-types": "1.0.4",
84
+ "@utils/eslint-config": "1.0.4",
85
+ "@intlayer/backend": "4.0.3",
85
86
  "@utils/ts-config": "1.0.4",
86
- "@intlayer/backend": "4.0.2",
87
- "@utils/tsup-config": "1.0.4",
88
- "@utils/eslint-config": "1.0.4"
87
+ "@utils/ts-config-types": "1.0.4",
88
+ "@utils/tsup-config": "1.0.4"
89
89
  },
90
90
  "peerDependencies": {
91
91
  "react": ">=16.0.0",
92
92
  "react-dom": ">=16.0.0",
93
93
  "webpack": ">=5.0.0",
94
- "@intlayer/config": "4.0.2",
95
- "@intlayer/webpack": "4.0.2"
94
+ "@intlayer/config": "4.0.3",
95
+ "@intlayer/webpack": "4.0.3"
96
96
  },
97
97
  "engines": {
98
98
  "node": ">=14.18"
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var removeUndefinedValueObject_exports = {};
20
- __export(removeUndefinedValueObject_exports, {
21
- removeUndefinedValueObject: () => removeUndefinedValueObject
22
- });
23
- module.exports = __toCommonJS(removeUndefinedValueObject_exports);
24
- const removeUndefinedValueObject = (obj) => {
25
- const newObj = {};
26
- for (const key in obj) {
27
- if (obj[key] !== void 0) {
28
- newObj[key] = obj[key];
29
- }
30
- }
31
- Object.freeze(newObj);
32
- return newObj;
33
- };
34
- // Annotate the CommonJS export names for ESM import in node:
35
- 0 && (module.exports = {
36
- removeUndefinedValueObject
37
- });
38
- //# sourceMappingURL=removeUndefinedValueObject.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/removeUndefinedValueObject.ts"],"sourcesContent":["export const removeUndefinedValueObject = <T extends Record<string, unknown>>(\n obj: T\n): T => {\n const newObj: T = {} as T;\n\n for (const key in obj) {\n if (obj[key] !== undefined) {\n newObj[key] = obj[key];\n }\n }\n\n Object.freeze(newObj);\n\n return newObj;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,6BAA6B,CACxC,QACM;AACN,QAAM,SAAY,CAAC;AAEnB,aAAW,OAAO,KAAK;AACrB,QAAI,IAAI,GAAG,MAAM,QAAW;AAC1B,aAAO,GAAG,IAAI,IAAI,GAAG;AAAA,IACvB;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AAEpB,SAAO;AACT;","names":[]}
@@ -1,15 +0,0 @@
1
- import "./chunk-ZD7AOCMD.mjs";
2
- const removeUndefinedValueObject = (obj) => {
3
- const newObj = {};
4
- for (const key in obj) {
5
- if (obj[key] !== void 0) {
6
- newObj[key] = obj[key];
7
- }
8
- }
9
- Object.freeze(newObj);
10
- return newObj;
11
- };
12
- export {
13
- removeUndefinedValueObject
14
- };
15
- //# sourceMappingURL=removeUndefinedValueObject.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/removeUndefinedValueObject.ts"],"sourcesContent":["export const removeUndefinedValueObject = <T extends Record<string, unknown>>(\n obj: T\n): T => {\n const newObj: T = {} as T;\n\n for (const key in obj) {\n if (obj[key] !== undefined) {\n newObj[key] = obj[key];\n }\n }\n\n Object.freeze(newObj);\n\n return newObj;\n};\n"],"mappings":";AAAO,MAAM,6BAA6B,CACxC,QACM;AACN,QAAM,SAAY,CAAC;AAEnB,aAAW,OAAO,KAAK;AACrB,QAAI,IAAI,GAAG,MAAM,QAAW;AAC1B,aAAO,GAAG,IAAI,IAAI,GAAG;AAAA,IACvB;AAAA,EACF;AAEA,SAAO,OAAO,MAAM;AAEpB,SAAO;AACT;","names":[]}
@@ -1,2 +0,0 @@
1
- export declare const removeUndefinedValueObject: <T extends Record<string, unknown>>(obj: T) => T;
2
- //# sourceMappingURL=removeUndefinedValueObject.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"removeUndefinedValueObject.d.ts","sourceRoot":"","sources":["../../src/removeUndefinedValueObject.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,OACrE,CAAC,KACL,CAYF,CAAC"}