diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-03 01:33:53 +0100 |
commit | d1291f67551c58168af43698a359cb5ddfd266b0 (patch) | |
tree | 55a13ed29fe1915e3f42f1b1b7038dafa2e975a7 /node_modules/gulp-typescript | |
parent | d0a0695fb5d34996850723f7d4b1b59c3df909c2 (diff) | |
download | wallet-core-d1291f67551c58168af43698a359cb5ddfd266b0.tar.xz |
node_modules
Diffstat (limited to 'node_modules/gulp-typescript')
71 files changed, 1969 insertions, 570 deletions
diff --git a/node_modules/gulp-typescript/node_modules/.bin/tsc b/node_modules/gulp-typescript/node_modules/.bin/tsc new file mode 120000 index 000000000..42fa863b2 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/.bin/tsc @@ -0,0 +1 @@ +../../../typescript/bin/tsc
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/.bin/tsserver b/node_modules/gulp-typescript/node_modules/.bin/tsserver new file mode 120000 index 000000000..39549c0e3 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/.bin/tsserver @@ -0,0 +1 @@ +../../../typescript/bin/tsserver
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/LICENSE.md b/node_modules/gulp-typescript/node_modules/clone-stats/LICENSE.md new file mode 100644 index 000000000..146cb32a7 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/clone-stats/LICENSE.md @@ -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. diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/README.md b/node_modules/gulp-typescript/node_modules/clone-stats/README.md new file mode 100644 index 000000000..8b12b6fa5 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/clone-stats/README.md @@ -0,0 +1,17 @@ +# clone-stats [![Flattr this!](https://api.flattr.com/button/flattr-badge-large.png)](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)[![experimental](http://hughsk.github.io/stability-badges/dist/experimental.svg)](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 ## + +[![clone-stats](https://nodei.co/npm/clone-stats.png?mini=true)](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. diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/index.js b/node_modules/gulp-typescript/node_modules/clone-stats/index.js new file mode 100644 index 000000000..e797cfe6e --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/clone-stats/index.js @@ -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 +} diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/package.json b/node_modules/gulp-typescript/node_modules/clone-stats/package.json new file mode 100644 index 000000000..2880625c1 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/clone-stats/package.json @@ -0,0 +1,31 @@ +{ + "name": "clone-stats", + "description": "Safely clone node's fs.Stats instances without losing their class methods", + "version": "0.0.1", + "main": "index.js", + "browser": "index.js", + "dependencies": {}, + "devDependencies": { + "tape": "~2.3.2" + }, + "scripts": { + "test": "node test" + }, + "author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)", + "license": "MIT", + "repository": { + "type": "git", + "url": "git://github.com/hughsk/clone-stats" + }, + "bugs": { + "url": "https://github.com/hughsk/clone-stats/issues" + }, + "homepage": "https://github.com/hughsk/clone-stats", + "keywords": [ + "stats", + "fs", + "clone", + "copy", + "prototype" + ] +} diff --git a/node_modules/gulp-typescript/node_modules/clone-stats/test.js b/node_modules/gulp-typescript/node_modules/clone-stats/test.js new file mode 100644 index 000000000..e4bb2814d --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/clone-stats/test.js @@ -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 + '()' + ) + }) +} diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/LICENSE b/node_modules/gulp-typescript/node_modules/gulp-util/LICENSE new file mode 100755 index 000000000..7cbe012c6 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014 Fractal <contact@wearefractal.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/README.md b/node_modules/gulp-typescript/node_modules/gulp-util/README.md new file mode 100644 index 000000000..8c25a4d62 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/README.md @@ -0,0 +1,146 @@ +# gulp-util [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url] + +## Information + +<table> +<tr> +<td>Package</td><td>gulp-util</td> +</tr> +<tr> +<td>Description</td> +<td>Utility functions for gulp plugins</td> +</tr> +<tr> +<td>Node Version</td> +<td>>= 0.10</td> +</tr> +</table> + +## Usage + +```javascript +var gutil = require('gulp-util'); + +gutil.log('stuff happened', 'Really it did', gutil.colors.magenta('123')); +gutil.beep(); + +gutil.replaceExtension('file.coffee', '.js'); // file.js + +var opt = { + name: 'todd', + file: someGulpFile +}; +gutil.template('test <%= name %> <%= file.path %>', opt) // test todd /js/hi.js +``` + +### log(msg...) + +Logs stuff. Already prefixed with [gulp] and all that. If you pass in multiple arguments it will join them by a space. + +The default gulp coloring using gutil.colors.<color>: +``` +values (files, module names, etc.) = cyan +numbers (times, counts, etc) = magenta +``` + +### colors + +Is an instance of [chalk](https://github.com/sindresorhus/chalk). + +### replaceExtension(path, newExtension) + +Replaces a file extension in a path. Returns the new path. + +### isStream(obj) + +Returns true or false if an object is a stream. + +### isBuffer(obj) + +Returns true or false if an object is a Buffer. + +### template(string[, data]) + +This is a lodash.template function wrapper. You must pass in a valid gulp file object so it is available to the user or it will error. You can not configure any of the delimiters. Look at the [lodash docs](http://lodash.com/docs#template) for more info. + +## new File(obj) + +This is just [vinyl](https://github.com/wearefractal/vinyl) + +```javascript +var file = new gutil.File({ + base: path.join(__dirname, './fixtures/'), + cwd: __dirname, + path: path.join(__dirname, './fixtures/test.coffee') +}); +``` + +## noop() + +Returns a stream that does nothing but pass data straight through. + +```javascript +// gulp should be called like this : +// $ gulp --type production +gulp.task('scripts', function() { + gulp.src('src/**/*.js') + .pipe(concat('script.js')) + .pipe(gutil.env.type === 'production' ? uglify() : gutil.noop()) + .pipe(gulp.dest('dist/')); +}); +``` + +## buffer(cb) + +This is similar to es.wait but instead of buffering text into one string it buffers anything into an array (so very useful for file objects). + +Returns a stream that can be piped to. + +The stream will emit one data event after the stream piped to it has ended. The data will be the same array passed to the callback. + +Callback is optional and receives two arguments: error and data + +```javascript +gulp.src('stuff/*.js') + .pipe(gutil.buffer(function(err, files) { + + })); +``` + +## new PluginError(pluginName, message[, options]) + +- pluginName should be the module name of your plugin +- message can be a string or an existing error +- 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 in as the message the stack will be pulled from that, otherwise one will be created. +- Note that 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()`. Can be omitted by including `{showProperties: false}` in the options. + +These are all acceptable forms of instantiation: + +```javascript +var err = new gutil.PluginError('test', { + message: 'something broke' +}); + +var err = new gutil.PluginError({ + plugin: 'test', + message: 'something broke' +}); + +var err = new gutil.PluginError('test', 'something broke'); + +var err = new gutil.PluginError('test', 'something broke', {showStack: true}); + +var existingError = new Error('OMG'); +var err = new gutil.PluginError('test', existingError, {showStack: true}); +``` + +[npm-url]: https://www.npmjs.com/package/gulp-util +[npm-image]: https://badge.fury.io/js/gulp-util.svg +[travis-url]: https://travis-ci.org/gulpjs/gulp-util +[travis-image]: https://img.shields.io/travis/gulpjs/gulp-util.svg?branch=master +[coveralls-url]: https://coveralls.io/r/gulpjs/gulp-util +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulp-util.svg +[depstat-url]: https://david-dm.org/gulpjs/gulp-util +[depstat-image]: https://david-dm.org/gulpjs/gulp-util.svg diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/index.js b/node_modules/gulp-typescript/node_modules/gulp-util/index.js new file mode 100644 index 000000000..199713c94 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/index.js @@ -0,0 +1,18 @@ +module.exports = { + File: require('vinyl'), + replaceExtension: require('replace-ext'), + colors: require('chalk'), + date: require('dateformat'), + log: require('./lib/log'), + template: require('./lib/template'), + env: require('./lib/env'), + beep: require('beeper'), + noop: require('./lib/noop'), + isStream: require('./lib/isStream'), + isBuffer: require('./lib/isBuffer'), + isNull: require('./lib/isNull'), + linefeed: '\n', + combine: require('./lib/combine'), + buffer: require('./lib/buffer'), + PluginError: require('./lib/PluginError') +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/PluginError.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/PluginError.js new file mode 100644 index 000000000..d60159ab1 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/PluginError.js @@ -0,0 +1,130 @@ +var util = require('util'); +var arrayDiffer = require('array-differ'); +var arrayUniq = require('array-uniq'); +var chalk = require('chalk'); +var objectAssign = require('object-assign'); + +var nonEnumberableProperties = ['name', 'message', 'stack']; +var propertiesNotToDisplay = nonEnumberableProperties.concat(['plugin', 'showStack', 'showProperties', '__safety', '_stack']); + +// wow what a clusterfuck +var parseOptions = function(plugin, message, opt) { + opt = opt || {}; + if (typeof plugin === 'object') { + opt = plugin; + } else { + if (message instanceof Error) { + opt.error = message; + } else if (typeof message === 'object') { + opt = message; + } else { + opt.message = message; + } + opt.plugin = plugin; + } + + return objectAssign({ + showStack: false, + showProperties: true + }, opt); +}; + +function PluginError(plugin, message, opt) { + if (!(this instanceof PluginError)) throw new Error('Call PluginError using new'); + + Error.call(this); + + var options = parseOptions(plugin, message, opt); + var self = this; + + // if options has an error, grab details from it + if (options.error) { + // These properties are not enumerable, so we have to add them explicitly. + arrayUniq(Object.keys(options.error).concat(nonEnumberableProperties)) + .forEach(function(prop) { + self[prop] = options.error[prop]; + }); + } + + var properties = ['name', 'message', 'fileName', 'lineNumber', 'stack', 'showStack', 'showProperties', 'plugin']; + + // options object can override + properties.forEach(function(prop) { + if (prop in options) this[prop] = options[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, then we'll get stack overflow problems. + var 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); + +PluginError.prototype._messageWithDetails = function() { + var messageWithDetails = 'Message:\n ' + this.message; + var details = this._messageDetails(); + + if (details !== '') { + messageWithDetails += '\n' + details; + } + + return messageWithDetails; +}; + +PluginError.prototype._messageDetails = function() { + if (!this.showProperties) { + return ''; + } + + var properties = arrayDiffer(Object.keys(this), propertiesNotToDisplay); + + if (properties.length === 0) { + return ''; + } + + var self = this; + properties = properties.map(function stringifyProperty(prop) { + return ' ' + prop + ': ' + self[prop]; + }); + + return 'Details:\n' + properties.join('\n'); +}; + +PluginError.prototype.toString = function () { + var sig = chalk.red(this.name) + ' in plugin \'' + chalk.cyan(this.plugin) + '\''; + var detailsWithStack = function(stack) { + return this._messageWithDetails() + '\nStack:\n' + stack; + }.bind(this); + + var msg; + if (this.showStack) { + if (this.__safety) { // There is no wrapped error, use the stack captured in the PluginError ctor + msg = this.__safety.stack; + } else if (this._stack) { + msg = detailsWithStack(this._stack); + } else { // Stack from wrapped error + msg = detailsWithStack(this.stack); + } + } else { + msg = this._messageWithDetails(); + } + + return sig + '\n' + msg; +}; + +module.exports = PluginError; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/buffer.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/buffer.js new file mode 100644 index 000000000..26c940db1 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/buffer.js @@ -0,0 +1,15 @@ +var through = require('through2'); + +module.exports = function(fn) { + var buf = []; + var end = function(cb) { + this.push(buf); + cb(); + if(fn) fn(null, buf); + }; + var push = function(data, enc, cb) { + buf.push(data); + cb(); + }; + return through.obj(push, end); +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/combine.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/combine.js new file mode 100644 index 000000000..f20712d20 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/combine.js @@ -0,0 +1,11 @@ +var pipeline = require('multipipe'); + +module.exports = function(){ + var args = arguments; + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0]; + } + return function(){ + return pipeline.apply(pipeline, args); + }; +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/env.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/env.js new file mode 100644 index 000000000..ee17c0e30 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/env.js @@ -0,0 +1,4 @@ +var parseArgs = require('minimist'); +var argv = parseArgs(process.argv.slice(2)); + +module.exports = argv; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isBuffer.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isBuffer.js new file mode 100644 index 000000000..7c52f78c9 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isBuffer.js @@ -0,0 +1,7 @@ +var buf = require('buffer'); +var Buffer = buf.Buffer; + +// could use Buffer.isBuffer but this is the same exact thing... +module.exports = function(o) { + return typeof o === 'object' && o instanceof Buffer; +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isNull.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isNull.js new file mode 100644 index 000000000..7f22c63ae --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isNull.js @@ -0,0 +1,3 @@ +module.exports = function(v) { + return v === null; +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/isStream.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isStream.js new file mode 100644 index 000000000..6b54e123b --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/isStream.js @@ -0,0 +1,5 @@ +var Stream = require('stream').Stream; + +module.exports = function(o) { + return !!o && o instanceof Stream; +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/log.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/log.js new file mode 100644 index 000000000..bb843beef --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/log.js @@ -0,0 +1,14 @@ +var hasGulplog = require('has-gulplog'); + +module.exports = function(){ + if(hasGulplog()){ + // specifically deferring loading here to keep from registering it globally + var gulplog = require('gulplog'); + gulplog.info.apply(gulplog, arguments); + } else { + // specifically defering loading because it might not be used + var fancylog = require('fancy-log'); + fancylog.apply(null, arguments); + } + return this; +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/noop.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/noop.js new file mode 100644 index 000000000..7862cb161 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/noop.js @@ -0,0 +1,5 @@ +var through = require('through2'); + +module.exports = function () { + return through.obj(); +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/lib/template.js b/node_modules/gulp-typescript/node_modules/gulp-util/lib/template.js new file mode 100644 index 000000000..eef3bb376 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/lib/template.js @@ -0,0 +1,23 @@ +var template = require('lodash.template'); +var reEscape = require('lodash._reescape'); +var reEvaluate = require('lodash._reevaluate'); +var reInterpolate = require('lodash._reinterpolate'); + +var forcedSettings = { + escape: reEscape, + evaluate: reEvaluate, + interpolate: reInterpolate +}; + +module.exports = function(tmpl, data) { + var fn = template(tmpl, forcedSettings); + + var wrapped = function(o) { + if (typeof o === 'undefined' || typeof o.file === 'undefined') { + throw new Error('Failed to provide the current file as "file" to the template'); + } + return fn(o); + }; + + return (data ? wrapped(data) : wrapped); +}; diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/node_modules/.bin/dateformat b/node_modules/gulp-typescript/node_modules/gulp-util/node_modules/.bin/dateformat new file mode 120000 index 000000000..2a6f7e6d6 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/node_modules/.bin/dateformat @@ -0,0 +1 @@ +../../../../../dateformat/bin/cli.js
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/gulp-util/package.json b/node_modules/gulp-typescript/node_modules/gulp-util/package.json new file mode 100644 index 000000000..7ef3b82d7 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/gulp-util/package.json @@ -0,0 +1,51 @@ +{ + "name": "gulp-util", + "description": "Utility functions for gulp plugins", + "version": "3.0.7", + "repository": "gulpjs/gulp-util", + "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)", + "files": [ + "index.js", + "lib" + ], + "dependencies": { + "array-differ": "^1.0.0", + "array-uniq": "^1.0.2", + "beeper": "^1.0.0", + "chalk": "^1.0.0", + "dateformat": "^1.0.11", + "fancy-log": "^1.1.0", + "gulplog": "^1.0.0", + "has-gulplog": "^0.1.0", + "lodash._reescape": "^3.0.0", + "lodash._reevaluate": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.template": "^3.0.0", + "minimist": "^1.1.0", + "multipipe": "^0.1.2", + "object-assign": "^3.0.0", + "replace-ext": "0.0.1", + "through2": "^2.0.0", + "vinyl": "^0.5.0" + }, + "devDependencies": { + "buffer-equal": "^0.0.1", + "coveralls": "^2.11.2", + "event-stream": "^3.1.7", + "istanbul": "^0.3.5", + "istanbul-coveralls": "^1.0.1", + "jshint": "^2.5.11", + "lodash.templatesettings": "^3.0.0", + "mocha": "^2.0.1", + "rimraf": "^2.2.8", + "should": "^7.0.1" + }, + "scripts": { + "test": "jshint *.js lib/*.js test/*.js && mocha", + "coveralls": "istanbul cover _mocha --report lcovonly && istanbul-coveralls" + }, + "engines": { + "node": ">=0.10" + }, + "license": "MIT" +} diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/LICENSE.txt b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/LICENSE.txt new file mode 100644 index 000000000..17764328c --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/LICENSE.txt @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> +Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> + +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. diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/README.md b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/README.md new file mode 100644 index 000000000..1423e502f --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/README.md @@ -0,0 +1,20 @@ +# lodash._reinterpolate v3.0.0 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) internal `reInterpolate` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash._reinterpolate +``` + +In Node.js/io.js: + +```js +var reInterpolate = require('lodash._reinterpolate'); +``` + +See the [package source](https://github.com/lodash/lodash/blob/3.0.0-npm-packages/lodash._reinterpolate) for more details. diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/index.js b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/index.js new file mode 100644 index 000000000..5c06abcf3 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/index.js @@ -0,0 +1,13 @@ +/** + * lodash 3.0.0 (Custom Build) <https://lodash.com/> + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE> + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <https://lodash.com/license> + */ + +/** Used to match template delimiters. */ +var reInterpolate = /<%=([\s\S]+?)%>/g; + +module.exports = reInterpolate; diff --git a/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/package.json b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/package.json new file mode 100644 index 000000000..4cc9f1a53 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash._reinterpolate/package.json @@ -0,0 +1,18 @@ +{ + "name": "lodash._reinterpolate", + "version": "3.0.0", + "description": "The modern build of lodash’s internal `reInterpolate` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", + "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)", + "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)", + "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)", + "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/LICENSE b/node_modules/gulp-typescript/node_modules/lodash.template/LICENSE new file mode 100644 index 000000000..9cd87e5dc --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash.template/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> + +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. diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/README.md b/node_modules/gulp-typescript/node_modules/lodash.template/README.md new file mode 100644 index 000000000..f542f713b --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash.template/README.md @@ -0,0 +1,20 @@ +# lodash.template v3.6.2 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash’s](https://lodash.com/) `_.template` exported as a [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) module. + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.template +``` + +In Node.js/io.js: + +```js +var template = require('lodash.template'); +``` + +See the [documentation](https://lodash.com/docs#template) or [package source](https://github.com/lodash/lodash/blob/3.6.2-npm-packages/lodash.template) for more details. diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/index.js b/node_modules/gulp-typescript/node_modules/lodash.template/index.js new file mode 100644 index 000000000..e5a9629b9 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash.template/index.js @@ -0,0 +1,389 @@ +/** + * lodash 3.6.2 (Custom Build) <https://lodash.com/> + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license <https://lodash.com/license> + */ +var baseCopy = require('lodash._basecopy'), + baseToString = require('lodash._basetostring'), + baseValues = require('lodash._basevalues'), + isIterateeCall = require('lodash._isiterateecall'), + reInterpolate = require('lodash._reinterpolate'), + keys = require('lodash.keys'), + restParam = require('lodash.restparam'), + templateSettings = require('lodash.templatesettings'); + +/** `Object#toString` result references. */ +var errorTag = '[object Error]'; + +/** Used to match empty string literals in compiled template source. */ +var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + +/** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ +var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + +/** Used to ensure capturing order of template delimiters. */ +var reNoMatch = /($^)/; + +/** Used to match unescaped characters in compiled string literals. */ +var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + +/** Used to escape characters for inclusion in compiled string literals. */ +var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' +}; + +/** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ +function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; +} + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Used by `_.template` to customize its `_.assign` use. + * + * **Note:** This function is like `assignDefaults` except that it ignores + * inherited property values when checking if a property is `undefined`. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @param {string} key The key associated with the object and source values. + * @param {Object} object The destination object. + * @returns {*} Returns the value to assign to the destination object. + */ +function assignOwnDefaults(objectValue, sourceValue, key, object) { + return (objectValue === undefined || !hasOwnProperty.call(object, key)) + ? sourceValue + : objectValue; +} + +/** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ +function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; +} + +/** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ +function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); +} + +/** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ +function isError(value) { + return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; +} + +/** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is provided it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as free variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.variable] The data object variable name. + * @param- {Object} [otherOptions] Enables the legacy `options` param signature. + * @returns {Function} Returns the compiled template function. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // using the HTML "escape" delimiter to escape data property values + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' + * + * // using the "evaluate" delimiter to execute JavaScript and generate HTML + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // using the internal `print` function in "evaluate" delimiters + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // using the ES delimiter as an alternative to the default "interpolate" delimiter + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // using custom template delimiters + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // using backslashes to treat delimiters as plain text + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // using the `imports` option to import `jQuery` as `jq` + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // using the `sourceURL` option to specify a custom sourceURL for the template + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector + * + * // using the `variable` option to ensure a with-statement isn't used in the compiled template + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // using the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and a stack trace + * fs.writeFileSync(path.join(cwd, 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); + */ +function template(string, options, otherOptions) { + // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = templateSettings.imports._.templateSettings || templateSettings; + + if (otherOptions && isIterateeCall(string, options, otherOptions)) { + options = otherOptions = undefined; + } + string = baseToString(string); + options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults); + + var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + '|' + + interpolate.source + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + + (options.evaluate || reNoMatch).source + '|$' + , 'g'); + + // Use a sourceURL for easier debugging. + var sourceURL = 'sourceURL' in options ? '//# sourceURL=' + options.sourceURL + '\n' : ''; + + string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; + } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products requires returning the `match` + // string in order to produce the correct `offset` value. + return match; + }); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + var variable = options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; + } + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = 'function(' + (variable || 'obj') + ') {\n' + + (variable + ? '' + : 'obj || (obj = {});\n' + ) + + "var __t, __p = ''" + + (isEscaping + ? ', __e = _.escape' + : '' + ) + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n' + ) + + source + + 'return __p\n}'; + + var result = attempt(function() { + return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; +} + +/** + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Utility + * @param {Function} func The function to attempt. + * @returns {*} Returns the `func` result or error object. + * @example + * + * // avoid throwing errors for invalid selectors + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); + * + * if (_.isError(elements)) { + * elements = []; + * } + */ +var attempt = restParam(function(func, args) { + try { + return func.apply(undefined, args); + } catch(e) { + return isError(e) ? e : new Error(e); + } +}); + +module.exports = template; diff --git a/node_modules/gulp-typescript/node_modules/lodash.template/package.json b/node_modules/gulp-typescript/node_modules/lodash.template/package.json new file mode 100644 index 000000000..88bb748e2 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/lodash.template/package.json @@ -0,0 +1,30 @@ +{ + "name": "lodash.template", + "version": "3.6.2", + "description": "The modern build of lodash’s `_.template` as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": "lodash, lodash-modularized, stdlib, util", + "author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", + "contributors": [ + "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)", + "Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/)", + "Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/)", + "Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/)", + "Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)" + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }, + "dependencies": { + "lodash._basecopy": "^3.0.0", + "lodash._basetostring": "^3.0.0", + "lodash._basevalues": "^3.0.0", + "lodash._isiterateecall": "^3.0.0", + "lodash._reinterpolate": "^3.0.0", + "lodash.escape": "^3.0.0", + "lodash.keys": "^3.0.0", + "lodash.restparam": "^3.0.0", + "lodash.templatesettings": "^3.0.0" + } +} diff --git a/node_modules/gulp-typescript/node_modules/object-assign/index.js b/node_modules/gulp-typescript/node_modules/object-assign/index.js new file mode 100644 index 000000000..2164f93df --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/object-assign/index.js @@ -0,0 +1,39 @@ +'use strict'; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function ToObject(val) { + if (val == null) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function ownEnumerableKeys(obj) { + var keys = Object.getOwnPropertyNames(obj); + + if (Object.getOwnPropertySymbols) { + keys = keys.concat(Object.getOwnPropertySymbols(obj)); + } + + return keys.filter(function (key) { + return propIsEnumerable.call(obj, key); + }); +} + +module.exports = Object.assign || function (target, source) { + var from; + var keys; + var to = ToObject(target); + + for (var s = 1; s < arguments.length; s++) { + from = arguments[s]; + keys = ownEnumerableKeys(Object(from)); + + for (var i = 0; i < keys.length; i++) { + to[keys[i]] = from[keys[i]]; + } + } + + return to; +}; diff --git a/node_modules/gulp-typescript/node_modules/object-assign/license b/node_modules/gulp-typescript/node_modules/object-assign/license new file mode 100644 index 000000000..654d0bfe9 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/object-assign/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/gulp-typescript/node_modules/object-assign/package.json b/node_modules/gulp-typescript/node_modules/object-assign/package.json new file mode 100644 index 000000000..c3b37fef7 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/object-assign/package.json @@ -0,0 +1,38 @@ +{ + "name": "object-assign", + "version": "3.0.0", + "description": "ES6 Object.assign() ponyfill", + "license": "MIT", + "repository": "sindresorhus/object-assign", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "object", + "assign", + "extend", + "properties", + "es6", + "ecmascript", + "harmony", + "ponyfill", + "prollyfill", + "polyfill", + "shim", + "browser" + ], + "devDependencies": { + "mocha": "*" + } +} diff --git a/node_modules/gulp-typescript/node_modules/object-assign/readme.md b/node_modules/gulp-typescript/node_modules/object-assign/readme.md new file mode 100644 index 000000000..aee51c12b --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/object-assign/readme.md @@ -0,0 +1,51 @@ +# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) + +> ES6 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +```sh +$ npm install --save object-assign +``` + + +## Usage + +```js +var objectAssign = require('object-assign'); + +objectAssign({foo: 0}, {bar: 1}); +//=> {foo: 0, bar: 1} + +// multiple sources +objectAssign({foo: 0}, {bar: 1}, {baz: 2}); +//=> {foo: 0, bar: 1, baz: 2} + +// overwrites equal keys +objectAssign({foo: 0}, {foo: 1}, {foo: 2}); +//=> {foo: 2} + +// ignores null and undefined sources +objectAssign({foo: 0}, null, {bar: 1}, undefined); +//=> {foo: 0, bar: 1} +``` + + +## API + +### objectAssign(target, source, [source, ...]) + +Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. + + +## Resources + +- [ES6 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/.npmignore b/node_modules/gulp-typescript/node_modules/replace-ext/.npmignore new file mode 100644 index 000000000..b5ef13a3c --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/replace-ext/.npmignore @@ -0,0 +1,6 @@ +.DS_Store +*.log +node_modules +build +*.node +components
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/.travis.yml b/node_modules/gulp-typescript/node_modules/replace-ext/.travis.yml new file mode 100644 index 000000000..8101b9fe7 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/replace-ext/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.7" + - "0.8" + - "0.9" + - "0.10" +after_script: + - npm run coveralls
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/LICENSE b/node_modules/gulp-typescript/node_modules/replace-ext/LICENSE new file mode 100755 index 000000000..7cbe012c6 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/replace-ext/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2014 Fractal <contact@wearefractal.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/README.md b/node_modules/gulp-typescript/node_modules/replace-ext/README.md new file mode 100644 index 000000000..05b5d21fd --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/replace-ext/README.md @@ -0,0 +1,44 @@ +# replace-ext [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][david-image]][david-url] + + +## Information + +<table> +<tr> +<td>Package</td><td>replace-ext</td> +</tr> +<tr> +<td>Description</td> +<td>Replaces a file extension with another one</td> +</tr> +<tr> +<td>Node Version</td> +<td>>= 0.4</td> +</tr> +</table> + +## Usage + +```javascript +var replaceExt = require('replace-ext'); + +var path = '/some/dir/file.js'; +var npath = replaceExt(path, '.coffee'); + +console.log(npath); // /some/dir/file.coffee +``` + +[npm-url]: https://npmjs.org/package/replace-ext +[npm-image]: https://badge.fury.io/js/replace-ext.png + +[travis-url]: https://travis-ci.org/wearefractal/replace-ext +[travis-image]: https://travis-ci.org/wearefractal/replace-ext.png?branch=master + +[coveralls-url]: https://coveralls.io/r/wearefractal/replace-ext +[coveralls-image]: https://coveralls.io/repos/wearefractal/replace-ext/badge.png + +[depstat-url]: https://david-dm.org/wearefractal/replace-ext +[depstat-image]: https://david-dm.org/wearefractal/replace-ext.png + +[david-url]: https://david-dm.org/wearefractal/replace-ext +[david-image]: https://david-dm.org/wearefractal/replace-ext.png?theme=shields.io
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/index.js b/node_modules/gulp-typescript/node_modules/replace-ext/index.js new file mode 100644 index 000000000..3f76938e4 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/replace-ext/index.js @@ -0,0 +1,9 @@ +var path = require('path'); + +module.exports = function(npath, ext) { + if (typeof npath !== 'string') return npath; + if (npath.length === 0) return npath; + + var nFileName = path.basename(npath, path.extname(npath))+ext; + return path.join(path.dirname(npath), nFileName); +};
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/package.json b/node_modules/gulp-typescript/node_modules/replace-ext/package.json new file mode 100644 index 000000000..307d99b78 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/replace-ext/package.json @@ -0,0 +1,35 @@ +{ + "name":"replace-ext", + "description":"Replaces a file extension with another one", + "version":"0.0.1", + "homepage":"http://github.com/wearefractal/replace-ext", + "repository":"git://github.com/wearefractal/replace-ext.git", + "author":"Fractal <contact@wearefractal.com> (http://wearefractal.com/)", + "main":"./index.js", + + "dependencies":{ + + }, + "devDependencies": { + "mocha": "~1.17.0", + "should": "~3.1.0", + "mocha-lcov-reporter": "~0.0.1", + "coveralls": "~2.6.1", + "istanbul": "~0.2.3", + "rimraf": "~2.2.5", + "jshint": "~2.4.1" + }, + "scripts": { + "test": "mocha --reporter spec && jshint", + "coveralls": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" + }, + "engines": { + "node": ">= 0.4" + }, + "licenses":[ + { + "type":"MIT", + "url":"http://github.com/wearefractal/replace-ext/raw/master/LICENSE" + } + ] +} diff --git a/node_modules/gulp-typescript/node_modules/replace-ext/test/main.js b/node_modules/gulp-typescript/node_modules/replace-ext/test/main.js new file mode 100644 index 000000000..51377021b --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/replace-ext/test/main.js @@ -0,0 +1,51 @@ +var replaceExt = require('../'); +var path = require('path'); +var should = require('should'); +require('mocha'); + +describe('replace-ext', function() { + it('should return a valid replaced extension on nested', function(done) { + var fname = path.join(__dirname, './fixtures/test.coffee'); + var expected = path.join(__dirname, './fixtures/test.js'); + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should return a valid replaced extension on flat', function(done) { + var fname = 'test.coffee'; + var expected = 'test.js'; + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should not return a valid replaced extension on empty string', function(done) { + var fname = ''; + var expected = ''; + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should return a valid removed extension on nested', function(done) { + var fname = path.join(__dirname, './fixtures/test.coffee'); + var expected = path.join(__dirname, './fixtures/test'); + var nu = replaceExt(fname, ''); + should.exist(nu); + nu.should.equal(expected); + done(); + }); + + it('should return a valid added extension on nested', function(done) { + var fname = path.join(__dirname, './fixtures/test'); + var expected = path.join(__dirname, './fixtures/test.js'); + var nu = replaceExt(fname, '.js'); + should.exist(nu); + nu.should.equal(expected); + done(); + }); +}); diff --git a/node_modules/gulp-typescript/node_modules/vinyl/LICENSE b/node_modules/gulp-typescript/node_modules/vinyl/LICENSE new file mode 100644 index 000000000..4f482f9ba --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Fractal <contact@wearefractal.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/gulp-typescript/node_modules/vinyl/README.md b/node_modules/gulp-typescript/node_modules/vinyl/README.md new file mode 100644 index 000000000..2d57d8566 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/README.md @@ -0,0 +1,195 @@ +# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl) +## Information +<table><br><tr><br><td>Package</td><td>vinyl</td><br></tr><br><tr><br><td>Description</td><br><td>A virtual file format</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.9</td><br></tr><br></table> + +## What is this? +Read this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466) + +## File + +```javascript +var File = require('vinyl'); + +var coffeeFile = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee", + contents: new Buffer("test = 123") +}); +``` + +### isVinyl +When checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead. + +```js +var File = require('vinyl'); + +var dummy = new File({stuff}); +var notAFile = {}; + +File.isVinyl(dummy); // true +File.isVinyl(notAFile); // false +``` + +### constructor(options) +#### options.cwd +Type: `String`<br><br>Default: `process.cwd()` + +#### options.base +Used for relative pathing. Typically where a glob starts. + +Type: `String`<br><br>Default: `options.cwd` + +#### options.path +Full path to the file. + +Type: `String`<br><br>Default: `undefined` + +#### options.history +Path history. Has no effect if `options.path` is passed. + +Type: `Array`<br><br>Default: `options.path ? [options.path] : []` + +#### options.stat +The result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information. + +Type: `fs.Stats`<br><br>Default: `null` + +#### options.contents +File contents. + +Type: `Buffer, Stream, or null`<br><br>Default: `null` + +### isBuffer() +Returns true if file.contents is a Buffer. + +### isStream() +Returns true if file.contents is a Stream. + +### isNull() +Returns true if file.contents is null. + +### clone([opt]) +Returns a new File object with all attributes cloned.<br>By default custom attributes are deep-cloned. + +If opt or opt.deep is false, custom attributes will not be deep-cloned. + +If opt.contents is false, it will copy file.contents Buffer's reference. + +### pipe(stream[, opt]) +If file.contents is a Buffer, it will write it to the stream. + +If file.contents is a Stream, it will pipe it to the stream. + +If file.contents is null, it will do nothing. + +If opt.end is false, the destination stream will not be ended (same as node core). + +Returns the stream. + +### inspect() +Returns a pretty String interpretation of the File. Useful for console.log. + +### contents +The [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification. + +For example: + +```js +if (file.isBuffer()) { + console.log(file.contents.toString()); // logs out the string of contents +} +``` + +### path +Absolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`. + +### history +Array of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`. + +### relative +Returns path.relative for the file base and file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.relative); // file.coffee +``` + +### dirname +Gets and sets path.dirname for the file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.dirname); // /test + +file.dirname = '/specs'; + +console.log(file.dirname); // /specs +console.log(file.path); // /specs/file.coffee +` +``` + +### basename +Gets and sets path.basename for the file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.basename); // file.coffee + +file.basename = 'file.js'; + +console.log(file.basename); // file.js +console.log(file.path); // /test/file.js +` +``` + +### extname +Gets and sets path.extname for the file path. + +Example: + +```javascript +var file = new File({ + cwd: "/", + base: "/test/", + path: "/test/file.coffee" +}); + +console.log(file.extname); // .coffee + +file.extname = '.js'; + +console.log(file.extname); // .js +console.log(file.path); // /test/file.js +` +``` + +[npm-url]: https://npmjs.org/package/vinyl +[npm-image]: https://badge.fury.io/js/vinyl.png +[travis-url]: https://travis-ci.org/wearefractal/vinyl +[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master +[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl +[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png +[depstat-url]: https://david-dm.org/wearefractal/vinyl +[depstat-image]: https://david-dm.org/wearefractal/vinyl.png diff --git a/node_modules/gulp-typescript/node_modules/vinyl/index.js b/node_modules/gulp-typescript/node_modules/vinyl/index.js new file mode 100644 index 000000000..c8f113ffe --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/index.js @@ -0,0 +1,213 @@ +var path = require('path'); +var clone = require('clone'); +var cloneStats = require('clone-stats'); +var cloneBuffer = require('./lib/cloneBuffer'); +var isBuffer = require('./lib/isBuffer'); +var isStream = require('./lib/isStream'); +var isNull = require('./lib/isNull'); +var inspectStream = require('./lib/inspectStream'); +var Stream = require('stream'); +var replaceExt = require('replace-ext'); + +function File(file) { + if (!file) file = {}; + + // record path change + var history = file.path ? [file.path] : file.history; + this.history = history || []; + + this.cwd = file.cwd || process.cwd(); + this.base = file.base || this.cwd; + + // stat = files stats object + this.stat = file.stat || null; + + // contents = stream, buffer, or null if not read + this.contents = file.contents || null; + + this._isVinyl = true; +} + +File.prototype.isBuffer = function() { + return isBuffer(this.contents); +}; + +File.prototype.isStream = function() { + return isStream(this.contents); +}; + +File.prototype.isNull = function() { + return isNull(this.contents); +}; + +// TODO: should this be moved to vinyl-fs? +File.prototype.isDirectory = function() { + return this.isNull() && this.stat && this.stat.isDirectory(); +}; + +File.prototype.clone = function(opt) { + 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.pipe(new Stream.PassThrough()); + this.contents = this.contents.pipe(new Stream.PassThrough()); + } else if (this.isBuffer()) { + contents = opt.contents ? cloneBuffer(this.contents) : this.contents; + } + + var file = new File({ + 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) { + // ignore built-in fields + if (key === '_contents' || key === 'stat' || + key === 'history' || key === 'path' || + key === 'base' || key === 'cwd') { + return; + } + file[key] = opt.deep ? clone(this[key], true) : this[key]; + }, this); + return file; +}; + +File.prototype.pipe = function(stream, opt) { + if (!opt) opt = {}; + if (typeof opt.end === 'undefined') opt.end = true; + + if (this.isStream()) { + return this.contents.pipe(stream, opt); + } + if (this.isBuffer()) { + if (opt.end) { + stream.end(this.contents); + } else { + stream.write(this.contents); + } + return stream; + } + + // isNull + if (opt.end) stream.end(); + return stream; +}; + +File.prototype.inspect = function() { + var inspect = []; + + // use relative path if possible + var filePath = (this.base && this.path) ? this.relative : this.path; + + 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(' ')+'>'; +}; + +File.isVinyl = function(file) { + return file && file._isVinyl === true; +}; + +// 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) && !isNull(val)) { + throw new Error('File.contents can only be a Buffer, a Stream, or null.'); + } + this._contents = val; + } +}); + +// TODO: should this be moved to vinyl-fs? +Object.defineProperty(File.prototype, 'relative', { + get: function() { + if (!this.base) throw new Error('No base specified! Can not get relative.'); + 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, path.basename(this.path)); + } +}); + +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(path.dirname(this.path), basename); + } +}); + +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 string'); + + // record history only when path changed + if (path && path !== this.path) { + this.history.push(path); + } + } +}); + +module.exports = File; diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/cloneBuffer.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/cloneBuffer.js new file mode 100644 index 000000000..89f09eda1 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/lib/cloneBuffer.js @@ -0,0 +1,7 @@ +var Buffer = require('buffer').Buffer; + +module.exports = function(buf) { + var out = new Buffer(buf.length); + buf.copy(out); + return out; +}; diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/inspectStream.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/inspectStream.js new file mode 100644 index 000000000..d36df6ff6 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/lib/inspectStream.js @@ -0,0 +1,11 @@ +var isStream = require('./isStream'); + +module.exports = function(stream) { + if (!isStream(stream)) return; + + var streamType = stream.constructor.name; + // avoid StreamStream + if (streamType === 'Stream') streamType = ''; + + return '<'+streamType+'Stream>'; +}; diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/isBuffer.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/isBuffer.js new file mode 100644 index 000000000..8a767d174 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/lib/isBuffer.js @@ -0,0 +1 @@ +module.exports = require('buffer').Buffer.isBuffer; diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/isNull.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/isNull.js new file mode 100644 index 000000000..7f22c63ae --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/lib/isNull.js @@ -0,0 +1,3 @@ +module.exports = function(v) { + return v === null; +}; diff --git a/node_modules/gulp-typescript/node_modules/vinyl/lib/isStream.js b/node_modules/gulp-typescript/node_modules/vinyl/lib/isStream.js new file mode 100644 index 000000000..9ce0929b0 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/lib/isStream.js @@ -0,0 +1,5 @@ +var Stream = require('stream').Stream; + +module.exports = function(o) { + return !!o && o instanceof Stream; +};
\ No newline at end of file diff --git a/node_modules/gulp-typescript/node_modules/vinyl/package.json b/node_modules/gulp-typescript/node_modules/vinyl/package.json new file mode 100644 index 000000000..6000cffb3 --- /dev/null +++ b/node_modules/gulp-typescript/node_modules/vinyl/package.json @@ -0,0 +1,37 @@ +{ + "name": "vinyl", + "description": "A virtual file format", + "version": "0.5.3", + "homepage": "http://github.com/wearefractal/vinyl", + "repository": "git://github.com/wearefractal/vinyl.git", + "author": "Fractal <contact@wearefractal.com> (http://wearefractal.com/)", + "main": "./index.js", + "files": [ + "index.js", + "lib" + ], + "dependencies": { + "clone": "^1.0.0", + "clone-stats": "^0.0.1", + "replace-ext": "0.0.1" + }, + "devDependencies": { + "buffer-equal": "0.0.1", + "event-stream": "^3.1.0", + "istanbul": "^0.3.0", + "istanbul-coveralls": "^1.0.1", + "jshint": "^2.4.1", + "lodash.templatesettings": "^3.1.0", + "mocha": "^2.0.0", + "rimraf": "^2.2.5", + "should": "^7.0.0" + }, + "scripts": { + "test": "mocha && jshint lib", + "coveralls": "istanbul cover _mocha && istanbul-coveralls" + }, + "engines": { + "node": ">= 0.9" + }, + "license": "MIT" +} diff --git a/node_modules/gulp-typescript/package.json b/node_modules/gulp-typescript/package.json index 8845e12c8..715fc2046 100644 --- a/node_modules/gulp-typescript/package.json +++ b/node_modules/gulp-typescript/package.json @@ -1,57 +1,24 @@ { - "_args": [ - [ - { - "raw": "gulp-typescript@^3.0.2", - "scope": null, - "escapedName": "gulp-typescript", - "name": "gulp-typescript", - "rawSpec": "^3.0.2", - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "/home/dold/repos/taler/wallet-webex" - ] - ], - "_from": "gulp-typescript@>=3.0.2 <4.0.0", - "_id": "gulp-typescript@3.0.2", - "_inCache": true, - "_location": "/gulp-typescript", - "_nodeVersion": "6.2.0", - "_npmOperationalInternal": { - "host": "packages-12-west.internal.npmjs.com", - "tmp": "tmp/gulp-typescript-3.0.2.tgz_1475354011112_0.3127239129971713" - }, - "_npmUser": { - "name": "ivogabe", - "email": "ivogabe@ivogabe.nl" - }, - "_npmVersion": "3.8.9", - "_phantomChildren": {}, - "_requested": { - "raw": "gulp-typescript@^3.0.2", - "scope": null, - "escapedName": "gulp-typescript", - "name": "gulp-typescript", - "rawSpec": "^3.0.2", - "spec": ">=3.0.2 <4.0.0", - "type": "range" - }, - "_requiredBy": [ - "#DEV:/" + "name": "gulp-typescript", + "version": "3.1.2", + "description": "A typescript compiler for gulp with incremental compilation support.", + "homepage": "https://github.com/ivogabe/gulp-typescript", + "bugs": "https://github.com/ivogabe/gulp-typescript/issues", + "license": "MIT", + "keywords": [ + "typescript", + "gulpplugin", + "incremental compilation", + "ts", + "tsc", + "compile", + "compiler", + "transpile" ], - "_resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-3.0.2.tgz", - "_shasum": "684cfd75d0df0647514e8679d4f9f34b28df1da5", - "_shrinkwrap": null, - "_spec": "gulp-typescript@^3.0.2", - "_where": "/home/dold/repos/taler/wallet-webex", "author": { "name": "Ivo Gabe de Wolff", "url": "http://ivogabe.com/" }, - "bugs": { - "url": "https://github.com/ivogabe/gulp-typescript/issues" - }, "contributors": [ { "name": "Jesper Jonsson", @@ -86,14 +53,22 @@ "email": "yuisu@microsoft.com" } ], + "main": "release/main.js", + "typings": "release/main.d.ts", "dependencies": { "gulp-util": "~3.0.7", "source-map": "~0.5.3", "through2": "~2.0.1", "vinyl-fs": "~2.4.3" }, - "description": "A typescript compiler for gulp with incremental compilation support.", "devDependencies": { + "@types/chalk": "^0.4.31", + "@types/gulp-util": "^3.0.29", + "@types/node": "^6.0.45", + "@types/source-map": "^0.1.28", + "@types/through2": "^2.0.31", + "@types/vinyl": "^1.2.30", + "@types/vinyl-fs": "0.0.28", "gulp": "~3.9.1", "gulp-concat": "~2.6.0", "gulp-diff": "~1.0.0", @@ -104,44 +79,14 @@ "rimraf": "~2.5.2", "typescript": "2.0.3" }, - "directories": {}, - "dist": { - "shasum": "684cfd75d0df0647514e8679d4f9f34b28df1da5", - "tarball": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-3.0.2.tgz" - }, - "gitHead": "dc2103c51839138e40b5542fcf351c609df86de3", - "homepage": "https://github.com/ivogabe/gulp-typescript", - "keywords": [ - "typescript", - "gulpplugin", - "incremental compilation", - "ts", - "tsc", - "compile", - "compiler", - "transpile" - ], - "license": "MIT", - "main": "release/main.js", - "maintainers": [ - { - "name": "ivogabe", - "email": "ivogabe@ivogabe.nl" - } - ], - "name": "gulp-typescript", - "optionalDependencies": {}, "peerDependencies": { "typescript": "~2.0.3 || >=2.0.0-dev || >=2.1.0-dev" }, - "readme": "ERROR: No README data found!", - "repository": { - "type": "git", - "url": "git+https://github.com/ivogabe/gulp-typescript.git" - }, "scripts": { "test": "gulp" }, - "typings": "release/main.d.ts", - "version": "3.0.2" + "repository": { + "type": "git", + "url": "https://github.com/ivogabe/gulp-typescript.git" + } } diff --git a/node_modules/gulp-typescript/release/file.js b/node_modules/gulp-typescript/release/file.js deleted file mode 100644 index 61eeff7dc..000000000 --- a/node_modules/gulp-typescript/release/file.js +++ /dev/null @@ -1,149 +0,0 @@ -var path = require('path'); -var tsApi = require('./tsapi'); -var utils = require('./utils'); -(function (FileChangeState) { - FileChangeState[FileChangeState["New"] = 0] = "New"; - FileChangeState[FileChangeState["Equal"] = 1] = "Equal"; - FileChangeState[FileChangeState["Modified"] = 2] = "Modified"; - FileChangeState[FileChangeState["Deleted"] = 3] = "Deleted"; - FileChangeState[FileChangeState["NotFound"] = 4] = "NotFound"; -})(exports.FileChangeState || (exports.FileChangeState = {})); -var FileChangeState = exports.FileChangeState; -(function (FileKind) { - FileKind[FileKind["Source"] = 0] = "Source"; - FileKind[FileKind["Config"] = 1] = "Config"; -})(exports.FileKind || (exports.FileKind = {})); -var FileKind = exports.FileKind; -var File; -(function (File) { - function fromContent(fileName, content) { - var kind = FileKind.Source; - if (path.extname(fileName).toLowerCase() === 'json') - kind = FileKind.Config; - return { - fileNameNormalized: utils.normalizePath(fileName), - fileNameOriginal: fileName, - content: content, - kind: kind - }; - } - File.fromContent = fromContent; - function fromGulp(file) { - var str = file.contents.toString('utf8'); - var data = fromContent(file.path, str); - data.gulp = file; - return data; - } - File.fromGulp = fromGulp; - function equal(a, b) { - if (a === undefined || b === undefined) - return a === b; // They could be both undefined. - return (a.fileNameOriginal === b.fileNameOriginal) - && (a.content === b.content); - } - File.equal = equal; - function getChangeState(previous, current) { - if (previous === undefined) { - return current === undefined ? FileChangeState.NotFound : FileChangeState.New; - } - if (current === undefined) { - return FileChangeState.Deleted; - } - if (equal(previous, current)) { - return FileChangeState.Equal; - } - return FileChangeState.Modified; - } - File.getChangeState = getChangeState; -})(File = exports.File || (exports.File = {})); -var FileDictionary = (function () { - function FileDictionary(typescript) { - this.files = {}; - this.typescript = typescript; - } - FileDictionary.prototype.addGulp = function (gFile) { - this.addFile(File.fromGulp(gFile)); - }; - FileDictionary.prototype.addContent = function (fileName, content) { - this.addFile(File.fromContent(fileName, content)); - }; - FileDictionary.prototype.addFile = function (file) { - if (file.kind === FileKind.Source) - this.initTypeScriptSourceFile(file); - this.files[file.fileNameNormalized] = file; - }; - FileDictionary.prototype.getFile = function (name) { - return this.files[utils.normalizePath(name)]; - }; - FileDictionary.prototype.getGulpFileNames = function (onlyGulp) { - if (onlyGulp === void 0) { onlyGulp = false; } - var fileNames = []; - for (var fileName in this.files) { - if (!this.files.hasOwnProperty(fileName)) - continue; - var file = this.files[fileName]; - if (onlyGulp && !file.gulp) - continue; - fileNames.push(file.fileNameOriginal); - } - return fileNames; - }; - return FileDictionary; -})(); -exports.FileDictionary = FileDictionary; -var FileCache = (function () { - function FileCache(typescript, options) { - this.previous = undefined; - this.version = 0; - this.typescript = typescript; - this.options = options; - this.createDictionary(); - } - FileCache.prototype.addGulp = function (gFile) { - this.current.addGulp(gFile); - }; - FileCache.prototype.addContent = function (fileName, content) { - this.current.addContent(fileName, content); - }; - FileCache.prototype.reset = function () { - this.version++; - this.previous = this.current; - this.createDictionary(); - }; - FileCache.prototype.createDictionary = function () { - var _this = this; - this.current = new FileDictionary(this.typescript); - this.current.initTypeScriptSourceFile = function (file) { return _this.initTypeScriptSourceFile(file); }; - }; - FileCache.prototype.initTypeScriptSourceFile = function (file) { - if (this.previous) { - var previous = this.previous.getFile(file.fileNameOriginal); - if (File.equal(previous, file)) { - file.ts = previous.ts; // Re-use previous source file. - return; - } - } - file.ts = tsApi.createSourceFile(this.typescript, file.fileNameOriginal, file.content, this.options.target, this.version + ''); - }; - FileCache.prototype.getFile = function (name) { - return this.current.getFile(name); - }; - FileCache.prototype.getFileChange = function (name) { - var previous; - if (this.previous) { - previous = this.previous.getFile(name); - } - var current = this.current.getFile(name); - return { - previous: previous, - current: current, - state: File.getChangeState(previous, current) - }; - }; - FileCache.prototype.getFileNames = function (onlyGulp) { - if (onlyGulp === void 0) { onlyGulp = false; } - return this.current.getGulpFileNames(onlyGulp); - }; - return FileCache; -})(); -exports.FileCache = FileCache; diff --git a/node_modules/gulp-typescript/release/filter.d.ts b/node_modules/gulp-typescript/release/filter.d.ts deleted file mode 100644 index b6084d11f..000000000 --- a/node_modules/gulp-typescript/release/filter.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Project } from './project'; -import * as main from './main'; -export declare class Filter { - project: Project; - constructor(project: Project, filters: main.FilterSettings); - private mapFilenamesToFiles(filenames); - private getFile(searchFileName); - private referencedFrom; - private referencedFromAll; - match(fileName: string): boolean; - private matchReferencedFrom(filename, file); -} diff --git a/node_modules/gulp-typescript/release/filter.js b/node_modules/gulp-typescript/release/filter.js deleted file mode 100644 index ddd732377..000000000 --- a/node_modules/gulp-typescript/release/filter.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -var tsApi = require('./tsapi'); -var path = require('path'); -var utils = require('./utils'); -var Filter = (function () { - function Filter(project, filters) { - var _this = this; - this.referencedFrom = undefined; - this.referencedFromAll = undefined; - this.project = project; - if (filters.referencedFrom !== undefined) { - this.referencedFrom = this.mapFilenamesToFiles(filters.referencedFrom); - this.referencedFromAll = []; - var addReference_1 = function (file) { - if (_this.referencedFromAll.indexOf(file.fileNameNormalized) !== -1) - return; - _this.referencedFromAll.push(file.fileNameNormalized); - for (var i = 0; i < file.ts.referencedFiles.length; i++) { - var ref = tsApi.getFileName(file.ts.referencedFiles[i]); - ref = utils.normalizePath(path.join(path.dirname(tsApi.getFileName(file.ts)), ref)); - var refFile = _this.project.input.getFile(ref); - if (refFile) - addReference_1(refFile); - } - }; - for (var i = 0; i < this.referencedFrom.length; i++) { - addReference_1(this.referencedFrom[i]); - } - } - } - Filter.prototype.mapFilenamesToFiles = function (filenames) { - var files = []; - for (var i = 0; i < filenames.length; i++) { - var file = this.getFile(filenames[i]); - if (file === undefined) { - console.log('gulp-typescript: Could not find file ' + filenames[i]); - } - else { - files.push(file); - } - } - return files; - }; - Filter.prototype.getFile = function (searchFileName) { - var fileNames = this.project.input.getFileNames(true); - for (var _i = 0, fileNames_1 = fileNames; _i < fileNames_1.length; _i++) { - var fileName = fileNames_1[_i]; - var file = this.project.input.getFile(fileName); - if (!file || !file.gulp) - continue; - var base = path.resolve(process.cwd(), file.gulp.base) + '/'; - if (path.resolve(base, searchFileName) === file.gulp.path) { - return file; - } - } - return undefined; - }; - Filter.prototype.match = function (fileName) { - var fileNameExtensionless = utils.splitExtension(fileName)[0]; - var outputFile = this.project.output.files[utils.normalizePath(fileNameExtensionless)]; - var file; - if (!outputFile) { - file = this.project.input.getFile(fileName); - if (!file) { - console.log('gulp-typescript: Could not find file ' + fileName + '. Make sure you don\'t rename a file before you pass it to ts.filter()'); - return false; - } - } - else { - file = outputFile.original; - } - if (this.referencedFrom !== undefined) { - if (!this.matchReferencedFrom(fileName, file)) { - return false; - } - } - return true; - }; - Filter.prototype.matchReferencedFrom = function (filename, file) { - return this.referencedFromAll.indexOf(file.fileNameNormalized) !== -1; - }; - return Filter; -}()); -exports.Filter = Filter; diff --git a/node_modules/gulp-typescript/release/main.d.ts b/node_modules/gulp-typescript/release/main.d.ts index e67e54bb9..6ee289328 100644 --- a/node_modules/gulp-typescript/release/main.d.ts +++ b/node_modules/gulp-typescript/release/main.d.ts @@ -1,4 +1,3 @@ -/// <reference path="../typings/tsd.d.ts" /> import * as ts from 'typescript'; import * as _project from './project'; import * as _reporter from './reporter'; @@ -34,6 +33,10 @@ declare module compile { typescript?: typeof ts; isolatedModules?: boolean; rootDir?: string; + rootDirs?: any; + lib?: string[]; + experimentalDecorators?: boolean; + [name: string]: any; sourceRoot?: string; } type Project = _project.Project; diff --git a/node_modules/gulp-typescript/release/main.js b/node_modules/gulp-typescript/release/main.js index 501efd5b7..b6e235d7d 100644 --- a/node_modules/gulp-typescript/release/main.js +++ b/node_modules/gulp-typescript/release/main.js @@ -1,4 +1,3 @@ -/// <reference path="../typings/tsd.d.ts" /> "use strict"; var fs = require('fs'); var path = require('path'); @@ -59,7 +58,9 @@ function getCompilerOptions(settings, projectPath, configFileName) { option === 'sortOutput' || option === 'typescript' || option === 'sourceMap' || - option === 'inlineSourceMap') + option === 'inlineSourceMap' || + option === 'sourceRoot' || + option === 'inlineSources') continue; newSettings[option] = settings[option]; } diff --git a/node_modules/gulp-typescript/release/output.d.ts b/node_modules/gulp-typescript/release/output.d.ts index 7109b62f3..f486037d4 100644 --- a/node_modules/gulp-typescript/release/output.d.ts +++ b/node_modules/gulp-typescript/release/output.d.ts @@ -1,3 +1,4 @@ +/// <reference types="node" /> import * as stream from 'stream'; import * as ts from 'typescript'; import * as input from './input'; diff --git a/node_modules/gulp-typescript/release/output.js b/node_modules/gulp-typescript/release/output.js index 679c5b3ce..1331f5a60 100644 --- a/node_modules/gulp-typescript/release/output.js +++ b/node_modules/gulp-typescript/release/output.js @@ -41,7 +41,7 @@ var Output = (function () { var directory = path.dirname(output.path); // gulp-sourcemaps docs: // paths in the generated source map (`file` and `sources`) are relative to `file.base` (e.g. use `file.relative`). - map.file = output.relative; + map.file = utils.forwardSlashes(output.relative); map.sources = map.sources.map(relativeToOutput); delete map.sourceRoot; var generator = sourceMap.SourceMapGenerator.fromSourceMap(new sourceMap.SourceMapConsumer(map)); @@ -70,8 +70,8 @@ var Output = (function () { } return generator.toString(); function relativeToOutput(fileName) { - var absolute = path.resolve(directory, fileName.replace(/\\/g, '/')); - return path.relative(output.base, absolute); + var absolute = path.resolve(directory, fileName); + return utils.forwardSlashes(path.relative(output.base, absolute)); } }; Output.prototype.finish = function (result) { diff --git a/node_modules/gulp-typescript/release/project.d.ts b/node_modules/gulp-typescript/release/project.d.ts index a6d331cd9..c96441314 100644 --- a/node_modules/gulp-typescript/release/project.d.ts +++ b/node_modules/gulp-typescript/release/project.d.ts @@ -1,3 +1,4 @@ +/// <reference types="node" /> import * as stream from 'stream'; import * as ts from 'typescript'; import { Reporter } from './reporter'; diff --git a/node_modules/gulp-typescript/release/reporter.d.ts b/node_modules/gulp-typescript/release/reporter.d.ts index 3dba518e1..5bebd45ad 100644 --- a/node_modules/gulp-typescript/release/reporter.d.ts +++ b/node_modules/gulp-typescript/release/reporter.d.ts @@ -1,3 +1,4 @@ +/// <reference types="node" /> import * as ts from 'typescript'; import { VinylFile } from './types'; export interface TypeScriptError extends Error { diff --git a/node_modules/gulp-typescript/release/reporter.js b/node_modules/gulp-typescript/release/reporter.js index 157b7e70e..1b245d1b7 100644 --- a/node_modules/gulp-typescript/release/reporter.js +++ b/node_modules/gulp-typescript/release/reporter.js @@ -75,7 +75,7 @@ function fullReporter(fullFilename) { + ' ' + gutil.colors.red(typescript.flattenDiagnosticMessageText(error.diagnostic.messageText, '\n'))); if (error.tsFile) { console.error('> ' + gutil.colors.gray('file: ') + (fullFilename ? error.fullFilename : error.relativeFilename) + gutil.colors.gray(':')); - var lines_1 = error.tsFile.text.split(/(\r\n|\r|\n)/); + var lines_1 = error.tsFile.text.split(/(?:\r\n|\r|\n)/); var logLine = function (lineIndex, errorStart, errorEnd) { var line = lines_1[lineIndex]; if (errorEnd === undefined) diff --git a/node_modules/gulp-typescript/release/tsapi.d.ts b/node_modules/gulp-typescript/release/tsapi.d.ts deleted file mode 100644 index da1dc42b5..000000000 --- a/node_modules/gulp-typescript/release/tsapi.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -import * as ts from 'typescript'; -import { CompilationResult } from './reporter'; -export interface TypeScript { - convertCompilerOptionsFromJson?: (jsonOptions: any, basePath: string, configFileName?: string) => { - options: ts.CompilerOptions; - errors: ts.Diagnostic[]; - }; - parseJsonConfigFileContent?: (json: any, host: any, basePath: string) => { - fileNames: string[]; - errors: ts.Diagnostic[]; - }; - sys?: any; -} -export interface TypeScript14 { - createSourceFile(filename: string, content: string, target: ts.ScriptTarget, version: string): any; -} -export interface TypeScript15 { - createSourceFile(fileName: string, content: string, target: ts.ScriptTarget, isOpen: boolean): any; - findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean): string; - flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain15, newLine: string): string; - transpile(input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]): string; -} -export interface TypeScript17 { - parseConfigFileTextToJson(fileName: string, jsonText: string): { - config?: any; - error?: ts.Diagnostic; - }; -} -export declare function parseTsConfig(typescript: TypeScript14 | TypeScript15 | TypeScript17, fileName: string, content: string): { - config?: any; - error?: ts.Diagnostic; -}; -export declare type CreateProgram = (rootNames: string[], options: ts.CompilerOptions, host?: ts.CompilerHost, oldProgram?: ts.Program) => ts.Program; -export interface Program14 { - getDiagnostics(): ts.Diagnostic[]; - getTypeChecker(fullTypeCheckMode: boolean): TypeChecker14; -} -export interface Program15 { - getSyntacticDiagnostics(): ts.Diagnostic[]; - getGlobalDiagnostics(): ts.Diagnostic[]; - getSemanticDiagnostics(): ts.Diagnostic[]; - getDeclarationDiagnostics(): ts.Diagnostic[]; - emit(): { - diagnostics: ts.Diagnostic[]; - emitSkipped: boolean; - }; -} -export interface TypeChecker14 { - getDiagnostics(sourceFile?: ts.SourceFile): ts.Diagnostic[]; - emitFiles(): { - diagnostics: ts.Diagnostic[]; - }; -} -export interface DiagnosticMessageChain15 { - messageText: string; - category: ts.DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain15; -} -export interface TSFile14 { - getLineAndCharacterFromPosition(pos: number): ts.LineAndCharacter; -} -export interface TSFile15 { - getLineAndCharacterOfPosition(pos: number): ts.LineAndCharacter; -} -export interface TSOptions18 { - allowJs?: boolean; - suppressOutputPathCheck?: boolean; -} -export interface TSOptions20 extends TSOptions18 { - baseUrl?: string; - rootDirs?: string[]; -} -export declare function isTS14(typescript: typeof ts): boolean; -export declare function isTS16OrNewer(typescript: typeof ts): boolean; -export declare function getFileName(thing: { - filename: string; -} | { - fileName: string; -}): string; -export declare function getDiagnosticsAndEmit(program: Program14 | Program15): [ts.Diagnostic[], CompilationResult]; -export declare function getLineAndCharacterOfPosition(typescript: typeof ts, file: TSFile14 | TSFile15, position: number): { - line: number; - character: number; -}; -export declare function createSourceFile(typescript: TypeScript14 | TypeScript15, fileName: string, content: string, target: ts.ScriptTarget, version?: string): any; -export declare function flattenDiagnosticMessageText(typescript: TypeScript14 | TypeScript15, messageText: string | DiagnosticMessageChain15): string; -export declare function transpile(typescript: TypeScript14 | TypeScript15, input: string, compilerOptions?: ts.CompilerOptions, fileName?: string, diagnostics?: ts.Diagnostic[]): string; diff --git a/node_modules/gulp-typescript/release/tsapi.js b/node_modules/gulp-typescript/release/tsapi.js deleted file mode 100644 index 6da970c59..000000000 --- a/node_modules/gulp-typescript/release/tsapi.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -var reporter_1 = require('./reporter'); -function parseTsConfig(typescript, fileName, content) { - if ('parseConfigFileTextToJson' in typescript) { - return typescript.parseConfigFileTextToJson(fileName, content); - } - else { - return { - config: JSON.parse(content.replace(/^\uFEFF/, '')) - }; - } -} -exports.parseTsConfig = parseTsConfig; -function isTS14(typescript) { - return !('findConfigFile' in typescript); -} -exports.isTS14 = isTS14; -function isTS16OrNewer(typescript) { - return ('ModuleResolutionKind' in typescript); -} -exports.isTS16OrNewer = isTS16OrNewer; -function getFileName(thing) { - if (thing.filename) - return thing.filename; // TS 1.4 - return thing.fileName; // TS 1.5 -} -exports.getFileName = getFileName; -function getDiagnosticsAndEmit(program) { - var result = reporter_1.emptyCompilationResult(); - if (program.getDiagnostics) { - var errors = program.getDiagnostics(); - result.syntaxErrors = errors.length; - if (!errors.length) { - // If there are no syntax errors, check types - var checker = program.getTypeChecker(true); - var semanticErrors = checker.getDiagnostics(); - var emitErrors = checker.emitFiles().diagnostics; - errors = semanticErrors.concat(emitErrors); - result.semanticErrors = errors.length; - } - else { - result.emitSkipped = true; - } - return [errors, result]; - } - else { - var errors = program.getSyntacticDiagnostics(); - result.syntaxErrors = errors.length; - if (errors.length === 0) { - errors = program.getGlobalDiagnostics(); - // Remove error: "File '...' is not under 'rootDir' '...'. 'rootDir' is expected to contain all source files." - // This is handled by ICompiler#correctSourceMap, so this error can be muted. - errors = errors.filter(function (item) { return item.code !== 6059; }); - result.globalErrors = errors.length; - } - if (errors.length === 0) { - errors = program.getSemanticDiagnostics(); - result.semanticErrors = errors.length; - } - var emitOutput = program.emit(); - result.emitErrors = emitOutput.diagnostics.length; - result.emitSkipped = emitOutput.emitSkipped; - return [errors.concat(emitOutput.diagnostics), result]; - } -} -exports.getDiagnosticsAndEmit = getDiagnosticsAndEmit; -function getLineAndCharacterOfPosition(typescript, file, position) { - if (file.getLineAndCharacterOfPosition) { - var lineAndCharacter = file.getLineAndCharacterOfPosition(position); - return { - line: lineAndCharacter.line + 1, - character: lineAndCharacter.character + 1 - }; - } - else { - return file.getLineAndCharacterFromPosition(position); - } -} -exports.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; -function createSourceFile(typescript, fileName, content, target, version) { - if (version === void 0) { version = '0'; } - if (typescript.findConfigFile) { - return typescript.createSourceFile(fileName, content, target, true); - } - else { - return typescript.createSourceFile(fileName, content, target, version); - } -} -exports.createSourceFile = createSourceFile; -function flattenDiagnosticMessageText(typescript, messageText) { - if (typeof messageText === 'string') { - return messageText; - } - else { - return typescript.flattenDiagnosticMessageText(messageText, "\n"); - } -} -exports.flattenDiagnosticMessageText = flattenDiagnosticMessageText; -function transpile(typescript, input, compilerOptions, fileName, diagnostics) { - if (!typescript.transpile) { - throw new Error('gulp-typescript: Single file compilation is not supported using TypeScript 1.4'); - } - return typescript.transpile(input, compilerOptions, fileName.replace(/\\/g, '/'), diagnostics); -} -exports.transpile = transpile; diff --git a/node_modules/gulp-typescript/release/tsconfig.d.ts b/node_modules/gulp-typescript/release/tsconfig.d.ts deleted file mode 100644 index dbf30be76..000000000 --- a/node_modules/gulp-typescript/release/tsconfig.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface TsConfig { - files?: string[]; - exclude?: string[]; - compilerOptions?: any; -} diff --git a/node_modules/gulp-typescript/release/tsconfig.js b/node_modules/gulp-typescript/release/tsconfig.js deleted file mode 100644 index 3918c74e4..000000000 --- a/node_modules/gulp-typescript/release/tsconfig.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; diff --git a/node_modules/gulp-typescript/release/types.d.ts b/node_modules/gulp-typescript/release/types.d.ts index 8b19cf69a..6d8c2ea11 100644 --- a/node_modules/gulp-typescript/release/types.d.ts +++ b/node_modules/gulp-typescript/release/types.d.ts @@ -23,6 +23,6 @@ export interface RawSourceMap { version: string; sources: string[]; names: string[]; - sourcesContent?: string; + sourcesContent?: string[]; mappings: string; } diff --git a/node_modules/gulp-typescript/release/utils.d.ts b/node_modules/gulp-typescript/release/utils.d.ts index 7f40e33f9..de309db57 100644 --- a/node_modules/gulp-typescript/release/utils.d.ts +++ b/node_modules/gulp-typescript/release/utils.d.ts @@ -4,6 +4,7 @@ import * as reporter from './reporter'; export interface Map<T> { [key: string]: T; } +export declare function forwardSlashes(fileName: string): string; export declare function normalizePath(pathString: string): string; /** * Splits a filename into an extensionless filename and an extension. diff --git a/node_modules/gulp-typescript/release/utils.js b/node_modules/gulp-typescript/release/utils.js index fbd442b42..8185ab432 100644 --- a/node_modules/gulp-typescript/release/utils.js +++ b/node_modules/gulp-typescript/release/utils.js @@ -1,6 +1,10 @@ "use strict"; var path = require('path'); var gutil = require('gulp-util'); +function forwardSlashes(fileName) { + return fileName.replace(/\\/g, '/'); +} +exports.forwardSlashes = forwardSlashes; function normalizePath(pathString) { return path.normalize(pathString).toLowerCase(); } diff --git a/node_modules/gulp-typescript/release/vinyl-file.d.ts b/node_modules/gulp-typescript/release/vinyl-file.d.ts deleted file mode 100644 index 8d70314e3..000000000 --- a/node_modules/gulp-typescript/release/vinyl-file.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import Vinyl = require('vinyl'); -export interface VinylFile extends Vinyl { - sourceMap?: any; -} diff --git a/node_modules/gulp-typescript/release/vinyl-file.js b/node_modules/gulp-typescript/release/vinyl-file.js deleted file mode 100644 index 3918c74e4..000000000 --- a/node_modules/gulp-typescript/release/vinyl-file.js +++ /dev/null @@ -1 +0,0 @@ -"use strict"; diff --git a/node_modules/gulp-typescript/tsd.json b/node_modules/gulp-typescript/tsd.json deleted file mode 100644 index 1672366a1..000000000 --- a/node_modules/gulp-typescript/tsd.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "version": "v4", - "repo": "borisyankov/DefinitelyTyped", - "ref": "master", - "path": "typings", - "bundle": "typings/tsd.d.ts", - "installed": { - "node/node.d.ts": { - "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" - }, - "vinyl-fs/vinyl-fs.d.ts": { - "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" - }, - "gulp-util/gulp-util.d.ts": { - "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" - }, - "source-map/source-map.d.ts": { - "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" - }, - "through2/through2.d.ts": { - "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" - }, - "vinyl/vinyl.d.ts": { - "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" - }, - "chalk/chalk.d.ts": { - "commit": "6f6e5c7dd9effe21fee14eb65fe340ecbbc8580a" - } - } -} |