@owservable/folders 3.1.3 โ†’ 3.1.7

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.
Files changed (3) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +143 -143
  3. package/package.json +15 -15
package/LICENSE CHANGED
@@ -1,24 +1,24 @@
1
- This is free and unencumbered software released into the public domain.
2
-
3
- Anyone is free to copy, modify, publish, use, compile, sell, or
4
- distribute this software, either in source code form or as a compiled
5
- binary, for any purpose, commercial or non-commercial, and by any
6
- means.
7
-
8
- In jurisdictions that recognize copyright laws, the author or authors
9
- of this software dedicate any and all copyright interest in the
10
- software to the public domain. We make this dedication for the benefit
11
- of the public at large and to the detriment of our heirs and
12
- successors. We intend this dedication to be an overt act of
13
- relinquishment in perpetuity of all present and future rights to this
14
- software under copyright law.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
- IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
23
-
24
- For more information, please refer to <https://unlicense.org>
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org>
package/README.md CHANGED
@@ -1,143 +1,143 @@
1
- ![owservable](https://avatars0.githubusercontent.com/u/87773159?s=75)
2
-
3
- # @owservable/folders
4
-
5
- [๐Ÿ“– API Docs](https://owservable.github.io/folders/docs/) ยท [โœ… Coverage](https://owservable.github.io/folders/coverage/)
6
-
7
- A TypeScript utility library for file system operations, providing functions to work with folders and files recursively.
8
-
9
- ## ๐Ÿš€ Features
10
-
11
- - Recursively add files from folders
12
- - List subfolders by name with filtering
13
- - Get files from specific subfolders
14
- - Written in TypeScript with full type support
15
- - Lodash integration for efficient data manipulation
16
-
17
- ## ๐Ÿ“ฆ Installation
18
-
19
- ```bash
20
- npm install @owservable/folders
21
- ```
22
-
23
- or
24
-
25
- ```bash
26
- yarn add @owservable/folders
27
- ```
28
-
29
- or
30
-
31
- ```bash
32
- pnpm add @owservable/folders
33
- ```
34
-
35
- ## ๐Ÿ”ง Usage
36
-
37
- ### Basic Import
38
-
39
- ```typescript
40
- import {
41
- addFilesFromFolder,
42
- listSubfoldersByName,
43
- listSubfoldersFilesByFolderName
44
- } from '@owservable/folders';
45
- ```
46
-
47
- ### Adding Files from Folder Recursively
48
-
49
- ```typescript
50
- import { addFilesFromFolder } from '@owservable/folders';
51
-
52
- // Initialize empty array to collect files
53
- const files: string[] = [];
54
-
55
- // Add all files from a folder recursively
56
- const allFiles = addFilesFromFolder(files, '/path/to/folder');
57
-
58
- console.log(allFiles); // Array of all file paths
59
- ```
60
-
61
- ### Listing Subfolders by Name
62
-
63
- ```typescript
64
- import { listSubfoldersByName } from '@owservable/folders';
65
-
66
- // Get all subfolders with specific name
67
- const subfolders = listSubfoldersByName('/path/to/parent', 'targetFolderName');
68
-
69
- console.log(subfolders); // Array of matching subfolder paths
70
- ```
71
-
72
- ### Getting Files from Specific Subfolders
73
-
74
- ```typescript
75
- import { listSubfoldersFilesByFolderName } from '@owservable/folders';
76
-
77
- // Get all files from subfolders with specific name
78
- const files = listSubfoldersFilesByFolderName('/path/to/parent', 'targetFolderName');
79
-
80
- console.log(files); // Array of file paths from matching subfolders
81
- ```
82
-
83
- ## ๐Ÿ“š API Documentation
84
-
85
- ### `addFilesFromFolder(files: string[], folder: string): string[]`
86
-
87
- Recursively adds all files from a folder and its subfolders to the provided array.
88
-
89
- **Parameters:**
90
- - `files`: Array to store file paths
91
- - `folder`: Path to the folder to scan
92
-
93
- **Returns:** Array of file paths
94
-
95
- ### `listSubfoldersByName(folder: string, name: string): string[]`
96
-
97
- Lists all subfolders with a specific name within a given folder.
98
-
99
- **Parameters:**
100
- - `folder`: Path to the parent folder
101
- - `name`: Name of subfolders to find
102
-
103
- **Returns:** Array of matching subfolder paths
104
-
105
- ### `listSubfoldersFilesByFolderName(folder: string, name: string): string[]`
106
-
107
- Gets all files from subfolders that match a specific name.
108
-
109
- **Parameters:**
110
- - `folder`: Path to the parent folder
111
- - `name`: Name of subfolders to search in
112
-
113
- **Returns:** Array of file paths from matching subfolders
114
-
115
- ## ๐Ÿ—๏ธ Requirements
116
-
117
- - Node.js >= 20
118
- - TypeScript support
119
-
120
- ## ๐Ÿงช Testing
121
-
122
- ```bash
123
- npm test
124
- ```
125
-
126
- ## ๐Ÿ“– Documentation
127
-
128
- - **TypeDoc Documentation**: [https://owservable.github.io/folders/docs/](https://owservable.github.io/folders/docs/)
129
- - **Test Coverage**: [https://owservable.github.io/folders/coverage/](https://owservable.github.io/folders/coverage/)
130
-
131
- ## ๐Ÿ”— Related Projects
132
-
133
- - [@owservable/actions](https://github.com/owservable/actions) - Action pattern implementation
134
- - [@owservable/fastify-auto-routes](https://github.com/owservable/fastify-auto-routes) - Fastify auto routing
135
- - [owservable](https://github.com/owservable/owservable) - Main reactive backend library
136
-
137
- ## ๐Ÿ“„ License
138
-
139
- Licensed under [The Unlicense](./LICENSE).
140
-
141
- ## ๐Ÿค Contributing
142
-
143
- Contributions are welcome! Please feel free to submit a Pull Request.
1
+ ![owservable](https://avatars0.githubusercontent.com/u/87773159?s=75)
2
+
3
+ # @owservable/folders
4
+
5
+ [๐Ÿ“– API Docs](https://owservable.github.io/folders/docs/) ยท [โœ… Coverage](https://owservable.github.io/folders/coverage/)
6
+
7
+ A TypeScript utility library for file system operations, providing functions to work with folders and files recursively.
8
+
9
+ ## ๐Ÿš€ Features
10
+
11
+ - Recursively add files from folders
12
+ - List subfolders by name with filtering
13
+ - Get files from specific subfolders
14
+ - Written in TypeScript with full type support
15
+ - Lodash integration for efficient data manipulation
16
+
17
+ ## ๐Ÿ“ฆ Installation
18
+
19
+ ```bash
20
+ npm install @owservable/folders
21
+ ```
22
+
23
+ or
24
+
25
+ ```bash
26
+ yarn add @owservable/folders
27
+ ```
28
+
29
+ or
30
+
31
+ ```bash
32
+ pnpm add @owservable/folders
33
+ ```
34
+
35
+ ## ๐Ÿ”ง Usage
36
+
37
+ ### Basic Import
38
+
39
+ ```typescript
40
+ import {
41
+ addFilesFromFolder,
42
+ listSubfoldersByName,
43
+ listSubfoldersFilesByFolderName
44
+ } from '@owservable/folders';
45
+ ```
46
+
47
+ ### Adding Files from Folder Recursively
48
+
49
+ ```typescript
50
+ import { addFilesFromFolder } from '@owservable/folders';
51
+
52
+ // Initialize empty array to collect files
53
+ const files: string[] = [];
54
+
55
+ // Add all files from a folder recursively
56
+ const allFiles = addFilesFromFolder(files, '/path/to/folder');
57
+
58
+ console.log(allFiles); // Array of all file paths
59
+ ```
60
+
61
+ ### Listing Subfolders by Name
62
+
63
+ ```typescript
64
+ import { listSubfoldersByName } from '@owservable/folders';
65
+
66
+ // Get all subfolders with specific name
67
+ const subfolders = listSubfoldersByName('/path/to/parent', 'targetFolderName');
68
+
69
+ console.log(subfolders); // Array of matching subfolder paths
70
+ ```
71
+
72
+ ### Getting Files from Specific Subfolders
73
+
74
+ ```typescript
75
+ import { listSubfoldersFilesByFolderName } from '@owservable/folders';
76
+
77
+ // Get all files from subfolders with specific name
78
+ const files = listSubfoldersFilesByFolderName('/path/to/parent', 'targetFolderName');
79
+
80
+ console.log(files); // Array of file paths from matching subfolders
81
+ ```
82
+
83
+ ## ๐Ÿ“š API Documentation
84
+
85
+ ### `addFilesFromFolder(files: string[], folder: string): string[]`
86
+
87
+ Recursively adds all files from a folder and its subfolders to the provided array.
88
+
89
+ **Parameters:**
90
+ - `files`: Array to store file paths
91
+ - `folder`: Path to the folder to scan
92
+
93
+ **Returns:** Array of file paths
94
+
95
+ ### `listSubfoldersByName(folder: string, name: string): string[]`
96
+
97
+ Lists all subfolders with a specific name within a given folder.
98
+
99
+ **Parameters:**
100
+ - `folder`: Path to the parent folder
101
+ - `name`: Name of subfolders to find
102
+
103
+ **Returns:** Array of matching subfolder paths
104
+
105
+ ### `listSubfoldersFilesByFolderName(folder: string, name: string): string[]`
106
+
107
+ Gets all files from subfolders that match a specific name.
108
+
109
+ **Parameters:**
110
+ - `folder`: Path to the parent folder
111
+ - `name`: Name of subfolders to search in
112
+
113
+ **Returns:** Array of file paths from matching subfolders
114
+
115
+ ## ๐Ÿ—๏ธ Requirements
116
+
117
+ - Node.js >= 20
118
+ - TypeScript support
119
+
120
+ ## ๐Ÿงช Testing
121
+
122
+ ```bash
123
+ npm test
124
+ ```
125
+
126
+ ## ๐Ÿ“– Documentation
127
+
128
+ - **TypeDoc Documentation**: [https://owservable.github.io/folders/docs/](https://owservable.github.io/folders/docs/)
129
+ - **Test Coverage**: [https://owservable.github.io/folders/coverage/](https://owservable.github.io/folders/coverage/)
130
+
131
+ ## ๐Ÿ”— Related Projects
132
+
133
+ - [@owservable/actions](https://github.com/owservable/actions) - Action pattern implementation
134
+ - [@owservable/fastify-auto-routes](https://github.com/owservable/fastify-auto-routes) - Fastify auto routing
135
+ - [owservable](https://github.com/owservable/owservable) - Main reactive backend library
136
+
137
+ ## ๐Ÿ“„ License
138
+
139
+ Licensed under [The Unlicense](./LICENSE).
140
+
141
+ ## ๐Ÿค Contributing
142
+
143
+ Contributions are welcome! Please feel free to submit a Pull Request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owservable/folders",
3
- "version": "3.1.3",
3
+ "version": "3.1.7",
4
4
  "description": "get files and folders",
5
5
  "engines": {
6
6
  "node": ">=24.12.0"
@@ -18,44 +18,44 @@
18
18
  },
19
19
  "minimumReleaseAge": 2880,
20
20
  "scripts": {
21
- "all": "pnpm i & pnpm dedupe & pnpm audit --fix=update & pnpm clean & pnpm format & pnpm build & skeletest -f & strictr -f & pnpm test & pnpm run docs @owservable/folders",
22
- "build": "del /S /Q lib\\* && tsc",
21
+ "all": "pnpm i && pnpm dedupe && (pnpm audit --fix=update || echo audit: unresolved vulnerabilities remain) && pnpm clean && pnpm format && pnpm build && skeletest -f && strictr -f && pnpm test && pnpm run docs @owservable/folders",
22
+ "build": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\" && tsc",
23
23
  "build:watch": "tsc --watch",
24
24
  "lint": "eslint .",
25
25
  "clean": "eslint --fix .",
26
26
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
27
- "sync": "git pull & git fetch origin & git merge origin/main & pnpm i & git branch",
27
+ "sync": "git pull && git fetch origin && git merge origin/main && pnpm i && git branch",
28
28
  "docs": "typedoc --readme none --out docs src/owservable.folders.ts",
29
29
  "test": "jest --coverage --config jest.config.js",
30
30
  "quick": "jest --config jest.config.js",
31
- "coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
31
+ "coveralls": "coveralls < coverage/lcov.info",
32
32
  "test_qube": "jest --testResultsProcessor=jest-sonar-reporter",
33
33
  "up": "pnpm up -i",
34
34
  "latest": "pnpm up -i -L",
35
- "l": "pnpm i & pnpm latest",
36
- "srctree": "dir src /s /b > srctree.txt",
35
+ "l": "pnpm i && pnpm latest",
36
+ "srctree": "node -e \"const fs=require('node:fs'),path=require('node:path');fs.readdirSync('src',{recursive:true}).forEach(f=>console.log(path.resolve('src',f)))\" > srctree.txt",
37
37
  "preinstall": "npx only-allow pnpm"
38
38
  },
39
39
  "dependencies": {
40
- "@types/node": "^26.1.1"
40
+ "@types/node": "^26.6.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@eslint/js": "^10.0.1",
44
44
  "@types/jest": "^30.0.0",
45
45
  "coveralls": "^3.1.1",
46
- "eslint": "^10.7.0",
46
+ "eslint": "^10.11.0",
47
47
  "eslint-config-prettier": "^10.1.8",
48
- "eslint-plugin-sonarjs": "^4.2.0",
49
- "jest": "^30.4.2",
48
+ "eslint-plugin-sonarjs": "^4.2.1",
49
+ "jest": "^30.5.2",
50
50
  "jest-sonar-reporter": "^2.0.0",
51
- "prettier": "^3.9.5",
51
+ "prettier": "^3.9.9",
52
52
  "skeletest": "^0.7.5",
53
53
  "source-map-support": "^0.5.21",
54
54
  "strictr": "^0.5.7",
55
- "ts-jest": "^29.4.11",
55
+ "ts-jest": "^29.4.13",
56
56
  "typedoc": "^0.28.20",
57
57
  "typescript": "^6.0.3",
58
- "typescript-eslint": "^8.64.0"
58
+ "typescript-eslint": "^8.70.1"
59
59
  },
60
- "packageManager": "pnpm@11.12.0"
60
+ "packageManager": "pnpm@12.6.0"
61
61
  }