new license file version [CI SKIP]

This commit is contained in:
2023-03-15 13:43:57 +00:00
parent d8a3063735
commit 00359d25c1
5600 changed files with 523898 additions and 2 deletions

View File

@@ -0,0 +1,150 @@
let { list } = require('postcss')
let OldSelector = require('./old-selector')
let Prefixer = require('./prefixer')
let Browsers = require('./browsers')
let utils = require('./utils')
class Selector extends Prefixer {
constructor (name, prefixes, all) {
super(name, prefixes, all)
this.regexpCache = new Map()
}
/**
* Is rule selectors need to be prefixed
*/
check (rule) {
if (rule.selector.includes(this.name)) {
return !!rule.selector.match(this.regexp())
}
return false
}
/**
* Return prefixed version of selector
*/
prefixed (prefix) {
return this.name.replace(/^(\W*)/, `$1${prefix}`)
}
/**
* Lazy loadRegExp for name
*/
regexp (prefix) {
if (!this.regexpCache.has(prefix)) {
let name = prefix ? this.prefixed(prefix) : this.name
this.regexpCache.set(
prefix,
new RegExp(`(^|[^:"'=])${utils.escapeRegexp(name)}`, 'gi')
)
}
return this.regexpCache.get(prefix)
}
/**
* All possible prefixes
*/
possible () {
return Browsers.prefixes()
}
/**
* Return all possible selector prefixes
*/
prefixeds (rule) {
if (rule._autoprefixerPrefixeds) {
if (rule._autoprefixerPrefixeds[this.name]) {
return rule._autoprefixerPrefixeds
}
} else {
rule._autoprefixerPrefixeds = {}
}
let prefixeds = {}
if (rule.selector.includes(',')) {
let ruleParts = list.comma(rule.selector)
let toProcess = ruleParts.filter(el => el.includes(this.name))
for (let prefix of this.possible()) {
prefixeds[prefix] = toProcess
.map(el => this.replace(el, prefix))
.join(', ')
}
} else {
for (let prefix of this.possible()) {
prefixeds[prefix] = this.replace(rule.selector, prefix)
}
}
rule._autoprefixerPrefixeds[this.name] = prefixeds
return rule._autoprefixerPrefixeds
}
/**
* Is rule already prefixed before
*/
already (rule, prefixeds, prefix) {
let index = rule.parent.index(rule) - 1
while (index >= 0) {
let before = rule.parent.nodes[index]
if (before.type !== 'rule') {
return false
}
let some = false
for (let key in prefixeds[this.name]) {
let prefixed = prefixeds[this.name][key]
if (before.selector === prefixed) {
if (prefix === key) {
return true
} else {
some = true
break
}
}
}
if (!some) {
return false
}
index -= 1
}
return false
}
/**
* Replace selectors by prefixed one
*/
replace (selector, prefix) {
return selector.replace(this.regexp(), `$1${this.prefixed(prefix)}`)
}
/**
* Clone and add prefixes for at-rule
*/
add (rule, prefix) {
let prefixeds = this.prefixeds(rule)
if (this.already(rule, prefixeds, prefix)) {
return
}
let cloned = this.clone(rule, { selector: prefixeds[this.name][prefix] })
rule.parent.insertBefore(rule, cloned)
}
/**
* Return function to fast find prefixed selector
*/
old (prefix) {
return new OldSelector(this, prefix)
}
}
module.exports = Selector

View File

@@ -0,0 +1,32 @@
/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
import { Observable } from '../Observable';
import { isArray } from '../util/isArray';
import { isFunction } from '../util/isFunction';
import { map } from '../operators/map';
export function fromEventPattern(addHandler, removeHandler, resultSelector) {
if (resultSelector) {
return fromEventPattern(addHandler, removeHandler).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
}
return new Observable(function (subscriber) {
var handler = function () {
var e = [];
for (var _i = 0; _i < arguments.length; _i++) {
e[_i] = arguments[_i];
}
return subscriber.next(e.length === 1 ? e[0] : e);
};
var retValue;
try {
retValue = addHandler(handler);
}
catch (err) {
subscriber.error(err);
return undefined;
}
if (!isFunction(removeHandler)) {
return undefined;
}
return function () { return removeHandler(handler, retValue); };
});
}
//# sourceMappingURL=fromEventPattern.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"HotObservable.js","sources":["../../../src/internal/testing/HotObservable.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD;IAAsC,yCAAU;IAM9C,uBAAmB,QAAuB,EAC9B,SAAoB;QADhC,YAEE,iBAAO,SAER;QAJkB,cAAQ,GAAR,QAAQ,CAAe;QALnC,mBAAa,GAAsB,EAAE,CAAC;QAQ3C,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;;IAC7B,CAAC;IAGD,kCAAU,GAAV,UAAW,UAA2B;QACpC,IAAM,OAAO,GAAqB,IAAI,CAAC;QACvC,IAAM,KAAK,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC3C,IAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,YAAY,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC;YAChC,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC,CAAC;QACJ,YAAY,CAAC,GAAG,CAAC,iBAAM,UAAU,YAAC,UAAU,CAAC,CAAC,CAAC;QAC/C,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,6BAAK,GAAL;QACE,IAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;QAE/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,CAAC;gBACC,IAAI,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAElC,OAAO,CAAC,SAAS,CAAC,QAAQ,CACxB,cAAQ,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,CAAC,KAAK,CACd,CAAC;YACJ,CAAC,CAAC,EAAE,CAAC;SACN;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AAvCD,CAAsC,OAAO,GAuC5C;;AACD,WAAW,CAAC,aAAa,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,31 @@
/// <reference types="node"/>
declare namespace isInteractive {
interface Options {
/**
The stream to check.
@default process.stdout
*/
readonly stream?: NodeJS.WritableStream;
}
}
/**
Check if stdout or stderr is [interactive](https://unix.stackexchange.com/a/43389/7678).
It checks that the stream is [TTY](https://jameshfisher.com/2017/12/09/what-is-a-tty/), not a dumb terminal, and not running in a CI.
This can be useful to decide whether to present interactive UI or animations in the terminal.
@example
```
import isInteractive = require('is-interactive');
isInteractive();
//=> true
```
*/
declare function isInteractive(options?: isInteractive.Options): boolean;
export = isInteractive;

View File

