summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/osenv
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/osenv')
-rw-r--r--deps/npm/node_modules/osenv/node_modules/os-homedir/index.js24
-rw-r--r--deps/npm/node_modules/osenv/node_modules/os-homedir/license21
-rw-r--r--deps/npm/node_modules/osenv/node_modules/os-homedir/package.json70
-rw-r--r--deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md33
-rw-r--r--deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json5
-rw-r--r--deps/npm/node_modules/osenv/osenv.js5
-rw-r--r--deps/npm/node_modules/osenv/package.json42
-rw-r--r--deps/npm/node_modules/osenv/x.tap39
8 files changed, 226 insertions, 13 deletions
diff --git a/deps/npm/node_modules/osenv/node_modules/os-homedir/index.js b/deps/npm/node_modules/osenv/node_modules/os-homedir/index.js
new file mode 100644
index 0000000000..758ff653df
--- /dev/null
+++ b/deps/npm/node_modules/osenv/node_modules/os-homedir/index.js
@@ -0,0 +1,24 @@
+'use strict';
+var os = require('os');
+
+function homedir() {
+ var env = process.env;
+ var home = env.HOME;
+ var user = env.LOGNAME || env.USER || env.LNAME || env.USERNAME;
+
+ if (process.platform === 'win32') {
+ return env.USERPROFILE || env.HOMEDRIVE + env.HOMEPATH || home || null;
+ }
+
+ if (process.platform === 'darwin') {
+ return home || (user ? '/Users/' + user : null);
+ }
+
+ if (process.platform === 'linux') {
+ return home || (user ? (process.getuid() === 0 ? '/root' : '/home/' + user) : null);
+ }
+
+ return home || null;
+}
+
+module.exports = typeof os.homedir === 'function' ? os.homedir : homedir;
diff --git a/deps/npm/node_modules/osenv/node_modules/os-homedir/license b/deps/npm/node_modules/osenv/node_modules/os-homedir/license
new file mode 100644
index 0000000000..654d0bfe94
--- /dev/null
+++ b/deps/npm/node_modules/osenv/node_modules/os-homedir/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
diff --git a/deps/npm/node_modules/osenv/node_modules/os-homedir/package.json b/deps/npm/node_modules/osenv/node_modules/os-homedir/package.json
new file mode 100644
index 0000000000..c9a3b650c0
--- /dev/null
+++ b/deps/npm/node_modules/osenv/node_modules/os-homedir/package.json
@@ -0,0 +1,70 @@
+{
+ "name": "os-homedir",
+ "version": "1.0.0",
+ "description": "io.js 2.3.0 os.homedir() ponyfill",
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/os-homedir.git"
+ },
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "scripts": {
+ "test": "node test.js"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "built-in",
+ "core",
+ "ponyfill",
+ "polyfill",
+ "shim",
+ "os",
+ "homedir",
+ "home",
+ "dir",
+ "directory",
+ "folder",
+ "user",
+ "path"
+ ],
+ "devDependencies": {
+ "ava": "0.0.4",
+ "path-exists": "^1.0.0"
+ },
+ "gitHead": "7e39e2e049de404f06233fa617ecf46fed997a78",
+ "bugs": {
+ "url": "https://github.com/sindresorhus/os-homedir/issues"
+ },
+ "homepage": "https://github.com/sindresorhus/os-homedir",
+ "_id": "os-homedir@1.0.0",
+ "_shasum": "e37078bc61b5869063053897257e39ec1261b702",
+ "_from": "os-homedir@>=1.0.0 <2.0.0",
+ "_npmVersion": "2.11.1",
+ "_nodeVersion": "2.3.0",
+ "_npmUser": {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ },
+ "dist": {
+ "shasum": "e37078bc61b5869063053897257e39ec1261b702",
+ "tarball": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.0.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "sindresorhus",
+ "email": "sindresorhus@gmail.com"
+ }
+ ],
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.0.tgz",
+ "readme": "ERROR: No README data found!"
+}
diff --git a/deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md b/deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md
new file mode 100644
index 0000000000..4851f104ea
--- /dev/null
+++ b/deps/npm/node_modules/osenv/node_modules/os-homedir/readme.md
@@ -0,0 +1,33 @@
+# os-homedir [![Build Status](https://travis-ci.org/sindresorhus/os-homedir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-homedir)
+
+> io.js 2.3.0 [`os.homedir()`](https://iojs.org/api/os.html#os_os_homedir) ponyfill
+
+> Ponyfill: A polyfill that doesn't overwrite the native method
+
+
+## Install
+
+```
+$ npm install --save os-homedir
+```
+
+
+## Usage
+
+```js
+var osHomedir = require('os-homedir');
+
+console.log(osHomedir());
+//=> /Users/sindresorhus
+```
+
+
+## Related
+
+- [user-home](https://github.com/sindresorhus/user-home) - Same as this module but caches the result
+- [home-or-tmp](https://github.com/sindresorhus/home-or-tmp) - Get the user home directory with fallback to the system temp directory
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json
index 1857f8f5fa..f8b2682bf8 100644
--- a/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json
+++ b/deps/npm/node_modules/osenv/node_modules/os-tmpdir/package.json
@@ -5,7 +5,7 @@
"license": "MIT",
"repository": {
"type": "git",
- "url": "git+https://github.com/sindresorhus/os-tmpdir.git"
+ "url": "https://github.com/sindresorhus/os-tmpdir"
},
"author": {
"name": "Sindre Sorhus",
@@ -65,6 +65,5 @@
}
],
"directories": {},
- "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz",
- "readme": "ERROR: No README data found!"
+ "_resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz"
}
diff --git a/deps/npm/node_modules/osenv/osenv.js b/deps/npm/node_modules/osenv/osenv.js
index 0cabcba66e..702a95b98a 100644
--- a/deps/npm/node_modules/osenv/osenv.js
+++ b/deps/npm/node_modules/osenv/osenv.js
@@ -2,6 +2,7 @@ var isWindows = process.platform === 'win32'
var path = require('path')
var exec = require('child_process').exec
var osTmpdir = require('os-tmpdir')
+var osHomedir = require('os-homedir')
// looking up envs is a bit costly.
// Also, sometimes we want to have a fallback
@@ -50,9 +51,7 @@ memo('tmpdir', function () {
})
memo('home', function () {
- return ( isWindows ? process.env.USERPROFILE
- : process.env.HOME
- )
+ return osHomedir()
})
memo('path', function () {
diff --git a/deps/npm/node_modules/osenv/package.json b/deps/npm/node_modules/osenv/package.json
index 851f19b51e..d5718bdb11 100644
--- a/deps/npm/node_modules/osenv/package.json
+++ b/deps/npm/node_modules/osenv/package.json
@@ -1,11 +1,12 @@
{
"name": "osenv",
- "version": "0.1.2",
+ "version": "0.1.3",
"main": "osenv.js",
"directories": {
"test": "test"
},
"dependencies": {
+ "os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
},
"devDependencies": {
@@ -34,14 +35,41 @@
},
"license": "ISC",
"description": "Look up environment settings specific to different operating systems",
- "readme": "# osenv\n\nLook up environment settings specific to different operating systems.\n\n## Usage\n\n```javascript\nvar osenv = require('osenv')\nvar path = osenv.path()\nvar user = osenv.user()\n// etc.\n\n// Some things are not reliably in the env, and have a fallback command:\nvar h = osenv.hostname(function (er, hostname) {\n h = hostname\n})\n// This will still cause it to be memoized, so calling osenv.hostname()\n// is now an immediate operation.\n\n// You can always send a cb, which will get called in the nextTick\n// if it's been memoized, or wait for the fallback data if it wasn't\n// found in the environment.\nosenv.hostname(function (er, hostname) {\n if (er) console.error('error looking up hostname')\n else console.log('this machine calls itself %s', hostname)\n})\n```\n\n## osenv.hostname()\n\nThe machine name. Calls `hostname` if not found.\n\n## osenv.user()\n\nThe currently logged-in user. Calls `whoami` if not found.\n\n## osenv.prompt()\n\nEither PS1 on unix, or PROMPT on Windows.\n\n## osenv.tmpdir()\n\nThe place where temporary files should be created.\n\n## osenv.home()\n\nNo place like it.\n\n## osenv.path()\n\nAn array of the places that the operating system will search for\nexecutables.\n\n## osenv.editor() \n\nReturn the executable name of the editor program. This uses the EDITOR\nand VISUAL environment variables, and falls back to `vi` on Unix, or\n`notepad.exe` on Windows.\n\n## osenv.shell()\n\nThe SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash'\nor 'cmd'.\n",
- "readmeFilename": "README.md",
- "gitHead": "88a154d6d8ad39fefb9af2fe1b306cd12fb6d6d0",
+ "gitHead": "f746b3405d8f9e28054d11b97e1436f6a15016c4",
"bugs": {
"url": "https://github.com/npm/osenv/issues"
},
"homepage": "https://github.com/npm/osenv#readme",
- "_id": "osenv@0.1.2",
- "_shasum": "f4d23ebeceaef078600fb78c0ea58fac5996a02d",
- "_from": "osenv@latest"
+ "_id": "osenv@0.1.3",
+ "_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217",
+ "_from": "osenv@0.1.3",
+ "_npmVersion": "3.0.0",
+ "_nodeVersion": "2.2.1",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "isaacs@npmjs.com"
+ },
+ "dist": {
+ "shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217",
+ "tarball": "http://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "robertkowalski",
+ "email": "rok@kowalski.gd"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ }
+ ],
+ "_resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz"
}
diff --git a/deps/npm/node_modules/osenv/x.tap b/deps/npm/node_modules/osenv/x.tap
new file mode 100644
index 0000000000..90d8472087
--- /dev/null
+++ b/deps/npm/node_modules/osenv/x.tap
@@ -0,0 +1,39 @@
+TAP version 13
+ # Subtest: test/unix.js
+ TAP version 13
+ # Subtest: basic unix sanity test
+ ok 1 - should be equal
+ ok 2 - should be equal
+ ok 3 - should be equal
+ ok 4 - should be equivalent
+ ok 5 - should be equal
+ ok 6 - should be equal
+ ok 7 - should be equal
+ ok 8 - should be equal
+ ok 9 - should be equal
+ ok 10 - should be equal
+ ok 11 - should be equal
+ ok 12 - should be equal
+ ok 13 - should be equal
+ ok 14 - should be equal
+ 1..14
+ ok 1 - basic unix sanity test # time=10.712ms
+
+ 1..1
+ # time=18.422ms
+ok 1 - test/unix.js # time=169.827ms
+
+ # Subtest: test/windows.js
+ TAP version 13
+ 1..0 # Skip windows tests, this is not windows
+
+ok 2 - test/windows.js # SKIP Skip windows tests, this is not windows
+
+ # Subtest: test/nada.js
+ TAP version 13
+ 1..0
+
+ok 2 - test/nada.js
+
+1..3
+# time=274.247ms