@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 +1 -1
- package/support/lock.ts +1 -1
- package/support/log.ts +6 -1
package/package.json
CHANGED
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', [], '
|
|
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
|
|
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 {
|