serverless-spy 0.0.40 → 0.0.42

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 (64) hide show
  1. package/.jsii +3 -4
  2. package/cli/cli.ts +54 -12
  3. package/cli/package.json +1 -4
  4. package/dist/releasetag.txt +1 -1
  5. package/lib/cli/cli.d.ts +1 -0
  6. package/lib/cli/cli.js +38 -13
  7. package/lib/cli/cli.mjs +38 -13
  8. package/lib/cli/cli.ts +54 -12
  9. package/lib/cli/package.json +1 -4
  10. package/lib/src/ServerlessSpy.js +1 -1
  11. package/package.json +2 -4
  12. package/node_modules/expand-tilde/LICENSE +0 -21
  13. package/node_modules/expand-tilde/README.md +0 -80
  14. package/node_modules/expand-tilde/index.js +0 -22
  15. package/node_modules/expand-tilde/package.json +0 -67
  16. package/node_modules/get-installed-path/CHANGELOG.md +0 -99
  17. package/node_modules/get-installed-path/LICENSE +0 -21
  18. package/node_modules/get-installed-path/README.md +0 -282
  19. package/node_modules/get-installed-path/dist/index.es.js +0 -181
  20. package/node_modules/get-installed-path/dist/index.js +0 -188
  21. package/node_modules/get-installed-path/package.json +0 -101
  22. package/node_modules/global-modules/LICENSE +0 -21
  23. package/node_modules/global-modules/README.md +0 -75
  24. package/node_modules/global-modules/index.js +0 -31
  25. package/node_modules/global-modules/package.json +0 -72
  26. package/node_modules/global-prefix/LICENSE +0 -21
  27. package/node_modules/global-prefix/README.md +0 -78
  28. package/node_modules/global-prefix/index.js +0 -96
  29. package/node_modules/global-prefix/node_modules/which/CHANGELOG.md +0 -152
  30. package/node_modules/global-prefix/node_modules/which/LICENSE +0 -15
  31. package/node_modules/global-prefix/node_modules/which/README.md +0 -51
  32. package/node_modules/global-prefix/node_modules/which/bin/which +0 -52
  33. package/node_modules/global-prefix/node_modules/which/package.json +0 -30
  34. package/node_modules/global-prefix/node_modules/which/which.js +0 -135
  35. package/node_modules/global-prefix/package.json +0 -75
  36. package/node_modules/homedir-polyfill/LICENSE +0 -21
  37. package/node_modules/homedir-polyfill/README.md +0 -96
  38. package/node_modules/homedir-polyfill/index.js +0 -9
  39. package/node_modules/homedir-polyfill/package.json +0 -62
  40. package/node_modules/homedir-polyfill/polyfill.js +0 -81
  41. package/node_modules/ini/LICENSE +0 -15
  42. package/node_modules/ini/README.md +0 -102
  43. package/node_modules/ini/ini.js +0 -206
  44. package/node_modules/ini/package.json +0 -33
  45. package/node_modules/is-windows/LICENSE +0 -21
  46. package/node_modules/is-windows/README.md +0 -95
  47. package/node_modules/is-windows/index.js +0 -27
  48. package/node_modules/is-windows/package.json +0 -71
  49. package/node_modules/isexe/.npmignore +0 -2
  50. package/node_modules/isexe/LICENSE +0 -15
  51. package/node_modules/isexe/README.md +0 -51
  52. package/node_modules/isexe/index.js +0 -57
  53. package/node_modules/isexe/mode.js +0 -41
  54. package/node_modules/isexe/package.json +0 -31
  55. package/node_modules/isexe/test/basic.js +0 -221
  56. package/node_modules/isexe/windows.js +0 -42
  57. package/node_modules/parse-passwd/LICENSE +0 -21
  58. package/node_modules/parse-passwd/README.md +0 -86
  59. package/node_modules/parse-passwd/index.js +0 -56
  60. package/node_modules/parse-passwd/package.json +0 -55
  61. package/node_modules/resolve-dir/LICENSE +0 -21
  62. package/node_modules/resolve-dir/README.md +0 -88
  63. package/node_modules/resolve-dir/index.js +0 -22
  64. package/node_modules/resolve-dir/package.json +0 -73
