@stryke/fs 0.11.1 â 0.11.3
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/README.md +2 -1
- package/dist/list-files.cjs +11 -7
- package/dist/list-files.mjs +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ This package is part of Storm Software's **đŠī¸ Stryke** monorepo. Stryke pac
|
|
|
22
22
|
|
|
23
23
|
<h3 align="center">đģ Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
24
24
|
|
|
25
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
26
26
|
|
|
27
27
|
> [!IMPORTANT] This repository, and the apps, libraries, and tools contained
|
|
28
28
|
> within, is still in it's initial development phase. As a result, bugs and
|
|
@@ -53,6 +53,7 @@ provides a more modern and functional approach to working with the file system.
|
|
|
53
53
|
|
|
54
54
|
<!-- START doctoc -->
|
|
55
55
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
56
|
+
|
|
56
57
|
## Table of Contents
|
|
57
58
|
|
|
58
59
|
- [Installing](#installing)
|
package/dist/list-files.cjs
CHANGED
|
@@ -9,16 +9,20 @@ var _joinPaths = require("@stryke/path/join-paths");
|
|
|
9
9
|
var _promises = require("node:fs/promises");
|
|
10
10
|
var _picomatch = _interopRequireDefault(require("picomatch"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
async function listFiles(
|
|
12
|
+
async function listFiles(s, a) {
|
|
13
13
|
const o = [],
|
|
14
|
+
n = (0, _picomatch.default)(s, {
|
|
15
|
+
dot: !0,
|
|
16
|
+
...a
|
|
17
|
+
}),
|
|
14
18
|
r = async t => {
|
|
15
|
-
if (!(
|
|
16
|
-
const
|
|
17
|
-
await Promise.all(
|
|
18
|
-
const i = (0, _joinPaths.joinPaths)(t,
|
|
19
|
-
(
|
|
19
|
+
if (!n(t)) {
|
|
20
|
+
const e = await (0, _promises.readdir)(t);
|
|
21
|
+
await Promise.all(e.map(async c => {
|
|
22
|
+
const i = (0, _joinPaths.joinPaths)(t, c);
|
|
23
|
+
n(i) || ((0, _isFile.isDirectory)(i) ? await r(i) : o.push(i));
|
|
20
24
|
}));
|
|
21
25
|
}
|
|
22
26
|
};
|
|
23
|
-
return await r(
|
|
27
|
+
return await r(s), o;
|
|
24
28
|
}
|
package/dist/list-files.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isDirectory as
|
|
1
|
+
import{isDirectory as m}from"@stryke/path/is-file";import{joinPaths as p}from"@stryke/path/join-paths";import{readdir as f}from"node:fs/promises";import l from"picomatch";export async function listFiles(s,a){const o=[],n=l(s,{dot:!0,...a}),r=async t=>{if(!n(t)){const e=await f(t);await Promise.all(e.map(async c=>{const i=p(t,c);n(i)||(m(i)?await r(i):o.push(i))}))}};return await r(s),o}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stryke/fs",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.",
|
|
6
6
|
"repository": {
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"nanotar": "^0.2.0",
|
|
19
19
|
"picomatch": "^4.0.2",
|
|
20
20
|
"semver": "7.7.1",
|
|
21
|
-
"@stryke/json": "^0.7.
|
|
22
|
-
"@stryke/path": "^0.4.
|
|
23
|
-
"@stryke/type-checks": "^0.3.
|
|
24
|
-
"@stryke/types": "^0.8.
|
|
21
|
+
"@stryke/json": "^0.7.1",
|
|
22
|
+
"@stryke/path": "^0.4.8",
|
|
23
|
+
"@stryke/type-checks": "^0.3.1",
|
|
24
|
+
"@stryke/types": "^0.8.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^22.13.1",
|