Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D0CD3180CA for ; Mon, 22 Feb 2016 23:01:49 +0000 (UTC) Received: (qmail 5069 invoked by uid 500); 22 Feb 2016 23:01:49 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 4985 invoked by uid 500); 22 Feb 2016 23:01:49 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 4213 invoked by uid 99); 22 Feb 2016 23:01:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2016 23:01:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 63FA3E048C; Mon, 22 Feb 2016 23:01:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: steven@apache.org To: commits@cordova.apache.org Date: Mon, 22 Feb 2016 23:02:06 -0000 Message-Id: <89feb98efc0c4533905ce8efbb300cac@git.apache.org> In-Reply-To: <30797fcae60f40839a3777ad565a8c57@git.apache.org> References: <30797fcae60f40839a3777ad565a8c57@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [20/55] [abbrv] [partial] mac commit: CB-10668 added node_modules directory http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/os-homedir/readme.md ---------------------------------------------------------------------- diff --git a/node_modules/os-homedir/readme.md b/node_modules/os-homedir/readme.md new file mode 100644 index 0000000..4851f10 --- /dev/null +++ b/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) http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/os-tmpdir/index.js ---------------------------------------------------------------------- diff --git a/node_modules/os-tmpdir/index.js b/node_modules/os-tmpdir/index.js new file mode 100644 index 0000000..52d90bf --- /dev/null +++ b/node_modules/os-tmpdir/index.js @@ -0,0 +1,25 @@ +'use strict'; +var isWindows = process.platform === 'win32'; +var trailingSlashRe = isWindows ? /[^:]\\$/ : /.\/$/; + +// https://github.com/nodejs/io.js/blob/3e7a14381497a3b73dda68d05b5130563cdab420/lib/os.js#L25-L43 +module.exports = function () { + var path; + + if (isWindows) { + path = process.env.TEMP || + process.env.TMP || + (process.env.SystemRoot || process.env.windir) + '\\temp'; + } else { + path = process.env.TMPDIR || + process.env.TMP || + process.env.TEMP || + '/tmp'; + } + + if (trailingSlashRe.test(path)) { + path = path.slice(0, -1); + } + + return path; +}; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/os-tmpdir/license ---------------------------------------------------------------------- diff --git a/node_modules/os-tmpdir/license b/node_modules/os-tmpdir/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/os-tmpdir/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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. http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/os-tmpdir/package.json ---------------------------------------------------------------------- diff --git a/node_modules/os-tmpdir/package.json b/node_modules/os-tmpdir/package.json new file mode 100644 index 0000000..097f803 --- /dev/null +++ b/node_modules/os-tmpdir/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + "os-tmpdir@^1.0.0", + "/Users/steveng/repo/cordova/cordova-osx/node_modules/osenv" + ] + ], + "_from": "os-tmpdir@>=1.0.0 <2.0.0", + "_id": "os-tmpdir@1.0.1", + "_inCache": true, + "_installable": true, + "_location": "/os-tmpdir", + "_nodeVersion": "0.12.3", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.9.1", + "_phantomChildren": {}, + "_requested": { + "name": "os-tmpdir", + "raw": "os-tmpdir@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/osenv" + ], + "_resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz", + "_shasum": "e9b423a1edaf479882562e92ed71d7743a071b6e", + "_shrinkwrap": null, + "_spec": "os-tmpdir@^1.0.0", + "_where": "/Users/steveng/repo/cordova/cordova-osx/node_modules/osenv", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/os-tmpdir/issues" + }, + "dependencies": {}, + "description": "Node.js os.tmpdir() ponyfill", + "devDependencies": { + "ava": "0.0.4" + }, + "directories": {}, + "dist": { + "shasum": "e9b423a1edaf479882562e92ed71d7743a071b6e", + "tarball": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "5c5d355f81378980db629d60128ad03e02b1c1e5", + "homepage": "https://github.com/sindresorhus/os-tmpdir", + "keywords": [ + "built-in", + "core", + "dir", + "directory", + "env", + "environment", + "os", + "polyfill", + "ponyfill", + "shim", + "temp", + "tempdir", + "tmp", + "tmpdir" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "os-tmpdir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/os-tmpdir.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.1" +} http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/os-tmpdir/readme.md ---------------------------------------------------------------------- diff --git a/node_modules/os-tmpdir/readme.md b/node_modules/os-tmpdir/readme.md new file mode 100644 index 0000000..54d4c6e --- /dev/null +++ b/node_modules/os-tmpdir/readme.md @@ -0,0 +1,36 @@ +# os-tmpdir [![Build Status](https://travis-ci.org/sindresorhus/os-tmpdir.svg?branch=master)](https://travis-ci.org/sindresorhus/os-tmpdir) + +> Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#os_os_tmpdir) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + +Use this instead of `require('os').tmpdir()` to get a consistent behaviour on different Node.js versions (even 0.8). + +*This is actually taken from io.js 2.0.2 as it contains some fixes that haven't bubbled up to Node.js yet.* + + +## Install + +``` +$ npm install --save os-tmpdir +``` + + +## Usage + +```js +var osTmpdir = require('os-tmpdir'); + +osTmpdir(); +//=> /var/folders/m3/5574nnhn0yj488ccryqr7tc80000gn/T +``` + + +## API + +See the [`os.tmpdir()` docs](https://nodejs.org/api/os.html#os_os_tmpdir). + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/.npmignore ---------------------------------------------------------------------- diff --git a/node_modules/osenv/.npmignore b/node_modules/osenv/.npmignore new file mode 100644 index 0000000..8c23dee --- /dev/null +++ b/node_modules/osenv/.npmignore @@ -0,0 +1,13 @@ +*.swp +.*.swp + +.DS_Store +*~ +.project +.settings +npm-debug.log +coverage.html +.idea +lib-cov + +node_modules http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/.travis.yml ---------------------------------------------------------------------- diff --git a/node_modules/osenv/.travis.yml b/node_modules/osenv/.travis.yml new file mode 100644 index 0000000..99f2bbf --- /dev/null +++ b/node_modules/osenv/.travis.yml @@ -0,0 +1,9 @@ +language: node_js +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/LICENSE ---------------------------------------------------------------------- diff --git a/node_modules/osenv/LICENSE b/node_modules/osenv/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/osenv/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/README.md ---------------------------------------------------------------------- diff --git a/node_modules/osenv/README.md b/node_modules/osenv/README.md new file mode 100644 index 0000000..08fd900 --- /dev/null +++ b/node_modules/osenv/README.md @@ -0,0 +1,63 @@ +# osenv + +Look up environment settings specific to different operating systems. + +## Usage + +```javascript +var osenv = require('osenv') +var path = osenv.path() +var user = osenv.user() +// etc. + +// Some things are not reliably in the env, and have a fallback command: +var h = osenv.hostname(function (er, hostname) { + h = hostname +}) +// This will still cause it to be memoized, so calling osenv.hostname() +// is now an immediate operation. + +// You can always send a cb, which will get called in the nextTick +// if it's been memoized, or wait for the fallback data if it wasn't +// found in the environment. +osenv.hostname(function (er, hostname) { + if (er) console.error('error looking up hostname') + else console.log('this machine calls itself %s', hostname) +}) +``` + +## osenv.hostname() + +The machine name. Calls `hostname` if not found. + +## osenv.user() + +The currently logged-in user. Calls `whoami` if not found. + +## osenv.prompt() + +Either PS1 on unix, or PROMPT on Windows. + +## osenv.tmpdir() + +The place where temporary files should be created. + +## osenv.home() + +No place like it. + +## osenv.path() + +An array of the places that the operating system will search for +executables. + +## osenv.editor() + +Return the executable name of the editor program. This uses the EDITOR +and VISUAL environment variables, and falls back to `vi` on Unix, or +`notepad.exe` on Windows. + +## osenv.shell() + +The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' +or 'cmd'. http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/osenv.js ---------------------------------------------------------------------- diff --git a/node_modules/osenv/osenv.js b/node_modules/osenv/osenv.js new file mode 100644 index 0000000..702a95b --- /dev/null +++ b/node_modules/osenv/osenv.js @@ -0,0 +1,72 @@ +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 +// Pass in a callback to wait for the fallback on failures +// After the first lookup, always returns the same thing. +function memo (key, lookup, fallback) { + var fell = false + var falling = false + exports[key] = function (cb) { + var val = lookup() + if (!val && !fell && !falling && fallback) { + fell = true + falling = true + exec(fallback, function (er, output, stderr) { + falling = false + if (er) return // oh well, we tried + val = output.trim() + }) + } + exports[key] = function (cb) { + if (cb) process.nextTick(cb.bind(null, null, val)) + return val + } + if (cb && !falling) process.nextTick(cb.bind(null, null, val)) + return val + } +} + +memo('user', function () { + return ( isWindows + ? process.env.USERDOMAIN + '\\' + process.env.USERNAME + : process.env.USER + ) +}, 'whoami') + +memo('prompt', function () { + return isWindows ? process.env.PROMPT : process.env.PS1 +}) + +memo('hostname', function () { + return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME +}, 'hostname') + +memo('tmpdir', function () { + return osTmpdir() +}) + +memo('home', function () { + return osHomedir() +}) + +memo('path', function () { + return (process.env.PATH || + process.env.Path || + process.env.path).split(isWindows ? ';' : ':') +}) + +memo('editor', function () { + return process.env.EDITOR || + process.env.VISUAL || + (isWindows ? 'notepad.exe' : 'vi') +}) + +memo('shell', function () { + return isWindows ? process.env.ComSpec || 'cmd' + : process.env.SHELL || 'bash' +}) http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/package.json ---------------------------------------------------------------------- diff --git a/node_modules/osenv/package.json b/node_modules/osenv/package.json new file mode 100644 index 0000000..8360a97 --- /dev/null +++ b/node_modules/osenv/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + "osenv@^0.1.3", + "/Users/steveng/repo/cordova/cordova-osx/node_modules/cordova-common" + ] + ], + "_from": "osenv@>=0.1.3 <0.2.0", + "_id": "osenv@0.1.3", + "_inCache": true, + "_installable": true, + "_location": "/osenv", + "_nodeVersion": "2.2.1", + "_npmUser": { + "email": "isaacs@npmjs.com", + "name": "isaacs" + }, + "_npmVersion": "3.0.0", + "_phantomChildren": {}, + "_requested": { + "name": "osenv", + "raw": "osenv@^0.1.3", + "rawSpec": "^0.1.3", + "scope": null, + "spec": ">=0.1.3 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/cordova-common" + ], + "_resolved": "http://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz", + "_shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "_shrinkwrap": null, + "_spec": "osenv@^0.1.3", + "_where": "/Users/steveng/repo/cordova/cordova-osx/node_modules/cordova-common", + "author": { + "email": "i@izs.me", + "name": "Isaac Z. Schlueter", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/npm/osenv/issues" + }, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + }, + "description": "Look up environment settings specific to different operating systems", + "devDependencies": { + "tap": "^1.2.0" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "83cf05c6d6458fc4d5ac6362ea325d92f2754217", + "tarball": "http://registry.npmjs.org/osenv/-/osenv-0.1.3.tgz" + }, + "gitHead": "f746b3405d8f9e28054d11b97e1436f6a15016c4", + "homepage": "https://github.com/npm/osenv#readme", + "keywords": [ + "environment", + "home", + "path", + "prompt", + "ps1", + "tmpdir", + "variable" + ], + "license": "ISC", + "main": "osenv.js", + "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" + } + ], + "name": "osenv", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/npm/osenv.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.3" +} http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/test/unix.js ---------------------------------------------------------------------- diff --git a/node_modules/osenv/test/unix.js b/node_modules/osenv/test/unix.js new file mode 100644 index 0000000..f87cbfb --- /dev/null +++ b/node_modules/osenv/test/unix.js @@ -0,0 +1,71 @@ +// only run this test on windows +// pretending to be another platform is too hacky, since it breaks +// how the underlying system looks up module paths and runs +// child processes, and all that stuff is cached. +if (process.platform === 'win32') { + console.log('TAP Version 13\n' + + '1..0\n' + + '# Skip unix tests, this is not unix\n') + return +} +var tap = require('tap') + +// like unix, but funny +process.env.USER = 'sirUser' +process.env.HOME = '/home/sirUser' +process.env.HOSTNAME = 'my-machine' +process.env.TMPDIR = '/tmpdir' +process.env.TMP = '/tmp' +process.env.TEMP = '/temp' +process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin' +process.env.PS1 = '(o_o) $ ' +process.env.EDITOR = 'edit' +process.env.VISUAL = 'visualedit' +process.env.SHELL = 'zsh' + +tap.test('basic unix sanity test', function (t) { + var osenv = require('../osenv.js') + + t.equal(osenv.user(), process.env.USER) + t.equal(osenv.home(), process.env.HOME) + t.equal(osenv.hostname(), process.env.HOSTNAME) + t.same(osenv.path(), process.env.PATH.split(':')) + t.equal(osenv.prompt(), process.env.PS1) + t.equal(osenv.tmpdir(), process.env.TMPDIR) + + // mildly evil, but it's for a test. + process.env.TMPDIR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TMP) + + process.env.TMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TEMP) + + process.env.TEMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + osenv.home = function () { return null } + t.equal(osenv.tmpdir(), '/tmp') + + t.equal(osenv.editor(), 'edit') + process.env.EDITOR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'visualedit') + + process.env.VISUAL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'vi') + + t.equal(osenv.shell(), 'zsh') + process.env.SHELL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.shell(), 'bash') + + t.end() +}) http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/test/windows.js ---------------------------------------------------------------------- diff --git a/node_modules/osenv/test/windows.js b/node_modules/osenv/test/windows.js new file mode 100644 index 0000000..c9d837a --- /dev/null +++ b/node_modules/osenv/test/windows.js @@ -0,0 +1,74 @@ +// only run this test on windows +// pretending to be another platform is too hacky, since it breaks +// how the underlying system looks up module paths and runs +// child processes, and all that stuff is cached. +if (process.platform !== 'win32') { + console.log('TAP version 13\n' + + '1..0 # Skip windows tests, this is not windows\n') + return +} + +// load this before clubbing the platform name. +var tap = require('tap') + +process.env.windir = 'c:\\windows' +process.env.USERDOMAIN = 'some-domain' +process.env.USERNAME = 'sirUser' +process.env.USERPROFILE = 'C:\\Users\\sirUser' +process.env.COMPUTERNAME = 'my-machine' +process.env.TMPDIR = 'C:\\tmpdir' +process.env.TMP = 'C:\\tmp' +process.env.TEMP = 'C:\\temp' +process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin' +process.env.PROMPT = '(o_o) $ ' +process.env.EDITOR = 'edit' +process.env.VISUAL = 'visualedit' +process.env.ComSpec = 'some-com' + +tap.test('basic windows sanity test', function (t) { + var osenv = require('../osenv.js') + + t.equal(osenv.user(), + process.env.USERDOMAIN + '\\' + process.env.USERNAME) + t.equal(osenv.home(), process.env.USERPROFILE) + t.equal(osenv.hostname(), process.env.COMPUTERNAME) + t.same(osenv.path(), process.env.Path.split(';')) + t.equal(osenv.prompt(), process.env.PROMPT) + t.equal(osenv.tmpdir(), process.env.TMPDIR) + + // mildly evil, but it's for a test. + process.env.TMPDIR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TMP) + + process.env.TMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.tmpdir(), process.env.TEMP) + + process.env.TEMP = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + osenv.home = function () { return null } + t.equal(osenv.tmpdir(), 'c:\\windows\\temp') + + t.equal(osenv.editor(), 'edit') + process.env.EDITOR = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'visualedit') + + process.env.VISUAL = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.editor(), 'notepad.exe') + + t.equal(osenv.shell(), 'some-com') + process.env.ComSpec = '' + delete require.cache[require.resolve('../osenv.js')] + var osenv = require('../osenv.js') + t.equal(osenv.shell(), 'cmd') + + t.end() +}) http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/osenv/x.tap ---------------------------------------------------------------------- diff --git a/node_modules/osenv/x.tap b/node_modules/osenv/x.tap new file mode 100644 index 0000000..90d8472 --- /dev/null +++ b/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 http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/path-is-absolute/index.js ---------------------------------------------------------------------- diff --git a/node_modules/path-is-absolute/index.js b/node_modules/path-is-absolute/index.js new file mode 100644 index 0000000..19f103f --- /dev/null +++ b/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +}; + +function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; + + // UNC paths are always absolute + return !!result[2] || isUnc; +}; + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/path-is-absolute/license ---------------------------------------------------------------------- diff --git a/node_modules/path-is-absolute/license b/node_modules/path-is-absolute/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (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. http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/path-is-absolute/package.json ---------------------------------------------------------------------- diff --git a/node_modules/path-is-absolute/package.json b/node_modules/path-is-absolute/package.json new file mode 100644 index 0000000..def9f9f --- /dev/null +++ b/node_modules/path-is-absolute/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + "path-is-absolute@^1.0.0", + "/Users/steveng/repo/cordova/cordova-osx/node_modules/glob" + ] + ], + "_from": "path-is-absolute@>=1.0.0 <2.0.0", + "_id": "path-is-absolute@1.0.0", + "_inCache": true, + "_installable": true, + "_location": "/path-is-absolute", + "_nodeVersion": "0.12.0", + "_npmUser": { + "email": "sindresorhus@gmail.com", + "name": "sindresorhus" + }, + "_npmVersion": "2.5.1", + "_phantomChildren": {}, + "_requested": { + "name": "path-is-absolute", + "raw": "path-is-absolute@^1.0.0", + "rawSpec": "^1.0.0", + "scope": null, + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/glob" + ], + "_resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "_shrinkwrap": null, + "_spec": "path-is-absolute@^1.0.0", + "_where": "/Users/steveng/repo/cordova/cordova-osx/node_modules/glob", + "author": { + "email": "sindresorhus@gmail.com", + "name": "Sindre Sorhus", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "dependencies": {}, + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", + "homepage": "https://github.com/sindresorhus/path-is-absolute", + "keywords": [ + "absolute", + "built-in", + "check", + "core", + "detect", + "dir", + "file", + "is", + "is-absolute", + "isabsolute", + "path", + "paths", + "polyfill", + "ponyfill", + "shim", + "util", + "utils" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "path-is-absolute", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.0.0" +} http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/path-is-absolute/readme.md ---------------------------------------------------------------------- diff --git a/node_modules/path-is-absolute/readme.md b/node_modules/path-is-absolute/readme.md new file mode 100644 index 0000000..cdf94f4 --- /dev/null +++ b/node_modules/path-is-absolute/readme.md @@ -0,0 +1,51 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +var pathIsAbsolute = require('path-is-absolute'); + +// Linux +pathIsAbsolute('/home/foo'); +//=> true + +// Windows +pathIsAbsolute('C:/Users/'); +//=> true + +// Any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +The Posix specific version. + +### pathIsAbsolute.win32(path) + +The Windows specific version. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/pegjs/CHANGELOG ---------------------------------------------------------------------- diff --git a/node_modules/pegjs/CHANGELOG b/node_modules/pegjs/CHANGELOG new file mode 100644 index 0000000..e5967cf --- /dev/null +++ b/node_modules/pegjs/CHANGELOG @@ -0,0 +1,146 @@ +0.6.2 (2011-08-20) +------------------ + +Small Changes: + +* Reset parser position when action returns |null|. +* Fixed typo in JavaScript example grammar. + +0.6.1 (2011-04-14) +------------------ + +Small Changes: + +* Use --ascii option when generating a minified version. + +0.6.0 (2011-04-14) +------------------ + +Big Changes: + +* Rewrote the command-line mode to be based on Node.js instead of Rhino -- no + more Java dependency. This also means that PEG.js is available as a Node.js + package and can be required as a module. +* Version for the browser is built separately from the command-ine one in two + flavors (normal and minified). +* Parser variable name is no longer required argument of bin/pegjs -- it is + "module.exports" by default and can be set using the -e/--export-var option. + This makes parsers generated by /bin/pegjs Node.js modules by default. +* Added ability to start parsing from any grammar rule. +* Added several compiler optimizations -- 0.6 is ~12% faster than 0.5.1 in the + benchmark on V8. + +Small Changes: + +* Split the source code into multiple files combined together using a build + system. +* Jake is now used instead of Rake for build scripts -- no more Ruby dependency. +* Test suite can be run from the command-line. +* Benchmark suite can be run from the command-line. +* Benchmark browser runner improvements (users can specify number of runs, + benchmarks are run using |setTimeout|, table is centered and fixed-width). +* Added PEG.js version to "Generated by..." line in generated parsers. +* Added PEG.js version information and homepage header to peg.js. +* Generated code improvements and fixes. +* Internal code improvements and fixes. +* Rewrote README.md. + +0.5.1 (2010-11-28) +------------------ + +Small Changes: + +* Fixed a problem where "SyntaxError: Invalid range in character class." error + appeared when using command-line version on Widnows (GH-13). +* Fixed wrong version reported by "bin/pegjs --version". +* Removed two unused variables in the code. +* Fixed incorrect variable name on two places. + +0.5 (2010-06-10) +---------------- + +Big Changes: + +* Syntax change: Use labeled expressions and variables instead of $1, $2, etc. +* Syntax change: Replaced ":" after a rule name with "=". +* Syntax change: Allow trailing semicolon (";") for rules +* Semantic change: Start rule of the grammar is now implicitly its first rule. +* Implemented semantic predicates. +* Implemented initializers. +* Removed ability to change the start rule when generating the parser. +* Added several compiler optimizations -- 0.5 is ~11% faster than 0.4 in the + benchmark on V8. + +Small Changes: + +* PEG.buildParser now accepts grammars only in string format. +* Added "Generated by ..." message to the generated parsers. +* Formatted all grammars more consistently and transparently. +* Added notes about ECMA-262, 5th ed. compatibility to the JSON example grammar. +* Guarded against redefinition of |undefined|. +* Made bin/pegjs work when called via a symlink (issue #1). +* Fixed bug causing incorrect error messages (issue #2). +* Fixed error message for invalid character range. +* Fixed string literal parsing in the JavaScript grammar. +* Generated code improvements and fixes. +* Internal code improvements and fixes. +* Improved README.md. + +0.4 (2010-04-17) +---------------- + +Big Changes: + +* Improved IE compatibility -- IE6+ is now fully supported. +* Generated parsers are now standalone (no runtime is required). +* Added example grammars for JavaScript, CSS and JSON. +* Added a benchmark suite. +* Implemented negative character classes (e.g. [^a-z]). +* Project moved from BitBucket to GitHub. + +Small Changes: + +* Code generated for the character classes is now regexp-based (= simpler and + more scalable). +* Added \uFEFF (BOM) to the definition of whitespace in the metagrammar. +* When building a parser, left-recursive rules (both direct and indirect) are + reported as errors. +* When building a parser, missing rules are reported as errors. +* Expected items in the error messages do not contain duplicates and they are + sorted. +* Fixed several bugs in the example arithmetics grammar. +* Converted README to GitHub Flavored Markdown and improved it. +* Added CHANGELOG. +* Internal code improvements. + +0.3 (2010-03-14) +---------------- + +* Wrote README. +* Bootstrapped the grammar parser. +* Metagrammar recognizes JavaScript-like comments. +* Changed standard grammar extension from .peg to .pegjs (it is more specific). +* Simplified the example arithmetics grammar + added comment. +* Fixed a bug with reporting of invalid ranges such as [b-a] in the metagrammar. +* Fixed --start vs. --start-rule inconsistency between help and actual option + processing code. +* Avoided ugliness in QUnit output. +* Fixed typo in help: "parserVar" -> "parser_var". +* Internal code improvements. + +0.2.1 (2010-03-08) +------------------ + +* Added "pegjs-" prefix to the name of the minified runtime file. + +0.2 (2010-03-08) +---------------- + +* Added Rakefile that builds minified runtime using Google Closure Compiler API. +* Removed trailing commas in object initializers (Google Closure does not like + them). + +0.1 (2010-03-08) +---------------- + +* Initial release. http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/pegjs/LICENSE ---------------------------------------------------------------------- diff --git a/node_modules/pegjs/LICENSE b/node_modules/pegjs/LICENSE new file mode 100644 index 0000000..48ab3e5 --- /dev/null +++ b/node_modules/pegjs/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2010-2011 David Majda + +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. http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/7a58a67b/node_modules/pegjs/README.md ---------------------------------------------------------------------- diff --git a/node_modules/pegjs/README.md b/node_modules/pegjs/README.md new file mode 100644 index 0000000..7a4c17e --- /dev/null +++ b/node_modules/pegjs/README.md @@ -0,0 +1,226 @@ +PEG.js +====== + +PEG.js is a simple parser generator for JavaScript that produces fast parsers with excellent error reporting. You can use it to process complex data or computer languages and build transformers, interpreters, compilers and other tools easily. + +Features +-------- + + * Simple and expressive grammar syntax + * Integrates both lexical and syntactical analysis + * Parsers have excellent error reporting out of the box + * Based on [parsing expression grammar](http://en.wikipedia.org/wiki/Parsing_expression_grammar) formalism — more powerful than traditional LL(*k*) and LR(*k*) parsers + * Usable [from your browser](http://pegjs.majda.cz/online), from the command line, or via JavaScript API + +Getting Started +--------------- + +[Online version](http://pegjs.majda.cz/online) is the easiest way to generate a parser. Just enter your grammar, try parsing few inputs, and download generated parser code. + +Installation +------------ + +### Command Line / Server-side + +To use command-line version, install [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) first. You can then install PEG.js: + + $ npm install pegjs + +Once installed, you can use the `pegjs` command to generate your parser from a grammar and use the JavaScript API from Node.js. + +### Browser + +[Download](http://pegjs.majda.cz/#download) the PEG.js library (regular or minified version) and include it in your web page or application using the `