@@ -45,10 +45,13 @@ Effect.gen(function*() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const outputDirFiles = yield* fs.readDirectory(outputDirPath)
|
const outputDirFiles = yield* fs.readDirectory(outputDirPath)
|
||||||
yield* Effect.all(outputDirFiles.map(p => fs.remove(p, { recursive: true })))
|
yield* Effect.all(outputDirFiles.map(p => fs.remove(path.join(outputDirPath, p), { recursive: true })))
|
||||||
|
|
||||||
const tempOutputDirFiles = yield* fs.readDirectory(tempOutputDirPath)
|
const tempOutputDirFiles = yield* fs.readDirectory(tempOutputDirPath)
|
||||||
yield* Effect.all(tempOutputDirFiles.map(p => fs.rename(p, path.join(outputDirPath, path.basename(p)))))
|
yield* Effect.all(tempOutputDirFiles.map(p => fs.copy(
|
||||||
|
path.join(tempOutputDirPath, p),
|
||||||
|
path.join(outputDirPath, p),
|
||||||
|
)))
|
||||||
}).pipe(
|
}).pipe(
|
||||||
Effect.provide([
|
Effect.provide([
|
||||||
FetchHttpClient.layer,
|
FetchHttpClient.layer,
|
||||||
|
|||||||
Reference in New Issue
Block a user