Install yarn

This commit is contained in:
Jay Trees 2022-04-08 12:55:35 +02:00
parent 0453e84836
commit 1fde8a81be
1927 changed files with 82144 additions and 83317 deletions

15
node_modules/gulp-rtlcss/node_modules/.bin/rtlcss generated vendored Normal file
View file

@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../../../rtlcss/bin/rtlcss.js" "$@"
ret=$?
else
node "$basedir/../../../rtlcss/bin/rtlcss.js" "$@"
ret=$?
fi
exit $ret

View file

@ -0,0 +1,7 @@
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\..\..\rtlcss\bin\rtlcss.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\..\..\rtlcss\bin\rtlcss.js" %*
)

View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other 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.

View file

@ -0,0 +1,69 @@
<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
# plugin-error
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
Error handling for Vinyl plugins.
## Usage
```js
var PluginError = require('plugin-error');
var err = new PluginError('test', {
message: 'something broke'
});
var err = new PluginError({
plugin: 'test',
message: 'something broke'
});
var err = new PluginError('test', 'something broke');
var err = new PluginError('test', 'something broke', { showStack: true });
var existingError = new Error('OMG');
var err = new PluginError('test', existingError, { showStack: true });
```
## API
### `new PluginError(pluginName, message[, options])`
Error constructor that takes:
* `pluginName` - a `String` that should be the module name of your plugin
* `message` - a `String` message or an existing `Error` object
* `options` - an `Object` of your options
**Behavior:**
* By default the stack will not be shown. Set `options.showStack` to true if you think the stack is important for your error.
* If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
* If you pass in a custom stack string you need to include the message along with that.
* Error properties will be included in `err.toString()`, but may be omitted by including `{ showProperties: false }` in the options.
## License
MIT
[downloads-image]: http://img.shields.io/npm/dm/plugin-error.svg
[npm-url]: https://www.npmjs.com/package/plugin-error
[npm-image]: http://img.shields.io/npm/v/plugin-error.svg
[travis-url]: https://travis-ci.org/gulpjs/plugin-error
[travis-image]: http://img.shields.io/travis/gulpjs/plugin-error.svg?label=travis-ci
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/plugin-error
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/plugin-error.svg?label=appveyor
[coveralls-url]: https://coveralls.io/r/gulpjs/plugin-error
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/plugin-error/master.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg

View file

@ -0,0 +1,114 @@
declare namespace PluginError {
interface Constructor {
/**
* @param plugin Plugin name
* @param error Base error
* @param options Error options
*/
new <E extends Error>(plugin: string, error: E, options?: Options): PluginError<E>;
/**
* @param plugin Plugin name
* @param error Base error or error message
* @param options Error options
*/
new <E extends Error = Error>(plugin: string, error: E | string, options: Options): PluginError<E | {[K in keyof E]: undefined}>;
/**
* @param plugin Plugin name
* @param error Base error, error message, or options with message
*/
new <E extends Error = Error>(plugin: string, error: E | string | (Options & {message: string})): PluginError<E | {[K in keyof E]: undefined}>;
/**
* @param options Options with plugin name and message
*/
new(options: Options & {plugin: string, message: string}): PluginError;
}
interface Options {
/**
* Error name
*/
name?: string;
/**
* Error message
*/
message?: any;
/**
* File name where the error occurred
*/
fileName?: string;
/**
* Line number where the error occurred
*/
lineNumber?: number;
/**
* Error properties will be included in err.toString(). Can be omitted by
* setting this to false.
*
* Default: `true`
*/
showProperties?: boolean;
/**
* By default the stack will not be shown. Set this to true if you think the
* stack is important for your error.
*
* Default: `false`
*/
showStack?: boolean;
/**
* Error stack to use for `err.toString()` if `showStack` is `true`.
* By default it uses the `stack` of the original error if you used one, otherwise it captures a new stack.
*/
stack?: string;
}
/**
* The `SimplePluginError` interface defines the properties available on all the the instances of `PluginError`.
*
* @internal
*/
interface SimplePluginError extends Error {
/**
* Plugin name
*/
plugin: string;
/**
* Boolean controlling if the stack will be shown in `err.toString()`.
*/
showStack: boolean;
/**
* Boolean controlling if properties will be shown in `err.toString()`.
*/
showProperties: boolean;
/**
* File name where the error occurred
*/
fileName?: string;
/**
* Line number where the error occurred
*/
lineNumber?: number;
}
}
/**
* Abstraction for error handling for Vinyl plugins
*/
type PluginError<T = {}> = PluginError.SimplePluginError & T;
declare const PluginError: PluginError.Constructor;
export = PluginError;

