new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
## 4.0.0 - 2018-02-02
|
||||
|
||||
- Ignore empty string arguments and throw an exception for non-string. Closes #36, #18 ([da05242f381bfe1ae09d00b708cfdbdb93c1a85d](https://github.com/jfromaniello/url-join/commit/da05242f381bfe1ae09d00b708cfdbdb93c1a85d)), closes [#36](https://github.com/jfromaniello/url-join/issues/36) [#18](https://github.com/jfromaniello/url-join/issues/18)
|
||||
|
||||
|
||||
|
||||
## 3.0.0 - 2018-01-12
|
||||
|
||||
- add new test ([d65d7c1696cb53b53ceabadf1a77917196967b4c](https://github.com/jfromaniello/url-join/commit/d65d7c1696cb53b53ceabadf1a77917196967b4c))
|
||||
- Fixed to handle the colon in non-protocol separation role in the first part. ([9212db75f805031a9cc06120b5dd08a6cdd805e4](https://github.com/jfromaniello/url-join/commit/9212db75f805031a9cc06120b5dd08a6cdd805e4))
|
||||
|
||||
|
||||
|
||||
## 2.0.5 - 2018-01-10
|
||||
|
||||
- revert to previous behavior #30 ([b6943343af7bd723cbca266388e84e036543577d](https://github.com/jfromaniello/url-join/commit/b6943343af7bd723cbca266388e84e036543577d)), closes [#30](https://github.com/jfromaniello/url-join/issues/30)
|
||||
|
||||
|
||||
|
||||
## 2.0.4 - 2018-01-10
|
||||
|
||||
- fix bower.json ([9677895a4afe51d8a1d670980bc6fede71252e9a](https://github.com/jfromaniello/url-join/commit/9677895a4afe51d8a1d670980bc6fede71252e9a))
|
||||
|
||||
|
||||
|
||||
## 2.0.3 - 2018-01-09
|
||||
|
||||
- 2.0.3 ([7b7806b21cf81a3476e39ddb8a6f51272a276186](https://github.com/jfromaniello/url-join/commit/7b7806b21cf81a3476e39ddb8a6f51272a276186))
|
||||
- Added a test for simple paths for issue #21 ([be99b10a707b4d22aac015d19eb087fff46d4270](https://github.com/jfromaniello/url-join/commit/be99b10a707b4d22aac015d19eb087fff46d4270)), closes [#21](https://github.com/jfromaniello/url-join/issues/21)
|
||||
- Added some new tests for cases that fail. ([f1afbd62c3149476a9ef099ba523e85fb4839732](https://github.com/jfromaniello/url-join/commit/f1afbd62c3149476a9ef099ba523e85fb4839732))
|
||||
- Passes all the tests with these changes. ([8cde667f400fa83efc7ed5c2437c7cb25c7d7600](https://github.com/jfromaniello/url-join/commit/8cde667f400fa83efc7ed5c2437c7cb25c7d7600))
|
||||
- The protocol slashes should be normalized also when the protocol is not alone in the first argument. ([0ce1239c60f7bbb625d4ccbf1fcf044f37488bd8](https://github.com/jfromaniello/url-join/commit/0ce1239c60f7bbb625d4ccbf1fcf044f37488bd8))
|
||||
|
||||
|
||||
|
||||
## 2.0.2 - 2017-05-18
|
||||
|
||||
- fix: remove consecutives slashes ([33639364ef186e257b8424620017b9d1ba225539](https://github.com/jfromaniello/url-join/commit/33639364ef186e257b8424620017b9d1ba225539))
|
||||
|
||||
|
||||
|
||||
## 2.0.1 - 2017-04-12
|
||||
|
||||
- update mocha and bower.json ([ebd3665028b2408d405f9a31f8479e91c4ef52c1](https://github.com/jfromaniello/url-join/commit/ebd3665028b2408d405f9a31f8479e91c4ef52c1))
|
||||
- feat: add test ([46d3387141e5d2f751da699e02d57fc36bfe37a8](https://github.com/jfromaniello/url-join/commit/46d3387141e5d2f751da699e02d57fc36bfe37a8))
|
||||
- fix: ignore encoded url when removing consecusive slashes ([711add4e8af8fc97390adef14b9a4722cac5e70a](https://github.com/jfromaniello/url-join/commit/711add4e8af8fc97390adef14b9a4722cac5e70a))
|
||||
|
||||
|
||||
|
||||
## 2.0.0 - 2017-04-11
|
||||
|
||||
- Add a LICENSE file ([ffd3b2253470cee648152c55dd51c1bf4e688a60](https://github.com/jfromaniello/url-join/commit/ffd3b2253470cee648152c55dd51c1bf4e688a60))
|
||||
- change copyright year ([9f67671dd8ab23b4d2da6ae775efdf66d594eac3](https://github.com/jfromaniello/url-join/commit/9f67671dd8ab23b4d2da6ae775efdf66d594eac3))
|
||||
- refactor: use local startsWith function ([a1e1214644cd187f2584b79b4241ac3b8c9b9f1b](https://github.com/jfromaniello/url-join/commit/a1e1214644cd187f2584b79b4241ac3b8c9b9f1b))
|
||||
- fix: split logic for files ([d7053a99aa40b0c2f4802819f7e0643be8889ac4](https://github.com/jfromaniello/url-join/commit/d7053a99aa40b0c2f4802819f7e0643be8889ac4))
|
||||
- feat: add file protocol support ([48ebe0d84e8e2eca3a02fe5e3259cdd294e519dc](https://github.com/jfromaniello/url-join/commit/48ebe0d84e8e2eca3a02fe5e3259cdd294e519dc))
|
||||
|
||||
|
||||
|
||||
## 1.1.0 - 2016-04-05
|
||||
|
||||
- add .travis.yml ([c75e7507f72fd4be101b64bb44539fd249842cc0](https://github.com/jfromaniello/url-join/commit/c75e7507f72fd4be101b64bb44539fd249842cc0))
|
||||
- added new syntax to allow options, fixed #! urls ([b8e5d8372c55187cdd9c6fa5e02830f76858347e](https://github.com/jfromaniello/url-join/commit/b8e5d8372c55187cdd9c6fa5e02830f76858347e))
|
||||
- added travis, updated version in bower.json ([5a58405d89298e693e8f97a74b14324d83a8a87a](https://github.com/jfromaniello/url-join/commit/5a58405d89298e693e8f97a74b14324d83a8a87a))
|
||||
- fixed query string handling, closes #9, closes #4 ([e190fe28282287204dbe7877979f18b4570042f9](https://github.com/jfromaniello/url-join/commit/e190fe28282287204dbe7877979f18b4570042f9)), closes [#9](https://github.com/jfromaniello/url-join/issues/9) [#4](https://github.com/jfromaniello/url-join/issues/4)
|
||||
|
||||
|
||||
|
||||
## 1.0.0 - 2016-03-23
|
||||
|
||||
|
||||
|
||||
|
||||
## 0.1.0 - 2016-03-23
|
||||
|
||||
- 0.1.0 ([2db128d268dfd531f1af6c9bd0543458387e94cd](https://github.com/jfromaniello/url-join/commit/2db128d268dfd531f1af6c9bd0543458387e94cd))
|
||||
- add support for AMD and windows['url-join'] ([b02169596877a1e6cd518f1b0d711f38c721fb02](https://github.com/jfromaniello/url-join/commit/b02169596877a1e6cd518f1b0d711f38c721fb02))
|
||||
- added comments, fixed leading // ([3f72b6ea6fa84c4b254d0c656815a5df6b89a10a](https://github.com/jfromaniello/url-join/commit/3f72b6ea6fa84c4b254d0c656815a5df6b89a10a))
|
||||
- added test for leading // ([baac627b2052e1d9b5c05e48c8dc6a05a80e08fa](https://github.com/jfromaniello/url-join/commit/baac627b2052e1d9b5c05e48c8dc6a05a80e08fa))
|
||||
- bower init ([650dcfe72eee854108dd0832963553eae5ede7c5](https://github.com/jfromaniello/url-join/commit/650dcfe72eee854108dd0832963553eae5ede7c5))
|
||||
- initial ([af68a208966de3d4be757c9d0f4a918c6dfa360e](https://github.com/jfromaniello/url-join/commit/af68a208966de3d4be757c9d0f4a918c6dfa360e))
|
||||
- minor ([dde2dc6815f9a0476d7aade1d6848cbc5f3a14a4](https://github.com/jfromaniello/url-join/commit/dde2dc6815f9a0476d7aade1d6848cbc5f3a14a4))
|
||||
- minor ([4d9d8ee16591da2092739a172145f968f71598dc](https://github.com/jfromaniello/url-join/commit/4d9d8ee16591da2092739a172145f968f71598dc))
|
||||
- minor ([9ed0161497ee7d7d1b4b04d1735483a6216fe2c6](https://github.com/jfromaniello/url-join/commit/9ed0161497ee7d7d1b4b04d1735483a6216fe2c6))
|
||||
- simplify normalize function ([d6886a362828eacc028c6167b9ae0efd8b2fbfc8](https://github.com/jfromaniello/url-join/commit/d6886a362828eacc028c6167b9ae0efd8b2fbfc8))
|
||||
|
||||
|
||||
|
||||
@@ -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/observable/ForkJoinObservable"));
|
||||
//# sourceMappingURL=ForkJoinObservable.js.map
|
||||
@@ -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.00095,"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,"100":0,"101":0,"102":0.00095,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0.03034,"109":0.01138,"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.00095,"39":0,"40":0.00664,"41":0,"42":0.0019,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0.00095,"51":0,"52":0,"53":0,"54":0,"55":0.0019,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0.00095,"63":0.00284,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0.0019,"70":0,"71":0,"72":0,"73":0,"74":0.00095,"75":0,"76":0,"77":0,"78":0.00095,"79":0.00095,"80":0,"81":0.00569,"83":0,"84":0,"85":0,"86":0,"87":0.00284,"88":0.00095,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00379,"100":0,"101":0,"102":0.00095,"103":0.00095,"104":0,"105":0.00095,"106":0.00095,"107":0.00284,"108":0.08911,"109":0.09954,"110":0.00095,"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.0019,"31":0,"32":0.00379,"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.00758,"62":0,"63":0.00664,"64":0.0237,"65":0.00474,"66":0.01043,"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.00853,"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.00284,"13":0.00095,"14":0.00095,"15":0.03318,"16":0,"17":0.00095,"18":0.00284,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00095,"90":0,"91":0,"92":0.00095,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.0019,"100":0.00095,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.00095,"108":0.04171,"109":0.03508},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"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,"13.1":0,"14.1":0.00095,"15.1":0,"15.2-15.3":0,"15.4":0,"15.5":0,"15.6":0.00095,"16.0":0,"16.1":0.00095,"16.2":0.0019,"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.07682,"10.0-10.2":0.13635,"10.3":0.06337,"11.0-11.2":0.20548,"11.3-11.4":0.26117,"12.0-12.1":0.63565,"12.2-12.5":3.89649,"13.0-13.1":0.47818,"13.2":0.08066,"13.3":0.28806,"13.4-13.7":0.87378,"14.0-14.4":1.58241,"14.5-14.8":0.63565,"15.0-15.1":1.45566,"15.2-15.3":0.84882,"15.4":0.28422,"15.5":0.56268,"15.6":1.83398,"16.0":1.56129,"16.1":1.10999,"16.2":0.90259,"16.3":0.0749},P:{"4":0.20406,"5.0-5.4":0.07142,"6.2-6.4":0.02041,"7.2-7.4":0.36731,"8.2":0,"9.2":0.34691,"10.1":0.02041,"11.1-11.2":0.14284,"12.0":0.04081,"13.0":0.02041,"14.0":0.67341,"15.0":0.04081,"16.0":0.22447,"17.0":0.26528,"18.0":0.30609,"19.0":0.78564},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.0001,"4.2-4.3":0.00352,"4.4":0,"4.4.3-4.4.4":0.01491},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00095,"5.5":0},J:{"7":0,"10":0.02716},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.02716},Q:{"13.1":0.00905},O:{"0":0.15388},H:{"0":6.67591},L:{"0":68.97973},S:{"2.5":0.46165}};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"J E BC","2":"F G A B"},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 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":"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 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"},E:{"1":"I u J E F G A B C K L H zB HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","16":"GC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 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 OC PC QC RC qB 9B SC rB","16":"G"},G:{"1":"F 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","16":"zB TC AC"},H:{"1":"nC"},I:{"1":"tB I D qC rC AC sC tC","16":"oC pC"},J:{"1":"E A"},K:{"1":"B C e qB 9B rB","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"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:"wbr (word break opportunity) element"};
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Subject } from './Subject';
|
||||
import { Subscriber } from './Subscriber';
|
||||
import { Subscription } from './Subscription';
|
||||
/**
|
||||
* A variant of Subject that only emits a value when it completes. It will emit
|
||||
* its latest value to all its observers on completion.
|
||||
*
|
||||
* @class AsyncSubject<T>
|
||||
*/
|
||||
export declare class AsyncSubject<T> extends Subject<T> {
|
||||
private value;
|
||||
private hasNext;
|
||||
private hasCompleted;
|
||||
/** @deprecated This is an internal implementation detail, do not use. */
|
||||
_subscribe(subscriber: Subscriber<any>): Subscription;
|
||||
next(value: T): void;
|
||||
error(error: any): void;
|
||||
complete(): void;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Config, CosmiconfigResult, Loaders, LoadersSync } from './types';
|
||||
declare type LoaderResult = Config | null;
|
||||
export declare type Loader = ((filepath: string, content: string) => Promise<LoaderResult>) | LoaderSync;
|
||||
export declare type LoaderSync = (filepath: string, content: string) => LoaderResult;
|
||||
export declare type Transform = ((CosmiconfigResult: CosmiconfigResult) => Promise<CosmiconfigResult>) | TransformSync;
|
||||
export declare type TransformSync = (CosmiconfigResult: CosmiconfigResult) => CosmiconfigResult;
|
||||
interface OptionsBase {
|
||||
packageProp?: string | Array<string>;
|
||||
searchPlaces?: Array<string>;
|
||||
ignoreEmptySearchPlaces?: boolean;
|
||||
stopDir?: string;
|
||||
cache?: boolean;
|
||||
}
|
||||
export interface Options extends OptionsBase {
|
||||
loaders?: Loaders;
|
||||
transform?: Transform;
|
||||
}
|
||||
export interface OptionsSync extends OptionsBase {
|
||||
loaders?: LoadersSync;
|
||||
transform?: TransformSync;
|
||||
}
|
||||
declare function cosmiconfig(moduleName: string, options?: Options): {
|
||||
readonly search: (searchFrom?: string) => Promise<CosmiconfigResult>;
|
||||
readonly load: (filepath: string) => Promise<CosmiconfigResult>;
|
||||
readonly clearLoadCache: () => void;
|
||||
readonly clearSearchCache: () => void;
|
||||
readonly clearCaches: () => void;
|
||||
};
|
||||
declare function cosmiconfigSync(moduleName: string, options?: OptionsSync): {
|
||||
readonly search: (searchFrom?: string) => CosmiconfigResult;
|
||||
readonly load: (filepath: string) => CosmiconfigResult;
|
||||
readonly clearLoadCache: () => void;
|
||||
readonly clearSearchCache: () => void;
|
||||
readonly clearCaches: () => void;
|
||||
};
|
||||
declare const defaultLoaders: Readonly<{
|
||||
readonly '.cjs': LoaderSync;
|
||||
readonly '.js': LoaderSync;
|
||||
readonly '.json': LoaderSync;
|
||||
readonly '.yaml': LoaderSync;
|
||||
readonly '.yml': LoaderSync;
|
||||
readonly noExt: LoaderSync;
|
||||
}>;
|
||||
export { cosmiconfig, cosmiconfigSync, defaultLoaders };
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
@@ -0,0 +1,342 @@
|
||||
/// <reference types="node" />
|
||||
import { URL } from 'url';
|
||||
import { CancelError } from 'p-cancelable';
|
||||
import { CancelableRequest, Response, Options, NormalizedOptions, Defaults as DefaultOptions, PaginationOptions, ParseError, RequestError, CacheError, ReadError, HTTPError, MaxRedirectsError, TimeoutError, UnsupportedProtocolError, UploadError } from './as-promise';
|
||||
import Request from './core';
|
||||
declare type Except<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;
|
||||
declare type Merge<FirstType, SecondType> = Except<FirstType, Extract<keyof FirstType, keyof SecondType>> & SecondType;
|
||||
/**
|
||||
Defaults for each Got instance.
|
||||
*/
|
||||
export interface InstanceDefaults {
|
||||
/**
|
||||
An object containing the default options of Got.
|
||||
*/
|
||||
options: DefaultOptions;
|
||||
/**
|
||||
An array of functions. You execute them directly by calling `got()`.
|
||||
They are some sort of "global hooks" - these functions are called first.
|
||||
The last handler (*it's hidden*) is either `asPromise` or `asStream`, depending on the `options.isStream` property.
|
||||
|
||||
@default []
|
||||
*/
|
||||
handlers: HandlerFunction[];
|
||||
/**
|
||||
A read-only boolean describing whether the defaults are mutable or not.
|
||||
If set to `true`, you can update headers over time, for example, update an access token when it expires.
|
||||
|
||||
@default false
|
||||
*/
|
||||
mutableDefaults: boolean;
|
||||
_rawHandlers?: HandlerFunction[];
|
||||
}
|
||||
/**
|
||||
A Request object returned by calling Got, or any of the Got HTTP alias request functions.
|
||||
*/
|
||||
export declare type GotReturn = Request | CancelableRequest;
|
||||
/**
|
||||
A function to handle options and returns a Request object.
|
||||
It acts sort of like a "global hook", and will be called before any actual request is made.
|
||||
*/
|
||||
export declare type HandlerFunction = <T extends GotReturn>(options: NormalizedOptions, next: (options: NormalizedOptions) => T) => T | Promise<T>;
|
||||
/**
|
||||
The options available for `got.extend()`.
|
||||
*/
|
||||
export interface ExtendOptions extends Options {
|
||||
/**
|
||||
An array of functions. You execute them directly by calling `got()`.
|
||||
They are some sort of "global hooks" - these functions are called first.
|
||||
The last handler (*it's hidden*) is either `asPromise` or `asStream`, depending on the `options.isStream` property.
|
||||
|
||||
@default []
|
||||
*/
|
||||
handlers?: HandlerFunction[];
|
||||
/**
|
||||
A read-only boolean describing whether the defaults are mutable or not.
|
||||
If set to `true`, you can update headers over time, for example, update an access token when it expires.
|
||||
|
||||
@default false
|
||||
*/
|
||||
mutableDefaults?: boolean;
|
||||
}
|
||||
export declare type OptionsOfTextResponseBody = Merge<Options, {
|
||||
isStream?: false;
|
||||
resolveBodyOnly?: false;
|
||||
responseType?: 'text';
|
||||
}>;
|
||||
export declare type OptionsOfJSONResponseBody = Merge<Options, {
|
||||
isStream?: false;
|
||||
resolveBodyOnly?: false;
|
||||
responseType?: 'json';
|
||||
}>;
|
||||
export declare type OptionsOfBufferResponseBody = Merge<Options, {
|
||||
isStream?: false;
|
||||
resolveBodyOnly?: false;
|
||||
responseType: 'buffer';
|
||||
}>;
|
||||
export declare type OptionsOfUnknownResponseBody = Merge<Options, {
|
||||
isStream?: false;
|
||||
resolveBodyOnly?: false;
|
||||
}>;
|
||||
export declare type StrictOptions = Except<Options, 'isStream' | 'responseType' | 'resolveBodyOnly'>;
|
||||
export declare type StreamOptions = Merge<Options, {
|
||||
isStream?: true;
|
||||
}>;
|
||||
declare type ResponseBodyOnly = {
|
||||
resolveBodyOnly: true;
|
||||
};
|
||||
export declare type OptionsWithPagination<T = unknown, R = unknown> = Merge<Options, PaginationOptions<T, R>>;
|
||||
/**
|
||||
An instance of `got.paginate`.
|
||||
*/
|
||||
export interface GotPaginate {
|
||||
/**
|
||||
Returns an async iterator.
|
||||
|
||||
See pagination.options for more pagination options.
|
||||
|
||||
@example
|
||||
```
|
||||
(async () => {
|
||||
const countLimit = 10;
|
||||
|
||||
const pagination = got.paginate('https://api.github.com/repos/sindresorhus/got/commits', {
|
||||
pagination: {countLimit}
|
||||
});
|
||||
|
||||
console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
|
||||
|
||||
for await (const commitData of pagination) {
|
||||
console.log(commitData.commit.message);
|
||||
}
|
||||
})();
|
||||
```
|
||||
*/
|
||||
each: (<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>) => AsyncIterableIterator<T>) & (<T, R = unknown>(options?: OptionsWithPagination<T, R>) => AsyncIterableIterator<T>);
|
||||
/**
|
||||
Returns a Promise for an array of all results.
|
||||
|
||||
See pagination.options for more pagination options.
|
||||
|
||||
@example
|
||||
```
|
||||
(async () => {
|
||||
const countLimit = 10;
|
||||
|
||||
const results = await got.paginate.all('https://api.github.com/repos/sindresorhus/got/commits', {
|
||||
pagination: {countLimit}
|
||||
});
|
||||
|
||||
console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
|
||||
console.log(results);
|
||||
})();
|
||||
```
|
||||
*/
|
||||
all: (<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>) => Promise<T[]>) & (<T, R = unknown>(options?: OptionsWithPagination<T, R>) => Promise<T[]>);
|
||||
/**
|
||||
Same as `GotPaginate.each`.
|
||||
*/
|
||||
<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>): AsyncIterableIterator<T>;
|
||||
/**
|
||||
Same as `GotPaginate.each`.
|
||||
*/
|
||||
<T, R = unknown>(options?: OptionsWithPagination<T, R>): AsyncIterableIterator<T>;
|
||||
}
|
||||
export interface GotRequestFunction {
|
||||
(url: string | URL, options?: OptionsOfTextResponseBody): CancelableRequest<Response<string>>;
|
||||
<T>(url: string | URL, options?: OptionsOfJSONResponseBody): CancelableRequest<Response<T>>;
|
||||
(url: string | URL, options?: OptionsOfBufferResponseBody): CancelableRequest<Response<Buffer>>;
|
||||
(url: string | URL, options?: OptionsOfUnknownResponseBody): CancelableRequest<Response>;
|
||||
(options: OptionsOfTextResponseBody): CancelableRequest<Response<string>>;
|
||||
<T>(options: OptionsOfJSONResponseBody): CancelableRequest<Response<T>>;
|
||||
(options: OptionsOfBufferResponseBody): CancelableRequest<Response<Buffer>>;
|
||||
(options: OptionsOfUnknownResponseBody): CancelableRequest<Response>;
|
||||
(url: string | URL, options?: (Merge<OptionsOfTextResponseBody, ResponseBodyOnly>)): CancelableRequest<string>;
|
||||
<T>(url: string | URL, options?: (Merge<OptionsOfJSONResponseBody, ResponseBodyOnly>)): CancelableRequest<T>;
|
||||
(url: string | URL, options?: (Merge<OptionsOfBufferResponseBody, ResponseBodyOnly>)): CancelableRequest<Buffer>;
|
||||
(options: (Merge<OptionsOfTextResponseBody, ResponseBodyOnly>)): CancelableRequest<string>;
|
||||
<T>(options: (Merge<OptionsOfJSONResponseBody, ResponseBodyOnly>)): CancelableRequest<T>;
|
||||
(options: (Merge<OptionsOfBufferResponseBody, ResponseBodyOnly>)): CancelableRequest<Buffer>;
|
||||
(url: string | URL, options?: Merge<Options, {
|
||||
isStream: true;
|
||||
}>): Request;
|
||||
(options: Merge<Options, {
|
||||
isStream: true;
|
||||
}>): Request;
|
||||
(url: string | URL, options?: Options): CancelableRequest | Request;
|
||||
(options: Options): CancelableRequest | Request;
|
||||
}
|
||||
/**
|
||||
All available HTTP request methods provided by Got.
|
||||
*/
|
||||
export declare type HTTPAlias = 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete';
|
||||
interface GotStreamFunction {
|
||||
(url: string | URL, options?: Merge<Options, {
|
||||
isStream?: true;
|
||||
}>): Request;
|
||||
(options?: Merge<Options, {
|
||||
isStream?: true;
|
||||
}>): Request;
|
||||
}
|
||||
/**
|
||||
An instance of `got.stream()`.
|
||||
*/
|
||||
export declare type GotStream = GotStreamFunction & Record<HTTPAlias, GotStreamFunction>;
|
||||
/**
|
||||
An instance of `got`.
|
||||
*/
|
||||
export interface Got extends Record<HTTPAlias, GotRequestFunction>, GotRequestFunction {
|
||||
/**
|
||||
Sets `options.isStream` to `true`.
|
||||
|
||||
Returns a [duplex stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex) with additional events:
|
||||
- request
|
||||
- response
|
||||
- redirect
|
||||
- uploadProgress
|
||||
- downloadProgress
|
||||
- error
|
||||
*/
|
||||
stream: GotStream;
|
||||
/**
|
||||
Returns an async iterator.
|
||||
|
||||
See pagination.options for more pagination options.
|
||||
|
||||
@example
|
||||
```
|
||||
(async () => {
|
||||
const countLimit = 10;
|
||||
|
||||
const pagination = got.paginate('https://api.github.com/repos/sindresorhus/got/commits', {
|
||||
pagination: {countLimit}
|
||||
});
|
||||
|
||||
console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
|
||||
|
||||
for await (const commitData of pagination) {
|
||||
console.log(commitData.commit.message);
|
||||
}
|
||||
})();
|
||||
```
|
||||
*/
|
||||
paginate: GotPaginate;
|
||||
/**
|
||||
The Got defaults used in that instance.
|
||||
*/
|
||||
defaults: InstanceDefaults;
|
||||
/**
|
||||
An error to be thrown when a cache method fails.
|
||||
For example, if the database goes down or there's a filesystem error.
|
||||
*/
|
||||
CacheError: typeof CacheError;
|
||||
/**
|
||||
An error to be thrown when a request fails.
|
||||
Contains a `code` property with error class code, like `ECONNREFUSED`.
|
||||
*/
|
||||
RequestError: typeof RequestError;
|
||||
/**
|
||||
An error to be thrown when reading from response stream fails.
|
||||
*/
|
||||
ReadError: typeof ReadError;
|
||||
/**
|
||||
An error to be thrown when server response code is 2xx, and parsing body fails.
|
||||
Includes a `response` property.
|
||||
*/
|
||||
ParseError: typeof ParseError;
|
||||
/**
|
||||
An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304.
|
||||
Includes a `response` property.
|
||||
*/
|
||||
HTTPError: typeof HTTPError;
|
||||
/**
|
||||
An error to be thrown when the server redirects you more than ten times.
|
||||
Includes a `response` property.
|
||||
*/
|
||||
MaxRedirectsError: typeof MaxRedirectsError;
|
||||
/**
|
||||
An error to be thrown when given an unsupported protocol.
|
||||
*/
|
||||
UnsupportedProtocolError: typeof UnsupportedProtocolError;
|
||||
/**
|
||||
An error to be thrown when the request is aborted due to a timeout.
|
||||
Includes an `event` and `timings` property.
|
||||
*/
|
||||
TimeoutError: typeof TimeoutError;
|
||||
/**
|
||||
An error to be thrown when the request body is a stream and an error occurs while reading from that stream.
|
||||
*/
|
||||
UploadError: typeof UploadError;
|
||||
/**
|
||||
An error to be thrown when the request is aborted with `.cancel()`.
|
||||
*/
|
||||
CancelError: typeof CancelError;
|
||||
/**
|
||||
Configure a new `got` instance with default `options`.
|
||||
The `options` are merged with the parent instance's `defaults.options` using `got.mergeOptions`.
|
||||
You can access the resolved options with the `.defaults` property on the instance.
|
||||
|
||||
Additionally, `got.extend()` accepts two properties from the `defaults` object: `mutableDefaults` and `handlers`.
|
||||
|
||||
It is also possible to merges many instances into a single one:
|
||||
- options are merged using `got.mergeOptions()` (including hooks),
|
||||
- handlers are stored in an array (you can access them through `instance.defaults.handlers`).
|
||||
|
||||
@example
|
||||
```js
|
||||
const client = got.extend({
|
||||
prefixUrl: 'https://example.com',
|
||||
headers: {
|
||||
'x-unicorn': 'rainbow'
|
||||
}
|
||||
});
|
||||
|
||||
client.get('demo');
|
||||
|
||||
// HTTP Request =>
|
||||
// GET /demo HTTP/1.1
|
||||
// Host: example.com
|
||||
// x-unicorn: rainbow
|
||||
```
|
||||
*/
|
||||
extend: (...instancesOrOptions: Array<Got | ExtendOptions>) => Got;
|
||||
/**
|
||||
Merges multiple `got` instances into the parent.
|
||||
*/
|
||||
mergeInstances: (parent: Got, ...instances: Got[]) => Got;
|
||||
/**
|
||||
Extends parent options.
|
||||
Avoid using [object spread](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#Spread_in_object_literals) as it doesn't work recursively.
|
||||
|
||||
Options are deeply merged to a new object. The value of each key is determined as follows:
|
||||
|
||||
- If the new property is not defined, the old value is used.
|
||||
- If the new property is explicitly set to `undefined`:
|
||||
- If the parent property is a plain `object`, the parent value is deeply cloned.
|
||||
- Otherwise, `undefined` is used.
|
||||
- If the parent value is an instance of `URLSearchParams`:
|
||||
- If the new value is a `string`, an `object` or an instance of `URLSearchParams`, a new `URLSearchParams` instance is created.
|
||||
The values are merged using [`urlSearchParams.append(key, value)`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/append).
|
||||
The keys defined in the new value override the keys defined in the parent value.
|
||||
- Otherwise, the only available value is `undefined`.
|
||||
- If the new property is a plain `object`:
|
||||
- If the parent property is a plain `object` too, both values are merged recursively into a new `object`.
|
||||
- Otherwise, only the new value is deeply cloned.
|
||||
- If the new property is an `Array`, it overwrites the old one with a deep clone of the new property.
|
||||
- Properties that are not enumerable, such as `context`, `body`, `json`, and `form`, will not be merged.
|
||||
- Otherwise, the new value is assigned to the key.
|
||||
|
||||
**Note:** Only Got options are merged! Custom user options should be defined via [`options.context`](#context).
|
||||
|
||||
@example
|
||||
```
|
||||
const a = {headers: {cat: 'meow', wolf: ['bark', 'wrrr']}};
|
||||
const b = {headers: {cow: 'moo', wolf: ['auuu']}};
|
||||
|
||||
{...a, ...b} // => {headers: {cow: 'moo', wolf: ['auuu']}}
|
||||
got.mergeOptions(a, b) // => {headers: {cat: 'meow', cow: 'moo', wolf: ['auuu']}}
|
||||
```
|
||||
*/
|
||||
mergeOptions: (...sources: Options[]) => NormalizedOptions;
|
||||
}
|
||||
export {};
|
||||
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var iterator_1 = require("../symbol/iterator");
|
||||
exports.subscribeToIterable = function (iterable) { return function (subscriber) {
|
||||
var iterator = iterable[iterator_1.iterator]();
|
||||
do {
|
||||
var item = void 0;
|
||||
try {
|
||||
item = iterator.next();
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return subscriber;
|
||||
}
|
||||
if (item.done) {
|
||||
subscriber.complete();
|
||||
break;
|
||||
}
|
||||
subscriber.next(item.value);
|
||||
if (subscriber.closed) {
|
||||
break;
|
||||
}
|
||||
} while (true);
|
||||
if (typeof iterator.return === 'function') {
|
||||
subscriber.add(function () {
|
||||
if (iterator.return) {
|
||||
iterator.return();
|
||||
}
|
||||
});
|
||||
}
|
||||
return subscriber;
|
||||
}; };
|
||||
//# sourceMappingURL=subscribeToIterable.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"windowWhen.js","sources":["../../src/add/operator/windowWhen.ts"],"names":[],"mappings":";;AAAA,+CAA6C"}
|
||||
@@ -0,0 +1,28 @@
|
||||
/* eslint-disable unicorn/no-process-exit */
|
||||
'use strict';
|
||||
let updateNotifier = require('.');
|
||||
|
||||
const options = JSON.parse(process.argv[2]);
|
||||
|
||||
updateNotifier = new updateNotifier.UpdateNotifier(options);
|
||||
|
||||
(async () => {
|
||||
// Exit process when offline
|
||||
setTimeout(process.exit, 1000 * 30);
|
||||
|
||||
const update = await updateNotifier.fetchInfo();
|
||||
|
||||
// Only update the last update check time on success
|
||||
updateNotifier.config.set('lastUpdateCheck', Date.now());
|
||||
|
||||
if (update.type && update.type !== 'latest') {
|
||||
updateNotifier.config.set('update', update);
|
||||
}
|
||||
|
||||
// Call process exit explicitly to terminate the child process,
|
||||
// otherwise the child process will run forever, according to the Node.js docs
|
||||
process.exit();
|
||||
})().catch(error => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operator/mergeAll';
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"switchMap.js","sources":["../src/operator/switchMap.ts"],"names":[],"mappings":";;;;;AAAA,oDAA+C"}
|
||||
@@ -0,0 +1,19 @@
|
||||
'use strict';
|
||||
const chalk = require('chalk');
|
||||
const isUnicodeSupported = require('is-unicode-supported');
|
||||
|
||||
const main = {
|
||||
info: chalk.blue('ℹ'),
|
||||
success: chalk.green('✔'),
|
||||
warning: chalk.yellow('⚠'),
|
||||
error: chalk.red('✖')
|
||||
};
|
||||
|
||||
const fallback = {
|
||||
info: chalk.blue('i'),
|
||||
success: chalk.green('√'),
|
||||
warning: chalk.yellow('‼'),
|
||||
error: chalk.red('×')
|
||||
};
|
||||
|
||||
module.exports = isUnicodeSupported() ? main : fallback;
|
||||
@@ -0,0 +1,6 @@
|
||||
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
|
||||
export declare function switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
|
||||
/** @deprecated resultSelector is no longer supported, use inner map instead */
|
||||
export declare function switchMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction<T, ObservedValueOf<O>>;
|
||||
/** @deprecated resultSelector is no longer supported, use inner map instead */
|
||||
export declare function switchMap<T, R, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
|
||||
@@ -0,0 +1,50 @@
|
||||
'use strict';
|
||||
const pLimit = require('p-limit');
|
||||
|
||||
class EndError extends Error {
|
||||
constructor(value) {
|
||||
super();
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
// The input can also be a promise, so we await it
|
||||
const testElement = async (element, tester) => tester(await element);
|
||||
|
||||
// The input can also be a promise, so we `Promise.all()` them both
|
||||
const finder = async element => {
|
||||
const values = await Promise.all(element);
|
||||
if (values[1] === true) {
|
||||
throw new EndError(values[0]);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
const pLocate = async (iterable, tester, options) => {
|
||||
options = {
|
||||
concurrency: Infinity,
|
||||
preserveOrder: true,
|
||||
...options
|
||||
};
|
||||
|
||||
const limit = pLimit(options.concurrency);
|
||||
|
||||
// Start all the promises concurrently with optional limit
|
||||
const items = [...iterable].map(element => [element, limit(testElement, element, tester)]);
|
||||
|
||||
// Check the promises either serially or concurrently
|
||||
const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity);
|
||||
|
||||
try {
|
||||
await Promise.all(items.map(element => checkLimit(finder, element)));
|
||||
} catch (error) {
|
||||
if (error instanceof EndError) {
|
||||
return error.value;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = pLocate;
|
||||
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var Observable_1 = require("../Observable");
|
||||
var subscribeToPromise_1 = require("../util/subscribeToPromise");
|
||||
var schedulePromise_1 = require("../scheduled/schedulePromise");
|
||||
function fromPromise(input, scheduler) {
|
||||
if (!scheduler) {
|
||||
return new Observable_1.Observable(subscribeToPromise_1.subscribeToPromise(input));
|
||||
}
|
||||
else {
|
||||
return schedulePromise_1.schedulePromise(input, scheduler);
|
||||
}
|
||||
}
|
||||
exports.fromPromise = fromPromise;
|
||||
//# sourceMappingURL=fromPromise.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"distinct.js","sources":["../../src/internal/operators/distinct.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,oDAAiG;AA4DjG,SAAgB,QAAQ,CAAO,WAA6B,EAC7B,OAAyB;IACtD,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,EAAvD,CAAuD,CAAC;AAC5F,CAAC;AAHD,4BAGC;AAED;IACE,0BAAoB,WAA6B,EAAU,OAAyB;QAAhE,gBAAW,GAAX,WAAW,CAAkB;QAAU,YAAO,GAAP,OAAO,CAAkB;IACpF,CAAC;IAED,+BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,kBAAkB,CAAC,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9F,CAAC;IACH,uBAAC;AAAD,CAAC,AAPD,IAOC;AAOD;IAA8C,sCAA2B;IAGvE,4BAAY,WAA0B,EAAU,WAA6B,EAAE,OAAyB;QAAxG,YACE,kBAAM,WAAW,CAAC,SAKnB;QAN+C,iBAAW,GAAX,WAAW,CAAkB;QAFrE,YAAM,GAAG,IAAI,GAAG,EAAK,CAAC;QAK5B,IAAI,OAAO,EAAE;YACX,KAAI,CAAC,GAAG,CAAC,+BAAc,CAAC,OAAO,EAAE,IAAI,sCAAqB,CAAC,KAAI,CAAC,CAAC,CAAC,CAAC;SACpE;;IACH,CAAC;IAED,uCAAU,GAAV;QACE,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED,wCAAW,GAAX,UAAY,KAAU;QACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;IAES,kCAAK,GAAf,UAAgB,KAAQ;QACtB,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;SAC7B;aAAM;YACL,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SAClC;IACH,CAAC;IAEO,4CAAe,GAAvB,UAAwB,KAAQ;QAC9B,IAAI,GAAM,CAAC;QACH,IAAA,8BAAW,CAAU;QAC7B,IAAI;YACF,GAAG,GAAG,IAAI,CAAC,WAAY,CAAC,KAAK,CAAC,CAAC;SAChC;QAAC,OAAO,GAAG,EAAE;YACZ,WAAW,CAAC,KAAM,CAAC,GAAG,CAAC,CAAC;YACxB,OAAO;SACR;QACD,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAEO,0CAAa,GAArB,UAAsB,GAAQ,EAAE,KAAQ;QAC9B,IAAA,oBAAM,CAAU;QACxB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAI,GAAG,CAAC,EAAE;YACvB,MAAM,CAAC,GAAG,CAAI,GAAG,CAAC,CAAC;YACnB,IAAI,CAAC,WAAW,CAAC,IAAK,CAAC,KAAK,CAAC,CAAC;SAC/B;IACH,CAAC;IAEH,yBAAC;AAAD,CAAC,AA/CD,CAA8C,sCAAqB,GA+ClE;AA/CY,gDAAkB"}
|
||||
@@ -0,0 +1,14 @@
|
||||
export function getSymbolIterator(): symbol {
|
||||
if (typeof Symbol !== 'function' || !Symbol.iterator) {
|
||||
return '@@iterator' as any;
|
||||
}
|
||||
|
||||
return Symbol.iterator;
|
||||
}
|
||||
|
||||
export const iterator = getSymbolIterator();
|
||||
|
||||
/**
|
||||
* @deprecated use {@link iterator} instead
|
||||
*/
|
||||
export const $$iterator = iterator;
|
||||
@@ -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.00256,"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.00256,"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.00256,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00256,"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.00256,"100":0.00256,"101":0,"102":0.00768,"103":0.00256,"104":0.00256,"105":0.00256,"106":0.00256,"107":0.01024,"108":0.16122,"109":0.08957,"110":0.01024,"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.00256,"38":0,"39":0,"40":0.00256,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00256,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0.00256,"56":0,"57":0,"58":0.00768,"59":0.00256,"60":0,"61":0,"62":0,"63":0.00256,"64":0.00256,"65":0,"66":0,"67":0.00256,"68":0.00512,"69":0,"70":0.00256,"71":0.00256,"72":0,"73":0.00256,"74":0.00256,"75":0.00256,"76":0.00512,"77":0.00256,"78":0.00512,"79":0.00512,"80":0.00256,"81":0.0128,"83":0.00256,"84":0,"85":0.00256,"86":0.00512,"87":0.00768,"88":0.00768,"89":0,"90":0.00768,"91":0.00256,"92":0.00256,"93":0.00256,"94":0.00256,"95":0.00768,"96":0.00512,"97":0.00256,"98":0.00768,"99":0.00512,"100":0.00512,"101":0.01024,"102":0.02047,"103":0.03583,"104":0.0128,"105":0.01535,"106":0.01535,"107":0.04862,"108":1.38186,"109":1.21297,"110":0.00256,"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.00256,"27":0.00256,"28":0.00256,"29":0,"30":0.00256,"31":0,"32":0,"33":0.00256,"34":0,"35":0.02047,"36":0,"37":0.00512,"38":0,"39":0,"40":0,"41":0,"42":0.00768,"43":0,"44":0,"45":0,"46":0,"47":0.01024,"48":0,"49":0,"50":0.00256,"51":0.07677,"52":0,"53":0,"54":0.00256,"55":0.00256,"56":0,"57":0.00768,"58":0.01024,"60":0.16634,"62":0.00256,"63":0.2124,"64":0.08701,"65":0.07933,"66":0.27637,"67":0.03839,"68":0,"69":0,"70":0,"71":0,"72":0.00512,"73":0.03839,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00512,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0.00256,"92":0.00256,"93":0.01535,"94":0.26614,"9.5-9.6":0,"10.0-10.1":0,"10.5":0.00256,"10.6":0.00256,"11.1":0,"11.5":0,"11.6":0,"12.1":0.01791},B:{"12":0.01535,"13":0.00512,"14":0.00512,"15":0.01024,"16":0.00512,"17":0.00512,"18":0.02303,"79":0,"80":0,"81":0,"83":0,"84":0.00512,"85":0.00256,"86":0,"87":0,"88":0,"89":0.00512,"90":0.00512,"91":0,"92":0.01535,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0.00256,"101":0.00256,"102":0.00256,"103":0.00512,"104":0.00512,"105":0.00256,"106":0.00512,"107":0.03071,"108":0.33011,"109":0.30196},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00512,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.00768,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00768,"14.1":0.01535,"15.1":0,"15.2-15.3":0,"15.4":0.00256,"15.5":0.00768,"15.6":0.03583,"16.0":0.01024,"16.1":0.01791,"16.2":0.0128,"16.3":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00226,"5.0-5.1":0.00451,"6.0-6.1":0,"7.0-7.1":0.01354,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.08122,"10.0-10.2":0,"10.3":0.05076,"11.0-11.2":0.01128,"11.3-11.4":0.01128,"12.0-12.1":0.05415,"12.2-12.5":1.87375,"13.0-13.1":0.05866,"13.2":0.00338,"13.3":0.11055,"13.4-13.7":0.13988,"14.0-14.4":0.51328,"14.5-14.8":0.45236,"15.0-15.1":0.48508,"15.2-15.3":0.32151,"15.4":0.22562,"15.5":0.48846,"15.6":0.99385,"16.0":0.92842,"16.1":1.7914,"16.2":1.26571,"16.3":0.0722},P:{"4":0.11399,"5.0-5.4":0,"6.2-6.4":0.01036,"7.2-7.4":0.14508,"8.2":0,"9.2":0.01036,"10.1":0,"11.1-11.2":0.02073,"12.0":0,"13.0":0.09326,"14.0":0.03109,"15.0":0.02073,"16.0":0.07254,"17.0":0.0829,"18.0":0.11399,"19.0":0.97409},I:{"0":0,"3":0,"4":0.00201,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00403,"4.2-4.3":0.00201,"4.4":0,"4.4.3-4.4.4":0.16009},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0.00292,"11":0.01755,"5.5":0},J:{"7":0,"10":0.00744},N:{"10":0,"11":0},S:{"2.5":0.01488},R:{_:"0"},M:{"0":0.11162},Q:{"13.1":0},O:{"0":2.03139},H:{"0":12.41269},L:{"0":63.88399}};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J BC","2340":"E F G A B"},B:{"2":"C K L H M N O","1025":"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":"c d f g h i j k l m n o p q r s D t xB yB","2":"CC tB DC","513":"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","545":"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 EC"},D:{"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","1025":"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"},E:{"1":"A B C K L H 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u GC zB HC","164":"J","4644":"E F G IC JC KC"},F:{"2":"0 1 2 3 G B H M N O v w x y z OC PC QC RC qB 9B","545":"C SC rB","1025":"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 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"},G:{"1":"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","4260":"UC VC","4644":"F WC XC YC ZC"},H:{"2":"nC"},I:{"2":"tB I oC pC qC rC AC sC tC","1025":"D"},J:{"2":"E","4260":"A"},K:{"2":"A B qB 9B","545":"C rB","1025":"e"},L:{"1025":"D"},M:{"1":"D"},N:{"2340":"A B"},O:{"1025":"uC"},P:{"1025":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1025":"1B"},R:{"1025":"8C"},S:{"4097":"9C"}},B:4,C:"Crisp edges/pixelated images"};
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operators/defaultIfEmpty';
|
||||
@@ -0,0 +1,67 @@
|
||||
const { EOL } = require('os');
|
||||
const chalk = require('chalk');
|
||||
const { isObject, last, filter, isString, lowerCase, upperFirst, isArray } = require('lodash');
|
||||
|
||||
class Logger {
|
||||
constructor({ isCI = true, isVerbose = false, verbosityLevel = 0, isDryRun = false } = {}) {
|
||||
this.isCI = isCI;
|
||||
this.isVerbose = isVerbose;
|
||||
this.verbosityLevel = verbosityLevel;
|
||||
this.isDryRun = isDryRun;
|
||||
}
|
||||
|
||||
shouldLog(isExternal) {
|
||||
return this.verbosityLevel === 2 || (this.isVerbose && isExternal);
|
||||
}
|
||||
|
||||
log(...args) {
|
||||
console.log(...args); // eslint-disable-line no-console
|
||||
}
|
||||
|
||||
error(...args) {
|
||||
console.error(chalk.red('ERROR'), ...args); // eslint-disable-line no-console
|
||||
}
|
||||
|
||||
info(...args) {
|
||||
this.log(chalk.grey(...args));
|
||||
}
|
||||
|
||||
warn(...args) {
|
||||
this.log(chalk.yellow('WARNING'), ...args);
|
||||
}
|
||||
|
||||
verbose(...args) {
|
||||
const { isExternal } = isObject(last(args)) ? last(args) : {};
|
||||
if (this.shouldLog(isExternal)) {
|
||||
this.log(...filter(args, isString));
|
||||
}
|
||||
}
|
||||
|
||||
exec(...args) {
|
||||
const { isDryRun: isExecutedInDryRun, isExternal, isCached } = isObject(last(args)) ? last(args) : {};
|
||||
if (this.shouldLog(isExternal) || this.isDryRun) {
|
||||
const prefix = isExecutedInDryRun == null ? '$' : '!';
|
||||
const command = args.map(cmd => (isString(cmd) ? cmd : isArray(cmd) ? cmd.join(' ') : '')).join(' ');
|
||||
const message = [prefix, command, isCached ? '[cached]' : ''].join(' ').trim();
|
||||
this.log(message);
|
||||
}
|
||||
}
|
||||
|
||||
obtrusive(...args) {
|
||||
if (!this.isCI) this.log();
|
||||
this.log(...args);
|
||||
if (!this.isCI) this.log();
|
||||
}
|
||||
|
||||
preview({ title, text }) {
|
||||
if (text) {
|
||||
const header = chalk.bold(upperFirst(title));
|
||||
const body = text.replace(new RegExp(EOL + EOL, 'g'), EOL);
|
||||
this.obtrusive(`${header}:${EOL}${body}`);
|
||||
} else {
|
||||
this.obtrusive(`Empty ${lowerCase(title)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Logger;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"audit.js","sources":["../../src/add/operator/audit.ts"],"names":[],"mappings":";;AAAA,0CAAwC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"G A B","130":"J E F 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 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","257":"CC tB I u J DC EC"},D:{"1":"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 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"},E:{"1":"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":"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 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 OC PC QC RC qB 9B SC rB"},G:{"1":"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:{"1":"nC"},I:{"1":"tB I D oC pC qC rC AC sC tC"},J:{"1":"E A"},K:{"1":"A B C e 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:"EventTarget.addEventListener()"};
|
||||
@@ -0,0 +1,13 @@
|
||||
import crypto from 'crypto';
|
||||
|
||||
function sha1(bytes) {
|
||||
if (Array.isArray(bytes)) {
|
||||
bytes = Buffer.from(bytes);
|
||||
} else if (typeof bytes === 'string') {
|
||||
bytes = Buffer.from(bytes, 'utf8');
|
||||
}
|
||||
|
||||
return crypto.createHash('sha1').update(bytes).digest();
|
||||
}
|
||||
|
||||
export default sha1;
|
||||
@@ -0,0 +1,40 @@
|
||||
import { AsapScheduler } from './AsapScheduler';
|
||||
/**
|
||||
*
|
||||
* Asap Scheduler
|
||||
*
|
||||
* <span class="informal">Perform task as fast as it can be performed asynchronously</span>
|
||||
*
|
||||
* `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task
|
||||
* in time. If however you set delay to `0`, `asap` will wait for current synchronously executing
|
||||
* code to end and then it will try to execute given task as fast as possible.
|
||||
*
|
||||
* `asap` scheduler will do its best to minimize time between end of currently executing code
|
||||
* and start of scheduled task. This makes it best candidate for performing so called "deferring".
|
||||
* Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves
|
||||
* some (although minimal) unwanted delay.
|
||||
*
|
||||
* Note that using `asap` scheduler does not necessarily mean that your task will be first to process
|
||||
* after currently executing code. In particular, if some task was also scheduled with `asap` before,
|
||||
* that task will execute first. That being said, if you need to schedule task asynchronously, but
|
||||
* as soon as possible, `asap` scheduler is your best bet.
|
||||
*
|
||||
* ## Example
|
||||
* Compare async and asap scheduler<
|
||||
* ```ts
|
||||
* import { asapScheduler, asyncScheduler } from 'rxjs';
|
||||
*
|
||||
* asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first...
|
||||
* asapScheduler.schedule(() => console.log('asap'));
|
||||
*
|
||||
* // Logs:
|
||||
* // "asap"
|
||||
* // "async"
|
||||
* // ... but 'asap' goes first!
|
||||
* ```
|
||||
*/
|
||||
export declare const asapScheduler: AsapScheduler;
|
||||
/**
|
||||
* @deprecated renamed. Use {@link asapScheduler}
|
||||
*/
|
||||
export declare const asap: AsapScheduler;
|
||||
Reference in New Issue
Block a user