serverless-spy 2.2.3 → 2.2.5

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 (224) hide show
  1. package/.jsii +4 -4
  2. package/dist/releasetag.txt +1 -1
  3. package/lib/src/ServerlessSpy.js +1 -1
  4. package/node_modules/bundle-name/index.js +2 -2
  5. package/node_modules/bundle-name/package.json +6 -5
  6. package/node_modules/bundle-name/readme.md +2 -2
  7. package/node_modules/default-browser/index.d.ts +5 -4
  8. package/node_modules/default-browser/index.js +13 -11
  9. package/node_modules/default-browser/package.json +14 -12
  10. package/node_modules/default-browser/windows.js +11 -5
  11. package/node_modules/default-browser-id/index.js +8 -32
  12. package/node_modules/default-browser-id/package.json +5 -8
  13. package/node_modules/default-browser-id/readme.md +2 -2
  14. package/node_modules/open/index.js +10 -10
  15. package/node_modules/{is-wsl → open/node_modules/is-wsl}/index.d.ts +2 -2
  16. package/node_modules/open/node_modules/is-wsl/index.js +27 -0
  17. package/node_modules/{is-wsl → open/node_modules/is-wsl}/package.json +21 -9
  18. package/node_modules/open/node_modules/is-wsl/readme.md +21 -0
  19. package/node_modules/open/package.json +9 -8
  20. package/node_modules/open/xdg-open +338 -137
  21. package/node_modules/run-applescript/index.d.ts +28 -4
  22. package/node_modules/run-applescript/index.js +20 -7
  23. package/node_modules/run-applescript/package.json +10 -9
  24. package/node_modules/run-applescript/readme.md +44 -6
  25. package/node_modules/ws/README.md +9 -10
  26. package/node_modules/ws/lib/constants.js +7 -1
  27. package/node_modules/ws/lib/receiver.js +11 -47
  28. package/node_modules/ws/lib/sender.js +172 -47
  29. package/node_modules/ws/lib/validation.js +22 -0
  30. package/node_modules/ws/lib/websocket-server.js +6 -5
  31. package/node_modules/ws/lib/websocket.js +71 -19
  32. package/node_modules/ws/package.json +4 -3
  33. package/package.json +4 -4
  34. package/node_modules/big-integer/BigInteger.d.ts +0 -2393
  35. package/node_modules/big-integer/BigInteger.js +0 -1453
  36. package/node_modules/big-integer/BigInteger.min.js +0 -1
  37. package/node_modules/big-integer/LICENSE +0 -24
  38. package/node_modules/big-integer/README.md +0 -589
  39. package/node_modules/big-integer/bower.json +0 -29
  40. package/node_modules/big-integer/package.json +0 -48
  41. package/node_modules/big-integer/tsconfig.json +0 -24
  42. package/node_modules/bplist-parser/README.md +0 -48
  43. package/node_modules/bplist-parser/bplistParser.js +0 -363
  44. package/node_modules/bplist-parser/package.json +0 -34
  45. package/node_modules/bplist-parser/test/airplay.bplist +0 -0
  46. package/node_modules/bplist-parser/test/iTunes-small.bplist +0 -0
  47. package/node_modules/bplist-parser/test/int64.bplist +0 -0
  48. package/node_modules/bplist-parser/test/int64.xml +0 -10
  49. package/node_modules/bplist-parser/test/parseTest.js +0 -104
  50. package/node_modules/bplist-parser/test/sample1.bplist +0 -0
  51. package/node_modules/bplist-parser/test/sample2.bplist +0 -0
  52. package/node_modules/bplist-parser/test/uid.bplist +0 -0
  53. package/node_modules/bplist-parser/test/utf16.bplist +0 -0
  54. package/node_modules/bplist-parser/test/utf16_chinese.plist +0 -0
  55. package/node_modules/cross-spawn/CHANGELOG.md +0 -130
  56. package/node_modules/cross-spawn/LICENSE +0 -21
  57. package/node_modules/cross-spawn/README.md +0 -96
  58. package/node_modules/cross-spawn/index.js +0 -39
  59. package/node_modules/cross-spawn/lib/enoent.js +0 -59
  60. package/node_modules/cross-spawn/lib/parse.js +0 -91
  61. package/node_modules/cross-spawn/lib/util/escape.js +0 -45
  62. package/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
  63. package/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
  64. package/node_modules/cross-spawn/package.json +0 -73
  65. package/node_modules/default-browser/node_modules/execa/index.d.ts +0 -937
  66. package/node_modules/default-browser/node_modules/execa/index.js +0 -309
  67. package/node_modules/default-browser/node_modules/execa/lib/command.js +0 -120
  68. package/node_modules/default-browser/node_modules/execa/lib/error.js +0 -87
  69. package/node_modules/default-browser/node_modules/execa/lib/kill.js +0 -102
  70. package/node_modules/default-browser/node_modules/execa/lib/pipe.js +0 -42
  71. package/node_modules/default-browser/node_modules/execa/lib/promise.js +0 -36
  72. package/node_modules/default-browser/node_modules/execa/lib/stdio.js +0 -49
  73. package/node_modules/default-browser/node_modules/execa/lib/stream.js +0 -119
  74. package/node_modules/default-browser/node_modules/execa/lib/verbose.js +0 -19
  75. package/node_modules/default-browser/node_modules/execa/package.json +0 -87
  76. package/node_modules/default-browser/node_modules/execa/readme.md +0 -824
  77. package/node_modules/default-browser/node_modules/human-signals/LICENSE +0 -201
  78. package/node_modules/default-browser/node_modules/human-signals/README.md +0 -178
  79. package/node_modules/default-browser/node_modules/human-signals/build/src/core.js +0 -273
  80. package/node_modules/default-browser/node_modules/human-signals/build/src/main.d.ts +0 -73
  81. package/node_modules/default-browser/node_modules/human-signals/build/src/main.js +0 -70
  82. package/node_modules/default-browser/node_modules/human-signals/build/src/realtime.js +0 -16
  83. package/node_modules/default-browser/node_modules/human-signals/build/src/signals.js +0 -34
  84. package/node_modules/default-browser/node_modules/human-signals/package.json +0 -61
  85. package/node_modules/default-browser/node_modules/is-stream/index.d.ts +0 -81
  86. package/node_modules/default-browser/node_modules/is-stream/index.js +0 -29
  87. package/node_modules/default-browser/node_modules/is-stream/license +0 -9
  88. package/node_modules/default-browser/node_modules/is-stream/package.json +0 -44
  89. package/node_modules/default-browser/node_modules/is-stream/readme.md +0 -60
  90. package/node_modules/default-browser/node_modules/mimic-fn/index.d.ts +0 -52
  91. package/node_modules/default-browser/node_modules/mimic-fn/index.js +0 -71
  92. package/node_modules/default-browser/node_modules/mimic-fn/license +0 -9
  93. package/node_modules/default-browser/node_modules/mimic-fn/package.json +0 -45
  94. package/node_modules/default-browser/node_modules/mimic-fn/readme.md +0 -90
  95. package/node_modules/default-browser/node_modules/npm-run-path/index.d.ts +0 -90
  96. package/node_modules/default-browser/node_modules/npm-run-path/index.js +0 -52
  97. package/node_modules/default-browser/node_modules/npm-run-path/license +0 -9
  98. package/node_modules/default-browser/node_modules/npm-run-path/package.json +0 -49
  99. package/node_modules/default-browser/node_modules/npm-run-path/readme.md +0 -104
  100. package/node_modules/default-browser/node_modules/onetime/index.d.ts +0 -59
  101. package/node_modules/default-browser/node_modules/onetime/index.js +0 -41
  102. package/node_modules/default-browser/node_modules/onetime/license +0 -9
  103. package/node_modules/default-browser/node_modules/onetime/package.json +0 -45
  104. package/node_modules/default-browser/node_modules/onetime/readme.md +0 -94
  105. package/node_modules/default-browser/node_modules/path-key/index.d.ts +0 -31
  106. package/node_modules/default-browser/node_modules/path-key/index.js +0 -12
  107. package/node_modules/default-browser/node_modules/path-key/license +0 -9
  108. package/node_modules/default-browser/node_modules/path-key/package.json +0 -41
  109. package/node_modules/default-browser/node_modules/path-key/readme.md +0 -57
  110. package/node_modules/default-browser/node_modules/strip-final-newline/index.js +0 -14
  111. package/node_modules/default-browser/node_modules/strip-final-newline/license +0 -9
  112. package/node_modules/default-browser/node_modules/strip-final-newline/package.json +0 -43
  113. package/node_modules/default-browser/node_modules/strip-final-newline/readme.md +0 -35
  114. package/node_modules/execa/index.d.ts +0 -564
  115. package/node_modules/execa/index.js +0 -268
  116. package/node_modules/execa/lib/command.js +0 -52
  117. package/node_modules/execa/lib/error.js +0 -88
  118. package/node_modules/execa/lib/kill.js +0 -115
  119. package/node_modules/execa/lib/promise.js +0 -46
  120. package/node_modules/execa/lib/stdio.js +0 -52
  121. package/node_modules/execa/lib/stream.js +0 -97
  122. package/node_modules/execa/license +0 -9
  123. package/node_modules/execa/package.json +0 -74
  124. package/node_modules/execa/readme.md +0 -663
  125. package/node_modules/get-stream/buffer-stream.js +0 -52
  126. package/node_modules/get-stream/index.d.ts +0 -105
  127. package/node_modules/get-stream/index.js +0 -61
  128. package/node_modules/get-stream/license +0 -9
  129. package/node_modules/get-stream/package.json +0 -47
  130. package/node_modules/get-stream/readme.md +0 -124
  131. package/node_modules/human-signals/CHANGELOG.md +0 -11
  132. package/node_modules/human-signals/LICENSE +0 -201
  133. package/node_modules/human-signals/README.md +0 -165
  134. package/node_modules/human-signals/build/src/core.js +0 -273
  135. package/node_modules/human-signals/build/src/core.js.map +0 -1
  136. package/node_modules/human-signals/build/src/main.d.ts +0 -52
  137. package/node_modules/human-signals/build/src/main.js +0 -71
  138. package/node_modules/human-signals/build/src/main.js.map +0 -1
  139. package/node_modules/human-signals/build/src/realtime.js +0 -19
  140. package/node_modules/human-signals/build/src/realtime.js.map +0 -1
  141. package/node_modules/human-signals/build/src/signals.js +0 -35
  142. package/node_modules/human-signals/build/src/signals.js.map +0 -1
  143. package/node_modules/human-signals/package.json +0 -64
  144. package/node_modules/is-stream/index.d.ts +0 -79
  145. package/node_modules/is-stream/index.js +0 -28
  146. package/node_modules/is-stream/license +0 -9
  147. package/node_modules/is-stream/package.json +0 -42
  148. package/node_modules/is-stream/readme.md +0 -60
  149. package/node_modules/is-wsl/index.js +0 -31
  150. package/node_modules/is-wsl/license +0 -9
  151. package/node_modules/is-wsl/node_modules/is-docker/cli.js +0 -5
  152. package/node_modules/is-wsl/node_modules/is-docker/index.d.ts +0 -15
  153. package/node_modules/is-wsl/node_modules/is-docker/index.js +0 -29
  154. package/node_modules/is-wsl/node_modules/is-docker/license +0 -9
  155. package/node_modules/is-wsl/node_modules/is-docker/package.json +0 -42
  156. package/node_modules/is-wsl/node_modules/is-docker/readme.md +0 -27
  157. package/node_modules/is-wsl/readme.md +0 -36
  158. package/node_modules/isexe/.npmignore +0 -2
  159. package/node_modules/isexe/LICENSE +0 -15
  160. package/node_modules/isexe/README.md +0 -51
  161. package/node_modules/isexe/index.js +0 -57
  162. package/node_modules/isexe/mode.js +0 -41
  163. package/node_modules/isexe/package.json +0 -31
  164. package/node_modules/isexe/test/basic.js +0 -221
  165. package/node_modules/isexe/windows.js +0 -42
  166. package/node_modules/merge-stream/LICENSE +0 -21
  167. package/node_modules/merge-stream/README.md +0 -78
  168. package/node_modules/merge-stream/index.js +0 -41
  169. package/node_modules/merge-stream/package.json +0 -19
  170. package/node_modules/mimic-fn/index.d.ts +0 -54
  171. package/node_modules/mimic-fn/index.js +0 -13
  172. package/node_modules/mimic-fn/license +0 -9
  173. package/node_modules/mimic-fn/package.json +0 -42
  174. package/node_modules/mimic-fn/readme.md +0 -69
  175. package/node_modules/npm-run-path/index.d.ts +0 -89
  176. package/node_modules/npm-run-path/index.js +0 -47
  177. package/node_modules/npm-run-path/license +0 -9
  178. package/node_modules/npm-run-path/package.json +0 -44
  179. package/node_modules/npm-run-path/readme.md +0 -115
  180. package/node_modules/onetime/index.d.ts +0 -64
  181. package/node_modules/onetime/index.js +0 -44
  182. package/node_modules/onetime/license +0 -9
  183. package/node_modules/onetime/package.json +0 -43
  184. package/node_modules/onetime/readme.md +0 -94
  185. package/node_modules/path-key/index.d.ts +0 -40
  186. package/node_modules/path-key/index.js +0 -16
  187. package/node_modules/path-key/license +0 -9
  188. package/node_modules/path-key/package.json +0 -39
  189. package/node_modules/path-key/readme.md +0 -61
  190. package/node_modules/shebang-command/index.js +0 -19
  191. package/node_modules/shebang-command/license +0 -9
  192. package/node_modules/shebang-command/package.json +0 -34
  193. package/node_modules/shebang-command/readme.md +0 -34
  194. package/node_modules/shebang-regex/index.d.ts +0 -22
  195. package/node_modules/shebang-regex/index.js +0 -2
  196. package/node_modules/shebang-regex/license +0 -9
  197. package/node_modules/shebang-regex/package.json +0 -35
  198. package/node_modules/shebang-regex/readme.md +0 -33
  199. package/node_modules/signal-exit/LICENSE.txt +0 -16
  200. package/node_modules/signal-exit/README.md +0 -39
  201. package/node_modules/signal-exit/index.js +0 -202
  202. package/node_modules/signal-exit/package.json +0 -38
  203. package/node_modules/signal-exit/signals.js +0 -53
  204. package/node_modules/strip-final-newline/index.js +0 -16
  205. package/node_modules/strip-final-newline/license +0 -9
  206. package/node_modules/strip-final-newline/package.json +0 -40
  207. package/node_modules/strip-final-newline/readme.md +0 -30
  208. package/node_modules/titleize/index.d.ts +0 -17
  209. package/node_modules/titleize/index.js +0 -7
  210. package/node_modules/titleize/license +0 -9
  211. package/node_modules/titleize/package.json +0 -42
  212. package/node_modules/titleize/readme.md +0 -25
  213. package/node_modules/untildify/index.d.ts +0 -14
  214. package/node_modules/untildify/index.js +0 -12
  215. package/node_modules/untildify/license +0 -9
  216. package/node_modules/untildify/package.json +0 -43
  217. package/node_modules/untildify/readme.md +0 -30
  218. package/node_modules/which/CHANGELOG.md +0 -166
  219. package/node_modules/which/LICENSE +0 -15
  220. package/node_modules/which/README.md +0 -54
  221. package/node_modules/which/bin/node-which +0 -52
  222. package/node_modules/which/package.json +0 -43
  223. package/node_modules/which/which.js +0 -125
  224. /package/node_modules/{default-browser/node_modules/execa → open/node_modules/is-wsl}/license +0 -0