View file

@ -0,0 +1,190 @@
var util = require('util');
var colors = require('ansi-colors');
var extend = require('extend-shallow');
var differ = require('arr-diff');
var union = require('arr-union');
var nonEnum = ['message', 'name', 'stack'];
var ignored = union(nonEnum, ['__safety', '_stack', 'plugin', 'showProperties', 'showStack']);
var props = ['fileName', 'lineNumber', 'message', 'name', 'plugin', 'showProperties', 'showStack', 'stack'];
function PluginError(plugin, message, options) {
if (!(this instanceof PluginError)) {
throw new Error('Call PluginError using new');
}
Error.call(this);
var opts = setDefaults(plugin, message, options);
var self = this;
// If opts has an error, get details from it
if (typeof opts.error === 'object') {
var keys = union(Object.keys(opts.error), nonEnum);
// These properties are not enumerable, so we have to add them explicitly.
keys.forEach(function(prop) {
self[prop] = opts.error[prop];
});
}
// Opts object can override
props.forEach(function(prop) {
if (prop in opts) {
this[prop] = opts[prop];
}
}, this);
// Defaults
if (!this.name) {
this.name = 'Error';
}
if (!this.stack) {
/**
* `Error.captureStackTrace` appends a stack property which
* relies on the toString method of the object it is applied to.
*
* Since we are using our own toString method which controls when
* to display the stack trace, if we don't go through this safety
* object we'll get stack overflow problems.
*/
var safety = {};
safety.toString = function() {
return this._messageWithDetails() + '\nStack:';
}.bind(this);
Error.captureStackTrace(safety, arguments.callee || this.constructor);
this.__safety = safety;
}
if (!this.plugin) {
throw new Error('Missing plugin name');
}
if (!this.message) {
throw new Error('Missing error message');
}
}
util.inherits(PluginError, Error);
/**
* Output a formatted message with details
*/
PluginError.prototype._messageWithDetails = function() {
var msg = 'Message:\n ' + this.message;
var details = this._messageDetails();
if (details !== '') {
msg += '\n' + details;
}
return msg;
};
/**
* Output actual message details
*/
PluginError.prototype._messageDetails = function() {
if (!this.showProperties) {
return '';
}
var props = differ(Object.keys(this), ignored);
var len = props.length;
if (len === 0) {
return '';
}
var res = '';
var i = 0;
while (len--) {
var prop = props[i++];
res += ' ';
res += prop + ': ' + this[prop];
res += '\n';
}
return 'Details:\n' + res;
};
/**
* Override the `toString` method
*/
PluginError.prototype.toString = function() {
var detailsWithStack = function(stack) {
return this._messageWithDetails() + '\nStack:\n' + stack;
}.bind(this);
var msg = '';
if (this.showStack) {
// If there is no wrapped error, use the stack captured in the PluginError ctor
if (this.__safety) {
msg = this.__safety.stack;
} else if (this._stack) {
msg = detailsWithStack(this._stack);
} else {
// Stack from wrapped error
msg = detailsWithStack(this.stack);
}
return message(msg, this);
}
msg = this._messageWithDetails();
return message(msg, this);
};
// Format the output message
function message(msg, thisArg) {
var sig = colors.red(thisArg.name);
sig += ' in plugin ';
sig += '"' + colors.cyan(thisArg.plugin) + '"';
sig += '\n';
sig += msg;
return sig;
}
/**
* Set default options based on arguments.
*/
function setDefaults(plugin, message, opts) {
if (typeof plugin === 'object') {
return defaults(plugin);
}
opts = opts || {};
if (message instanceof Error) {
opts.error = message;
} else if (typeof message === 'object') {
opts = message;
} else {
opts.message = message;
}
opts.plugin = plugin;
return defaults(opts);
}
/**
* Extend default options with:
*
* - `showStack`: default=false
* - `showProperties`: default=true
*
* @param {Object} `opts` Options to extend
* @return {Object}
*/
function defaults(opts) {
return extend({
showStack: false,
showProperties: true,
}, opts);
}
/**
* Expose `PluginError`
*/
module.exports = PluginError;

