step-node-agent 3.28.4 → 3.29.1

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 (104) hide show
  1. package/AgentConf.yaml +3 -1
  2. package/api/filemanager/filemanager.js +24 -1
  3. package/middleware/jwtAuth.js +37 -0
  4. package/node_modules/body-parser/HISTORY.md +8 -0
  5. package/node_modules/body-parser/lib/types/urlencoded.js +2 -9
  6. package/node_modules/body-parser/package.json +9 -10
  7. package/node_modules/cookie/index.js +2 -1
  8. package/node_modules/cookie/package.json +1 -1
  9. package/node_modules/cookie-signature/History.md +5 -1
  10. package/node_modules/cookie-signature/index.js +6 -6
  11. package/node_modules/cookie-signature/package.json +2 -2
  12. package/node_modules/express/History.md +11 -0
  13. package/node_modules/express/package.json +17 -17
  14. package/node_modules/finalhandler/HISTORY.md +6 -0
  15. package/node_modules/finalhandler/package.json +3 -3
  16. package/node_modules/http-errors/HISTORY.md +6 -0
  17. package/node_modules/http-errors/index.js +4 -3
  18. package/node_modules/http-errors/package.json +12 -8
  19. package/node_modules/qs/.eslintrc +1 -0
  20. package/node_modules/qs/CHANGELOG.md +22 -0
  21. package/node_modules/qs/README.md +25 -1
  22. package/node_modules/qs/dist/qs.js +95 -44
  23. package/node_modules/qs/lib/parse.js +44 -12
  24. package/node_modules/qs/lib/stringify.js +11 -6
  25. package/node_modules/qs/lib/utils.js +7 -4
  26. package/node_modules/qs/package.json +9 -7
  27. package/node_modules/qs/test/parse.js +133 -27
  28. package/node_modules/qs/test/stringify.js +19 -11
  29. package/node_modules/qs/test/utils.js +126 -0
  30. package/node_modules/raw-body/package.json +5 -7
  31. package/node_modules/resolve/.eslintrc +1 -1
  32. package/node_modules/resolve/.github/INCIDENT_RESPONSE_PROCESS.md +119 -0
  33. package/node_modules/resolve/.github/THREAT_MODEL.md +74 -0
  34. package/node_modules/resolve/SECURITY.md +9 -1
  35. package/node_modules/resolve/lib/async.js +8 -4
  36. package/node_modules/resolve/lib/core.json +1 -1
  37. package/node_modules/resolve/lib/node-modules-paths.js +5 -2
  38. package/node_modules/resolve/lib/sync.js +7 -3
  39. package/node_modules/resolve/package.json +5 -5
  40. package/node_modules/send/HISTORY.md +12 -7
  41. package/node_modules/send/node_modules/http-errors/HISTORY.md +180 -0
  42. package/node_modules/send/node_modules/http-errors/LICENSE +23 -0
  43. package/node_modules/send/node_modules/http-errors/README.md +169 -0
  44. package/node_modules/send/node_modules/http-errors/index.js +289 -0
  45. package/node_modules/send/node_modules/http-errors/package.json +50 -0
  46. package/node_modules/send/node_modules/statuses/HISTORY.md +82 -0
  47. package/node_modules/send/node_modules/statuses/LICENSE +23 -0
  48. package/node_modules/send/node_modules/statuses/README.md +136 -0
  49. package/node_modules/send/node_modules/statuses/codes.json +65 -0
  50. package/node_modules/send/node_modules/statuses/index.js +146 -0
  51. package/node_modules/send/node_modules/statuses/package.json +49 -0
  52. package/node_modules/send/package.json +2 -2
  53. package/node_modules/serve-static/node_modules/http-errors/HISTORY.md +180 -0
  54. package/node_modules/serve-static/node_modules/http-errors/LICENSE +23 -0
  55. package/node_modules/serve-static/node_modules/http-errors/README.md +169 -0
  56. package/node_modules/serve-static/node_modules/http-errors/index.js +289 -0
  57. package/node_modules/serve-static/node_modules/http-errors/package.json +50 -0
  58. package/node_modules/serve-static/node_modules/ms/index.js +162 -0
  59. package/node_modules/serve-static/node_modules/ms/license.md +21 -0
  60. package/node_modules/serve-static/node_modules/ms/package.json +38 -0
  61. package/node_modules/serve-static/node_modules/ms/readme.md +59 -0
  62. package/node_modules/serve-static/node_modules/send/HISTORY.md +526 -0
  63. package/node_modules/serve-static/node_modules/send/LICENSE +23 -0
  64. package/node_modules/serve-static/node_modules/send/README.md +327 -0
  65. package/node_modules/{raw-body → serve-static/node_modules/send}/SECURITY.md +4 -4
  66. package/node_modules/serve-static/node_modules/send/index.js +1142 -0
  67. package/node_modules/serve-static/node_modules/send/package.json +62 -0
  68. package/node_modules/serve-static/node_modules/statuses/HISTORY.md +82 -0
  69. package/node_modules/serve-static/node_modules/statuses/LICENSE +23 -0
  70. package/node_modules/serve-static/node_modules/statuses/README.md +136 -0
  71. package/node_modules/serve-static/node_modules/statuses/codes.json +65 -0
  72. package/node_modules/serve-static/node_modules/statuses/index.js +146 -0
  73. package/node_modules/serve-static/node_modules/statuses/package.json +49 -0
  74. package/node_modules/statuses/HISTORY.md +5 -0
  75. package/node_modules/statuses/README.md +3 -0
  76. package/node_modules/statuses/package.json +7 -7
  77. package/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
  78. package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -1
  79. package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +2 -2
  80. package/node_modules/yaml/browser/dist/errors.js +1 -1
  81. package/node_modules/yaml/browser/dist/nodes/Alias.js +1 -1
  82. package/node_modules/yaml/browser/dist/parse/parser.js +2 -2
  83. package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +1 -1
  84. package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
  85. package/node_modules/yaml/dist/compose/compose-collection.js +1 -1
  86. package/node_modules/yaml/dist/compose/resolve-block-seq.js +1 -1
  87. package/node_modules/yaml/dist/compose/resolve-flow-collection.js +2 -2
  88. package/node_modules/yaml/dist/errors.js +1 -1
  89. package/node_modules/yaml/dist/nodes/Alias.js +1 -1
  90. package/node_modules/yaml/dist/parse/parser.js +2 -2
  91. package/node_modules/yaml/dist/stringify/stringifyNumber.js +1 -1
  92. package/node_modules/yaml/dist/stringify/stringifyPair.js +1 -1
  93. package/node_modules/yaml/package.json +4 -4
  94. package/package.json +2 -1
  95. package/server.js +27 -8
  96. package/utils/jwtUtils.js +21 -0
  97. package/node_modules/body-parser/SECURITY.md +0 -25
  98. package/node_modules/cookie-signature/.npmignore +0 -4
  99. package/node_modules/raw-body/HISTORY.md +0 -308
  100. /package/node_modules/{send → serve-static/node_modules/send}/node_modules/encodeurl/HISTORY.md +0 -0
  101. /package/node_modules/{send → serve-static/node_modules/send}/node_modules/encodeurl/LICENSE +0 -0
  102. /package/node_modules/{send → serve-static/node_modules/send}/node_modules/encodeurl/README.md +0 -0
  103. /package/node_modules/{send → serve-static/node_modules/send}/node_modules/encodeurl/index.js +0 -0
  104. /package/node_modules/{send → serve-static/node_modules/send}/node_modules/encodeurl/package.json +0 -0
