@swimlane/turbine-sdk 1.2.0 → 2.0.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.
Files changed (95) hide show
  1. package/LICENSE +5 -658
  2. package/README.md +784 -125
  3. package/bin/dev +17 -0
  4. package/bin/dev.cmd +3 -0
  5. package/bin/run +5 -0
  6. package/bin/run.cmd +3 -0
  7. package/lib/index.d.ts +1 -0
  8. package/lib/index.js +6 -0
  9. package/lib/index.js.map +1 -0
  10. package/oclif.manifest.json +1 -0
  11. package/package.json +98 -79
  12. package/dist/Sensor/BaseSensor.d.ts +0 -9
  13. package/dist/Sensor/BaseSensor.js +0 -10
  14. package/dist/Sensor/HttpSensorAgentInterface.d.ts +0 -21
  15. package/dist/Sensor/HttpSensorAgentInterface.js +0 -81
  16. package/dist/Sensor/MockSensorAgentInterface.d.ts +0 -22
  17. package/dist/Sensor/MockSensorAgentInterface.js +0 -76
  18. package/dist/Sensor/SensorAgentInterface.d.ts +0 -17
  19. package/dist/Sensor/SensorAgentInterface.js +0 -24
  20. package/dist/Sensor/SensorConfig.d.ts +0 -24
  21. package/dist/Sensor/SensorConfig.js +0 -3
  22. package/dist/Sensor/index.d.ts +0 -5
  23. package/dist/Sensor/index.js +0 -10
  24. package/dist/index.d.ts +0 -1
  25. package/dist/index.js +0 -7
  26. package/node_modules/axios/CHANGELOG.md +0 -348
  27. package/node_modules/axios/LICENSE +0 -19
  28. package/node_modules/axios/README.md +0 -684
  29. package/node_modules/axios/UPGRADE_GUIDE.md +0 -162
  30. package/node_modules/axios/dist/axios.js +0 -1668
  31. package/node_modules/axios/dist/axios.map +0 -1
  32. package/node_modules/axios/dist/axios.min.js +0 -9
  33. package/node_modules/axios/dist/axios.min.map +0 -1
  34. package/node_modules/axios/index.d.ts +0 -152
  35. package/node_modules/axios/index.js +0 -1
  36. package/node_modules/axios/lib/adapters/README.md +0 -37
  37. package/node_modules/axios/lib/adapters/http.js +0 -275
  38. package/node_modules/axios/lib/adapters/xhr.js +0 -174
  39. package/node_modules/axios/lib/axios.js +0 -53
  40. package/node_modules/axios/lib/cancel/Cancel.js +0 -19
  41. package/node_modules/axios/lib/cancel/CancelToken.js +0 -57
  42. package/node_modules/axios/lib/cancel/isCancel.js +0 -5
  43. package/node_modules/axios/lib/core/Axios.js +0 -86
  44. package/node_modules/axios/lib/core/InterceptorManager.js +0 -52
  45. package/node_modules/axios/lib/core/README.md +0 -7
  46. package/node_modules/axios/lib/core/createError.js +0 -18
  47. package/node_modules/axios/lib/core/dispatchRequest.js +0 -86
  48. package/node_modules/axios/lib/core/enhanceError.js +0 -42
  49. package/node_modules/axios/lib/core/mergeConfig.js +0 -51
  50. package/node_modules/axios/lib/core/settle.js +0 -25
  51. package/node_modules/axios/lib/core/transformData.js +0 -20
  52. package/node_modules/axios/lib/defaults.js +0 -98
  53. package/node_modules/axios/lib/helpers/README.md +0 -7
  54. package/node_modules/axios/lib/helpers/bind.js +0 -11
  55. package/node_modules/axios/lib/helpers/buildURL.js +0 -71
  56. package/node_modules/axios/lib/helpers/combineURLs.js +0 -14
  57. package/node_modules/axios/lib/helpers/cookies.js +0 -53
  58. package/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
  59. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
  60. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
  61. package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  62. package/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
  63. package/node_modules/axios/lib/helpers/spread.js +0 -27
  64. package/node_modules/axios/lib/utils.js +0 -334
  65. package/node_modules/axios/package.json +0 -115
  66. package/node_modules/debug/.coveralls.yml +0 -1
  67. package/node_modules/debug/.eslintrc +0 -14
  68. package/node_modules/debug/.npmignore +0 -9
  69. package/node_modules/debug/.travis.yml +0 -20
  70. package/node_modules/debug/CHANGELOG.md +0 -395
  71. package/node_modules/debug/LICENSE +0 -19
  72. package/node_modules/debug/Makefile +0 -58
  73. package/node_modules/debug/README.md +0 -368
  74. package/node_modules/debug/karma.conf.js +0 -70
  75. package/node_modules/debug/node.js +0 -1
  76. package/node_modules/debug/package.json +0 -87
  77. package/node_modules/debug/src/browser.js +0 -195
  78. package/node_modules/debug/src/debug.js +0 -225
  79. package/node_modules/debug/src/index.js +0 -10
  80. package/node_modules/debug/src/node.js +0 -186
  81. package/node_modules/follow-redirects/LICENSE +0 -18
  82. package/node_modules/follow-redirects/README.md +0 -155
  83. package/node_modules/follow-redirects/http.js +0 -1
  84. package/node_modules/follow-redirects/https.js +0 -1
  85. package/node_modules/follow-redirects/index.js +0 -322
  86. package/node_modules/follow-redirects/package.json +0 -99
  87. package/node_modules/is-buffer/LICENSE +0 -21
  88. package/node_modules/is-buffer/README.md +0 -56
  89. package/node_modules/is-buffer/index.d.ts +0 -2
  90. package/node_modules/is-buffer/index.js +0 -11
  91. package/node_modules/is-buffer/package.json +0 -81
  92. package/node_modules/ms/index.js +0 -152
  93. package/node_modules/ms/license.md +0 -21
  94. package/node_modules/ms/package.json +0 -73
  95. package/node_modules/ms/readme.md +0 -51
