@bigbinary/neeto-commons-frontend 4.13.18 → 4.14.14-beta1

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.
@@ -20,7 +20,7 @@ const { reactGiphyPlugin } = require("./plugins/reactGiphy.js");
20
20
  const { virtualizedPlugin } = require("./plugins/virtualized.js");
21
21
  const { createDefinitions, entryPoint, build, watch } = require("./utils.js");
22
22
 
23
- const postCssConfig = require("../../../../../postcss.config.js");
23
+ const postCssConfig = require(`${process.env.APP_DIR}/postcss.config.js`);
24
24
  const commonResolve = require("../webpack/resolve.js");
25
25
 
26
26
  const isProduction = process.env.NODE_ENV === "production";
@@ -1,5 +1,6 @@
1
1
  const esbuild = require("esbuild");
2
2
  const path = require("path");
3
+ const fs = require("fs");
3
4
 
4
5
  // colors for console output
5
6
  const consoleColors = {
@@ -29,8 +30,9 @@ const build = async config => {
29
30
  `${consoleColors.success}[esbuild]${consoleColors.reset} Build successful`
30
31
  );
31
32
  } catch {
32
- const errorMessage = `${consoleColors.error}[esbuild]${consoleColors.reset} Build failed`;
33
- throw new Error(errorMessage);
33
+ console.error(
34
+ `${consoleColors.error}[esbuild]${consoleColors.reset} Build failed`
35
+ );
34
36
  }
35
37
  };
36
38
 
