@cocreate/file-server 1.21.0 → 1.21.2
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 +14 -0
- package/package.json +6 -6
- package/src/index.js +8 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.21.2](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.21.1...v1.21.2) (2026-07-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* replace wsManager bandwidth emissions with process usage events ([fda39a2](https://github.com/CoCreate-app/CoCreate-file-server/commit/fda39a2ddbd8930b84ce6f280006bdc13faed77c))
|
|
7
|
+
|
|
8
|
+
## [1.21.1](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.21.0...v1.21.1) (2026-07-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* bump dependencies ([ae7ca96](https://github.com/CoCreate-app/CoCreate-file-server/commit/ae7ca96e789240503f3c7a83dff095a6625f9c15))
|
|
14
|
+
|
|
1
15
|
# [1.21.0](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.20.0...v1.21.0) (2026-07-17)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/file-server",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.2",
|
|
4
4
|
"description": "A simple file-server component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"file-server",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"start": "
|
|
20
|
-
"build": "
|
|
21
|
-
"dev": "
|
|
19
|
+
"start": "webpack --config webpack.config.js",
|
|
20
|
+
"build": "webpack --mode=production --config webpack.config.js",
|
|
21
|
+
"dev": "webpack --config webpack.config.js --watch"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"type": "module",
|
|
38
38
|
"main": "./src/index.js",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@cocreate/server-side-render": "^1.
|
|
41
|
-
"@cocreate/sitemap": "^1.
|
|
40
|
+
"@cocreate/server-side-render": "^1.14.0",
|
|
41
|
+
"@cocreate/sitemap": "^1.6.0"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/index.js
CHANGED
|
@@ -316,16 +316,15 @@ export async function getDefaultFile({ fileName, hostname, organizationId, crud
|
|
|
316
316
|
|
|
317
317
|
defaultFile = await activeCrud.send(queryData);
|
|
318
318
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
type: "out",
|
|
319
|
+
if (fileName !== "/hostNotFound.html" && organizationId) {
|
|
320
|
+
process.emit("usage", {
|
|
321
|
+
type: "egress",
|
|
323
322
|
data: queryData,
|
|
324
323
|
organization_id: organizationId
|
|
325
324
|
});
|
|
326
325
|
|
|
327
|
-
|
|
328
|
-
type: "
|
|
326
|
+
process.emit("usage", {
|
|
327
|
+
type: "ingress",
|
|
329
328
|
data: defaultFile,
|
|
330
329
|
organization_id: organizationId
|
|
331
330
|
});
|
|
@@ -583,10 +582,9 @@ export async function sendResponse({ res, src, statusCode, headers, file, organi
|
|
|
583
582
|
src = JSON.stringify(src);
|
|
584
583
|
}
|
|
585
584
|
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
type: "out",
|
|
585
|
+
if (organizationId) {
|
|
586
|
+
process.emit("usage", {
|
|
587
|
+
type: "egress",
|
|
590
588
|
data: src,
|
|
591
589
|
organization_id: organizationId
|
|
592
590
|
});
|