refactor(Cypress): add nodemodules
This commit is contained in:
16
node_modules/labeled-stream-splicer/.travis.yml
generated
vendored
Normal file
16
node_modules/labeled-stream-splicer/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "12"
|
||||
- "11"
|
||||
- "10"
|
||||
- "8"
|
||||
- "6"
|
||||
- "4"
|
||||
- "iojs"
|
||||
- "0.12"
|
||||
- "0.10"
|
||||
- "0.8"
|
||||
before_install:
|
||||
# Old npm certs are untrusted https://github.com/npm/npm/issues/20191
|
||||
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.8" ]; then export NPM_CONFIG_STRICT_SSL=false; fi'
|
||||
- 'nvm install-latest-npm'
|
21
node_modules/labeled-stream-splicer/LICENSE
generated
vendored
Normal file
21
node_modules/labeled-stream-splicer/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) James Halliday and browserify 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.
|
3
node_modules/labeled-stream-splicer/example/browser/bar.js
generated
vendored
Normal file
3
node_modules/labeled-stream-splicer/example/browser/bar.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = function (n) {
|
||||
return n * 100;
|
||||
};
|
5
node_modules/labeled-stream-splicer/example/browser/foo.js
generated
vendored
Normal file
5
node_modules/labeled-stream-splicer/example/browser/foo.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var bar = require('./bar');
|
||||
|
||||
module.exports = function (n) {
|
||||
return n * 111 + bar(n);
|
||||
};
|
2
node_modules/labeled-stream-splicer/example/browser/main.js
generated
vendored
Normal file
2
node_modules/labeled-stream-splicer/example/browser/main.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
var foo = require('./foo');
|
||||
console.log('main: ' + foo(5));
|
2
node_modules/labeled-stream-splicer/example/browser/xyz.js
generated
vendored
Normal file
2
node_modules/labeled-stream-splicer/example/browser/xyz.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
var foo = require('./foo');
|
||||
console.log('xyz: ' + foo(6));
|
19
node_modules/labeled-stream-splicer/example/bundle.js
generated
vendored
Normal file
19
node_modules/labeled-stream-splicer/example/bundle.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
var splicer = require('../');
|
||||
var through = require('through2');
|
||||
var deps = require('module-deps');
|
||||
var pack = require('browser-pack');
|
||||
|
||||
var pipeline = splicer.obj([
|
||||
'deps', [ deps() ],
|
||||
'pack', [ pack({ raw: true }) ]
|
||||
]);
|
||||
|
||||
pipeline.get('deps').push(through.obj(function (row, enc, next) {
|
||||
row.source = row.source.toUpperCase();
|
||||
this.push(row);
|
||||
next();
|
||||
}));
|
||||
|
||||
pipeline.pipe(process.stdout);
|
||||
|
||||
pipeline.end(__dirname + '/browser/main.js');
|
64
node_modules/labeled-stream-splicer/index.js
generated
vendored
Normal file
64
node_modules/labeled-stream-splicer/index.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
var Splicer = require('stream-splicer');
|
||||
var inherits = require('inherits');
|
||||
|
||||
module.exports = Labeled;
|
||||
inherits(Labeled, Splicer);
|
||||
|
||||
module.exports.obj = function (streams, opts) {
|
||||
if (!opts) opts = {};
|
||||
opts.objectMode = true;
|
||||
return new Labeled(streams, opts);
|
||||
};
|
||||
|
||||
function Labeled (streams, opts) {
|
||||
if (!(this instanceof Labeled)) return new Labeled(streams, opts);
|
||||
Splicer.call(this, [], opts);
|
||||
|
||||
var reps = [];
|
||||
for (var i = 0; i < streams.length; i++) {
|
||||
var s = streams[i];
|
||||
if (typeof s === 'string') continue;
|
||||
if (Array.isArray(s)) {
|
||||
s = new Labeled(s, opts);
|
||||
}
|
||||
if (i >= 0 && typeof streams[i-1] === 'string') {
|
||||
s.label = streams[i-1];
|
||||
}
|
||||
reps.push(s);
|
||||
}
|
||||
if (typeof streams[i-1] === 'string') {
|
||||
reps.push(new Labeled([], opts));
|
||||
}
|
||||
this.splice.apply(this, [0,0].concat(reps));
|
||||
}
|
||||
|
||||
Labeled.prototype.indexOf = function (stream) {
|
||||
if (typeof stream === 'string') {
|
||||
for (var i = 0; i < this._streams.length; i++) {
|
||||
if (this._streams[i].label === stream) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
return Splicer.prototype.indexOf.call(this, stream);
|
||||
}
|
||||
};
|
||||
|
||||
Labeled.prototype.get = function (key) {
|
||||
if (typeof key === 'string') {
|
||||
var ix = this.indexOf(key);
|
||||
if (ix < 0) return undefined;
|
||||
return this._streams[ix];
|
||||
}
|
||||
else return Splicer.prototype.get.call(this, key);
|
||||
};
|
||||
|
||||
Labeled.prototype.splice = function (key) {
|
||||
var ix;
|
||||
if (typeof key === 'string') {
|
||||
ix = this.indexOf(key);
|
||||
}
|
||||
else ix = key;
|
||||
var args = [ ix ].concat([].slice.call(arguments, 1));
|
||||
return Splicer.prototype.splice.apply(this, args);
|
||||
};
|
66
node_modules/labeled-stream-splicer/package.json
generated
vendored
Normal file
66
node_modules/labeled-stream-splicer/package.json
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"_from": "labeled-stream-splicer@^2.0.0",
|
||||
"_id": "labeled-stream-splicer@2.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==",
|
||||
"_location": "/labeled-stream-splicer",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "labeled-stream-splicer@^2.0.0",
|
||||
"name": "labeled-stream-splicer",
|
||||
"escapedName": "labeled-stream-splicer",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/browserify"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz",
|
||||
"_shasum": "42a41a16abcd46fd046306cf4f2c3576fffb1c21",
|
||||
"_spec": "labeled-stream-splicer@^2.0.0",
|
||||
"_where": "/home/simon/Documents/lifen-autotest/node_modules/browserify",
|
||||
"author": {
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/browserify/labeled-stream-splicer/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.1",
|
||||
"stream-splicer": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "stream splicer with labels",
|
||||
"devDependencies": {
|
||||
"browser-pack": "^6.1.0",
|
||||
"concat-stream": "^1.4.6",
|
||||
"module-deps": "^6.2.0",
|
||||
"tape": "^4.10.1",
|
||||
"through2": "^1.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/browserify/labeled-stream-splicer",
|
||||
"keywords": [
|
||||
"splice",
|
||||
"stream",
|
||||
"labels",
|
||||
"mutable",
|
||||
"pipeline"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "labeled-stream-splicer",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/browserify/labeled-stream-splicer.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tape test/*.js"
|
||||
},
|
||||
"version": "2.0.2"
|
||||
}
|
124
node_modules/labeled-stream-splicer/readme.markdown
generated
vendored
Normal file
124
node_modules/labeled-stream-splicer/readme.markdown
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
# labeled-stream-splicer
|
||||
|
||||
[stream splicer](https://npmjs.org/package/stream-splicer) with labels
|
||||
|
||||
[](http://travis-ci.org/browserify/labeled-stream-splicer)
|
||||
|
||||
# example
|
||||
|
||||
Here's an example that exposes a label for `deps` and `pack`:
|
||||
|
||||
``` js
|
||||
var splicer = require('labeled-stream-splicer');
|
||||
var through = require('through2');
|
||||
var deps = require('module-deps');
|
||||
var pack = require('browser-pack');
|
||||
var lstream = require('lstream');
|
||||
|
||||
var pipeline = splicer.obj([
|
||||
'deps', [ deps() ],
|
||||
'pack', [ pack({ raw: true }) ]
|
||||
]);
|
||||
|
||||
pipeline.get('deps').unshift(lstream());
|
||||
|
||||
pipeline.get('deps').push(through.obj(function (row, enc, next) {
|
||||
row.source = row.source.toUpperCase();
|
||||
this.push(row);
|
||||
next();
|
||||
}));
|
||||
|
||||
process.stdin.pipe(pipeline).pipe(process.stdout);
|
||||
```
|
||||
|
||||
Here the `deps` sub-pipeline is augmented with a post-transformation that
|
||||
uppercases its source input.
|
||||
|
||||
# methods
|
||||
|
||||
``` js
|
||||
var splicer = require('labeled-stream-splicer')
|
||||
```
|
||||
|
||||
The API is the same as
|
||||
[stream-splicer](https://npmjs.org/package/stream-splicer),
|
||||
except that `pipeline.get()`, `pipeline.splice()`, and `pipeline.indexOf()` can
|
||||
accept string labels in addition to numeric indexes.
|
||||
|
||||
## var pipeline = splicer(streams, opts)
|
||||
|
||||
Create a `pipeline` duplex stream given an array of `streams`. Each `stream`
|
||||
will be piped to the next. Writes to `pipeline` get written to the first stream
|
||||
and data for reads from `pipeline` come from the last stream.
|
||||
|
||||
To signify a label, a stream may have a `.label` property or a string may be
|
||||
placed in the `streams` array.
|
||||
|
||||
For example, for streams `[ a, 'foo', b, c, 'bar', d ]`, this pipeline is
|
||||
constructed internally:
|
||||
|
||||
```
|
||||
a.pipe(b).pipe(c).pipe(d)
|
||||
```
|
||||
|
||||
with a label `'foo`' that points to `b` and a label `'bar'` that points to `d`.
|
||||
If `a` or `c` has a `.label` property, that label would be used for addressing.
|
||||
|
||||
Input will get written into `a`. Output will be read from `d`.
|
||||
|
||||
If any of the elements in `streams` are arrays, they will be converted into
|
||||
nested labeled pipelines. This is useful if you want to expose a hookable
|
||||
pipeline with grouped insertion points.
|
||||
|
||||
## var pipeline = splicer.obj(streams, opts)
|
||||
|
||||
Create a `pipeline` with `opts.objectMode` set to true for convenience.
|
||||
|
||||
## var removed = pipeline.splice(index, howMany, stream, ...)
|
||||
|
||||
Splice the pipeline starting at `index`, removing `howMany` streams and
|
||||
replacing them with each additional `stream` argument provided.
|
||||
|
||||
The streams that were removed from the splice and returned.
|
||||
|
||||
`index` can be an integer index or a label.
|
||||
|
||||
## pipeline.push(stream, ...)
|
||||
|
||||
Push one or more streams to the end of the pipeline.
|
||||
|
||||
The stream arguments may have a `label` property that will be used for string
|
||||
lookups.
|
||||
|
||||
## var stream = pipeline.pop()
|
||||
|
||||
Pop a stream from the end of the pipeline.
|
||||
|
||||
## pipeline.unshift(stream, ...)
|
||||
|
||||
Unshift one or more streams to the begining of the pipeline.
|
||||
|
||||
The stream arguments may have a `label` property that will be used for string
|
||||
lookups.
|
||||
|
||||
## var stream = pipeline.shift()
|
||||
|
||||
Shift a stream from the begining of the pipeline.
|
||||
|
||||
## var stream = pipeline.get(index)
|
||||
|
||||
Return the stream at index `index`.
|
||||
|
||||
`index` can be an integer or a string label.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](https://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install labeled-stream-splicer
|
||||
```
|
||||
|
||||
# license
|
||||
|
||||
MIT
|
29
node_modules/labeled-stream-splicer/test/bundle.js
generated
vendored
Normal file
29
node_modules/labeled-stream-splicer/test/bundle.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
var test = require('tape');
|
||||
var splicer = require('../');
|
||||
var through = require('through2');
|
||||
var deps = require('module-deps');
|
||||
var pack = require('browser-pack');
|
||||
var concat = require('concat-stream');
|
||||
|
||||
test('bundle', function (t) {
|
||||
t.plan(1);
|
||||
|
||||
var pipeline = splicer.obj([
|
||||
'deps', [ deps() ],
|
||||
'pack', [ pack({ raw: true }) ]
|
||||
]);
|
||||
pipeline.pipe(concat(function (body) {
|
||||
Function([ 'console' ], body.toString('utf8'))({ log: log });
|
||||
function log (msg) {
|
||||
t.equal(msg, 'main: 56055');
|
||||
}
|
||||
}));
|
||||
|
||||
pipeline.get('deps').push(through.obj(function (row, enc, next) {
|
||||
row.source = row.source.replace(/111/g, '11111');
|
||||
this.push(row);
|
||||
next();
|
||||
}));
|
||||
|
||||
pipeline.end(__dirname + '/bundle/main.js');
|
||||
});
|
3
node_modules/labeled-stream-splicer/test/bundle/bar.js
generated
vendored
Normal file
3
node_modules/labeled-stream-splicer/test/bundle/bar.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = function (n) {
|
||||
return n * 100;
|
||||
};
|
5
node_modules/labeled-stream-splicer/test/bundle/foo.js
generated
vendored
Normal file
5
node_modules/labeled-stream-splicer/test/bundle/foo.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
var bar = require('./bar');
|
||||
|
||||
module.exports = function (n) {
|
||||
return n * 111 + bar(n);
|
||||
};
|
2
node_modules/labeled-stream-splicer/test/bundle/main.js
generated
vendored
Normal file
2
node_modules/labeled-stream-splicer/test/bundle/main.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
var foo = require('./foo');
|
||||
console.log('main: ' + foo(5));
|
2
node_modules/labeled-stream-splicer/test/bundle/xyz.js
generated
vendored
Normal file
2
node_modules/labeled-stream-splicer/test/bundle/xyz.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
var foo = require('./foo');
|
||||
console.log('xyz: ' + foo(6));
|
Reference in New Issue
Block a user