mirror of
https://github.com/mdanics/fluttergram.git
synced 2025-06-03 15:46:28 +08:00
ignore files
This commit is contained in:
5
functions/node_modules/balanced-match/.npmignore
generated
vendored
Normal file
5
functions/node_modules/balanced-match/.npmignore
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
test
|
||||
.gitignore
|
||||
.travis.yml
|
||||
Makefile
|
||||
example.js
|
21
functions/node_modules/balanced-match/LICENSE.md
generated
vendored
Normal file
21
functions/node_modules/balanced-match/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
91
functions/node_modules/balanced-match/README.md
generated
vendored
Normal file
91
functions/node_modules/balanced-match/README.md
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
# balanced-match
|
||||
|
||||
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
||||
|
||||
[](http://travis-ci.org/juliangruber/balanced-match)
|
||||
[](https://www.npmjs.org/package/balanced-match)
|
||||
|
||||
[](https://ci.testling.com/juliangruber/balanced-match)
|
||||
|
||||
## Example
|
||||
|
||||
Get the first matching pair of braces:
|
||||
|
||||
```js
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
||||
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
||||
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
|
||||
```
|
||||
|
||||
The matches are:
|
||||
|
||||
```bash
|
||||
$ node example.js
|
||||
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
||||
{ start: 3,
|
||||
end: 9,
|
||||
pre: 'pre',
|
||||
body: 'first',
|
||||
post: 'between{second}post' }
|
||||
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### var m = balanced(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
object with those keys:
|
||||
|
||||
* **start** the index of the first match of `a`
|
||||
* **end** the index of the matching `b`
|
||||
* **pre** the preamble, `a` and `b` not included
|
||||
* **body** the match, `a` and `b` not included
|
||||
* **post** the postscript, `a` and `b` not included
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
||||
|
||||
### var r = balanced.range(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
array with indexes: `[ <a index>, <b index> ]`.
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install balanced-match
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
59
functions/node_modules/balanced-match/index.js
generated
vendored
Normal file
59
functions/node_modules/balanced-match/index.js
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
'use strict';
|
||||
module.exports = balanced;
|
||||
function balanced(a, b, str) {
|
||||
if (a instanceof RegExp) a = maybeMatch(a, str);
|
||||
if (b instanceof RegExp) b = maybeMatch(b, str);
|
||||
|
||||
var r = range(a, b, str);
|
||||
|
||||
return r && {
|
||||
start: r[0],
|
||||
end: r[1],
|
||||
pre: str.slice(0, r[0]),
|
||||
body: str.slice(r[0] + a.length, r[1]),
|
||||
post: str.slice(r[1] + b.length)
|
||||
};
|
||||
}
|
||||
|
||||
function maybeMatch(reg, str) {
|
||||
var m = str.match(reg);
|
||||
return m ? m[0] : null;
|
||||
}
|
||||
|
||||
balanced.range = range;
|
||||
function range(a, b, str) {
|
||||
var begs, beg, left, right, result;
|
||||
var ai = str.indexOf(a);
|
||||
var bi = str.indexOf(b, ai + 1);
|
||||
var i = ai;
|
||||
|
||||
if (ai >= 0 && bi > 0) {
|
||||
begs = [];
|
||||
left = str.length;
|
||||
|
||||
while (i >= 0 && !result) {
|
||||
if (i == ai) {
|
||||
begs.push(i);
|
||||
ai = str.indexOf(a, i + 1);
|
||||
} else if (begs.length == 1) {
|
||||
result = [ begs.pop(), bi ];
|
||||
} else {
|
||||
beg = begs.pop();
|
||||
if (beg < left) {
|
||||
left = beg;
|
||||
right = bi;
|
||||
}
|
||||
|
||||
bi = str.indexOf(b, i + 1);
|
||||
}
|
||||
|
||||
i = ai < bi && ai >= 0 ? ai : bi;
|
||||
}
|
||||
|
||||
if (begs.length) {
|
||||
result = [ left, right ];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
77
functions/node_modules/balanced-match/package.json
generated
vendored
Normal file
77
functions/node_modules/balanced-match/package.json
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
"_from": "balanced-match@^1.0.0",
|
||||
"_id": "balanced-match@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"_location": "/balanced-match",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "balanced-match@^1.0.0",
|
||||
"name": "balanced-match",
|
||||
"escapedName": "balanced-match",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/brace-expansion"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
|
||||
"_spec": "balanced-match@^1.0.0",
|
||||
"_where": "/Users/mdanics18/Programming/flutter/firestore_test/functions/node_modules/brace-expansion",
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/juliangruber/balanced-match/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
||||
"devDependencies": {
|
||||
"matcha": "^0.7.0",
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/balanced-match",
|
||||
"keywords": [
|
||||
"match",
|
||||
"regexp",
|
||||
"test",
|
||||
"balanced",
|
||||
"parse"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "balanced-match",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/balanced-match.git"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "make bench",
|
||||
"test": "make test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
44
functions/node_modules/create-error-class/index.js
generated
vendored
Normal file
44
functions/node_modules/create-error-class/index.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
'use strict';
|
||||
var captureStackTrace = require('capture-stack-trace');
|
||||
|
||||
function inherits(ctor, superCtor) {
|
||||
ctor.super_ = superCtor;
|
||||
ctor.prototype = Object.create(superCtor.prototype, {
|
||||
constructor: {
|
||||
value: ctor,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = function createErrorClass(className, setup) {
|
||||
if (typeof className !== 'string') {
|
||||
throw new TypeError('Expected className to be a string');
|
||||
}
|
||||
|
||||
if (/[^0-9a-zA-Z_$]/.test(className)) {
|
||||
throw new Error('className contains invalid characters');
|
||||
}
|
||||
|
||||
setup = setup || function (message) {
|
||||
this.message = message;
|
||||
};
|
||||
|
||||
var ErrorClass = function () {
|
||||
Object.defineProperty(this, 'name', {
|
||||
configurable: true,
|
||||
value: className,
|
||||
writable: true
|
||||
});
|
||||
|
||||
captureStackTrace(this, this.constructor);
|
||||
|
||||
setup.apply(this, arguments);
|
||||
};
|
||||
|
||||
inherits(ErrorClass, Error);
|
||||
|
||||
return ErrorClass;
|
||||
};
|
21
functions/node_modules/create-error-class/license
generated
vendored
Normal file
21
functions/node_modules/create-error-class/license
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
|
||||
|
||||
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.
|
62
functions/node_modules/create-error-class/package.json
generated
vendored
Normal file
62
functions/node_modules/create-error-class/package.json
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"_from": "create-error-class@^3.0.2",
|
||||
"_id": "create-error-class@3.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=",
|
||||
"_location": "/create-error-class",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "create-error-class@^3.0.2",
|
||||
"name": "create-error-class",
|
||||
"escapedName": "create-error-class",
|
||||
"rawSpec": "^3.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@google-cloud/common",
|
||||
"/@google-cloud/storage",
|
||||
"/@google-cloud/storage/@google-cloud/common"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz",
|
||||
"_shasum": "06be7abef947a3f14a30fd610671d401bca8b7b6",
|
||||
"_spec": "create-error-class@^3.0.2",
|
||||
"_where": "/Users/mdanics18/Programming/flutter/firestore_test/functions/node_modules/@google-cloud/common",
|
||||
"author": {
|
||||
"name": "Vsevolod Strukchinsky",
|
||||
"email": "floatdrop@gmail.com",
|
||||
"url": "github.com/floatdrop"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/floatdrop/create-error-class/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"capture-stack-trace": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Create Error classes",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/floatdrop/create-error-class#readme",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"name": "create-error-class",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/floatdrop/create-error-class.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "3.0.2"
|
||||
}
|
54
functions/node_modules/create-error-class/readme.md
generated
vendored
Normal file
54
functions/node_modules/create-error-class/readme.md
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
# create-error-class [](https://travis-ci.org/floatdrop/create-error-class)
|
||||
|
||||
> Create error class
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save create-error-class
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var createErrorClass = require('create-error-class');
|
||||
|
||||
var HTTPError = createErrorClass('HTTPError', function (props) {
|
||||
this.message = 'Status code is ' + props.statusCode;
|
||||
});
|
||||
|
||||
throw new HTTPError({statusCode: 404});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### createErrorClass(className, [setup])
|
||||
|
||||
Return constructor of Errors with `className`.
|
||||
|
||||
#### className
|
||||
|
||||
*Required*
|
||||
Type: `string`
|
||||
|
||||
Class name of Error Object. Should contain characters from `[0-9a-zA-Z_$]` range.
|
||||
|
||||
#### setup
|
||||
Type: `function`
|
||||
|
||||
Setup function, that will be called after each Error object is created from constructor with context of Error object.
|
||||
|
||||
By default `setup` function sets `this.message` as first argument:
|
||||
|
||||
```js
|
||||
var MyError = createErrorClass('MyError');
|
||||
|
||||
new MyError('Something gone wrong!').message; // => 'Something gone wrong!'
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
|
46
functions/node_modules/grpc/node_modules/abbrev/LICENSE
generated
vendored
Normal file
46
functions/node_modules/grpc/node_modules/abbrev/LICENSE
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
This software is dual-licensed under the ISC and MIT licenses.
|
||||
You may use this software under EITHER of the following licenses.
|
||||
|
||||
----------
|
||||
|
||||
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.
|
||||
|
||||
----------
|
||||
|
||||
Copyright Isaac Z. Schlueter and Contributors
|
||||
All rights reserved.
|
||||
|
||||
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.
|
23
functions/node_modules/grpc/node_modules/abbrev/README.md
generated
vendored
Normal file
23
functions/node_modules/grpc/node_modules/abbrev/README.md
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
# abbrev-js
|
||||
|
||||
Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).
|
||||
|
||||
Usage:
|
||||
|
||||
var abbrev = require("abbrev");
|
||||
abbrev("foo", "fool", "folding", "flop");
|
||||
|
||||
// returns:
|
||||
{ fl: 'flop'
|
||||
, flo: 'flop'
|
||||
, flop: 'flop'
|
||||
, fol: 'folding'
|
||||
, fold: 'folding'
|
||||
, foldi: 'folding'
|
||||
, foldin: 'folding'
|
||||
, folding: 'folding'
|
||||
, foo: 'foo'
|
||||
, fool: 'fool'
|
||||
}
|
||||
|
||||
This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.
|
61
functions/node_modules/grpc/node_modules/abbrev/abbrev.js
generated
vendored
Normal file
61
functions/node_modules/grpc/node_modules/abbrev/abbrev.js
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
module.exports = exports = abbrev.abbrev = abbrev
|
||||
|
||||
abbrev.monkeyPatch = monkeyPatch
|
||||
|
||||
function monkeyPatch () {
|
||||
Object.defineProperty(Array.prototype, 'abbrev', {
|
||||
value: function () { return abbrev(this) },
|
||||
enumerable: false, configurable: true, writable: true
|
||||
})
|
||||
|
||||
Object.defineProperty(Object.prototype, 'abbrev', {
|
||||
value: function () { return abbrev(Object.keys(this)) },
|
||||
enumerable: false, configurable: true, writable: true
|
||||
})
|
||||
}
|
||||
|
||||
function abbrev (list) {
|
||||
if (arguments.length !== 1 || !Array.isArray(list)) {
|
||||
list = Array.prototype.slice.call(arguments, 0)
|
||||
}
|
||||
for (var i = 0, l = list.length, args = [] ; i < l ; i ++) {
|
||||
args[i] = typeof list[i] === "string" ? list[i] : String(list[i])
|
||||
}
|
||||
|
||||
// sort them lexicographically, so that they're next to their nearest kin
|
||||
args = args.sort(lexSort)
|
||||
|
||||
// walk through each, seeing how much it has in common with the next and previous
|
||||
var abbrevs = {}
|
||||
, prev = ""
|
||||
for (var i = 0, l = args.length ; i < l ; i ++) {
|
||||
var current = args[i]
|
||||
, next = args[i + 1] || ""
|
||||
, nextMatches = true
|
||||
, prevMatches = true
|
||||
if (current === next) continue
|
||||
for (var j = 0, cl = current.length ; j < cl ; j ++) {
|
||||
var curChar = current.charAt(j)
|
||||
nextMatches = nextMatches && curChar === next.charAt(j)
|
||||
prevMatches = prevMatches && curChar === prev.charAt(j)
|
||||
if (!nextMatches && !prevMatches) {
|
||||
j ++
|
||||
break
|
||||
}
|
||||
}
|
||||
prev = current
|
||||
if (j === cl) {
|
||||
abbrevs[current] = current
|
||||
continue
|
||||
}
|
||||
for (var a = current.substr(0, j) ; j <= cl ; j ++) {
|
||||
abbrevs[a] = current
|
||||
a += current.charAt(j)
|
||||
}
|
||||
}
|
||||
return abbrevs
|
||||
}
|
||||
|
||||
function lexSort (a, b) {
|
||||
return a === b ? 0 : a > b ? 1 : -1
|
||||
}
|
59
functions/node_modules/grpc/node_modules/abbrev/package.json
generated
vendored
Normal file
59
functions/node_modules/grpc/node_modules/abbrev/package.json
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"abbrev@1.1.1",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "abbrev@1.1.1",
|
||||
"_id": "abbrev@1.1.1",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"_location": "/grpc/abbrev",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "abbrev@1.1.1",
|
||||
"name": "abbrev",
|
||||
"escapedName": "abbrev",
|
||||
"rawSpec": "1.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/nopt"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"_spec": "1.1.1",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/abbrev-js/issues"
|
||||
},
|
||||
"description": "Like ruby's abbrev module, but in js",
|
||||
"devDependencies": {
|
||||
"tap": "^10.1"
|
||||
},
|
||||
"files": [
|
||||
"abbrev.js"
|
||||
],
|
||||
"homepage": "https://github.com/isaacs/abbrev-js#readme",
|
||||
"license": "ISC",
|
||||
"main": "abbrev.js",
|
||||
"name": "abbrev",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/isaacs/abbrev-js.git"
|
||||
},
|
||||
"scripts": {
|
||||
"postpublish": "git push origin --all; git push origin --tags",
|
||||
"postversion": "npm publish",
|
||||
"preversion": "npm test",
|
||||
"test": "tap test.js --100"
|
||||
},
|
||||
"version": "1.1.1"
|
||||
}
|
4
functions/node_modules/grpc/node_modules/ansi-regex/index.js
generated
vendored
Normal file
4
functions/node_modules/grpc/node_modules/ansi-regex/index.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict';
|
||||
module.exports = function () {
|
||||
return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;
|
||||
};
|
21
functions/node_modules/grpc/node_modules/ansi-regex/license
generated
vendored
Normal file
21
functions/node_modules/grpc/node_modules/ansi-regex/license
generated
vendored
Normal file
@ -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.
|
111
functions/node_modules/grpc/node_modules/ansi-regex/package.json
generated
vendored
Normal file
111
functions/node_modules/grpc/node_modules/ansi-regex/package.json
generated
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"ansi-regex@2.1.1",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "ansi-regex@2.1.1",
|
||||
"_id": "ansi-regex@2.1.1",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"_location": "/grpc/ansi-regex",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ansi-regex@2.1.1",
|
||||
"name": "ansi-regex",
|
||||
"escapedName": "ansi-regex",
|
||||
"rawSpec": "2.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/strip-ansi"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"_spec": "2.1.1",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/chalk/ansi-regex/issues"
|
||||
},
|
||||
"description": "Regular expression for matching ANSI escape codes",
|
||||
"devDependencies": {
|
||||
"ava": "0.17.0",
|
||||
"xo": "0.16.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/chalk/ansi-regex#readme",
|
||||
"keywords": [
|
||||
"ansi",
|
||||
"styles",
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"tty",
|
||||
"escape",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"command-line",
|
||||
"text",
|
||||
"regex",
|
||||
"regexp",
|
||||
"re",
|
||||
"match",
|
||||
"test",
|
||||
"find",
|
||||
"pattern"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
{
|
||||
"name": "Joshua Appelman",
|
||||
"email": "jappelman@xebia.com",
|
||||
"url": "jbnicolai.com"
|
||||
},
|
||||
{
|
||||
"name": "JD Ballard",
|
||||
"email": "i.am.qix@gmail.com",
|
||||
"url": "github.com/qix-"
|
||||
}
|
||||
],
|
||||
"name": "ansi-regex",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/chalk/ansi-regex.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava --verbose",
|
||||
"view-supported": "node fixtures/view-codes.js"
|
||||
},
|
||||
"version": "2.1.1",
|
||||
"xo": {
|
||||
"rules": {
|
||||
"guard-for-in": 0,
|
||||
"no-loop-func": 0
|
||||
}
|
||||
}
|
||||
}
|
39
functions/node_modules/grpc/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
39
functions/node_modules/grpc/node_modules/ansi-regex/readme.md
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
# ansi-regex [](https://travis-ci.org/chalk/ansi-regex)
|
||||
|
||||
> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save ansi-regex
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const ansiRegex = require('ansi-regex');
|
||||
|
||||
ansiRegex().test('\u001b[4mcake\u001b[0m');
|
||||
//=> true
|
||||
|
||||
ansiRegex().test('cake');
|
||||
//=> false
|
||||
|
||||
'\u001b[4mcake\u001b[0m'.match(ansiRegex());
|
||||
//=> ['\u001b[4m', '\u001b[0m']
|
||||
```
|
||||
|
||||
## FAQ
|
||||
|
||||
### Why do you test for codes not in the ECMA 48 standard?
|
||||
|
||||
Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.
|
||||
|
||||
On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
14
functions/node_modules/grpc/node_modules/aproba/LICENSE
generated
vendored
Normal file
14
functions/node_modules/grpc/node_modules/aproba/LICENSE
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
Copyright (c) 2015, Rebecca Turner <me@re-becca.org>
|
||||
|
||||
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.
|
||||
|
94
functions/node_modules/grpc/node_modules/aproba/README.md
generated
vendored
Normal file
94
functions/node_modules/grpc/node_modules/aproba/README.md
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
aproba
|
||||
======
|
||||
|
||||
A ridiculously light-weight function argument validator
|
||||
|
||||
```
|
||||
var validate = require("aproba")
|
||||
|
||||
function myfunc(a, b, c) {
|
||||
// `a` must be a string, `b` a number, `c` a function
|
||||
validate('SNF', arguments) // [a,b,c] is also valid
|
||||
}
|
||||
|
||||
myfunc('test', 23, function () {}) // ok
|
||||
myfunc(123, 23, function () {}) // type error
|
||||
myfunc('test', 23) // missing arg error
|
||||
myfunc('test', 23, function () {}, true) // too many args error
|
||||
|
||||
```
|
||||
|
||||
Valid types are:
|
||||
|
||||
| type | description
|
||||
| :--: | :----------
|
||||
| * | matches any type
|
||||
| A | `Array.isArray` OR an `arguments` object
|
||||
| S | typeof == string
|
||||
| N | typeof == number
|
||||
| F | typeof == function
|
||||
| O | typeof == object and not type A and not type E
|
||||
| B | typeof == boolean
|
||||
| E | `instanceof Error` OR `null` **(special: see below)**
|
||||
| Z | == `null`
|
||||
|
||||
Validation failures throw one of three exception types, distinguished by a
|
||||
`code` property of `EMISSINGARG`, `EINVALIDTYPE` or `ETOOMANYARGS`.
|
||||
|
||||
If you pass in an invalid type then it will throw with a code of
|
||||
`EUNKNOWNTYPE`.
|
||||
|
||||
If an **error** argument is found and is not null then the remaining
|
||||
arguments are optional. That is, if you say `ESO` then that's like using a
|
||||
non-magical `E` in: `E|ESO|ZSO`.
|
||||
|
||||
### But I have optional arguments?!
|
||||
|
||||
You can provide more than one signature by separating them with pipes `|`.
|
||||
If any signature matches the arguments then they'll be considered valid.
|
||||
|
||||
So for example, say you wanted to write a signature for
|
||||
`fs.createWriteStream`. The docs for it describe it thusly:
|
||||
|
||||
```
|
||||
fs.createWriteStream(path[, options])
|
||||
```
|
||||
|
||||
This would be a signature of `SO|S`. That is, a string and and object, or
|
||||
just a string.
|
||||
|
||||
Now, if you read the full `fs` docs, you'll see that actually path can ALSO
|
||||
be a buffer. And options can be a string, that is:
|
||||
```
|
||||
path <String> | <Buffer>
|
||||
options <String> | <Object>
|
||||
```
|
||||
|
||||
To reproduce this you have to fully enumerate all of the possible
|
||||
combinations and that implies a signature of `SO|SS|OO|OS|S|O`. The
|
||||
awkwardness is a feature: It reminds you of the complexity you're adding to
|
||||
your API when you do this sort of thing.
|
||||
|
||||
|
||||
### Browser support
|
||||
|
||||
This has no dependencies and should work in browsers, though you'll have
|
||||
noisier stack traces.
|
||||
|
||||
### Why this exists
|
||||
|
||||
I wanted a very simple argument validator. It needed to do two things:
|
||||
|
||||
1. Be more concise and easier to use than assertions
|
||||
|
||||
2. Not encourage an infinite bikeshed of DSLs
|
||||
|
||||
This is why types are specified by a single character and there's no such
|
||||
thing as an optional argument.
|
||||
|
||||
This is not intended to validate user data. This is specifically about
|
||||
asserting the interface of your functions.
|
||||
|
||||
If you need greater validation, I encourage you to write them by hand or
|
||||
look elsewhere.
|
||||
|
105
functions/node_modules/grpc/node_modules/aproba/index.js
generated
vendored
Normal file
105
functions/node_modules/grpc/node_modules/aproba/index.js
generated
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
'use strict'
|
||||
|
||||
function isArguments (thingy) {
|
||||
return thingy != null && typeof thingy === 'object' && thingy.hasOwnProperty('callee')
|
||||
}
|
||||
|
||||
var types = {
|
||||
'*': {label: 'any', check: function () { return true }},
|
||||
A: {label: 'array', check: function (thingy) { return Array.isArray(thingy) || isArguments(thingy) }},
|
||||
S: {label: 'string', check: function (thingy) { return typeof thingy === 'string' }},
|
||||
N: {label: 'number', check: function (thingy) { return typeof thingy === 'number' }},
|
||||
F: {label: 'function', check: function (thingy) { return typeof thingy === 'function' }},
|
||||
O: {label: 'object', check: function (thingy) { return typeof thingy === 'object' && thingy != null && !types.A.check(thingy) && !types.E.check(thingy) }},
|
||||
B: {label: 'boolean', check: function (thingy) { return typeof thingy === 'boolean' }},
|
||||
E: {label: 'error', check: function (thingy) { return thingy instanceof Error }},
|
||||
Z: {label: 'null', check: function (thingy) { return thingy == null }}
|
||||
}
|
||||
|
||||
function addSchema (schema, arity) {
|
||||
var group = arity[schema.length] = arity[schema.length] || []
|
||||
if (group.indexOf(schema) === -1) group.push(schema)
|
||||
}
|
||||
|
||||
var validate = module.exports = function (rawSchemas, args) {
|
||||
if (arguments.length !== 2) throw wrongNumberOfArgs(['SA'], arguments.length)
|
||||
if (!rawSchemas) throw missingRequiredArg(0, 'rawSchemas')
|
||||
if (!args) throw missingRequiredArg(1, 'args')
|
||||
if (!types.S.check(rawSchemas)) throw invalidType(0, ['string'], rawSchemas)
|
||||
if (!types.A.check(args)) throw invalidType(1, ['array'], args)
|
||||
var schemas = rawSchemas.split('|')
|
||||
var arity = {}
|
||||
|
||||
schemas.forEach(function (schema) {
|
||||
for (var ii = 0; ii < schema.length; ++ii) {
|
||||
var type = schema[ii]
|
||||
if (!types[type]) throw unknownType(ii, type)
|
||||
}
|
||||
if (/E.*E/.test(schema)) throw moreThanOneError(schema)
|
||||
addSchema(schema, arity)
|
||||
if (/E/.test(schema)) {
|
||||
addSchema(schema.replace(/E.*$/, 'E'), arity)
|
||||
addSchema(schema.replace(/E/, 'Z'), arity)
|
||||
if (schema.length === 1) addSchema('', arity)
|
||||
}
|
||||
})
|
||||
var matching = arity[args.length]
|
||||
if (!matching) {
|
||||
throw wrongNumberOfArgs(Object.keys(arity), args.length)
|
||||
}
|
||||
for (var ii = 0; ii < args.length; ++ii) {
|
||||
var newMatching = matching.filter(function (schema) {
|
||||
var type = schema[ii]
|
||||
var typeCheck = types[type].check
|
||||
return typeCheck(args[ii])
|
||||
})
|
||||
if (!newMatching.length) {
|
||||
var labels = matching.map(function (schema) {
|
||||
return types[schema[ii]].label
|
||||
}).filter(function (schema) { return schema != null })
|
||||
throw invalidType(ii, labels, args[ii])
|
||||
}
|
||||
matching = newMatching
|
||||
}
|
||||
}
|
||||
|
||||
function missingRequiredArg (num) {
|
||||
return newException('EMISSINGARG', 'Missing required argument #' + (num + 1))
|
||||
}
|
||||
|
||||
function unknownType (num, type) {
|
||||
return newException('EUNKNOWNTYPE', 'Unknown type ' + type + ' in argument #' + (num + 1))
|
||||
}
|
||||
|
||||
function invalidType (num, expectedTypes, value) {
|
||||
var valueType
|
||||
Object.keys(types).forEach(function (typeCode) {
|
||||
if (types[typeCode].check(value)) valueType = types[typeCode].label
|
||||
})
|
||||
return newException('EINVALIDTYPE', 'Argument #' + (num + 1) + ': Expected ' +
|
||||
englishList(expectedTypes) + ' but got ' + valueType)
|
||||
}
|
||||
|
||||
function englishList (list) {
|
||||
return list.join(', ').replace(/, ([^,]+)$/, ' or $1')
|
||||
}
|
||||
|
||||
function wrongNumberOfArgs (expected, got) {
|
||||
var english = englishList(expected)
|
||||
var args = expected.every(function (ex) { return ex.length === 1 })
|
||||
? 'argument'
|
||||
: 'arguments'
|
||||
return newException('EWRONGARGCOUNT', 'Expected ' + english + ' ' + args + ' but got ' + got)
|
||||
}
|
||||
|
||||
function moreThanOneError (schema) {
|
||||
return newException('ETOOMANYERRORTYPES',
|
||||
'Only one error type per argument signature is allowed, more than one found in "' + schema + '"')
|
||||
}
|
||||
|
||||
function newException (code, msg) {
|
||||
var e = new Error(msg)
|
||||
e.code = code
|
||||
if (Error.captureStackTrace) Error.captureStackTrace(e, validate)
|
||||
return e
|
||||
}
|
65
functions/node_modules/grpc/node_modules/aproba/package.json
generated
vendored
Normal file
65
functions/node_modules/grpc/node_modules/aproba/package.json
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"aproba@1.2.0",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "aproba@1.2.0",
|
||||
"_id": "aproba@1.2.0",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"_location": "/grpc/aproba",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "aproba@1.2.0",
|
||||
"name": "aproba",
|
||||
"escapedName": "aproba",
|
||||
"rawSpec": "1.2.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.2.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/gauge"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
"_spec": "1.2.0",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Rebecca Turner",
|
||||
"email": "me@re-becca.org"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/iarna/aproba/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "A ridiculously light-weight argument validator (now browser friendly)",
|
||||
"devDependencies": {
|
||||
"standard": "^10.0.3",
|
||||
"tap": "^10.0.2"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/iarna/aproba",
|
||||
"keywords": [
|
||||
"argument",
|
||||
"validate"
|
||||
],
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"name": "aproba",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/iarna/aproba.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && tap -j3 test/*.js"
|
||||
},
|
||||
"version": "1.2.0"
|
||||
}
|
31
functions/node_modules/grpc/node_modules/are-we-there-yet/CHANGES.md
generated
vendored
Normal file
31
functions/node_modules/grpc/node_modules/are-we-there-yet/CHANGES.md
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
Hi, figured we could actually use a changelog now:
|
||||
|
||||
## 1.1.4 2017-04-21
|
||||
|
||||
* Fix typo in package.json
|
||||
|
||||
## 1.1.3 2017-04-21
|
||||
|
||||
* Improve documentation and limit files included in the distribution.
|
||||
|
||||
## 1.1.2 2016-03-15
|
||||
|
||||
* Add tracker group cycle detection and tests for it
|
||||
|
||||
## 1.1.1 2016-01-29
|
||||
|
||||
* Fix a typo in stream completion tracker
|
||||
|
||||
## 1.1.0 2016-01-29
|
||||
|
||||
* Rewrote completion percent computation to be low impact– no more walking a
|
||||
tree of completion groups every time we need this info. Previously, with
|
||||
medium sized tree of completion groups, even a relatively modest number of
|
||||
calls to the top level `completed()` method would result in absurd numbers
|
||||
of calls overall as it walked down the tree. We now, instead, keep track as
|
||||
we bubble up changes, so the computation is limited to when data changes and
|
||||
to the depth of that one branch, instead of _every_ node. (Plus, we were already
|
||||
incurring _this_ cost, since we already bubbled out changes.)
|
||||
* Moved different tracker types out to their own files.
|
||||
* Made tests test for TOO MANY events too.
|
||||
* Standarized the source code formatting
|
5
functions/node_modules/grpc/node_modules/are-we-there-yet/LICENSE
generated
vendored
Normal file
5
functions/node_modules/grpc/node_modules/are-we-there-yet/LICENSE
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
Copyright (c) 2015, Rebecca Turner
|
||||
|
||||
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.
|
195
functions/node_modules/grpc/node_modules/are-we-there-yet/README.md
generated
vendored
Normal file
195
functions/node_modules/grpc/node_modules/are-we-there-yet/README.md
generated
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
are-we-there-yet
|
||||
----------------
|
||||
|
||||
Track complex hiearchies of asynchronous task completion statuses. This is
|
||||
intended to give you a way of recording and reporting the progress of the big
|
||||
recursive fan-out and gather type workflows that are so common in async.
|
||||
|
||||
What you do with this completion data is up to you, but the most common use case is to
|
||||
feed it to one of the many progress bar modules.
|
||||
|
||||
Most progress bar modules include a rudamentary version of this, but my
|
||||
needs were more complex.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
```javascript
|
||||
var TrackerGroup = require("are-we-there-yet").TrackerGroup
|
||||
|
||||
var top = new TrackerGroup("program")
|
||||
|
||||
var single = top.newItem("one thing", 100)
|
||||
single.completeWork(20)
|
||||
|
||||
console.log(top.completed()) // 0.2
|
||||
|
||||
fs.stat("file", function(er, stat) {
|
||||
if (er) throw er
|
||||
var stream = top.newStream("file", stat.size)
|
||||
console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete
|
||||
// and 50% * 20% == 10%
|
||||
fs.createReadStream("file").pipe(stream).on("data", function (chunk) {
|
||||
// do stuff with chunk
|
||||
})
|
||||
top.on("change", function (name) {
|
||||
// called each time a chunk is read from "file"
|
||||
// top.completed() will start at 0.1 and fill up to 0.6 as the file is read
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
Shared Methods
|
||||
==============
|
||||
|
||||
* var completed = tracker.completed()
|
||||
|
||||
Implemented in: `Tracker`, `TrackerGroup`, `TrackerStream`
|
||||
|
||||
Returns the ratio of completed work to work to be done. Range of 0 to 1.
|
||||
|
||||
* tracker.finish()
|
||||
|
||||
Implemented in: `Tracker`, `TrackerGroup`
|
||||
|
||||
Marks the tracker as completed. With a TrackerGroup this marks all of its
|
||||
components as completed.
|
||||
|
||||
Marks all of the components of this tracker as finished, which in turn means
|
||||
that `tracker.completed()` for this will now be 1.
|
||||
|
||||
This will result in one or more `change` events being emitted.
|
||||
|
||||
Events
|
||||
======
|
||||
|
||||
All tracker objects emit `change` events with the following arguments:
|
||||
|
||||
```
|
||||
function (name, completed, tracker)
|
||||
```
|
||||
|
||||
`name` is the name of the tracker that originally emitted the event,
|
||||
or if it didn't have one, the first containing tracker group that had one.
|
||||
|
||||
`completed` is the percent complete (as returned by `tracker.completed()` method).
|
||||
|
||||
`tracker` is the tracker object that you are listening for events on.
|
||||
|
||||
TrackerGroup
|
||||
============
|
||||
|
||||
* var tracker = new TrackerGroup(**name**)
|
||||
|
||||
* **name** *(optional)* - The name of this tracker group, used in change
|
||||
notifications if the component updating didn't have a name. Defaults to undefined.
|
||||
|
||||
Creates a new empty tracker aggregation group. These are trackers whose
|
||||
completion status is determined by the completion status of other trackers.
|
||||
|
||||
* tracker.addUnit(**otherTracker**, **weight**)
|
||||
|
||||
* **otherTracker** - Any of the other are-we-there-yet tracker objects
|
||||
* **weight** *(optional)* - The weight to give the tracker, defaults to 1.
|
||||
|
||||
Adds the **otherTracker** to this aggregation group. The weight determines
|
||||
how long you expect this tracker to take to complete in proportion to other
|
||||
units. So for instance, if you add one tracker with a weight of 1 and
|
||||
another with a weight of 2, you're saying the second will take twice as long
|
||||
to complete as the first. As such, the first will account for 33% of the
|
||||
completion of this tracker and the second will account for the other 67%.
|
||||
|
||||
Returns **otherTracker**.
|
||||
|
||||
* var subGroup = tracker.newGroup(**name**, **weight**)
|
||||
|
||||
The above is exactly equivalent to:
|
||||
|
||||
```javascript
|
||||
var subGroup = tracker.addUnit(new TrackerGroup(name), weight)
|
||||
```
|
||||
|
||||
* var subItem = tracker.newItem(**name**, **todo**, **weight**)
|
||||
|
||||
The above is exactly equivalent to:
|
||||
|
||||
```javascript
|
||||
var subItem = tracker.addUnit(new Tracker(name, todo), weight)
|
||||
```
|
||||
|
||||
* var subStream = tracker.newStream(**name**, **todo**, **weight**)
|
||||
|
||||
The above is exactly equivalent to:
|
||||
|
||||
```javascript
|
||||
var subStream = tracker.addUnit(new TrackerStream(name, todo), weight)
|
||||
```
|
||||
|
||||
* console.log( tracker.debug() )
|
||||
|
||||
Returns a tree showing the completion of this tracker group and all of its
|
||||
children, including recursively entering all of the children.
|
||||
|
||||
Tracker
|
||||
=======
|
||||
|
||||
* var tracker = new Tracker(**name**, **todo**)
|
||||
|
||||
* **name** *(optional)* The name of this counter to report in change
|
||||
events. Defaults to undefined.
|
||||
* **todo** *(optional)* The amount of work todo (a number). Defaults to 0.
|
||||
|
||||
Ordinarily these are constructed as a part of a tracker group (via
|
||||
`newItem`).
|
||||
|
||||
* var completed = tracker.completed()
|
||||
|
||||
Returns the ratio of completed work to work to be done. Range of 0 to 1. If
|
||||
total work to be done is 0 then it will return 0.
|
||||
|
||||
* tracker.addWork(**todo**)
|
||||
|
||||
* **todo** A number to add to the amount of work to be done.
|
||||
|
||||
Increases the amount of work to be done, thus decreasing the completion
|
||||
percentage. Triggers a `change` event.
|
||||
|
||||
* tracker.completeWork(**completed**)
|
||||
|
||||
* **completed** A number to add to the work complete
|
||||
|
||||
Increase the amount of work complete, thus increasing the completion percentage.
|
||||
Will never increase the work completed past the amount of work todo. That is,
|
||||
percentages > 100% are not allowed. Triggers a `change` event.
|
||||
|
||||
* tracker.finish()
|
||||
|
||||
Marks this tracker as finished, tracker.completed() will now be 1. Triggers
|
||||
a `change` event.
|
||||
|
||||
TrackerStream
|
||||
=============
|
||||
|
||||
* var tracker = new TrackerStream(**name**, **size**, **options**)
|
||||
|
||||
* **name** *(optional)* The name of this counter to report in change
|
||||
events. Defaults to undefined.
|
||||
* **size** *(optional)* The number of bytes being sent through this stream.
|
||||
* **options** *(optional)* A hash of stream options
|
||||
|
||||
The tracker stream object is a pass through stream that updates an internal
|
||||
tracker object each time a block passes through. It's intended to track
|
||||
downloads, file extraction and other related activities. You use it by piping
|
||||
your data source into it and then using it as your data source.
|
||||
|
||||
If your data has a length attribute then that's used as the amount of work
|
||||
completed when the chunk is passed through. If it does not (eg, object
|
||||
streams) then each chunk counts as completing 1 unit of work, so your size
|
||||
should be the total number of objects being streamed.
|
||||
|
||||
* tracker.addWork(**todo**)
|
||||
|
||||
* **todo** Increase the expected overall size by **todo** bytes.
|
||||
|
||||
Increases the amount of work to be done, thus decreasing the completion
|
||||
percentage. Triggers a `change` event.
|
4
functions/node_modules/grpc/node_modules/are-we-there-yet/index.js
generated
vendored
Normal file
4
functions/node_modules/grpc/node_modules/are-we-there-yet/index.js
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
'use strict'
|
||||
exports.TrackerGroup = require('./tracker-group.js')
|
||||
exports.Tracker = require('./tracker.js')
|
||||
exports.TrackerStream = require('./tracker-stream.js')
|
66
functions/node_modules/grpc/node_modules/are-we-there-yet/package.json
generated
vendored
Normal file
66
functions/node_modules/grpc/node_modules/are-we-there-yet/package.json
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"are-we-there-yet@1.1.4",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "are-we-there-yet@1.1.4",
|
||||
"_id": "are-we-there-yet@1.1.4",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=",
|
||||
"_location": "/grpc/are-we-there-yet",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "are-we-there-yet@1.1.4",
|
||||
"name": "are-we-there-yet",
|
||||
"escapedName": "are-we-there-yet",
|
||||
"rawSpec": "1.1.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/npmlog"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz",
|
||||
"_spec": "1.1.4",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Rebecca Turner",
|
||||
"url": "http://re-becca.org"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/iarna/are-we-there-yet/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"delegates": "^1.0.0",
|
||||
"readable-stream": "^2.0.6"
|
||||
},
|
||||
"description": "Keep track of the overall completion of many disparate processes",
|
||||
"devDependencies": {
|
||||
"standard": "^6.0.8",
|
||||
"tap": "^5.7.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"tracker-base.js",
|
||||
"tracker-group.js",
|
||||
"tracker-stream.js",
|
||||
"tracker.js",
|
||||
"CHANGES.md"
|
||||
],
|
||||
"homepage": "https://github.com/iarna/are-we-there-yet",
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"name": "are-we-there-yet",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/iarna/are-we-there-yet.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && tap test/*.js"
|
||||
},
|
||||
"version": "1.1.4"
|
||||
}
|
11
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker-base.js
generated
vendored
Normal file
11
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker-base.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
'use strict'
|
||||
var EventEmitter = require('events').EventEmitter
|
||||
var util = require('util')
|
||||
|
||||
var trackerId = 0
|
||||
var TrackerBase = module.exports = function (name) {
|
||||
EventEmitter.call(this)
|
||||
this.id = ++trackerId
|
||||
this.name = name
|
||||
}
|
||||
util.inherits(TrackerBase, EventEmitter)
|
107
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker-group.js
generated
vendored
Normal file
107
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker-group.js
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
'use strict'
|
||||
var util = require('util')
|
||||
var TrackerBase = require('./tracker-base.js')
|
||||
var Tracker = require('./tracker.js')
|
||||
var TrackerStream = require('./tracker-stream.js')
|
||||
|
||||
var TrackerGroup = module.exports = function (name) {
|
||||
TrackerBase.call(this, name)
|
||||
this.parentGroup = null
|
||||
this.trackers = []
|
||||
this.completion = {}
|
||||
this.weight = {}
|
||||
this.totalWeight = 0
|
||||
this.finished = false
|
||||
this.bubbleChange = bubbleChange(this)
|
||||
}
|
||||
util.inherits(TrackerGroup, TrackerBase)
|
||||
|
||||
function bubbleChange (trackerGroup) {
|
||||
return function (name, completed, tracker) {
|
||||
trackerGroup.completion[tracker.id] = completed
|
||||
if (trackerGroup.finished) return
|
||||
trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup)
|
||||
}
|
||||
}
|
||||
|
||||
TrackerGroup.prototype.nameInTree = function () {
|
||||
var names = []
|
||||
var from = this
|
||||
while (from) {
|
||||
names.unshift(from.name)
|
||||
from = from.parentGroup
|
||||
}
|
||||
return names.join('/')
|
||||
}
|
||||
|
||||
TrackerGroup.prototype.addUnit = function (unit, weight) {
|
||||
if (unit.addUnit) {
|
||||
var toTest = this
|
||||
while (toTest) {
|
||||
if (unit === toTest) {
|
||||
throw new Error(
|
||||
'Attempted to add tracker group ' +
|
||||
unit.name + ' to tree that already includes it ' +
|
||||
this.nameInTree(this))
|
||||
}
|
||||
toTest = toTest.parentGroup
|
||||
}
|
||||
unit.parentGroup = this
|
||||
}
|
||||
this.weight[unit.id] = weight || 1
|
||||
this.totalWeight += this.weight[unit.id]
|
||||
this.trackers.push(unit)
|
||||
this.completion[unit.id] = unit.completed()
|
||||
unit.on('change', this.bubbleChange)
|
||||
if (!this.finished) this.emit('change', unit.name, this.completion[unit.id], unit)
|
||||
return unit
|
||||
}
|
||||
|
||||
TrackerGroup.prototype.completed = function () {
|
||||
if (this.trackers.length === 0) return 0
|
||||
var valPerWeight = 1 / this.totalWeight
|
||||
var completed = 0
|
||||
for (var ii = 0; ii < this.trackers.length; ii++) {
|
||||
var trackerId = this.trackers[ii].id
|
||||
completed += valPerWeight * this.weight[trackerId] * this.completion[trackerId]
|
||||
}
|
||||
return completed
|
||||
}
|
||||
|
||||
TrackerGroup.prototype.newGroup = function (name, weight) {
|
||||
return this.addUnit(new TrackerGroup(name), weight)
|
||||
}
|
||||
|
||||
TrackerGroup.prototype.newItem = function (name, todo, weight) {
|
||||
return this.addUnit(new Tracker(name, todo), weight)
|
||||
}
|
||||
|
||||
TrackerGroup.prototype.newStream = function (name, todo, weight) {
|
||||
return this.addUnit(new TrackerStream(name, todo), weight)
|
||||
}
|
||||
|
||||
TrackerGroup.prototype.finish = function () {
|
||||
this.finished = true
|
||||
if (!this.trackers.length) this.addUnit(new Tracker(), 1, true)
|
||||
for (var ii = 0; ii < this.trackers.length; ii++) {
|
||||
var tracker = this.trackers[ii]
|
||||
tracker.finish()
|
||||
tracker.removeListener('change', this.bubbleChange)
|
||||
}
|
||||
this.emit('change', this.name, 1, this)
|
||||
}
|
||||
|
||||
var buffer = ' '
|
||||
TrackerGroup.prototype.debug = function (depth) {
|
||||
depth = depth || 0
|
||||
var indent = depth ? buffer.substr(0, depth) : ''
|
||||
var output = indent + (this.name || 'top') + ': ' + this.completed() + '\n'
|
||||
this.trackers.forEach(function (tracker) {
|
||||
if (tracker instanceof TrackerGroup) {
|
||||
output += tracker.debug(depth + 1)
|
||||
} else {
|
||||
output += indent + ' ' + tracker.name + ': ' + tracker.completed() + '\n'
|
||||
}
|
||||
})
|
||||
return output
|
||||
}
|
35
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker-stream.js
generated
vendored
Normal file
35
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker-stream.js
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
'use strict'
|
||||
var util = require('util')
|
||||
var stream = require('readable-stream')
|
||||
var delegate = require('delegates')
|
||||
var Tracker = require('./tracker.js')
|
||||
|
||||
var TrackerStream = module.exports = function (name, size, options) {
|
||||
stream.Transform.call(this, options)
|
||||
this.tracker = new Tracker(name, size)
|
||||
this.name = name
|
||||
this.id = this.tracker.id
|
||||
this.tracker.on('change', delegateChange(this))
|
||||
}
|
||||
util.inherits(TrackerStream, stream.Transform)
|
||||
|
||||
function delegateChange (trackerStream) {
|
||||
return function (name, completion, tracker) {
|
||||
trackerStream.emit('change', name, completion, trackerStream)
|
||||
}
|
||||
}
|
||||
|
||||
TrackerStream.prototype._transform = function (data, encoding, cb) {
|
||||
this.tracker.completeWork(data.length ? data.length : 1)
|
||||
this.push(data)
|
||||
cb()
|
||||
}
|
||||
|
||||
TrackerStream.prototype._flush = function (cb) {
|
||||
this.tracker.finish()
|
||||
cb()
|
||||
}
|
||||
|
||||
delegate(TrackerStream.prototype, 'tracker')
|
||||
.method('completed')
|
||||
.method('addWork')
|
30
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker.js
generated
vendored
Normal file
30
functions/node_modules/grpc/node_modules/are-we-there-yet/tracker.js
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
'use strict'
|
||||
var util = require('util')
|
||||
var TrackerBase = require('./tracker-base.js')
|
||||
|
||||
var Tracker = module.exports = function (name, todo) {
|
||||
TrackerBase.call(this, name)
|
||||
this.workDone = 0
|
||||
this.workTodo = todo || 0
|
||||
}
|
||||
util.inherits(Tracker, TrackerBase)
|
||||
|
||||
Tracker.prototype.completed = function () {
|
||||
return this.workTodo === 0 ? 0 : this.workDone / this.workTodo
|
||||
}
|
||||
|
||||
Tracker.prototype.addWork = function (work) {
|
||||
this.workTodo += work
|
||||
this.emit('change', this.name, this.completed(), this)
|
||||
}
|
||||
|
||||
Tracker.prototype.completeWork = function (work) {
|
||||
this.workDone += work
|
||||
if (this.workDone > this.workTodo) this.workDone = this.workTodo
|
||||
this.emit('change', this.name, this.completed(), this)
|
||||
}
|
||||
|
||||
Tracker.prototype.finish = function () {
|
||||
this.workTodo = this.workDone = 1
|
||||
this.emit('change', this.name, 1, this)
|
||||
}
|
5
functions/node_modules/grpc/node_modules/balanced-match/.npmignore
generated
vendored
Normal file
5
functions/node_modules/grpc/node_modules/balanced-match/.npmignore
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
test
|
||||
.gitignore
|
||||
.travis.yml
|
||||
Makefile
|
||||
example.js
|
21
functions/node_modules/grpc/node_modules/balanced-match/LICENSE.md
generated
vendored
Normal file
21
functions/node_modules/grpc/node_modules/balanced-match/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
91
functions/node_modules/grpc/node_modules/balanced-match/README.md
generated
vendored
Normal file
91
functions/node_modules/grpc/node_modules/balanced-match/README.md
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
# balanced-match
|
||||
|
||||
Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
|
||||
|
||||
[](http://travis-ci.org/juliangruber/balanced-match)
|
||||
[](https://www.npmjs.org/package/balanced-match)
|
||||
|
||||
[](https://ci.testling.com/juliangruber/balanced-match)
|
||||
|
||||
## Example
|
||||
|
||||
Get the first matching pair of braces:
|
||||
|
||||
```js
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
console.log(balanced('{', '}', 'pre{in{nested}}post'));
|
||||
console.log(balanced('{', '}', 'pre{first}between{second}post'));
|
||||
console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
|
||||
```
|
||||
|
||||
The matches are:
|
||||
|
||||
```bash
|
||||
$ node example.js
|
||||
{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
|
||||
{ start: 3,
|
||||
end: 9,
|
||||
pre: 'pre',
|
||||
body: 'first',
|
||||
post: 'between{second}post' }
|
||||
{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### var m = balanced(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
object with those keys:
|
||||
|
||||
* **start** the index of the first match of `a`
|
||||
* **end** the index of the matching `b`
|
||||
* **pre** the preamble, `a` and `b` not included
|
||||
* **body** the match, `a` and `b` not included
|
||||
* **post** the postscript, `a` and `b` not included
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
|
||||
|
||||
### var r = balanced.range(a, b, str)
|
||||
|
||||
For the first non-nested matching pair of `a` and `b` in `str`, return an
|
||||
array with indexes: `[ <a index>, <b index> ]`.
|
||||
|
||||
If there's no match, `undefined` will be returned.
|
||||
|
||||
If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install balanced-match
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
59
functions/node_modules/grpc/node_modules/balanced-match/index.js
generated
vendored
Normal file
59
functions/node_modules/grpc/node_modules/balanced-match/index.js
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
'use strict';
|
||||
module.exports = balanced;
|
||||
function balanced(a, b, str) {
|
||||
if (a instanceof RegExp) a = maybeMatch(a, str);
|
||||
if (b instanceof RegExp) b = maybeMatch(b, str);
|
||||
|
||||
var r = range(a, b, str);
|
||||
|
||||
return r && {
|
||||
start: r[0],
|
||||
end: r[1],
|
||||
pre: str.slice(0, r[0]),
|
||||
body: str.slice(r[0] + a.length, r[1]),
|
||||
post: str.slice(r[1] + b.length)
|
||||
};
|
||||
}
|
||||
|
||||
function maybeMatch(reg, str) {
|
||||
var m = str.match(reg);
|
||||
return m ? m[0] : null;
|
||||
}
|
||||
|
||||
balanced.range = range;
|
||||
function range(a, b, str) {
|
||||
var begs, beg, left, right, result;
|
||||
var ai = str.indexOf(a);
|
||||
var bi = str.indexOf(b, ai + 1);
|
||||
var i = ai;
|
||||
|
||||
if (ai >= 0 && bi > 0) {
|
||||
begs = [];
|
||||
left = str.length;
|
||||
|
||||
while (i >= 0 && !result) {
|
||||
if (i == ai) {
|
||||
begs.push(i);
|
||||
ai = str.indexOf(a, i + 1);
|
||||
} else if (begs.length == 1) {
|
||||
result = [ begs.pop(), bi ];
|
||||
} else {
|
||||
beg = begs.pop();
|
||||
if (beg < left) {
|
||||
left = beg;
|
||||
right = bi;
|
||||
}
|
||||
|
||||
bi = str.indexOf(b, i + 1);
|
||||
}
|
||||
|
||||
i = ai < bi && ai >= 0 ? ai : bi;
|
||||
}
|
||||
|
||||
if (begs.length) {
|
||||
result = [ left, right ];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
80
functions/node_modules/grpc/node_modules/balanced-match/package.json
generated
vendored
Normal file
80
functions/node_modules/grpc/node_modules/balanced-match/package.json
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"balanced-match@1.0.0",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "balanced-match@1.0.0",
|
||||
"_id": "balanced-match@1.0.0",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"_location": "/grpc/balanced-match",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "balanced-match@1.0.0",
|
||||
"name": "balanced-match",
|
||||
"escapedName": "balanced-match",
|
||||
"rawSpec": "1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/brace-expansion"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"_spec": "1.0.0",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/juliangruber/balanced-match/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Match balanced character pairs, like \"{\" and \"}\"",
|
||||
"devDependencies": {
|
||||
"matcha": "^0.7.0",
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/balanced-match",
|
||||
"keywords": [
|
||||
"match",
|
||||
"regexp",
|
||||
"test",
|
||||
"balanced",
|
||||
"parse"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "balanced-match",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/balanced-match.git"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "make bench",
|
||||
"test": "make test"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
21
functions/node_modules/grpc/node_modules/brace-expansion/LICENSE
generated
vendored
Normal file
21
functions/node_modules/grpc/node_modules/brace-expansion/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
129
functions/node_modules/grpc/node_modules/brace-expansion/README.md
generated
vendored
Normal file
129
functions/node_modules/grpc/node_modules/brace-expansion/README.md
generated
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
# brace-expansion
|
||||
|
||||
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
|
||||
as known from sh/bash, in JavaScript.
|
||||
|
||||
[](http://travis-ci.org/juliangruber/brace-expansion)
|
||||
[](https://www.npmjs.org/package/brace-expansion)
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
[](https://ci.testling.com/juliangruber/brace-expansion)
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
|
||||
expand('file-{a,b,c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('-v{,,}')
|
||||
// => ['-v', '-v', '-v']
|
||||
|
||||
expand('file{0..2}.jpg')
|
||||
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
|
||||
|
||||
expand('file-{a..c}.jpg')
|
||||
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
|
||||
|
||||
expand('file{2..0}.jpg')
|
||||
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
|
||||
|
||||
expand('file{0..4..2}.jpg')
|
||||
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
|
||||
|
||||
expand('file-{a..e..2}.jpg')
|
||||
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
|
||||
|
||||
expand('file{00..10..5}.jpg')
|
||||
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
|
||||
|
||||
expand('{{A..C},{a..c}}')
|
||||
// => ['A', 'B', 'C', 'a', 'b', 'c']
|
||||
|
||||
expand('ppp{,config,oe{,conf}}')
|
||||
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var expand = require('brace-expansion');
|
||||
```
|
||||
|
||||
### var expanded = expand(str)
|
||||
|
||||
Return an array of all possible and valid expansions of `str`. If none are
|
||||
found, `[str]` is returned.
|
||||
|
||||
Valid expansions are:
|
||||
|
||||
```js
|
||||
/^(.*,)+(.+)?$/
|
||||
// {a,b,...}
|
||||
```
|
||||
|
||||
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
A numeric sequence from `x` to `y` inclusive, with optional increment.
|
||||
If `x` or `y` start with a leading `0`, all the numbers will be padded
|
||||
to have equal length. Negative numbers and backwards iteration work too.
|
||||
|
||||
```js
|
||||
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
|
||||
// {x..y[..incr]}
|
||||
```
|
||||
|
||||
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
|
||||
`x` and `y` must be exactly one character, and if given, `incr` must be a
|
||||
number.
|
||||
|
||||
For compatibility reasons, the string `${` is not eligible for brace expansion.
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```bash
|
||||
npm install brace-expansion
|
||||
```
|
||||
|
||||
## Contributors
|
||||
|
||||
- [Julian Gruber](https://github.com/juliangruber)
|
||||
- [Isaac Z. Schlueter](https://github.com/isaacs)
|
||||
|
||||
## Sponsors
|
||||
|
||||
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
|
||||
|
||||
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.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.
|
201
functions/node_modules/grpc/node_modules/brace-expansion/index.js
generated
vendored
Normal file
201
functions/node_modules/grpc/node_modules/brace-expansion/index.js
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
var concatMap = require('concat-map');
|
||||
var balanced = require('balanced-match');
|
||||
|
||||
module.exports = expandTop;
|
||||
|
||||
var escSlash = '\0SLASH'+Math.random()+'\0';
|
||||
var escOpen = '\0OPEN'+Math.random()+'\0';
|
||||
var escClose = '\0CLOSE'+Math.random()+'\0';
|
||||
var escComma = '\0COMMA'+Math.random()+'\0';
|
||||
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
||||
|
||||
function numeric(str) {
|
||||
return parseInt(str, 10) == str
|
||||
? parseInt(str, 10)
|
||||
: str.charCodeAt(0);
|
||||
}
|
||||
|
||||
function escapeBraces(str) {
|
||||
return str.split('\\\\').join(escSlash)
|
||||
.split('\\{').join(escOpen)
|
||||
.split('\\}').join(escClose)
|
||||
.split('\\,').join(escComma)
|
||||
.split('\\.').join(escPeriod);
|
||||
}
|
||||
|
||||
function unescapeBraces(str) {
|
||||
return str.split(escSlash).join('\\')
|
||||
.split(escOpen).join('{')
|
||||
.split(escClose).join('}')
|
||||
.split(escComma).join(',')
|
||||
.split(escPeriod).join('.');
|
||||
}
|
||||
|
||||
|
||||
// Basically just str.split(","), but handling cases
|
||||
// where we have nested braced sections, which should be
|
||||
// treated as individual members, like {a,{b,c},d}
|
||||
function parseCommaParts(str) {
|
||||
if (!str)
|
||||
return [''];
|
||||
|
||||
var parts = [];
|
||||
var m = balanced('{', '}', str);
|
||||
|
||||
if (!m)
|
||||
return str.split(',');
|
||||
|
||||
var pre = m.pre;
|
||||
var body = m.body;
|
||||
var post = m.post;
|
||||
var p = pre.split(',');
|
||||
|
||||
p[p.length-1] += '{' + body + '}';
|
||||
var postParts = parseCommaParts(post);
|
||||
if (post.length) {
|
||||
p[p.length-1] += postParts.shift();
|
||||
p.push.apply(p, postParts);
|
||||
}
|
||||
|
||||
parts.push.apply(parts, p);
|
||||
|
||||
return parts;
|
||||
}
|
||||
|
||||
function expandTop(str) {
|
||||
if (!str)
|
||||
return [];
|
||||
|
||||
// I don't know why Bash 4.3 does this, but it does.
|
||||
// Anything starting with {} will have the first two bytes preserved
|
||||
// but *only* at the top level, so {},a}b will not expand to anything,
|
||||
// but a{},b}c will be expanded to [a}c,abc].
|
||||
// One could argue that this is a bug in Bash, but since the goal of
|
||||
// this module is to match Bash's rules, we escape a leading {}
|
||||
if (str.substr(0, 2) === '{}') {
|
||||
str = '\\{\\}' + str.substr(2);
|
||||
}
|
||||
|
||||
return expand(escapeBraces(str), true).map(unescapeBraces);
|
||||
}
|
||||
|
||||
function identity(e) {
|
||||
return e;
|
||||
}
|
||||
|
||||
function embrace(str) {
|
||||
return '{' + str + '}';
|
||||
}
|
||||
function isPadded(el) {
|
||||
return /^-?0\d/.test(el);
|
||||
}
|
||||
|
||||
function lte(i, y) {
|
||||
return i <= y;
|
||||
}
|
||||
function gte(i, y) {
|
||||
return i >= y;
|
||||
}
|
||||
|
||||
function expand(str, isTop) {
|
||||
var expansions = [];
|
||||
|
||||
var m = balanced('{', '}', str);
|
||||
if (!m || /\$$/.test(m.pre)) return [str];
|
||||
|
||||
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
||||
var isSequence = isNumericSequence || isAlphaSequence;
|
||||
var isOptions = m.body.indexOf(',') >= 0;
|
||||
if (!isSequence && !isOptions) {
|
||||
// {a},b}
|
||||
if (m.post.match(/,.*\}/)) {
|
||||
str = m.pre + '{' + m.body + escClose + m.post;
|
||||
return expand(str);
|
||||
}
|
||||
return [str];
|
||||
}
|
||||
|
||||
var n;
|
||||
if (isSequence) {
|
||||
n = m.body.split(/\.\./);
|
||||
} else {
|
||||
n = parseCommaParts(m.body);
|
||||
if (n.length === 1) {
|
||||
// x{{a,b}}y ==> x{a}y x{b}y
|
||||
n = expand(n[0], false).map(embrace);
|
||||
if (n.length === 1) {
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
return post.map(function(p) {
|
||||
return m.pre + n[0] + p;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// at this point, n is the parts, and we know it's not a comma set
|
||||
// with a single entry.
|
||||
|
||||
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
||||
var pre = m.pre;
|
||||
var post = m.post.length
|
||||
? expand(m.post, false)
|
||||
: [''];
|
||||
|
||||
var N;
|
||||
|
||||
if (isSequence) {
|
||||
var x = numeric(n[0]);
|
||||
var y = numeric(n[1]);
|
||||
var width = Math.max(n[0].length, n[1].length)
|
||||
var incr = n.length == 3
|
||||
? Math.abs(numeric(n[2]))
|
||||
: 1;
|
||||
var test = lte;
|
||||
var reverse = y < x;
|
||||
if (reverse) {
|
||||
incr *= -1;
|
||||
test = gte;
|
||||
}
|
||||
var pad = n.some(isPadded);
|
||||
|
||||
N = [];
|
||||
|
||||
for (var i = x; test(i, y); i += incr) {
|
||||
var c;
|
||||
if (isAlphaSequence) {
|
||||
c = String.fromCharCode(i);
|
||||
if (c === '\\')
|
||||
c = '';
|
||||
} else {
|
||||
c = String(i);
|
||||
if (pad) {
|
||||
var need = width - c.length;
|
||||
if (need > 0) {
|
||||
var z = new Array(need + 1).join('0');
|
||||
if (i < 0)
|
||||
c = '-' + z + c.slice(1);
|
||||
else
|
||||
c = z + c;
|
||||
}
|
||||
}
|
||||
}
|
||||
N.push(c);
|
||||
}
|
||||
} else {
|
||||
N = concatMap(n, function(el) { return expand(el, false) });
|
||||
}
|
||||
|
||||
for (var j = 0; j < N.length; j++) {
|
||||
for (var k = 0; k < post.length; k++) {
|
||||
var expansion = pre + N[j] + post[k];
|
||||
if (!isTop || isSequence || expansion)
|
||||
expansions.push(expansion);
|
||||
}
|
||||
}
|
||||
|
||||
return expansions;
|
||||
}
|
||||
|
78
functions/node_modules/grpc/node_modules/brace-expansion/package.json
generated
vendored
Normal file
78
functions/node_modules/grpc/node_modules/brace-expansion/package.json
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"brace-expansion@1.1.11",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "brace-expansion@1.1.11",
|
||||
"_id": "brace-expansion@1.1.11",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"_location": "/grpc/brace-expansion",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "brace-expansion@1.1.11",
|
||||
"name": "brace-expansion",
|
||||
"escapedName": "brace-expansion",
|
||||
"rawSpec": "1.1.11",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.11"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/minimatch"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"_spec": "1.1.11",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/juliangruber/brace-expansion/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
},
|
||||
"description": "Brace expansion as known from sh/bash",
|
||||
"devDependencies": {
|
||||
"matcha": "^0.7.0",
|
||||
"tape": "^4.6.0"
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/brace-expansion",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "brace-expansion",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/brace-expansion.git"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "matcha test/perf/bench.js",
|
||||
"gentest": "bash test/generate.sh",
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": [
|
||||
"ie/8..latest",
|
||||
"firefox/20..latest",
|
||||
"firefox/nightly",
|
||||
"chrome/25..latest",
|
||||
"chrome/canary",
|
||||
"opera/12..latest",
|
||||
"opera/next",
|
||||
"safari/5.1..latest",
|
||||
"ipad/6.0..latest",
|
||||
"iphone/6.0..latest",
|
||||
"android-browser/4.2..latest"
|
||||
]
|
||||
},
|
||||
"version": "1.1.11"
|
||||
}
|
15
functions/node_modules/grpc/node_modules/chownr/LICENSE
generated
vendored
Normal file
15
functions/node_modules/grpc/node_modules/chownr/LICENSE
generated
vendored
Normal file
@ -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.
|
3
functions/node_modules/grpc/node_modules/chownr/README.md
generated
vendored
Normal file
3
functions/node_modules/grpc/node_modules/chownr/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
Like `chown -R`.
|
||||
|
||||
Takes the same arguments as `fs.chown()`
|
52
functions/node_modules/grpc/node_modules/chownr/chownr.js
generated
vendored
Normal file
52
functions/node_modules/grpc/node_modules/chownr/chownr.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
module.exports = chownr
|
||||
chownr.sync = chownrSync
|
||||
|
||||
var fs = require("fs")
|
||||
, path = require("path")
|
||||
|
||||
function chownr (p, uid, gid, cb) {
|
||||
fs.readdir(p, function (er, children) {
|
||||
// any error other than ENOTDIR means it's not readable, or
|
||||
// doesn't exist. give up.
|
||||
if (er && er.code !== "ENOTDIR") return cb(er)
|
||||
if (er || !children.length) return fs.chown(p, uid, gid, cb)
|
||||
|
||||
var len = children.length
|
||||
, errState = null
|
||||
children.forEach(function (child) {
|
||||
var pathChild = path.resolve(p, child);
|
||||
fs.lstat(pathChild, function(er, stats) {
|
||||
if (er)
|
||||
return cb(er)
|
||||
if (!stats.isSymbolicLink())
|
||||
chownr(pathChild, uid, gid, then)
|
||||
else
|
||||
then()
|
||||
})
|
||||
})
|
||||
function then (er) {
|
||||
if (errState) return
|
||||
if (er) return cb(errState = er)
|
||||
if (-- len === 0) return fs.chown(p, uid, gid, cb)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function chownrSync (p, uid, gid) {
|
||||
var children
|
||||
try {
|
||||
children = fs.readdirSync(p)
|
||||
} catch (er) {
|
||||
if (er && er.code === "ENOTDIR") return fs.chownSync(p, uid, gid)
|
||||
throw er
|
||||
}
|
||||
if (!children.length) return fs.chownSync(p, uid, gid)
|
||||
|
||||
children.forEach(function (child) {
|
||||
var pathChild = path.resolve(p, child)
|
||||
var stats = fs.lstatSync(pathChild)
|
||||
if (!stats.isSymbolicLink())
|
||||
chownrSync(pathChild, uid, gid)
|
||||
})
|
||||
return fs.chownSync(p, uid, gid)
|
||||
}
|
56
functions/node_modules/grpc/node_modules/chownr/package.json
generated
vendored
Normal file
56
functions/node_modules/grpc/node_modules/chownr/package.json
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"_from": "chownr@^1.0.1",
|
||||
"_id": "chownr@1.0.1",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=",
|
||||
"_location": "/grpc/chownr",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "chownr@^1.0.1",
|
||||
"name": "chownr",
|
||||
"escapedName": "chownr",
|
||||
"rawSpec": "^1.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/tar"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz",
|
||||
"_shasum": "e2a75042a9551908bebd25b8523d5f9769d79181",
|
||||
"_spec": "chownr@^1.0.1",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/node_modules/tar",
|
||||
"author": {
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/chownr/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "like `chown -R`",
|
||||
"devDependencies": {
|
||||
"mkdirp": "0.3",
|
||||
"rimraf": "",
|
||||
"tap": "^1.2.0"
|
||||
},
|
||||
"files": [
|
||||
"chownr.js"
|
||||
],
|
||||
"homepage": "https://github.com/isaacs/chownr#readme",
|
||||
"license": "ISC",
|
||||
"main": "chownr.js",
|
||||
"name": "chownr",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/chownr.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
32
functions/node_modules/grpc/node_modules/code-point-at/index.js
generated
vendored
Normal file
32
functions/node_modules/grpc/node_modules/code-point-at/index.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/* eslint-disable babel/new-cap, xo/throw-new-error */
|
||||
'use strict';
|
||||
module.exports = function (str, pos) {
|
||||
if (str === null || str === undefined) {
|
||||
throw TypeError();
|
||||
}
|
||||
|
||||
str = String(str);
|
||||
|
||||
var size = str.length;
|
||||
var i = pos ? Number(pos) : 0;
|
||||
|
||||
if (Number.isNaN(i)) {
|
||||
i = 0;
|
||||
}
|
||||
|
||||
if (i < 0 || i >= size) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var first = str.charCodeAt(i);
|
||||
|
||||
if (first >= 0xD800 && first <= 0xDBFF && size > i + 1) {
|
||||
var second = str.charCodeAt(i + 1);
|
||||
|
||||
if (second >= 0xDC00 && second <= 0xDFFF) {
|
||||
return ((first - 0xD800) * 0x400) + second - 0xDC00 + 0x10000;
|
||||
}
|
||||
}
|
||||
|
||||
return first;
|
||||
};
|
21
functions/node_modules/grpc/node_modules/code-point-at/license
generated
vendored
Normal file
21
functions/node_modules/grpc/node_modules/code-point-at/license
generated
vendored
Normal file
@ -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.
|
73
functions/node_modules/grpc/node_modules/code-point-at/package.json
generated
vendored
Normal file
73
functions/node_modules/grpc/node_modules/code-point-at/package.json
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"code-point-at@1.1.0",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "code-point-at@1.1.0",
|
||||
"_id": "code-point-at@1.1.0",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"_location": "/grpc/code-point-at",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "code-point-at@1.1.0",
|
||||
"name": "code-point-at",
|
||||
"escapedName": "code-point-at",
|
||||
"rawSpec": "1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/string-width"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"_spec": "1.1.0",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/code-point-at/issues"
|
||||
},
|
||||
"description": "ES2015 `String#codePointAt()` ponyfill",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "^0.16.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/code-point-at#readme",
|
||||
"keywords": [
|
||||
"es2015",
|
||||
"ponyfill",
|
||||
"polyfill",
|
||||
"shim",
|
||||
"string",
|
||||
"str",
|
||||
"code",
|
||||
"point",
|
||||
"at",
|
||||
"codepoint",
|
||||
"unicode"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "code-point-at",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/code-point-at.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
32
functions/node_modules/grpc/node_modules/code-point-at/readme.md
generated
vendored
Normal file
32
functions/node_modules/grpc/node_modules/code-point-at/readme.md
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# code-point-at [](https://travis-ci.org/sindresorhus/code-point-at)
|
||||
|
||||
> ES2015 [`String#codePointAt()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt) [ponyfill](https://ponyfill.com)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save code-point-at
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var codePointAt = require('code-point-at');
|
||||
|
||||
codePointAt('🐴');
|
||||
//=> 128052
|
||||
|
||||
codePointAt('abc', 2);
|
||||
//=> 99
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### codePointAt(input, [position])
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
4
functions/node_modules/grpc/node_modules/concat-map/.travis.yml
generated
vendored
Normal file
4
functions/node_modules/grpc/node_modules/concat-map/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- 0.4
|
||||
- 0.6
|
18
functions/node_modules/grpc/node_modules/concat-map/LICENSE
generated
vendored
Normal file
18
functions/node_modules/grpc/node_modules/concat-map/LICENSE
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
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.
|
62
functions/node_modules/grpc/node_modules/concat-map/README.markdown
generated
vendored
Normal file
62
functions/node_modules/grpc/node_modules/concat-map/README.markdown
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
concat-map
|
||||
==========
|
||||
|
||||
Concatenative mapdashery.
|
||||
|
||||
[](http://ci.testling.com/substack/node-concat-map)
|
||||
|
||||
[](http://travis-ci.org/substack/node-concat-map)
|
||||
|
||||
example
|
||||
=======
|
||||
|
||||
``` js
|
||||
var concatMap = require('concat-map');
|
||||
var xs = [ 1, 2, 3, 4, 5, 6 ];
|
||||
var ys = concatMap(xs, function (x) {
|
||||
return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
|
||||
});
|
||||
console.dir(ys);
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
```
|
||||
[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]
|
||||
```
|
||||
|
||||
methods
|
||||
=======
|
||||
|
||||
``` js
|
||||
var concatMap = require('concat-map')
|
||||
```
|
||||
|
||||
concatMap(xs, fn)
|
||||
-----------------
|
||||
|
||||
Return an array of concatenated elements by calling `fn(x, i)` for each element
|
||||
`x` and each index `i` in the array `xs`.
|
||||
|
||||
When `fn(x, i)` returns an array, its result will be concatenated with the
|
||||
result array. If `fn(x, i)` returns anything else, that value will be pushed
|
||||
onto the end of the result array.
|
||||
|
||||
install
|
||||
=======
|
||||
|
||||
With [npm](http://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install concat-map
|
||||
```
|
||||
|
||||
license
|
||||
=======
|
||||
|
||||
MIT
|
||||
|
||||
notes
|
||||
=====
|
||||
|
||||
This module was written while sitting high above the ground in a tree.
|
6
functions/node_modules/grpc/node_modules/concat-map/example/map.js
generated
vendored
Normal file
6
functions/node_modules/grpc/node_modules/concat-map/example/map.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
var concatMap = require('../');
|
||||
var xs = [ 1, 2, 3, 4, 5, 6 ];
|
||||
var ys = concatMap(xs, function (x) {
|
||||
return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
|
||||
});
|
||||
console.dir(ys);
|
13
functions/node_modules/grpc/node_modules/concat-map/index.js
generated
vendored
Normal file
13
functions/node_modules/grpc/node_modules/concat-map/index.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
module.exports = function (xs, fn) {
|
||||
var res = [];
|
||||
for (var i = 0; i < xs.length; i++) {
|
||||
var x = fn(xs[i], i);
|
||||
if (isArray(x)) res.push.apply(res, x);
|
||||
else res.push(x);
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
var isArray = Array.isArray || function (xs) {
|
||||
return Object.prototype.toString.call(xs) === '[object Array]';
|
||||
};
|
91
functions/node_modules/grpc/node_modules/concat-map/package.json
generated
vendored
Normal file
91
functions/node_modules/grpc/node_modules/concat-map/package.json
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"concat-map@0.0.1",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "concat-map@0.0.1",
|
||||
"_id": "concat-map@0.0.1",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"_location": "/grpc/concat-map",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "concat-map@0.0.1",
|
||||
"name": "concat-map",
|
||||
"escapedName": "concat-map",
|
||||
"rawSpec": "0.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/brace-expansion"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"_spec": "0.0.1",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/substack/node-concat-map/issues"
|
||||
},
|
||||
"description": "concatenative mapdashery",
|
||||
"devDependencies": {
|
||||
"tape": "~2.4.0"
|
||||
},
|
||||
"directories": {
|
||||
"example": "example",
|
||||
"test": "test"
|
||||
},
|
||||
"homepage": "https://github.com/substack/node-concat-map#readme",
|
||||
"keywords": [
|
||||
"concat",
|
||||
"concatMap",
|
||||
"map",
|
||||
"functional",
|
||||
"higher-order"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "concat-map",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/substack/node-concat-map.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": {
|
||||
"ie": [
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9
|
||||
],
|
||||
"ff": [
|
||||
3.5,
|
||||
10,
|
||||
15
|
||||
],
|
||||
"chrome": [
|
||||
10,
|
||||
22
|
||||
],
|
||||
"safari": [
|
||||
5.1
|
||||
],
|
||||
"opera": [
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
39
functions/node_modules/grpc/node_modules/concat-map/test/map.js
generated
vendored
Normal file
39
functions/node_modules/grpc/node_modules/concat-map/test/map.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
var concatMap = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('empty or not', function (t) {
|
||||
var xs = [ 1, 2, 3, 4, 5, 6 ];
|
||||
var ixes = [];
|
||||
var ys = concatMap(xs, function (x, ix) {
|
||||
ixes.push(ix);
|
||||
return x % 2 ? [ x - 0.1, x, x + 0.1 ] : [];
|
||||
});
|
||||
t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]);
|
||||
t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('always something', function (t) {
|
||||
var xs = [ 'a', 'b', 'c', 'd' ];
|
||||
var ys = concatMap(xs, function (x) {
|
||||
return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ];
|
||||
});
|
||||
t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('scalars', function (t) {
|
||||
var xs = [ 'a', 'b', 'c', 'd' ];
|
||||
var ys = concatMap(xs, function (x) {
|
||||
return x === 'b' ? [ 'B', 'B', 'B' ] : x;
|
||||
});
|
||||
t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('undefs', function (t) {
|
||||
var xs = [ 'a', 'b', 'c', 'd' ];
|
||||
var ys = concatMap(xs, function () {});
|
||||
t.same(ys, [ undefined, undefined, undefined, undefined ]);
|
||||
t.end();
|
||||
});
|
13
functions/node_modules/grpc/node_modules/console-control-strings/LICENSE
generated
vendored
Normal file
13
functions/node_modules/grpc/node_modules/console-control-strings/LICENSE
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
Copyright (c) 2014, Rebecca Turner <me@re-becca.org>
|
||||
|
||||
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.
|
145
functions/node_modules/grpc/node_modules/console-control-strings/README.md
generated
vendored
Normal file
145
functions/node_modules/grpc/node_modules/console-control-strings/README.md
generated
vendored
Normal file
@ -0,0 +1,145 @@
|
||||
# Console Control Strings
|
||||
|
||||
A library of cross-platform tested terminal/console command strings for
|
||||
doing things like color and cursor positioning. This is a subset of both
|
||||
ansi and vt100. All control codes included work on both Windows & Unix-like
|
||||
OSes, except where noted.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var consoleControl = require('console-control-strings')
|
||||
|
||||
console.log(consoleControl.color('blue','bgRed', 'bold') + 'hi there' + consoleControl.color('reset'))
|
||||
process.stdout.write(consoleControl.goto(75, 10))
|
||||
```
|
||||
|
||||
## Why Another?
|
||||
|
||||
There are tons of libraries similar to this one. I wanted one that was:
|
||||
|
||||
1. Very clear about compatibility goals.
|
||||
2. Could emit, for instance, a start color code without an end one.
|
||||
3. Returned strings w/o writing to streams.
|
||||
4. Was not weighed down with other unrelated baggage.
|
||||
|
||||
## Functions
|
||||
|
||||
### var code = consoleControl.up(_num = 1_)
|
||||
|
||||
Returns the escape sequence to move _num_ lines up.
|
||||
|
||||
### var code = consoleControl.down(_num = 1_)
|
||||
|
||||
Returns the escape sequence to move _num_ lines down.
|
||||
|
||||
### var code = consoleControl.forward(_num = 1_)
|
||||
|
||||
Returns the escape sequence to move _num_ lines righ.
|
||||
|
||||
### var code = consoleControl.back(_num = 1_)
|
||||
|
||||
Returns the escape sequence to move _num_ lines left.
|
||||
|
||||
### var code = consoleControl.nextLine(_num = 1_)
|
||||
|
||||
Returns the escape sequence to move _num_ lines down and to the beginning of
|
||||
the line.
|
||||
|
||||
### var code = consoleControl.previousLine(_num = 1_)
|
||||
|
||||
Returns the escape sequence to move _num_ lines up and to the beginning of
|
||||
the line.
|
||||
|
||||
### var code = consoleControl.eraseData()
|
||||
|
||||
Returns the escape sequence to erase everything from the current cursor
|
||||
position to the bottom right of the screen. This is line based, so it
|
||||
erases the remainder of the current line and all following lines.
|
||||
|
||||
### var code = consoleControl.eraseLine()
|
||||
|
||||
Returns the escape sequence to erase to the end of the current line.
|
||||
|
||||
### var code = consoleControl.goto(_x_, _y_)
|
||||
|
||||
Returns the escape sequence to move the cursor to the designated position.
|
||||
Note that the origin is _1, 1_ not _0, 0_.
|
||||
|
||||
### var code = consoleControl.gotoSOL()
|
||||
|
||||
Returns the escape sequence to move the cursor to the beginning of the
|
||||
current line. (That is, it returns a carriage return, `\r`.)
|
||||
|
||||
### var code = consoleControl.beep()
|
||||
|
||||
Returns the escape sequence to cause the termianl to beep. (That is, it
|
||||
returns unicode character `\x0007`, a Control-G.)
|
||||
|
||||
### var code = consoleControl.hideCursor()
|
||||
|
||||
Returns the escape sequence to hide the cursor.
|
||||
|
||||
### var code = consoleControl.showCursor()
|
||||
|
||||
Returns the escape sequence to show the cursor.
|
||||
|
||||
### var code = consoleControl.color(_colors = []_)
|
||||
|
||||
### var code = consoleControl.color(_color1_, _color2_, _…_, _colorn_)
|
||||
|
||||
Returns the escape sequence to set the current terminal display attributes
|
||||
(mostly colors). Arguments can either be a list of attributes or an array
|
||||
of attributes. The difference between passing in an array or list of colors
|
||||
and calling `.color` separately for each one, is that in the former case a
|
||||
single escape sequence will be produced where as in the latter each change
|
||||
will have its own distinct escape sequence. Each attribute can be one of:
|
||||
|
||||
* Reset:
|
||||
* **reset** – Reset all attributes to the terminal default.
|
||||
* Styles:
|
||||
* **bold** – Display text as bold. In some terminals this means using a
|
||||
bold font, in others this means changing the color. In some it means
|
||||
both.
|
||||
* **italic** – Display text as italic. This is not available in most Windows terminals.
|
||||
* **underline** – Underline text. This is not available in most Windows Terminals.
|
||||
* **inverse** – Invert the foreground and background colors.
|
||||
* **stopBold** – Do not display text as bold.
|
||||
* **stopItalic** – Do not display text as italic.
|
||||
* **stopUnderline** – Do not underline text.
|
||||
* **stopInverse** – Do not invert foreground and background.
|
||||
* Colors:
|
||||
* **white**
|
||||
* **black**
|
||||
* **blue**
|
||||
* **cyan**
|
||||
* **green**
|
||||
* **magenta**
|
||||
* **red**
|
||||
* **yellow**
|
||||
* **grey** / **brightBlack**
|
||||
* **brightRed**
|
||||
* **brightGreen**
|
||||
* **brightYellow**
|
||||
* **brightBlue**
|
||||
* **brightMagenta**
|
||||
* **brightCyan**
|
||||
* **brightWhite**
|
||||
* Background Colors:
|
||||
* **bgWhite**
|
||||
* **bgBlack**
|
||||
* **bgBlue**
|
||||
* **bgCyan**
|
||||
* **bgGreen**
|
||||
* **bgMagenta**
|
||||
* **bgRed**
|
||||
* **bgYellow**
|
||||
* **bgGrey** / **bgBrightBlack**
|
||||
* **bgBrightRed**
|
||||
* **bgBrightGreen**
|
||||
* **bgBrightYellow**
|
||||
* **bgBrightBlue**
|
||||
* **bgBrightMagenta**
|
||||
* **bgBrightCyan**
|
||||
* **bgBrightWhite**
|
||||
|
125
functions/node_modules/grpc/node_modules/console-control-strings/index.js
generated
vendored
Normal file
125
functions/node_modules/grpc/node_modules/console-control-strings/index.js
generated
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
'use strict'
|
||||
|
||||
// These tables borrowed from `ansi`
|
||||
|
||||
var prefix = '\x1b['
|
||||
|
||||
exports.up = function up (num) {
|
||||
return prefix + (num || '') + 'A'
|
||||
}
|
||||
|
||||
exports.down = function down (num) {
|
||||
return prefix + (num || '') + 'B'
|
||||
}
|
||||
|
||||
exports.forward = function forward (num) {
|
||||
return prefix + (num || '') + 'C'
|
||||
}
|
||||
|
||||
exports.back = function back (num) {
|
||||
return prefix + (num || '') + 'D'
|
||||
}
|
||||
|
||||
exports.nextLine = function nextLine (num) {
|
||||
return prefix + (num || '') + 'E'
|
||||
}
|
||||
|
||||
exports.previousLine = function previousLine (num) {
|
||||
return prefix + (num || '') + 'F'
|
||||
}
|
||||
|
||||
exports.horizontalAbsolute = function horizontalAbsolute (num) {
|
||||
if (num == null) throw new Error('horizontalAboslute requires a column to position to')
|
||||
return prefix + num + 'G'
|
||||
}
|
||||
|
||||
exports.eraseData = function eraseData () {
|
||||
return prefix + 'J'
|
||||
}
|
||||
|
||||
exports.eraseLine = function eraseLine () {
|
||||
return prefix + 'K'
|
||||
}
|
||||
|
||||
exports.goto = function (x, y) {
|
||||
return prefix + y + ';' + x + 'H'
|
||||
}
|
||||
|
||||
exports.gotoSOL = function () {
|
||||
return '\r'
|
||||
}
|
||||
|
||||
exports.beep = function () {
|
||||
return '\x07'
|
||||
}
|
||||
|
||||
exports.hideCursor = function hideCursor () {
|
||||
return prefix + '?25l'
|
||||
}
|
||||
|
||||
exports.showCursor = function showCursor () {
|
||||
return prefix + '?25h'
|
||||
}
|
||||
|
||||
var colors = {
|
||||
reset: 0,
|
||||
// styles
|
||||
bold: 1,
|
||||
italic: 3,
|
||||
underline: 4,
|
||||
inverse: 7,
|
||||
// resets
|
||||
stopBold: 22,
|
||||
stopItalic: 23,
|
||||
stopUnderline: 24,
|
||||
stopInverse: 27,
|
||||
// colors
|
||||
white: 37,
|
||||
black: 30,
|
||||
blue: 34,
|
||||
cyan: 36,
|
||||
green: 32,
|
||||
magenta: 35,
|
||||
red: 31,
|
||||
yellow: 33,
|
||||
bgWhite: 47,
|
||||
bgBlack: 40,
|
||||
bgBlue: 44,
|
||||
bgCyan: 46,
|
||||
bgGreen: 42,
|
||||
bgMagenta: 45,
|
||||
bgRed: 41,
|
||||
bgYellow: 43,
|
||||
|
||||
grey: 90,
|
||||
brightBlack: 90,
|
||||
brightRed: 91,
|
||||
brightGreen: 92,
|
||||
brightYellow: 93,
|
||||
brightBlue: 94,
|
||||
brightMagenta: 95,
|
||||
brightCyan: 96,
|
||||
brightWhite: 97,
|
||||
|
||||
bgGrey: 100,
|
||||
bgBrightBlack: 100,
|
||||
bgBrightRed: 101,
|
||||
bgBrightGreen: 102,
|
||||
bgBrightYellow: 103,
|
||||
bgBrightBlue: 104,
|
||||
bgBrightMagenta: 105,
|
||||
bgBrightCyan: 106,
|
||||
bgBrightWhite: 107
|
||||
}
|
||||
|
||||
exports.color = function color (colorWith) {
|
||||
if (arguments.length !== 1 || !Array.isArray(colorWith)) {
|
||||
colorWith = Array.prototype.slice.call(arguments)
|
||||
}
|
||||
return prefix + colorWith.map(colorNameToCode).join(';') + 'm'
|
||||
}
|
||||
|
||||
function colorNameToCode (color) {
|
||||
if (colors[color] != null) return colors[color]
|
||||
throw new Error('Unknown color or style name: ' + color)
|
||||
}
|
64
functions/node_modules/grpc/node_modules/console-control-strings/package.json
generated
vendored
Normal file
64
functions/node_modules/grpc/node_modules/console-control-strings/package.json
generated
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"console-control-strings@1.1.0",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "console-control-strings@1.1.0",
|
||||
"_id": "console-control-strings@1.1.0",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||
"_location": "/grpc/console-control-strings",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "console-control-strings@1.1.0",
|
||||
"name": "console-control-strings",
|
||||
"escapedName": "console-control-strings",
|
||||
"rawSpec": "1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/gauge",
|
||||
"/grpc/npmlog"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"_spec": "1.1.0",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Rebecca Turner",
|
||||
"email": "me@re-becca.org",
|
||||
"url": "http://re-becca.org/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/iarna/console-control-strings/issues"
|
||||
},
|
||||
"description": "A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.",
|
||||
"devDependencies": {
|
||||
"standard": "^7.1.2",
|
||||
"tap": "^5.7.2"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/iarna/console-control-strings#readme",
|
||||
"keywords": [],
|
||||
"license": "ISC",
|
||||
"main": "index.js",
|
||||
"name": "console-control-strings",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/iarna/console-control-strings.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && tap test/*.js"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
19
functions/node_modules/grpc/node_modules/core-util-is/LICENSE
generated
vendored
Normal file
19
functions/node_modules/grpc/node_modules/core-util-is/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright Node.js contributors. All rights reserved.
|
||||
|
||||
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.
|
3
functions/node_modules/grpc/node_modules/core-util-is/README.md
generated
vendored
Normal file
3
functions/node_modules/grpc/node_modules/core-util-is/README.md
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# core-util-is
|
||||
|
||||
The `util.is*` functions introduced in Node v0.12.
|
604
functions/node_modules/grpc/node_modules/core-util-is/float.patch
generated
vendored
Normal file
604
functions/node_modules/grpc/node_modules/core-util-is/float.patch
generated
vendored
Normal file
@ -0,0 +1,604 @@
|
||||
diff --git a/lib/util.js b/lib/util.js
|
||||
index a03e874..9074e8e 100644
|
||||
--- a/lib/util.js
|
||||
+++ b/lib/util.js
|
||||
@@ -19,430 +19,6 @@
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
-var formatRegExp = /%[sdj%]/g;
|
||||
-exports.format = function(f) {
|
||||
- if (!isString(f)) {
|
||||
- var objects = [];
|
||||
- for (var i = 0; i < arguments.length; i++) {
|
||||
- objects.push(inspect(arguments[i]));
|
||||
- }
|
||||
- return objects.join(' ');
|
||||
- }
|
||||
-
|
||||
- var i = 1;
|
||||
- var args = arguments;
|
||||
- var len = args.length;
|
||||
- var str = String(f).replace(formatRegExp, function(x) {
|
||||
- if (x === '%%') return '%';
|
||||
- if (i >= len) return x;
|
||||
- switch (x) {
|
||||
- case '%s': return String(args[i++]);
|
||||
- case '%d': return Number(args[i++]);
|
||||
- case '%j':
|
||||
- try {
|
||||
- return JSON.stringify(args[i++]);
|
||||
- } catch (_) {
|
||||
- return '[Circular]';
|
||||
- }
|
||||
- default:
|
||||
- return x;
|
||||
- }
|
||||
- });
|
||||
- for (var x = args[i]; i < len; x = args[++i]) {
|
||||
- if (isNull(x) || !isObject(x)) {
|
||||
- str += ' ' + x;
|
||||
- } else {
|
||||
- str += ' ' + inspect(x);
|
||||
- }
|
||||
- }
|
||||
- return str;
|
||||
-};
|
||||
-
|
||||
-
|
||||
-// Mark that a method should not be used.
|
||||
-// Returns a modified function which warns once by default.
|
||||
-// If --no-deprecation is set, then it is a no-op.
|
||||
-exports.deprecate = function(fn, msg) {
|
||||
- // Allow for deprecating things in the process of starting up.
|
||||
- if (isUndefined(global.process)) {
|
||||
- return function() {
|
||||
- return exports.deprecate(fn, msg).apply(this, arguments);
|
||||
- };
|
||||
- }
|
||||
-
|
||||
- if (process.noDeprecation === true) {
|
||||
- return fn;
|
||||
- }
|
||||
-
|
||||
- var warned = false;
|
||||
- function deprecated() {
|
||||
- if (!warned) {
|
||||
- if (process.throwDeprecation) {
|
||||
- throw new Error(msg);
|
||||
- } else if (process.traceDeprecation) {
|
||||
- console.trace(msg);
|
||||
- } else {
|
||||
- console.error(msg);
|
||||
- }
|
||||
- warned = true;
|
||||
- }
|
||||
- return fn.apply(this, arguments);
|
||||
- }
|
||||
-
|
||||
- return deprecated;
|
||||
-};
|
||||
-
|
||||
-
|
||||
-var debugs = {};
|
||||
-var debugEnviron;
|
||||
-exports.debuglog = function(set) {
|
||||
- if (isUndefined(debugEnviron))
|
||||
- debugEnviron = process.env.NODE_DEBUG || '';
|
||||
- set = set.toUpperCase();
|
||||
- if (!debugs[set]) {
|
||||
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
|
||||
- var pid = process.pid;
|
||||
- debugs[set] = function() {
|
||||
- var msg = exports.format.apply(exports, arguments);
|
||||
- console.error('%s %d: %s', set, pid, msg);
|
||||
- };
|
||||
- } else {
|
||||
- debugs[set] = function() {};
|
||||
- }
|
||||
- }
|
||||
- return debugs[set];
|
||||
-};
|
||||
-
|
||||
-
|
||||
-/**
|
||||
- * Echos the value of a value. Trys to print the value out
|
||||
- * in the best way possible given the different types.
|
||||
- *
|
||||
- * @param {Object} obj The object to print out.
|
||||
- * @param {Object} opts Optional options object that alters the output.
|
||||
- */
|
||||
-/* legacy: obj, showHidden, depth, colors*/
|
||||
-function inspect(obj, opts) {
|
||||
- // default options
|
||||
- var ctx = {
|
||||
- seen: [],
|
||||
- stylize: stylizeNoColor
|
||||
- };
|
||||
- // legacy...
|
||||
- if (arguments.length >= 3) ctx.depth = arguments[2];
|
||||
- if (arguments.length >= 4) ctx.colors = arguments[3];
|
||||
- if (isBoolean(opts)) {
|
||||
- // legacy...
|
||||
- ctx.showHidden = opts;
|
||||
- } else if (opts) {
|
||||
- // got an "options" object
|
||||
- exports._extend(ctx, opts);
|
||||
- }
|
||||
- // set default options
|
||||
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
||||
- if (isUndefined(ctx.depth)) ctx.depth = 2;
|
||||
- if (isUndefined(ctx.colors)) ctx.colors = false;
|
||||
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
||||
- if (ctx.colors) ctx.stylize = stylizeWithColor;
|
||||
- return formatValue(ctx, obj, ctx.depth);
|
||||
-}
|
||||
-exports.inspect = inspect;
|
||||
-
|
||||
-
|
||||
-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
||||
-inspect.colors = {
|
||||
- 'bold' : [1, 22],
|
||||
- 'italic' : [3, 23],
|
||||
- 'underline' : [4, 24],
|
||||
- 'inverse' : [7, 27],
|
||||
- 'white' : [37, 39],
|
||||
- 'grey' : [90, 39],
|
||||
- 'black' : [30, 39],
|
||||
- 'blue' : [34, 39],
|
||||
- 'cyan' : [36, 39],
|
||||
- 'green' : [32, 39],
|
||||
- 'magenta' : [35, 39],
|
||||
- 'red' : [31, 39],
|
||||
- 'yellow' : [33, 39]
|
||||
-};
|
||||
-
|
||||
-// Don't use 'blue' not visible on cmd.exe
|
||||
-inspect.styles = {
|
||||
- 'special': 'cyan',
|
||||
- 'number': 'yellow',
|
||||
- 'boolean': 'yellow',
|
||||
- 'undefined': 'grey',
|
||||
- 'null': 'bold',
|
||||
- 'string': 'green',
|
||||
- 'date': 'magenta',
|
||||
- // "name": intentionally not styling
|
||||
- 'regexp': 'red'
|
||||
-};
|
||||
-
|
||||
-
|
||||
-function stylizeWithColor(str, styleType) {
|
||||
- var style = inspect.styles[styleType];
|
||||
-
|
||||
- if (style) {
|
||||
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
|
||||
- '\u001b[' + inspect.colors[style][1] + 'm';
|
||||
- } else {
|
||||
- return str;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function stylizeNoColor(str, styleType) {
|
||||
- return str;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function arrayToHash(array) {
|
||||
- var hash = {};
|
||||
-
|
||||
- array.forEach(function(val, idx) {
|
||||
- hash[val] = true;
|
||||
- });
|
||||
-
|
||||
- return hash;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function formatValue(ctx, value, recurseTimes) {
|
||||
- // Provide a hook for user-specified inspect functions.
|
||||
- // Check that value is an object with an inspect function on it
|
||||
- if (ctx.customInspect &&
|
||||
- value &&
|
||||
- isFunction(value.inspect) &&
|
||||
- // Filter out the util module, it's inspect function is special
|
||||
- value.inspect !== exports.inspect &&
|
||||
- // Also filter out any prototype objects using the circular check.
|
||||
- !(value.constructor && value.constructor.prototype === value)) {
|
||||
- var ret = value.inspect(recurseTimes, ctx);
|
||||
- if (!isString(ret)) {
|
||||
- ret = formatValue(ctx, ret, recurseTimes);
|
||||
- }
|
||||
- return ret;
|
||||
- }
|
||||
-
|
||||
- // Primitive types cannot have properties
|
||||
- var primitive = formatPrimitive(ctx, value);
|
||||
- if (primitive) {
|
||||
- return primitive;
|
||||
- }
|
||||
-
|
||||
- // Look up the keys of the object.
|
||||
- var keys = Object.keys(value);
|
||||
- var visibleKeys = arrayToHash(keys);
|
||||
-
|
||||
- if (ctx.showHidden) {
|
||||
- keys = Object.getOwnPropertyNames(value);
|
||||
- }
|
||||
-
|
||||
- // Some type of object without properties can be shortcutted.
|
||||
- if (keys.length === 0) {
|
||||
- if (isFunction(value)) {
|
||||
- var name = value.name ? ': ' + value.name : '';
|
||||
- return ctx.stylize('[Function' + name + ']', 'special');
|
||||
- }
|
||||
- if (isRegExp(value)) {
|
||||
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
||||
- }
|
||||
- if (isDate(value)) {
|
||||
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
|
||||
- }
|
||||
- if (isError(value)) {
|
||||
- return formatError(value);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- var base = '', array = false, braces = ['{', '}'];
|
||||
-
|
||||
- // Make Array say that they are Array
|
||||
- if (isArray(value)) {
|
||||
- array = true;
|
||||
- braces = ['[', ']'];
|
||||
- }
|
||||
-
|
||||
- // Make functions say that they are functions
|
||||
- if (isFunction(value)) {
|
||||
- var n = value.name ? ': ' + value.name : '';
|
||||
- base = ' [Function' + n + ']';
|
||||
- }
|
||||
-
|
||||
- // Make RegExps say that they are RegExps
|
||||
- if (isRegExp(value)) {
|
||||
- base = ' ' + RegExp.prototype.toString.call(value);
|
||||
- }
|
||||
-
|
||||
- // Make dates with properties first say the date
|
||||
- if (isDate(value)) {
|
||||
- base = ' ' + Date.prototype.toUTCString.call(value);
|
||||
- }
|
||||
-
|
||||
- // Make error with message first say the error
|
||||
- if (isError(value)) {
|
||||
- base = ' ' + formatError(value);
|
||||
- }
|
||||
-
|
||||
- if (keys.length === 0 && (!array || value.length == 0)) {
|
||||
- return braces[0] + base + braces[1];
|
||||
- }
|
||||
-
|
||||
- if (recurseTimes < 0) {
|
||||
- if (isRegExp(value)) {
|
||||
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
||||
- } else {
|
||||
- return ctx.stylize('[Object]', 'special');
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- ctx.seen.push(value);
|
||||
-
|
||||
- var output;
|
||||
- if (array) {
|
||||
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
||||
- } else {
|
||||
- output = keys.map(function(key) {
|
||||
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
||||
- });
|
||||
- }
|
||||
-
|
||||
- ctx.seen.pop();
|
||||
-
|
||||
- return reduceToSingleString(output, base, braces);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function formatPrimitive(ctx, value) {
|
||||
- if (isUndefined(value))
|
||||
- return ctx.stylize('undefined', 'undefined');
|
||||
- if (isString(value)) {
|
||||
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
||||
- .replace(/'/g, "\\'")
|
||||
- .replace(/\\"/g, '"') + '\'';
|
||||
- return ctx.stylize(simple, 'string');
|
||||
- }
|
||||
- if (isNumber(value)) {
|
||||
- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0,
|
||||
- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 .
|
||||
- if (value === 0 && 1 / value < 0)
|
||||
- return ctx.stylize('-0', 'number');
|
||||
- return ctx.stylize('' + value, 'number');
|
||||
- }
|
||||
- if (isBoolean(value))
|
||||
- return ctx.stylize('' + value, 'boolean');
|
||||
- // For some reason typeof null is "object", so special case here.
|
||||
- if (isNull(value))
|
||||
- return ctx.stylize('null', 'null');
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function formatError(value) {
|
||||
- return '[' + Error.prototype.toString.call(value) + ']';
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
||||
- var output = [];
|
||||
- for (var i = 0, l = value.length; i < l; ++i) {
|
||||
- if (hasOwnProperty(value, String(i))) {
|
||||
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
||||
- String(i), true));
|
||||
- } else {
|
||||
- output.push('');
|
||||
- }
|
||||
- }
|
||||
- keys.forEach(function(key) {
|
||||
- if (!key.match(/^\d+$/)) {
|
||||
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
||||
- key, true));
|
||||
- }
|
||||
- });
|
||||
- return output;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
||||
- var name, str, desc;
|
||||
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
||||
- if (desc.get) {
|
||||
- if (desc.set) {
|
||||
- str = ctx.stylize('[Getter/Setter]', 'special');
|
||||
- } else {
|
||||
- str = ctx.stylize('[Getter]', 'special');
|
||||
- }
|
||||
- } else {
|
||||
- if (desc.set) {
|
||||
- str = ctx.stylize('[Setter]', 'special');
|
||||
- }
|
||||
- }
|
||||
- if (!hasOwnProperty(visibleKeys, key)) {
|
||||
- name = '[' + key + ']';
|
||||
- }
|
||||
- if (!str) {
|
||||
- if (ctx.seen.indexOf(desc.value) < 0) {
|
||||
- if (isNull(recurseTimes)) {
|
||||
- str = formatValue(ctx, desc.value, null);
|
||||
- } else {
|
||||
- str = formatValue(ctx, desc.value, recurseTimes - 1);
|
||||
- }
|
||||
- if (str.indexOf('\n') > -1) {
|
||||
- if (array) {
|
||||
- str = str.split('\n').map(function(line) {
|
||||
- return ' ' + line;
|
||||
- }).join('\n').substr(2);
|
||||
- } else {
|
||||
- str = '\n' + str.split('\n').map(function(line) {
|
||||
- return ' ' + line;
|
||||
- }).join('\n');
|
||||
- }
|
||||
- }
|
||||
- } else {
|
||||
- str = ctx.stylize('[Circular]', 'special');
|
||||
- }
|
||||
- }
|
||||
- if (isUndefined(name)) {
|
||||
- if (array && key.match(/^\d+$/)) {
|
||||
- return str;
|
||||
- }
|
||||
- name = JSON.stringify('' + key);
|
||||
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
||||
- name = name.substr(1, name.length - 2);
|
||||
- name = ctx.stylize(name, 'name');
|
||||
- } else {
|
||||
- name = name.replace(/'/g, "\\'")
|
||||
- .replace(/\\"/g, '"')
|
||||
- .replace(/(^"|"$)/g, "'");
|
||||
- name = ctx.stylize(name, 'string');
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return name + ': ' + str;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function reduceToSingleString(output, base, braces) {
|
||||
- var numLinesEst = 0;
|
||||
- var length = output.reduce(function(prev, cur) {
|
||||
- numLinesEst++;
|
||||
- if (cur.indexOf('\n') >= 0) numLinesEst++;
|
||||
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
|
||||
- }, 0);
|
||||
-
|
||||
- if (length > 60) {
|
||||
- return braces[0] +
|
||||
- (base === '' ? '' : base + '\n ') +
|
||||
- ' ' +
|
||||
- output.join(',\n ') +
|
||||
- ' ' +
|
||||
- braces[1];
|
||||
- }
|
||||
-
|
||||
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
||||
-}
|
||||
-
|
||||
-
|
||||
// NOTE: These type checking functions intentionally don't use `instanceof`
|
||||
// because it is fragile and can be easily faked with `Object.create()`.
|
||||
function isArray(ar) {
|
||||
@@ -522,166 +98,10 @@ function isPrimitive(arg) {
|
||||
exports.isPrimitive = isPrimitive;
|
||||
|
||||
function isBuffer(arg) {
|
||||
- return arg instanceof Buffer;
|
||||
+ return Buffer.isBuffer(arg);
|
||||
}
|
||||
exports.isBuffer = isBuffer;
|
||||
|
||||
function objectToString(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-function pad(n) {
|
||||
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
|
||||
- 'Oct', 'Nov', 'Dec'];
|
||||
-
|
||||
-// 26 Feb 16:19:34
|
||||
-function timestamp() {
|
||||
- var d = new Date();
|
||||
- var time = [pad(d.getHours()),
|
||||
- pad(d.getMinutes()),
|
||||
- pad(d.getSeconds())].join(':');
|
||||
- return [d.getDate(), months[d.getMonth()], time].join(' ');
|
||||
-}
|
||||
-
|
||||
-
|
||||
-// log is just a thin wrapper to console.log that prepends a timestamp
|
||||
-exports.log = function() {
|
||||
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
|
||||
-};
|
||||
-
|
||||
-
|
||||
-/**
|
||||
- * Inherit the prototype methods from one constructor into another.
|
||||
- *
|
||||
- * The Function.prototype.inherits from lang.js rewritten as a standalone
|
||||
- * function (not on Function.prototype). NOTE: If this file is to be loaded
|
||||
- * during bootstrapping this function needs to be rewritten using some native
|
||||
- * functions as prototype setup using normal JavaScript does not work as
|
||||
- * expected during bootstrapping (see mirror.js in r114903).
|
||||
- *
|
||||
- * @param {function} ctor Constructor function which needs to inherit the
|
||||
- * prototype.
|
||||
- * @param {function} superCtor Constructor function to inherit prototype from.
|
||||
- */
|
||||
-exports.inherits = function(ctor, superCtor) {
|
||||
- ctor.super_ = superCtor;
|
||||
- ctor.prototype = Object.create(superCtor.prototype, {
|
||||
- constructor: {
|
||||
- value: ctor,
|
||||
- enumerable: false,
|
||||
- writable: true,
|
||||
- configurable: true
|
||||
- }
|
||||
- });
|
||||
-};
|
||||
-
|
||||
-exports._extend = function(origin, add) {
|
||||
- // Don't do anything if add isn't an object
|
||||
- if (!add || !isObject(add)) return origin;
|
||||
-
|
||||
- var keys = Object.keys(add);
|
||||
- var i = keys.length;
|
||||
- while (i--) {
|
||||
- origin[keys[i]] = add[keys[i]];
|
||||
- }
|
||||
- return origin;
|
||||
-};
|
||||
-
|
||||
-function hasOwnProperty(obj, prop) {
|
||||
- return Object.prototype.hasOwnProperty.call(obj, prop);
|
||||
-}
|
||||
-
|
||||
-
|
||||
-// Deprecated old stuff.
|
||||
-
|
||||
-exports.p = exports.deprecate(function() {
|
||||
- for (var i = 0, len = arguments.length; i < len; ++i) {
|
||||
- console.error(exports.inspect(arguments[i]));
|
||||
- }
|
||||
-}, 'util.p: Use console.error() instead');
|
||||
-
|
||||
-
|
||||
-exports.exec = exports.deprecate(function() {
|
||||
- return require('child_process').exec.apply(this, arguments);
|
||||
-}, 'util.exec is now called `child_process.exec`.');
|
||||
-
|
||||
-
|
||||
-exports.print = exports.deprecate(function() {
|
||||
- for (var i = 0, len = arguments.length; i < len; ++i) {
|
||||
- process.stdout.write(String(arguments[i]));
|
||||
- }
|
||||
-}, 'util.print: Use console.log instead');
|
||||
-
|
||||
-
|
||||
-exports.puts = exports.deprecate(function() {
|
||||
- for (var i = 0, len = arguments.length; i < len; ++i) {
|
||||
- process.stdout.write(arguments[i] + '\n');
|
||||
- }
|
||||
-}, 'util.puts: Use console.log instead');
|
||||
-
|
||||
-
|
||||
-exports.debug = exports.deprecate(function(x) {
|
||||
- process.stderr.write('DEBUG: ' + x + '\n');
|
||||
-}, 'util.debug: Use console.error instead');
|
||||
-
|
||||
-
|
||||
-exports.error = exports.deprecate(function(x) {
|
||||
- for (var i = 0, len = arguments.length; i < len; ++i) {
|
||||
- process.stderr.write(arguments[i] + '\n');
|
||||
- }
|
||||
-}, 'util.error: Use console.error instead');
|
||||
-
|
||||
-
|
||||
-exports.pump = exports.deprecate(function(readStream, writeStream, callback) {
|
||||
- var callbackCalled = false;
|
||||
-
|
||||
- function call(a, b, c) {
|
||||
- if (callback && !callbackCalled) {
|
||||
- callback(a, b, c);
|
||||
- callbackCalled = true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- readStream.addListener('data', function(chunk) {
|
||||
- if (writeStream.write(chunk) === false) readStream.pause();
|
||||
- });
|
||||
-
|
||||
- writeStream.addListener('drain', function() {
|
||||
- readStream.resume();
|
||||
- });
|
||||
-
|
||||
- readStream.addListener('end', function() {
|
||||
- writeStream.end();
|
||||
- });
|
||||
-
|
||||
- readStream.addListener('close', function() {
|
||||
- call();
|
||||
- });
|
||||
-
|
||||
- readStream.addListener('error', function(err) {
|
||||
- writeStream.end();
|
||||
- call(err);
|
||||
- });
|
||||
-
|
||||
- writeStream.addListener('error', function(err) {
|
||||
- readStream.destroy();
|
||||
- call(err);
|
||||
- });
|
||||
-}, 'util.pump(): Use readableStream.pipe() instead');
|
||||
-
|
||||
-
|
||||
-var uv;
|
||||
-exports._errnoException = function(err, syscall) {
|
||||
- if (isUndefined(uv)) uv = process.binding('uv');
|
||||
- var errname = uv.errname(err);
|
||||
- var e = new Error(syscall + ' ' + errname);
|
||||
- e.code = errname;
|
||||
- e.errno = errname;
|
||||
- e.syscall = syscall;
|
||||
- return e;
|
||||
-};
|
||||
+}
|
107
functions/node_modules/grpc/node_modules/core-util-is/lib/util.js
generated
vendored
Normal file
107
functions/node_modules/grpc/node_modules/core-util-is/lib/util.js
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
// 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.
|
||||
|
||||
// NOTE: These type checking functions intentionally don't use `instanceof`
|
||||
// because it is fragile and can be easily faked with `Object.create()`.
|
||||
|
||||
function isArray(arg) {
|
||||
if (Array.isArray) {
|
||||
return Array.isArray(arg);
|
||||
}
|
||||
return objectToString(arg) === '[object Array]';
|
||||
}
|
||||
exports.isArray = isArray;
|
||||
|
||||
function isBoolean(arg) {
|
||||
return typeof arg === 'boolean';
|
||||
}
|
||||
exports.isBoolean = isBoolean;
|
||||
|
||||
function isNull(arg) {
|
||||
return arg === null;
|
||||
}
|
||||
exports.isNull = isNull;
|
||||
|
||||
function isNullOrUndefined(arg) {
|
||||
return arg == null;
|
||||
}
|
||||
exports.isNullOrUndefined = isNullOrUndefined;
|
||||
|
||||
function isNumber(arg) {
|
||||
return typeof arg === 'number';
|
||||
}
|
||||
exports.isNumber = isNumber;
|
||||
|
||||
function isString(arg) {
|
||||
return typeof arg === 'string';
|
||||
}
|
||||
exports.isString = isString;
|
||||
|
||||
function isSymbol(arg) {
|
||||
return typeof arg === 'symbol';
|
||||
}
|
||||
exports.isSymbol = isSymbol;
|
||||
|
||||
function isUndefined(arg) {
|
||||
return arg === void 0;
|
||||
}
|
||||
exports.isUndefined = isUndefined;
|
||||
|
||||
function isRegExp(re) {
|
||||
return objectToString(re) === '[object RegExp]';
|
||||
}
|
||||
exports.isRegExp = isRegExp;
|
||||
|
||||
function isObject(arg) {
|
||||
return typeof arg === 'object' && arg !== null;
|
||||
}
|
||||
exports.isObject = isObject;
|
||||
|
||||
function isDate(d) {
|
||||
return objectToString(d) === '[object Date]';
|
||||
}
|
||||
exports.isDate = isDate;
|
||||
|
||||
function isError(e) {
|
||||
return (objectToString(e) === '[object Error]' || e instanceof Error);
|
||||
}
|
||||
exports.isError = isError;
|
||||
|
||||
function isFunction(arg) {
|
||||
return typeof arg === 'function';
|
||||
}
|
||||
exports.isFunction = isFunction;
|
||||
|
||||
function isPrimitive(arg) {
|
||||
return arg === null ||
|
||||
typeof arg === 'boolean' ||
|
||||
typeof arg === 'number' ||
|
||||
typeof arg === 'string' ||
|
||||
typeof arg === 'symbol' || // ES6 symbol
|
||||
typeof arg === 'undefined';
|
||||
}
|
||||
exports.isPrimitive = isPrimitive;
|
||||
|
||||
exports.isBuffer = Buffer.isBuffer;
|
||||
|
||||
function objectToString(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
}
|
65
functions/node_modules/grpc/node_modules/core-util-is/package.json
generated
vendored
Normal file
65
functions/node_modules/grpc/node_modules/core-util-is/package.json
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"core-util-is@1.0.2",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "core-util-is@1.0.2",
|
||||
"_id": "core-util-is@1.0.2",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"_location": "/grpc/core-util-is",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "core-util-is@1.0.2",
|
||||
"name": "core-util-is",
|
||||
"escapedName": "core-util-is",
|
||||
"rawSpec": "1.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/readable-stream"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"_spec": "1.0.2",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Isaac Z. Schlueter",
|
||||
"email": "i@izs.me",
|
||||
"url": "http://blog.izs.me/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/isaacs/core-util-is/issues"
|
||||
},
|
||||
"description": "The `util.is*` functions introduced in Node v0.12.",
|
||||
"devDependencies": {
|
||||
"tap": "^2.3.0"
|
||||
},
|
||||
"homepage": "https://github.com/isaacs/core-util-is#readme",
|
||||
"keywords": [
|
||||
"util",
|
||||
"isBuffer",
|
||||
"isArray",
|
||||
"isNumber",
|
||||
"isString",
|
||||
"isRegExp",
|
||||
"isThis",
|
||||
"isThat",
|
||||
"polyfill"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/util.js",
|
||||
"name": "core-util-is",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/isaacs/core-util-is.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test.js"
|
||||
},
|
||||
"version": "1.0.2"
|
||||
}
|
68
functions/node_modules/grpc/node_modules/core-util-is/test.js
generated
vendored
Normal file
68
functions/node_modules/grpc/node_modules/core-util-is/test.js
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
var assert = require('tap');
|
||||
|
||||
var t = require('./lib/util');
|
||||
|
||||
assert.equal(t.isArray([]), true);
|
||||
assert.equal(t.isArray({}), false);
|
||||
|
||||
assert.equal(t.isBoolean(null), false);
|
||||
assert.equal(t.isBoolean(true), true);
|
||||
assert.equal(t.isBoolean(false), true);
|
||||
|
||||
assert.equal(t.isNull(null), true);
|
||||
assert.equal(t.isNull(undefined), false);
|
||||
assert.equal(t.isNull(false), false);
|
||||
assert.equal(t.isNull(), false);
|
||||
|
||||
assert.equal(t.isNullOrUndefined(null), true);
|
||||
assert.equal(t.isNullOrUndefined(undefined), true);
|
||||
assert.equal(t.isNullOrUndefined(false), false);
|
||||
assert.equal(t.isNullOrUndefined(), true);
|
||||
|
||||
assert.equal(t.isNumber(null), false);
|
||||
assert.equal(t.isNumber('1'), false);
|
||||
assert.equal(t.isNumber(1), true);
|
||||
|
||||
assert.equal(t.isString(null), false);
|
||||
assert.equal(t.isString('1'), true);
|
||||
assert.equal(t.isString(1), false);
|
||||
|
||||
assert.equal(t.isSymbol(null), false);
|
||||
assert.equal(t.isSymbol('1'), false);
|
||||
assert.equal(t.isSymbol(1), false);
|
||||
assert.equal(t.isSymbol(Symbol()), true);
|
||||
|
||||
assert.equal(t.isUndefined(null), false);
|
||||
assert.equal(t.isUndefined(undefined), true);
|
||||
assert.equal(t.isUndefined(false), false);
|
||||
assert.equal(t.isUndefined(), true);
|
||||
|
||||
assert.equal(t.isRegExp(null), false);
|
||||
assert.equal(t.isRegExp('1'), false);
|
||||
assert.equal(t.isRegExp(new RegExp()), true);
|
||||
|
||||
assert.equal(t.isObject({}), true);
|
||||
assert.equal(t.isObject([]), true);
|
||||
assert.equal(t.isObject(new RegExp()), true);
|
||||
assert.equal(t.isObject(new Date()), true);
|
||||
|
||||
assert.equal(t.isDate(null), false);
|
||||
assert.equal(t.isDate('1'), false);
|
||||
assert.equal(t.isDate(new Date()), true);
|
||||
|
||||
assert.equal(t.isError(null), false);
|
||||
assert.equal(t.isError({ err: true }), false);
|
||||
assert.equal(t.isError(new Error()), true);
|
||||
|
||||
assert.equal(t.isFunction(null), false);
|
||||
assert.equal(t.isFunction({ }), false);
|
||||
assert.equal(t.isFunction(function() {}), true);
|
||||
|
||||
assert.equal(t.isPrimitive(null), true);
|
||||
assert.equal(t.isPrimitive(''), true);
|
||||
assert.equal(t.isPrimitive(0), true);
|
||||
assert.equal(t.isPrimitive(new Date()), false);
|
||||
|
||||
assert.equal(t.isBuffer(null), false);
|
||||
assert.equal(t.isBuffer({}), false);
|
||||
assert.equal(t.isBuffer(new Buffer(0)), true);
|
1
functions/node_modules/grpc/node_modules/debug/.coveralls.yml
generated
vendored
Normal file
1
functions/node_modules/grpc/node_modules/debug/.coveralls.yml
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
|
11
functions/node_modules/grpc/node_modules/debug/.eslintrc
generated
vendored
Normal file
11
functions/node_modules/grpc/node_modules/debug/.eslintrc
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"rules": {
|
||||
"no-console": 0,
|
||||
"no-empty": [1, { "allowEmptyCatch": true }]
|
||||
},
|
||||
"extends": "eslint:recommended"
|
||||
}
|
9
functions/node_modules/grpc/node_modules/debug/.npmignore
generated
vendored
Normal file
9
functions/node_modules/grpc/node_modules/debug/.npmignore
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
support
|
||||
test
|
||||
examples
|
||||
example
|
||||
*.sock
|
||||
dist
|
||||
yarn.lock
|
||||
coverage
|
||||
bower.json
|
14
functions/node_modules/grpc/node_modules/debug/.travis.yml
generated
vendored
Normal file
14
functions/node_modules/grpc/node_modules/debug/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
language: node_js
|
||||
node_js:
|
||||
- "6"
|
||||
- "5"
|
||||
- "4"
|
||||
|
||||
install:
|
||||
- make node_modules
|
||||
|
||||
script:
|
||||
- make lint
|
||||
- make test
|
||||
- make coveralls
|
362
functions/node_modules/grpc/node_modules/debug/CHANGELOG.md
generated
vendored
Normal file
362
functions/node_modules/grpc/node_modules/debug/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,362 @@
|
||||
|
||||
2.6.9 / 2017-09-22
|
||||
==================
|
||||
|
||||
* remove ReDoS regexp in %o formatter (#504)
|
||||
|
||||
2.6.8 / 2017-05-18
|
||||
==================
|
||||
|
||||
* Fix: Check for undefined on browser globals (#462, @marbemac)
|
||||
|
||||
2.6.7 / 2017-05-16
|
||||
==================
|
||||
|
||||
* Fix: Update ms to 2.0.0 to fix regular expression denial of service vulnerability (#458, @hubdotcom)
|
||||
* Fix: Inline extend function in node implementation (#452, @dougwilson)
|
||||
* Docs: Fix typo (#455, @msasad)
|
||||
|
||||
2.6.5 / 2017-04-27
|
||||
==================
|
||||
|
||||
* Fix: null reference check on window.documentElement.style.WebkitAppearance (#447, @thebigredgeek)
|
||||
* Misc: clean up browser reference checks (#447, @thebigredgeek)
|
||||
* Misc: add npm-debug.log to .gitignore (@thebigredgeek)
|
||||
|
||||
|
||||
2.6.4 / 2017-04-20
|
||||
==================
|
||||
|
||||
* Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
|
||||
* Chore: ignore bower.json in npm installations. (#437, @joaovieira)
|
||||
* Misc: update "ms" to v0.7.3 (@tootallnate)
|
||||
|
||||
2.6.3 / 2017-03-13
|
||||
==================
|
||||
|
||||
* Fix: Electron reference to `process.env.DEBUG` (#431, @paulcbetts)
|
||||
* Docs: Changelog fix (@thebigredgeek)
|
||||
|
||||
2.6.2 / 2017-03-10
|
||||
==================
|
||||
|
||||
* Fix: DEBUG_MAX_ARRAY_LENGTH (#420, @slavaGanzin)
|
||||
* Docs: Add backers and sponsors from Open Collective (#422, @piamancini)
|
||||
* Docs: Add Slackin invite badge (@tootallnate)
|
||||
|
||||
2.6.1 / 2017-02-10
|
||||
==================
|
||||
|
||||
* Fix: Module's `export default` syntax fix for IE8 `Expected identifier` error
|
||||
* Fix: Whitelist DEBUG_FD for values 1 and 2 only (#415, @pi0)
|
||||
* Fix: IE8 "Expected identifier" error (#414, @vgoma)
|
||||
* Fix: Namespaces would not disable once enabled (#409, @musikov)
|
||||
|
||||
2.6.0 / 2016-12-28
|
||||
==================
|
||||
|
||||
* Fix: added better null pointer checks for browser useColors (@thebigredgeek)
|
||||
* Improvement: removed explicit `window.debug` export (#404, @tootallnate)
|
||||
* Improvement: deprecated `DEBUG_FD` environment variable (#405, @tootallnate)
|
||||
|
||||
2.5.2 / 2016-12-25
|
||||
==================
|
||||
|
||||
* Fix: reference error on window within webworkers (#393, @KlausTrainer)
|
||||
* Docs: fixed README typo (#391, @lurch)
|
||||
* Docs: added notice about v3 api discussion (@thebigredgeek)
|
||||
|
||||
2.5.1 / 2016-12-20
|
||||
==================
|
||||
|
||||
* Fix: babel-core compatibility
|
||||
|
||||
2.5.0 / 2016-12-20
|
||||
==================
|
||||
|
||||
* Fix: wrong reference in bower file (@thebigredgeek)
|
||||
* Fix: webworker compatibility (@thebigredgeek)
|
||||
* Fix: output formatting issue (#388, @kribblo)
|
||||
* Fix: babel-loader compatibility (#383, @escwald)
|
||||
* Misc: removed built asset from repo and publications (@thebigredgeek)
|
||||
* Misc: moved source files to /src (#378, @yamikuronue)
|
||||
* Test: added karma integration and replaced babel with browserify for browser tests (#378, @yamikuronue)
|
||||
* Test: coveralls integration (#378, @yamikuronue)
|
||||
* Docs: simplified language in the opening paragraph (#373, @yamikuronue)
|
||||
|
||||
2.4.5 / 2016-12-17
|
||||
==================
|
||||
|
||||
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
|
||||
* Fix: custom log function (#379, @hsiliev)
|
||||
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
|
||||
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
|
||||
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
|
||||
|
||||
2.4.4 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: work around debug being loaded in preload scripts for electron (#368, @paulcbetts)
|
||||
|
||||
2.4.3 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: navigation.userAgent error for react native (#364, @escwald)
|
||||
|
||||
2.4.2 / 2016-12-14
|
||||
==================
|
||||
|
||||
* Fix: browser colors (#367, @tootallnate)
|
||||
* Misc: travis ci integration (@thebigredgeek)
|
||||
* Misc: added linting and testing boilerplate with sanity check (@thebigredgeek)
|
||||
|
||||
2.4.1 / 2016-12-13
|
||||
==================
|
||||
|
||||
* Fix: typo that broke the package (#356)
|
||||
|
||||
2.4.0 / 2016-12-13
|
||||
==================
|
||||
|
||||
* Fix: bower.json references unbuilt src entry point (#342, @justmatt)
|
||||
* Fix: revert "handle regex special characters" (@tootallnate)
|
||||
* Feature: configurable util.inspect()`options for NodeJS (#327, @tootallnate)
|
||||
* Feature: %O`(big O) pretty-prints objects (#322, @tootallnate)
|
||||
* Improvement: allow colors in workers (#335, @botverse)
|
||||
* Improvement: use same color for same namespace. (#338, @lchenay)
|
||||
|
||||
2.3.3 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: Catch `JSON.stringify()` errors (#195, Jovan Alleyne)
|
||||
* Fix: Returning `localStorage` saved values (#331, Levi Thomason)
|
||||
* Improvement: Don't create an empty object when no `process` (Nathan Rajlich)
|
||||
|
||||
2.3.2 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: be super-safe in index.js as well (@TooTallNate)
|
||||
* Fix: should check whether process exists (Tom Newby)
|
||||
|
||||
2.3.1 / 2016-11-09
|
||||
==================
|
||||
|
||||
* Fix: Added electron compatibility (#324, @paulcbetts)
|
||||
* Improvement: Added performance optimizations (@tootallnate)
|
||||
* Readme: Corrected PowerShell environment variable example (#252, @gimre)
|
||||
* Misc: Removed yarn lock file from source control (#321, @fengmk2)
|
||||
|
||||
2.3.0 / 2016-11-07
|
||||
==================
|
||||
|
||||
* Fix: Consistent placement of ms diff at end of output (#215, @gorangajic)
|
||||
* Fix: Escaping of regex special characters in namespace strings (#250, @zacronos)
|
||||
* Fix: Fixed bug causing crash on react-native (#282, @vkarpov15)
|
||||
* Feature: Enabled ES6+ compatible import via default export (#212 @bucaran)
|
||||
* Feature: Added %O formatter to reflect Chrome's console.log capability (#279, @oncletom)
|
||||
* Package: Update "ms" to 0.7.2 (#315, @DevSide)
|
||||
* Package: removed superfluous version property from bower.json (#207 @kkirsche)
|
||||
* Readme: fix USE_COLORS to DEBUG_COLORS
|
||||
* Readme: Doc fixes for format string sugar (#269, @mlucool)
|
||||
* Readme: Updated docs for DEBUG_FD and DEBUG_COLORS environment variables (#232, @mattlyons0)
|
||||
* Readme: doc fixes for PowerShell (#271 #243, @exoticknight @unreadable)
|
||||
* Readme: better docs for browser support (#224, @matthewmueller)
|
||||
* Tooling: Added yarn integration for development (#317, @thebigredgeek)
|
||||
* Misc: Renamed History.md to CHANGELOG.md (@thebigredgeek)
|
||||
* Misc: Added license file (#226 #274, @CantemoInternal @sdaitzman)
|
||||
* Misc: Updated contributors (@thebigredgeek)
|
||||
|
||||
2.2.0 / 2015-05-09
|
||||
==================
|
||||
|
||||
* package: update "ms" to v0.7.1 (#202, @dougwilson)
|
||||
* README: add logging to file example (#193, @DanielOchoa)
|
||||
* README: fixed a typo (#191, @amir-s)
|
||||
* browser: expose `storage` (#190, @stephenmathieson)
|
||||
* Makefile: add a `distclean` target (#189, @stephenmathieson)
|
||||
|
||||
2.1.3 / 2015-03-13
|
||||
==================
|
||||
|
||||
* Updated stdout/stderr example (#186)
|
||||
* Updated example/stdout.js to match debug current behaviour
|
||||
* Renamed example/stderr.js to stdout.js
|
||||
* Update Readme.md (#184)
|
||||
* replace high intensity foreground color for bold (#182, #183)
|
||||
|
||||
2.1.2 / 2015-03-01
|
||||
==================
|
||||
|
||||
* dist: recompile
|
||||
* update "ms" to v0.7.0
|
||||
* package: update "browserify" to v9.0.3
|
||||
* component: fix "ms.js" repo location
|
||||
* changed bower package name
|
||||
* updated documentation about using debug in a browser
|
||||
* fix: security error on safari (#167, #168, @yields)
|
||||
|
||||
2.1.1 / 2014-12-29
|
||||
==================
|
||||
|
||||
* browser: use `typeof` to check for `console` existence
|
||||
* browser: check for `console.log` truthiness (fix IE 8/9)
|
||||
* browser: add support for Chrome apps
|
||||
* Readme: added Windows usage remarks
|
||||
* Add `bower.json` to properly support bower install
|
||||
|
||||
2.1.0 / 2014-10-15
|
||||
==================
|
||||
|
||||
* node: implement `DEBUG_FD` env variable support
|
||||
* package: update "browserify" to v6.1.0
|
||||
* package: add "license" field to package.json (#135, @panuhorsmalahti)
|
||||
|
||||
2.0.0 / 2014-09-01
|
||||
==================
|
||||
|
||||
* package: update "browserify" to v5.11.0
|
||||
* node: use stderr rather than stdout for logging (#29, @stephenmathieson)
|
||||
|
||||
1.0.4 / 2014-07-15
|
||||
==================
|
||||
|
||||
* dist: recompile
|
||||
* example: remove `console.info()` log usage
|
||||
* example: add "Content-Type" UTF-8 header to browser example
|
||||
* browser: place %c marker after the space character
|
||||
* browser: reset the "content" color via `color: inherit`
|
||||
* browser: add colors support for Firefox >= v31
|
||||
* debug: prefer an instance `log()` function over the global one (#119)
|
||||
* Readme: update documentation about styled console logs for FF v31 (#116, @wryk)
|
||||
|
||||
1.0.3 / 2014-07-09
|
||||
==================
|
||||
|
||||
* Add support for multiple wildcards in namespaces (#122, @seegno)
|
||||
* browser: fix lint
|
||||
|
||||
1.0.2 / 2014-06-10
|
||||
==================
|
||||
|
||||
* browser: update color palette (#113, @gscottolson)
|
||||
* common: make console logging function configurable (#108, @timoxley)
|
||||
* node: fix %o colors on old node <= 0.8.x
|
||||
* Makefile: find node path using shell/which (#109, @timoxley)
|
||||
|
||||
1.0.1 / 2014-06-06
|
||||
==================
|
||||
|
||||
* browser: use `removeItem()` to clear localStorage
|
||||
* browser, node: don't set DEBUG if namespaces is undefined (#107, @leedm777)
|
||||
* package: add "contributors" section
|
||||
* node: fix comment typo
|
||||
* README: list authors
|
||||
|
||||
1.0.0 / 2014-06-04
|
||||
==================
|
||||
|
||||
* make ms diff be global, not be scope
|
||||
* debug: ignore empty strings in enable()
|
||||
* node: make DEBUG_COLORS able to disable coloring
|
||||
* *: export the `colors` array
|
||||
* npmignore: don't publish the `dist` dir
|
||||
* Makefile: refactor to use browserify
|
||||
* package: add "browserify" as a dev dependency
|
||||
* Readme: add Web Inspector Colors section
|
||||
* node: reset terminal color for the debug content
|
||||
* node: map "%o" to `util.inspect()`
|
||||
* browser: map "%j" to `JSON.stringify()`
|
||||
* debug: add custom "formatters"
|
||||
* debug: use "ms" module for humanizing the diff
|
||||
* Readme: add "bash" syntax highlighting
|
||||
* browser: add Firebug color support
|
||||
* browser: add colors for WebKit browsers
|
||||
* node: apply log to `console`
|
||||
* rewrite: abstract common logic for Node & browsers
|
||||
* add .jshintrc file
|
||||
|
||||
0.8.1 / 2014-04-14
|
||||
==================
|
||||
|
||||
* package: re-add the "component" section
|
||||
|
||||
0.8.0 / 2014-03-30
|
||||
==================
|
||||
|
||||
* add `enable()` method for nodejs. Closes #27
|
||||
* change from stderr to stdout
|
||||
* remove unnecessary index.js file
|
||||
|
||||
0.7.4 / 2013-11-13
|
||||
==================
|
||||
|
||||
* remove "browserify" key from package.json (fixes something in browserify)
|
||||
|
||||
0.7.3 / 2013-10-30
|
||||
==================
|
||||
|
||||
* fix: catch localStorage security error when cookies are blocked (Chrome)
|
||||
* add debug(err) support. Closes #46
|
||||
* add .browser prop to package.json. Closes #42
|
||||
|
||||
0.7.2 / 2013-02-06
|
||||
==================
|
||||
|
||||
* fix package.json
|
||||
* fix: Mobile Safari (private mode) is broken with debug
|
||||
* fix: Use unicode to send escape character to shell instead of octal to work with strict mode javascript
|
||||
|
||||
0.7.1 / 2013-02-05
|
||||
==================
|
||||
|
||||
* add repository URL to package.json
|
||||
* add DEBUG_COLORED to force colored output
|
||||
* add browserify support
|
||||
* fix component. Closes #24
|
||||
|
||||
0.7.0 / 2012-05-04
|
||||
==================
|
||||
|
||||
* Added .component to package.json
|
||||
* Added debug.component.js build
|
||||
|
||||
0.6.0 / 2012-03-16
|
||||
==================
|
||||
|
||||
* Added support for "-" prefix in DEBUG [Vinay Pulim]
|
||||
* Added `.enabled` flag to the node version [TooTallNate]
|
||||
|
||||
0.5.0 / 2012-02-02
|
||||
==================
|
||||
|
||||
* Added: humanize diffs. Closes #8
|
||||
* Added `debug.disable()` to the CS variant
|
||||
* Removed padding. Closes #10
|
||||
* Fixed: persist client-side variant again. Closes #9
|
||||
|
||||
0.4.0 / 2012-02-01
|
||||
==================
|
||||
|
||||
* Added browser variant support for older browsers [TooTallNate]
|
||||
* Added `debug.enable('project:*')` to browser variant [TooTallNate]
|
||||
* Added padding to diff (moved it to the right)
|
||||
|
||||
0.3.0 / 2012-01-26
|
||||
==================
|
||||
|
||||
* Added millisecond diff when isatty, otherwise UTC string
|
||||
|
||||
0.2.0 / 2012-01-22
|
||||
==================
|
||||
|
||||
* Added wildcard support
|
||||
|
||||
0.1.0 / 2011-12-02
|
||||
==================
|
||||
|
||||
* Added: remove colors unless stderr isatty [TooTallNate]
|
||||
|
||||
0.0.1 / 2010-01-03
|
||||
==================
|
||||
|
||||
* Initial release
|
19
functions/node_modules/grpc/node_modules/debug/LICENSE
generated
vendored
Normal file
19
functions/node_modules/grpc/node_modules/debug/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
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.
|
||||
|
50
functions/node_modules/grpc/node_modules/debug/Makefile
generated
vendored
Normal file
50
functions/node_modules/grpc/node_modules/debug/Makefile
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
|
||||
THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
|
||||
|
||||
# BIN directory
|
||||
BIN := $(THIS_DIR)/node_modules/.bin
|
||||
|
||||
# Path
|
||||
PATH := node_modules/.bin:$(PATH)
|
||||
SHELL := /bin/bash
|
||||
|
||||
# applications
|
||||
NODE ?= $(shell which node)
|
||||
YARN ?= $(shell which yarn)
|
||||
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
|
||||
BROWSERIFY ?= $(NODE) $(BIN)/browserify
|
||||
|
||||
.FORCE:
|
||||
|
||||
install: node_modules
|
||||
|
||||
node_modules: package.json
|
||||
@NODE_ENV= $(PKG) install
|
||||
@touch node_modules
|
||||
|
||||
lint: .FORCE
|
||||
eslint browser.js debug.js index.js node.js
|
||||
|
||||
test-node: .FORCE
|
||||
istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
|
||||
|
||||
test-browser: .FORCE
|
||||
mkdir -p dist
|
||||
|
||||
@$(BROWSERIFY) \
|
||||
--standalone debug \
|
||||
. > dist/debug.js
|
||||
|
||||
karma start --single-run
|
||||
rimraf dist
|
||||
|
||||
test: .FORCE
|
||||
concurrently \
|
||||
"make test-node" \
|
||||
"make test-browser"
|
||||
|
||||
coveralls:
|
||||
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
|
||||
|
||||
.PHONY: all install clean distclean
|
312
functions/node_modules/grpc/node_modules/debug/README.md
generated
vendored
Normal file
312
functions/node_modules/grpc/node_modules/debug/README.md
generated
vendored
Normal file
@ -0,0 +1,312 @@
|
||||
# debug
|
||||
[](https://travis-ci.org/visionmedia/debug) [](https://coveralls.io/github/visionmedia/debug?branch=master) [](https://visionmedia-community-slackin.now.sh/) [](#backers)
|
||||
[](#sponsors)
|
||||
|
||||
|
||||
|
||||
A tiny node.js debugging utility modelled after node core's debugging technique.
|
||||
|
||||
**Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ npm install debug
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
|
||||
|
||||
Example _app.js_:
|
||||
|
||||
```js
|
||||
var debug = require('debug')('http')
|
||||
, http = require('http')
|
||||
, name = 'My App';
|
||||
|
||||
// fake app
|
||||
|
||||
debug('booting %s', name);
|
||||
|
||||
http.createServer(function(req, res){
|
||||
debug(req.method + ' ' + req.url);
|
||||
res.end('hello\n');
|
||||
}).listen(3000, function(){
|
||||
debug('listening');
|
||||
});
|
||||
|
||||
// fake worker of some kind
|
||||
|
||||
require('./worker');
|
||||
```
|
||||
|
||||
Example _worker.js_:
|
||||
|
||||
```js
|
||||
var debug = require('debug')('worker');
|
||||
|
||||
setInterval(function(){
|
||||
debug('doing some work');
|
||||
}, 1000);
|
||||
```
|
||||
|
||||
The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
#### Windows note
|
||||
|
||||
On Windows the environment variable is set using the `set` command.
|
||||
|
||||
```cmd
|
||||
set DEBUG=*,-not_this
|
||||
```
|
||||
|
||||
Note that PowerShell uses different syntax to set environment variables.
|
||||
|
||||
```cmd
|
||||
$env:DEBUG = "*,-not_this"
|
||||
```
|
||||
|
||||
Then, run the program to be debugged as usual.
|
||||
|
||||
## Millisecond diff
|
||||
|
||||
When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
|
||||
|
||||

|
||||
|
||||
When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
|
||||
|
||||

|
||||
|
||||
## Conventions
|
||||
|
||||
If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
|
||||
|
||||
## Wildcards
|
||||
|
||||
The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
|
||||
|
||||
You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
|
||||
|
||||
## Environment Variables
|
||||
|
||||
When running through Node.js, you can set a few environment variables that will
|
||||
change the behavior of the debug logging:
|
||||
|
||||
| Name | Purpose |
|
||||
|-----------|-------------------------------------------------|
|
||||
| `DEBUG` | Enables/disables specific debugging namespaces. |
|
||||
| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
|
||||
| `DEBUG_DEPTH` | Object inspection depth. |
|
||||
| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
|
||||
|
||||
|
||||
__Note:__ The environment variables beginning with `DEBUG_` end up being
|
||||
converted into an Options object that gets used with `%o`/`%O` formatters.
|
||||
See the Node.js documentation for
|
||||
[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
|
||||
for the complete list.
|
||||
|
||||
## Formatters
|
||||
|
||||
|
||||
Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
|
||||
|
||||
| Formatter | Representation |
|
||||
|-----------|----------------|
|
||||
| `%O` | Pretty-print an Object on multiple lines. |
|
||||
| `%o` | Pretty-print an Object all on a single line. |
|
||||
| `%s` | String. |
|
||||
| `%d` | Number (both integer and float). |
|
||||
| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
|
||||
| `%%` | Single percent sign ('%'). This does not consume an argument. |
|
||||
|
||||
### Custom formatters
|
||||
|
||||
You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
|
||||
|
||||
```js
|
||||
const createDebug = require('debug')
|
||||
createDebug.formatters.h = (v) => {
|
||||
return v.toString('hex')
|
||||
}
|
||||
|
||||
// …elsewhere
|
||||
const debug = createDebug('foo')
|
||||
debug('this is hex: %h', new Buffer('hello world'))
|
||||
// foo this is hex: 68656c6c6f20776f726c6421 +0ms
|
||||
```
|
||||
|
||||
## Browser support
|
||||
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
|
||||
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
|
||||
if you don't want to build it yourself.
|
||||
|
||||
Debug's enable state is currently persisted by `localStorage`.
|
||||
Consider the situation shown below where you have `worker:a` and `worker:b`,
|
||||
and wish to debug both. You can enable this using `localStorage.debug`:
|
||||
|
||||
```js
|
||||
localStorage.debug = 'worker:*'
|
||||
```
|
||||
|
||||
And then refresh the page.
|
||||
|
||||
```js
|
||||
a = debug('worker:a');
|
||||
b = debug('worker:b');
|
||||
|
||||
setInterval(function(){
|
||||
a('doing some work');
|
||||
}, 1000);
|
||||
|
||||
setInterval(function(){
|
||||
b('doing some work');
|
||||
}, 1200);
|
||||
```
|
||||
|
||||
#### Web Inspector Colors
|
||||
|
||||
Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
|
||||
option. These are WebKit web inspectors, Firefox ([since version
|
||||
31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
|
||||
and the Firebug plugin for Firefox (any version).
|
||||
|
||||
Colored output looks something like:
|
||||
|
||||

|
||||
|
||||
|
||||
## Output streams
|
||||
|
||||
By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
|
||||
|
||||
Example _stdout.js_:
|
||||
|
||||
```js
|
||||
var debug = require('debug');
|
||||
var error = debug('app:error');
|
||||
|
||||
// by default stderr is used
|
||||
error('goes to stderr!');
|
||||
|
||||
var log = debug('app:log');
|
||||
// set this namespace to log via console.log
|
||||
log.log = console.log.bind(console); // don't forget to bind to console!
|
||||
log('goes to stdout');
|
||||
error('still goes to stderr!');
|
||||
|
||||
// set all output to go via console.info
|
||||
// overrides all per-namespace log settings
|
||||
debug.log = console.info.bind(console);
|
||||
error('now goes to stdout via console.info');
|
||||
log('still goes to stdout, but via console.info now');
|
||||
```
|
||||
|
||||
|
||||
## Authors
|
||||
|
||||
- TJ Holowaychuk
|
||||
- Nathan Rajlich
|
||||
- Andrew Rhyne
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
|
||||
|
||||
<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2016 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
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.
|
19
functions/node_modules/grpc/node_modules/debug/component.json
generated
vendored
Normal file
19
functions/node_modules/grpc/node_modules/debug/component.json
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "debug",
|
||||
"repo": "visionmedia/debug",
|
||||
"description": "small debugging utility",
|
||||
"version": "2.6.9",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"main": "src/browser.js",
|
||||
"scripts": [
|
||||
"src/browser.js",
|
||||
"src/debug.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"rauchg/ms.js": "0.7.1"
|
||||
}
|
||||
}
|
70
functions/node_modules/grpc/node_modules/debug/karma.conf.js
generated
vendored
Normal file
70
functions/node_modules/grpc/node_modules/debug/karma.conf.js
generated
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
// Karma configuration
|
||||
// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
|
||||
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||
basePath: '',
|
||||
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ['mocha', 'chai', 'sinon'],
|
||||
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
'dist/debug.js',
|
||||
'test/*spec.js'
|
||||
],
|
||||
|
||||
|
||||
// list of files to exclude
|
||||
exclude: [
|
||||
'src/node.js'
|
||||
],
|
||||
|
||||
|
||||
// preprocess matching files before serving them to the browser
|
||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||
preprocessors: {
|
||||
},
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress'
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['progress'],
|
||||
|
||||
|
||||
// web server port
|
||||
port: 9876,
|
||||
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: true,
|
||||
|
||||
|
||||
// start these browsers
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: ['PhantomJS'],
|
||||
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: false,
|
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
concurrency: Infinity
|
||||
})
|
||||
}
|
1
functions/node_modules/grpc/node_modules/debug/node.js
generated
vendored
Normal file
1
functions/node_modules/grpc/node_modules/debug/node.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./src/node');
|
91
functions/node_modules/grpc/node_modules/debug/package.json
generated
vendored
Normal file
91
functions/node_modules/grpc/node_modules/debug/package.json
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"debug@2.6.9",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "debug@2.6.9",
|
||||
"_id": "debug@2.6.9",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"_location": "/grpc/debug",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "debug@2.6.9",
|
||||
"name": "debug",
|
||||
"escapedName": "debug",
|
||||
"rawSpec": "2.6.9",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.6.9"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/needle"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"_spec": "2.6.9",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "TJ Holowaychuk",
|
||||
"email": "tj@vision-media.ca"
|
||||
},
|
||||
"browser": "./src/browser.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/visionmedia/debug/issues"
|
||||
},
|
||||
"component": {
|
||||
"scripts": {
|
||||
"debug/index.js": "browser.js",
|
||||
"debug/debug.js": "debug.js"
|
||||
}
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Nathan Rajlich",
|
||||
"email": "nathan@tootallnate.net",
|
||||
"url": "http://n8.io"
|
||||
},
|
||||
{
|
||||
"name": "Andrew Rhyne",
|
||||
"email": "rhyneandrew@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"ms": "2.0.0"
|
||||
},
|
||||
"description": "small debugging utility",
|
||||
"devDependencies": {
|
||||
"browserify": "9.0.3",
|
||||
"chai": "^3.5.0",
|
||||
"concurrently": "^3.1.0",
|
||||
"coveralls": "^2.11.15",
|
||||
"eslint": "^3.12.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"karma": "^1.3.0",
|
||||
"karma-chai": "^0.1.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-phantomjs-launcher": "^1.0.2",
|
||||
"karma-sinon": "^1.0.5",
|
||||
"mocha": "^3.2.0",
|
||||
"mocha-lcov-reporter": "^1.2.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"sinon": "^1.17.6",
|
||||
"sinon-chai": "^2.8.0"
|
||||
},
|
||||
"homepage": "https://github.com/visionmedia/debug#readme",
|
||||
"keywords": [
|
||||
"debug",
|
||||
"log",
|
||||
"debugger"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./src/index.js",
|
||||
"name": "debug",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/visionmedia/debug.git"
|
||||
},
|
||||
"version": "2.6.9"
|
||||
}
|
185
functions/node_modules/grpc/node_modules/debug/src/browser.js
generated
vendored
Normal file
185
functions/node_modules/grpc/node_modules/debug/src/browser.js
generated
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
/**
|
||||
* This is the web browser implementation of `debug()`.
|
||||
*
|
||||
* Expose `debug()` as the module.
|
||||
*/
|
||||
|
||||
exports = module.exports = require('./debug');
|
||||
exports.log = log;
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
exports.storage = 'undefined' != typeof chrome
|
||||
&& 'undefined' != typeof chrome.storage
|
||||
? chrome.storage.local
|
||||
: localstorage();
|
||||
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = [
|
||||
'lightseagreen',
|
||||
'forestgreen',
|
||||
'goldenrod',
|
||||
'dodgerblue',
|
||||
'darkorchid',
|
||||
'crimson'
|
||||
];
|
||||
|
||||
/**
|
||||
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
||||
* and the Firebug extension (any Firefox version) are known
|
||||
* to support "%c" CSS customizations.
|
||||
*
|
||||
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
||||
*/
|
||||
|
||||
function useColors() {
|
||||
// NB: In an Electron preload script, document will be defined but not fully
|
||||
// initialized. Since we know we're in Chrome, we'll just detect this case
|
||||
// explicitly
|
||||
if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
|
||||
return true;
|
||||
}
|
||||
|
||||
// is webkit? http://stackoverflow.com/a/16459606/376773
|
||||
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
||||
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
||||
// is firebug? http://stackoverflow.com/a/398120/376773
|
||||
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
||||
// is firefox >= v31?
|
||||
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
||||
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
||||
// double check webkit in userAgent just in case we are in a worker
|
||||
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
||||
}
|
||||
|
||||
/**
|
||||
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
||||
*/
|
||||
|
||||
exports.formatters.j = function(v) {
|
||||
try {
|
||||
return JSON.stringify(v);
|
||||
} catch (err) {
|
||||
return '[UnexpectedJSONParseError]: ' + err.message;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Colorize log arguments if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function formatArgs(args) {
|
||||
var useColors = this.useColors;
|
||||
|
||||
args[0] = (useColors ? '%c' : '')
|
||||
+ this.namespace
|
||||
+ (useColors ? ' %c' : ' ')
|
||||
+ args[0]
|
||||
+ (useColors ? '%c ' : ' ')
|
||||
+ '+' + exports.humanize(this.diff);
|
||||
|
||||
if (!useColors) return;
|
||||
|
||||
var c = 'color: ' + this.color;
|
||||
args.splice(1, 0, c, 'color: inherit')
|
||||
|
||||
// the final "%c" is somewhat tricky, because there could be other
|
||||
// arguments passed either before or after the %c, so we need to
|
||||
// figure out the correct index to insert the CSS into
|
||||
var index = 0;
|
||||
var lastC = 0;
|
||||
args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
||||
if ('%%' === match) return;
|
||||
index++;
|
||||
if ('%c' === match) {
|
||||
// we only are interested in the *last* %c
|
||||
// (the user may have provided their own)
|
||||
lastC = index;
|
||||
}
|
||||
});
|
||||
|
||||
args.splice(lastC, 0, c);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes `console.log()` when available.
|
||||
* No-op when `console.log` is not a "function".
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function log() {
|
||||
// this hackery is required for IE8/9, where
|
||||
// the `console.log` function doesn't have 'apply'
|
||||
return 'object' === typeof console
|
||||
&& console.log
|
||||
&& Function.prototype.apply.call(console.log, console, arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function save(namespaces) {
|
||||
try {
|
||||
if (null == namespaces) {
|
||||
exports.storage.removeItem('debug');
|
||||
} else {
|
||||
exports.storage.debug = namespaces;
|
||||
}
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function load() {
|
||||
var r;
|
||||
try {
|
||||
r = exports.storage.debug;
|
||||
} catch(e) {}
|
||||
|
||||
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
||||
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
||||
r = process.env.DEBUG;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable namespaces listed in `localStorage.debug` initially.
|
||||
*/
|
||||
|
||||
exports.enable(load());
|
||||
|
||||
/**
|
||||
* Localstorage attempts to return the localstorage.
|
||||
*
|
||||
* This is necessary because safari throws
|
||||
* when a user disables cookies/localstorage
|
||||
* and you attempt to access it.
|
||||
*
|
||||
* @return {LocalStorage}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function localstorage() {
|
||||
try {
|
||||
return window.localStorage;
|
||||
} catch (e) {}
|
||||
}
|
202
functions/node_modules/grpc/node_modules/debug/src/debug.js
generated
vendored
Normal file
202
functions/node_modules/grpc/node_modules/debug/src/debug.js
generated
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
/**
|
||||
* This is the common logic for both the Node.js and web browser
|
||||
* implementations of `debug()`.
|
||||
*
|
||||
* Expose `debug()` as the module.
|
||||
*/
|
||||
|
||||
exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
|
||||
exports.coerce = coerce;
|
||||
exports.disable = disable;
|
||||
exports.enable = enable;
|
||||
exports.enabled = enabled;
|
||||
exports.humanize = require('ms');
|
||||
|
||||
/**
|
||||
* The currently active debug mode names, and names to skip.
|
||||
*/
|
||||
|
||||
exports.names = [];
|
||||
exports.skips = [];
|
||||
|
||||
/**
|
||||
* Map of special "%n" handling functions, for the debug "format" argument.
|
||||
*
|
||||
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
||||
*/
|
||||
|
||||
exports.formatters = {};
|
||||
|
||||
/**
|
||||
* Previous log timestamp.
|
||||
*/
|
||||
|
||||
var prevTime;
|
||||
|
||||
/**
|
||||
* Select a color.
|
||||
* @param {String} namespace
|
||||
* @return {Number}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function selectColor(namespace) {
|
||||
var hash = 0, i;
|
||||
|
||||
for (i in namespace) {
|
||||
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
||||
hash |= 0; // Convert to 32bit integer
|
||||
}
|
||||
|
||||
return exports.colors[Math.abs(hash) % exports.colors.length];
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a debugger with the given `namespace`.
|
||||
*
|
||||
* @param {String} namespace
|
||||
* @return {Function}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function createDebug(namespace) {
|
||||
|
||||
function debug() {
|
||||
// disabled?
|
||||
if (!debug.enabled) return;
|
||||
|
||||
var self = debug;
|
||||
|
||||
// set `diff` timestamp
|
||||
var curr = +new Date();
|
||||
var ms = curr - (prevTime || curr);
|
||||
self.diff = ms;
|
||||
self.prev = prevTime;
|
||||
self.curr = curr;
|
||||
prevTime = curr;
|
||||
|
||||
// turn the `arguments` into a proper Array
|
||||
var args = new Array(arguments.length);
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
args[i] = arguments[i];
|
||||
}
|
||||
|
||||
args[0] = exports.coerce(args[0]);
|
||||
|
||||
if ('string' !== typeof args[0]) {
|
||||
// anything else let's inspect with %O
|
||||
args.unshift('%O');
|
||||
}
|
||||
|
||||
// apply any `formatters` transformations
|
||||
var index = 0;
|
||||
args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
||||
// if we encounter an escaped % then don't increase the array index
|
||||
if (match === '%%') return match;
|
||||
index++;
|
||||
var formatter = exports.formatters[format];
|
||||
if ('function' === typeof formatter) {
|
||||
var val = args[index];
|
||||
match = formatter.call(self, val);
|
||||
|
||||
// now we need to remove `args[index]` since it's inlined in the `format`
|
||||
args.splice(index, 1);
|
||||
index--;
|
||||
}
|
||||
return match;
|
||||
});
|
||||
|
||||
// apply env-specific formatting (colors, etc.)
|
||||
exports.formatArgs.call(self, args);
|
||||
|
||||
var logFn = debug.log || exports.log || console.log.bind(console);
|
||||
logFn.apply(self, args);
|
||||
}
|
||||
|
||||
debug.namespace = namespace;
|
||||
debug.enabled = exports.enabled(namespace);
|
||||
debug.useColors = exports.useColors();
|
||||
debug.color = selectColor(namespace);
|
||||
|
||||
// env-specific initialization logic for debug instances
|
||||
if ('function' === typeof exports.init) {
|
||||
exports.init(debug);
|
||||
}
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables a debug mode by namespaces. This can include modes
|
||||
* separated by a colon and wildcards.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function enable(namespaces) {
|
||||
exports.save(namespaces);
|
||||
|
||||
exports.names = [];
|
||||
exports.skips = [];
|
||||
|
||||
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
||||
var len = split.length;
|
||||
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (!split[i]) continue; // ignore empty strings
|
||||
namespaces = split[i].replace(/\*/g, '.*?');
|
||||
if (namespaces[0] === '-') {
|
||||
exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
||||
} else {
|
||||
exports.names.push(new RegExp('^' + namespaces + '$'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable debug output.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function disable() {
|
||||
exports.enable('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the given mode name is enabled, false otherwise.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function enabled(name) {
|
||||
var i, len;
|
||||
for (i = 0, len = exports.skips.length; i < len; i++) {
|
||||
if (exports.skips[i].test(name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (i = 0, len = exports.names.length; i < len; i++) {
|
||||
if (exports.names[i].test(name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Coerce `val`.
|
||||
*
|
||||
* @param {Mixed} val
|
||||
* @return {Mixed}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function coerce(val) {
|
||||
if (val instanceof Error) return val.stack || val.message;
|
||||
return val;
|
||||
}
|
10
functions/node_modules/grpc/node_modules/debug/src/index.js
generated
vendored
Normal file
10
functions/node_modules/grpc/node_modules/debug/src/index.js
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Detect Electron renderer process, which is node, but we should
|
||||
* treat as a browser.
|
||||
*/
|
||||
|
||||
if (typeof process !== 'undefined' && process.type === 'renderer') {
|
||||
module.exports = require('./browser.js');
|
||||
} else {
|
||||
module.exports = require('./node.js');
|
||||
}
|
15
functions/node_modules/grpc/node_modules/debug/src/inspector-log.js
generated
vendored
Normal file
15
functions/node_modules/grpc/node_modules/debug/src/inspector-log.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
module.exports = inspectorLog;
|
||||
|
||||
// black hole
|
||||
const nullStream = new (require('stream').Writable)();
|
||||
nullStream._write = () => {};
|
||||
|
||||
/**
|
||||
* Outputs a `console.log()` to the Node.js Inspector console *only*.
|
||||
*/
|
||||
function inspectorLog() {
|
||||
const stdout = console._stdout;
|
||||
console._stdout = nullStream;
|
||||
console.log.apply(console, arguments);
|
||||
console._stdout = stdout;
|
||||
}
|
248
functions/node_modules/grpc/node_modules/debug/src/node.js
generated
vendored
Normal file
248
functions/node_modules/grpc/node_modules/debug/src/node.js
generated
vendored
Normal file
@ -0,0 +1,248 @@
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var tty = require('tty');
|
||||
var util = require('util');
|
||||
|
||||
/**
|
||||
* This is the Node.js implementation of `debug()`.
|
||||
*
|
||||
* Expose `debug()` as the module.
|
||||
*/
|
||||
|
||||
exports = module.exports = require('./debug');
|
||||
exports.init = init;
|
||||
exports.log = log;
|
||||
exports.formatArgs = formatArgs;
|
||||
exports.save = save;
|
||||
exports.load = load;
|
||||
exports.useColors = useColors;
|
||||
|
||||
/**
|
||||
* Colors.
|
||||
*/
|
||||
|
||||
exports.colors = [6, 2, 3, 4, 5, 1];
|
||||
|
||||
/**
|
||||
* Build up the default `inspectOpts` object from the environment variables.
|
||||
*
|
||||
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
|
||||
*/
|
||||
|
||||
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
|
||||
return /^debug_/i.test(key);
|
||||
}).reduce(function (obj, key) {
|
||||
// camel-case
|
||||
var prop = key
|
||||
.substring(6)
|
||||
.toLowerCase()
|
||||
.replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
|
||||
|
||||
// coerce string value into JS value
|
||||
var val = process.env[key];
|
||||
if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
||||
else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
||||
else if (val === 'null') val = null;
|
||||
else val = Number(val);
|
||||
|
||||
obj[prop] = val;
|
||||
return obj;
|
||||
}, {});
|
||||
|
||||
/**
|
||||
* The file descriptor to write the `debug()` calls to.
|
||||
* Set the `DEBUG_FD` env variable to override with another value. i.e.:
|
||||
*
|
||||
* $ DEBUG_FD=3 node script.js 3>debug.log
|
||||
*/
|
||||
|
||||
var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
|
||||
|
||||
if (1 !== fd && 2 !== fd) {
|
||||
util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')()
|
||||
}
|
||||
|
||||
var stream = 1 === fd ? process.stdout :
|
||||
2 === fd ? process.stderr :
|
||||
createWritableStdioStream(fd);
|
||||
|
||||
/**
|
||||
* Is stdout a TTY? Colored output is enabled when `true`.
|
||||
*/
|
||||
|
||||
function useColors() {
|
||||
return 'colors' in exports.inspectOpts
|
||||
? Boolean(exports.inspectOpts.colors)
|
||||
: tty.isatty(fd);
|
||||
}
|
||||
|
||||
/**
|
||||
* Map %o to `util.inspect()`, all on a single line.
|
||||
*/
|
||||
|
||||
exports.formatters.o = function(v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
return util.inspect(v, this.inspectOpts)
|
||||
.split('\n').map(function(str) {
|
||||
return str.trim()
|
||||
}).join(' ');
|
||||
};
|
||||
|
||||
/**
|
||||
* Map %o to `util.inspect()`, allowing multiple lines if needed.
|
||||
*/
|
||||
|
||||
exports.formatters.O = function(v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
return util.inspect(v, this.inspectOpts);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds ANSI color escape codes if enabled.
|
||||
*
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function formatArgs(args) {
|
||||
var name = this.namespace;
|
||||
var useColors = this.useColors;
|
||||
|
||||
if (useColors) {
|
||||
var c = this.color;
|
||||
var prefix = ' \u001b[3' + c + ';1m' + name + ' ' + '\u001b[0m';
|
||||
|
||||
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
||||
args.push('\u001b[3' + c + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
|
||||
} else {
|
||||
args[0] = new Date().toUTCString()
|
||||
+ ' ' + name + ' ' + args[0];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes `util.format()` with the specified arguments and writes to `stream`.
|
||||
*/
|
||||
|
||||
function log() {
|
||||
return stream.write(util.format.apply(util, arguments) + '\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* Save `namespaces`.
|
||||
*
|
||||
* @param {String} namespaces
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function save(namespaces) {
|
||||
if (null == namespaces) {
|
||||
// If you set a process.env field to null or undefined, it gets cast to the
|
||||
// string 'null' or 'undefined'. Just delete instead.
|
||||
delete process.env.DEBUG;
|
||||
} else {
|
||||
process.env.DEBUG = namespaces;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Load `namespaces`.
|
||||
*
|
||||
* @return {String} returns the previously persisted debug modes
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function load() {
|
||||
return process.env.DEBUG;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from `node/src/node.js`.
|
||||
*
|
||||
* XXX: It's lame that node doesn't expose this API out-of-the-box. It also
|
||||
* relies on the undocumented `tty_wrap.guessHandleType()` which is also lame.
|
||||
*/
|
||||
|
||||
function createWritableStdioStream (fd) {
|
||||
var stream;
|
||||
var tty_wrap = process.binding('tty_wrap');
|
||||
|
||||
// Note stream._type is used for test-module-load-list.js
|
||||
|
||||
switch (tty_wrap.guessHandleType(fd)) {
|
||||
case 'TTY':
|
||||
stream = new tty.WriteStream(fd);
|
||||
stream._type = 'tty';
|
||||
|
||||
// Hack to have stream not keep the event loop alive.
|
||||
// See https://github.com/joyent/node/issues/1726
|
||||
if (stream._handle && stream._handle.unref) {
|
||||
stream._handle.unref();
|
||||
}
|
||||
break;
|
||||
|
||||
case 'FILE':
|
||||
var fs = require('fs');
|
||||
stream = new fs.SyncWriteStream(fd, { autoClose: false });
|
||||
stream._type = 'fs';
|
||||
break;
|
||||
|
||||
case 'PIPE':
|
||||
case 'TCP':
|
||||
var net = require('net');
|
||||
stream = new net.Socket({
|
||||
fd: fd,
|
||||
readable: false,
|
||||
writable: true
|
||||
});
|
||||
|
||||
// FIXME Should probably have an option in net.Socket to create a
|
||||
// stream from an existing fd which is writable only. But for now
|
||||
// we'll just add this hack and set the `readable` member to false.
|
||||
// Test: ./node test/fixtures/echo.js < /etc/passwd
|
||||
stream.readable = false;
|
||||
stream.read = null;
|
||||
stream._type = 'pipe';
|
||||
|
||||
// FIXME Hack to have stream not keep the event loop alive.
|
||||
// See https://github.com/joyent/node/issues/1726
|
||||
if (stream._handle && stream._handle.unref) {
|
||||
stream._handle.unref();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// Probably an error on in uv_guess_handle()
|
||||
throw new Error('Implement me. Unknown stream file type!');
|
||||
}
|
||||
|
||||
// For supporting legacy API we put the FD here.
|
||||
stream.fd = fd;
|
||||
|
||||
stream._isStdio = true;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Init logic for `debug` instances.
|
||||
*
|
||||
* Create a new `inspectOpts` object in case `useColors` is set
|
||||
* differently for a particular `debug` instance.
|
||||
*/
|
||||
|
||||
function init (debug) {
|
||||
debug.inspectOpts = {};
|
||||
|
||||
var keys = Object.keys(exports.inspectOpts);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable namespaces listed in `process.env.DEBUG` initially.
|
||||
*/
|
||||
|
||||
exports.enable(load());
|
38
functions/node_modules/grpc/node_modules/deep-extend/CHANGELOG.md
generated
vendored
Normal file
38
functions/node_modules/grpc/node_modules/deep-extend/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
v0.5.1
|
||||
------
|
||||
|
||||
- Fix prototype pollution vulnerability (thanks to @mwakerman for the PR)
|
||||
- Avoid using deprecated Buffer API (thanks to @ChALkeR for the PR)
|
||||
|
||||
v0.5.0
|
||||
------
|
||||
|
||||
- Auto-testing provided by Travis CI;
|
||||
- Support older Node.JS versions (`v0.11.x` and `v0.10.x`);
|
||||
- Removed tests files from npm package.
|
||||
|
||||
v0.4.2
|
||||
------
|
||||
|
||||
- Fix for `null` as an argument.
|
||||
|
||||
v0.4.1
|
||||
------
|
||||
|
||||
- Removed test code from <b>npm</b> package
|
||||
([see pull request #21](https://github.com/unclechu/node-deep-extend/pull/21));
|
||||
- Increased minimal version of Node from `0.4.0` to `0.12.0`
|
||||
(because can't run tests on lesser version anyway).
|
||||
|
||||
v0.4.0
|
||||
------
|
||||
|
||||
- **WARNING!** Broken backward compatibility with `v0.3.x`;
|
||||
- Fixed bug with extending arrays instead of cloning;
|
||||
- Deep cloning for arrays;
|
||||
- Check for own property;
|
||||
- Fixed some documentation issues;
|
||||
- Strict JS mode.
|
20
functions/node_modules/grpc/node_modules/deep-extend/LICENSE
generated
vendored
Normal file
20
functions/node_modules/grpc/node_modules/deep-extend/LICENSE
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2018, Viacheslav Lotsmanov
|
||||
|
||||
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.
|
93
functions/node_modules/grpc/node_modules/deep-extend/README.md
generated
vendored
Normal file
93
functions/node_modules/grpc/node_modules/deep-extend/README.md
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
Deep Extend
|
||||
===========
|
||||
|
||||
Recursive object extending.
|
||||
|
||||
[](https://travis-ci.org/unclechu/node-deep-extend)
|
||||
|
||||
[](https://nodei.co/npm/deep-extend/)
|
||||
|
||||
[](https://nodei.co/npm/deep-extend/)
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
```bash
|
||||
$ npm install deep-extend
|
||||
```
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
```javascript
|
||||
var deepExtend = require('deep-extend');
|
||||
var obj1 = {
|
||||
a: 1,
|
||||
b: 2,
|
||||
d: {
|
||||
a: 1,
|
||||
b: [],
|
||||
c: { test1: 123, test2: 321 }
|
||||
},
|
||||
f: 5,
|
||||
g: 123,
|
||||
i: 321,
|
||||
j: [1, 2]
|
||||
};
|
||||
var obj2 = {
|
||||
b: 3,
|
||||
c: 5,
|
||||
d: {
|
||||
b: { first: 'one', second: 'two' },
|
||||
c: { test2: 222 }
|
||||
},
|
||||
e: { one: 1, two: 2 },
|
||||
f: [],
|
||||
g: (void 0),
|
||||
h: /abc/g,
|
||||
i: null,
|
||||
j: [3, 4]
|
||||
};
|
||||
|
||||
deepExtend(obj1, obj2);
|
||||
|
||||
console.log(obj1);
|
||||
/*
|
||||
{ a: 1,
|
||||
b: 3,
|
||||
d:
|
||||
{ a: 1,
|
||||
b: { first: 'one', second: 'two' },
|
||||
c: { test1: 123, test2: 222 } },
|
||||
f: [],
|
||||
g: undefined,
|
||||
c: 5,
|
||||
e: { one: 1, two: 2 },
|
||||
h: /abc/g,
|
||||
i: null,
|
||||
j: [3, 4] }
|
||||
*/
|
||||
```
|
||||
|
||||
Unit testing
|
||||
------------
|
||||
|
||||
```bash
|
||||
$ npm test
|
||||
```
|
||||
|
||||
Changelog
|
||||
---------
|
||||
|
||||
[CHANGELOG.md](./CHANGELOG.md)
|
||||
|
||||
Any issues?
|
||||
-----------
|
||||
|
||||
Please, report about issues
|
||||
[here](https://github.com/unclechu/node-deep-extend/issues).
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
[MIT](./LICENSE)
|
1
functions/node_modules/grpc/node_modules/deep-extend/index.js
generated
vendored
Normal file
1
functions/node_modules/grpc/node_modules/deep-extend/index.js
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
module.exports = require('./lib/deep-extend');
|
150
functions/node_modules/grpc/node_modules/deep-extend/lib/deep-extend.js
generated
vendored
Normal file
150
functions/node_modules/grpc/node_modules/deep-extend/lib/deep-extend.js
generated
vendored
Normal file
@ -0,0 +1,150 @@
|
||||
/*!
|
||||
* @description Recursive object extending
|
||||
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
|
||||
* @license MIT
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
function isSpecificValue(val) {
|
||||
return (
|
||||
val instanceof Buffer
|
||||
|| val instanceof Date
|
||||
|| val instanceof RegExp
|
||||
) ? true : false;
|
||||
}
|
||||
|
||||
function cloneSpecificValue(val) {
|
||||
if (val instanceof Buffer) {
|
||||
var x = Buffer.alloc
|
||||
? Buffer.alloc(val.length)
|
||||
: new Buffer(val.length);
|
||||
val.copy(x);
|
||||
return x;
|
||||
} else if (val instanceof Date) {
|
||||
return new Date(val.getTime());
|
||||
} else if (val instanceof RegExp) {
|
||||
return new RegExp(val);
|
||||
} else {
|
||||
throw new Error('Unexpected situation');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursive cloning array.
|
||||
*/
|
||||
function deepCloneArray(arr) {
|
||||
var clone = [];
|
||||
arr.forEach(function (item, index) {
|
||||
if (typeof item === 'object' && item !== null) {
|
||||
if (Array.isArray(item)) {
|
||||
clone[index] = deepCloneArray(item);
|
||||
} else if (isSpecificValue(item)) {
|
||||
clone[index] = cloneSpecificValue(item);
|
||||
} else {
|
||||
clone[index] = deepExtend({}, item);
|
||||
}
|
||||
} else {
|
||||
clone[index] = item;
|
||||
}
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
|
||||
function safeGetProperty(object, property) {
|
||||
return property === '__proto__' ? undefined : object[property];
|
||||
}
|
||||
|
||||
/**
|
||||
* Extening object that entered in first argument.
|
||||
*
|
||||
* Returns extended object or false if have no target object or incorrect type.
|
||||
*
|
||||
* If you wish to clone source object (without modify it), just use empty new
|
||||
* object as first argument, like this:
|
||||
* deepExtend({}, yourObj_1, [yourObj_N]);
|
||||
*/
|
||||
var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
|
||||
if (arguments.length < 1 || typeof arguments[0] !== 'object') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (arguments.length < 2) {
|
||||
return arguments[0];
|
||||
}
|
||||
|
||||
var target = arguments[0];
|
||||
|
||||
// convert arguments to array and cut off target object
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
var val, src, clone;
|
||||
|
||||
args.forEach(function (obj) {
|
||||
// skip argument if isn't an object, is null, or is an array
|
||||
if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object.keys(obj).forEach(function (key) {
|
||||
src = safeGetProperty(target, key); // source value
|
||||
val = safeGetProperty(obj, key); // new value
|
||||
|
||||
// recursion prevention
|
||||
if (val === target) {
|
||||
return;
|
||||
|
||||
/**
|
||||
* if new value isn't object then just overwrite by new value
|
||||
* instead of extending.
|
||||
*/
|
||||
} else if (typeof val !== 'object' || val === null) {
|
||||
target[key] = val;
|
||||
return;
|
||||
|
||||
// just clone arrays (and recursive clone objects inside)
|
||||
} else if (Array.isArray(val)) {
|
||||
target[key] = deepCloneArray(val);
|
||||
return;
|
||||
|
||||
// custom cloning and overwrite for specific objects
|
||||
} else if (isSpecificValue(val)) {
|
||||
target[key] = cloneSpecificValue(val);
|
||||
return;
|
||||
|
||||
// overwrite by new value if source isn't object or array
|
||||
} else if (typeof src !== 'object' || src === null || Array.isArray(src)) {
|
||||
target[key] = deepExtend({}, val);
|
||||
return;
|
||||
|
||||
// source value and new value is objects both, extending...
|
||||
} else {
|
||||
target[key] = deepExtend(src, val);
|
||||
return;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return target;
|
||||
};
|
93
functions/node_modules/grpc/node_modules/deep-extend/package.json
generated
vendored
Normal file
93
functions/node_modules/grpc/node_modules/deep-extend/package.json
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
{
|
||||
"_from": "deep-extend@^0.5.1",
|
||||
"_id": "deep-extend@0.5.1",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==",
|
||||
"_location": "/grpc/deep-extend",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "deep-extend@^0.5.1",
|
||||
"name": "deep-extend",
|
||||
"escapedName": "deep-extend",
|
||||
"rawSpec": "^0.5.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.5.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/rc"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz",
|
||||
"_shasum": "b894a9dd90d3023fbf1c55a394fb858eb2066f1f",
|
||||
"_spec": "deep-extend@^0.5.1",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core/node_modules/rc",
|
||||
"author": {
|
||||
"name": "Viacheslav Lotsmanov",
|
||||
"email": "lotsmanov89@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/unclechu/node-deep-extend/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Romain Prieto",
|
||||
"url": "https://github.com/rprieto"
|
||||
},
|
||||
{
|
||||
"name": "Max Maximov",
|
||||
"url": "https://github.com/maxmaximov"
|
||||
},
|
||||
{
|
||||
"name": "Marshall Bowers",
|
||||
"url": "https://github.com/maxdeviant"
|
||||
},
|
||||
{
|
||||
"name": "Misha Wakerman",
|
||||
"url": "https://github.com/mwakerman"
|
||||
}
|
||||
],
|
||||
"deprecated": false,
|
||||
"description": "Recursive object extending",
|
||||
"devDependencies": {
|
||||
"mocha": "2.2.1",
|
||||
"should": "5.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"iojs": ">=1.0.0",
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"lib/"
|
||||
],
|
||||
"homepage": "https://github.com/unclechu/node-deep-extend",
|
||||
"keywords": [
|
||||
"deep-extend",
|
||||
"extend",
|
||||
"deep",
|
||||
"recursive",
|
||||
"xtend",
|
||||
"clone",
|
||||
"merge",
|
||||
"json"
|
||||
],
|
||||
"license": "MIT",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://raw.githubusercontent.com/unclechu/node-deep-extend/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"main": "lib/deep-extend.js",
|
||||
"name": "deep-extend",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/unclechu/node-deep-extend.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "0.5.1"
|
||||
}
|
1
functions/node_modules/grpc/node_modules/delegates/.npmignore
generated
vendored
Normal file
1
functions/node_modules/grpc/node_modules/delegates/.npmignore
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules/
|
22
functions/node_modules/grpc/node_modules/delegates/History.md
generated
vendored
Normal file
22
functions/node_modules/grpc/node_modules/delegates/History.md
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
1.0.0 / 2015-12-14
|
||||
==================
|
||||
|
||||
* Merge pull request #12 from kasicka/master
|
||||
* Add license text
|
||||
|
||||
0.1.0 / 2014-10-17
|
||||
==================
|
||||
|
||||
* adds `.fluent()` to api
|
||||
|
||||
0.0.3 / 2014-01-13
|
||||
==================
|
||||
|
||||
* fix receiver for .method()
|
||||
|
||||
0.0.2 / 2014-01-13
|
||||
==================
|
||||
|
||||
* Object.defineProperty() sucks
|
||||
* Initial commit
|
20
functions/node_modules/grpc/node_modules/delegates/License
generated
vendored
Normal file
20
functions/node_modules/grpc/node_modules/delegates/License
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2015 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
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.
|
8
functions/node_modules/grpc/node_modules/delegates/Makefile
generated
vendored
Normal file
8
functions/node_modules/grpc/node_modules/delegates/Makefile
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
test:
|
||||
@./node_modules/.bin/mocha \
|
||||
--require should \
|
||||
--reporter spec \
|
||||
--bail
|
||||
|
||||
.PHONY: test
|
94
functions/node_modules/grpc/node_modules/delegates/Readme.md
generated
vendored
Normal file
94
functions/node_modules/grpc/node_modules/delegates/Readme.md
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
# delegates
|
||||
|
||||
Node method and accessor delegation utilty.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ npm install delegates
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var delegate = require('delegates');
|
||||
|
||||
...
|
||||
|
||||
delegate(proto, 'request')
|
||||
.method('acceptsLanguages')
|
||||
.method('acceptsEncodings')
|
||||
.method('acceptsCharsets')
|
||||
.method('accepts')
|
||||
.method('is')
|
||||
.access('querystring')
|
||||
.access('idempotent')
|
||||
.access('socket')
|
||||
.access('length')
|
||||
.access('query')
|
||||
.access('search')
|
||||
.access('status')
|
||||
.access('method')
|
||||
.access('path')
|
||||
.access('body')
|
||||
.access('host')
|
||||
.access('url')
|
||||
.getter('subdomains')
|
||||
.getter('protocol')
|
||||
.getter('header')
|
||||
.getter('stale')
|
||||
.getter('fresh')
|
||||
.getter('secure')
|
||||
.getter('ips')
|
||||
.getter('ip')
|
||||
```
|
||||
|
||||
# API
|
||||
|
||||
## Delegate(proto, prop)
|
||||
|
||||
Creates a delegator instance used to configure using the `prop` on the given
|
||||
`proto` object. (which is usually a prototype)
|
||||
|
||||
## Delegate#method(name)
|
||||
|
||||
Allows the given method `name` to be accessed on the host.
|
||||
|
||||
## Delegate#getter(name)
|
||||
|
||||
Creates a "getter" for the property with the given `name` on the delegated
|
||||
object.
|
||||
|
||||
## Delegate#setter(name)
|
||||
|
||||
Creates a "setter" for the property with the given `name` on the delegated
|
||||
object.
|
||||
|
||||
## Delegate#access(name)
|
||||
|
||||
Creates an "accessor" (ie: both getter *and* setter) for the property with the
|
||||
given `name` on the delegated object.
|
||||
|
||||
## Delegate#fluent(name)
|
||||
|
||||
A unique type of "accessor" that works for a "fluent" API. When called as a
|
||||
getter, the method returns the expected value. However, if the method is called
|
||||
with a value, it will return itself so it can be chained. For example:
|
||||
|
||||
```js
|
||||
delegate(proto, 'request')
|
||||
.fluent('query')
|
||||
|
||||
// getter
|
||||
var q = request.query();
|
||||
|
||||
// setter (chainable)
|
||||
request
|
||||
.query({ a: 1 })
|
||||
.query({ b: 2 });
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
MIT
|
121
functions/node_modules/grpc/node_modules/delegates/index.js
generated
vendored
Normal file
121
functions/node_modules/grpc/node_modules/delegates/index.js
generated
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
|
||||
/**
|
||||
* Expose `Delegator`.
|
||||
*/
|
||||
|
||||
module.exports = Delegator;
|
||||
|
||||
/**
|
||||
* Initialize a delegator.
|
||||
*
|
||||
* @param {Object} proto
|
||||
* @param {String} target
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function Delegator(proto, target) {
|
||||
if (!(this instanceof Delegator)) return new Delegator(proto, target);
|
||||
this.proto = proto;
|
||||
this.target = target;
|
||||
this.methods = [];
|
||||
this.getters = [];
|
||||
this.setters = [];
|
||||
this.fluents = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Delegate method `name`.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Delegator} self
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Delegator.prototype.method = function(name){
|
||||
var proto = this.proto;
|
||||
var target = this.target;
|
||||
this.methods.push(name);
|
||||
|
||||
proto[name] = function(){
|
||||
return this[target][name].apply(this[target], arguments);
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delegator accessor `name`.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Delegator} self
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Delegator.prototype.access = function(name){
|
||||
return this.getter(name).setter(name);
|
||||
};
|
||||
|
||||
/**
|
||||
* Delegator getter `name`.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Delegator} self
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Delegator.prototype.getter = function(name){
|
||||
var proto = this.proto;
|
||||
var target = this.target;
|
||||
this.getters.push(name);
|
||||
|
||||
proto.__defineGetter__(name, function(){
|
||||
return this[target][name];
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delegator setter `name`.
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Delegator} self
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Delegator.prototype.setter = function(name){
|
||||
var proto = this.proto;
|
||||
var target = this.target;
|
||||
this.setters.push(name);
|
||||
|
||||
proto.__defineSetter__(name, function(val){
|
||||
return this[target][name] = val;
|
||||
});
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delegator fluent accessor
|
||||
*
|
||||
* @param {String} name
|
||||
* @return {Delegator} self
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Delegator.prototype.fluent = function (name) {
|
||||
var proto = this.proto;
|
||||
var target = this.target;
|
||||
this.fluents.push(name);
|
||||
|
||||
proto[name] = function(val){
|
||||
if ('undefined' != typeof val) {
|
||||
this[target][name] = val;
|
||||
return this;
|
||||
} else {
|
||||
return this[target][name];
|
||||
}
|
||||
};
|
||||
|
||||
return this;
|
||||
};
|
51
functions/node_modules/grpc/node_modules/delegates/package.json
generated
vendored
Normal file
51
functions/node_modules/grpc/node_modules/delegates/package.json
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"delegates@1.0.0",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "delegates@1.0.0",
|
||||
"_id": "delegates@1.0.0",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
||||
"_location": "/grpc/delegates",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "delegates@1.0.0",
|
||||
"name": "delegates",
|
||||
"escapedName": "delegates",
|
||||
"rawSpec": "1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/are-we-there-yet"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"_spec": "1.0.0",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"bugs": {
|
||||
"url": "https://github.com/visionmedia/node-delegates/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "delegate methods and accessors to another property",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"homepage": "https://github.com/visionmedia/node-delegates#readme",
|
||||
"keywords": [
|
||||
"delegate",
|
||||
"delegation"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "delegates",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/visionmedia/node-delegates.git"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
94
functions/node_modules/grpc/node_modules/delegates/test/index.js
generated
vendored
Normal file
94
functions/node_modules/grpc/node_modules/delegates/test/index.js
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
var assert = require('assert');
|
||||
var delegate = require('..');
|
||||
|
||||
describe('.method(name)', function(){
|
||||
it('should delegate methods', function(){
|
||||
var obj = {};
|
||||
|
||||
obj.request = {
|
||||
foo: function(bar){
|
||||
assert(this == obj.request);
|
||||
return bar;
|
||||
}
|
||||
};
|
||||
|
||||
delegate(obj, 'request').method('foo');
|
||||
|
||||
obj.foo('something').should.equal('something');
|
||||
})
|
||||
})
|
||||
|
||||
describe('.getter(name)', function(){
|
||||
it('should delegate getters', function(){
|
||||
var obj = {};
|
||||
|
||||
obj.request = {
|
||||
get type() {
|
||||
return 'text/html';
|
||||
}
|
||||
}
|
||||
|
||||
delegate(obj, 'request').getter('type');
|
||||
|
||||
obj.type.should.equal('text/html');
|
||||
})
|
||||
})
|
||||
|
||||
describe('.setter(name)', function(){
|
||||
it('should delegate setters', function(){
|
||||
var obj = {};
|
||||
|
||||
obj.request = {
|
||||
get type() {
|
||||
return this._type.toUpperCase();
|
||||
},
|
||||
|
||||
set type(val) {
|
||||
this._type = val;
|
||||
}
|
||||
}
|
||||
|
||||
delegate(obj, 'request').setter('type');
|
||||
|
||||
obj.type = 'hey';
|
||||
obj.request.type.should.equal('HEY');
|
||||
})
|
||||
})
|
||||
|
||||
describe('.access(name)', function(){
|
||||
it('should delegate getters and setters', function(){
|
||||
var obj = {};
|
||||
|
||||
obj.request = {
|
||||
get type() {
|
||||
return this._type.toUpperCase();
|
||||
},
|
||||
|
||||
set type(val) {
|
||||
this._type = val;
|
||||
}
|
||||
}
|
||||
|
||||
delegate(obj, 'request').access('type');
|
||||
|
||||
obj.type = 'hey';
|
||||
obj.type.should.equal('HEY');
|
||||
})
|
||||
})
|
||||
|
||||
describe('.fluent(name)', function () {
|
||||
it('should delegate in a fluent fashion', function () {
|
||||
var obj = {
|
||||
settings: {
|
||||
env: 'development'
|
||||
}
|
||||
};
|
||||
|
||||
delegate(obj, 'settings').fluent('env');
|
||||
|
||||
obj.env().should.equal('development');
|
||||
obj.env('production').should.equal(obj);
|
||||
obj.settings.env.should.equal('production');
|
||||
})
|
||||
})
|
7
functions/node_modules/grpc/node_modules/detect-libc/.npmignore
generated
vendored
Normal file
7
functions/node_modules/grpc/node_modules/detect-libc/.npmignore
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
.nyc_output
|
||||
.travis.yml
|
||||
coverage
|
||||
test.js
|
||||
node_modules
|
||||
/.circleci
|
||||
/tests/integration
|
201
functions/node_modules/grpc/node_modules/detect-libc/LICENSE
generated
vendored
Normal file
201
functions/node_modules/grpc/node_modules/detect-libc/LICENSE
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright {yyyy} {name of copyright owner}
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
78
functions/node_modules/grpc/node_modules/detect-libc/README.md
generated
vendored
Normal file
78
functions/node_modules/grpc/node_modules/detect-libc/README.md
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
# detect-libc
|
||||
|
||||
Node.js module to detect the C standard library (libc) implementation
|
||||
family and version in use on a given Linux system.
|
||||
|
||||
Provides a value suitable for use with the `LIBC` option of
|
||||
[prebuild](https://www.npmjs.com/package/prebuild),
|
||||
[prebuild-ci](https://www.npmjs.com/package/prebuild-ci) and
|
||||
[prebuild-install](https://www.npmjs.com/package/prebuild-install),
|
||||
therefore allowing build and provision of pre-compiled binaries
|
||||
for musl-based Linux e.g. Alpine as well as glibc-based.
|
||||
|
||||
Currently supports libc detection of `glibc` and `musl`.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install detect-libc
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### API
|
||||
|
||||
```js
|
||||
const { GLIBC, MUSL, family, version, isNonGlibcLinux } = require('detect-libc');
|
||||
```
|
||||
|
||||
* `GLIBC` is a String containing the value "glibc" for comparison with `family`.
|
||||
* `MUSL` is a String containing the value "musl" for comparison with `family`.
|
||||
* `family` is a String representing the system libc family.
|
||||
* `version` is a String representing the system libc version number.
|
||||
* `isNonGlibcLinux` is a Boolean representing whether the system is a non-glibc Linux, e.g. Alpine.
|
||||
|
||||
### detect-libc command line tool
|
||||
|
||||
When run on a Linux system with a non-glibc libc,
|
||||
the child command will be run with the `LIBC` environment variable
|
||||
set to the relevant value.
|
||||
|
||||
On all other platforms will run the child command as-is.
|
||||
|
||||
The command line feature requires `spawnSync` provided by Node v0.12+.
|
||||
|
||||
```sh
|
||||
detect-libc child-command
|
||||
```
|
||||
|
||||
## Integrating with prebuild
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"install": "detect-libc prebuild-install || node-gyp rebuild",
|
||||
"test": "mocha && detect-libc prebuild-ci"
|
||||
},
|
||||
"dependencies": {
|
||||
"detect-libc": "^1.0.2",
|
||||
"prebuild-install": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prebuild": "^6.2.1",
|
||||
"prebuild-ci": "^2.2.3"
|
||||
}
|
||||
```
|
||||
|
||||
## Licence
|
||||
|
||||
Copyright 2017 Lovell Fuller
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
92
functions/node_modules/grpc/node_modules/detect-libc/lib/detect-libc.js
generated
vendored
Normal file
92
functions/node_modules/grpc/node_modules/detect-libc/lib/detect-libc.js
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
'use strict';
|
||||
|
||||
var platform = require('os').platform();
|
||||
var spawnSync = require('child_process').spawnSync;
|
||||
var readdirSync = require('fs').readdirSync;
|
||||
|
||||
var GLIBC = 'glibc';
|
||||
var MUSL = 'musl';
|
||||
|
||||
var spawnOptions = {
|
||||
encoding: 'utf8',
|
||||
env: process.env
|
||||
};
|
||||
|
||||
if (!spawnSync) {
|
||||
spawnSync = function () {
|
||||
return { status: 126, stdout: '', stderr: '' };
|
||||
};
|
||||
}
|
||||
|
||||
function contains (needle) {
|
||||
return function (haystack) {
|
||||
return haystack.indexOf(needle) !== -1;
|
||||
};
|
||||
}
|
||||
|
||||
function versionFromMuslLdd (out) {
|
||||
return out.split(/[\r\n]+/)[1].trim().split(/\s/)[1];
|
||||
}
|
||||
|
||||
function safeReaddirSync (path) {
|
||||
try {
|
||||
return readdirSync(path);
|
||||
} catch (e) {}
|
||||
return [];
|
||||
}
|
||||
|
||||
var family = '';
|
||||
var version = '';
|
||||
var method = '';
|
||||
|
||||
if (platform === 'linux') {
|
||||
// Try getconf
|
||||
var glibc = spawnSync('getconf', ['GNU_LIBC_VERSION'], spawnOptions);
|
||||
if (glibc.status === 0) {
|
||||
family = GLIBC;
|
||||
version = glibc.stdout.trim().split(' ')[1];
|
||||
method = 'getconf';
|
||||
} else {
|
||||
// Try ldd
|
||||
var ldd = spawnSync('ldd', ['--version'], spawnOptions);
|
||||
if (ldd.status === 0 && ldd.stdout.indexOf(MUSL) !== -1) {
|
||||
family = MUSL;
|
||||
version = versionFromMuslLdd(ldd.stdout);
|
||||
method = 'ldd';
|
||||
} else if (ldd.status === 1 && ldd.stderr.indexOf(MUSL) !== -1) {
|
||||
family = MUSL;
|
||||
version = versionFromMuslLdd(ldd.stderr);
|
||||
method = 'ldd';
|
||||
} else {
|
||||
// Try filesystem (family only)
|
||||
var lib = safeReaddirSync('/lib');
|
||||
if (lib.some(contains('-linux-gnu'))) {
|
||||
family = GLIBC;
|
||||
method = 'filesystem';
|
||||
} else if (lib.some(contains('libc.musl-'))) {
|
||||
family = MUSL;
|
||||
method = 'filesystem';
|
||||
} else if (lib.some(contains('ld-musl-'))) {
|
||||
family = MUSL;
|
||||
method = 'filesystem';
|
||||
} else {
|
||||
var usrSbin = safeReaddirSync('/usr/sbin');
|
||||
if (usrSbin.some(contains('glibc'))) {
|
||||
family = GLIBC;
|
||||
method = 'filesystem';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var isNonGlibcLinux = (family !== '' && family !== GLIBC);
|
||||
|
||||
module.exports = {
|
||||
GLIBC: GLIBC,
|
||||
MUSL: MUSL,
|
||||
family: family,
|
||||
version: version,
|
||||
method: method,
|
||||
isNonGlibcLinux: isNonGlibcLinux
|
||||
};
|
73
functions/node_modules/grpc/node_modules/detect-libc/package.json
generated
vendored
Normal file
73
functions/node_modules/grpc/node_modules/detect-libc/package.json
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"detect-libc@1.0.3",
|
||||
"/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core"
|
||||
]
|
||||
],
|
||||
"_from": "detect-libc@1.0.3",
|
||||
"_id": "detect-libc@1.0.3",
|
||||
"_inBundle": true,
|
||||
"_integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||
"_location": "/grpc/detect-libc",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "detect-libc@1.0.3",
|
||||
"name": "detect-libc",
|
||||
"escapedName": "detect-libc",
|
||||
"rawSpec": "1.0.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.0.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/grpc/node-pre-gyp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"_spec": "1.0.3",
|
||||
"_where": "/usr/local/google/home/mlumish/grpc-node/packages/grpc-native-core",
|
||||
"author": {
|
||||
"name": "Lovell Fuller",
|
||||
"email": "npm@lovell.info"
|
||||
},
|
||||
"bin": {
|
||||
"detect-libc": "./bin/detect-libc.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/lovell/detect-libc/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Niklas Salmoukas",
|
||||
"email": "niklas@salmoukas.com"
|
||||
}
|
||||
],
|
||||
"description": "Node.js module to detect the C standard library (libc) implementation family and version",
|
||||
"devDependencies": {
|
||||
"ava": "^0.23.0",
|
||||
"nyc": "^11.3.0",
|
||||
"proxyquire": "^1.8.0",
|
||||
"semistandard": "^11.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
},
|
||||
"homepage": "https://github.com/lovell/detect-libc#readme",
|
||||
"keywords": [
|
||||
"libc",
|
||||
"glibc",
|
||||
"musl"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"main": "lib/detect-libc.js",
|
||||
"name": "detect-libc",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/lovell/detect-libc.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "semistandard && nyc --reporter=lcov ava"
|
||||
},
|
||||
"version": "1.0.3"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user