@@ -0,0 +1,359 @@
import { root } from '../../util/root';
import { Observable } from '../../Observable';
import { Subscriber } from '../../Subscriber';
import { map } from '../../operators/map';
function getCORSRequest() {
if (root.XMLHttpRequest) {
return new root.XMLHttpRequest();
}
else if (!!root.XDomainRequest) {
return new root.XDomainRequest();
}
else {
throw new Error('CORS is not supported by your browser');
}
}
function getXMLHttpRequest() {
if (root.XMLHttpRequest) {
return new root.XMLHttpRequest();
}
else {
let progId;
try {
const progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
for (let i = 0; i < 3; i++) {
try {
progId = progIds[i];
if (new root.ActiveXObject(progId)) {
break;
}
}
catch (e) {
}
}
return new root.ActiveXObject(progId);
}
catch (e) {
throw new Error('XMLHttpRequest is not supported by your browser');
}
}
}
export function ajaxGet(url, headers = null) {
return new AjaxObservable({ method: 'GET', url, headers });
}
export function ajaxPost(url, body, headers) {
return new AjaxObservable({ method: 'POST', url, body, headers });
}
export function ajaxDelete(url, headers) {
return new AjaxObservable({ method: 'DELETE', url, headers });
}
export function ajaxPut(url, body, headers) {
return new AjaxObservable({ method: 'PUT', url, body, headers });
}
export function ajaxPatch(url, body, headers) {
return new AjaxObservable({ method: 'PATCH', url, body, headers });
}
const mapResponse = map((x, index) => x.response);
export function ajaxGetJSON(url, headers) {
return mapResponse(new AjaxObservable({
method: 'GET',
url,
responseType: 'json',
headers
}));
}
export class AjaxObservable extends Observable {
constructor(urlOrRequest) {
super();
const request = {
async: true,
createXHR: function () {
return this.crossDomain ? getCORSRequest() : getXMLHttpRequest();
},
crossDomain: true,
withCredentials: false,
headers: {},
method: 'GET',
responseType: 'json',
timeout: 0
};
if (typeof urlOrRequest === 'string') {
request.url = urlOrRequest;
}
else {
for (const prop in urlOrRequest) {
if (urlOrRequest.hasOwnProperty(prop)) {
request[prop] = urlOrRequest[prop];
}
}
}
this.request = request;
}
_subscribe(subscriber) {
return new AjaxSubscriber(subscriber, this.request);
}
}
AjaxObservable.create = (() => {
const create = (urlOrRequest) => {
return new AjaxObservable(urlOrRequest);
};
create.get = ajaxGet;
create.post = ajaxPost;
create.delete = ajaxDelete;
create.put = ajaxPut;
create.patch = ajaxPatch;
create.getJSON = ajaxGetJSON;
return create;
})();
export class AjaxSubscriber extends Subscriber {
constructor(destination, request) {
super(destination);
this.request = request;
this.done = false;
const headers = request.headers = request.headers || {};
if (!request.crossDomain && !this.getHeader(headers, 'X-Requested-With')) {
headers['X-Requested-With'] = 'XMLHttpRequest';
}
let contentTypeHeader = this.getHeader(headers, 'Content-Type');
if (!contentTypeHeader && !(root.FormData && request.body instanceof root.FormData) && typeof request.body !== 'undefined') {
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
}
request.body = this.serializeBody(request.body, this.getHeader(request.headers, 'Content-Type'));
this.send();
}
next(e) {
this.done = true;
const { xhr, request, destination } = this;
let result;
try {
result = new AjaxResponse(e, xhr, request);
}
catch (err) {
return destination.error(err);
}
destination.next(result);
}
send() {
const { request, request: { user, method, url, async, password, headers, body } } = this;
try {
const xhr = this.xhr = request.createXHR();
this.setupEvents(xhr, request);
if (user) {
xhr.open(method, url, async, user, password);
}
else {
xhr.open(method, url, async);
}
if (async) {
xhr.timeout = request.timeout;
xhr.responseType = request.responseType;
}
if ('withCredentials' in xhr) {
xhr.withCredentials = !!request.withCredentials;
}
this.setHeaders(xhr, headers);
if (body) {
xhr.send(body);
}
else {
xhr.send();
}
}
catch (err) {
this.error(err);
}
}
serializeBody(body, contentType) {
if (!body || typeof body === 'string') {
return body;
}
else if (root.FormData && body instanceof root.FormData) {
return body;
}
if (contentType) {
const splitIndex = contentType.indexOf(';');
if (splitIndex !== -1) {
contentType = contentType.substring(0, splitIndex);
}
}
switch (contentType) {
case 'application/x-www-form-urlencoded':
return Object.keys(body).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(body[key])}`).join('&');
case 'application/json':
return JSON.stringify(body);
default:
return body;
}
}
setHeaders(xhr, headers) {
for (let key in headers) {
if (headers.hasOwnProperty(key)) {
xhr.setRequestHeader(key, headers[key]);
}
}
}
getHeader(headers, headerName) {
for (let key in headers) {
if (key.toLowerCase() === headerName.toLowerCase()) {
return headers[key];
}
}
return undefined;
}
setupEvents(xhr, request) {
const progressSubscriber = request.progressSubscriber;
function xhrTimeout(e) {
const { subscriber, progressSubscriber, request } = xhrTimeout;
if (progressSubscriber) {
progressSubscriber.error(e);
}
let error;
try {
error = new AjaxTimeoutError(this, request);
}
catch (err) {
error = err;
}
subscriber.error(error);
}
xhr.ontimeout = xhrTimeout;
xhrTimeout.request = request;
xhrTimeout.subscriber = this;
xhrTimeout.progressSubscriber = progressSubscriber;
if (xhr.upload && 'withCredentials' in xhr) {
if (progressSubscriber) {
let xhrProgress;
xhrProgress = function (e) {
const { progressSubscriber } = xhrProgress;
progressSubscriber.next(e);
};
if (root.XDomainRequest) {
xhr.onprogress = xhrProgress;
}
else {
xhr.upload.onprogress = xhrProgress;
}
xhrProgress.progressSubscriber = progressSubscriber;
}
let xhrError;
xhrError = function (e) {
const { progressSubscriber, subscriber, request } = xhrError;
if (progressSubscriber) {
progressSubscriber.error(e);
}
let error;
try {
error = new AjaxError('ajax error', this, request);
}
catch (err) {
error = err;
}
subscriber.error(error);
};
xhr.onerror = xhrError;
xhrError.request = request;
xhrError.subscriber = this;
xhrError.progressSubscriber = progressSubscriber;
}
function xhrReadyStateChange(e) {
return;
}
xhr.onreadystatechange = xhrReadyStateChange;
xhrReadyStateChange.subscriber = this;
xhrReadyStateChange.progressSubscriber = progressSubscriber;
xhrReadyStateChange.request = request;
function xhrLoad(e) {
const { subscriber, progressSubscriber, request } = xhrLoad;
if (this.readyState === 4) {
let status = this.status === 1223 ? 204 : this.status;
let response = (this.responseType === 'text' ? (this.response || this.responseText) : this.response);
if (status === 0) {
status = response ? 200 : 0;
}
if (status < 400) {
if (progressSubscriber) {
progressSubscriber.complete();
}
subscriber.next(e);
subscriber.complete();
}
else {
if (progressSubscriber) {
progressSubscriber.error(e);
}
let error;
try {
error = new AjaxError('ajax error ' + status, this, request);
}
catch (err) {
error = err;
}
subscriber.error(error);
}
}
}
xhr.onload = xhrLoad;
xhrLoad.subscriber = this;
xhrLoad.progressSubscriber = progressSubscriber;
xhrLoad.request = request;
}
unsubscribe() {
const { done, xhr } = this;
if (!done && xhr && xhr.readyState !== 4 && typeof xhr.abort === 'function') {
xhr.abort();
}
super.unsubscribe();
}
}
export class AjaxResponse {
constructor(originalEvent, xhr, request) {
this.originalEvent = originalEvent;
this.xhr = xhr;
this.request = request;
this.status = xhr.status;
this.responseType = xhr.responseType || request.responseType;
this.response = parseXhrResponse(this.responseType, xhr);
}
}
const AjaxErrorImpl = (() => {
function AjaxErrorImpl(message, xhr, request) {
Error.call(this);
this.message = message;
this.name = 'AjaxError';
this.xhr = xhr;
this.request = request;
this.status = xhr.status;
this.responseType = xhr.responseType || request.responseType;
this.response = parseXhrResponse(this.responseType, xhr);
return this;
}
AjaxErrorImpl.prototype = Object.create(Error.prototype);
return AjaxErrorImpl;
})();
export const AjaxError = AjaxErrorImpl;
function parseJson(xhr) {
if ('response' in xhr) {
return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');
}
else {
return JSON.parse(xhr.responseText || 'null');
}
}
function parseXhrResponse(responseType, xhr) {
switch (responseType) {
case 'json':
return parseJson(xhr);
case 'xml':
return xhr.responseXML;
case 'text':
default:
return ('response' in xhr) ? xhr.response : xhr.responseText;
}
}
function AjaxTimeoutErrorImpl(xhr, request) {
AjaxError.call(this, 'ajax timeout', xhr, request);
this.name = 'AjaxTimeoutError';
return this;
}
export const AjaxTimeoutError = AjaxTimeoutErrorImpl;
//# sourceMappingURL=AjaxObservable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Notification.js","sources":["../src/internal/Notification.ts"],"names":[],"mappings":";;AAEA,4CAA2C;AAC3C,sCAAqC;AACrC,sDAAqD;AAOrD,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,8BAAU,CAAA;IACV,+BAAW,CAAA;IACX,kCAAc,CAAA;AAChB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAgBD;IAGE,sBAAmB,IAAqB,EAAS,KAAS,EAAS,KAAW;QAA3D,SAAI,GAAJ,IAAI,CAAiB;QAAS,UAAK,GAAL,KAAK,CAAI;QAAS,UAAK,GAAL,KAAK,CAAM;QAC5E,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,GAAG,CAAC;IAC/B,CAAC;IAOD,8BAAO,GAAP,UAAQ,QAA4B;QAClC,QAAQ,IAAI,CAAC,IAAI,EAAE;YACjB,KAAK,GAAG;gBACN,OAAO,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpD,KAAK,GAAG;gBACN,OAAO,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtD,KAAK,GAAG;gBACN,OAAO,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;SACnD;IACH,CAAC;IAUD,yBAAE,GAAF,UAAG,IAAwB,EAAE,KAA0B,EAAE,QAAqB;QAC5E,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,QAAQ,IAAI,EAAE;YACZ,KAAK,GAAG;gBACN,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAClC,KAAK,GAAG;gBACN,OAAO,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpC,KAAK,GAAG;gBACN,OAAO,QAAQ,IAAI,QAAQ,EAAE,CAAC;SACjC;IACH,CAAC;IAWD,6BAAM,GAAN,UAAO,cAAyD,EAAE,KAA0B,EAAE,QAAqB;QACjH,IAAI,cAAc,IAAI,OAA4B,cAAe,CAAC,IAAI,KAAK,UAAU,EAAE;YACrF,OAAO,IAAI,CAAC,OAAO,CAAqB,cAAc,CAAC,CAAC;SACzD;aAAM;YACL,OAAO,IAAI,CAAC,EAAE,CAAqB,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;SACrE;IACH,CAAC;IAOD,mCAAY,GAAZ;QACE,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,QAAQ,IAAI,EAAE;YACZ,KAAK,GAAG;gBACN,OAAO,OAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACxB,KAAK,GAAG;gBACN,OAAO,uBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAChC,KAAK,GAAG;gBACN,OAAO,aAAK,EAAE,CAAC;SAClB;QACD,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;IAaM,uBAAU,GAAjB,UAAqB,KAAQ;QAC3B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;YAChC,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,OAAO,YAAY,CAAC,0BAA0B,CAAC;IACjD,CAAC;IAUM,wBAAW,GAAlB,UAAsB,GAAS;QAC7B,OAAO,IAAI,YAAY,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;IAC/C,CAAC;IAOM,2BAAc,GAArB;QACE,OAAO,YAAY,CAAC,oBAAoB,CAAC;IAC3C,CAAC;IArCc,iCAAoB,GAAsB,IAAI,YAAY,CAAC,GAAG,CAAC,CAAC;IAChE,uCAA0B,GAAsB,IAAI,YAAY,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAqClG,mBAAC;CAAA,AApHD,IAoHC;AApHY,oCAAY"}

View File

@@ -0,0 +1,176 @@
import {Options as FastGlobOptions} from 'fast-glob';
declare namespace globby {
type ExpandDirectoriesOption =
| boolean
| readonly string[]
| {files?: readonly string[]; extensions?: readonly string[]};
interface GlobbyOptions extends FastGlobOptions {
/**
If set to `true`, `globby` will automatically glob directories for you. If you define an `Array` it will only glob files that matches the patterns inside the `Array`. You can also define an `Object` with `files` and `extensions` like in the example below.
Note that if you set this option to `false`, you won't get back matched directories unless you set `onlyFiles: false`.
@default true
@example
```
import globby = require('globby');
(async () => {
const paths = await globby('images', {
expandDirectories: {
files: ['cat', 'unicorn', '*.jpg'],
extensions: ['png']
}
});
console.log(paths);
//=> ['cat.png', 'unicorn.png', 'cow.jpg', 'rainbow.jpg']
})();
```
*/
readonly expandDirectories?: ExpandDirectoriesOption;
/**
Respect ignore patterns in `.gitignore` files that apply to the globbed files.
@default false
*/
readonly gitignore?: boolean;
}
interface GlobTask {
readonly pattern: string;
readonly options: GlobbyOptions;
}
interface GitignoreOptions {
readonly cwd?: string;
readonly ignore?: readonly string[];
}
type FilterFunction = (path: string) => boolean;
}
interface Gitignore {
/**
@returns A filter function indicating whether a given path is ignored via a `.gitignore` file.
*/
sync: (options?: globby.GitignoreOptions) => globby.FilterFunction;
/**
`.gitignore` files matched by the ignore config are not used for the resulting filter function.
@returns A filter function indicating whether a given path is ignored via a `.gitignore` file.
@example
```
import {gitignore} from 'globby';
(async () => {
const isIgnored = await gitignore();
console.log(isIgnored('some/file'));
})();
```
*/
(options?: globby.GitignoreOptions): Promise<globby.FilterFunction>;
}
declare const globby: {
/**
Find files and directories using glob patterns.
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
@returns The matching paths.
*/
sync: (
patterns: string | readonly string[],
options?: globby.GlobbyOptions
) => string[];
/**
Find files and directories using glob patterns.
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
@returns The stream of matching paths.
@example
```
import globby = require('globby');
(async () => {
for await (const path of globby.stream('*.tmp')) {
console.log(path);
}
})();
```
*/
stream: (
patterns: string | readonly string[],
options?: globby.GlobbyOptions
) => NodeJS.ReadableStream;
/**
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration.
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
@returns An object in the format `{pattern: string, options: object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.
*/
generateGlobTasks: (
patterns: string | readonly string[],
options?: globby.GlobbyOptions
) => globby.GlobTask[];
/**
Note that the options affect the results.
This function is backed by [`fast-glob`](https://github.com/mrmlnc/fast-glob#isdynamicpatternpattern-options).
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3).
@returns Whether there are any special glob characters in the `patterns`.
*/
hasMagic: (
patterns: string | readonly string[],
options?: FastGlobOptions
) => boolean;
readonly gitignore: Gitignore;
/**
Find files and directories using glob patterns.
Note that glob patterns can only contain forward-slashes, not backward-slashes, so if you want to construct a glob pattern from path components, you need to use `path.posix.join()` instead of `path.join()`.
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
@param options - See the [`fast-glob` options](https://github.com/mrmlnc/fast-glob#options-3) in addition to the ones in this package.
@returns The matching paths.
@example
```
import globby = require('globby');
(async () => {
const paths = await globby(['*', '!cake']);
console.log(paths);
//=> ['unicorn', 'rainbow']
})();
```
*/
(
patterns: string | readonly string[],
options?: globby.GlobbyOptions
): Promise<string[]>;
};
export = globby;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/cacheWrapper.ts"],"names":["cacheWrapper","cache","key","fn","cached","get","undefined","result","set","cacheWrapperSync"],"mappings":";;;;;;;;AAEA,eAAeA,YAAf,CACEC,KADF,EAEEC,GAFF,EAGEC,EAHF,EAI8B;AAC5B,QAAMC,MAAM,GAAGH,KAAK,CAACI,GAAN,CAAUH,GAAV,CAAf;;AACA,MAAIE,MAAM,KAAKE,SAAf,EAA0B;AACxB,WAAOF,MAAP;AACD;;AAED,QAAMG,MAAM,GAAG,MAAMJ,EAAE,EAAvB;AACAF,EAAAA,KAAK,CAACO,GAAN,CAAUN,GAAV,EAAeK,MAAf;AACA,SAAOA,MAAP;AACD;;AAED,SAASE,gBAAT,CACER,KADF,EAEEC,GAFF,EAGEC,EAHF,EAIqB;AACnB,QAAMC,MAAM,GAAGH,KAAK,CAACI,GAAN,CAAUH,GAAV,CAAf;;AACA,MAAIE,MAAM,KAAKE,SAAf,EAA0B;AACxB,WAAOF,MAAP;AACD;;AAED,QAAMG,MAAM,GAAGJ,EAAE,EAAjB;AACAF,EAAAA,KAAK,CAACO,GAAN,CAAUN,GAAV,EAAeK,MAAf;AACA,SAAOA,MAAP;AACD","sourcesContent":["import { Cache, CosmiconfigResult } from './types';\n\nasync function cacheWrapper(\n cache: Cache,\n key: string,\n fn: () => Promise<CosmiconfigResult>,\n): Promise<CosmiconfigResult> {\n const cached = cache.get(key);\n if (cached !== undefined) {\n return cached;\n }\n\n const result = await fn();\n cache.set(key, result);\n return result;\n}\n\nfunction cacheWrapperSync(\n cache: Cache,\n key: string,\n fn: () => CosmiconfigResult,\n): CosmiconfigResult {\n const cached = cache.get(key);\n if (cached !== undefined) {\n return cached;\n }\n\n const result = fn();\n cache.set(key, result);\n return result;\n}\n\nexport { cacheWrapper, cacheWrapperSync };\n"],"file":"cacheWrapper.js"}

View File

@@ -0,0 +1,470 @@
### Changelog
All notable changes to this project will be documented in this file. Dates are displayed in UTC.
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
#### [v2.2.1](https://github.com/CookPete/auto-changelog/compare/v2.2.0...v2.2.1)
- Remove requirement for --latest-version to be valid semver [`#178`](https://github.com/CookPete/auto-changelog/issues/178)
- Mild refactor [`1fc916c`](https://github.com/CookPete/auto-changelog/commit/1fc916c293821eafc0a4a835313c9edca19828a2)
#### [v2.2.0](https://github.com/CookPete/auto-changelog/compare/v2.1.0...v2.2.0)
> 3 July 2020
- add --prepend option as altenative to prepend-token [`#172`](https://github.com/CookPete/auto-changelog/pull/172)
- Fix bug when no existing tags [`#170`](https://github.com/CookPete/auto-changelog/issues/170)
#### [v2.1.0](https://github.com/CookPete/auto-changelog/compare/v2.0.0...v2.1.0)
> 14 June 2020
- Add --hide-credit option [`#166`](https://github.com/CookPete/auto-changelog/issues/166)
- Add --unreleased-only option [`#165`](https://github.com/CookPete/auto-changelog/issues/165)
- Fix --starting-version [`#164`](https://github.com/CookPete/auto-changelog/issues/164)
- Add ability to prepend to an existing changelog [`#156`](https://github.com/CookPete/auto-changelog/issues/156)
- Use tag date rather than first commit date [`#162`](https://github.com/CookPete/auto-changelog/issues/162)
- Add CONTRIBUTING.md [`#141`](https://github.com/CookPete/auto-changelog/issues/141)
- Add merge and fix support to commit-list helper [`#146`](https://github.com/CookPete/auto-changelog/issues/146)
### [v2.0.0](https://github.com/CookPete/auto-changelog/compare/v1.16.4...v2.0.0)
> 10 April 2020
- Refactor codebase [`#144`](https://github.com/CookPete/auto-changelog/pull/144)
- **Breaking change:** Remove the need for core-js and building with babel [`2383380`](https://github.com/CookPete/auto-changelog/commit/23833803c4d4652a139a43bb5b6767adc604988b)
- **Breaking change:** Refactor git data fetching logic [`09325ac`](https://github.com/CookPete/auto-changelog/commit/09325aca59fff94aae0b5f457311fca1956276ac)
- Improve progress output [`a2ba4ac`](https://github.com/CookPete/auto-changelog/commit/a2ba4ac01d6dff2b2b08ac6262ffc0bbd4afdb83)
#### [v1.16.4](https://github.com/CookPete/auto-changelog/compare/v1.16.3...v1.16.4)
> 2 April 2020
- Pin semver to v6 [`#160`](https://github.com/CookPete/auto-changelog/issues/160)
- Add node 12 to travis builds [`ac77a53`](https://github.com/CookPete/auto-changelog/commit/ac77a537e9db115317ca0a53c68e11b5968763d4)
- Remove node 8 from travis builds [`e7d557d`](https://github.com/CookPete/auto-changelog/commit/e7d557d02d61c955194da95cee6cc3390b529791)
#### [v1.16.3](https://github.com/CookPete/auto-changelog/compare/v1.16.2...v1.16.3)
> 25 March 2020
- Bump handlebars from 4.1.2 to 4.3.0 [`#147`](https://github.com/CookPete/auto-changelog/pull/147)
- Bump packages [`1ced7a8`](https://github.com/CookPete/auto-changelog/commit/1ced7a8017319643be3b41847fe14c3195b88256)
- Add FUNDING.yml [`107445f`](https://github.com/CookPete/auto-changelog/commit/107445f3739cecb8061422c000be522d6e250867)
#### [v1.16.2](https://github.com/CookPete/auto-changelog/compare/v1.16.1...v1.16.2)
> 29 October 2019
- fix parsing of --issue-url and -i options [`#138`](https://github.com/CookPete/auto-changelog/pull/138)
- Use noEscape option rather than triple brackets everywhere [`#131`](https://github.com/CookPete/auto-changelog/issues/131) [`#133`](https://github.com/CookPete/auto-changelog/pull/133)
#### [v1.16.1](https://github.com/CookPete/auto-changelog/compare/v1.16.0...v1.16.1)
> 4 September 2019
- Encode &lt; and &gt; in commit messages [`#129`](https://github.com/CookPete/auto-changelog/issues/129)
- Update test data generation [`c2c9bd8`](https://github.com/CookPete/auto-changelog/commit/c2c9bd82ab1857009b8e4e5bcb514312fdd43975)
- Refactor release parsing [`b1ab27e`](https://github.com/CookPete/auto-changelog/commit/b1ab27e258c4b2b4f0f2bea2f0fe8d9a2f66926e)
- Add HTML characters to test data [`b4eb7d7`](https://github.com/CookPete/auto-changelog/commit/b4eb7d7bdd1187a13b89db20f56a6acde0b1b8e5)
#### [v1.16.0](https://github.com/CookPete/auto-changelog/compare/v1.15.0...v1.16.0)
> 31 August 2019
- Add --commit-url, --merge-url and --compare-url options [`#93`](https://github.com/CookPete/auto-changelog/issues/93)
- Bump packages [`84a1bda`](https://github.com/CookPete/auto-changelog/commit/84a1bdadc21926b16df39886c2f2d799a92bd64f)
- Update readme [`a04c0ff`](https://github.com/CookPete/auto-changelog/commit/a04c0ff7a894aaf55627ba6decb8f7e07aea7479)
- Lint fixes [`7d3c25a`](https://github.com/CookPete/auto-changelog/commit/7d3c25afad1f49da8bb38df915f2430514da2d53)
#### [v1.15.0](https://github.com/CookPete/auto-changelog/compare/v1.14.1...v1.15.0)
> 13 August 2019
- Add --config option [`#127`](https://github.com/CookPete/auto-changelog/issues/127)
- Infer semver versions from numeric tags [`#126`](https://github.com/CookPete/auto-changelog/issues/126)
#### [v1.14.1](https://github.com/CookPete/auto-changelog/compare/v1.14.0...v1.14.1)
> 8 July 2019
- Add regenerator-runtime dependency [`#125`](https://github.com/CookPete/auto-changelog/issues/125)
#### [v1.14.0](https://github.com/CookPete/auto-changelog/compare/v1.13.0...v1.14.0)
> 7 July 2019
- Update babel/rimraf/nyc [`#122`](https://github.com/CookPete/auto-changelog/pull/122)
- HTTPS links to external sites [`#120`](https://github.com/CookPete/auto-changelog/pull/120)
- Add support for alternate date sorting [`#113`](https://github.com/CookPete/auto-changelog/pull/113)
- fix for handlebars-setup arg [`#110`](https://github.com/CookPete/auto-changelog/pull/110)
- Add --append-git-log option [`#118`](https://github.com/CookPete/auto-changelog/pull/118) [`#117`](https://github.com/CookPete/auto-changelog/issues/117)
- Update test data [`bb3a347`](https://github.com/CookPete/auto-changelog/commit/bb3a3475bc0c5d394727cec62486df0f5dcff9e1)
- Add commit object to merge data [`2a8de35`](https://github.com/CookPete/auto-changelog/commit/2a8de35e56e7cf43056c0f1850976699957664e1)
- Fix commander argument syntax [`01739fe`](https://github.com/CookPete/auto-changelog/commit/01739fea2accc264bde29be99b53c827f44ba1e9)
#### [v1.13.0](https://github.com/CookPete/auto-changelog/compare/v1.12.1...v1.13.0)
> 16 April 2019
- Support partial semver tag sorting [`#94`](https://github.com/CookPete/auto-changelog/issues/94)
- Update --package option to accept file path [`#106`](https://github.com/CookPete/auto-changelog/issues/106)
- Tidy up getOptions [`0168216`](https://github.com/CookPete/auto-changelog/commit/0168216be9976d918ca4f64168d7c8db53cc9cb8)
- Tidy up readJson util [`36bfd9e`](https://github.com/CookPete/auto-changelog/commit/36bfd9e89f3a9f9d40aa54765141e1be70d8ff06)
- Space out error logs [`2bc35ce`](https://github.com/CookPete/auto-changelog/commit/2bc35ce4e57f68990a69f2c2846610015330a50f)
#### [v1.12.1](https://github.com/CookPete/auto-changelog/compare/v1.12.0...v1.12.1)
> 11 April 2019
- Change behaviour of ignoreCommitPattern to see tags on ignored commits [`#102`](https://github.com/CookPete/auto-changelog/pull/102)
- Bump packages [`b371147`](https://github.com/CookPete/auto-changelog/commit/b371147dea0b483663a040b69e4193944b951b51)
- Remove greenkeeper [`b0841c8`](https://github.com/CookPete/auto-changelog/commit/b0841c8a6af737ea0ca3c00a98015b10fdd0821a)
#### [v1.12.0](https://github.com/CookPete/auto-changelog/compare/v1.11.0...v1.12.0)
> 18 March 2019
- Add main entry to package.json [`#87`](https://github.com/CookPete/auto-changelog/pull/87)
- Update mocha to the latest version 🚀 [`#88`](https://github.com/CookPete/auto-changelog/pull/88)
- Add --merge-pattern option [`#86`](https://github.com/CookPete/auto-changelog/pull/86)
- yarn upgrade [`#91`](https://github.com/CookPete/auto-changelog/pull/91)
- Add --handlebars-setup option [`#96`](https://github.com/CookPete/auto-changelog/issues/96) [`#89`](https://github.com/CookPete/auto-changelog/issues/89) [`#90`](https://github.com/CookPete/auto-changelog/pull/90)
- Add --sort-commits option [`#95`](https://github.com/CookPete/auto-changelog/issues/95) [`#97`](https://github.com/CookPete/auto-changelog/pull/97)
#### [v1.11.0](https://github.com/CookPete/auto-changelog/compare/v1.10.3...v1.11.0)
> 14 January 2019
- Add --stdout option [`#83`](https://github.com/CookPete/auto-changelog/issues/83)
- Fix sortReleases for non-semver tags [`#81`](https://github.com/CookPete/auto-changelog/issues/81)
- Add backtick characters to test data [`ab73c8a`](https://github.com/CookPete/auto-changelog/commit/ab73c8a265b93992fa61999dde8962e61ef60c64)
#### [v1.10.3](https://github.com/CookPete/auto-changelog/compare/v1.10.2...v1.10.3)
> 4 January 2019
- Clarify includeBranch config array in readme [`#75`](https://github.com/CookPete/auto-changelog/issues/75)
- Remove package-lock.json from repo [`512205b`](https://github.com/CookPete/auto-changelog/commit/512205b1a028d3ded629c84d475a15fc2e44163c)
- Sort and slice commits for latest release [`7d7f377`](https://github.com/CookPete/auto-changelog/commit/7d7f377c17384b8b80c71ffb9bcd2900640255e3)
- Fix breaking commit sorting [`73c05a1`](https://github.com/CookPete/auto-changelog/commit/73c05a1f3218dccc9a7e9f46577c45fb1af986e3)
#### [v1.10.2](https://github.com/CookPete/auto-changelog/compare/v1.10.1...v1.10.2)
> 18 November 2018
- Upgrade all packages [`#59`](https://github.com/CookPete/auto-changelog/pull/59)
- Remove package-lock.json [`791a261`](https://github.com/CookPete/auto-changelog/commit/791a2617361657630e389b09e193ca57c237623d)
#### [v1.10.1](https://github.com/CookPete/auto-changelog/compare/v1.10.0...v1.10.1)
> 13 November 2018
- Use readline for log util [`#73`](https://github.com/CookPete/auto-changelog/issues/73) [`#74`](https://github.com/CookPete/auto-changelog/issues/74)
#### [v1.10.0](https://github.com/CookPete/auto-changelog/compare/v1.9.0...v1.10.0)
> 10 November 2018
- Update tests [`644f5d8`](https://github.com/CookPete/auto-changelog/commit/644f5d8a79042431c0a89f99866034ac124cce56)
- Add better progress logging [`64ebb30`](https://github.com/CookPete/auto-changelog/commit/64ebb30b8e979afa028ec2b147405b3cbf854e36)
- Add --backfill-limit option [`5240b1e`](https://github.com/CookPete/auto-changelog/commit/5240b1e5298a2a0bef405100ab03636b491306c0)
#### [v1.9.0](https://github.com/CookPete/auto-changelog/compare/v1.8.1...v1.9.0)
> 8 November 2018
- Add support for azure devops and visualstudio.com [`#72`](https://github.com/CookPete/auto-changelog/pull/72)
- Bump packages [`#56`](https://github.com/CookPete/auto-changelog/pull/56) [`#60`](https://github.com/CookPete/auto-changelog/pull/60) [`#61`](https://github.com/CookPete/auto-changelog/pull/61)
- Add --tag-pattern option [`#70`](https://github.com/CookPete/auto-changelog/pull/70)
- Add support for .auto-changelog config [`#66`](https://github.com/CookPete/auto-changelog/pull/66)
- Add --release-summary option [`#69`](https://github.com/CookPete/auto-changelog/issues/69)
- Add tests for `.auto-changelog` feature [`17b0926`](https://github.com/CookPete/auto-changelog/commit/17b09269fa5603e0be7f5ffe5ce67996f7cf4176)
- Add tests for sortReleases [`9d80b9d`](https://github.com/CookPete/auto-changelog/commit/9d80b9d8a7dfcb5f0db37dad1fa8757e3124c564)
- Fix quote style [`5c18eda`](https://github.com/CookPete/auto-changelog/commit/5c18edaebff560e3e982a8d58ee7473f24b6be24)
#### [v1.8.1](https://github.com/CookPete/auto-changelog/compare/v1.8.0...v1.8.1)
> 8 October 2018
- Fix Bitbucket compare links. [`#65`](https://github.com/CookPete/auto-changelog/pull/65)
- Update markdownlint-cli to the latest version 🚀 [`#54`](https://github.com/CookPete/auto-changelog/pull/54)
- Update markdownlint-cli to the latest version 🚀 [`#51`](https://github.com/CookPete/auto-changelog/pull/51)
- Add author to fixes and merges [`#58`](https://github.com/CookPete/auto-changelog/issues/58)
- Remove unsupported node versions from travis builds [`df63917`](https://github.com/CookPete/auto-changelog/commit/df63917391f3b30ceaa13a774b05889e659e4dd4)
- Add timeout to URL fetching test [`d635a06`](https://github.com/CookPete/auto-changelog/commit/d635a06cf9e544fd4b11a9f6eed0fbdc597d41ea)
- Add node 6.0 to travis builds [`088077e`](https://github.com/CookPete/auto-changelog/commit/088077e51fe581d41dfeb56b009845be9d9e3c65)
#### [v1.8.0](https://github.com/CookPete/auto-changelog/compare/v1.7.2...v1.8.0)
> 23 July 2018
- Add support for external templates [`#49`](https://github.com/CookPete/auto-changelog/issues/49) [`#50`](https://github.com/CookPete/auto-changelog/pull/50)
- Bump nyc [`#46`](https://github.com/CookPete/auto-changelog/pull/46)
- Add README.md to lint checks [`5aab29f`](https://github.com/CookPete/auto-changelog/commit/5aab29f18d4187fa2480cd7754eba8e579ea0534)
- Tweak readme headings [`9f08899`](https://github.com/CookPete/auto-changelog/commit/9f08899466ccc515609456192e15d60c60db411b)
- Remove git from engines [`bac0248`](https://github.com/CookPete/auto-changelog/commit/bac024828c93587ea4603865e5946382f9e88070)
#### [v1.7.2](https://github.com/CookPete/auto-changelog/compare/v1.7.1...v1.7.2)
> 28 June 2018
- Fix unreleased section sorting [`#48`](https://github.com/CookPete/auto-changelog/issues/48)
- Add markdown linting [`#47`](https://github.com/CookPete/auto-changelog/issues/47)
- Fix changelog spacing [`5e8ffe5`](https://github.com/CookPete/auto-changelog/commit/5e8ffe564b2752f4f1828d64174cc784f6168fdf)
- Use %B for supported git versions [`1b9c3d7`](https://github.com/CookPete/auto-changelog/commit/1b9c3d71732244b6a2c265dae9aae879bd5f33b2)
- Enable partial line coverage with codecov [`e0d24de`](https://github.com/CookPete/auto-changelog/commit/e0d24debb40967014aea1bcc1738bbc1d0279ba2)
#### [v1.7.1](https://github.com/CookPete/auto-changelog/compare/v1.7.0...v1.7.1)
> 31 May 2018
- Fix releases sorting when unreleased enabled [`#45`](https://github.com/CookPete/auto-changelog/pull/45)
- Use async fs utils instead of fs-extra [`#42`](https://github.com/CookPete/auto-changelog/pull/42)
- Update git log format to support earlier git versions [`#43`](https://github.com/CookPete/auto-changelog/issues/43)
#### [v1.7.0](https://github.com/CookPete/auto-changelog/compare/v1.6.0...v1.7.0)
> 23 May 2018
- Add replaceText package option [`77d73ee`](https://github.com/CookPete/auto-changelog/commit/77d73ee4a44d5d207ba0982bf1e27812739d542a)
#### [v1.6.0](https://github.com/CookPete/auto-changelog/compare/v1.5.0...v1.6.0)
> 17 May 2018
- Add --breaking-pattern option [`#41`](https://github.com/CookPete/auto-changelog/issues/41)
- Add --include-branch option [`#38`](https://github.com/CookPete/auto-changelog/issues/38)
- Fix duplicate test data commit hashes [`7f448ce`](https://github.com/CookPete/auto-changelog/commit/7f448ce7154e7da4d677aa4c96a2721499436edb)
#### [v1.5.0](https://github.com/CookPete/auto-changelog/compare/v1.4.6...v1.5.0)
> 16 May 2018
- Feat: match template helper [`#40`](https://github.com/CookPete/auto-changelog/pull/40)
- Add commit-list template helper [`#36`](https://github.com/CookPete/auto-changelog/issues/36) [`#39`](https://github.com/CookPete/auto-changelog/issues/39)
- Use UTC dates by default [`#37`](https://github.com/CookPete/auto-changelog/issues/37)
- Move helper tests to separate files [`71388c2`](https://github.com/CookPete/auto-changelog/commit/71388c2dca9d9d50df540f904de5b3c0c0fea86a)
- Remove unused imports from template tests [`5ca7c61`](https://github.com/CookPete/auto-changelog/commit/5ca7c619dd9f8ca02cdcb67469025f71ab10cc2f)
#### [v1.4.6](https://github.com/CookPete/auto-changelog/compare/v1.4.5...v1.4.6)
> 15 March 2018
- Added support for old git versions [`#35`](https://github.com/CookPete/auto-changelog/pull/35)
#### [v1.4.5](https://github.com/CookPete/auto-changelog/compare/v1.4.4...v1.4.5)
> 27 February 2018
- Correctly prefix package version [`#33`](https://github.com/CookPete/auto-changelog/issues/33)
#### [v1.4.4](https://github.com/CookPete/auto-changelog/compare/v1.4.3...v1.4.4)
> 22 February 2018
- Do not show date for unreleased section [`#31`](https://github.com/CookPete/auto-changelog/issues/31)
- Fix unreleased compare URL [`24fbc63`](https://github.com/CookPete/auto-changelog/commit/24fbc63adfad6df630d496d7cf1c488d97189dfe)
#### [v1.4.3](https://github.com/CookPete/auto-changelog/compare/v1.4.2...v1.4.3)
> 21 February 2018
- Add tag prefix to compare URLs [`#30`](https://github.com/CookPete/auto-changelog/issues/30)
#### [v1.4.2](https://github.com/CookPete/auto-changelog/compare/v1.4.1...v1.4.2)
> 20 February 2018
- Support for gitlab subgroups and self-hosted instances [`#28`](https://github.com/CookPete/auto-changelog/pull/28)
- Update standard to the latest version 🚀 [`#29`](https://github.com/CookPete/auto-changelog/pull/29)
#### [v1.4.1](https://github.com/CookPete/auto-changelog/compare/v1.4.0...v1.4.1)
> 30 January 2018
- Support commits with no message [`#27`](https://github.com/CookPete/auto-changelog/issues/27)
#### [v1.4.0](https://github.com/CookPete/auto-changelog/compare/v1.3.0...v1.4.0)
> 18 January 2018
- Update mocha to the latest version 🚀 [`#26`](https://github.com/CookPete/auto-changelog/pull/26)
- Add support for generating logs without a git remote [`#23`](https://github.com/CookPete/auto-changelog/issues/23)
- Update niceDate tests to avoid timezone issues [`#24`](https://github.com/CookPete/auto-changelog/issues/24) [`#25`](https://github.com/CookPete/auto-changelog/pull/25)
- Add --tag-prefix option [`#22`](https://github.com/CookPete/auto-changelog/issues/22)
- Change use of "origin" to "remote" [`7c9c175`](https://github.com/CookPete/auto-changelog/commit/7c9c1757257be10e3beae072941d119d195becd7)
- Add --ignore-commit-pattern option [`8cbe121`](https://github.com/CookPete/auto-changelog/commit/8cbe121e857b8d99361e65fa462d035610f741c9)
- Add merge commit to test data [`4462118`](https://github.com/CookPete/auto-changelog/commit/4462118a26b5d76b276c8e1ba938f5c7d4458572)
#### [v1.3.0](https://github.com/CookPete/auto-changelog/compare/v1.2.2...v1.3.0)
> 21 December 2017
- Update fs-extra to the latest version 🚀 [`#19`](https://github.com/CookPete/auto-changelog/pull/19)
- Add --starting-commit option [`#21`](https://github.com/CookPete/auto-changelog/issues/21)
- Add --issue-pattern option [`#18`](https://github.com/CookPete/auto-changelog/issues/18)
- Add --latest-version option [`#17`](https://github.com/CookPete/auto-changelog/issues/17)
- Override package options with command line options [`20e3962`](https://github.com/CookPete/auto-changelog/commit/20e3962175c8168ec5494d1527b16e996e113777)
- Update tests [`2a74da4`](https://github.com/CookPete/auto-changelog/commit/2a74da474c3366f740cedb1c31a9c2539a1c9261)
#### [v1.2.2](https://github.com/CookPete/auto-changelog/compare/v1.2.1...v1.2.2)
> 5 December 2017
- Fix error when using --unreleased flag [`#16`](https://github.com/CookPete/auto-changelog/issues/16)
#### [v1.2.1](https://github.com/CookPete/auto-changelog/compare/v1.2.0...v1.2.1)
> 4 December 2017
- Filter out merge commits [`#14`](https://github.com/CookPete/auto-changelog/pull/14)
- Add commit to test data to trigger sorting [`9aa7ed4`](https://github.com/CookPete/auto-changelog/commit/9aa7ed493138286134a18a018d77ac7f5a11fc43)
- Add tests [`02613a3`](https://github.com/CookPete/auto-changelog/commit/02613a36e1071fb64a9d1251e4dae6d683a5b845)
- Add commit with matching PR message to test data [`e9a43b2`](https://github.com/CookPete/auto-changelog/commit/e9a43b2bf50449fc0d84465308e6008cc1597bb3)
#### [v1.2.0](https://github.com/CookPete/auto-changelog/compare/v1.1.0...v1.2.0)
> 1 December 2017
- Add issue-url option to override issue URLs [`#13`](https://github.com/CookPete/auto-changelog/issues/13)
- Add major release to test data [`e14f753`](https://github.com/CookPete/auto-changelog/commit/e14f753fc39fb94f3a3ffc3ab9a41015a9b97f2f)
- Update readme [`aaa69d0`](https://github.com/CookPete/auto-changelog/commit/aaa69d096cbf289e5fa086bbbd04e3ec27bcb7a4)
- Slightly larger heading for major releases [`d618f01`](https://github.com/CookPete/auto-changelog/commit/d618f019abc59da903cbafaa49ac9731e815b95a)
#### [v1.1.0](https://github.com/CookPete/auto-changelog/compare/v1.0.3...v1.1.0)
> 9 November 2017
- Support modifying commit limit with --commit-limit [`#12`](https://github.com/CookPete/auto-changelog/pull/12)
- Move test origins to separate file [`f8b98b5`](https://github.com/CookPete/auto-changelog/commit/f8b98b536612a89c0f93eb6451be90d857468eac)
- Add origin tests [`f50dced`](https://github.com/CookPete/auto-changelog/commit/f50dced289d3780726b67abfba3359c6b83c6ca7)
- Add run tests [`a6ae95e`](https://github.com/CookPete/auto-changelog/commit/a6ae95ec1045dbb76540dde63cafa4fbaa0fc030)
#### [v1.0.3](https://github.com/CookPete/auto-changelog/compare/v1.0.2...v1.0.3)
> 7 November 2017
- Fix pull request URL [`3f6daaa`](https://github.com/CookPete/auto-changelog/commit/3f6daaa35b3da08bafec0ef9229cb4b09bc1c9cb)
- Bump packages [`510c798`](https://github.com/CookPete/auto-changelog/commit/510c798fe6bb688234bb8b4eb3885055a47ee2bb)
- Fix version script [`f849dac`](https://github.com/CookPete/auto-changelog/commit/f849dac557b2c24512c553d9fccb93e1455a8c2e)
#### [v1.0.2](https://github.com/CookPete/auto-changelog/compare/v1.0.1...v1.0.2)
> 31 October 2017
- Tweak package read logic [`5ca75a2`](https://github.com/CookPete/auto-changelog/commit/5ca75a2a051a496fe7899185d486dc6447a44d7a)
- Fall back to https origin protocol [`74e29b4`](https://github.com/CookPete/auto-changelog/commit/74e29b4c40a8522a8aa33b6b66e845859dbcde1d)
#### [v1.0.1](https://github.com/CookPete/auto-changelog/compare/v1.0.0...v1.0.1)
> 27 October 2017
- Filter out commits with the same message as an existing merge [`2a420f7`](https://github.com/CookPete/auto-changelog/commit/2a420f793ac3b761291cfd5499676a80953cbee7)
- Update readme [`54fc665`](https://github.com/CookPete/auto-changelog/commit/54fc6659e9283b6d6afc95486893aa56df13111c)
### [v1.0.0](https://github.com/CookPete/auto-changelog/compare/v0.3.6...v1.0.0)
> 27 October 2017
- Update dependencies to enable Greenkeeper 🌴 [`#10`](https://github.com/CookPete/auto-changelog/pull/10)
- Refactor codebase [`dab29fb`](https://github.com/CookPete/auto-changelog/commit/dab29fb3a030ffe2799075ef46c70c734d8d2b89)
- Add greenkeeper-lockfile support [`126c6fb`](https://github.com/CookPete/auto-changelog/commit/126c6fbd054c16624ab39cbb51a2eab99bc832c6)
- Tweak readme badges [`bf73f55`](https://github.com/CookPete/auto-changelog/commit/bf73f555422ef5338455182b9649badc122bdadf)
#### [v0.3.6](https://github.com/CookPete/auto-changelog/compare/v0.3.5...v0.3.6)
> 23 October 2017
- Use origin hostname instead of host [`#9`](https://github.com/CookPete/auto-changelog/issues/9)
- Correct bitbucket compare URLs [`9d34452`](https://github.com/CookPete/auto-changelog/commit/9d344527171c158e1d56fdfde5cce870c5ba84bf)
#### [v0.3.5](https://github.com/CookPete/auto-changelog/compare/v0.3.4...v0.3.5)
> 6 October 2017
- Add babel-polyfill [`#8`](https://github.com/CookPete/auto-changelog/issues/8)
#### [v0.3.4](https://github.com/CookPete/auto-changelog/compare/v0.3.3...v0.3.4)
> 5 October 2017
- Add code coverage [`786af11`](https://github.com/CookPete/auto-changelog/commit/786af11c841fe158fbb8eb3d6a0e2c0ee8b1a93a)
- Use async/await instead of promises [`dff4653`](https://github.com/CookPete/auto-changelog/commit/dff465371252ce6ab4cd05e49d4c41fd8d3bb37a)
- Remove need for array.find polyfill [`78a1cb8`](https://github.com/CookPete/auto-changelog/commit/78a1cb8ac9327ecb0efadffed037f90191bdce5a)
#### [v0.3.3](https://github.com/CookPete/auto-changelog/compare/v0.3.2...v0.3.3)
> 24 September 2017
- Bump packages [`#7`](https://github.com/CookPete/auto-changelog/issues/7)
- Use babel-preset-env [`3eb90ce`](https://github.com/CookPete/auto-changelog/commit/3eb90ce74791fa803e3013aab12d0ff3cecc403b)
- Lint fix [`67c38dd`](https://github.com/CookPete/auto-changelog/commit/67c38ddf70b7420de0a9bae061efe858e879e0b7)
#### [v0.3.2](https://github.com/CookPete/auto-changelog/compare/v0.3.1...v0.3.2)
> 14 September 2017
- Prevent duplicate commits being listed [`#3`](https://github.com/CookPete/auto-changelog/issues/3)
#### [v0.3.1](https://github.com/CookPete/auto-changelog/compare/v0.3.0...v0.3.1)
> 9 September 2016
- Improve origin URL parsing [`#2`](https://github.com/CookPete/auto-changelog/issues/2) [`#5`](https://github.com/CookPete/auto-changelog/issues/5)
- Remove semicolons [`2ff61e2`](https://github.com/CookPete/auto-changelog/commit/2ff61e2f6b415bd24cfdf1788a3a4239138e6aa2)
- More robust log separators [`adc1dcc`](https://github.com/CookPete/auto-changelog/commit/adc1dccb744335ed1b0cb52a32f23605f92bbe97)
- Improve error handling [`96b7666`](https://github.com/CookPete/auto-changelog/commit/96b7666e50126dc515bb7bf2f9a79090ad7d8806)
#### [v0.3.0](https://github.com/CookPete/auto-changelog/compare/v0.2.2...v0.3.0)
> 11 January 2016
- Add semicolons after class properties [`07b2de5`](https://github.com/CookPete/auto-changelog/commit/07b2de5131f4354565b2ba94a5fc181a1448b5c2)
- Remove unique issue filter [`11acb7e`](https://github.com/CookPete/auto-changelog/commit/11acb7e4a9f2782a95e0932917828646103bd85a)
- Add support for minimumChangeCount in templates [`612d80b`](https://github.com/CookPete/auto-changelog/commit/612d80b02cabbc2faeddd39c57bd086661932aef)
#### [v0.2.2](https://github.com/CookPete/auto-changelog/compare/v0.2.1...v0.2.2)
> 2 January 2016
- Add a commit-only release to test data [`99927a9`](https://github.com/CookPete/auto-changelog/commit/99927a9b2126e656f70964f303a477aa4a5f811b)
- Update templating logic [`12c0624`](https://github.com/CookPete/auto-changelog/commit/12c0624e7e419a70bd5f3b403d7e0bd8f23ec617)
- More sensible formatDate [`db92947`](https://github.com/CookPete/auto-changelog/commit/db92947e6129cc20cd7777b7ed90b2bd547918c0)
#### [v0.2.1](https://github.com/CookPete/auto-changelog/compare/v0.2.0...v0.2.1)
> 2 January 2016
- Replace toLocaleString usage with months array [`0008264`](https://github.com/CookPete/auto-changelog/commit/0008264bcabddf8d2b6b19fde7aa41b0de7a5b77)
#### [v0.2.0](https://github.com/CookPete/auto-changelog/compare/v0.1.1...v0.2.0)
> 2 January 2016
- Add support for specifying templates [`369b51e`](https://github.com/CookPete/auto-changelog/commit/369b51e9ff05bccba19cd09d9d519bca579bf972)
- Add FAQ to readme [`9351ad0`](https://github.com/CookPete/auto-changelog/commit/9351ad0b5f6e7f59e1b51b1c7ea1a3e7720dfbbc)
- Rearrange usage docs [`c6bfb0b`](https://github.com/CookPete/auto-changelog/commit/c6bfb0be0b429ce7f9697eb1097ec3e2288aff74)
#### [v0.1.1](https://github.com/CookPete/auto-changelog/compare/v0.1.0...v0.1.1)
> 31 December 2015
- Explicitly render links for PRs and issues [`0a384cd`](https://github.com/CookPete/auto-changelog/commit/0a384cdeb3e9c3641fc3f655b0d9aeff58f8ebd3)
- Fix --package bug [`7f12f81`](https://github.com/CookPete/auto-changelog/commit/7f12f81f06441af4c74508ccc673e7052dec8d18)
#### [v0.1.0](https://github.com/CookPete/auto-changelog/compare/v0.0.1...v0.1.0)
> 31 December 2015
- Add option for specifying output file [`#1`](https://github.com/CookPete/auto-changelog/issues/1)
- Add support for --package [`772fbb9`](https://github.com/CookPete/auto-changelog/commit/772fbb988f41d893bccd88417a2b5992543bc936)
- Update badges [`d17791f`](https://github.com/CookPete/auto-changelog/commit/d17791f478b7fc4a48877b5c79a1ce857223553a)
- Remove todo list from readme [`4446226`](https://github.com/CookPete/auto-changelog/commit/4446226048642ad19a7bfbc1c2f8040a6d15cbc3)
#### v0.0.1
> 31 December 2015
- First commit [`436b409`](https://github.com/CookPete/auto-changelog/commit/436b409bb6b3f853d14e2eda6ca1d87f78d00a14)

View File

@@ -0,0 +1,41 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subscriber_1 = require("../Subscriber");
function dematerialize() {
return function dematerializeOperatorFunction(source) {
return source.lift(new DeMaterializeOperator());
};
}
exports.dematerialize = dematerialize;
var DeMaterializeOperator = (function () {
function DeMaterializeOperator() {
}
DeMaterializeOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new DeMaterializeSubscriber(subscriber));
};
return DeMaterializeOperator;
}());
var DeMaterializeSubscriber = (function (_super) {
__extends(DeMaterializeSubscriber, _super);
function DeMaterializeSubscriber(destination) {
return _super.call(this, destination) || this;
}
DeMaterializeSubscriber.prototype._next = function (value) {
value.observe(this.destination);
};
return DeMaterializeSubscriber;
}(Subscriber_1.Subscriber));
//# sourceMappingURL=dematerialize.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00478,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.11479,"107":0,"108":0.39699,"109":0.24393,"110":0.00478,"111":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.01913,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0.00478,"75":0,"76":0,"77":0,"78":0.02392,"79":0.09566,"80":0,"81":0.02392,"83":0.05261,"84":0,"85":0,"86":0.56918,"87":0.02392,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.14827,"94":0.00478,"95":0,"96":0.59309,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0.36829,"104":0.00478,"105":0.04783,"106":0.02392,"107":0.06696,"108":8.12153,"109":5.54828,"110":0,"111":0,"112":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.00478,"94":0.30133,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0.03348,"104":0,"105":0,"106":0,"107":0.00478,"108":0.77485,"109":0.87051},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.08609,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.01435,"13.1":0.12436,"14.1":0.36351,"15.1":0.04783,"15.2-15.3":0.12914,"15.4":0.07653,"15.5":0.07175,"15.6":0.91834,"16.0":0.01435,"16.1":0.33959,"16.2":0.79876,"16.3":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.24804,"10.0-10.2":0,"10.3":0.24804,"11.0-11.2":0.01503,"11.3-11.4":0.01503,"12.0-12.1":0,"12.2-12.5":1.82394,"13.0-13.1":0,"13.2":0,"13.3":0,"13.4-13.7":0.02255,"14.0-14.4":0.16536,"14.5-14.8":0.72156,"15.0-15.1":0.18039,"15.2-15.3":0.53365,"15.4":0.86437,"15.5":0.29313,"15.6":2.38766,"16.0":4.86301,"16.1":5.24634,"16.2":4.36193,"16.3":0.07516},P:{"4":0,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.29215,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0,"13.0":0.07304,"14.0":0.01043,"15.0":0.01043,"16.0":0.02087,"17.0":0.01043,"18.0":0.04174,"19.0":1.17904},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.09218},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.0287,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.02087},Q:{"13.1":0},O:{"0":0.67821},H:{"0":0.08397},L:{"0":52.49876},S:{"2.5":0}};

View File

@@ -0,0 +1,27 @@
/**
Returns the type that is wrapped inside a `Promise` type.
If the type is a nested Promise, it is unwrapped recursively until a non-Promise type is obtained.
If the type is not a `Promise`, the type itself is returned.
@example
```
import {PromiseValue} from 'type-fest';
type AsyncData = Promise<string>;
let asyncData: PromiseValue<AsyncData> = Promise.resolve('ABC');
type Data = PromiseValue<AsyncData>;
let data: Data = await asyncData;
// Here's an example that shows how this type reacts to non-Promise types.
type SyncData = PromiseValue<string>;
let syncData: SyncData = getSyncData();
// Here's an example that shows how this type reacts to recursive Promise types.
type RecursiveAsyncData = Promise<Promise<string> >;
let recursiveAsyncData: PromiseValue<RecursiveAsyncData> = Promise.resolve(Promise.resolve('ABC'));
```
*/
export type PromiseValue<PromiseType, Otherwise = PromiseType> = PromiseType extends Promise<infer Value>
? { 0: PromiseValue<Value>; 1: Value }[PromiseType extends Promise<unknown> ? 0 : 1]
: Otherwise;

View File

@@ -0,0 +1,21 @@
/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
import { Observable } from '../Observable';
import { Subscription } from '../Subscription';
export function scheduleArray(input, scheduler) {
return new Observable(function (subscriber) {
var sub = new Subscription();
var i = 0;
sub.add(scheduler.schedule(function () {
if (i === input.length) {
subscriber.complete();
return;
}
subscriber.next(input[i++]);
if (!subscriber.closed) {
sub.add(this.schedule());
}
}));
return sub;
});
}
//# sourceMappingURL=scheduleArray.js.map

View File

@@ -0,0 +1,142 @@
var url = require('url')
var base64 = require('./base64')
var decodeBase64 = base64.decodeBase64
var encodeBase64 = base64.encodeBase64
var tokenKey = ':_authToken'
var legacyTokenKey = ':_auth'
var userKey = ':username'
var passwordKey = ':_password'
module.exports = function () {
var checkUrl
var options
if (arguments.length >= 2) {
checkUrl = arguments[0]
options = arguments[1]
} else if (typeof arguments[0] === 'string') {
checkUrl = arguments[0]
} else {
options = arguments[0]
}
options = options || {}
options.npmrc = options.npmrc || require('rc')('npm', { registry: 'https://registry.npmjs.org/' }, {
config: process.env.npm_config_userconfig || process.env.NPM_CONFIG_USERCONFIG
})
checkUrl = checkUrl || options.npmrc.registry
return getRegistryAuthInfo(checkUrl, options) || getLegacyAuthInfo(options.npmrc)
}
function getRegistryAuthInfo (checkUrl, options) {
var parsed = url.parse(checkUrl, false, true)
var pathname
while (pathname !== '/' && parsed.pathname !== pathname) {
pathname = parsed.pathname || '/'
var regUrl = '//' + parsed.host + pathname.replace(/\/$/, '')
var authInfo = getAuthInfoForUrl(regUrl, options.npmrc)
if (authInfo) {
return authInfo
}
// break if not recursive
if (!options.recursive) {
return /\/$/.test(checkUrl)
? undefined
: getRegistryAuthInfo(url.resolve(checkUrl, '.'), options)
}
parsed.pathname = url.resolve(normalizePath(pathname), '..') || '/'
}
return undefined
}
function getLegacyAuthInfo (npmrc) {
if (!npmrc._auth) {
return undefined
}
var token = replaceEnvironmentVariable(npmrc._auth)
return { token: token, type: 'Basic' }
}
function normalizePath (path) {
return path[path.length - 1] === '/' ? path : path + '/'
}
function getAuthInfoForUrl (regUrl, npmrc) {
// try to get bearer token
var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + '/' + tokenKey])
if (bearerAuth) {
return bearerAuth
}
// try to get basic token
var username = npmrc[regUrl + userKey] || npmrc[regUrl + '/' + userKey]
var password = npmrc[regUrl + passwordKey] || npmrc[regUrl + '/' + passwordKey]
var basicAuth = getTokenForUsernameAndPassword(username, password)
if (basicAuth) {
return basicAuth
}
var basicAuthWithToken = getLegacyAuthToken(npmrc[regUrl + legacyTokenKey] || npmrc[regUrl + '/' + legacyTokenKey])
if (basicAuthWithToken) {
return basicAuthWithToken
}
return undefined
}
function replaceEnvironmentVariable (token) {
return token.replace(/^\$\{?([^}]*)\}?$/, function (fullMatch, envVar) {
return process.env[envVar]
})
}
function getBearerToken (tok) {
if (!tok) {
return undefined
}
// check if bearer token is set as environment variable
var token = replaceEnvironmentVariable(tok)
return { token: token, type: 'Bearer' }
}
function getTokenForUsernameAndPassword (username, password) {
if (!username || !password) {
return undefined
}
// passwords are base64 encoded, so we need to decode it
// See https://github.com/npm/npm/blob/v3.10.6/lib/config/set-credentials-by-uri.js#L26
var pass = decodeBase64(replaceEnvironmentVariable(password))
// a basic auth token is base64 encoded 'username:password'
// See https://github.com/npm/npm/blob/v3.10.6/lib/config/get-credentials-by-uri.js#L70
var token = encodeBase64(username + ':' + pass)
// we found a basicToken token so let's exit the loop
return {
token: token,
type: 'Basic',
password: pass,
username: username
}
}
function getLegacyAuthToken (tok) {
if (!tok) {
return undefined
}
// check if legacy auth token is set as environment variable
var token = replaceEnvironmentVariable(tok)
return { token: token, type: 'Basic' }
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"identity.js","sources":["../../../src/internal/util/identity.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,QAAQ,CAAI,CAAI;IAC9B,OAAO,CAAC,CAAC;AACX,CAAC"}

View File

@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var async_1 = require("../scheduler/async");
var isNumeric_1 = require("../util/isNumeric");
var isScheduler_1 = require("../util/isScheduler");
function timer(dueTime, periodOrScheduler, scheduler) {
if (dueTime === void 0) { dueTime = 0; }
var period = -1;
if (isNumeric_1.isNumeric(periodOrScheduler)) {
period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
}
else if (isScheduler_1.isScheduler(periodOrScheduler)) {
scheduler = periodOrScheduler;
}
if (!isScheduler_1.isScheduler(scheduler)) {
scheduler = async_1.async;
}
return new Observable_1.Observable(function (subscriber) {
var due = isNumeric_1.isNumeric(dueTime)
? dueTime
: (+dueTime - scheduler.now());
return scheduler.schedule(dispatch, due, {
index: 0, period: period, subscriber: subscriber
});
});
}
exports.timer = timer;
function dispatch(state) {
var index = state.index, period = state.period, subscriber = state.subscriber;
subscriber.next(index);
if (subscriber.closed) {
return;
}
else if (period === -1) {
return subscriber.complete();
}
state.index = index + 1;
this.schedule(state, period);
}
//# sourceMappingURL=timer.js.map

View File

@@ -0,0 +1 @@
module.exports={A:{D:{"1":"Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","33":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X"},L:{"1":"D"},B:{"1":"Y Z a b c d f g h i j k l m n o p q r s D t","33":"C K L H M N O P Q R S T U V W X"},C:{"1":"wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB","2":"0 1 2 3 4 5 6 7 8 9 CC tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R DC EC"},M:{"1":"D"},A:{"2":"J E F G BC","33":"A B"},F:{"1":"mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"G B C OC PC QC RC qB 9B SC rB","33":"0 1 2 3 4 5 6 7 8 9 H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB"},K:{"1":"e","2":"A B C qB 9B rB"},E:{"1":"H LC MC 2B 3B 4B 5B sB 6B 7B 8B","2":"NC","33":"I u J E F G A B C K L GC zB HC IC JC KC 0B qB rB 1B"},G:{"1":"lC mC 2B 3B 4B 5B sB 6B 7B 8B","33":"F zB TC AC UC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC"},P:{"1":"4C sB 5C 6C 7C","33":"I vC wC xC yC zC 0B 0C 1C 2C 3C"},I:{"1":"D","2":"tB I oC pC qC rC AC","33":"sC tC"}},B:6,C:"::file-selector-button CSS pseudo-element"};

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00898,"53":0,"54":0,"55":0.00299,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0.00299,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0.00299,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.00299,"99":0,"100":0,"101":0,"102":0.01198,"103":0,"104":0.00299,"105":0,"106":0.00299,"107":0.00599,"108":0.13174,"109":0.09281,"110":0,"111":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00299,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0.00299,"49":0.05689,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0.00599,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.00898,"65":0,"66":0.01497,"67":0,"68":0.00299,"69":0,"70":0,"71":0.00299,"72":0.00599,"73":0.00299,"74":0,"75":0,"76":0.00299,"77":0,"78":0.00599,"79":0.01497,"80":0.00299,"81":0.00599,"83":0.01497,"84":0.01497,"85":0.00898,"86":0.01497,"87":0.00299,"88":0.00299,"89":0.00898,"90":0.00599,"91":0.00599,"92":0.00299,"93":0.00599,"94":0.12874,"95":0.00299,"96":0.00898,"97":0.00599,"98":0.00898,"99":0.00299,"100":0.02395,"101":0.00599,"102":0.02096,"103":0.02096,"104":0.06587,"105":0.03593,"106":0.02096,"107":0.0509,"108":2.49101,"109":2.91915,"110":0.00299,"111":0.00299,"112":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00299,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00299,"50":0,"51":0.00299,"52":0,"53":0.00898,"54":0,"55":0.00299,"56":0,"57":0.00299,"58":0,"60":0.00299,"62":0.00599,"63":0,"64":0.00299,"65":0,"66":0,"67":0,"68":0.00299,"69":0,"70":0,"71":0,"72":0,"73":0.02096,"74":0,"75":0,"76":0,"77":0.00299,"78":0,"79":0.01497,"80":0,"81":0,"82":0,"83":0,"84":0.00299,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0.01497,"91":0.00299,"92":0.00299,"93":0.01198,"94":0.09281,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0.00299,"18":0.01796,"79":0,"80":0,"81":0,"83":0,"84":0.00599,"85":0,"86":0.00299,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00599,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0.00299,"106":0,"107":0.00599,"108":0.22754,"109":0.2485},E:{"4":0,"5":0.00898,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00299,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.0988,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00299,"14.1":0.00599,"15.1":0.00299,"15.2-15.3":0.00599,"15.4":0.00599,"15.5":0.00898,"15.6":0.03593,"16.0":0.00599,"16.1":0.03892,"16.2":0.0509,"16.3":0.00299},G:{"8":0,"3.2":0,"4.0-4.1":0.00118,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0.03885,"8.1-8.4":0,"9.0-9.2":0.00942,"9.3":0.09182,"10.0-10.2":0.00118,"10.3":0.03178,"11.0-11.2":0.03178,"11.3-11.4":0.00706,"12.0-12.1":0.00471,"12.2-12.5":0.77461,"13.0-13.1":0.00589,"13.2":0.00471,"13.3":0.02119,"13.4-13.7":0.07181,"14.0-14.4":0.18011,"14.5-14.8":0.29077,"15.0-15.1":0.11654,"15.2-15.3":0.16952,"15.4":0.1601,"15.5":0.32727,"15.6":0.84642,"16.0":1.86119,"16.1":2.53691,"16.2":2.37563,"16.3":0.279},P:{"4":0.63375,"5.0-5.4":0.01006,"6.2-6.4":0.08048,"7.2-7.4":0.72429,"8.2":0,"9.2":0.06036,"10.1":0.02012,"11.1-11.2":0.15089,"12.0":0.03018,"13.0":0.15089,"14.0":0.14083,"15.0":0.08048,"16.0":0.29173,"17.0":0.24143,"18.0":0.4225,"19.0":2.66579},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00408,"4.2-4.3":0.01021,"4.4":0,"4.4.3-4.4.4":0.07965},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.05988,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},S:{"2.5":0},R:{_:"0"},M:{"0":0.05605},Q:{"13.1":0.00701},O:{"0":3.56605},H:{"0":0.34491},L:{"0":66.24517}};

View File

@@ -0,0 +1,39 @@
import { Subscriber } from '../Subscriber';
import { async } from '../scheduler/async';
export function sampleTime(period, scheduler = async) {
return (source) => source.lift(new SampleTimeOperator(period, scheduler));
}
class SampleTimeOperator {
constructor(period, scheduler) {
this.period = period;
this.scheduler = scheduler;
}
call(subscriber, source) {
return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
}
}
class SampleTimeSubscriber extends Subscriber {
constructor(destination, period, scheduler) {
super(destination);
this.period = period;
this.scheduler = scheduler;
this.hasValue = false;
this.add(scheduler.schedule(dispatchNotification, period, { subscriber: this, period }));
}
_next(value) {
this.lastValue = value;
this.hasValue = true;
}
notifyNext() {
if (this.hasValue) {
this.hasValue = false;
this.destination.next(this.lastValue);
}
}
}
function dispatchNotification(state) {
let { subscriber, period } = state;
subscriber.notifyNext();
this.schedule(state, period);
}
//# sourceMappingURL=sampleTime.js.map

View File

@@ -0,0 +1 @@
{"name":"qs","version":"6.11.0","files":{".editorconfig":{"checkedAt":1678887829769,"integrity":"sha512-T/4GZRAixFtpM5jiFne1+ZO5WYsiwNqy16+ISq7ZB6a8IEU1Ri5AY/Z/SWlGa2OEm04lAH9pKOOnBGBWRovXYA==","mode":420,"size":569},".eslintrc":{"checkedAt":1678887829769,"integrity":"sha512-BJQA1HH9kBt6I8gfSi3OSkF1qDgA4LRf1cHUfJ9Ha+HwQEzhW3A5w5Vj72wiPSjrTVHiojThMGqbBZAUaFKOcA==","mode":420,"size":1025},".nycrc":{"checkedAt":1678887829769,"integrity":"sha512-wRWNfuCzyGaL0jcL+DSbPh36vDFUiqoLFkk8Ul/P1AeSVOwHv7tNb+Hst4AWeaP8kxhCinlTs8JhyHM3BT2Ztg==","mode":420,"size":216},"lib/formats.js":{"checkedAt":1678887829769,"integrity":"sha512-OcHHLclFNqz/Rjviob99wosOMew3erp28OyGiR7kypS0168aqmU+UA2eH45GU48691Rpw6pC7TnrIdGnCAwMFw==","mode":420,"size":476},"lib/index.js":{"checkedAt":1678887829769,"integrity":"sha512-UDZdA1gOXbn9B/0Hccy3AuWxgXPnIAyj6MeSytulcfbt1bbMEkWClidxQ8PGPNOtres8jcoUCmoYxSWxB8rmag==","mode":420,"size":211},"lib/parse.js":{"checkedAt":1678887829777,"integrity":"sha512-JMoOvStVAelW7CQKV7FOueIEszjmsKzP/AQS4XTrRST4S0vKcdjmeFFTWUFZ+K6HMNCdBBT8HEB8lAQP4zu8ZA==","mode":420,"size":9380},"test/parse.js":{"checkedAt":1678887829789,"integrity":"sha512-GSiQoARBd/wO31wbl6a2QXBLEMgQ8SY9ZrkPT0EF/Ye01tpYW/PsnlKNbqlGSmqS9T/lYIHJyt5AUMJ1jYdkEA==","mode":420,"size":35871},"dist/qs.js":{"checkedAt":1678887829802,"integrity":"sha512-QXQgo/rJDUE26PrRHxhISwratdyZi9e/zvnlv72Mk6W3lmTa5YiiVaR9cYxNRjQIZXzAShwslz6rkOttv90g6g==","mode":420,"size":69136},"lib/stringify.js":{"checkedAt":1678887829806,"integrity":"sha512-3vy/yu53hM1G05f4h34voOtjqbQ49fwevNrcjV4KPmewi6naPnWaeMAzY+aA9S1UUF4ZOfFcqVyT3TrWGk6tzg==","mode":420,"size":10358},"test/stringify.js":{"checkedAt":1678887829815,"integrity":"sha512-1dFLTi9pX+WeI95rKijT3qOfXgWYqJKYtLdnCsgX880r3rJAhv3DTSe4Q6wn4bRofXS96nO9a7sQQvzL+AYmYw==","mode":420,"size":35186},"lib/utils.js":{"checkedAt":1678887829815,"integrity":"sha512-iibtlTA3gZUxNykFTLiwY7SWthdpqWrlAzk0mtRgGcgYbF9kJvwuyBhNIu+nzPVG0RJKm2Rn1X7ZkBni6d1L1g==","mode":420,"size":6823},"test/utils.js":{"checkedAt":1678887829817,"integrity":"sha512-R8dXW1KSce4RjrJ1D06jyQRd3a/oF3Ut3NYY9F/I4rJihRf1w+wh2PYRf6QkhzAgWx7uxV+1h8lIqcT2rkvxog==","mode":420,"size":5112},"package.json":{"checkedAt":1678887829818,"integrity":"sha512-iA5OwwDHlIPHG7dir425HaZTKzZMJ1Eth5EgQM4SA5nuNlYJI38zx4UDfUdr0Kb/cB7furkSNHcP2fUBHffFhw==","mode":420,"size":2317},"LICENSE.md":{"checkedAt":1678887829825,"integrity":"sha512-ws1xNdJWTK1MR8J+u0YjLEp7hwBhsTSWvUQ5BLWe8A32LtaBkY0LnbVEXVTKrrMC6R+yTdUIR9dcbwpINA+Djw==","mode":420,"size":1600},"CHANGELOG.md":{"checkedAt":1678887829825,"integrity":"sha512-GwMvuKCgOaSdW2kPL+5QwPXEbCGL4J9wT1V6i/w8vM6SVW8b6L9Uu1J8bs1ax7p+XqjA1VhCBXQjELj+N/9xqA==","mode":420,"size":29661},"README.md":{"checkedAt":1678887829827,"integrity":"sha512-NxxzIM8qM5PX5Sx+gYk5wH3Sb4/UuU2teLmaga5ssUPQt9nwLhifR2GxWmPg9FJg9avtlAjH9LRw/wHmUDGvaA==","mode":420,"size":20966},".github/FUNDING.yml":{"checkedAt":1678887829827,"integrity":"sha512-tXO9jRSSF4NXCoZ08c2b/IQDCBYFNnlHpjqDabIG2ApCM2azI4Jd3DbgeTi9Pl9xDEUxpFIG0zH2MasyvLbuWQ==","mode":420,"size":548}}}