expresso-macchiato 0.3.8-dev.6 → 0.4.0

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
@@ -472,7 +472,7 @@ type SocketWrapperConstructor<Metadata extends Record<string, any> = any> = {
472
472
  clientConnectionKey?: string;
473
473
  connectionMiddleware?: SocketConnectionMiddleware<Metadata>;
474
474
  afterClientConnect?: (self: SocketWrapper, client: Socket, metadata?: Metadata) => Promise<void>;
475
- onClientDisconnect?: (...params: any[]) => Promise<void>;
475
+ onClientDisconnect?: (self: SocketWrapper, client: Socket, ...params: any[]) => Promise<void>;
476
476
  listeners?: Record<string, (self: SocketWrapper, client: Socket, metadata: any, ...params: any[]) => Promise<void>>;
477
477
  };
478
478
 
package/dist/index.d.ts CHANGED
@@ -472,7 +472,7 @@ type SocketWrapperConstructor<Metadata extends Record<string, any> = any> = {
472
472
  clientConnectionKey?: string;
473
473
  connectionMiddleware?: SocketConnectionMiddleware<Metadata>;
474
474
  afterClientConnect?: (self: SocketWrapper, client: Socket, metadata?: Metadata) => Promise<void>;
475
- onClientDisconnect?: (...params: any[]) => Promise<void>;
475
+ onClientDisconnect?: (self: SocketWrapper, client: Socket, ...params: any[]) => Promise<void>;
476
476
  listeners?: Record<string, (self: SocketWrapper, client: Socket, metadata: any, ...params: any[]) => Promise<void>>;
477
477
  };
478
478
 
package/dist/index.js CHANGED
@@ -94,7 +94,7 @@ var _DbConnector = class _DbConnector {
94
94
  for (let migration of migrations) {
95
95
  if (executedMigrationNames.includes(migration)) log.gray(`- Migration ${migration} already executed, skipping.`);
96
96
  else {
97
- log.yellow(`- Executing migration ${migration}`);
97
+ log.gray(`- Executing migration ${migration}`);
98
98
  await AppDataSource.runMigrations();
99
99
  }
100
100
  }
@@ -550,7 +550,7 @@ _DynamicDbRouter.addDbRouterSwagger = (options) => {
550
550
  const avoidList = _nullishCoalesce(options.avoid, () => ( []));
551
551
  try {
552
552
  let schemaProperties = {};
553
- if (options.bodyParameters && options.bodyParameters) {
553
+ if (options.bodyParameters) {
554
554
  const defaultOverridingSchema = options.bodyParameters;
555
555
  for (const param in defaultOverridingSchema.properties) {
556
556
  const paramValue = defaultOverridingSchema.properties[param];
@@ -752,7 +752,7 @@ var SocketWrapper = class {
752
752
  try {
753
753
  if (!this.namespace) throw new Error("Socket.IO not initialized");
754
754
  this.connectedClients.delete(client.id);
755
- if (this.data.onClientDisconnect) this.data.onClientDisconnect(client);
755
+ if (this.data.onClientDisconnect) this.data.onClientDisconnect(this, client);
756
756
  } catch (err) {
757
757
  fullLogNok(`SOCKETWRAPPER`, `[${this.socketNamespace.toUpperCase()}]`, err);
758
758
  }
package/dist/index.mjs CHANGED
@@ -94,7 +94,7 @@ var _DbConnector = class _DbConnector {
94
94
  for (let migration of migrations) {
95
95
  if (executedMigrationNames.includes(migration)) log.gray(`- Migration ${migration} already executed, skipping.`);
96
96
  else {
97
- log.yellow(`- Executing migration ${migration}`);
97
+ log.gray(`- Executing migration ${migration}`);
98
98
  await AppDataSource.runMigrations();
99
99
  }
100
100
  }
@@ -550,7 +550,7 @@ _DynamicDbRouter.addDbRouterSwagger = (options) => {
550
550
  const avoidList = options.avoid ?? [];
551
551
  try {
552
552
  let schemaProperties = {};
553
- if (options.bodyParameters && options.bodyParameters) {
553
+ if (options.bodyParameters) {
554
554
  const defaultOverridingSchema = options.bodyParameters;
555
555
  for (const param in defaultOverridingSchema.properties) {
556
556
  const paramValue = defaultOverridingSchema.properties[param];
@@ -752,7 +752,7 @@ var SocketWrapper = class {
752
752
  try {
753
753
  if (!this.namespace) throw new Error("Socket.IO not initialized");
754
754
  this.connectedClients.delete(client.id);
755
- if (this.data.onClientDisconnect) this.data.onClientDisconnect(client);
755
+ if (this.data.onClientDisconnect) this.data.onClientDisconnect(this, client);
756
756
  } catch (err) {
757
757
  fullLogNok(`SOCKETWRAPPER`, `[${this.socketNamespace.toUpperCase()}]`, err);
758
758
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expresso-macchiato",
3
- "version": "0.3.8-dev.6",
3
+ "version": "0.4.0",
4
4
  "author": "Alessio Velluso",
5
5
  "license": "MIT",
6
6
  "description": "Description",
@@ -1,4 +1,4 @@
1
- export type BackgroundServiceConstructor = {
2
- name:string;
3
- main: () => Promise<void>
4
- }
1
+ export type BackgroundServiceConstructor = {
2
+ name:string;
3
+ main: () => Promise<void>
4
+ }
@@ -18,6 +18,6 @@ export type SocketWrapperConstructor<Metadata extends Record<string, any> = any>
18
18
  clientConnectionKey?:string,
19
19
  connectionMiddleware?:SocketConnectionMiddleware<Metadata>
20
20
  afterClientConnect?: (self:SocketWrapper, client:Socket, metadata?:Metadata) => Promise<void>
21
- onClientDisconnect?:(...params:any[]) => Promise<void>
21
+ onClientDisconnect?:(self:SocketWrapper, client:Socket, ...params:any[]) => Promise<void>
22
22
  listeners?:Record<string, (self:SocketWrapper, client:Socket, metadata:any, ...params:any[]) => Promise<void>>
23
23
  }