influx 5.0.3 → 5.0.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # node-influx Changelog
2
2
 
3
+ ## 2017-03-04, 5.0.5
4
+
5
+ * Allow passing custom request options to http(s)?.request ([#262](https://github.com/node-influx/node-influx/issues/262), [#260](https://github.com/node-influx/node-influx/issues/260))
6
+ * Fix getNanoDate failing for second-precision timestamps ([#261](https://github.com/node-influx/node-influx/issues/261))
7
+ * Update TypeScript to 2.2.x
8
+ * Support multiple queries in queryRaw() ([#254](https://github.com/node-influx/node-influx/pull/254))
9
+
3
10
  ## 2016-11-12, 5.0.1
4
11
 
5
12
  * bug: `.grantPrivilege` generating invalid queries ([#239](https://github.com/node-influx/node-influx/issues/239))
@@ -1,15 +1,15 @@
1
- export interface IBackoffStrategy {
2
- /**
3
- * getDelay returns the amount of delay of the current backoff.
4
- */
5
- getDelay(): number;
6
- /**
7
- * Next is called when a failure occurs on a host to
8
- * return the next backoff amount.
9
- */
10
- next(): IBackoffStrategy;
11
- /**
12
- * Returns a strategy with a reset backoff counter.
13
- */
14
- reset(): IBackoffStrategy;
15
- }
1
+ export interface IBackoffStrategy {
2
+ /**
3
+ * getDelay returns the amount of delay of the current backoff.
4
+ */
5
+ getDelay(): number;
6
+ /**
7
+ * Next is called when a failure occurs on a host to
8
+ * return the next backoff amount.
9
+ */
10
+ next(): IBackoffStrategy;
11
+ /**
12
+ * Returns a strategy with a reset backoff counter.
13
+ */
14
+ reset(): IBackoffStrategy;
15
+ }
@@ -1 +1,2 @@
1
- "use strict";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,52 +1,52 @@
1
- import { IBackoffStrategy } from './backoff';
2
- /**
3
- * IExponentialOptions are passed into the ExponentialBackoff constructor. The
4
- * backoff equation is, in general, min(max, initial ^ n), where `n` is
5
- * an incremented backoff factor. The result of the equation is a delay
6
- * given in milliseconds.
7
- *
8
- * @typedef {Object} IExponentialOptions
9
- * @property {Number} initial The initial delay passed to the equation.
10
- * @property {Number} random Random factor to subtract from the `n` count.
11
- * @property {Number} max Max is the maximum value of the delay.
12
- */
13
- export interface IExponentialOptions {
14
- /**
15
- * The initial delay passed to the equation.
16
- */
17
- initial: number;
18
- /**
19
- * Random factor to subtract from the `n` count.
20
- */
21
- random: number;
22
- /**
23
- * max is the maximum value of the delay.
24
- */
25
- max: number;
26
- }
27
- /**
28
- * @class
29
- * @implements {IBackoffStrategy}
30
- */
31
- export declare class ExponentialBackoff implements IBackoffStrategy {
32
- protected options: IExponentialOptions;
33
- private counter;
34
- /**
35
- * Creates a new exponential backoff strategy.
36
- * @see https://en.wikipedia.org/wiki/Exponential_backoff
37
- * @param {IExponentialOptions} options
38
- */
39
- constructor(options: IExponentialOptions);
40
- /**
41
- * @inheritDoc
42
- */
43
- getDelay(): number;
44
- /**
45
- * @inheritDoc
46
- */
47
- next(): IBackoffStrategy;
48
- /**
49
- * @inheritDoc
50
- */
51
- reset(): IBackoffStrategy;
52
- }
1
+ import { IBackoffStrategy } from './backoff';
2
+ /**
3
+ * IExponentialOptions are passed into the ExponentialBackoff constructor. The
4
+ * backoff equation is, in general, min(max, initial ^ n), where `n` is
5
+ * an incremented backoff factor. The result of the equation is a delay
6
+ * given in milliseconds.
7
+ *
8
+ * @typedef {Object} IExponentialOptions
9
+ * @property {Number} initial The initial delay passed to the equation.
10
+ * @property {Number} random Random factor to subtract from the `n` count.
11
+ * @property {Number} max Max is the maximum value of the delay.
12
+ */
13
+ export interface IExponentialOptions {
14
+ /**
15
+ * The initial delay passed to the equation.
16
+ */
17
+ initial: number;
18
+ /**
19
+ * Random factor to subtract from the `n` count.
20
+ */
21
+ random: number;
22
+ /**
23
+ * max is the maximum value of the delay.
24
+ */
25
+ max: number;
26
+ }
27
+ /**
28
+ * @class
29
+ * @implements {IBackoffStrategy}
30
+ */
31
+ export declare class ExponentialBackoff implements IBackoffStrategy {
32
+ protected options: IExponentialOptions;
33
+ private counter;
34
+ /**
35
+ * Creates a new exponential backoff strategy.
36
+ * @see https://en.wikipedia.org/wiki/Exponential_backoff
37
+ * @param {IExponentialOptions} options
38
+ */
39
+ constructor(options: IExponentialOptions);
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ getDelay(): number;
44
+ /**
45
+ * @inheritDoc
46
+ */
47
+ next(): IBackoffStrategy;
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ reset(): IBackoffStrategy;
52
+ }
@@ -1,39 +1,40 @@
1
- "use strict";
2
- /**
3
- * @class
4
- * @implements {IBackoffStrategy}
5
- */
6
- var ExponentialBackoff = (function () {
7
- /**
8
- * Creates a new exponential backoff strategy.
9
- * @see https://en.wikipedia.org/wiki/Exponential_backoff
10
- * @param {IExponentialOptions} options
11
- */
12
- function ExponentialBackoff(options) {
13
- this.options = options;
14
- this.counter = 0;
15
- }
16
- /**
17
- * @inheritDoc
18
- */
19
- ExponentialBackoff.prototype.getDelay = function () {
20
- var count = this.counter - Math.round(Math.random() * this.options.random); // tslint:disable-line
21
- return Math.min(this.options.max, this.options.initial * Math.pow(2, Math.max(count, 0)));
22
- };
23
- /**
24
- * @inheritDoc
25
- */
26
- ExponentialBackoff.prototype.next = function () {
27
- var next = new ExponentialBackoff(this.options);
28
- next.counter = this.counter + 1;
29
- return next;
30
- };
31
- /**
32
- * @inheritDoc
33
- */
34
- ExponentialBackoff.prototype.reset = function () {
35
- return new ExponentialBackoff(this.options);
36
- };
37
- return ExponentialBackoff;
38
- }());
39
- exports.ExponentialBackoff = ExponentialBackoff;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * @class
5
+ * @implements {IBackoffStrategy}
6
+ */
7
+ var ExponentialBackoff = (function () {
8
+ /**
9
+ * Creates a new exponential backoff strategy.
10
+ * @see https://en.wikipedia.org/wiki/Exponential_backoff
11
+ * @param {IExponentialOptions} options
12
+ */
13
+ function ExponentialBackoff(options) {
14
+ this.options = options;
15
+ this.counter = 0;
16
+ }
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ ExponentialBackoff.prototype.getDelay = function () {
21
+ var count = this.counter - Math.round(Math.random() * this.options.random); // tslint:disable-line
22
+ return Math.min(this.options.max, this.options.initial * Math.pow(2, Math.max(count, 0)));
23
+ };
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ ExponentialBackoff.prototype.next = function () {
28
+ var next = new ExponentialBackoff(this.options);
29
+ next.counter = this.counter + 1;
30
+ return next;
31
+ };
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ ExponentialBackoff.prototype.reset = function () {
36
+ return new ExponentialBackoff(this.options);
37
+ };
38
+ return ExponentialBackoff;
39
+ }());
40
+ exports.ExponentialBackoff = ExponentialBackoff;