@visulima/fs 3.1.9 → 4.0.0
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 +26 -0
- package/LICENSE.md +51 -122
- package/README.md +929 -982
- package/dist/eol.js +3 -0
- package/dist/error.js +1 -0
- package/dist/index.d.ts +51 -4
- package/dist/index.js +1 -0
- package/dist/packem_shared/F_OK-CAwY1qU7.js +1 -0
- package/dist/packem_shared/JSONError-D7h6PNWc.js +4 -0
- package/dist/packem_shared/collect-DO31RsLs.js +1 -0
- package/dist/packem_shared/collectSync-Cy7ULmjZ.js +1 -0
- package/dist/packem_shared/emptyDir-zBLHyPsJ.js +1 -0
- package/dist/packem_shared/emptyDirSync-DZ8nTo6g.js +1 -0
- package/dist/packem_shared/ensureDir-CwcwvbZ0.js +1 -0
- package/dist/packem_shared/ensureDirSync-DsFhH5oQ.js +1 -0
- package/dist/packem_shared/ensureFile-DwcEQVDX.js +1 -0
- package/dist/packem_shared/ensureFileSync-KnrH51Ox.js +1 -0
- package/dist/packem_shared/ensureLink-5rjQGEBb.js +1 -0
- package/dist/packem_shared/ensureLinkSync-CYXpscf2.js +1 -0
- package/dist/packem_shared/ensureSymlink-BMLtwpf2.js +1 -0
- package/dist/packem_shared/ensureSymlinkSync-CyAnZg8r.js +1 -0
- package/dist/packem_shared/findUp-Di7Az07S.js +1 -0
- package/dist/packem_shared/findUpSync-iV97v14Q.js +1 -0
- package/dist/packem_shared/index-CYIVJA0W.js +1 -0
- package/dist/packem_shared/isAccessible-CDFxsAAo.js +1 -0
- package/dist/packem_shared/isAccessibleSync-5nzZWgin.js +1 -0
- package/dist/packem_shared/isFsCaseSensitive-Drl8fHLV.js +1 -0
- package/dist/packem_shared/move-Bz4gSIjp.js +1 -0
- package/dist/packem_shared/{parseJson-BEnYqLIc.mjs → parseJson-Cj4v3qzl.js} +1 -1
- package/dist/packem_shared/readFile-CbxFM_zp.js +1 -0
- package/dist/packem_shared/readFileSync-B9iv2Sb8.js +1 -0
- package/dist/packem_shared/readJson-BgC3msx-.js +1 -0
- package/dist/packem_shared/readJsonSync-DHO1vjAG.js +1 -0
- package/dist/packem_shared/readYaml-C8QlsEFe.js +1 -0
- package/dist/packem_shared/readYamlSync-BIuoBHUt.js +1 -0
- package/dist/packem_shared/remove-BUqZUj1W.js +1 -0
- package/dist/packem_shared/removeSync-BbT4vmDi.js +1 -0
- package/dist/packem_shared/stripJsonComments-DbMjL4qv.js +1 -0
- package/dist/packem_shared/{types-XsSUZ9oS.d.mts → types-T308NKwz.d.ts} +2 -1
- package/dist/packem_shared/walk-ZrZngpc4.js +1 -0
- package/dist/packem_shared/walk-include-DCiVAwMP.js +1 -0
- package/dist/packem_shared/walkSync-BQa4NKSG.js +1 -0
- package/dist/packem_shared/writeFile-D5OYEMHu.js +1 -0
- package/dist/packem_shared/writeFileSync-CO4ySqUn.js +1 -0
- package/dist/packem_shared/writeJson-DfmgiY_s.js +4 -0
- package/dist/packem_shared/writeJsonSync-Ck1pmmj_.js +4 -0
- package/dist/packem_shared/writeYaml-a_cglLPV.js +1 -0
- package/dist/packem_shared/writeYamlSync-vSQIN6OR.js +1 -0
- package/dist/size.js +1 -0
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -0
- package/dist/yaml.d.ts +1 -1
- package/dist/yaml.js +1 -0
- package/package.json +16 -76
- package/dist/eol.cjs +0 -3
- package/dist/eol.d.cts +0 -7
- package/dist/eol.d.mts +0 -7
- package/dist/eol.mjs +0 -3
- package/dist/error.cjs +0 -1
- package/dist/error.d.cts +0 -50
- package/dist/error.d.mts +0 -50
- package/dist/error.mjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.cts +0 -89
- package/dist/index.d.mts +0 -89
- package/dist/index.mjs +0 -1
- package/dist/packem_shared/AlreadyExistsError-GC2XUgzJ.cjs +0 -1
- package/dist/packem_shared/DirectoryError-aGtmQVph.cjs +0 -1
- package/dist/packem_shared/F_OK-7T91O6Oz.cjs +0 -1
- package/dist/packem_shared/F_OK-B71i3mUa.mjs +0 -1
- package/dist/packem_shared/JSONError-CVkb3xZ3.mjs +0 -4
- package/dist/packem_shared/JSONError-CWuiGmNc.cjs +0 -4
- package/dist/packem_shared/NotEmptyError-BWGfec5K.cjs +0 -1
- package/dist/packem_shared/NotFoundError-Diij7oqe.cjs +0 -1
- package/dist/packem_shared/PermissionError-Ck1Es7al.cjs +0 -1
- package/dist/packem_shared/WalkError-gKgp0TWD.cjs +0 -1
- package/dist/packem_shared/assertValidFileContents-CrbDz09d.cjs +0 -1
- package/dist/packem_shared/assertValidFileOrDirectoryPath-HOUs73Jk.cjs +0 -1
- package/dist/packem_shared/collect-Bl2Oc1qs.cjs +0 -1
- package/dist/packem_shared/collect-CyYPQFMs.mjs +0 -1
- package/dist/packem_shared/collectSync-BHjyXWq4.cjs +0 -1
- package/dist/packem_shared/collectSync-CD9cXw2g.mjs +0 -1
- package/dist/packem_shared/emptyDir-BdjO-6Gu.mjs +0 -1
- package/dist/packem_shared/emptyDir-DGRw4yE9.cjs +0 -1
- package/dist/packem_shared/emptyDirSync-C1vsMEp-.mjs +0 -1
- package/dist/packem_shared/emptyDirSync-DzjDZxOx.cjs +0 -1
- package/dist/packem_shared/ensureDir-BuIFF_6B.mjs +0 -1
- package/dist/packem_shared/ensureDir-DtQzyA70.cjs +0 -1
- package/dist/packem_shared/ensureDirSync-BuPHxdP4.mjs +0 -1
- package/dist/packem_shared/ensureDirSync-C8hIoS3o.cjs +0 -1
- package/dist/packem_shared/ensureFile-DcAODM6a.mjs +0 -1
- package/dist/packem_shared/ensureFile-wR8zBfXh.cjs +0 -1
- package/dist/packem_shared/ensureFileSync-BI1fIdNf.cjs +0 -1
- package/dist/packem_shared/ensureFileSync-CzPN6ucX.mjs +0 -1
- package/dist/packem_shared/ensureLink-BaZLXxgx.mjs +0 -1
- package/dist/packem_shared/ensureLink-DCPuU0Za.cjs +0 -1
- package/dist/packem_shared/ensureLinkSync-9C2JL-Sl.mjs +0 -1
- package/dist/packem_shared/ensureLinkSync-CuRZmQlV.cjs +0 -1
- package/dist/packem_shared/ensureSymlink-BH6wbylb.mjs +0 -1
- package/dist/packem_shared/ensureSymlink-J83jhdfA.cjs +0 -1
- package/dist/packem_shared/ensureSymlinkSync-CZSPodAm.mjs +0 -1
- package/dist/packem_shared/ensureSymlinkSync-VNtMTaV8.cjs +0 -1
- package/dist/packem_shared/findUp-C5aWsLuD.cjs +0 -1
- package/dist/packem_shared/findUp-CMGMYNty.mjs +0 -1
- package/dist/packem_shared/findUpSync-QP_ZEsJN.mjs +0 -1
- package/dist/packem_shared/findUpSync-U1lTgv4y.cjs +0 -1
- package/dist/packem_shared/get-file-info-type-DDbpRlDl.cjs +0 -1
- package/dist/packem_shared/index-BSjF-5vj.mjs +0 -1
- package/dist/packem_shared/index-DPla58ce.cjs +0 -1
- package/dist/packem_shared/is-stats-identical-Bti7K05l.cjs +0 -1
- package/dist/packem_shared/isAccessible-BQZd1_xn.cjs +0 -1
- package/dist/packem_shared/isAccessible-CL4eE5VL.mjs +0 -1
- package/dist/packem_shared/isAccessibleSync-BP5N8k_-.cjs +0 -1
- package/dist/packem_shared/isAccessibleSync-_HU_ppdG.mjs +0 -1
- package/dist/packem_shared/json-error-ZPgZIXcg.d.cts +0 -11
- package/dist/packem_shared/json-error-ZPgZIXcg.d.mts +0 -11
- package/dist/packem_shared/move--o4NZLpD.mjs +0 -1
- package/dist/packem_shared/move-DwG6APiG.cjs +0 -1
- package/dist/packem_shared/observable-like.d-BlD8q22s.d.cts +0 -40
- package/dist/packem_shared/observable-like.d-BlD8q22s.d.mts +0 -40
- package/dist/packem_shared/observable-like.d-BlD8q22s.d.ts +0 -40
- package/dist/packem_shared/parseJson-CQlz8sBs.cjs +0 -6
- package/dist/packem_shared/readFile-BvefDyr_.cjs +0 -1
- package/dist/packem_shared/readFile-Cix_ijtX.mjs +0 -1
- package/dist/packem_shared/readFileSync-B0O-8BH0.mjs +0 -1
- package/dist/packem_shared/readFileSync-Ct8Ql4Vs.cjs +0 -1
- package/dist/packem_shared/readJson-CiDugsbt.mjs +0 -1
- package/dist/packem_shared/readJson-DtH0Cn36.cjs +0 -1
- package/dist/packem_shared/readJsonSync-B47Fk6n-.mjs +0 -1
- package/dist/packem_shared/readJsonSync-_SoI70cG.cjs +0 -1
- package/dist/packem_shared/readYaml-BOYTR5D1.mjs +0 -1
- package/dist/packem_shared/readYaml-BzMFDsYe.cjs +0 -1
- package/dist/packem_shared/readYamlSync-BbK0khJu.cjs +0 -1
- package/dist/packem_shared/readYamlSync-md9g88k7.mjs +0 -1
- package/dist/packem_shared/remove-CtnFqEpd.mjs +0 -1
- package/dist/packem_shared/remove-DPCf2Qdb.cjs +0 -1
- package/dist/packem_shared/removeSync-Cyriz7r8.cjs +0 -1
- package/dist/packem_shared/removeSync-DI-IjqVp.mjs +0 -1
- package/dist/packem_shared/resolve-symlink-target-zilkQ_AU.cjs +0 -1
- package/dist/packem_shared/stripJsonComments-Cp5SNAB7.mjs +0 -1
- package/dist/packem_shared/stripJsonComments-CvZSDnYT.cjs +0 -1
- package/dist/packem_shared/to-uint-8-array-2-3EvGd7.cjs +0 -1
- package/dist/packem_shared/types-XsSUZ9oS.d.cts +0 -89
- package/dist/packem_shared/types-XsSUZ9oS.d.ts +0 -89
- package/dist/packem_shared/walk-BZTXbT87.mjs +0 -1
- package/dist/packem_shared/walk-DyN_HVFW.cjs +0 -1
- package/dist/packem_shared/walk-include-C9pVST87.mjs +0 -1
- package/dist/packem_shared/walk-include-DkK-WJl4.cjs +0 -1
- package/dist/packem_shared/walkSync-BHlEzV_m.mjs +0 -1
- package/dist/packem_shared/walkSync-Bqi7L2yG.cjs +0 -1
- package/dist/packem_shared/writeFile-COOAkvOE.mjs +0 -1
- package/dist/packem_shared/writeFile-CjgQEfur.cjs +0 -1
- package/dist/packem_shared/writeFileSync-CQuRHo9n.cjs +0 -1
- package/dist/packem_shared/writeFileSync-rhu-y_zx.mjs +0 -1
- package/dist/packem_shared/writeJson-BYT4WInm.mjs +0 -4
- package/dist/packem_shared/writeJson-CJIciZ_Q.cjs +0 -4
- package/dist/packem_shared/writeJsonSync-BIsrhRbV.cjs +0 -4
- package/dist/packem_shared/writeJsonSync-CLlXOFDm.mjs +0 -4
- package/dist/packem_shared/writeYaml-CjzVd0K-.mjs +0 -1
- package/dist/packem_shared/writeYaml-VmX1VKhN.cjs +0 -1
- package/dist/packem_shared/writeYamlSync-D9A9Ixe1.mjs +0 -1
- package/dist/packem_shared/writeYamlSync-DYsM6XBi.cjs +0 -1
- package/dist/size.cjs +0 -1
- package/dist/size.d.cts +0 -12
- package/dist/size.d.mts +0 -12
- package/dist/size.mjs +0 -1
- package/dist/utils.cjs +0 -1
- package/dist/utils.d.cts +0 -19
- package/dist/utils.d.mts +0 -19
- package/dist/utils.mjs +0 -1
- package/dist/yaml.cjs +0 -1
- package/dist/yaml.d.cts +0 -17
- package/dist/yaml.d.mts +0 -17
- package/dist/yaml.mjs +0 -1
- /package/dist/packem_shared/{AlreadyExistsError-CEu6_Tjb.mjs → AlreadyExistsError-CEu6_Tjb.js} +0 -0
- /package/dist/packem_shared/{DirectoryError-ddlbUV8C.mjs → DirectoryError-ddlbUV8C.js} +0 -0
- /package/dist/packem_shared/{NotEmptyError-DMh1o7UL.mjs → NotEmptyError-DMh1o7UL.js} +0 -0
- /package/dist/packem_shared/{NotFoundError-BPiW0icm.mjs → NotFoundError-BPiW0icm.js} +0 -0
- /package/dist/packem_shared/{PermissionError-B1Emi5a9.mjs → PermissionError-B1Emi5a9.js} +0 -0
- /package/dist/packem_shared/{WalkError-BsngoIKJ.mjs → WalkError-BsngoIKJ.js} +0 -0
- /package/dist/packem_shared/{assertValidFileContents-BZFnXa7K.mjs → assertValidFileContents-BZFnXa7K.js} +0 -0
- /package/dist/packem_shared/{assertValidFileOrDirectoryPath-DgPIPmZT.mjs → assertValidFileOrDirectoryPath-DgPIPmZT.js} +0 -0
- /package/dist/packem_shared/{get-file-info-type-CaWGXRjY.mjs → get-file-info-type-CaWGXRjY.js} +0 -0
- /package/dist/packem_shared/{is-stats-identical-CohsLtWy.mjs → is-stats-identical-CohsLtWy.js} +0 -0
- /package/dist/packem_shared/{resolve-symlink-target-BofZSDIc.mjs → resolve-symlink-target-BofZSDIc.js} +0 -0
- /package/dist/packem_shared/{to-uint-8-array-DwgaTasY.mjs → to-uint-8-array-DwgaTasY.js} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Matches a JSON object.
|
|
3
|
-
|
|
4
|
-
This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
|
|
5
|
-
|
|
6
|
-
@category JSON
|
|
7
|
-
*/
|
|
8
|
-
type JsonObject = {[Key in string]: JsonValue} & {[Key in string]?: JsonValue | undefined};
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
Matches a JSON array.
|
|
12
|
-
|
|
13
|
-
@category JSON
|
|
14
|
-
*/
|
|
15
|
-
type JsonArray = JsonValue[] | readonly JsonValue[];
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
Matches any valid JSON primitive value.
|
|
19
|
-
|
|
20
|
-
@category JSON
|
|
21
|
-
*/
|
|
22
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
Matches any valid JSON value.
|
|
26
|
-
|
|
27
|
-
@see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
|
|
28
|
-
|
|
29
|
-
@category JSON
|
|
30
|
-
*/
|
|
31
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
32
|
-
|
|
33
|
-
declare global {
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
35
|
-
interface SymbolConstructor {
|
|
36
|
-
readonly observable: symbol;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type { JsonValue as J };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
Matches a JSON object.
|
|
3
|
-
|
|
4
|
-
This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
|
|
5
|
-
|
|
6
|
-
@category JSON
|
|
7
|
-
*/
|
|
8
|
-
type JsonObject = {[Key in string]: JsonValue} & {[Key in string]?: JsonValue | undefined};
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
Matches a JSON array.
|
|
12
|
-
|
|
13
|
-
@category JSON
|
|
14
|
-
*/
|
|
15
|
-
type JsonArray = JsonValue[] | readonly JsonValue[];
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
Matches any valid JSON primitive value.
|
|
19
|
-
|
|
20
|
-
@category JSON
|
|
21
|
-
*/
|
|
22
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
Matches any valid JSON value.
|
|
26
|
-
|
|
27
|
-
@see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
|
|
28
|
-
|
|
29
|
-
@category JSON
|
|
30
|
-
*/
|
|
31
|
-
type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
32
|
-
|
|
33
|
-
declare global {
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
35
|
-
interface SymbolConstructor {
|
|
36
|
-
readonly observable: symbol;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type { JsonValue as J };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";var W=Object.defineProperty;var y=(e,t)=>W(e,"name",{value:t,configurable:!0});const F=require("./JSONError-CWuiGmNc.cjs");var J=Object.defineProperty,M=y((e,t)=>J(e,"name",{value:t,configurable:!0}),"A"),E=Object.defineProperty,j=M((e,t)=>E(e,"name",{value:t,configurable:!0}),"v"),q=Object.defineProperty,B=j((e,t)=>q(e,"name",{value:t,configurable:!0}),"r$1");const G=B(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
-
`),"normalizeLF"),I=globalThis.process||Object.create(null),P={versions:{}},k=new Proxy(I,{get(e,t){if(t in e)return e[t];if(t in P)return P[t]}});var U=Object.defineProperty,_=j((e,t)=>U(e,"name",{value:t,configurable:!0}),"b");const z=_((e,t,o,r)=>{const n={column:0,line:-1,...e.start},i={...n,...e.end},l=n.line,s=n.column,m=i.line,g=i.column;let p=Math.max(l-(o+1),0),b=Math.min(t.length,m+r);l===-1&&(p=0),m===-1&&(b=t.length);const d=m-l,c={};if(d)for(let a=0;a<=d;a++){const u=a+l;if(!s)c[u]=!0;else if(a===0){const f=t[u-1]?.length;c[u]=[s,(f??0)-s+1]}else if(a===d)c[u]=[0,g];else{const f=t[u-a]?.length;c[u]=[0,f]}}else s===g?c[l]=s?[s,0]:!0:c[l]=[s,(g??0)-(s??0)];return{end:b,markerLines:c,start:p}},"getMarkerLines");var D=Object.defineProperty,$=j((e,t)=>D(e,"name",{value:t,configurable:!0}),"o");const H=k.platform==="win32"&&!k.env?.WT_SESSION?">":"❯",K=$((e,t,o)=>{const r={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...o,color:{gutter:$(a=>a,"gutter"),marker:$(a=>a,"marker"),message:$(a=>a,"message"),...o?.color}},n=t.start&&typeof t.start.column=="number";let i=G(e).split(`
|
|
3
|
-
`);typeof r?.tabWidth=="number"&&(i=i.map(a=>a.replaceAll(" "," ".repeat(r.tabWidth))));const{end:l,markerLines:s,start:m}=z(t,i,r.linesAbove,r.linesBelow),g=String(l).length,{gutter:p,marker:b,message:d}=r.color;let c=i.slice(m,l).map((a,u)=>{const f=m+1+u,v=s[f],N=` ${f}`.slice(-g),L=!s[f+1],x=` ${N}${r.showGutter?" |":""}`;if(v){let A="";if(Array.isArray(v)){const C=a.replaceAll(/[^\t]/g," ").slice(0,Math.max(v[0]-1,0)),T=v[1]||1;A=[`
|
|
4
|
-
`,r.prefix+p(x.replaceAll(/\d/g," "))," ",C,b("^").repeat(T)].join(""),L&&r.message&&(A+=` ${d(r.message)}`)}return[r.prefix+b(H),p(x),a.length>0?` ${a}`:"",A].join("")}return`${r.prefix} ${p(x)}${a.length>0?` ${a}`:""}`}).join(`
|
|
5
|
-
`);return r.message&&!n&&(c=`${r.prefix+" ".repeat(g+1)+r.message}
|
|
6
|
-
${c}`),c},"codeFrame");var Q=Object.defineProperty,R=y((e,t)=>Q(e,"name",{value:t,configurable:!0}),"s$1"),V=Object.defineProperty,X=R((e,t)=>V(e,"name",{value:t,configurable:!0}),"o"),Y=Object.defineProperty,O=X((e,t)=>Y(e,"name",{value:t,configurable:!0}),"l");const S=O((e,t)=>{let o=0,r=t.length-2;for(;o<r;){const n=o+(r-o>>1);if(e<t[n])r=n-1;else if(e>=t[n+1])o=n+1;else{o=n;break}}return o},"binarySearch"),Z=O(e=>e.split(/\n|\r(?!\n)/).reduce((t,o)=>(t.push(t.at(-1)+o.length+1),t),[0]),"getLineStartIndexes"),ee=O((e,t,o)=>{const r=o?.skipChecks??!1;if(!r&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!r&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const i=Z(e),l=S(t,i);return{column:t-i[l]+1,line:l+1}}const n=S(t,e);return{column:t-e[n]+1,line:n+1}},"indexToLineColumn");var te=Object.defineProperty,h=y((e,t)=>te(e,"name",{value:t,configurable:!0}),"s");const re=h(e=>`\\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),ne=h((e,t,o)=>K(e,{start:t},{tabWidth:!1,...o}),"generateCodeFrame"),oe=h((e,t)=>{const o=/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))?$/.exec(t);if(!o)return;let{column:r,index:n,line:i}=o.groups;return i&&r?{column:Number(r),line:Number(i)}:(n=Number(n),n===e.length&&(n=e.length-1),ee(e,n))},"getErrorLocation"),ae=h(e=>e.replace(/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,(t,o,r)=>`"${r}"(${re(r)})`),"addCodePointToUnexpectedToken");function w(e,t,o,r){typeof t=="string"&&(typeof o=="object"&&(r=o),o=t,t=void 0);let n;try{return JSON.parse(e,t)}catch(s){n=s.message}let i;e?(i=oe(e,n),n=ae(n)):n+=" while parsing empty string";const l=new F(n);throw l.fileName=o,i&&(l.codeFrame=ne(e,i,r)),l}y(w,"J");h(w,"parseJson");module.exports=w;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var s=(e,r)=>h(e,"name",{value:r,configurable:!0});const g=require("node:fs/promises"),l=require("node:zlib"),p=require("@visulima/path/utils"),q=require("./F_OK-7T91O6Oz.cjs"),m=require("./PermissionError-Ck1Es7al.cjs"),c=require("./isAccessible-BQZd1_xn.cjs"),P=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var y=Object.defineProperty,u=s((e,r)=>y(e,"name",{value:r,configurable:!0}),"n");const F={brotli:l.brotliDecompress,gzip:l.unzip,none:u((e,r)=>{r(null,e)},"none")},O=u(async(e,r)=>{if(P(e),e=p.toPath(e),!await c(e))throw new m(`unable to read the non-accessible file: ${e}`);if(!await c(e,q.R_OK))throw new Error(`Unable to read the non-readable file: ${e}`);const{buffer:d,compression:b,encoding:n,flag:t}=r??{};return await g.readFile(e,t?{encoding:n,flag:t}:{encoding:n}).then(async i=>await new Promise((f,w)=>{F[b??"none"](i,(o,a)=>{o?w(o):f(d?a:a.toString())})})).catch(i=>{throw i})},"readFile");module.exports=O;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var m=(o,r)=>w(o,"name",{value:r,configurable:!0});import{readFile as b}from"node:fs/promises";import{unzip as u,brotliDecompress as g}from"node:zlib";import{toPath as h}from"@visulima/path/utils";import{R_OK as P}from"./F_OK-B71i3mUa.mjs";import v from"./PermissionError-B1Emi5a9.mjs";import f from"./isAccessible-CL4eE5VL.mjs";import y from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var $=Object.defineProperty,l=m((o,r)=>$(o,"name",{value:r,configurable:!0}),"n");const z={brotli:g,gzip:u,none:l((o,r)=>{r(null,o)},"none")},S=l(async(o,r)=>{if(y(o),o=h(o),!await f(o))throw new v(`unable to read the non-accessible file: ${o}`);if(!await f(o,P))throw new Error(`Unable to read the non-readable file: ${o}`);const{buffer:c,compression:p,encoding:e,flag:t}=r??{};return await b(o,t?{encoding:e,flag:t}:{encoding:e}).then(async n=>await new Promise((s,d)=>{z[p??"none"](n,(i,a)=>{i?d(i):s(c?a:a.toString())})})).catch(n=>{throw n})},"readFile");export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var t=(o,r)=>s(o,"name",{value:r,configurable:!0});import{readFileSync as d}from"node:fs";import{unzipSync as g,brotliDecompressSync as b}from"node:zlib";import{toPath as u}from"@visulima/path/utils";import{R_OK as y}from"./F_OK-B71i3mUa.mjs";import a from"./PermissionError-B1Emi5a9.mjs";import f from"./isAccessibleSync-_HU_ppdG.mjs";import S from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var h=Object.defineProperty,m=t((o,r)=>h(o,"name",{value:r,configurable:!0}),"n");const v={brotli:b,gzip:g,none:m(o=>o,"none")},D=m((o,r)=>{if(S(o),o=u(o),!f(o))throw new a(`unable to read the non-accessible file: ${o}`);if(!f(o,y))throw new a(`invalid access to read file at: ${o}`);const{buffer:c,compression:l,encoding:n,flag:e}=r??{},p=d(o,e?{encoding:n,flag:e}:{encoding:n}),i=v[l??"none"](p);return c?i:i.toString()},"readFileSync");export{D as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var t=(e,r)=>b(e,"name",{value:r,configurable:!0});const g=require("node:fs"),c=require("node:zlib"),q=require("@visulima/path/utils"),y=require("./F_OK-7T91O6Oz.cjs"),s=require("./PermissionError-Ck1Es7al.cjs"),a=require("./isAccessibleSync-BP5N8k_-.cjs"),p=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var S=Object.defineProperty,l=t((e,r)=>S(e,"name",{value:r,configurable:!0}),"n");const h={brotli:c.brotliDecompressSync,gzip:c.unzipSync,none:l(e=>e,"none")},m=l((e,r)=>{if(p(e),e=q.toPath(e),!a(e))throw new s(`unable to read the non-accessible file: ${e}`);if(!a(e,y.R_OK))throw new s(`invalid access to read file at: ${e}`);const{buffer:u,compression:d,encoding:i,flag:n}=r??{},f=g.readFileSync(e,n?{encoding:i,flag:n}:{encoding:i}),o=h[d??"none"](f);return u?o:o.toString()},"readFileSync");module.exports=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,o)=>i(e,"name",{value:o,configurable:!0});import{toPath as d}from"@visulima/path/utils";import u from"./parseJson-BEnYqLIc.mjs";import m from"./readFile-Cix_ijtX.mjs";var p=Object.defineProperty,s=t((e,o)=>p(e,"name",{value:o,configurable:!0}),"i");async function l(e,o,n){typeof o=="object"&&(n=o,o=void 0);const c=await m(e,{buffer:!0,encoding:void 0});let r=new TextDecoder().decode(c);const{beforeParse:a,color:f}=n??{};return typeof a=="function"&&(r=a(r)),u(r,o,d(e),{color:f})}t(l,"c");s(l,"readJson");export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var t=(r,e)=>u(r,"name",{value:e,configurable:!0});const d=require("@visulima/path/utils"),f=require("./parseJson-CQlz8sBs.cjs"),l=require("./readFile-BvefDyr_.cjs");var b=Object.defineProperty,p=t((r,e)=>b(r,"name",{value:e,configurable:!0}),"i");async function i(r,e,n){typeof e=="object"&&(n=e,e=void 0);const a=await l(r,{buffer:!0,encoding:void 0});let o=new TextDecoder().decode(a);const{beforeParse:c,color:s}=n??{};return typeof c=="function"&&(o=c(o)),f(o,e,d.toPath(r),{color:s})}t(i,"c");p(i,"readJson");module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,o)=>i(e,"name",{value:o,configurable:!0});import{toPath as d}from"@visulima/path/utils";import u from"./parseJson-BEnYqLIc.mjs";import m from"./readFileSync-B0O-8BH0.mjs";var p=Object.defineProperty,l=t((e,o)=>p(e,"name",{value:o,configurable:!0}),"r");function s(e,o,c){typeof o=="object"&&(c=o,o=void 0);const f=m(e,{buffer:!0,encoding:void 0});let r=new TextDecoder().decode(f);const{beforeParse:n,color:a}=c??{};return typeof n=="function"&&(r=n(r)),u(r,o,d(e),{color:a})}t(s,"c");l(s,"readJsonSync");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var t=(r,e)=>a(r,"name",{value:e,configurable:!0});const d=require("@visulima/path/utils"),f=require("./parseJson-CQlz8sBs.cjs"),l=require("./readFileSync-Ct8Ql4Vs.cjs");var b=Object.defineProperty,p=t((r,e)=>b(r,"name",{value:e,configurable:!0}),"r");function i(r,e,c){typeof e=="object"&&(c=e,e=void 0);const u=l(r,{buffer:!0,encoding:void 0});let o=new TextDecoder().decode(u);const{beforeParse:n,color:s}=c??{};return typeof n=="function"&&(o=n(o)),f(o,e,d.toPath(r),{color:s})}t(i,"c");p(i,"readJsonSync");module.exports=i;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var o=(r,e)=>p(r,"name",{value:e,configurable:!0});import{parse as n}from"yaml";import s from"./readFile-Cix_ijtX.mjs";var l=Object.defineProperty,d=o((r,e)=>l(r,"name",{value:e,configurable:!0}),"e");async function g(r,e,t){const{buffer:i,compression:c,encoding:u="utf8",flag:m,...a}=t??{},f=await s(r,{buffer:i,compression:c,encoding:u,flag:m});return typeof e=="function"?n(f,e,a):n(f,a)}o(g,"d");d(g,"readYaml");export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var a=(r,e)=>p(r,"name",{value:e,configurable:!0});const i=require("yaml"),d=require("./readFile-BvefDyr_.cjs");var m=Object.defineProperty,g=a((r,e)=>m(r,"name",{value:e,configurable:!0}),"e");async function o(r,e,s){const{buffer:c,compression:f,encoding:u="utf8",flag:l,...n}=s??{},t=await d(r,{buffer:c,compression:f,encoding:u,flag:l});return typeof e=="function"?i.parse(t,e,n):i.parse(t,n)}a(o,"d");g(o,"readYaml");module.exports=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var n=(r,e)=>p(r,"name",{value:e,configurable:!0});const a=require("yaml"),d=require("./readFileSync-Ct8Ql4Vs.cjs");var m=Object.defineProperty,g=n((r,e)=>m(r,"name",{value:e,configurable:!0}),"i");function c(r,e,i){const{buffer:f,compression:s,encoding:u="utf8",flag:l,...o}=i??{},t=d(r,{buffer:f,compression:s,encoding:u,flag:l});return typeof e=="function"?a.parse(t,e,o):a.parse(t,o)}n(c,"d");g(c,"readYamlSync");module.exports=c;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var o=(r,e)=>p(r,"name",{value:e,configurable:!0});import{parse as t}from"yaml";import s from"./readFileSync-B0O-8BH0.mjs";var l=Object.defineProperty,d=o((r,e)=>l(r,"name",{value:e,configurable:!0}),"i");function g(r,e,a){const{buffer:i,compression:c,encoding:u="utf8",flag:m,...f}=a??{},n=s(r,{buffer:i,compression:c,encoding:u,flag:m});return typeof e=="function"?t(n,e,f):t(n,f)}o(g,"d");d(g,"readYamlSync");export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});import{unlink as i,rm as c}from"node:fs/promises";import m from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var o=Object.defineProperty,u=t((e,r)=>o(e,"name",{value:r,configurable:!0}),"t");const f=u(async(e,r={})=>{m(e);try{await i(e)}catch{}try{await c(e,{force:!0,maxRetries:r?.maxRetries,recursive:!0,retryDelay:r?.retryDelay})}catch{}},"remove");export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var i=Object.defineProperty;var t=(e,r)=>i(e,"name",{value:r,configurable:!0});const a=require("node:fs/promises"),c=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var s=Object.defineProperty,u=t((e,r)=>s(e,"name",{value:r,configurable:!0}),"t");const o=u(async(e,r={})=>{c(e);try{await a.unlink(e)}catch{}try{await a.rm(e,{force:!0,maxRetries:r?.maxRetries,recursive:!0,retryDelay:r?.retryDelay})}catch{}},"remove");module.exports=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});const c=require("node:fs"),i=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs");var y=Object.defineProperty,n=t((e,r)=>y(e,"name",{value:r,configurable:!0}),"t");const s=n((e,r={})=>{i(e);try{c.unlinkSync(e)}catch{}try{c.rmSync(e,{force:!0,maxRetries:r?.maxRetries,recursive:!0,retryDelay:r?.retryDelay})}catch{}},"removeSync");module.exports=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});import{unlinkSync as c,rmSync as y}from"node:fs";import m from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";var o=Object.defineProperty,n=t((e,r)=>o(e,"name",{value:r,configurable:!0}),"t");const l=n((e,r={})=>{m(e);try{c(e)}catch{}try{y(e,{force:!0,maxRetries:r?.maxRetries,recursive:!0,retryDelay:r?.retryDelay})}catch{}},"removeSync");export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var o=(e,t)=>s(e,"name",{value:t,configurable:!0});const r=require("@visulima/path");var i=Object.defineProperty,a=o((e,t)=>i(e,"name",{value:t,configurable:!0}),"i");const n=a((e,t)=>typeof e!="string"?e:e.startsWith("./")?r.resolve(e):typeof t=="string"?r.resolve(r.dirname(t),e):new URL(e,t),"resolveSymlinkTarget");exports.o=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s=Object.defineProperty;var r=(e,t)=>s(e,"name",{value:t,configurable:!0});import{INTERNAL_STRIP_JSON_REGEX as o}from"./F_OK-B71i3mUa.mjs";var n=Object.defineProperty,i=r((e,t)=>n(e,"name",{value:t,configurable:!0}),"s");const c=i((e,{whitespace:t=!0}={})=>e.replace(o,a=>a.startsWith('"')||a[1]==="*"&&!a.endsWith("*/")?a:t?a.replaceAll(/\S/g," "):""),"stripJsonComments");export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var r=(e,t)=>a(e,"name",{value:t,configurable:!0});const n=require("./F_OK-7T91O6Oz.cjs");var c=Object.defineProperty,i=r((e,t)=>c(e,"name",{value:t,configurable:!0}),"s");const o=i((e,{whitespace:t=!0}={})=>e.replace(n.INTERNAL_STRIP_JSON_REGEX,s=>s.startsWith('"')||s[1]==="*"&&!s.endsWith("*/")?s:t?s.replaceAll(/\S/g," "):""),"stripJsonComments");module.exports=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var r=(e,t)=>n(e,"name",{value:t,configurable:!0});var f=Object.defineProperty,i=r((e,t)=>f(e,"name",{value:t,configurable:!0}),"f");const a=new TextEncoder,y=i(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return a.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");exports.a=y;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { PathLike, Dirent } from 'node:fs';
|
|
2
|
-
import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, CreateNodeOptions, ToStringOptions } from 'yaml';
|
|
3
|
-
|
|
4
|
-
declare const F_OK = 0;
|
|
5
|
-
declare const R_OK = 4;
|
|
6
|
-
declare const W_OK = 2;
|
|
7
|
-
declare const X_OK = 1;
|
|
8
|
-
declare const FIND_UP_STOP: unique symbol;
|
|
9
|
-
|
|
10
|
-
type ColorizeMethod = (value: string) => string;
|
|
11
|
-
interface WalkOptions {
|
|
12
|
-
extensions?: string[];
|
|
13
|
-
followSymlinks?: boolean;
|
|
14
|
-
includeDirs?: boolean;
|
|
15
|
-
includeFiles?: boolean;
|
|
16
|
-
includeSymlinks?: boolean;
|
|
17
|
-
match?: (RegExp | string)[];
|
|
18
|
-
maxDepth?: number;
|
|
19
|
-
skip?: (RegExp | string)[];
|
|
20
|
-
}
|
|
21
|
-
interface WalkEntry extends Pick<Dirent, "isDirectory" | "isFile" | "isSymbolicLink" | "name"> {
|
|
22
|
-
path: string;
|
|
23
|
-
}
|
|
24
|
-
type ReadFileEncoding = "ascii" | "base64" | "base64url" | "hex" | "latin1" | "ucs-2" | "ucs2" | "utf-8" | "utf-16le" | "utf8" | "utf16le";
|
|
25
|
-
type ReadFileOptions<C> = {
|
|
26
|
-
buffer?: boolean;
|
|
27
|
-
compression?: C;
|
|
28
|
-
encoding?: ReadFileEncoding | undefined;
|
|
29
|
-
flag?: number | string | undefined;
|
|
30
|
-
};
|
|
31
|
-
type ContentType<O = undefined> = O extends {
|
|
32
|
-
buffer: true;
|
|
33
|
-
} ? Buffer : string;
|
|
34
|
-
type JsonReviver = Parameters<(typeof JSON)["parse"]>["1"];
|
|
35
|
-
type CodeFrameLocation = {
|
|
36
|
-
column?: number;
|
|
37
|
-
line: number;
|
|
38
|
-
};
|
|
39
|
-
type CodeFrameOptions = {
|
|
40
|
-
color?: {
|
|
41
|
-
gutter?: ColorizeMethod;
|
|
42
|
-
marker?: ColorizeMethod;
|
|
43
|
-
message?: ColorizeMethod;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
type ReadJsonOptions = CodeFrameOptions & {
|
|
47
|
-
beforeParse?: (source: string) => string;
|
|
48
|
-
};
|
|
49
|
-
type WriteFileOptions = {
|
|
50
|
-
chown?: {
|
|
51
|
-
gid: number;
|
|
52
|
-
uid: number;
|
|
53
|
-
};
|
|
54
|
-
encoding?: BufferEncoding | null | undefined;
|
|
55
|
-
flag?: string | undefined;
|
|
56
|
-
mode?: number;
|
|
57
|
-
overwrite?: boolean;
|
|
58
|
-
recursive?: boolean;
|
|
59
|
-
};
|
|
60
|
-
type JsonReplacer = (number | string)[] | ((this: unknown, key: string, value: unknown) => unknown) | null;
|
|
61
|
-
type YamlReplacer = JsonReplacer;
|
|
62
|
-
type WriteJsonOptions = WriteFileOptions & {
|
|
63
|
-
detectIndent?: boolean;
|
|
64
|
-
indent?: number | string | undefined;
|
|
65
|
-
replacer?: JsonReplacer;
|
|
66
|
-
stringify?: (data: unknown, replacer: JsonReplacer, space: number | string | undefined) => string;
|
|
67
|
-
};
|
|
68
|
-
type FindUpOptions = {
|
|
69
|
-
allowSymlinks?: boolean;
|
|
70
|
-
cwd?: URL | string;
|
|
71
|
-
stopAt?: URL | string;
|
|
72
|
-
type?: "directory" | "file";
|
|
73
|
-
};
|
|
74
|
-
type FindUpNameFnResult = PathLike | Promise<PathLike | typeof FIND_UP_STOP> | typeof FIND_UP_STOP | undefined;
|
|
75
|
-
type FindUpName = string[] | string | ((directory: string) => FindUpNameFnResult);
|
|
76
|
-
type FindUpNameSyncFnResult = PathLike | typeof FIND_UP_STOP | undefined;
|
|
77
|
-
type FindUpNameSync = string[] | string | ((directory: string) => FindUpNameSyncFnResult);
|
|
78
|
-
type RetryOptions = {
|
|
79
|
-
maxRetries?: number | undefined;
|
|
80
|
-
retryDelay?: number | undefined;
|
|
81
|
-
};
|
|
82
|
-
type ReadYamlOptions<C> = DocumentOptions & ParseOptions & ReadFileOptions<C> & SchemaOptions & ToJSOptions;
|
|
83
|
-
type YamlReviver = (key: unknown, value: unknown) => unknown;
|
|
84
|
-
type WriteYamlOptions = CreateNodeOptions & DocumentOptions & ParseOptions & SchemaOptions & ToStringOptions & WriteFileOptions & {
|
|
85
|
-
replacer?: YamlReplacer;
|
|
86
|
-
space?: number | string;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export { type ContentType as C, type FindUpName as F, type JsonReviver as J, type ReadFileOptions as R, type WalkOptions as W, X_OK as X, type YamlReviver as Y, type FindUpOptions as a, type FindUpNameSync as b, type WalkEntry as c, type ReadJsonOptions as d, type RetryOptions as e, type WriteFileOptions as f, type WriteJsonOptions as g, F_OK as h, FIND_UP_STOP as i, R_OK as j, W_OK as k, type CodeFrameLocation as l, type CodeFrameOptions as m, type FindUpNameFnResult as n, type FindUpNameSyncFnResult as o, type JsonReplacer as p, type ReadFileEncoding as q, type ReadYamlOptions as r, type WriteYamlOptions as s, type YamlReplacer as t };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { PathLike, Dirent } from 'node:fs';
|
|
2
|
-
import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions, CreateNodeOptions, ToStringOptions } from 'yaml';
|
|
3
|
-
|
|
4
|
-
declare const F_OK = 0;
|
|
5
|
-
declare const R_OK = 4;
|
|
6
|
-
declare const W_OK = 2;
|
|
7
|
-
declare const X_OK = 1;
|
|
8
|
-
declare const FIND_UP_STOP: unique symbol;
|
|
9
|
-
|
|
10
|
-
type ColorizeMethod = (value: string) => string;
|
|
11
|
-
interface WalkOptions {
|
|
12
|
-
extensions?: string[];
|
|
13
|
-
followSymlinks?: boolean;
|
|
14
|
-
includeDirs?: boolean;
|
|
15
|
-
includeFiles?: boolean;
|
|
16
|
-
includeSymlinks?: boolean;
|
|
17
|
-
match?: (RegExp | string)[];
|
|
18
|
-
maxDepth?: number;
|
|
19
|
-
skip?: (RegExp | string)[];
|
|
20
|
-
}
|
|
21
|
-
interface WalkEntry extends Pick<Dirent, "isDirectory" | "isFile" | "isSymbolicLink" | "name"> {
|
|
22
|
-
path: string;
|
|
23
|
-
}
|
|
24
|
-
type ReadFileEncoding = "ascii" | "base64" | "base64url" | "hex" | "latin1" | "ucs-2" | "ucs2" | "utf-8" | "utf-16le" | "utf8" | "utf16le";
|
|
25
|
-
type ReadFileOptions<C> = {
|
|
26
|
-
buffer?: boolean;
|
|
27
|
-
compression?: C;
|
|
28
|
-
encoding?: ReadFileEncoding | undefined;
|
|
29
|
-
flag?: number | string | undefined;
|
|
30
|
-
};
|
|
31
|
-
type ContentType<O = undefined> = O extends {
|
|
32
|
-
buffer: true;
|
|
33
|
-
} ? Buffer : string;
|
|
34
|
-
type JsonReviver = Parameters<(typeof JSON)["parse"]>["1"];
|
|
35
|
-
type CodeFrameLocation = {
|
|
36
|
-
column?: number;
|
|
37
|
-
line: number;
|
|
38
|
-
};
|
|
39
|
-
type CodeFrameOptions = {
|
|
40
|
-
color?: {
|
|
41
|
-
gutter?: ColorizeMethod;
|
|
42
|
-
marker?: ColorizeMethod;
|
|
43
|
-
message?: ColorizeMethod;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
type ReadJsonOptions = CodeFrameOptions & {
|
|
47
|
-
beforeParse?: (source: string) => string;
|
|
48
|
-
};
|
|
49
|
-
type WriteFileOptions = {
|
|
50
|
-
chown?: {
|
|
51
|
-
gid: number;
|
|
52
|
-
uid: number;
|
|
53
|
-
};
|
|
54
|
-
encoding?: BufferEncoding | null | undefined;
|
|
55
|
-
flag?: string | undefined;
|
|
56
|
-
mode?: number;
|
|
57
|
-
overwrite?: boolean;
|
|
58
|
-
recursive?: boolean;
|
|
59
|
-
};
|
|
60
|
-
type JsonReplacer = (number | string)[] | ((this: unknown, key: string, value: unknown) => unknown) | null;
|
|
61
|
-
type YamlReplacer = JsonReplacer;
|
|
62
|
-
type WriteJsonOptions = WriteFileOptions & {
|
|
63
|
-
detectIndent?: boolean;
|
|
64
|
-
indent?: number | string | undefined;
|
|
65
|
-
replacer?: JsonReplacer;
|
|
66
|
-
stringify?: (data: unknown, replacer: JsonReplacer, space: number | string | undefined) => string;
|
|
67
|
-
};
|
|
68
|
-
type FindUpOptions = {
|
|
69
|
-
allowSymlinks?: boolean;
|
|
70
|
-
cwd?: URL | string;
|
|
71
|
-
stopAt?: URL | string;
|
|
72
|
-
type?: "directory" | "file";
|
|
73
|
-
};
|
|
74
|
-
type FindUpNameFnResult = PathLike | Promise<PathLike | typeof FIND_UP_STOP> | typeof FIND_UP_STOP | undefined;
|
|
75
|
-
type FindUpName = string[] | string | ((directory: string) => FindUpNameFnResult);
|
|
76
|
-
type FindUpNameSyncFnResult = PathLike | typeof FIND_UP_STOP | undefined;
|
|
77
|
-
type FindUpNameSync = string[] | string | ((directory: string) => FindUpNameSyncFnResult);
|
|
78
|
-
type RetryOptions = {
|
|
79
|
-
maxRetries?: number | undefined;
|
|
80
|
-
retryDelay?: number | undefined;
|
|
81
|
-
};
|
|
82
|
-
type ReadYamlOptions<C> = DocumentOptions & ParseOptions & ReadFileOptions<C> & SchemaOptions & ToJSOptions;
|
|
83
|
-
type YamlReviver = (key: unknown, value: unknown) => unknown;
|
|
84
|
-
type WriteYamlOptions = CreateNodeOptions & DocumentOptions & ParseOptions & SchemaOptions & ToStringOptions & WriteFileOptions & {
|
|
85
|
-
replacer?: YamlReplacer;
|
|
86
|
-
space?: number | string;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export { type ContentType as C, type FindUpName as F, type JsonReviver as J, type ReadFileOptions as R, type WalkOptions as W, X_OK as X, type YamlReviver as Y, type FindUpOptions as a, type FindUpNameSync as b, type WalkEntry as c, type ReadJsonOptions as d, type RetryOptions as e, type WriteFileOptions as f, type WriteJsonOptions as g, F_OK as h, FIND_UP_STOP as i, R_OK as j, W_OK as k, type CodeFrameLocation as l, type CodeFrameOptions as m, type FindUpNameFnResult as n, type FindUpNameSyncFnResult as o, type JsonReplacer as p, type ReadFileEncoding as q, type ReadYamlOptions as r, type WriteYamlOptions as s, type YamlReplacer as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var D=Object.defineProperty;var y=(e,r)=>D(e,"name",{value:r,configurable:!0});import{readdir as F,realpath as h,stat as w}from"node:fs/promises";import{resolve as L,join as v,normalize as x,basename as I}from"@visulima/path";import{toPath as g}from"@visulima/path/utils";import k from"./WalkError-BsngoIKJ.mjs";import N from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{c as S,a as m}from"./walk-include-C9pVST87.mjs";var O=Object.defineProperty,s=y((e,r)=>O(e,"name",{value:r,configurable:!0}),"r");const P=s(async e=>{const r=x(e),l=I(r),t=await w(r);return{isDirectory:s(()=>t.isDirectory(),"isDirectory"),isFile:s(()=>t.isFile(),"isFile"),isSymbolicLink:s(()=>t.isSymbolicLink(),"isSymbolicLink"),name:l,path:r}},"_createWalkEntry");async function*b(e,{extensions:r,followSymlinks:l=!1,includeDirs:t=!0,includeFiles:f=!0,includeSymlinks:p=!0,match:d,maxDepth:c=Number.POSITIVE_INFINITY,skip:u}={}){if(N(e),c<0)return;const a=d?d.map(i=>typeof i=="string"?S(i):i):void 0,n=u?u.map(i=>typeof i=="string"?S(i):i):void 0;if(e=L(g(e)),t&&m(e,r,a,n)&&(yield await P(e)),!(c<1||!m(e,void 0,void 0,n)))try{for await(const i of await F(e,{withFileTypes:!0})){let o=v(e,i.name);if(i.isSymbolicLink())if(l)o=await h(o);else if(p&&m(o,r,a,n))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:o};else continue;i.isSymbolicLink()||i.isDirectory()?yield*b(o,{extensions:r,followSymlinks:l,includeDirs:t,includeFiles:f,includeSymlinks:p,match:a,maxDepth:c-1,skip:n}):i.isFile()&&f&&m(o,r,a,n)&&(yield{isDirectory:s(()=>i.isDirectory(),"isDirectory"),isFile:s(()=>i.isFile(),"isFile"),isSymbolicLink:s(()=>i.isSymbolicLink(),"isSymbolicLink"),name:i.name,path:o})}}catch(i){throw i instanceof k?i:new k(i,e)}}y(b,"d");s(b,"walk");export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty;var u=(e,r)=>D(e,"name",{value:r,configurable:!0});const d=require("node:fs/promises"),y=require("@visulima/path"),F=require("@visulima/path/utils"),h=require("./WalkError-gKgp0TWD.cjs"),w=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),n=require("./walk-include-DkK-WJl4.cjs");var L=Object.defineProperty,s=u((e,r)=>L(e,"name",{value:r,configurable:!0}),"r");const v=s(async e=>{const r=y.normalize(e),o=y.basename(r),a=await d.stat(r);return{isDirectory:s(()=>a.isDirectory(),"isDirectory"),isFile:s(()=>a.isFile(),"isFile"),isSymbolicLink:s(()=>a.isSymbolicLink(),"isSymbolicLink"),name:o,path:r}},"_createWalkEntry");async function*k(e,{extensions:r,followSymlinks:o=!1,includeDirs:a=!0,includeFiles:p=!0,includeSymlinks:S=!0,match:b,maxDepth:m=Number.POSITIVE_INFINITY,skip:f}={}){if(w(e),m<0)return;const c=b?b.map(i=>typeof i=="string"?n.c(i):i):void 0,t=f?f.map(i=>typeof i=="string"?n.c(i):i):void 0;if(e=y.resolve(F.toPath(e)),a&&n.a(e,r,c,t)&&(yield await v(e)),!(m<1||!n.a(e,void 0,void 0,t)))try{for await(const i of await d.readdir(e,{withFileTypes:!0})){let l=y.join(e,i.name);if(i.isSymbolicLink())if(o)l=await d.realpath(l);else if(S&&n.a(l,r,c,t))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:l};else continue;i.isSymbolicLink()||i.isDirectory()?yield*k(l,{extensions:r,followSymlinks:o,includeDirs:a,includeFiles:p,includeSymlinks:S,match:c,maxDepth:m-1,skip:t}):i.isFile()&&p&&n.a(l,r,c,t)&&(yield{isDirectory:s(()=>i.isDirectory(),"isDirectory"),isFile:s(()=>i.isFile(),"isFile"),isSymbolicLink:s(()=>i.isSymbolicLink(),"isSymbolicLink"),name:i.name,path:l})}}catch(i){throw i instanceof h?i:new h(i,e)}}u(k,"d");s(k,"walk");module.exports=k;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.defineProperty;var c=(e,r)=>g(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,p=c((e,r)=>n(e,"name",{value:r,configurable:!0}),"r");const i=p(e=>{const r=e.replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,"\\.").replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");return new RegExp(`^${r}$`)},"globToRegExp");var o=Object.defineProperty,s=c((e,r)=>o(e,"name",{value:r,configurable:!0}),"n");const v=s((e,r,l,t)=>Array.isArray(r)&&r.length>0&&!r.some(a=>e.endsWith(a))||l&&!l.some(a=>a.test(e))?!1:!t?.some(a=>a.test(e)),"walkInclude");export{v as a,i as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var c=(e,r)=>g(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,p=c((e,r)=>n(e,"name",{value:r,configurable:!0}),"r");const s=p(e=>{const r=e.replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,"\\.").replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");return new RegExp(`^${r}$`)},"globToRegExp");var o=Object.defineProperty,u=c((e,r)=>o(e,"name",{value:r,configurable:!0}),"n");const i=u((e,r,t,l)=>Array.isArray(r)&&r.length>0&&!r.some(a=>e.endsWith(a))||t&&!t.some(a=>a.test(e))?!1:!l?.some(a=>a.test(e)),"walkInclude");exports.a=i;exports.c=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var D=Object.defineProperty;var c=(e,r)=>D(e,"name",{value:r,configurable:!0});import{readdirSync as F,realpathSync as v,statSync as L}from"node:fs";import{resolve as w,join as x,normalize as a,basename as I}from"@visulima/path";import{toPath as g}from"@visulima/path/utils";import S from"./WalkError-BsngoIKJ.mjs";import N from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{c as k,a as l}from"./walk-include-C9pVST87.mjs";var O=Object.defineProperty,h=c((e,r)=>O(e,"name",{value:r,configurable:!0}),"m");const P=h(e=>{const r=a(e),n=L(r);return{isDirectory:n.isDirectory,isFile:n.isFile,isSymbolicLink:n.isSymbolicLink,name:I(r),path:r}},"_createWalkEntry");function*b(e,{extensions:r,followSymlinks:n=!1,includeDirs:y=!0,includeFiles:f=!0,includeSymlinks:p=!0,match:d,maxDepth:m=Number.POSITIVE_INFINITY,skip:u}={}){if(N(e),m<0)return;const s=d?d.map(i=>typeof i=="string"?k(i):i):void 0,t=u?u.map(i=>typeof i=="string"?k(i):i):void 0;if(e=w(g(e)),y&&l(e,r,s,t)&&(yield P(e)),!(m<1||!l(e,void 0,void 0,t)))try{for(const i of F(e,{withFileTypes:!0})){let o=x(e,i.name);if(i.isSymbolicLink())if(n)o=v(o);else if(p&&l(o,r,s,t))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:a(o)};else continue;i.isSymbolicLink()||i.isDirectory()?yield*b(o,{extensions:r,followSymlinks:n,includeDirs:y,includeFiles:f,includeSymlinks:p,match:s,maxDepth:m-1,skip:t}):i.isFile()&&f&&l(o,r,s,t)&&(yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:a(o)})}}catch(i){throw i instanceof S?i:new S(i,e)}}c(b,"h");h(b,"walkSync");export{b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var D=Object.defineProperty;var y=(e,r)=>D(e,"name",{value:r,configurable:!0});const m=require("node:fs"),l=require("@visulima/path"),F=require("@visulima/path/utils"),p=require("./WalkError-gKgp0TWD.cjs"),v=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),t=require("./walk-include-DkK-WJl4.cjs");var L=Object.defineProperty,b=y((e,r)=>L(e,"name",{value:r,configurable:!0}),"m");const w=b(e=>{const r=l.normalize(e),s=m.statSync(r);return{isDirectory:s.isDirectory,isFile:s.isFile,isSymbolicLink:s.isSymbolicLink,name:l.basename(r),path:r}},"_createWalkEntry");function*u(e,{extensions:r,followSymlinks:s=!1,includeDirs:d=!0,includeFiles:f=!0,includeSymlinks:k=!0,match:S,maxDepth:c=Number.POSITIVE_INFINITY,skip:h}={}){if(v(e),c<0)return;const a=S?S.map(i=>typeof i=="string"?t.c(i):i):void 0,o=h?h.map(i=>typeof i=="string"?t.c(i):i):void 0;if(e=l.resolve(F.toPath(e)),d&&t.a(e,r,a,o)&&(yield w(e)),!(c<1||!t.a(e,void 0,void 0,o)))try{for(const i of m.readdirSync(e,{withFileTypes:!0})){let n=l.join(e,i.name);if(i.isSymbolicLink())if(s)n=m.realpathSync(n);else if(k&&t.a(n,r,a,o))yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:l.normalize(n)};else continue;i.isSymbolicLink()||i.isDirectory()?yield*u(n,{extensions:r,followSymlinks:s,includeDirs:d,includeFiles:f,includeSymlinks:k,match:a,maxDepth:c-1,skip:o}):i.isFile()&&f&&t.a(n,r,a,o)&&(yield{isDirectory:i.isDirectory,isFile:i.isFile,isSymbolicLink:i.isSymbolicLink,name:i.name,path:l.normalize(n)})}}catch(i){throw i instanceof p?i:new p(i,e)}}y(u,"h");b(u,"walkSync");module.exports=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var c=(t,i)=>f(t,"name",{value:i,configurable:!0});import{mkdir as u,writeFile as s,stat as l,rename as w,chown as h,chmod as p,unlink as g}from"node:fs/promises";import{dirname as v}from"@visulima/path";import{toPath as $}from"@visulima/path/utils";import{F_OK as d}from"./F_OK-B71i3mUa.mjs";import m from"./isAccessible-CL4eE5VL.mjs";import y from"./assertValidFileContents-BZFnXa7K.mjs";import F from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{a as b}from"./to-uint-8-array-DwgaTasY.mjs";var k=Object.defineProperty,O=c((t,i)=>k(t,"name",{value:i,configurable:!0}),"d");const B=O(async(t,i,a)=>{a={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...a},F(t),y(i),t=$(t);const o=`${t}.tmp`;try{const r=await m(t,d);if(!r&&a.recursive){const n=v(t);await m(n,d)||await u(n,{recursive:!0})}let e;if(await s(o,b(i),{encoding:a.encoding,flag:a.flag}),r&&!a.overwrite&&(e=await l(t),a.chown===void 0&&(a.chown={gid:e.gid,uid:e.uid}),await w(t,`${t}.bak`)),a.chown)try{await h(o,a.chown.uid,a.chown.gid)}catch{}await p(o,e&&!a.mode?e.mode:a.mode??438),await w(o,t)}catch(r){throw new Error(`Failed to write file at: ${t} - ${r.message}`,{cause:r})}finally{await m(o)&&await g(`${t}.tmp`)}},"writeFile");export{B as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var u=(i,a)=>d(i,"name",{value:a,configurable:!0});const t=require("node:fs/promises"),l=require("@visulima/path"),h=require("@visulima/path/utils"),w=require("./F_OK-7T91O6Oz.cjs"),c=require("./isAccessible-BQZd1_xn.cjs"),m=require("./assertValidFileContents-CrbDz09d.cjs"),f=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),g=require("./to-uint-8-array-2-3EvGd7.cjs");var v=Object.defineProperty,q=u((i,a)=>v(i,"name",{value:a,configurable:!0}),"d");const F=q(async(i,a,e)=>{e={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...e},f(i),m(a),i=h.toPath(i);const r=`${i}.tmp`;try{const n=await c(i,w.F_OK);if(!n&&e.recursive){const s=l.dirname(i);await c(s,w.F_OK)||await t.mkdir(s,{recursive:!0})}let o;if(await t.writeFile(r,g.a(a),{encoding:e.encoding,flag:e.flag}),n&&!e.overwrite&&(o=await t.stat(i),e.chown===void 0&&(e.chown={gid:o.gid,uid:o.uid}),await t.rename(i,`${i}.bak`)),e.chown)try{await t.chown(r,e.chown.uid,e.chown.gid)}catch{}await t.chmod(r,o&&!e.mode?o.mode:e.mode??438),await t.rename(r,i)}catch(n){throw new Error(`Failed to write file at: ${i} - ${n.message}`,{cause:n})}finally{await c(r)&&await t.unlink(`${i}.tmp`)}},"writeFile");module.exports=F;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var l=Object.defineProperty;var u=(e,t)=>l(e,"name",{value:t,configurable:!0});const r=require("node:fs"),y=require("@visulima/path"),h=require("@visulima/path/utils"),d=require("./F_OK-7T91O6Oz.cjs"),a=require("./isAccessibleSync-BP5N8k_-.cjs"),w=require("./assertValidFileContents-CrbDz09d.cjs"),f=require("./assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),m=require("./to-uint-8-array-2-3EvGd7.cjs");var g=Object.defineProperty,S=u((e,t)=>g(e,"name",{value:t,configurable:!0}),"f");const v=S((e,t,i)=>{i={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...i},f(e),w(t),e=h.toPath(e);const c=`${e}.tmp`;try{const n=a(e,d.F_OK);if(!n&&i.recursive){const s=y.dirname(e);a(s,d.F_OK)||r.mkdirSync(s,{recursive:!0})}let o;if(r.writeFileSync(c,m.a(t),{encoding:i.encoding,flag:i.flag}),n&&!i.overwrite&&(o=r.statSync(e),i.chown===void 0&&(i.chown={gid:o.gid,uid:o.uid}),r.renameSync(e,`${e}.bak`)),i.chown)try{r.chownSync(c,i.chown.uid,i.chown.gid)}catch{}r.chmodSync(c,o&&!i.mode?o.mode:i.mode??438),r.renameSync(c,e)}catch(n){throw new Error(`Failed to write file at: ${e} - ${n.message}`,{cause:n})}finally{a(c)&&r.unlinkSync(`${e}.tmp`)}},"writeFileSync");module.exports=v;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var u=Object.defineProperty;var a=(o,i)=>u(o,"name",{value:i,configurable:!0});import{mkdirSync as l,writeFileSync as s,statSync as w,renameSync as f,chownSync as h,chmodSync as p,unlinkSync as y}from"node:fs";import{dirname as g}from"@visulima/path";import{toPath as v}from"@visulima/path/utils";import{F_OK as d}from"./F_OK-B71i3mUa.mjs";import n from"./isAccessibleSync-_HU_ppdG.mjs";import S from"./assertValidFileContents-BZFnXa7K.mjs";import $ from"./assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{a as F}from"./to-uint-8-array-DwgaTasY.mjs";var b=Object.defineProperty,k=a((o,i)=>b(o,"name",{value:i,configurable:!0}),"f");const A=k((o,i,t)=>{t={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...t},$(o),S(i),o=v(o);const r=`${o}.tmp`;try{const c=n(o,d);if(!c&&t.recursive){const m=g(o);n(m,d)||l(m,{recursive:!0})}let e;if(s(r,F(i),{encoding:t.encoding,flag:t.flag}),c&&!t.overwrite&&(e=w(o),t.chown===void 0&&(t.chown={gid:e.gid,uid:e.uid}),f(o,`${o}.bak`)),t.chown)try{h(r,t.chown.uid,t.chown.gid)}catch{}p(r,e&&!t.mode?e.mode:t.mode??438),f(r,o)}catch(c){throw new Error(`Failed to write file at: ${o} - ${c.message}`,{cause:c})}finally{n(r)&&y(`${o}.tmp`)}},"writeFileSync");export{A as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var l=Object.defineProperty;var o=(t,r)=>l(t,"name",{value:r,configurable:!0});import{readFile as u}from"node:fs/promises";import{w as y}from"./index-BSjF-5vj.mjs";import{R_OK as h}from"./F_OK-B71i3mUa.mjs";import O from"./isAccessible-CL4eE5VL.mjs";import $ from"./writeFile-COOAkvOE.mjs";var g=Object.defineProperty,v=o((t,r)=>g(t,"name",{value:r,configurable:!0}),"r");const F=v(async(t,r,a={})=>{const{detectIndent:f,indent:c,replacer:m,stringify:s=JSON.stringify,...d}={indent:" ",...a};let i=c,n=`
|
|
2
|
-
`;if(await O(t,h))try{const e=await u(t,"utf8");if(f){const{indent:w}=y(e);i=w}n=e.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(e){if(e.code!=="ENOENT")throw e}const p=s(r,m,i);await $(t,`${p}${n}`,d)},"writeJson");export{F as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var s=(e,i)=>p(e,"name",{value:i,configurable:!0});const q=require("node:fs/promises"),y=require("./index-DPla58ce.cjs"),O=require("./F_OK-7T91O6Oz.cjs"),b=require("./isAccessible-BQZd1_xn.cjs"),g=require("./writeFile-CjgQEfur.cjs");var h=Object.defineProperty,m=s((e,i)=>h(e,"name",{value:i,configurable:!0}),"r");const v=m(async(e,i,c={})=>{const{detectIndent:a,indent:o,replacer:d,stringify:u=JSON.stringify,...f}={indent:" ",...c};let t=o,n=`
|
|
2
|
-
`;if(await b(e,O.R_OK))try{const r=await q.readFile(e,"utf8");if(a){const{indent:w}=y.w(r);t=w}n=r.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(r){if(r.code!=="ENOENT")throw r}const l=u(i,d,t);await g(e,`${l}${n}`,f)},"writeJson");module.exports=v;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty;var c=(e,t)=>O(e,"name",{value:t,configurable:!0});const q=require("node:fs"),S=require("./index-DPla58ce.cjs"),p=require("./F_OK-7T91O6Oz.cjs"),w=require("./isAccessibleSync-BP5N8k_-.cjs"),N=require("./writeFileSync-CQuRHo9n.cjs");var b=Object.defineProperty,g=c((e,t)=>b(e,"name",{value:t,configurable:!0}),"r");const h=g((e,t,s={})=>{const{detectIndent:o,indent:d,replacer:f,stringify:u=JSON.stringify,...y}={indent:" ",...s};let i=d,n=`
|
|
2
|
-
`;if(w(e,p.R_OK))try{const r=q.readFileSync(e,"utf8");if(o){const{indent:l}=S.w(r);i=l}n=r.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(r){if(r.code!=="ENOENT")throw r}const a=u(t,f,i);N(e,`${a}${n}`,y)},"writeJsonSync");module.exports=h;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var y=Object.defineProperty;var n=(t,r)=>y(t,"name",{value:r,configurable:!0});import{readFileSync as u}from"node:fs";import{w as O}from"./index-BSjF-5vj.mjs";import{R_OK as h}from"./F_OK-B71i3mUa.mjs";import N from"./isAccessibleSync-_HU_ppdG.mjs";import g from"./writeFileSync-rhu-y_zx.mjs";var v=Object.defineProperty,w=n((t,r)=>v(t,"name",{value:r,configurable:!0}),"r");const x=w((t,r,c={})=>{const{detectIndent:f,indent:m,replacer:d,stringify:a=JSON.stringify,...s}={indent:" ",...c};let o=m,i=`
|
|
2
|
-
`;if(N(t,h))try{const e=u(t,"utf8");if(f){const{indent:l}=O(e);o=l}i=e.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:""}catch(e){if(e.code!=="ENOENT")throw e}const p=a(r,d,o);g(t,`${p}${i}`,s)},"writeJsonSync");export{x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var f=(a,t)=>p(a,"name",{value:t,configurable:!0});import{stringify as l}from"yaml";import y from"./writeFile-COOAkvOE.mjs";var u=Object.defineProperty,m=f((a,t)=>u(a,"name",{value:t,configurable:!0}),"l");async function s(a,t,r,o){let e,n,i;typeof r=="object"&&r!==null&&!Array.isArray(r)&&typeof r!="function"?(e=r,n=e.replacer,i=e.space):typeof o=="object"&&o!==null?(e=o,n=r,i=e.space??(typeof o=="number"||typeof o=="string"?o:void 0)):(n=r,i=o);const c=l(t,n,i??e);await y(a,c,e)}f(s,"c");m(s,"writeYaml");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var u=Object.defineProperty;var c=(t,a)=>u(t,"name",{value:a,configurable:!0});const y=require("yaml"),f=require("./writeFile-CjgQEfur.cjs");var p=Object.defineProperty,b=c((t,a)=>p(t,"name",{value:a,configurable:!0}),"l");async function l(t,a,e,r){let i,n,o;typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e!="function"?(i=e,n=i.replacer,o=i.space):typeof r=="object"&&r!==null?(i=r,n=e,o=i.space??(typeof r=="number"||typeof r=="string"?r:void 0)):(n=e,o=r);const s=y.stringify(a,n,o??i);await f(t,s,i)}c(l,"c");b(l,"writeYaml");module.exports=l;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var p=Object.defineProperty;var i=(n,t)=>p(n,"name",{value:t,configurable:!0});import{stringify as l}from"yaml";import y from"./writeFileSync-rhu-y_zx.mjs";var u=Object.defineProperty,m=i((n,t)=>u(n,"name",{value:t,configurable:!0}),"s");function s(n,t,r,o){let e,a,f;typeof r=="object"&&r!==null&&!Array.isArray(r)&&typeof r!="function"?(e=r,a=e.replacer,f=e.space):typeof o=="object"&&o!==null?(e=o,a=r,f=e.space??(typeof o=="number"||typeof o=="string"?o:void 0)):(a=r,f=o);const c=l(t,a,f??e);y(n,c,e)}i(s,"c");m(s,"writeYamlSync");export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var a=(i,o)=>s(i,"name",{value:o,configurable:!0});const u=require("yaml"),f=require("./writeFileSync-CQuRHo9n.cjs");var p=Object.defineProperty,b=a((i,o)=>p(i,"name",{value:o,configurable:!0}),"s");function y(i,o,e,r){let n,t,c;typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e!="function"?(n=e,t=n.replacer,c=n.space):typeof r=="object"&&r!==null?(n=r,t=e,c=n.space??(typeof r=="number"||typeof r=="string"?r:void 0)):(t=e,c=r);const l=u.stringify(o,t,c??n);f(i,l,n)}a(y,"c");b(y,"writeYamlSync");module.exports=y;
|
package/dist/size.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var y=(e,t)=>b(e,"name",{value:t,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("node:fs"),h=require("node:fs/promises"),g=require("node:path"),p=require("node:stream"),a=require("node:url"),n=require("node:zlib"),c=require("@visulima/path/utils");var w=Object.defineProperty,i=y((e,t)=>w(e,"name",{value:t,configurable:!0}),"t");const f=i(e=>{if(g.isAbsolute(e))return s.existsSync(e);try{return s.existsSync(g.resolve(e))}catch{return!1}},"fileExists"),d=i(async e=>{let t=0;for await(const r of e)t+=Buffer.from(r).length;return t},"getStreamSizeEfficient"),z=i(async(e,t)=>{let r=0;const o=t();return await new Promise((l,u)=>{o.on("data",m=>{r+=m.length}),o.on("end",()=>l(r)),o.on("error",u),e.on("error",u),e.pipe(o)})},"getCompressedStreamSizeEfficient"),S=i(async(e,t,r)=>{if(e instanceof a.URL||typeof e=="string"){const o=c.toPath(e);if(f(o)){const l=p.Readable.from(await h.readFile(o));return await r(l)}if(typeof e=="string")return t(Buffer.from(e))}return e instanceof p.Readable?await r(e):t(e)},"processInputEfficiently"),P=i(async(e,t)=>await S(e,i(r=>n.gzipSync(r,t).length,"bufferProcessor"),i(async r=>await z(r,()=>n.createGzip(t)),"streamProcessor")),"gzipSize"),q=i(async(e,t)=>await S(e,i(r=>n.brotliCompressSync(r,t).length,"bufferProcessor"),i(async r=>await z(r,()=>n.createBrotliCompress(t)),"streamProcessor")),"brotliSize"),B=i(async e=>await S(e,i(t=>t.length,"bufferProcessor"),i(async t=>await d(t),"streamProcessor")),"rawSize"),_=i((e,t)=>{if(e instanceof a.URL||typeof e=="string"){const r=c.toPath(e);if(f(r))return n.gzipSync(s.readFileSync(r),t).length;if(typeof e=="string")return n.gzipSync(Buffer.from(e),t).length}return n.gzipSync(e,t).length},"gzipSizeSync"),v=i((e,t)=>{if(e instanceof a.URL||typeof e=="string"){const r=c.toPath(e);if(f(r))return n.brotliCompressSync(s.readFileSync(r),t).length;if(typeof e=="string")return n.brotliCompressSync(Buffer.from(e),t).length}return n.brotliCompressSync(e,t).length},"brotliSizeSync"),C=i(e=>{if(e instanceof a.URL||typeof e=="string"){const t=c.toPath(e);if(f(t))return s.statSync(t).size;if(typeof e=="string")return Buffer.from(e).length}return e.length},"rawSizeSync");exports.brotliSize=q;exports.brotliSizeSync=v;exports.gzipSize=P;exports.gzipSizeSync=_;exports.rawSize=B;exports.rawSizeSync=C;
|
package/dist/size.d.cts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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.mts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{readFileSync as S,statSync as b,existsSync as u}from"node:fs";import{readFile as P}from"node:fs/promises";import{isAbsolute as d,resolve as B}from"node:path";import{Readable as g}from"node:stream";import{URL as s}from"node:url";import{gzipSync as o,createGzip as v,brotliCompressSync as f,createBrotliCompress as x}from"node:zlib";import{toPath as a}from"@visulima/path/utils";var E=Object.defineProperty,n=p((e,t)=>E(e,"name",{value:t,configurable:!0}),"t");const c=n(e=>{if(d(e))return u(e);try{return u(B(e))}catch{return!1}},"fileExists"),C=n(async e=>{let t=0;for await(const r of e)t+=Buffer.from(r).length;return t},"getStreamSizeEfficient"),z=n(async(e,t)=>{let r=0;const i=t();return await new Promise((l,y)=>{i.on("data",w=>{r+=w.length}),i.on("end",()=>l(r)),i.on("error",y),e.on("error",y),e.pipe(i)})},"getCompressedStreamSizeEfficient"),m=n(async(e,t,r)=>{if(e instanceof s||typeof e=="string"){const i=a(e);if(c(i)){const l=g.from(await P(i));return await r(l)}if(typeof e=="string")return t(Buffer.from(e))}return e instanceof g?await r(e):t(e)},"processInputEfficiently"),U=n(async(e,t)=>await m(e,n(r=>o(r,t).length,"bufferProcessor"),n(async r=>await z(r,()=>v(t)),"streamProcessor")),"gzipSize"),k=n(async(e,t)=>await m(e,n(r=>f(r,t).length,"bufferProcessor"),n(async r=>await z(r,()=>x(t)),"streamProcessor")),"brotliSize"),q=n(async e=>await m(e,n(t=>t.length,"bufferProcessor"),n(async t=>await C(t),"streamProcessor")),"rawSize"),D=n((e,t)=>{if(e instanceof s||typeof e=="string"){const r=a(e);if(c(r))return o(S(r),t).length;if(typeof e=="string")return o(Buffer.from(e),t).length}return o(e,t).length},"gzipSizeSync"),H=n((e,t)=>{if(e instanceof s||typeof e=="string"){const r=a(e);if(c(r))return f(S(r),t).length;if(typeof e=="string")return f(Buffer.from(e),t).length}return f(e,t).length},"brotliSizeSync"),J=n(e=>{if(e instanceof s||typeof e=="string"){const t=a(e);if(c(t))return b(t).size;if(typeof e=="string")return Buffer.from(e).length}return e.length},"rawSizeSync");export{k as brotliSize,H as brotliSizeSync,U as gzipSize,D as gzipSizeSync,q as rawSize,J as rawSizeSync};
|
package/dist/utils.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./packem_shared/JSONError-CWuiGmNc.cjs"),r=require("./packem_shared/assertValidFileContents-CrbDz09d.cjs"),t=require("./packem_shared/assertValidFileOrDirectoryPath-HOUs73Jk.cjs"),s=require("./packem_shared/parseJson-CQlz8sBs.cjs"),i=require("./packem_shared/stripJsonComments-CvZSDnYT.cjs"),o=require("@visulima/path/utils");exports.JSONError=e;exports.assertValidFileContents=r;exports.assertValidFileOrDirectoryPath=t;exports.parseJson=s;exports.stripJsonComments=i;exports.toPath=o.toPath;
|
package/dist/utils.d.cts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.cjs';
|
|
2
|
-
import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.cjs';
|
|
3
|
-
import { m as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-XsSUZ9oS.cjs';
|
|
4
|
-
export { toPath } from '@visulima/path/utils';
|
|
5
|
-
import 'node:fs';
|
|
6
|
-
import 'yaml';
|
|
7
|
-
|
|
8
|
-
declare const assertValidFileContents: (contents: any) => void;
|
|
9
|
-
|
|
10
|
-
declare const assertValidFileOrDirectoryPath: (fileOrDirectoryPath: any) => void;
|
|
11
|
-
|
|
12
|
-
declare function parseJson<T = JsonValue>(string: string, filename?: string, options?: CodeFrameOptions): T;
|
|
13
|
-
declare function parseJson<T = JsonValue>(string: string, reviver: JsonReviver, fileName?: string, options?: CodeFrameOptions): T;
|
|
14
|
-
|
|
15
|
-
declare const stripJsonComments: (jsonString: string, { whitespace }?: {
|
|
16
|
-
whitespace?: boolean | undefined;
|
|
17
|
-
}) => string;
|
|
18
|
-
|
|
19
|
-
export { assertValidFileContents, assertValidFileOrDirectoryPath, parseJson, stripJsonComments };
|
package/dist/utils.d.mts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.mjs';
|
|
2
|
-
import { J as JsonValue } from './packem_shared/observable-like.d-BlD8q22s.mjs';
|
|
3
|
-
import { m as CodeFrameOptions, J as JsonReviver } from './packem_shared/types-XsSUZ9oS.mjs';
|
|
4
|
-
export { toPath } from '@visulima/path/utils';
|
|
5
|
-
import 'node:fs';
|
|
6
|
-
import 'yaml';
|
|
7
|
-
|
|
8
|
-
declare const assertValidFileContents: (contents: any) => void;
|
|
9
|
-
|
|
10
|
-
declare const assertValidFileOrDirectoryPath: (fileOrDirectoryPath: any) => void;
|
|
11
|
-
|
|
12
|
-
declare function parseJson<T = JsonValue>(string: string, filename?: string, options?: CodeFrameOptions): T;
|
|
13
|
-
declare function parseJson<T = JsonValue>(string: string, reviver: JsonReviver, fileName?: string, options?: CodeFrameOptions): T;
|
|
14
|
-
|
|
15
|
-
declare const stripJsonComments: (jsonString: string, { whitespace }?: {
|
|
16
|
-
whitespace?: boolean | undefined;
|
|
17
|
-
}) => string;
|
|
18
|
-
|
|
19
|
-
export { assertValidFileContents, assertValidFileOrDirectoryPath, parseJson, stripJsonComments };
|
package/dist/utils.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{default as e}from"./packem_shared/JSONError-CVkb3xZ3.mjs";import{default as a}from"./packem_shared/assertValidFileContents-BZFnXa7K.mjs";import{default as f}from"./packem_shared/assertValidFileOrDirectoryPath-DgPIPmZT.mjs";import{default as m}from"./packem_shared/parseJson-BEnYqLIc.mjs";import{default as d}from"./packem_shared/stripJsonComments-Cp5SNAB7.mjs";import{toPath as x}from"@visulima/path/utils";export{e as JSONError,a as assertValidFileContents,f as assertValidFileOrDirectoryPath,m as parseJson,d as stripJsonComments,x as toPath};
|
package/dist/yaml.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./packem_shared/readYaml-BzMFDsYe.cjs"),r=require("./packem_shared/readYamlSync-BbK0khJu.cjs"),a=require("./packem_shared/writeYaml-VmX1VKhN.cjs"),l=require("./packem_shared/writeYamlSync-DYsM6XBi.cjs");exports.readYaml=e;exports.readYamlSync=r;exports.writeYaml=a;exports.writeYamlSync=l;
|
package/dist/yaml.d.cts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { r as ReadYamlOptions, Y as YamlReviver, s as WriteYamlOptions, t as YamlReplacer } from './packem_shared/types-XsSUZ9oS.cjs';
|
|
2
|
-
import 'node:fs';
|
|
3
|
-
import 'yaml';
|
|
4
|
-
|
|
5
|
-
declare function readYaml<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
6
|
-
declare function readYaml<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): Promise<R>;
|
|
7
|
-
|
|
8
|
-
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
9
|
-
declare function readYamlSync<R = Record<string, unknown>>(path: URL | string, reviver?: YamlReviver, options?: ReadYamlOptions<"brotli" | "gzip" | "none">): R;
|
|
10
|
-
|
|
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>;
|
|
13
|
-
|
|
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;
|
|
16
|
-
|
|
17
|
-
export { YamlReplacer, readYaml, readYamlSync, writeYaml, writeYamlSync };
|