Initial
This commit is contained in:
21
Client/node_modules/vinyl-sourcemap/LICENSE
generated
vendored
Executable file
21
Client/node_modules/vinyl-sourcemap/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors (Based on code from gulp-sourcemaps - ISC License - Copyright (c) 2014, Florian Reiterer)
|
||||
|
||||
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.
|
||||
79
Client/node_modules/vinyl-sourcemap/README.md
generated
vendored
Executable file
79
Client/node_modules/vinyl-sourcemap/README.md
generated
vendored
Executable file
@@ -0,0 +1,79 @@
|
||||
<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>
|
||||
|
||||
# vinyl-sourcemap
|
||||
|
||||
[![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]
|
||||
|
||||
Add/write sourcemaps to/from Vinyl files.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
sourcemap.add(file, function(err, updatedFile) {
|
||||
// updatedFile will have a .sourceMap property
|
||||
});
|
||||
|
||||
// The 2nd argument can be given as a path string
|
||||
sourcemap.write(file, './maps', function(err, updatedFile, sourcemapFile) {
|
||||
// sourcemapFile will be a Vinyl file to be written to some location
|
||||
// updatedFile will have the .contents property updated with a sourceMappingURL that resolves to sourcemapFile
|
||||
});
|
||||
|
||||
// If not defined, the sourcemap is inlined
|
||||
sourcemap.write(file, function(err, updatedFile, sourcemapFile) {
|
||||
// sourcemapFile is undefined
|
||||
// updatedFile will have the .contents property updated with a sourceMappingURL that is an inlined sourcemap
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `sourcemap.add(file, callback)`
|
||||
|
||||
Takes a [Vinyl][vinyl] `file` object and a `callback` function. It attempts to parse an inline sourcemap or load an external sourcemap for the file. If a valid sourcemap is found, the `sources` & `sourcesContent` properties are resolved to actual files (if possible) and a fully resolved sourcemap is attached as `file.sourceMap`. If a sourcemap is not found, a stub sourcemap is generated for the file and attached as `file.sourceMap`.
|
||||
|
||||
Once all resolution is complete, the `callback(err, updatedFile)` is called with the `updatedFile`. If an error occurs, it will be passed as `err` and `updatedFile` will be undefined. __Note:__ The original file is mutated but `updatedFile` is passed to the callback as a convenience.
|
||||
|
||||
If the `file` is not a Vinyl object or the contents are streaming, an Error will be passed to the `callback`.
|
||||
|
||||
If the `file` has a `.sourceMap` property or the contents are null, the `callback` will be called immediately without mutation to the file.
|
||||
|
||||
All filesystem operations are optional & non-fatal so any errors will not be bubbled to the `callback`.
|
||||
|
||||
### `sourcemap.write(file, [outputPath,] callback)`
|
||||
|
||||
Takes a [Vinyl][vinyl] `file` object, (optionally) an `outputPath` string and a `callback` function.
|
||||
|
||||
If `outputPath` is not passed, an inline sourcemap will be generated from the `file.sourceMap` property and appended to the `file.contents`. Once the inline sourcemap is appended, the `callback(err, updatedFile)` is called with the `updatedFile`. If an error occurs, it will be passed as `err` and `updatedFile` will be undefined. __Note:__ The original file is mutated but `updatedFile` is passed to the callback as a convenience.
|
||||
|
||||
If `outputPath` is passed, a new Vinyl file will be generated using `file.cwd` and `file.base` from the original file, the path to the external sourcemap, and the `file.sourceMap` (as contents). The external location will be appended to the `file.contents` of the original file. Once the new file is created and location appended, the `callback(err, updatedFile, sourcemapFile)` is called with the `updatedFile` and the `sourcemapFile`. If an error occurs, it will be passed as `err` and `updatedFile`/`sourcemapFile` will be undefined. __Note:__ The original file is mutated but `updatedFile` is passed to the callback as a convenience.
|
||||
|
||||
If the `file` is not a Vinyl object or the contents are streaming, an Error will be passed to the `callback`.
|
||||
|
||||
If the `file` doesn't have a `.sourceMap` property or the contents are null, the `callback` will be called immediately without mutation to the file.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[vinyl]: https://github.com/gulpjs/vinyl
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/vinyl-sourcemap.svg
|
||||
[npm-url]: https://npmjs.com/package/vinyl-sourcemap
|
||||
[npm-image]: http://img.shields.io/npm/v/vinyl-sourcemap.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/vinyl-sourcemap
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/vinyl-sourcemap.svg?label=travis-ci
|
||||
|
||||
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/vinyl-sourcemap
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/vinyl-sourcemap.svg?label=appveyor
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl-sourcemap
|
||||
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/vinyl-sourcemap/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.png
|
||||
66
Client/node_modules/vinyl-sourcemap/index.js
generated
vendored
Executable file
66
Client/node_modules/vinyl-sourcemap/index.js
generated
vendored
Executable file
@@ -0,0 +1,66 @@
|
||||
'use strict';
|
||||
|
||||
var File = require('vinyl');
|
||||
|
||||
var helpers = require('./lib/helpers');
|
||||
|
||||
var PLUGIN_NAME = 'vinyl-sourcemap';
|
||||
|
||||
function add(file, callback) {
|
||||
|
||||
// Bail early an error if the file argument is not a Vinyl file
|
||||
if (!File.isVinyl(file)) {
|
||||
return callback(new Error(PLUGIN_NAME + '-add: Not a vinyl file'));
|
||||
}
|
||||
|
||||
// Bail early with an error if file has streaming contents
|
||||
if (file.isStream()) {
|
||||
return callback(new Error(PLUGIN_NAME + '-add: Streaming not supported'));
|
||||
}
|
||||
|
||||
// Bail early successfully if file is null or already has a sourcemap
|
||||
if (file.isNull() || file.sourceMap) {
|
||||
return callback(null, file);
|
||||
}
|
||||
|
||||
var state = {
|
||||
path: '', // Root path for the sources in the map
|
||||
map: null,
|
||||
content: file.contents.toString(),
|
||||
// TODO: handle this?
|
||||
preExistingComment: null,
|
||||
};
|
||||
|
||||
helpers.addSourceMaps(file, state, callback);
|
||||
}
|
||||
|
||||
function write(file, destPath, callback) {
|
||||
|
||||
// Check if options or a callback are passed as second argument
|
||||
if (typeof destPath === 'function') {
|
||||
callback = destPath;
|
||||
destPath = undefined;
|
||||
}
|
||||
|
||||
// Bail early with an error if the file argument is not a Vinyl file
|
||||
if (!File.isVinyl(file)) {
|
||||
return callback(new Error(PLUGIN_NAME + '-write: Not a vinyl file'));
|
||||
}
|
||||
|
||||
// Bail early with an error if file has streaming contents
|
||||
if (file.isStream()) {
|
||||
return callback(new Error(PLUGIN_NAME + '-write: Streaming not supported'));
|
||||
}
|
||||
|
||||
// Bail early successfully if file is null or doesn't have sourcemap
|
||||
if (file.isNull() || !file.sourceMap) {
|
||||
return callback(null, file);
|
||||
}
|
||||
|
||||
helpers.writeSourceMaps(file, destPath, callback);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
add: add,
|
||||
write: write,
|
||||
};
|
||||
243
Client/node_modules/vinyl-sourcemap/lib/helpers.js
generated
vendored
Executable file
243
Client/node_modules/vinyl-sourcemap/lib/helpers.js
generated
vendored
Executable file
@@ -0,0 +1,243 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
|
||||
var fs = require('graceful-fs');
|
||||
var nal = require('now-and-later');
|
||||
var File = require('vinyl');
|
||||
var convert = require('convert-source-map');
|
||||
var removeBOM = require('remove-bom-buffer');
|
||||
var appendBuffer = require('append-buffer');
|
||||
var normalizePath = require('normalize-path');
|
||||
|
||||
var urlRegex = /^(https?|webpack(-[^:]+)?):\/\//;
|
||||
|
||||
function isRemoteSource(source) {
|
||||
return source.match(urlRegex);
|
||||
}
|
||||
|
||||
function parse(data) {
|
||||
try {
|
||||
return JSON.parse(removeBOM(data));
|
||||
} catch (err) {
|
||||
// TODO: should this log a debug?
|
||||
}
|
||||
}
|
||||
|
||||
function loadSourceMap(file, state, callback) {
|
||||
// Try to read inline source map
|
||||
state.map = convert.fromSource(state.content);
|
||||
|
||||
if (state.map) {
|
||||
state.map = state.map.toObject();
|
||||
// Sources in map are relative to the source file
|
||||
state.path = file.dirname;
|
||||
state.content = convert.removeComments(state.content);
|
||||
// Remove source map comment from source
|
||||
file.contents = new Buffer(state.content, 'utf8');
|
||||
return callback();
|
||||
}
|
||||
|
||||
// Look for source map comment referencing a source map file
|
||||
var mapComment = convert.mapFileCommentRegex.exec(state.content);
|
||||
|
||||
var mapFile;
|
||||
if (mapComment) {
|
||||
mapFile = path.resolve(file.dirname, mapComment[1] || mapComment[2]);
|
||||
state.content = convert.removeMapFileComments(state.content);
|
||||
// Remove source map comment from source
|
||||
file.contents = new Buffer(state.content, 'utf8');
|
||||
} else {
|
||||
// If no comment try map file with same name as source file
|
||||
mapFile = file.path + '.map';
|
||||
}
|
||||
|
||||
// Sources in external map are relative to map file
|
||||
state.path = path.dirname(mapFile);
|
||||
|
||||
fs.readFile(mapFile, onRead);
|
||||
|
||||
function onRead(err, data) {
|
||||
if (err) {
|
||||
return callback();
|
||||
}
|
||||
state.map = parse(data);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
// Fix source paths and sourceContent for imported source map
|
||||
function fixImportedSourceMap(file, state, callback) {
|
||||
if (!state.map) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
state.map.sourcesContent = state.map.sourcesContent || [];
|
||||
|
||||
nal.map(state.map.sources, normalizeSourcesAndContent, callback);
|
||||
|
||||
function assignSourcesContent(sourceContent, idx) {
|
||||
state.map.sourcesContent[idx] = sourceContent;
|
||||
}
|
||||
|
||||
function normalizeSourcesAndContent(sourcePath, idx, cb) {
|
||||
var sourceRoot = state.map.sourceRoot || '';
|
||||
var sourceContent = state.map.sourcesContent[idx] || null;
|
||||
|
||||
if (isRemoteSource(sourcePath)) {
|
||||
assignSourcesContent(sourceContent, idx);
|
||||
return cb();
|
||||
}
|
||||
|
||||
if (state.map.sourcesContent[idx]) {
|
||||
return cb();
|
||||
}
|
||||
|
||||
if (sourceRoot && isRemoteSource(sourceRoot)) {
|
||||
assignSourcesContent(sourceContent, idx);
|
||||
return cb();
|
||||
}
|
||||
|
||||
var basePath = path.resolve(file.base, sourceRoot);
|
||||
var absPath = path.resolve(state.path, sourceRoot, sourcePath);
|
||||
var relPath = path.relative(basePath, absPath);
|
||||
var unixRelPath = normalizePath(relPath);
|
||||
|
||||
state.map.sources[idx] = unixRelPath;
|
||||
|
||||
if (absPath !== file.path) {
|
||||
// Load content from file async
|
||||
return fs.readFile(absPath, onRead);
|
||||
}
|
||||
|
||||
// If current file: use content
|
||||
assignSourcesContent(state.content, idx);
|
||||
cb();
|
||||
|
||||
function onRead(err, data) {
|
||||
if (err) {
|
||||
assignSourcesContent(null, idx);
|
||||
return cb();
|
||||
}
|
||||
assignSourcesContent(removeBOM(data).toString('utf8'), idx);
|
||||
cb();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mapsLoaded(file, state, callback) {
|
||||
|
||||
if (!state.map) {
|
||||
state.map = {
|
||||
version: 3,
|
||||
names: [],
|
||||
mappings: '',
|
||||
sources: [normalizePath(file.relative)],
|
||||
sourcesContent: [state.content],
|
||||
};
|
||||
}
|
||||
|
||||
state.map.file = normalizePath(file.relative);
|
||||
file.sourceMap = state.map;
|
||||
|
||||
callback();
|
||||
}
|
||||
|
||||
function addSourceMaps(file, state, callback) {
|
||||
var tasks = [
|
||||
loadSourceMap,
|
||||
fixImportedSourceMap,
|
||||
mapsLoaded,
|
||||
];
|
||||
|
||||
function apply(fn, key, cb) {
|
||||
fn(file, state, cb);
|
||||
}
|
||||
|
||||
nal.mapSeries(tasks, apply, done);
|
||||
|
||||
function done() {
|
||||
callback(null, file);
|
||||
}
|
||||
}
|
||||
|
||||
/* Write Helpers */
|
||||
function createSourceMapFile(opts) {
|
||||
return new File({
|
||||
cwd: opts.cwd,
|
||||
base: opts.base,
|
||||
path: opts.path,
|
||||
contents: new Buffer(JSON.stringify(opts.content)),
|
||||
stat: {
|
||||
isFile: function() {
|
||||
return true;
|
||||
},
|
||||
isDirectory: function() {
|
||||
return false;
|
||||
},
|
||||
isBlockDevice: function() {
|
||||
return false;
|
||||
},
|
||||
isCharacterDevice: function() {
|
||||
return false;
|
||||
},
|
||||
isSymbolicLink: function() {
|
||||
return false;
|
||||
},
|
||||
isFIFO: function() {
|
||||
return false;
|
||||
},
|
||||
isSocket: function() {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
var needsMultiline = ['.css'];
|
||||
|
||||
function getCommentOptions(extname) {
|
||||
var opts = {
|
||||
multiline: (needsMultiline.indexOf(extname) !== -1),
|
||||
};
|
||||
|
||||
return opts;
|
||||
}
|
||||
|
||||
function writeSourceMaps(file, destPath, callback) {
|
||||
var sourceMapFile;
|
||||
var commentOpts = getCommentOptions(file.extname);
|
||||
|
||||
var comment;
|
||||
if (destPath == null) {
|
||||
// Encode source map into comment
|
||||
comment = convert.fromObject(file.sourceMap).toComment(commentOpts);
|
||||
} else {
|
||||
var mapFile = path.join(destPath, file.relative) + '.map';
|
||||
var sourceMapPath = path.join(file.base, mapFile);
|
||||
|
||||
// Create new sourcemap File
|
||||
sourceMapFile = createSourceMapFile({
|
||||
cwd: file.cwd,
|
||||
base: file.base,
|
||||
path: sourceMapPath,
|
||||
content: file.sourceMap,
|
||||
});
|
||||
|
||||
var sourcemapLocation = path.relative(file.dirname, sourceMapPath);
|
||||
|
||||
sourcemapLocation = normalizePath(sourcemapLocation);
|
||||
|
||||
comment = convert.generateMapFileComment(sourcemapLocation, commentOpts);
|
||||
}
|
||||
|
||||
// Append source map comment
|
||||
file.contents = appendBuffer(file.contents, comment);
|
||||
|
||||
callback(null, file, sourceMapFile);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addSourceMaps: addSourceMaps,
|
||||
writeSourceMaps: writeSourceMaps,
|
||||
};
|
||||
21
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/LICENSE.md
generated
vendored
Executable file
21
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/LICENSE.md
generated
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
## The MIT License (MIT) ##
|
||||
|
||||
Copyright (c) 2014 Hugh Kennedy
|
||||
|
||||
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.
|
||||
17
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/README.md
generated
vendored
Executable file
17
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/README.md
generated
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
# clone-stats [](https://flattr.com/submit/auto?user_id=hughskennedy&url=http://github.com/hughsk/clone-stats&title=clone-stats&description=hughsk/clone-stats%20on%20GitHub&language=en_GB&tags=flattr,github,javascript&category=software)[](http://github.com/hughsk/stability-badges) #
|
||||
|
||||
Safely clone node's
|
||||
[`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) instances without
|
||||
losing their class methods, i.e. `stat.isDirectory()` and co.
|
||||
|
||||
## Usage ##
|
||||
|
||||
[](https://nodei.co/npm/clone-stats)
|
||||
|
||||
### `copy = require('clone-stats')(stat)` ###
|
||||
|
||||
Returns a clone of the original `fs.Stats` instance (`stat`).
|
||||
|
||||
## License ##
|
||||
|
||||
MIT. See [LICENSE.md](http://github.com/hughsk/clone-stats/blob/master/LICENSE.md) for details.
|
||||
13
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/index.js
generated
vendored
Executable file
13
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/index.js
generated
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
var Stat = require('fs').Stats
|
||||
|
||||
module.exports = cloneStats
|
||||
|
||||
function cloneStats(stats) {
|
||||
var replacement = new Stat
|
||||
|
||||
Object.keys(stats).forEach(function(key) {
|
||||
replacement[key] = stats[key]
|
||||
})
|
||||
|
||||
return replacement
|
||||
}
|
||||
60
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/package.json
generated
vendored
Executable file
60
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/package.json
generated
vendored
Executable file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"_from": "clone-stats@^1.0.0",
|
||||
"_id": "clone-stats@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
|
||||
"_location": "/vinyl-sourcemap/clone-stats",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "clone-stats@^1.0.0",
|
||||
"name": "clone-stats",
|
||||
"escapedName": "clone-stats",
|
||||
"rawSpec": "^1.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/vinyl-sourcemap/vinyl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
|
||||
"_shasum": "b3782dff8bb5474e18b9b6bf0fdfe782f8777680",
|
||||
"_spec": "clone-stats@^1.0.0",
|
||||
"_where": "/home/nathan/Projects/Upsilon/UpsilonVsCodeLanguageServer/Client/node_modules/vinyl-sourcemap/node_modules/vinyl",
|
||||
"author": {
|
||||
"name": "Hugh Kennedy",
|
||||
"email": "hughskennedy@gmail.com",
|
||||
"url": "http://hughsk.io/"
|
||||
},
|
||||
"browser": "index.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/hughsk/clone-stats/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "Safely clone node's fs.Stats instances without losing their class methods",
|
||||
"devDependencies": {
|
||||
"tape": "~2.3.2"
|
||||
},
|
||||
"homepage": "https://github.com/hughsk/clone-stats",
|
||||
"keywords": [
|
||||
"stats",
|
||||
"fs",
|
||||
"clone",
|
||||
"copy",
|
||||
"prototype"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "clone-stats",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/hughsk/clone-stats.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
||||
36
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/test.js
generated
vendored
Executable file
36
Client/node_modules/vinyl-sourcemap/node_modules/clone-stats/test.js
generated
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
var test = require('tape')
|
||||
var clone = require('./')
|
||||
var fs = require('fs')
|
||||
|
||||
test('file', function(t) {
|
||||
compare(t, fs.statSync(__filename))
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('directory', function(t) {
|
||||
compare(t, fs.statSync(__dirname))
|
||||
t.end()
|
||||
})
|
||||
|
||||
function compare(t, stat) {
|
||||
var copy = clone(stat)
|
||||
|
||||
t.deepEqual(stat, copy, 'clone has equal properties')
|
||||
t.ok(stat instanceof fs.Stats, 'original is an fs.Stat')
|
||||
t.ok(copy instanceof fs.Stats, 'copy is an fs.Stat')
|
||||
|
||||
;['isDirectory'
|
||||
, 'isFile'
|
||||
, 'isBlockDevice'
|
||||
, 'isCharacterDevice'
|
||||
, 'isSymbolicLink'
|
||||
, 'isFIFO'
|
||||
, 'isSocket'
|
||||
].forEach(function(method) {
|
||||
t.equal(
|
||||
stat[method].call(stat)
|
||||
, copy[method].call(copy)
|
||||
, 'equal value for stat.' + method + '()'
|
||||
)
|
||||
})
|
||||
}
|
||||
4
Client/node_modules/vinyl-sourcemap/node_modules/clone/.npmignore
generated
vendored
Executable file
4
Client/node_modules/vinyl-sourcemap/node_modules/clone/.npmignore
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
/node_modules/
|
||||
/test.js
|
||||
/.travis.yml
|
||||
*.html
|
||||
18
Client/node_modules/vinyl-sourcemap/node_modules/clone/LICENSE
generated
vendored
Executable file
18
Client/node_modules/vinyl-sourcemap/node_modules/clone/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch>
|
||||
|
||||
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, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
194
Client/node_modules/vinyl-sourcemap/node_modules/clone/README.md
generated
vendored
Executable file
194
Client/node_modules/vinyl-sourcemap/node_modules/clone/README.md
generated
vendored
Executable file
@@ -0,0 +1,194 @@
|
||||
# clone
|
||||
|
||||
[](http://travis-ci.org/pvorb/clone) [](http://npm-stat.com/charts.html?package=clone)
|
||||
|
||||
offers foolproof _deep cloning_ of objects, arrays, numbers, strings, maps,
|
||||
sets, promises, etc. in JavaScript.
|
||||
|
||||
**XSS vulnerability detected**
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
npm install clone
|
||||
|
||||
(It also works with browserify, ender or standalone. You may want to use the
|
||||
option `noParse` in browserify to reduce the resulting file size, since usually
|
||||
`Buffer`s are not needed in browsers.)
|
||||
|
||||
|
||||
## Example
|
||||
|
||||
~~~ javascript
|
||||
var clone = require('clone');
|
||||
|
||||
var a, b;
|
||||
|
||||
a = { foo: { bar: 'baz' } }; // initial value of a
|
||||
|
||||
b = clone(a); // clone a -> b
|
||||
a.foo.bar = 'foo'; // change a
|
||||
|
||||
console.log(a); // show a
|
||||
console.log(b); // show b
|
||||
~~~
|
||||
|
||||
This will print:
|
||||
|
||||
~~~ javascript
|
||||
{ foo: { bar: 'foo' } }
|
||||
{ foo: { bar: 'baz' } }
|
||||
~~~
|
||||
|
||||
**clone** masters cloning simple objects (even with custom prototype), arrays,
|
||||
Date objects, and RegExp objects. Everything is cloned recursively, so that you
|
||||
can clone dates in arrays in objects, for example.
|
||||
|
||||
|
||||
## API
|
||||
|
||||
`clone(val, circular, depth)`
|
||||
|
||||
* `val` -- the value that you want to clone, any type allowed
|
||||
* `circular` -- boolean
|
||||
|
||||
Call `clone` with `circular` set to `false` if you are certain that `obj`
|
||||
contains no circular references. This will give better performance if
|
||||
needed. There is no error if `undefined` or `null` is passed as `obj`.
|
||||
* `depth` -- depth to which the object is to be cloned (optional,
|
||||
defaults to infinity)
|
||||
* `prototype` -- sets the prototype to be used when cloning an object.
|
||||
(optional, defaults to parent prototype).
|
||||
* `includeNonEnumerable` -- set to `true` if the non-enumerable properties
|
||||
should be cloned as well. Non-enumerable properties on the prototype chain
|
||||
will be ignored. (optional, defaults to `false`)
|
||||
|
||||
`clone.clonePrototype(obj)`
|
||||
|
||||
* `obj` -- the object that you want to clone
|
||||
|
||||
Does a prototype clone as
|
||||
[described by Oran Looney](http://oranlooney.com/functional-javascript/).
|
||||
|
||||
|
||||
## Circular References
|
||||
|
||||
~~~ javascript
|
||||
var a, b;
|
||||
|
||||
a = { hello: 'world' };
|
||||
|
||||
a.myself = a;
|
||||
b = clone(a);
|
||||
|
||||
console.log(b);
|
||||
~~~
|
||||
|
||||
This will print:
|
||||
|
||||
~~~ javascript
|
||||
{ hello: "world", myself: [Circular] }
|
||||
~~~
|
||||
|
||||
So, `b.myself` points to `b`, not `a`. Neat!
|
||||
|
||||
|
||||
## Test
|
||||
|
||||
npm test
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### v2.1.2
|
||||
|
||||
#### 2018-03-21
|
||||
|
||||
- Use `Buffer.allocUnsafe()` on Node >= 4.5.0 (contributed by @ChALkeR)
|
||||
|
||||
### v2.1.1
|
||||
|
||||
#### 2017-03-09
|
||||
|
||||
- Fix build badge in README
|
||||
- Add support for cloning Maps and Sets on Internet Explorer
|
||||
|
||||
### v2.1.0
|
||||
|
||||
#### 2016-11-22
|
||||
|
||||
- Add support for cloning Errors
|
||||
- Exclude non-enumerable symbol-named object properties from cloning
|
||||
- Add option to include non-enumerable own properties of objects
|
||||
|
||||
### v2.0.0
|
||||
|
||||
#### 2016-09-28
|
||||
|
||||
- Add support for cloning ES6 Maps, Sets, Promises, and Symbols
|
||||
|
||||
### v1.0.3
|
||||
|
||||
#### 2017-11-08
|
||||
|
||||
- Close XSS vulnerability in the NPM package, which included the file
|
||||
`test-apart-ctx.html`. This vulnerability was disclosed by Juho Nurminen of
|
||||
2NS - Second Nature Security.
|
||||
|
||||
### v1.0.2 (deprecated)
|
||||
|
||||
#### 2015-03-25
|
||||
|
||||
- Fix call on getRegExpFlags
|
||||
- Refactor utilities
|
||||
- Refactor test suite
|
||||
|
||||
### v1.0.1 (deprecated)
|
||||
|
||||
#### 2015-03-04
|
||||
|
||||
- Fix nodeunit version
|
||||
- Directly call getRegExpFlags
|
||||
|
||||
### v1.0.0 (deprecated)
|
||||
|
||||
#### 2015-02-10
|
||||
|
||||
- Improve browser support
|
||||
- Improve browser testability
|
||||
- Move helper methods to private namespace
|
||||
|
||||
## Caveat
|
||||
|
||||
Some special objects like a socket or `process.stdout`/`stderr` are known to not
|
||||
be cloneable. If you find other objects that cannot be cloned, please [open an
|
||||
issue](https://github.com/pvorb/clone/issues/new).
|
||||
|
||||
|
||||
## Bugs and Issues
|
||||
|
||||
If you encounter any bugs or issues, feel free to [open an issue at
|
||||
github](https://github.com/pvorb/clone/issues) or send me an email to
|
||||
<paul@vorba.ch>. I also always like to hear from you, if you’re using my code.
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2011-2016 [Paul Vorbach](https://paul.vorba.ch/) and
|
||||
[contributors](https://github.com/pvorb/clone/graphs/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, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
10
Client/node_modules/vinyl-sourcemap/node_modules/clone/clone.iml
generated
vendored
Executable file
10
Client/node_modules/vinyl-sourcemap/node_modules/clone/clone.iml
generated
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="clone node_modules" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
257
Client/node_modules/vinyl-sourcemap/node_modules/clone/clone.js
generated
vendored
Executable file
257
Client/node_modules/vinyl-sourcemap/node_modules/clone/clone.js
generated
vendored
Executable file
@@ -0,0 +1,257 @@
|
||||
var clone = (function() {
|
||||
'use strict';
|
||||
|
||||
function _instanceof(obj, type) {
|
||||
return type != null && obj instanceof type;
|
||||
}
|
||||
|
||||
var nativeMap;
|
||||
try {
|
||||
nativeMap = Map;
|
||||
} catch(_) {
|
||||
// maybe a reference error because no `Map`. Give it a dummy value that no
|
||||
// value will ever be an instanceof.
|
||||
nativeMap = function() {};
|
||||
}
|
||||
|
||||
var nativeSet;
|
||||
try {
|
||||
nativeSet = Set;
|
||||
} catch(_) {
|
||||
nativeSet = function() {};
|
||||
}
|
||||
|
||||
var nativePromise;
|
||||
try {
|
||||
nativePromise = Promise;
|
||||
} catch(_) {
|
||||
nativePromise = function() {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Clones (copies) an Object using deep copying.
|
||||
*
|
||||
* This function supports circular references by default, but if you are certain
|
||||
* there are no circular references in your object, you can save some CPU time
|
||||
* by calling clone(obj, false).
|
||||
*
|
||||
* Caution: if `circular` is false and `parent` contains circular references,
|
||||
* your program may enter an infinite loop and crash.
|
||||
*
|
||||
* @param `parent` - the object to be cloned
|
||||
* @param `circular` - set to true if the object to be cloned may contain
|
||||
* circular references. (optional - true by default)
|
||||
* @param `depth` - set to a number if the object is only to be cloned to
|
||||
* a particular depth. (optional - defaults to Infinity)
|
||||
* @param `prototype` - sets the prototype to be used when cloning an object.
|
||||
* (optional - defaults to parent prototype).
|
||||
* @param `includeNonEnumerable` - set to true if the non-enumerable properties
|
||||
* should be cloned as well. Non-enumerable properties on the prototype
|
||||
* chain will be ignored. (optional - false by default)
|
||||
*/
|
||||
function clone(parent, circular, depth, prototype, includeNonEnumerable) {
|
||||
if (typeof circular === 'object') {
|
||||
depth = circular.depth;
|
||||
prototype = circular.prototype;
|
||||
includeNonEnumerable = circular.includeNonEnumerable;
|
||||
circular = circular.circular;
|
||||
}
|
||||
// maintain two arrays for circular references, where corresponding parents
|
||||
// and children have the same index
|
||||
var allParents = [];
|
||||
var allChildren = [];
|
||||
|
||||
var useBuffer = typeof Buffer != 'undefined';
|
||||
|
||||
if (typeof circular == 'undefined')
|
||||
circular = true;
|
||||
|
||||
if (typeof depth == 'undefined')
|
||||
depth = Infinity;
|
||||
|
||||
// recurse this function so we don't reset allParents and allChildren
|
||||
function _clone(parent, depth) {
|
||||
// cloning null always returns null
|
||||
if (parent === null)
|
||||
return null;
|
||||
|
||||
if (depth === 0)
|
||||
return parent;
|
||||
|
||||
var child;
|
||||
var proto;
|
||||
if (typeof parent != 'object') {
|
||||
return parent;
|
||||
}
|
||||
|
||||
if (_instanceof(parent, nativeMap)) {
|
||||
child = new nativeMap();
|
||||
} else if (_instanceof(parent, nativeSet)) {
|
||||
child = new nativeSet();
|
||||
} else if (_instanceof(parent, nativePromise)) {
|
||||
child = new nativePromise(function (resolve, reject) {
|
||||
parent.then(function(value) {
|
||||
resolve(_clone(value, depth - 1));
|
||||
}, function(err) {
|
||||
reject(_clone(err, depth - 1));
|
||||
});
|
||||
});
|
||||
} else if (clone.__isArray(parent)) {
|
||||
child = [];
|
||||
} else if (clone.__isRegExp(parent)) {
|
||||
child = new RegExp(parent.source, __getRegExpFlags(parent));
|
||||
if (parent.lastIndex) child.lastIndex = parent.lastIndex;
|
||||
} else if (clone.__isDate(parent)) {
|
||||
child = new Date(parent.getTime());
|
||||
} else if (useBuffer && Buffer.isBuffer(parent)) {
|
||||
if (Buffer.allocUnsafe) {
|
||||
// Node.js >= 4.5.0
|
||||
child = Buffer.allocUnsafe(parent.length);
|
||||
} else {
|
||||
// Older Node.js versions
|
||||
child = new Buffer(parent.length);
|
||||
}
|
||||
parent.copy(child);
|
||||
return child;
|
||||
} else if (_instanceof(parent, Error)) {
|
||||
child = Object.create(parent);
|
||||
} else {
|
||||
if (typeof prototype == 'undefined') {
|
||||
proto = Object.getPrototypeOf(parent);
|
||||
child = Object.create(proto);
|
||||
}
|
||||
else {
|
||||
child = Object.create(prototype);
|
||||
proto = prototype;
|
||||
}
|
||||
}
|
||||
|
||||
if (circular) {
|
||||
var index = allParents.indexOf(parent);
|
||||
|
||||
if (index != -1) {
|
||||
return allChildren[index];
|
||||
}
|
||||
allParents.push(parent);
|
||||
allChildren.push(child);
|
||||
}
|
||||
|
||||
if (_instanceof(parent, nativeMap)) {
|
||||
parent.forEach(function(value, key) {
|
||||
var keyChild = _clone(key, depth - 1);
|
||||
var valueChild = _clone(value, depth - 1);
|
||||
child.set(keyChild, valueChild);
|
||||
});
|
||||
}
|
||||
if (_instanceof(parent, nativeSet)) {
|
||||
parent.forEach(function(value) {
|
||||
var entryChild = _clone(value, depth - 1);
|
||||
child.add(entryChild);
|
||||
});
|
||||
}
|
||||
|
||||
for (var i in parent) {
|
||||
var attrs;
|
||||
if (proto) {
|
||||
attrs = Object.getOwnPropertyDescriptor(proto, i);
|
||||
}
|
||||
|
||||
if (attrs && attrs.set == null) {
|
||||
continue;
|
||||
}
|
||||
child[i] = _clone(parent[i], depth - 1);
|
||||
}
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(parent);
|
||||
for (var i = 0; i < symbols.length; i++) {
|
||||
// Don't need to worry about cloning a symbol because it is a primitive,
|
||||
// like a number or string.
|
||||
var symbol = symbols[i];
|
||||
var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);
|
||||
if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {
|
||||
continue;
|
||||
}
|
||||
child[symbol] = _clone(parent[symbol], depth - 1);
|
||||
if (!descriptor.enumerable) {
|
||||
Object.defineProperty(child, symbol, {
|
||||
enumerable: false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (includeNonEnumerable) {
|
||||
var allPropertyNames = Object.getOwnPropertyNames(parent);
|
||||
for (var i = 0; i < allPropertyNames.length; i++) {
|
||||
var propertyName = allPropertyNames[i];
|
||||
var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);
|
||||
if (descriptor && descriptor.enumerable) {
|
||||
continue;
|
||||
}
|
||||
child[propertyName] = _clone(parent[propertyName], depth - 1);
|
||||
Object.defineProperty(child, propertyName, {
|
||||
enumerable: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return child;
|
||||
}
|
||||
|
||||
return _clone(parent, depth);
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple flat clone using prototype, accepts only objects, usefull for property
|
||||
* override on FLAT configuration object (no nested props).
|
||||
*
|
||||
* USE WITH CAUTION! This may not behave as you wish if you do not know how this
|
||||
* works.
|
||||
*/
|
||||
clone.clonePrototype = function clonePrototype(parent) {
|
||||
if (parent === null)
|
||||
return null;
|
||||
|
||||
var c = function () {};
|
||||
c.prototype = parent;
|
||||
return new c();
|
||||
};
|
||||
|
||||
// private utility functions
|
||||
|
||||
function __objToStr(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
}
|
||||
clone.__objToStr = __objToStr;
|
||||
|
||||
function __isDate(o) {
|
||||
return typeof o === 'object' && __objToStr(o) === '[object Date]';
|
||||
}
|
||||
clone.__isDate = __isDate;
|
||||
|
||||
function __isArray(o) {
|
||||
return typeof o === 'object' && __objToStr(o) === '[object Array]';
|
||||
}
|
||||
clone.__isArray = __isArray;
|
||||
|
||||
function __isRegExp(o) {
|
||||
return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
|
||||
}
|
||||
clone.__isRegExp = __isRegExp;
|
||||
|
||||
function __getRegExpFlags(re) {
|
||||
var flags = '';
|
||||
if (re.global) flags += 'g';
|
||||
if (re.ignoreCase) flags += 'i';
|
||||
if (re.multiline) flags += 'm';
|
||||
return flags;
|
||||
}
|
||||
clone.__getRegExpFlags = __getRegExpFlags;
|
||||
|
||||
return clone;
|
||||
})();
|
||||
|
||||
if (typeof module === 'object' && module.exports) {
|
||||
module.exports = clone;
|
||||
}
|
||||
158
Client/node_modules/vinyl-sourcemap/node_modules/clone/package.json
generated
vendored
Executable file
158
Client/node_modules/vinyl-sourcemap/node_modules/clone/package.json
generated
vendored
Executable file
@@ -0,0 +1,158 @@
|
||||
{
|
||||
"_from": "clone@^2.1.1",
|
||||
"_id": "clone@2.1.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
|
||||
"_location": "/vinyl-sourcemap/clone",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "clone@^2.1.1",
|
||||
"name": "clone",
|
||||
"escapedName": "clone",
|
||||
"rawSpec": "^2.1.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.1.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/vinyl-sourcemap/vinyl"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
|
||||
"_shasum": "1b7f4b9f591f1e8f83670401600345a02887435f",
|
||||
"_spec": "clone@^2.1.1",
|
||||
"_where": "/home/nathan/Projects/Upsilon/UpsilonVsCodeLanguageServer/Client/node_modules/vinyl-sourcemap/node_modules/vinyl",
|
||||
"author": {
|
||||
"name": "Paul Vorbach",
|
||||
"email": "paul@vorba.ch",
|
||||
"url": "http://paul.vorba.ch/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/pvorb/node-clone/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Blake Miner",
|
||||
"email": "miner.blake@gmail.com",
|
||||
"url": "http://www.blakeminer.com/"
|
||||
},
|
||||
{
|
||||
"name": "Tian You",
|
||||
"email": "axqd001@gmail.com",
|
||||
"url": "http://blog.axqd.net/"
|
||||
},
|
||||
{
|
||||
"name": "George Stagas",
|
||||
"email": "gstagas@gmail.com",
|
||||
"url": "http://stagas.com/"
|
||||
},
|
||||
{
|
||||
"name": "Tobiasz Cudnik",
|
||||
"email": "tobiasz.cudnik@gmail.com",
|
||||
"url": "https://github.com/TobiaszCudnik"
|
||||
},
|
||||
{
|
||||
"name": "Pavel Lang",
|
||||
"email": "langpavel@phpskelet.org",
|
||||
"url": "https://github.com/langpavel"
|
||||
},
|
||||
{
|
||||
"name": "Dan MacTough",
|
||||
"url": "http://yabfog.com/"
|
||||
},
|
||||
{
|
||||
"name": "w1nk",
|
||||
"url": "https://github.com/w1nk"
|
||||
},
|
||||
{
|
||||
"name": "Hugh Kennedy",
|
||||
"url": "http://twitter.com/hughskennedy"
|
||||
},
|
||||
{
|
||||
"name": "Dustin Diaz",
|
||||
"url": "http://dustindiaz.com"
|
||||
},
|
||||
{
|
||||
"name": "Ilya Shaisultanov",
|
||||
"url": "https://github.com/diversario"
|
||||
},
|
||||
{
|
||||
"name": "Nathan MacInnes",
|
||||
"email": "nathan@macinn.es",
|
||||
"url": "http://macinn.es/"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin E. Coe",
|
||||
"email": "ben@npmjs.com",
|
||||
"url": "https://twitter.com/benjamincoe"
|
||||
},
|
||||
{
|
||||
"name": "Nathan Zadoks",
|
||||
"url": "https://github.com/nathan7"
|
||||
},
|
||||
{
|
||||
"name": "Róbert Oroszi",
|
||||
"email": "robert+gh@oroszi.net",
|
||||
"url": "https://github.com/oroce"
|
||||
},
|
||||
{
|
||||
"name": "Aurélio A. Heckert",
|
||||
"url": "http://softwarelivre.org/aurium"
|
||||
},
|
||||
{
|
||||
"name": "Guy Ellis",
|
||||
"url": "http://www.guyellisrocks.com/"
|
||||
},
|
||||
{
|
||||
"name": "fscherwi",
|
||||
"url": "https://fscherwi.github.io"
|
||||
},
|
||||
{
|
||||
"name": "rictic",
|
||||
"url": "https://github.com/rictic"
|
||||
},
|
||||
{
|
||||
"name": "Martin Jurča",
|
||||
"url": "https://github.com/jurca"
|
||||
},
|
||||
{
|
||||
"name": "Misery Lee",
|
||||
"email": "miserylee@foxmail.com",
|
||||
"url": "https://github.com/miserylee"
|
||||
},
|
||||
{
|
||||
"name": "Clemens Wolff",
|
||||
"url": "https://github.com/c-w"
|
||||
}
|
||||
],
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "deep cloning of objects and arrays",
|
||||
"devDependencies": {
|
||||
"nodeunit": "~0.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
},
|
||||
"homepage": "https://github.com/pvorb/node-clone#readme",
|
||||
"license": "MIT",
|
||||
"main": "clone.js",
|
||||
"name": "clone",
|
||||
"optionalDependencies": {},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/pvorb/node-clone.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "nodeunit test.js"
|
||||
},
|
||||
"tags": [
|
||||
"clone",
|
||||
"object",
|
||||
"array",
|
||||
"function",
|
||||
"date"
|
||||
],
|
||||
"version": "2.1.2"
|
||||
}
|
||||
21
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/LICENSE
generated
vendored
Executable file
21
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/LICENSE
generated
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 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.
|
||||
446
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/README.md
generated
vendored
Executable file
446
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/README.md
generated
vendored
Executable file
@@ -0,0 +1,446 @@
|
||||
<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>
|
||||
|
||||
# vinyl
|
||||
|
||||
[![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]
|
||||
|
||||
Virtual file format.
|
||||
|
||||
## What is Vinyl?
|
||||
|
||||
Vinyl is a very simple metadata object that describes a file. When you think of a file, two attributes come to mind: `path` and `contents`. These are the main attributes on a Vinyl object. A file does not necessarily represent something on your computer’s file system. You have files on S3, FTP, Dropbox, Box, CloudThingly.io and other services. Vinyl can be used to describe files from all of these sources.
|
||||
|
||||
## What is a Vinyl Adapter?
|
||||
|
||||
While Vinyl provides a clean way to describe a file, we also need a way to access these files. Each file source needs what I call a "Vinyl adapter". A Vinyl adapter simply exposes a `src(globs)` and a `dest(folder)` method. Each return a stream. The `src` stream produces Vinyl objects, and the `dest` stream consumes Vinyl objects. Vinyl adapters can expose extra methods that might be specific to their input/output medium, such as the `symlink` method [`vinyl-fs`][vinyl-fs] provides.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var Vinyl = require('vinyl');
|
||||
|
||||
var jsFile = new Vinyl({
|
||||
cwd: '/',
|
||||
base: '/test/',
|
||||
path: '/test/file.js',
|
||||
contents: new Buffer('var x = 123')
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `new Vinyl([options])`
|
||||
|
||||
The constructor is used to create a new instance of `Vinyl`. Each instance represents a separate file, directory or symlink.
|
||||
|
||||
All internally managed paths (`cwd`, `base`, `path`, `history`) are normalized and have trailing separators removed. See [Normalization and concatenation][normalization] for more information.
|
||||
|
||||
Options may be passed upon instantiation to create a file with specific properties.
|
||||
|
||||
#### `options`
|
||||
|
||||
Options are not mutated by the constructor.
|
||||
|
||||
##### `options.cwd`
|
||||
|
||||
The current working directory of the file.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Default: `process.cwd()`
|
||||
|
||||
##### `options.base`
|
||||
|
||||
Used for calculating the `relative` property. This is typically where a glob starts.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Default: `options.cwd`
|
||||
|
||||
##### `options.path`
|
||||
|
||||
The full path to the file.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Default: `undefined`
|
||||
|
||||
##### `options.history`
|
||||
|
||||
Stores the path history. If `options.path` and `options.history` are both passed, `options.path` is appended to `options.history`. All `options.history` paths are normalized by the `file.path` setter.
|
||||
|
||||
Type: `Array`
|
||||
|
||||
Default: `[]` (or `[options.path]` if `options.path` is passed)
|
||||
|
||||
##### `options.stat`
|
||||
|
||||
The result of an `fs.stat` call. This is how you mark the file as a directory or symbolic link. See [isDirectory()][is-directory], [isSymbolic()][is-symbolic] and [fs.Stats][fs-stats] for more information.
|
||||
|
||||
Type: [`fs.Stats`][fs-stats]
|
||||
|
||||
Default: `undefined`
|
||||
|
||||
##### `options.contents`
|
||||
|
||||
The contents of the file. If `options.contents` is a [`ReadableStream`][readable-stream], it is wrapped in a [`cloneable-readable`][cloneable-readable] stream.
|
||||
|
||||
Type: [`ReadableStream`][readable-stream], [`Buffer`][buffer], or `null`
|
||||
|
||||
Default: `null`
|
||||
|
||||
##### `options.{custom}`
|
||||
|
||||
Any other option properties will be directly assigned to the new Vinyl object.
|
||||
|
||||
```js
|
||||
var Vinyl = require('vinyl');
|
||||
|
||||
var file = new Vinyl({ foo: 'bar' });
|
||||
file.foo === 'bar'; // true
|
||||
```
|
||||
|
||||
### Instance methods
|
||||
|
||||
Each Vinyl object will have instance methods. Every method will be available but may return differently based on what properties were set upon instantiation or modified since.
|
||||
|
||||
#### `file.isBuffer()`
|
||||
|
||||
Returns `true` if the file contents are a [`Buffer`][buffer], otherwise `false`.
|
||||
|
||||
#### `file.isStream()`
|
||||
|
||||
Returns `true` if the file contents are a [`Stream`][stream], otherwise `false`.
|
||||
|
||||
#### `file.isNull()`
|
||||
|
||||
Returns `true` if the file contents are `null`, otherwise `false`.
|
||||
|
||||
#### `file.isDirectory()`
|
||||
|
||||
Returns `true` if the file represents a directory, otherwise `false`.
|
||||
|
||||
A file is considered a directory when:
|
||||
|
||||
- `file.isNull()` is `true`
|
||||
- `file.stat` is an object
|
||||
- `file.stat.isDirectory()` returns `true`
|
||||
|
||||
When constructing a Vinyl object, pass in a valid [`fs.Stats`][fs-stats] object via `options.stat`. If you are mocking the [`fs.Stats`][fs-stats] object, you may need to stub the `isDirectory()` method.
|
||||
|
||||
#### `file.isSymbolic()`
|
||||
|
||||
Returns `true` if the file represents a symbolic link, otherwise `false`.
|
||||
|
||||
A file is considered symbolic when:
|
||||
|
||||
- `file.isNull()` is `true`
|
||||
- `file.stat` is an object
|
||||
- `file.stat.isSymbolicLink()` returns `true`
|
||||
|
||||
When constructing a Vinyl object, pass in a valid [`fs.Stats`][fs-stats] object via `options.stat`. If you are mocking the [`fs.Stats`][fs-stats] object, you may need to stub the `isSymbolicLink()` method.
|
||||
|
||||
#### `file.clone([options])`
|
||||
|
||||
Returns a new Vinyl object with all attributes cloned.
|
||||
|
||||
__By default custom attributes are cloned deeply.__
|
||||
|
||||
If `options` or `options.deep` is `false`, custom attributes will not be cloned deeply.
|
||||
|
||||
If `file.contents` is a [`Buffer`][buffer] and `options.contents` is `false`, the [`Buffer`][buffer] reference will be reused instead of copied.
|
||||
|
||||
#### `file.inspect()`
|
||||
|
||||
Returns a formatted-string interpretation of the Vinyl object. Automatically called by node's `console.log`.
|
||||
|
||||
### Instance properties
|
||||
|
||||
Each Vinyl object will have instance properties. Some may be unavailable based on what properties were set upon instantiation or modified since.
|
||||
|
||||
#### `file.contents`
|
||||
|
||||
Gets and sets the contents of the file. If set to a [`ReadableStream`][readable-stream], it is wrapped in a [`cloneable-readable`][cloneable-readable] stream.
|
||||
|
||||
Throws when set to any value other than a [`ReadableStream`][readable-stream], a [`Buffer`][buffer] or `null`.
|
||||
|
||||
Type: [`ReadableStream`][readable-stream], [`Buffer`][buffer], or `null`
|
||||
|
||||
#### `file.cwd`
|
||||
|
||||
Gets and sets current working directory. Will always be normalized and have trailing separators removed.
|
||||
|
||||
Throws when set to any value other than non-empty strings.
|
||||
|
||||
Type: `String`
|
||||
|
||||
#### `file.base`
|
||||
|
||||
Gets and sets base directory. Used for relative pathing (typically where a glob starts).
|
||||
When `null` or `undefined`, it simply proxies the `file.cwd` property. Will always be normalized and have trailing separators removed.
|
||||
|
||||
Throws when set to any value other than non-empty strings or `null`/`undefined`.
|
||||
|
||||
Type: `String`
|
||||
|
||||
#### `file.path`
|
||||
|
||||
Gets and sets the absolute pathname string or `undefined`. Setting to a different value appends the new path to `file.history`. If set to the same value as the current path, it is ignored. All new values are normalized and have trailing separators removed.
|
||||
|
||||
Throws when set to any value other than a string.
|
||||
|
||||
Type: `String`
|
||||
|
||||
#### `file.history`
|
||||
|
||||
Array of `file.path` values the Vinyl object has had, from `file.history[0]` (original) through `file.history[file.history.length - 1]` (current). `file.history` and its elements should normally be treated as read-only and only altered indirectly by setting `file.path`.
|
||||
|
||||
Type: `Array`
|
||||
|
||||
#### `file.relative`
|
||||
|
||||
Gets the result of `path.relative(file.base, file.path)`.
|
||||
|
||||
Throws when set or when `file.path` is not set.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var file = new File({
|
||||
cwd: '/',
|
||||
base: '/test/',
|
||||
path: '/test/file.js'
|
||||
});
|
||||
|
||||
console.log(file.relative); // file.js
|
||||
```
|
||||
|
||||
#### `file.dirname`
|
||||
|
||||
Gets and sets the dirname of `file.path`. Will always be normalized and have trailing separators removed.
|
||||
|
||||
Throws when `file.path` is not set.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var file = new File({
|
||||
cwd: '/',
|
||||
base: '/test/',
|
||||
path: '/test/file.js'
|
||||
});
|
||||
|
||||
console.log(file.dirname); // /test
|
||||
|
||||
file.dirname = '/specs';
|
||||
|
||||
console.log(file.dirname); // /specs
|
||||
console.log(file.path); // /specs/file.js
|
||||
```
|
||||
|
||||
#### `file.basename`
|
||||
|
||||
Gets and sets the basename of `file.path`.
|
||||
|
||||
Throws when `file.path` is not set.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var file = new File({
|
||||
cwd: '/',
|
||||
base: '/test/',
|
||||
path: '/test/file.js'
|
||||
});
|
||||
|
||||
console.log(file.basename); // file.js
|
||||
|
||||
file.basename = 'file.txt';
|
||||
|
||||
console.log(file.basename); // file.txt
|
||||
console.log(file.path); // /test/file.txt
|
||||
```
|
||||
|
||||
#### `file.stem`
|
||||
|
||||
Gets and sets stem (filename without suffix) of `file.path`.
|
||||
|
||||
Throws when `file.path` is not set.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var file = new File({
|
||||
cwd: '/',
|
||||
base: '/test/',
|
||||
path: '/test/file.js'
|
||||
});
|
||||
|
||||
console.log(file.stem); // file
|
||||
|
||||
file.stem = 'foo';
|
||||
|
||||
console.log(file.stem); // foo
|
||||
console.log(file.path); // /test/foo.js
|
||||
```
|
||||
|
||||
#### `file.extname`
|
||||
|
||||
Gets and sets extname of `file.path`.
|
||||
|
||||
Throws when `file.path` is not set.
|
||||
|
||||
Type: `String`
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var file = new File({
|
||||
cwd: '/',
|
||||
base: '/test/',
|
||||
path: '/test/file.js'
|
||||
});
|
||||
|
||||
console.log(file.extname); // .js
|
||||
|
||||
file.extname = '.txt';
|
||||
|
||||
console.log(file.extname); // .txt
|
||||
console.log(file.path); // /test/file.txt
|
||||
```
|
||||
|
||||
#### `file.symlink`
|
||||
|
||||
Gets and sets the path where the file points to if it's a symbolic link. Will always be normalized and have trailing separators removed.
|
||||
|
||||
Throws when set to any value other than a string.
|
||||
|
||||
Type: `String`
|
||||
|
||||
### `Vinyl.isVinyl(file)`
|
||||
|
||||
Static method used for checking if an object is a Vinyl file. Use this method instead of `instanceof`.
|
||||
|
||||
Takes an object and returns `true` if it is a Vinyl file, otherwise returns `false`.
|
||||
|
||||
__Note: This method uses an internal flag that some older versions of Vinyl didn't expose.__
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var Vinyl = require('vinyl');
|
||||
|
||||
var file = new Vinyl();
|
||||
var notAFile = {};
|
||||
|
||||
Vinyl.isVinyl(file); // true
|
||||
Vinyl.isVinyl(notAFile); // false
|
||||
```
|
||||
|
||||
### `Vinyl.isCustomProp(property)`
|
||||
|
||||
Static method used by Vinyl when setting values inside the constructor or when copying properties in `file.clone()`.
|
||||
|
||||
Takes a string `property` and returns `true` if the property is not used internally, otherwise returns `false`.
|
||||
|
||||
This method is useful for inheritting from the Vinyl constructor. Read more in [Extending Vinyl][extending-vinyl].
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var Vinyl = require('vinyl');
|
||||
|
||||
Vinyl.isCustomProp('sourceMap'); // true
|
||||
Vinyl.isCustomProp('path'); // false -> internal getter/setter
|
||||
```
|
||||
|
||||
## Normalization and concatenation
|
||||
|
||||
Since all properties are normalized in their setters, you can just concatenate with `/`, and normalization takes care of it properly on all platforms.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var file = new File();
|
||||
file.path = '/' + 'test' + '/' + 'foo.bar';
|
||||
|
||||
console.log(file.path);
|
||||
// posix => /test/foo.bar
|
||||
// win32 => \\test\\foo.bar
|
||||
```
|
||||
|
||||
But never concatenate with `\`, since that is a valid filename character on posix system.
|
||||
|
||||
## Extending Vinyl
|
||||
|
||||
When extending Vinyl into your own class with extra features, you need to think about a few things.
|
||||
|
||||
When you have your own properties that are managed internally, you need to extend the static `isCustomProp` method to return `false` when one of these properties is queried.
|
||||
|
||||
```js
|
||||
var Vinyl = require('vinyl');
|
||||
|
||||
var builtInProps = ['foo', '_foo'];
|
||||
|
||||
class SuperFile extends Vinyl {
|
||||
constructor(options) {
|
||||
super(options);
|
||||
this._foo = 'example internal read-only value';
|
||||
}
|
||||
|
||||
get foo() {
|
||||
return this._foo;
|
||||
}
|
||||
|
||||
static isCustomProp(name) {
|
||||
return super.isCustomProp(name) && builtInProps.indexOf(name) === -1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This makes properties `foo` and `_foo` ignored when cloning, and when passed in options to `constructor(options)` so they don't get assigned to the new object.
|
||||
|
||||
Same goes for `clone()`. If you have your own internal stuff that needs special handling during cloning, you should extend it to do so.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[is-symbolic]: #issymbolic
|
||||
[is-directory]: #isdirectory
|
||||
[normalization]: #normalization-and-concatenation
|
||||
[extending-vinyl]: #extending-vinyl
|
||||
[stream]: https://nodejs.org/api/stream.html#stream_stream
|
||||
[readable-stream]: https://nodejs.org/api/stream.html#stream_readable_streams
|
||||
[buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer
|
||||
[fs-stats]: http://nodejs.org/api/fs.html#fs_class_fs_stats
|
||||
[vinyl-fs]: https://github.com/gulpjs/vinyl-fs
|
||||
[cloneable-readable]: https://github.com/mcollina/cloneable-readable
|
||||
|
||||
[downloads-image]: http://img.shields.io/npm/dm/vinyl.svg
|
||||
[npm-url]: https://www.npmjs.com/package/vinyl
|
||||
[npm-image]: http://img.shields.io/npm/v/vinyl.svg
|
||||
|
||||
[travis-url]: https://travis-ci.org/gulpjs/vinyl
|
||||
[travis-image]: http://img.shields.io/travis/gulpjs/vinyl.svg?label=travis-ci
|
||||
|
||||
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/vinyl
|
||||
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/vinyl.svg?label=appveyor
|
||||
|
||||
[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl
|
||||
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/vinyl/master.svg
|
||||
|
||||
[gitter-url]: https://gitter.im/gulpjs/gulp
|
||||
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
|
||||
334
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/index.js
generated
vendored
Executable file
334
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/index.js
generated
vendored
Executable file
@@ -0,0 +1,334 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
var util = require('util');
|
||||
var isBuffer = require('buffer').Buffer.isBuffer;
|
||||
|
||||
var clone = require('clone');
|
||||
var cloneable = require('cloneable-readable');
|
||||
var replaceExt = require('replace-ext');
|
||||
var cloneStats = require('clone-stats');
|
||||
var cloneBuffer = require('clone-buffer');
|
||||
var removeTrailingSep = require('remove-trailing-separator');
|
||||
|
||||
var isStream = require('./lib/is-stream');
|
||||
var normalize = require('./lib/normalize');
|
||||
var inspectStream = require('./lib/inspect-stream');
|
||||
|
||||
var builtInFields = [
|
||||
'_contents', '_symlink', 'contents', 'stat', 'history', 'path',
|
||||
'_base', 'base', '_cwd', 'cwd',
|
||||
];
|
||||
|
||||
function File(file) {
|
||||
var self = this;
|
||||
|
||||
if (!file) {
|
||||
file = {};
|
||||
}
|
||||
|
||||
// Stat = files stats object
|
||||
this.stat = file.stat || null;
|
||||
|
||||
// Contents = stream, buffer, or null if not read
|
||||
this.contents = file.contents || null;
|
||||
|
||||
// Replay path history to ensure proper normalization and trailing sep
|
||||
var history = Array.prototype.slice.call(file.history || []);
|
||||
if (file.path) {
|
||||
history.push(file.path);
|
||||
}
|
||||
this.history = [];
|
||||
history.forEach(function(path) {
|
||||
self.path = path;
|
||||
});
|
||||
|
||||
this.cwd = file.cwd || process.cwd();
|
||||
this.base = file.base;
|
||||
|
||||
this._isVinyl = true;
|
||||
|
||||
this._symlink = null;
|
||||
|
||||
// Set custom properties
|
||||
Object.keys(file).forEach(function(key) {
|
||||
if (self.constructor.isCustomProp(key)) {
|
||||
self[key] = file[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
File.prototype.isBuffer = function() {
|
||||
return isBuffer(this.contents);
|
||||
};
|
||||
|
||||
File.prototype.isStream = function() {
|
||||
return isStream(this.contents);
|
||||
};
|
||||
|
||||
File.prototype.isNull = function() {
|
||||
return (this.contents === null);
|
||||
};
|
||||
|
||||
File.prototype.isDirectory = function() {
|
||||
if (!this.isNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.stat && typeof this.stat.isDirectory === 'function') {
|
||||
return this.stat.isDirectory();
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
File.prototype.isSymbolic = function() {
|
||||
if (!this.isNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.stat && typeof this.stat.isSymbolicLink === 'function') {
|
||||
return this.stat.isSymbolicLink();
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
File.prototype.clone = function(opt) {
|
||||
var self = this;
|
||||
|
||||
if (typeof opt === 'boolean') {
|
||||
opt = {
|
||||
deep: opt,
|
||||
contents: true,
|
||||
};
|
||||
} else if (!opt) {
|
||||
opt = {
|
||||
deep: true,
|
||||
contents: true,
|
||||
};
|
||||
} else {
|
||||
opt.deep = opt.deep === true;
|
||||
opt.contents = opt.contents !== false;
|
||||
}
|
||||
|
||||
// Clone our file contents
|
||||
var contents;
|
||||
if (this.isStream()) {
|
||||
contents = this.contents.clone();
|
||||
} else if (this.isBuffer()) {
|
||||
contents = opt.contents ? cloneBuffer(this.contents) : this.contents;
|
||||
}
|
||||
|
||||
var file = new this.constructor({
|
||||
cwd: this.cwd,
|
||||
base: this.base,
|
||||
stat: (this.stat ? cloneStats(this.stat) : null),
|
||||
history: this.history.slice(),
|
||||
contents: contents,
|
||||
});
|
||||
|
||||
// Clone our custom properties
|
||||
Object.keys(this).forEach(function(key) {
|
||||
if (self.constructor.isCustomProp(key)) {
|
||||
file[key] = opt.deep ? clone(self[key], true) : self[key];
|
||||
}
|
||||
});
|
||||
return file;
|
||||
};
|
||||
|
||||
File.prototype.inspect = function() {
|
||||
var inspect = [];
|
||||
|
||||
// Use relative path if possible
|
||||
var filePath = this.path ? this.relative : null;
|
||||
|
||||
if (filePath) {
|
||||
inspect.push('"' + filePath + '"');
|
||||
}
|
||||
|
||||
if (this.isBuffer()) {
|
||||
inspect.push(this.contents.inspect());
|
||||
}
|
||||
|
||||
if (this.isStream()) {
|
||||
inspect.push(inspectStream(this.contents));
|
||||
}
|
||||
|
||||
return '<File ' + inspect.join(' ') + '>';
|
||||
};
|
||||
|
||||
// Newer Node.js versions use this symbol for custom inspection.
|
||||
if (util.inspect.custom) {
|
||||
File.prototype[util.inspect.custom] = File.prototype.inspect;
|
||||
}
|
||||
|
||||
File.isCustomProp = function(key) {
|
||||
return builtInFields.indexOf(key) === -1;
|
||||
};
|
||||
|
||||
File.isVinyl = function(file) {
|
||||
return (file && file._isVinyl === true) || false;
|
||||
};
|
||||
|
||||
// Virtual attributes
|
||||
// Or stuff with extra logic
|
||||
Object.defineProperty(File.prototype, 'contents', {
|
||||
get: function() {
|
||||
return this._contents;
|
||||
},
|
||||
set: function(val) {
|
||||
if (!isBuffer(val) && !isStream(val) && (val !== null)) {
|
||||
throw new Error('File.contents can only be a Buffer, a Stream, or null.');
|
||||
}
|
||||
|
||||
// Ask cloneable if the stream is a already a cloneable
|
||||
// this avoid piping into many streams
|
||||
// reducing the overhead of cloning
|
||||
if (isStream(val) && !cloneable.isCloneable(val)) {
|
||||
val = cloneable(val);
|
||||
}
|
||||
|
||||
this._contents = val;
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'cwd', {
|
||||
get: function() {
|
||||
return this._cwd;
|
||||
},
|
||||
set: function(cwd) {
|
||||
if (!cwd || typeof cwd !== 'string') {
|
||||
throw new Error('cwd must be a non-empty string.');
|
||||
}
|
||||
this._cwd = removeTrailingSep(normalize(cwd));
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'base', {
|
||||
get: function() {
|
||||
return this._base || this._cwd;
|
||||
},
|
||||
set: function(base) {
|
||||
if (base == null) {
|
||||
delete this._base;
|
||||
return;
|
||||
}
|
||||
if (typeof base !== 'string' || !base) {
|
||||
throw new Error('base must be a non-empty string, or null/undefined.');
|
||||
}
|
||||
base = removeTrailingSep(normalize(base));
|
||||
if (base !== this._cwd) {
|
||||
this._base = base;
|
||||
} else {
|
||||
delete this._base;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// TODO: Should this be moved to vinyl-fs?
|
||||
Object.defineProperty(File.prototype, 'relative', {
|
||||
get: function() {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not get relative.');
|
||||
}
|
||||
return path.relative(this.base, this.path);
|
||||
},
|
||||
set: function() {
|
||||
throw new Error('File.relative is generated from the base and path attributes. Do not modify it.');
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'dirname', {
|
||||
get: function() {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not get dirname.');
|
||||
}
|
||||
return path.dirname(this.path);
|
||||
},
|
||||
set: function(dirname) {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not set dirname.');
|
||||
}
|
||||
this.path = path.join(dirname, this.basename);
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'basename', {
|
||||
get: function() {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not get basename.');
|
||||
}
|
||||
return path.basename(this.path);
|
||||
},
|
||||
set: function(basename) {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not set basename.');
|
||||
}
|
||||
this.path = path.join(this.dirname, basename);
|
||||
},
|
||||
});
|
||||
|
||||
// Property for getting/setting stem of the filename.
|
||||
Object.defineProperty(File.prototype, 'stem', {
|
||||
get: function() {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not get stem.');
|
||||
}
|
||||
return path.basename(this.path, this.extname);
|
||||
},
|
||||
set: function(stem) {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not set stem.');
|
||||
}
|
||||
this.path = path.join(this.dirname, stem + this.extname);
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'extname', {
|
||||
get: function() {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not get extname.');
|
||||
}
|
||||
return path.extname(this.path);
|
||||
},
|
||||
set: function(extname) {
|
||||
if (!this.path) {
|
||||
throw new Error('No path specified! Can not set extname.');
|
||||
}
|
||||
this.path = replaceExt(this.path, extname);
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'path', {
|
||||
get: function() {
|
||||
return this.history[this.history.length - 1];
|
||||
},
|
||||
set: function(path) {
|
||||
if (typeof path !== 'string') {
|
||||
throw new Error('path should be a string.');
|
||||
}
|
||||
path = removeTrailingSep(normalize(path));
|
||||
|
||||
// Record history only when path changed
|
||||
if (path && path !== this.path) {
|
||||
this.history.push(path);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(File.prototype, 'symlink', {
|
||||
get: function() {
|
||||
return this._symlink;
|
||||
},
|
||||
set: function(symlink) {
|
||||
// TODO: should this set the mode to symbolic if set?
|
||||
if (typeof symlink !== 'string') {
|
||||
throw new Error('symlink should be a string');
|
||||
}
|
||||
|
||||
this._symlink = removeTrailingSep(normalize(symlink));
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = File;
|
||||
13
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/lib/inspect-stream.js
generated
vendored
Executable file
13
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/lib/inspect-stream.js
generated
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
function inspectStream(stream) {
|
||||
var streamType = stream.constructor.name;
|
||||
// Avoid StreamStream
|
||||
if (streamType === 'Stream') {
|
||||
streamType = '';
|
||||
}
|
||||
|
||||
return '<' + streamType + 'Stream>';
|
||||
}
|
||||
|
||||
module.exports = inspectStream;
|
||||
15
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/lib/is-stream.js
generated
vendored
Executable file
15
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/lib/is-stream.js
generated
vendored
Executable file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
function isStream(stream) {
|
||||
if (!stream) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (typeof stream.pipe !== 'function') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = isStream;
|
||||
9
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/lib/normalize.js
generated
vendored
Executable file
9
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/lib/normalize.js
generated
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
|
||||
function normalize(str) {
|
||||
return str === '' ? str : path.normalize(str);
|
||||
}
|
||||
|
||||
module.exports = normalize;
|
||||
97
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/package.json
generated
vendored
Executable file
97
Client/node_modules/vinyl-sourcemap/node_modules/vinyl/package.json
generated
vendored
Executable file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"_from": "vinyl@^2.0.0",
|
||||
"_id": "vinyl@2.2.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==",
|
||||
"_location": "/vinyl-sourcemap/vinyl",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "vinyl@^2.0.0",
|
||||
"name": "vinyl",
|
||||
"escapedName": "vinyl",
|
||||
"rawSpec": "^2.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/vinyl-sourcemap"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz",
|
||||
"_shasum": "d85b07da96e458d25b2ffe19fece9f2caa13ed86",
|
||||
"_spec": "vinyl@^2.0.0",
|
||||
"_where": "/home/nathan/Projects/Upsilon/UpsilonVsCodeLanguageServer/Client/node_modules/vinyl-sourcemap",
|
||||
"author": {
|
||||
"name": "Gulp Team",
|
||||
"email": "team@gulpjs.com",
|
||||
"url": "http://gulpjs.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gulpjs/vinyl/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Eric Schoffstall",
|
||||
"email": "yo@contra.io"
|
||||
},
|
||||
{
|
||||
"name": "Blaine Bublitz",
|
||||
"email": "blaine.bublitz@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"clone": "^2.1.1",
|
||||
"clone-buffer": "^1.0.0",
|
||||
"clone-stats": "^1.0.0",
|
||||
"cloneable-readable": "^1.0.0",
|
||||
"remove-trailing-separator": "^1.0.1",
|
||||
"replace-ext": "^1.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Virtual file format.",
|
||||
"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",
|
||||
"mississippi": "^1.2.0",
|
||||
"mocha": "^2.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js",
|
||||
"lib"
|
||||
],
|
||||
"homepage": "https://github.com/gulpjs/vinyl#readme",
|
||||
"keywords": [
|
||||
"virtual",
|
||||
"filesystem",
|
||||
"file",
|
||||
"directory",
|
||||
"stat",
|
||||
"path"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "vinyl",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gulpjs/vinyl.git"
|
||||
},
|
||||
"scripts": {
|
||||
"cover": "istanbul cover _mocha --report lcovonly",
|
||||
"coveralls": "npm run cover && istanbul-coveralls",
|
||||
"lint": "eslint . && jscs index.js lib/ test/",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --async-only"
|
||||
},
|
||||
"version": "2.2.0"
|
||||
}
|
||||
99
Client/node_modules/vinyl-sourcemap/package.json
generated
vendored
Executable file
99
Client/node_modules/vinyl-sourcemap/package.json
generated
vendored
Executable file
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"_from": "vinyl-sourcemap@^1.1.0",
|
||||
"_id": "vinyl-sourcemap@1.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=",
|
||||
"_location": "/vinyl-sourcemap",
|
||||
"_phantomChildren": {
|
||||
"clone-buffer": "1.0.0",
|
||||
"cloneable-readable": "1.1.2",
|
||||
"remove-trailing-separator": "1.1.0",
|
||||
"replace-ext": "1.0.0"
|
||||
},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "vinyl-sourcemap@^1.1.0",
|
||||
"name": "vinyl-sourcemap",
|
||||
"escapedName": "vinyl-sourcemap",
|
||||
"rawSpec": "^1.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-vinyl-zip/vinyl-fs"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
|
||||
"_shasum": "92a800593a38703a8cdb11d8b300ad4be63b3e16",
|
||||
"_spec": "vinyl-sourcemap@^1.1.0",
|
||||
"_where": "/home/nathan/Projects/Upsilon/UpsilonVsCodeLanguageServer/Client/node_modules/gulp-vinyl-zip/node_modules/vinyl-fs",
|
||||
"author": {
|
||||
"name": "Gulp Team",
|
||||
"email": "team@gulpjs.com",
|
||||
"url": "http://gulpjs.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gulpjs/vinyl-sourcemap/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Robin Venneman"
|
||||
},
|
||||
{
|
||||
"name": "Blaine Bublitz",
|
||||
"email": "blaine.bublitz@gmail.com"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"append-buffer": "^1.0.2",
|
||||
"convert-source-map": "^1.5.0",
|
||||
"graceful-fs": "^4.1.6",
|
||||
"normalize-path": "^2.1.1",
|
||||
"now-and-later": "^2.0.0",
|
||||
"remove-bom-buffer": "^3.0.0",
|
||||
"vinyl": "^2.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Add/write sourcemaps to/from Vinyl files.",
|
||||
"devDependencies": {
|
||||
"eslint": "^1.10.3",
|
||||
"eslint-config-gulp": "^2.0.0",
|
||||
"expect": "^1.20.2",
|
||||
"istanbul": "^0.4.3",
|
||||
"istanbul-coveralls": "^1.0.3",
|
||||
"jscs": "^2.4.0",
|
||||
"jscs-preset-gulp": "^1.0.0",
|
||||
"mississippi": "^1.3.0",
|
||||
"mocha": "^3.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js",
|
||||
"lib/"
|
||||
],
|
||||
"homepage": "https://github.com/gulpjs/vinyl-sourcemap#readme",
|
||||
"keywords": [
|
||||
"vinyl",
|
||||
"sourcemap",
|
||||
"gulp"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "vinyl-sourcemap",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/gulpjs/vinyl-sourcemap.git"
|
||||
},
|
||||
"scripts": {
|
||||
"cover": "istanbul cover _mocha --report lcovonly",
|
||||
"coveralls": "npm run cover && istanbul-coveralls",
|
||||
"lint": "eslint index.js lib/ test/add.js test/write.js && jscs index.js lib/ test/add.js test/write.js",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --async-only"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
}
|
||||
Reference in New Issue
Block a user