@travetto/compiler 3.0.0-rc.25 → 3.0.0-rc.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/compiler",
3
- "version": "3.0.0-rc.25",
3
+ "version": "3.0.0-rc.27",
4
4
  "description": "Compiler",
5
5
  "keywords": [
6
6
  "compiler",
package/support/lock.ts CHANGED
@@ -50,7 +50,7 @@ export class LockManager {
50
50
  const content = await fs.readFile(file, 'utf8');
51
51
  const filePid = parseInt(content, 10);
52
52
  if (stale) {
53
- LogUtil.log('lock', [], 'warn', `${type} file is stale: ${stat.mtimeMs} vs ${Date.now()}`);
53
+ LogUtil.log('lock', [], 'info', `${type} file is stale: ${stat.mtimeMs} vs ${Date.now()}`);
54
54
  } else {
55
55
  pid = filePid;
56
56
  }
package/support/log.ts CHANGED
@@ -2,7 +2,12 @@ export type CompilerLogEvent = [level: 'info' | 'debug' | 'warn', message: strin
2
2
  export type CompilerLogger = (...args: CompilerLogEvent) => void;
3
3
  export type WithLogger<T> = (log: CompilerLogger) => Promise<T>;
4
4
 
5
- const LEVELS = { warn: true, debug: /^debug$/.test(process.env.TRV_BUILD ?? ''), info: !/^warn$/.test(process.env.TRV_BUILD ?? '') };
5
+ const ENV_LEVEL = process.env.TRV_BUILD ?? 'info';
6
+ const LEVELS = {
7
+ warn: /^(debug|info|warn)$/.test(ENV_LEVEL),
8
+ info: /^(debug|info)$/.test(ENV_LEVEL),
9
+ debug: /^debug$/.test(ENV_LEVEL),
10
+ };
6
11
  const SCOPE_MAX = 15;
7
12
 
8
13
  export class LogUtil {