@gen3/toolsff 0.12.3 → 0.12.5

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.
File without changes
File without changes
File without changes
File without changes
@@ -6,7 +6,8 @@ import { parseArgs } from 'node:util';
6
6
 
7
7
  const { loadEnvConfig } = nextEnv;
8
8
  // Load .env files before reading process.env.*
9
- loadEnvConfig(process.cwd());
9
+ const dev = process.env.NODE_ENV !== 'production';
10
+ loadEnvConfig(process.cwd(), dev);
10
11
  const GEN3_COMMONS_NAME = process.env.NEXT_PUBLIC_GEN3_COMMONS_NAME || 'gen3';
11
12
  const PAGE_EXT_RE = /\.(tsx|ts|jsx|js)$/;
12
13
  const DEFAULT_EXCLUDED_ROUTES = [
@@ -23,9 +24,12 @@ function toPosixPath(p) {
23
24
  function loadAuthConfig() {
24
25
  const authConfigFile = path.join(process.cwd(), `config/${GEN3_COMMONS_NAME}`, 'authz.json');
25
26
  const defaultAuthzConfigFile = path.join(process.cwd(), `config`, 'authz_default.json');
27
+ console.log(`Looking for authz config at ${authConfigFile}`);
26
28
  if (fs.existsSync(authConfigFile)) {
27
29
  console.log(`Loading authz config from ${authConfigFile}`);
28
30
  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.`);
29
33
  }
30
34
  if (fs.existsSync(defaultAuthzConfigFile)) {
31
35
  console.log(`Loading authz config from ${defaultAuthzConfigFile}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gen3/toolsff",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
4
4
  "description": "tools for processing Gen3 commons content: color theme, icons, sharedFilters",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -47,5 +47,6 @@
47
47
  "undici": "^6.21.1",
48
48
  "axios": "^1.8.2"
49
49
  }
50
- }
50
+ },
51
+ "gitHead": "9807ce76c97977628a1618e18b511e4cd6f56244"
51
52
  }