@fireproof/core 0.7.0-alpha.2 → 0.7.0-alpha.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/fireproof.js +182 -217
- package/dist/src/fireproof.js.map +1 -1
- package/dist/src/fireproof.mjs +187 -222
- package/dist/src/fireproof.mjs.map +1 -1
- package/dist/storage/filesystem.js +3 -3
- package/package.json +1 -1
- package/src/storage/filesystem.js +3 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { mkdir, writeFile } from 'fs/promises'
|
1
|
+
// import { mkdir, writeFile } from 'fs/promises'
|
2
2
|
import { join, dirname } from 'path';
|
3
3
|
import { homedir } from 'os';
|
4
4
|
import { Base } from './base.js';
|
@@ -62,7 +62,7 @@ function loadSync(filename) {
|
|
62
62
|
}
|
63
63
|
}
|
64
64
|
async function writeSync(fullpath, stringValue) {
|
65
|
-
await mkdir(dirname(fullpath), { recursive: true });
|
65
|
+
await fs.promises.mkdir(dirname(fullpath), { recursive: true });
|
66
66
|
// writeFileSync(fullpath, stringValue)
|
67
|
-
await writeFile(fullpath, stringValue);
|
67
|
+
await fs.promises.writeFile(fullpath, stringValue);
|
68
68
|
}
|
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
import { mkdir, writeFile } from 'fs/promises'
|
2
|
+
// import { mkdir, writeFile } from 'fs/promises'
|
3
3
|
import { join, dirname } from 'path'
|
4
4
|
import { homedir } from 'os'
|
5
5
|
import { Base } from './base.js'
|
@@ -68,7 +68,7 @@ function loadSync (filename) {
|
|
68
68
|
}
|
69
69
|
|
70
70
|
async function writeSync (fullpath, stringValue) {
|
71
|
-
await mkdir(dirname(fullpath), { recursive: true })
|
71
|
+
await fs.promises.mkdir(dirname(fullpath), { recursive: true })
|
72
72
|
// writeFileSync(fullpath, stringValue)
|
73
|
-
await writeFile(fullpath, stringValue)
|
73
|
+
await fs.promises.writeFile(fullpath, stringValue)
|
74
74
|
}
|