@@ -226,7 +226,7 @@ class Parser {
226
226
  }
227
227
  *step() {
228
228
  const top = this.peek(1);
229
- if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) {
229
+ if (this.type === 'doc-end' && top?.type !== 'doc-end') {
230
230
  while (this.stack.length > 0)
231
231
  yield* this.pop();
232
232
  this.stack.push({
@@ -758,7 +758,7 @@ class Parser {
758
758
  do {
759
759
  yield* this.pop();
760
760
  top = this.peek(1);
761
- } while (top && top.type === 'flow-collection');
761
+ } while (top?.type === 'flow-collection');
762
762
  }
763
763
  else if (fc.end.length === 0) {
764
764
  switch (this.type) {
@@ -4,7 +4,7 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
4
4
  const num = typeof value === 'number' ? value : Number(value);
5
5
  if (!isFinite(num))
6
6
  return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';
7
- let n = JSON.stringify(value);
7
+ let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);
8
8
  if (!format &&
9
9
  minFractionDigits &&
10
10
  (!tag || tag === 'tag:yaml.org,2002:float') &&
@@ -101,7 +101,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
101
101
  ws += `\n${indentComment(cs, ctx.indent)}`;
102
102
  }
103
103
  if (valueStr === '' && !ctx.inFlow) {
104
- if (ws === '\n')
104
+ if (ws === '\n' && valueComment)
105
105
  ws = '\n\n';
106
106
  }
107
107
  else {
@@ -61,7 +61,7 @@ function composeCollection(CN, ctx, token, props, onError) {
61
61
  let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);
62
62
  if (!tag) {
63
63
  const kt = ctx.schema.knownTags[tagName];
64
- if (kt && kt.collection === expType) {
64
+ if (kt?.collection === expType) {
65
65
  ctx.schema.tags.push(Object.assign({}, kt, { default: false }));
66
66
  tag = kt;
67
67
  }
@@ -24,7 +24,7 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, ta
24
24
  });
25
25
  if (!props.found) {
26
26
  if (props.anchor || props.tag || value) {
27
- if (value && value.type === 'block-seq')
27
+ if (value?.type === 'block-seq')
28
28
  onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');
29
29
  else
30
30
  onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');
@@ -135,7 +135,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
135
135
  }
136
136
  }
137
137
  else if (value) {
138
- if ('source' in value && value.source && value.source[0] === ':')
138
+ if ('source' in value && value.source?.[0] === ':')
139
139
  onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);
140
140
  else
141
141
  onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);
@@ -179,7 +179,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr
179
179
  const expectedEnd = isMap ? '}' : ']';
180
180
  const [ce, ...ee] = fc.end;
181
181
  let cePos = offset;
182
- if (ce && ce.source === expectedEnd)
182
+ if (ce?.source === expectedEnd)
183
183
  cePos = ce.offset + ce.source.length;
184
184
  else {
185
185
  const name = fcName[0].toUpperCase() + fcName.substring(1);
@@ -48,7 +48,7 @@ const prettifyError = (src, lc) => (error) => {
48
48
  if (/[^ ]/.test(lineStr)) {
49
49
  let count = 1;
50
50
  const end = error.linePos[1];
51
- if (end && end.line === line && end.col > col) {
51
+ if (end?.line === line && end.col > col) {
52
52
  count = Math.max(1, Math.min(end.col - col, 80 - ci));
53
53
  }
54
54
  const pointer = ' '.repeat(ci) + '^'.repeat(count);
@@ -61,7 +61,7 @@ class Alias extends Node.NodeBase {
61
61
  data = anchors.get(source);
62
62
  }
63
63
  /* istanbul ignore if */
64
- if (!data || data.res === undefined) {
64
+ if (data?.res === undefined) {
65
65
  const msg = 'This should not happen: Alias anchor was not resolved?';
66
66
  throw new ReferenceError(msg);
67
67
  }
@@ -231,7 +231,7 @@ class Parser {
231
231
  }
232
232
  *step() {
233
233
  const top = this.peek(1);
234
- if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) {
234
+ if (this.type === 'doc-end' && top?.type !== 'doc-end') {
235
235
  while (this.stack.length > 0)
236
236
  yield* this.pop();
237
237
  this.stack.push({
@@ -763,7 +763,7 @@ class Parser {
763
763
  do {
764
764
  yield* this.pop();
765
765
  top = this.peek(1);
766
- } while (top && top.type === 'flow-collection');
766
+ } while (top?.type === 'flow-collection');
767
767
  }
768
768
  else if (fc.end.length === 0) {
769
769
  switch (this.type) {
@@ -6,7 +6,7 @@ function stringifyNumber({ format, minFractionDigits, tag, value }) {
6
6
  const num = typeof value === 'number' ? value : Number(value);
7
7
  if (!isFinite(num))
8
8
  return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';
9
- let n = JSON.stringify(value);
9
+ let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);
10
10
  if (!format &&
11
11
  minFractionDigits &&
12
12
  (!tag || tag === 'tag:yaml.org,2002:float') &&
@@ -103,7 +103,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
103
103
  ws += `\n${stringifyComment.indentComment(cs, ctx.indent)}`;
104
104
  }
105
105
  if (valueStr === '' && !ctx.inFlow) {
106
- if (ws === '\n')
106
+ if (ws === '\n' && valueComment)
107
107
  ws = '\n\n';
108
108
  }
109
109
  else {
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "yaml",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "license": "ISC",
5
5
  "author": "Eemeli Aro <eemeli@gmail.com>",
6
+ "funding": "https://github.com/sponsors/eemeli",
6
7
  "repository": "github:eemeli/yaml",
7
8
  "description": "JavaScript parser and stringifier for YAML",
8
9
  "keywords": [
@@ -73,14 +74,13 @@
73
74
  "@babel/preset-env": "^7.12.11",
74
75
  "@eslint/js": "^9.9.1",
75
76
  "@rollup/plugin-babel": "^6.0.3",
76
- "@rollup/plugin-replace": "^5.0.2",
77
+ "@rollup/plugin-replace": "^6.0.3",
77
78
  "@rollup/plugin-typescript": "^12.1.1",
78
79
  "@types/jest": "^29.2.4",
79
80
  "@types/node": "^20.11.20",
80
81
  "babel-jest": "^29.0.1",
81
- "cross-env": "^7.0.3",
82
82
  "eslint": "^9.9.1",
83
- "eslint-config-prettier": "^9.0.0",
83
+ "eslint-config-prettier": "^10.1.8",
84
84
  "fast-check": "^2.12.0",
85
85
  "jest": "^29.0.1",
86
86
  "jest-resolve": "^29.7.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "step-node-agent",
3
- "version": "3.28.4",
3
+ "version": "3.29.1",
4
4
  "description": "The official STEP Agent implementation for Node.js",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,6 +32,7 @@
32
32
  "express": "^4.17.1",
33
33
  "get-fqdn": "^1.0.0",
34
34
  "http": "0.0.0",
35
+ "jsonwebtoken": "^9.0.2",
35
36
  "minimist": "^1.2.5",
36
37
  "npm": "^6.14.15",
37
38
  "request": "^2.88.0",
package/server.js CHANGED
@@ -4,7 +4,7 @@ const YAML = require('yaml')
4
4
 
5
5
  let args = minimist(process.argv.slice(2), {
6
6
  default: {
7
- f: path.join(__dirname, 'AgentConf.json')
7
+ f: path.join(__dirname, 'AgentConf.yaml')
8
8
  }
9
9
  })
10
10
  console.log('[Agent] Using arguments ' + JSON.stringify(args))
@@ -26,9 +26,10 @@ if(agentConfFileExt === '.yaml') {
26
26
  console.log('[Agent] Creating agent context and tokens')
27
27
  const uuid = require('uuid/v4')
28
28
  const _ = require('underscore')
29
+ const jwtUtils = require('./utils/jwtUtils')
29
30
  const agentType = 'node'
30
31
  const agent = {id: uuid()}
31
- let agentContext = { tokens: [], tokenSessions: [], tokenProperties: [], properties: agentConf.properties, controllerUrl: agentConf.gridHost }
32
+ let agentContext = { tokens: [], tokenSessions: [], tokenProperties: [], properties: agentConf.properties, controllerUrl: agentConf.gridHost, gridSecurity: agentConf.gridSecurity }
32
33
  _.each(agentConf.tokenGroups, function (tokenGroup) {
33
34
  const tokenConf = tokenGroup.tokenConf
34
35
  let attributes = tokenConf.attributes
@@ -60,6 +61,11 @@ const bodyParser = require('body-parser')
60
61
  app.use(bodyParser.urlencoded({extended: true}))
61
62
  app.use(bodyParser.json())
62
63
 
64
+ // Apply JWT authentication middleware
65
+ const createJwtAuthMiddleware = require('./middleware/jwtAuth')
66
+ const jwtAuthMiddleware = createJwtAuthMiddleware(agentConf.gridSecurity)
67
+ app.use(jwtAuthMiddleware)
68
+
63
69
  const routes = require('./api/routes/routes')
64
70
  routes(app, agentContext)
65
71
 
@@ -72,19 +78,32 @@ startWithAgentUrl = function(agentUrl) {
72
78
  const registrationPeriod = agentConf.registrationPeriod || 5000
73
79
  const request = require('request')
74
80
  setInterval(function () {
75
- request({
81
+ const requestOptions = {
76
82
  uri: agentConf.gridHost + '/grid/register',
77
83
  method: 'POST',
78
84
  json: true,
79
85
  body: { agentRef: { agentId: agent.id, agentUrl: agentUrl, agentType: agentType }, tokens: agentContext.tokens }
80
- }, function (err, res, body) {
86
+ };
87
+
88
+ // Add bearer token if gridSecurity is configured
89
+ const token = jwtUtils.generateJwtToken(agentConf.gridSecurity, 3600); // 1 hour expiration
90
+ if (token) {
91
+ requestOptions.headers = {
92
+ 'Authorization': 'Bearer ' + token
93
+ };
94
+ }
95
+
96
+ request(requestOptions, function (err, res, body) {
81
97
  if (err) {
98
+ console.log("[Agent] Error while registering agent to grid")
82
99
  console.log(err)
100
+ } else if (res.statusCode !== 204) {
101
+ console.log("[Agent] Failed to register agent: grid responded with status " + res.statusCode + (body != null ? ". Response body: " + JSON.stringify(body) : ""))
83
102
  }
84
103
  })
85
104
  }, registrationPeriod)
86
-
87
- console.log('[Agent] Successfully started on: ' + port)
105
+
106
+ console.log('[Agent] Successfully started on: ' + port)
88
107
  }
89
108
 
90
109
  if(agentConf.agentUrl) {
@@ -92,8 +111,8 @@ if(agentConf.agentUrl) {
92
111
  } else {
93
112
  const getFQDN = require('get-fqdn');
94
113
  getFQDN().then(FQDN => {
95
- startWithAgentUrl('http://' + FQDN + ':' + port)
114
+ startWithAgentUrl('http://' + FQDN + ':' + port)
96
115
  }).catch(e => {
97
116
  console.log('[Agent] Error while getting FQDN ' + e)
98
117
  })
99
- }
118
+ }
@@ -0,0 +1,21 @@
1
+ const jwt = require('jsonwebtoken')
2
+
3
+ module.exports = {
4
+ generateJwtToken: function(gridSecurity, expirationSeconds) {
5
+ if (!gridSecurity || !gridSecurity.jwtSecretKey) {
6
+ return null;
7
+ }
8
+
9
+ const now = Math.floor(Date.now() / 1000);
10
+ const expiration = now + expirationSeconds;
11
+
12
+ return jwt.sign(
13
+ {
14
+ iat: now,
15
+ exp: expiration
16
+ },
17
+ gridSecurity.jwtSecretKey,
18
+ { algorithm: 'HS256' }
19
+ );
20
+ }
21
+ }
@@ -1,25 +0,0 @@
1
- # Security Policies and Procedures
2
-
3
- ## Reporting a Bug
4
-
5
- The Express team and community take all security bugs seriously. Thank you
6
- for improving the security of Express. We appreciate your efforts and
7
- responsible disclosure and will make every effort to acknowledge your
8
- contributions.
9
-
10
- Report security bugs by emailing the current owner(s) of `body-parser`. This
11
- information can be found in the npm registry using the command
12
- `npm owner ls body-parser`.
13
- If unsure or unable to get the information from the above, open an issue
14
- in the [project issue tracker](https://github.com/expressjs/body-parser/issues)
15
- asking for the current contact information.
16
-
17
- To ensure the timely response to your report, please ensure that the entirety
18
- of the report is contained within the email body and not solely behind a web
19
- link or an attachment.
20
-
21
- At least one owner will acknowledge your email within 48 hours, and will send a
22
- more detailed response within 48 hours indicating the next steps in handling
23
- your report. After the initial reply to your report, the owners will
24
- endeavor to keep you informed of the progress towards a fix and full
25
- announcement, and may ask for additional information or guidance.
@@ -1,4 +0,0 @@
1
- support
2
- test
3
- examples
4
- *.sock
@@ -1,308 +0,0 @@
1
- 2.5.2 / 2023-02-21
2
- ==================
3
-
4
- * Fix error message for non-stream argument
5
-
6
- 2.5.1 / 2022-02-28
7
- ==================
8
-
9
- * Fix error on early async hooks implementations
10
-
11
- 2.5.0 / 2022-02-21
12
- ==================
13
-
14
- * Prevent loss of async hooks context
15
- * Prevent hanging when stream is not readable
16
- * deps: http-errors@2.0.0
17
- - deps: depd@2.0.0
18
- - deps: statuses@2.0.1
19
-
20
- 2.4.3 / 2022-02-14
21
- ==================
22
-
23
- * deps: bytes@3.1.2
24
-
25
- 2.4.2 / 2021-11-16
26
- ==================
27
-
28
- * deps: bytes@3.1.1
29
- * deps: http-errors@1.8.1
30
- - deps: setprototypeof@1.2.0
31
- - deps: toidentifier@1.0.1
32
-
33
- 2.4.1 / 2019-06-25
34
- ==================
35
-
36
- * deps: http-errors@1.7.3
37
- - deps: inherits@2.0.4
38
-
39
- 2.4.0 / 2019-04-17
40
- ==================
41
-
42
- * deps: bytes@3.1.0
43
- - Add petabyte (`pb`) support
44
- * deps: http-errors@1.7.2
45
- - Set constructor name when possible
46
- - deps: setprototypeof@1.1.1
47
- - deps: statuses@'>= 1.5.0 < 2'
48
- * deps: iconv-lite@0.4.24
49
- - Added encoding MIK
50
-
51
- 2.3.3 / 2018-05-08
52
- ==================
53
-
54
- * deps: http-errors@1.6.3
55
- - deps: depd@~1.1.2
56
- - deps: setprototypeof@1.1.0
57
- - deps: statuses@'>= 1.3.1 < 2'
58
- * deps: iconv-lite@0.4.23
59
- - Fix loading encoding with year appended
60
- - Fix deprecation warnings on Node.js 10+
61
-
62
- 2.3.2 / 2017-09-09
63
- ==================
64
-
65
- * deps: iconv-lite@0.4.19
66
- - Fix ISO-8859-1 regression
67
- - Update Windows-1255
68
-
69
- 2.3.1 / 2017-09-07
70
- ==================
71
-
72
- * deps: bytes@3.0.0
73
- * deps: http-errors@1.6.2
74
- - deps: depd@1.1.1
75
- * perf: skip buffer decoding on overage chunk
76
-
77
- 2.3.0 / 2017-08-04
78
- ==================
79
-
80
- * Add TypeScript definitions
81
- * Use `http-errors` for standard emitted errors
82
- * deps: bytes@2.5.0
83
- * deps: iconv-lite@0.4.18
84
- - Add support for React Native
85
- - Add a warning if not loaded as utf-8
86
- - Fix CESU-8 decoding in Node.js 8
87
- - Improve speed of ISO-8859-1 encoding
88
-
89
- 2.2.0 / 2017-01-02
90
- ==================
91
-
92
- * deps: iconv-lite@0.4.15
93
- - Added encoding MS-31J
94
- - Added encoding MS-932
95
- - Added encoding MS-936
96
- - Added encoding MS-949
97
- - Added encoding MS-950
98
- - Fix GBK/GB18030 handling of Euro character
99
-
100
- 2.1.7 / 2016-06-19
101
- ==================
102
-
103
- * deps: bytes@2.4.0
104
- * perf: remove double-cleanup on happy path
105
-
106
- 2.1.6 / 2016-03-07
107
- ==================
108
-
109
- * deps: bytes@2.3.0
110
- - Drop partial bytes on all parsed units
111
- - Fix parsing byte string that looks like hex
112
-
113
- 2.1.5 / 2015-11-30
114
- ==================
115
-
116
- * deps: bytes@2.2.0
117
- * deps: iconv-lite@0.4.13
118
-
119
- 2.1.4 / 2015-09-27
120
- ==================
121
-
122
- * Fix masking critical errors from `iconv-lite`
123
- * deps: iconv-lite@0.4.12
124
- - Fix CESU-8 decoding in Node.js 4.x
125
-
126
- 2.1.3 / 2015-09-12
127
- ==================
128
-
129
- * Fix sync callback when attaching data listener causes sync read
130
- - Node.js 0.10 compatibility issue
131
-
132
- 2.1.2 / 2015-07-05
133
- ==================
134
-
135
- * Fix error stack traces to skip `makeError`
136
- * deps: iconv-lite@0.4.11
137
- - Add encoding CESU-8
138
-
139
- 2.1.1 / 2015-06-14
140
- ==================
141
-
142
- * Use `unpipe` module for unpiping requests
143
-
144
- 2.1.0 / 2015-05-28
145
- ==================
146
-
147
- * deps: iconv-lite@0.4.10
148
- - Improved UTF-16 endianness detection
149
- - Leading BOM is now removed when decoding
150
- - The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
151
-
152
- 2.0.2 / 2015-05-21
153
- ==================
154
-
155
- * deps: bytes@2.1.0
156
- - Slight optimizations
157
-
158
- 2.0.1 / 2015-05-10
159
- ==================
160
-
161
- * Fix a false-positive when unpiping in Node.js 0.8
162
-
163
- 2.0.0 / 2015-05-08
164
- ==================
165
-
166
- * Return a promise without callback instead of thunk
167
- * deps: bytes@2.0.1
168
- - units no longer case sensitive when parsing
169
-
170
- 1.3.4 / 2015-04-15
171
- ==================
172
-
173
- * Fix hanging callback if request aborts during read
174
- * deps: iconv-lite@0.4.8
175
- - Add encoding alias UNICODE-1-1-UTF-7
176
-
177
- 1.3.3 / 2015-02-08
178
- ==================
179
-
180
- * deps: iconv-lite@0.4.7
181
- - Gracefully support enumerables on `Object.prototype`
182
-
183
- 1.3.2 / 2015-01-20
184
- ==================
185
-
186
- * deps: iconv-lite@0.4.6
187
- - Fix rare aliases of single-byte encodings
188
-
189
- 1.3.1 / 2014-11-21
190
- ==================
191
-
192
- * deps: iconv-lite@0.4.5
193
- - Fix Windows-31J and X-SJIS encoding support
194
-
195
- 1.3.0 / 2014-07-20
196
- ==================
197
-
198
- * Fully unpipe the stream on error
199
- - Fixes `Cannot switch to old mode now` error on Node.js 0.10+
200
-
201
- 1.2.3 / 2014-07-20
202
- ==================
203
-
204
- * deps: iconv-lite@0.4.4
205
- - Added encoding UTF-7
206
-
207
- 1.2.2 / 2014-06-19
208
- ==================
209
-
210
- * Send invalid encoding error to callback
211
-
212
- 1.2.1 / 2014-06-15
213
- ==================
214
-
215
- * deps: iconv-lite@0.4.3
216
- - Added encodings UTF-16BE and UTF-16 with BOM
217
-
218
- 1.2.0 / 2014-06-13
219
- ==================
220
-
221
- * Passing string as `options` interpreted as encoding
222
- * Support all encodings from `iconv-lite`
223
-
224
- 1.1.7 / 2014-06-12
225
- ==================
226
-
227
- * use `string_decoder` module from npm
228
-
229
- 1.1.6 / 2014-05-27
230
- ==================
231
-
232
- * check encoding for old streams1
233
- * support node.js < 0.10.6
234
-
235
- 1.1.5 / 2014-05-14
236
- ==================
237
-
238
- * bump bytes
239
-
240
- 1.1.4 / 2014-04-19
241
- ==================
242
-
243
- * allow true as an option
244
- * bump bytes
245
-
246
- 1.1.3 / 2014-03-02
247
- ==================
248
-
249
- * fix case when length=null
250
-
251
- 1.1.2 / 2013-12-01
252
- ==================
253
-
254
- * be less strict on state.encoding check
255
-
256
- 1.1.1 / 2013-11-27
257
- ==================
258
-
259
- * add engines
260
-
261
- 1.1.0 / 2013-11-27
262
- ==================
263
-
264
- * add err.statusCode and err.type
265
- * allow for encoding option to be true
266
- * pause the stream instead of dumping on error
267
- * throw if the stream's encoding is set
268
-
269
- 1.0.1 / 2013-11-19
270
- ==================
271
-
272
- * dont support streams1, throw if dev set encoding
273
-
274
- 1.0.0 / 2013-11-17
275
- ==================
276
-
277
- * rename `expected` option to `length`
278
-
279
- 0.2.0 / 2013-11-15
280
- ==================
281
-
282
- * republish
283
-
284
- 0.1.1 / 2013-11-15
285
- ==================
286
-
287
- * use bytes
288
-
289
- 0.1.0 / 2013-11-11
290
- ==================
291
-
292
- * generator support
293
-
294
- 0.0.3 / 2013-10-10
295
- ==================
296
-
297
- * update repo
298
-
299
- 0.0.2 / 2013-09-14
300
- ==================
301
-
302
- * dump stream on bad headers
303
- * listen to events after defining received and buffers
304
-
305
- 0.0.1 / 2013-09-14
306
- ==================
307
-
308
- * Initial release