added node-red-contrib-influxdv
This commit is contained in:
parent
2ba50e7fac
commit
f225035204
|
@ -654,5 +654,27 @@
|
|||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_spacer.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"node-red-contrib-influxdb": {
|
||||
"name": "node-red-contrib-influxdb",
|
||||
"version": "0.6.1",
|
||||
"local": true,
|
||||
"user": true,
|
||||
"nodes": {
|
||||
"influxdb": {
|
||||
"name": "influxdb",
|
||||
"types": [
|
||||
"influxdb",
|
||||
"influxdb out",
|
||||
"influxdb batch",
|
||||
"influxdb in"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-contrib-influxdb",
|
||||
"file": "/data/node_modules/node-red-contrib-influxdb/influxdb.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -415,5 +415,244 @@
|
|||
"file": "/usr/src/node-red/node_modules/@node-red/nodes/core/storage/23-watch.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"node-red-dashboard": {
|
||||
"name": "node-red-dashboard",
|
||||
"version": "3.3.1",
|
||||
"local": true,
|
||||
"user": true,
|
||||
"nodes": {
|
||||
"ui_base": {
|
||||
"name": "ui_base",
|
||||
"types": [
|
||||
"ui_base"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_base.js"
|
||||
},
|
||||
"ui_button": {
|
||||
"name": "ui_button",
|
||||
"types": [
|
||||
"ui_button"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_button.js"
|
||||
},
|
||||
"ui_dropdown": {
|
||||
"name": "ui_dropdown",
|
||||
"types": [
|
||||
"ui_dropdown"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_dropdown.js"
|
||||
},
|
||||
"ui_switch": {
|
||||
"name": "ui_switch",
|
||||
"types": [
|
||||
"ui_switch"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_switch.js"
|
||||
},
|
||||
"ui_slider": {
|
||||
"name": "ui_slider",
|
||||
"types": [
|
||||
"ui_slider"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_slider.js"
|
||||
},
|
||||
"ui_numeric": {
|
||||
"name": "ui_numeric",
|
||||
"types": [
|
||||
"ui_numeric"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_numeric.js"
|
||||
},
|
||||
"ui_text_input": {
|
||||
"name": "ui_text_input",
|
||||
"types": [
|
||||
"ui_text_input"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_text_input.js"
|
||||
},
|
||||
"ui_date_picker": {
|
||||
"name": "ui_date_picker",
|
||||
"types": [
|
||||
"ui_date_picker"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_date_picker.js"
|
||||
},
|
||||
"ui_colour_picker": {
|
||||
"name": "ui_colour_picker",
|
||||
"types": [
|
||||
"ui_colour_picker"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_colour_picker.js"
|
||||
},
|
||||
"ui_form": {
|
||||
"name": "ui_form",
|
||||
"types": [
|
||||
"ui_form"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_form.js"
|
||||
},
|
||||
"ui_text": {
|
||||
"name": "ui_text",
|
||||
"types": [
|
||||
"ui_text"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_text.js"
|
||||
},
|
||||
"ui_gauge": {
|
||||
"name": "ui_gauge",
|
||||
"types": [
|
||||
"ui_gauge"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_gauge.js"
|
||||
},
|
||||
"ui_chart": {
|
||||
"name": "ui_chart",
|
||||
"types": [
|
||||
"ui_chart"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_chart.js"
|
||||
},
|
||||
"ui_audio": {
|
||||
"name": "ui_audio",
|
||||
"types": [
|
||||
"ui_audio"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_audio.js"
|
||||
},
|
||||
"ui_toast": {
|
||||
"name": "ui_toast",
|
||||
"types": [
|
||||
"ui_toast"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_toast.js"
|
||||
},
|
||||
"ui_ui_control": {
|
||||
"name": "ui_ui_control",
|
||||
"types": [
|
||||
"ui_ui_control"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_ui_control.js"
|
||||
},
|
||||
"ui_template": {
|
||||
"name": "ui_template",
|
||||
"types": [
|
||||
"ui_template"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_template.js"
|
||||
},
|
||||
"ui_link": {
|
||||
"name": "ui_link",
|
||||
"types": [
|
||||
"ui_link"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_link.js"
|
||||
},
|
||||
"ui_tab": {
|
||||
"name": "ui_tab",
|
||||
"types": [
|
||||
"ui_tab"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_tab.js"
|
||||
},
|
||||
"ui_group": {
|
||||
"name": "ui_group",
|
||||
"types": [
|
||||
"ui_group"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_group.js"
|
||||
},
|
||||
"ui_spacer": {
|
||||
"name": "ui_spacer",
|
||||
"types": [
|
||||
"ui_spacer"
|
||||
],
|
||||
"enabled": true,
|
||||
"local": true,
|
||||
"user": false,
|
||||
"module": "node-red-dashboard",
|
||||
"file": "/data/node_modules/node-red-dashboard/nodes/ui_spacer.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,2 +1,3 @@
|
|||
|
||||
b296248663b7e32a83f2092532578f5e6165319d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2feditor-api","integrity":"sha512-0xg+MCKBEhljySPFVTA9Z0ajAvErcaB9NAgjdPld0A5aIOikwpZJGhhPlZ7pt7kxWmkXjCF68xnyy+sG7GKWWQ==","time":1677082805973,"size":155144,"metadata":{"time":1677082805856,"url":"https://registry.npmjs.org/@node-red%2feditor-api","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:05 GMT","etag":"\"b92ffa32ff1070b8d4d7b55732f93086\"","last-modified":"Fri, 03 Feb 2023 09:33:38 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
b296248663b7e32a83f2092532578f5e6165319d {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2feditor-api","integrity":"sha512-0xg+MCKBEhljySPFVTA9Z0ajAvErcaB9NAgjdPld0A5aIOikwpZJGhhPlZ7pt7kxWmkXjCF68xnyy+sG7GKWWQ==","time":1677082805973,"size":155144,"metadata":{"time":1677082805856,"url":"https://registry.npmjs.org/@node-red%2feditor-api","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:05 GMT","etag":"\"b92ffa32ff1070b8d4d7b55732f93086\"","last-modified":"Fri, 03 Feb 2023 09:33:38 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
dc45f7f9ab38996ca8ea2f9a3f2720f5d8cd29cb {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2feditor-api","integrity":"sha512-0xg+MCKBEhljySPFVTA9Z0ajAvErcaB9NAgjdPld0A5aIOikwpZJGhhPlZ7pt7kxWmkXjCF68xnyy+sG7GKWWQ==","time":1677162917431,"size":155144,"metadata":{"time":1677162917431,"url":"https://registry.npmjs.org/@node-red%2feditor-api","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:19 GMT","etag":"\"b92ffa32ff1070b8d4d7b55732f93086\"","last-modified":"Fri, 03 Feb 2023 09:33:38 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
ca3957e43d2cdb8a2e838880ac326d226cf1aa2e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/moment-timezone","integrity":"sha512-/3Q1vDzCm5DpkurTzqpu+1omMNJiGht6f45PsAs74rwyxAK0Xazkw32vsNeQDdP3ABqU1nadTr58dqO2jmyjBQ==","time":1677082801402,"size":65412,"metadata":{"time":1677082800873,"url":"https://registry.npmjs.org/moment-timezone","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:00 GMT","etag":"\"c3d900d93689236beb8822c125f85bf7\"","last-modified":"Sun, 11 Dec 2022 10:17:47 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
ca3957e43d2cdb8a2e838880ac326d226cf1aa2e {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/moment-timezone","integrity":"sha512-/3Q1vDzCm5DpkurTzqpu+1omMNJiGht6f45PsAs74rwyxAK0Xazkw32vsNeQDdP3ABqU1nadTr58dqO2jmyjBQ==","time":1677082801402,"size":65412,"metadata":{"time":1677082800873,"url":"https://registry.npmjs.org/moment-timezone","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:00 GMT","etag":"\"c3d900d93689236beb8822c125f85bf7\"","last-modified":"Sun, 11 Dec 2022 10:17:47 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
62673abfa4258543d71cb33843f74467519e8768 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/moment-timezone","integrity":"sha512-/3Q1vDzCm5DpkurTzqpu+1omMNJiGht6f45PsAs74rwyxAK0Xazkw32vsNeQDdP3ABqU1nadTr58dqO2jmyjBQ==","time":1677162914428,"size":65412,"metadata":{"time":1677162914428,"url":"https://registry.npmjs.org/moment-timezone","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:16 GMT","etag":"\"c3d900d93689236beb8822c125f85bf7\"","last-modified":"Sun, 11 Dec 2022 10:17:47 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
8c5e803c62c741a0b30a9fd370ae811eaa9e61b8 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz","integrity":"sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==","time":1677162914657,"size":318961,"metadata":{"time":1677162913712,"url":"https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Thu, 23 Feb 2023 14:35:16 GMT","etag":"\"25247d3dd7029d08a6ac99adab09086b\"","last-modified":"Mon, 08 Nov 2021 14:31:32 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
bf5de66f9d031051d8e1f8281bbef63beffc68bd {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-red-contrib-influxdb/-/node-red-contrib-influxdb-0.6.1.tgz","integrity":"sha512-4Cc3bplqp4QvgZ60WcUbKKVZfKMK1fFMq7lr+piogUWLyZLDuhNgSdRxWigjzr2syswJrHnZ0JCFzkMDIl0afA==","time":1677162914080,"size":14096,"metadata":{"time":1677162913865,"url":"https://registry.npmjs.org/node-red-contrib-influxdb/-/node-red-contrib-influxdb-0.6.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Thu, 23 Feb 2023 14:35:16 GMT","etag":"\"6060d223e4dc1c4317542703ed2196ae\"","last-modified":"Mon, 24 May 2021 02:13:54 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
30875d89edc73f97b2a36832b0bec337fb3ff874 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/influx","integrity":"sha512-cMuQ8ondNSFvrpZ4/JrJPEU7jY7HdZoBFKU29inUfsKIsskqYTvlTDSElIrwYXdlvQ8CSoF/WoZFYJvqoW0u4Q==","time":1677162912913,"size":80348,"metadata":{"time":1677162912785,"url":"https://registry.npmjs.org/influx","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Thu, 23 Feb 2023 14:35:15 GMT","etag":"\"0b4a42c8ff097b3b0715921f7753a3a5\"","last-modified":"Sun, 19 Jun 2022 01:11:57 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
3090b6b7cecc217240e3675adf425e6b3f8d9e54 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2futil","integrity":"sha512-yFRf+FPfSmKKUWW1vi2xyRkTjRZLynJyWlizeayG6ZEnA5BC3iPPdSJlFQpnLnKlXyewrU2XAiKGw3pY6E7c5g==","time":1677082803889,"size":128081,"metadata":{"time":1677082803830,"url":"https://registry.npmjs.org/@node-red%2futil","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:03 GMT","etag":"\"8cce1505c4738bc55598b2b3bd4e0778\"","last-modified":"Fri, 03 Feb 2023 09:31:39 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
3090b6b7cecc217240e3675adf425e6b3f8d9e54 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2futil","integrity":"sha512-yFRf+FPfSmKKUWW1vi2xyRkTjRZLynJyWlizeayG6ZEnA5BC3iPPdSJlFQpnLnKlXyewrU2XAiKGw3pY6E7c5g==","time":1677082803889,"size":128081,"metadata":{"time":1677082803830,"url":"https://registry.npmjs.org/@node-red%2futil","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:03 GMT","etag":"\"8cce1505c4738bc55598b2b3bd4e0778\"","last-modified":"Fri, 03 Feb 2023 09:31:39 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
bad7d15ecefdd1f81ae99f16e600bd77f40941c0 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2futil","integrity":"sha512-yFRf+FPfSmKKUWW1vi2xyRkTjRZLynJyWlizeayG6ZEnA5BC3iPPdSJlFQpnLnKlXyewrU2XAiKGw3pY6E7c5g==","time":1677162915427,"size":128081,"metadata":{"time":1677162915426,"url":"https://registry.npmjs.org/@node-red%2futil","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:17 GMT","etag":"\"8cce1505c4738bc55598b2b3bd4e0778\"","last-modified":"Fri, 03 Feb 2023 09:31:39 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
db810ab0e82016a1a57e3644b8ed7be2634c8488 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2fruntime","integrity":"sha512-8L2EQM98LAyfjst7/WNTkXOAqr5kSavI3FNP5kIW4nGulGj6W/6otC3Cct9Zt/WF5p5JShyABoezvtZBLkYLoA==","time":1677082805966,"size":131627,"metadata":{"time":1677082805877,"url":"https://registry.npmjs.org/@node-red%2fruntime","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:05 GMT","etag":"\"3387f094d241a590d7696b8e17967dc4\"","last-modified":"Fri, 03 Feb 2023 09:31:46 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
db810ab0e82016a1a57e3644b8ed7be2634c8488 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2fruntime","integrity":"sha512-8L2EQM98LAyfjst7/WNTkXOAqr5kSavI3FNP5kIW4nGulGj6W/6otC3Cct9Zt/WF5p5JShyABoezvtZBLkYLoA==","time":1677082805966,"size":131627,"metadata":{"time":1677082805877,"url":"https://registry.npmjs.org/@node-red%2fruntime","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:05 GMT","etag":"\"3387f094d241a590d7696b8e17967dc4\"","last-modified":"Fri, 03 Feb 2023 09:31:46 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
ee7e2ff76de0018b2c2d3691b5434805dac19e10 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2fruntime","integrity":"sha512-8L2EQM98LAyfjst7/WNTkXOAqr5kSavI3FNP5kIW4nGulGj6W/6otC3Cct9Zt/WF5p5JShyABoezvtZBLkYLoA==","time":1677162917477,"size":131627,"metadata":{"time":1677162917477,"url":"https://registry.npmjs.org/@node-red%2fruntime","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:19 GMT","etag":"\"3387f094d241a590d7696b8e17967dc4\"","last-modified":"Fri, 03 Feb 2023 09:31:46 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
c857e943204cf21b32e488f90939462fa340867a {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@influxdata/influxdb-client/-/influxdb-client-1.33.1.tgz","integrity":"sha512-MAKevkaXAVMGqCqEHA0bBd10wzHjF4UDk1Dhkx7rWR784VpiOFxFjMBtO7A4f3jJGSdqdMvn8Lr1U/iS8PlVNw==","time":1677162914426,"size":289877,"metadata":{"time":1677162913854,"url":"https://registry.npmjs.org/@influxdata/influxdb-client/-/influxdb-client-1.33.1.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, must-revalidate, max-age=31557600","content-type":"application/octet-stream","date":"Thu, 23 Feb 2023 14:35:16 GMT","etag":"\"15ae0af866535358b03a832a6712bc83\"","last-modified":"Thu, 26 Jan 2023 18:13:06 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
2d84d32602d2519f2795b07f3d77f1e91aa7a508 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/influx/-/influx-5.6.3.tgz","integrity":"sha512-j2biV776HXb2IbIcp2G24w50IqIWENDnKitm0Vj54vlpw9EfGzY7x7ndCRZSGzzm4fyDLSDQ+/cypZQpuDQxyA==","time":1677162914121,"size":38924,"metadata":{"time":1677162913860,"url":"https://registry.npmjs.org/influx/-/influx-5.6.3.tgz","reqHeaders":{},"resHeaders":{"cache-control":"public, immutable, max-age=31557600","content-type":"application/octet-stream","date":"Thu, 23 Feb 2023 14:35:16 GMT","etag":"\"2807150f8ad26103e9ba610148162db1\"","last-modified":"Tue, 11 Aug 2020 10:48:36 GMT","vary":"Accept-Encoding"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
487352058ebd9af3951e47b1968f04aad1770664 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@influxdata%2finfluxdb-client","integrity":"sha512-0RwhUIWNYGhOlEidzP8Nk2u3C1o6NW/Idu8qSaFux4fgttmrmLeWd893UowTqihBlOFwTFRbPSYRT3lO3Bceog==","time":1677162913464,"size":1118294,"metadata":{"time":1677162913002,"url":"https://registry.npmjs.org/@influxdata%2finfluxdb-client","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Thu, 23 Feb 2023 14:35:15 GMT","etag":"\"1e2779755d4a3bbe743816ceebf69460\"","last-modified":"Wed, 22 Feb 2023 17:54:30 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
a5ff138c2938024be89fc024329018797c2f0743 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-red-contrib-influxdb","integrity":"sha512-dYfqn+PoWABKNXjl6P7mFToFdqCH08QmoPy6RZpPBXJs9tAqDh/rHw4tliexFJI1sIuLc4RZiayw9Tl4n7k8oQ==","time":1677162912688,"size":24378,"metadata":{"time":1677162912619,"url":"https://registry.npmjs.org/node-red-contrib-influxdb","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Thu, 23 Feb 2023 14:35:14 GMT","etag":"\"684c9c8a582f1f2a768cde255c02d406\"","last-modified":"Tue, 21 Jun 2022 19:23:39 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
959a3abe73afa2def894b7b57402fc9b28ff4bd9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/cacheable-request","integrity":"sha512-DhBr5HnKCTcXcyIzg7QVAg0TmnoDo73SPU6mmummiWrAVLRpkGQd/JDmrwrK5MnG5FJJ8l1SoNHCpjfNE44UNQ==","time":1677082802007,"size":78061,"metadata":{"time":1677082801788,"url":"https://registry.npmjs.org/cacheable-request","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:01 GMT","etag":"\"13e0a599deb43a9e9222f57fdf5ec68e\"","last-modified":"Mon, 06 Feb 2023 18:11:00 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
959a3abe73afa2def894b7b57402fc9b28ff4bd9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/cacheable-request","integrity":"sha512-DhBr5HnKCTcXcyIzg7QVAg0TmnoDo73SPU6mmummiWrAVLRpkGQd/JDmrwrK5MnG5FJJ8l1SoNHCpjfNE44UNQ==","time":1677082802007,"size":78061,"metadata":{"time":1677082801788,"url":"https://registry.npmjs.org/cacheable-request","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:01 GMT","etag":"\"13e0a599deb43a9e9222f57fdf5ec68e\"","last-modified":"Mon, 06 Feb 2023 18:11:00 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
a6f6a62ace72040fe60d575749d6ecab3f24fad9 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/cacheable-request","integrity":"sha512-DhBr5HnKCTcXcyIzg7QVAg0TmnoDo73SPU6mmummiWrAVLRpkGQd/JDmrwrK5MnG5FJJ8l1SoNHCpjfNE44UNQ==","time":1677162914879,"size":78061,"metadata":{"time":1677162914879,"url":"https://registry.npmjs.org/cacheable-request","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:17 GMT","etag":"\"13e0a599deb43a9e9222f57fdf5ec68e\"","last-modified":"Mon, 06 Feb 2023 18:11:00 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
1bf4293a32848b418ec42050f00c3f8305b3fd96 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/http-cache-semantics","integrity":"sha512-XcFMXhaRhOUInT9Dk/wK84pOqOey0ay7XoVsFrHls2Z2aaKswtPjPFuP2z6s7henuhCPTn6dUENauppQ5ZMqEg==","time":1677082801133,"size":21479,"metadata":{"time":1677082800876,"url":"https://registry.npmjs.org/http-cache-semantics","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:00 GMT","etag":"\"6adfaba6c902a8f903299157aa62f5e3\"","last-modified":"Fri, 27 Jan 2023 01:29:13 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
1bf4293a32848b418ec42050f00c3f8305b3fd96 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/http-cache-semantics","integrity":"sha512-XcFMXhaRhOUInT9Dk/wK84pOqOey0ay7XoVsFrHls2Z2aaKswtPjPFuP2z6s7henuhCPTn6dUENauppQ5ZMqEg==","time":1677082801133,"size":21479,"metadata":{"time":1677082800876,"url":"https://registry.npmjs.org/http-cache-semantics","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:00 GMT","etag":"\"6adfaba6c902a8f903299157aa62f5e3\"","last-modified":"Fri, 27 Jan 2023 01:29:13 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
bd243c8bf9498fc4fce94f1b6c2e20967dd33866 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/http-cache-semantics","integrity":"sha512-XcFMXhaRhOUInT9Dk/wK84pOqOey0ay7XoVsFrHls2Z2aaKswtPjPFuP2z6s7henuhCPTn6dUENauppQ5ZMqEg==","time":1677162914413,"size":21479,"metadata":{"time":1677162914412,"url":"https://registry.npmjs.org/http-cache-semantics","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:16 GMT","etag":"\"6adfaba6c902a8f903299157aa62f5e3\"","last-modified":"Fri, 27 Jan 2023 01:29:13 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
1a7632acad977fd67af844cc23cc4d60a8794f49 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/lodash","integrity":"sha512-p9OvmOId1oeenxdG+LLRjzx5gBXl6cYqbCK0l6h0yu2JUH76N27spq404XRgCVV+vnvf5NeYYASSOIY/MbEIAg==","time":1677162912971,"size":67972,"metadata":{"time":1677162912837,"url":"https://registry.npmjs.org/lodash","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Thu, 23 Feb 2023 14:35:15 GMT","etag":"\"366fbb1e0ad202d3d90a4449c71cf63f\"","last-modified":"Sun, 12 Feb 2023 08:12:06 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
095e02d4b81756cb70060d91e44f3952ee34af5c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-red","integrity":"sha512-MTzS6m+u+gonuavWGUo949MAclcZl/c9HFgEI7wWyOt2J5II9YakjNjOB0j6XVwA4X9glaL0T/QQKZMj9ekb7Q==","time":1677082804997,"size":288474,"metadata":{"time":1677082804881,"url":"https://registry.npmjs.org/node-red","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:04 GMT","etag":"\"6abf11d8512922017b5486954265cc28\"","last-modified":"Fri, 03 Feb 2023 09:33:48 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
095e02d4b81756cb70060d91e44f3952ee34af5c {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-red","integrity":"sha512-MTzS6m+u+gonuavWGUo949MAclcZl/c9HFgEI7wWyOt2J5II9YakjNjOB0j6XVwA4X9glaL0T/QQKZMj9ekb7Q==","time":1677082804997,"size":288474,"metadata":{"time":1677082804881,"url":"https://registry.npmjs.org/node-red","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:04 GMT","etag":"\"6abf11d8512922017b5486954265cc28\"","last-modified":"Fri, 03 Feb 2023 09:33:48 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
f7aec858ed3dcebfa76407d958985818255faa86 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/node-red","integrity":"sha512-MTzS6m+u+gonuavWGUo949MAclcZl/c9HFgEI7wWyOt2J5II9YakjNjOB0j6XVwA4X9glaL0T/QQKZMj9ekb7Q==","time":1677162916820,"size":288474,"metadata":{"time":1677162916819,"url":"https://registry.npmjs.org/node-red","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:18 GMT","etag":"\"6abf11d8512922017b5486954265cc28\"","last-modified":"Fri, 03 Feb 2023 09:33:48 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
|
@ -1,2 +1,3 @@
|
|||
|
||||
cd917058f9893cfeed3c7cf97dad5cf8494b4eda {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2fregistry","integrity":"sha512-OYaoHcQDQsPkWMMXVKd9dZbPW7xJtFC5P9Sp7pumEqdK4p0tJ2NORceL5dy+C1xqrVorK26qRvUWF4MgSQsGaQ==","time":1677082805958,"size":126036,"metadata":{"time":1677082805847,"url":"https://registry.npmjs.org/@node-red%2fregistry","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:05 GMT","etag":"\"6e7700a3d0b2aa4b2b08c0bba832ffcc\"","last-modified":"Fri, 03 Feb 2023 09:31:50 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
cd917058f9893cfeed3c7cf97dad5cf8494b4eda {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2fregistry","integrity":"sha512-OYaoHcQDQsPkWMMXVKd9dZbPW7xJtFC5P9Sp7pumEqdK4p0tJ2NORceL5dy+C1xqrVorK26qRvUWF4MgSQsGaQ==","time":1677082805958,"size":126036,"metadata":{"time":1677082805847,"url":"https://registry.npmjs.org/@node-red%2fregistry","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","content-type":"application/vnd.npm.install-v1+json","date":"Wed, 22 Feb 2023 16:20:05 GMT","etag":"\"6e7700a3d0b2aa4b2b08c0bba832ffcc\"","last-modified":"Fri, 03 Feb 2023 09:31:50 GMT","vary":"accept-encoding, accept"},"options":{"compress":true}}}
|
||||
ba5955fc9de337f331afb22b6014473eda7a3bf7 {"key":"make-fetch-happen:request-cache:https://registry.npmjs.org/@node-red%2fregistry","integrity":"sha512-OYaoHcQDQsPkWMMXVKd9dZbPW7xJtFC5P9Sp7pumEqdK4p0tJ2NORceL5dy+C1xqrVorK26qRvUWF4MgSQsGaQ==","time":1677162917438,"size":126036,"metadata":{"time":1677162917437,"url":"https://registry.npmjs.org/@node-red%2fregistry","reqHeaders":{"accept":"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},"resHeaders":{"cache-control":"public, max-age=300","date":"Thu, 23 Feb 2023 14:35:19 GMT","etag":"\"6e7700a3d0b2aa4b2b08c0bba832ffcc\"","last-modified":"Fri, 03 Feb 2023 09:31:50 GMT","vary":"Accept-Encoding","content-type":"application/vnd.npm.install-v1+json"},"options":{"compress":true}}}
|
1
software/flow/node_modules/.bin/npm
generated
vendored
Symbolic link
1
software/flow/node_modules/.bin/npm
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../npm/bin/npm-cli.js
|
1
software/flow/node_modules/.bin/npx
generated
vendored
Symbolic link
1
software/flow/node_modules/.bin/npx
generated
vendored
Symbolic link
|
@ -0,0 +1 @@
|
|||
../npm/bin/npx-cli.js
|
2736
software/flow/node_modules/.package-lock.json
generated
vendored
2736
software/flow/node_modules/.package-lock.json
generated
vendored
File diff suppressed because it is too large
Load diff
21
software/flow/node_modules/@influxdata/influxdb-client/LICENSE
generated
vendored
Normal file
21
software/flow/node_modules/@influxdata/influxdb-client/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 InfluxData
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
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, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
11
software/flow/node_modules/@influxdata/influxdb-client/README.md
generated
vendored
Normal file
11
software/flow/node_modules/@influxdata/influxdb-client/README.md
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# @influxdata/influxdb-client
|
||||
|
||||
The reference javascript client for InfluxDB 2.x. Both node and browser environments are supported. The package.json
|
||||
|
||||
- **main** points to node.js CJS distribution
|
||||
- **module** points to node.js ESM distribution
|
||||
- **browser** points to browser (UMD) distribution
|
||||
|
||||
Node.js distributions do not work in browser and vice versa, because different platform APIs are used. Use `@influxdata/influxdb-client-browser` to import browser ESM module. See https://github.com/influxdata/influxdb-client-js to know more.
|
||||
|
||||
**Note: This library is for use with InfluxDB 2.x or 1.8+. For connecting to InfluxDB 1.x instances, see [node-influx](https://github.com/node-influx/node-influx).**
|
8
software/flow/node_modules/@influxdata/influxdb-client/api-extractor.json
generated
vendored
Normal file
8
software/flow/node_modules/@influxdata/influxdb-client/api-extractor.json
generated
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Config file for API Extractor. For more info, please visit: https://api-extractor.com
|
||||
*/
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"extends": "../../scripts/api-extractor-base.json",
|
||||
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts"
|
||||
}
|
84
software/flow/node_modules/@influxdata/influxdb-client/package.json
generated
vendored
Normal file
84
software/flow/node_modules/@influxdata/influxdb-client/package.json
generated
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
"name": "@influxdata/influxdb-client",
|
||||
"version": "1.33.1",
|
||||
"description": "InfluxDB 2.x client",
|
||||
"scripts": {
|
||||
"apidoc:extract": "api-extractor run",
|
||||
"build": "yarn run clean && yarn tsup --config ./tsup.config.browser.ts && yarn tsup",
|
||||
"clean": "rimraf dist build coverage .nyc_output doc *.lcov reports",
|
||||
"coverage": "nyc mocha --require ts-node/register 'test/**/*.test.ts' --exit",
|
||||
"coverage:ci": "yarn run coverage && yarn run coverage:lcov",
|
||||
"coverage:lcov": "yarn run --silent nyc report --reporter=text-lcov > coverage/coverage.lcov",
|
||||
"test": "yarn run lint && yarn run typecheck && yarn run test:all",
|
||||
"test:all": "mocha --require esbuild-runner/register 'test/**/*.test.ts' --exit",
|
||||
"test:unit": "mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --exit",
|
||||
"test:integration": "mocha --require esbuild-runner/register 'test/integration/**/*.test.ts' --exit",
|
||||
"test:ci": "yarn run lint:ci && yarn run test:all --exit --reporter mocha-junit-reporter --reporter-options mochaFile=../../reports/core_mocha/test-results.xml",
|
||||
"test:watch": "mocha --require esbuild-runner/register 'test/unit/**/*.test.ts' --watch-extensions ts --watch",
|
||||
"typecheck": "tsc --noEmit --pretty",
|
||||
"lint": "eslint 'src/**/*.ts' 'test/**/*.ts'",
|
||||
"lint:ci": "yarn run lint --format junit --output-file ../../reports/core_eslint/eslint.xml",
|
||||
"lint:fix": "eslint --fix 'src/**/*.ts'"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"module:browser": "dist/index.browser.mjs",
|
||||
"browser": "dist/index.browser.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"browser": {
|
||||
"import": "./dist/index.browser.mjs",
|
||||
"require": "./dist/index.browser.js",
|
||||
"script": "./dist/influxdb.js",
|
||||
"default": "./dist/index.browser.js"
|
||||
},
|
||||
"deno": "./dist/index.browser.mjs",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/influxdata/influxdb-client-js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/influxdata/influxdb-client-js",
|
||||
"directory": "packages/core"
|
||||
},
|
||||
"keywords": [
|
||||
"influxdb",
|
||||
"influxdata"
|
||||
],
|
||||
"author": {
|
||||
"name": "Pavel Zavora"
|
||||
},
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "^7.31.0",
|
||||
"@types/chai": "^4.2.5",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/sinon": "^10.0.13",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"chai": "^4.2.0",
|
||||
"esbuild": "^0.17.4",
|
||||
"esbuild-runner": "^2.2.1",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-tsdoc": "^0.2.16",
|
||||
"follow-redirects": "^1.14.7",
|
||||
"mocha": "^10.0.0",
|
||||
"mocha-junit-reporter": "^2.0.2",
|
||||
"nock": "^13.2.8",
|
||||
"nyc": "^15.1.0",
|
||||
"prettier": "^2.7.1",
|
||||
"rimraf": "^4.1.1",
|
||||
"rxjs": "^7.2.0",
|
||||
"sinon": "^15.0.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsup": "^6.2.1",
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"gitHead": "4ffd54959e569b1696a60295eccf7985af81dcd1"
|
||||
}
|
19
software/flow/node_modules/influx/.github/ISSUE_TEMPLATE.md
generated
vendored
Normal file
19
software/flow/node_modules/influx/.github/ISSUE_TEMPLATE.md
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
## Expected Behavior
|
||||
|
||||
## Actual Behavior
|
||||
|
||||
## Steps/Code to Reproduce the Problem
|
||||
|
||||
1. 1. 1.
|
||||
|
||||
```
|
||||
const influx = require('influx')
|
||||
|
||||
// ...
|
||||
```
|
||||
|
||||
## Specifications
|
||||
|
||||
- Version:
|
||||
- Platform:
|
||||
- Subsystem:
|
11
software/flow/node_modules/influx/.github/PULL_REQUEST_TEMPLATE.md
generated
vendored
Normal file
11
software/flow/node_modules/influx/.github/PULL_REQUEST_TEMPLATE.md
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
Fixes #
|
||||
|
||||
## Proposed Changes
|
||||
|
||||
---
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] A test has been added if appropriate
|
||||
- [ ] `npm test` completes successfully
|
||||
- [ ] Commit messages are in [semantic format](https://seesparkbox.com/foundry/semantic_commit_messages)
|
61
software/flow/node_modules/influx/.github/stale.yml
generated
vendored
Normal file
61
software/flow/node_modules/influx/.github/stale.yml
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 60
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 7
|
||||
|
||||
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
|
||||
onlyLabels: []
|
||||
|
||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||
exemptLabels:
|
||||
- pinned
|
||||
- security
|
||||
- "[Status] Maybe Later"
|
||||
- "help wanted"
|
||||
|
||||
# Set to true to ignore issues in a project (defaults to false)
|
||||
exemptProjects: false
|
||||
|
||||
# Set to true to ignore issues in a milestone (defaults to false)
|
||||
exemptMilestones: false
|
||||
|
||||
# Set to true to ignore issues with an assignee (defaults to false)
|
||||
exemptAssignees: false
|
||||
|
||||
# Label to use when marking as stale
|
||||
staleLabel: stale
|
||||
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
|
||||
# Comment to post when removing the stale label.
|
||||
# unmarkComment: >
|
||||
# Your comment here.
|
||||
|
||||
# Comment to post when closing a stale Issue or Pull Request.
|
||||
# closeComment: >
|
||||
# Your comment here.
|
||||
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 30
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
|
||||
# pulls:
|
||||
# daysUntilStale: 30
|
||||
# markComment: >
|
||||
# This pull request has been automatically marked as stale because it has not had
|
||||
# recent activity. It will be closed if no further activity occurs. Thank you
|
||||
# for your contributions.
|
||||
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - confirmed
|
34
software/flow/node_modules/influx/.github/workflows/CI.yml
generated
vendored
Normal file
34
software/flow/node_modules/influx/.github/workflows/CI.yml
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: CI
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
# Make sure the actual branch is checked out when running on pull requests
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
- name: Prettier
|
||||
uses: creyD/prettier_action@v3.0
|
||||
with:
|
||||
prettier_options: --write **/*.{tsx,ts,md}
|
||||
commit_message: "style: prettier code"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
5
software/flow/node_modules/influx/.prettierignore
generated
vendored
Normal file
5
software/flow/node_modules/influx/.prettierignore
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Ignore artifacts:
|
||||
doc
|
||||
lib
|
||||
coverage
|
||||
|
1
software/flow/node_modules/influx/.prettierrc.json
generated
vendored
Normal file
1
software/flow/node_modules/influx/.prettierrc.json
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
3
software/flow/node_modules/influx/.vscode/extensions.json
generated
vendored
Normal file
3
software/flow/node_modules/influx/.vscode/extensions.json
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"recommendations": ["esbenp.prettier-vscode"]
|
||||
}
|
4
software/flow/node_modules/influx/.vscode/settings.json
generated
vendored
Normal file
4
software/flow/node_modules/influx/.vscode/settings.json
generated
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.tabSize": 2
|
||||
}
|
95
software/flow/node_modules/influx/CHANGELOG.md
generated
vendored
Normal file
95
software/flow/node_modules/influx/CHANGELOG.md
generated
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
# node-influx Changelog
|
||||
|
||||
## 2017-03-04, 5.0.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))
|
||||
- Fix getNanoDate failing for second-precision timestamps ([#261](https://github.com/node-influx/node-influx/issues/261))
|
||||
- Update TypeScript to 2.2.x
|
||||
- Support multiple queries in queryRaw() ([#254](https://github.com/node-influx/node-influx/pull/254))
|
||||
|
||||
## 2016-11-12, 5.0.1
|
||||
|
||||
- bug: `.grantPrivilege` generating invalid queries ([#239](https://github.com/node-influx/node-influx/issues/239))
|
||||
- doc: a documentation issue in `.createRetentionPolicy`'s options ([#238](https://github.com/node-influx/node-influx/issues/238))
|
||||
- doc: `tags` and `fields` being swapped in a couple of usage examples
|
||||
|
||||
## 2016-10-27, 5.0.0
|
||||
|
||||
Stable release! No new changes.
|
||||
|
||||
## 2016-10-24, 5.0.0-alpha.4
|
||||
|
||||
- **breaking** (only TypeScript): interfaces have been renamed and prefixed with an `I`
|
||||
- added compatibility with Node 4 (and non-ES6 targets with polyfills).
|
||||
|
||||
## 2016-10-22, 5.0.0-alpha.3
|
||||
|
||||
- Fix more documentation typos.
|
||||
- Fix requests to `https` hosts failing.
|
||||
|
||||
## 2016-10-21, 5.0.0-alpha.2
|
||||
|
||||
- **breaking**: The `epoch` property in the IQueryOptions type has been renamed to `precision` for consistency.
|
||||
- Multiple fixes have been made for Webpack support, awaiting resolution of [node-libs-browser#41](https://github.com/webpack/node-libs-browser/pull/41)
|
||||
- Fixed an issue where precision could be lost when querying for nanosecond precision.
|
||||
- All `time` columns in Results are parsed to NanoDates, increased NanoDate parsing speed.
|
||||
- Fixed various compatibility issues with browser polyfills.
|
||||
- Documentation typos have been fixed (thanks @dandv!) and made more consistent.
|
||||
|
||||
## 2016-10-15, 5.0.0-alpha.1
|
||||
|
||||
5.0.0 is a port/rewrite of node-influx to TypeScript, aiming to provide a stronger foundation while fixing many of the pain points and bugs which currently exist. These include issues with escaping data passed to node-influx, date handling difficulties, quirks in the connection, and the lack of complete unit tests. We also take the opportunity to build a more modern, promise-based API. Concretely, here's what we've got for you:
|
||||
|
||||
- A modern promise based API;
|
||||
- Order-of-magnitude performance increases (varying per situation);
|
||||
- A more consistent API with predictable and consistent escaping;
|
||||
- The ability to correctly and accurately [deal with times](https://node-influx.github.io/manual/usage.html#a-moment-for-times);
|
||||
- The ability to correctly and accurately [deal with all data types](https://node-influx.github.io/typedef/index.html#static-typedef-ISchemaOptions);
|
||||
- Fix some methods plain not working;
|
||||
- Isomorphism, allowing the adapter to work in both Node and the browser;
|
||||
- Less weird connection pool failures;
|
||||
- Much better and more complete [documentation](https://node-influx.github.io/class/src/index.js~InfluxDB.html);
|
||||
|
||||
Please see the documentation linked in the readme for more information. The following is a list of breaking changes:
|
||||
|
||||
- **breaking:** all methods have been modified to return promises
|
||||
- **breaking:** result output for grouped results has changed
|
||||
- **breaking:** data passed into Influx, except where otherwise noted, will be escaped automatically
|
||||
- **breaking:** the point structure for `.write*` methods has changed
|
||||
- **breaking:** the `.writePoint` method has been removed
|
||||
- **breaking:** `.writeSeries` as been more appropriately renamed `writeMeasurement`
|
||||
- **breaking:** write methods now write in nanosecond precision by default
|
||||
- **breaking:** `.getSeriesNames` has been renamed `.getSeries`
|
||||
- **breaking:** the old `.getSeries` method has been removed in favor of the behaviour exhibited by `getSeriesNames`
|
||||
- **breaking:** the InfluxDB client must now be invoked as `new InfluxDB`
|
||||
- **breaking:** the connection pool configuration has changed
|
||||
|
||||
## 2016-10-06, Version 4.2.3
|
||||
|
||||
- bug: globalAgent ignored during HTTPS communication (#207)
|
||||
- bug: fix methods using deprecated GET which should be using POST (#191 and #188)
|
||||
- improvement: Support writing RFC3339 timestamps (#203)
|
||||
- improvement: Added a non-failing error message when the body is empty (#160)
|
||||
- docs: fix confusing terminology with series versus measurement (#205)
|
||||
- docs: update links in CONTRIBUTING.md (#199)
|
||||
- docs: fix "deprecated" typo in docs (#184)
|
||||
|
||||
## 2016-09-15, Version 4.2.2
|
||||
|
||||
Shoutout to @dandv for lots of awesome PRs this release!
|
||||
|
||||
- improvement: sort tags before writing for greater performance (#179)
|
||||
- improvement: make code compliant with the latest `standard` rules (#161)
|
||||
- bug: fix escaping of quotes in strings (#183)
|
||||
- bug: fix empty result from `getDatabaseNames` throwing errors (#168)
|
||||
- docs: fix messy terminology and typos (#183 and #170)
|
||||
- docs: include the full license file and copyright (#180)
|
||||
- docs: fix instructions to run `standard` instead of just `lint` (#181)
|
||||
|
||||
## 2016-05-05, Version 4.2.0
|
||||
|
||||
- typings: Added TypeScript definitions, thanks to @SPARTAN563 (#129)
|
||||
- init-url: Added support for configuring the client using a url (#128)
|
||||
- deps: Updated lodash dependency (#133)
|
||||
- \_createKeyTagString: Fix '=' char escaping in KeyTagString (#127)
|
||||
- \_createKeyValueString/\_createKeyTagString: Fix encoding failues on objects containing a 'length' key (#126)
|
36
software/flow/node_modules/influx/CONTRIBUTING.md
generated
vendored
Normal file
36
software/flow/node_modules/influx/CONTRIBUTING.md
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Contributing
|
||||
|
||||
We'd like to encourage you to contribute to the repository. You can do this by making an [issue ticket](https://github.com/node-influx/node-influx/issues) or, even better, submitting a patch via a pull request.
|
||||
|
||||
We try to make it as easy as possible for you but there are a few things to consider when contributing. The following guidelines for contribution should be followed if you want to submit a pull request:
|
||||
|
||||
## How to prepare
|
||||
|
||||
- You need a [GitHub account](https://github.com/signup/free)
|
||||
- Submit an [issue ticket](https://github.com/node-influx/node-influx/issues) for your issue if there is not one yet.
|
||||
_ Describe the issue and include steps to reproduce if it's a bug.
|
||||
_ Ensure to mention the earliest version that you know is affected.
|
||||
- If you are able and want to fix this, fork the repository on GitHub
|
||||
|
||||
## Make Changes
|
||||
|
||||
- In your forked repository, create a topic branch for your upcoming patch. (e.g. `feature--autoplay` or `bugfix--ios-crash`)
|
||||
_ Usually this is based on the master branch.
|
||||
_ Create a branch based on master; `git branch fix/master/my_contribution master` then checkout the new branch with `git checkout fix/master/my_contribution`. Please avoid working directly on the `master` branch.
|
||||
- Make sure you follow the established coding style. You can run `npm run test:lint` to verify you're all set.
|
||||
- Make use of the `.editorconfig`-file if provided with the repository.
|
||||
- Make commits of logical units and describe them properly, documenting anything new that you add.
|
||||
- If possible, submit tests to your patch / new feature so it can be tested easily.
|
||||
- Assure nothing is broken by running all the tests via `npm test`.
|
||||
|
||||
## Submit Changes
|
||||
|
||||
- Push your changes to a topic branch in your fork of the repository.
|
||||
- Open a pull request to the this repository and choose the right original branch you want to patch.
|
||||
- If not done in commit messages (which you really should do) please reference and update your issue with the code changes. But _please do not close the issue yourself_.
|
||||
- We'll review your changes and respond soon, usually within a day!
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- [General GitHub documentation](http://help.github.com/)
|
||||
- [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
21
software/flow/node_modules/influx/LICENSE
generated
vendored
Normal file
21
software/flow/node_modules/influx/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2016 Connor Peet
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
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, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
60
software/flow/node_modules/influx/README.md
generated
vendored
Normal file
60
software/flow/node_modules/influx/README.md
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
<p align="center">
|
||||
<img src="https://raw.github.com/node-influx/node-influx/master/logo.png?v3" alt="node-influx, an InfluxDB client for Node.js and Browsers">
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p align="center">
|
||||
<b><!--An InfluxDB Client for Node.js and Browsers--></b>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/node-influx/node-influx">
|
||||
<img src="https://img.shields.io/travis/node-influx/node-influx/master.svg?style=flat-square"
|
||||
alt="Travis Build">
|
||||
</a>
|
||||
<a href="">
|
||||
<img alt="Coveralls github branch" src="https://img.shields.io/coveralls/github/node-influx/node-influx/master.svg?style=flat-square">
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/influx">
|
||||
<img src="https://img.shields.io/npm/v/influx.svg?style=flat-square"
|
||||
alt="NPM Version">
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/influx">
|
||||
<img src="https://img.shields.io/npm/dm/influx.svg?style=flat-square"
|
||||
alt="NPM Downloads">
|
||||
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
## Installation
|
||||
|
||||
For Node, simply:
|
||||
|
||||
$ npm install --save influx
|
||||
|
||||
For browsers, see the [browser setup](https://node-influx.github.io/manual/usage.html#browser-setup) instructions.
|
||||
|
||||
## Features
|
||||
|
||||
- Simple API for nearly all Influx operations
|
||||
- Fully supported in Node and the browser
|
||||
- Performant, processing millions of rows/sec on modest hardware
|
||||
- Zero dependencies
|
||||
|
||||
## Compatibility
|
||||
|
||||
Version 5.x.x is compatible with InfluxDB 1.x on Node 4 on onwards, and modern browsers
|
||||
|
||||
Version 4.x.x is compatible with InfluxDB 0.9.x - 0.13.x on Node 0.12 and onwards
|
||||
|
||||
Version 3.x.x is compatible with InfluxDB 0.8.x - 3.x will no longer have updates by core contributers, please consider upgrading.
|
||||
|
||||
## Usage
|
||||
|
||||
- [API Documentation](https://node-influx.github.io/class/src/index.js~InfluxDB.html)
|
||||
- [Tutorials & Examples](https://node-influx.github.io/manual/tutorial.html)
|
||||
- [Changelog](https://node-influx.github.io/manual/changelog.html)
|
||||
- [Contributing](CONTRIBUTING.md)
|
30
software/flow/node_modules/influx/esdoc.json
generated
vendored
Normal file
30
software/flow/node_modules/influx/esdoc.json
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"source": "./lib/src",
|
||||
"destination": "./doc",
|
||||
"plugins": [
|
||||
{
|
||||
"name": "esdoc-standard-plugin",
|
||||
"option": {
|
||||
"brand": {
|
||||
"title": "node-influx"
|
||||
},
|
||||
"undocumentIdentifier": { "enable": false },
|
||||
"manual": {
|
||||
"files": [
|
||||
"./examples/express_response_times/readme.md",
|
||||
"./examples/times.md",
|
||||
"./examples/browser-setup.md",
|
||||
"./examples/testing.md",
|
||||
"./CONTRIBUTING.md"
|
||||
],
|
||||
"changelog": ["./CHANGELOG.md"]
|
||||
},
|
||||
"test": {
|
||||
"type": "mocha",
|
||||
"source": "./lib/test/unit",
|
||||
"includes": ["\\.test\\.js$"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
15
software/flow/node_modules/influx/lib/src/backoff/backoff.d.ts
generated
vendored
Normal file
15
software/flow/node_modules/influx/lib/src/backoff/backoff.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
export interface IBackoffStrategy {
|
||||
/**
|
||||
* GetDelay returns the amount of delay of the current backoff.
|
||||
*/
|
||||
getDelay: () => number;
|
||||
/**
|
||||
* Next is called when a failure occurs on a host to
|
||||
* return the next backoff amount.
|
||||
*/
|
||||
next: () => IBackoffStrategy;
|
||||
/**
|
||||
* Returns a strategy with a reset backoff counter.
|
||||
*/
|
||||
reset: () => IBackoffStrategy;
|
||||
}
|
2
software/flow/node_modules/influx/lib/src/backoff/backoff.js
generated
vendored
Normal file
2
software/flow/node_modules/influx/lib/src/backoff/backoff.js
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
48
software/flow/node_modules/influx/lib/src/backoff/exponential.d.ts
generated
vendored
Normal file
48
software/flow/node_modules/influx/lib/src/backoff/exponential.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
import { IBackoffStrategy } from "./backoff";
|
||||
/**
|
||||
* IExponentialOptions are passed into the ExponentialBackoff constructor. The
|
||||
* backoff equation is, in general, min(max, initial ^ n), where `n` is
|
||||
* an incremented backoff factor. The result of the equation is a delay
|
||||
* given in milliseconds.
|
||||
*
|
||||
*/
|
||||
export interface IExponentialOptions {
|
||||
/**
|
||||
* The initial delay passed to the equation.
|
||||
*/
|
||||
initial: number;
|
||||
/**
|
||||
* Random factor to subtract from the `n` count.
|
||||
*/
|
||||
random: number;
|
||||
/**
|
||||
* Max is the maximum value of the delay.
|
||||
*/
|
||||
max: number;
|
||||
}
|
||||
/**
|
||||
* Exponential Backoff
|
||||
* @see https://en.wikipedia.org/wiki/Exponential_backoff
|
||||
*/
|
||||
export declare class ExponentialBackoff implements IBackoffStrategy {
|
||||
protected options: IExponentialOptions;
|
||||
private _counter;
|
||||
/**
|
||||
* Creates a new exponential backoff strategy.
|
||||
* @see https://en.wikipedia.org/wiki/Exponential_backoff
|
||||
* @param options
|
||||
*/
|
||||
constructor(options: IExponentialOptions);
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
getDelay(): number;
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
next(): IBackoffStrategy;
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
reset(): IBackoffStrategy;
|
||||
}
|
40
software/flow/node_modules/influx/lib/src/backoff/exponential.js
generated
vendored
Normal file
40
software/flow/node_modules/influx/lib/src/backoff/exponential.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ExponentialBackoff = void 0;
|
||||
/**
|
||||
* Exponential Backoff
|
||||
* @see https://en.wikipedia.org/wiki/Exponential_backoff
|
||||
*/
|
||||
class ExponentialBackoff {
|
||||
/**
|
||||
* Creates a new exponential backoff strategy.
|
||||
* @see https://en.wikipedia.org/wiki/Exponential_backoff
|
||||
* @param options
|
||||
*/
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
this._counter = 0;
|
||||
}
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
getDelay() {
|
||||
const count = this._counter - Math.round(Math.random() * this.options.random); // Tslint:disable-line
|
||||
return Math.min(this.options.max, this.options.initial * Math.pow(2, Math.max(count, 0)));
|
||||
}
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
next() {
|
||||
const next = new ExponentialBackoff(this.options);
|
||||
next._counter = this._counter + 1;
|
||||
return next;
|
||||
}
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
reset() {
|
||||
return new ExponentialBackoff(this.options);
|
||||
}
|
||||
}
|
||||
exports.ExponentialBackoff = ExponentialBackoff;
|
254
software/flow/node_modules/influx/lib/src/builder.d.ts
generated
vendored
Normal file
254
software/flow/node_modules/influx/lib/src/builder.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,254 @@
|
|||
export interface IStringable {
|
||||
toString: () => string;
|
||||
}
|
||||
export interface IBaseExpression<T> {
|
||||
/**
|
||||
* Inserts a tag name in the expression.
|
||||
*/
|
||||
tag: (name: string) => T;
|
||||
/**
|
||||
* Inserts a field name in the expression.
|
||||
*/
|
||||
field: (name: string) => T;
|
||||
/**
|
||||
* Chains on a value to the expression. An error will be thrown if the
|
||||
* value is a type we can't represent in InfluxQL, primarily `null` or
|
||||
* `undefined.`
|
||||
*/
|
||||
value: (value: any) => T;
|
||||
}
|
||||
export interface IExpressionHead extends IBaseExpression<IBinaryOp> {
|
||||
}
|
||||
export interface IExpressionTail extends IBaseExpression<IExpressionHead> {
|
||||
}
|
||||
export interface IBinaryOp {
|
||||
/**
|
||||
* Adds an 'AND' operator
|
||||
*/
|
||||
and: IExpressionTail;
|
||||
/**
|
||||
* Adds an 'OR' operator
|
||||
*/
|
||||
or: IExpressionTail;
|
||||
/**
|
||||
* Adds a '+' addition symbol
|
||||
*/
|
||||
plus: IExpressionTail;
|
||||
/**
|
||||
* Adds a '*' multiplication symbol
|
||||
*/
|
||||
times: IExpressionTail;
|
||||
/**
|
||||
* Adds a '-' subtraction symbol
|
||||
*/
|
||||
minus: IExpressionTail;
|
||||
/**
|
||||
* Adds a '/' division symbol
|
||||
*/
|
||||
div: IExpressionTail;
|
||||
/**
|
||||
* Adds a '=' symbol
|
||||
*/
|
||||
equals: IExpressionTail;
|
||||
/**
|
||||
* Adds a '=~' comparator to select entries matching a regex.
|
||||
*/
|
||||
matches: IExpressionTail;
|
||||
/**
|
||||
* Adds a '!~' comparator to select entries not matching a regex.
|
||||
*/
|
||||
doesntMatch: IExpressionTail;
|
||||
/**
|
||||
* Adds a '!=' comparator to select entries not equaling a certain value.
|
||||
*/
|
||||
notEqual: IExpressionTail;
|
||||
/**
|
||||
* Adds a '>' symbol
|
||||
*/
|
||||
gt: IExpressionTail;
|
||||
/**
|
||||
* Adds a '>=' symbol
|
||||
*/
|
||||
gte: IExpressionTail;
|
||||
/**
|
||||
* Adds a '<' symbol
|
||||
*/
|
||||
lt: IExpressionTail;
|
||||
/**
|
||||
* Adds a '<=' symbol
|
||||
*/
|
||||
lte: IExpressionTail;
|
||||
}
|
||||
/**
|
||||
* Expression is used to build filtering expressions, like those used in WHERE
|
||||
* clauses. It can be used for fluent and safe building of queries using
|
||||
* untrusted input.
|
||||
*
|
||||
* @example
|
||||
* e => e
|
||||
* .field('host').equals.value('ares.peet.io')
|
||||
* .or
|
||||
* .field('host').matches(/example\.com$/)
|
||||
* .or
|
||||
* .expr(e => e
|
||||
* .field('country').equals.value('US')
|
||||
* .and
|
||||
* .field('state').equals.value('WA'));
|
||||
*
|
||||
* // Generates:
|
||||
* // "host" = 'ares.peet.io' OR "host" ~= /example\.com$/ OR \
|
||||
* // ("county" = 'US' AND "state" = 'WA')
|
||||
*/
|
||||
export declare class Expression implements IExpressionHead, IExpressionTail, IBinaryOp {
|
||||
private readonly _query;
|
||||
/**
|
||||
* Inserts a tag reference into the expression; the name will be
|
||||
* automatically escaped.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
tag(name: string): this;
|
||||
/**
|
||||
* Inserts a field reference into the expression; the name will be
|
||||
* automatically escaped.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
field(name: string): this;
|
||||
/**
|
||||
* Inserts a subexpression; invokes the function with a new expression
|
||||
* that can be chained on.
|
||||
* @param fn
|
||||
* @return
|
||||
* @example
|
||||
* e.field('a').equals.value('b')
|
||||
* .or.expr(e =>
|
||||
* e.field('b').equals.value('b')
|
||||
* .and.field('a').equals.value('c'))
|
||||
* .toString()
|
||||
* // "a" = 'b' OR ("b" = 'b' AND "a" = 'c')
|
||||
*/
|
||||
exp(fn: (e: Expression) => Expression): this;
|
||||
/**
|
||||
* Value chains on a value to the expression.
|
||||
*
|
||||
* - Numbers will be inserted verbatim
|
||||
* - Strings will be escaped and inserted
|
||||
* - Booleans will be inserted correctly
|
||||
* - Dates will be formatted and inserted correctly, including INanoDates.
|
||||
* - Regular expressions will be inserted correctly, however an error will
|
||||
* be thrown if they contain flags, as regex flags do not work in Influx
|
||||
* - Otherwise we'll try to call `.toString()` on the value, throwing
|
||||
* if we cannot do so.
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
value(value: any): this;
|
||||
/**
|
||||
* Chains on an AND clause to the expression.
|
||||
*/
|
||||
get and(): this;
|
||||
/**
|
||||
* Chains on an OR clause to the expression.
|
||||
*/
|
||||
get or(): this;
|
||||
/**
|
||||
* Chains on a `+` operator to the expression.
|
||||
*/
|
||||
get plus(): this;
|
||||
/**
|
||||
* Chains on a `*` operator to the expression.
|
||||
*/
|
||||
get times(): this;
|
||||
/**
|
||||
* Chains on a `-` operator to the expression.
|
||||
*/
|
||||
get minus(): this;
|
||||
/**
|
||||
* Chains on a `/` operator to the expression.
|
||||
*/
|
||||
get div(): this;
|
||||
/**
|
||||
* Chains on a `=` conditional to the expression.
|
||||
*/
|
||||
get equals(): this;
|
||||
/**
|
||||
* Chains on a `=~` conditional to the expression to match regexes.
|
||||
*/
|
||||
get matches(): this;
|
||||
/**
|
||||
* Chains on a `!`` conditional to the expression to match regexes.
|
||||
*/
|
||||
get doesntMatch(): this;
|
||||
/**
|
||||
* Chains on a `!=` conditional to the expression.
|
||||
*/
|
||||
get notEqual(): this;
|
||||
/**
|
||||
* Chains on a `>` conditional to the expression.
|
||||
*/
|
||||
get gt(): this;
|
||||
/**
|
||||
* Chains on a `>=` conditional to the expression.
|
||||
*/
|
||||
get gte(): this;
|
||||
/**
|
||||
* Chains on a `<` conditional to the expression.
|
||||
*/
|
||||
get lt(): this;
|
||||
/**
|
||||
* Chains on a `<=` conditional to the expression.
|
||||
*/
|
||||
get lte(): this;
|
||||
/**
|
||||
* Converts the expression into its InfluxQL representation.
|
||||
* @return
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
/**
|
||||
* Measurement creates a reference to a particular measurement. You can
|
||||
* reference it solely by its name, but you can also specify the retention
|
||||
* policy and database it lives under.
|
||||
*
|
||||
* @example
|
||||
* m.name('my_measurement') // "my_measurement"
|
||||
* m.name('my_measurement').policy('one_day') // "one_day"."my_measurement"
|
||||
* m.name('my_measurement').policy('one_day').db('mydb') // "mydb"."one_day"."my_measurement"
|
||||
*/
|
||||
export declare class Measurement {
|
||||
private _parts;
|
||||
/**
|
||||
* Sets the measurement name.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
name(name: string): this;
|
||||
/**
|
||||
* Sets the retention policy name.
|
||||
* @param retentionPolicy
|
||||
* @return
|
||||
*/
|
||||
policy(retentionPolicy: string): this;
|
||||
/**
|
||||
* Sets the database name.
|
||||
* @param db
|
||||
* @return
|
||||
*/
|
||||
db(db: string): this;
|
||||
/**
|
||||
* Converts the measurement into its InfluxQL representation.
|
||||
* @return
|
||||
* @throws {Error} if a measurement name is not provided
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
export declare type measurement = {
|
||||
measurement: string | ((m: Measurement) => IStringable);
|
||||
};
|
||||
export declare type where = {
|
||||
where: string | ((e: IExpressionHead) => IStringable);
|
||||
};
|
||||
export declare function parseMeasurement(q: measurement): string;
|
||||
export declare function parseWhere(q: where): string;
|
296
software/flow/node_modules/influx/lib/src/builder.js
generated
vendored
Normal file
296
software/flow/node_modules/influx/lib/src/builder.js
generated
vendored
Normal file
|
@ -0,0 +1,296 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseWhere = exports.parseMeasurement = exports.Measurement = exports.Expression = void 0;
|
||||
const grammar_1 = require("./grammar");
|
||||
function regexHasFlags(re) {
|
||||
if (typeof re.flags !== "undefined") {
|
||||
return re.flags.length > 0;
|
||||
}
|
||||
return !re.toString().endsWith("/");
|
||||
}
|
||||
/**
|
||||
* Expression is used to build filtering expressions, like those used in WHERE
|
||||
* clauses. It can be used for fluent and safe building of queries using
|
||||
* untrusted input.
|
||||
*
|
||||
* @example
|
||||
* e => e
|
||||
* .field('host').equals.value('ares.peet.io')
|
||||
* .or
|
||||
* .field('host').matches(/example\.com$/)
|
||||
* .or
|
||||
* .expr(e => e
|
||||
* .field('country').equals.value('US')
|
||||
* .and
|
||||
* .field('state').equals.value('WA'));
|
||||
*
|
||||
* // Generates:
|
||||
* // "host" = 'ares.peet.io' OR "host" ~= /example\.com$/ OR \
|
||||
* // ("county" = 'US' AND "state" = 'WA')
|
||||
*/
|
||||
class Expression {
|
||||
constructor() {
|
||||
this._query = [];
|
||||
}
|
||||
/**
|
||||
* Inserts a tag reference into the expression; the name will be
|
||||
* automatically escaped.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
tag(name) {
|
||||
this.field(name);
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Inserts a field reference into the expression; the name will be
|
||||
* automatically escaped.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
field(name) {
|
||||
this._query.push(grammar_1.escape.quoted(name));
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Inserts a subexpression; invokes the function with a new expression
|
||||
* that can be chained on.
|
||||
* @param fn
|
||||
* @return
|
||||
* @example
|
||||
* e.field('a').equals.value('b')
|
||||
* .or.expr(e =>
|
||||
* e.field('b').equals.value('b')
|
||||
* .and.field('a').equals.value('c'))
|
||||
* .toString()
|
||||
* // "a" = 'b' OR ("b" = 'b' AND "a" = 'c')
|
||||
*/
|
||||
exp(fn) {
|
||||
this._query.push("(" + fn(new Expression()).toString() + ")");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Value chains on a value to the expression.
|
||||
*
|
||||
* - Numbers will be inserted verbatim
|
||||
* - Strings will be escaped and inserted
|
||||
* - Booleans will be inserted correctly
|
||||
* - Dates will be formatted and inserted correctly, including INanoDates.
|
||||
* - Regular expressions will be inserted correctly, however an error will
|
||||
* be thrown if they contain flags, as regex flags do not work in Influx
|
||||
* - Otherwise we'll try to call `.toString()` on the value, throwing
|
||||
* if we cannot do so.
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
value(value) {
|
||||
switch (typeof value) {
|
||||
case "number":
|
||||
this._query.push(value.toString());
|
||||
return this;
|
||||
case "string":
|
||||
this._query.push(grammar_1.escape.stringLit(value));
|
||||
return this;
|
||||
case "boolean":
|
||||
this._query.push(value ? "TRUE" : "FALSE");
|
||||
return this;
|
||||
default:
|
||||
if (value instanceof Date) {
|
||||
this._query.push(grammar_1.formatDate(value));
|
||||
return this;
|
||||
}
|
||||
if (value instanceof RegExp) {
|
||||
if (regexHasFlags(value)) {
|
||||
throw new Error("Attempted to query using a regex with flags, " +
|
||||
"but Influx doesn't support flags in queries.");
|
||||
}
|
||||
this._query.push("/" + value.source + "/");
|
||||
return this;
|
||||
}
|
||||
if (value && typeof value.toString === "function") {
|
||||
this._query.push(value.toString());
|
||||
return this;
|
||||
}
|
||||
throw new Error("node-influx doesn't know how to encode the provided value into a " +
|
||||
"query. If you think this is a bug, open an issue here: https://git.io/influx-err");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Chains on an AND clause to the expression.
|
||||
*/
|
||||
get and() {
|
||||
this._query.push("AND");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on an OR clause to the expression.
|
||||
*/
|
||||
get or() {
|
||||
this._query.push("OR");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `+` operator to the expression.
|
||||
*/
|
||||
get plus() {
|
||||
this._query.push("+");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `*` operator to the expression.
|
||||
*/
|
||||
get times() {
|
||||
this._query.push("*");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `-` operator to the expression.
|
||||
*/
|
||||
get minus() {
|
||||
this._query.push("-");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `/` operator to the expression.
|
||||
*/
|
||||
get div() {
|
||||
this._query.push("/");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `=` conditional to the expression.
|
||||
*/
|
||||
get equals() {
|
||||
this._query.push("=");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `=~` conditional to the expression to match regexes.
|
||||
*/
|
||||
get matches() {
|
||||
this._query.push("=~");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `!`` conditional to the expression to match regexes.
|
||||
*/
|
||||
get doesntMatch() {
|
||||
this._query.push("!~");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `!=` conditional to the expression.
|
||||
*/
|
||||
get notEqual() {
|
||||
this._query.push("!=");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `>` conditional to the expression.
|
||||
*/
|
||||
get gt() {
|
||||
this._query.push(">");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `>=` conditional to the expression.
|
||||
*/
|
||||
get gte() {
|
||||
this._query.push(">=");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `<` conditional to the expression.
|
||||
*/
|
||||
get lt() {
|
||||
this._query.push("<");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Chains on a `<=` conditional to the expression.
|
||||
*/
|
||||
get lte() {
|
||||
this._query.push("<=");
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Converts the expression into its InfluxQL representation.
|
||||
* @return
|
||||
*/
|
||||
toString() {
|
||||
return this._query.join(" ");
|
||||
}
|
||||
}
|
||||
exports.Expression = Expression;
|
||||
/**
|
||||
* Measurement creates a reference to a particular measurement. You can
|
||||
* reference it solely by its name, but you can also specify the retention
|
||||
* policy and database it lives under.
|
||||
*
|
||||
* @example
|
||||
* m.name('my_measurement') // "my_measurement"
|
||||
* m.name('my_measurement').policy('one_day') // "one_day"."my_measurement"
|
||||
* m.name('my_measurement').policy('one_day').db('mydb') // "mydb"."one_day"."my_measurement"
|
||||
*/
|
||||
class Measurement {
|
||||
constructor() {
|
||||
this._parts = [null, null, null];
|
||||
}
|
||||
/**
|
||||
* Sets the measurement name.
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
name(name) {
|
||||
this._parts[2] = name;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Sets the retention policy name.
|
||||
* @param retentionPolicy
|
||||
* @return
|
||||
*/
|
||||
policy(retentionPolicy) {
|
||||
this._parts[1] = retentionPolicy;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Sets the database name.
|
||||
* @param db
|
||||
* @return
|
||||
*/
|
||||
db(db) {
|
||||
this._parts[0] = db;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Converts the measurement into its InfluxQL representation.
|
||||
* @return
|
||||
* @throws {Error} if a measurement name is not provided
|
||||
*/
|
||||
toString() {
|
||||
if (!this._parts[2]) {
|
||||
throw new Error(`You must specify a measurement name to query! Got \`${this._parts[2]}\``);
|
||||
}
|
||||
return this._parts
|
||||
.filter((p) => Boolean(p))
|
||||
.map((p) => grammar_1.escape.quoted(p))
|
||||
.join(".");
|
||||
}
|
||||
}
|
||||
exports.Measurement = Measurement;
|
||||
function parseMeasurement(q) {
|
||||
if (typeof q.measurement === "function") {
|
||||
return q.measurement(new Measurement()).toString();
|
||||
}
|
||||
return q.measurement;
|
||||
}
|
||||
exports.parseMeasurement = parseMeasurement;
|
||||
function parseWhere(q) {
|
||||
if (typeof q.where === "function") {
|
||||
return q.where(new Expression()).toString();
|
||||
}
|
||||
return q.where;
|
||||
}
|
||||
exports.parseWhere = parseWhere;
|
45
software/flow/node_modules/influx/lib/src/grammar/ds.d.ts
generated
vendored
Normal file
45
software/flow/node_modules/influx/lib/src/grammar/ds.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* FieldType is an enumeration of InfluxDB field data types.
|
||||
* @typedef {Number} FieldType
|
||||
* @example
|
||||
* import { FieldType } from 'influx'; // or const FieldType = require('influx').FieldType
|
||||
*
|
||||
* const schema = {
|
||||
* measurement: 'my_measurement',
|
||||
* fields: {
|
||||
* my_int: FieldType.INTEGER,
|
||||
* my_float: FieldType.FLOAT,
|
||||
* my_string: FieldType.STRING,
|
||||
* my_boolean: FieldType.BOOLEAN,
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
export declare enum FieldType {
|
||||
FLOAT = 0,
|
||||
INTEGER = 1,
|
||||
STRING = 2,
|
||||
BOOLEAN = 3
|
||||
}
|
||||
export declare function isNumeric(value: string): boolean;
|
||||
/**
|
||||
* You can provide Raw values to Influx methods to prevent it from escaping
|
||||
* your provided string.
|
||||
* @class
|
||||
* @example
|
||||
* influx.createDatabase(new Influx.Raw('This won\'t be escaped!'));
|
||||
*/
|
||||
export declare class Raw {
|
||||
private readonly value;
|
||||
/**
|
||||
* Wraps a string so that it is not escaped in Influx queries.
|
||||
* @param value
|
||||
* @example
|
||||
* influx.createDatabase(new Influx.Raw('This won\'t be escaped!'));
|
||||
*/
|
||||
constructor(value: string);
|
||||
/**
|
||||
* Returns the wrapped string.
|
||||
* @return
|
||||
*/
|
||||
getValue(): string;
|
||||
}
|
56
software/flow/node_modules/influx/lib/src/grammar/ds.js
generated
vendored
Normal file
56
software/flow/node_modules/influx/lib/src/grammar/ds.js
generated
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Raw = exports.isNumeric = exports.FieldType = void 0;
|
||||
/**
|
||||
* FieldType is an enumeration of InfluxDB field data types.
|
||||
* @typedef {Number} FieldType
|
||||
* @example
|
||||
* import { FieldType } from 'influx'; // or const FieldType = require('influx').FieldType
|
||||
*
|
||||
* const schema = {
|
||||
* measurement: 'my_measurement',
|
||||
* fields: {
|
||||
* my_int: FieldType.INTEGER,
|
||||
* my_float: FieldType.FLOAT,
|
||||
* my_string: FieldType.STRING,
|
||||
* my_boolean: FieldType.BOOLEAN,
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
var FieldType;
|
||||
(function (FieldType) {
|
||||
FieldType[FieldType["FLOAT"] = 0] = "FLOAT";
|
||||
FieldType[FieldType["INTEGER"] = 1] = "INTEGER";
|
||||
FieldType[FieldType["STRING"] = 2] = "STRING";
|
||||
FieldType[FieldType["BOOLEAN"] = 3] = "BOOLEAN";
|
||||
})(FieldType = exports.FieldType || (exports.FieldType = {}));
|
||||
function isNumeric(value) {
|
||||
return !Number.isNaN(Number(value));
|
||||
}
|
||||
exports.isNumeric = isNumeric;
|
||||
/**
|
||||
* You can provide Raw values to Influx methods to prevent it from escaping
|
||||
* your provided string.
|
||||
* @class
|
||||
* @example
|
||||
* influx.createDatabase(new Influx.Raw('This won\'t be escaped!'));
|
||||
*/
|
||||
class Raw {
|
||||
/**
|
||||
* Wraps a string so that it is not escaped in Influx queries.
|
||||
* @param value
|
||||
* @example
|
||||
* influx.createDatabase(new Influx.Raw('This won\'t be escaped!'));
|
||||
*/
|
||||
constructor(value) {
|
||||
this.value = value;
|
||||
}
|
||||
/**
|
||||
* Returns the wrapped string.
|
||||
* @return
|
||||
*/
|
||||
getValue() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
exports.Raw = Raw;
|
37
software/flow/node_modules/influx/lib/src/grammar/escape.d.ts
generated
vendored
Normal file
37
software/flow/node_modules/influx/lib/src/grammar/escape.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
* TagEscaper escapes tag keys, tag values, and field keys.
|
||||
* @type {Object}
|
||||
* @property {function(s: string): string } quoted Escapes and wraps quoted
|
||||
* values, such as database names.
|
||||
* @property {function(s: string): string } stringLit Escapes and
|
||||
* wraps string literals.
|
||||
* @property {function(s: string): string } measurement Escapes measurement
|
||||
* names on the line protocol.
|
||||
* @property {function(s: string): string } tag Escapes tag keys, take values,
|
||||
* and field keys on the line protocol.
|
||||
*
|
||||
* @example
|
||||
* console.log(escape.quoted('my_"db')); // => "my_\"db"
|
||||
* console.log(escape.stringLit('hello\'world')); // => 'hello\'world'
|
||||
*
|
||||
* console.log(escape.measurement('my measurement')); // => my\ measurement
|
||||
* console.log(escape.tag('my tag=')); // => my\ tag\=
|
||||
*/
|
||||
export declare const escape: {
|
||||
/**
|
||||
* Measurement escapes measurement names.
|
||||
*/
|
||||
measurement: (val: string) => string;
|
||||
/**
|
||||
* Quoted escapes quoted values, such as database names.
|
||||
*/
|
||||
quoted: (val: string) => string;
|
||||
/**
|
||||
* StringLitEscaper escapes single quotes in string literals.
|
||||
*/
|
||||
stringLit: (val: string) => string;
|
||||
/**
|
||||
* TagEscaper escapes tag keys, tag values, and field keys.
|
||||
*/
|
||||
tag: (val: string) => string;
|
||||
};
|
111
software/flow/node_modules/influx/lib/src/grammar/escape.js
generated
vendored
Normal file
111
software/flow/node_modules/influx/lib/src/grammar/escape.js
generated
vendored
Normal file
|
@ -0,0 +1,111 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.escape = void 0;
|
||||
const ds_1 = require("./ds");
|
||||
const reEscape = /[-|\\{()[\]^$+*?.]/g;
|
||||
/**
|
||||
* The Escaper escapes the special characters in the provided list
|
||||
* with backslashes. Much of the code here is inspired by that in the
|
||||
* sqlstring packet found here: https://github.com/mysqljs/sqlstring
|
||||
*
|
||||
* Instances of the Escaper are derived from the documentation of escape
|
||||
* sequences found here: https://aka.ms/co1m4k
|
||||
*
|
||||
* sqlstring is made available under the following license:
|
||||
*
|
||||
* Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* 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, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
class Escaper {
|
||||
constructor(chars, wrap = "", escaper = "\\") {
|
||||
this.wrap = wrap;
|
||||
this.escaper = escaper;
|
||||
const patterns = chars.join("").replace(reEscape, "\\$&");
|
||||
this._re = new RegExp("[" + patterns + "]", "g");
|
||||
}
|
||||
/**
|
||||
* Escape replaces occurrences of special characters within the target
|
||||
* string with the necessary escape codes.
|
||||
*/
|
||||
escape(val) {
|
||||
if (val instanceof ds_1.Raw) {
|
||||
return val.getValue();
|
||||
}
|
||||
this._re.lastIndex = 0;
|
||||
let chunkIndex = this._re.lastIndex;
|
||||
let escapedVal = "";
|
||||
let match;
|
||||
if (typeof val === "string") {
|
||||
val = val.replace(/\\'/, "\\\\'");
|
||||
}
|
||||
/* eslint-disable no-cond-assign */
|
||||
while ((match = this._re.exec(val))) {
|
||||
escapedVal +=
|
||||
val.slice(chunkIndex, match.index) + this.escaper + match[0];
|
||||
chunkIndex = this._re.lastIndex;
|
||||
}
|
||||
if (chunkIndex === 0) {
|
||||
return this.wrap + val + this.wrap;
|
||||
}
|
||||
if (chunkIndex < val.length) {
|
||||
return this.wrap + escapedVal + val.slice(chunkIndex) + this.wrap;
|
||||
}
|
||||
return this.wrap + escapedVal + this.wrap;
|
||||
}
|
||||
}
|
||||
const bindEsc = (e) => e.escape.bind(e);
|
||||
/**
|
||||
* TagEscaper escapes tag keys, tag values, and field keys.
|
||||
* @type {Object}
|
||||
* @property {function(s: string): string } quoted Escapes and wraps quoted
|
||||
* values, such as database names.
|
||||
* @property {function(s: string): string } stringLit Escapes and
|
||||
* wraps string literals.
|
||||
* @property {function(s: string): string } measurement Escapes measurement
|
||||
* names on the line protocol.
|
||||
* @property {function(s: string): string } tag Escapes tag keys, take values,
|
||||
* and field keys on the line protocol.
|
||||
*
|
||||
* @example
|
||||
* console.log(escape.quoted('my_"db')); // => "my_\"db"
|
||||
* console.log(escape.stringLit('hello\'world')); // => 'hello\'world'
|
||||
*
|
||||
* console.log(escape.measurement('my measurement')); // => my\ measurement
|
||||
* console.log(escape.tag('my tag=')); // => my\ tag\=
|
||||
*/
|
||||
exports.escape = {
|
||||
/**
|
||||
* Measurement escapes measurement names.
|
||||
*/
|
||||
measurement: bindEsc(new Escaper([",", " "])),
|
||||
/**
|
||||
* Quoted escapes quoted values, such as database names.
|
||||
*/
|
||||
quoted: bindEsc(new Escaper(['"', "\\\\"], '"')),
|
||||
/**
|
||||
* StringLitEscaper escapes single quotes in string literals.
|
||||
*/
|
||||
stringLit: bindEsc(new Escaper(["'"], "'")),
|
||||
/**
|
||||
* TagEscaper escapes tag keys, tag values, and field keys.
|
||||
*/
|
||||
tag: bindEsc(new Escaper([",", "=", " "])),
|
||||
};
|
3
software/flow/node_modules/influx/lib/src/grammar/index.d.ts
generated
vendored
Normal file
3
software/flow/node_modules/influx/lib/src/grammar/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
export * from "./escape";
|
||||
export * from "./ds";
|
||||
export * from "./times";
|
15
software/flow/node_modules/influx/lib/src/grammar/index.js
generated
vendored
Normal file
15
software/flow/node_modules/influx/lib/src/grammar/index.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./escape"), exports);
|
||||
__exportStar(require("./ds"), exports);
|
||||
__exportStar(require("./times"), exports);
|
73
software/flow/node_modules/influx/lib/src/grammar/times.d.ts
generated
vendored
Normal file
73
software/flow/node_modules/influx/lib/src/grammar/times.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
export interface INanoDate extends Date {
|
||||
/**
|
||||
* Returns the unix nanoseconds timestamp as a string.
|
||||
*/
|
||||
getNanoTime: () => string;
|
||||
/**
|
||||
* Formats the date as an ISO RFC3339 timestamp with nanosecond precision.
|
||||
*/
|
||||
toNanoISOString: () => string;
|
||||
}
|
||||
export declare type TimePrecision = "n" | "u" | "ms" | "s" | "m" | "h";
|
||||
/**
|
||||
* Precision is a map of available Influx time precisions.
|
||||
* @type {Object.<String, String>}
|
||||
* @example
|
||||
* console.log(Precision.Hours); // => 'h'
|
||||
* console.log(Precision.Minutes); // => 'm'
|
||||
* console.log(Precision.Seconds); // => 's'
|
||||
* console.log(Precision.Milliseconds); // => 'ms'
|
||||
* console.log(Precision.Microseconds); // => 'u'
|
||||
* console.log(Precision.Nanoseconds); // => 'n'
|
||||
*/
|
||||
export declare const Precision: Readonly<{
|
||||
Hours: string;
|
||||
Microseconds: string;
|
||||
Milliseconds: string;
|
||||
Minutes: string;
|
||||
Nanoseconds: string;
|
||||
Seconds: string;
|
||||
}>;
|
||||
/**
|
||||
* Covers a nanoseconds unix timestamp to a INanoDate for node-influx. The
|
||||
* timestamp is provided as a string to prevent precision loss.
|
||||
*
|
||||
* Please see [A Moment for Times](https://node-influx.github.io/manual/
|
||||
* usage.html#a-moment-for-times) for a more complete and eloquent explanation
|
||||
* of time handling in this module.
|
||||
*
|
||||
* @param timestamp
|
||||
* @example
|
||||
* const date = toNanoDate('1475985480231035600')
|
||||
*
|
||||
* // You can use the returned Date as a normal date:
|
||||
* expect(date.getTime()).to.equal(1475985480231);
|
||||
*
|
||||
* // We decorate it with two additional methods to read
|
||||
* // nanosecond-precision results:
|
||||
* expect(date.getNanoTime()).to.equal('1475985480231035600');
|
||||
* expect(date.toNanoISOString()).to.equal('2016-10-09T03:58:00.231035600Z');
|
||||
*/
|
||||
export declare function toNanoDate(timestamp: string): INanoDate;
|
||||
/**
|
||||
* FormatDate converts the Date instance to Influx's date query format.
|
||||
* @private
|
||||
*/
|
||||
export declare function formatDate(date: Date): string;
|
||||
/**
|
||||
* Converts a Date instance to a timestamp with the specified time precision.
|
||||
* @private
|
||||
*/
|
||||
export declare function dateToTime(date: Date | INanoDate, precision: TimePrecision): string;
|
||||
/**
|
||||
* Converts an ISO-formatted data or unix timestamp to a Date instance. If
|
||||
* the precision is finer than 'ms' the returned value will be a INanoDate.
|
||||
* @private
|
||||
*/
|
||||
export declare function isoOrTimeToDate(stamp: string | number, precision?: TimePrecision): INanoDate;
|
||||
/**
|
||||
* Converts a timestamp to a string with the correct precision. Assumes
|
||||
* that raw number and string instances are already in the correct precision.
|
||||
* @private
|
||||
*/
|
||||
export declare function castTimestamp(timestamp: string | number | Date, precision: TimePrecision): string;
|
333
software/flow/node_modules/influx/lib/src/grammar/times.js
generated
vendored
Normal file
333
software/flow/node_modules/influx/lib/src/grammar/times.js
generated
vendored
Normal file
|
@ -0,0 +1,333 @@
|
|||
"use strict";
|
||||
/* eslint-disable no-fallthrough */
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.castTimestamp = exports.isoOrTimeToDate = exports.dateToTime = exports.formatDate = exports.toNanoDate = exports.Precision = void 0;
|
||||
const ds_1 = require("./ds");
|
||||
/**
|
||||
* Just a quick overview of what's going on in this file. It's a bit of a mess.
|
||||
* Influx uses three time formats:
|
||||
* - ISO times with nanoseconds when querying where an epoch is not provided
|
||||
* - Unix timestamps when querying with an epoch (specifying the precision
|
||||
* in the given time unit)
|
||||
* - Its own time format for time literals.
|
||||
*
|
||||
* To complicate matters, Influx operates on nanosecond precisions
|
||||
* by default, but we can't represent nanosecond timestamps in
|
||||
* JavaScript numbers as they're 64 bit uints.
|
||||
*
|
||||
* As a result we have several utilities to convert between these different
|
||||
* formats. When precision is required, we represent nanosecond timestamps
|
||||
* as strings and wrap default dates in the INanoDate interface which
|
||||
* lets the consumer read and write these more precise timestamps.
|
||||
*
|
||||
* Representing the timestamps as strings is definitely not a pure way to go
|
||||
* about it, but importing an arbitrary-precision integer library adds
|
||||
* bloat and is a massive hit to throughput. The operations we do do
|
||||
* are pretty trivial, so we stick with manipulating strings
|
||||
* and make sure to wash our hands when we're done.
|
||||
*
|
||||
* Vocabulary:
|
||||
* Unix timestamp = 'timestamp', abbreviated as 'time'
|
||||
* ISO timestamp = 'ISO time', abbreviated as 'ISO'
|
||||
* Influx timestamp = 'Influx time', abbreviated as 'Influx'
|
||||
*/
|
||||
function leftPad(str, length, pad = "0") {
|
||||
if (typeof str === "number") {
|
||||
str = String(str);
|
||||
}
|
||||
while (str.length < length) {
|
||||
str = pad + str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
function rightPad(str, length, pad = "0") {
|
||||
if (typeof str === "number") {
|
||||
str = String(str);
|
||||
}
|
||||
while (str.length < length) {
|
||||
str += pad;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
/**
|
||||
* Precision is a map of available Influx time precisions.
|
||||
* @type {Object.<String, String>}
|
||||
* @example
|
||||
* console.log(Precision.Hours); // => 'h'
|
||||
* console.log(Precision.Minutes); // => 'm'
|
||||
* console.log(Precision.Seconds); // => 's'
|
||||
* console.log(Precision.Milliseconds); // => 'ms'
|
||||
* console.log(Precision.Microseconds); // => 'u'
|
||||
* console.log(Precision.Nanoseconds); // => 'n'
|
||||
*/
|
||||
exports.Precision = Object.freeze({
|
||||
// Tslint:disable-line
|
||||
Hours: "h",
|
||||
Microseconds: "u",
|
||||
Milliseconds: "ms",
|
||||
Minutes: "m",
|
||||
Nanoseconds: "n",
|
||||
Seconds: "s",
|
||||
});
|
||||
class MillisecondDateManipulator {
|
||||
format(date) {
|
||||
return ('"' +
|
||||
leftPad(date.getUTCFullYear(), 2) +
|
||||
"-" +
|
||||
leftPad(date.getUTCMonth() + 1, 2) +
|
||||
"-" +
|
||||
leftPad(date.getUTCDate(), 2) +
|
||||
" " +
|
||||
leftPad(date.getUTCHours(), 2) +
|
||||
":" +
|
||||
leftPad(date.getUTCMinutes(), 2) +
|
||||
":" +
|
||||
leftPad(date.getUTCSeconds(), 2) +
|
||||
"." +
|
||||
leftPad(date.getUTCMilliseconds(), 3) +
|
||||
'"');
|
||||
}
|
||||
toTime(date, precision) {
|
||||
let ms = date.getTime();
|
||||
switch (precision) {
|
||||
case "n":
|
||||
ms *= 1000;
|
||||
case "u":
|
||||
ms *= 1000;
|
||||
case "ms":
|
||||
return String(ms);
|
||||
case "h":
|
||||
ms /= 60;
|
||||
case "m":
|
||||
ms /= 60;
|
||||
case "s":
|
||||
ms /= 1000;
|
||||
return String(Math.floor(ms));
|
||||
default:
|
||||
throw new Error(`Unknown precision '${precision}'!`);
|
||||
}
|
||||
}
|
||||
isoToDate(timestamp) {
|
||||
return new Date(timestamp);
|
||||
}
|
||||
timetoDate(timestamp, precision) {
|
||||
switch (precision) {
|
||||
case "n":
|
||||
timestamp /= 1000;
|
||||
case "u":
|
||||
timestamp /= 1000;
|
||||
case "ms":
|
||||
return new Date(timestamp);
|
||||
case "h":
|
||||
timestamp *= 60;
|
||||
case "m":
|
||||
timestamp *= 60;
|
||||
case "s":
|
||||
timestamp *= 1000;
|
||||
return new Date(timestamp);
|
||||
default:
|
||||
throw new Error(`Unknown precision '${precision}'!`);
|
||||
}
|
||||
}
|
||||
}
|
||||
const nsPer = {
|
||||
ms: Math.pow(10, 6),
|
||||
s: Math.pow(10, 9),
|
||||
};
|
||||
function nanoIsoToTime(iso) {
|
||||
let [secondsStr, decimalStr] = iso.split(".");
|
||||
if (decimalStr === undefined) {
|
||||
decimalStr = "000000000";
|
||||
}
|
||||
else {
|
||||
decimalStr = rightPad(decimalStr.slice(0, -1), 9);
|
||||
secondsStr += "Z";
|
||||
}
|
||||
const seconds = Math.floor(new Date(secondsStr).getTime() / 1000);
|
||||
return `${seconds}${decimalStr}`;
|
||||
}
|
||||
const nanoDateMethods = {
|
||||
getNanoTimeFromISO() {
|
||||
if (!this._cachedNanoISO) {
|
||||
this._cachedNanoTime = nanoIsoToTime(this._nanoISO);
|
||||
}
|
||||
return this._cachedNanoTime;
|
||||
},
|
||||
toNanoISOStringFromISO() {
|
||||
if (!this._cachedNanoISO) {
|
||||
this._cachedNanoTime = nanoIsoToTime(this._nanoISO);
|
||||
}
|
||||
const base = this.toISOString().slice(0, -4); // Slice of `123Z` milliseconds
|
||||
return `${base}${this._cachedNanoTime.slice(-9)}Z`;
|
||||
},
|
||||
getNanoTimeFromStamp() {
|
||||
return this._nanoTime;
|
||||
},
|
||||
toNanoISOStringFromStamp() {
|
||||
const base = this.toISOString().slice(0, -4); // Slice of `123Z` milliseconds
|
||||
return `${base}${this._nanoTime.slice(-9)}Z`;
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Covers a nanoseconds unix timestamp to a INanoDate for node-influx. The
|
||||
* timestamp is provided as a string to prevent precision loss.
|
||||
*
|
||||
* Please see [A Moment for Times](https://node-influx.github.io/manual/
|
||||
* usage.html#a-moment-for-times) for a more complete and eloquent explanation
|
||||
* of time handling in this module.
|
||||
*
|
||||
* @param timestamp
|
||||
* @example
|
||||
* const date = toNanoDate('1475985480231035600')
|
||||
*
|
||||
* // You can use the returned Date as a normal date:
|
||||
* expect(date.getTime()).to.equal(1475985480231);
|
||||
*
|
||||
* // We decorate it with two additional methods to read
|
||||
* // nanosecond-precision results:
|
||||
* expect(date.getNanoTime()).to.equal('1475985480231035600');
|
||||
* expect(date.toNanoISOString()).to.equal('2016-10-09T03:58:00.231035600Z');
|
||||
*/
|
||||
function toNanoDate(timestamp) {
|
||||
const secs = Math.floor(Number(timestamp) / nsPer.s);
|
||||
const remainingNs = timestamp.slice(String(secs).length);
|
||||
const remainingMs = Number(remainingNs) / nsPer.ms;
|
||||
const date = new Date(0);
|
||||
date.setUTCSeconds(secs, remainingMs);
|
||||
date._nanoTime = timestamp;
|
||||
date.getNanoTime = nanoDateMethods.getNanoTimeFromStamp;
|
||||
date.toNanoISOString = nanoDateMethods.toNanoISOStringFromStamp;
|
||||
return date;
|
||||
}
|
||||
exports.toNanoDate = toNanoDate;
|
||||
function asNanoDate(date) {
|
||||
const d = date;
|
||||
if (d.getNanoTime) {
|
||||
return d;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
class NanosecondsDateManipulator {
|
||||
format(date) {
|
||||
return ('"' +
|
||||
leftPad(date.getUTCFullYear(), 2) +
|
||||
"-" +
|
||||
leftPad(date.getUTCMonth() + 1, 2) +
|
||||
"-" +
|
||||
leftPad(date.getUTCDate(), 2) +
|
||||
" " +
|
||||
leftPad(date.getUTCHours(), 2) +
|
||||
":" +
|
||||
leftPad(date.getUTCMinutes(), 2) +
|
||||
":" +
|
||||
leftPad(date.getUTCSeconds(), 2) +
|
||||
"." +
|
||||
date.getNanoTime().slice(-9) +
|
||||
'"');
|
||||
}
|
||||
toTime(date, precision) {
|
||||
let ms = date.getTime();
|
||||
switch (precision) {
|
||||
case "u":
|
||||
return date.getNanoTime().slice(0, -3);
|
||||
case "n":
|
||||
return date.getNanoTime();
|
||||
case "h":
|
||||
ms /= 60;
|
||||
case "m":
|
||||
ms /= 60;
|
||||
case "s":
|
||||
ms /= 1000;
|
||||
case "ms":
|
||||
return String(Math.floor(ms));
|
||||
default:
|
||||
throw new Error(`Unknown precision '${precision}'!`);
|
||||
}
|
||||
}
|
||||
isoToDate(timestamp) {
|
||||
const date = new Date(timestamp);
|
||||
date._nanoISO = timestamp;
|
||||
date.getNanoTime = nanoDateMethods.getNanoTimeFromISO;
|
||||
date.toNanoISOString = nanoDateMethods.toNanoISOStringFromISO;
|
||||
return date;
|
||||
}
|
||||
timetoDate(timestamp, precision) {
|
||||
switch (precision) {
|
||||
case "h":
|
||||
timestamp *= 60;
|
||||
case "m":
|
||||
timestamp *= 60;
|
||||
case "s":
|
||||
timestamp *= 1000;
|
||||
case "ms":
|
||||
timestamp *= 1000;
|
||||
case "u":
|
||||
timestamp *= 1000;
|
||||
case "n": {
|
||||
const date = new Date(timestamp / nsPer.ms);
|
||||
date._nanoTime = String(timestamp);
|
||||
date.getNanoTime = nanoDateMethods.getNanoTimeFromStamp;
|
||||
date.toNanoISOString = nanoDateMethods.toNanoISOStringFromStamp;
|
||||
return date;
|
||||
}
|
||||
default:
|
||||
throw new Error(`Unknown precision '${precision}'!`);
|
||||
}
|
||||
}
|
||||
}
|
||||
const milliManipulator = new MillisecondDateManipulator();
|
||||
const nanoManipulator = new NanosecondsDateManipulator();
|
||||
/**
|
||||
* FormatDate converts the Date instance to Influx's date query format.
|
||||
* @private
|
||||
*/
|
||||
function formatDate(date) {
|
||||
const nano = asNanoDate(date);
|
||||
if (nano) {
|
||||
return nanoManipulator.format(nano);
|
||||
}
|
||||
return milliManipulator.format(date);
|
||||
}
|
||||
exports.formatDate = formatDate;
|
||||
/**
|
||||
* Converts a Date instance to a timestamp with the specified time precision.
|
||||
* @private
|
||||
*/
|
||||
function dateToTime(date, precision) {
|
||||
const nano = asNanoDate(date);
|
||||
if (nano) {
|
||||
return nanoManipulator.toTime(nano, precision);
|
||||
}
|
||||
return milliManipulator.toTime(date, precision);
|
||||
}
|
||||
exports.dateToTime = dateToTime;
|
||||
/**
|
||||
* Converts an ISO-formatted data or unix timestamp to a Date instance. If
|
||||
* the precision is finer than 'ms' the returned value will be a INanoDate.
|
||||
* @private
|
||||
*/
|
||||
function isoOrTimeToDate(stamp, precision = "n") {
|
||||
if (typeof stamp === "string") {
|
||||
return nanoManipulator.isoToDate(stamp);
|
||||
}
|
||||
return nanoManipulator.timetoDate(stamp, precision);
|
||||
}
|
||||
exports.isoOrTimeToDate = isoOrTimeToDate;
|
||||
/**
|
||||
* Converts a timestamp to a string with the correct precision. Assumes
|
||||
* that raw number and string instances are already in the correct precision.
|
||||
* @private
|
||||
*/
|
||||
function castTimestamp(timestamp, precision) {
|
||||
if (typeof timestamp === "string") {
|
||||
if (!ds_1.isNumeric(timestamp)) {
|
||||
throw new Error(`Expected numeric value for, timestamp, but got '${timestamp}'!`);
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
if (typeof timestamp === "number") {
|
||||
return String(timestamp);
|
||||
}
|
||||
return dateToTime(timestamp, precision);
|
||||
}
|
||||
exports.castTimestamp = castTimestamp;
|
26
software/flow/node_modules/influx/lib/src/host.d.ts
generated
vendored
Normal file
26
software/flow/node_modules/influx/lib/src/host.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/// <reference types="node" />
|
||||
import { RequestOptions } from "https";
|
||||
import * as urlModule from "url";
|
||||
import { IBackoffStrategy } from "./backoff/backoff";
|
||||
export declare class Host {
|
||||
private backoff;
|
||||
readonly options: RequestOptions;
|
||||
readonly url: urlModule.Url;
|
||||
/**
|
||||
* Creates a new Host instance.
|
||||
* @param url
|
||||
* @param backoff
|
||||
*/
|
||||
constructor(url: string, backoff: IBackoffStrategy, options: RequestOptions);
|
||||
/**
|
||||
* Marks a failure on the host and returns the length of time it
|
||||
* should be removed from the pool
|
||||
* @return removal time in milliseconds
|
||||
*/
|
||||
fail(): number;
|
||||
/**
|
||||
* Should be called when a successful operation is run against the host.
|
||||
* It resets the host's backoff strategy.
|
||||
*/
|
||||
success(): void;
|
||||
}
|
34
software/flow/node_modules/influx/lib/src/host.js
generated
vendored
Normal file
34
software/flow/node_modules/influx/lib/src/host.js
generated
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Host = void 0;
|
||||
const urlModule = require("url");
|
||||
class Host {
|
||||
/**
|
||||
* Creates a new Host instance.
|
||||
* @param url
|
||||
* @param backoff
|
||||
*/
|
||||
constructor(url, backoff, options) {
|
||||
this.backoff = backoff;
|
||||
this.options = options;
|
||||
this.url = urlModule.parse(url);
|
||||
}
|
||||
/**
|
||||
* Marks a failure on the host and returns the length of time it
|
||||
* should be removed from the pool
|
||||
* @return removal time in milliseconds
|
||||
*/
|
||||
fail() {
|
||||
const value = this.backoff.getDelay();
|
||||
this.backoff = this.backoff.next();
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Should be called when a successful operation is run against the host.
|
||||
* It resets the host's backoff strategy.
|
||||
*/
|
||||
success() {
|
||||
this.backoff = this.backoff.reset();
|
||||
}
|
||||
}
|
||||
exports.Host = Host;
|
745
software/flow/node_modules/influx/lib/src/index.d.ts
generated
vendored
Normal file
745
software/flow/node_modules/influx/lib/src/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,745 @@
|
|||
/// <reference types="node" />
|
||||
import { RequestOptions } from "https";
|
||||
import * as b from "./builder";
|
||||
import * as grammar from "./grammar";
|
||||
import { IPingStats, IPoolOptions } from "./pool";
|
||||
import { IResults } from "./results";
|
||||
import { ISchemaOptions } from "./schema";
|
||||
export * from "./builder";
|
||||
export { INanoDate, FieldType, Precision, Raw, TimePrecision, escape, toNanoDate, } from "./grammar";
|
||||
export { ISchemaOptions } from "./schema";
|
||||
export { IPingStats, IPoolOptions } from "./pool";
|
||||
export { IResults, IResponse, ResultError } from "./results";
|
||||
export interface IHostConfig {
|
||||
/**
|
||||
* Influx host to connect to, defaults to 127.0.0.1.
|
||||
*/
|
||||
host?: string;
|
||||
/**
|
||||
* Influx port to connect to, defaults to 8086.
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* Path for Influx within the host, defaults to ''.
|
||||
* May be used if Influx is behind a reverse proxy or load balancer.
|
||||
*/
|
||||
path?: string;
|
||||
/**
|
||||
* Protocol to connect over, defaults to 'http'.
|
||||
*/
|
||||
protocol?: "http" | "https";
|
||||
/**
|
||||
* Optional request option overrides.
|
||||
*/
|
||||
options?: RequestOptions;
|
||||
}
|
||||
export interface ISingleHostConfig extends IHostConfig {
|
||||
/**
|
||||
* Username for connecting to the database. Defaults to 'root'.
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* Password for connecting to the database. Defaults to 'root'.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* Default database to write information to.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Settings for the connection pool.
|
||||
*/
|
||||
pool?: IPoolOptions;
|
||||
/**
|
||||
* A list of schema for measurements in the database.
|
||||
*/
|
||||
schema?: ISchemaOptions[];
|
||||
}
|
||||
export interface IClusterConfig {
|
||||
/**
|
||||
* Username for connecting to the database. Defaults to 'root'.
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
* Password for connecting to the database. Defaults to 'root'.
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* Default database to write information to.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* A list of cluster hosts to connect to.
|
||||
*/
|
||||
hosts: IHostConfig[];
|
||||
/**
|
||||
* Settings for the connection pool.
|
||||
*/
|
||||
pool?: IPoolOptions;
|
||||
/**
|
||||
* A list of schema for measurements in the database.
|
||||
*/
|
||||
schema?: ISchemaOptions[];
|
||||
}
|
||||
export interface IPoint {
|
||||
/**
|
||||
* Measurement is the Influx measurement name.
|
||||
*/
|
||||
measurement?: string;
|
||||
/**
|
||||
* Tags is the list of tag values to insert.
|
||||
*/
|
||||
tags?: {
|
||||
[name: string]: string;
|
||||
};
|
||||
/**
|
||||
* Fields is the list of field values to insert.
|
||||
*/
|
||||
fields?: {
|
||||
[name: string]: any;
|
||||
};
|
||||
/**
|
||||
* Timestamp tags this measurement with a date. This can be a Date object,
|
||||
* in which case we'll adjust it to the desired precision, or a numeric
|
||||
* string or number, in which case it gets passed directly to Influx.
|
||||
*/
|
||||
timestamp?: Date | string | number;
|
||||
}
|
||||
export interface IWriteOptions {
|
||||
/**
|
||||
* Precision at which the points are written, defaults to nanoseconds 'n'.
|
||||
*/
|
||||
precision?: grammar.TimePrecision;
|
||||
/**
|
||||
* Retention policy to write the points under, defaults to the DEFAULT
|
||||
* database policy.
|
||||
*/
|
||||
retentionPolicy?: string;
|
||||
/**
|
||||
* Database under which to write the points. This is required if a default
|
||||
* database is not provided in Influx.
|
||||
*/
|
||||
database?: string;
|
||||
}
|
||||
export interface IQueryOptions {
|
||||
/**
|
||||
* Defines the precision at which to query points. When left blank, it will
|
||||
* query in nanosecond precision.
|
||||
*/
|
||||
precision?: grammar.TimePrecision;
|
||||
/**
|
||||
* Retention policy to query from, defaults to the DEFAULT
|
||||
* database policy.
|
||||
*/
|
||||
retentionPolicy?: string;
|
||||
/**
|
||||
* Database under which to query the points. This is required if a default
|
||||
* database is not provided in Influx.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Any placeholders used by the query. Using these is strongly recommended
|
||||
* to avoid injection attacks.
|
||||
*/
|
||||
placeholders?: Record<string, string>;
|
||||
}
|
||||
/**
|
||||
* IRetentionOptions are passed into passed into the {@link
|
||||
* InfluxDB#createRetentionPolicy} and {@link InfluxDB#alterRetentionPolicy}.
|
||||
* See the [Downsampling and Retention page](https://docs.influxdata.com/
|
||||
* influxdb/v1.0/guides/downsampling_and_retention/) on the Influx docs for
|
||||
* more information.
|
||||
*/
|
||||
export interface IRetentionOptions {
|
||||
database?: string;
|
||||
duration: string;
|
||||
replication: number;
|
||||
isDefault?: boolean;
|
||||
}
|
||||
/**
|
||||
* InfluxDB is the public interface to run queries against your database.
|
||||
* This is a 'driver-level' module, not a a full-fleged ORM or ODM; you run
|
||||
* queries directly by calling methods on this class.
|
||||
*
|
||||
* Please check out some of [the tutorials](https://node-influx.github.io/manual/tutorial.html)
|
||||
* if you want help getting started!
|
||||
*
|
||||
* @example
|
||||
* const Influx = require('influx');
|
||||
* const influx = new Influx.InfluxDB({
|
||||
* host: 'localhost',
|
||||
* database: 'express_response_db',
|
||||
* schema: [
|
||||
* {
|
||||
* measurement: 'response_times',
|
||||
* fields: {
|
||||
* path: Influx.FieldType.STRING,
|
||||
* duration: Influx.FieldType.INTEGER
|
||||
* },
|
||||
* tags: [
|
||||
* 'host'
|
||||
* ]
|
||||
* }
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* @example
|
||||
* // Connect over HTTPS
|
||||
* const Influx = require('influx');
|
||||
* const influx = new Influx.InfluxDB({
|
||||
* host: 'myinfluxdbhost',
|
||||
* port: 443,
|
||||
* protocol: 'https'
|
||||
* database: 'express_response_db',
|
||||
* schema: [
|
||||
* {
|
||||
* measurement: 'response_times',
|
||||
* fields: {
|
||||
* path: Influx.FieldType.STRING,
|
||||
* duration: Influx.FieldType.INTEGER
|
||||
* },
|
||||
* tags: [
|
||||
* 'host'
|
||||
* ]
|
||||
* }
|
||||
* ]
|
||||
* })
|
||||
*
|
||||
* influx.writePoints([
|
||||
* {
|
||||
* measurement: 'response_times',
|
||||
* tags: { host: os.hostname() },
|
||||
* fields: { duration, path: req.path },
|
||||
* }
|
||||
* ]).then(() => {
|
||||
* return influx.query(`
|
||||
* select * from response_times
|
||||
* where host = $<host>
|
||||
* order by time desc
|
||||
* limit 10
|
||||
* `, {
|
||||
* placeholders: {
|
||||
* host: os.hostname()
|
||||
* }
|
||||
* })
|
||||
* }).then(rows => {
|
||||
* rows.forEach(row => console.log(`A request to ${row.path} took ${row.duration}ms`))
|
||||
* })
|
||||
*/
|
||||
export declare class InfluxDB {
|
||||
/**
|
||||
* Connect pool for making requests.
|
||||
* @private
|
||||
*/
|
||||
private readonly _pool;
|
||||
/**
|
||||
* Config options for Influx.
|
||||
* @private
|
||||
*/
|
||||
private readonly _options;
|
||||
/**
|
||||
* Map of Schema instances defining measurements in Influx.
|
||||
* @private
|
||||
*/
|
||||
private _schema;
|
||||
constructor(options: ISingleHostConfig);
|
||||
/**
|
||||
* Connect to an InfluxDB cluster by specifying a
|
||||
* set of connection options.
|
||||
*/
|
||||
constructor(options: IClusterConfig);
|
||||
/**
|
||||
* Connect to an InfluxDB instance using a configuration URL.
|
||||
* @example
|
||||
* new InfluxDB('http://user:password@host:8086/database')
|
||||
*/
|
||||
constructor(url: string);
|
||||
/**
|
||||
* Connects to a local, default Influx instance.
|
||||
*/
|
||||
constructor();
|
||||
/**
|
||||
* Adds specified schema for better fields coercing.
|
||||
*
|
||||
* @param {ISchemaOptions} schema
|
||||
* @memberof InfluxDB
|
||||
*/
|
||||
addSchema(schema: ISchemaOptions): void;
|
||||
/**
|
||||
* Creates a new database with the provided name.
|
||||
* @param databaseName
|
||||
* @return
|
||||
* @example
|
||||
* influx.createDatabase('mydb')
|
||||
*/
|
||||
createDatabase(databaseName: string): Promise<void>;
|
||||
/**
|
||||
* Deletes a database with the provided name.
|
||||
* @param databaseName
|
||||
* @return
|
||||
* @example
|
||||
* influx.dropDatabase('mydb')
|
||||
*/
|
||||
dropDatabase(databaseName: string): Promise<void>;
|
||||
/**
|
||||
* Returns array of database names. Requires cluster admin privileges.
|
||||
* @returns a list of database names
|
||||
* @example
|
||||
* influx.getDatabaseNames().then(names =>
|
||||
* console.log('My database names are: ' + names.join(', ')));
|
||||
*/
|
||||
getDatabaseNames(): Promise<string[]>;
|
||||
/**
|
||||
* Returns array of measurements.
|
||||
* @returns a list of measurement names
|
||||
* @param [database] the database the measurement lives in, optional
|
||||
* if a default database is provided.
|
||||
* @example
|
||||
* influx.getMeasurements().then(names =>
|
||||
* console.log('My measurement names are: ' + names.join(', ')));
|
||||
*/
|
||||
getMeasurements(database?: string): Promise<string[]>;
|
||||
/**
|
||||
* Returns a list of all series within the target measurement, or from the
|
||||
* entire database if a measurement isn't provided.
|
||||
* @param [options]
|
||||
* @param [options.measurement] if provided, we'll only get series
|
||||
* from within that measurement.
|
||||
* @param [options.database] the database the series lives in,
|
||||
* optional if a default database is provided.
|
||||
* @returns a list of series names
|
||||
* @example
|
||||
* influx.getSeries().then(names => {
|
||||
* console.log('My series names in my_measurement are: ' + names.join(', '))
|
||||
* })
|
||||
*
|
||||
* influx.getSeries({
|
||||
* measurement: 'my_measurement',
|
||||
* database: 'my_db'
|
||||
* }).then(names => {
|
||||
* console.log('My series names in my_measurement are: ' + names.join(', '))
|
||||
* })
|
||||
*/
|
||||
getSeries(options?: {
|
||||
measurement?: string;
|
||||
database?: string;
|
||||
}): Promise<string[]>;
|
||||
/**
|
||||
* Removes a measurement from the database.
|
||||
* @param measurement
|
||||
* @param [database] the database the measurement lives in, optional
|
||||
* if a default database is provided.
|
||||
* @return
|
||||
* @example
|
||||
* influx.dropMeasurement('my_measurement')
|
||||
*/
|
||||
dropMeasurement(measurement: string, database?: string): Promise<void>;
|
||||
/**
|
||||
* Removes a one or more series from InfluxDB.
|
||||
*
|
||||
* @returns
|
||||
* @example
|
||||
* // The following pairs of queries are equivalent: you can chose either to
|
||||
* // use our builder or pass in string directly. The builder takes care
|
||||
* // of escaping and most syntax handling for you.
|
||||
*
|
||||
* influx.dropSeries({ where: e => e.tag('cpu').equals.value('cpu8') })
|
||||
* influx.dropSeries({ where: '"cpu" = \'cpu8\'' })
|
||||
* // DROP SERIES WHERE "cpu" = 'cpu8'
|
||||
*
|
||||
* influx.dropSeries({ measurement: m => m.name('cpu').policy('autogen') })
|
||||
* influx.dropSeries({ measurement: '"cpu"."autogen"' })
|
||||
* // DROP SERIES FROM "autogen"."cpu"
|
||||
*
|
||||
* influx.dropSeries({
|
||||
* measurement: m => m.name('cpu').policy('autogen'),
|
||||
* where: e => e.tag('cpu').equals.value('cpu8'),
|
||||
* database: 'my_db'
|
||||
* })
|
||||
* // DROP SERIES FROM "autogen"."cpu" WHERE "cpu" = 'cpu8'
|
||||
*/
|
||||
dropSeries(options: b.measurement | b.where | {
|
||||
database: string;
|
||||
}): Promise<void>;
|
||||
/**
|
||||
* Returns a list of users on the Influx database.
|
||||
* @return
|
||||
* @example
|
||||
* influx.getUsers().then(users => {
|
||||
* users.forEach(user => {
|
||||
* if (user.admin) {
|
||||
* console.log(user.user, 'is an admin!')
|
||||
* } else {
|
||||
* console.log(user.user, 'is not an admin!')
|
||||
* }
|
||||
* })
|
||||
* })
|
||||
*/
|
||||
getUsers(): Promise<IResults<{
|
||||
user: string;
|
||||
admin: boolean;
|
||||
}>>;
|
||||
/**
|
||||
* Creates a new InfluxDB user.
|
||||
* @param username
|
||||
* @param password
|
||||
* @param [admin=false] If true, the user will be given all
|
||||
* privileges on all databases.
|
||||
* @return
|
||||
* @example
|
||||
* influx.createUser('connor', 'pa55w0rd', true) // make 'connor' an admin
|
||||
*
|
||||
* // make non-admins:
|
||||
* influx.createUser('not_admin', 'pa55w0rd')
|
||||
*/
|
||||
createUser(username: string, password: string, admin?: boolean): Promise<void>;
|
||||
/**
|
||||
* Sets a password for an Influx user.
|
||||
* @param username
|
||||
* @param password
|
||||
* @return
|
||||
* @example
|
||||
* influx.setPassword('connor', 'pa55w0rd')
|
||||
*/
|
||||
setPassword(username: string, password: string): Promise<void>;
|
||||
/**
|
||||
* Grants a privilege to a specified user.
|
||||
* @param username
|
||||
* @param privilege Should be one of 'READ' or 'WRITE'
|
||||
* @param [database] If not provided, uses the default database.
|
||||
* @return
|
||||
* @example
|
||||
* influx.grantPrivilege('connor', 'READ', 'my_db') // grants read access on my_db to connor
|
||||
*/
|
||||
grantPrivilege(username: string, privilege: "READ" | "WRITE", database?: string): Promise<void>;
|
||||
/**
|
||||
* Removes a privilege from a specified user.
|
||||
* @param username
|
||||
* @param privilege Should be one of 'READ' or 'WRITE'
|
||||
* @param [database] If not provided, uses the default database.
|
||||
* @return
|
||||
* @example
|
||||
* influx.revokePrivilege('connor', 'READ', 'my_db') // removes read access on my_db from connor
|
||||
*/
|
||||
revokePrivilege(username: string, privilege: "READ" | "WRITE", database?: string): Promise<void>;
|
||||
/**
|
||||
* Grants admin privileges to a specified user.
|
||||
* @param username
|
||||
* @return
|
||||
* @example
|
||||
* influx.grantAdminPrivilege('connor')
|
||||
*/
|
||||
grantAdminPrivilege(username: string): Promise<void>;
|
||||
/**
|
||||
* Removes a admin privilege from a specified user.
|
||||
* @param username
|
||||
* @return
|
||||
* @example
|
||||
* influx.revokeAdminPrivilege('connor')
|
||||
*/
|
||||
revokeAdminPrivilege(username: string): Promise<void>;
|
||||
/**
|
||||
* Removes a user from the database.
|
||||
* @param username
|
||||
* @return
|
||||
* @example
|
||||
* influx.dropUser('connor')
|
||||
*/
|
||||
dropUser(username: string): Promise<void>;
|
||||
/**
|
||||
* Creates a continuous query in a database
|
||||
* @param name The query name, for later reference
|
||||
* @param query The body of the query to run
|
||||
* @param [database] If not provided, uses the default database.
|
||||
* @param [resample] If provided, adds resample policy
|
||||
* @return
|
||||
* @example
|
||||
* influx.createContinuousQuery('downsample_cpu_1h', `
|
||||
* SELECT MEAN(cpu) INTO "7d"."perf"
|
||||
* FROM "1d"."perf" GROUP BY time(1m)
|
||||
* `, undefined, 'RESAMPLE FOR 7m')
|
||||
*/
|
||||
createContinuousQuery(name: string, query: string, database?: string, resample?: string): Promise<void>;
|
||||
/**
|
||||
* Returns a list of continous queries in the database.
|
||||
* @param [database] If not provided, uses the default database.
|
||||
* @return
|
||||
* @example
|
||||
* influx.showContinousQueries()
|
||||
*/
|
||||
showContinousQueries(database?: string): Promise<IResults<{
|
||||
name: string;
|
||||
query: string;
|
||||
}>>;
|
||||
/**
|
||||
* Creates a continuous query in a database
|
||||
* @param name The query name
|
||||
* @param [database] If not provided, uses the default database.
|
||||
* @return
|
||||
* @example
|
||||
* influx.dropContinuousQuery('downsample_cpu_1h')
|
||||
*/
|
||||
dropContinuousQuery(name: string, database?: string): Promise<void>;
|
||||
/**
|
||||
* Creates a new retention policy on a database. You can read more about
|
||||
* [Downsampling and Retention](https://docs.influxdata.com/influxdb/v1.0/
|
||||
* guides/downsampling_and_retention/) on the InfluxDB website.
|
||||
*
|
||||
* @param name The retention policy name
|
||||
* @param options
|
||||
* @param [options.database] Database to create the policy on,
|
||||
* uses the default database if not provided.
|
||||
* @param options.duration How long data in the retention policy
|
||||
* should be stored for, should be in a format like `7d`. See details
|
||||
* [here](https://docs.influxdata.com/influxdb/v1.0/query_language/spec/#durations)
|
||||
* @param options.replication How many servers data in the series
|
||||
* should be replicated to.
|
||||
* @param [options.isDefault] Whether the retention policy should
|
||||
* be the default policy on the database.
|
||||
* @return
|
||||
* @example
|
||||
* influx.createRetentionPolicy('7d', {
|
||||
* duration: '7d',
|
||||
* replication: 1
|
||||
* })
|
||||
*/
|
||||
createRetentionPolicy(name: string, options: IRetentionOptions): Promise<void>;
|
||||
/**
|
||||
* Alters an existing retention policy on a database.
|
||||
*
|
||||
* @param name The retention policy name
|
||||
* @param options
|
||||
* @param [options.database] Database to create the policy on,
|
||||
* uses the default database if not provided.
|
||||
* @param options.duration How long data in the retention policy
|
||||
* should be stored for, should be in a format like `7d`. See details
|
||||
* [here](https://docs.influxdata.com/influxdb/v1.0/query_language/spec/#durations)
|
||||
* @param options.replication How many servers data in the series
|
||||
* should be replicated to.
|
||||
* @param [options.default] Whether the retention policy should
|
||||
* be the default policy on the database.
|
||||
* @return
|
||||
* @example
|
||||
* influx.alterRetentionPolicy('7d', {
|
||||
* duration: '7d',
|
||||
* replication: 1,
|
||||
* default: true
|
||||
* })
|
||||
*/
|
||||
alterRetentionPolicy(name: string, options: IRetentionOptions): Promise<void>;
|
||||
/**
|
||||
* Deletes a retention policy and associated data. Note that the data will
|
||||
* not be immediately destroyed, and will hang around until Influx's
|
||||
* bi-hourly cron.
|
||||
*
|
||||
* @param name The retention policy name
|
||||
* @param [database] Database name that the policy lives in,
|
||||
* uses the default database if not provided.
|
||||
* @return
|
||||
* @example
|
||||
* influx.dropRetentionPolicy('7d')
|
||||
*/
|
||||
dropRetentionPolicy(name: string, database?: string): Promise<void>;
|
||||
/**
|
||||
* Shows retention policies on the database
|
||||
*
|
||||
* @param [database] The database to list policies on, uses the
|
||||
* default database if not provided.
|
||||
* @return
|
||||
* @example
|
||||
* influx.showRetentionPolicies().then(policies => {
|
||||
* expect(policies.slice()).to.deep.equal([
|
||||
* {
|
||||
* name: 'autogen',
|
||||
* duration: '0s',
|
||||
* shardGroupDuration: '168h0m0s',
|
||||
* replicaN: 1,
|
||||
* default: true,
|
||||
* },
|
||||
* {
|
||||
* name: '7d',
|
||||
* duration: '168h0m0s',
|
||||
* shardGroupDuration: '24h0m0s',
|
||||
* replicaN: 1,
|
||||
* default: false,
|
||||
* },
|
||||
* ])
|
||||
* })
|
||||
*/
|
||||
showRetentionPolicies(database?: string): Promise<IResults<{
|
||||
default: boolean;
|
||||
duration: string;
|
||||
name: string;
|
||||
replicaN: number;
|
||||
shardGroupDuration: string;
|
||||
}>>;
|
||||
/**
|
||||
* Shows shards on the database
|
||||
*
|
||||
* @param [database] The database to list policies on, uses the
|
||||
* default database if not provided.
|
||||
* @return
|
||||
* @example
|
||||
* influx.showShards().then(shards => {
|
||||
* expect(shards.slice()).to.deep.equal([
|
||||
* {
|
||||
* id: 1
|
||||
* database: 'database',
|
||||
* retention_policy: 'autogen',
|
||||
* shard_group: 1,
|
||||
* start_time: '2019-05-06T00:00:00Z',
|
||||
* end_time: '2019-05-13T00:00:00Z',
|
||||
* expiry_time: '2019-05-13T00:00:00Z',
|
||||
* owners: null,
|
||||
* },
|
||||
* ])
|
||||
* })
|
||||
*/
|
||||
showShards(database?: string): Promise<Array<{
|
||||
id: number;
|
||||
database: string;
|
||||
retention_policy: string;
|
||||
shard_group: number;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
expiry_time: string;
|
||||
owners: string;
|
||||
}>>;
|
||||
/**
|
||||
* Drops a shard with the provided number.
|
||||
* @param shard_id
|
||||
* @return
|
||||
* @example
|
||||
* influx.dropShard(3)
|
||||
*/
|
||||
dropShard(shard_id: number): Promise<void>;
|
||||
/**
|
||||
* WritePoints sends a list of points together in a batch to InfluxDB. In
|
||||
* each point you must specify the measurement name to write into as well
|
||||
* as a list of tag and field values. Optionally, you can specify the
|
||||
* time to tag that point at, defaulting to the current time.
|
||||
*
|
||||
* If you defined a schema for the measurement in the options you passed
|
||||
* to `new Influx(options)`, we'll use that to make sure that types get
|
||||
* cast correctly and that there are no extraneous fields or columns.
|
||||
*
|
||||
* For best performance, it's recommended that you batch your data into
|
||||
* sets of a couple thousand records before writing it. In the future we'll
|
||||
* have some utilities within node-influx to make this easier.
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* A note when using manually-specified times and precisions: by default
|
||||
* we write using the `ms` precision since that's what JavaScript gives us.
|
||||
* You can adjust this. However, there is some special behaviour if you
|
||||
* manually specify a timestamp in your points:
|
||||
* - if you specify the timestamp as a Date object, we'll convert it to
|
||||
* milliseconds and manipulate it as needed to get the right precision
|
||||
* - if provide a INanoDate as returned from {@link toNanoTime} or the
|
||||
* results from an Influx query, we'll be able to pull the precise
|
||||
* nanosecond timestamp and manipulate it to get the right precision
|
||||
* - if you provide a string or number as the timestamp, we'll pass it
|
||||
* straight into Influx.
|
||||
*
|
||||
* Please see the IPoint and IWriteOptions types for a
|
||||
* full list of possible options.
|
||||
*
|
||||
* @param points
|
||||
* @param [options]
|
||||
* @return
|
||||
* @example
|
||||
* // write a point into the default database with
|
||||
* // the default retention policy.
|
||||
* influx.writePoints([
|
||||
* {
|
||||
* measurement: 'perf',
|
||||
* tags: { host: 'box1.example.com' },
|
||||
* fields: { cpu: getCpuUsage(), mem: getMemUsage() },
|
||||
* }
|
||||
* ])
|
||||
*
|
||||
* // you can manually specify the database,
|
||||
* // retention policy, and time precision:
|
||||
* influx.writePoints([
|
||||
* {
|
||||
* measurement: 'perf',
|
||||
* tags: { host: 'box1.example.com' },
|
||||
* fields: { cpu: getCpuUsage(), mem: getMemUsage() },
|
||||
* timestamp: getLastRecordedTime(),
|
||||
* }
|
||||
* ], {
|
||||
* database: 'my_db',
|
||||
* retentionPolicy: '1d',
|
||||
* precision: 's'
|
||||
* })
|
||||
*/
|
||||
writePoints(points: IPoint[], options?: IWriteOptions): Promise<void>;
|
||||
/**
|
||||
* WriteMeasurement functions similarly to {@link InfluxDB#writePoints}, but
|
||||
* it automatically fills in the `measurement` value for all points for you.
|
||||
*
|
||||
* @param measurement
|
||||
* @param points
|
||||
* @param [options]
|
||||
* @return
|
||||
* @example
|
||||
* influx.writeMeasurement('perf', [
|
||||
* {
|
||||
* tags: { host: 'box1.example.com' },
|
||||
* fields: { cpu: getCpuUsage(), mem: getMemUsage() },
|
||||
* }
|
||||
* ])
|
||||
*/
|
||||
writeMeasurement(measurement: string, points: IPoint[], options?: IWriteOptions): Promise<void>;
|
||||
query<T>(query: string[], options?: IQueryOptions): Promise<Array<IResults<T>>>;
|
||||
query<T>(query: string, options?: IQueryOptions): Promise<IResults<T>>;
|
||||
/**
|
||||
* QueryRaw functions similarly to .query() but it does no fancy
|
||||
* transformations on the returned data; it calls `JSON.parse` and returns
|
||||
* those results verbatim.
|
||||
*
|
||||
* @param query
|
||||
* @param [options]
|
||||
* @return
|
||||
* @example
|
||||
* influx.queryRaw('select * from perf').then(rawData => {
|
||||
* console.log(rawData)
|
||||
* })
|
||||
*/
|
||||
queryRaw(query: string | string[], options?: IQueryOptions): Promise<any>;
|
||||
/**
|
||||
* Pings all available hosts, collecting online status and version info.
|
||||
* @param timeout Given in milliseconds
|
||||
* @return
|
||||
* @example
|
||||
* influx.ping(5000).then(hosts => {
|
||||
* hosts.forEach(host => {
|
||||
* if (host.online) {
|
||||
* console.log(`${host.url.host} responded in ${host.rtt}ms running ${host.version})`)
|
||||
* } else {
|
||||
* console.log(`${host.url.host} is offline :(`)
|
||||
* }
|
||||
* })
|
||||
* })
|
||||
*/
|
||||
ping(timeout: number): Promise<IPingStats[]>;
|
||||
/**
|
||||
* Returns the default database that queries operates on. It throws if called
|
||||
* when a default database isn't set.
|
||||
* @private
|
||||
*/
|
||||
private _defaultDB;
|
||||
/**
|
||||
* Creates options to be passed into the pool to query databases.
|
||||
* @private
|
||||
*/
|
||||
private _getQueryOpts;
|
||||
/**
|
||||
* Creates specified measurement schema
|
||||
*
|
||||
* @private
|
||||
* @param {ISchemaOptions} schema
|
||||
* @memberof InfluxDB
|
||||
*/
|
||||
private _createSchema;
|
||||
}
|
1004
software/flow/node_modules/influx/lib/src/index.js
generated
vendored
Normal file
1004
software/flow/node_modules/influx/lib/src/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
149
software/flow/node_modules/influx/lib/src/pool.d.ts
generated
vendored
Normal file
149
software/flow/node_modules/influx/lib/src/pool.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,149 @@
|
|||
/// <reference types="node" />
|
||||
import { IBackoffStrategy } from "./backoff/backoff";
|
||||
import { Host } from "./host";
|
||||
import * as http from "http";
|
||||
import * as https from "https";
|
||||
import * as urlModule from "url";
|
||||
export interface IPoolOptions {
|
||||
/**
|
||||
* Number of times we should retry running a query
|
||||
* before calling back with an error.
|
||||
*/
|
||||
maxRetries?: number;
|
||||
/**
|
||||
* The length of time after which HTTP requests will error
|
||||
* if they do not receive a response.
|
||||
*/
|
||||
requestTimeout?: number;
|
||||
/**
|
||||
* Options to configure the backoff policy for the pool. Defaults
|
||||
* to using exponential backoff.
|
||||
*/
|
||||
backoff?: IBackoffStrategy;
|
||||
}
|
||||
export interface IPoolRequestOptions {
|
||||
/**
|
||||
* Request method.
|
||||
*/
|
||||
method: "GET" | "POST";
|
||||
/**
|
||||
* Path to hit on the database server, must begin with a leading slash.
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* Query string to be appended to the request path.
|
||||
*/
|
||||
query?: any;
|
||||
/**
|
||||
* Request body to include.
|
||||
*/
|
||||
body?: string;
|
||||
/**
|
||||
* For internal use only, a counter of the number of times we've retried
|
||||
* running this request.
|
||||
*/
|
||||
retries?: number;
|
||||
}
|
||||
/**
|
||||
* An ServiceNotAvailableError is returned as an error from requests that
|
||||
* result in a > 500 error code.
|
||||
*/
|
||||
export declare class ServiceNotAvailableError extends Error {
|
||||
constructor(message: string);
|
||||
}
|
||||
/**
|
||||
* An RequestError is returned as an error from requests that
|
||||
* result in a 300 <= error code <= 500.
|
||||
*/
|
||||
export declare class RequestError extends Error {
|
||||
req: http.ClientRequest;
|
||||
res: http.IncomingMessage;
|
||||
constructor(req: http.ClientRequest, res: http.IncomingMessage, body: string);
|
||||
static Create(req: http.ClientRequest, res: http.IncomingMessage, callback: (e: RequestError) => void): void;
|
||||
}
|
||||
export interface IPingStats {
|
||||
url: urlModule.Url;
|
||||
res: http.IncomingMessage;
|
||||
online: boolean;
|
||||
rtt: number;
|
||||
version: string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* The Pool maintains a list available Influx hosts and dispatches requests
|
||||
* to them. If there are errors connecting to hosts, it will disable that
|
||||
* host for a period of time.
|
||||
*/
|
||||
export declare class Pool {
|
||||
private readonly _options;
|
||||
private _index;
|
||||
private readonly _timeout;
|
||||
private readonly _hostsAvailable;
|
||||
private readonly _hostsDisabled;
|
||||
/**
|
||||
* Creates a new Pool instance.
|
||||
* @param {IPoolOptions} options
|
||||
*/
|
||||
constructor(options: IPoolOptions);
|
||||
/**
|
||||
* Returns a list of currently active hosts.
|
||||
* @return {Host[]}
|
||||
*/
|
||||
getHostsAvailable(): Host[];
|
||||
/**
|
||||
* Returns a list of hosts that are currently disabled due to network
|
||||
* errors.
|
||||
* @return {Host[]}
|
||||
*/
|
||||
getHostsDisabled(): Host[];
|
||||
/**
|
||||
* Inserts a new host to the pool.
|
||||
*/
|
||||
addHost(url: string, options?: https.RequestOptions): Host;
|
||||
/**
|
||||
* Returns true if there's any host available to by queried.
|
||||
* @return {Boolean}
|
||||
*/
|
||||
hostIsAvailable(): boolean;
|
||||
/**
|
||||
* Makes a request and calls back with the response, parsed as JSON.
|
||||
* An error is returned on a non-2xx status code or on a parsing exception.
|
||||
*/
|
||||
json(options: IPoolRequestOptions): Promise<any>;
|
||||
/**
|
||||
* Makes a request and resolves with the plain text response,
|
||||
* if possible. An error is raised on a non-2xx status code.
|
||||
*/
|
||||
text(options: IPoolRequestOptions): Promise<string>;
|
||||
/**
|
||||
* Makes a request and discards any response body it receives.
|
||||
* An error is returned on a non-2xx status code.
|
||||
*/
|
||||
discard(options: IPoolRequestOptions): Promise<void>;
|
||||
/**
|
||||
* Ping sends out a request to all available Influx servers, reporting on
|
||||
* their response time and version number.
|
||||
*/
|
||||
ping(timeout: number, path?: string): Promise<IPingStats[]>;
|
||||
/**
|
||||
* Makes a request and calls back with the IncomingMessage stream,
|
||||
* if possible. An error is returned on a non-2xx status code.
|
||||
*/
|
||||
stream(options: IPoolRequestOptions, callback: (err: Error, res: http.IncomingMessage) => void): void;
|
||||
/**
|
||||
* Returns the next available host for querying.
|
||||
* @return {Host}
|
||||
*/
|
||||
private _getHost;
|
||||
/**
|
||||
* Re-enables the provided host, returning it to the pool to query.
|
||||
* @param {Host} host
|
||||
*/
|
||||
private _enableHost;
|
||||
/**
|
||||
* Disables the provided host, removing it from the query pool. It will be
|
||||
* re-enabled after a backoff interval
|
||||
*/
|
||||
private _disableHost;
|
||||
private _handleRequestError;
|
||||
}
|
315
software/flow/node_modules/influx/lib/src/pool.js
generated
vendored
Normal file
315
software/flow/node_modules/influx/lib/src/pool.js
generated
vendored
Normal file
|
@ -0,0 +1,315 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Pool = exports.RequestError = exports.ServiceNotAvailableError = void 0;
|
||||
const exponential_1 = require("./backoff/exponential");
|
||||
const host_1 = require("./host");
|
||||
const http = require("http");
|
||||
const https = require("https");
|
||||
const querystring = require("querystring");
|
||||
/**
|
||||
* Status codes that will cause a host to be marked as 'failed' if we get
|
||||
* them from a request to Influx.
|
||||
* @type {Array}
|
||||
*/
|
||||
const resubmitErrorCodes = [
|
||||
"ETIMEDOUT",
|
||||
"ESOCKETTIMEDOUT",
|
||||
"ECONNRESET",
|
||||
"ECONNREFUSED",
|
||||
"EHOSTUNREACH",
|
||||
];
|
||||
/**
|
||||
* An ServiceNotAvailableError is returned as an error from requests that
|
||||
* result in a > 500 error code.
|
||||
*/
|
||||
class ServiceNotAvailableError extends Error {
|
||||
constructor(message) {
|
||||
super();
|
||||
this.message = message;
|
||||
Object.setPrototypeOf(this, ServiceNotAvailableError.prototype);
|
||||
}
|
||||
}
|
||||
exports.ServiceNotAvailableError = ServiceNotAvailableError;
|
||||
/**
|
||||
* An RequestError is returned as an error from requests that
|
||||
* result in a 300 <= error code <= 500.
|
||||
*/
|
||||
class RequestError extends Error {
|
||||
constructor(req, res, body) {
|
||||
super();
|
||||
this.req = req;
|
||||
this.res = res;
|
||||
this.message = `A ${res.statusCode} ${res.statusMessage} error occurred: ${body}`;
|
||||
Object.setPrototypeOf(this, RequestError.prototype);
|
||||
}
|
||||
static Create(req, res, callback) {
|
||||
let body = "";
|
||||
res.on("data", (str) => {
|
||||
body += str.toString();
|
||||
});
|
||||
res.on("end", () => callback(new RequestError(req, res, body)));
|
||||
}
|
||||
}
|
||||
exports.RequestError = RequestError;
|
||||
/**
|
||||
* Creates a function generation that returns a wrapper which only allows
|
||||
* through the first call of any function that it generated.
|
||||
*/
|
||||
function doOnce() {
|
||||
let handled = false;
|
||||
return (fn) => {
|
||||
return (arg) => {
|
||||
if (handled) {
|
||||
return;
|
||||
}
|
||||
handled = true;
|
||||
fn(arg);
|
||||
};
|
||||
};
|
||||
}
|
||||
function setToArray(itemSet) {
|
||||
const output = [];
|
||||
itemSet.forEach((value) => {
|
||||
output.push(value);
|
||||
});
|
||||
return output;
|
||||
}
|
||||
const request = (options, callback) => {
|
||||
if (options.protocol === "https:") {
|
||||
return https.request(options, callback);
|
||||
}
|
||||
return http.request(options, callback);
|
||||
};
|
||||
/**
|
||||
*
|
||||
* The Pool maintains a list available Influx hosts and dispatches requests
|
||||
* to them. If there are errors connecting to hosts, it will disable that
|
||||
* host for a period of time.
|
||||
*/
|
||||
class Pool {
|
||||
/**
|
||||
* Creates a new Pool instance.
|
||||
* @param {IPoolOptions} options
|
||||
*/
|
||||
constructor(options) {
|
||||
this._options = Object.assign({ backoff: new exponential_1.ExponentialBackoff({
|
||||
initial: 300,
|
||||
max: 10 * 1000,
|
||||
random: 1,
|
||||
}), maxRetries: 2, requestTimeout: 30 * 1000 }, options);
|
||||
this._index = 0;
|
||||
this._hostsAvailable = new Set();
|
||||
this._hostsDisabled = new Set();
|
||||
this._timeout = this._options.requestTimeout;
|
||||
}
|
||||
/**
|
||||
* Returns a list of currently active hosts.
|
||||
* @return {Host[]}
|
||||
*/
|
||||
getHostsAvailable() {
|
||||
return setToArray(this._hostsAvailable);
|
||||
}
|
||||
/**
|
||||
* Returns a list of hosts that are currently disabled due to network
|
||||
* errors.
|
||||
* @return {Host[]}
|
||||
*/
|
||||
getHostsDisabled() {
|
||||
return setToArray(this._hostsDisabled);
|
||||
}
|
||||
/**
|
||||
* Inserts a new host to the pool.
|
||||
*/
|
||||
addHost(url, options = {}) {
|
||||
const host = new host_1.Host(url, this._options.backoff.reset(), options);
|
||||
this._hostsAvailable.add(host);
|
||||
return host;
|
||||
}
|
||||
/**
|
||||
* Returns true if there's any host available to by queried.
|
||||
* @return {Boolean}
|
||||
*/
|
||||
hostIsAvailable() {
|
||||
return this._hostsAvailable.size > 0;
|
||||
}
|
||||
/**
|
||||
* Makes a request and calls back with the response, parsed as JSON.
|
||||
* An error is returned on a non-2xx status code or on a parsing exception.
|
||||
*/
|
||||
json(options) {
|
||||
return this.text(options).then((res) => JSON.parse(res));
|
||||
}
|
||||
/**
|
||||
* Makes a request and resolves with the plain text response,
|
||||
* if possible. An error is raised on a non-2xx status code.
|
||||
*/
|
||||
text(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.stream(options, (err, res) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
let output = "";
|
||||
res.on("data", (str) => {
|
||||
output += str.toString();
|
||||
});
|
||||
res.on("end", () => resolve(output));
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Makes a request and discards any response body it receives.
|
||||
* An error is returned on a non-2xx status code.
|
||||
*/
|
||||
discard(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.stream(options, (err, res) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
res.on("data", () => {
|
||||
/* ignore */
|
||||
});
|
||||
res.on("end", () => resolve());
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Ping sends out a request to all available Influx servers, reporting on
|
||||
* their response time and version number.
|
||||
*/
|
||||
ping(timeout, path = "/ping") {
|
||||
const todo = [];
|
||||
setToArray(this._hostsAvailable)
|
||||
.concat(setToArray(this._hostsDisabled))
|
||||
.forEach((host) => {
|
||||
const start = Date.now();
|
||||
const url = host.url;
|
||||
const once = doOnce();
|
||||
return todo.push(new Promise((resolve) => {
|
||||
const req = request(Object.assign({ hostname: url.hostname, method: "GET", path, port: Number(url.port), protocol: url.protocol, timeout }, host.options), once((res) => {
|
||||
resolve({
|
||||
url,
|
||||
res: res.resume(),
|
||||
online: res.statusCode < 300,
|
||||
rtt: Date.now() - start,
|
||||
version: res.headers["x-influxdb-version"],
|
||||
});
|
||||
}));
|
||||
const fail = once(() => {
|
||||
req.abort();
|
||||
resolve({
|
||||
online: false,
|
||||
res: null,
|
||||
rtt: Infinity,
|
||||
url,
|
||||
version: null,
|
||||
});
|
||||
});
|
||||
// Support older Nodes and polyfills which don't allow .timeout() in
|
||||
// the request options, wrapped in a conditional for even worse
|
||||
// polyfills. See: https://github.com/node-influx/node-influx/issues/221
|
||||
if (typeof req.setTimeout === "function") {
|
||||
req.setTimeout(timeout, () => {
|
||||
fail.call(fail, arguments);
|
||||
}); // Tslint:disable-line
|
||||
}
|
||||
req.on("timeout", fail);
|
||||
req.on("error", fail);
|
||||
req.end();
|
||||
}));
|
||||
});
|
||||
return Promise.all(todo);
|
||||
}
|
||||
/**
|
||||
* Makes a request and calls back with the IncomingMessage stream,
|
||||
* if possible. An error is returned on a non-2xx status code.
|
||||
*/
|
||||
stream(options, callback) {
|
||||
if (!this.hostIsAvailable()) {
|
||||
return callback(new ServiceNotAvailableError("No host available"), null);
|
||||
}
|
||||
const once = doOnce();
|
||||
const host = this._getHost();
|
||||
let path = host.url.pathname === "/" ? "" : host.url.pathname;
|
||||
path += options.path;
|
||||
if (options.query) {
|
||||
path += "?" + querystring.stringify(options.query);
|
||||
}
|
||||
const req = request(Object.assign({ headers: {
|
||||
"content-length": options.body ? Buffer.from(options.body).length : 0,
|
||||
}, hostname: host.url.hostname, method: options.method, path, port: Number(host.url.port), protocol: host.url.protocol, timeout: this._timeout }, host.options), once((res) => {
|
||||
res.setEncoding("utf8");
|
||||
if (res.statusCode >= 500) {
|
||||
return this._handleRequestError(new ServiceNotAvailableError(res.statusMessage), host, options, callback);
|
||||
}
|
||||
if (res.statusCode >= 300) {
|
||||
return RequestError.Create(req, res, (err) => callback(err, res));
|
||||
}
|
||||
host.success();
|
||||
return callback(undefined, res);
|
||||
}));
|
||||
// Handle network or HTTP parsing errors:
|
||||
req.on("error", once((err) => {
|
||||
this._handleRequestError(err, host, options, callback);
|
||||
}));
|
||||
// Handle timeouts:
|
||||
req.on("timeout", once(() => {
|
||||
req.abort();
|
||||
this._handleRequestError(new ServiceNotAvailableError("Request timed out"), host, options, callback);
|
||||
}));
|
||||
// Support older Nodes and polyfills which don't allow .timeout() in the
|
||||
// request options, wrapped in a conditional for even worse polyfills. See:
|
||||
// https://github.com/node-influx/node-influx/issues/221
|
||||
if (typeof req.setTimeout === "function") {
|
||||
req.setTimeout(host.options.timeout || this._timeout); // Tslint:disable-line
|
||||
}
|
||||
// Write out the body:
|
||||
if (options.body) {
|
||||
req.write(options.body);
|
||||
}
|
||||
req.end();
|
||||
}
|
||||
/**
|
||||
* Returns the next available host for querying.
|
||||
* @return {Host}
|
||||
*/
|
||||
_getHost() {
|
||||
const available = setToArray(this._hostsAvailable);
|
||||
const host = available[this._index];
|
||||
this._index = (this._index + 1) % available.length;
|
||||
return host;
|
||||
}
|
||||
/**
|
||||
* Re-enables the provided host, returning it to the pool to query.
|
||||
* @param {Host} host
|
||||
*/
|
||||
_enableHost(host) {
|
||||
this._hostsDisabled.delete(host);
|
||||
this._hostsAvailable.add(host);
|
||||
}
|
||||
/**
|
||||
* Disables the provided host, removing it from the query pool. It will be
|
||||
* re-enabled after a backoff interval
|
||||
*/
|
||||
_disableHost(host) {
|
||||
this._hostsAvailable.delete(host);
|
||||
this._hostsDisabled.add(host);
|
||||
this._index %= Math.max(1, this._hostsAvailable.size);
|
||||
setTimeout(() => this._enableHost(host), host.fail());
|
||||
}
|
||||
_handleRequestError(err, host, options, callback) {
|
||||
if (!(err instanceof ServiceNotAvailableError) &&
|
||||
!resubmitErrorCodes.includes(err.code)) {
|
||||
return callback(err, null);
|
||||
}
|
||||
this._disableHost(host);
|
||||
const retries = options.retries || 0;
|
||||
if (retries < this._options.maxRetries && this.hostIsAvailable()) {
|
||||
options.retries = retries + 1;
|
||||
return this.stream(options, callback);
|
||||
}
|
||||
callback(err, null);
|
||||
}
|
||||
}
|
||||
exports.Pool = Pool;
|
118
software/flow/node_modules/influx/lib/src/results.d.ts
generated
vendored
Normal file
118
software/flow/node_modules/influx/lib/src/results.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,118 @@
|
|||
import { TimePrecision } from "./grammar";
|
||||
/**
|
||||
* A ResultError is thrown when a query generates errorful results from Influx.
|
||||
*/
|
||||
export declare class ResultError extends Error {
|
||||
constructor(message: string);
|
||||
}
|
||||
/**
|
||||
* InfluxResults describes the result structure received from InfluxDB.
|
||||
*
|
||||
* NOTE: if you're poking around in Influx, use curl, not the `json` formatter
|
||||
* provided by the CLI. As of 1.0 this formatter changes the result structure
|
||||
* and it will confuse you, as it did me ;)
|
||||
*/
|
||||
export interface IResponse {
|
||||
results: IResultEntry[];
|
||||
}
|
||||
export interface IResultEntry {
|
||||
series?: IResponseSeries[];
|
||||
error?: string;
|
||||
}
|
||||
export declare type Tags = {
|
||||
[name: string]: string;
|
||||
};
|
||||
export declare type Row = any;
|
||||
export interface IResponseSeries {
|
||||
name?: string;
|
||||
columns: string[];
|
||||
tags?: Tags;
|
||||
values?: Row[];
|
||||
}
|
||||
/**
|
||||
* IResultsParser is a user-friendly results tables from raw Influx responses.
|
||||
*/
|
||||
export interface IResults<T> extends Array<T> {
|
||||
/**
|
||||
* Group looks for and returns the first group in the results
|
||||
* that matches the provided tags.
|
||||
*
|
||||
* If you've used lodash or underscore, we do something quite similar to
|
||||
* their object matching: for every row in the results, if it contains tag
|
||||
* values matching the requested object, we return it.
|
||||
*
|
||||
* @param matcher
|
||||
* @return
|
||||
* @example
|
||||
* // Matching tags sets in queries:
|
||||
* influx.query('select * from perf group by host').then(results => {
|
||||
* expect(results.group({ host: 'ares.peet.io'})).to.deep.equal([
|
||||
* { host: 'ares.peet.io', cpu: 0.12, mem: 2435 },
|
||||
* { host: 'ares.peet.io', cpu: 0.10, mem: 2451 },
|
||||
* // ...
|
||||
* ])
|
||||
*
|
||||
* expect(results.group({ host: 'box1.example.com'})).to.deep.equal([
|
||||
* { host: 'box1.example.com', cpu: 0.54, mem: 8420 },
|
||||
* // ...
|
||||
* ])
|
||||
* })
|
||||
*/
|
||||
group: (matcher: Tags) => T[];
|
||||
/**
|
||||
* Returns the data grouped into nested arrays, similarly to how it was
|
||||
* returned from Influx originally.
|
||||
*
|
||||
* @returns
|
||||
* @example
|
||||
* influx.query('select * from perf group by host').then(results => {
|
||||
* expect(results.groups()).to.deep.equal([
|
||||
* {
|
||||
* name: 'perf',
|
||||
* tags: { host: 'ares.peet.io' },
|
||||
* rows: [
|
||||
* { host: 'ares.peet.io', cpu: 0.12, mem: 2435 },
|
||||
* { host: 'ares.peet.io', cpu: 0.10, mem: 2451 },
|
||||
* // ...
|
||||
* ]
|
||||
* }
|
||||
* {
|
||||
* name: 'perf',
|
||||
* tags: { host: 'box1.example.com' },
|
||||
* rows: [
|
||||
* { host: 'box1.example.com', cpu: 0.54, mem: 8420 },
|
||||
* // ...
|
||||
* ]
|
||||
* }
|
||||
* ])
|
||||
* })
|
||||
*/
|
||||
groups: () => Array<{
|
||||
name: string;
|
||||
tags: Tags;
|
||||
rows: T[];
|
||||
}>;
|
||||
}
|
||||
/**
|
||||
* Checks if there are any errors in the IResponse and, if so, it throws them.
|
||||
* @private
|
||||
* @throws {ResultError}
|
||||
*/
|
||||
export declare function assertNoErrors(res: IResponse): IResponse;
|
||||
/**
|
||||
* From parses out a response to a result or list of responses.
|
||||
* There are three situations we cover here:
|
||||
* 1. A single query without groups, like `select * from myseries`
|
||||
* 2. A single query with groups, generated with a `group by` statement
|
||||
* which groups by series *tags*, grouping by times is case (1)
|
||||
* 3. Multiple queries of types 1 and 2
|
||||
* @private
|
||||
*/
|
||||
export declare function parse<T>(res: IResponse, precision?: TimePrecision): Array<IResults<T>> | IResults<T>;
|
||||
/**
|
||||
* ParseSingle asserts that the response contains a single result,
|
||||
* and returns that result.
|
||||
* @throws {Error} if the number of results is not exactly one
|
||||
* @private
|
||||
*/
|
||||
export declare function parseSingle<T>(res: IResponse, precision?: TimePrecision): IResults<T>;
|
133
software/flow/node_modules/influx/lib/src/results.js
generated
vendored
Normal file
133
software/flow/node_modules/influx/lib/src/results.js
generated
vendored
Normal file
|
@ -0,0 +1,133 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseSingle = exports.parse = exports.assertNoErrors = exports.ResultError = void 0;
|
||||
const grammar_1 = require("./grammar");
|
||||
/**
|
||||
* A ResultError is thrown when a query generates errorful results from Influx.
|
||||
*/
|
||||
class ResultError extends Error {
|
||||
constructor(message) {
|
||||
super();
|
||||
this.message = `Error from InfluxDB: ${message}`;
|
||||
}
|
||||
}
|
||||
exports.ResultError = ResultError;
|
||||
function groupMethod(matcher) {
|
||||
// We do a tiny bit of 'custom' deep equality checking here, taking
|
||||
// advantage of the fact that the tag keys are consistent across all
|
||||
// series results. This lets us match groupings much more efficiently,
|
||||
// ~6000x faster than the fastest vanilla equality checker (lodash)
|
||||
// when operating on large (~100,000 grouping) sets.
|
||||
const srcKeys = this.groupsTagsKeys;
|
||||
const dstKeys = Object.keys(matcher);
|
||||
if (srcKeys.length === 0 || srcKeys.length !== dstKeys.length) {
|
||||
return [];
|
||||
}
|
||||
L: for (let row of this.groupRows) {
|
||||
// eslint-disable-line no-labels
|
||||
for (let src of srcKeys) {
|
||||
if (row.tags[src] !== matcher[src]) {
|
||||
continue L; // eslint-disable-line no-labels
|
||||
}
|
||||
}
|
||||
return row.rows;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
function groupsMethod() {
|
||||
return this.groupRows;
|
||||
}
|
||||
/**
|
||||
* Inner parsing function which unpacks the series into a table and attaches
|
||||
* methods to the array. This is quite optimized and a bit of a mess to read,
|
||||
* but it's all fairly easy procedural logic.
|
||||
*
|
||||
* We do this instead of subclassing Array since subclassing has some
|
||||
* undesirable side-effects. For example, calling .slice() on the array
|
||||
* makes it impossible to preserve groups as would be necessary if it's
|
||||
* subclassed.
|
||||
*/
|
||||
function parseInner(series = [], precision) {
|
||||
const results = [];
|
||||
results.groupsTagsKeys =
|
||||
series.length && series[0].tags ? Object.keys(series[0].tags) : [];
|
||||
const tags = results.groupsTagsKeys;
|
||||
let nextGroup = [];
|
||||
results.groupRows = new Array(series.length); // Tslint:disable-line
|
||||
for (let i = 0; i < series.length; i += 1, results.length) {
|
||||
const { columns = [], values = [] } = series[i];
|
||||
for (let value of values) {
|
||||
const obj = {};
|
||||
for (let j = 0; j < columns.length; j += 1) {
|
||||
if (columns[j] === "time") {
|
||||
obj.time = grammar_1.isoOrTimeToDate(value[j], precision);
|
||||
}
|
||||
else {
|
||||
obj[columns[j]] = value[j];
|
||||
}
|
||||
}
|
||||
for (let tag of tags) {
|
||||
obj[tag] = series[i].tags[tag];
|
||||
}
|
||||
results.push(obj);
|
||||
nextGroup.push(obj);
|
||||
}
|
||||
results.groupRows[i] = {
|
||||
name: series[i].name,
|
||||
rows: nextGroup,
|
||||
tags: series[i].tags || {},
|
||||
};
|
||||
nextGroup = [];
|
||||
}
|
||||
results.group = groupMethod;
|
||||
results.groups = groupsMethod;
|
||||
return results;
|
||||
}
|
||||
/**
|
||||
* Checks if there are any errors in the IResponse and, if so, it throws them.
|
||||
* @private
|
||||
* @throws {ResultError}
|
||||
*/
|
||||
function assertNoErrors(res) {
|
||||
for (let result of res.results) {
|
||||
const { error } = result;
|
||||
if (error) {
|
||||
throw new ResultError(error);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
exports.assertNoErrors = assertNoErrors;
|
||||
/**
|
||||
* From parses out a response to a result or list of responses.
|
||||
* There are three situations we cover here:
|
||||
* 1. A single query without groups, like `select * from myseries`
|
||||
* 2. A single query with groups, generated with a `group by` statement
|
||||
* which groups by series *tags*, grouping by times is case (1)
|
||||
* 3. Multiple queries of types 1 and 2
|
||||
* @private
|
||||
*/
|
||||
function parse(res, precision) {
|
||||
assertNoErrors(res);
|
||||
if (res.results.length === 1) {
|
||||
// Normalize case 3
|
||||
return parseInner(res.results[0].series, precision);
|
||||
}
|
||||
return res.results.map((result) => parseInner(result.series, precision));
|
||||
}
|
||||
exports.parse = parse;
|
||||
/**
|
||||
* ParseSingle asserts that the response contains a single result,
|
||||
* and returns that result.
|
||||
* @throws {Error} if the number of results is not exactly one
|
||||
* @private
|
||||
*/
|
||||
function parseSingle(res, precision) {
|
||||
assertNoErrors(res);
|
||||
if (res.results.length !== 1) {
|
||||
throw new Error("node-influx expected the results length to equal 1, but " +
|
||||
`it was ${0}. Please report this here: https://git.io/influx-err`);
|
||||
}
|
||||
return parseInner(res.results[0].series, precision);
|
||||
}
|
||||
exports.parseSingle = parseSingle;
|
58
software/flow/node_modules/influx/lib/src/schema.d.ts
generated
vendored
Normal file
58
software/flow/node_modules/influx/lib/src/schema.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
import { FieldType } from "./grammar";
|
||||
export interface ISchemaOptions {
|
||||
/**
|
||||
* The measurement name this schema is describing.
|
||||
*/
|
||||
measurement: string;
|
||||
/**
|
||||
* The database the measurement lives under. Uses the default database
|
||||
* if one is provided.
|
||||
*/
|
||||
database?: string;
|
||||
/**
|
||||
* Columns is the map of column type definitions on the database.
|
||||
*/
|
||||
fields: {
|
||||
[column: string]: FieldType;
|
||||
};
|
||||
/**
|
||||
* A list of schema tag names.
|
||||
*/
|
||||
tags: string[];
|
||||
}
|
||||
export declare type FieldMap = {
|
||||
[name: string]: string | number | boolean;
|
||||
};
|
||||
/**
|
||||
* The Schema provides information and utilities for an InfluxDB measurement.
|
||||
* @private
|
||||
*/
|
||||
export declare class Schema {
|
||||
private readonly options;
|
||||
private readonly _fieldNames;
|
||||
private _tagHash;
|
||||
constructor(options: ISchemaOptions);
|
||||
/**
|
||||
* CoerceFields converts a map of field values to a strings which
|
||||
* can be injected into the line protocol without further escaping.
|
||||
* The output is given in [key, value] pairs.
|
||||
*/
|
||||
coerceFields(fields: FieldMap): Array<[string, string]>;
|
||||
/**
|
||||
* Throws an error if the tags include values other than
|
||||
* what was specified in the schema. It returns a list of tag names.
|
||||
*/
|
||||
checkTags(tags: {
|
||||
[tag: string]: string;
|
||||
}): string[];
|
||||
/**
|
||||
* Returns the 'db'.'measurement'[.'field'] referencing the current schema.
|
||||
*/
|
||||
private _ref;
|
||||
}
|
||||
/**
|
||||
* Coerces the field map to a set of writable values, a la coerceFields,
|
||||
* using native guesses based on the field datatypes.
|
||||
* @private
|
||||
*/
|
||||
export declare function coerceBadly(fields: FieldMap): Array<[string, string]>;
|
116
software/flow/node_modules/influx/lib/src/schema.js
generated
vendored
Normal file
116
software/flow/node_modules/influx/lib/src/schema.js
generated
vendored
Normal file
|
@ -0,0 +1,116 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.coerceBadly = exports.Schema = void 0;
|
||||
const grammar_1 = require("./grammar");
|
||||
/**
|
||||
* The Schema provides information and utilities for an InfluxDB measurement.
|
||||
* @private
|
||||
*/
|
||||
class Schema {
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
this._tagHash = {};
|
||||
// FieldNames are sorted for performance: when coerceFields is run the
|
||||
// fields will be added to the output in order.
|
||||
this._fieldNames = Object.keys(options.fields).sort();
|
||||
options.tags.forEach((tag) => {
|
||||
this._tagHash[tag] = true;
|
||||
});
|
||||
}
|
||||
/**
|
||||
* CoerceFields converts a map of field values to a strings which
|
||||
* can be injected into the line protocol without further escaping.
|
||||
* The output is given in [key, value] pairs.
|
||||
*/
|
||||
coerceFields(fields) {
|
||||
let consumed = 0;
|
||||
const output = [];
|
||||
this._fieldNames.forEach((field) => {
|
||||
if (!fields.hasOwnProperty(field)) {
|
||||
return;
|
||||
}
|
||||
const value = fields[field];
|
||||
const typ = typeof value;
|
||||
consumed += 1;
|
||||
if (value === null || value === undefined) {
|
||||
return;
|
||||
}
|
||||
let coerced;
|
||||
switch (this.options.fields[field]) {
|
||||
case grammar_1.FieldType.STRING:
|
||||
coerced = grammar_1.escape.quoted(String(value));
|
||||
break;
|
||||
case grammar_1.FieldType.INTEGER:
|
||||
if (typ !== "number" && !grammar_1.isNumeric(String(value))) {
|
||||
throw new Error(`Expected numeric value for ${this._ref(field)}, but got '${value}'!`);
|
||||
}
|
||||
coerced = String(Math.floor(value)) + "i";
|
||||
break;
|
||||
case grammar_1.FieldType.FLOAT:
|
||||
if (typ !== "number" && !grammar_1.isNumeric(String(value))) {
|
||||
throw new Error(`Expected numeric value for ${this._ref(field)}, but got '${value}'!`);
|
||||
}
|
||||
coerced = String(value);
|
||||
break;
|
||||
case grammar_1.FieldType.BOOLEAN:
|
||||
if (typ !== "boolean") {
|
||||
throw new Error(`Expected boolean value for ${this._ref(field)}, but got a ${typ}!`);
|
||||
}
|
||||
coerced = value ? "T" : "F";
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unknown field type ${this.options.fields[field]} for ${field} in ` +
|
||||
`${this._ref()}. Please ensure that your configuration is correct.`);
|
||||
}
|
||||
output.push([field, coerced]);
|
||||
});
|
||||
const keys = Object.keys(fields);
|
||||
if (consumed !== keys.length) {
|
||||
const extraneous = keys.filter((f) => !this._fieldNames.includes(f));
|
||||
throw new Error("Extraneous fields detected for writing InfluxDB point in " +
|
||||
`${this._ref()}: \`${extraneous.join("`, `")}\`.`);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
/**
|
||||
* Throws an error if the tags include values other than
|
||||
* what was specified in the schema. It returns a list of tag names.
|
||||
*/
|
||||
checkTags(tags) {
|
||||
const names = Object.keys(tags);
|
||||
const extraneous = names.filter((tag) => !this._tagHash[tag]);
|
||||
if (extraneous.length > 0) {
|
||||
throw new Error("Extraneous tags detected for writing InfluxDB point in " +
|
||||
`${this._ref()}: \`${extraneous.join("`, `")}\`.`);
|
||||
}
|
||||
return names;
|
||||
}
|
||||
/**
|
||||
* Returns the 'db'.'measurement'[.'field'] referencing the current schema.
|
||||
*/
|
||||
_ref(field) {
|
||||
let out = this.options.database + "." + this.options.measurement;
|
||||
if (field) {
|
||||
out += "." + field;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
exports.Schema = Schema;
|
||||
/**
|
||||
* Coerces the field map to a set of writable values, a la coerceFields,
|
||||
* using native guesses based on the field datatypes.
|
||||
* @private
|
||||
*/
|
||||
function coerceBadly(fields) {
|
||||
return Object.keys(fields)
|
||||
.sort()
|
||||
.map((field) => {
|
||||
const value = fields[field];
|
||||
if (typeof value === "string") {
|
||||
return [field, grammar_1.escape.quoted(value)];
|
||||
}
|
||||
return [field, String(value)];
|
||||
});
|
||||
}
|
||||
exports.coerceBadly = coerceBadly;
|
80
software/flow/node_modules/influx/package.json
generated
vendored
Normal file
80
software/flow/node_modules/influx/package.json
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"name": "influx",
|
||||
"version": "5.6.3",
|
||||
"description": "InfluxDB Client",
|
||||
"main": "./lib/src/index.js",
|
||||
"typings": "./lib/src/index",
|
||||
"scripts": {
|
||||
"build:dist": "npm run clean && tsc && cp -R test/fixture lib/test",
|
||||
"build:doc": "npm run clean && tsc -m es2015 -t es6 --moduleResolution node && esdoc -c esdoc.json",
|
||||
"clean": "rm -rf coverage doc lib",
|
||||
"prepare": "npm run clean && tsc -d",
|
||||
"fmt": "prettier --single-quote --trailing-comma all --print-width 100 --write \"{src,test,examples}/**/*.ts\" && npm run test:lint -- --fix",
|
||||
"test": "npm-run-all --parallel test:lint test:unit test:integrate",
|
||||
"test:browser": "karma start test/karma.conf.js",
|
||||
"test:cover": "npm run build:dist && istanbul cover _mocha -- lib/test/unit/*.test.js && open-cli coverage/lcov-report/index.html",
|
||||
"test:integrate": "mocha --require ts-node/register --timeout 20000 test/integrate/*.test.ts",
|
||||
"test:lint": "prettier -c .",
|
||||
"test:sauce": "SAUCE=1 karma start test/karma.conf.js",
|
||||
"test:travis": "npm-run-all clean test:lint test:sauce test:integrate build:dist && istanbul cover _mocha --report lcovonly -- lib/test/unit/*.test.js",
|
||||
"test:unit": "mocha --require ts-node/register test/unit/*.test.ts",
|
||||
"test:watch": "mocha -R min --watch --require ts-node/register test/unit/*.test.ts",
|
||||
"semantic-release": "semantic-release"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/node-influx/node-influx.git"
|
||||
},
|
||||
"keywords": [
|
||||
"influx",
|
||||
"influxdb",
|
||||
"time",
|
||||
"series",
|
||||
"client",
|
||||
"db"
|
||||
],
|
||||
"contributors": [
|
||||
"Ben Evans <ben@bensbit.co.uk> (http://bensbit.co.uk)",
|
||||
"Connor Peet <connor@peet.io>",
|
||||
"Steffen Konerow <steffen@nrg-media.de> (http://www.nrg-media.de)",
|
||||
"Timm Murray <tmurray@wumpus-cave.net> (http://wumpus-cave.net)"
|
||||
],
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.2.11",
|
||||
"@types/freeport": "1.0.21",
|
||||
"@types/mocha": "^8.0.0",
|
||||
"@types/node": "^14.0.24",
|
||||
"@types/sinon": "^9.0.4",
|
||||
"@types/sinon-chai": "^3.2.4",
|
||||
"awesome-typescript-loader": "5.2.1",
|
||||
"chai": "4.2.0",
|
||||
"coveralls": "^3.1.0",
|
||||
"esdoc": "1.1.0",
|
||||
"esdoc-standard-plugin": "1.0.0",
|
||||
"freeport": "1.0.5",
|
||||
"istanbul": "0.4.5",
|
||||
"json-loader": "0.5.7",
|
||||
"karma": "^5.1.0",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-mocha": "^2.0.1",
|
||||
"karma-mocha-reporter": "2.2.5",
|
||||
"karma-sauce-launcher": "^4.1.4",
|
||||
"karma-sourcemap-loader": "0.3.7",
|
||||
"karma-webpack": "4.0.2",
|
||||
"lodash": "4.17.19",
|
||||
"mocha": "^8.0.1",
|
||||
"node-fetch": "2.6.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
"open-cli": "^6.0.1",
|
||||
"prettier": "^2.0.5",
|
||||
"semantic-release": "^17.1.1",
|
||||
"sinon": "^9.0.2",
|
||||
"sinon-chai": "^3.5.0",
|
||||
"stream-http": "github:node-influx/stream-http",
|
||||
"ts-node": "^8.10.2",
|
||||
"typescript": "^3.9.7",
|
||||
"webpack": "^4.43.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
3
software/flow/node_modules/influx/renovate.json
generated
vendored
Normal file
3
software/flow/node_modules/influx/renovate.json
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": ["config:base", ":preserveSemverRanges"]
|
||||
}
|
12
software/flow/node_modules/install/.travis.yml
generated
vendored
Normal file
12
software/flow/node_modules/install/.travis.yml
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
node_js:
|
||||
- "12"
|
||||
- "11"
|
||||
- "10"
|
||||
- "9"
|
||||
- "8"
|
||||
- "7"
|
||||
- "6"
|
||||
- "5"
|
||||
- "4"
|
22
software/flow/node_modules/install/LICENSE
generated
vendored
Normal file
22
software/flow/node_modules/install/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Benjamin Newman <ben@benjamn.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
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, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
123
software/flow/node_modules/install/README.md
generated
vendored
Normal file
123
software/flow/node_modules/install/README.md
generated
vendored
Normal file
|
@ -0,0 +1,123 @@
|
|||
# install [![Build Status](https://travis-ci.org/benjamn/install.svg?branch=master)](https://travis-ci.org/benjamn/install) [![Greenkeeper badge](https://badges.greenkeeper.io/benjamn/install.svg)](https://greenkeeper.io/)
|
||||
|
||||
The [CommonJS module syntax](http://wiki.commonjs.org/wiki/Modules/1.1) is one of the most widely accepted conventions in the JavaScript ecosystem. Everyone seems to agree that `require` and `exports` are a reasonable way of expressing module dependencies and interfaces, and the tools for managing modular code are getting better all the time.
|
||||
|
||||
Much less of a consensus has developed around the best way to deliver CommonJS modules to a web browser, where the synchronous semantics of `require` pose a non-trivial implementation challenge. This module loader contributes to that confusion, yet also demonstrates that an amply-featured module loader need not stretch into the hundreds or thousands of lines.
|
||||
|
||||
Installation
|
||||
---
|
||||
From NPM:
|
||||
|
||||
npm install install
|
||||
|
||||
From GitHub:
|
||||
|
||||
cd path/to/node_modules
|
||||
git clone git://github.com/benjamn/install.git
|
||||
cd install
|
||||
npm install .
|
||||
|
||||
Usage
|
||||
---
|
||||
|
||||
The first step is to create an `install` function by calling the
|
||||
`makeInstaller` method. Note that all of the options described below are
|
||||
optional:
|
||||
|
||||
```js
|
||||
var install = require("install").makeInstaller({
|
||||
// Optional list of file extensions to be appended to required module
|
||||
// identifiers if they do not exactly match an installed module.
|
||||
extensions: [".js", ".json"],
|
||||
|
||||
// If defined, the options.fallback function will be called when no
|
||||
// installed module is found for a required module identifier. Often
|
||||
// options.fallback will be implemented in terms of the native Node
|
||||
// require function, which has the ability to load binary modules.
|
||||
fallback,
|
||||
|
||||
// Boolean flag indicating whether the installed code will be running in
|
||||
// a web browser.
|
||||
browser,
|
||||
|
||||
// List of fields to look for in package.json files to determine the
|
||||
// main entry module of the package. The first field listed here whose
|
||||
// value is a string will be used to resolve the entry module. Defaults
|
||||
// to just ["main"], or ["browser", "main"] if options.browser is true.
|
||||
mainFields: ["browser", "main"],
|
||||
});
|
||||
```
|
||||
|
||||
The second step is to install some modules by passing a nested tree of
|
||||
objects and functions to the `install` function:
|
||||
|
||||
```js
|
||||
var require = install({
|
||||
"main.js"(require, exports, module) {
|
||||
// On the client, the "assert" module should be install-ed just like
|
||||
// any other module. On the server, since "assert" is a built-in Node
|
||||
// module, it may make sense to let the options.fallback function
|
||||
// handle such requirements. Both ways work equally well.
|
||||
var assert = require("assert");
|
||||
|
||||
assert.strictEqual(
|
||||
// This require function uses the same lookup rules as Node, so it
|
||||
// will find "package" in the "node_modules" directory below.
|
||||
require("package").name,
|
||||
"/node_modules/package/entry.js"
|
||||
);
|
||||
|
||||
exports.name = module.id;
|
||||
},
|
||||
|
||||
node_modules: {
|
||||
package: {
|
||||
// If package.json is not defined, a module called "index.js" will
|
||||
// be used as the main entry point for the package. Otherwise the
|
||||
// exports.main property will identify the entry point.
|
||||
"package.json"(require, exports, module) {
|
||||
exports.name = "package";
|
||||
exports.version = "0.1.0";
|
||||
exports.main = "entry.js";
|
||||
},
|
||||
|
||||
"entry.js"(require, exports, module) {
|
||||
exports.name = module.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Note that the `install` function merely installs modules without
|
||||
evaluating them, so the third and final step is to `require` any entry
|
||||
point modules that you wish to evaluate:
|
||||
|
||||
```js
|
||||
console.log(require("./main").name);
|
||||
// => "/main.js"
|
||||
```
|
||||
|
||||
This is the "root" `require` function returned by the `install`
|
||||
function. If you're using the `install` package in a CommonJS environment
|
||||
like Node, be careful that you don't overwrite the `require` function
|
||||
provided by that system.
|
||||
|
||||
If you need to change the behavior of the `module` object that each module
|
||||
function receives as its third parameter, the shared `Module` constructor
|
||||
is exposed as a property of the `install` function returned by the
|
||||
`makeInstaller` factory:
|
||||
|
||||
```js
|
||||
var install = makeInstaller(options);
|
||||
var proto = install.Module.prototype;
|
||||
|
||||
// Wrap all Module.prototype.require calls with some sort of logging.
|
||||
proto.require = wrapWithLogging(proto.require);
|
||||
|
||||
// Add a new method available to all modules via module.newMethod(...).
|
||||
proto.newMethod = function () {...};
|
||||
```
|
||||
|
||||
Many more examples of how to use the `install` package can be found in the
|
||||
[tests](https://github.com/benjamn/install/blob/master/test/run.js).
|
556
software/flow/node_modules/install/install.js
generated
vendored
Normal file
556
software/flow/node_modules/install/install.js
generated
vendored
Normal file
|
@ -0,0 +1,556 @@
|
|||
makeInstaller = function (options) {
|
||||
"use strict";
|
||||
|
||||
options = options || {};
|
||||
|
||||
// These file extensions will be appended to required module identifiers
|
||||
// if they do not exactly match an installed module.
|
||||
var defaultExtensions = options.extensions || [".js", ".json"];
|
||||
|
||||
// If defined, the options.fallback function will be called when no
|
||||
// installed module is found for a required module identifier. Often
|
||||
// options.fallback will be implemented in terms of the native Node
|
||||
// require function, which has the ability to load binary modules.
|
||||
var fallback = options.fallback;
|
||||
|
||||
// List of fields to look for in package.json files to determine the
|
||||
// main entry module of the package. The first field listed here whose
|
||||
// value is a string will be used to resolve the entry module.
|
||||
var mainFields = options.mainFields ||
|
||||
// If options.mainFields is absent and options.browser is truthy,
|
||||
// package resolution will prefer the "browser" field of package.json
|
||||
// files to the "main" field. Note that this only supports
|
||||
// string-valued "browser" fields for now, though in the future it
|
||||
// might make sense to support the object version, a la browserify.
|
||||
(options.browser ? ["browser", "main"] : ["main"]);
|
||||
|
||||
var hasOwn = {}.hasOwnProperty;
|
||||
function strictHasOwn(obj, key) {
|
||||
return isObject(obj) && isString(key) && hasOwn.call(obj, key);
|
||||
}
|
||||
|
||||
// Cache for looking up File objects given absolute module identifiers.
|
||||
// Invariants:
|
||||
// filesByModuleId[module.id] === fileAppendId(root, module.id)
|
||||
// filesByModuleId[module.id].module === module
|
||||
var filesByModuleId = {};
|
||||
|
||||
// The file object representing the root directory of the installed
|
||||
// module tree.
|
||||
var root = new File("/", new File("/.."));
|
||||
var rootRequire = makeRequire(root);
|
||||
|
||||
// Merges the given tree of directories and module factory functions
|
||||
// into the tree of installed modules and returns a require function
|
||||
// that behaves as if called from a module in the root directory.
|
||||
function install(tree, options) {
|
||||
if (isObject(tree)) {
|
||||
fileMergeContents(root, tree, options);
|
||||
}
|
||||
return rootRequire;
|
||||
}
|
||||
|
||||
// Replace this function to enable Module.prototype.prefetch.
|
||||
install.fetch = function (ids) {
|
||||
throw new Error("fetch not implemented");
|
||||
};
|
||||
|
||||
// This constructor will be used to instantiate the module objects
|
||||
// passed to module factory functions (i.e. the third argument after
|
||||
// require and exports), and is exposed as install.Module in case the
|
||||
// caller of makeInstaller wishes to modify Module.prototype.
|
||||
function Module(id) {
|
||||
this.id = id;
|
||||
|
||||
// The Node implementation of module.children unfortunately includes
|
||||
// only those child modules that were imported for the first time by
|
||||
// this parent module (i.e., child.parent === this).
|
||||
this.children = [];
|
||||
|
||||
// This object is an install.js extension that includes all child
|
||||
// modules imported by this module, even if this module is not the
|
||||
// first to import them.
|
||||
this.childrenById = {};
|
||||
}
|
||||
|
||||
// Used to keep module.prefetch promise resolutions well-ordered.
|
||||
var lastPrefetchPromise;
|
||||
|
||||
// May be shared by multiple sequential calls to module.prefetch.
|
||||
// Initialized to {} only when necessary.
|
||||
var missing;
|
||||
|
||||
Module.prototype.prefetch = function (id) {
|
||||
var module = this;
|
||||
var parentFile = getOwn(filesByModuleId, module.id);
|
||||
|
||||
lastPrefetchPromise = lastPrefetchPromise || Promise.resolve();
|
||||
var previousPromise = lastPrefetchPromise;
|
||||
|
||||
function walk(module) {
|
||||
var file = getOwn(filesByModuleId, module.id);
|
||||
if (fileIsDynamic(file) && ! file.pending) {
|
||||
file.pending = true;
|
||||
missing = missing || {};
|
||||
|
||||
// These are the data that will be exposed to the install.fetch
|
||||
// callback, so it's worth documenting each item with a comment.
|
||||
missing[module.id] = {
|
||||
// The CommonJS module object that will be exposed to this
|
||||
// dynamic module when it is evaluated. Note that install.fetch
|
||||
// could decide to populate module.exports directly, instead of
|
||||
// fetching anything. In that case, install.fetch should omit
|
||||
// this module from the tree that it produces.
|
||||
module: file.module,
|
||||
// List of module identifier strings imported by this module.
|
||||
// Note that the missing object already contains all available
|
||||
// dependencies (including transitive dependencies), so
|
||||
// install.fetch should not need to traverse these dependencies
|
||||
// in most cases; however, they may be useful for other reasons.
|
||||
// Though the strings are unique, note that two different
|
||||
// strings could resolve to the same module.
|
||||
deps: Object.keys(file.deps),
|
||||
// The options (if any) that were passed as the second argument
|
||||
// to the install(tree, options) function when this stub was
|
||||
// first registered. Typically contains options.extensions, but
|
||||
// could contain any information appropriate for the entire tree
|
||||
// as originally installed. These options will be automatically
|
||||
// inherited by the newly fetched modules, so install.fetch
|
||||
// should not need to modify them.
|
||||
options: file.options,
|
||||
// Any stub data included in the array notation from the
|
||||
// original entry for this dynamic module. Typically contains
|
||||
// "main" and/or "browser" fields for package.json files, and is
|
||||
// otherwise undefined.
|
||||
stub: file.stub
|
||||
};
|
||||
|
||||
each(file.deps, function (parentId, id) {
|
||||
fileResolve(file, id);
|
||||
});
|
||||
|
||||
each(module.childrenById, walk);
|
||||
}
|
||||
}
|
||||
|
||||
return lastPrefetchPromise = new Promise(function (resolve) {
|
||||
var absChildId = module.resolve(id);
|
||||
each(module.childrenById, walk);
|
||||
resolve(absChildId);
|
||||
|
||||
}).then(function (absChildId) {
|
||||
// Grab the current missing object and fetch its contents.
|
||||
var toBeFetched = missing;
|
||||
missing = null;
|
||||
|
||||
function clearPending() {
|
||||
if (toBeFetched) {
|
||||
Object.keys(toBeFetched).forEach(function (id) {
|
||||
getOwn(filesByModuleId, id).pending = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
// The install.fetch function takes an object mapping missing
|
||||
// dynamic module identifiers to options objects, and should
|
||||
// return a Promise that resolves to a module tree that can be
|
||||
// installed. As an optimization, if there were no missing dynamic
|
||||
// modules, then we can skip calling install.fetch entirely.
|
||||
resolve(toBeFetched && install.fetch(toBeFetched));
|
||||
|
||||
}).then(function (tree) {
|
||||
function both() {
|
||||
install(tree);
|
||||
clearPending();
|
||||
return absChildId;
|
||||
}
|
||||
|
||||
// Although we want multiple install.fetch calls to run in
|
||||
// parallel, it is important that the promises returned by
|
||||
// module.prefetch are resolved in the same order as the original
|
||||
// calls to module.prefetch, because previous fetches may include
|
||||
// modules assumed to exist by more recent module.prefetch calls.
|
||||
// Whether previousPromise was resolved or rejected, carry on with
|
||||
// the installation regardless.
|
||||
return previousPromise.then(both, both);
|
||||
|
||||
}, function (error) {
|
||||
// Fixes https://github.com/meteor/meteor/issues/10182.
|
||||
clearPending();
|
||||
throw error;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
install.Module = Module;
|
||||
|
||||
function getOwn(obj, key) {
|
||||
return strictHasOwn(obj, key) && obj[key];
|
||||
}
|
||||
|
||||
function isObject(value) {
|
||||
return value !== null && typeof value === "object";
|
||||
}
|
||||
|
||||
function isFunction(value) {
|
||||
return typeof value === "function";
|
||||
}
|
||||
|
||||
function isString(value) {
|
||||
return typeof value === "string";
|
||||
}
|
||||
|
||||
function makeMissingError(id) {
|
||||
return new Error("Cannot find module '" + id + "'");
|
||||
}
|
||||
|
||||
Module.prototype.resolve = function (id) {
|
||||
var file = fileResolve(filesByModuleId[this.id], id);
|
||||
if (file) return file.module.id;
|
||||
var error = makeMissingError(id);
|
||||
if (fallback && isFunction(fallback.resolve)) {
|
||||
return fallback.resolve(id, this.id, error);
|
||||
}
|
||||
throw error;
|
||||
};
|
||||
|
||||
Module.prototype.require = function require(id) {
|
||||
var result = fileResolve(filesByModuleId[this.id], id);
|
||||
if (result) {
|
||||
return fileEvaluate(result, this);
|
||||
}
|
||||
|
||||
var error = makeMissingError(id);
|
||||
|
||||
if (isFunction(fallback)) {
|
||||
return fallback(
|
||||
id, // The missing module identifier.
|
||||
this.id, // ID of the parent module.
|
||||
error // The error we would have thrown.
|
||||
);
|
||||
}
|
||||
|
||||
throw error;
|
||||
};
|
||||
|
||||
function makeRequire(file) {
|
||||
var module = file.module;
|
||||
|
||||
function require(id) {
|
||||
return module.require(id);
|
||||
}
|
||||
|
||||
require.extensions = fileGetExtensions(file).slice(0);
|
||||
|
||||
require.resolve = function resolve(id) {
|
||||
return module.resolve(id);
|
||||
};
|
||||
|
||||
return require;
|
||||
}
|
||||
|
||||
// File objects represent either directories or modules that have been
|
||||
// installed. When a `File` respresents a directory, its `.contents`
|
||||
// property is an object containing the names of the files (or
|
||||
// directories) that it contains. When a `File` represents a module, its
|
||||
// `.contents` property is a function that can be invoked with the
|
||||
// appropriate `(require, exports, module)` arguments to evaluate the
|
||||
// module. If the `.contents` property is a string, that string will be
|
||||
// resolved as a module identifier, and the exports of the resulting
|
||||
// module will provide the exports of the original file. The `.parent`
|
||||
// property of a File is either a directory `File` or `null`. Note that
|
||||
// a child may claim another `File` as its parent even if the parent
|
||||
// does not have an entry for that child in its `.contents` object.
|
||||
// This is important for implementing anonymous files, and preventing
|
||||
// child modules from using `../relative/identifier` syntax to examine
|
||||
// unrelated modules.
|
||||
function File(moduleId, parent) {
|
||||
var file = this;
|
||||
|
||||
// Link to the parent file.
|
||||
file.parent = parent = parent || null;
|
||||
|
||||
// The module object for this File, which will eventually boast an
|
||||
// .exports property when/if the file is evaluated.
|
||||
file.module = new Module(moduleId);
|
||||
filesByModuleId[moduleId] = file;
|
||||
|
||||
// The .contents of the file can be either (1) an object, if the file
|
||||
// represents a directory containing other files; (2) a factory
|
||||
// function, if the file represents a module that can be imported; (3)
|
||||
// a string, if the file is an alias for another file; or (4) null, if
|
||||
// the file's contents are not (yet) available.
|
||||
file.contents = null;
|
||||
|
||||
// Set of module identifiers imported by this module. Note that this
|
||||
// set is not necessarily complete, so don't rely on it unless you
|
||||
// know what you're doing.
|
||||
file.deps = {};
|
||||
}
|
||||
|
||||
function fileEvaluate(file, parentModule) {
|
||||
var module = file.module;
|
||||
if (! strictHasOwn(module, "exports")) {
|
||||
var contents = file.contents;
|
||||
if (! contents) {
|
||||
// If this file was installed with array notation, and the array
|
||||
// contained one or more objects but no functions, then the combined
|
||||
// properties of the objects are treated as a temporary stub for
|
||||
// file.module.exports. This is particularly important for partial
|
||||
// package.json modules, so that the resolution logic can know the
|
||||
// value of the "main" and/or "browser" fields, at least, even if
|
||||
// the rest of the package.json file is not (yet) available.
|
||||
if (file.stub) {
|
||||
return file.stub;
|
||||
}
|
||||
|
||||
throw makeMissingError(module.id);
|
||||
}
|
||||
|
||||
if (parentModule) {
|
||||
module.parent = parentModule;
|
||||
var children = parentModule.children;
|
||||
if (Array.isArray(children)) {
|
||||
children.push(module);
|
||||
}
|
||||
}
|
||||
|
||||
contents(
|
||||
makeRequire(file),
|
||||
// If the file had a .stub, reuse the same object for exports.
|
||||
module.exports = file.stub || {},
|
||||
module,
|
||||
file.module.id,
|
||||
file.parent.module.id
|
||||
);
|
||||
|
||||
module.loaded = true;
|
||||
}
|
||||
|
||||
// The module.runModuleSetters method will be deprecated in favor of
|
||||
// just module.runSetters: https://github.com/benjamn/reify/pull/160
|
||||
var runSetters = module.runSetters || module.runModuleSetters;
|
||||
if (isFunction(runSetters)) {
|
||||
runSetters.call(module);
|
||||
}
|
||||
|
||||
return module.exports;
|
||||
}
|
||||
|
||||
function fileIsDirectory(file) {
|
||||
return file && isObject(file.contents);
|
||||
}
|
||||
|
||||
function fileIsDynamic(file) {
|
||||
return file && file.contents === null;
|
||||
}
|
||||
|
||||
function fileMergeContents(file, contents, options) {
|
||||
if (Array.isArray(contents)) {
|
||||
contents.forEach(function (item) {
|
||||
if (isString(item)) {
|
||||
file.deps[item] = file.module.id;
|
||||
} else if (isFunction(item)) {
|
||||
contents = item;
|
||||
} else if (isObject(item)) {
|
||||
file.stub = file.stub || {};
|
||||
each(item, function (value, key) {
|
||||
file.stub[key] = value;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (! isFunction(contents)) {
|
||||
// If the array did not contain a function, merge nothing.
|
||||
contents = null;
|
||||
}
|
||||
|
||||
} else if (! isFunction(contents) &&
|
||||
! isString(contents) &&
|
||||
! isObject(contents)) {
|
||||
// If contents is neither an array nor a function nor a string nor
|
||||
// an object, just give up and merge nothing.
|
||||
contents = null;
|
||||
}
|
||||
|
||||
if (contents) {
|
||||
file.contents = file.contents || (isObject(contents) ? {} : contents);
|
||||
if (isObject(contents) && fileIsDirectory(file)) {
|
||||
each(contents, function (value, key) {
|
||||
if (key === "..") {
|
||||
child = file.parent;
|
||||
|
||||
} else {
|
||||
var child = getOwn(file.contents, key);
|
||||
|
||||
if (! child) {
|
||||
child = file.contents[key] = new File(
|
||||
file.module.id.replace(/\/*$/, "/") + key,
|
||||
file
|
||||
);
|
||||
|
||||
child.options = options;
|
||||
}
|
||||
}
|
||||
|
||||
fileMergeContents(child, value, options);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function each(obj, callback, context) {
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
callback.call(this, obj[key], key);
|
||||
}, context);
|
||||
}
|
||||
|
||||
function fileGetExtensions(file) {
|
||||
return file.options
|
||||
&& file.options.extensions
|
||||
|| defaultExtensions;
|
||||
}
|
||||
|
||||
function fileAppendIdPart(file, part, extensions) {
|
||||
// Always append relative to a directory.
|
||||
while (file && ! fileIsDirectory(file)) {
|
||||
file = file.parent;
|
||||
}
|
||||
|
||||
if (! file || ! part || part === ".") {
|
||||
return file;
|
||||
}
|
||||
|
||||
if (part === "..") {
|
||||
return file.parent;
|
||||
}
|
||||
|
||||
var exactChild = getOwn(file.contents, part);
|
||||
|
||||
// Only consider multiple file extensions if this part is the last
|
||||
// part of a module identifier and not equal to `.` or `..`, and there
|
||||
// was no exact match or the exact match was a directory.
|
||||
if (extensions && (! exactChild || fileIsDirectory(exactChild))) {
|
||||
for (var e = 0; e < extensions.length; ++e) {
|
||||
var child = getOwn(file.contents, part + extensions[e]);
|
||||
if (child && ! fileIsDirectory(child)) {
|
||||
return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return exactChild;
|
||||
}
|
||||
|
||||
function fileAppendId(file, id, extensions) {
|
||||
var parts = id.split("/");
|
||||
|
||||
// Use `Array.prototype.every` to terminate iteration early if
|
||||
// `fileAppendIdPart` returns a falsy value.
|
||||
parts.every(function (part, i) {
|
||||
return file = i < parts.length - 1
|
||||
? fileAppendIdPart(file, part)
|
||||
: fileAppendIdPart(file, part, extensions);
|
||||
});
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
function recordChild(parentModule, childFile) {
|
||||
var childModule = childFile && childFile.module;
|
||||
if (parentModule && childModule) {
|
||||
parentModule.childrenById[childModule.id] = childModule;
|
||||
}
|
||||
}
|
||||
|
||||
function fileResolve(file, id, parentModule, seenDirFiles) {
|
||||
var parentModule = parentModule || file.module;
|
||||
var extensions = fileGetExtensions(file);
|
||||
|
||||
file =
|
||||
// Absolute module identifiers (i.e. those that begin with a `/`
|
||||
// character) are interpreted relative to the root directory, which
|
||||
// is a slight deviation from Node, which has access to the entire
|
||||
// file system.
|
||||
id.charAt(0) === "/" ? fileAppendId(root, id, extensions) :
|
||||
// Relative module identifiers are interpreted relative to the
|
||||
// current file, naturally.
|
||||
id.charAt(0) === "." ? fileAppendId(file, id, extensions) :
|
||||
// Top-level module identifiers are interpreted as referring to
|
||||
// packages in `node_modules` directories.
|
||||
nodeModulesLookup(file, id, extensions);
|
||||
|
||||
// If the identifier resolves to a directory, we use the same logic as
|
||||
// Node to find an `index.js` or `package.json` file to evaluate.
|
||||
while (fileIsDirectory(file)) {
|
||||
seenDirFiles = seenDirFiles || [];
|
||||
|
||||
// If the "main" field of a `package.json` file resolves to a
|
||||
// directory we've already considered, then we should not attempt to
|
||||
// read the same `package.json` file again. Using an array as a set
|
||||
// is acceptable here because the number of directories to consider
|
||||
// is rarely greater than 1 or 2. Also, using indexOf allows us to
|
||||
// store File objects instead of strings.
|
||||
if (seenDirFiles.indexOf(file) < 0) {
|
||||
seenDirFiles.push(file);
|
||||
|
||||
var pkgJsonFile = fileAppendIdPart(file, "package.json");
|
||||
var pkg = pkgJsonFile && fileEvaluate(pkgJsonFile, parentModule);
|
||||
var mainFile, resolved = pkg && mainFields.some(function (name) {
|
||||
var main = pkg[name];
|
||||
if (isString(main)) {
|
||||
// The "main" field of package.json does not have to begin
|
||||
// with ./ to be considered relative, so first we try
|
||||
// simply appending it to the directory path before
|
||||
// falling back to a full fileResolve, which might return
|
||||
// a package from a node_modules directory.
|
||||
return mainFile = fileAppendId(file, main, extensions) ||
|
||||
fileResolve(file, main, parentModule, seenDirFiles);
|
||||
}
|
||||
});
|
||||
|
||||
if (resolved && mainFile) {
|
||||
file = mainFile;
|
||||
recordChild(parentModule, pkgJsonFile);
|
||||
// The fileAppendId call above may have returned a directory,
|
||||
// so continue the loop to make sure we resolve it to a
|
||||
// non-directory file.
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// If we didn't find a `package.json` file, or it didn't have a
|
||||
// resolvable `.main` property, the only possibility left to
|
||||
// consider is that this directory contains an `index.js` module.
|
||||
// This assignment almost always terminates the while loop, because
|
||||
// there's very little chance `fileIsDirectory(file)` will be true
|
||||
// for `fileAppendIdPart(file, "index", extensions)`. However, in
|
||||
// principle it is remotely possible that a file called `index.js`
|
||||
// could be a directory instead of a file.
|
||||
file = fileAppendIdPart(file, "index", extensions);
|
||||
}
|
||||
|
||||
if (file && isString(file.contents)) {
|
||||
file = fileResolve(file, file.contents, parentModule, seenDirFiles);
|
||||
}
|
||||
|
||||
recordChild(parentModule, file);
|
||||
|
||||
return file;
|
||||
};
|
||||
|
||||
function nodeModulesLookup(file, id, extensions) {
|
||||
for (var resolved; file && ! resolved; file = file.parent) {
|
||||
resolved = fileIsDirectory(file) &&
|
||||
fileAppendId(file, "node_modules/" + id, extensions);
|
||||
}
|
||||
return resolved;
|
||||
}
|
||||
|
||||
return install;
|
||||
};
|
||||
|
||||
if (typeof exports === "object") {
|
||||
exports.makeInstaller = makeInstaller;
|
||||
}
|
1
software/flow/node_modules/install/install.min.js
generated
vendored
Normal file
1
software/flow/node_modules/install/install.min.js
generated
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
makeInstaller=function(n){"use strict";var t=(n=n||{}).extensions||[".js",".json"],e=n.fallback,r=n.mainFields||(n.browser?["browser","main"]:["main"]),o={}.hasOwnProperty;function i(n,t){return p(n)&&m(t)&&o.call(n,t)}var u,s,c={},f=new w("/",new w("/..")),l=b(f);function a(n,t){return p(n)&&function n(t,e,r){Array.isArray(e)?(e.forEach(function(n){m(n)?t.deps[n]=t.module.id:v(n)?e=n:p(n)&&(t.stub=t.stub||{},k(n,function(n,e){t.stub[e]=n}))}),v(e)||(e=null)):v(e)||m(e)||p(e)||(e=null);e&&(t.contents=t.contents||(p(e)?{}:e),p(e)&&j(t)&&k(e,function(e,o){if(".."===o)i=t.parent;else{var i=h(t.contents,o);i||((i=t.contents[o]=new w(t.module.id.replace(/\/*$/,"/")+o,t)).options=r)}n(i,e,r)}))}(f,n,t),l}function d(n){this.id=n,this.children=[],this.childrenById={}}function h(n,t){return i(n,t)&&n[t]}function p(n){return null!==n&&"object"==typeof n}function v(n){return"function"==typeof n}function m(n){return"string"==typeof n}function y(n){return new Error("Cannot find module '"+n+"'")}function b(n){var t=n.module;function e(n){return t.require(n)}return e.extensions=g(n).slice(0),e.resolve=function(n){return t.resolve(n)},e}function w(n,t){this.parent=t=t||null,this.module=new d(n),c[n]=this,this.contents=null,this.deps={}}function x(n,t){var e=n.module;if(!i(e,"exports")){var r=n.contents;if(!r){if(n.stub)return n.stub;throw y(e.id)}if(t){e.parent=t;var o=t.children;Array.isArray(o)&&o.push(e)}r(b(n),e.exports=n.stub||{},e,n.module.id,n.parent.module.id),e.loaded=!0}var u=e.runSetters||e.runModuleSetters;return v(u)&&u.call(e),e.exports}function j(n){return n&&p(n.contents)}function k(n,t,e){Object.keys(n).forEach(function(e){t.call(this,n[e],e)},e)}function g(n){return n.options&&n.options.extensions||t}function I(n,t,e){for(;n&&!j(n);)n=n.parent;if(!n||!t||"."===t)return n;if(".."===t)return n.parent;var r=h(n.contents,t);if(e&&(!r||j(r)))for(var o=0;o<e.length;++o){var i=h(n.contents,t+e[o]);if(i&&!j(i))return i}return r}function A(n,t,e){var r=t.split("/");return r.every(function(t,o){return n=o<r.length-1?I(n,t):I(n,t,e)}),n}function E(n,t){var e=t&&t.module;n&&e&&(n.childrenById[e.id]=e)}function O(n,t,e,o){e=e||n.module;var i=g(n);for(n="/"===t.charAt(0)?A(f,t,i):"."===t.charAt(0)?A(n,t,i):function(n,t,e){for(var r;n&&!r;n=n.parent)r=j(n)&&A(n,"node_modules/"+t,e);return r}(n,t,i);j(n);){if((o=o||[]).indexOf(n)<0){o.push(n);var u,s=I(n,"package.json"),c=s&&x(s,e);if(c&&r.some(function(t){var r=c[t];if(m(r))return u=A(n,r,i)||O(n,r,e,o)})&&u){n=u,E(e,s);continue}}n=I(n,"index",i)}return n&&m(n.contents)&&(n=O(n,n.contents,e,o)),E(e,n),n}return a.fetch=function(n){throw new Error("fetch not implemented")},d.prototype.prefetch=function(n){var t=this,e=(h(c,t.id),u=u||Promise.resolve());function r(n){var t=h(c,n.id);(function(n){return n&&null===n.contents})(t)&&!t.pending&&(t.pending=!0,(s=s||{})[n.id]={module:t.module,deps:Object.keys(t.deps),options:t.options,stub:t.stub},k(t.deps,function(n,e){O(t,e)}),k(n.childrenById,r))}return u=new Promise(function(e){var o=t.resolve(n);k(t.childrenById,r),e(o)}).then(function(n){var t=s;function r(){t&&Object.keys(t).forEach(function(n){h(c,n).pending=!1})}return s=null,new Promise(function(n){n(t&&a.fetch(t))}).then(function(t){function o(){return a(t),r(),n}return e.then(o,o)},function(n){throw r(),n})})},a.Module=d,d.prototype.resolve=function(n){var t=O(c[this.id],n);if(t)return t.module.id;var r=y(n);if(e&&v(e.resolve))return e.resolve(n,this.id,r);throw r},d.prototype.require=function(n){var t=O(c[this.id],n);if(t)return x(t,this);var r=y(n);if(v(e))return e(n,this.id,r);throw r},a},"object"==typeof exports&&(exports.makeInstaller=makeInstaller);
|
41
software/flow/node_modules/install/package.json
generated
vendored
Normal file
41
software/flow/node_modules/install/package.json
generated
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Ben Newman",
|
||||
"email": "bn@cs.stanford.edu"
|
||||
},
|
||||
"name": "install",
|
||||
"version": "0.13.0",
|
||||
"description": "Minimal JavaScript module loader",
|
||||
"keywords": [
|
||||
"modules",
|
||||
"require",
|
||||
"commonjs",
|
||||
"exports",
|
||||
"browser",
|
||||
"packaging",
|
||||
"packager",
|
||||
"install"
|
||||
],
|
||||
"license": "MIT",
|
||||
"homepage": "http://github.com/benjamn/install",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/benjamn/install.git"
|
||||
},
|
||||
"main": "install.js",
|
||||
"scripts": {
|
||||
"prepublish": "scripts/prepublish.sh",
|
||||
"docs": "scripts/docs.sh",
|
||||
"test": "mocha --reporter spec --full-trace test/run.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"docco": "^0.8.0",
|
||||
"mocha": "^5.0.0",
|
||||
"reify": "^0.18.1",
|
||||
"terser": "^3.16.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
}
|
||||
}
|
7
software/flow/node_modules/install/scripts/docs.sh
generated
vendored
Executable file
7
software/flow/node_modules/install/scripts/docs.sh
generated
vendored
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd $(dirname $0)/..
|
||||
docco install.js
|
||||
cd docs
|
||||
mv install.html index.html
|
||||
cd ..
|
5
software/flow/node_modules/install/scripts/prepublish.sh
generated
vendored
Executable file
5
software/flow/node_modules/install/scripts/prepublish.sh
generated
vendored
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
terser install.js -c -m > install.min.js
|
47
software/flow/node_modules/lodash/LICENSE
generated
vendored
Normal file
47
software/flow/node_modules/lodash/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
|
||||
Based on Underscore.js, copyright Jeremy Ashkenas,
|
||||
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/lodash/lodash
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
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, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
Copyright and related rights for sample code are waived via CC0. Sample
|
||||
code is defined as all source code displayed within the prose of the
|
||||
documentation.
|
||||
|
||||
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
====
|
||||
|
||||
Files located in the node_modules and vendor directories are externally
|
||||
maintained libraries used by this software which have their own
|
||||
licenses; we recommend you read them, as their terms may differ from the
|
||||
terms above.
|
39
software/flow/node_modules/lodash/README.md
generated
vendored
Normal file
39
software/flow/node_modules/lodash/README.md
generated
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
# lodash v4.17.21
|
||||
|
||||
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
|
||||
|
||||
## Installation
|
||||
|
||||
Using npm:
|
||||
```shell
|
||||
$ npm i -g npm
|
||||
$ npm i --save lodash
|
||||
```
|
||||
|
||||
In Node.js:
|
||||
```js
|
||||
// Load the full build.
|
||||
var _ = require('lodash');
|
||||
// Load the core build.
|
||||
var _ = require('lodash/core');
|
||||
// Load the FP build for immutable auto-curried iteratee-first data-last methods.
|
||||
var fp = require('lodash/fp');
|
||||
|
||||
// Load method categories.
|
||||
var array = require('lodash/array');
|
||||
var object = require('lodash/fp/object');
|
||||
|
||||
// Cherry-pick methods for smaller browserify/rollup/webpack bundles.
|
||||
var at = require('lodash/at');
|
||||
var curryN = require('lodash/fp/curryN');
|
||||
```
|
||||
|
||||
See the [package source](https://github.com/lodash/lodash/tree/4.17.21-npm) for more details.
|
||||
|
||||
**Note:**<br>
|
||||
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
|
||||
|
||||
## Support
|
||||
|
||||
Tested in Chrome 74-75, Firefox 66-67, IE 11, Edge 18, Safari 11-12, & Node.js 8-12.<br>
|
||||
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.
|
7
software/flow/node_modules/lodash/_DataView.js
generated
vendored
Normal file
7
software/flow/node_modules/lodash/_DataView.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var DataView = getNative(root, 'DataView');
|
||||
|
||||
module.exports = DataView;
|
32
software/flow/node_modules/lodash/_Hash.js
generated
vendored
Normal file
32
software/flow/node_modules/lodash/_Hash.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
var hashClear = require('./_hashClear'),
|
||||
hashDelete = require('./_hashDelete'),
|
||||
hashGet = require('./_hashGet'),
|
||||
hashHas = require('./_hashHas'),
|
||||
hashSet = require('./_hashSet');
|
||||
|
||||
/**
|
||||
* Creates a hash object.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
function Hash(entries) {
|
||||
var index = -1,
|
||||
length = entries == null ? 0 : entries.length;
|
||||
|
||||
this.clear();
|
||||
while (++index < length) {
|
||||
var entry = entries[index];
|
||||
this.set(entry[0], entry[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Add methods to `Hash`.
|
||||
Hash.prototype.clear = hashClear;
|
||||
Hash.prototype['delete'] = hashDelete;
|
||||
Hash.prototype.get = hashGet;
|
||||
Hash.prototype.has = hashHas;
|
||||
Hash.prototype.set = hashSet;
|
||||
|
||||
module.exports = Hash;
|
28
software/flow/node_modules/lodash/_LazyWrapper.js
generated
vendored
Normal file
28
software/flow/node_modules/lodash/_LazyWrapper.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
var baseCreate = require('./_baseCreate'),
|
||||
baseLodash = require('./_baseLodash');
|
||||
|
||||
/** Used as references for the maximum length and index of an array. */
|
||||
var MAX_ARRAY_LENGTH = 4294967295;
|
||||
|
||||
/**
|
||||
* Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {*} value The value to wrap.
|
||||
*/
|
||||
function LazyWrapper(value) {
|
||||
this.__wrapped__ = value;
|
||||
this.__actions__ = [];
|
||||
this.__dir__ = 1;
|
||||
this.__filtered__ = false;
|
||||
this.__iteratees__ = [];
|
||||
this.__takeCount__ = MAX_ARRAY_LENGTH;
|
||||
this.__views__ = [];
|
||||
}
|
||||
|
||||
// Ensure `LazyWrapper` is an instance of `baseLodash`.
|
||||
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||
LazyWrapper.prototype.constructor = LazyWrapper;
|
||||
|
||||
module.exports = LazyWrapper;
|
32
software/flow/node_modules/lodash/_ListCache.js
generated
vendored
Normal file
32
software/flow/node_modules/lodash/_ListCache.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
var listCacheClear = require('./_listCacheClear'),
|
||||
listCacheDelete = require('./_listCacheDelete'),
|
||||
listCacheGet = require('./_listCacheGet'),
|
||||
listCacheHas = require('./_listCacheHas'),
|
||||
listCacheSet = require('./_listCacheSet');
|
||||
|
||||
/**
|
||||
* Creates an list cache object.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
function ListCache(entries) {
|
||||
var index = -1,
|
||||
length = entries == null ? 0 : entries.length;
|
||||
|
||||
this.clear();
|
||||
while (++index < length) {
|
||||
var entry = entries[index];
|
||||
this.set(entry[0], entry[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Add methods to `ListCache`.
|
||||
ListCache.prototype.clear = listCacheClear;
|
||||
ListCache.prototype['delete'] = listCacheDelete;
|
||||
ListCache.prototype.get = listCacheGet;
|
||||
ListCache.prototype.has = listCacheHas;
|
||||
ListCache.prototype.set = listCacheSet;
|
||||
|
||||
module.exports = ListCache;
|
22
software/flow/node_modules/lodash/_LodashWrapper.js
generated
vendored
Normal file
22
software/flow/node_modules/lodash/_LodashWrapper.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
var baseCreate = require('./_baseCreate'),
|
||||
baseLodash = require('./_baseLodash');
|
||||
|
||||
/**
|
||||
* The base constructor for creating `lodash` wrapper objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to wrap.
|
||||
* @param {boolean} [chainAll] Enable explicit method chain sequences.
|
||||
*/
|
||||
function LodashWrapper(value, chainAll) {
|
||||
this.__wrapped__ = value;
|
||||
this.__actions__ = [];
|
||||
this.__chain__ = !!chainAll;
|
||||
this.__index__ = 0;
|
||||
this.__values__ = undefined;
|
||||
}
|
||||
|
||||
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||
LodashWrapper.prototype.constructor = LodashWrapper;
|
||||
|
||||
module.exports = LodashWrapper;
|
7
software/flow/node_modules/lodash/_Map.js
generated
vendored
Normal file
7
software/flow/node_modules/lodash/_Map.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map');
|
||||
|
||||
module.exports = Map;
|
32
software/flow/node_modules/lodash/_MapCache.js
generated
vendored
Normal file
32
software/flow/node_modules/lodash/_MapCache.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
var mapCacheClear = require('./_mapCacheClear'),
|
||||
mapCacheDelete = require('./_mapCacheDelete'),
|
||||
mapCacheGet = require('./_mapCacheGet'),
|
||||
mapCacheHas = require('./_mapCacheHas'),
|
||||
mapCacheSet = require('./_mapCacheSet');
|
||||
|
||||
/**
|
||||
* Creates a map cache object to store key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
function MapCache(entries) {
|
||||
var index = -1,
|
||||
length = entries == null ? 0 : entries.length;
|
||||
|
||||
this.clear();
|
||||
while (++index < length) {
|
||||
var entry = entries[index];
|
||||
this.set(entry[0], entry[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Add methods to `MapCache`.
|
||||
MapCache.prototype.clear = mapCacheClear;
|
||||
MapCache.prototype['delete'] = mapCacheDelete;
|
||||
MapCache.prototype.get = mapCacheGet;
|
||||
MapCache.prototype.has = mapCacheHas;
|
||||
MapCache.prototype.set = mapCacheSet;
|
||||
|
||||
module.exports = MapCache;
|
7
software/flow/node_modules/lodash/_Promise.js
generated
vendored
Normal file
7
software/flow/node_modules/lodash/_Promise.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Promise = getNative(root, 'Promise');
|
||||
|
||||
module.exports = Promise;
|
7
software/flow/node_modules/lodash/_Set.js
generated
vendored
Normal file
7
software/flow/node_modules/lodash/_Set.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Set = getNative(root, 'Set');
|
||||
|
||||
module.exports = Set;
|
27
software/flow/node_modules/lodash/_SetCache.js
generated
vendored
Normal file
27
software/flow/node_modules/lodash/_SetCache.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
var MapCache = require('./_MapCache'),
|
||||
setCacheAdd = require('./_setCacheAdd'),
|
||||
setCacheHas = require('./_setCacheHas');
|
||||
|
||||
/**
|
||||
*
|
||||
* Creates an array cache object to store unique values.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [values] The values to cache.
|
||||
*/
|
||||
function SetCache(values) {
|
||||
var index = -1,
|
||||
length = values == null ? 0 : values.length;
|
||||
|
||||
this.__data__ = new MapCache;
|
||||
while (++index < length) {
|
||||
this.add(values[index]);
|
||||
}
|
||||
}
|
||||
|
||||
// Add methods to `SetCache`.
|
||||
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
||||
SetCache.prototype.has = setCacheHas;
|
||||
|
||||
module.exports = SetCache;
|
27
software/flow/node_modules/lodash/_Stack.js
generated
vendored
Normal file
27
software/flow/node_modules/lodash/_Stack.js
generated
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
var ListCache = require('./_ListCache'),
|
||||
stackClear = require('./_stackClear'),
|
||||
stackDelete = require('./_stackDelete'),
|
||||
stackGet = require('./_stackGet'),
|
||||
stackHas = require('./_stackHas'),
|
||||
stackSet = require('./_stackSet');
|
||||
|
||||
/**
|
||||
* Creates a stack cache object to store key-value pairs.
|
||||
*
|
||||
* @private
|
||||
* @constructor
|
||||
* @param {Array} [entries] The key-value pairs to cache.
|
||||
*/
|
||||
function Stack(entries) {
|
||||
var data = this.__data__ = new ListCache(entries);
|
||||
this.size = data.size;
|
||||
}
|
||||
|
||||
// Add methods to `Stack`.
|
||||
Stack.prototype.clear = stackClear;
|
||||
Stack.prototype['delete'] = stackDelete;
|
||||
Stack.prototype.get = stackGet;
|
||||
Stack.prototype.has = stackHas;
|
||||
Stack.prototype.set = stackSet;
|
||||
|
||||
module.exports = Stack;
|
6
software/flow/node_modules/lodash/_Symbol.js
generated
vendored
Normal file
6
software/flow/node_modules/lodash/_Symbol.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
var root = require('./_root');
|
||||
|
||||
/** Built-in value references. */
|
||||
var Symbol = root.Symbol;
|
||||
|
||||
module.exports = Symbol;
|
6
software/flow/node_modules/lodash/_Uint8Array.js
generated
vendored
Normal file
6
software/flow/node_modules/lodash/_Uint8Array.js
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
var root = require('./_root');
|
||||
|
||||
/** Built-in value references. */
|
||||
var Uint8Array = root.Uint8Array;
|
||||
|
||||
module.exports = Uint8Array;
|
7
software/flow/node_modules/lodash/_WeakMap.js
generated
vendored
Normal file
7
software/flow/node_modules/lodash/_WeakMap.js
generated
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var WeakMap = getNative(root, 'WeakMap');
|
||||
|
||||
module.exports = WeakMap;
|
21
software/flow/node_modules/lodash/_apply.js
generated
vendored
Normal file
21
software/flow/node_modules/lodash/_apply.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* A faster alternative to `Function#apply`, this function invokes `func`
|
||||
* with the `this` binding of `thisArg` and the arguments of `args`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to invoke.
|
||||
* @param {*} thisArg The `this` binding of `func`.
|
||||
* @param {Array} args The arguments to invoke `func` with.
|
||||
* @returns {*} Returns the result of `func`.
|
||||
*/
|
||||
function apply(func, thisArg, args) {
|
||||
switch (args.length) {
|
||||
case 0: return func.call(thisArg);
|
||||
case 1: return func.call(thisArg, args[0]);
|
||||
case 2: return func.call(thisArg, args[0], args[1]);
|
||||
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
||||
}
|
||||
return func.apply(thisArg, args);
|
||||
}
|
||||
|
||||
module.exports = apply;
|
22
software/flow/node_modules/lodash/_arrayAggregator.js
generated
vendored
Normal file
22
software/flow/node_modules/lodash/_arrayAggregator.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* A specialized version of `baseAggregator` for arrays.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} setter The function to set `accumulator` values.
|
||||
* @param {Function} iteratee The iteratee to transform keys.
|
||||
* @param {Object} accumulator The initial aggregated object.
|
||||
* @returns {Function} Returns `accumulator`.
|
||||
*/
|
||||
function arrayAggregator(array, setter, iteratee, accumulator) {
|
||||
var index = -1,
|
||||
length = array == null ? 0 : array.length;
|
||||
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
setter(accumulator, value, iteratee(value), array);
|
||||
}
|
||||
return accumulator;
|
||||
}
|
||||
|
||||
module.exports = arrayAggregator;
|
22
software/flow/node_modules/lodash/_arrayEach.js
generated
vendored
Normal file
22
software/flow/node_modules/lodash/_arrayEach.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* A specialized version of `_.forEach` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function arrayEach(array, iteratee) {
|
||||
var index = -1,
|
||||
length = array == null ? 0 : array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (iteratee(array[index], index, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
module.exports = arrayEach;
|
21
software/flow/node_modules/lodash/_arrayEachRight.js
generated
vendored
Normal file
21
software/flow/node_modules/lodash/_arrayEachRight.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* A specialized version of `_.forEachRight` for arrays without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array] The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function arrayEachRight(array, iteratee) {
|
||||
var length = array == null ? 0 : array.length;
|
||||
|
||||
while (length--) {
|
||||
if (iteratee(array[length], length, array) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
module.exports = arrayEachRight;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue