topsyde-utils 1.0.25 → 1.0.27

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.ts CHANGED
@@ -8,7 +8,15 @@ export * from "./lib";
8
8
  export * from "./guards";
9
9
  export * from "./throwable";
10
10
  export * from "./enums";
11
- export { default as DatabaseExample } from "./singleton";
11
+ export * from "./router/routes";
12
+ export * from "./router/router";
13
+ export * from "./router/router.internal";
14
+ export * from "./server/controller";
15
+ export * from "./server/bun/websocket/Websocket";
16
+ export * from "./server/bun/websocket/WebsocketClient";
17
+ export * from "./server/bun/websocket/websocket.types";
18
+ export * from "./server/bun/websocket/Channel";
19
+ export { default as Singleton } from "./singleton";
12
20
  export { default as Initializable } from "./initializable";
13
21
  export { default as Application } from "./application";
14
22
  export { default as Lib } from "./lib";
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19
19
  return (mod && mod.__esModule) ? mod : { "default": mod };
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.E_ENVIRONMENTS = exports.E_IS = exports.LOG_COLORS = exports.DEFAULT_FALSE_RESPONSE = exports.RESPONSE_METHOD_OPTIONS = exports.RESPONSE_INIT = exports.WS_ERROR_CODE = exports.HTTP_ERROR_CODE = exports.ERROR_CODE = exports.Channel = exports.WebsocketClient = exports.Websocket = exports.Controller = exports.Router_Internal = exports.Router = exports.Throwable = exports.Guards = exports.Lib = exports.Application = exports.Initializable = exports.DatabaseExample = void 0;
22
+ exports.E_ENVIRONMENTS = exports.E_IS = exports.LOG_COLORS = exports.DEFAULT_FALSE_RESPONSE = exports.RESPONSE_METHOD_OPTIONS = exports.RESPONSE_INIT = exports.WS_ERROR_CODE = exports.HTTP_ERROR_CODE = exports.ERROR_CODE = exports.Channel = exports.WebsocketClient = exports.Websocket = exports.Controller = exports.Router_Internal = exports.Router = exports.Throwable = exports.Guards = exports.Lib = exports.Application = exports.Initializable = exports.Singleton = void 0;
23
23
  // Export all modules
24
24
  __exportStar(require("./errors"), exports);
25
25
  __exportStar(require("./singleton"), exports);
@@ -31,9 +31,17 @@ __exportStar(require("./lib"), exports);
31
31
  __exportStar(require("./guards"), exports);
32
32
  __exportStar(require("./throwable"), exports);
33
33
  __exportStar(require("./enums"), exports);
34
+ __exportStar(require("./router/routes"), exports);
35
+ __exportStar(require("./router/router"), exports);
36
+ __exportStar(require("./router/router.internal"), exports);
37
+ __exportStar(require("./server/controller"), exports);
38
+ __exportStar(require("./server/bun/websocket/Websocket"), exports);
39
+ __exportStar(require("./server/bun/websocket/WebsocketClient"), exports);
40
+ __exportStar(require("./server/bun/websocket/websocket.types"), exports);
41
+ __exportStar(require("./server/bun/websocket/Channel"), exports);
34
42
  // Export default classes
35
43
  var singleton_1 = require("./singleton");
36
- Object.defineProperty(exports, "DatabaseExample", { enumerable: true, get: function () { return __importDefault(singleton_1).default; } });
44
+ Object.defineProperty(exports, "Singleton", { enumerable: true, get: function () { return __importDefault(singleton_1).default; } });
37
45
  var initializable_1 = require("./initializable");
38
46
  Object.defineProperty(exports, "Initializable", { enumerable: true, get: function () { return __importDefault(initializable_1).default; } });
