@naturalcycles/nodejs-lib 15.90.2 → 15.92.0
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/dist/fs/fs2.d.ts +6 -5
- package/dist/fs/kpy.js +1 -1
- package/dist/stream/pipeline.d.ts +1 -2
- package/dist/stream/pipeline.js +1 -3
- package/dist/validation/ajv/ajvSchema.d.ts +644 -20
- package/dist/validation/ajv/ajvSchema.js +1179 -8
- package/dist/validation/ajv/from-data/generateJsonSchemaFromData.d.ts +1 -1
- package/dist/validation/ajv/getAjv.js +6 -0
- package/dist/validation/ajv/index.d.ts +0 -1
- package/dist/validation/ajv/index.js +0 -1
- package/dist/validation/ajv/jsonSchemaBuilder.util.d.ts +1 -1
- package/dist/zip/zip.util.d.ts +1 -2
- package/package.json +2 -2
- package/src/validation/ajv/ajvSchema.ts +1930 -50
- package/src/validation/ajv/from-data/generateJsonSchemaFromData.ts +1 -1
- package/src/validation/ajv/getAjv.ts +10 -3
- package/src/validation/ajv/index.ts +0 -1
- package/src/validation/ajv/jsonSchemaBuilder.util.ts +1 -1
- package/dist/validation/ajv/jsonSchemaBuilder.d.ts +0 -653
- package/dist/validation/ajv/jsonSchemaBuilder.js +0 -1128
- package/src/validation/ajv/jsonSchemaBuilder.ts +0 -1975
package/dist/fs/fs2.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RmOptions } from 'node:fs';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
+
import fsp from 'node:fs/promises';
|
|
3
4
|
/**
|
|
4
5
|
* fs2 conveniently groups filesystem functions together.
|
|
5
6
|
* Supposed to be almost a drop-in replacement for these things together:
|
|
@@ -61,15 +62,15 @@ declare class FS2 {
|
|
|
61
62
|
*/
|
|
62
63
|
isDirectory(filePath: string): boolean;
|
|
63
64
|
fs: typeof fs;
|
|
64
|
-
fsp: typeof
|
|
65
|
+
fsp: typeof fsp;
|
|
65
66
|
lstat: fs.StatSyncFn;
|
|
66
|
-
lstatAsync: typeof
|
|
67
|
+
lstatAsync: typeof fsp.lstat;
|
|
67
68
|
stat: fs.StatSyncFn;
|
|
68
|
-
statAsync: typeof
|
|
69
|
+
statAsync: typeof fsp.stat;
|
|
69
70
|
mkdir: typeof fs.mkdirSync;
|
|
70
|
-
mkdirAsync: typeof
|
|
71
|
+
mkdirAsync: typeof fsp.mkdir;
|
|
71
72
|
readdir: typeof fs.readdirSync;
|
|
72
|
-
readdirAsync: typeof
|
|
73
|
+
readdirAsync: typeof fsp.readdir;
|
|
73
74
|
createWriteStream: typeof fs.createWriteStream;
|
|
74
75
|
createReadStream: typeof fs.createReadStream;
|
|
75
76
|
}
|
package/dist/fs/kpy.js
CHANGED
|
@@ -12,7 +12,7 @@ export async function kpy(opt) {
|
|
|
12
12
|
});
|
|
13
13
|
kpyLogFilenames(opt, filenames);
|
|
14
14
|
const overwrite = !opt.noOverwrite;
|
|
15
|
-
await Promise.all(filenames.map(async
|
|
15
|
+
await Promise.all(filenames.map(async filename => {
|
|
16
16
|
const basename = path.basename(filename);
|
|
17
17
|
const srcFilename = path.resolve(opt.baseDir, filename);
|
|
18
18
|
const destFilename = path.resolve(opt.outputDir, opt.flat ? basename : filename);
|
|
@@ -97,8 +97,7 @@ export declare class Pipeline<T = unknown> {
|
|
|
97
97
|
parseJson<TO = unknown>(this: Pipeline<Buffer> | Pipeline<Uint8Array> | Pipeline<string>): Pipeline<TO>;
|
|
98
98
|
gzip(this: Pipeline<Uint8Array>, opt?: ZlibOptions): Pipeline<Uint8Array>;
|
|
99
99
|
gunzip(this: Pipeline<Uint8Array>, opt?: ZlibOptions): Pipeline<Uint8Array>;
|
|
100
|
-
zstdCompress(this: Pipeline<Uint8Array>, level?: Integer,
|
|
101
|
-
opt?: ZstdOptions): Pipeline<Uint8Array>;
|
|
100
|
+
zstdCompress(this: Pipeline<Uint8Array>, level?: Integer, opt?: ZstdOptions): Pipeline<Uint8Array>;
|
|
102
101
|
zstdDecompress(this: Pipeline<Uint8Array>, opt?: ZstdOptions): Pipeline<Uint8Array>;
|
|
103
102
|
toArray(opt?: TransformOptions): Promise<T[]>;
|
|
104
103
|
toFile(outputFilePath: string): Promise<void>;
|
package/dist/stream/pipeline.js
CHANGED
|
@@ -299,9 +299,7 @@ export class Pipeline {
|
|
|
299
299
|
else if (outputFilePath.endsWith('.zst')) {
|
|
300
300
|
this.transforms.push(createZstdCompress(zstdLevelToOptions(level)));
|
|
301
301
|
}
|
|
302
|
-
this.destination = fs2.createWriteStream(outputFilePath, {
|
|
303
|
-
// highWaterMark: 64 * 1024, // no observed speedup
|
|
304
|
-
});
|
|
302
|
+
this.destination = fs2.createWriteStream(outputFilePath, {});
|
|
305
303
|
await this.run();
|
|
306
304
|
}
|
|
307
305
|
async to(destination) {
|