step-node-agent 3.24.4 → 3.25.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 (48) hide show
  1. package/node_modules/cookie/HISTORY.md +10 -5
  2. package/node_modules/cookie/README.md +63 -48
  3. package/node_modules/cookie/index.js +5 -1
  4. package/node_modules/cookie/package.json +5 -5
  5. package/node_modules/express/History.md +19 -1
  6. package/node_modules/express/lib/response.js +12 -3
  7. package/node_modules/express/package.json +2 -2
  8. package/node_modules/unzip-stream/lib/unzip-stream.js +2 -2
  9. package/node_modules/unzip-stream/package.json +1 -1
  10. package/package.json +1 -1
  11. package/node_modules/abbrev/LICENSE +0 -46
  12. package/node_modules/abbrev/README.md +0 -23
  13. package/node_modules/abbrev/abbrev.js +0 -61
  14. package/node_modules/abbrev/package.json +0 -21
  15. package/node_modules/nopt/.npmignore +0 -0
  16. package/node_modules/nopt/LICENSE +0 -23
  17. package/node_modules/nopt/README.md +0 -208
  18. package/node_modules/nopt/bin/nopt.js +0 -44
  19. package/node_modules/nopt/examples/my-program.js +0 -30
  20. package/node_modules/nopt/lib/nopt.js +0 -552
  21. package/node_modules/nopt/package.json +0 -12
  22. package/node_modules/unzip-stream/.travis.yml +0 -9
  23. package/node_modules/unzip-stream/aa.zip +0 -0
  24. package/node_modules/unzip-stream/test.js +0 -29
  25. package/node_modules/unzip-stream/testData-golang/crc32-not-streamed.zip +0 -0
  26. package/node_modules/unzip-stream/testData-golang/dd.zip +0 -0
  27. package/node_modules/unzip-stream/testData-golang/go-no-datadesc-sig.zip +0 -0
  28. package/node_modules/unzip-stream/testData-golang/go-with-datadesc-sig.zip +0 -0
  29. package/node_modules/unzip-stream/testData-golang/readme.zip +0 -0
  30. package/node_modules/unzip-stream/testData-golang/symlink.zip +0 -0
  31. package/node_modules/unzip-stream/testData-golang/test-trailing-junk.zip +0 -0
  32. package/node_modules/unzip-stream/testData-golang/test.zip +0 -0
  33. package/node_modules/unzip-stream/testData-golang/unix.zip +0 -0
  34. package/node_modules/unzip-stream/testData-golang/winxp.zip +0 -0
  35. package/node_modules/unzip-stream/testData-golang/zip64-2.zip +0 -0
  36. package/node_modules/unzip-stream/testData-golang/zip64.zip +0 -0
  37. package/node_modules/unzip-stream/testData-php/cd-gap.zip +0 -0
  38. package/node_modules/unzip-stream/testData-php/cd-truncated.zip +0 -0
  39. package/node_modules/unzip-stream/testData-php/class-trailing-null.zip +0 -0
  40. package/node_modules/unzip-stream/testData-php/class-trailing-slash.zip +0 -0
  41. package/node_modules/unzip-stream/testData-php/class.zip +0 -0
  42. package/node_modules/unzip-stream/testData-php/empty.zip +0 -0
  43. package/node_modules/unzip-stream/testData-php/looks-like-zip64.zip +0 -0
  44. package/node_modules/unzip-stream/testData-php/nosig.zip +0 -0
  45. package/node_modules/unzip-stream/testData-php/split.zip +0 -0
  46. package/node_modules/unzip-stream/testData-php/trail.zip +0 -0
  47. package/node_modules/unzip-stream/testData-php/wrong-cd-start-disk.zip +0 -0
  48. package/node_modules/unzip-stream/testData-php/wrong-central-entry-sig.zip +0 -0
