@serwist/utils 10.0.0-preview.8 → 10.0.0-preview.9
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.node.d.ts +3 -3
- package/dist/index.node.d.ts.map +1 -1
- package/dist/node/fs.d.ts.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.node.ts +3 -3
- package/src/index.ts +1 -1
- package/src/node/fs.ts +2 -2
- package/src/node/log.ts +1 -1
- package/src/types.ts +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nonNullable } from "./nonNullable.js";
|
|
2
2
|
import { parallel } from "./parallel.js";
|
|
3
3
|
export { nonNullable, parallel };
|
|
4
|
-
export {
|
|
4
|
+
export { isAbsolute, resolveBasePath, slash, toUnix } from "./paths.js";
|
|
5
5
|
export type * from "./types.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACxE,mBAAmB,YAAY,CAAC"}
|
package/dist/index.node.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { errors } from "./node/errors.js";
|
|
2
|
-
export { getFileHash, getFileSize
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
2
|
+
export { getCompositeDetails, getFileHash, getFileSize } from "./node/fs.js";
|
|
3
|
+
export { getStringDetails, getStringHash } from "./node/hash.js";
|
|
4
|
+
export type { Logger, LoggerOptions, LogLevel, LogOptions, LogType } from "./node/log.js";
|
|
5
5
|
export { createLogger, LogLevels } from "./node/log.js";
|
|
6
6
|
export { resolveEntry } from "./node/paths.js";
|
|
7
7
|
//# sourceMappingURL=index.node.d.ts.map
|
package/dist/index.node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.node.d.ts","sourceRoot":"","sources":["../src/index.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACjE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/node/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/node/fs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/node/fs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,eAAO,MAAM,WAAW,GAAI,MAAM,EAAE,CAAC,oBAAoB,WAMxD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,MAAM,GAAG,IAUnD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,cAAc,MAAM,EAAE,mBAAmB,WAAW,EAAE,KAAG,WAkB5F,CAAC"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GAAG,EAAE,CAAC;AAEP,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KACvB,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GAAG,EAAE,CAAC;AAEP,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/utils",
|
|
3
|
-
"version": "10.0.0-preview.
|
|
3
|
+
"version": "10.0.0-preview.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "This module contains internal utilities used by Serwist packages.",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/common-tags": "1.8.4",
|
|
48
|
-
"rollup": "4.
|
|
48
|
+
"rollup": "4.45.1",
|
|
49
49
|
"typescript": "5.8.3",
|
|
50
|
-
"@serwist/configs": "10.0.0-preview.
|
|
50
|
+
"@serwist/configs": "10.0.0-preview.9"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "rimraf dist && NODE_ENV=production rollup --config rollup.config.js",
|
package/src/index.node.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { errors } from "./node/errors.js";
|
|
2
|
-
export { getFileHash, getFileSize
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
2
|
+
export { getCompositeDetails, getFileHash, getFileSize } from "./node/fs.js";
|
|
3
|
+
export { getStringDetails, getStringHash } from "./node/hash.js";
|
|
4
|
+
export type { Logger, LoggerOptions, LogLevel, LogOptions, LogType } from "./node/log.js";
|
|
5
5
|
export { createLogger, LogLevels } from "./node/log.js";
|
|
6
6
|
export { resolveEntry } from "./node/paths.js";
|
package/src/index.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { nonNullable } from "./nonNullable.js";
|
|
|
2
2
|
import { parallel } from "./parallel.js";
|
|
3
3
|
|
|
4
4
|
export { nonNullable, parallel };
|
|
5
|
-
export {
|
|
5
|
+
export { isAbsolute, resolveBasePath, slash, toUnix } from "./paths.js";
|
|
6
6
|
export type * from "./types.js";
|
package/src/node/fs.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import fs from "node:fs";
|
|
3
|
-
import { getStringHash } from "./hash.js";
|
|
4
|
-
import { errors } from "./errors.js";
|
|
5
3
|
import type { FileDetails } from "../types.js";
|
|
4
|
+
import { errors } from "./errors.js";
|
|
5
|
+
import { getStringHash } from "./hash.js";
|
|
6
6
|
|
|
7
7
|
export const getFileHash = (file: fs.PathOrFileDescriptor) => {
|
|
8
8
|
try {
|
package/src/node/log.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import { cyan,
|
|
3
|
+
import { cyan, red, yellow } from "kolorist";
|
|
4
4
|
|
|
5
5
|
export type LogType = "error" | "warn" | "info";
|
|
6
6
|
export type LogLevel = LogType | "silent";
|