@naturalcycles/nodejs-lib 12.76.0 → 12.77.1
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/bin/secrets-gen-key.js +1 -1
- package/dist/buffer/buffer.util.js +1 -1
- package/dist/colors/colors.js +1 -1
- package/dist/fs/kpy.js +1 -1
- package/dist/got/getGot.js +2 -2
- package/dist/infra/process.util.js +1 -1
- package/dist/secret/secrets-decrypt.util.js +1 -1
- package/dist/secret/secrets-encrypt.util.js +1 -1
- package/dist/security/crypto.util.js +3 -3
- package/dist/security/hash.util.d.ts +13 -2
- package/dist/security/hash.util.js +35 -9
- package/dist/security/secret.util.js +1 -1
- package/dist/stream/ndjson/ndjsonMap.js +6 -6
- package/dist/stream/ndjson/ndjsonStreamForEach.js +3 -3
- package/dist/stream/ndjson/pipelineFromNDJsonFile.d.ts +1 -1
- package/dist/stream/ndjson/pipelineFromNDJsonFile.js +2 -2
- package/dist/stream/ndjson/pipelineToNDJsonFile.d.ts +1 -1
- package/dist/stream/ndjson/pipelineToNDJsonFile.js +2 -2
- package/dist/stream/ndjson/transformJsonParse.js +2 -2
- package/dist/stream/ndjson/transformToNDJson.js +2 -2
- package/dist/stream/pipeline/pipeline.d.ts +1 -1
- package/dist/stream/pipeline/pipeline.js +3 -3
- package/dist/stream/readable/readableCreate.d.ts +1 -1
- package/dist/stream/readable/readableCreate.js +3 -3
- package/dist/stream/readable/readableFromArray.d.ts +1 -1
- package/dist/stream/readable/readableFromArray.js +2 -2
- package/dist/stream/readable/readableMap.js +2 -2
- package/dist/stream/stream.model.d.ts +1 -1
- package/dist/stream/stream.util.d.ts +1 -1
- package/dist/stream/transform/transformBuffer.js +2 -2
- package/dist/stream/transform/transformFilter.js +2 -2
- package/dist/stream/transform/transformLimit.d.ts +1 -1
- package/dist/stream/transform/transformLogProgress.js +4 -4
- package/dist/stream/transform/transformMapSimple.js +2 -2
- package/dist/stream/transform/transformNoOp.js +2 -2
- package/dist/stream/transform/transformTap.js +2 -2
- package/dist/stream/transform/transformToArray.js +2 -2
- package/dist/stream/transform/transformToString.js +2 -2
- package/dist/stream/transform/worker/transformMultiThreaded.js +2 -2
- package/dist/stream/writable/writableFork.js +2 -2
- package/dist/stream/writable/writableLimit.d.ts +1 -1
- package/dist/stream/writable/writableLimit.js +2 -2
- package/dist/stream/writable/writablePushToArray.js +2 -2
- package/dist/stream/writable/writableVoid.d.ts +1 -1
- package/dist/stream/writable/writableVoid.js +2 -2
- package/dist/string/inspectAny.d.ts +1 -1
- package/dist/string/inspectAny.js +3 -3
- package/dist/util/env.util.js +1 -1
- package/dist/util/zip.util.d.ts +1 -1
- package/dist/util/zip.util.js +6 -6
- package/dist/validation/ajv/ajv.util.js +1 -1
- package/dist/validation/ajv/ajvSchema.js +1 -1
- package/package.json +2 -5
- package/src/bin/secrets-gen-key.ts +1 -1
- package/src/buffer/buffer.util.ts +1 -1
- package/src/colors/colors.ts +1 -1
- package/src/fs/kpy.ts +1 -1
- package/src/got/getGot.ts +1 -1
- package/src/infra/process.util.ts +1 -1
- package/src/secret/secrets-decrypt.util.ts +1 -1
- package/src/secret/secrets-encrypt.util.ts +1 -1
- package/src/security/crypto.util.ts +3 -3
- package/src/security/hash.util.ts +33 -7
- package/src/security/secret.util.ts +1 -1
- package/src/stream/ndjson/ndjsonMap.ts +2 -2
- package/src/stream/ndjson/ndjsonStreamForEach.ts +2 -2
- package/src/stream/ndjson/pipelineFromNDJsonFile.ts +1 -1
- package/src/stream/ndjson/pipelineToNDJsonFile.ts +1 -1
- package/src/stream/ndjson/transformJsonParse.ts +1 -1
- package/src/stream/ndjson/transformToNDJson.ts +1 -1
- package/src/stream/pipeline/pipeline.ts +1 -1
- package/src/stream/readable/readableCreate.ts +1 -1
- package/src/stream/readable/readableFromArray.ts +1 -1
- package/src/stream/readable/readableMap.ts +1 -1
- package/src/stream/stream.model.ts +1 -1
- package/src/stream/stream.util.ts +1 -1
- package/src/stream/transform/transformBuffer.ts +1 -1
- package/src/stream/transform/transformFilter.ts +1 -1
- package/src/stream/transform/transformLimit.ts +1 -1
- package/src/stream/transform/transformLogProgress.ts +2 -2
- package/src/stream/transform/transformMapSimple.ts +1 -1
- package/src/stream/transform/transformNoOp.ts +1 -1
- package/src/stream/transform/transformTap.ts +1 -1
- package/src/stream/transform/transformToArray.ts +1 -1
- package/src/stream/transform/transformToString.ts +1 -1
- package/src/stream/transform/worker/transformMultiThreaded.ts +1 -1
- package/src/stream/writable/writableFork.ts +1 -1
- package/src/stream/writable/writableLimit.ts +1 -1
- package/src/stream/writable/writablePushToArray.ts +1 -1
- package/src/stream/writable/writableVoid.ts +1 -1
- package/src/string/inspectAny.ts +1 -1
- package/src/util/env.util.ts +1 -1
- package/src/util/zip.util.ts +3 -3
- package/src/validation/ajv/ajv.util.ts +1 -1
- package/src/validation/ajv/ajvSchema.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformToString = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_stream_1 = require("node:stream");
|
|
5
5
|
/**
|
|
6
6
|
* Transforms objectMode=false Buffers/strings into objectMode=true strings.
|
|
7
7
|
*
|
|
@@ -12,7 +12,7 @@ const stream_1 = require("stream");
|
|
|
12
12
|
* transformToString(), // string chunks, but objectMode==true
|
|
13
13
|
*/
|
|
14
14
|
function transformToString() {
|
|
15
|
-
return new
|
|
15
|
+
return new node_stream_1.Transform({
|
|
16
16
|
objectMode: false,
|
|
17
17
|
readableObjectMode: true,
|
|
18
18
|
transform(chunk, _, cb) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.transformMultiThreaded = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_worker_threads_1 = require("node:worker_threads");
|
|
5
5
|
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
6
6
|
const through2Concurrent = require("through2-concurrent");
|
|
7
7
|
const workerProxyFilePath = `${__dirname}/workerClassProxy.js`;
|
|
@@ -25,7 +25,7 @@ function transformMultiThreaded(opt) {
|
|
|
25
25
|
let index = -1; // input chunk index, will start from 0
|
|
26
26
|
const workers = (0, js_lib_1._range)(0, poolSize).map(workerIndex => {
|
|
27
27
|
workerDonePromises.push((0, js_lib_1.pDefer)());
|
|
28
|
-
const worker = new
|
|
28
|
+
const worker = new node_worker_threads_1.Worker(workerProxyFilePath, {
|
|
29
29
|
workerData: {
|
|
30
30
|
workerIndex,
|
|
31
31
|
workerFile,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.writableFork = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_stream_1 = require("node:stream");
|
|
5
5
|
const __1 = require("../..");
|
|
6
6
|
/**
|
|
7
7
|
* Allows "forking" a stream inside pipeline into a number of pipeline chains (2 or more).
|
|
@@ -21,7 +21,7 @@ function writableFork(chains, opt) {
|
|
|
21
21
|
console.error(err); // ensure the error is logged
|
|
22
22
|
throw err;
|
|
23
23
|
});
|
|
24
|
-
return new
|
|
24
|
+
return new node_stream_1.Writable({
|
|
25
25
|
objectMode: true,
|
|
26
26
|
...opt,
|
|
27
27
|
write(chunk, _, cb) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.writableLimit = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_stream_1 = require("node:stream");
|
|
5
5
|
/**
|
|
6
6
|
* Allows to stop the Readable stream after the pipeline has processed X number of rows.
|
|
7
7
|
* It counts OUTPUT rows (not input), because this Writable is always at the end of the Pipeline.
|
|
@@ -9,7 +9,7 @@ const stream_1 = require("stream");
|
|
|
9
9
|
*/
|
|
10
10
|
function writableLimit(readable, limit) {
|
|
11
11
|
let i = 0;
|
|
12
|
-
return new
|
|
12
|
+
return new node_stream_1.Writable({
|
|
13
13
|
objectMode: true,
|
|
14
14
|
write(chunk, _, cb) {
|
|
15
15
|
if (limit === 0)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.writablePushToArray = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_stream_1 = require("node:stream");
|
|
5
5
|
/**
|
|
6
6
|
* Will push all results to `arr`, will emit nothing in the end.
|
|
7
7
|
*/
|
|
8
8
|
function writablePushToArray(arr, opt = {}) {
|
|
9
|
-
return new
|
|
9
|
+
return new node_stream_1.Writable({
|
|
10
10
|
objectMode: true,
|
|
11
11
|
...opt,
|
|
12
12
|
write(chunk, _, cb) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Writable } from 'stream';
|
|
2
|
+
import { Writable } from 'node:stream';
|
|
3
3
|
import { DeferredPromise } from '@naturalcycles/js-lib';
|
|
4
4
|
import { TransformOptions } from '../stream.model';
|
|
5
5
|
export interface WritableVoidOptions extends TransformOptions {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.writableVoid = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_stream_1 = require("node:stream");
|
|
5
5
|
/**
|
|
6
6
|
* Use as a "null-terminator" of stream.pipeline.
|
|
7
7
|
* It consumes the stream as quickly as possible without doing anything.
|
|
8
8
|
* Put it in the end of your pipeline in case it ends with Transform that needs a consumer.
|
|
9
9
|
*/
|
|
10
10
|
function writableVoid(opt = {}) {
|
|
11
|
-
return new
|
|
11
|
+
return new node_stream_1.Writable({
|
|
12
12
|
objectMode: true,
|
|
13
13
|
...opt,
|
|
14
14
|
write(chunk, _, cb) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { InspectOptions } from 'util';
|
|
2
|
+
import { InspectOptions } from 'node:util';
|
|
3
3
|
import { StringifyAnyOptions, JsonStringifyFunction } from '@naturalcycles/js-lib';
|
|
4
4
|
export interface InspectAnyOptions extends StringifyAnyOptions, InspectOptions {
|
|
5
5
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.inspectAny = exports.inspectAnyStringifyFn = void 0;
|
|
4
|
-
const
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
5
|
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
6
6
|
const INSPECT_OPT = {
|
|
7
7
|
breakLength: 80,
|
|
@@ -32,14 +32,14 @@ exports.inspectAnyStringifyFn = inspectAnyStringifyFn;
|
|
|
32
32
|
function inspectAny(obj, opt = {}) {
|
|
33
33
|
// Inspect handles functions better
|
|
34
34
|
if (typeof obj === 'function') {
|
|
35
|
-
return (0,
|
|
35
|
+
return (0, node_util_1.inspect)(obj, {
|
|
36
36
|
...INSPECT_OPT,
|
|
37
37
|
...opt,
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
return (0, js_lib_1._stringifyAny)(obj, {
|
|
41
41
|
...opt,
|
|
42
|
-
stringifyFn: obj => (0,
|
|
42
|
+
stringifyFn: obj => (0, node_util_1.inspect)(obj, {
|
|
43
43
|
...INSPECT_OPT,
|
|
44
44
|
...opt,
|
|
45
45
|
}),
|
package/dist/util/env.util.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.requireFileToExist = exports.requireEnvKeys = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
4
|
+
const fs = require("node:fs");
|
|
5
5
|
require("dotenv/config"); // ensure .env is read before requiring keys
|
|
6
6
|
/**
|
|
7
7
|
* @example
|
package/dist/util/zip.util.d.ts
CHANGED
package/dist/util/zip.util.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.gunzipToString = exports.gzipString = exports.gunzipBuffer = exports.gzipBuffer = exports.inflateToString = exports.deflateString = exports.inflateBuffer = exports.deflateBuffer = void 0;
|
|
4
|
-
const
|
|
5
|
-
const zlib = require("zlib");
|
|
6
|
-
const deflate = (0,
|
|
7
|
-
const inflate = (0,
|
|
8
|
-
const gzip = (0,
|
|
9
|
-
const gunzip = (0,
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
|
+
const zlib = require("node:zlib");
|
|
6
|
+
const deflate = (0, node_util_1.promisify)(zlib.deflate.bind(zlib));
|
|
7
|
+
const inflate = (0, node_util_1.promisify)(zlib.inflate.bind(zlib));
|
|
8
|
+
const gzip = (0, node_util_1.promisify)(zlib.gzip.bind(zlib));
|
|
9
|
+
const gunzip = (0, node_util_1.promisify)(zlib.gunzip.bind(zlib));
|
|
10
10
|
// string > compressed buffer
|
|
11
11
|
/**
|
|
12
12
|
* deflateBuffer uses `deflate`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.readAjvSchemas = exports.readJsonSchemas = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
4
|
+
const fs = require("node:fs");
|
|
5
5
|
const __1 = require("../..");
|
|
6
6
|
const ajvSchema_1 = require("./ajvSchema");
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AjvSchema = void 0;
|
|
4
|
-
const fs = require("fs");
|
|
4
|
+
const fs = require("node:fs");
|
|
5
5
|
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
6
6
|
const index_1 = require("../../index");
|
|
7
7
|
const ajvValidationError_1 = require("./ajvValidationError");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/nodejs-lib",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.77.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky install",
|
|
6
6
|
"docs-serve": "vuepress dev docs",
|
|
@@ -49,10 +49,7 @@
|
|
|
49
49
|
"vue-class-component": "^7.2.6",
|
|
50
50
|
"vuepress": "^1.7.1",
|
|
51
51
|
"vuepress-plugin-typescript": "^0.3.1",
|
|
52
|
-
"
|
|
53
|
-
},
|
|
54
|
-
"resolutions": {
|
|
55
|
-
"prettier": "^2.0.0"
|
|
52
|
+
"zod": "^3.19.1"
|
|
56
53
|
},
|
|
57
54
|
"bin": {
|
|
58
55
|
"del": "dist/bin/del.js",
|
package/src/colors/colors.ts
CHANGED
package/src/fs/kpy.ts
CHANGED
package/src/got/getGot.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as crypto from 'crypto'
|
|
1
|
+
import * as crypto from 'node:crypto'
|
|
2
2
|
import { _stringMapEntries, StringMap } from '@naturalcycles/js-lib'
|
|
3
3
|
import { md5 } from './hash.util'
|
|
4
4
|
|
|
@@ -26,8 +26,8 @@ export function decryptRandomIVBuffer(input: Buffer, secretKeyBase64: string): B
|
|
|
26
26
|
const key = md5(Buffer.from(secretKeyBase64, 'base64'))
|
|
27
27
|
|
|
28
28
|
// iv is first 16 bytes of encrypted buffer, the rest is payload
|
|
29
|
-
const iv = input.
|
|
30
|
-
const payload = input.
|
|
29
|
+
const iv = input.subarray(0, 16)
|
|
30
|
+
const payload = input.subarray(16)
|
|
31
31
|
|
|
32
32
|
const decipher = crypto.createDecipheriv(algorithm, key, iv)
|
|
33
33
|
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
import * as crypto from 'crypto'
|
|
1
|
+
import * as crypto from 'node:crypto'
|
|
2
2
|
|
|
3
3
|
export function md5(s: string | Buffer): string {
|
|
4
4
|
return hash(s, 'md5')
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
export function md5AsBase64(s: string | Buffer): string {
|
|
8
|
+
return hashAsBuffer(s, 'md5').toString('base64')
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
export function md5AsBuffer(s: string | Buffer): Buffer {
|
|
8
12
|
return hashAsBuffer(s, 'md5')
|
|
9
13
|
}
|
|
10
14
|
|
|
15
|
+
export function sha256(s: string | Buffer): string {
|
|
16
|
+
return hash(s, 'sha256')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function sha256AsBase64(s: string | Buffer): string {
|
|
20
|
+
return hashAsBuffer(s, 'sha256').toString('base64')
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function sha256AsBuffer(s: string | Buffer): Buffer {
|
|
24
|
+
return hashAsBuffer(s, 'sha256')
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
export function hash(s: string | Buffer, algorithm: string): string {
|
|
12
28
|
return crypto.createHash(algorithm).update(s).digest('hex')
|
|
13
29
|
}
|
|
@@ -16,18 +32,28 @@ export function hashAsBuffer(s: string | Buffer, algorithm: string): Buffer {
|
|
|
16
32
|
return crypto.createHash(algorithm).update(s).digest()
|
|
17
33
|
}
|
|
18
34
|
|
|
19
|
-
export function
|
|
20
|
-
return Buffer.from(s, 'utf8').toString('base64')
|
|
35
|
+
export function base64(s: string | Buffer): string {
|
|
36
|
+
return (Buffer.isBuffer(s) ? s : Buffer.from(s, 'utf8')).toString('base64')
|
|
21
37
|
}
|
|
22
38
|
|
|
23
39
|
export function base64ToString(strBase64: string): string {
|
|
24
40
|
return Buffer.from(strBase64, 'base64').toString('utf8')
|
|
25
41
|
}
|
|
26
42
|
|
|
27
|
-
export function bufferToBase64(b: Buffer): string {
|
|
28
|
-
return b.toString('base64')
|
|
29
|
-
}
|
|
30
|
-
|
|
31
43
|
export function base64ToBuffer(strBase64: string): Buffer {
|
|
32
44
|
return Buffer.from(strBase64, 'base64')
|
|
33
45
|
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated use `base64`
|
|
49
|
+
*/
|
|
50
|
+
export function stringToBase64(s: string): string {
|
|
51
|
+
return Buffer.from(s, 'utf8').toString('base64')
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated use `base64`
|
|
56
|
+
*/
|
|
57
|
+
export function bufferToBase64(b: Buffer): string {
|
|
58
|
+
return b.toString('base64')
|
|
59
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createReadStream, createWriteStream } from 'fs'
|
|
2
|
-
import { createGzip, createUnzip } from 'zlib'
|
|
1
|
+
import { createReadStream, createWriteStream } from 'node:fs'
|
|
2
|
+
import { createGzip, createUnzip } from 'node:zlib'
|
|
3
3
|
import { AbortableAsyncMapper, ErrorMode } from '@naturalcycles/js-lib'
|
|
4
4
|
import {
|
|
5
5
|
requireFileToExist,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { pipeline, Readable, Transform, Writable } from 'stream'
|
|
1
|
+
import { pipeline, Readable, Transform, Writable } from 'node:stream'
|
|
2
2
|
import { _last, AnyFunction, DeferredPromise, pDefer } from '@naturalcycles/js-lib'
|
|
3
3
|
import { writablePushToArray } from '../../index'
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transform } from 'stream'
|
|
1
|
+
import { Transform } from 'node:stream'
|
|
2
2
|
import { AsyncPredicate, Predicate } from '@naturalcycles/js-lib'
|
|
3
3
|
import { TransformOptions, TransformTyped } from '../stream.model'
|
|
4
4
|
import { transformMap, TransformMapOptions } from './transformMap'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Worker } from 'worker_threads'
|
|
1
|
+
import { Worker } from 'node:worker_threads'
|
|
2
2
|
import { DeferredPromise, pDefer, _range, AnyObject } from '@naturalcycles/js-lib'
|
|
3
3
|
import through2Concurrent = require('through2-concurrent')
|
|
4
4
|
import { TransformTyped } from '../../stream.model'
|
package/src/string/inspectAny.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { inspect, InspectOptions } from 'util'
|
|
1
|
+
import { inspect, InspectOptions } from 'node:util'
|
|
2
2
|
import { StringifyAnyOptions, _stringifyAny, JsonStringifyFunction } from '@naturalcycles/js-lib'
|
|
3
3
|
|
|
4
4
|
export interface InspectAnyOptions extends StringifyAnyOptions, InspectOptions {}
|
package/src/util/env.util.ts
CHANGED
package/src/util/zip.util.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { promisify } from 'util'
|
|
2
|
-
import { ZlibOptions } from 'zlib'
|
|
3
|
-
import * as zlib from 'zlib'
|
|
1
|
+
import { promisify } from 'node:util'
|
|
2
|
+
import { ZlibOptions } from 'node:zlib'
|
|
3
|
+
import * as zlib from 'node:zlib'
|
|
4
4
|
|
|
5
5
|
const deflate = promisify(zlib.deflate.bind(zlib))
|
|
6
6
|
const inflate = promisify(zlib.inflate.bind(zlib))
|