@@ -1,31 +0,0 @@
1
- {
2
- "name": "isexe",
3
- "version": "2.0.0",
4
- "description": "Minimal module to check if a file is executable.",
5
- "main": "index.js",
6
- "directories": {
7
- "test": "test"
8
- },
9
- "devDependencies": {
10
- "mkdirp": "^0.5.1",
11
- "rimraf": "^2.5.0",
12
- "tap": "^10.3.0"
13
- },
14
- "scripts": {
15
- "test": "tap test/*.js --100",
16
- "preversion": "npm test",
17
- "postversion": "npm publish",
18
- "postpublish": "git push origin --all; git push origin --tags"
19
- },
20
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
21
- "license": "ISC",
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/isaacs/isexe.git"
25
- },
26
- "keywords": [],
27
- "bugs": {
28
- "url": "https://github.com/isaacs/isexe/issues"
29
- },
30
- "homepage": "https://github.com/isaacs/isexe#readme"
31
- }
@@ -1,221 +0,0 @@
1
- var t = require('tap')
2
- var fs = require('fs')
3
- var path = require('path')
4
- var fixture = path.resolve(__dirname, 'fixtures')
5
- var meow = fixture + '/meow.cat'
6
- var mine = fixture + '/mine.cat'
7
- var ours = fixture + '/ours.cat'
8
- var fail = fixture + '/fail.false'
9
- var noent = fixture + '/enoent.exe'
10
- var mkdirp = require('mkdirp')
11
- var rimraf = require('rimraf')
12
-
13
- var isWindows = process.platform === 'win32'
14
- var hasAccess = typeof fs.access === 'function'
15
- var winSkip = isWindows && 'windows'
16
- var accessSkip = !hasAccess && 'no fs.access function'
17
- var hasPromise = typeof Promise === 'function'
18
- var promiseSkip = !hasPromise && 'no global Promise'
19
-
20
- function reset () {
21
- delete require.cache[require.resolve('../')]
22
- return require('../')
23
- }
24
-
25
- t.test('setup fixtures', function (t) {
26
- rimraf.sync(fixture)
27
- mkdirp.sync(fixture)
28
- fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n')
29
- fs.chmodSync(meow, parseInt('0755', 8))
30
- fs.writeFileSync(fail, '#!/usr/bin/env false\n')
31
- fs.chmodSync(fail, parseInt('0644', 8))
32
- fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n')
33
- fs.chmodSync(mine, parseInt('0744', 8))
34
- fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n')
35
- fs.chmodSync(ours, parseInt('0754', 8))
36
- t.end()
37
- })
38
-
39
- t.test('promise', { skip: promiseSkip }, function (t) {
40
- var isexe = reset()
41
- t.test('meow async', function (t) {
42
- isexe(meow).then(function (is) {
43
- t.ok(is)
44
- t.end()
45
- })
46
- })
47
- t.test('fail async', function (t) {
48
- isexe(fail).then(function (is) {
49
- t.notOk(is)
50
- t.end()
51
- })
52
- })
53
- t.test('noent async', function (t) {
54
- isexe(noent).catch(function (er) {
55
- t.ok(er)
56
- t.end()
57
- })
58
- })
59
- t.test('noent ignore async', function (t) {
60
- isexe(noent, { ignoreErrors: true }).then(function (is) {
61
- t.notOk(is)
62
- t.end()
63
- })
64
- })
65
- t.end()
66
- })
67
-
68
- t.test('no promise', function (t) {
69
- global.Promise = null
70
- var isexe = reset()
71
- t.throws('try to meow a promise', function () {
72
- isexe(meow)
73
- })
74
- t.end()
75
- })
76
-
77
- t.test('access', { skip: accessSkip || winSkip }, function (t) {
78
- runTest(t)
79
- })
80
-
81
- t.test('mode', { skip: winSkip }, function (t) {
82
- delete fs.access
83
- delete fs.accessSync
84
- var isexe = reset()
85
- t.ok(isexe.sync(ours, { uid: 0, gid: 0 }))
86
- t.ok(isexe.sync(mine, { uid: 0, gid: 0 }))
87
- runTest(t)
88
- })
89
-
90
- t.test('windows', function (t) {
91
- global.TESTING_WINDOWS = true
92
- var pathExt = '.EXE;.CAT;.CMD;.COM'
93
- t.test('pathExt option', function (t) {
94
- runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' })
95
- })
96
- t.test('pathExt env', function (t) {
97
- process.env.PATHEXT = pathExt
98
- runTest(t)
99
- })
100
- t.test('no pathExt', function (t) {
101
- // with a pathExt of '', any filename is fine.
102
- // so the "fail" one would still pass.
103
- runTest(t, { pathExt: '', skipFail: true })
104
- })
105
- t.test('pathext with empty entry', function (t) {
106
- // with a pathExt of '', any filename is fine.
107
- // so the "fail" one would still pass.
108
- runTest(t, { pathExt: ';' + pathExt, skipFail: true })
109
- })
110
- t.end()
111
- })
112
-
113
- t.test('cleanup', function (t) {
114
- rimraf.sync(fixture)
115
- t.end()
116
- })
117
-
118
- function runTest (t, options) {
119
- var isexe = reset()
120
-
121
- var optionsIgnore = Object.create(options || {})
122
- optionsIgnore.ignoreErrors = true
123
-
124
- if (!options || !options.skipFail) {
125
- t.notOk(isexe.sync(fail, options))
126
- }
127
- t.notOk(isexe.sync(noent, optionsIgnore))
128
- if (!options) {
129
- t.ok(isexe.sync(meow))
130
- } else {
131
- t.ok(isexe.sync(meow, options))
132
- }
133
-
134
- t.ok(isexe.sync(mine, options))
135
- t.ok(isexe.sync(ours, options))
136
- t.throws(function () {
137
- isexe.sync(noent, options)
138
- })
139
-
140
- t.test('meow async', function (t) {
141
- if (!options) {
142
- isexe(meow, function (er, is) {
143
- if (er) {
144
- throw er
145
- }
146
- t.ok(is)
147
- t.end()
148
- })
149
- } else {
150
- isexe(meow, options, function (er, is) {
151
- if (er) {
152
- throw er
153
- }
154
- t.ok(is)
155
- t.end()
156
- })
157
- }
158
- })
159
-
160
- t.test('mine async', function (t) {
161
- isexe(mine, options, function (er, is) {
162
- if (er) {
163
- throw er
164
- }
165
- t.ok(is)
166
- t.end()
167
- })
168
- })
169
-
170
- t.test('ours async', function (t) {
171
- isexe(ours, options, function (er, is) {
172
- if (er) {
173
- throw er
174
- }
175
- t.ok(is)
176
- t.end()
177
- })
178
- })
179
-
180
- if (!options || !options.skipFail) {
181
- t.test('fail async', function (t) {
182
- isexe(fail, options, function (er, is) {
183
- if (er) {
184
- throw er
185
- }
186
- t.notOk(is)
187
- t.end()
188
- })
189
- })
190
- }
191
-
192
- t.test('noent async', function (t) {
193
- isexe(noent, options, function (er, is) {
194
- t.ok(er)
195
- t.notOk(is)
196
- t.end()
197
- })
198
- })
199
-
200
- t.test('noent ignore async', function (t) {
201
- isexe(noent, optionsIgnore, function (er, is) {
202
- if (er) {
203
- throw er
204
- }
205
- t.notOk(is)
206
- t.end()
207
- })
208
- })
209
-
210
- t.test('directory is not executable', function (t) {
211
- isexe(__dirname, options, function (er, is) {
212
- if (er) {
213
- throw er
214
- }
215
- t.notOk(is)
216
- t.end()
217
- })
218
- })
219
-
220
- t.end()
221
- }
@@ -1,42 +0,0 @@
1
- module.exports = isexe
2
- isexe.sync = sync
3
-
4
- var fs = require('fs')
5
-
6
- function checkPathExt (path, options) {
7
- var pathext = options.pathExt !== undefined ?
8
- options.pathExt : process.env.PATHEXT
9
-
10
- if (!pathext) {
11
- return true
12
- }
13
-
14
- pathext = pathext.split(';')
15
- if (pathext.indexOf('') !== -1) {
16
- return true
17
- }
18
- for (var i = 0; i < pathext.length; i++) {
19
- var p = pathext[i].toLowerCase()
20
- if (p && path.substr(-p.length).toLowerCase() === p) {
21
- return true
22
- }
23
- }
24
- return false
25
- }
26
-
27
- function checkStat (stat, path, options) {
28
- if (!stat.isSymbolicLink() && !stat.isFile()) {
29
- return false
30
- }
31
- return checkPathExt(path, options)
32
- }
33
-
34
- function isexe (path, options, cb) {
35
- fs.stat(path, function (er, stat) {
36
- cb(er, er ? false : checkStat(stat, path, options))
37
- })
38
- }
39
-
40
- function sync (path, options) {
41
- return checkStat(fs.statSync(path), path, options)
42
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) Stephen Sugden <me@stephensugden.com> (stephensugden.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,78 +0,0 @@
1
- # merge-stream
2
-
3
- Merge (interleave) a bunch of streams.
4
-
5
- [![build status](https://secure.travis-ci.org/grncdr/merge-stream.svg?branch=master)](http://travis-ci.org/grncdr/merge-stream)
6
-
7
- ## Synopsis
8
-
9
- ```javascript
10
- var stream1 = new Stream();
11
- var stream2 = new Stream();
12
-
13
- var merged = mergeStream(stream1, stream2);
14
-
15
- var stream3 = new Stream();
16
- merged.add(stream3);
17
- merged.isEmpty();
18
- //=> false
19
- ```
20
-
21
- ## Description
22
-
23
- This is adapted from [event-stream](https://github.com/dominictarr/event-stream) separated into a new module, using Streams3.
24
-
25
- ## API
26
-
27
- ### `mergeStream`
28
-
29
- Type: `function`
30
-
31
- Merges an arbitrary number of streams. Returns a merged stream.
32
-
33
- #### `merged.add`
34
-
35
- A method to dynamically add more sources to the stream. The argument supplied to `add` can be either a source or an array of sources.
36
-
37
- #### `merged.isEmpty`
38
-
39
- A method that tells you if the merged stream is empty.
40
-
41
- When a stream is "empty" (aka. no sources were added), it could not be returned to a gulp task.
42
-
43
- So, we could do something like this:
44
-
45
- ```js
46
- stream = require('merge-stream')();
47
- // Something like a loop to add some streams to the merge stream
48
- // stream.add(streamA);
49
- // stream.add(streamB);
50
- return stream.isEmpty() ? null : stream;
51
- ```
52
-
53
- ## Gulp example
54
-
55
- An example use case for **merge-stream** is to combine parts of a task in a project's **gulpfile.js** like this:
56
-
57
- ```js
58
- const gulp = require('gulp');
59
- const htmlValidator = require('gulp-w3c-html-validator');
60
- const jsHint = require('gulp-jshint');
61
- const mergeStream = require('merge-stream');
62
-
63
- function lint() {
64
- return mergeStream(
65
- gulp.src('src/*.html')
66
- .pipe(htmlValidator())
67
- .pipe(htmlValidator.reporter()),
68
- gulp.src('src/*.js')
69
- .pipe(jsHint())
70
- .pipe(jsHint.reporter())
71
- );
72
- }
73
- gulp.task('lint', lint);
74
- ```
75
-
76
- ## License
77
-
78
- MIT
@@ -1,41 +0,0 @@
1
- 'use strict';
2
-
3
- const { PassThrough } = require('stream');
4
-
5
- module.exports = function (/*streams...*/) {
6
- var sources = []
7
- var output = new PassThrough({objectMode: true})
8
-
9
- output.setMaxListeners(0)
10
-
11
- output.add = add
12
- output.isEmpty = isEmpty
13
-
14
- output.on('unpipe', remove)
15
-
16
- Array.prototype.slice.call(arguments).forEach(add)
17
-
18
- return output
19
-
20
- function add (source) {
21
- if (Array.isArray(source)) {
22
- source.forEach(add)
23
- return this
24
- }
25
-
26
- sources.push(source);
27
- source.once('end', remove.bind(null, source))
28
- source.once('error', output.emit.bind(output, 'error'))
29
- source.pipe(output, {end: false})
30
- return this
31
- }
32
-
33
- function isEmpty () {
34
- return sources.length == 0;
35
- }
36
-
37
- function remove (source) {
38
- sources = sources.filter(function (it) { return it !== source })
39
- if (!sources.length && output.readable) { output.end() }
40
- }
41
- }
@@ -1,19 +0,0 @@
1
- {
2
- "name": "merge-stream",
3
- "version": "2.0.0",
4
- "description": "Create a stream that emits events from multiple other streams",
5
- "files": [
6
- "index.js"
7
- ],
8
- "scripts": {
9
- "test": "istanbul cover test.js && istanbul check-cover --statements 100 --branches 100"
10
- },
11
- "repository": "grncdr/merge-stream",
12
- "author": "Stephen Sugden <me@stephensugden.com>",
13
- "license": "MIT",
14
- "dependencies": {},
15
- "devDependencies": {
16
- "from2": "^2.0.3",
17
- "istanbul": "^0.4.5"
18
- }
19
- }
@@ -1,54 +0,0 @@
1
- declare const mimicFn: {
2
- /**
3
- Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
4
-
5
- @param to - Mimicking function.
6
- @param from - Function to mimic.
7
- @returns The modified `to` function.
8
-
9
- @example
10
- ```
11
- import mimicFn = require('mimic-fn');
12
-
13
- function foo() {}
14
- foo.unicorn = '🦄';
15
-
16
- function wrapper() {
17
- return foo();
18
- }
19
-
20
- console.log(wrapper.name);
21
- //=> 'wrapper'
22
-
23
- mimicFn(wrapper, foo);
24
-
25
- console.log(wrapper.name);
26
- //=> 'foo'
27
-
28
- console.log(wrapper.unicorn);
29
- //=> '🦄'
30
- ```
31
- */
32
- <
33
- ArgumentsType extends unknown[],
34
- ReturnType,
35
- FunctionType extends (...arguments: ArgumentsType) => ReturnType
36
- >(
37
- to: (...arguments: ArgumentsType) => ReturnType,
38
- from: FunctionType
39
- ): FunctionType;
40
-
41
- // TODO: Remove this for the next major release, refactor the whole definition to:
42
- // declare function mimicFn<
43
- // ArgumentsType extends unknown[],
44
- // ReturnType,
45
- // FunctionType extends (...arguments: ArgumentsType) => ReturnType
46
- // >(
47
- // to: (...arguments: ArgumentsType) => ReturnType,
48
- // from: FunctionType
49
- // ): FunctionType;
50
- // export = mimicFn;
51
- default: typeof mimicFn;
52
- };
53
-
54
- export = mimicFn;
@@ -1,13 +0,0 @@
1
- 'use strict';
2
-
3
- const mimicFn = (to, from) => {
4
- for (const prop of Reflect.ownKeys(from)) {
5
- Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
6
- }
7
-
8
- return to;
9
- };
10
-
11
- module.exports = mimicFn;
12
- // TODO: Remove this for the next major release
13
- module.exports.default = mimicFn;
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
-
5
- 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:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- 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.
@@ -1,42 +0,0 @@
1
- {
2
- "name": "mimic-fn",
3
- "version": "2.1.0",
4
- "description": "Make a function mimic another one",
5
- "license": "MIT",
6
- "repository": "sindresorhus/mimic-fn",
7
- "author": {
8
- "name": "Sindre Sorhus",
9
- "email": "sindresorhus@gmail.com",
10
- "url": "sindresorhus.com"
11
- },
12
- "engines": {
13
- "node": ">=6"
14
- },
15
- "scripts": {
16
- "test": "xo && ava && tsd"
17
- },
18
- "files": [
19
- "index.js",
20
- "index.d.ts"
21
- ],
22
- "keywords": [
23
- "function",
24
- "mimic",
25
- "imitate",
26
- "rename",
27
- "copy",
28
- "inherit",
29
- "properties",
30
- "name",
31
- "func",
32
- "fn",
33
- "set",
34
- "infer",
35
- "change"
36
- ],
37
- "devDependencies": {
38
- "ava": "^1.4.1",
39
- "tsd": "^0.7.1",
40
- "xo": "^0.24.0"
41
- }
42
- }
@@ -1,69 +0,0 @@
1
- # mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn)
2
-
3
- > Make a function mimic another one
4
-
5
- Useful when you wrap a function in another function and like to preserve the original name and other properties.
6
-
7
-
8
- ## Install
9
-
10
- ```
11
- $ npm install mimic-fn
12
- ```
13
-
14
-
15
- ## Usage
16
-
17
- ```js
18
- const mimicFn = require('mimic-fn');
19
-
20
- function foo() {}
21
- foo.unicorn = '🦄';
22
-
23
- function wrapper() {
24
- return foo();
25
- }
26
-
27
- console.log(wrapper.name);
28
- //=> 'wrapper'
29
-
30
- mimicFn(wrapper, foo);
31
-
32
- console.log(wrapper.name);
33
- //=> 'foo'
34
-
35
- console.log(wrapper.unicorn);
36
- //=> '🦄'
37
- ```
38
-
39
-
40
- ## API
41
-
42
- It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
43
-
44
- ### mimicFn(to, from)
45
-
46
- Modifies the `to` function and returns it.
47
-
48
- #### to
49
-
50
- Type: `Function`
51
-
52
- Mimicking function.
53
-
54
- #### from
55
-
56
- Type: `Function`
57
-
58
- Function to mimic.
59
-
60
-
61
- ## Related
62
-
63
- - [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
64
- - [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
65
-
66
-
67
- ## License
68
-
69
- MIT © [Sindre Sorhus](https://sindresorhus.com)