@gibme/mikrotik 1.0.2 → 1.1.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.ts +7 -3
- package/dist/index.js +1 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import SSH from '@gibme/ssh';
|
|
2
2
|
import { BandwidthTest, Response } from './types';
|
|
3
3
|
import Cache from '@gibme/cache/memory';
|
|
4
|
-
export
|
|
5
|
-
export type
|
|
4
|
+
export { ConnectConfig } from '@gibme/ssh';
|
|
5
|
+
export type Direction = BandwidthTest.Direction;
|
|
6
|
+
export type Protocol = BandwidthTest.Protocol;
|
|
7
|
+
export type Status = BandwidthTest.Status;
|
|
8
|
+
export type Update = BandwidthTest.Update;
|
|
9
|
+
export type Options = BandwidthTest.Options;
|
|
6
10
|
export type Address = Response.Address;
|
|
7
11
|
export type Interface = Response.Interface;
|
|
8
12
|
export type Route = Response.Route;
|
|
@@ -46,7 +50,7 @@ export default class Mikrotik extends SSH {
|
|
|
46
50
|
* @param password
|
|
47
51
|
* @param options
|
|
48
52
|
*/
|
|
49
|
-
bandwidth_test(target: string, username: string, password: string, options?: Partial<
|
|
53
|
+
bandwidth_test(target: string, username: string, password: string, options?: Partial<Options>): Promise<Update>;
|
|
50
54
|
/**
|
|
51
55
|
* Pings the target IP address from the source IP address (if supplied)
|
|
52
56
|
*
|
package/dist/index.js
CHANGED
|
@@ -338,8 +338,7 @@ class Mikrotik extends ssh_1.default {
|
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
this.on('stream', handleStream);
|
|
341
|
-
// set our mutex
|
|
342
|
-
yield Mikrotik.cache.set(target, target, options.duration);
|
|
341
|
+
yield Mikrotik.cache.set(target, target, options.duration); // set our mutex
|
|
343
342
|
yield this.stream(`/tool bandwidth-test protocol=${options.protocol} ` +
|
|
344
343
|
`user=${username} password=${password} ` +
|
|
345
344
|
`duration=${options.duration}s direction=${options.direction} ` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gibme/mikrotik",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A simple mikrotik helper/wrapper",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@gibme/cache": "^1.1.5",
|
|
59
|
-
"@gibme/ssh": "^1.0.
|
|
59
|
+
"@gibme/ssh": "^1.0.1",
|
|
60
60
|
"@types/ip": "^1.1.3",
|
|
61
61
|
"ip": "^2.0.1"
|
|
62
62
|
}
|