new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var reduce_1 = require("./reduce");
|
||||
function min(comparer) {
|
||||
var min = (typeof comparer === 'function')
|
||||
? function (x, y) { return comparer(x, y) < 0 ? x : y; }
|
||||
: function (x, y) { return x < y ? x : y; };
|
||||
return reduce_1.reduce(min);
|
||||
}
|
||||
exports.min = min;
|
||||
//# sourceMappingURL=min.js.map
|
||||
@@ -0,0 +1,85 @@
|
||||
"use strict";
|
||||
|
||||
var _assert = _interopRequireDefault(require("assert"));
|
||||
|
||||
var _v = _interopRequireDefault(require("./v1.js"));
|
||||
|
||||
var _v2 = _interopRequireDefault(require("./v3.js"));
|
||||
|
||||
var _v3 = _interopRequireDefault(require("./v4.js"));
|
||||
|
||||
var _v4 = _interopRequireDefault(require("./v5.js"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function usage() {
|
||||
console.log('Usage:');
|
||||
console.log(' uuid');
|
||||
console.log(' uuid v1');
|
||||
console.log(' uuid v3 <name> <namespace uuid>');
|
||||
console.log(' uuid v4');
|
||||
console.log(' uuid v5 <name> <namespace uuid>');
|
||||
console.log(' uuid --help');
|
||||
console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
|
||||
}
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
|
||||
if (args.indexOf('--help') >= 0) {
|
||||
usage();
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const version = args.shift() || 'v4';
|
||||
|
||||
switch (version) {
|
||||
case 'v1':
|
||||
console.log((0, _v.default)());
|
||||
break;
|
||||
|
||||
case 'v3':
|
||||
{
|
||||
const name = args.shift();
|
||||
let namespace = args.shift();
|
||||
(0, _assert.default)(name != null, 'v3 name not specified');
|
||||
(0, _assert.default)(namespace != null, 'v3 namespace not specified');
|
||||
|
||||
if (namespace === 'URL') {
|
||||
namespace = _v2.default.URL;
|
||||
}
|
||||
|
||||
if (namespace === 'DNS') {
|
||||
namespace = _v2.default.DNS;
|
||||
}
|
||||
|
||||
console.log((0, _v2.default)(name, namespace));
|
||||
break;
|
||||
}
|
||||
|
||||
case 'v4':
|
||||
console.log((0, _v3.default)());
|
||||
break;
|
||||
|
||||
case 'v5':
|
||||
{
|
||||
const name = args.shift();
|
||||
let namespace = args.shift();
|
||||
(0, _assert.default)(name != null, 'v5 name not specified');
|
||||
(0, _assert.default)(namespace != null, 'v5 namespace not specified');
|
||||
|
||||
if (namespace === 'URL') {
|
||||
namespace = _v4.default.URL;
|
||||
}
|
||||
|
||||
if (namespace === 'DNS') {
|
||||
namespace = _v4.default.DNS;
|
||||
}
|
||||
|
||||
console.log((0, _v4.default)(name, namespace));
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
usage();
|
||||
process.exit(1);
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
"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 Subscription_1 = require("./Subscription");
|
||||
var SubjectSubscription = (function (_super) {
|
||||
__extends(SubjectSubscription, _super);
|
||||
function SubjectSubscription(subject, subscriber) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.subject = subject;
|
||||
_this.subscriber = subscriber;
|
||||
_this.closed = false;
|
||||
return _this;
|
||||
}
|
||||
SubjectSubscription.prototype.unsubscribe = function () {
|
||||
if (this.closed) {
|
||||
return;
|
||||
}
|
||||
this.closed = true;
|
||||
var subject = this.subject;
|
||||
var observers = subject.observers;
|
||||
this.subject = null;
|
||||
if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
|
||||
return;
|
||||
}
|
||||
var subscriberIndex = observers.indexOf(this.subscriber);
|
||||
if (subscriberIndex !== -1) {
|
||||
observers.splice(subscriberIndex, 1);
|
||||
}
|
||||
};
|
||||
return SubjectSubscription;
|
||||
}(Subscription_1.Subscription));
|
||||
exports.SubjectSubscription = SubjectSubscription;
|
||||
//# sourceMappingURL=SubjectSubscription.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,4 @@
|
||||
/** PURE_IMPORTS_START _AjaxObservable PURE_IMPORTS_END */
|
||||
import { AjaxObservable } from './AjaxObservable';
|
||||
export var ajax = /*@__PURE__*/ (function () { return AjaxObservable.create; })();
|
||||
//# sourceMappingURL=ajax.js.map
|
||||
@@ -0,0 +1,48 @@
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function count(predicate) {
|
||||
return (source) => source.lift(new CountOperator(predicate, source));
|
||||
}
|
||||
class CountOperator {
|
||||
constructor(predicate, source) {
|
||||
this.predicate = predicate;
|
||||
this.source = source;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
|
||||
}
|
||||
}
|
||||
class CountSubscriber extends Subscriber {
|
||||
constructor(destination, predicate, source) {
|
||||
super(destination);
|
||||
this.predicate = predicate;
|
||||
this.source = source;
|
||||
this.count = 0;
|
||||
this.index = 0;
|
||||
}
|
||||
_next(value) {
|
||||
if (this.predicate) {
|
||||
this._tryPredicate(value);
|
||||
}
|
||||
else {
|
||||
this.count++;
|
||||
}
|
||||
}
|
||||
_tryPredicate(value) {
|
||||
let result;
|
||||
try {
|
||||
result = this.predicate(value, this.index++, this.source);
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
return;
|
||||
}
|
||||
if (result) {
|
||||
this.count++;
|
||||
}
|
||||
}
|
||||
_complete() {
|
||||
this.destination.next(this.count);
|
||||
this.destination.complete();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=count.js.map
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operators/dematerialize';
|
||||
@@ -0,0 +1,56 @@
|
||||
declare class Queue<ValueType> implements Iterable<ValueType> {
|
||||
/**
|
||||
The size of the queue.
|
||||
*/
|
||||
readonly size: number;
|
||||
|
||||
/**
|
||||
Tiny queue data structure.
|
||||
|
||||
The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to back with a “for…of” loop, or use spreading to convert the queue to an array. Don't do this unless you really need to though, since it's slow.
|
||||
|
||||
@example
|
||||
```
|
||||
import Queue = require('yocto-queue');
|
||||
|
||||
const queue = new Queue();
|
||||
|
||||
queue.enqueue('🦄');
|
||||
queue.enqueue('🌈');
|
||||
|
||||
console.log(queue.size);
|
||||
//=> 2
|
||||
|
||||
console.log(...queue);
|
||||
//=> '🦄 🌈'
|
||||
|
||||
console.log(queue.dequeue());
|
||||
//=> '🦄'
|
||||
|
||||
console.log(queue.dequeue());
|
||||
//=> '🌈'
|
||||
```
|
||||
*/
|
||||
constructor();
|
||||
|
||||
[Symbol.iterator](): IterableIterator<ValueType>;
|
||||
|
||||
/**
|
||||
Add a value to the queue.
|
||||
*/
|
||||
enqueue(value: ValueType): void;
|
||||
|
||||
/**
|
||||
Remove the next value in the queue.
|
||||
|
||||
@returns The removed value or `undefined` if the queue is empty.
|
||||
*/
|
||||
dequeue(): ValueType | undefined;
|
||||
|
||||
/**
|
||||
Clear the queue.
|
||||
*/
|
||||
clear(): void;
|
||||
}
|
||||
|
||||
export = Queue;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"onErrorResumeNext.js","sources":["../../src/internal/operators/onErrorResumeNext.ts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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.00326,"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,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.00652,"107":0,"108":0.04889,"109":0.01955,"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,"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.00326,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0.00326,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0.00326,"78":0,"79":0,"80":0.00326,"81":0,"83":0.00326,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0.00652,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0.01304,"104":0,"105":0.00652,"106":0.00652,"107":0.0554,"108":1.00703,"109":0.87015,"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.0163,"94":0.0163,"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.00326,"16":0,"17":0,"18":0.00326,"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.00326,"98":0.00326,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.00326,"107":0.0163,"108":0.31286,"109":0.28353},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.01304,"15":0.00326,_:"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.00326,"13.1":0.06844,"14.1":0.1271,"15.1":0.02281,"15.2-15.3":0.03259,"15.4":0.13362,"15.5":0.3259,"15.6":3.45454,"16.0":0.17273,"16.1":0.78216,"16.2":2.12487,"16.3":0.14666},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,"10.0-10.2":0,"10.3":0.2413,"11.0-11.2":0,"11.3-11.4":0,"12.0-12.1":0.01787,"12.2-12.5":0.20555,"13.0-13.1":0,"13.2":0,"13.3":0,"13.4-13.7":0.02681,"14.0-14.4":0.01787,"14.5-14.8":0.20555,"15.0-15.1":0.17874,"15.2-15.3":0.42004,"15.4":0.73284,"15.5":3.01179,"15.6":14.08479,"16.0":9.75032,"16.1":33.55863,"16.2":20.85908,"16.3":1.47461},P:{"4":0.02094,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0,"13.0":0.01047,"14.0":0,"15.0":0,"16.0":0,"17.0":0.01047,"18.0":0.01047,"19.0":0.83747},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.09451},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00978,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.03371},Q:{"13.1":0},O:{"0":0.02022},H:{"0":0},L:{"0":3.47552},S:{"2.5":0}};
|
||||
@@ -0,0 +1 @@
|
||||
export declare const VERSION = "4.8.0";
|
||||
@@ -0,0 +1,10 @@
|
||||
import { MonoTypeOperatorFunction } from '../types';
|
||||
/**
|
||||
* Returns an Observable that mirrors the source Observable, but will call a specified function when
|
||||
* the source terminates on complete or error.
|
||||
* @param {function} callback Function to be called when source terminates.
|
||||
* @return {Observable} An Observable that mirrors the source, but will call the specified function on termination.
|
||||
* @method finally
|
||||
* @owner Observable
|
||||
*/
|
||||
export declare function finalize<T>(callback: () => void): MonoTypeOperatorFunction<T>;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var mergeAll_1 = require("./mergeAll");
|
||||
function concatAll() {
|
||||
return mergeAll_1.mergeAll(1);
|
||||
}
|
||||
exports.concatAll = concatAll;
|
||||
//# sourceMappingURL=concatAll.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"distinctUntilKeyChanged.js","sources":["../src/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":";;;;;AAAA,mEAA8D"}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { AsyncAction } from './AsyncAction';
|
||||
import { AsapScheduler } from './AsapScheduler';
|
||||
import { SchedulerAction } from '../types';
|
||||
/**
|
||||
* We need this JSDoc comment for affecting ESDoc.
|
||||
* @ignore
|
||||
* @extends {Ignored}
|
||||
*/
|
||||
export declare class AsapAction<T> extends AsyncAction<T> {
|
||||
protected scheduler: AsapScheduler;
|
||||
protected work: (this: SchedulerAction<T>, state?: T) => void;
|
||||
constructor(scheduler: AsapScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
|
||||
protected requestAsyncId(scheduler: AsapScheduler, id?: any, delay?: number): any;
|
||||
protected recycleAsyncId(scheduler: AsapScheduler, id?: any, delay?: number): any;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"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","2":"C K L H M N O"},C:{"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 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 DC EC"},D:{"1":"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":"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"},E:{"2":"I u J E F G A B C K L H GC zB HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC"},F:{"1":"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":"0 1 2 3 4 5 6 7 8 9 G B C 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 OC PC QC RC qB 9B SC rB"},G:{"2":"F zB TC AC UC VC 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"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"2":"E A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"0C 1C 2C 3C 4C sB 5C 6C 7C","2":"I vC wC xC yC zC 0B"},Q:{"1":"1B"},R:{"1":"8C"},S:{"2":"9C"}},B:7,C:"IntersectionObserver V2"};
|
||||
@@ -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/skipLast"));
|
||||
//# sourceMappingURL=skipLast.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"takeWhile.js","sources":["../src/operator/takeWhile.ts"],"names":[],"mappings":";;;;;AAAA,oDAA+C"}
|
||||
@@ -0,0 +1,84 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { SchedulerLike } from '../types';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
|
||||
/**
|
||||
* Creates an Observable that emits no items to the Observer and immediately
|
||||
* emits an error notification.
|
||||
*
|
||||
* <span class="informal">Just emits 'error', and nothing else.
|
||||
* </span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* This static operator is useful for creating a simple Observable that only
|
||||
* emits the error notification. It can be used for composing with other
|
||||
* Observables, such as in a {@link mergeMap}.
|
||||
*
|
||||
* ## Examples
|
||||
* ### Emit the number 7, then emit an error
|
||||
* ```ts
|
||||
* import { throwError, concat, of } from 'rxjs';
|
||||
*
|
||||
* const result = concat(of(7), throwError(new Error('oops!')));
|
||||
* result.subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
* // Logs:
|
||||
* // 7
|
||||
* // Error: oops!
|
||||
* ```
|
||||
*
|
||||
* ---
|
||||
*
|
||||
* ### Map and flatten numbers to the sequence 'a', 'b', 'c', but throw an error for 2
|
||||
* ```ts
|
||||
* import { throwError, interval, of } from 'rxjs';
|
||||
* import { mergeMap } from 'rxjs/operators';
|
||||
*
|
||||
* interval(1000).pipe(
|
||||
* mergeMap(x => x === 2
|
||||
* ? throwError('Twos are bad')
|
||||
* : of('a', 'b', 'c')
|
||||
* ),
|
||||
* ).subscribe(x => console.log(x), e => console.error(e));
|
||||
*
|
||||
* // Logs:
|
||||
* // a
|
||||
* // b
|
||||
* // c
|
||||
* // a
|
||||
* // b
|
||||
* // c
|
||||
* // Twos are bad
|
||||
* ```
|
||||
*
|
||||
* @see {@link Observable}
|
||||
* @see {@link empty}
|
||||
* @see {@link never}
|
||||
* @see {@link of}
|
||||
*
|
||||
* @param {any} error The particular Error to pass to the error notification.
|
||||
* @param {SchedulerLike} [scheduler] A {@link SchedulerLike} to use for scheduling
|
||||
* the emission of the error notification.
|
||||
* @return {Observable} An error Observable: emits only the error notification
|
||||
* using the given error argument.
|
||||
* @static true
|
||||
* @name throwError
|
||||
* @owner Observable
|
||||
*/
|
||||
export function throwError(error: any, scheduler?: SchedulerLike): Observable<never> {
|
||||
if (!scheduler) {
|
||||
return new Observable(subscriber => subscriber.error(error));
|
||||
} else {
|
||||
return new Observable(subscriber => scheduler.schedule(dispatch, 0, { error, subscriber }));
|
||||
}
|
||||
}
|
||||
|
||||
interface DispatchArg {
|
||||
error: any;
|
||||
subscriber: Subscriber<any>;
|
||||
}
|
||||
|
||||
function dispatch({ error, subscriber }: DispatchArg) {
|
||||
subscriber.error(error);
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const events_1 = require("events");
|
||||
const is_1 = require("@sindresorhus/is");
|
||||
const PCancelable = require("p-cancelable");
|
||||
const types_1 = require("./types");
|
||||
const parse_body_1 = require("./parse-body");
|
||||
const core_1 = require("../core");
|
||||
const proxy_events_1 = require("../core/utils/proxy-events");
|
||||
const get_buffer_1 = require("../core/utils/get-buffer");
|
||||
const is_response_ok_1 = require("../core/utils/is-response-ok");
|
||||
const proxiedRequestEvents = [
|
||||
'request',
|
||||
'response',
|
||||
'redirect',
|
||||
'uploadProgress',
|
||||
'downloadProgress'
|
||||
];
|
||||
function asPromise(normalizedOptions) {
|
||||
let globalRequest;
|
||||
let globalResponse;
|
||||
const emitter = new events_1.EventEmitter();
|
||||
const promise = new PCancelable((resolve, reject, onCancel) => {
|
||||
const makeRequest = (retryCount) => {
|
||||
const request = new core_1.default(undefined, normalizedOptions);
|
||||
request.retryCount = retryCount;
|
||||
request._noPipe = true;
|
||||
onCancel(() => request.destroy());
|
||||
onCancel.shouldReject = false;
|
||||
onCancel(() => reject(new types_1.CancelError(request)));
|
||||
globalRequest = request;
|
||||
request.once('response', async (response) => {
|
||||
var _a;
|
||||
response.retryCount = retryCount;
|
||||
if (response.request.aborted) {
|
||||
// Canceled while downloading - will throw a `CancelError` or `TimeoutError` error
|
||||
return;
|
||||
}
|
||||
// Download body
|
||||
let rawBody;
|
||||
try {
|
||||
rawBody = await get_buffer_1.default(request);
|
||||
response.rawBody = rawBody;
|
||||
}
|
||||
catch (_b) {
|
||||
// The same error is caught below.
|
||||
// See request.once('error')
|
||||
return;
|
||||
}
|
||||
if (request._isAboutToError) {
|
||||
return;
|
||||
}
|
||||
// Parse body
|
||||
const contentEncoding = ((_a = response.headers['content-encoding']) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
||||
const isCompressed = ['gzip', 'deflate', 'br'].includes(contentEncoding);
|
||||
const { options } = request;
|
||||
if (isCompressed && !options.decompress) {
|
||||
response.body = rawBody;
|
||||
}
|
||||
else {
|
||||
try {
|
||||
response.body = parse_body_1.default(response, options.responseType, options.parseJson, options.encoding);
|
||||
}
|
||||
catch (error) {
|
||||
// Fallback to `utf8`
|
||||
response.body = rawBody.toString();
|
||||
if (is_response_ok_1.isResponseOk(response)) {
|
||||
request._beforeError(error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
for (const [index, hook] of options.hooks.afterResponse.entries()) {
|
||||
// @ts-expect-error TS doesn't notice that CancelableRequest is a Promise
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
response = await hook(response, async (updatedOptions) => {
|
||||
const typedOptions = core_1.default.normalizeArguments(undefined, {
|
||||
...updatedOptions,
|
||||
retry: {
|
||||
calculateDelay: () => 0
|
||||
},
|
||||
throwHttpErrors: false,
|
||||
resolveBodyOnly: false
|
||||
}, options);
|
||||
// Remove any further hooks for that request, because we'll call them anyway.
|
||||
// The loop continues. We don't want duplicates (asPromise recursion).
|
||||
typedOptions.hooks.afterResponse = typedOptions.hooks.afterResponse.slice(0, index);
|
||||
for (const hook of typedOptions.hooks.beforeRetry) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
await hook(typedOptions);
|
||||
}
|
||||
const promise = asPromise(typedOptions);
|
||||
onCancel(() => {
|
||||
promise.catch(() => { });
|
||||
promise.cancel();
|
||||
});
|
||||
return promise;
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
request._beforeError(new types_1.RequestError(error.message, error, request));
|
||||
return;
|
||||
}
|
||||
if (!is_response_ok_1.isResponseOk(response)) {
|
||||
request._beforeError(new types_1.HTTPError(response));
|
||||
return;
|
||||
}
|
||||
globalResponse = response;
|
||||
resolve(request.options.resolveBodyOnly ? response.body : response);
|
||||
});
|
||||
const onError = (error) => {
|
||||
if (promise.isCanceled) {
|
||||
return;
|
||||
}
|
||||
const { options } = request;
|
||||
if (error instanceof types_1.HTTPError && !options.throwHttpErrors) {
|
||||
const { response } = error;
|
||||
resolve(request.options.resolveBodyOnly ? response.body : response);
|
||||
return;
|
||||
}
|
||||
reject(error);
|
||||
};
|
||||
request.once('error', onError);
|
||||
const previousBody = request.options.body;
|
||||
request.once('retry', (newRetryCount, error) => {
|
||||
var _a, _b;
|
||||
if (previousBody === ((_a = error.request) === null || _a === void 0 ? void 0 : _a.options.body) && is_1.default.nodeStream((_b = error.request) === null || _b === void 0 ? void 0 : _b.options.body)) {
|
||||
onError(error);
|
||||
return;
|
||||
}
|
||||
makeRequest(newRetryCount);
|
||||
});
|
||||
proxy_events_1.default(request, emitter, proxiedRequestEvents);
|
||||
};
|
||||
makeRequest(0);
|
||||
});
|
||||
promise.on = (event, fn) => {
|
||||
emitter.on(event, fn);
|
||||
return promise;
|
||||
};
|
||||
const shortcut = (responseType) => {
|
||||
const newPromise = (async () => {
|
||||
// Wait until downloading has ended
|
||||
await promise;
|
||||
const { options } = globalResponse.request;
|
||||
return parse_body_1.default(globalResponse, responseType, options.parseJson, options.encoding);
|
||||
})();
|
||||
Object.defineProperties(newPromise, Object.getOwnPropertyDescriptors(promise));
|
||||
return newPromise;
|
||||
};
|
||||
promise.json = () => {
|
||||
const { headers } = globalRequest.options;
|
||||
if (!globalRequest.writableFinished && headers.accept === undefined) {
|
||||
headers.accept = 'application/json';
|
||||
}
|
||||
return shortcut('json');
|
||||
};
|
||||
promise.buffer = () => shortcut('buffer');
|
||||
promise.text = () => shortcut('text');
|
||||
return promise;
|
||||
}
|
||||
exports.default = asPromise;
|
||||
__exportStar(require("./types"), exports);
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var mergeMap_1 = require("./mergeMap");
|
||||
function concatMap(project, resultSelector) {
|
||||
return mergeMap_1.mergeMap(project, resultSelector, 1);
|
||||
}
|
||||
exports.concatMap = concatMap;
|
||||
//# sourceMappingURL=concatMap.js.map
|
||||
Reference in New Issue
Block a user