nav tabs on admin dashboard
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
Copyright 2017-2018 James Long
|
||||
Copyright © James Long and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
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.
|
||||
|
||||
+36
-36
@@ -4,56 +4,56 @@
|
||||
|
||||
<p align="center">
|
||||
<em>
|
||||
JavaScript
|
||||
· Flow
|
||||
· TypeScript
|
||||
· CSS
|
||||
· SCSS
|
||||
· Less
|
||||
· JSX
|
||||
· Vue
|
||||
· GraphQL
|
||||
· JSON
|
||||
· Markdown
|
||||
· YAML
|
||||
· <a href="https://prettier.io/docs/en/plugins.html">
|
||||
JavaScript
|
||||
· TypeScript
|
||||
· Flow
|
||||
· JSX
|
||||
· JSON
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
CSS
|
||||
· SCSS
|
||||
· Less
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
HTML
|
||||
· Vue
|
||||
· Angular
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
GraphQL
|
||||
· Markdown
|
||||
· YAML
|
||||
</em>
|
||||
<br />
|
||||
<em>
|
||||
<a href="https://prettier.io/docs/en/plugins.html">
|
||||
Your favorite language?
|
||||
</a>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/prettier/prettier">
|
||||
<img alt="Travis CI Build Status" src="https://img.shields.io/travis/prettier/prettier/master.svg?style=flat-square&label=Travis+CI">
|
||||
</a>
|
||||
<a href="https://circleci.com/gh/prettier/prettier">
|
||||
<img alt="CircleCI Build Status" src="https://img.shields.io/circleci/project/github/prettier/prettier/master.svg?style=flat-square&label=CircleCI">
|
||||
</a>
|
||||
<a href="https://ci.appveyor.com/project/prettier/prettier">
|
||||
<img alt="AppVeyor Build Status" src="https://img.shields.io/appveyor/ci/prettier/prettier.svg?style=flat-square&label=AppVeyor">
|
||||
</a>
|
||||
<a href="https://dev.azure.com/prettier/prettier/_build/latest?definitionId=5">
|
||||
<img alt="Azure Pipelines Build Status" src="https://img.shields.io/azure-devops/build/prettier/79013671-677c-4846-a6d8-3050d40e21c0/5.svg?style=flat-square&label=build&branchName=master"></a>
|
||||
<a href="https://codecov.io/gh/prettier/prettier">
|
||||
<img alt="Codecov Coverage Status" src="https://img.shields.io/codecov/c/github/prettier/prettier.svg?style=flat-square">
|
||||
</a>
|
||||
<img alt="Codecov Coverage Status" src="https://img.shields.io/codecov/c/github/prettier/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://twitter.com/acdlite/status/974390255393505280">
|
||||
<img alt="Blazing Fast" src="https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat-square">
|
||||
</a>
|
||||
<img alt="Blazing Fast" src="https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat-square"></a>
|
||||
<br/>
|
||||
<a href="https://www.npmjs.com/package/prettier">
|
||||
<img alt="npm version" src="https://img.shields.io/npm/v/prettier.svg?style=flat-square">
|
||||
</a>
|
||||
<img alt="npm version" src="https://img.shields.io/npm/v/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://www.npmjs.com/package/prettier">
|
||||
<img alt="monthly downloads from npm" src="https://img.shields.io/npm/dm/prettier.svg?style=flat-square">
|
||||
</a>
|
||||
<img alt="weekly downloads from npm" src="https://img.shields.io/npm/dw/prettier.svg?style=flat-square"></a>
|
||||
<a href="#badge">
|
||||
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square">
|
||||
</a>
|
||||
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a>
|
||||
<a href="https://gitter.im/jlongster/prettier">
|
||||
<img alt="Chat on Gitter" src="https://img.shields.io/gitter/room/jlongster/prettier.svg?style=flat-square">
|
||||
</a>
|
||||
<img alt="Chat on Gitter" src="https://img.shields.io/gitter/room/jlongster/prettier.svg?style=flat-square"></a>
|
||||
<a href="https://twitter.com/PrettierCode">
|
||||
<img alt="Follow Prettier on Twitter" src="https://img.shields.io/twitter/follow/prettiercode.svg?label=follow+prettier&style=flat-square">
|
||||
</a>
|
||||
<img alt="Follow Prettier on Twitter" src="https://img.shields.io/twitter/follow/prettiercode.svg?label=follow+prettier&style=flat-square"></a>
|
||||
</p>
|
||||
|
||||
## Intro
|
||||
|
||||
+10706
-3806
File diff suppressed because one or more lines are too long
+10606
-3139
File diff suppressed because one or more lines are too long
+13
-13
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"_from": "prettier@^1.7.0",
|
||||
"_id": "prettier@1.14.3",
|
||||
"_from": "prettier@1.16.3",
|
||||
"_id": "prettier@1.16.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg==",
|
||||
"_integrity": "sha512-kn/GU6SMRYPxUakNXhpP0EedT/KmaPzr0H5lIsDogrykbaxOpOfAFfk5XA7DZrJyMAv1wlMV3CPcZruGXVVUZw==",
|
||||
"_location": "/prettier",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "prettier@^1.7.0",
|
||||
"raw": "prettier@1.16.3",
|
||||
"name": "prettier",
|
||||
"escapedName": "prettier",
|
||||
"rawSpec": "^1.7.0",
|
||||
"rawSpec": "1.16.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.7.0"
|
||||
"fetchSpec": "1.16.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/vue-loader"
|
||||
"/@vue/component-compiler-utils"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.3.tgz",
|
||||
"_shasum": "90238dd4c0684b7edce5f83b0fb7328e48bd0895",
|
||||
"_spec": "prettier@^1.7.0",
|
||||
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\vue-loader",
|
||||
"_resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.3.tgz",
|
||||
"_shasum": "8c62168453badef702f34b45b6ee899574a6a65d",
|
||||
"_spec": "prettier@1.16.3",
|
||||
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\@vue\\component-compiler-utils",
|
||||
"author": {
|
||||
"name": "James Long"
|
||||
},
|
||||
@@ -54,5 +54,5 @@
|
||||
"scripts": {
|
||||
"prepublishOnly": "node -e \"assert.equal(require('.').version, require('..').version)\""
|
||||
},
|
||||
"version": "1.14.3"
|
||||
"version": "1.16.3"
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
+2569
-2965
File diff suppressed because it is too large
Load Diff
+1
-1
File diff suppressed because one or more lines are too long
-1
@@ -1 +0,0 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.vue=e())}(this,function(){"use strict";var t=function(t){return/^\s*<!--\s*@(format|prettier)\s*-->/.test(t)};function e(t,e){for(var n=Object.create(null),r=t.split(","),a=r.length,o=0;o<a;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var n=function(){return!1},r=e("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),a=/^\s*([^\s"'<>/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,o="[a-zA-Z_][\\w\\-\\.]*",s="((?:".concat(o,"\\:)?").concat(o,")"),i=new RegExp("^<".concat(s)),c=/^\s*(\/?)>/,u=new RegExp("^<\\/".concat(s,"[^>]*>")),l=/^<!DOCTYPE [^>]+>/i,f=/^<!--/,d=/^<!\[/,h=!1;"x".replace(/x(.)?/g,function(t,e){h=""===e});var g=e("script,style,textarea",!0),p={},v={"<":"<",">":">",""":'"',"&":"&"," ":"\n","	":"\t"},m=/&(?:lt|gt|quot|amp);/g,x=/&(?:lt|gt|quot|amp|#10|#9);/g,y=e("pre,textarea",!0),w=function(t,e){return t&&y(t)&&"\n"===e[0]};function b(t,e){var n=e?x:m;return t.replace(n,function(t){return v[t]})}return{parsers:{vue:{parse:function(t){var e={tag:"root",attrs:[],unary:!1,start:0,contentStart:0,contentEnd:t.length,end:t.length,children:[],comments:[]},o=[e],s=e;return function(t,e){for(var o,s,v=[],m=e.expectHTML,x=e.isUnaryTag||n,y=e.canBeLeftOpenTag||n,C=0;t;){if(o=t,s&&g(s))!function(){var n=0,r=s.toLowerCase(),a=p[r]||(p[r]=new RegExp("([\\s\\S]*?)(</"+r+"[^>]*>)","i")),o=t.replace(a,function(t,a,o){return n=o.length,g(r)||"noscript"===r||(a=a.replace(/<!--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),w(r,a)&&(a=a.slice(1)),e.chars&&e.chars(a),""});C+=t.length-o.length,t=o,F(r,C-n,C)}();else{var O=t.indexOf("<");if(0===O){if(f.test(t)){var S=t.indexOf("--\x3e");if(S>=0){e.shouldKeepComment&&e.comment(t.substring(4,S)),k(S+3);continue}}if(d.test(t)){var E=t.indexOf("]>");if(E>=0){k(E+2);continue}}var T=t.match(l);if(T){k(T[0].length);continue}var L=t.match(u);if(L){var P=C;k(L[0].length),F(L[1],P,C);continue}var q=R();if(q){j(q),w(s,t)&&k(1);continue}}var A=void 0,D=void 0,N=void 0;if(O>=0){for(D=t.slice(O);!(u.test(D)||i.test(D)||f.test(D)||d.test(D)||(N=D.indexOf("<",1))<0);)O+=N,D=t.slice(O);A=t.substring(0,O),k(O)}O<0&&(A=t,t=""),e.chars&&A&&e.chars(A)}if(t===o){e.chars&&e.chars(t);break}}function k(e){C+=e,t=t.substring(e)}function R(){var e=t.match(i);if(e){var n,r,o={tagName:e[1],attrs:[],start:C};for(k(e[0].length);!(n=t.match(c))&&(r=t.match(a));)k(r[0].length),o.attrs.push(r);if(n)return o.unarySlash=n[1],k(n[0].length),o.end=C,o}}function j(t){var n=t.tagName,a=t.unarySlash;m&&("p"===s&&r(n)&&F(s),y(n)&&s===n&&F(n));for(var o=x(n)||!!a,i=t.attrs.length,c=new Array(i),u=0;u<i;u++){var l=t.attrs[u];h&&-1===l[0].indexOf('""')&&(""===l[3]&&delete l[3],""===l[4]&&delete l[4],""===l[5]&&delete l[5]);var f=l[3]||l[4]||l[5]||"",d="a"===n&&"href"===l[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;c[u]={name:l[1],value:b(f,d)}}o||(v.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:c}),s=n),e.start&&e.start(n,c,o,t.start,t.end)}function F(t,n,r){var a,o;if(null==n&&(n=C),null==r&&(r=C),t&&(o=t.toLowerCase()),t)for(a=v.length-1;a>=0&&v[a].lowerCasedTag!==o;a--);else a=0;if(a>=0){for(var i=v.length-1;i>=a;i--)e.end&&e.end(v[i].tag,n,r);v.length=a,s=a&&v[a-1].tag}else"br"===o?e.start&&e.start(t,[],!0,n,r):"p"===o&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}F()}(t,{start:function(t,e,n,r,a){var i={tag:t,attrs:e,unary:n,start:r,children:[]};s.children.push(i),n?i.end=a:(i.contentStart=a,o.push(i),s=i)},end:function(t,e,n){o.pop(),s.contentEnd=e,s.end=n,s=o[o.length-1]}}),e},hasPragma:t,astFormat:"vue",locStart:function(t){return t.start},locEnd:function(t){return t.end}}}}});
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+18196
-8627
File diff suppressed because one or more lines are too long
+689
-151
@@ -2,141 +2,12 @@
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var stream = _interopDefault(require('stream'));
|
||||
var os = _interopDefault(require('os'));
|
||||
var path = _interopDefault(require('path'));
|
||||
var util = _interopDefault(require('util'));
|
||||
var module$1 = _interopDefault(require('module'));
|
||||
var fs = _interopDefault(require('fs'));
|
||||
|
||||
function commonjsRequire () {
|
||||
throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
var bufferStream = createCommonjsModule(function (module) {
|
||||
'use strict';
|
||||
|
||||
var PassThrough = stream.PassThrough;
|
||||
|
||||
module.exports = function (opts) {
|
||||
opts = Object.assign({}, opts);
|
||||
var array = opts.array;
|
||||
var encoding = opts.encoding;
|
||||
var buffer = encoding === 'buffer';
|
||||
var objectMode = false;
|
||||
|
||||
if (array) {
|
||||
objectMode = !(encoding || buffer);
|
||||
} else {
|
||||
encoding = encoding || 'utf8';
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
encoding = null;
|
||||
}
|
||||
|
||||
var len = 0;
|
||||
var ret = [];
|
||||
var stream$$1 = new PassThrough({
|
||||
objectMode
|
||||
});
|
||||
|
||||
if (encoding) {
|
||||
stream$$1.setEncoding(encoding);
|
||||
}
|
||||
|
||||
stream$$1.on('data', function (chunk) {
|
||||
ret.push(chunk);
|
||||
|
||||
if (objectMode) {
|
||||
len = ret.length;
|
||||
} else {
|
||||
len += chunk.length;
|
||||
}
|
||||
});
|
||||
|
||||
stream$$1.getBufferedValue = function () {
|
||||
if (array) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return buffer ? Buffer.concat(ret, len) : ret.join('');
|
||||
};
|
||||
|
||||
stream$$1.getBufferedLength = function () {
|
||||
return len;
|
||||
};
|
||||
|
||||
return stream$$1;
|
||||
};
|
||||
});
|
||||
|
||||
function getStream(inputStream, opts) {
|
||||
if (!inputStream) {
|
||||
return Promise.reject(new Error('Expected a stream'));
|
||||
}
|
||||
|
||||
opts = Object.assign({
|
||||
maxBuffer: Infinity
|
||||
}, opts);
|
||||
var maxBuffer = opts.maxBuffer;
|
||||
var stream$$1;
|
||||
var clean;
|
||||
var p = new Promise(function (resolve, reject) {
|
||||
var error = function error(err) {
|
||||
if (err) {
|
||||
// null check
|
||||
err.bufferedData = stream$$1.getBufferedValue();
|
||||
}
|
||||
|
||||
reject(err);
|
||||
};
|
||||
|
||||
stream$$1 = bufferStream(opts);
|
||||
inputStream.once('error', error);
|
||||
inputStream.pipe(stream$$1);
|
||||
stream$$1.on('data', function () {
|
||||
if (stream$$1.getBufferedLength() > maxBuffer) {
|
||||
reject(new Error('maxBuffer exceeded'));
|
||||
}
|
||||
});
|
||||
stream$$1.once('error', error);
|
||||
stream$$1.on('end', resolve);
|
||||
|
||||
clean = function clean() {
|
||||
// some streams doesn't implement the `stream.Readable` interface correctly
|
||||
if (inputStream.unpipe) {
|
||||
inputStream.unpipe(stream$$1);
|
||||
}
|
||||
};
|
||||
});
|
||||
p.then(clean, clean);
|
||||
return p.then(function () {
|
||||
return stream$$1.getBufferedValue();
|
||||
});
|
||||
}
|
||||
|
||||
var getStream_1 = getStream;
|
||||
|
||||
var buffer = function buffer(stream$$1, opts) {
|
||||
return getStream(stream$$1, Object.assign({}, opts, {
|
||||
encoding: 'buffer'
|
||||
}));
|
||||
};
|
||||
|
||||
var array = function array(stream$$1, opts) {
|
||||
return getStream(stream$$1, Object.assign({}, opts, {
|
||||
array: true
|
||||
}));
|
||||
};
|
||||
|
||||
getStream_1.buffer = buffer;
|
||||
getStream_1.array = array;
|
||||
var stream = _interopDefault(require('stream'));
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
@@ -160,6 +31,201 @@ function _createClass(Constructor, protoProps, staticProps) {
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
function _toArray(arr) {
|
||||
return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();
|
||||
}
|
||||
|
||||
function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
|
||||
function _iterableToArray(iter) {
|
||||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
||||
}
|
||||
|
||||
function _nonIterableRest() {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
}
|
||||
|
||||
function _toPrimitive(input, hint) {
|
||||
if (typeof input !== "object" || input === null) return input;
|
||||
var prim = input[Symbol.toPrimitive];
|
||||
|
||||
if (prim !== undefined) {
|
||||
var res = prim.call(input, hint || "default");
|
||||
if (typeof res !== "object") return res;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
|
||||
return (hint === "string" ? String : Number)(input);
|
||||
}
|
||||
|
||||
function _toPropertyKey(arg) {
|
||||
var key = _toPrimitive(arg, "string");
|
||||
|
||||
return typeof key === "symbol" ? key : String(key);
|
||||
}
|
||||
|
||||
function _addElementPlacement(element, placements, silent) {
|
||||
var keys = placements[element.placement];
|
||||
|
||||
if (!silent && keys.indexOf(element.key) !== -1) {
|
||||
throw new TypeError("Duplicated element (" + element.key + ")");
|
||||
}
|
||||
|
||||
keys.push(element.key);
|
||||
}
|
||||
|
||||
function _fromElementDescriptor(element) {
|
||||
var obj = {
|
||||
kind: element.kind,
|
||||
key: element.key,
|
||||
placement: element.placement,
|
||||
descriptor: element.descriptor
|
||||
};
|
||||
var desc = {
|
||||
value: "Descriptor",
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
||||
if (element.kind === "field") obj.initializer = element.initializer;
|
||||
return obj;
|
||||
}
|
||||
|
||||
function _toElementDescriptors(elementObjects) {
|
||||
if (elementObjects === undefined) return;
|
||||
return _toArray(elementObjects).map(function (elementObject) {
|
||||
var element = _toElementDescriptor(elementObject);
|
||||
|
||||
_disallowProperty(elementObject, "finisher", "An element descriptor");
|
||||
|
||||
_disallowProperty(elementObject, "extras", "An element descriptor");
|
||||
|
||||
return element;
|
||||
});
|
||||
}
|
||||
|
||||
function _toElementDescriptor(elementObject) {
|
||||
var kind = String(elementObject.kind);
|
||||
|
||||
if (kind !== "method" && kind !== "field") {
|
||||
throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
|
||||
}
|
||||
|
||||
var key = _toPropertyKey(elementObject.key);
|
||||
|
||||
var placement = String(elementObject.placement);
|
||||
|
||||
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
|
||||
throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
|
||||
}
|
||||
|
||||
var descriptor = elementObject.descriptor;
|
||||
|
||||
_disallowProperty(elementObject, "elements", "An element descriptor");
|
||||
|
||||
var element = {
|
||||
kind: kind,
|
||||
key: key,
|
||||
placement: placement,
|
||||
descriptor: Object.assign({}, descriptor)
|
||||
};
|
||||
|
||||
if (kind !== "field") {
|
||||
_disallowProperty(elementObject, "initializer", "A method descriptor");
|
||||
} else {
|
||||
_disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
|
||||
|
||||
_disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
|
||||
|
||||
_disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
|
||||
|
||||
element.initializer = elementObject.initializer;
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
function _toElementFinisherExtras(elementObject) {
|
||||
var element = _toElementDescriptor(elementObject);
|
||||
|
||||
var finisher = _optionalCallableProperty(elementObject, "finisher");
|
||||
|
||||
var extras = _toElementDescriptors(elementObject.extras);
|
||||
|
||||
return {
|
||||
element: element,
|
||||
finisher: finisher,
|
||||
extras: extras
|
||||
};
|
||||
}
|
||||
|
||||
function _fromClassDescriptor(elements) {
|
||||
var obj = {
|
||||
kind: "class",
|
||||
elements: elements.map(_fromElementDescriptor)
|
||||
};
|
||||
var desc = {
|
||||
value: "Descriptor",
|
||||
configurable: true
|
||||
};
|
||||
Object.defineProperty(obj, Symbol.toStringTag, desc);
|
||||
return obj;
|
||||
}
|
||||
|
||||
function _toClassDescriptor(obj) {
|
||||
var kind = String(obj.kind);
|
||||
|
||||
if (kind !== "class") {
|
||||
throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
|
||||
}
|
||||
|
||||
_disallowProperty(obj, "key", "A class descriptor");
|
||||
|
||||
_disallowProperty(obj, "placement", "A class descriptor");
|
||||
|
||||
_disallowProperty(obj, "descriptor", "A class descriptor");
|
||||
|
||||
_disallowProperty(obj, "initializer", "A class descriptor");
|
||||
|
||||
_disallowProperty(obj, "extras", "A class descriptor");
|
||||
|
||||
var finisher = _optionalCallableProperty(obj, "finisher");
|
||||
|
||||
var elements = _toElementDescriptors(obj.elements);
|
||||
|
||||
return {
|
||||
elements: elements,
|
||||
finisher: finisher
|
||||
};
|
||||
}
|
||||
|
||||
function _disallowProperty(obj, name, objectType) {
|
||||
if (obj[name] !== undefined) {
|
||||
throw new TypeError(objectType + " can't have a ." + name + " property.");
|
||||
}
|
||||
}
|
||||
|
||||
function _optionalCallableProperty(obj, name) {
|
||||
var value = obj[name];
|
||||
|
||||
if (value !== undefined && typeof value !== "function") {
|
||||
throw new TypeError("Expected '" + name + "' to be a function");
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
function commonjsRequire () {
|
||||
throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
var isArrayish = function isArrayish(obj) {
|
||||
if (!obj) {
|
||||
return false;
|
||||
@@ -211,17 +277,25 @@ var errorEx = function errorEx(name, properties) {
|
||||
message = v;
|
||||
}
|
||||
});
|
||||
var overwrittenStack = null;
|
||||
var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
|
||||
var stackGetter = stackDescriptor.get;
|
||||
var stackValue = stackDescriptor.value;
|
||||
delete stackDescriptor.value;
|
||||
delete stackDescriptor.writable;
|
||||
|
||||
stackDescriptor.set = function (newstack) {
|
||||
overwrittenStack = newstack;
|
||||
};
|
||||
|
||||
stackDescriptor.get = function () {
|
||||
var stack = stackGetter ? stackGetter.call(this).split(/\r?\n+/g) : stackValue.split(/\r?\n+/g); // starting in Node 7, the stack builder caches the message.
|
||||
var stack = (overwrittenStack || (stackGetter ? stackGetter.call(this) : stackValue)).split(/\r?\n+/g); // starting in Node 7, the stack builder caches the message.
|
||||
// just replace it.
|
||||
|
||||
stack[0] = this.name + ': ' + this.message;
|
||||
if (!overwrittenStack) {
|
||||
stack[0] = this.name + ': ' + this.message;
|
||||
}
|
||||
|
||||
var lineCount = 1;
|
||||
|
||||
for (var key in properties) {
|
||||
@@ -922,17 +996,19 @@ var int_1 = new type('tag:yaml.org,2002:int', {
|
||||
construct: constructYamlInteger,
|
||||
predicate: isInteger,
|
||||
represent: {
|
||||
binary: function binary(object) {
|
||||
return '0b' + object.toString(2);
|
||||
binary: function binary(obj) {
|
||||
return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1);
|
||||
},
|
||||
octal: function octal(object) {
|
||||
return '0' + object.toString(8);
|
||||
octal: function octal(obj) {
|
||||
return obj >= 0 ? '0' + obj.toString(8) : '-0' + obj.toString(8).slice(1);
|
||||
},
|
||||
decimal: function decimal(object) {
|
||||
return object.toString(10);
|
||||
decimal: function decimal(obj) {
|
||||
return obj.toString(10);
|
||||
},
|
||||
hexadecimal: function hexadecimal(object) {
|
||||
return '0x' + object.toString(16).toUpperCase();
|
||||
|
||||
/* eslint-disable max-len */
|
||||
hexadecimal: function hexadecimal(obj) {
|
||||
return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1);
|
||||
}
|
||||
},
|
||||
defaultStyle: 'decimal',
|
||||
@@ -1525,7 +1601,7 @@ function resolveJavascriptFunction(data) {
|
||||
range: true
|
||||
});
|
||||
|
||||
if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || ast.body[0].expression.type !== 'FunctionExpression') {
|
||||
if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || ast.body[0].expression.type !== 'ArrowFunctionExpression' && ast.body[0].expression.type !== 'FunctionExpression') {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1544,7 +1620,7 @@ function constructJavascriptFunction(data) {
|
||||
params = [],
|
||||
body;
|
||||
|
||||
if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || ast.body[0].expression.type !== 'FunctionExpression') {
|
||||
if (ast.type !== 'Program' || ast.body.length !== 1 || ast.body[0].type !== 'ExpressionStatement' || ast.body[0].expression.type !== 'ArrowFunctionExpression' && ast.body[0].expression.type !== 'FunctionExpression') {
|
||||
throw new Error('Failed to resolve function');
|
||||
}
|
||||
|
||||
@@ -1554,9 +1630,16 @@ function constructJavascriptFunction(data) {
|
||||
body = ast.body[0].expression.body.range; // Esprima's ranges include the first '{' and the last '}' characters on
|
||||
// function expressions. So cut them out.
|
||||
|
||||
if (ast.body[0].expression.body.type === 'BlockStatement') {
|
||||
/*eslint-disable no-new-func*/
|
||||
return new Function(params, source.slice(body[0] + 1, body[1] - 1));
|
||||
} // ES6 arrow functions can omit the BlockStatement. In that case, just return
|
||||
// the body.
|
||||
|
||||
/*eslint-disable no-new-func*/
|
||||
|
||||
return new Function(params, source.slice(body[0] + 1, body[1] - 1));
|
||||
|
||||
return new Function(params, 'return ' + source.slice(body[0], body[1]));
|
||||
}
|
||||
|
||||
function representJavascriptFunction(object
|
||||
@@ -3492,6 +3575,12 @@ function isPlainSafeFirst(c) {
|
||||
&& c !== CHAR_MINUS && c !== CHAR_QUESTION && c !== CHAR_COLON && c !== CHAR_COMMA && c !== CHAR_LEFT_SQUARE_BRACKET && c !== CHAR_RIGHT_SQUARE_BRACKET && c !== CHAR_LEFT_CURLY_BRACKET && c !== CHAR_RIGHT_CURLY_BRACKET // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “"”
|
||||
&& c !== CHAR_SHARP && c !== CHAR_AMPERSAND && c !== CHAR_ASTERISK && c !== CHAR_EXCLAMATION && c !== CHAR_VERTICAL_LINE && c !== CHAR_GREATER_THAN && c !== CHAR_SINGLE_QUOTE && c !== CHAR_DOUBLE_QUOTE // | “%” | “@” | “`”)
|
||||
&& c !== CHAR_PERCENT && c !== CHAR_COMMERCIAL_AT && c !== CHAR_GRAVE_ACCENT;
|
||||
} // Determines whether block indentation indicator is required.
|
||||
|
||||
|
||||
function needIndentIndicator(string) {
|
||||
var leadingSpaceRe = /^\n* /;
|
||||
return leadingSpaceRe.test(string);
|
||||
}
|
||||
|
||||
var STYLE_PLAIN = 1;
|
||||
@@ -3563,7 +3652,7 @@ function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, te
|
||||
} // Edge case: block indentation indicator can only have one digit.
|
||||
|
||||
|
||||
if (string[0] === ' ' && indentPerLevel > 9) {
|
||||
if (indentPerLevel > 9 && needIndentIndicator(string)) {
|
||||
return STYLE_DOUBLE;
|
||||
} // At this point we know block styles are valid.
|
||||
// Prefer literal style unless we want to fold.
|
||||
@@ -3630,7 +3719,7 @@ function writeScalar(state, string, level, iskey) {
|
||||
|
||||
|
||||
function blockHeader(string, indentPerLevel) {
|
||||
var indentIndicator = string[0] === ' ' ? String(indentPerLevel) : ''; // note the special case: the string '\n' counts as a "trailing" empty line.
|
||||
var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; // note the special case: the string '\n' counts as a "trailing" empty line.
|
||||
|
||||
var clip = string[string.length - 1] === '\n';
|
||||
var keep = clip && (string[string.length - 2] === '\n' || string === '\n');
|
||||
@@ -4139,9 +4228,118 @@ var jsYaml$2 = {
|
||||
|
||||
var jsYaml = jsYaml$2;
|
||||
|
||||
function loadJs(filepath) {
|
||||
var result = require(filepath);
|
||||
var resolveFrom_1 = createCommonjsModule(function (module) {
|
||||
'use strict';
|
||||
|
||||
var resolveFrom = function resolveFrom(fromDir, moduleId, silent) {
|
||||
if (typeof fromDir !== 'string') {
|
||||
throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDir}\``);
|
||||
}
|
||||
|
||||
if (typeof moduleId !== 'string') {
|
||||
throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``);
|
||||
}
|
||||
|
||||
fromDir = path.resolve(fromDir);
|
||||
var fromFile = path.join(fromDir, 'noop.js');
|
||||
|
||||
var resolveFileName = function resolveFileName() {
|
||||
return module$1._resolveFilename(moduleId, {
|
||||
id: fromFile,
|
||||
filename: fromFile,
|
||||
paths: module$1._nodeModulePaths(fromDir)
|
||||
});
|
||||
};
|
||||
|
||||
if (silent) {
|
||||
try {
|
||||
return resolveFileName();
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return resolveFileName();
|
||||
};
|
||||
|
||||
module.exports = function (fromDir, moduleId) {
|
||||
return resolveFrom(fromDir, moduleId);
|
||||
};
|
||||
|
||||
module.exports.silent = function (fromDir, moduleId) {
|
||||
return resolveFrom(fromDir, moduleId, true);
|
||||
};
|
||||
});
|
||||
|
||||
var callsites = createCommonjsModule(function (module) {
|
||||
'use strict';
|
||||
|
||||
module.exports = function () {
|
||||
var _ = Error.prepareStackTrace;
|
||||
|
||||
Error.prepareStackTrace = function (_, stack) {
|
||||
return stack;
|
||||
};
|
||||
|
||||
var stack = new Error().stack.slice(1);
|
||||
Error.prepareStackTrace = _;
|
||||
return stack;
|
||||
};
|
||||
});
|
||||
|
||||
var callerCallsite = createCommonjsModule(function (module) {
|
||||
'use strict';
|
||||
|
||||
module.exports = function () {
|
||||
var c = callsites();
|
||||
var caller;
|
||||
|
||||
for (var i = 0; i < c.length; i++) {
|
||||
var hasReceiver = c[i].getTypeName() !== null;
|
||||
|
||||
if (hasReceiver) {
|
||||
caller = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return c[caller];
|
||||
};
|
||||
});
|
||||
|
||||
var callerPath = function callerPath() {
|
||||
return callerCallsite().getFileName();
|
||||
};
|
||||
|
||||
var importFresh = createCommonjsModule(function (module) {
|
||||
'use strict';
|
||||
|
||||
module.exports = function (moduleId) {
|
||||
if (typeof moduleId !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
var filePath = resolveFrom_1(path.dirname(callerPath()), moduleId); // Delete itself from module parent
|
||||
|
||||
if (require.cache[filePath] && require.cache[filePath].parent) {
|
||||
var i = require.cache[filePath].parent.children.length;
|
||||
|
||||
while (i--) {
|
||||
if (require.cache[filePath].parent.children[i].id === filePath) {
|
||||
require.cache[filePath].parent.children.splice(i, 1);
|
||||
}
|
||||
}
|
||||
} // Delete module from cache
|
||||
|
||||
|
||||
delete require.cache[filePath]; // Return fresh module
|
||||
|
||||
return require(filePath);
|
||||
};
|
||||
});
|
||||
|
||||
function loadJs(filepath) {
|
||||
var result = importFresh(filepath);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -4525,7 +4723,7 @@ function () {
|
||||
}
|
||||
|
||||
var loaderKey = path.extname(filepath) || 'noExt';
|
||||
return this.config.loaders[loaderKey];
|
||||
return this.config.loaders[loaderKey] || {};
|
||||
}
|
||||
}, {
|
||||
key: "getSyncLoaderForFile",
|
||||
@@ -4778,11 +4976,351 @@ var findParentDir$1 = createCommonjsModule(function (module, exports) {
|
||||
};
|
||||
});
|
||||
|
||||
var bufferStream = createCommonjsModule(function (module) {
|
||||
'use strict';
|
||||
|
||||
var PassThrough = stream.PassThrough;
|
||||
|
||||
module.exports = function (opts) {
|
||||
opts = Object.assign({}, opts);
|
||||
var array = opts.array;
|
||||
var encoding = opts.encoding;
|
||||
var buffer = encoding === 'buffer';
|
||||
var objectMode = false;
|
||||
|
||||
if (array) {
|
||||
objectMode = !(encoding || buffer);
|
||||
} else {
|
||||
encoding = encoding || 'utf8';
|
||||
}
|
||||
|
||||
if (buffer) {
|
||||
encoding = null;
|
||||
}
|
||||
|
||||
var len = 0;
|
||||
var ret = [];
|
||||
var stream$$1 = new PassThrough({
|
||||
objectMode
|
||||
});
|
||||
|
||||
if (encoding) {
|
||||
stream$$1.setEncoding(encoding);
|
||||
}
|
||||
|
||||
stream$$1.on('data', function (chunk) {
|
||||
ret.push(chunk);
|
||||
|
||||
if (objectMode) {
|
||||
len = ret.length;
|
||||
} else {
|
||||
len += chunk.length;
|
||||
}
|
||||
});
|
||||
|
||||
stream$$1.getBufferedValue = function () {
|
||||
if (array) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return buffer ? Buffer.concat(ret, len) : ret.join('');
|
||||
};
|
||||
|
||||
stream$$1.getBufferedLength = function () {
|
||||
return len;
|
||||
};
|
||||
|
||||
return stream$$1;
|
||||
};
|
||||
});
|
||||
|
||||
function getStream(inputStream, opts) {
|
||||
if (!inputStream) {
|
||||
return Promise.reject(new Error('Expected a stream'));
|
||||
}
|
||||
|
||||
opts = Object.assign({
|
||||
maxBuffer: Infinity
|
||||
}, opts);
|
||||
var maxBuffer = opts.maxBuffer;
|
||||
var stream$$1;
|
||||
var clean;
|
||||
var p = new Promise(function (resolve, reject) {
|
||||
var error = function error(err) {
|
||||
if (err) {
|
||||
// null check
|
||||
err.bufferedData = stream$$1.getBufferedValue();
|
||||
}
|
||||
|
||||
reject(err);
|
||||
};
|
||||
|
||||
stream$$1 = bufferStream(opts);
|
||||
inputStream.once('error', error);
|
||||
inputStream.pipe(stream$$1);
|
||||
stream$$1.on('data', function () {
|
||||
if (stream$$1.getBufferedLength() > maxBuffer) {
|
||||
reject(new Error('maxBuffer exceeded'));
|
||||
}
|
||||
});
|
||||
stream$$1.once('error', error);
|
||||
stream$$1.on('end', resolve);
|
||||
|
||||
clean = function clean() {
|
||||
// some streams doesn't implement the `stream.Readable` interface correctly
|
||||
if (inputStream.unpipe) {
|
||||
inputStream.unpipe(stream$$1);
|
||||
}
|
||||
};
|
||||
});
|
||||
p.then(clean, clean);
|
||||
return p.then(function () {
|
||||
return stream$$1.getBufferedValue();
|
||||
});
|
||||
}
|
||||
|
||||
var getStream_1 = getStream;
|
||||
|
||||
var buffer = function buffer(stream$$1, opts) {
|
||||
return getStream(stream$$1, Object.assign({}, opts, {
|
||||
encoding: 'buffer'
|
||||
}));
|
||||
};
|
||||
|
||||
var array = function array(stream$$1, opts) {
|
||||
return getStream(stream$$1, Object.assign({}, opts, {
|
||||
array: true
|
||||
}));
|
||||
};
|
||||
|
||||
getStream_1.buffer = buffer;
|
||||
getStream_1.array = array;
|
||||
|
||||
var vendors = [{
|
||||
"name": "AppVeyor",
|
||||
"constant": "APPVEYOR",
|
||||
"env": "APPVEYOR",
|
||||
"pr": "APPVEYOR_PULL_REQUEST_NUMBER"
|
||||
}, {
|
||||
"name": "Azure Pipelines",
|
||||
"constant": "AZURE_PIPELINES",
|
||||
"env": "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
|
||||
"pr": "SYSTEM_PULLREQUEST_PULLREQUESTID"
|
||||
}, {
|
||||
"name": "Bamboo",
|
||||
"constant": "BAMBOO",
|
||||
"env": "bamboo_planKey"
|
||||
}, {
|
||||
"name": "Bitbucket Pipelines",
|
||||
"constant": "BITBUCKET",
|
||||
"env": "BITBUCKET_COMMIT",
|
||||
"pr": "BITBUCKET_PR_ID"
|
||||
}, {
|
||||
"name": "Bitrise",
|
||||
"constant": "BITRISE",
|
||||
"env": "BITRISE_IO",
|
||||
"pr": "BITRISE_PULL_REQUEST"
|
||||
}, {
|
||||
"name": "Buddy",
|
||||
"constant": "BUDDY",
|
||||
"env": "BUDDY_WORKSPACE_ID",
|
||||
"pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
|
||||
}, {
|
||||
"name": "Buildkite",
|
||||
"constant": "BUILDKITE",
|
||||
"env": "BUILDKITE",
|
||||
"pr": {
|
||||
"env": "BUILDKITE_PULL_REQUEST",
|
||||
"ne": "false"
|
||||
}
|
||||
}, {
|
||||
"name": "CircleCI",
|
||||
"constant": "CIRCLE",
|
||||
"env": "CIRCLECI",
|
||||
"pr": "CIRCLE_PULL_REQUEST"
|
||||
}, {
|
||||
"name": "Cirrus CI",
|
||||
"constant": "CIRRUS",
|
||||
"env": "CIRRUS_CI",
|
||||
"pr": "CIRRUS_PR"
|
||||
}, {
|
||||
"name": "AWS CodeBuild",
|
||||
"constant": "CODEBUILD",
|
||||
"env": "CODEBUILD_BUILD_ARN"
|
||||
}, {
|
||||
"name": "Codeship",
|
||||
"constant": "CODESHIP",
|
||||
"env": {
|
||||
"CI_NAME": "codeship"
|
||||
}
|
||||
}, {
|
||||
"name": "Drone",
|
||||
"constant": "DRONE",
|
||||
"env": "DRONE",
|
||||
"pr": {
|
||||
"DRONE_BUILD_EVENT": "pull_request"
|
||||
}
|
||||
}, {
|
||||
"name": "dsari",
|
||||
"constant": "DSARI",
|
||||
"env": "DSARI"
|
||||
}, {
|
||||
"name": "GitLab CI",
|
||||
"constant": "GITLAB",
|
||||
"env": "GITLAB_CI"
|
||||
}, {
|
||||
"name": "GoCD",
|
||||
"constant": "GOCD",
|
||||
"env": "GO_PIPELINE_LABEL"
|
||||
}, {
|
||||
"name": "Hudson",
|
||||
"constant": "HUDSON",
|
||||
"env": "HUDSON_URL"
|
||||
}, {
|
||||
"name": "Jenkins",
|
||||
"constant": "JENKINS",
|
||||
"env": ["JENKINS_URL", "BUILD_ID"],
|
||||
"pr": {
|
||||
"any": ["ghprbPullId", "CHANGE_ID"]
|
||||
}
|
||||
}, {
|
||||
"name": "Magnum CI",
|
||||
"constant": "MAGNUM",
|
||||
"env": "MAGNUM"
|
||||
}, {
|
||||
"name": "Netlify CI",
|
||||
"constant": "NETLIFY",
|
||||
"env": "NETLIFY_BUILD_BASE",
|
||||
"pr": {
|
||||
"env": "PULL_REQUEST",
|
||||
"ne": "false"
|
||||
}
|
||||
}, {
|
||||
"name": "Sail CI",
|
||||
"constant": "SAIL",
|
||||
"env": "SAILCI",
|
||||
"pr": "SAIL_PULL_REQUEST_NUMBER"
|
||||
}, {
|
||||
"name": "Semaphore",
|
||||
"constant": "SEMAPHORE",
|
||||
"env": "SEMAPHORE",
|
||||
"pr": "PULL_REQUEST_NUMBER"
|
||||
}, {
|
||||
"name": "Shippable",
|
||||
"constant": "SHIPPABLE",
|
||||
"env": "SHIPPABLE",
|
||||
"pr": {
|
||||
"IS_PULL_REQUEST": "true"
|
||||
}
|
||||
}, {
|
||||
"name": "Solano CI",
|
||||
"constant": "SOLANO",
|
||||
"env": "TDDIUM",
|
||||
"pr": "TDDIUM_PR_ID"
|
||||
}, {
|
||||
"name": "Strider CD",
|
||||
"constant": "STRIDER",
|
||||
"env": "STRIDER"
|
||||
}, {
|
||||
"name": "TaskCluster",
|
||||
"constant": "TASKCLUSTER",
|
||||
"env": ["TASK_ID", "RUN_ID"]
|
||||
}, {
|
||||
"name": "TeamCity",
|
||||
"constant": "TEAMCITY",
|
||||
"env": "TEAMCITY_VERSION"
|
||||
}, {
|
||||
"name": "Travis CI",
|
||||
"constant": "TRAVIS",
|
||||
"env": "TRAVIS",
|
||||
"pr": {
|
||||
"env": "TRAVIS_PULL_REQUEST",
|
||||
"ne": "false"
|
||||
}
|
||||
}];
|
||||
|
||||
var vendors$1 = Object.freeze({
|
||||
default: vendors
|
||||
});
|
||||
|
||||
var vendors$2 = ( vendors$1 && vendors ) || vendors$1;
|
||||
|
||||
var ciInfo = createCommonjsModule(function (module, exports) {
|
||||
'use strict';
|
||||
|
||||
var env = process.env; // Used for testing only
|
||||
|
||||
Object.defineProperty(exports, '_vendors', {
|
||||
value: vendors$2.map(function (v) {
|
||||
return v.constant;
|
||||
})
|
||||
});
|
||||
exports.name = null;
|
||||
exports.isPR = null;
|
||||
vendors$2.forEach(function (vendor) {
|
||||
var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
|
||||
var isCI = envs.every(function (obj) {
|
||||
return checkEnv(obj);
|
||||
});
|
||||
exports[vendor.constant] = isCI;
|
||||
|
||||
if (isCI) {
|
||||
exports.name = vendor.name;
|
||||
|
||||
switch (typeof vendor.pr) {
|
||||
case 'string':
|
||||
// "pr": "CIRRUS_PR"
|
||||
exports.isPR = !!env[vendor.pr];
|
||||
break;
|
||||
|
||||
case 'object':
|
||||
if ('env' in vendor.pr) {
|
||||
// "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
|
||||
exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
|
||||
} else if ('any' in vendor.pr) {
|
||||
// "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
|
||||
exports.isPR = vendor.pr.any.some(function (key) {
|
||||
return !!env[key];
|
||||
});
|
||||
} else {
|
||||
// "pr": { "DRONE_BUILD_EVENT": "pull_request" }
|
||||
exports.isPR = checkEnv(vendor.pr);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
// PR detection not supported for this vendor
|
||||
exports.isPR = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
exports.isCI = !!(env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
|
||||
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
|
||||
env.BUILD_NUMBER || // Jenkins, TeamCity
|
||||
env.RUN_ID || // TaskCluster, dsari
|
||||
exports.name || false);
|
||||
|
||||
function checkEnv(obj) {
|
||||
if (typeof obj === 'string') return !!env[obj];
|
||||
return Object.keys(obj).every(function (k) {
|
||||
return env[k] === obj[k];
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var isCi = ciInfo.isCI;
|
||||
|
||||
var findParentDir = findParentDir$1.sync;
|
||||
var thirdParty = {
|
||||
getStream: getStream_1,
|
||||
cosmiconfig: dist,
|
||||
findParentDir
|
||||
findParentDir,
|
||||
getStream: getStream_1,
|
||||
isCI:
|
||||
/* istanbul ignore next */
|
||||
function isCI() {
|
||||
return isCi;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = thirdParty;
|
||||
|
||||
Reference in New Issue
Block a user