@flowfuse/nr-file-nodes 0.0.6-66b148e-202406101509.0 → 0.0.6-aad89a0-202406101201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +3 -6
  2. package/vfs.js +2 -4
  3. package/utils.js +0 -21
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@flowfuse/nr-file-nodes",
3
- "version": "0.0.6-66b148e-202406101509.0",
3
+ "version": "0.0.6-aad89a0-202406101201.0",
4
4
  "description": "Node-RED file nodes packaged for FlowFuse",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "npm run test:files && npm run test:memory && npm run test:utils",
7
+ "test": "npm run test:files && npm run test:memory",
8
8
  "test:memory": "mocha 'test/memory_spec.js' --timeout 5000",
9
9
  "test:files": "mocha 'test/file_spec.js' --timeout 5000",
10
- "test:utils": "mocha 'test/utils_spec.js' --timeout 5000",
11
10
  "lint": "eslint -c .eslintrc *.js test/*.js",
12
11
  "lint:fix": "eslint -c .eslintrc *.js test/*.js --fix"
13
12
  },
@@ -35,9 +34,7 @@
35
34
  "homepage": "https://github.com/FlowFuse/nr-file-nodes#readme",
36
35
  "dependencies": {
37
36
  "got": "11.8.5",
38
- "iconv-lite": "0.6.3",
39
- "http-proxy-agent": "^7.0.2",
40
- "https-proxy-agent": "^7.0.4"
37
+ "iconv-lite": "0.6.3"
41
38
  },
42
39
  "engines": {
43
40
  "node": ">=16.x"
package/vfs.js CHANGED
@@ -15,8 +15,7 @@
15
15
  **/
16
16
 
17
17
  const Stream = require('stream')
18
- const utils = require('./utils')
19
- const got = require('got').default
18
+ const got = require('got')
20
19
 
21
20
  module.exports = function (RED, _teamID, _projectID, _token) {
22
21
  'use strict'
@@ -37,8 +36,7 @@ module.exports = function (RED, _teamID, _projectID, _token) {
37
36
  },
38
37
  retry: {
39
38
  limit: 0
40
- },
41
- agent: utils.getHTTPProxyAgent({ timeout: 3000 })
39
+ }
42
40
  })
43
41
 
44
42
  const normaliseError = (err, filename) => {
package/utils.js DELETED
@@ -1,21 +0,0 @@
1
- module.exports = {
2
- getHTTPProxyAgent
3
- }
4
-
5
- /**
6
- * Get proxy agents for HTTP and/or HTTPS connections
7
- * @param {import('http').AgentOptions} proxyOptions - proxy options
8
- * @returns {{http: import('http-proxy-agent').HttpProxyAgent | undefined, https: import('https-proxy-agent').HttpsProxyAgent | undefined}}
9
- */
10
- function getHTTPProxyAgent (proxyOptions) {
11
- const agent = {}
12
- if (process.env.http_proxy) {
13
- const HttpAgent = require('http-proxy-agent').HttpProxyAgent
14
- agent.http = new HttpAgent(process.env.http_proxy, proxyOptions)
15
- }
16
- if (process.env.https_proxy) {
17
- const HttpsAgent = require('https-proxy-agent').HttpsProxyAgent
18
- agent.https = new HttpsAgent(process.env.https_proxy, proxyOptions)
19
- }
20
- return agent
21
- }