View file

@ -0,0 +1,51 @@
{
"name": "plugin-error",
"version": "1.0.1",
"description": "Error handling for Vinyl plugins.",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"contributors": [
"Jon Schlinkert <jon.schlinkert@sellside.com>",
"Blaine Bublitz <blaine.bublitz@gmail.com>"
],
"repository": "gulpjs/plugin-error",
"license": "MIT",
"engines": {
"node": ">= 0.10"
},
"main": "index.js",
"files": [
"LICENSE",
"index.d.ts",
"index.js"
],
"scripts": {
"lint": "eslint . && jscs index.js test/",
"pretest": "npm run lint",
"test": "mocha --async-only && npm run test-types",
"test-types": "tsc -p test/types",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
},
"dependencies": {
"ansi-colors": "^1.0.1",
"arr-diff": "^4.0.0",
"arr-union": "^3.1.0",
"extend-shallow": "^3.0.2"
},
"devDependencies": {
"eslint": "^1.7.3",
"eslint-config-gulp": "^2.0.0",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"jscs": "^2.3.5",
"jscs-preset-gulp": "^1.0.0",
"mocha": "^3.0.0",
"typescript": "^2.6.2"
},
"keywords": [
"error",
"plugin",
"gulp-util"
]
}

View file

@ -1,9 +0,0 @@
# The MIT License (MIT)
**Copyright (c) Rod Vagg (the "Original Author") and additional 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.

View file

