@visulima/fs 3.0.1 → 3.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/error.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.d.mjs';
1
+ export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.js';
2
2
 
3
3
  declare class AlreadyExistsError extends Error {
4
4
  constructor(message: string);
package/dist/index.cjs CHANGED
@@ -12,11 +12,11 @@ const ensureLinkSync = require('./packem_shared/ensureLinkSync-BVw3h6sK.cjs');
12
12
  const ensureSymlink = require('./packem_shared/ensureSymlink-CFSfreco.cjs');
13
13
  const ensureSymlinkSync = require('./packem_shared/ensureSymlinkSync-BCd9bzsx.cjs');
14
14
  const LF = require('./packem_shared/LF-bB2qO80j.cjs');
15
- const collect = require('./packem_shared/collect-DxUriHCH.cjs');
15
+ const collect = require('./packem_shared/collect-DZVa0P7v.cjs');
16
16
  const collectSync = require('./packem_shared/collectSync-BaA0s001.cjs');
17
17
  const findUp = require('./packem_shared/findUp-DA511Swp.cjs');
18
18
  const findUpSync = require('./packem_shared/findUpSync-u1rGibzw.cjs');
19
- const walk = require('./packem_shared/walk-BW7b4GXI.cjs');
19
+ const walk = require('./packem_shared/walk-1LfF6MKY.cjs');
20
20
  const walkSync = require('./packem_shared/walkSync-DgPj93NL.cjs');
21
21
  const isAccessible = require('./packem_shared/isAccessible-ZNVGsSb7.cjs');
22
22
  const isAccessibleSync = require('./packem_shared/isAccessibleSync-VWjQa-US.cjs');
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { W as WalkOptions, F as FindUpName, a as FindUpOptions, b as FindUpNameSync, c as WalkEntry, R as ReadFileOptions, C as ContentType, d as ReadJsonOptions, J as JsonReviver, E as EmptyDirOptions, e as WriteFileOptions, f as WriteJsonOptions } from './packem_shared/types-CiwAWOQj.d.mjs';
2
- export { k as CodeFrameLocation, h as FIND_UP_STOP, g as F_OK, l as FindUpNameFnResult, m as FindUpNameSyncFnResult, n as JsonReplacer, i as R_OK, o as ReadFileEncoding, j as W_OK, X as X_OK } from './packem_shared/types-CiwAWOQj.d.mjs';
1
+ import { W as WalkOptions, F as FindUpName, a as FindUpOptions, b as FindUpNameSync, c as WalkEntry, R as ReadFileOptions, C as ContentType, d as ReadJsonOptions, J as JsonReviver, E as EmptyDirOptions, e as WriteFileOptions, f as WriteJsonOptions } from './packem_shared/types-CiwAWOQj.js';
2
+ export { k as CodeFrameLocation, h as FIND_UP_STOP, g as F_OK, l as FindUpNameFnResult, m as FindUpNameSyncFnResult, n as JsonReplacer, i as R_OK, o as ReadFileEncoding, j as W_OK, X as X_OK } from './packem_shared/types-CiwAWOQj.js';
3
3
  import { symlink } from 'node:fs';
4
4
  import { brotliDecompress, unzip, brotliDecompressSync, unzipSync } from 'node:zlib';
5
- import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.d.mjs';
5
+ import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.js';
6
6
  import 'yaml';
7
7
 
8
8
  declare const ensureDir: (directory: URL | string) => Promise<void>;
package/dist/index.mjs CHANGED
@@ -8,11 +8,11 @@ export { default as ensureLinkSync } from './packem_shared/ensureLinkSync-Dk-YeR
8
8
  export { default as ensureSymlink } from './packem_shared/ensureSymlink-CSqngPoI.mjs';
9
9
  export { default as ensureSymlinkSync } from './packem_shared/ensureSymlinkSync-QRaNZX2E.mjs';
10
10
  export { CRLF, EOL, LF, detect, format } from './packem_shared/LF-CU3KsvZC.mjs';
11
- export { default as collect } from './packem_shared/collect-BtDVJEOm.mjs';
11
+ export { default as collect } from './packem_shared/collect-DIZ3yuRZ.mjs';
12
12
  export { default as collectSync } from './packem_shared/collectSync-CGjdb50I.mjs';
13
13
  export { default as findUp } from './packem_shared/findUp-C8_QpAtD.mjs';
14
14
  export { default as findUpSync } from './packem_shared/findUpSync-DVOd3V-q.mjs';
15
- export { default as walk } from './packem_shared/walk-CNcSYQVq.mjs';
15
+ export { default as walk } from './packem_shared/walk-CSp2zlI2.mjs';
16
16
  export { default as walkSync } from './packem_shared/walkSync-BzxdFWLU.mjs';
17
17
  export { default as isAccessible } from './packem_shared/isAccessible-Bonsm1Ez.mjs';
18
18
  export { default as isAccessibleSync } from './packem_shared/isAccessibleSync-3gnUWUwX.mjs';
@@ -1,4 +1,4 @@
1
- import walk from './walk-CNcSYQVq.mjs';
1
+ import walk from './walk-CSp2zlI2.mjs';
2
2
 
3
3
  var __defProp = Object.defineProperty;
4
4
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const walk = require('./walk-BW7b4GXI.cjs');
3
+ const walk = require('./walk-1LfF6MKY.cjs');
4
4
 
5
5
  var __defProp = Object.defineProperty;
6
6
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
@@ -14,12 +14,9 @@ const _createWalkEntry = /* @__PURE__ */ __name(async (path$1) => {
14
14
  const name = path.basename(normalizePath);
15
15
  const info = await promises.stat(normalizePath);
16
16
  return {
17
- // eslint-disable-next-line @typescript-eslint/unbound-method
18
- isDirectory: info.isDirectory,
19
- // eslint-disable-next-line @typescript-eslint/unbound-method
20
- isFile: info.isFile,
21
- // eslint-disable-next-line @typescript-eslint/unbound-method
22
- isSymbolicLink: info.isSymbolicLink,
17
+ isDirectory: /* @__PURE__ */ __name(() => info.isDirectory(), "isDirectory"),
18
+ isFile: /* @__PURE__ */ __name(() => info.isFile(), "isFile"),
19
+ isSymbolicLink: /* @__PURE__ */ __name(() => info.isSymbolicLink(), "isSymbolicLink"),
23
20
  name,
24
21
  path: normalizePath
25
22
  };
@@ -83,12 +80,9 @@ async function* walk(directory, {
83
80
  });
84
81
  } else if (entry.isFile() && includeFiles && walkInclude.walkInclude(path$1, extensions, mappedMatch, mappedSkip)) {
85
82
  yield {
86
- // eslint-disable-next-line @typescript-eslint/unbound-method
87
- isDirectory: entry.isDirectory,
88
- // eslint-disable-next-line @typescript-eslint/unbound-method
89
- isFile: entry.isFile,
90
- // eslint-disable-next-line @typescript-eslint/unbound-method
91
- isSymbolicLink: entry.isSymbolicLink,
83
+ isDirectory: /* @__PURE__ */ __name(() => entry.isDirectory(), "isDirectory"),
84
+ isFile: /* @__PURE__ */ __name(() => entry.isFile(), "isFile"),
85
+ isSymbolicLink: /* @__PURE__ */ __name(() => entry.isSymbolicLink(), "isSymbolicLink"),
92
86
  name: entry.name,
93
87
  path: path$1
94
88
  };
@@ -12,12 +12,9 @@ const _createWalkEntry = /* @__PURE__ */ __name(async (path) => {
12
12
  const name = basename(normalizePath);
13
13
  const info = await stat(normalizePath);
14
14
  return {
15
- // eslint-disable-next-line @typescript-eslint/unbound-method
16
- isDirectory: info.isDirectory,
17
- // eslint-disable-next-line @typescript-eslint/unbound-method
18
- isFile: info.isFile,
19
- // eslint-disable-next-line @typescript-eslint/unbound-method
20
- isSymbolicLink: info.isSymbolicLink,
15
+ isDirectory: /* @__PURE__ */ __name(() => info.isDirectory(), "isDirectory"),
16
+ isFile: /* @__PURE__ */ __name(() => info.isFile(), "isFile"),
17
+ isSymbolicLink: /* @__PURE__ */ __name(() => info.isSymbolicLink(), "isSymbolicLink"),
21
18
  name,
22
19
  path: normalizePath
23
20
  };
@@ -81,12 +78,9 @@ async function* walk(directory, {
81
78
  });
82
79
  } else if (entry.isFile() && includeFiles && walkInclude(path, extensions, mappedMatch, mappedSkip)) {
83
80
  yield {
84
- // eslint-disable-next-line @typescript-eslint/unbound-method
85
- isDirectory: entry.isDirectory,
86
- // eslint-disable-next-line @typescript-eslint/unbound-method
87
- isFile: entry.isFile,
88
- // eslint-disable-next-line @typescript-eslint/unbound-method
89
- isSymbolicLink: entry.isSymbolicLink,
81
+ isDirectory: /* @__PURE__ */ __name(() => entry.isDirectory(), "isDirectory"),
82
+ isFile: /* @__PURE__ */ __name(() => entry.isFile(), "isFile"),
83
+ isSymbolicLink: /* @__PURE__ */ __name(() => entry.isSymbolicLink(), "isSymbolicLink"),
90
84
  name: entry.name,
91
85
  path
92
86
  };
package/dist/size.cjs ADDED
@@ -0,0 +1,118 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
4
+
5
+ const node_fs = require('node:fs');
6
+ const promises = require('node:fs/promises');
7
+ const node_path = require('node:path');
8
+ const node_stream = require('node:stream');
9
+ const node_url = require('node:url');
10
+ const node_zlib = require('node:zlib');
11
+ const utils = require('@visulima/path/utils');
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
15
+ const fileExists = /* @__PURE__ */ __name((input) => {
16
+ if (node_path.isAbsolute(input)) {
17
+ return node_fs.existsSync(input);
18
+ }
19
+ try {
20
+ return node_fs.existsSync(node_path.resolve(input));
21
+ } catch {
22
+ return false;
23
+ }
24
+ }, "fileExists");
25
+ const getStreamSizeEfficient = /* @__PURE__ */ __name(async (stream) => {
26
+ let totalSize = 0;
27
+ for await (const chunk of stream) {
28
+ totalSize += Buffer.from(chunk).length;
29
+ }
30
+ return totalSize;
31
+ }, "getStreamSizeEfficient");
32
+ const getCompressedStreamSizeEfficient = /* @__PURE__ */ __name(async (stream, createCompressor) => {
33
+ let totalSize = 0;
34
+ const compressor = createCompressor();
35
+ return await new Promise((resolve2, reject) => {
36
+ compressor.on("data", (chunk) => {
37
+ totalSize += chunk.length;
38
+ });
39
+ compressor.on("end", () => resolve2(totalSize));
40
+ compressor.on("error", reject);
41
+ stream.on("error", reject);
42
+ stream.pipe(compressor);
43
+ });
44
+ }, "getCompressedStreamSizeEfficient");
45
+ const processInputEfficiently = /* @__PURE__ */ __name(async (input, processor, streamProcessor) => {
46
+ if (input instanceof node_url.URL || typeof input === "string") {
47
+ const path = utils.toPath(input);
48
+ if (fileExists(path)) {
49
+ const fileStream = node_stream.Readable.from(await promises.readFile(path));
50
+ return await streamProcessor(fileStream);
51
+ }
52
+ if (typeof input === "string") {
53
+ return processor(Buffer.from(input));
54
+ }
55
+ }
56
+ if (input instanceof node_stream.Readable) {
57
+ return await streamProcessor(input);
58
+ }
59
+ return processor(input);
60
+ }, "processInputEfficiently");
61
+ const gzipSize = /* @__PURE__ */ __name(async (input, options) => {
62
+ const streamProcessor = /* @__PURE__ */ __name(async (stream) => await getCompressedStreamSizeEfficient(stream, () => node_zlib.createGzip(options)), "streamProcessor");
63
+ const bufferProcessor = /* @__PURE__ */ __name((data) => node_zlib.gzipSync(data, options).length, "bufferProcessor");
64
+ return await processInputEfficiently(input, bufferProcessor, streamProcessor);
65
+ }, "gzipSize");
66
+ const brotliSize = /* @__PURE__ */ __name(async (input, options) => {
67
+ const streamProcessor = /* @__PURE__ */ __name(async (stream) => await getCompressedStreamSizeEfficient(stream, () => node_zlib.createBrotliCompress(options)), "streamProcessor");
68
+ const bufferProcessor = /* @__PURE__ */ __name((data) => node_zlib.brotliCompressSync(data, options).length, "bufferProcessor");
69
+ return await processInputEfficiently(input, bufferProcessor, streamProcessor);
70
+ }, "brotliSize");
71
+ const rawSize = /* @__PURE__ */ __name(async (input) => {
72
+ const streamProcessor = /* @__PURE__ */ __name(async (stream) => await getStreamSizeEfficient(stream), "streamProcessor");
73
+ const bufferProcessor = /* @__PURE__ */ __name((data) => data.length, "bufferProcessor");
74
+ return await processInputEfficiently(input, bufferProcessor, streamProcessor);
75
+ }, "rawSize");
76
+ const gzipSizeSync = /* @__PURE__ */ __name((input, options) => {
77
+ if (input instanceof node_url.URL || typeof input === "string") {
78
+ const path = utils.toPath(input);
79
+ if (fileExists(path)) {
80
+ return node_zlib.gzipSync(node_fs.readFileSync(path), options).length;
81
+ }
82
+ if (typeof input === "string") {
83
+ return node_zlib.gzipSync(Buffer.from(input), options).length;
84
+ }
85
+ }
86
+ return node_zlib.gzipSync(input, options).length;
87
+ }, "gzipSizeSync");
88
+ const brotliSizeSync = /* @__PURE__ */ __name((input, options) => {
89
+ if (input instanceof node_url.URL || typeof input === "string") {
90
+ const path = utils.toPath(input);
91
+ if (fileExists(path)) {
92
+ return node_zlib.brotliCompressSync(node_fs.readFileSync(path), options).length;
93
+ }
94
+ if (typeof input === "string") {
95
+ return node_zlib.brotliCompressSync(Buffer.from(input), options).length;
96
+ }
97
+ }
98
+ return node_zlib.brotliCompressSync(input, options).length;
99
+ }, "brotliSizeSync");
100
+ const rawSizeSync = /* @__PURE__ */ __name((input) => {
101
+ if (input instanceof node_url.URL || typeof input === "string") {
102
+ const path = utils.toPath(input);
103
+ if (fileExists(path)) {
104
+ return node_fs.statSync(path).size;
105
+ }
106
+ if (typeof input === "string") {
107
+ return Buffer.from(input).length;
108
+ }
109
+ }
110
+ return input.length;
111
+ }, "rawSizeSync");
112
+
113
+ exports.brotliSize = brotliSize;
114
+ exports.brotliSizeSync = brotliSizeSync;
115
+ exports.gzipSize = gzipSize;
116
+ exports.gzipSizeSync = gzipSizeSync;
117
+ exports.rawSize = rawSize;
118
+ exports.rawSizeSync = rawSizeSync;
@@ -0,0 +1,12 @@
1
+ import { Readable } from 'node:stream';
2
+ import { URL } from 'node:url';
3
+ import { ZlibOptions, BrotliOptions } from 'node:zlib';
4
+
5
+ declare const gzipSize: (input: Buffer | Readable | URL | string, options?: ZlibOptions) => Promise<number>;
6
+ declare const brotliSize: (input: Buffer | Readable | URL | string, options?: BrotliOptions) => Promise<number>;
7
+ declare const rawSize: (input: Buffer | Readable | URL | string) => Promise<number>;
8
+ declare const gzipSizeSync: (input: Buffer | URL | string, options?: ZlibOptions) => number;
9
+ declare const brotliSizeSync: (input: Buffer | URL | string, options?: BrotliOptions) => number;
10
+ declare const rawSizeSync: (input: Buffer | URL | string) => number;
11
+
12
+ export { brotliSize, brotliSizeSync, gzipSize, gzipSizeSync, rawSize, rawSizeSync };
@@ -0,0 +1,12 @@
1
+ import { Readable } from 'node:stream';
2
+ import { URL } from 'node:url';
3
+ import { ZlibOptions, BrotliOptions } from 'node:zlib';
4
+
5
+ declare const gzipSize: (input: Buffer | Readable | URL | string, options?: ZlibOptions) => Promise<number>;
6
+ declare const brotliSize: (input: Buffer | Readable | URL | string, options?: BrotliOptions) => Promise<number>;
7
+ declare const rawSize: (input: Buffer | Readable | URL | string) => Promise<number>;
8
+ declare const gzipSizeSync: (input: Buffer | URL | string, options?: ZlibOptions) => number;
9
+ declare const brotliSizeSync: (input: Buffer | URL | string, options?: BrotliOptions) => number;
10
+ declare const rawSizeSync: (input: Buffer | URL | string) => number;
11
+
12
+ export { brotliSize, brotliSizeSync, gzipSize, gzipSizeSync, rawSize, rawSizeSync };
package/dist/size.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { Readable } from 'node:stream';
2
+ import { URL } from 'node:url';
3
+ import { ZlibOptions, BrotliOptions } from 'node:zlib';
4
+
5
+ declare const gzipSize: (input: Buffer | Readable | URL | string, options?: ZlibOptions) => Promise<number>;
6
+ declare const brotliSize: (input: Buffer | Readable | URL | string, options?: BrotliOptions) => Promise<number>;
7
+ declare const rawSize: (input: Buffer | Readable | URL | string) => Promise<number>;
8
+ declare const gzipSizeSync: (input: Buffer | URL | string, options?: ZlibOptions) => number;
9
+ declare const brotliSizeSync: (input: Buffer | URL | string, options?: BrotliOptions) => number;
10
+ declare const rawSizeSync: (input: Buffer | URL | string) => number;
11
+
12
+ export { brotliSize, brotliSizeSync, gzipSize, gzipSizeSync, rawSize, rawSizeSync };
package/dist/size.mjs ADDED
@@ -0,0 +1,109 @@
1
+ import { readFileSync, statSync, existsSync } from 'node:fs';
2
+ import { readFile } from 'node:fs/promises';
3
+ import { isAbsolute, resolve } from 'node:path';
4
+ import { Readable } from 'node:stream';
5
+ import { URL } from 'node:url';
6
+ import { gzipSync, brotliCompressSync, createGzip, createBrotliCompress } from 'node:zlib';
7
+ import { toPath } from '@visulima/path/utils';
8
+
9
+ var __defProp = Object.defineProperty;
10
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
+ const fileExists = /* @__PURE__ */ __name((input) => {
12
+ if (isAbsolute(input)) {
13
+ return existsSync(input);
14
+ }
15
+ try {
16
+ return existsSync(resolve(input));
17
+ } catch {
18
+ return false;
19
+ }
20
+ }, "fileExists");
21
+ const getStreamSizeEfficient = /* @__PURE__ */ __name(async (stream) => {
22
+ let totalSize = 0;
23
+ for await (const chunk of stream) {
24
+ totalSize += Buffer.from(chunk).length;
25
+ }
26
+ return totalSize;
27
+ }, "getStreamSizeEfficient");
28
+ const getCompressedStreamSizeEfficient = /* @__PURE__ */ __name(async (stream, createCompressor) => {
29
+ let totalSize = 0;
30
+ const compressor = createCompressor();
31
+ return await new Promise((resolve2, reject) => {
32
+ compressor.on("data", (chunk) => {
33
+ totalSize += chunk.length;
34
+ });
35
+ compressor.on("end", () => resolve2(totalSize));
36
+ compressor.on("error", reject);
37
+ stream.on("error", reject);
38
+ stream.pipe(compressor);
39
+ });
40
+ }, "getCompressedStreamSizeEfficient");
41
+ const processInputEfficiently = /* @__PURE__ */ __name(async (input, processor, streamProcessor) => {
42
+ if (input instanceof URL || typeof input === "string") {
43
+ const path = toPath(input);
44
+ if (fileExists(path)) {
45
+ const fileStream = Readable.from(await readFile(path));
46
+ return await streamProcessor(fileStream);
47
+ }
48
+ if (typeof input === "string") {
49
+ return processor(Buffer.from(input));
50
+ }
51
+ }
52
+ if (input instanceof Readable) {
53
+ return await streamProcessor(input);
54
+ }
55
+ return processor(input);
56
+ }, "processInputEfficiently");
57
+ const gzipSize = /* @__PURE__ */ __name(async (input, options) => {
58
+ const streamProcessor = /* @__PURE__ */ __name(async (stream) => await getCompressedStreamSizeEfficient(stream, () => createGzip(options)), "streamProcessor");
59
+ const bufferProcessor = /* @__PURE__ */ __name((data) => gzipSync(data, options).length, "bufferProcessor");
60
+ return await processInputEfficiently(input, bufferProcessor, streamProcessor);
61
+ }, "gzipSize");
62
+ const brotliSize = /* @__PURE__ */ __name(async (input, options) => {
63
+ const streamProcessor = /* @__PURE__ */ __name(async (stream) => await getCompressedStreamSizeEfficient(stream, () => createBrotliCompress(options)), "streamProcessor");
64
+ const bufferProcessor = /* @__PURE__ */ __name((data) => brotliCompressSync(data, options).length, "bufferProcessor");
65
+ return await processInputEfficiently(input, bufferProcessor, streamProcessor);
66
+ }, "brotliSize");
67
+ const rawSize = /* @__PURE__ */ __name(async (input) => {
68
+ const streamProcessor = /* @__PURE__ */ __name(async (stream) => await getStreamSizeEfficient(stream), "streamProcessor");
69
+ const bufferProcessor = /* @__PURE__ */ __name((data) => data.length, "bufferProcessor");
70
+ return await processInputEfficiently(input, bufferProcessor, streamProcessor);
71
+ }, "rawSize");
72
+ const gzipSizeSync = /* @__PURE__ */ __name((input, options) => {
73
+ if (input instanceof URL || typeof input === "string") {
74
+ const path = toPath(input);
75
+ if (fileExists(path)) {
76
+ return gzipSync(readFileSync(path), options).length;
77
+ }
78
+ if (typeof input === "string") {
79
+ return gzipSync(Buffer.from(input), options).length;
80
+ }
81
+ }
82
+ return gzipSync(input, options).length;
83
+ }, "gzipSizeSync");
84
+ const brotliSizeSync = /* @__PURE__ */ __name((input, options) => {
85
+ if (input instanceof URL || typeof input === "string") {
86
+ const path = toPath(input);
87
+ if (fileExists(path)) {
88
+ return brotliCompressSync(readFileSync(path), options).length;
89
+ }
90
+ if (typeof input === "string") {
91
+ return brotliCompressSync(Buffer.from(input), options).length;
92
+ }
93
+ }
94
+ return brotliCompressSync(input, options).length;
95
+ }, "brotliSizeSync");
96
+ const rawSizeSync = /* @__PURE__ */ __name((input) => {
97
+ if (input instanceof URL || typeof input === "string") {
98
+ const path = toPath(input);
99
+ if (fileExists(path)) {
100
+ return statSync(path).size;
101
+ }
102
+ if (typeof input === "string") {
103
+ return Buffer.from(input).length;
104
+ }
105
+ }
106
+ return input.length;
107
+ }, "rawSizeSync");
108
+
109
+ export { brotliSize, brotliSizeSync, gzipSize, gzipSizeSync, rawSize, rawSizeSync };
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.d.mjs';
2
- import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.d.mjs';
3
- import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-CiwAWOQj.d.mjs';
1
+ export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.js';
2
+ import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.js';
3
+ import { p as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-CiwAWOQj.js';
4
4
  export { toPath } from '@visulima/path/utils';
5
5
  import 'node:fs';
6
6
  import 'yaml';
package/dist/yaml.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-CiwAWOQj.d.mjs';
1
+ import { q as ReadYamlOptions, Y as YamlReviver, r as YamlReplacer } from './packem_shared/types-CiwAWOQj.js';
2
2
  import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
3
3
  import 'node:fs';
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/fs",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "description": "Human friendly file system utilities for Node.js",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -48,7 +48,10 @@
48
48
  "write-dir",
49
49
  "write-file",
50
50
  "write-safe",
51
- "yaml"
51
+ "yaml",
52
+ "size",
53
+ "brotli",
54
+ "gzip"
52
55
  ],
53
56
  "homepage": "https://www.visulima.com/docs/package/fs",
54
57
  "bugs": {
@@ -117,6 +120,16 @@
117
120
  "default": "./dist/yaml.mjs"
118
121
  }
119
122
  },
123
+ "./size": {
124
+ "require": {
125
+ "types": "./dist/size.d.cts",
126
+ "default": "./dist/size.cjs"
127
+ },
128
+ "import": {
129
+ "types": "./dist/size.d.mts",
130
+ "default": "./dist/size.mjs"
131
+ }
132
+ },
120
133
  "./package.json": "./package.json"
121
134
  },
122
135
  "main": "dist/index.cjs",
@@ -135,6 +148,9 @@
135
148
  ],
136
149
  "yaml": [
137
150
  "./dist/yaml.d.ts"
151
+ ],
152
+ "size": [
153
+ "./dist/size.d.ts"
138
154
  ]
139
155
  }
140
156
  },