@gen3/toolsff 0.12.11 → 0.12.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.
- package/dist/scanSitePaths.esm.js +2 -16
- package/package.json +2 -2
|
@@ -23,27 +23,13 @@ function toPosixPath(p) {
|
|
|
23
23
|
}
|
|
24
24
|
function loadAuthConfig() {
|
|
25
25
|
const authConfigFile = path.join(process.cwd(), `config/${GEN3_COMMONS_NAME}`, 'authz.json');
|
|
26
|
-
const defaultAuthzConfigFile = path.join(process.cwd(), `config`, 'authz_default.json');
|
|
27
26
|
console.log(`Looking for authz config at ${authConfigFile}`);
|
|
28
27
|
if (fs.existsSync(authConfigFile)) {
|
|
29
28
|
console.log(`Loading authz config from ${authConfigFile}`);
|
|
30
29
|
return JSON.parse(fs.readFileSync(authConfigFile).toString('utf8'));
|
|
31
|
-
} else {
|
|
32
|
-
console.log('\x1b[31m%s\x1b[0m', `${authConfigFile} not found. Using default authz rules.`);
|
|
33
|
-
}
|
|
34
|
-
if (fs.existsSync(defaultAuthzConfigFile)) {
|
|
35
|
-
console.log(`Loading authz config from ${defaultAuthzConfigFile}`);
|
|
36
|
-
return JSON.parse(fs.readFileSync(defaultAuthzConfigFile).toString('utf8'));
|
|
37
30
|
}
|
|
38
|
-
console.log(`No authz config found.
|
|
39
|
-
|
|
40
|
-
'/Profile': {
|
|
41
|
-
loginRequired: true
|
|
42
|
-
},
|
|
43
|
-
'*': {
|
|
44
|
-
loginRequired: false
|
|
45
|
-
}
|
|
46
|
-
};
|
|
31
|
+
console.log(`No authz config found. `);
|
|
32
|
+
throw new Error('No authz config found.');
|
|
47
33
|
}
|
|
48
34
|
function normalizeRoute(route) {
|
|
49
35
|
let r = route.startsWith('/') ? route : `/${route}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gen3/toolsff",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.12",
|
|
4
4
|
"description": "tools for processing Gen3 commons content: color theme, icons, sharedFilters",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"axios": "^1.8.2"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "5aa28d3031361a4aa0c4a945a3096f0cf33c7a76"
|
|
52
52
|
}
|