@cocreate/file 1.19.5 → 1.19.6

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 CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.19.6](https://github.com/CoCreate-app/CoCreate-file/compare/v1.19.5...v1.19.6) (2025-09-07)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * correct exclusion logic to check each item in the exclude array ([1fae391](https://github.com/CoCreate-app/CoCreate-file/commit/1fae391f4333813aa30805e87ba7ea28fefda5d3))
7
+ * ensure match is an array by wrapping non-array values ([5c67ec5](https://github.com/CoCreate-app/CoCreate-file/commit/5c67ec592f0217199b2ce965d14e377d6faa9a5b))
8
+ * ensure match is an array of directory paths and await run function ([eb47cf0](https://github.com/CoCreate-app/CoCreate-file/commit/eb47cf00c672ac5110293b3dab38fd8186bb8d64))
9
+
1
10
  ## [1.19.5](https://github.com/CoCreate-app/CoCreate-file/compare/v1.19.4...v1.19.5) (2025-05-01)
2
11
 
3
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/file",
3
- "version": "1.19.5",
3
+ "version": "1.19.6",
4
4
  "description": "A versatile, configurable headless file uploader supporting local and server operations. Accessible via a JavaScript API and HTML5 attributes, it provides seamless file reading, writing, and uploading with fallbacks to the standard HTML5 file input API. Ideal for developers needing robust file management in headless environments.",
5
5
  "keywords": [
6
6
  "file-uploader",
package/src/server.js CHANGED
@@ -88,8 +88,11 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
88
88
  let sources = CoCreateConfig.sources;
89
89
  let configDirectoryPath = path.dirname(configPath);
90
90
 
91
- if (match && !Array.isArray(match)) match = [match];
92
- else if (!match) match = [];
91
+ if (match && !Array.isArray(match)) {
92
+ match = [match];
93
+ } else if (!match) {
94
+ match = [];
95
+ }
93
96
 
94
97
  let config = await Config(
95
98
  {
@@ -179,7 +182,7 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
179
182
  for (let file of files) {
180
183
  let skip = false;
181
184
  for (let i = 0; i < exclude.length; i++) {
182
- if (file.includes(exclude)) {
185
+ if (file.includes(exclude[i])) {
183
186
  skip = true;
184
187
  break;
185
188
  }
@@ -527,5 +530,5 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
527
530
  }
528
531
  }
529
532
 
530
- run();
533
+ await run();
531
534
  };