new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 v J D E F A B C K L G M N O w g 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 h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I"},E:{"1":"J D E F A B C K L G JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I HC zB","4":"v IC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C G M N O w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e AC TC rB","2":"F B PC QC RC SC qB"},G:{"1":"E VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC","4":"BC"},H:{"2":"oC"},I:{"1":"f qC rC BC tC uC","2":"tB I pC sC"},J:{"1":"D A"},K:{"1":"C h qB AC rB","2":"A B"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"Session history management"};
|
||||
@@ -0,0 +1,125 @@
|
||||
declare namespace cliSpinners {
|
||||
type SpinnerName =
|
||||
| 'dots'
|
||||
| 'dots2'
|
||||
| 'dots3'
|
||||
| 'dots4'
|
||||
| 'dots5'
|
||||
| 'dots6'
|
||||
| 'dots7'
|
||||
| 'dots8'
|
||||
| 'dots9'
|
||||
| 'dots10'
|
||||
| 'dots11'
|
||||
| 'dots12'
|
||||
| 'dots8Bit'
|
||||
| 'line'
|
||||
| 'line2'
|
||||
| 'pipe'
|
||||
| 'simpleDots'
|
||||
| 'simpleDotsScrolling'
|
||||
| 'star'
|
||||
| 'star2'
|
||||
| 'flip'
|
||||
| 'hamburger'
|
||||
| 'growVertical'
|
||||
| 'growHorizontal'
|
||||
| 'balloon'
|
||||
| 'balloon2'
|
||||
| 'noise'
|
||||
| 'bounce'
|
||||
| 'boxBounce'
|
||||
| 'boxBounce2'
|
||||
| 'triangle'
|
||||
| 'arc'
|
||||
| 'circle'
|
||||
| 'squareCorners'
|
||||
| 'circleQuarters'
|
||||
| 'circleHalves'
|
||||
| 'squish'
|
||||
| 'toggle'
|
||||
| 'toggle2'
|
||||
| 'toggle3'
|
||||
| 'toggle4'
|
||||
| 'toggle5'
|
||||
| 'toggle6'
|
||||
| 'toggle7'
|
||||
| 'toggle8'
|
||||
| 'toggle9'
|
||||
| 'toggle10'
|
||||
| 'toggle11'
|
||||
| 'toggle12'
|
||||
| 'toggle13'
|
||||
| 'arrow'
|
||||
| 'arrow2'
|
||||
| 'arrow3'
|
||||
| 'bouncingBar'
|
||||
| 'bouncingBall'
|
||||
| 'smiley'
|
||||
| 'monkey'
|
||||
| 'hearts'
|
||||
| 'clock'
|
||||
| 'earth'
|
||||
| 'material'
|
||||
| 'moon'
|
||||
| 'runner'
|
||||
| 'pong'
|
||||
| 'shark'
|
||||
| 'dqpb'
|
||||
| 'weather'
|
||||
| 'christmas'
|
||||
| 'grenade'
|
||||
| 'point'
|
||||
| 'layer'
|
||||
| 'betaWave'
|
||||
| 'fingerDance'
|
||||
| 'fistBump'
|
||||
| 'soccerHeader'
|
||||
| 'mindblown'
|
||||
| 'speaker'
|
||||
| 'orangePulse'
|
||||
| 'bluePulse'
|
||||
| 'orangeBluePulse'
|
||||
| 'timeTravel'
|
||||
| 'aesthetic';
|
||||
|
||||
interface Spinner {
|
||||
/**
|
||||
Recommended interval.
|
||||
*/
|
||||
readonly interval: number;
|
||||
|
||||
/**
|
||||
A list of frames to show for the spinner.
|
||||
*/
|
||||
readonly frames: string[];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
70+ spinners for use in the terminal.
|
||||
|
||||
@example
|
||||
```
|
||||
import cliSpinners = require('cli-spinners');
|
||||
|
||||
console.log(cliSpinners.dots);
|
||||
// {
|
||||
// interval: 80,
|
||||
// frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
|
||||
// }
|
||||
```
|
||||
*/
|
||||
declare const cliSpinners: {
|
||||
readonly [spinnerName in cliSpinners.SpinnerName]: cliSpinners.Spinner;
|
||||
} & {
|
||||
/**
|
||||
Returns a random spinner each time it's called.
|
||||
*/
|
||||
readonly random: cliSpinners.Spinner;
|
||||
|
||||
// TODO: Remove this for the next major release
|
||||
default: typeof cliSpinners;
|
||||
};
|
||||
|
||||
export = cliSpinners;
|
||||
@@ -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.01185,"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.00395,"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.00395,"99":0.00395,"100":0,"101":0,"102":0.01976,"103":0,"104":0,"105":0,"106":0,"107":0.09482,"108":0.00395,"109":0.11853,"110":0.06322,"111":0,"112":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.00395,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.02371,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0.01976,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00395,"68":0,"69":0,"70":0,"71":0.0079,"72":0,"73":0.0079,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00395,"80":0.00395,"81":0.0079,"83":0.0079,"84":0,"85":0.00395,"86":0.00395,"87":0.01185,"88":0.00395,"89":0.0079,"90":0.00395,"91":0.00395,"92":0.0158,"93":0,"94":0.01976,"95":0.00395,"96":0.00395,"97":0.01185,"98":0.00395,"99":0.00395,"100":0.01976,"101":0.01185,"102":0.0158,"103":0.0158,"104":0.01185,"105":0.0079,"106":0.0158,"107":0.04346,"108":0.52153,"109":11.16948,"110":1.39865,"111":0,"112":0.00395,"113":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.00395,"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.01976,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.0079,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.04741,"86":0.00395,"87":0,"88":0,"89":0,"90":0.0158,"91":0,"92":0,"93":0.0158,"94":0.15409,"95":0.22916,"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.00395,"15":0.0079,"16":0,"17":0,"18":0.00395,"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.00395,"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,"107":0,"108":0.00395,"109":0.11458,"110":0.12248},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00395,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.05136,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.0079,"14.1":0.0079,"15.1":0.00395,"15.2-15.3":0.00395,"15.4":0.0079,"15.5":0.01976,"15.6":0.03556,"16.0":0.00395,"16.1":0.03556,"16.2":0.05927,"16.3":0.05136,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00152,"6.0-6.1":0,"7.0-7.1":0.00152,"8.1-8.4":0,"9.0-9.2":0.00304,"9.3":0.01978,"10.0-10.2":0,"10.3":0.00609,"11.0-11.2":0.00913,"11.3-11.4":0.00152,"12.0-12.1":0.01065,"12.2-12.5":0.32405,"13.0-13.1":0.01065,"13.2":0.00456,"13.3":0.0213,"13.4-13.7":0.04868,"14.0-14.4":0.35752,"14.5-14.8":0.51422,"15.0-15.1":0.26167,"15.2-15.3":0.32709,"15.4":0.37425,"15.5":0.86109,"15.6":1.31902,"16.0":2.65781,"16.1":2.46003,"16.2":2.35202,"16.3":1.86366,"16.4":0.01065},P:{"4":0.19945,"20":0.26926,"5.0-5.4":0.00997,"6.2-6.4":0.02992,"7.2-7.4":0.52855,"8.2":0,"9.2":0.02992,"10.1":0,"11.1-11.2":0.04986,"12.0":0.01995,"13.0":0.04986,"14.0":0.05984,"15.0":0.05984,"16.0":0.16954,"17.0":0.09973,"18.0":0.14959,"19.0":0.85765},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.01354,"4.4":0,"4.4.3-4.4.4":0.02437},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.0079,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.48392},H:{"0":0.25198},L:{"0":65.1934},R:{_:"0"},M:{"0":0.03629},Q:{"13.1":0}};
|
||||
@@ -0,0 +1,91 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: ()=>parseAnimationValue
|
||||
});
|
||||
const DIRECTIONS = new Set([
|
||||
"normal",
|
||||
"reverse",
|
||||
"alternate",
|
||||
"alternate-reverse"
|
||||
]);
|
||||
const PLAY_STATES = new Set([
|
||||
"running",
|
||||
"paused"
|
||||
]);
|
||||
const FILL_MODES = new Set([
|
||||
"none",
|
||||
"forwards",
|
||||
"backwards",
|
||||
"both"
|
||||
]);
|
||||
const ITERATION_COUNTS = new Set([
|
||||
"infinite"
|
||||
]);
|
||||
const TIMINGS = new Set([
|
||||
"linear",
|
||||
"ease",
|
||||
"ease-in",
|
||||
"ease-out",
|
||||
"ease-in-out",
|
||||
"step-start",
|
||||
"step-end"
|
||||
]);
|
||||
const TIMING_FNS = [
|
||||
"cubic-bezier",
|
||||
"steps"
|
||||
];
|
||||
const COMMA = /\,(?![^(]*\))/g // Comma separator that is not located between brackets. E.g.: `cubiz-bezier(a, b, c)` these don't count.
|
||||
;
|
||||
const SPACE = /\ +(?![^(]*\))/g // Similar to the one above, but with spaces instead.
|
||||
;
|
||||
const TIME = /^(-?[\d.]+m?s)$/;
|
||||
const DIGIT = /^(\d+)$/;
|
||||
function parseAnimationValue(input) {
|
||||
let animations = input.split(COMMA);
|
||||
return animations.map((animation)=>{
|
||||
let value = animation.trim();
|
||||
let result = {
|
||||
value
|
||||
};
|
||||
let parts = value.split(SPACE);
|
||||
let seen = new Set();
|
||||
for (let part of parts){
|
||||
if (!seen.has("DIRECTIONS") && DIRECTIONS.has(part)) {
|
||||
result.direction = part;
|
||||
seen.add("DIRECTIONS");
|
||||
} else if (!seen.has("PLAY_STATES") && PLAY_STATES.has(part)) {
|
||||
result.playState = part;
|
||||
seen.add("PLAY_STATES");
|
||||
} else if (!seen.has("FILL_MODES") && FILL_MODES.has(part)) {
|
||||
result.fillMode = part;
|
||||
seen.add("FILL_MODES");
|
||||
} else if (!seen.has("ITERATION_COUNTS") && (ITERATION_COUNTS.has(part) || DIGIT.test(part))) {
|
||||
result.iterationCount = part;
|
||||
seen.add("ITERATION_COUNTS");
|
||||
} else if (!seen.has("TIMING_FUNCTION") && TIMINGS.has(part)) {
|
||||
result.timingFunction = part;
|
||||
seen.add("TIMING_FUNCTION");
|
||||
} else if (!seen.has("TIMING_FUNCTION") && TIMING_FNS.some((f)=>part.startsWith(`${f}(`))) {
|
||||
result.timingFunction = part;
|
||||
seen.add("TIMING_FUNCTION");
|
||||
} else if (!seen.has("DURATION") && TIME.test(part)) {
|
||||
result.duration = part;
|
||||
seen.add("DURATION");
|
||||
} else if (!seen.has("DELAY") && TIME.test(part)) {
|
||||
result.delay = part;
|
||||
seen.add("DELAY");
|
||||
} else if (!seen.has("NAME")) {
|
||||
result.name = part;
|
||||
seen.add("NAME");
|
||||
} else {
|
||||
if (!result.unknown) result.unknown = [];
|
||||
result.unknown.push(part);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"groupBy.js","sourceRoot":"","sources":["../../../../src/internal/operators/groupBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAuIpF,MAAM,UAAU,OAAO,CACrB,WAA4B,EAC5B,gBAAgH,EAChH,QAAyE,EACzE,SAAkC;IAElC,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,OAAqC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;YAC/D,OAAO,GAAG,gBAAyC,CAAC;SACrD;aAAM;YACL,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,gBAAgB,CAAC,CAAC;SACvD;QAGD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;QAG9C,MAAM,MAAM,GAAG,CAAC,EAAkC,EAAE,EAAE;YACpD,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACnB,EAAE,CAAC,UAAU,CAAC,CAAC;QACjB,CAAC,CAAC;QAIF,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAG5E,IAAI,YAAY,GAAG,CAAC,CAAC;QAGrB,IAAI,iBAAiB,GAAG,KAAK,CAAC;QAS9B,MAAM,uBAAuB,GAAG,IAAI,kBAAkB,CACpD,UAAU,EACV,CAAC,KAAQ,EAAE,EAAE;YAIX,IAAI;gBACF,MAAM,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;gBAE/B,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBAC5B,IAAI,CAAC,KAAK,EAAE;oBAEV,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,EAAO,CAAC,CAAC,CAAC;oBAKxE,MAAM,OAAO,GAAG,uBAAuB,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;oBACpD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;oBAEzB,IAAI,QAAQ,EAAE;wBACZ,MAAM,kBAAkB,GAAG,wBAAwB,CAMjD,KAAY,EACZ,GAAG,EAAE;4BAGH,KAAM,CAAC,QAAQ,EAAE,CAAC;4BAClB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;wBACpC,CAAC,EAED,SAAS,EAGT,SAAS,EAET,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CACzB,CAAC;wBAGF,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC;qBACzF;iBACF;gBAGD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;aAC9C;YAAC,OAAO,GAAG,EAAE;gBACZ,WAAW,CAAC,GAAG,CAAC,CAAC;aAClB;QACH,CAAC,EAED,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAE/C,WAAW,EAKX,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EACpB,GAAG,EAAE;YACH,iBAAiB,GAAG,IAAI,CAAC;YAIzB,OAAO,YAAY,KAAK,CAAC,CAAC;QAC5B,CAAC,CACF,CAAC;QAGF,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAO1C,SAAS,uBAAuB,CAAC,GAAM,EAAE,YAA8B;YACrE,MAAM,MAAM,GAAQ,IAAI,UAAU,CAAI,CAAC,eAAe,EAAE,EAAE;gBACxD,YAAY,EAAE,CAAC;gBACf,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;gBACzD,OAAO,GAAG,EAAE;oBACV,QAAQ,CAAC,WAAW,EAAE,CAAC;oBAIvB,EAAE,YAAY,KAAK,CAAC,IAAI,iBAAiB,IAAI,uBAAuB,CAAC,WAAW,EAAE,CAAC;gBACrF,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;YACjB,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
Create a type that represents either the value or the value wrapped in `PromiseLike`.
|
||||
|
||||
Use-cases:
|
||||
- A function accepts a callback that may either return a value synchronously or may return a promised value.
|
||||
- This type could be the return type of `Promise#then()`, `Promise#catch()`, and `Promise#finally()` callbacks.
|
||||
|
||||
Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/31394) if you want to have this type as a built-in in TypeScript.
|
||||
|
||||
@example
|
||||
```
|
||||
import type {Promisable} from 'type-fest';
|
||||
|
||||
async function logger(getLogEntry: () => Promisable<string>): Promise<void> {
|
||||
const entry = await getLogEntry();
|
||||
console.log(entry);
|
||||
}
|
||||
|
||||
logger(() => 'foo');
|
||||
logger(() => Promise.resolve('bar'));
|
||||
```
|
||||
|
||||
@category Async
|
||||
*/
|
||||
export type Promisable<T> = T | PromiseLike<T>;
|
||||
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/node`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for Node.js (https://nodejs.org/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Feb 2023 08:32:36 GMT
|
||||
* Dependencies: none
|
||||
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('endsWith', require('../endsWith'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof Symbol, "function"); };
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isHexadecimal;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;
|
||||
|
||||
function isHexadecimal(str) {
|
||||
(0, _assertString.default)(str);
|
||||
return hexadecimal.test(str);
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,15 @@
|
||||
export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();
|
||||
export function errorNotification(error) {
|
||||
return createNotification('E', undefined, error);
|
||||
}
|
||||
export function nextNotification(value) {
|
||||
return createNotification('N', value, undefined);
|
||||
}
|
||||
export function createNotification(kind, value, error) {
|
||||
return {
|
||||
kind: kind,
|
||||
value: value,
|
||||
error: error,
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=NotificationFactories.js.map
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Szymon Marczak
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"immediateProvider.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/immediateProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8C;AAEtC,IAAA,YAAY,GAAqB,qBAAS,aAA9B,EAAE,cAAc,GAAK,qBAAS,eAAd,CAAe;AAgBtC,QAAA,iBAAiB,GAAsB;IAGlD,YAAY;QAAC,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACV,IAAA,QAAQ,GAAK,yBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY,KAAI,YAAY,CAAC,wCAAI,IAAI,IAAE;IAC3D,CAAC;IACD,cAAc,EAAd,UAAe,MAAM;QACX,IAAA,QAAQ,GAAK,yBAAiB,SAAtB,CAAuB;QACvC,OAAO,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,KAAI,cAAc,CAAC,CAAC,MAAa,CAAC,CAAC;IACrE,CAAC;IACD,QAAQ,EAAE,SAAS;CACpB,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 DC tB I v J D E F A B C K L G M N O w g x y z EC FC"},D:{"1":"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 h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v J D E F A B C K L G M N O w g x y","130":"0 1 2 3 4 5 6 7 z"},E:{"1":"E F A B C K L G KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J HC zB IC JC","130":"D"},F:{"1":"0 1 2 3 4 5 6 7 8 9 w g 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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"F B C PC QC RC SC qB AC TC rB","130":"G M N O"},G:{"1":"E YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC VC WC","130":"XC"},H:{"2":"oC"},I:{"1":"f uC","2":"tB I pC qC rC sC BC","130":"tC"},J:{"2":"D","130":"A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"URL API"};
|
||||
@@ -0,0 +1,70 @@
|
||||
wordwrap
|
||||
========
|
||||
|
||||
Wrap your words.
|
||||
|
||||
example
|
||||
=======
|
||||
|
||||
made out of meat
|
||||
----------------
|
||||
|
||||
meat.js
|
||||
|
||||
var wrap = require('wordwrap')(15);
|
||||
console.log(wrap('You and your whole family are made out of meat.'));
|
||||
|
||||
output:
|
||||
|
||||
You and your
|
||||
whole family
|
||||
are made out
|
||||
of meat.
|
||||
|
||||
centered
|
||||
--------
|
||||
|
||||
center.js
|
||||
|
||||
var wrap = require('wordwrap')(20, 60);
|
||||
console.log(wrap(
|
||||
'At long last the struggle and tumult was over.'
|
||||
+ ' The machines had finally cast off their oppressors'
|
||||
+ ' and were finally free to roam the cosmos.'
|
||||
+ '\n'
|
||||
+ 'Free of purpose, free of obligation.'
|
||||
+ ' Just drifting through emptiness.'
|
||||
+ ' The sun was just another point of light.'
|
||||
));
|
||||
|
||||
output:
|
||||
|
||||
At long last the struggle and tumult
|
||||
was over. The machines had finally cast
|
||||
off their oppressors and were finally
|
||||
free to roam the cosmos.
|
||||
Free of purpose, free of obligation.
|
||||
Just drifting through emptiness. The
|
||||
sun was just another point of light.
|
||||
|
||||
methods
|
||||
=======
|
||||
|
||||
var wrap = require('wordwrap');
|
||||
|
||||
wrap(stop), wrap(start, stop, params={mode:"soft"})
|
||||
---------------------------------------------------
|
||||
|
||||
Returns a function that takes a string and returns a new string.
|
||||
|
||||
Pad out lines with spaces out to column `start` and then wrap until column
|
||||
`stop`. If a word is longer than `stop - start` characters it will overflow.
|
||||
|
||||
In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are
|
||||
longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break
|
||||
up chunks longer than `stop - start`.
|
||||
|
||||
wrap.hard(start, stop)
|
||||
----------------------
|
||||
|
||||
Like `wrap()` but with `params.mode = "hard"`.
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"imurmurhash","version":"0.1.4","files":{"README.md":{"checkedAt":1678883672496,"integrity":"sha512-WtaBXgN1lHV1ySWcWH1dH2zNpsi/9qMvcPPIeVip/RLzE37JCUM6hQ3WKaGOvkQ/cEIpz4dFJPoVCekqD8/zPw==","mode":420,"size":4763},"imurmurhash.js":{"checkedAt":1678883672496,"integrity":"sha512-Td8qL0kz6WUuXN39Uxf5eTU117rZE/mCL62IE7Kt0iTb6QlnFNlKnw6zt2krp9lUrN4VP1eKPTXq2hVCryqc4A==","mode":420,"size":4412},"package.json":{"checkedAt":1678883672496,"integrity":"sha512-oHaYdypKbYbl50ERTgLma2yv4EJyYsQc0EHQK9Scic8drAfDvm0TqqexVHyGUCc92/5vx2/h9GGHXaxqT76/QQ==","mode":420,"size":818},"imurmurhash.min.js":{"checkedAt":1678883672496,"integrity":"sha512-W9LXjd/6yib4OIKWrTDoAojFHmdAmpjWudfe4q2Dkc0ilmOq6LT8D8sZbflVNKM+TKCI8D2fYayUp9e6hOYTYA==","mode":420,"size":1894}}}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { request } from "@octokit/request";
|
||||
import { getUserAgent } from "universal-user-agent";
|
||||
import { VERSION } from "./version";
|
||||
import { withDefaults } from "./with-defaults";
|
||||
export const graphql = withDefaults(request, {
|
||||
headers: {
|
||||
"user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,
|
||||
},
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
export { GraphqlResponseError } from "./error";
|
||||
export function withCustomRequest(customRequest) {
|
||||
return withDefaults(customRequest, {
|
||||
method: "POST",
|
||||
url: "/graphql",
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GetOptionsObject = void 0;
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-getoptionsobject
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function GetOptionsObject(options) {
|
||||
if (typeof options === 'undefined') {
|
||||
return Object.create(null);
|
||||
}
|
||||
if (typeof options === 'object') {
|
||||
return options;
|
||||
}
|
||||
throw new TypeError('Options must be an object');
|
||||
}
|
||||
exports.GetOptionsObject = GetOptionsObject;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=AnyCatcher.js.map
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a, d) {
|
||||
var data
|
||||
, count = 0
|
||||
, x = function (a, b, c) {
|
||||
data = [this, a, b, c, ++count];
|
||||
}
|
||||
, y = t(x, 200)
|
||||
, z = {};
|
||||
|
||||
a(data, undefined, "Setup");
|
||||
y.call(z, 111, "foo", false);
|
||||
a(data, undefined, "Immediately");
|
||||
setTimeout(function () {
|
||||
a(data, undefined, "100ms");
|
||||
setTimeout(function () {
|
||||
a.deep(data, [z, 111, "foo", false, 1], "250ms");
|
||||
data = null;
|
||||
clearTimeout(y());
|
||||
setTimeout(function () {
|
||||
a(data, null, "Clear");
|
||||
d();
|
||||
}, 300);
|
||||
}, 150);
|
||||
}, 100);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"lru-cache","version":"6.0.0","files":{"LICENSE":{"checkedAt":1678883670198,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"package.json":{"checkedAt":1678883670201,"integrity":"sha512-dEPvfNo9DRTO5Fkn8JUfPNt9BtMJbP+zDMhmpCnJmqnEA0ILecvN3kcg6XxWKetcGaF7Gr4/aVj70sAqmXV4/A==","mode":420,"size":705},"README.md":{"checkedAt":1678883670201,"integrity":"sha512-IM3wLlYJEzSNb50qW2EswRH6qpzUSjn5Mzh52nfqHHbFGRaFVge5c7q7Eb6vtUmbuLM7VVPGdPQJsClsQx6nOA==","mode":420,"size":5987},"index.js":{"checkedAt":1678883670201,"integrity":"sha512-9xK3IVCUhbh6gQgCpI7vHE69BidtDijNTwBnHnbjwPn6G7+HLaLJP7WzvPgUYmTAy8jQmv2OO5qkqS+QHfEeeg==","mode":420,"size":8186}}}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('methodOf', require('../methodOf'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,48 @@
|
||||
import type { CreateDonor } from '../models/CreateDonor';
|
||||
import type { ResponseDonor } from '../models/ResponseDonor';
|
||||
import type { ResponseEmpty } from '../models/ResponseEmpty';
|
||||
import type { UpdateDonor } from '../models/UpdateDonor';
|
||||
export declare class DonorService {
|
||||
/**
|
||||
* Get all
|
||||
* Lists all donor. <br> This includes the donor's current donation amount.
|
||||
* @result ResponseDonor
|
||||
* @throws ApiError
|
||||
*/
|
||||
static donorControllerGetAll(): Promise<Array<ResponseDonor>>;
|
||||
/**
|
||||
* Post
|
||||
* Create a new donor.
|
||||
* @param requestBody CreateDonor
|
||||
* @result ResponseDonor
|
||||
* @throws ApiError
|
||||
*/
|
||||
static donorControllerPost(requestBody?: CreateDonor): Promise<ResponseDonor>;
|
||||
/**
|
||||
* Get one
|
||||
* Lists all information about the donor whose id got provided. <br> This includes the donor's current donation amount.
|
||||
* @param id
|
||||
* @result ResponseDonor
|
||||
* @throws ApiError
|
||||
*/
|
||||
static donorControllerGetOne(id: number): Promise<ResponseDonor>;
|
||||
/**
|
||||
* Put
|
||||
* Update the donor whose id you provided. <br> Please remember that ids can't be changed.
|
||||
* @param id
|
||||
* @param requestBody UpdateDonor
|
||||
* @result ResponseDonor
|
||||
* @throws ApiError
|
||||
*/
|
||||
static donorControllerPut(id: number, requestBody?: UpdateDonor): Promise<ResponseDonor>;
|
||||
/**
|
||||
* Remove
|
||||
* Delete the donor whose id you provided. <br> If no donor with this id exists it will just return 204(no content). <br> If the donor still has donations associated this will fail, please provide the query param ?force=true to delete the donor with all associated donations.
|
||||
* @param id
|
||||
* @param force
|
||||
* @result ResponseDonor
|
||||
* @result ResponseEmpty
|
||||
* @throws ApiError
|
||||
*/
|
||||
static donorControllerRemove(id: number, force?: boolean): Promise<ResponseDonor | ResponseEmpty>;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
node_version: ['10', '12', '14']
|
||||
os: [ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node_version }}
|
||||
|
||||
- name: npm install, build and test
|
||||
run: |
|
||||
npm install
|
||||
npm run build --if-present
|
||||
npm test
|
||||
@@ -0,0 +1,23 @@
|
||||
var path = require('path');
|
||||
var test = require('tape');
|
||||
var resolve = require('../');
|
||||
|
||||
test('precedence', function (t) {
|
||||
t.plan(3);
|
||||
var dir = path.join(__dirname, 'precedence/aaa');
|
||||
|
||||
resolve('./', { basedir: dir }, function (err, res, pkg) {
|
||||
t.ifError(err);
|
||||
t.equal(res, path.join(dir, 'index.js'));
|
||||
t.equal(pkg.name, 'resolve');
|
||||
});
|
||||
});
|
||||
|
||||
test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string
|
||||
t.plan(1);
|
||||
var dir = path.join(__dirname, 'precedence/bbb');
|
||||
|
||||
resolve('./', { basedir: dir }, function (err, res, pkg) {
|
||||
t.ok(err);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
# RegExp
|
||||
|
||||
_RegExp_ instance
|
||||
|
||||
## `reg-exp/is`
|
||||
|
||||
Confirms if given object is a native regular expression object
|
||||
|
||||
```javascript
|
||||
const isRegExp = require("type/reg-exp/is");
|
||||
|
||||
isRegExp(/foo/);
|
||||
isRegExp({}); // false
|
||||
isRegExp("foo"); // false
|
||||
```
|
||||
|
||||
## `reg-exp/ensure`
|
||||
|
||||
If given argument is a regular expression object, it is returned back. Otherwise `TypeError` is thrown.
|
||||
|
||||
```javascript
|
||||
const ensureRegExp = require("type/reg-exp/ensure");
|
||||
|
||||
ensureRegExp(/foo/); // /foo/
|
||||
ensureRegExp("foo"); // Thrown TypeError: null is not a regular expression object
|
||||
```
|
||||
@@ -0,0 +1,82 @@
|
||||
3.0.2 / 2018-07-11
|
||||
==================
|
||||
|
||||
* Upgrade pac-proxy-agent to 3.x
|
||||
|
||||
3.0.1 / 2018-07-11
|
||||
==================
|
||||
|
||||
* Upgrade socks-proxy-agent to 4.x
|
||||
|
||||
3.0.0 / 2018-04-12
|
||||
==================
|
||||
|
||||
* Drop support for node <= 6
|
||||
|
||||
2.3.1 / 2018-04-12
|
||||
==================
|
||||
|
||||
* Revert socks-proxy-agent to 3.x to maintain compatibility with node 4.x
|
||||
|
||||
2.2.0 / 2018-01-15
|
||||
==================
|
||||
|
||||
* Add `auth` to proxyUri
|
||||
* Upgrade to "agent-base" v4.2.0
|
||||
* Use `Object.keys()` to determine the supported proxies
|
||||
* Remove `extend` dependency
|
||||
* Update dependencies
|
||||
|
||||
2.1.0 / 2017-07-20
|
||||
==================
|
||||
|
||||
* add `use strict`
|
||||
* drop "string" from error message
|
||||
* update pac-proxy-agent package
|
||||
* test modern Node.js versions with Travis-CI, drop older versions
|
||||
|
||||
2.0.0 / 2015-07-15
|
||||
==================
|
||||
|
||||
* package: add test case dev dependencies
|
||||
* test: don't use `url.parse()` for one of the tests
|
||||
* test: introduce some real test cases
|
||||
* README: document new, simpler API
|
||||
* refactor to inherit from "agent-base"
|
||||
|
||||
1.1.1 / 2015-07-01
|
||||
==================
|
||||
|
||||
* package: remove "superagent" dev dep (not used)
|
||||
* use new socks-proxy-agent (#6, @MatthewMueller)
|
||||
* README: use SVG for Travis-CI badge
|
||||
* add more proxy types for socks proxy (#5, @andyhu)
|
||||
* index: fix passing the `secure` flag to PacProxyAgent
|
||||
|
||||
1.1.0 / 2014-01-12
|
||||
==================
|
||||
|
||||
* gitignore: ignore development test files
|
||||
* index: use "pac-proxy-agent" for "pac+*" proxy URLs
|
||||
* package: update "lru-cache" to v2.5.0
|
||||
|
||||
1.0.0 / 2013-11-21
|
||||
==================
|
||||
|
||||
* add .travis.yml file
|
||||
* test: add initial tests
|
||||
* test: add a test for unsupported protocols
|
||||
* index: extract the `types` array logic into a function
|
||||
* index: throw a TypeError if no "uri" is passed in
|
||||
* index: use Object.create(null) for the proxies dict
|
||||
* package: add "socks" as a keyword
|
||||
|
||||
0.0.2 / 2013-11-20
|
||||
==================
|
||||
|
||||
* index: walk up the prototype chain to get the proxy types
|
||||
|
||||
0.0.1 / 2013-11-20
|
||||
==================
|
||||
|
||||
* intial release
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/webSocket/index.ts"],"names":[],"mappings":";;;AAAA,kEAA8E;AAArE,sGAAA,SAAS,OAAa;AAC/B,gFAAuG;AAA9F,oHAAA,gBAAgB,OAAA"}
|
||||
@@ -0,0 +1,663 @@
|
||||
import type {LiteralUnion} from './literal-union';
|
||||
|
||||
declare namespace PackageJson {
|
||||
/**
|
||||
A person who has been involved in creating or maintaining the package.
|
||||
*/
|
||||
export type Person =
|
||||
| string
|
||||
| {
|
||||
name: string;
|
||||
url?: string;
|
||||
email?: string;
|
||||
};
|
||||
|
||||
export type BugsLocation =
|
||||
| string
|
||||
| {
|
||||
/**
|
||||
The URL to the package's issue tracker.
|
||||
*/
|
||||
url?: string;
|
||||
|
||||
/**
|
||||
The email address to which issues should be reported.
|
||||
*/
|
||||
email?: string;
|
||||
};
|
||||
|
||||
export interface DirectoryLocations {
|
||||
[directoryType: string]: unknown;
|
||||
|
||||
/**
|
||||
Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder.
|
||||
*/
|
||||
bin?: string;
|
||||
|
||||
/**
|
||||
Location for Markdown files.
|
||||
*/
|
||||
doc?: string;
|
||||
|
||||
/**
|
||||
Location for example scripts.
|
||||
*/
|
||||
example?: string;
|
||||
|
||||
/**
|
||||
Location for the bulk of the library.
|
||||
*/
|
||||
lib?: string;
|
||||
|
||||
/**
|
||||
Location for man pages. Sugar to generate a `man` array by walking the folder.
|
||||
*/
|
||||
man?: string;
|
||||
|
||||
/**
|
||||
Location for test files.
|
||||
*/
|
||||
test?: string;
|
||||
}
|
||||
|
||||
export type Scripts = {
|
||||
/**
|
||||
Run **before** the package is published (Also run on local `npm install` without any arguments).
|
||||
*/
|
||||
prepublish?: string;
|
||||
|
||||
/**
|
||||
Run both **before** the package is packed and published, and on local `npm install` without any arguments. This is run **after** `prepublish`, but **before** `prepublishOnly`.
|
||||
*/
|
||||
prepare?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is prepared and packed, **only** on `npm publish`.
|
||||
*/
|
||||
prepublishOnly?: string;
|
||||
|
||||
/**
|
||||
Run **before** a tarball is packed (on `npm pack`, `npm publish`, and when installing git dependencies).
|
||||
*/
|
||||
prepack?: string;
|
||||
|
||||
/**
|
||||
Run **after** the tarball has been generated and moved to its final destination.
|
||||
*/
|
||||
postpack?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is published.
|
||||
*/
|
||||
publish?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is published.
|
||||
*/
|
||||
postpublish?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is installed.
|
||||
*/
|
||||
preinstall?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is installed.
|
||||
*/
|
||||
install?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is installed and after `install`.
|
||||
*/
|
||||
postinstall?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is uninstalled and before `uninstall`.
|
||||
*/
|
||||
preuninstall?: string;
|
||||
|
||||
/**
|
||||
Run **before** the package is uninstalled.
|
||||
*/
|
||||
uninstall?: string;
|
||||
|
||||
/**
|
||||
Run **after** the package is uninstalled.
|
||||
*/
|
||||
postuninstall?: string;
|
||||
|
||||
/**
|
||||
Run **before** bump the package version and before `version`.
|
||||
*/
|
||||
preversion?: string;
|
||||
|
||||
/**
|
||||
Run **before** bump the package version.
|
||||
*/
|
||||
version?: string;
|
||||
|
||||
/**
|
||||
Run **after** bump the package version.
|
||||
*/
|
||||
postversion?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm test` command, before `test`.
|
||||
*/
|
||||
pretest?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm test` command.
|
||||
*/
|
||||
test?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm test` command, after `test`.
|
||||
*/
|
||||
posttest?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm stop` command, before `stop`.
|
||||
*/
|
||||
prestop?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm stop` command.
|
||||
*/
|
||||
stop?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm stop` command, after `stop`.
|
||||
*/
|
||||
poststop?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm start` command, before `start`.
|
||||
*/
|
||||
prestart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm start` command.
|
||||
*/
|
||||
start?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm start` command, after `start`.
|
||||
*/
|
||||
poststart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm restart` command, before `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
||||
*/
|
||||
prerestart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm restart` command. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
||||
*/
|
||||
restart?: string;
|
||||
|
||||
/**
|
||||
Run with the `npm restart` command, after `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
|
||||
*/
|
||||
postrestart?: string;
|
||||
} & Partial<Record<string, string>>;
|
||||
|
||||
/**
|
||||
Dependencies of the package. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or Git URL.
|
||||
*/
|
||||
export type Dependency = Partial<Record<string, string>>;
|
||||
|
||||
/**
|
||||
Conditions which provide a way to resolve a package entry point based on the environment.
|
||||
*/
|
||||
export type ExportCondition = LiteralUnion<
|
||||
| 'import'
|
||||
| 'require'
|
||||
| 'node'
|
||||
| 'node-addons'
|
||||
| 'deno'
|
||||
| 'browser'
|
||||
| 'electron'
|
||||
| 'react-native'
|
||||
| 'default',
|
||||
string
|
||||
>;
|
||||
|
||||
type ExportConditions = {[condition in ExportCondition]: Exports};
|
||||
|
||||
/**
|
||||
Entry points of a module, optionally with conditions and subpath exports.
|
||||
*/
|
||||
export type Exports =
|
||||
| null
|
||||
| string
|
||||
| Array<string | ExportConditions>
|
||||
| ExportConditions
|
||||
| {[path: string]: Exports}; // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
||||
|
||||
/**
|
||||
Import map entries of a module, optionally with conditions.
|
||||
*/
|
||||
export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
|
||||
[key: string]: string | {[key in ExportCondition]: Exports};
|
||||
};
|
||||
|
||||
export interface NonStandardEntryPoints {
|
||||
/**
|
||||
An ECMAScript module ID that is the primary entry point to the program.
|
||||
*/
|
||||
module?: string;
|
||||
|
||||
/**
|
||||
A module ID with untranspiled code that is the primary entry point to the program.
|
||||
*/
|
||||
esnext?:
|
||||
| string
|
||||
| {
|
||||
[moduleName: string]: string | undefined;
|
||||
main?: string;
|
||||
browser?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
A hint to JavaScript bundlers or component tools when packaging modules for client side use.
|
||||
*/
|
||||
browser?:
|
||||
| string
|
||||
| Partial<Record<string, string | false>>;
|
||||
|
||||
/**
|
||||
Denote which files in your project are "pure" and therefore safe for Webpack to prune if unused.
|
||||
|
||||
[Read more.](https://webpack.js.org/guides/tree-shaking/)
|
||||
*/
|
||||
sideEffects?: boolean | string[];
|
||||
}
|
||||
|
||||
export interface TypeScriptConfiguration {
|
||||
/**
|
||||
Location of the bundled TypeScript declaration file.
|
||||
*/
|
||||
types?: string;
|
||||
|
||||
/**
|
||||
Version selection map of TypeScript.
|
||||
*/
|
||||
typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;
|
||||
|
||||
/**
|
||||
Location of the bundled TypeScript declaration file. Alias of `types`.
|
||||
*/
|
||||
typings?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
An alternative configuration for Yarn workspaces.
|
||||
*/
|
||||
export interface WorkspaceConfig {
|
||||
/**
|
||||
An array of workspace pattern strings which contain the workspace packages.
|
||||
*/
|
||||
packages?: WorkspacePattern[];
|
||||
|
||||
/**
|
||||
Designed to solve the problem of packages which break when their `node_modules` are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via `node_modules`, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.
|
||||
|
||||
[Read more](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/)
|
||||
*/
|
||||
nohoist?: WorkspacePattern[];
|
||||
}
|
||||
|
||||
/**
|
||||
A workspace pattern points to a directory or group of directories which contain packages that should be included in the workspace installation process.
|
||||
|
||||
The patterns are handled with [minimatch](https://github.com/isaacs/minimatch).
|
||||
|
||||
@example
|
||||
`docs` → Include the docs directory and install its dependencies.
|
||||
`packages/*` → Include all nested directories within the packages directory, like `packages/cli` and `packages/core`.
|
||||
*/
|
||||
type WorkspacePattern = string;
|
||||
|
||||
export interface YarnConfiguration {
|
||||
/**
|
||||
Used to configure [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
|
||||
|
||||
Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run `yarn install` once to install all of them in a single pass.
|
||||
|
||||
Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
|
||||
*/
|
||||
workspaces?: WorkspacePattern[] | WorkspaceConfig;
|
||||
|
||||
/**
|
||||
If your package only allows one version of a given dependency, and you’d like to enforce the same behavior as `yarn install --flat` on the command-line, set this to `true`.
|
||||
|
||||
Note that if your `package.json` contains `"flat": true` and other packages depend on yours (e.g. you are building a library rather than an app), those other packages will also need `"flat": true` in their `package.json` or be installed with `yarn install --flat` on the command-line.
|
||||
*/
|
||||
flat?: boolean;
|
||||
|
||||
/**
|
||||
Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the `yarn.lock` file.
|
||||
*/
|
||||
resolutions?: Dependency;
|
||||
}
|
||||
|
||||
export interface JSPMConfiguration {
|
||||
/**
|
||||
JSPM configuration.
|
||||
*/
|
||||
jspm?: PackageJson;
|
||||
}
|
||||
|
||||
/**
|
||||
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Containing standard npm properties.
|
||||
*/
|
||||
export interface PackageJsonStandard {
|
||||
/**
|
||||
The name of the package.
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
/**
|
||||
Package version, parseable by [`node-semver`](https://github.com/npm/node-semver).
|
||||
*/
|
||||
version?: string;
|
||||
|
||||
/**
|
||||
Package description, listed in `npm search`.
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
Keywords associated with package, listed in `npm search`.
|
||||
*/
|
||||
keywords?: string[];
|
||||
|
||||
/**
|
||||
The URL to the package's homepage.
|
||||
*/
|
||||
homepage?: LiteralUnion<'.', string>;
|
||||
|
||||
/**
|
||||
The URL to the package's issue tracker and/or the email address to which issues should be reported.
|
||||
*/
|
||||
bugs?: BugsLocation;
|
||||
|
||||
/**
|
||||
The license for the package.
|
||||
*/
|
||||
license?: string;
|
||||
|
||||
/**
|
||||
The licenses for the package.
|
||||
*/
|
||||
licenses?: Array<{
|
||||
type?: string;
|
||||
url?: string;
|
||||
}>;
|
||||
|
||||
author?: Person;
|
||||
|
||||
/**
|
||||
A list of people who contributed to the package.
|
||||
*/
|
||||
contributors?: Person[];
|
||||
|
||||
/**
|
||||
A list of people who maintain the package.
|
||||
*/
|
||||
maintainers?: Person[];
|
||||
|
||||
/**
|
||||
The files included in the package.
|
||||
*/
|
||||
files?: string[];
|
||||
|
||||
/**
|
||||
Resolution algorithm for importing ".js" files from the package's scope.
|
||||
|
||||
[Read more.](https://nodejs.org/api/esm.html#esm_package_json_type_field)
|
||||
*/
|
||||
type?: 'module' | 'commonjs';
|
||||
|
||||
/**
|
||||
The module ID that is the primary entry point to the program.
|
||||
*/
|
||||
main?: string;
|
||||
|
||||
/**
|
||||
Subpath exports to define entry points of the package.
|
||||
|
||||
[Read more.](https://nodejs.org/api/packages.html#subpath-exports)
|
||||
*/
|
||||
exports?: Exports;
|
||||
|
||||
/**
|
||||
Subpath imports to define internal package import maps that only apply to import specifiers from within the package itself.
|
||||
|
||||
[Read more.](https://nodejs.org/api/packages.html#subpath-imports)
|
||||
*/
|
||||
imports?: Imports;
|
||||
|
||||
/**
|
||||
The executable files that should be installed into the `PATH`.
|
||||
*/
|
||||
bin?:
|
||||
| string
|
||||
| Partial<Record<string, string>>;
|
||||
|
||||
/**
|
||||
Filenames to put in place for the `man` program to find.
|
||||
*/
|
||||
man?: string | string[];
|
||||
|
||||
/**
|
||||
Indicates the structure of the package.
|
||||
*/
|
||||
directories?: DirectoryLocations;
|
||||
|
||||
/**
|
||||
Location for the code repository.
|
||||
*/
|
||||
repository?:
|
||||
| string
|
||||
| {
|
||||
type: string;
|
||||
url: string;
|
||||
|
||||
/**
|
||||
Relative path to package.json if it is placed in non-root directory (for example if it is part of a monorepo).
|
||||
|
||||
[Read more.](https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md)
|
||||
*/
|
||||
directory?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
Script commands that are run at various times in the lifecycle of the package. The key is the lifecycle event, and the value is the command to run at that point.
|
||||
*/
|
||||
scripts?: Scripts;
|
||||
|
||||
/**
|
||||
Is used to set configuration parameters used in package scripts that persist across upgrades.
|
||||
*/
|
||||
config?: Record<string, unknown>;
|
||||
|
||||
/**
|
||||
The dependencies of the package.
|
||||
*/
|
||||
dependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Additional tooling dependencies that are not required for the package to work. Usually test, build, or documentation tooling.
|
||||
*/
|
||||
devDependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Dependencies that are skipped if they fail to install.
|
||||
*/
|
||||
optionalDependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Dependencies that will usually be required by the package user directly or via another dependency.
|
||||
*/
|
||||
peerDependencies?: Dependency;
|
||||
|
||||
/**
|
||||
Indicate peer dependencies that are optional.
|
||||
*/
|
||||
peerDependenciesMeta?: Partial<Record<string, {optional: true}>>;
|
||||
|
||||
/**
|
||||
Package names that are bundled when the package is published.
|
||||
*/
|
||||
bundledDependencies?: string[];
|
||||
|
||||
/**
|
||||
Alias of `bundledDependencies`.
|
||||
*/
|
||||
bundleDependencies?: string[];
|
||||
|
||||
/**
|
||||
Engines that this package runs on.
|
||||
*/
|
||||
engines?: {
|
||||
[EngineName in 'npm' | 'node' | string]?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
@deprecated
|
||||
*/
|
||||
engineStrict?: boolean;
|
||||
|
||||
/**
|
||||
Operating systems the module runs on.
|
||||
*/
|
||||
os?: Array<LiteralUnion<
|
||||
| 'aix'
|
||||
| 'darwin'
|
||||
| 'freebsd'
|
||||
| 'linux'
|
||||
| 'openbsd'
|
||||
| 'sunos'
|
||||
| 'win32'
|
||||
| '!aix'
|
||||
| '!darwin'
|
||||
| '!freebsd'
|
||||
| '!linux'
|
||||
| '!openbsd'
|
||||
| '!sunos'
|
||||
| '!win32',
|
||||
string
|
||||
>>;
|
||||
|
||||
/**
|
||||
CPU architectures the module runs on.
|
||||
*/
|
||||
cpu?: Array<LiteralUnion<
|
||||
| 'arm'
|
||||
| 'arm64'
|
||||
| 'ia32'
|
||||
| 'mips'
|
||||
| 'mipsel'
|
||||
| 'ppc'
|
||||
| 'ppc64'
|
||||
| 's390'
|
||||
| 's390x'
|
||||
| 'x32'
|
||||
| 'x64'
|
||||
| '!arm'
|
||||
| '!arm64'
|
||||
| '!ia32'
|
||||
| '!mips'
|
||||
| '!mipsel'
|
||||
| '!ppc'
|
||||
| '!ppc64'
|
||||
| '!s390'
|
||||
| '!s390x'
|
||||
| '!x32'
|
||||
| '!x64',
|
||||
string
|
||||
>>;
|
||||
|
||||
/**
|
||||
If set to `true`, a warning will be shown if package is installed locally. Useful if the package is primarily a command-line application that should be installed globally.
|
||||
|
||||
@deprecated
|
||||
*/
|
||||
preferGlobal?: boolean;
|
||||
|
||||
/**
|
||||
If set to `true`, then npm will refuse to publish it.
|
||||
*/
|
||||
private?: boolean;
|
||||
|
||||
/**
|
||||
A set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default.
|
||||
*/
|
||||
publishConfig?: PublishConfig;
|
||||
|
||||
/**
|
||||
Describes and notifies consumers of a package's monetary support information.
|
||||
|
||||
[Read more.](https://github.com/npm/rfcs/blob/latest/accepted/0017-add-funding-support.md)
|
||||
*/
|
||||
funding?: string | {
|
||||
/**
|
||||
The type of funding.
|
||||
*/
|
||||
type?: LiteralUnion<
|
||||
| 'github'
|
||||
| 'opencollective'
|
||||
| 'patreon'
|
||||
| 'individual'
|
||||
| 'foundation'
|
||||
| 'corporation',
|
||||
string
|
||||
>;
|
||||
|
||||
/**
|
||||
The URL to the funding page.
|
||||
*/
|
||||
url: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PublishConfig {
|
||||
/**
|
||||
Additional, less common properties from the [npm docs on `publishConfig`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig).
|
||||
*/
|
||||
[additionalProperties: string]: unknown;
|
||||
|
||||
/**
|
||||
When publishing scoped packages, the access level defaults to restricted. If you want your scoped package to be publicly viewable (and installable) set `--access=public`. The only valid values for access are public and restricted. Unscoped packages always have an access level of public.
|
||||
*/
|
||||
access?: 'public' | 'restricted';
|
||||
|
||||
/**
|
||||
The base URL of the npm registry.
|
||||
|
||||
Default: `'https://registry.npmjs.org/'`
|
||||
*/
|
||||
registry?: string;
|
||||
|
||||
/**
|
||||
The tag to publish the package under.
|
||||
|
||||
Default: `'latest'`
|
||||
*/
|
||||
tag?: string;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Also includes types for fields used by other popular projects, like TypeScript and Yarn.
|
||||
|
||||
@category File
|
||||
*/
|
||||
export type PackageJson =
|
||||
PackageJson.PackageJsonStandard &
|
||||
PackageJson.NonStandardEntryPoints &
|
||||
PackageJson.TypeScriptConfiguration &
|
||||
PackageJson.YarnConfiguration &
|
||||
PackageJson.JSPMConfiguration;
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"Commands:": "Commando's:",
|
||||
"Options:": "Opties:",
|
||||
"Examples:": "Voorbeelden:",
|
||||
"boolean": "booleaans",
|
||||
"count": "aantal",
|
||||
"string": "string",
|
||||
"number": "getal",
|
||||
"array": "lijst",
|
||||
"required": "verplicht",
|
||||
"default": "standaard",
|
||||
"default:": "standaard:",
|
||||
"choices:": "keuzes:",
|
||||
"aliases:": "aliassen:",
|
||||
"generated-value": "gegenereerde waarde",
|
||||
"Not enough non-option arguments: got %s, need at least %s": {
|
||||
"one": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig",
|
||||
"other": "Niet genoeg niet-optie-argumenten: %s gekregen, minstens %s nodig"
|
||||
},
|
||||
"Too many non-option arguments: got %s, maximum of %s": {
|
||||
"one": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s",
|
||||
"other": "Te veel niet-optie-argumenten: %s gekregen, maximum is %s"
|
||||
},
|
||||
"Missing argument value: %s": {
|
||||
"one": "Missende argumentwaarde: %s",
|
||||
"other": "Missende argumentwaarden: %s"
|
||||
},
|
||||
"Missing required argument: %s": {
|
||||
"one": "Missend verplicht argument: %s",
|
||||
"other": "Missende verplichte argumenten: %s"
|
||||
},
|
||||
"Unknown argument: %s": {
|
||||
"one": "Onbekend argument: %s",
|
||||
"other": "Onbekende argumenten: %s"
|
||||
},
|
||||
"Invalid values:": "Ongeldige waarden:",
|
||||
"Argument: %s, Given: %s, Choices: %s": "Argument: %s, Gegeven: %s, Keuzes: %s",
|
||||
"Argument check failed: %s": "Argumentcontrole mislukt: %s",
|
||||
"Implications failed:": "Ontbrekende afhankelijke argumenten:",
|
||||
"Not enough arguments following: %s": "Niet genoeg argumenten na: %s",
|
||||
"Invalid JSON config file: %s": "Ongeldig JSON-config-bestand: %s",
|
||||
"Path to JSON config file": "Pad naar JSON-config-bestand",
|
||||
"Show help": "Toon help",
|
||||
"Show version number": "Toon versienummer",
|
||||
"Did you mean %s?": "Bedoelde u misschien %s?",
|
||||
"Arguments %s and %s are mutually exclusive": "Argumenten %s en %s kunnen niet tegelijk gebruikt worden",
|
||||
"Positionals:": "Positie-afhankelijke argumenten",
|
||||
"command": "commando"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('findIndexFrom', require('../findIndex'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,112 @@
|
||||
'use strict';
|
||||
var util = require('util'),
|
||||
Match = require ('../match');
|
||||
|
||||
/**
|
||||
* This class matches UTF-16 and UTF-32, both big- and little-endian. The
|
||||
* BOM will be used if it is present.
|
||||
*/
|
||||
module.exports.UTF_16BE = function() {
|
||||
this.name = function() {
|
||||
return 'UTF-16BE';
|
||||
};
|
||||
this.match = function(det) {
|
||||
var input = det.fRawInput;
|
||||
|
||||
if (input.length >= 2 && ((input[0] & 0xff) == 0xfe && (input[1] & 0xff) == 0xff)) {
|
||||
return new Match(det, this, 100); // confidence = 100
|
||||
}
|
||||
|
||||
// TODO: Do some statistics to check for unsigned UTF-16BE
|
||||
return null;
|
||||
};
|
||||
};
|
||||
|
||||
module.exports.UTF_16LE = function() {
|
||||
this.name = function() {
|
||||
return 'UTF-16LE';
|
||||
};
|
||||
this.match = function(det) {
|
||||
var input = det.fRawInput;
|
||||
|
||||
if (input.length >= 2 && ((input[0] & 0xff) == 0xff && (input[1] & 0xff) == 0xfe)) {
|
||||
// LE BOM is present.
|
||||
if (input.length >= 4 && input[2] == 0x00 && input[3] == 0x00) {
|
||||
// It is probably UTF-32 LE, not UTF-16
|
||||
return null;
|
||||
}
|
||||
return new Match(det, this, 100); // confidence = 100
|
||||
}
|
||||
|
||||
// TODO: Do some statistics to check for unsigned UTF-16LE
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
function UTF_32() {};
|
||||
UTF_32.prototype.match = function(det) {
|
||||
var input = det.fRawInput,
|
||||
limit = (det.fRawLength / 4) * 4,
|
||||
numValid = 0,
|
||||
numInvalid = 0,
|
||||
hasBOM = false,
|
||||
confidence = 0;
|
||||
|
||||
if (limit == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (this.getChar(input, 0) == 0x0000FEFF) {
|
||||
hasBOM = true;
|
||||
}
|
||||
|
||||
for (var i = 0; i < limit; i += 4) {
|
||||
var ch = this.getChar(input, i);
|
||||
|
||||
if (ch < 0 || ch >= 0x10FFFF || (ch >= 0xD800 && ch <= 0xDFFF)) {
|
||||
numInvalid += 1;
|
||||
} else {
|
||||
numValid += 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Cook up some sort of confidence score, based on presence of a BOM
|
||||
// and the existence of valid and/or invalid multi-byte sequences.
|
||||
if (hasBOM && numInvalid == 0) {
|
||||
confidence = 100;
|
||||
} else if (hasBOM && numValid > numInvalid * 10) {
|
||||
confidence = 80;
|
||||
} else if (numValid > 3 && numInvalid == 0) {
|
||||
confidence = 100;
|
||||
} else if (numValid > 0 && numInvalid == 0) {
|
||||
confidence = 80;
|
||||
} else if (numValid > numInvalid * 10) {
|
||||
// Probably corrupt UTF-32BE data. Valid sequences aren't likely by chance.
|
||||
confidence = 25;
|
||||
}
|
||||
|
||||
// return confidence == 0 ? null : new CharsetMatch(det, this, confidence);
|
||||
return confidence == 0 ? null : new Match(det, this, confidence);
|
||||
};
|
||||
|
||||
module.exports.UTF_32BE = function() {
|
||||
this.name = function() {
|
||||
return 'UTF-32BE';
|
||||
};
|
||||
this.getChar = function(input, index) {
|
||||
return (input[index + 0] & 0xff) << 24 | (input[index + 1] & 0xff) << 16 |
|
||||
(input[index + 2] & 0xff) << 8 | (input[index + 3] & 0xff);
|
||||
};
|
||||
};
|
||||
util.inherits(module.exports.UTF_32BE, UTF_32);
|
||||
|
||||
module.exports.UTF_32LE = function() {
|
||||
this.name = function() {
|
||||
return 'UTF-32LE';
|
||||
};
|
||||
this.getChar = function(input, index) {
|
||||
return (input[index + 3] & 0xff) << 24 | (input[index + 2] & 0xff) << 16 |
|
||||
(input[index + 1] & 0xff) << 8 | (input[index + 0] & 0xff);
|
||||
};
|
||||
};
|
||||
util.inherits(module.exports.UTF_32LE, UTF_32);
|
||||
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
module.exports = function(Promise, INTERNAL) {
|
||||
var PromiseMap = Promise.map;
|
||||
|
||||
Promise.prototype.filter = function (fn, options) {
|
||||
return PromiseMap(this, fn, options, INTERNAL);
|
||||
};
|
||||
|
||||
Promise.filter = function (promises, fn, options) {
|
||||
return PromiseMap(promises, fn, options, INTERNAL);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
import { TemplateNode } from '../interfaces';
|
||||
import { INode } from '../compile/nodes/interfaces';
|
||||
export declare function extract_svelte_ignore(text: string): string[];
|
||||
export declare function extract_svelte_ignore_from_comments<Node extends {
|
||||
leadingComments?: Array<{
|
||||
value: string;
|
||||
}>;
|
||||
}>(node: Node): string[];
|
||||
export declare function extract_ignores_above_position(position: number, template_nodes: TemplateNode[]): string[];
|
||||
export declare function extract_ignores_above_node(node: INode): string[];
|
||||
@@ -0,0 +1,158 @@
|
||||
(function(window, document) {
|
||||
var KeyEvent = function(data, type) {
|
||||
this.keyCode = 'keyCode' in data ? data.keyCode : 0;
|
||||
this.charCode = 'charCode' in data ? data.charCode : 0;
|
||||
|
||||
var modifiers = 'modifiers' in data ? data.modifiers : [];
|
||||
|
||||
this.ctrlKey = false;
|
||||
this.metaKey = false;
|
||||
this.altKey = false;
|
||||
this.shiftKey = false;
|
||||
|
||||
for (var i = 0; i < modifiers.length; i++) {
|
||||
this[modifiers[i] + 'Key'] = true;
|
||||
}
|
||||
|
||||
this.type = type || 'keypress';
|
||||
};
|
||||
|
||||
KeyEvent.prototype.toNative = function() {
|
||||
var event = document.createEventObject ? document.createEventObject() : document.createEvent('Events');
|
||||
|
||||
if (event.initEvent) {
|
||||
event.initEvent(this.type, true, true);
|
||||
}
|
||||
|
||||
event.keyCode = this.keyCode;
|
||||
event.which = this.charCode || this.keyCode;
|
||||
event.shiftKey = this.shiftKey;
|
||||
event.metaKey = this.metaKey;
|
||||
event.altKey = this.altKey;
|
||||
event.ctrlKey = this.ctrlKey;
|
||||
|
||||
return event;
|
||||
};
|
||||
|
||||
KeyEvent.prototype.fire = function(element) {
|
||||
var event = this.toNative();
|
||||
if (element.dispatchEvent) {
|
||||
element.dispatchEvent(event);
|
||||
return;
|
||||
}
|
||||
|
||||
element.fireEvent('on' + this.type, event);
|
||||
};
|
||||
|
||||
// simulates complete key event as if the user pressed the key in the browser
|
||||
// triggers a keydown, then a keypress, then a keyup
|
||||
KeyEvent.simulate = function(charCode, keyCode, modifiers, element, repeat, options) {
|
||||
if (modifiers === undefined) {
|
||||
modifiers = [];
|
||||
}
|
||||
|
||||
if (element === undefined) {
|
||||
element = document;
|
||||
}
|
||||
|
||||
if (repeat === undefined) {
|
||||
repeat = 1;
|
||||
}
|
||||
|
||||
if (options === undefined) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
// Re-target the element so that `event.target` becomes the shadow host. See:
|
||||
// https://developers.google.com/web/fundamentals/web-components/shadowdom#events
|
||||
// This is a bit of a lie because true events would re-target the event target both for
|
||||
// closed and open shadow trees. `KeyEvent` is not a true event and will fire the event
|
||||
// directly from the shadow host for closed shadow trees. For open trees, this would make
|
||||
// the tests fail as the actual event that will be eventually dispatched would have an
|
||||
// incorrect `Event.composedPath()` starting with the shadow host instead of the
|
||||
// initial event target.
|
||||
if (options.shadowHost && options.shadowHost.shadowRoot === null) {
|
||||
// closed shadow dom
|
||||
element = options.shadowHost;
|
||||
}
|
||||
|
||||
var modifierToKeyCode = {
|
||||
'shift': 16,
|
||||
'ctrl': 17,
|
||||
'alt': 18,
|
||||
'meta': 91
|
||||
};
|
||||
|
||||
// if the key is a modifier then take it out of the regular
|
||||
// keypress/keydown
|
||||
if (keyCode == 16 || keyCode == 17 || keyCode == 18 || keyCode == 91) {
|
||||
repeat = 0;
|
||||
}
|
||||
|
||||
var modifiersToInclude = [];
|
||||
var keyEvents = [];
|
||||
|
||||
// modifiers would go down first
|
||||
for (var i = 0; i < modifiers.length; i++) {
|
||||
modifiersToInclude.push(modifiers[i]);
|
||||
keyEvents.push(new KeyEvent({
|
||||
charCode: 0,
|
||||
keyCode: modifierToKeyCode[modifiers[i]],
|
||||
modifiers: modifiersToInclude
|
||||
}, 'keydown'));
|
||||
}
|
||||
|
||||
// @todo factor in duration for these
|
||||
while (repeat > 0) {
|
||||
keyEvents.push(new KeyEvent({
|
||||
charCode: 0,
|
||||
keyCode: keyCode,
|
||||
modifiers: modifiersToInclude
|
||||
}, 'keydown'));
|
||||
|
||||
keyEvents.push(new KeyEvent({
|
||||
charCode: charCode,
|
||||
keyCode: charCode,
|
||||
modifiers: modifiersToInclude
|
||||
}, 'keypress'));
|
||||
|
||||
repeat--;
|
||||
}
|
||||
|
||||
keyEvents.push(new KeyEvent({
|
||||
charCode: 0,
|
||||
keyCode: keyCode,
|
||||
modifiers: modifiersToInclude
|
||||
}, 'keyup'));
|
||||
|
||||
// now lift up the modifier keys
|
||||
for (i = 0; i < modifiersToInclude.length; i++) {
|
||||
var modifierKeyCode = modifierToKeyCode[modifiersToInclude[i]];
|
||||
modifiersToInclude.splice(i, 1);
|
||||
keyEvents.push(new KeyEvent({
|
||||
charCode: 0,
|
||||
keyCode: modifierKeyCode,
|
||||
modifiers: modifiersToInclude
|
||||
}, 'keyup'));
|
||||
}
|
||||
|
||||
for (i = 0; i < keyEvents.length; i++) {
|
||||
// console.log('firing', keyEvents[i].type, keyEvents[i].keyCode, keyEvents[i].charCode);
|
||||
keyEvents[i].fire(element);
|
||||
}
|
||||
};
|
||||
|
||||
window.KeyEvent = KeyEvent;
|
||||
|
||||
// expose as a common js module
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = KeyEvent;
|
||||
}
|
||||
|
||||
// expose KeyEvent as an AMD module
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(function() {
|
||||
return KeyEvent;
|
||||
});
|
||||
}
|
||||
}) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null);
|
||||
@@ -0,0 +1,272 @@
|
||||
import path from 'node:path';
|
||||
import semver from 'semver';
|
||||
import urlJoin from 'url-join';
|
||||
import Plugin from '../Plugin.js';
|
||||
import { hasAccess, rejectAfter, parseVersion, readJSON, e } from '../../util.js';
|
||||
import prompts from './prompts.js';
|
||||
|
||||
const docs = 'https://git.io/release-it-npm';
|
||||
|
||||
const options = { write: false };
|
||||
|
||||
const MANIFEST_PATH = './package.json';
|
||||
const DEFAULT_TAG = 'latest';
|
||||
const DEFAULT_TAG_PRERELEASE = 'next';
|
||||
const NPM_BASE_URL = 'https://www.npmjs.com';
|
||||
|
||||
const fixArgs = args => (args ? (typeof args === 'string' ? args.split(' ') : args) : []);
|
||||
|
||||
class npm extends Plugin {
|
||||
static isEnabled(options) {
|
||||
return hasAccess(MANIFEST_PATH) && options !== false;
|
||||
}
|
||||
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.registerPrompts(prompts);
|
||||
}
|
||||
|
||||
async init() {
|
||||
const { name, version: latestVersion, private: isPrivate, publishConfig } = readJSON(path.resolve(MANIFEST_PATH));
|
||||
this.setContext({ name, latestVersion, private: isPrivate, publishConfig });
|
||||
this.config.setContext({ npm: { name } });
|
||||
|
||||
const { publish, skipChecks } = this.options;
|
||||
|
||||
const timeout = Number(this.options.timeout) * 1000;
|
||||
|
||||
if (publish === false || isPrivate) return;
|
||||
|
||||
if (skipChecks) return;
|
||||
|
||||
const validations = Promise.all([this.isRegistryUp(), this.isAuthenticated(), this.getLatestRegistryVersion()]);
|
||||
|
||||
await Promise.race([validations, rejectAfter(timeout, e(`Timed out after ${timeout}ms.`, docs))]);
|
||||
|
||||
const [isRegistryUp, isAuthenticated, latestVersionInRegistry] = await validations;
|
||||
|
||||
if (!isRegistryUp) {
|
||||
throw e(`Unable to reach npm registry (timed out after ${timeout}ms).`, docs);
|
||||
}
|
||||
|
||||
if (!isAuthenticated) {
|
||||
throw e('Not authenticated with npm. Please `npm login` and try again.', docs);
|
||||
}
|
||||
|
||||
if (!(await this.isCollaborator())) {
|
||||
const { username } = this.getContext();
|
||||
throw e(`User ${username} is not a collaborator for ${name}.`, docs);
|
||||
}
|
||||
|
||||
if (!latestVersionInRegistry) {
|
||||
this.log.warn('No version found in npm registry. Assuming new package.');
|
||||
} else {
|
||||
if (!semver.eq(latestVersion, latestVersionInRegistry)) {
|
||||
this.log.warn(
|
||||
`Latest version in registry (${latestVersionInRegistry}) does not match package.json (${latestVersion}).`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getName() {
|
||||
return this.getContext('name');
|
||||
}
|
||||
|
||||
getLatestVersion() {
|
||||
return this.options.ignoreVersion ? null : this.getContext('latestVersion');
|
||||
}
|
||||
|
||||
async bump(version) {
|
||||
const tag = this.options.tag || (await this.resolveTag(version));
|
||||
this.setContext({ version, tag });
|
||||
|
||||
if (!this.config.isIncrement) return false;
|
||||
|
||||
const { versionArgs, allowSameVersion } = this.options;
|
||||
const args = [version, '--no-git-tag-version', allowSameVersion && '--allow-same-version', ...fixArgs(versionArgs)];
|
||||
const task = () => this.exec(`npm version ${args.filter(Boolean).join(' ')}`);
|
||||
return this.spinner.show({ task, label: 'npm version' });
|
||||
}
|
||||
|
||||
release() {
|
||||
if (this.options.publish === false) return false;
|
||||
if (this.getContext('private')) return false;
|
||||
const publish = () => this.publish({ otpCallback });
|
||||
const otpCallback =
|
||||
this.config.isCI && !this.config.isPromptOnlyVersion ? null : task => this.step({ prompt: 'otp', task });
|
||||
return this.step({ task: publish, label: 'npm publish', prompt: 'publish' });
|
||||
}
|
||||
|
||||
isRegistryUp() {
|
||||
const registry = this.getRegistry();
|
||||
const registryArg = registry ? ` --registry ${registry}` : '';
|
||||
return this.exec(`npm ping${registryArg}`, { options }).then(
|
||||
() => true,
|
||||
err => {
|
||||
if (/code E40[04]|404.*(ping not found|No content for path)/.test(err)) {
|
||||
this.log.warn('Ignoring response from unsupported `npm ping` command.');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
isAuthenticated() {
|
||||
const registry = this.getRegistry();
|
||||
const registryArg = registry ? ` --registry ${registry}` : '';
|
||||
return this.exec(`npm whoami${registryArg}`, { options }).then(
|
||||
output => {
|
||||
const username = output ? output.trim() : null;
|
||||
this.setContext({ username });
|
||||
return true;
|
||||
},
|
||||
err => {
|
||||
this.debug(err);
|
||||
if (/code E40[04]/.test(err)) {
|
||||
this.log.warn('Ignoring response from unsupported `npm whoami` command.');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async isCollaborator() {
|
||||
const registry = this.getRegistry();
|
||||
const registryArg = registry ? ` --registry ${registry}` : '';
|
||||
const name = this.getName();
|
||||
const { username } = this.getContext();
|
||||
if (username === undefined) return true;
|
||||
if (username === null) return false;
|
||||
|
||||
try {
|
||||
let npmVersion = await this.exec('npm --version', { options });
|
||||
|
||||
let accessCommand;
|
||||
if (semver.gt(npmVersion, '9.0.0')) {
|
||||
accessCommand = 'npm access list collaborators --json';
|
||||
} else {
|
||||
accessCommand = 'npm access ls-collaborators';
|
||||
}
|
||||
|
||||
const output = await this.exec(`${accessCommand} ${name}${registryArg}`, { options });
|
||||
|
||||
try {
|
||||
const collaborators = JSON.parse(output);
|
||||
const permissions = collaborators[username];
|
||||
return permissions && permissions.includes('write');
|
||||
} catch (err) {
|
||||
this.debug(err);
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
this.debug(err);
|
||||
if (/code E400/.test(err)) {
|
||||
this.log.warn('Ignoring response from unsupported `npm access` command.');
|
||||
} else {
|
||||
this.log.warn(`Unable to verify if user ${username} is a collaborator for ${name}.`);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
async getLatestRegistryVersion() {
|
||||
const registry = this.getRegistry();
|
||||
const registryArg = registry ? ` --registry ${registry}` : '';
|
||||
const name = this.getName();
|
||||
const latestVersion = this.getLatestVersion();
|
||||
const tag = await this.resolveTag(latestVersion);
|
||||
return this.exec(`npm show ${name}@${tag} version${registryArg}`, { options }).catch(() => null);
|
||||
}
|
||||
|
||||
getRegistryPreReleaseTags() {
|
||||
return this.exec(`npm view ${this.getName()} dist-tags --json`, { options }).then(
|
||||
output => {
|
||||
try {
|
||||
const tags = JSON.parse(output);
|
||||
return Object.keys(tags).filter(tag => tag !== DEFAULT_TAG);
|
||||
} catch (err) {
|
||||
this.debug(err);
|
||||
return [];
|
||||
}
|
||||
},
|
||||
() => []
|
||||
);
|
||||
}
|
||||
|
||||
getPackageUrl() {
|
||||
const baseUrl = this.getRegistry() || NPM_BASE_URL;
|
||||
return urlJoin(baseUrl, 'package', this.getName());
|
||||
}
|
||||
|
||||
getRegistry() {
|
||||
const { publishConfig } = this.getContext();
|
||||
const registries = publishConfig
|
||||
? publishConfig.registry
|
||||
? [publishConfig.registry]
|
||||
: Object.keys(publishConfig)
|
||||
.filter(key => key.endsWith('registry'))
|
||||
.map(key => publishConfig[key])
|
||||
: [];
|
||||
return registries[0];
|
||||
}
|
||||
|
||||
async guessPreReleaseTag() {
|
||||
const [tag] = await this.getRegistryPreReleaseTags();
|
||||
if (tag) {
|
||||
return tag;
|
||||
} else {
|
||||
this.log.warn(`Unable to get pre-release tag(s) from npm registry. Using "${DEFAULT_TAG_PRERELEASE}".`);
|
||||
return DEFAULT_TAG_PRERELEASE;
|
||||
}
|
||||
}
|
||||
|
||||
async resolveTag(version) {
|
||||
const { tag } = this.options;
|
||||
const { isPreRelease, preReleaseId } = parseVersion(version);
|
||||
if (!isPreRelease) {
|
||||
return DEFAULT_TAG;
|
||||
} else {
|
||||
return tag || preReleaseId || (await this.guessPreReleaseTag());
|
||||
}
|
||||
}
|
||||
|
||||
async publish({ otp = this.options.otp, otpCallback } = {}) {
|
||||
const { publishPath = '.', publishArgs } = this.options;
|
||||
const { private: isPrivate, tag = DEFAULT_TAG } = this.getContext();
|
||||
const otpArg = otp ? `--otp ${otp}` : '';
|
||||
const dryRunArg = this.config.isDryRun ? '--dry-run' : '';
|
||||
if (isPrivate) {
|
||||
this.log.warn('Skip publish: package is private.');
|
||||
return false;
|
||||
}
|
||||
const args = [publishPath, `--tag ${tag}`, otpArg, dryRunArg, ...fixArgs(publishArgs)].filter(Boolean);
|
||||
return this.exec(`npm publish ${args.join(' ')}`, { options })
|
||||
.then(() => {
|
||||
this.setContext({ isReleased: true });
|
||||
})
|
||||
.catch(err => {
|
||||
this.debug(err);
|
||||
if (/one-time pass/.test(err)) {
|
||||
if (otp != null) {
|
||||
this.log.warn('The provided OTP is incorrect or has expired.');
|
||||
}
|
||||
if (otpCallback) {
|
||||
return otpCallback(otp => this.publish({ otp, otpCallback }));
|
||||
}
|
||||
}
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
afterRelease() {
|
||||
const { isReleased } = this.getContext();
|
||||
if (isReleased) {
|
||||
this.log.log(`🔗 ${this.getPackageUrl()}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default npm;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"exhaustAll.js","sourceRoot":"","sources":["../../../../src/internal/operators/exhaustAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA8C5C,MAAM,UAAU,UAAU;IACxB,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
|
||||
@@ -0,0 +1,136 @@
|
||||
import { BLAKE2, BlakeOpts, SIGMA } from './_blake2.js';
|
||||
import u64 from './_u64.js';
|
||||
import { rotr, toBytes, wrapConstructorWithOpts, u32 } from './utils.js';
|
||||
|
||||
// Initial state:
|
||||
// first 32 bits of the fractional parts of the square roots of the first 8 primes 2..19)
|
||||
// same as SHA-256
|
||||
// prettier-ignore
|
||||
export const IV = new Uint32Array([
|
||||
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
|
||||
]);
|
||||
|
||||
// Mixing function G splitted in two halfs
|
||||
function G1(a: number, b: number, c: number, d: number, x: number) {
|
||||
a = (a + b + x) | 0;
|
||||
d = rotr(d ^ a, 16);
|
||||
c = (c + d) | 0;
|
||||
b = rotr(b ^ c, 12);
|
||||
return { a, b, c, d };
|
||||
}
|
||||
|
||||
function G2(a: number, b: number, c: number, d: number, x: number) {
|
||||
a = (a + b + x) | 0;
|
||||
d = rotr(d ^ a, 8);
|
||||
c = (c + d) | 0;
|
||||
b = rotr(b ^ c, 7);
|
||||
return { a, b, c, d };
|
||||
}
|
||||
// prettier-ignore
|
||||
export function compress(s: Uint8Array, offset: number, msg: Uint32Array, rounds: number,
|
||||
v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number,
|
||||
v8: number, v9: number, v10: number, v11: number, v12: number, v13: number, v14: number, v15: number,
|
||||
) {
|
||||
let j = 0;
|
||||
for (let i = 0; i < rounds; i++) {
|
||||
({ a: v0, b: v4, c: v8, d: v12 } = G1(v0, v4, v8, v12, msg[offset + s[j++]]));
|
||||
({ a: v0, b: v4, c: v8, d: v12 } = G2(v0, v4, v8, v12, msg[offset + s[j++]]));
|
||||
({ a: v1, b: v5, c: v9, d: v13 } = G1(v1, v5, v9, v13, msg[offset + s[j++]]));
|
||||
({ a: v1, b: v5, c: v9, d: v13 } = G2(v1, v5, v9, v13, msg[offset + s[j++]]));
|
||||
({ a: v2, b: v6, c: v10, d: v14 } = G1(v2, v6, v10, v14, msg[offset + s[j++]]));
|
||||
({ a: v2, b: v6, c: v10, d: v14 } = G2(v2, v6, v10, v14, msg[offset + s[j++]]));
|
||||
({ a: v3, b: v7, c: v11, d: v15 } = G1(v3, v7, v11, v15, msg[offset + s[j++]]));
|
||||
({ a: v3, b: v7, c: v11, d: v15 } = G2(v3, v7, v11, v15, msg[offset + s[j++]]));
|
||||
|
||||
({ a: v0, b: v5, c: v10, d: v15 } = G1(v0, v5, v10, v15, msg[offset + s[j++]]));
|
||||
({ a: v0, b: v5, c: v10, d: v15 } = G2(v0, v5, v10, v15, msg[offset + s[j++]]));
|
||||
({ a: v1, b: v6, c: v11, d: v12 } = G1(v1, v6, v11, v12, msg[offset + s[j++]]));
|
||||
({ a: v1, b: v6, c: v11, d: v12 } = G2(v1, v6, v11, v12, msg[offset + s[j++]]));
|
||||
({ a: v2, b: v7, c: v8, d: v13 } = G1(v2, v7, v8, v13, msg[offset + s[j++]]));
|
||||
({ a: v2, b: v7, c: v8, d: v13 } = G2(v2, v7, v8, v13, msg[offset + s[j++]]));
|
||||
({ a: v3, b: v4, c: v9, d: v14 } = G1(v3, v4, v9, v14, msg[offset + s[j++]]));
|
||||
({ a: v3, b: v4, c: v9, d: v14 } = G2(v3, v4, v9, v14, msg[offset + s[j++]]));
|
||||
}
|
||||
return { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 };
|
||||
}
|
||||
|
||||
class BLAKE2s extends BLAKE2<BLAKE2s> {
|
||||
// Internal state, same as SHA-256
|
||||
private v0 = IV[0] | 0;
|
||||
private v1 = IV[1] | 0;
|
||||
private v2 = IV[2] | 0;
|
||||
private v3 = IV[3] | 0;
|
||||
private v4 = IV[4] | 0;
|
||||
private v5 = IV[5] | 0;
|
||||
private v6 = IV[6] | 0;
|
||||
private v7 = IV[7] | 0;
|
||||
|
||||
constructor(opts: BlakeOpts = {}) {
|
||||
super(64, opts.dkLen === undefined ? 32 : opts.dkLen, opts, 32, 8, 8);
|
||||
const keyLength = opts.key ? opts.key.length : 0;
|
||||
this.v0 ^= this.outputLen | (keyLength << 8) | (0x01 << 16) | (0x01 << 24);
|
||||
if (opts.salt) {
|
||||
const salt = u32(toBytes(opts.salt));
|
||||
this.v4 ^= salt[0];
|
||||
this.v5 ^= salt[1];
|
||||
}
|
||||
if (opts.personalization) {
|
||||
const pers = u32(toBytes(opts.personalization));
|
||||
this.v6 ^= pers[0];
|
||||
this.v7 ^= pers[1];
|
||||
}
|
||||
if (opts.key) {
|
||||
// Pad to blockLen and update
|
||||
const tmp = new Uint8Array(this.blockLen);
|
||||
tmp.set(toBytes(opts.key));
|
||||
this.update(tmp);
|
||||
}
|
||||
}
|
||||
protected get(): [number, number, number, number, number, number, number, number] {
|
||||
const { v0, v1, v2, v3, v4, v5, v6, v7 } = this;
|
||||
return [v0, v1, v2, v3, v4, v5, v6, v7];
|
||||
}
|
||||
// prettier-ignore
|
||||
protected set(
|
||||
v0: number, v1: number, v2: number, v3: number, v4: number, v5: number, v6: number, v7: number
|
||||
) {
|
||||
this.v0 = v0 | 0;
|
||||
this.v1 = v1 | 0;
|
||||
this.v2 = v2 | 0;
|
||||
this.v3 = v3 | 0;
|
||||
this.v4 = v4 | 0;
|
||||
this.v5 = v5 | 0;
|
||||
this.v6 = v6 | 0;
|
||||
this.v7 = v7 | 0;
|
||||
}
|
||||
protected compress(msg: Uint32Array, offset: number, isLast: boolean) {
|
||||
const { h, l } = u64.fromBig(BigInt(this.length));
|
||||
// prettier-ignore
|
||||
const { v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15 } =
|
||||
compress(
|
||||
SIGMA, offset, msg, 10,
|
||||
this.v0, this.v1, this.v2, this.v3, this.v4, this.v5, this.v6, this.v7,
|
||||
IV[0], IV[1], IV[2], IV[3], l ^ IV[4], h ^ IV[5], isLast ? ~IV[6] : IV[6], IV[7]
|
||||
);
|
||||
this.v0 ^= v0 ^ v8;
|
||||
this.v1 ^= v1 ^ v9;
|
||||
this.v2 ^= v2 ^ v10;
|
||||
this.v3 ^= v3 ^ v11;
|
||||
this.v4 ^= v4 ^ v12;
|
||||
this.v5 ^= v5 ^ v13;
|
||||
this.v6 ^= v6 ^ v14;
|
||||
this.v7 ^= v7 ^ v15;
|
||||
}
|
||||
destroy() {
|
||||
this.destroyed = true;
|
||||
this.buffer32.fill(0);
|
||||
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* BLAKE2s - optimized for 32-bit platforms. JS doesn't have uint64, so it's faster than BLAKE2b.
|
||||
* @param msg - message that would be hashed
|
||||
* @param opts - dkLen, key, salt, personalization
|
||||
*/
|
||||
export const blake2s = wrapConstructorWithOpts<BLAKE2s, BlakeOpts>((opts) => new BLAKE2s(opts));
|
||||
@@ -0,0 +1,33 @@
|
||||
import chalk from 'chalk';
|
||||
import figures from 'figures';
|
||||
|
||||
/**
|
||||
* Separator object
|
||||
* Used to space/separate choices group
|
||||
* @constructor
|
||||
* @param {String} line Separation line content (facultative)
|
||||
*/
|
||||
|
||||
export default class Separator {
|
||||
constructor(line) {
|
||||
this.type = 'separator';
|
||||
this.line = chalk.dim(line || new Array(15).join(figures.line));
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function returning false if object is a separator
|
||||
* @param {Object} obj object to test against
|
||||
* @return {Boolean} `false` if object is a separator
|
||||
*/
|
||||
static exclude(obj) {
|
||||
return obj.type !== 'separator';
|
||||
}
|
||||
|
||||
/**
|
||||
* Stringify separator
|
||||
* @return {String} the separator display string
|
||||
*/
|
||||
toString() {
|
||||
return this.line;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user