@team-internet/apiconnector 10.0.10 → 10.0.11

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.
@@ -21,3 +21,11 @@ DISABLE_UPDATE_PROMPT=true
21
21
 
22
22
  # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
23
23
  [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
24
+
25
+ # pnpm
26
+ export PNPM_HOME="/home/vscode/.local/share/pnpm"
27
+ case ":$PATH:" in
28
+ *":$PNPM_HOME:"*) ;;
29
+ *) export PATH="$PNPM_HOME:$PATH" ;;
30
+ esac
31
+ # pnpm end
@@ -2,10 +2,12 @@
2
2
  # NOTE: This file will be executed as remoteUser (devcontainer.json)
3
3
  echo "=> Script: post-create.sh Executed by: $(whoami)"
4
4
 
5
- sudo npm i --progress=false --global commitizen@latest cz-conventional-changelog@latest semantic-release-cli@latest
6
-
7
5
  # shellcheck source=/dev/null
8
6
  source ~/.zshrc
9
7
 
8
+ # install pnpm and global packages
9
+ sudo npm i -g pnpm@latest
10
+ sudo npm add -g commitizen@latest cz-conventional-changelog@latest semantic-release-cli@latest
11
+
10
12
  # install node deps
11
- npm ci
13
+ pnpm i --frozen-lockfile
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [10.0.11](https://github.com/centralnicgroup-opensource/rtldev-middleware-node-sdk/compare/v10.0.10...v10.0.11) (2025-11-24)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** bump glob from 10.4.5 to 10.5.0 ([3f36e23](https://github.com/centralnicgroup-opensource/rtldev-middleware-node-sdk/commit/3f36e23cfd6074a0407f862725bf962cdb3bb709))
7
+
1
8
  ## [10.0.10](https://github.com/centralnicgroup-opensource/rtldev-middleware-node-sdk/compare/v10.0.9...v10.0.10) (2025-10-28)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@team-internet/apiconnector",
3
3
  "description": "Node.js SDK for the insanely fast CentralNic Reseller (fka RRPProxy) API",
4
- "version": "10.0.10",
4
+ "version": "10.0.11",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -29,6 +29,9 @@
29
29
  "email": "asif.nawaz@centralnic.com"
30
30
  }
31
31
  ],
