@bigbinary/neeto-commons-frontend 4.4.5 → 4.4.6
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,8 @@
|
|
|
1
1
|
const RAILS_MOUNTED_COMPONENTS_REGEX = /app\/javascript\/src\/[^/]*\.(js|jsx)$/;
|
|
2
|
+
|
|
3
|
+
const ADMIN_AND_PUBLIC_APP_REGEX =
|
|
4
|
+
/app\/javascript\/src\/(?:.*\/)?(AdminApp|PublicApp)(\/index)?\.(js|jsx)$/;
|
|
5
|
+
|
|
2
6
|
const PACKS_FILES_REGEX = /app\/javascript\/packs\/[^/]*\.(js|jsx)$/;
|
|
3
7
|
|
|
4
8
|
const TYPES = {
|
|
@@ -9,4 +13,9 @@ const TYPES = {
|
|
|
9
13
|
VARIABLE_DECLARATION: "VariableDeclaration",
|
|
10
14
|
};
|
|
11
15
|
|
|
12
|
-
module.exports = {
|
|
16
|
+
module.exports = {
|
|
17
|
+
RAILS_MOUNTED_COMPONENTS_REGEX,
|
|
18
|
+
PACKS_FILES_REGEX,
|
|
19
|
+
TYPES,
|
|
20
|
+
ADMIN_AND_PUBLIC_APP_REGEX,
|
|
21
|
+
};
|
|
@@ -14,6 +14,7 @@ const { isEmpty, includes, __ } = require("ramda");
|
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
16
|
RAILS_MOUNTED_COMPONENTS_REGEX,
|
|
17
|
+
ADMIN_AND_PUBLIC_APP_REGEX,
|
|
17
18
|
TYPES,
|
|
18
19
|
PACKS_FILES_REGEX,
|
|
19
20
|
} = require("./constants");
|
|
@@ -42,7 +43,8 @@ const resolver = enhancedResolve.create.sync({
|
|
|
42
43
|
|
|
43
44
|
const isRailsMountedOrPacksFiles = filePath =>
|
|
44
45
|
RAILS_MOUNTED_COMPONENTS_REGEX.test(filePath) ||
|
|
45
|
-
PACKS_FILES_REGEX.test(filePath)
|
|
46
|
+
PACKS_FILES_REGEX.test(filePath) ||
|
|
47
|
+
ADMIN_AND_PUBLIC_APP_REGEX.test(filePath);
|
|
46
48
|
|
|
47
49
|
const isInImportedList = (item, filePath) =>
|
|
48
50
|
existsBy({ item: includes(__, [item, "*"]), filePath }, importedItems);
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
const RAILS_MOUNTED_COMPONENTS_REGEX = /app\/javascript\/src\/[^/]*\.(js|jsx)$/;
|
|
2
|
+
|
|
3
|
+
const ADMIN_AND_PUBLIC_APP_REGEX =
|
|
4
|
+
/app\/javascript\/src\/(?:.*\/)?(AdminApp|PublicApp)(\/index)?\.(js|jsx)$/;
|
|
5
|
+
|
|
2
6
|
const PACKS_FILES_REGEX = /app\/javascript\/packs\/[^/]*\.(js|jsx)$/;
|
|
3
7
|
|
|
4
8
|
const TYPES = {
|
|
@@ -9,4 +13,9 @@ const TYPES = {
|
|
|
9
13
|
VARIABLE_DECLARATION: "VariableDeclaration",
|
|
10
14
|
};
|
|
11
15
|
|
|
12
|
-
module.exports = {
|
|
16
|
+
module.exports = {
|
|
17
|
+
RAILS_MOUNTED_COMPONENTS_REGEX,
|
|
18
|
+
PACKS_FILES_REGEX,
|
|
19
|
+
TYPES,
|
|
20
|
+
ADMIN_AND_PUBLIC_APP_REGEX,
|
|
21
|
+
};
|
|
@@ -14,6 +14,7 @@ const { isEmpty, includes, __ } = require("ramda");
|
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
16
|
RAILS_MOUNTED_COMPONENTS_REGEX,
|
|
17
|
+
ADMIN_AND_PUBLIC_APP_REGEX,
|
|
17
18
|
TYPES,
|
|
18
19
|
PACKS_FILES_REGEX,
|
|
19
20
|
} = require("./constants");
|
|
@@ -42,7 +43,8 @@ const resolver = enhancedResolve.create.sync({
|
|
|
42
43
|
|
|
43
44
|
const isRailsMountedOrPacksFiles = filePath =>
|
|
44
45
|
RAILS_MOUNTED_COMPONENTS_REGEX.test(filePath) ||
|
|
45
|
-
PACKS_FILES_REGEX.test(filePath)
|
|
46
|
+
PACKS_FILES_REGEX.test(filePath) ||
|
|
47
|
+
ADMIN_AND_PUBLIC_APP_REGEX.test(filePath);
|
|
46
48
|
|
|
47
49
|
const isInImportedList = (item, filePath) =>
|
|
48
50
|
existsBy({ item: includes(__, [item, "*"]), filePath }, importedItems);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.6",
|
|
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>",
|