@@ -1,51 +0,0 @@
1
- # which
2
-
3
- Like the unix `which` utility.
4
-
5
- Finds the first instance of a specified executable in the PATH
6
- environment variable. Does not cache the results, so `hash -r` is not
7
- needed when the PATH changes.
8
-
9
- ## USAGE
10
-
11
- ```javascript
12
- var which = require('which')
13
-
14
- // async usage
15
- which('node', function (er, resolvedPath) {
16
- // er is returned if no "node" is found on the PATH
17
- // if it is found, then the absolute path to the exec is returned
18
- })
19
-
20
- // sync usage
21
- // throws if not found
22
- var resolved = which.sync('node')
23
-
24
- // if nothrow option is used, returns null if not found
25
- resolved = which.sync('node', {nothrow: true})
26
-
27
- // Pass options to override the PATH and PATHEXT environment vars.
28
- which('node', { path: someOtherPath }, function (er, resolved) {
29
- if (er)
30
- throw er
31
- console.log('found at %j', resolved)
32
- })
33
- ```
34
-
35
- ## CLI USAGE
36
-
37
- Same as the BSD `which(1)` binary.
38
-
39
- ```
40
- usage: which [-as] program ...
41
- ```
42
-
43
- ## OPTIONS
44
-
45
- You may pass an options object as the second argument.
46
-
47
- - `path`: Use instead of the `PATH` environment variable.
48
- - `pathExt`: Use instead of the `PATHEXT` environment variable.
49
- - `all`: Return all matches, instead of just the first one. Note that
50
- this means the function returns an array of strings instead of a
51
- single string.
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env node
2
- var which = require("../")
3
- if (process.argv.length < 3)
4
- usage()
5
-
6
- function usage () {
7
- console.error('usage: which [-as] program ...')
8
- process.exit(1)
9
- }
10
-
11
- var all = false
12
- var silent = false
13
- var dashdash = false
14
- var args = process.argv.slice(2).filter(function (arg) {
15
- if (dashdash || !/^-/.test(arg))
16
- return true
17
-
18
- if (arg === '--') {
19
- dashdash = true
20
- return false
21
- }
22
-
23
- var flags = arg.substr(1).split('')
24
- for (var f = 0; f < flags.length; f++) {
25
- var flag = flags[f]
26
- switch (flag) {
27
- case 's':
28
- silent = true
29
- break
30
- case 'a':
31
- all = true
32
- break
33
- default:
34
- console.error('which: illegal option -- ' + flag)
35
- usage()
36
- }
37
- }
38
- return false
39
- })
40
-
41
- process.exit(args.reduce(function (pv, current) {
42
- try {
43
- var f = which.sync(current, { all: all })
44
- if (all)
45
- f = f.join('\n')
46
- if (!silent)
47
- console.log(f)
48
- return pv;
49
- } catch (e) {
50
- return 1;
51
- }
52
- }, 0))
@@ -1,30 +0,0 @@
1
- {
2
- "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
3
- "name": "which",
4
- "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
5
- "version": "1.3.1",
6
- "repository": {
7
- "type": "git",
8
- "url": "git://github.com/isaacs/node-which.git"
9
- },
10
- "main": "which.js",
11
- "bin": "./bin/which",
12
- "license": "ISC",
13
- "dependencies": {
14
- "isexe": "^2.0.0"
15
- },
16
- "devDependencies": {
17
- "mkdirp": "^0.5.0",
18
- "rimraf": "^2.6.2",
19
- "tap": "^12.0.1"
20
- },
21
- "scripts": {
22
- "test": "tap test/*.js --cov",
23
- "changelog": "bash gen-changelog.sh",
24
- "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}"
25
- },
26
- "files": [
27
- "which.js",
28
- "bin/which"
29
- ]
30
- }
@@ -1,135 +0,0 @@
1
- module.exports = which
2
- which.sync = whichSync
3
-
4
- var isWindows = process.platform === 'win32' ||
5
- process.env.OSTYPE === 'cygwin' ||
6
- process.env.OSTYPE === 'msys'
7
-
8
- var path = require('path')
9
- var COLON = isWindows ? ';' : ':'
10
- var isexe = require('isexe')
11
-
12
- function getNotFoundError (cmd) {
13
- var er = new Error('not found: ' + cmd)
14
- er.code = 'ENOENT'
15
-
16
- return er
17
- }
18
-
19
- function getPathInfo (cmd, opt) {
20
- var colon = opt.colon || COLON
21
- var pathEnv = opt.path || process.env.PATH || ''
22
- var pathExt = ['']
23
-
24
- pathEnv = pathEnv.split(colon)
25
-
26
- var pathExtExe = ''
27
- if (isWindows) {
28
- pathEnv.unshift(process.cwd())
29
- pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
30
- pathExt = pathExtExe.split(colon)
31
-
32
-
33
- // Always test the cmd itself first. isexe will check to make sure
34
- // it's found in the pathExt set.
35
- if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
36
- pathExt.unshift('')
37
- }
38
-
39
- // If it has a slash, then we don't bother searching the pathenv.
40
- // just check the file itself, and that's it.
41
- if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
42
- pathEnv = ['']
43
-
44
- return {
45
- env: pathEnv,
46
- ext: pathExt,
47
- extExe: pathExtExe
48
- }
49
- }
50
-
51
- function which (cmd, opt, cb) {
52
- if (typeof opt === 'function') {
53
- cb = opt
54
- opt = {}
55
- }
56
-
57
- var info = getPathInfo(cmd, opt)
58
- var pathEnv = info.env
59
- var pathExt = info.ext
60
- var pathExtExe = info.extExe
61
- var found = []
62
-
63
- ;(function F (i, l) {
64
- if (i === l) {
65
- if (opt.all && found.length)
66
- return cb(null, found)
67
- else
68
- return cb(getNotFoundError(cmd))
69
- }
70
-
71
- var pathPart = pathEnv[i]
72
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
73
- pathPart = pathPart.slice(1, -1)
74
-
75
- var p = path.join(pathPart, cmd)
76
- if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
77
- p = cmd.slice(0, 2) + p
78
- }
79
- ;(function E (ii, ll) {
80
- if (ii === ll) return F(i + 1, l)
81
- var ext = pathExt[ii]
82
- isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
83
- if (!er && is) {
84
- if (opt.all)
85
- found.push(p + ext)
86
- else
87
- return cb(null, p + ext)
88
- }
89
- return E(ii + 1, ll)
90
- })
91
- })(0, pathExt.length)
92
- })(0, pathEnv.length)
93
- }
94
-
95
- function whichSync (cmd, opt) {
96
- opt = opt || {}
97
-
98
- var info = getPathInfo(cmd, opt)
99
- var pathEnv = info.env
100
- var pathExt = info.ext
101
- var pathExtExe = info.extExe
102
- var found = []
103
-
104
- for (var i = 0, l = pathEnv.length; i < l; i ++) {
105
- var pathPart = pathEnv[i]
106
- if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
107
- pathPart = pathPart.slice(1, -1)
108
-
109
- var p = path.join(pathPart, cmd)
110
- if (!pathPart && /^\.[\\\/]/.test(cmd)) {
111
- p = cmd.slice(0, 2) + p
112
- }
113
- for (var j = 0, ll = pathExt.length; j < ll; j ++) {
114
- var cur = p + pathExt[j]
115
- var is
116
- try {
117
- is = isexe.sync(cur, { pathExt: pathExtExe })
118
- if (is) {
119
- if (opt.all)
120
- found.push(cur)
121
- else
122
- return cur
123
- }
124
- } catch (ex) {}
125
- }
126
- }
127
-
128
- if (opt.all && found.length)
129
- return found
130
-
131
- if (opt.nothrow)
132
- return null
133
-
134
- throw getNotFoundError(cmd)
135
- }
@@ -1,75 +0,0 @@
1
- {
2
- "name": "global-prefix",
3
- "description": "Get the npm global path prefix.",
4
- "version": "1.0.2",
5
- "homepage": "https://github.com/jonschlinkert/global-prefix",
6
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
- "contributors": [
8
- "Alexandr Bogachev (https://github.com/rmbaad)",
9
- "Brian Woodward (https://twitter.com/doowb)",
10
- "Charlike Mike Reagent (https://i.am.charlike.online)",
11
- "JasonChang (https://packagist.org/packages/jason-chang)",
12
- "Jon Schlinkert (http://twitter.com/jonschlinkert)",
13
- "Jorrit Schippers (https://www.ncode.nl)",
14
- "Mathias Rasmussen (chrome://dino)",
15
- "Ross Fenning (http://rossfenning.co.uk)"
16
- ],
17
- "repository": "jonschlinkert/global-prefix",
18
- "bugs": {
19
- "url": "https://github.com/jonschlinkert/global-prefix/issues"
20
- },
21
- "license": "MIT",
22
- "files": [
23
- "index.js"
24
- ],
25
- "main": "index.js",
26
- "engines": {
27
- "node": ">=0.10.0"
28
- },
29
- "scripts": {
30
- "test": "mocha"
31
- },
32
- "dependencies": {
33
- "expand-tilde": "^2.0.2",
34
- "homedir-polyfill": "^1.0.1",
35
- "ini": "^1.3.4",
36
- "is-windows": "^1.0.1",
37
- "which": "^1.2.14"
38
- },
39
- "devDependencies": {
40
- "gulp-format-md": "^0.1.12",
41
- "mocha": "^3.4.2"
42
- },
43
- "keywords": [
44
- "global",
45
- "module",
46
- "modules",
47
- "npm",
48
- "path",
49
- "prefix",
50
- "resolve"
51
- ],
52
- "verb": {
53
- "run": true,
54
- "toc": false,
55
- "layout": "default",
56
- "tasks": [
57
- "readme"
58
- ],
59
- "plugins": [
60
- "gulp-format-md"
61
- ],
62
- "related": {
63
- "list": [
64
- "global-modules",
65
- "global-paths"
66
- ]
67
- },
68
- "reflinks": [
69
- "verb"
70
- ],
71
- "lint": {
72
- "reflinks": true
73
- }
74
- }
75
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2016 Brian Woodward
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 all
13
- 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 THE
21
- SOFTWARE.
@@ -1,96 +0,0 @@
1
- # homedir-polyfill [![NPM version](https://img.shields.io/npm/v/homedir-polyfill.svg?style=flat)](https://www.npmjs.com/package/homedir-polyfill) [![NPM monthly downloads](https://img.shields.io/npm/dm/homedir-polyfill.svg?style=flat)](https://npmjs.org/package/homedir-polyfill) [![NPM total downloads](https://img.shields.io/npm/dt/homedir-polyfill.svg?style=flat)](https://npmjs.org/package/homedir-polyfill) [![Linux Build Status](https://img.shields.io/travis/doowb/homedir-polyfill.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/homedir-polyfill) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/homedir-polyfill.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/homedir-polyfill)
2
-
3
- > Node.js os.homedir polyfill for older versions of node.js.
4
-
5
- Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support.
6
-
7
- ## Install
8
-
9
- Install with [npm](https://www.npmjs.com/):
10
-
11
- ```sh
12
- $ npm install --save homedir-polyfill
13
- ```
14
-
15
- ## Usage
16
-
17
- ```js
18
- var homedir = require('homedir-polyfill');
19
- console.log(homedir());
20
- //=> /Users/doowb
21
- ```
22
-
23
- ## Reasoning
24
-
25
- This library is a polyfill for the [node.js os.homedir](https://nodejs.org/api/os.html#os_os_homedir) method found in modern versions of node.js.
26
-
27
- This implementation tries to follow the implementation found in `libuv` by finding the current user using the `process.geteuid()` method and the `/etc/passwd` file. This should usually work in a linux environment, but will also fallback to looking at user specific environment variables to build the user's home directory if neccessary.
28
-
29
- Since `/etc/passwd` is not available on windows platforms, this implementation will use environment variables to find the home directory.
30
-
31
- In modern versions of node.js, [os.homedir](https://nodejs.org/api/os.html#os_os_homedir) is used.
32
-
33
- ## About
34
-
35
- <details>
36
- <summary><strong>Contributing</strong></summary>
37
-
38
- Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
39
-
40
- Please read the [contributing guide](contributing.md) for advice on opening issues, pull requests, and coding standards.
41
-
42
- </details>
43
-
44
- <details>
45
- <summary><strong>Running Tests</strong></summary>
46
-
47
- Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
48
-
49
- ```sh
50
- $ npm install && npm test
51
- ```
52
-
53
- </details>
54
-
55
- <details>
56
- <summary><strong>Building docs</strong></summary>
57
-
58
- _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
59
-
60
- To generate the readme, run the following command:
61
-
62
- ```sh
63
- $ npm install -g verbose/verb#dev verb-generate-readme && verb
64
- ```
65
-
66
- </details>
67
-
68
- ### Related projects
69
-
70
- You might also be interested in these projects:
71
-
72
- [parse-passwd](https://www.npmjs.com/package/parse-passwd): Parse a passwd file into a list of users. | [homepage](https://github.com/doowb/parse-passwd "Parse a passwd file into a list of users.")
73
-
74
- ### Contributors
75
-
76
- | **Commits** | **Contributor** |
77
- | --- | --- |
78
- | 19 | [doowb](https://github.com/doowb) |
79
- | 2 | [martinheidegger](https://github.com/martinheidegger) |
80
-
81
- ### Author
82
-
83
- **Brian Woodward**
84
-
85
- * [GitHub Profile](https://github.com/doowb)
86
- * [Twitter Profile](https://twitter.com/doowb)
87
- * [LinkedIn Profile](https://linkedin.com/in/woodwardbrian)
88
-
89
- ### License
90
-
91
- Copyright © 2016 - 2019, [Brian Woodward](https://github.com/doowb).
92
- Released under the [MIT License](LICENSE).
93
-
94
- ***
95
-
96
- _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on February 21, 2019._
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- var os = require('os');
4
- if (typeof os.homedir !== 'undefined') {
5
- module.exports = os.homedir;
6
- } else {
7
- module.exports = require('./polyfill.js');
8
- }
9
-
@@ -1,62 +0,0 @@
1
- {
2
- "name": "homedir-polyfill",
3
- "description": "Node.js os.homedir polyfill for older versions of node.js.",
4
- "version": "1.0.3",
5
- "homepage": "https://github.com/doowb/homedir-polyfill",
6
- "author": "Brian Woodward (https://github.com/doowb)",
7
- "repository": "doowb/homedir-polyfill",
8
- "bugs": {
9
- "url": "https://github.com/doowb/homedir-polyfill/issues"
10
- },
11
- "license": "MIT",
12
- "files": [
13
- "index.js",
14
- "polyfill.js",
15
- "LICENSE"
16
- ],
17
- "main": "index.js",
18
- "engines": {
19
- "node": ">=0.10.0"
20
- },
21
- "scripts": {
22
- "test": "mocha"
23
- },
24
- "devDependencies": {
25
- "gulp-format-md": "^0.1.11",
26
- "mocha": "^3.1.2"
27
- },
28
- "keywords": [
29
- "home",
30
- "homedir",
31
- "homedirectory",
32
- "os",
33
- "os-homedir",
34
- "polyfill",
35
- "userhome"
36
- ],
37
- "verb": {
38
- "toc": false,
39
- "layout": "default",
40
- "tasks": [
41
- "readme"
42
- ],
43
- "plugins": [
44
- "gulp-format-md"
45
- ],
46
- "lint": {
47
- "reflinks": true
48
- },
49
- "related": {
50
- "list": [
51
- "parse-passwd"
52
- ]
53
- },
54
- "reflinks": [
55
- "verb",
56
- "verb-generate-readme"
57
- ]
58
- },
59
- "dependencies": {
60
- "parse-passwd": "^1.0.0"
61
- }
62
- }
@@ -1,81 +0,0 @@
1
- 'use strict';
2
-
3
- var fs = require('fs');
4
- var parse = require('parse-passwd');
5
-
6
- function homedir() {
7
- // The following logic is from looking at logic used in the different platform
8
- // versions of the uv_os_homedir function found in https://github.com/libuv/libuv
9
- // This is the function used in modern versions of node.js
10
-
11
- if (process.platform === 'win32') {
12
- // check the USERPROFILE first
13
- if (process.env.USERPROFILE) {
14
- return process.env.USERPROFILE;
15
- }
16
-
17
- // check HOMEDRIVE and HOMEPATH
18
- if (process.env.HOMEDRIVE && process.env.HOMEPATH) {
19
- return process.env.HOMEDRIVE + process.env.HOMEPATH;
20
- }
21
-
22
- // fallback to HOME
23
- if (process.env.HOME) {
24
- return process.env.HOME;
25
- }
26
-
27
- return null;
28
- }
29
-
30
- // check HOME environment variable first
31
- if (process.env.HOME) {
32
- return process.env.HOME;
33
- }
34
-
35
- // on linux platforms (including OSX) find the current user and get their homedir from the /etc/passwd file
36
- var passwd = tryReadFileSync('/etc/passwd');
37
- var home = find(parse(passwd), getuid());
38
- if (home) {
39
- return home;
40
- }
41
-
42
- // fallback to using user environment variables
43
- var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
44
-
45
- if (!user) {
46
- return null;
47
- }
48
-
49
- if (process.platform === 'darwin') {
50
- return '/Users/' + user;
51
- }
52
-
53
- return '/home/' + user;
54
- }
55
-
56
- function find(arr, uid) {
57
- var len = arr.length;
58
- for (var i = 0; i < len; i++) {
59
- if (+arr[i].uid === uid) {
60
- return arr[i].homedir;
61
- }
62
- }
63
- }
64
-
65
- function getuid() {
66
- if (typeof process.geteuid === 'function') {
67
- return process.geteuid();
68
- }
69
- return process.getuid();
70
- }
71
-
72
- function tryReadFileSync(fp) {
73
- try {
74
- return fs.readFileSync(fp, 'utf8');
75
- } catch (err) {
76
- return '';
77
- }
78
- }
79
-
80
- module.exports = homedir;
81
-
@@ -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.