expresso-macchiato 0.3.8-dev.2 → 0.3.8-dev.4

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/dist/index.d.mts CHANGED
@@ -516,7 +516,7 @@ type StarterOptions = {
516
516
  beforeStartListening?: (app: Express, httpServer?: http.Server, socketIoServerInstance?: Server$1) => void;
517
517
  sockets?: {
518
518
  wrappers: Array<SocketWrapper>;
519
- options?: ServerOptions;
519
+ options?: Partial<ServerOptions>;
520
520
  };
521
521
  tokenOptions?: {
522
522
  tokenInstance: Token;
package/dist/index.d.ts CHANGED
@@ -516,7 +516,7 @@ type StarterOptions = {
516
516
  beforeStartListening?: (app: Express, httpServer?: http.Server, socketIoServerInstance?: Server$1) => void;
517
517
  sockets?: {
518
518
  wrappers: Array<SocketWrapper>;
519
- options?: ServerOptions;
519
+ options?: Partial<ServerOptions>;
520
520
  };
521
521
  tokenOptions?: {
522
522
  tokenInstance: Token;
package/dist/index.js CHANGED
@@ -719,7 +719,7 @@ var SocketWrapper = class {
719
719
  if (!this.data.listeners) throw new Error("No listeners provided");
720
720
  this.namespace = io.of(`/${this.socketNamespace}`);
721
721
  if (this.data.connectionMiddleware) {
722
- io.use(async (client, next) => {
722
+ this.namespace.use(async (client, next) => {
723
723
  const commId = client.handshake.query.commId;
724
724
  const metadata = client.handshake.query.metadata;
725
725
  const beforeResult = await this.data.connectionMiddleware(this, client, commId, metadata);
@@ -731,7 +731,7 @@ var SocketWrapper = class {
731
731
  next();
732
732
  });
733
733
  }
734
- io.on("connection", (client) => {
734
+ this.namespace.on("connection", (client) => {
735
735
  try {
736
736
  if (!this.namespace) throw new Error("Socket.IO not initialized");
737
737
  const metadata = client.handshake.query.metadata;
package/dist/index.mjs CHANGED
@@ -719,7 +719,7 @@ var SocketWrapper = class {
719
719
  if (!this.data.listeners) throw new Error("No listeners provided");
720
720
  this.namespace = io.of(`/${this.socketNamespace}`);
721
721
  if (this.data.connectionMiddleware) {
722
- io.use(async (client, next) => {
722
+ this.namespace.use(async (client, next) => {
723
723
  const commId = client.handshake.query.commId;
724
724
  const metadata = client.handshake.query.metadata;
725
725
  const beforeResult = await this.data.connectionMiddleware(this, client, commId, metadata);
@@ -731,7 +731,7 @@ var SocketWrapper = class {
731
731
  next();
732
732
  });
733
733
  }
734
- io.on("connection", (client) => {
734
+ this.namespace.on("connection", (client) => {
735
735
  try {
736
736
  if (!this.namespace) throw new Error("Socket.IO not initialized");
737
737
  const metadata = client.handshake.query.metadata;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expresso-macchiato",
3
- "version": "0.3.8-dev.2",
3
+ "version": "0.3.8-dev.4",
4
4
  "author": "Alessio Velluso",
5
5
  "license": "MIT",
6
6
  "description": "Description",
@@ -18,7 +18,7 @@ export type StarterOptions = {
18
18
  beforeStartListening?:(app:Express, httpServer?:http.Server, socketIoServerInstance?:Server) => void,
19
19
  sockets?: {
20
20
  wrappers:Array<SocketWrapper>,
21
- options?:ServerOptions
21
+ options?:Partial<ServerOptions>
22
22
  },
23
23
  tokenOptions?: {
24
24
  tokenInstance: Token,