rosinterface 1.4.1 → 1.4.3

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/LICENSE.md ADDED
@@ -0,0 +1,38 @@
1
+ Copyright (c) 2026 McBlockier
2
+
3
+
4
+ ENGLISH: ROSINTERFACE PERSONAL USE LICENSE
5
+ ====================================================================
6
+
7
+ 1. PERMISSIONS
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use the Software solely for personal, non-commercial, and educational purposes.
9
+
10
+ 2. RESTRICTIONS
11
+ You are explicitly PROHIBITED from:
12
+ - Commercial Use: You may not use the Software, or any application that incorporates the Software, for commercial purposes, financial gain, or to provide paid services to third parties (including SaaS or consulting).
13
+ - Modification: You may not modify, decompile, adapt, alter, or create derivative works of the Software's source code.
14
+ - Redistribution: You may not distribute or sublicense the Software as part of a commercial product.
15
+
16
+ Any commercial use or modification requires a separate, privately negotiated commercial license from the original author.
17
+
18
+ 3. DISCLAIMER
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY.
20
+
21
+
22
+ ESPAÑOL: LICENCIA DE USO PERSONAL ROSINTERFACE
23
+ ====================================================================
24
+
25
+
26
+ 1. PERMISOS
27
+ Por la presente se concede permiso, de forma gratuita, a cualquier persona que obtenga una copia de este software y los archivos de documentación asociados (el "Software"), para utilizar el Software exclusivamente con fines personales, no comerciales y educativos.
28
+
29
+ 2. RESTRICCIONES
30
+ Queda explícitamente PROHIBIDO:
31
+ - Uso Comercial: No puede utilizar el Software, ni ninguna aplicación que lo incorpore, con fines comerciales, de lucro financiero o para proporcionar servicios de pago a terceros (incluyendo SaaS o consultoría).
32
+ - Modificación: No puede modificar, descompilar, adaptar, alterar ni crear obras derivadas del código fuente del Software.
33
+ - Redistribución: No puede distribuir ni sublicenciar el Software como parte de un producto comercial.
34
+
35
+ Cualquier uso comercial o modificación requiere una licencia comercial separada y negociada de forma privada directamente con el autor original.
36
+
37
+ 3. EXENCIÓN DE RESPONSABILIDAD
38
+ EL SOFTWARE SE PROPORCIONA "TAL CUAL", SIN GARANTÍA DE NINGÚN TIPO, EXPRESA O IMPLÍCITA, INCLUYENDO PERO NO LIMITADO A GARANTÍAS DE COMERCIALIZACIÓN, IDONEIDAD PARA UN PROPÓSITO PARTICULAR Y NO INFRACCIÓN. EN NINGÚN CASO LOS AUTORES O TITULARES DEL COPYRIGHT SERÁN RESPONSABLES DE NINGUNA RECLAMACIÓN, DAÑO U OTRA RESPONSABILIDAD.
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## ⚖️ Legal & Commercial License / Aviso Legal y Comercial
2
+
3
+ **⚠️ THIS IS NOT A STANDARD OPEN SOURCE PROJECT / ESTE NO ES UN PROYECTO OPEN SOURCE ESTÁNDAR ⚠️**
4
+
5
+ **[EN]**
6
+ This library is strictly provided for **personal, educational, and non-commercial use only**.
7
+
8
+ You are **EXPLICITLY PROHIBITED** from using `rosinterface` to:
9
+ - Build SaaS (Software as a Service) platforms, WISP/ISP management panels, or billing systems.
10
+ - Provide paid consulting, automation, or network management services to third parties.
11
+ - Embed, modify, or redistribute this code in any commercial product.
12
+
13
+ 🏢 **Enterprise & Commercial Licensing:**
14
+ If you wish to use this library in a commercial environment, SaaS, or for-profit project, you **must** acquire a Commercial License. Contact the author directly to negotiate terms. Read the full terms in the [LICENSE.md](https://unpkg.com/rosinterface/LICENSE.md) file.
15
+
16
+ ---
17
+
18
+ **[ES]**
19
+ Esta librería se proporciona estrictamente para **uso personal, educativo y no comercial**.
20
+
21
+ Queda **EXPLÍCITAMENTE PROHIBIDO** usar `rosinterface` para:
22
+ - Crear plataformas SaaS, paneles de administración WISP/ISP o sistemas de facturación.
23
+ - Proveer servicios remunerados de consultoría, automatización o gestión de redes a terceros.
24
+ - Integrar, modificar o redistribuir este código en cualquier producto comercial.
25
+
26
+ 🏢 **Licencia Comercial y Corporativa:**
27
+ Si deseas utilizar esta librería en un entorno comercial, SaaS o proyecto con fines de lucro, **debes** adquirir una Licencia Comercial. Contacta al autor directamente para negociar los términos. Lee las condiciones completas en el archivo [LICENSE.md](https://unpkg.com/rosinterface/LICENSE.md).
28
+
1
29
  # RosInterface v1.4
2
30
 
3
31
  > **High-Performance RouterOS Automation A modern TypeScript and JavasScript Library for MikroTik interactions.**
@@ -26,13 +26,13 @@ class PrometheusExporter {
26
26
  // 1. Add TYPE and HELP headers
27
27
  output += `# HELP ${def.metricName} ${def.help}\n`;
28
28
  output += `# TYPE ${def.metricName} ${def.type}\n`;
29
- // 2. Iterate over all items (rows) from the router
29
+ // Iterate over all items (rows) from the router
30
30
  for (const item of items) {
31
31
  const value = item[def.sourceField];
32
32
  // Skip undefined or non-numeric values (unless mapped)
33
33
  if (value === undefined || value === null)
34
34
  continue;
35
- // 3. Build Labels (e.g., {interface="ether1", mac="..."})
35
+ // Build Labels (e.g., {interface="ether1", mac="..."})
36
36
  let labelString = '';
37
37
  if (def.labels && def.labels.length > 0) {
38
38
  const labelParts = def.labels.map(labelField => {
@@ -45,8 +45,6 @@ class PrometheusExporter {
45
45
  });
46
46
  labelString = `{${labelParts.join(',')}}`;
47
47
  }
48
- // 4. Format Line
49
- // router_cpu_load{host="192.168.1.1"} 15
50
48
  output += `${def.metricName}${labelString} ${value}\n`;
51
49
  }
52
50
  output += '\n';
@@ -1 +1 @@
1
- {"version":3,"file":"PrometheusExporter.js","sourceRoot":"","sources":["../../src/features/PrometheusExporter.ts"],"names":[],"mappings":";;;AAEA,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,6BAAe,CAAA;IACf,iCAAmB,CAAA,CAAE,6CAA6C;AACtE,CAAC,EA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IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACtC,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;wBAC3C,0BAA0B;wBAC1B,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC,CAAC;wBAC1D,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;wBACvD,wEAAwE;wBACxE,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;wBACrD,OAAO,GAAG,cAAc,KAAK,aAAa,GAAG,CAAC;oBAClD,CAAC,CAAC,CAAC;oBACH,WAAW,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;gBAC9C,CAAC;gBAED,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,GAAG,WAAW,IAAI,KAAK,IAAI,CAAC;YAC3D,CAAC;YACD,MAAM,IAAI,IAAI,CAAC;QACnB,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AA9CD,gDA8CC"}
package/package.json CHANGED
@@ -1,19 +1,11 @@
1
1
  {
2
2
  "name": "rosinterface",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "High-performance, Offline-First Mikrotik RouterOS API Client for Enterprise.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "author": "McBlockier",
8
- "license": "MIT",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/McBlockier0216/RosInterface.git"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/McBlockier0216/RosInterface/issues"
15
- },
16
- "homepage": "https://github.com/McBlockier0216/RosInterface#readme",
8
+ "license": "SEE LICENSE IN LICENSE.md",
17
9
  "keywords": [
18
10
  "mikrotik",
19
11
  "routeros",
@@ -38,7 +30,8 @@
38
30
  ],
39
31
  "files": [
40
32
  "dist",
41
- "README.md"
33
+ "README.md",
34
+ "LICENSE.md"
42
35
  ],
43
36
  "scripts": {
44
37
  "build": "tsc",
@@ -53,7 +46,6 @@
53
46
  "dotenv": "^16.6.1",
54
47
  "fs-extra": "^11.3.3",
55
48
  "ora": "^9.0.0",
56
- "rosinterface": "^1.3.1",
57
49
  "ssh2": "^1.17.0",
58
50
  "undici": "^7.18.2"
59
51
  },