@cocreate/file-server 1.21.1 → 1.21.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.
@@ -3,7 +3,7 @@ name: Automated Workflow
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - master
6
+ - main
7
7
 
8
8
  jobs:
9
9
  about:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.21.3](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.21.2...v1.21.3) (2026-07-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * set default branch to main ([2c7a527](https://github.com/CoCreate-app/CoCreate-file-server/commit/2c7a52710a56cf7d5ccec695748fb01428b9b361))
7
+
8
+ ## [1.21.2](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.21.1...v1.21.2) (2026-07-18)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * replace wsManager bandwidth emissions with process usage events ([fda39a2](https://github.com/CoCreate-app/CoCreate-file-server/commit/fda39a2ddbd8930b84ce6f280006bdc13faed77c))
14
+
1
15
  ## [1.21.1](https://github.com/CoCreate-app/CoCreate-file-server/compare/v1.21.0...v1.21.1) (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.1",
3
+ "version": "1.21.3",
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",
package/release.config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  dryRun: false,
3
- branches: ["master"],
3
+ branches: ["main"],
4
4
  plugins: [
5
5
  "@semantic-release/commit-analyzer",
6
6
  "@semantic-release/release-notes-generator",
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
- const wsManager = server ? server.wsManager : null;
320
- if (fileName !== "/hostNotFound.html" && organizationId && wsManager) {
321
- wsManager.emit("setBandwidth", {
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
- wsManager.emit("setBandwidth", {
328
- type: "in",
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
- const wsManager = server ? server.wsManager : null;
587
- if (organizationId && activeCrud && wsManager) {
588
- wsManager.emit("setBandwidth", {
589
- type: "out",
585
+ if (organizationId) {
586
+ process.emit("usage", {
587
+ type: "egress",
590
588
  data: src,
591
589
  organization_id: organizationId
592
590
  });