new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
/** @prettier */
|
||||
import { Subscription } from './Subscription';
|
||||
import { Subscriber } from './Subscriber';
|
||||
interface SimpleOuterSubscriberLike<T> {
|
||||
/**
|
||||
* A handler for inner next notifications from the inner subscription
|
||||
* @param innerValue the value nexted by the inner producer
|
||||
*/
|
||||
notifyNext(innerValue: T): void;
|
||||
/**
|
||||
* A handler for inner error notifications from the inner subscription
|
||||
* @param err the error from the inner producer
|
||||
*/
|
||||
notifyError(err: any): void;
|
||||
/**
|
||||
* A handler for inner complete notifications from the inner subscription.
|
||||
*/
|
||||
notifyComplete(): void;
|
||||
}
|
||||
export declare class SimpleInnerSubscriber<T> extends Subscriber<T> {
|
||||
private parent;
|
||||
constructor(parent: SimpleOuterSubscriberLike<any>);
|
||||
protected _next(value: T): void;
|
||||
protected _error(error: any): void;
|
||||
protected _complete(): void;
|
||||
}
|
||||
export declare class ComplexInnerSubscriber<T, R> extends Subscriber<R> {
|
||||
private parent;
|
||||
outerValue: T;
|
||||
outerIndex: number;
|
||||
constructor(parent: ComplexOuterSubscriber<T, R>, outerValue: T, outerIndex: number);
|
||||
protected _next(value: R): void;
|
||||
protected _error(error: any): void;
|
||||
protected _complete(): void;
|
||||
}
|
||||
export declare class SimpleOuterSubscriber<T, R> extends Subscriber<T> implements SimpleOuterSubscriberLike<R> {
|
||||
notifyNext(innerValue: R): void;
|
||||
notifyError(err: any): void;
|
||||
notifyComplete(): void;
|
||||
}
|
||||
/**
|
||||
* DO NOT USE (formerly "OuterSubscriber")
|
||||
* TODO: We want to refactor this and remove it. It is retaining values it shouldn't for long
|
||||
* periods of time.
|
||||
*/
|
||||
export declare class ComplexOuterSubscriber<T, R> extends Subscriber<T> {
|
||||
/**
|
||||
* @param _outerValue Used by: bufferToggle, delayWhen, windowToggle
|
||||
* @param innerValue Used by: subclass default, combineLatest, race, bufferToggle, windowToggle, withLatestFrom
|
||||
* @param _outerIndex Used by: combineLatest, race, withLatestFrom
|
||||
* @param _innerSub Used by: delayWhen
|
||||
*/
|
||||
notifyNext(_outerValue: T, innerValue: R, _outerIndex: number, _innerSub: ComplexInnerSubscriber<T, R>): void;
|
||||
notifyError(error: any): void;
|
||||
/**
|
||||
* @param _innerSub Used by: race, bufferToggle, delayWhen, windowToggle, windowWhen
|
||||
*/
|
||||
notifyComplete(_innerSub: ComplexInnerSubscriber<T, R>): void;
|
||||
}
|
||||
export declare function innerSubscribe(result: any, innerSubscriber: Subscriber<any>): Subscription | undefined;
|
||||
export {};
|
||||
@@ -0,0 +1,20 @@
|
||||
import assertString from './util/assertString';
|
||||
/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */
|
||||
|
||||
var dateFullYear = /[0-9]{4}/;
|
||||
var dateMonth = /(0[1-9]|1[0-2])/;
|
||||
var dateMDay = /([12]\d|0[1-9]|3[01])/;
|
||||
var timeHour = /([01][0-9]|2[0-3])/;
|
||||
var timeMinute = /[0-5][0-9]/;
|
||||
var timeSecond = /([0-5][0-9]|60)/;
|
||||
var timeSecFrac = /(\.[0-9]+)?/;
|
||||
var timeNumOffset = new RegExp("[-+]".concat(timeHour.source, ":").concat(timeMinute.source));
|
||||
var timeOffset = new RegExp("([zZ]|".concat(timeNumOffset.source, ")"));
|
||||
var partialTime = new RegExp("".concat(timeHour.source, ":").concat(timeMinute.source, ":").concat(timeSecond.source).concat(timeSecFrac.source));
|
||||
var fullDate = new RegExp("".concat(dateFullYear.source, "-").concat(dateMonth.source, "-").concat(dateMDay.source));
|
||||
var fullTime = new RegExp("".concat(partialTime.source).concat(timeOffset.source));
|
||||
var rfc3339 = new RegExp("".concat(fullDate.source, "[ tT]").concat(fullTime.source));
|
||||
export default function isRFC3339(str) {
|
||||
assertString(str);
|
||||
return rfc3339.test(str);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operators/catchError"));
|
||||
//# sourceMappingURL=catchError.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J E F G BC"},B:{"1":"C K L H M N O P Q R 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"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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 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":"CC tB DC EC","33":"B C K L H M N O v w x y","164":"I u J E F G A"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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 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","2":"I u J E F G","33":"y z","164":"O v w x","420":"A B C K L H M N"},E:{"1":"E F G A B C K L H IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u GC zB HC","33":"J"},F:{"1":"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 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"},G:{"1":"F WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"zB TC AC UC","33":"VC"},H:{"2":"nC"},I:{"1":"D sC tC","2":"tB I oC pC qC rC AC"},J:{"1":"A","2":"E"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:1,C:"requestAnimationFrame"};
|
||||
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("rxjs-compat/add/operator/takeLast");
|
||||
//# sourceMappingURL=takeLast.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"has-yarn","version":"2.1.0","files":{"license":{"checkedAt":1678887829653,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"index.d.ts":{"checkedAt":1678887830280,"integrity":"sha512-ij4ce8Yy+oYHJ0xWM8fZm5Ci3Xp5lqVzlwIBLTmKEPHcYIuU3GyPgk4F+8wkNn7aaayeSW7bDKCfdKOkC04Vkg==","mode":420,"size":448},"package.json":{"checkedAt":1678887830280,"integrity":"sha512-lOvbh8fNs46oeLy2FaE77xIUzlmcO+VAQ5XWrpTjsPx37lXmBx/O90m1nA81I57Q4sHJBOe1n8kQx0dMGKau8g==","mode":420,"size":599},"index.js":{"checkedAt":1678887830280,"integrity":"sha512-s300sZgtKZ5F6ve67dexIYQmLWPVrhy63s53cmkQiKFK6zXngOvLH3kCd/tQcmIHWx54nbQkQLgXR1xuhz+HHQ==","mode":420,"size":268},"readme.md":{"checkedAt":1678887830280,"integrity":"sha512-BEHTWvSglCV2ezxjnadgUORRkMwy+fUryCQYB6zVzuYwI7psyNfwIjCZvgiEOiY5Bhxd2/Rw5+NkfYi4BAYpxA==","mode":420,"size":968}}}
|
||||
@@ -0,0 +1,61 @@
|
||||
const test = require('ava');
|
||||
const sinon = require('sinon');
|
||||
const Spinner = require('../lib/spinner');
|
||||
const Config = require('../lib/config');
|
||||
|
||||
test.beforeEach(t => {
|
||||
t.context.ora = {
|
||||
promise: sinon.spy()
|
||||
};
|
||||
});
|
||||
|
||||
const getConfig = options => {
|
||||
const testConfig = {
|
||||
ci: false,
|
||||
config: false,
|
||||
'disable-metrics': true
|
||||
};
|
||||
return new Config(Object.assign({}, testConfig, options));
|
||||
};
|
||||
|
||||
test('should not show spinner and not execute task if disabled', async t => {
|
||||
const { ora } = t.context;
|
||||
const task = sinon.spy();
|
||||
const spinner = new Spinner({ container: { ora } });
|
||||
await spinner.show({ enabled: false, task });
|
||||
t.is(task.callCount, 0);
|
||||
t.is(ora.promise.callCount, 0);
|
||||
});
|
||||
|
||||
test('should show spinner and run task by default', async t => {
|
||||
const { ora } = t.context;
|
||||
const task = sinon.stub().resolves();
|
||||
const label = 'foo';
|
||||
const config = getConfig({ ci: true });
|
||||
const spinner = new Spinner({ container: { ora, config } });
|
||||
await spinner.show({ task, label });
|
||||
t.is(task.callCount, 1);
|
||||
t.is(ora.promise.callCount, 1);
|
||||
t.is(ora.promise.firstCall.args[0], task.firstCall.returnValue);
|
||||
t.is(ora.promise.firstCall.args[1], label);
|
||||
});
|
||||
|
||||
test('should run task, but not show spinner if interactive', async t => {
|
||||
const { ora } = t.context;
|
||||
const task = sinon.stub().resolves();
|
||||
const config = getConfig({ ci: false });
|
||||
const spinner = new Spinner({ container: { ora, config } });
|
||||
await spinner.show({ task });
|
||||
t.is(task.callCount, 1);
|
||||
t.is(ora.promise.callCount, 0);
|
||||
});
|
||||
|
||||
test('should run task and show spinner if interactive, but external', async t => {
|
||||
const { ora } = t.context;
|
||||
const task = sinon.stub().resolves();
|
||||
const config = getConfig({ ci: false });
|
||||
const spinner = new Spinner({ container: { ora, config } });
|
||||
await spinner.show({ task, external: true });
|
||||
t.is(task.callCount, 1);
|
||||
t.is(ora.promise.callCount, 1);
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
SHELL := /bin/bash
|
||||
|
||||
release-major: test
|
||||
npm version major -m "Release %s"
|
||||
git push
|
||||
npm publish
|
||||
|
||||
release-minor: test
|
||||
npm version minor -m "Release %s"
|
||||
git push
|
||||
npm publish
|
||||
|
||||
release-patch: test
|
||||
npm version patch -m "Release %s"
|
||||
git push
|
||||
npm publish
|
||||
|
||||
.PHONY: test release-major release-minor release-patch
|
||||
@@ -0,0 +1 @@
|
||||
import 'rxjs-compat/add/observable/fromEvent';
|
||||
@@ -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.00793,"34":0.01189,"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.00396,"48":0,"49":0,"50":0,"51":0,"52":0.00396,"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.00396,"67":0,"68":0.00396,"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.00396,"85":0,"86":0,"87":0,"88":0.00396,"89":0,"90":0.00396,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0.00396,"98":0,"99":0.01189,"100":0,"101":0,"102":0.00793,"103":0.00396,"104":0,"105":0,"106":0,"107":0.00793,"108":0.19419,"109":0.13078,"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.00396,"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.01189,"35":0.00793,"36":0,"37":0,"38":0.00793,"39":0,"40":0.01585,"41":0,"42":0.00793,"43":0.04359,"44":0.00396,"45":0,"46":0.01982,"47":0,"48":0,"49":0.01189,"50":0,"51":0.00396,"52":0,"53":0.00396,"54":0,"55":0.00396,"56":0,"57":0,"58":0.01189,"59":0,"60":0,"61":0,"62":0,"63":0.00793,"64":0.00396,"65":0,"66":0,"67":0,"68":0,"69":0.01982,"70":0.00793,"71":0,"72":0.01585,"73":0.00396,"74":0.06737,"75":0,"76":0.00396,"77":0,"78":0.00396,"79":0.01585,"80":0,"81":0.01585,"83":0.00396,"84":0.01585,"85":0.00396,"86":0.00793,"87":0.05152,"88":0.00793,"89":0.00793,"90":0.00396,"91":0.01982,"92":0.00793,"93":0.01189,"94":0.00396,"95":0.00396,"96":0.00793,"97":0.00396,"98":0.00793,"99":0.00396,"100":0.01585,"101":0.01585,"102":0.01585,"103":0.01982,"104":0.01189,"105":0.01982,"106":0.03567,"107":0.09115,"108":2.44121,"109":2.54028,"110":0.00793,"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.00793,"27":0,"28":0.00396,"29":0,"30":0,"31":0,"32":0.00793,"33":0,"34":0,"35":0.00396,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0.00396,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0.00793,"55":0,"56":0,"57":0.00396,"58":0.00396,"60":0.05548,"62":0,"63":0.04756,"64":0.02774,"65":0,"66":0.02774,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.00793,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00793,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.00396,"86":0,"87":0,"88":0,"89":0,"90":0.00396,"91":0.01585,"92":0,"93":0.01585,"94":0.36063,"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.00396,"13":0.00396,"14":0.02774,"15":0.0317,"16":0.00396,"17":0.02774,"18":0.04359,"79":0,"80":0,"81":0,"83":0,"84":0.01982,"85":0,"86":0,"87":0,"88":0,"89":0.00396,"90":0.00396,"91":0,"92":0.00396,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0.01982,"102":0.00396,"103":0.00396,"104":0.01189,"105":0.00396,"106":0.00396,"107":0.0317,"108":0.62615,"109":0.59445},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00793,"15":0.00396,_:"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.00396,"13.1":0.01585,"14.1":0.01189,"15.1":0,"15.2-15.3":0,"15.4":0,"15.5":0.00793,"15.6":0.04756,"16.0":0,"16.1":0.00793,"16.2":0.03963,"16.3":0.00396},G:{"8":0.00143,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00717,"5.0-5.1":0.00143,"6.0-6.1":0,"7.0-7.1":0.08897,"8.1-8.4":0,"9.0-9.2":0.00287,"9.3":0.36736,"10.0-10.2":0.01004,"10.3":0.7548,"11.0-11.2":0.10045,"11.3-11.4":0.03874,"12.0-12.1":0.14063,"12.2-12.5":3.65778,"13.0-13.1":0.02439,"13.2":0.01291,"13.3":0.13489,"13.4-13.7":0.48502,"14.0-14.4":0.39175,"14.5-14.8":0.58404,"15.0-15.1":0.32718,"15.2-15.3":0.35444,"15.4":0.36736,"15.5":0.83947,"15.6":0.82225,"16.0":0.85812,"16.1":1.18243,"16.2":1.01597,"16.3":0.09471},P:{"4":0.93724,"5.0-5.4":0.0815,"6.2-6.4":0.07131,"7.2-7.4":0.09169,"8.2":0.03056,"9.2":0.04075,"10.1":0.01019,"11.1-11.2":0.04075,"12.0":0.02037,"13.0":0.11206,"14.0":0.03056,"15.0":0.02037,"16.0":0.163,"17.0":0.12225,"18.0":0.15281,"19.0":0.51956},I:{"0":0,"3":0,"4":0.00077,"2.1":0,"2.2":0,"2.3":0,"4.1":0.02811,"4.2-4.3":0.10936,"4.4":0,"4.4.3-4.4.4":0.26609},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.01982,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.15696},Q:{"13.1":0},O:{"0":0.63992},H:{"0":2.08614},L:{"0":70.04366},S:{"2.5":0.54333}};
|
||||
@@ -0,0 +1,57 @@
|
||||
"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 innerSubscribe_1 = require("../innerSubscribe");
|
||||
function exhaust() {
|
||||
return function (source) { return source.lift(new SwitchFirstOperator()); };
|
||||
}
|
||||
exports.exhaust = exhaust;
|
||||
var SwitchFirstOperator = (function () {
|
||||
function SwitchFirstOperator() {
|
||||
}
|
||||
SwitchFirstOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new SwitchFirstSubscriber(subscriber));
|
||||
};
|
||||
return SwitchFirstOperator;
|
||||
}());
|
||||
var SwitchFirstSubscriber = (function (_super) {
|
||||
__extends(SwitchFirstSubscriber, _super);
|
||||
function SwitchFirstSubscriber(destination) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.hasCompleted = false;
|
||||
_this.hasSubscription = false;
|
||||
return _this;
|
||||
}
|
||||
SwitchFirstSubscriber.prototype._next = function (value) {
|
||||
if (!this.hasSubscription) {
|
||||
this.hasSubscription = true;
|
||||
this.add(innerSubscribe_1.innerSubscribe(value, new innerSubscribe_1.SimpleInnerSubscriber(this)));
|
||||
}
|
||||
};
|
||||
SwitchFirstSubscriber.prototype._complete = function () {
|
||||
this.hasCompleted = true;
|
||||
if (!this.hasSubscription) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
SwitchFirstSubscriber.prototype.notifyComplete = function () {
|
||||
this.hasSubscription = false;
|
||||
if (this.hasCompleted) {
|
||||
this.destination.complete();
|
||||
}
|
||||
};
|
||||
return SwitchFirstSubscriber;
|
||||
}(innerSubscribe_1.SimpleOuterSubscriber));
|
||||
//# sourceMappingURL=exhaust.js.map
|
||||
Reference in New Issue
Block a user