@ -1,134 +0,0 @@
# through2
[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
**A tiny wrapper around Node streams.Transform (Streams2/3) to avoid explicit subclassing noise**
Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
```js
fs.createReadStream('ex.txt')
.pipe(through2(function (chunk, enc, callback) {
for (var i = 0; i < chunk.length; i++)
if (chunk[i] == 97)
chunk[i] = 122 // swap 'a' for 'z'
this.push(chunk)
callback()
}))
.pipe(fs.createWriteStream('out.txt'))
.on('finish', () => doSomethingSpecial())
```
Or object streams:
```js
var all = []
fs.createReadStream('data.csv')
.pipe(csv2())
.pipe(through2.obj(function (chunk, enc, callback) {
var data = {
name : chunk[0]
, address : chunk[3]
, phone : chunk[10]
}
this.push(data)
callback()
}))
.on('data', (data) => {
all.push(data)
})
.on('end', () => {
doSomethingSpecial(all)
})
```
Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
## API
<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
### options
The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
```js
fs.createReadStream('/tmp/important.dat')
.pipe(through2({ objectMode: true, allowHalfOpen: false },
(chunk, enc, cb) => {
cb(null, 'wut?') // note we can use the second argument on the callback
// to provide data as an alternative to this.push('wut?')
}
)
.pipe(fs.createWriteStream('/tmp/wut.txt'))
```
### transformFunction
The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
### flushFunction
The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
```js
fs.createReadStream('/tmp/important.dat')
.pipe(through2(
(chunk, enc, cb) => cb(null, chunk), // transform is a noop
function (cb) { // flush function
this.push('tacking on an extra buffer to the end');
cb();
}
))
.pipe(fs.createWriteStream('/tmp/wut.txt'));
```
<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
```js
var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
if (record.temp != null && record.unit == "F") {
record.temp = ( ( record.temp - 32 ) * 5 ) / 9
record.unit = "C"
}
this.push(record)
callback()
})
// Create instances of FToC like so:
var converter = new FToC()
// Or:
var converter = FToC()
// Or specify/override options when you instantiate, if you prefer:
var converter = FToC({objectMode: true})
```
## See Also
- [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
- [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
- [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
- [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
- the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
## License
**through2** is Copyright (c) Rod Vagg [@rvagg](https://twitter.com/rvagg) and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.

View file

@ -1,69 +0,0 @@
{
"_args": [
[
"through2@2.0.5",
"F:\\laragon\\www\\wishthis"
]
],
"_from": "through2@2.0.5",
"_id": "through2@2.0.5",
"_inBundle": false,
"_integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"_location": "/gulp-rtlcss/through2",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "through2@2.0.5",
"name": "through2",
"escapedName": "through2",
"rawSpec": "2.0.5",
"saveSpec": null,
"fetchSpec": "2.0.5"
},
"_requiredBy": [
"/gulp-rtlcss"
],
"_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
"_spec": "2.0.5",
"_where": "F:\\laragon\\www\\wishthis",
"author": {
"name": "Rod Vagg",
"email": "r@va.gg",
"url": "https://github.com/rvagg"
},
"bugs": {
"url": "https://github.com/rvagg/through2/issues"
},
"dependencies": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
},
"description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
"devDependencies": {
"bl": "~2.0.1",
"faucet": "0.0.1",
"nyc": "~13.1.0",
"safe-buffer": "~5.1.2",
"stream-spigot": "~3.0.6",
"tape": "~4.9.1"
},
"homepage": "https://github.com/rvagg/through2#readme",
"keywords": [
"stream",
"streams2",
"through",
"transform"
],
"license": "MIT",
"main": "through2.js",
"name": "through2",
"repository": {
"type": "git",
"url": "git+https://github.com/rvagg/through2.git"
},
"scripts": {
"test": "node test/test.js | faucet"
},
"version": "2.0.5"
}

View file

@ -1,96 +0,0 @@
var Transform = require('readable-stream').Transform
, inherits = require('util').inherits
, xtend = require('xtend')
function DestroyableTransform(opts) {
Transform.call(this, opts)
this._destroyed = false
}
inherits(DestroyableTransform, Transform)
DestroyableTransform.prototype.destroy = function(err) {
if (this._destroyed) return
this._destroyed = true
var self = this
process.nextTick(function() {
if (err)
self.emit('error', err)
self.emit('close')
})
}
// a noop _transform function
function noop (chunk, enc, callback) {
callback(null, chunk)
}
// create a new export function, used by both the main export and
// the .ctor export, contains common logic for dealing with arguments
function through2 (construct) {
return function (options, transform, flush) {
if (typeof options == 'function') {
flush = transform
transform = options
options = {}
}
if (typeof transform != 'function')
transform = noop
if (typeof flush != 'function')
flush = null
return construct(options, transform, flush)
}
}
// main export, just make me a transform stream!
module.exports = through2(function (options, transform, flush) {
var t2 = new DestroyableTransform(options)
t2._transform = transform
if (flush)
t2._flush = flush
return t2
})
// make me a reusable prototype that I can `new`, or implicitly `new`
// with a constructor call
module.exports.ctor = through2(function (options, transform, flush) {
function Through2 (override) {
if (!(this instanceof Through2))
return new Through2(override)
this.options = xtend(options, override)
DestroyableTransform.call(this, this.options)
}
inherits(Through2, DestroyableTransform)
Through2.prototype._transform = transform
if (flush)
Through2.prototype._flush = flush
return Through2
})
module.exports.obj = through2(function (options, transform, flush) {
var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
t2._transform = transform
if (flush)
t2._flush = flush
return t2
})