@naturalcycles/nodejs-lib 13.1.0 → 13.1.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/del.js +3 -2
- package/dist/bin/generate-build-info.js +8 -7
- package/dist/bin/json2env.js +3 -2
- package/dist/bin/kpy.js +3 -2
- package/dist/bin/secrets-decrypt.js +3 -2
- package/dist/bin/secrets-encrypt.js +3 -2
- package/dist/bin/secrets-gen-key.js +5 -4
- package/dist/bin/slack-this.js +3 -2
- package/dist/colors/colors.d.ts +1 -1
- package/dist/colors/colors.js +31 -30
- package/dist/fs/del.js +11 -10
- package/dist/fs/fs.util.d.ts +1 -1
- package/dist/fs/fs.util.js +42 -41
- package/dist/fs/json2env.js +6 -5
- package/dist/fs/kpy.js +8 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/infra/process.util.js +8 -7
- package/dist/jwt/jwt.service.d.ts +1 -1
- package/dist/jwt/jwt.service.js +6 -5
- package/dist/secret/secrets-decrypt.util.js +9 -8
- package/dist/secret/secrets-encrypt.util.js +8 -7
- package/dist/security/crypto.util.js +9 -8
- package/dist/security/hash.util.js +4 -3
- package/dist/security/id.util.js +4 -3
- package/dist/security/secret.util.js +7 -6
- package/dist/stream/ndjson/ndjsonStreamForEach.js +3 -2
- package/dist/stream/ndjson/pipelineFromNDJsonFile.js +4 -3
- package/dist/stream/ndjson/pipelineToNDJsonFile.js +4 -3
- package/dist/util/env.util.js +3 -2
- package/dist/util/exec.util.js +4 -3
- package/dist/util/git.util.js +9 -8
- package/dist/util/zip.util.js +6 -5
- package/dist/validation/ajv/getAjv.js +2 -1
- package/dist/validation/joi/joi.extensions.d.ts +1 -1
- package/dist/validation/joi/joi.extensions.js +3 -2
- package/dist/validation/joi/number.extensions.d.ts +1 -1
- package/dist/validation/joi/string.extensions.d.ts +1 -1
- package/package.json +1 -1
- package/src/bin/del.ts +1 -1
- package/src/bin/generate-build-info.ts +3 -3
- package/src/bin/json2env.ts +1 -1
- package/src/bin/kpy.ts +1 -1
- package/src/bin/secrets-decrypt.ts +1 -1
- package/src/bin/secrets-encrypt.ts +1 -1
- package/src/bin/secrets-gen-key.ts +2 -2
- package/src/bin/slack-this.ts +1 -1
- package/src/colors/colors.ts +2 -2
- package/src/fs/del.ts +2 -2
- package/src/fs/fs.util.ts +3 -3
- package/src/fs/json2env.ts +1 -1
- package/src/fs/kpy.ts +1 -1
- package/src/index.ts +2 -2
- package/src/infra/process.util.ts +1 -1
- package/src/jwt/jwt.service.ts +1 -1
- package/src/secret/secrets-decrypt.util.ts +2 -2
- package/src/secret/secrets-encrypt.util.ts +2 -2
- package/src/security/crypto.util.ts +1 -1
- package/src/security/hash.util.ts +1 -1
- package/src/security/id.util.ts +1 -1
- package/src/security/secret.util.ts +1 -1
- package/src/stream/ndjson/ndjsonStreamForEach.ts +1 -1
- package/src/stream/ndjson/pipelineFromNDJsonFile.ts +1 -1
- package/src/stream/ndjson/pipelineToNDJsonFile.ts +1 -1
- package/src/util/env.util.ts +1 -1
- package/src/util/exec.util.ts +1 -1
- package/src/util/git.util.ts +2 -2
- package/src/util/zip.util.ts +1 -1
- package/src/validation/joi/joi.extensions.ts +1 -1
- package/src/validation/joi/number.extensions.ts +1 -1
- package/src/validation/joi/string.extensions.ts +1 -1
package/package.json
CHANGED
package/src/bin/del.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import fs from 'node:fs'
|
|
4
|
+
import path from 'node:path'
|
|
5
|
+
import yargs from 'yargs'
|
|
6
6
|
import { appendToBashEnv, appendToGithubEnv, appendToGithubOutput } from '../fs/json2env'
|
|
7
7
|
import { runScript } from '../script/runScript'
|
|
8
8
|
import { generateBuildInfo } from '../util/buildInfo.util'
|
package/src/bin/json2env.ts
CHANGED
package/src/bin/kpy.ts
CHANGED
package/src/bin/slack-this.ts
CHANGED
package/src/colors/colors.ts
CHANGED
package/src/fs/del.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import fsp from 'node:fs/promises'
|
|
3
3
|
import { pFilter, pMap, _since } from '@naturalcycles/js-lib'
|
|
4
4
|
import { dimGrey, yellow } from '../colors/colors'
|
|
5
5
|
import { _pathExists, _pathExistsSync, globby } from '../index'
|
package/src/fs/fs.util.ts
CHANGED
|
@@ -14,9 +14,9 @@ Credit to: fs-extra (https://github.com/jprichardson/node-fs-extra)
|
|
|
14
14
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
17
|
+
import fs from 'node:fs'
|
|
18
|
+
import fsp from 'node:fs/promises'
|
|
19
|
+
import path from 'node:path'
|
|
20
20
|
import { _jsonParse } from '@naturalcycles/js-lib'
|
|
21
21
|
|
|
22
22
|
/**
|
package/src/fs/json2env.ts
CHANGED
package/src/fs/kpy.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Ajv from 'ajv'
|
|
2
|
-
import
|
|
2
|
+
import fastGlob from 'fast-glob'
|
|
3
3
|
import type { Options as FastGlobOptions } from 'fast-glob'
|
|
4
|
-
import
|
|
4
|
+
import globby from 'globby'
|
|
5
5
|
import type { GlobbyOptions } from 'globby'
|
|
6
6
|
import type {
|
|
7
7
|
AnySchema,
|
package/src/jwt/jwt.service.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _assert, _errorDataAppend, AnyObject, ErrorData, JWTString } from '@naturalcycles/js-lib'
|
|
2
2
|
import { AnySchema } from 'joi'
|
|
3
3
|
import type { Algorithm, VerifyOptions, JwtHeader, SignOptions } from 'jsonwebtoken'
|
|
4
|
-
import
|
|
4
|
+
import jsonwebtoken from 'jsonwebtoken'
|
|
5
5
|
import { anyObjectSchema } from '../validation/joi/joi.shared.schemas'
|
|
6
6
|
import { validate } from '../validation/joi/joi.validation.util'
|
|
7
7
|
export { jsonwebtoken }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import fs from 'node:fs'
|
|
3
3
|
import { _assert } from '@naturalcycles/js-lib'
|
|
4
4
|
import { dimGrey, yellow } from '../colors/colors'
|
|
5
5
|
import { _readJsonSync, _writeJsonSync, fastGlob } from '../index'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
3
|
import { _assert } from '@naturalcycles/js-lib'
|
|
4
4
|
import { dimGrey, yellow } from '../colors/colors'
|
|
5
5
|
import { _readJsonSync, _writeJsonSync, fastGlob } from '../index'
|
package/src/security/id.util.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createUnzip, ZlibOptions } from 'node:zlib'
|
|
2
|
-
import
|
|
2
|
+
import fs from 'node:fs'
|
|
3
3
|
import { _hb } from '@naturalcycles/js-lib'
|
|
4
4
|
import { transformTap, _pipeline, transformSplit } from '../..'
|
|
5
5
|
import { dimWhite, grey } from '../../colors/colors'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGzip, ZlibOptions } from 'node:zlib'
|
|
2
|
-
import
|
|
2
|
+
import fs from 'node:fs'
|
|
3
3
|
import { AppError } from '@naturalcycles/js-lib'
|
|
4
4
|
import { transformTap, _pipeline, _pathExistsSync, _ensureFileSync } from '../..'
|
|
5
5
|
import { grey } from '../../colors/colors'
|
package/src/util/env.util.ts
CHANGED
package/src/util/exec.util.ts
CHANGED
package/src/util/git.util.ts
CHANGED
package/src/util/zip.util.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LocalDate, localTime } from '@naturalcycles/js-lib'
|
|
2
2
|
import { Extension, StringSchema as JoiStringSchema } from 'joi'
|
|
3
|
-
import
|
|
3
|
+
import Joi from 'joi'
|
|
4
4
|
|
|
5
5
|
export interface StringSchema<TSchema = string> extends JoiStringSchema<TSchema> {
|
|
6
6
|
dateString: (min?: string, max?: string) => this
|