@@ -1,81 +0,0 @@
1
- {
2
- "_args": [
3
- [
4
- "is-buffer@2.0.4",
5
- "/Users/danstory/swimlane/turbine-sdk-node"
6
- ]
7
- ],
8
- "_from": "is-buffer@2.0.4",
9
- "_id": "is-buffer@2.0.4",
10
- "_inBundle": false,
11
- "_integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
12
- "_location": "/is-buffer",
13
- "_phantomChildren": {},
14
- "_requested": {
15
- "type": "version",
16
- "registry": true,
17
- "raw": "is-buffer@2.0.4",
18
- "name": "is-buffer",
19
- "escapedName": "is-buffer",
20
- "rawSpec": "2.0.4",
21
- "saveSpec": null,
22
- "fetchSpec": "2.0.4"
23
- },
24
- "_requiredBy": [
25
- "/axios",
26
- "/flat"
27
- ],
28
- "_resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
29
- "_spec": "2.0.4",
30
- "_where": "/Users/danstory/swimlane/turbine-sdk-node",
31
- "author": {
32
- "name": "Feross Aboukhadijeh",
33
- "email": "feross@feross.org",
34
- "url": "https://feross.org"
35
- },
36
- "bugs": {
37
- "url": "https://github.com/feross/is-buffer/issues"
38
- },
39
- "dependencies": {},
40
- "description": "Determine if an object is a Buffer",
41
- "devDependencies": {
42
- "airtap": "^2.0.3",
43
- "standard": "*",
44
- "tape": "^4.11.0"
45
- },
46
- "engines": {
47
- "node": ">=4"
48
- },
49
- "homepage": "https://github.com/feross/is-buffer#readme",
50
- "keywords": [
51
- "arraybuffer",
52
- "browser",
53
- "browser buffer",
54
- "browserify",
55
- "buffer",
56
- "buffers",
57
- "core buffer",
58
- "dataview",
59
- "float32array",
60
- "float64array",
61
- "int16array",
62
- "int32array",
63
- "type",
64
- "typed array",
65
- "uint32array"
66
- ],
67
- "license": "MIT",
68
- "main": "index.js",
69
- "name": "is-buffer",
70
- "repository": {
71
- "type": "git",
72
- "url": "git://github.com/feross/is-buffer.git"
73
- },
74
- "scripts": {
75
- "test": "standard && npm run test-node && npm run test-browser",
76
- "test-browser": "airtap -- test/*.js",
77
- "test-browser-local": "airtap --local -- test/*.js",
78
- "test-node": "tape test/*.js"
79
- },
80
- "version": "2.0.4"
81
- }
@@ -1,152 +0,0 @@
1
- /**
2
- * Helpers.
3
- */
4
-
5
- var s = 1000;
6
- var m = s * 60;
7
- var h = m * 60;
8
- var d = h * 24;
9
- var y = d * 365.25;
10
-
11
- /**
12
- * Parse or format the given `val`.
13
- *
14
- * Options:
15
- *
16
- * - `long` verbose formatting [false]
17
- *
18
- * @param {String|Number} val
19
- * @param {Object} [options]
20
- * @throws {Error} throw an error if val is not a non-empty string or a number
21
- * @return {String|Number}
22
- * @api public
23
- */
24
-
25
- module.exports = function(val, options) {
26
- options = options || {};
27
- var type = typeof val;
28
- if (type === 'string' && val.length > 0) {
29
- return parse(val);
30
- } else if (type === 'number' && isNaN(val) === false) {
31
- return options.long ? fmtLong(val) : fmtShort(val);
32
- }
33
- throw new Error(
34
- 'val is not a non-empty string or a valid number. val=' +
35
- JSON.stringify(val)
36
- );
37
- };
38
-
39
- /**
40
- * Parse the given `str` and return milliseconds.
41
- *
42
- * @param {String} str
43
- * @return {Number}
44
- * @api private
45
- */
46
-
47
- function parse(str) {
48
- str = String(str);
49
- if (str.length > 100) {
50
- return;
51
- }
52
- var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
53
- str
54
- );
55
- if (!match) {
56
- return;
57
- }
58
- var n = parseFloat(match[1]);
59
- var type = (match[2] || 'ms').toLowerCase();
60
- switch (type) {
61
- case 'years':
62
- case 'year':
63
- case 'yrs':
64
- case 'yr':
65
- case 'y':
66
- return n * y;
67
- case 'days':
68
- case 'day':
69
- case 'd':
70
- return n * d;
71
- case 'hours':
72
- case 'hour':
73
- case 'hrs':
74
- case 'hr':
75
- case 'h':
76
- return n * h;
77
- case 'minutes':
78
- case 'minute':
79
- case 'mins':
80
- case 'min':
81
- case 'm':
82
- return n * m;
83
- case 'seconds':
84
- case 'second':
85
- case 'secs':
86
- case 'sec':
87
- case 's':
88
- return n * s;
89
- case 'milliseconds':
90
- case 'millisecond':
91
- case 'msecs':
92
- case 'msec':
93
- case 'ms':
94
- return n;
95
- default:
96
- return undefined;
97
- }
98
- }
99
-
100
- /**
101
- * Short format for `ms`.
102
- *
103
- * @param {Number} ms
104
- * @return {String}
105
- * @api private
106
- */
107
-
108
- function fmtShort(ms) {
109
- if (ms >= d) {
110
- return Math.round(ms / d) + 'd';
111
- }
112
- if (ms >= h) {
113
- return Math.round(ms / h) + 'h';
114
- }
115
- if (ms >= m) {
116
- return Math.round(ms / m) + 'm';
117
- }
118
- if (ms >= s) {
119
- return Math.round(ms / s) + 's';
120
- }
121
- return ms + 'ms';
122
- }
123
-
124
- /**
125
- * Long format for `ms`.
126
- *
127
- * @param {Number} ms
128
- * @return {String}
129
- * @api private
130
- */
131
-
132
- function fmtLong(ms) {
133
- return plural(ms, d, 'day') ||
134
- plural(ms, h, 'hour') ||
135
- plural(ms, m, 'minute') ||
136
- plural(ms, s, 'second') ||
137
- ms + ' ms';
138
- }
139
-
140
- /**
141
- * Pluralization helper.
142
- */
143
-
144
- function plural(ms, n, name) {
145
- if (ms < n) {
146
- return;
147
- }
148
- if (ms < n * 1.5) {
149
- return Math.floor(ms / n) + ' ' + name;
150
- }
151
- return Math.ceil(ms / n) + ' ' + name + 's';
152
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 Zeit, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,73 +0,0 @@
1
- {
2
- "_args": [
3
- [
4
- "ms@2.0.0",
5
- "/Users/danstory/swimlane/turbine-sdk-node"
6
- ]
7
- ],
8
- "_from": "ms@2.0.0",
9
- "_id": "ms@2.0.0",
10
- "_inBundle": false,
11
- "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
12
- "_location": "/ms",
13
- "_phantomChildren": {},
14
- "_requested": {
15
- "type": "version",
16
- "registry": true,
17
- "raw": "ms@2.0.0",
18
- "name": "ms",
19
- "escapedName": "ms",
20
- "rawSpec": "2.0.0",
21
- "saveSpec": null,
22
- "fetchSpec": "2.0.0"
23
- },
24
- "_requiredBy": [
25
- "/debug",
26
- "/mocha-junit-reporter/debug"
27
- ],
28
- "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
29
- "_spec": "2.0.0",
30
- "_where": "/Users/danstory/swimlane/turbine-sdk-node",
31
- "bugs": {
32
- "url": "https://github.com/zeit/ms/issues"
33
- },
34
- "description": "Tiny milisecond conversion utility",
35
- "devDependencies": {
36
- "eslint": "3.19.0",
37
- "expect.js": "0.3.1",
38
- "husky": "0.13.3",
39
- "lint-staged": "3.4.1",
40
- "mocha": "3.4.1"
41
- },
42
- "eslintConfig": {
43
- "extends": "eslint:recommended",
44
- "env": {
45
- "node": true,
46
- "es6": true
47
- }
48
- },
49
- "files": [
50
- "index.js"
51
- ],
52
- "homepage": "https://github.com/zeit/ms#readme",
53
- "license": "MIT",
54
- "lint-staged": {
55
- "*.js": [
56
- "npm run lint",
57
- "prettier --single-quote --write",
58
- "git add"
59
- ]
60
- },
61
- "main": "./index",
62
- "name": "ms",
63
- "repository": {
64
- "type": "git",
65
- "url": "git+https://github.com/zeit/ms.git"
66
- },
67
- "scripts": {
68
- "lint": "eslint lib/* bin/*",
69
- "precommit": "lint-staged",
70
- "test": "mocha tests.js"
71
- },
72
- "version": "2.0.0"
73
- }
@@ -1,51 +0,0 @@
1
- # ms
2
-
3
- [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms)
4
- [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/)
5
-
6
- Use this package to easily convert various time formats to milliseconds.
7
-
8
- ## Examples
9
-
10
- ```js
11
- ms('2 days') // 172800000
12
- ms('1d') // 86400000
13
- ms('10h') // 36000000
14
- ms('2.5 hrs') // 9000000
15
- ms('2h') // 7200000
16
- ms('1m') // 60000
17
- ms('5s') // 5000
18
- ms('1y') // 31557600000
19
- ms('100') // 100
20
- ```
21
-
22
- ### Convert from milliseconds
23
-
24
- ```js
25
- ms(60000) // "1m"
26
- ms(2 * 60000) // "2m"
27
- ms(ms('10 hours')) // "10h"
28
- ```
29
-
30
- ### Time format written-out
31
-
32
- ```js
33
- ms(60000, { long: true }) // "1 minute"
34
- ms(2 * 60000, { long: true }) // "2 minutes"
35
- ms(ms('10 hours'), { long: true }) // "10 hours"
36
- ```
37
-
38
- ## Features
39
-
40
- - Works both in [node](https://nodejs.org) and in the browser.
41
- - If a number is supplied to `ms`, a string with a unit is returned.
42
- - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
43
- - If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
44
-
45
- ## Caught a bug?
46
-
47
- 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
48
- 2. Link the package to the global module directory: `npm link`
49
- 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
50
-
51
- As always, you can run the tests using: `npm test`