@visulima/fs 2.1.18 → 2.2.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 +6 -0
- package/README.md +9 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/findUp-DWKie4QO.cjs +1 -0
- package/dist/packem_shared/findUp-DuKqk_9D.mjs +1 -0
- package/dist/packem_shared/findUpSync-Cal_fll7.mjs +1 -0
- package/dist/packem_shared/findUpSync-Y1Jpw0nr.cjs +1 -0
- package/dist/packem_shared/{observable-like.d-CpT5ICZl.d.cts → observable-like.d-BIpsmTbZ.d.cts} +5 -3
- package/dist/packem_shared/{observable-like.d-CpT5ICZl.d.mjs → observable-like.d-BIpsmTbZ.d.mjs} +5 -3
- package/dist/packem_shared/{observable-like.d-CpT5ICZl.d.mts → observable-like.d-BIpsmTbZ.d.mts} +5 -3
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/packem_shared/findUp-DTU501Mn.cjs +0 -1
- package/dist/packem_shared/findUp-ik4TWAC2.mjs +0 -1
- package/dist/packem_shared/findUpSync-C1w6Z_6P.cjs +0 -1
- package/dist/packem_shared/findUpSync-DO0R67zX.mjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## @visulima/fs [2.2.0](https://github.com/visulima/visulima/compare/@visulima/fs@2.1.18...@visulima/fs@2.2.0) (2024-09-29)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **fs:** added allowSymlinks to findUp and findUpSync ([1ef8c03](https://github.com/visulima/visulima/commit/1ef8c039e4e7b054177d25f74b98b56d79f2d27b))
|
|
6
|
+
|
|
1
7
|
## @visulima/fs [2.1.18](https://github.com/visulima/visulima/compare/@visulima/fs@2.1.17...@visulima/fs@2.1.18) (2024-09-24)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -191,7 +191,8 @@ console.log(file);
|
|
|
191
191
|
|
|
192
192
|
#### name
|
|
193
193
|
|
|
194
|
-
Type: `string | string
|
|
194
|
+
Type: `string[] | string | ((directory: PathLike) => PathLike | Promise<PathLike | typeof FIND_UP_STOP> | typeof FIND_UP_STOP)` \
|
|
195
|
+
Sync Type: `string[] | string | ((directory: PathLike) => PathLike | typeof FIND_UP_STOP)`
|
|
195
196
|
|
|
196
197
|
The name of the file or directory to find.
|
|
197
198
|
|
|
@@ -227,6 +228,13 @@ Default: Root directory
|
|
|
227
228
|
|
|
228
229
|
A directory path where the search halts if no matches are found before reaching this point.
|
|
229
230
|
|
|
231
|
+
##### allowSymlinks
|
|
232
|
+
|
|
233
|
+
Type: `boolean`\
|
|
234
|
+
Default: `true`
|
|
235
|
+
|
|
236
|
+
Allow symbolic links to match if they point to the target file or directory.
|
|
237
|
+
|
|
230
238
|
## readFile
|
|
231
239
|
|
|
232
240
|
Read a file.
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./packem_shared/F_OK-B8R_JA-Q.cjs"),n=require("./packem_shared/ensureDir-DVHj-_yp.cjs"),i=require("./packem_shared/ensureDirSync-CvjJ3bGq.cjs"),c=require("./packem_shared/ensureFile-CcJ5XIZm.cjs"),s=require("./packem_shared/ensureFileSync-v-PhMLTr.cjs"),t=require("./packem_shared/ensureLink-C-v4AxzH.cjs"),o=require("./packem_shared/ensureLinkSync-C4S-zdVb.cjs"),u=require("./packem_shared/ensureSymlink-C5cy9585.cjs"),l=require("./packem_shared/ensureSymlinkSync-YDRbg9hX.cjs"),r=require("./packem_shared/LF-D4BqIfQm.cjs"),y=require("./packem_shared/collect-4au76gDu.cjs"),S=require("./packem_shared/collectSync-CbKwt8rz.cjs"),q=require("./packem_shared/findUp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./packem_shared/F_OK-B8R_JA-Q.cjs"),n=require("./packem_shared/ensureDir-DVHj-_yp.cjs"),i=require("./packem_shared/ensureDirSync-CvjJ3bGq.cjs"),c=require("./packem_shared/ensureFile-CcJ5XIZm.cjs"),s=require("./packem_shared/ensureFileSync-v-PhMLTr.cjs"),t=require("./packem_shared/ensureLink-C-v4AxzH.cjs"),o=require("./packem_shared/ensureLinkSync-C4S-zdVb.cjs"),u=require("./packem_shared/ensureSymlink-C5cy9585.cjs"),l=require("./packem_shared/ensureSymlinkSync-YDRbg9hX.cjs"),r=require("./packem_shared/LF-D4BqIfQm.cjs"),y=require("./packem_shared/collect-4au76gDu.cjs"),S=require("./packem_shared/collectSync-CbKwt8rz.cjs"),q=require("./packem_shared/findUp-DWKie4QO.cjs"),a=require("./packem_shared/findUpSync-Y1Jpw0nr.cjs"),m=require("./packem_shared/walk-BJgnJy5d.cjs"),F=require("./packem_shared/walkSync-DYawhxUA.cjs"),d=require("./packem_shared/isAccessible-C58XjRjT.cjs"),w=require("./packem_shared/isAccessibleSync-9njSth1z.cjs"),O=require("./packem_shared/readFile-DIQKBQ0d.cjs"),_=require("./packem_shared/readFileSync-CTVwduD2.cjs"),k=require("./packem_shared/readJson-Cf5QS1cQ.cjs"),L=require("./packem_shared/readJsonSync-Dzu0ErIN.cjs"),D=require("./packem_shared/readYaml-D4PbAXZD.cjs"),p=require("./packem_shared/readYamlSync-Bnyr8iGt.cjs"),K=require("./packem_shared/emptyDir-DKxQHQQb.cjs"),J=require("./packem_shared/emptyDirSync-CLM_zyIb.cjs"),Y=require("./packem_shared/remove-B-9MI2l5.cjs"),f=require("./packem_shared/removeSync-CJPR6M7V.cjs"),b=require("./packem_shared/writeFile-z1NYn8jk.cjs"),U=require("./packem_shared/writeFileSync-rAuaAA6w.cjs"),v=require("./packem_shared/writeJson-BW5_Vr5i.cjs"),P=require("./packem_shared/writeJsonSync-BkoMtNUG.cjs"),A=require("./packem_shared/writeYaml-BO_bcnqK.cjs"),R=require("./packem_shared/writeYamlSync-DozAaY0A.cjs");exports.FIND_UP_STOP=e.FIND_UP_STOP;exports.F_OK=e.F_OK;exports.R_OK=e.R_OK;exports.W_OK=e.W_OK;exports.X_OK=e.X_OK;exports.ensureDir=n;exports.ensureDirSync=i;exports.ensureFile=c;exports.ensureFileSync=s;exports.ensureLink=t;exports.ensureLinkSync=o;exports.ensureSymlink=u;exports.ensureSymlinkSync=l;exports.CRLF=r.CRLF;exports.EOL=r.EOL;exports.LF=r.LF;exports.detect=r.detect;exports.format=r.format;exports.collect=y;exports.collectSync=S;exports.findUp=q;exports.findUpSync=a;exports.walk=m;exports.walkSync=F;exports.isAccessible=d;exports.isAccessibleSync=w;exports.readFile=O;exports.readFileSync=_;exports.readJson=k;exports.readJsonSync=L;exports.readYaml=D;exports.readYamlSync=p;exports.emptyDir=K;exports.emptyDirSync=J;exports.remove=Y;exports.removeSync=f;exports.writeFile=b;exports.writeFileSync=U;exports.writeJson=v;exports.writeJsonSync=P;exports.writeYaml=A;exports.writeYamlSync=R;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalkOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { W as WalkOptions, F as FindUpName, a as FindUpOptions, b as FindUpNameSync, c as WalkEntry, R as ReadFileOptions, C as ContentType, J as JsonValue, d as ReadJsonOptions, e as JsonReviver, f as ReadYamlOptions, Y as YamlReviver, E as EmptyDirOptions, g as WriteFileOptions, h as WriteJsonOptions, i as YamlReplacer } from './packem_shared/observable-like.d-BIpsmTbZ.cjs';
|
|
2
|
+
export { n as CodeFrameLocation, k as FIND_UP_STOP, j as F_OK, o as JsonReplacer, l as R_OK, p as ReadFileEncoding, m as W_OK, X as X_OK } from './packem_shared/observable-like.d-BIpsmTbZ.cjs';
|
|
3
3
|
import { symlink } from 'node:fs';
|
|
4
4
|
import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
|
|
5
5
|
|
|
@@ -29,9 +29,9 @@ declare const collect: (directory: string, options?: WalkOptions) => Promise<str
|
|
|
29
29
|
|
|
30
30
|
declare const collectSync: (directory: string, options?: WalkOptions) => string[];
|
|
31
31
|
|
|
32
|
-
declare const findUp: (name:
|
|
32
|
+
declare const findUp: (name: FindUpName, options?: FindUpOptions) => Promise<string | undefined>;
|
|
33
33
|
|
|
34
|
-
declare const findUpSync: (name:
|
|
34
|
+
declare const findUpSync: (name: FindUpNameSync, options?: FindUpOptions) => string | undefined;
|
|
35
35
|
|
|
36
36
|
declare function walk(directory: URL | string, { extensions, followSymlinks, includeDirs: includeDirectories, includeFiles, includeSymlinks, match, maxDepth, skip, }?: WalkOptions): AsyncIterableIterator<WalkEntry>;
|
|
37
37
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalkOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { W as WalkOptions, F as FindUpName, a as FindUpOptions, b as FindUpNameSync, c as WalkEntry, R as ReadFileOptions, C as ContentType, J as JsonValue, d as ReadJsonOptions, e as JsonReviver, f as ReadYamlOptions, Y as YamlReviver, E as EmptyDirOptions, g as WriteFileOptions, h as WriteJsonOptions, i as YamlReplacer } from './packem_shared/observable-like.d-BIpsmTbZ.mjs';
|
|
2
|
+
export { n as CodeFrameLocation, k as FIND_UP_STOP, j as F_OK, o as JsonReplacer, l as R_OK, p as ReadFileEncoding, m as W_OK, X as X_OK } from './packem_shared/observable-like.d-BIpsmTbZ.mjs';
|
|
3
3
|
import { symlink } from 'node:fs';
|
|
4
4
|
import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
|
|
5
5
|
|
|
@@ -29,9 +29,9 @@ declare const collect: (directory: string, options?: WalkOptions) => Promise<str
|
|
|
29
29
|
|
|
30
30
|
declare const collectSync: (directory: string, options?: WalkOptions) => string[];
|
|
31
31
|
|
|
32
|
-
declare const findUp: (name:
|
|
32
|
+
declare const findUp: (name: FindUpName, options?: FindUpOptions) => Promise<string | undefined>;
|
|
33
33
|
|
|
34
|
-
declare const findUpSync: (name:
|
|
34
|
+
declare const findUpSync: (name: FindUpNameSync, options?: FindUpOptions) => string | undefined;
|
|
35
35
|
|
|
36
36
|
declare function walk(directory: URL | string, { extensions, followSymlinks, includeDirs: includeDirectories, includeFiles, includeSymlinks, match, maxDepth, skip, }?: WalkOptions): AsyncIterableIterator<WalkEntry>;
|
|
37
37
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalkOptions,
|
|
2
|
-
export {
|
|
1
|
+
import { W as WalkOptions, F as FindUpName, a as FindUpOptions, b as FindUpNameSync, c as WalkEntry, R as ReadFileOptions, C as ContentType, J as JsonValue, d as ReadJsonOptions, e as JsonReviver, f as ReadYamlOptions, Y as YamlReviver, E as EmptyDirOptions, g as WriteFileOptions, h as WriteJsonOptions, i as YamlReplacer } from './packem_shared/observable-like.d-BIpsmTbZ.d.mjs';
|
|
2
|
+
export { n as CodeFrameLocation, k as FIND_UP_STOP, j as F_OK, o as JsonReplacer, l as R_OK, p as ReadFileEncoding, m as W_OK, X as X_OK } from './packem_shared/observable-like.d-BIpsmTbZ.d.mjs';
|
|
3
3
|
import { symlink } from 'node:fs';
|
|
4
4
|
import { CreateNodeOptions, DocumentOptions, ParseOptions, SchemaOptions, ToStringOptions } from 'yaml';
|
|
5
5
|
|
|
@@ -29,9 +29,9 @@ declare const collect: (directory: string, options?: WalkOptions) => Promise<str
|
|
|
29
29
|
|
|
30
30
|
declare const collectSync: (directory: string, options?: WalkOptions) => string[];
|
|
31
31
|
|
|
32
|
-
declare const findUp: (name:
|
|
32
|
+
declare const findUp: (name: FindUpName, options?: FindUpOptions) => Promise<string | undefined>;
|
|
33
33
|
|
|
34
|
-
declare const findUpSync: (name:
|
|
34
|
+
declare const findUpSync: (name: FindUpNameSync, options?: FindUpOptions) => string | undefined;
|
|
35
35
|
|
|
36
36
|
declare function walk(directory: URL | string, { extensions, followSymlinks, includeDirs: includeDirectories, includeFiles, includeSymlinks, match, maxDepth, skip, }?: WalkOptions): AsyncIterableIterator<WalkEntry>;
|
|
37
37
|
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FIND_UP_STOP as t,F_OK as a,R_OK as o,W_OK as f,X_OK as l}from"./packem_shared/F_OK-CiLqIeYK.mjs";import{default as m}from"./packem_shared/ensureDir-BtvxsJiS.mjs";import{default as u}from"./packem_shared/ensureDirSync-bGe0QB7d.mjs";import{default as n}from"./packem_shared/ensureFile-C46R6-4l.mjs";import{default as i}from"./packem_shared/ensureFileSync-CwYTIP4G.mjs";import{default as y}from"./packem_shared/ensureLink-63XWiA3I.mjs";import{default as F}from"./packem_shared/ensureLinkSync-D2LVObKd.mjs";import{default as k}from"./packem_shared/ensureSymlink-D36fS4KE.mjs";import{default as _}from"./packem_shared/ensureSymlinkSync-PvWVgeXc.mjs";import{CRLF as L,EOL as J,LF as K,detect as Y,format as U}from"./packem_shared/LF-Dbx0i6a7.mjs";import{default as v}from"./packem_shared/collect-CRzGiRGg.mjs";import{default as P}from"./packem_shared/collectSync-BE8DAOke.mjs";import{default as C}from"./packem_shared/findUp-
|
|
1
|
+
import{FIND_UP_STOP as t,F_OK as a,R_OK as o,W_OK as f,X_OK as l}from"./packem_shared/F_OK-CiLqIeYK.mjs";import{default as m}from"./packem_shared/ensureDir-BtvxsJiS.mjs";import{default as u}from"./packem_shared/ensureDirSync-bGe0QB7d.mjs";import{default as n}from"./packem_shared/ensureFile-C46R6-4l.mjs";import{default as i}from"./packem_shared/ensureFileSync-CwYTIP4G.mjs";import{default as y}from"./packem_shared/ensureLink-63XWiA3I.mjs";import{default as F}from"./packem_shared/ensureLinkSync-D2LVObKd.mjs";import{default as k}from"./packem_shared/ensureSymlink-D36fS4KE.mjs";import{default as _}from"./packem_shared/ensureSymlinkSync-PvWVgeXc.mjs";import{CRLF as L,EOL as J,LF as K,detect as Y,format as U}from"./packem_shared/LF-Dbx0i6a7.mjs";import{default as v}from"./packem_shared/collect-CRzGiRGg.mjs";import{default as P}from"./packem_shared/collectSync-BE8DAOke.mjs";import{default as C}from"./packem_shared/findUp-DuKqk_9D.mjs";import{default as I}from"./packem_shared/findUpSync-Cal_fll7.mjs";import{default as T}from"./packem_shared/walk-DH-95i_B.mjs";import{default as X}from"./packem_shared/walkSync-D4zvt_kM.mjs";import{default as h}from"./packem_shared/isAccessible-vmOjbVOF.mjs";import{default as q}from"./packem_shared/isAccessibleSync-BxoK0UkJ.mjs";import{default as B}from"./packem_shared/readFile-D6U3MP6g.mjs";import{default as H}from"./packem_shared/readFileSync-Bao-E5R8.mjs";import{default as Q}from"./packem_shared/readJson-fgrin-Wb.mjs";import{default as Z}from"./packem_shared/readJsonSync-D2_W7t7m.mjs";import{default as ee}from"./packem_shared/readYaml-BYMJDJU0.mjs";import{default as te}from"./packem_shared/readYamlSync-CdYj75zz.mjs";import{default as oe}from"./packem_shared/emptyDir-D2m8OP8u.mjs";import{default as le}from"./packem_shared/emptyDirSync-CZNcW4wc.mjs";import{default as me}from"./packem_shared/remove-DzfvbZOm.mjs";import{default as ue}from"./packem_shared/removeSync-D165rXSn.mjs";import{default as ne}from"./packem_shared/writeFile-DwkUvAF-.mjs";import{default as ie}from"./packem_shared/writeFileSync-DYhY33yC.mjs";import{default as ye}from"./packem_shared/writeJson-DI_vpDVy.mjs";import{default as Fe}from"./packem_shared/writeJsonSync-DLo6ZPEV.mjs";import{default as ke}from"./packem_shared/writeYaml-B4jtxffY.mjs";import{default as _e}from"./packem_shared/writeYamlSync-BG69YBbH.mjs";export{L as CRLF,J as EOL,t as FIND_UP_STOP,a as F_OK,K as LF,o as R_OK,f as W_OK,l as X_OK,v as collect,P as collectSync,Y as detect,oe as emptyDir,le as emptyDirSync,m as ensureDir,u as ensureDirSync,n as ensureFile,i as ensureFileSync,y as ensureLink,F as ensureLinkSync,k as ensureSymlink,_ as ensureSymlinkSync,C as findUp,I as findUpSync,U as format,h as isAccessible,q as isAccessibleSync,B as readFile,H as readFileSync,Q as readJson,Z as readJsonSync,ee as readYaml,te as readYamlSync,me as remove,ue as removeSync,T as walk,X as walkSync,ne as writeFile,ie as writeFileSync,ye as writeJson,Fe as writeJsonSync,ke as writeYaml,_e as writeYamlSync};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var h=Object.defineProperty;var f=(t,r)=>h(t,"name",{value:r,configurable:!0});const l=require("node:fs/promises"),v=require("node:url"),s=require("@visulima/path"),u=require("@visulima/path/utils"),A=require("./F_OK-B8R_JA-Q.cjs");var P=Object.defineProperty,y=f((t,r)=>P(t,"name",{value:r,configurable:!0}),"s");const q=y(async(t,r={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const p=r.cwd?u.toPath(r.cwd):process.cwd();let o=s.resolve(p);const{root:n}=s.parse(o),w=u.toPath(r.stopAt??n),d=s.resolve(o,w),i=r.type??"file",m=y(async function(e){return typeof t=="function"?[await t(e)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");r.allowSymlinks===void 0&&(r.allowSymlinks=!0);const g=r.allowSymlinks?l.stat:l.lstat;for(;o&&o!==d&&o!==n;){for await(let e of await m(o)){if(e===A.FIND_UP_STOP)return;if(e===void 0)continue;Buffer.isBuffer(e)?e=e.toString():e instanceof URL&&(e=v.fileURLToPath(e));const a=s.isAbsolute(e)?e:s.resolve(o,e);try{const c=await g(a);if(i==="file"&&c.isFile()||i==="directory"&&c.isDirectory())return a}catch{}}o=s.dirname(o)}},"findUp");module.exports=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=Object.defineProperty;var c=(t,r)=>g(t,"name",{value:r,configurable:!0});import{stat as h,lstat as v}from"node:fs/promises";import{fileURLToPath as A}from"node:url";import{resolve as i,parse as P,isAbsolute as S,dirname as b}from"@visulima/path";import{toPath as l}from"@visulima/path/utils";import{FIND_UP_STOP as k}from"./F_OK-CiLqIeYK.mjs";var T=Object.defineProperty,y=c((t,r)=>T(t,"name",{value:r,configurable:!0}),"s");const R=y(async(t,r={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const m=r.cwd?l(r.cwd):process.cwd();let e=i(m);const{root:n}=P(e),p=l(r.stopAt??n),u=i(e,p),a=r.type??"file",w=y(async function(o){return typeof t=="function"?[await t(o)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");r.allowSymlinks===void 0&&(r.allowSymlinks=!0);const d=r.allowSymlinks?h:v;for(;e&&e!==u&&e!==n;){for await(let o of await w(e)){if(o===k)return;if(o===void 0)continue;Buffer.isBuffer(o)?o=o.toString():o instanceof URL&&(o=A(o));const s=S(o)?o:i(e,o);try{const f=await d(s);if(a==="file"&&f.isFile()||a==="directory"&&f.isDirectory())return s}catch{}}e=b(e)}},"findUp");export{R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var w=Object.defineProperty;var a=(t,r)=>w(t,"name",{value:r,configurable:!0});import{statSync as S,lstatSync as h}from"node:fs";import{fileURLToPath as v}from"node:url";import{resolve as n,parse as A,isAbsolute as P,dirname as b}from"@visulima/path";import{toPath as l}from"@visulima/path/utils";import{FIND_UP_STOP as k}from"./F_OK-CiLqIeYK.mjs";var T=Object.defineProperty,y=a((t,r)=>T(t,"name",{value:r,configurable:!0}),"o");const R=y((t,r={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const m=r.cwd?l(r.cwd):process.cwd();let e=n(m);const{root:i}=A(e),p=l(r.stopAt??i),u=n(e,p),f=r.type??"file",d=y(function(o){return typeof t=="function"?[t(o)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");r.allowSymlinks===void 0&&(r.allowSymlinks=!0);const g=r.allowSymlinks?S:h;for(;e&&e!==u&&e!==i;){for(let o of d(e)){if(o===k)return;if(o===void 0)continue;Buffer.isBuffer(o)?o=o.toString():o instanceof URL&&(o=v(o));const s=P(o)?o:n(e,o);try{const c=g(s);if(f==="file"&&c.isFile()||f==="directory"&&c.isDirectory())return s}catch{}}e=b(e)}},"findUpSync");export{R as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var v=Object.defineProperty;var a=(t,o)=>v(t,"name",{value:o,configurable:!0});const l=require("node:fs"),w=require("node:url"),n=require("@visulima/path"),u=require("@visulima/path/utils"),S=require("./F_OK-B8R_JA-Q.cjs");var A=Object.defineProperty,y=a((t,o)=>A(t,"name",{value:o,configurable:!0}),"o");const P=y((t,o={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const p=o.cwd?u.toPath(o.cwd):process.cwd();let r=n.resolve(p);const{root:s}=n.parse(r),d=u.toPath(o.stopAt??s),g=n.resolve(r,d),i=o.type??"file",m=y(function(e){return typeof t=="function"?[t(e)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]},"getMatchers");o.allowSymlinks===void 0&&(o.allowSymlinks=!0);const h=o.allowSymlinks?l.statSync:l.lstatSync;for(;r&&r!==g&&r!==s;){for(let e of m(r)){if(e===S.FIND_UP_STOP)return;if(e===void 0)continue;Buffer.isBuffer(e)?e=e.toString():e instanceof URL&&(e=w.fileURLToPath(e));const c=n.isAbsolute(e)?e:n.resolve(r,e);try{const f=h(c);if(i==="file"&&f.isFile()||i==="directory"&&f.isDirectory())return c}catch{}}r=n.dirname(r)}},"findUpSync");module.exports=P;
|
package/dist/packem_shared/{observable-like.d-CpT5ICZl.d.cts → observable-like.d-BIpsmTbZ.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dirent } from 'node:fs';
|
|
1
|
+
import { Dirent, PathLike } from 'node:fs';
|
|
2
2
|
import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from 'yaml';
|
|
3
3
|
|
|
4
4
|
declare const F_OK = 0;
|
|
@@ -66,11 +66,13 @@ type WriteJsonOptions = WriteFileOptions & {
|
|
|
66
66
|
stringify?: (data: unknown, replacer: JsonReplacer, space: number | string | undefined) => string;
|
|
67
67
|
};
|
|
68
68
|
type FindUpOptions = {
|
|
69
|
+
allowSymlinks?: boolean;
|
|
69
70
|
cwd?: URL | string;
|
|
70
71
|
stopAt?: URL | string;
|
|
71
72
|
type?: "directory" | "file";
|
|
72
73
|
};
|
|
73
|
-
type
|
|
74
|
+
type FindUpName = string[] | string | ((directory: PathLike) => PathLike | Promise<PathLike | typeof FIND_UP_STOP> | typeof FIND_UP_STOP);
|
|
75
|
+
type FindUpNameSync = string[] | string | ((directory: PathLike) => PathLike | typeof FIND_UP_STOP);
|
|
74
76
|
type EmptyDirOptions = {
|
|
75
77
|
maxRetries?: number | undefined;
|
|
76
78
|
retryDelay?: number | undefined;
|
|
@@ -117,4 +119,4 @@ declare global {
|
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
export { type ContentType as C, type EmptyDirOptions as E, type
|
|
122
|
+
export { type ContentType as C, type EmptyDirOptions as E, type FindUpName as F, type JsonValue 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 JsonReviver as e, type ReadYamlOptions as f, type WriteFileOptions as g, type WriteJsonOptions as h, type YamlReplacer as i, F_OK as j, FIND_UP_STOP as k, R_OK as l, W_OK as m, type CodeFrameLocation as n, type JsonReplacer as o, type ReadFileEncoding as p, type CodeFrameOptions as q };
|
package/dist/packem_shared/{observable-like.d-CpT5ICZl.d.mjs → observable-like.d-BIpsmTbZ.d.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dirent } from 'node:fs';
|
|
1
|
+
import { Dirent, PathLike } from 'node:fs';
|
|
2
2
|
import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from 'yaml';
|
|
3
3
|
|
|
4
4
|
declare const F_OK = 0;
|
|
@@ -66,11 +66,13 @@ type WriteJsonOptions = WriteFileOptions & {
|
|
|
66
66
|
stringify?: (data: unknown, replacer: JsonReplacer, space: number | string | undefined) => string;
|
|
67
67
|
};
|
|
68
68
|
type FindUpOptions = {
|
|
69
|
+
allowSymlinks?: boolean;
|
|
69
70
|
cwd?: URL | string;
|
|
70
71
|
stopAt?: URL | string;
|
|
71
72
|
type?: "directory" | "file";
|
|
72
73
|
};
|
|
73
|
-
type
|
|
74
|
+
type FindUpName = string[] | string | ((directory: PathLike) => PathLike | Promise<PathLike | typeof FIND_UP_STOP> | typeof FIND_UP_STOP);
|
|
75
|
+
type FindUpNameSync = string[] | string | ((directory: PathLike) => PathLike | typeof FIND_UP_STOP);
|
|
74
76
|
type EmptyDirOptions = {
|
|
75
77
|
maxRetries?: number | undefined;
|
|
76
78
|
retryDelay?: number | undefined;
|
|
@@ -117,4 +119,4 @@ declare global {
|
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
export { type ContentType as C, type EmptyDirOptions as E, type
|
|
122
|
+
export { type ContentType as C, type EmptyDirOptions as E, type FindUpName as F, type JsonValue 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 JsonReviver as e, type ReadYamlOptions as f, type WriteFileOptions as g, type WriteJsonOptions as h, type YamlReplacer as i, F_OK as j, FIND_UP_STOP as k, R_OK as l, W_OK as m, type CodeFrameLocation as n, type JsonReplacer as o, type ReadFileEncoding as p, type CodeFrameOptions as q };
|
package/dist/packem_shared/{observable-like.d-CpT5ICZl.d.mts → observable-like.d-BIpsmTbZ.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dirent } from 'node:fs';
|
|
1
|
+
import { Dirent, PathLike } from 'node:fs';
|
|
2
2
|
import { DocumentOptions, ParseOptions, SchemaOptions, ToJSOptions } from 'yaml';
|
|
3
3
|
|
|
4
4
|
declare const F_OK = 0;
|
|
@@ -66,11 +66,13 @@ type WriteJsonOptions = WriteFileOptions & {
|
|
|
66
66
|
stringify?: (data: unknown, replacer: JsonReplacer, space: number | string | undefined) => string;
|
|
67
67
|
};
|
|
68
68
|
type FindUpOptions = {
|
|
69
|
+
allowSymlinks?: boolean;
|
|
69
70
|
cwd?: URL | string;
|
|
70
71
|
stopAt?: URL | string;
|
|
71
72
|
type?: "directory" | "file";
|
|
72
73
|
};
|
|
73
|
-
type
|
|
74
|
+
type FindUpName = string[] | string | ((directory: PathLike) => PathLike | Promise<PathLike | typeof FIND_UP_STOP> | typeof FIND_UP_STOP);
|
|
75
|
+
type FindUpNameSync = string[] | string | ((directory: PathLike) => PathLike | typeof FIND_UP_STOP);
|
|
74
76
|
type EmptyDirOptions = {
|
|
75
77
|
maxRetries?: number | undefined;
|
|
76
78
|
retryDelay?: number | undefined;
|
|
@@ -117,4 +119,4 @@ declare global {
|
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
121
|
|
|
120
|
-
export { type ContentType as C, type EmptyDirOptions as E, type
|
|
122
|
+
export { type ContentType as C, type EmptyDirOptions as E, type FindUpName as F, type JsonValue 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 JsonReviver as e, type ReadYamlOptions as f, type WriteFileOptions as g, type WriteJsonOptions as h, type YamlReplacer as i, F_OK as j, FIND_UP_STOP as k, R_OK as l, W_OK as m, type CodeFrameLocation as n, type JsonReplacer as o, type ReadFileEncoding as p, type CodeFrameOptions as q };
|
package/dist/utils.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.cjs';
|
|
2
|
-
import { J as JsonValue,
|
|
2
|
+
import { J as JsonValue, q as CodeFrameOptions, e as JsonReviver } from './packem_shared/observable-like.d-BIpsmTbZ.cjs';
|
|
3
3
|
export { toPath } from '@visulima/path/utils';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'yaml';
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.mjs';
|
|
2
|
-
import { J as JsonValue,
|
|
2
|
+
import { J as JsonValue, q as CodeFrameOptions, e as JsonReviver } from './packem_shared/observable-like.d-BIpsmTbZ.mjs';
|
|
3
3
|
export { toPath } from '@visulima/path/utils';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'yaml';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { J as JSONError } from './packem_shared/json-error-ZPgZIXcg.d.mjs';
|
|
2
|
-
import { J as JsonValue,
|
|
2
|
+
import { J as JsonValue, q as CodeFrameOptions, e as JsonReviver } from './packem_shared/observable-like.d-BIpsmTbZ.d.mjs';
|
|
3
3
|
export { toPath } from '@visulima/path/utils';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'yaml';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var g=Object.defineProperty;var f=(r,t)=>g(r,"name",{value:t,configurable:!0});const h=require("node:fs/promises"),i=require("@visulima/path"),u=require("@visulima/path/utils"),v=require("./F_OK-B8R_JA-Q.cjs");var m=Object.defineProperty,y=f((r,t)=>m(r,"name",{value:t,configurable:!0}),"n");const A=y(async(r,t={})=>{if(typeof r!="string"&&!Array.isArray(r)&&typeof r!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const p=t.cwd?u.toPath(t.cwd):process.cwd();let e=i.resolve(p);const{root:s}=i.parse(e),l=u.toPath(t.stopAt??s),d=i.resolve(e,l),n=t.type??"file",w=y(async function(o){return typeof r=="function"?[await r(o)]:typeof r=="string"?[r]:Array.isArray(r)?r:[r]},"getMatchers");for(;e&&e!==d&&e!==s;){for await(const o of await w(e)){if(o===v.FIND_UP_STOP)return;if(o===void 0)continue;const a=i.isAbsolute(o)?o:i.resolve(e,o);try{const c=await h.stat(a);if(n==="file"&&c.isFile()||n==="directory"&&c.isDirectory())return a}catch{}}e=i.dirname(e)}},"findUp");module.exports=A;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var w=Object.defineProperty;var c=(r,o)=>w(r,"name",{value:o,configurable:!0});import{stat as g}from"node:fs/promises";import{resolve as i,parse as h,isAbsolute as A,dirname as v}from"@visulima/path";import{toPath as y}from"@visulima/path/utils";import{FIND_UP_STOP as b}from"./F_OK-CiLqIeYK.mjs";var P=Object.defineProperty,p=c((r,o)=>P(r,"name",{value:o,configurable:!0}),"n");const _=p(async(r,o={})=>{if(typeof r!="string"&&!Array.isArray(r)&&typeof r!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const u=o.cwd?y(o.cwd):process.cwd();let t=i(u);const{root:n}=h(t),m=y(o.stopAt??n),d=i(t,m),a=o.type??"file",l=p(async function(e){return typeof r=="function"?[await r(e)]:typeof r=="string"?[r]:Array.isArray(r)?r:[r]},"getMatchers");for(;t&&t!==d&&t!==n;){for await(const e of await l(t)){if(e===b)return;if(e===void 0)continue;const s=A(e)?e:i(t,e);try{const f=await g(s);if(a==="file"&&f.isFile()||a==="directory"&&f.isDirectory())return s}catch{}}t=v(t)}},"findUp");export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var a=(r,t)=>h(r,"name",{value:t,configurable:!0});const v=require("node:fs"),n=require("@visulima/path"),u=require("@visulima/path/utils"),A=require("./F_OK-B8R_JA-Q.cjs");var m=Object.defineProperty,y=a((r,t)=>m(r,"name",{value:t,configurable:!0}),"o");const w=y((r,t={})=>{if(typeof r!="string"&&!Array.isArray(r)&&typeof r!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const p=t.cwd?u.toPath(t.cwd):process.cwd();let e=n.resolve(p);const{root:s}=n.parse(e),l=u.toPath(t.stopAt??s),d=n.resolve(e,l),i=t.type??"file",g=y(function(o){return typeof r=="function"?[r(o)]:typeof r=="string"?[r]:Array.isArray(r)?r:[r]},"getMatchers");for(;e&&e!==d&&e!==s;){for(const o of g(e)){if(o===A.FIND_UP_STOP)return;if(o===void 0)continue;const c=n.isAbsolute(o)?o:n.resolve(e,o);try{const f=v.statSync(c);if(i==="file"&&f.isFile()||i==="directory"&&f.isDirectory())return c}catch{}}e=n.dirname(e)}},"findUpSync");module.exports=w;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.defineProperty;var a=(r,t)=>g(r,"name",{value:t,configurable:!0});import{statSync as h}from"node:fs";import{resolve as i,parse as A,isAbsolute as v,dirname as w}from"@visulima/path";import{toPath as p}from"@visulima/path/utils";import{FIND_UP_STOP as b}from"./F_OK-CiLqIeYK.mjs";var P=Object.defineProperty,y=a((r,t)=>P(r,"name",{value:t,configurable:!0}),"o");const U=y((r,t={})=>{if(typeof r!="string"&&!Array.isArray(r)&&typeof r!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const u=t.cwd?p(t.cwd):process.cwd();let o=i(u);const{root:n}=A(o),m=p(t.stopAt??n),d=i(o,m),f=t.type??"file",l=y(function(e){return typeof r=="function"?[r(e)]:typeof r=="string"?[r]:Array.isArray(r)?r:[r]},"getMatchers");for(;o&&o!==d&&o!==n;){for(const e of l(o)){if(e===b)return;if(e===void 0)continue;const s=v(e)?e:i(o,e);try{const c=h(s);if(f==="file"&&c.isFile()||f==="directory"&&c.isDirectory())return s}catch{}}o=w(o)}},"findUpSync");export{U as default};
|