@@ -37,7 +37,7 @@ const buildPathGroupsBasedOnWebpackAliases = ({
37
37
  customAliasPath = "config/webpack/resolve.js",
38
38
  commonAliasPath = "node_modules/@bigbinary/neeto-commons-frontend/configs/webpack/resolve.js",
39
39
  }) => {
40
- const rootOfProject = path.join(__dirname, "../../../../../../");
40
+ const rootOfProject = path.join(__dirname, process.env.APP_DIR);
41
41
  const projectResolve = loadJS(path.join(rootOfProject, customAliasPath));
42
42
  const commonResolve = loadJS(path.join(rootOfProject, commonAliasPath));
43
43
 
@@ -6,7 +6,7 @@ const isCommonsFrontend = !__dirname.includes("node_modules");
6
6
  const absolutePath = basePath =>
7
7
  isCommonsFrontend
8
8
  ? path.join(__dirname, "../../../", basePath)
9
- : path.join(__dirname, "../../../../../../", basePath);
9
+ : path.join(__dirname, process.env.APP_DIR, basePath);
10
10
 
11
11
  const srcPath = fs.existsSync(absolutePath("src"))
12
12
  ? absolutePath("src")
@@ -21,7 +21,7 @@ const {
21
21
 
22
22
  // @ts-ignore
23
23
  // eslint-disable-next-line import/extensions
24
- const webpackConfig = require("../../../../../../config/webpack/webpack.config.js");
24
+ const webpackConfig = require(`${process.env.APP_DIR}/config/webpack/webpack.config.js`);
25
25
 
26
26
  let modifiedFiles = [];
27
27
  let importedItems = [];
@@ -30,7 +30,7 @@ let iterationCount = 1;
30
30
 
31
31
  const javascriptDir = pathLib.resolve(
32
32
  __dirname,
33
- "../../../../../../app/javascript"
33
+ `${process.env.APP_DIR}/app/javascript`
34
34
  );
35
35
 
36
36
  const resolver = enhancedResolve.create.sync({
@@ -9,7 +9,7 @@ const { reactGiphyPlugin } = require("./plugins/reactGiphy.js");
9
9
  const svgr = require("./plugins/svgr.js");
10
10
  const { virtualizedPlugin } = require("./plugins/virtualized.js");
11
11
 
12
- const postCssConfig = require("../../../../../postcss.config.js");
12
+ const postCssConfig = require(`${process.env.APP_DIR}/postcss.config.js`);
13
13
  const { VITE_BABEL_CONFIG } = require("../esbuild/constants.js");
14
14
  const { config: esbuildConfig } = require("../esbuild/index.js");
15
15
 
@@ -1,7 +1,7 @@
1
1
  const path = require("path");
2
2
 
3
3
  const absolutePath = basePath =>
4
- path.resolve(__dirname, "../../../../../", `app/javascript/${basePath}`);
4
+ path.resolve(__dirname, process.env.APP_DIR, `app/javascript/${basePath}`);
5
5
 
6
6
  module.exports = {
7
7
  alias: {
@@ -27,7 +27,7 @@ module.exports = {
27
27
  neetocist: "@bigbinary/neeto-cist",
28
28
  neetohotkeys: "@bigbinary/neeto-hotkeys",
29
29
  "rc-picker": "@bigbinary/neeto-datepicker",
30
- images: path.resolve(__dirname, "../../../../../", "app/assets/images"),
30
+ images: path.resolve(__dirname, process.env.APP_DIR, "app/assets/images"),
31
31
  },
32
32
  extensions: [
33
33
  ".ts",
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var IGNORABLE_ERRORS_REGEX = new RegExp(["window.requestAnimationFrame", "ResizeObserver", "ChunkLoadError", "window.webkit.messageHandlers", "Request aborted", "Network Error", "Cannot redefine property: googletag", "Failed to execute 'removeChild' on 'Node'", "Failed to execute 'insertBefore' on 'Node'", "Can't find variable: disableWebkitEnterFullscreen", "rendererInterfaces is null"].join("|"));
3
+ var IGNORABLE_ERRORS_REGEX = /(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\.webkit\.messageHandlers|Request aborted|Network Error|Cannot redefine property: googletag|Failed to execute 'removeChild' on 'Node')/;
4
4
  var IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;
5
5
 
6
6
  exports.IGNORABLE_ERRORS_REGEX = IGNORABLE_ERRORS_REGEX;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX = new RegExp(\n [\n \"window.requestAnimationFrame\",\n \"ResizeObserver\",\n \"ChunkLoadError\",\n \"window.webkit.messageHandlers\",\n \"Request aborted\",\n \"Network Error\",\n \"Cannot redefine property: googletag\",\n \"Failed to execute 'removeChild' on 'Node'\",\n \"Failed to execute 'insertBefore' on 'Node'\",\n \"Can't find variable: disableWebkitEnterFullscreen\",\n \"rendererInterfaces is null\",\n ].join(\"|\")\n);\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","RegExp","join","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":";;AAAaA,IAAAA,sBAAsB,GAAG,IAAIC,MAAM,CAC9C,CACE,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,EAC/B,iBAAiB,EACjB,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,4CAA4C,EAC5C,mDAAmD,EACnD,4BAA4B,CAC7B,CAACC,IAAI,CAAC,GAAG,CACZ,EAAC;AACM,IAAMC,2BAA2B,GAAG;;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX =\n /(window\\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\\.webkit\\.messageHandlers|Request aborted|Network Error|Cannot redefine property: googletag|Failed to execute 'removeChild' on 'Node')/;\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":";;AAAO,IAAMA,sBAAsB,GACjC,4MAA2M;AACtM,IAAMC,2BAA2B,GAAG;;;;;"}
@@ -1,4 +1,4 @@
1
- var IGNORABLE_ERRORS_REGEX = new RegExp(["window.requestAnimationFrame", "ResizeObserver", "ChunkLoadError", "window.webkit.messageHandlers", "Request aborted", "Network Error", "Cannot redefine property: googletag", "Failed to execute 'removeChild' on 'Node'", "Failed to execute 'insertBefore' on 'Node'", "Can't find variable: disableWebkitEnterFullscreen", "rendererInterfaces is null"].join("|"));
1
+ var IGNORABLE_ERRORS_REGEX = /(window\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\.webkit\.messageHandlers|Request aborted|Network Error|Cannot redefine property: googletag|Failed to execute 'removeChild' on 'Node')/;
2
2
  var IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;
3
3
 
4
4
  export { IGNORABLE_ERRORS_REGEX, IGNORABLE_ERROR_NAMES_REGEX };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX = new RegExp(\n [\n \"window.requestAnimationFrame\",\n \"ResizeObserver\",\n \"ChunkLoadError\",\n \"window.webkit.messageHandlers\",\n \"Request aborted\",\n \"Network Error\",\n \"Cannot redefine property: googletag\",\n \"Failed to execute 'removeChild' on 'Node'\",\n \"Failed to execute 'insertBefore' on 'Node'\",\n \"Can't find variable: disableWebkitEnterFullscreen\",\n \"rendererInterfaces is null\",\n ].join(\"|\")\n);\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","RegExp","join","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":"AAAaA,IAAAA,sBAAsB,GAAG,IAAIC,MAAM,CAC9C,CACE,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAChB,+BAA+B,EAC/B,iBAAiB,EACjB,eAAe,EACf,qCAAqC,EACrC,2CAA2C,EAC3C,4CAA4C,EAC5C,mDAAmD,EACnD,4BAA4B,CAC7B,CAACC,IAAI,CAAC,GAAG,CACZ,EAAC;AACM,IAAMC,2BAA2B,GAAG;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../src/react-utils/HoneybadgerErrorBoundary/constants.js"],"sourcesContent":["export const IGNORABLE_ERRORS_REGEX =\n /(window\\.requestAnimationFrame|ResizeObserver|ChunkLoadError|window\\.webkit\\.messageHandlers|Request aborted|Network Error|Cannot redefine property: googletag|Failed to execute 'removeChild' on 'Node')/;\nexport const IGNORABLE_ERROR_NAMES_REGEX = /(ChunkLoadError)/;\n"],"names":["IGNORABLE_ERRORS_REGEX","IGNORABLE_ERROR_NAMES_REGEX"],"mappings":"AAAO,IAAMA,sBAAsB,GACjC,4MAA2M;AACtM,IAAMC,2BAA2B,GAAG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "4.13.18",
3
+ "version": "4.14.14-beta1",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",