@visulima/fs 3.1.2 → 3.1.4
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/CHANGELOG.md +33 -0
- package/README.md +2328 -492
- package/dist/{packem_shared/LF-bB2qO80j.cjs → eol.cjs} +4 -4
- package/dist/eol.d.cts +7 -0
- package/dist/eol.d.mts +7 -0
- package/dist/eol.d.ts +7 -0
- package/dist/{packem_shared/LF-CU3KsvZC.mjs → eol.mjs} +4 -4
- package/dist/error.cjs +2 -2
- package/dist/error.mjs +2 -2
- package/dist/index.cjs +13 -13
- package/dist/index.d.cts +8 -19
- package/dist/index.d.mts +8 -19
- package/dist/index.d.ts +8 -19
- package/dist/index.mjs +8 -8
- package/dist/packem_shared/{JSONError-gkXvBSar.cjs → JSONError-5-wHnrxX.cjs} +4 -0
- package/dist/packem_shared/{JSONError-BCIIHvzq.mjs → JSONError-CaKt7MhC.mjs} +4 -0
- package/dist/packem_shared/{WalkError-B7_AVs7d.cjs → WalkError-B4-yr8Kk.cjs} +5 -1
- package/dist/packem_shared/{WalkError-H9EuRv7O.mjs → WalkError-DvEBTTaj.mjs} +5 -1
- package/dist/packem_shared/{collect-B615pR8z.mjs → collect-3Paj1Vqw.mjs} +1 -1
- package/dist/packem_shared/{collect-DHldhy_s.cjs → collect-DnfQeSOL.cjs} +1 -1
- package/dist/packem_shared/{collectSync-zahGoTi-.cjs → collectSync-D4vym4QD.cjs} +1 -1
- package/dist/packem_shared/{collectSync-CYuBdXWI.mjs → collectSync-DwJLL8SD.mjs} +1 -1
- package/dist/packem_shared/{emptyDirSync-BoknkGUe.cjs → emptyDirSync-BWA4n6TB.cjs} +3 -3
- package/dist/packem_shared/{emptyDirSync-DTGPXQ3v.mjs → emptyDirSync-DMAaCiC_.mjs} +3 -3
- package/dist/packem_shared/{parseJson-D7XcVuDD.mjs → parseJson-BA7Xrggq.mjs} +1 -1
- package/dist/packem_shared/{parseJson-5geAXtlm.cjs → parseJson-LgPGI5ic.cjs} +1 -1
- package/dist/packem_shared/{readJson-CG6Pm3bL.cjs → readJson-CEBHyuYq.cjs} +1 -1
- package/dist/packem_shared/{readJson-Ddq4aS0W.mjs → readJson-Ce9b06cu.mjs} +1 -1
- package/dist/packem_shared/{readJsonSync-DXVlgWNf.cjs → readJsonSync-B22hej0y.cjs} +1 -1
- package/dist/packem_shared/{readJsonSync-C1IyJccj.mjs → readJsonSync-CkUI9_z5.mjs} +1 -1
- package/dist/packem_shared/{types-Crz-rGlC.d.cts → types-BaMGfHdp.d.cts} +7 -3
- package/dist/packem_shared/{types-Crz-rGlC.d.mts → types-BaMGfHdp.d.mts} +7 -3
- package/dist/packem_shared/{types-Crz-rGlC.d.ts → types-BaMGfHdp.d.ts} +7 -3
- package/dist/packem_shared/{walk-PpNwjtjX.cjs → walk-CI3ygmrw.cjs} +1 -1
- package/dist/packem_shared/{walk-BIh3_ljI.mjs → walk-D7YA43g8.mjs} +1 -1
- package/dist/packem_shared/{walkSync-CFwkbDz9.mjs → walkSync-DLTsnwuJ.mjs} +1 -1
- package/dist/packem_shared/{walkSync-BidUqvMI.cjs → walkSync-oXkmn9ZA.cjs} +1 -1
- package/dist/packem_shared/writeYaml-3XQT2qtb.cjs +29 -0
- package/dist/packem_shared/writeYaml-BSFEuWp2.mjs +27 -0
- package/dist/packem_shared/writeYamlSync-B6VcXXIb.mjs +27 -0
- package/dist/packem_shared/writeYamlSync-BZR3If9v.cjs +29 -0
- package/dist/utils.cjs +2 -2
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.mjs +2 -2
- package/dist/yaml.cjs +2 -2
- package/dist/yaml.d.cts +6 -8
- package/dist/yaml.d.mts +6 -8
- package/dist/yaml.d.ts +6 -8
- package/dist/yaml.mjs +2 -2
- package/package.json +15 -2
- package/dist/packem_shared/writeYaml-C0YnZ1bp.cjs +0 -14
- package/dist/packem_shared/writeYaml-Cuj4H9ut.mjs +0 -12
- package/dist/packem_shared/writeYamlSync-BBNLBbQK.cjs +0 -14
- package/dist/packem_shared/writeYamlSync-cL8f07FV.mjs +0 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readdir, realpath, stat } from 'node:fs/promises';
|
|
2
2
|
import { resolve, join, normalize, basename } from '@visulima/path';
|
|
3
3
|
import { toPath } from '@visulima/path/utils';
|
|
4
|
-
import WalkError from './WalkError-
|
|
4
|
+
import WalkError from './WalkError-DvEBTTaj.mjs';
|
|
5
5
|
import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
|
|
6
6
|
import { g as globToRegExp, w as walkInclude } from './walk-include-CMUSRa86.mjs';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readdirSync, realpathSync, statSync } from 'node:fs';
|
|
2
2
|
import { resolve, join, normalize, basename } from '@visulima/path';
|
|
3
3
|
import { toPath } from '@visulima/path/utils';
|
|
4
|
-
import WalkError from './WalkError-
|
|
4
|
+
import WalkError from './WalkError-DvEBTTaj.mjs';
|
|
5
5
|
import assertValidFileOrDirectoryPath from './assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
|
|
6
6
|
import { g as globToRegExp, w as walkInclude } from './walk-include-CMUSRa86.mjs';
|
|
7
7
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const node_fs = require('node:fs');
|
|
4
4
|
const path = require('@visulima/path');
|
|
5
5
|
const utils = require('@visulima/path/utils');
|
|
6
|
-
const WalkError = require('./WalkError-
|
|
6
|
+
const WalkError = require('./WalkError-B4-yr8Kk.cjs');
|
|
7
7
|
const assertValidFileOrDirectoryPath = require('./assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
|
|
8
8
|
const walkInclude = require('./walk-include-yUdRrF16.cjs');
|
|
9
9
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const yaml = require('yaml');
|
|
4
|
+
const writeFile = require('./writeFile-DgCFRCe5.cjs');
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
async function writeYaml(path, data, replacer, options) {
|
|
9
|
+
let stringifyOptions;
|
|
10
|
+
let effectiveReplacer;
|
|
11
|
+
let space;
|
|
12
|
+
if (typeof replacer === "object" && replacer !== null && !Array.isArray(replacer) && typeof replacer !== "function") {
|
|
13
|
+
stringifyOptions = replacer;
|
|
14
|
+
effectiveReplacer = stringifyOptions.replacer;
|
|
15
|
+
space = stringifyOptions.space;
|
|
16
|
+
} else if (typeof options === "object" && options !== null) {
|
|
17
|
+
stringifyOptions = options;
|
|
18
|
+
effectiveReplacer = replacer;
|
|
19
|
+
space = stringifyOptions.space ?? (typeof options === "number" || typeof options === "string" ? options : void 0);
|
|
20
|
+
} else {
|
|
21
|
+
effectiveReplacer = replacer;
|
|
22
|
+
space = options;
|
|
23
|
+
}
|
|
24
|
+
const content = yaml.stringify(data, effectiveReplacer, space ?? stringifyOptions);
|
|
25
|
+
await writeFile(path, content, stringifyOptions);
|
|
26
|
+
}
|
|
27
|
+
__name(writeYaml, "writeYaml");
|
|
28
|
+
|
|
29
|
+
module.exports = writeYaml;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { stringify } from 'yaml';
|
|
2
|
+
import writeFile from './writeFile-BZ4JBQxc.mjs';
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
async function writeYaml(path, data, replacer, options) {
|
|
7
|
+
let stringifyOptions;
|
|
8
|
+
let effectiveReplacer;
|
|
9
|
+
let space;
|
|
10
|
+
if (typeof replacer === "object" && replacer !== null && !Array.isArray(replacer) && typeof replacer !== "function") {
|
|
11
|
+
stringifyOptions = replacer;
|
|
12
|
+
effectiveReplacer = stringifyOptions.replacer;
|
|
13
|
+
space = stringifyOptions.space;
|
|
14
|
+
} else if (typeof options === "object" && options !== null) {
|
|
15
|
+
stringifyOptions = options;
|
|
16
|
+
effectiveReplacer = replacer;
|
|
17
|
+
space = stringifyOptions.space ?? (typeof options === "number" || typeof options === "string" ? options : void 0);
|
|
18
|
+
} else {
|
|
19
|
+
effectiveReplacer = replacer;
|
|
20
|
+
space = options;
|
|
21
|
+
}
|
|
22
|
+
const content = stringify(data, effectiveReplacer, space ?? stringifyOptions);
|
|
23
|
+
await writeFile(path, content, stringifyOptions);
|
|
24
|
+
}
|
|
25
|
+
__name(writeYaml, "writeYaml");
|
|
26
|
+
|
|
27
|
+
export { writeYaml as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { stringify } from 'yaml';
|
|
2
|
+
import writeFileSync from './writeFileSync-Ctw5pNQH.mjs';
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
function writeYamlSync(path, data, replacer, options) {
|
|
7
|
+
let stringifyOptions;
|
|
8
|
+
let effectiveReplacer;
|
|
9
|
+
let space;
|
|
10
|
+
if (typeof replacer === "object" && replacer !== null && !Array.isArray(replacer) && typeof replacer !== "function") {
|
|
11
|
+
stringifyOptions = replacer;
|
|
12
|
+
effectiveReplacer = stringifyOptions.replacer;
|
|
13
|
+
space = stringifyOptions.space;
|
|
14
|
+
} else if (typeof options === "object" && options !== null) {
|
|
15
|
+
stringifyOptions = options;
|
|
16
|
+
effectiveReplacer = replacer;
|
|
17
|
+
space = stringifyOptions.space ?? (typeof options === "number" || typeof options === "string" ? options : void 0);
|
|
18
|
+
} else {
|
|
19
|
+
effectiveReplacer = replacer;
|
|
20
|
+
space = options;
|
|
21
|
+
}
|
|
22
|
+
const content = stringify(data, effectiveReplacer, space ?? stringifyOptions);
|
|
23
|
+
writeFileSync(path, content, stringifyOptions);
|
|
24
|
+
}
|
|
25
|
+
__name(writeYamlSync, "writeYamlSync");
|
|
26
|
+
|
|
27
|
+
export { writeYamlSync as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const yaml = require('yaml');
|
|
4
|
+
const writeFileSync = require('./writeFileSync-DzXhx1pF.cjs');
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
+
function writeYamlSync(path, data, replacer, options) {
|
|
9
|
+
let stringifyOptions;
|
|
10
|
+
let effectiveReplacer;
|
|
11
|
+
let space;
|
|
12
|
+
if (typeof replacer === "object" && replacer !== null && !Array.isArray(replacer) && typeof replacer !== "function") {
|
|
13
|
+
stringifyOptions = replacer;
|
|
14
|
+
effectiveReplacer = stringifyOptions.replacer;
|
|
15
|
+
space = stringifyOptions.space;
|
|
16
|
+
} else if (typeof options === "object" && options !== null) {
|
|
17
|
+
stringifyOptions = options;
|
|
18
|
+
effectiveReplacer = replacer;
|
|
19
|
+
space = stringifyOptions.space ?? (typeof options === "number" || typeof options === "string" ? options : void 0);
|
|
20
|
+
} else {
|
|
21
|
+
effectiveReplacer = replacer;
|
|
22
|
+
space = options;
|
|
23
|
+
}
|
|
24
|
+
const content = yaml.stringify(data, effectiveReplacer, space ?? stringifyOptions);
|
|
25
|
+
writeFileSync(path, content, stringifyOptions);
|
|
26
|
+
}
|
|
27
|
+
__name(writeYamlSync, "writeYamlSync");
|
|
28
|
+
|
|
29
|
+
module.exports = writeYamlSync;
|
package/dist/utils.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
4
4
|
|
|
5
|
-
const JSONError = require('./packem_shared/JSONError-
|
|
5
|
+
const JSONError = require('./packem_shared/JSONError-5-wHnrxX.cjs');
|
|
6
6
|
const assertValidFileContents = require('./packem_shared/assertValidFileContents-CRVvyM6b.cjs');
|
|
7
7
|
const assertValidFileOrDirectoryPath = require('./packem_shared/assertValidFileOrDirectoryPath-BMbgA-eI.cjs');
|
|
8
|
-
const parseJson = require('./packem_shared/parseJson-
|
|
8
|
+
const parseJson = require('./packem_shared/parseJson-LgPGI5ic.cjs');
|
|
9
9
|
const stripJsonComments = require('./packem_shared/stripJsonComments-eDrcJvBT.cjs');
|
|
10
10
|
const utils = require('@visulima/path/utils');
|
|
11
11
|
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.cjs';
|
|
2
2
|
import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.cjs';
|
|
3
|
-
import {
|
|
3
|
+
import { m as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-BaMGfHdp.cjs';
|
|
4
4
|
export { toPath } from '@visulima/path/utils';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'yaml';
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.mjs';
|
|
2
2
|
import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { m as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-BaMGfHdp.mjs';
|
|
4
4
|
export { toPath } from '@visulima/path/utils';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'yaml';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.js';
|
|
2
2
|
import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.js';
|
|
3
|
-
import {
|
|
3
|
+
import { m as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-BaMGfHdp.js';
|
|
4
4
|
export { toPath } from '@visulima/path/utils';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'yaml';
|
package/dist/utils.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as JSONError } from './packem_shared/JSONError-
|
|
1
|
+
export { default as JSONError } from './packem_shared/JSONError-CaKt7MhC.mjs';
|
|
2
2
|
export { default as assertValidFileContents } from './packem_shared/assertValidFileContents-Ox-ScfeK.mjs';
|
|
3
3
|
export { default as assertValidFileOrDirectoryPath } from './packem_shared/assertValidFileOrDirectoryPath-BWWgA1wj.mjs';
|
|
4
|
-
export { default as parseJson } from './packem_shared/parseJson-
|
|
4
|
+
export { default as parseJson } from './packem_shared/parseJson-BA7Xrggq.mjs';
|
|
5
5
|
export { default as stripJsonComments } from './packem_shared/stripJsonComments-B66nRaTZ.mjs';
|
|
6
6
|
export { toPath } from '@visulima/path/utils';
|
package/dist/yaml.cjs
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
4
4
|
|
|
5
5
|
const readYaml = require('./packem_shared/readYaml-sR4bqUel.cjs');
|
|
6
6
|
const readYamlSync = require('./packem_shared/readYamlSync-C3oOzxiN.cjs');
|
|
7
|
-
const writeYaml = require('./packem_shared/writeYaml-
|
|
8
|
-
const writeYamlSync = require('./packem_shared/writeYamlSync-
|
|
7
|
+
const writeYaml = require('./packem_shared/writeYaml-3XQT2qtb.cjs');
|
|
8
|
+
const writeYamlSync = require('./packem_shared/writeYamlSync-BZR3If9v.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
package/dist/yaml.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
|
|
1
|
+
import { r as ReadYamlOptions, Y as YamlReviver, s as WriteYamlOptions, t as YamlReplacer } from './packem_shared/types-BaMGfHdp.cjs';
|
|
3
2
|
import 'node:fs';
|
|
3
|
+
import 'yaml';
|
|
4
4
|
|
|
5
5
|
declare function readYaml<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
6
6
|
declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
@@ -8,12 +8,10 @@ declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviv
|
|
|
8
8
|
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
9
9
|
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
declare function writeYaml(path: URL | string, data: any, options?:
|
|
13
|
-
declare function writeYaml(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options$1 | number | string): Promise<void>;
|
|
11
|
+
declare function writeYaml(path: URL | string, data: any, options?: WriteYamlOptions): Promise<void>;
|
|
12
|
+
declare function writeYaml(path: URL | string, data: any, replacer?: YamlReplacer, options?: WriteYamlOptions | number | string): Promise<void>;
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
declare function writeYamlSync(path: URL | string, data: any, options?:
|
|
17
|
-
declare function writeYamlSync(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options | number | string): void;
|
|
14
|
+
declare function writeYamlSync(path: URL | string, data: any, options?: WriteYamlOptions): void;
|
|
15
|
+
declare function writeYamlSync(path: URL | string, data: any, replacer?: YamlReplacer, options?: WriteYamlOptions | number | string): void;
|
|
18
16
|
|
|
19
17
|
export { YamlReplacer, readYaml, readYamlSync, writeYaml, writeYamlSync };
|
package/dist/yaml.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
|
|
1
|
+
import { r as ReadYamlOptions, Y as YamlReviver, s as WriteYamlOptions, t as YamlReplacer } from './packem_shared/types-BaMGfHdp.mjs';
|
|
3
2
|
import 'node:fs';
|
|
3
|
+
import 'yaml';
|
|
4
4
|
|
|
5
5
|
declare function readYaml<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
6
6
|
declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
@@ -8,12 +8,10 @@ declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviv
|
|
|
8
8
|
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
9
9
|
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
declare function writeYaml(path: URL | string, data: any, options?:
|
|
13
|
-
declare function writeYaml(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options$1 | number | string): Promise<void>;
|
|
11
|
+
declare function writeYaml(path: URL | string, data: any, options?: WriteYamlOptions): Promise<void>;
|
|
12
|
+
declare function writeYaml(path: URL | string, data: any, replacer?: YamlReplacer, options?: WriteYamlOptions | number | string): Promise<void>;
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
declare function writeYamlSync(path: URL | string, data: any, options?:
|
|
17
|
-
declare function writeYamlSync(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options | number | string): void;
|
|
14
|
+
declare function writeYamlSync(path: URL | string, data: any, options?: WriteYamlOptions): void;
|
|
15
|
+
declare function writeYamlSync(path: URL | string, data: any, replacer?: YamlReplacer, options?: WriteYamlOptions | number | string): void;
|
|
18
16
|
|
|
19
17
|
export { YamlReplacer, readYaml, readYamlSync, writeYaml, writeYamlSync };
|
package/dist/yaml.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
|
|
1
|
+
import { r as ReadYamlOptions, Y as YamlReviver, s as WriteYamlOptions, t as YamlReplacer } from './packem_shared/types-BaMGfHdp.js';
|
|
3
2
|
import 'node:fs';
|
|
3
|
+
import 'yaml';
|
|
4
4
|
|
|
5
5
|
declare function readYaml<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
6
6
|
declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
@@ -8,12 +8,10 @@ declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviv
|
|
|
8
8
|
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
9
9
|
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
declare function writeYaml(path: URL | string, data: any, options?:
|
|
13
|
-
declare function writeYaml(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options$1 | number | string): Promise<void>;
|
|
11
|
+
declare function writeYaml(path: URL | string, data: any, options?: WriteYamlOptions): Promise<void>;
|
|
12
|
+
declare function writeYaml(path: URL | string, data: any, replacer?: YamlReplacer, options?: WriteYamlOptions | number | string): Promise<void>;
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
declare function writeYamlSync(path: URL | string, data: any, options?:
|
|
17
|
-
declare function writeYamlSync(path: URL | string, data: any, replacer?: YamlReplacer, options?: Options | number | string): void;
|
|
14
|
+
declare function writeYamlSync(path: URL | string, data: any, options?: WriteYamlOptions): void;
|
|
15
|
+
declare function writeYamlSync(path: URL | string, data: any, replacer?: YamlReplacer, options?: WriteYamlOptions | number | string): void;
|
|
18
16
|
|
|
19
17
|
export { YamlReplacer, readYaml, readYamlSync, writeYaml, writeYamlSync };
|
package/dist/yaml.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as readYaml } from './packem_shared/readYaml-C5MSs2GE.mjs';
|
|
2
2
|
export { default as readYamlSync } from './packem_shared/readYamlSync-CPjA-DLv.mjs';
|
|
3
|
-
export { default as writeYaml } from './packem_shared/writeYaml-
|
|
4
|
-
export { default as writeYamlSync } from './packem_shared/writeYamlSync-
|
|
3
|
+
export { default as writeYaml } from './packem_shared/writeYaml-BSFEuWp2.mjs';
|
|
4
|
+
export { default as writeYamlSync } from './packem_shared/writeYamlSync-B6VcXXIb.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/fs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"description": "Human friendly file system utilities for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -130,6 +130,16 @@
|
|
|
130
130
|
"default": "./dist/size.mjs"
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
+
"./eol": {
|
|
134
|
+
"require": {
|
|
135
|
+
"types": "./dist/eol.d.cts",
|
|
136
|
+
"default": "./dist/eol.cjs"
|
|
137
|
+
},
|
|
138
|
+
"import": {
|
|
139
|
+
"types": "./dist/eol.d.mts",
|
|
140
|
+
"default": "./dist/eol.mjs"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
133
143
|
"./package.json": "./package.json"
|
|
134
144
|
},
|
|
135
145
|
"main": "dist/index.cjs",
|
|
@@ -151,6 +161,9 @@
|
|
|
151
161
|
],
|
|
152
162
|
"size": [
|
|
153
163
|
"./dist/size.d.ts"
|
|
164
|
+
],
|
|
165
|
+
"eol": [
|
|
166
|
+
"./dist/eol.d.ts"
|
|
154
167
|
]
|
|
155
168
|
}
|
|
156
169
|
},
|
|
@@ -161,7 +174,7 @@
|
|
|
161
174
|
"LICENSE.md"
|
|
162
175
|
],
|
|
163
176
|
"dependencies": {
|
|
164
|
-
"@visulima/path": "1.3.
|
|
177
|
+
"@visulima/path": "1.3.6"
|
|
165
178
|
},
|
|
166
179
|
"peerDependencies": {
|
|
167
180
|
"yaml": "^2.7.0"
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const yaml = require('yaml');
|
|
4
|
-
const writeFile = require('./writeFile-DgCFRCe5.cjs');
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
async function writeYaml(path, data, replacer, options) {
|
|
9
|
-
const content = typeof replacer === "function" || Array.isArray(replacer) ? yaml.stringify(data, replacer, options) : yaml.stringify(data, replacer);
|
|
10
|
-
await writeFile(path, content);
|
|
11
|
-
}
|
|
12
|
-
__name(writeYaml, "writeYaml");
|
|
13
|
-
|
|
14
|
-
module.exports = writeYaml;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { stringify } from 'yaml';
|
|
2
|
-
import writeFile from './writeFile-BZ4JBQxc.mjs';
|
|
3
|
-
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
async function writeYaml(path, data, replacer, options) {
|
|
7
|
-
const content = typeof replacer === "function" || Array.isArray(replacer) ? stringify(data, replacer, options) : stringify(data, replacer);
|
|
8
|
-
await writeFile(path, content);
|
|
9
|
-
}
|
|
10
|
-
__name(writeYaml, "writeYaml");
|
|
11
|
-
|
|
12
|
-
export { writeYaml as default };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const yaml = require('yaml');
|
|
4
|
-
const writeFileSync = require('./writeFileSync-DzXhx1pF.cjs');
|
|
5
|
-
|
|
6
|
-
var __defProp = Object.defineProperty;
|
|
7
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
|
-
function writeYamlSync(path, data, replacer, options) {
|
|
9
|
-
const content = typeof replacer === "function" || Array.isArray(replacer) ? yaml.stringify(data, replacer, options) : yaml.stringify(data, replacer);
|
|
10
|
-
writeFileSync(path, content);
|
|
11
|
-
}
|
|
12
|
-
__name(writeYamlSync, "writeYamlSync");
|
|
13
|
-
|
|
14
|
-
module.exports = writeYamlSync;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { stringify } from 'yaml';
|
|
2
|
-
import writeFileSync from './writeFileSync-Ctw5pNQH.mjs';
|
|
3
|
-
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
-
function writeYamlSync(path, data, replacer, options) {
|
|
7
|
-
const content = typeof replacer === "function" || Array.isArray(replacer) ? stringify(data, replacer, options) : stringify(data, replacer);
|
|
8
|
-
writeFileSync(path, content);
|
|
9
|
-
}
|
|
10
|
-
__name(writeYamlSync, "writeYamlSync");
|
|
11
|
-
|
|
12
|
-
export { writeYamlSync as default };
|