k2hdkc 2.0.0 → 2.0.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.
Files changed (2) hide show
  1. package/package.json +5 -4
  2. package/types/index.d.ts +8 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k2hdkc",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "K2HDKC addon library for Node.js",
5
5
  "os": "linux",
6
6
  "main": "index.js",
@@ -35,12 +35,12 @@
35
35
  "@rollup/plugin-terser": "^0.4.4",
36
36
  "@types/chai": "^5.2.3",
37
37
  "@types/mocha": "^10.0.10",
38
- "@types/node": "^25.0.8",
38
+ "@types/node": "^25.2.0",
39
39
  "chai": "^6.2.2",
40
40
  "mocha": "^11.7.5",
41
- "node-gyp": "^12.1.0",
41
+ "node-gyp": "^12.2.0",
42
42
  "prebuild": "^13.0.1",
43
- "rollup": "^4.55.1",
43
+ "rollup": "^4.57.1",
44
44
  "typescript": "^5.9.3",
45
45
  "ts-node": "^10.9.2"
46
46
  },
@@ -103,6 +103,7 @@
103
103
  "license": "MIT",
104
104
  "exports": {
105
105
  ".": {
106
+ "types": "./types/index.d.ts",
106
107
  "import": "./index.mjs",
107
108
  "require": "./index.js"
108
109
  }
package/types/index.d.ts CHANGED
@@ -26,7 +26,7 @@
26
26
  //
27
27
  // callable / constructible main factory
28
28
  //
29
- declare function k2hdkc(): k2hdkc.K2hdkcNode;
29
+ declare function k2hdkc(conf?: string | null, port?: number | null, cuk?: string | null, auto_rejoin?: boolean, no_giveup_rejoin?: boolean): k2hdkc.K2hdkcNode;
30
30
 
31
31
  declare namespace k2hdkc
32
32
  {
@@ -81,7 +81,8 @@ declare namespace k2hdkc
81
81
  export class K2hdkcNode
82
82
  {
83
83
  // Constructor
84
- constructor(); // always no arguments
84
+ constructor(conf?: string | null, port?: number | null, cuk?: string | null, auto_rejoin?: boolean, no_giveup_rejoin?: boolean);
85
+ // constructor(); // always no arguments
85
86
 
86
87
  //-----------------------------------------------------
87
88
  // Methods (Callback can be called)
@@ -1205,8 +1206,8 @@ declare namespace k2hdkc
1205
1206
  // K2hdkcFactoryType
1206
1207
  //---------------------------------------------------------
1207
1208
  export type K2hdkcFactoryType = {
1208
- (): K2hdkcNode;
1209
- new(): K2hdkcNode;
1209
+ (conf?: string | null, port?: number | null, cuk?: string | null, auto_rejoin?: boolean, no_giveup_rejoin?: boolean): K2hdkcNode;
1210
+ new(conf?: string | null, port?: number | null, cuk?: string | null, auto_rejoin?: boolean, no_giveup_rejoin?: boolean): K2hdkcNode;
1210
1211
  K2hdkcNode: typeof K2hdkcNode;
1211
1212
  };
1212
1213
  } // end namespace k2hdkc
@@ -1246,6 +1247,9 @@ declare module 'k2hdkc'
1246
1247
  //
1247
1248
  export type K2hdkcNode = k2hdkc.K2hdkcNode;
1248
1249
  export type K2hdkcFactoryType = k2hdkc.K2hdkcFactoryType;
1250
+
1251
+ // Add convenient alias (PascalCase)
1252
+ export type K2hdkc = K2hdkcNode;
1249
1253
  }
1250
1254
 
1251
1255
  /*