-const { readFile, rm, writeFile } = require('fs/promises');
+import { readFile, writeFile } from 'fs/promises';
+import { rmIfExists } from './utils.js';
+
+import GitStrategy from './remotes/git.js';
await writeFile(remoteConfig, remote);
},
async remove(remoteConfig) {
await writeFile(remoteConfig, remote);
},
async remove(remoteConfig) {
await this._executeMethodOnStrategy(remoteConfig, 'syncUp', blogDirectory);
},
async syncDown(remoteConfig, blogDirectory) {
await this._executeMethodOnStrategy(remoteConfig, 'syncUp', blogDirectory);
},
async syncDown(remoteConfig, blogDirectory) {
await this._executeMethodOnStrategy(remoteConfig, 'syncDown', blogDirectory);
},
async _executeMethodOnStrategy(remoteConfig, method, blogDirectory) {
await this._executeMethodOnStrategy(remoteConfig, 'syncDown', blogDirectory);
},
async _executeMethodOnStrategy(remoteConfig, method, blogDirectory) {
const remote = await this._ensureConfiguration(remoteConfig);
for (const strategy of internals.strategies) {
const remote = await this._ensureConfiguration(remoteConfig);
for (const strategy of internals.strategies) {