// TODO
}
+ if (mode !== undefined && stats.mode !== mode) {
+ // TODO
+ }
+
return diff;
}
import {promises as fs} from 'fs';
import ErrorWithMetadata from '../../ErrorWithMetadata';
-import {log} from '../../console';
import expand from '../../expand';
import stat from '../../stat';
import Context from '../Context';
if (state === 'directory') {
await directory(path);
}
+
+ // TODO: probably refactor this to use compare.ts
+ if (0) {
+ // In the meantime, silence unused parameter warnings.
+ console.log(force, mode, src);
+ }
}
async function directory(path: string) {
import {log} from '../../console';
import expand from '../../expand';
import tempfile from '../../tempfile';
-import {compile, fill} from '../../template';
import Context from '../Context';
import compare from '../compare';
if (diff.contents) {
// log.info('change!');
const temp = await tempfile(contents);
+ log.debug(`Wrote to temporary file: ${temp}`);
// TODO: cp from temp to target
// TODO: deal with group/owner/mode etc
import * as path from 'path';
import {root} from './Fig';
-import {COLORS, LOG_LEVEL, log, setLogLevel} from './console';
+import {COLORS, LOG_LEVEL, log} from './console';
import dedent from './dedent';
import ErrorWithMetadata from './ErrorWithMetadata';
import escapeRegExpPattern from './escapeRegExpPattern';
const profiles = project.profiles ?? {};
const [profile] =
- Object.entries(profiles).find(([, {pattern}]) => {
- if (regExpFromString(pattern).test(hostname)) {
- return true;
- }
- }) || [];
+ Object.entries(profiles).find(([, {pattern}]) =>
+ regExpFromString(pattern).test(hostname)
+ ) || [];
log.info(`Profile: ${profile || 'n/a'}`);
{
"compilerOptions": {
"module": "CommonJS",
+ "noFallthroughCasesInSwitch": true,
+ "noImplicitReturns": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
"outDir": "./lib",
"strict": true,
"target": "ES2019"