@@ -1,208 +0,0 @@
1
- If you want to write an option parser, and have it be good, there are
2
- two ways to do it. The Right Way, and the Wrong Way.
3
-
4
- The Wrong Way is to sit down and write an option parser. We've all done
5
- that.
6
-
7
- The Right Way is to write some complex configurable program with so many
8
- options that you go half-insane just trying to manage them all, and put
9
- it off with duct-tape solutions until you see exactly to the core of the
10
- problem, and finally snap and write an awesome option parser.
11
-
12
- If you want to write an option parser, don't write an option parser.
13
- Write a package manager, or a source control system, or a service
14
- restarter, or an operating system. You probably won't end up with a
15
- good one of those, but if you don't give up, and you are relentless and
16
- diligent enough in your procrastination, you may just end up with a very
17
- nice option parser.
18
-
19
- ## USAGE
20
-
21
- // my-program.js
22
- var nopt = require("nopt")
23
- , Stream = require("stream").Stream
24
- , path = require("path")
25
- , knownOpts = { "foo" : [String, null]
26
- , "bar" : [Stream, Number]
27
- , "baz" : path
28
- , "bloo" : [ "big", "medium", "small" ]
29
- , "flag" : Boolean
30
- , "pick" : Boolean
31
- , "many" : [String, Array]
32
- }
33
- , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
34
- , "b7" : ["--bar", "7"]
35
- , "m" : ["--bloo", "medium"]
36
- , "p" : ["--pick"]
37
- , "f" : ["--flag"]
38
- }
39
- // everything is optional.
40
- // knownOpts and shorthands default to {}
41
- // arg list defaults to process.argv
42
- // slice defaults to 2
43
- , parsed = nopt(knownOpts, shortHands, process.argv, 2)
44
- console.log(parsed)
45
-
46
- This would give you support for any of the following:
47
-
48
- ```bash
49
- $ node my-program.js --foo "blerp" --no-flag
50
- { "foo" : "blerp", "flag" : false }
51
-
52
- $ node my-program.js ---bar 7 --foo "Mr. Hand" --flag
53
- { bar: 7, foo: "Mr. Hand", flag: true }
54
-
55
- $ node my-program.js --foo "blerp" -f -----p
56
- { foo: "blerp", flag: true, pick: true }
57
-
58
- $ node my-program.js -fp --foofoo
59
- { foo: "Mr. Foo", flag: true, pick: true }
60
-
61
- $ node my-program.js --foofoo -- -fp # -- stops the flag parsing.
62
- { foo: "Mr. Foo", argv: { remain: ["-fp"] } }
63
-
64
- $ node my-program.js --blatzk 1000 -fp # unknown opts are ok.
65
- { blatzk: 1000, flag: true, pick: true }
66
-
67
- $ node my-program.js --blatzk true -fp # but they need a value
68
- { blatzk: true, flag: true, pick: true }
69
-
70
- $ node my-program.js --no-blatzk -fp # unless they start with "no-"
71
- { blatzk: false, flag: true, pick: true }
72
-
73
- $ node my-program.js --baz b/a/z # known paths are resolved.
74
- { baz: "/Users/isaacs/b/a/z" }
75
-
76
- # if Array is one of the types, then it can take many
77
- # values, and will always be an array. The other types provided
78
- # specify what types are allowed in the list.
79
-
80
- $ node my-program.js --many 1 --many null --many foo
81
- { many: ["1", "null", "foo"] }
82
-
83
- $ node my-program.js --many foo
84
- { many: ["foo"] }
85
- ```
86
-
87
- Read the tests at the bottom of `lib/nopt.js` for more examples of
88
- what this puppy can do.
89
-
90
- ## Types
91
-
92
- The following types are supported, and defined on `nopt.typeDefs`
93
-
94
- * String: A normal string. No parsing is done.
95
- * path: A file system path. Gets resolved against cwd if not absolute.
96
- * url: A url. If it doesn't parse, it isn't accepted.
97
- * Number: Must be numeric.
98
- * Date: Must parse as a date. If it does, and `Date` is one of the options,
99
- then it will return a Date object, not a string.
100
- * Boolean: Must be either `true` or `false`. If an option is a boolean,
101
- then it does not need a value, and its presence will imply `true` as
102
- the value. To negate boolean flags, do `--no-whatever` or `--whatever
103
- false`
104
- * NaN: Means that the option is strictly not allowed. Any value will
105
- fail.
106
- * Stream: An object matching the "Stream" class in node. Valuable
107
- for use when validating programmatically. (npm uses this to let you
108
- supply any WriteStream on the `outfd` and `logfd` config options.)
109
- * Array: If `Array` is specified as one of the types, then the value
110
- will be parsed as a list of options. This means that multiple values
111
- can be specified, and that the value will always be an array.
112
-
113
- If a type is an array of values not on this list, then those are
114
- considered valid values. For instance, in the example above, the
115
- `--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`,
116
- and any other value will be rejected.
117
-
118
- When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be
119
- interpreted as their JavaScript equivalents, and numeric values will be
120
- interpreted as a number.
121
-
122
- You can also mix types and values, or multiple types, in a list. For
123
- instance `{ blah: [Number, null] }` would allow a value to be set to
124
- either a Number or null.
125
-
126
- To define a new type, add it to `nopt.typeDefs`. Each item in that
127
- hash is an object with a `type` member and a `validate` method. The
128
- `type` member is an object that matches what goes in the type list. The
129
- `validate` method is a function that gets called with `validate(data,
130
- key, val)`. Validate methods should assign `data[key]` to the valid
131
- value of `val` if it can be handled properly, or return boolean
132
- `false` if it cannot.
133
-
134
- You can also call `nopt.clean(data, types, typeDefs)` to clean up a
135
- config object and remove its invalid properties.
136
-
137
- ## Error Handling
138
-
139
- By default, nopt outputs a warning to standard error when invalid
140
- options are found. You can change this behavior by assigning a method
141
- to `nopt.invalidHandler`. This method will be called with
142
- the offending `nopt.invalidHandler(key, val, types)`.
143
-
144
- If no `nopt.invalidHandler` is assigned, then it will console.error
145
- its whining. If it is assigned to boolean `false` then the warning is
146
- suppressed.
147
-
148
- ## Abbreviations
149
-
150
- Yes, they are supported. If you define options like this:
151
-
152
- ```javascript
153
- { "foolhardyelephants" : Boolean
154
- , "pileofmonkeys" : Boolean }
155
- ```
156
-
157
- Then this will work:
158
-
159
- ```bash
160
- node program.js --foolhar --pil
161
- node program.js --no-f --pileofmon
162
- # etc.
163
- ```
164
-
165
- ## Shorthands
166
-
167
- Shorthands are a hash of shorter option names to a snippet of args that
168
- they expand to.
169
-
170
- If multiple one-character shorthands are all combined, and the
171
- combination does not unambiguously match any other option or shorthand,
172
- then they will be broken up into their constituent parts. For example:
173
-
174
- ```json
175
- { "s" : ["--loglevel", "silent"]
176
- , "g" : "--global"
177
- , "f" : "--force"
178
- , "p" : "--parseable"
179
- , "l" : "--long"
180
- }
181
- ```
182
-
183
- ```bash
184
- npm ls -sgflp
185
- # just like doing this:
186
- npm ls --loglevel silent --global --force --long --parseable
187
- ```
188
-
189
- ## The Rest of the args
190
-
191
- The config object returned by nopt is given a special member called
192
- `argv`, which is an object with the following fields:
193
-
194
- * `remain`: The remaining args after all the parsing has occurred.
195
- * `original`: The args as they originally appeared.
196
- * `cooked`: The args after flags and shorthands are expanded.
197
-
198
- ## Slicing
199
-
200
- Node programs are called with more or less the exact argv as it appears
201
- in C land, after the v8 and node-specific options have been plucked off.
202
- As such, `argv[0]` is always `node` and `argv[1]` is always the
203
- JavaScript program being run.
204
-
205
- That's usually not very useful to you. So they're sliced off by
206
- default. If you want them, then you can pass in `0` as the last
207
- argument, or any other number that you'd like to slice off the start of
208
- the list.
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env node
2
- var nopt = require("../lib/nopt")
3
- , types = { num: Number
4
- , bool: Boolean
5
- , help: Boolean
6
- , list: Array
7
- , "num-list": [Number, Array]
8
- , "str-list": [String, Array]
9
- , "bool-list": [Boolean, Array]
10
- , str: String }
11
- , shorthands = { s: [ "--str", "astring" ]
12
- , b: [ "--bool" ]
13
- , nb: [ "--no-bool" ]
14
- , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ]
15
- , "?": ["--help"]
16
- , h: ["--help"]
17
- , H: ["--help"]
18
- , n: [ "--num", "125" ] }
19
- , parsed = nopt( types
20
- , shorthands
21
- , process.argv
22
- , 2 )
23
-
24
- console.log("parsed", parsed)
25
-
26
- if (parsed.help) {
27
- console.log("")
28
- console.log("nopt cli tester")
29
- console.log("")
30
- console.log("types")
31
- console.log(Object.keys(types).map(function M (t) {
32
- var type = types[t]
33
- if (Array.isArray(type)) {
34
- return [t, type.map(function (type) { return type.name })]
35
- }
36
- return [t, type && type.name]
37
- }).reduce(function (s, i) {
38
- s[i[0]] = i[1]
39
- return s
40
- }, {}))
41
- console.log("")
42
- console.log("shorthands")
43
- console.log(shorthands)
44
- }
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- //process.env.DEBUG_NOPT = 1
4
-
5
- // my-program.js
6
- var nopt = require("../lib/nopt")
7
- , Stream = require("stream").Stream
8
- , path = require("path")
9
- , knownOpts = { "foo" : [String, null]
10
- , "bar" : [Stream, Number]
11
- , "baz" : path
12
- , "bloo" : [ "big", "medium", "small" ]
13
- , "flag" : Boolean
14
- , "pick" : Boolean
15
- }
16
- , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
17
- , "b7" : ["--bar", "7"]
18
- , "m" : ["--bloo", "medium"]
19
- , "p" : ["--pick"]
20
- , "f" : ["--flag", "true"]
21
- , "g" : ["--flag"]
22
- , "s" : "--flag"
23
- }
24
- // everything is optional.
25
- // knownOpts and shorthands default to {}
26
- // arg list defaults to process.argv
27
- // slice defaults to 2
28
- , parsed = nopt(knownOpts, shortHands, process.argv, 2)
29
-
30
- console.log("parsed =\n"+ require("util").inspect(parsed))