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,64 +0,0 @@
1
- {
2
- "name": "human-signals",
3
- "version": "2.1.0",
4
- "main": "build/src/main.js",
5
- "files": [
6
- "build/src",
7
- "!~"
8
- ],
9
- "scripts": {
10
- "test": "gulp test"
11
- },
12
- "husky": {
13
- "hooks": {
14
- "pre-push": "gulp check --full"
15
- }
16
- },
17
- "description": "Human-friendly process signals",
18
- "keywords": [
19
- "signal",
20
- "signals",
21
- "handlers",
22
- "error-handling",
23
- "errors",
24
- "interrupts",
25
- "sigterm",
26
- "sigint",
27
- "irq",
28
- "process",
29
- "exit",
30
- "exit-code",
31
- "status",
32
- "operating-system",
33
- "es6",
34
- "javascript",
35
- "linux",
36
- "macos",
37
- "windows",
38
- "nodejs"
39
- ],
40
- "license": "Apache-2.0",
41
- "homepage": "https://git.io/JeluP",
42
- "repository": "ehmicky/human-signals",
43
- "bugs": {
44
- "url": "https://github.com/ehmicky/human-signals/issues"
45
- },
46
- "author": "ehmicky <ehmicky@gmail.com> (https://github.com/ehmicky)",
47
- "directories": {
48
- "lib": "src",
49
- "test": "test"
50
- },
51
- "types": "build/src/main.d.ts",
52
- "dependencies": {},
53
- "devDependencies": {
54
- "@ehmicky/dev-tasks": "^0.31.9",
55
- "ajv": "^6.12.0",
56
- "ava": "^3.5.0",
57
- "gulp": "^4.0.2",
58
- "husky": "^4.2.3",
59
- "test-each": "^2.0.0"
60
- },
61
- "engines": {
62
- "node": ">=10.17.0"
63
- }
64
- }
@@ -1,79 +0,0 @@
1
- import * as stream from 'stream';
2
-
3
- declare const isStream: {
4
- /**
5
- @returns Whether `stream` is a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
6
-
7
- @example
8
- ```
9
- import * as fs from 'fs';
10
- import isStream = require('is-stream');
11
-
12
- isStream(fs.createReadStream('unicorn.png'));
13
- //=> true
14
-
15
- isStream({});
16
- //=> false
17
- ```
18
- */
19
- (stream: unknown): stream is stream.Stream;
20
-
21
- /**
22
- @returns Whether `stream` is a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
23
-
24
- @example
25
- ```
26
- import * as fs from 'fs';
27
- import isStream = require('is-stream');
28
-
29
- isStream.writable(fs.createWriteStrem('unicorn.txt'));
30
- //=> true
31
- ```
32
- */
33
- writable(stream: unknown): stream is stream.Writable;
34
-
35
- /**
36
- @returns Whether `stream` is a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
37
-
38
- @example
39
- ```
40
- import * as fs from 'fs';
41
- import isStream = require('is-stream');
42
-
43
- isStream.readable(fs.createReadStream('unicorn.png'));
44
- //=> true
45
- ```
46
- */
47
- readable(stream: unknown): stream is stream.Readable;
48
-
49
- /**
50
- @returns Whether `stream` is a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
51
-
52
- @example
53
- ```
54
- import {Duplex} from 'stream';
55
- import isStream = require('is-stream');
56
-
57
- isStream.duplex(new Duplex());
58
- //=> true
59
- ```
60
- */
61
- duplex(stream: unknown): stream is stream.Duplex;
62
-
63
- /**
64
- @returns Whether `stream` is a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
65
-
66
- @example
67
- ```
68
- import * as fs from 'fs';
69
- import Stringify = require('streaming-json-stringify');
70
- import isStream = require('is-stream');
71
-
72
- isStream.transform(Stringify());
73
- //=> true
74
- ```
75
- */
76
- transform(input: unknown): input is stream.Transform;
77
- };
78
-
79
- export = isStream;
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- const isStream = stream =>
4
- stream !== null &&
5
- typeof stream === 'object' &&
6
- typeof stream.pipe === 'function';
7
-
8
- isStream.writable = stream =>
9
- isStream(stream) &&
10
- stream.writable !== false &&
11
- typeof stream._write === 'function' &&
12
- typeof stream._writableState === 'object';
13
-
14
- isStream.readable = stream =>
15
- isStream(stream) &&
16
- stream.readable !== false &&
17
- typeof stream._read === 'function' &&
18
- typeof stream._readableState === 'object';
19
-
20
- isStream.duplex = stream =>
21
- isStream.writable(stream) &&
22
- isStream.readable(stream);
23
-
24
- isStream.transform = stream =>
25
- isStream.duplex(stream) &&
26
- typeof stream._transform === 'function';
27
-
28
- module.exports = isStream;
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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": "is-stream",
3
- "version": "2.0.1",
4
- "description": "Check if something is a Node.js stream",
5
- "license": "MIT",
6
- "repository": "sindresorhus/is-stream",
7
- "funding": "https://github.com/sponsors/sindresorhus",
8
- "author": {
9
- "name": "Sindre Sorhus",
10
- "email": "sindresorhus@gmail.com",
11
- "url": "https://sindresorhus.com"
12
- },
13
- "engines": {
14
- "node": ">=8"
15
- },
16
- "scripts": {
17
- "test": "xo && ava && tsd"
18
- },
19
- "files": [
20
- "index.js",
21
- "index.d.ts"
22
- ],
23
- "keywords": [
24
- "stream",
25
- "type",
26
- "streams",
27
- "writable",
28
- "readable",
29
- "duplex",
30
- "transform",
31
- "check",
32
- "detect",
33
- "is"
34
- ],
35
- "devDependencies": {
36
- "@types/node": "^11.13.6",
37
- "ava": "^1.4.1",
38
- "tempy": "^0.3.0",
39
- "tsd": "^0.7.2",
40
- "xo": "^0.24.0"
41
- }
42
- }
@@ -1,60 +0,0 @@
1
- # is-stream
2
-
3
- > Check if something is a [Node.js stream](https://nodejs.org/api/stream.html)
4
-
5
- ## Install
6
-
7
- ```
8
- $ npm install is-stream
9
- ```
10
-
11
- ## Usage
12
-
13
- ```js
14
- const fs = require('fs');
15
- const isStream = require('is-stream');
16
-
17
- isStream(fs.createReadStream('unicorn.png'));
18
- //=> true
19
-
20
- isStream({});
21
- //=> false
22
- ```
23
-
24
- ## API
25
-
26
- ### isStream(stream)
27
-
28
- Returns a `boolean` for whether it's a [`Stream`](https://nodejs.org/api/stream.html#stream_stream).
29
-
30
- #### isStream.writable(stream)
31
-
32
- Returns a `boolean` for whether it's a [`stream.Writable`](https://nodejs.org/api/stream.html#stream_class_stream_writable).
33
-
34
- #### isStream.readable(stream)
35
-
36
- Returns a `boolean` for whether it's a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable).
37
-
38
- #### isStream.duplex(stream)
39
-
40
- Returns a `boolean` for whether it's a [`stream.Duplex`](https://nodejs.org/api/stream.html#stream_class_stream_duplex).
41
-
42
- #### isStream.transform(stream)
43
-
44
- Returns a `boolean` for whether it's a [`stream.Transform`](https://nodejs.org/api/stream.html#stream_class_stream_transform).
45
-
46
- ## Related
47
-
48
- - [is-file-stream](https://github.com/jamestalmage/is-file-stream) - Detect if a stream is a file stream
49
-
50
- ---
51
-
52
- <div align="center">
53
- <b>
54
- <a href="https://tidelift.com/subscription/pkg/npm-is-stream?utm_source=npm-is-stream&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
55
- </b>
56
- <br>
57
- <sub>
58
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
59
- </sub>
60
- </div>
@@ -1,31 +0,0 @@
1
- 'use strict';
2
- const os = require('os');
3
- const fs = require('fs');
4
- const isDocker = require('is-docker');
5
-
6
- const isWsl = () => {
7
- if (process.platform !== 'linux') {
8
- return false;
9
- }
10
-
11
- if (os.release().toLowerCase().includes('microsoft')) {
12
- if (isDocker()) {
13
- return false;
14
- }
15
-
16
- return true;
17
- }
18
-
19
- try {
20
- return fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') ?
21
- !isDocker() : false;
22
- } catch (_) {
23
- return false;
24
- }
25
- };
26
-
27
- if (process.env.__IS_WSL_TEST__) {
28
- module.exports = isWsl;
29
- } else {
30
- module.exports = isWsl();
31
- }
@@ -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,5 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
- const isDocker = require('.');
4
-
5
- process.exitCode = isDocker() ? 0 : 2;
@@ -1,15 +0,0 @@
1
- /**
2
- Check if the process is running inside a Docker container.
3
-
4
- @example
5
- ```
6
- import isDocker = require('is-docker');
7
-
8
- if (isDocker()) {
9
- console.log('Running inside a Docker container');
10
- }
11
- ```
12
- */
13
- declare function isDocker(): boolean;
14
-
15
- export = isDocker;
@@ -1,29 +0,0 @@
1
- 'use strict';
2
- const fs = require('fs');
3
-
4
- let isDocker;
5
-
6
- function hasDockerEnv() {
7
- try {
8
- fs.statSync('/.dockerenv');
9
- return true;
10
- } catch (_) {
11
- return false;
12
- }
13
- }
14
-
15
- function hasDockerCGroup() {
16
- try {
17
- return fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');
18
- } catch (_) {
19
- return false;
20
- }
21
- }
22
-
23
- module.exports = () => {
24
- if (isDocker === undefined) {
25
- isDocker = hasDockerEnv() || hasDockerCGroup();
26
- }
27
-
28
- return isDocker;
29
- };
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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": "is-docker",
3
- "version": "2.2.1",
4
- "description": "Check if the process is running inside a Docker container",
5
- "license": "MIT",
6
- "repository": "sindresorhus/is-docker",
7
- "funding": "https://github.com/sponsors/sindresorhus",
8
- "author": {
9
- "name": "Sindre Sorhus",
10
- "email": "sindresorhus@gmail.com",
11
- "url": "https://sindresorhus.com"
12
- },
13
- "bin": "cli.js",
14
- "engines": {
15
- "node": ">=8"
16
- },
17
- "scripts": {
18
- "test": "xo && ava && tsd"
19
- },
20
- "files": [
21
- "index.js",
22
- "index.d.ts",
23
- "cli.js"
24
- ],
25
- "keywords": [
26
- "detect",
27
- "docker",
28
- "dockerized",
29
- "container",
30
- "inside",
31
- "is",
32
- "env",
33
- "environment",
34
- "process"
35
- ],
36
- "devDependencies": {
37
- "ava": "^1.4.1",
38
- "sinon": "^7.3.2",
39
- "tsd": "^0.7.2",
40
- "xo": "^0.24.0"
41
- }
42
- }
@@ -1,27 +0,0 @@
1
- # is-docker
2
-
3
- > Check if the process is running inside a Docker container
4
-
5
- ## Install
6
-
7
- ```
8
- $ npm install is-docker
9
- ```
10
-
11
- ## Usage
12
-
13
- ```js
14
- const isDocker = require('is-docker');
15
-
16
- if (isDocker()) {
17
- console.log('Running inside a Docker container');
18
- }
19
- ```
20
-
21
- ## CLI
22
-
23
- ```
24
- $ is-docker
25
- ```
26
-
27
- Exits with code 0 if inside a Docker container and 2 if not.
@@ -1,36 +0,0 @@
1
- # is-wsl [![Build Status](https://travis-ci.org/sindresorhus/is-wsl.svg?branch=master)](https://travis-ci.org/sindresorhus/is-wsl)
2
-
3
- > Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows)
4
-
5
- Can be useful if you need to work around unimplemented or buggy features in WSL. Supports both WSL 1 and WSL 2.
6
-
7
-
8
- ## Install
9
-
10
- ```
11
- $ npm install is-wsl
12
- ```
13
-
14
-
15
- ## Usage
16
-
17
- ```js
18
- const isWsl = require('is-wsl');
19
-
20
- // When running inside Windows Subsystem for Linux
21
- console.log(isWsl);
22
- //=> true
23
- ```
24
-
25
-
26
- ---
27
-
28
- <div align="center">
29
- <b>
30
- <a href="https://tidelift.com/subscription/pkg/npm-is-wsl?utm_source=npm-is-wsl&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
31
- </b>
32
- <br>
33
- <sub>
34
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
35
- </sub>
36
- </div>
@@ -1,2 +0,0 @@
1
- .nyc_output/
2
- coverage/
@@ -1,15 +0,0 @@
1
- The ISC License
2
-
3
- Copyright (c) Isaac Z. Schlueter and Contributors
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted, provided that the above
7
- copyright notice and this permission notice appear in all copies.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
- IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,51 +0,0 @@
1
- # isexe
2
-
3
- Minimal module to check if a file is executable, and a normal file.
4
-
5
- Uses `fs.stat` and tests against the `PATHEXT` environment variable on
6
- Windows.
7
-
8
- ## USAGE
9
-
10
- ```javascript
11
- var isexe = require('isexe')
12
- isexe('some-file-name', function (err, isExe) {
13
- if (err) {
14
- console.error('probably file does not exist or something', err)
15
- } else if (isExe) {
16
- console.error('this thing can be run')
17
- } else {
18
- console.error('cannot be run')
19
- }
20
- })
21
-
22
- // same thing but synchronous, throws errors
23
- var isExe = isexe.sync('some-file-name')
24
-
25
- // treat errors as just "not executable"
26
- isexe('maybe-missing-file', { ignoreErrors: true }, callback)
27
- var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
28
- ```
29
-
30
- ## API
31
-
32
- ### `isexe(path, [options], [callback])`
33
-
34
- Check if the path is executable. If no callback provided, and a
35
- global `Promise` object is available, then a Promise will be returned.
36
-
37
- Will raise whatever errors may be raised by `fs.stat`, unless
38
- `options.ignoreErrors` is set to true.
39
-
40
- ### `isexe.sync(path, [options])`
41
-
42
- Same as `isexe` but returns the value and throws any errors raised.
43
-
44
- ### Options
45
-
46
- * `ignoreErrors` Treat all errors as "no, this is not executable", but
47
- don't raise them.
48
- * `uid` Number to use as the user id
49
- * `gid` Number to use as the group id
50
- * `pathExt` List of path extensions to use instead of `PATHEXT`
51
- environment variable on Windows.
@@ -1,57 +0,0 @@
1
- var fs = require('fs')
2
- var core
3
- if (process.platform === 'win32' || global.TESTING_WINDOWS) {
4
- core = require('./windows.js')
5
- } else {
6
- core = require('./mode.js')
7
- }
8
-
9
- module.exports = isexe
10
- isexe.sync = sync
11
-
12
- function isexe (path, options, cb) {
13
- if (typeof options === 'function') {
14
- cb = options
15
- options = {}
16
- }
17
-
18
- if (!cb) {
19
- if (typeof Promise !== 'function') {
20
- throw new TypeError('callback not provided')
21
- }
22
-
23
- return new Promise(function (resolve, reject) {
24
- isexe(path, options || {}, function (er, is) {
25
- if (er) {
26
- reject(er)
27
- } else {
28
- resolve(is)
29
- }
30
- })
31
- })
32
- }
33
-
34
- core(path, options || {}, function (er, is) {
35
- // ignore EACCES because that just means we aren't allowed to run it
36
- if (er) {
37
- if (er.code === 'EACCES' || options && options.ignoreErrors) {
38
- er = null
39
- is = false
40
- }
41
- }
42
- cb(er, is)
43
- })
44
- }
45
-
46
- function sync (path, options) {
47
- // my kingdom for a filtered catch
48
- try {
49
- return core.sync(path, options || {})
50
- } catch (er) {
51
- if (options && options.ignoreErrors || er.code === 'EACCES') {
52
- return false
53
- } else {
54
- throw er
55
- }
56
- }
57
- }
@@ -1,41 +0,0 @@
1
- module.exports = isexe
2
- isexe.sync = sync
3
-
4
- var fs = require('fs')
5
-
6
- function isexe (path, options, cb) {
7
- fs.stat(path, function (er, stat) {
8
- cb(er, er ? false : checkStat(stat, options))
9
- })
10
- }
11
-
12
- function sync (path, options) {
13
- return checkStat(fs.statSync(path), options)
14
- }
15
-
16
- function checkStat (stat, options) {
17
- return stat.isFile() && checkMode(stat, options)
18
- }
19
-
20
- function checkMode (stat, options) {
21
- var mod = stat.mode
22
- var uid = stat.uid
23
- var gid = stat.gid
24
-
25
- var myUid = options.uid !== undefined ?
26
- options.uid : process.getuid && process.getuid()
27
- var myGid = options.gid !== undefined ?
28
- options.gid : process.getgid && process.getgid()
29
-
30
- var u = parseInt('100', 8)
31
- var g = parseInt('010', 8)
32
- var o = parseInt('001', 8)
33
- var ug = u | g
34
-
35
- var ret = (mod & o) ||
36
- (mod & g) && gid === myGid ||
37
- (mod & u) && uid === myUid ||
38
- (mod & ug) && myUid === 0
39
-
40
- return ret
41
- }