32
+ "engines": {
33
+ "node": "^22.14.0 || >= 24.10.0"
34
+ },
32
35
  "keywords": [
33
36
  "centralnicreseller",
34
37
  "centralnic",
@@ -48,10 +51,10 @@
48
51
  "scripts": {
49
52
  "compile": "rm -rf dist && tsc --version && tsc --declaration",
50
53
  "lint": "prettier --write . --ignore-path .prettierignore",
51
- "prepublish": "npm run compile",
54
+ "prepublish": "pnpm run compile",
52
55
  "documentation": "typedoc",
53
56
  "test": "cross-env NODE_ENV=development c8 mocha",
54
- "test-demo": "npm run prepublish && node ./tests/app.js"
57
+ "test-demo": "pnpm run prepublish && node ./tests/app.js"
55
58
  },
56
59
  "devDependencies": {
57
60
  "@semantic-release/changelog": "^6.0.3",
@@ -68,7 +71,7 @@
68
71
  "mocha": "^11.0.1",
69
72
  "nock": "^14.0.0",
70
73
  "prettier": "^3.0.0",
71
- "semantic-release": "^24.2.0",
74
+ "semantic-release": "^25.0.1",
72
75
  "semantic-release-replace-plugin": "github:centralnicgroup-opensource/rtldev-middleware-semantic-release-replace-plugin",
73
76
  "semantic-release-teams-notify-plugin": "github:centralnicgroup-opensource/rtldev-middleware-semantic-release-notify-plugin",
74
77
  "tsx": "^4.19.2",
@@ -0,0 +1,2 @@
1
+ onlyBuiltDependencies:
2
+ - esbuild
package/src/apiclient.ts CHANGED
@@ -5,7 +5,7 @@ import { ResponseTemplateManager } from "./responsetemplatemanager.js";
5
5
  import { fixedURLEnc, SocketConfig } from "./socketconfig.js";
6
6
  import { toAscii } from "idna-uts46-hx";
7
7
 
8
- export const CNR_CONNECTION_URL_PROXY = "http://10.0.10.1/api/call.cgi";
8
+ export const CNR_CONNECTION_URL_PROXY = "http://10.0.11.1/api/call.cgi";
9
9
  export const CNR_CONNECTION_URL_LIVE = "https://api.rrpproxy.net/api/call.cgi";
10
10
  export const CNR_CONNECTION_URL_OTE =
11
11
  "https://api-ote.rrpproxy.net/api/call.cgi";
@@ -189,7 +189,7 @@ export class APIClient {
189
189
  * @returns module version
190
190
  */
191
191
  public getVersion(): string {
192
- return "10.0.10";
192
+ return "10.0.11";
193
193
  }
194
194
 
195
195
  /**
@@ -1,233 +0,0 @@
1
- import { Logger } from "./logger.js";
2
- import { Response } from "./response.js";
3
- export declare const CNR_CONNECTION_URL_PROXY = "http://127.0.0.1/api/call.cgi";
4
- export declare const CNR_CONNECTION_URL_LIVE = "https://api.rrpproxy.net/api/call.cgi";
5
- export declare const CNR_CONNECTION_URL_OTE = "https://api-ote.rrpproxy.net/api/call.cgi";
6
- /**
7
- * APIClient class
8
- */
9
- export declare class APIClient {
10
- /**
11
- * API connection timeout setting
12
- */
13
- static readonly socketTimeout: number;
14
- /**
15
- * User Agent string
16
- */
17
- private ua;
18
- /**
19
- * API connection url
20
- */
21
- private socketURL;
22
- /**
23
- * Object covering API connection data
24
- */
25
- private socketConfig;
26
- /**
27
- * activity flag for debug mode
28
- */
29
- private debugMode;
30
- /**
31
- * additional connection settings
32
- */
33
- private curlopts;
34
- /**
35
- * logger function for debug mode
36
- */
37
- private logger;
38
- /**
39
- * set sub user account
40
- */
41
- private subUser;
42
- /**
43
- * set sub user account role seperater
44
- */
45
- private readonly roleSeparator;
46
- constructor();
47
- /**
48
- * set custom logger to use instead of default one
49
- * @param customLogger
50
- * @returns Current APIClient instance for method chaining
51
- */
52
- setCustomLogger(customLogger: Logger): APIClient;
53
- /**
54
- * set default logger to use
55
- * @returns Current APIClient instance for method chaining
56
- */
57
- setDefaultLogger(): APIClient;
58
- /**
59
- * Enable Debug Output to STDOUT
60
- * @returns Current APIClient instance for method chaining
61
- */
62
- enableDebugMode(): APIClient;
63
- /**
64
- * Disable Debug Output
65
- * @returns Current APIClient instance for method chaining
66
- */
67
- disableDebugMode(): APIClient;
68
- /**
69
- * Get the API connection url that is currently set
70
- * @returns API connection url currently in use
71
- */
72
- getURL(): string;
73
- /**
74
- * Possibility to customize default user agent to fit your needs
75
- * @param str user agent label
76
- * @param rv revision of user agent
77
- * @param modules further modules to add to user agent string, format: ["<mod1>/<rev>", "<mod2>/<rev>", ... ]
78
- * @returns Current APIClient instance for method chaining
79
- */
80
- setUserAgent(str: string, rv: string, modules?: any): APIClient;
81
- /**
82
- * Get the User Agent
83
- * @returns User Agent string
84
- */
85
- getUserAgent(): string;
86
- /**
87
- * Set the proxy server to use for API communication
88
- * @param proxy proxy server to use for communicatio
89
- * @returns Current APIClient instance for method chaining
90
- */
91
- setProxy(proxy: string): APIClient;
92
- /**
93
- * Get the proxy server configuration
94
- * @returns proxy server configuration value or null if not set
95
- */
96
- getProxy(): string | null;
97
- /**
98
- * Set the referer to use for API communication
99
- * @param referer Referer
100
- * @returns Current APIClient instance for method chaining
101
- */
102
- setReferer(referer: string): APIClient;
103
- /**
104
- * Get the referer configuration
105
- * @returns referer configuration value or null if not set
106
- */
107
- getReferer(): string | null;
108
- /**
109
- * Get the current module version
110
- * @returns module version
111
- */
112
- getVersion(): string;
113
- /**
114
- * Apply session data (session id and system entity) to given client request session
115
- * @param session ClientRequest session instance
116
- * @returns Current APIClient instance for method chaining
117
- */
118
- saveSession(session: any): APIClient;
119
- /**
120
- * Use existing configuration out of ClientRequest session
121
- * to rebuild and reuse connection settings
122
- * @param session ClientRequest session instance
123
- * @returns Current APIClient instance for method chaining
124
- */
125
- reuseSession(session: any): APIClient;
126
- /**
127
- * Set another connection url to be used for API communication
128
- * @param value API connection url to set
129
- * @returns Current APIClient instance for method chaining
130
- */
131
- setURL(value: string): APIClient;
132
- /**
133
- * Set Persistent to request session id for API communication
134
- * @param value API session id
135
- * @returns Current APIClient instance for method chaining
136
- */
137
- setPersistent(): APIClient;
138
- /**
139
- * Set Credentials to be used for API communication
140
- * @param uid account name
141
- * @param pw account password
142
- * @returns Current APIClient instance for method chaining
143
- */
144
- setCredentials(uid: string, pw?: string): APIClient;
145
- /**
146
- * Set Credentials to be used for API communication
147
- * @param uid account name
148
- * @param role role user id
149
- * @param pw role user password
150
- * @returns Current APIClient instance for method chaining
151
- */
152
- setRoleCredentials(uid: string, role: string, pw?: string): APIClient;
153
- /**
154
- * Perform API login to start session-based communication
155
- * @param otp optional one time password
156
- * @returns Promise resolving with API Response
157
- */
158
- login(): Promise<Response>;
159
- /**
160
- * Perform API logout to close API session in use
161
- * @returns Promise resolving with API Response
162
- */
163
- logout(): Promise<Response>;
164
- /**
165
- * Perform API request using the given command
166
- * @param cmd API command to request
167
- * @returns Promise resolving with API Response
168
- */
169
- request(cmd: any, setUserView?: boolean): Promise<Response>;
170
- /**
171
- * Request the next page of list entries for the current list query
172
- * Useful for tables
173
- * @param rr API Response of current page
174
- * @returns Promise resolving with API Response or null in case there are no further list entries
175
- */
176
- requestNextResponsePage(rr: Response): Promise<Response | null>;
177
- /**
178
- * Request all pages/entries for the given query command
179
- * @param cmd API list command to use
180
- * @returns Promise resolving with array of API Responses
181
- */
182
- requestAllResponsePages(cmd: any): Promise<Response[]>;
183
- /**
184
- * Set a data view to a given subuser
185
- * @param uid subuser account name
186
- * @returns Current APIClient instance for method chaining
187
- */
188
- setUserView(uid: string): APIClient;
189
- /**
190
- * Reset data view back from subuser to user
191
- * @returns Current APIClient instance for method chaining
192
- */
193
- resetUserView(): APIClient;
194
- /**
195
- * Activate High Performance Connection Setup
196
- * @see https://github.com/centralnicgroup-opensource/rtldev-middleware-node-sdk/blob/master/README.md
197
- * @returns Current APIClient instance for method chaining
198
- */
199
- useHighPerformanceConnectionSetup(): APIClient;
200
- /**
201
- * Activate Default Connection Setup (the default)
202
- * @returns Current APIClient instance for method chaining
203
- */
204
- useDefaultConnectionSetup(): APIClient;
205
- /**
206
- * Set OT&E System for API communication
207
- * @returns Current APIClient instance for method chaining
208
- */
209
- useOTESystem(): APIClient;
210
- /**
211
- * Set LIVE System for API communication (this is the default setting)
212
- * @returns Current APIClient instance for method chaining
213
- */
214
- useLIVESystem(): APIClient;
215
- /**
216
- * Serialize given command for POST request including connection configuration data
217
- * @param cmd API command to encode
218
- * @returns encoded POST data string
219
- */
220
- getPOSTData(cmd: any, secured?: boolean): string;
221
- /**
222
- * Flatten nested arrays in command
223
- * @param cmd api command
224
- * @returns api command with flattended parameters
225
- */
226
- private flattenCommand;
227
- /**
228
- * Auto convert API command parameters to punycode, if necessary.
229
- * @param cmd api command
230
- * @returns Promise resolving with api command with IDN values replaced to punycode
231
- */
232
- private autoIDNConvert;
233
- }