39
47
  var application_1 = require("./application");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,iCAAiC;;;;;;;;;;;;;;;;;;;;AAEjC,qBAAqB;AACrB,2CAAyB;AACzB,8CAA4B;AAC5B,kDAAgC;AAChC,gDAA8B;AAC9B,2CAAyB;AACzB,0CAAwB;AACxB,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AAExB,yBAAyB;AACzB,yCAAyD;AAAhD,6HAAA,OAAO,OAAmB;AACnC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,6CAAuD;AAA9C,2HAAA,OAAO,OAAe;AAC/B,6BAAuC;AA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GAAA,OAAO,OAAO;AACvB,mCAA6C;AAApC,iHAAA,OAAO,OAAU;AAC1B,yCAAmD;AAA1C,uHAAA,OAAO,OAAa;AAC7B,0CAAoD;AAA3C,iHAAA,OAAO,OAAU;AAC1B,4DAAsE;AAA7D,mIAAA,OAAO,OAAmB;AACnC,kDAA4D;AAAnD,yHAAA,OAAO,OAAc;AAC9B,8DAAwE;AAA/D,uHAAA,OAAO,OAAa;AAC7B,0EAAoF;AAA3E,mIAAA,OAAO,OAAmB;AACnC,0DAAoE;AAA3D,mHAAA,OAAO,OAAW;AAE3B,sDAAsD;AACtD,mCAAsE;AAA7D,oGAAA,UAAU,OAAA;AAAE,yGAAA,eAAe,OAAA;AAAE,uGAAA,aAAa,OAAA;AAGnD,6CAAuE;AAA9D,4GAAA,aAAa,OAAA;AAAE,sHAAA,uBAAuB,OAAA;AAC/C,mCAA8D;AAArD,gHAAA,sBAAsB,OAAA;AAAE,oGAAA,UAAU,OAAA;AAE3C,iCAA+C;AAAtC,6FAAA,IAAI,OAAA;AAAE,uGAAA,cAAc,OAAA"}
@@ -1,31 +1,6 @@
1
- /**
2
- * Type representing a constructor function or class type
3
- */
4
1
  export type Constructor<T> = (abstract new (...args: any[]) => T) | (new (...args: any[]) => T) | ({
5
2
  prototype: T;
6
3
  } & Function);
7
- /**
8
- * Base class for implementing the singleton pattern with type-safe instance management.
9
- * Supports constructors with any number of arguments.
10
- *
11
- * @example
12
- * // No constructor arguments
13
- * class DatabaseExample extends Singleton {
14
- * private constructor() { super(); }
15
- * public static async Connection() {
16
- * return this.GetInstance();
17
- * }
18
- * }
19
- *
20
- * @example
21
- * // With constructor arguments
22
- * class EncryptionServiceExample extends Singleton {
23
- * private constructor(key: string, algorithm: string) { super(); }
24
- * public static Create(key: string, algorithm: string) {
25
- * return this.GetInstance(key, algorithm);
26
- * }
27
- * }
28
- */
29
4
  declare abstract class Singleton {
30
5
  private static readonly instances;
31
6
  protected constructor();
package/dist/singleton.js CHANGED
@@ -1,27 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- * Base class for implementing the singleton pattern with type-safe instance management.
5
- * Supports constructors with any number of arguments.
6
- *
7
- * @example
8
- * // No constructor arguments
9
- * class DatabaseExample extends Singleton {
10
- * private constructor() { super(); }
11
- * public static async Connection() {
12
- * return this.GetInstance();
13
- * }
14
- * }
15
- *
16
- * @example
17
- * // With constructor arguments
18
- * class EncryptionServiceExample extends Singleton {
19
- * private constructor(key: string, algorithm: string) { super(); }
20
- * public static Create(key: string, algorithm: string) {
21
- * return this.GetInstance(key, algorithm);
22
- * }
23
- * }
24
- */
25
3
  class Singleton {
26
4
  constructor() { }
27
5
  static GetInstance(...args) {
@@ -1 +1 @@
1
- {"version":3,"file":"singleton.js","sourceRoot":"","sources":["../src/singleton.ts"],"names":[],"mappings":";;AAMA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAe,SAAS;IAGvB,gBAAyB,CAAC;IAInB,MAAM,CAAC,WAAW,CAA4C,GAAG,IAAW;QAClF,MAAM,cAAc,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;YAC9C,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,IAAK,cAAsB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAM,CAAC;IACrD,CAAC;IAEM,MAAM,CAAC,gBAAgB;QAC7B,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC;IACjC,CAAC;;AAhBuB,mBAAS,GAAG,IAAI,GAAG,EAAuB,CAAC;AAmBpE,kBAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"singleton.js","sourceRoot":"","sources":["../src/singleton.ts"],"names":[],"mappings":";;AAIA,MAAe,SAAS;IAGvB,gBAAyB,CAAC;IAInB,MAAM,CAAC,WAAW,CAA4C,GAAG,IAAW;QAClF,MAAM,cAAc,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;YAC9C,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,IAAK,cAAsB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAM,CAAC;IACrD,CAAC;IAEM,MAAM,CAAC,gBAAgB;QAC7B,OAAO,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC;IACjC,CAAC;;AAhBuB,mBAAS,GAAG,IAAI,GAAG,EAAuB,CAAC;AAmBpE,kBAAe,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "topsyde-utils",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "A bundle of TypeScript utility classes and functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",