new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"switchMapTo.js","sources":["../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkDxC,MAAM,UAAU,WAAW,CACzB,eAAmC,EACnC,cAA4F;IAE5F,OAAO,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAC9G,CAAC"}
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var AsyncSubject_1 = require("../AsyncSubject");
|
||||
var multicast_1 = require("./multicast");
|
||||
function publishLast() {
|
||||
return function (source) { return multicast_1.multicast(new AsyncSubject_1.AsyncSubject())(source); };
|
||||
}
|
||||
exports.publishLast = publishLast;
|
||||
//# sourceMappingURL=publishLast.js.map
|
||||
@@ -0,0 +1,66 @@
|
||||
const path = require('path');
|
||||
const _ = require('lodash');
|
||||
const requireCwd = require('import-cwd');
|
||||
const debug = require('debug')('release-it:plugins');
|
||||
const Version = require('./version/Version');
|
||||
const Git = require('./git/Git');
|
||||
const GitLab = require('./gitlab/GitLab');
|
||||
const GitHub = require('./github/GitHub');
|
||||
const npm = require('./npm/npm');
|
||||
|
||||
const pluginNames = ['npm', 'git', 'github', 'gitlab', 'version'];
|
||||
|
||||
const plugins = {
|
||||
version: Version,
|
||||
git: Git,
|
||||
gitlab: GitLab,
|
||||
github: GitHub,
|
||||
npm: npm
|
||||
};
|
||||
|
||||
const load = pluginName => {
|
||||
let plugin = null;
|
||||
try {
|
||||
plugin = require(pluginName);
|
||||
} catch (err) {
|
||||
plugin = requireCwd(pluginName);
|
||||
}
|
||||
return [path.parse(pluginName).name, plugin];
|
||||
};
|
||||
|
||||
module.exports.getPlugins = async (config, container) => {
|
||||
const context = config.getContext();
|
||||
const disabledPlugins = [];
|
||||
|
||||
const enabledExternalPlugins = await _.reduce(
|
||||
context.plugins,
|
||||
async (result, pluginConfig, pluginName) => {
|
||||
const [name, Plugin] = load(pluginName);
|
||||
const [namespace, options] = pluginConfig.length === 2 ? pluginConfig : [name, pluginConfig];
|
||||
config.setContext({ [namespace]: options });
|
||||
if (await Plugin.isEnabled(options)) {
|
||||
const instance = new Plugin({ namespace, options: config.getContext(), container });
|
||||
debug({ namespace, options: instance.options });
|
||||
(await result).push(instance);
|
||||
disabledPlugins.push(..._.intersection(pluginNames, _.castArray(Plugin.disablePlugin())));
|
||||
}
|
||||
return result;
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
const enabledPlugins = await pluginNames.reduce(async (result, plugin) => {
|
||||
if (plugin in plugins && !disabledPlugins.includes(plugin)) {
|
||||
const Plugin = plugins[plugin];
|
||||
const pluginOptions = context[plugin];
|
||||
if (await Plugin.isEnabled(pluginOptions)) {
|
||||
const instance = new Plugin({ namespace: plugin, options: context, container });
|
||||
debug({ namespace: plugin, options: instance.options });
|
||||
(await result).push(instance);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}, []);
|
||||
|
||||
return [enabledPlugins, enabledExternalPlugins];
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00476,"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.00238,"74":0,"75":0,"76":0,"77":0,"78":0.00238,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0.00238,"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.00238,"102":0.00713,"103":0.00238,"104":0.00238,"105":0.00476,"106":0.00476,"107":0.01902,"108":0.23067,"109":0.1403,"110":0.00713,"111":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00238,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0.00238,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0.00238,"67":0,"68":0.00238,"69":0.00238,"70":0.00476,"71":0,"72":0.00476,"73":0.00238,"74":0.00476,"75":0.00238,"76":0.00238,"77":0.00238,"78":0.00238,"79":0.00951,"80":0.00238,"81":0.00713,"83":0.00951,"84":0.00238,"85":0.00238,"86":0.00238,"87":0.00951,"88":0.00238,"89":0.00238,"90":0.00238,"91":0.00238,"92":0.00713,"93":0.0214,"94":0.00238,"95":0.00713,"96":0.01189,"97":0.00476,"98":0.00476,"99":0.00476,"100":0.00476,"101":0.00951,"102":0.00476,"103":0.03329,"104":0.00713,"105":0.01189,"106":0.01189,"107":0.05232,"108":1.52905,"109":1.45771,"110":0.00476,"111":0.00238,"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.00476,"25":0,"26":0.00713,"27":0.00951,"28":0.00951,"29":0,"30":0.02378,"31":0.00476,"32":0.02378,"33":0.01665,"34":0,"35":0.00238,"36":0,"37":0.00951,"38":0.01902,"39":0,"40":0,"41":0,"42":0.00951,"43":0,"44":0,"45":0.00476,"46":0.0214,"47":0.00951,"48":0,"49":0,"50":0.01189,"51":0.01189,"52":0,"53":0,"54":0.02854,"55":0.01427,"56":0.00713,"57":0.01427,"58":0.06421,"60":0.24731,"62":0.00713,"63":0.58974,"64":0.27823,"65":0.17835,"66":0.56121,"67":0.08799,"68":0,"69":0,"70":0,"71":0,"72":0.0214,"73":0.03329,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.00238,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00238,"93":0.01189,"94":0.10701,"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.01665},B:{"12":0.00238,"13":0,"14":0,"15":0,"16":0.00238,"17":0,"18":0.00713,"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.00476,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00238,"100":0,"101":0,"102":0,"103":0.00238,"104":0,"105":0.00238,"106":0.00238,"107":0.00951,"108":0.15695,"109":0.15219},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00238,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.00713,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00713,"14.1":0.00951,"15.1":0.00238,"15.2-15.3":0.00238,"15.4":0.00238,"15.5":0.00951,"15.6":0.0214,"16.0":0.00238,"16.1":0.01427,"16.2":0.01902,"16.3":0.00238},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00274,"6.0-6.1":0.00122,"7.0-7.1":0.05825,"8.1-8.4":0,"9.0-9.2":0.00061,"9.3":0.02958,"10.0-10.2":0.00091,"10.3":0.03233,"11.0-11.2":0.00427,"11.3-11.4":0.00457,"12.0-12.1":0.00396,"12.2-12.5":0.19274,"13.0-13.1":0.00183,"13.2":0.00091,"13.3":0.00915,"13.4-13.7":0.01433,"14.0-14.4":0.08143,"14.5-14.8":0.104,"15.0-15.1":0.02989,"15.2-15.3":0.05307,"15.4":0.05154,"15.5":0.16103,"15.6":0.294,"16.0":0.30314,"16.1":0.67277,"16.2":0.54773,"16.3":0.04209},P:{"4":0.17555,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.07229,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0.01033,"12.0":0,"13.0":0.01033,"14.0":0.02065,"15.0":0.01033,"16.0":0.05163,"17.0":0.02065,"18.0":0.05163,"19.0":0.53698},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00492,"4.4":0,"4.4.3-4.4.4":0.05411},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.04994,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.15244},Q:{"13.1":0},O:{"0":0.19817},H:{"0":33.60499},L:{"0":47.12406},S:{"2.5":0.00762}};
|
||||
@@ -0,0 +1,308 @@
|
||||
import { argsert } from './argsert.js';
|
||||
import { assertNotStrictEqual, } from './typings/common-types.js';
|
||||
import { levenshtein as distance } from './utils/levenshtein.js';
|
||||
import { objFilter } from './utils/obj-filter.js';
|
||||
const specialKeys = ['$0', '--', '_'];
|
||||
export function validation(yargs, usage, y18n, shim) {
|
||||
const __ = y18n.__;
|
||||
const __n = y18n.__n;
|
||||
const self = {};
|
||||
self.nonOptionCount = function nonOptionCount(argv) {
|
||||
const demandedCommands = yargs.getDemandedCommands();
|
||||
const positionalCount = argv._.length + (argv['--'] ? argv['--'].length : 0);
|
||||
const _s = positionalCount - yargs.getContext().commands.length;
|
||||
if (demandedCommands._ &&
|
||||
(_s < demandedCommands._.min || _s > demandedCommands._.max)) {
|
||||
if (_s < demandedCommands._.min) {
|
||||
if (demandedCommands._.minMsg !== undefined) {
|
||||
usage.fail(demandedCommands._.minMsg
|
||||
? demandedCommands._.minMsg
|
||||
.replace(/\$0/g, _s.toString())
|
||||
.replace(/\$1/, demandedCommands._.min.toString())
|
||||
: null);
|
||||
}
|
||||
else {
|
||||
usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', _s, _s.toString(), demandedCommands._.min.toString()));
|
||||
}
|
||||
}
|
||||
else if (_s > demandedCommands._.max) {
|
||||
if (demandedCommands._.maxMsg !== undefined) {
|
||||
usage.fail(demandedCommands._.maxMsg
|
||||
? demandedCommands._.maxMsg
|
||||
.replace(/\$0/g, _s.toString())
|
||||
.replace(/\$1/, demandedCommands._.max.toString())
|
||||
: null);
|
||||
}
|
||||
else {
|
||||
usage.fail(__n('Too many non-option arguments: got %s, maximum of %s', 'Too many non-option arguments: got %s, maximum of %s', _s, _s.toString(), demandedCommands._.max.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
self.positionalCount = function positionalCount(required, observed) {
|
||||
if (observed < required) {
|
||||
usage.fail(__n('Not enough non-option arguments: got %s, need at least %s', 'Not enough non-option arguments: got %s, need at least %s', observed, observed + '', required + ''));
|
||||
}
|
||||
};
|
||||
self.requiredArguments = function requiredArguments(argv) {
|
||||
const demandedOptions = yargs.getDemandedOptions();
|
||||
let missing = null;
|
||||
for (const key of Object.keys(demandedOptions)) {
|
||||
if (!Object.prototype.hasOwnProperty.call(argv, key) ||
|
||||
typeof argv[key] === 'undefined') {
|
||||
missing = missing || {};
|
||||
missing[key] = demandedOptions[key];
|
||||
}
|
||||
}
|
||||
if (missing) {
|
||||
const customMsgs = [];
|
||||
for (const key of Object.keys(missing)) {
|
||||
const msg = missing[key];
|
||||
if (msg && customMsgs.indexOf(msg) < 0) {
|
||||
customMsgs.push(msg);
|
||||
}
|
||||
}
|
||||
const customMsg = customMsgs.length ? `\n${customMsgs.join('\n')}` : '';
|
||||
usage.fail(__n('Missing required argument: %s', 'Missing required arguments: %s', Object.keys(missing).length, Object.keys(missing).join(', ') + customMsg));
|
||||
}
|
||||
};
|
||||
self.unknownArguments = function unknownArguments(argv, aliases, positionalMap, isDefaultCommand, checkPositionals = true) {
|
||||
const commandKeys = yargs.getCommandInstance().getCommands();
|
||||
const unknown = [];
|
||||
const currentContext = yargs.getContext();
|
||||
Object.keys(argv).forEach(key => {
|
||||
if (specialKeys.indexOf(key) === -1 &&
|
||||
!Object.prototype.hasOwnProperty.call(positionalMap, key) &&
|
||||
!Object.prototype.hasOwnProperty.call(yargs._getParseContext(), key) &&
|
||||
!self.isValidAndSomeAliasIsNotNew(key, aliases)) {
|
||||
unknown.push(key);
|
||||
}
|
||||
});
|
||||
if (checkPositionals &&
|
||||
(currentContext.commands.length > 0 ||
|
||||
commandKeys.length > 0 ||
|
||||
isDefaultCommand)) {
|
||||
argv._.slice(currentContext.commands.length).forEach(key => {
|
||||
if (commandKeys.indexOf('' + key) === -1) {
|
||||
unknown.push('' + key);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (unknown.length > 0) {
|
||||
usage.fail(__n('Unknown argument: %s', 'Unknown arguments: %s', unknown.length, unknown.join(', ')));
|
||||
}
|
||||
};
|
||||
self.unknownCommands = function unknownCommands(argv) {
|
||||
const commandKeys = yargs.getCommandInstance().getCommands();
|
||||
const unknown = [];
|
||||
const currentContext = yargs.getContext();
|
||||
if (currentContext.commands.length > 0 || commandKeys.length > 0) {
|
||||
argv._.slice(currentContext.commands.length).forEach(key => {
|
||||
if (commandKeys.indexOf('' + key) === -1) {
|
||||
unknown.push('' + key);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (unknown.length > 0) {
|
||||
usage.fail(__n('Unknown command: %s', 'Unknown commands: %s', unknown.length, unknown.join(', ')));
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
self.isValidAndSomeAliasIsNotNew = function isValidAndSomeAliasIsNotNew(key, aliases) {
|
||||
if (!Object.prototype.hasOwnProperty.call(aliases, key)) {
|
||||
return false;
|
||||
}
|
||||
const newAliases = yargs.parsed.newAliases;
|
||||
for (const a of [key, ...aliases[key]]) {
|
||||
if (!Object.prototype.hasOwnProperty.call(newAliases, a) ||
|
||||
!newAliases[key]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
self.limitedChoices = function limitedChoices(argv) {
|
||||
const options = yargs.getOptions();
|
||||
const invalid = {};
|
||||
if (!Object.keys(options.choices).length)
|
||||
return;
|
||||
Object.keys(argv).forEach(key => {
|
||||
if (specialKeys.indexOf(key) === -1 &&
|
||||
Object.prototype.hasOwnProperty.call(options.choices, key)) {
|
||||
[].concat(argv[key]).forEach(value => {
|
||||
if (options.choices[key].indexOf(value) === -1 &&
|
||||
value !== undefined) {
|
||||
invalid[key] = (invalid[key] || []).concat(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
const invalidKeys = Object.keys(invalid);
|
||||
if (!invalidKeys.length)
|
||||
return;
|
||||
let msg = __('Invalid values:');
|
||||
invalidKeys.forEach(key => {
|
||||
msg += `\n ${__('Argument: %s, Given: %s, Choices: %s', key, usage.stringifiedValues(invalid[key]), usage.stringifiedValues(options.choices[key]))}`;
|
||||
});
|
||||
usage.fail(msg);
|
||||
};
|
||||
let checks = [];
|
||||
self.check = function check(f, global) {
|
||||
checks.push({
|
||||
func: f,
|
||||
global,
|
||||
});
|
||||
};
|
||||
self.customChecks = function customChecks(argv, aliases) {
|
||||
for (let i = 0, f; (f = checks[i]) !== undefined; i++) {
|
||||
const func = f.func;
|
||||
let result = null;
|
||||
try {
|
||||
result = func(argv, aliases);
|
||||
}
|
||||
catch (err) {
|
||||
usage.fail(err.message ? err.message : err, err);
|
||||
continue;
|
||||
}
|
||||
if (!result) {
|
||||
usage.fail(__('Argument check failed: %s', func.toString()));
|
||||
}
|
||||
else if (typeof result === 'string' || result instanceof Error) {
|
||||
usage.fail(result.toString(), result);
|
||||
}
|
||||
}
|
||||
};
|
||||
let implied = {};
|
||||
self.implies = function implies(key, value) {
|
||||
argsert('<string|object> [array|number|string]', [key, value], arguments.length);
|
||||
if (typeof key === 'object') {
|
||||
Object.keys(key).forEach(k => {
|
||||
self.implies(k, key[k]);
|
||||
});
|
||||
}
|
||||
else {
|
||||
yargs.global(key);
|
||||
if (!implied[key]) {
|
||||
implied[key] = [];
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(i => self.implies(key, i));
|
||||
}
|
||||
else {
|
||||
assertNotStrictEqual(value, undefined, shim);
|
||||
implied[key].push(value);
|
||||
}
|
||||
}
|
||||
};
|
||||
self.getImplied = function getImplied() {
|
||||
return implied;
|
||||
};
|
||||
function keyExists(argv, val) {
|
||||
const num = Number(val);
|
||||
val = isNaN(num) ? val : num;
|
||||
if (typeof val === 'number') {
|
||||
val = argv._.length >= val;
|
||||
}
|
||||
else if (val.match(/^--no-.+/)) {
|
||||
val = val.match(/^--no-(.+)/)[1];
|
||||
val = !argv[val];
|
||||
}
|
||||
else {
|
||||
val = argv[val];
|
||||
}
|
||||
return val;
|
||||
}
|
||||
self.implications = function implications(argv) {
|
||||
const implyFail = [];
|
||||
Object.keys(implied).forEach(key => {
|
||||
const origKey = key;
|
||||
(implied[key] || []).forEach(value => {
|
||||
let key = origKey;
|
||||
const origValue = value;
|
||||
key = keyExists(argv, key);
|
||||
value = keyExists(argv, value);
|
||||
if (key && !value) {
|
||||
implyFail.push(` ${origKey} -> ${origValue}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
if (implyFail.length) {
|
||||
let msg = `${__('Implications failed:')}\n`;
|
||||
implyFail.forEach(value => {
|
||||
msg += value;
|
||||
});
|
||||
usage.fail(msg);
|
||||
}
|
||||
};
|
||||
let conflicting = {};
|
||||
self.conflicts = function conflicts(key, value) {
|
||||
argsert('<string|object> [array|string]', [key, value], arguments.length);
|
||||
if (typeof key === 'object') {
|
||||
Object.keys(key).forEach(k => {
|
||||
self.conflicts(k, key[k]);
|
||||
});
|
||||
}
|
||||
else {
|
||||
yargs.global(key);
|
||||
if (!conflicting[key]) {
|
||||
conflicting[key] = [];
|
||||
}
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(i => self.conflicts(key, i));
|
||||
}
|
||||
else {
|
||||
conflicting[key].push(value);
|
||||
}
|
||||
}
|
||||
};
|
||||
self.getConflicting = () => conflicting;
|
||||
self.conflicting = function conflictingFn(argv) {
|
||||
Object.keys(argv).forEach(key => {
|
||||
if (conflicting[key]) {
|
||||
conflicting[key].forEach(value => {
|
||||
if (value && argv[key] !== undefined && argv[value] !== undefined) {
|
||||
usage.fail(__('Arguments %s and %s are mutually exclusive', key, value));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
self.recommendCommands = function recommendCommands(cmd, potentialCommands) {
|
||||
const threshold = 3;
|
||||
potentialCommands = potentialCommands.sort((a, b) => b.length - a.length);
|
||||
let recommended = null;
|
||||
let bestDistance = Infinity;
|
||||
for (let i = 0, candidate; (candidate = potentialCommands[i]) !== undefined; i++) {
|
||||
const d = distance(cmd, candidate);
|
||||
if (d <= threshold && d < bestDistance) {
|
||||
bestDistance = d;
|
||||
recommended = candidate;
|
||||
}
|
||||
}
|
||||
if (recommended)
|
||||
usage.fail(__('Did you mean %s?', recommended));
|
||||
};
|
||||
self.reset = function reset(localLookup) {
|
||||
implied = objFilter(implied, k => !localLookup[k]);
|
||||
conflicting = objFilter(conflicting, k => !localLookup[k]);
|
||||
checks = checks.filter(c => c.global);
|
||||
return self;
|
||||
};
|
||||
const frozens = [];
|
||||
self.freeze = function freeze() {
|
||||
frozens.push({
|
||||
implied,
|
||||
checks,
|
||||
conflicting,
|
||||
});
|
||||
};
|
||||
self.unfreeze = function unfreeze() {
|
||||
const frozen = frozens.pop();
|
||||
assertNotStrictEqual(frozen, undefined, shim);
|
||||
({ implied, checks, conflicting } = frozen);
|
||||
};
|
||||
return self;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": true,
|
||||
"sourceMap": true,
|
||||
"strictFunctionTypes": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"moduleResolution": "node",
|
||||
"stripInternal": false,
|
||||
"target": "es5",
|
||||
"outDir": "./.out",
|
||||
"lib": [
|
||||
"es5",
|
||||
"es2015.iterable",
|
||||
"es2015.collection",
|
||||
"es2015.promise",
|
||||
"es2015.symbol",
|
||||
"es2015.symbol.wellknown",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"formatCodeOptions": {
|
||||
"indentSize": 2,
|
||||
"tabSize": 2
|
||||
},
|
||||
"bazelOptions": {
|
||||
"suppressTsconfigOverrideWarnings": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operators/takeWhile"));
|
||||
//# sourceMappingURL=takeWhile.js.map
|
||||
@@ -0,0 +1,38 @@
|
||||
const nock = require('nock');
|
||||
|
||||
module.exports.interceptUser = ({ host = 'https://gitlab.com', owner = 'user' } = {}, options) =>
|
||||
nock(host, options).get('/api/v4/user').reply(200, { id: 1, username: owner });
|
||||
|
||||
module.exports.interceptCollaborator = (
|
||||
{ host = 'https://gitlab.com', owner = 'user', project = 'repo', group, userId = 1 } = {},
|
||||
options
|
||||
) =>
|
||||
nock(host, options)
|
||||
.get(`/api/v4/projects/${group ? `${group}%2F` : ''}${owner}%2F${project}/members/all/${userId}`)
|
||||
.reply(200, { id: userId, username: owner, access_level: 30 });
|
||||
|
||||
module.exports.interceptCollaboratorFallback = (
|
||||
{ host = 'https://gitlab.com', owner = 'user', project = 'repo', group, userId = 1 } = {},
|
||||
options
|
||||
) =>
|
||||
nock(host, options)
|
||||
.get(`/api/v4/projects/${group ? `${group}%2F` : ''}${owner}%2F${project}/members/${userId}`)
|
||||
.reply(200, { id: userId, username: owner, access_level: 30 });
|
||||
|
||||
module.exports.interceptPublish = (
|
||||
{ host = 'https://gitlab.com', owner = 'user', project = 'repo', body } = {},
|
||||
options
|
||||
) => nock(host, options).post(`/api/v4/projects/${owner}%2F${project}/releases`, body).reply(200, {});
|
||||
|
||||
module.exports.interceptAsset = ({ host = 'https://gitlab.com', owner = 'user', project = 'repo' } = {}) =>
|
||||
nock(host)
|
||||
.post(`/api/v4/projects/${owner}%2F${project}/uploads`)
|
||||
.query(true)
|
||||
.reply(200, function (_, requestBody) {
|
||||
const [, name] = requestBody.match(/filename="([^"]+)/);
|
||||
return {
|
||||
alt: name,
|
||||
url: `/uploads/7e8bec1fe27cc46a4bc6a91b9e82a07c/${name}`,
|
||||
markdown: `[${name}](/uploads/7e8bec1fe27cc46a4bc6a91b9e82a07c/${name})`
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1,38 @@
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import AwaitBlock from '../../nodes/AwaitBlock';
|
||||
import FragmentWrapper from './Fragment';
|
||||
import PendingBlock from '../../nodes/PendingBlock';
|
||||
import ThenBlock from '../../nodes/ThenBlock';
|
||||
import CatchBlock from '../../nodes/CatchBlock';
|
||||
import { Context } from '../../nodes/shared/Context';
|
||||
import { Identifier, Literal, Node } from 'estree';
|
||||
declare type Status = 'pending' | 'then' | 'catch';
|
||||
declare class AwaitBlockBranch extends Wrapper {
|
||||
parent: AwaitBlockWrapper;
|
||||
node: PendingBlock | ThenBlock | CatchBlock;
|
||||
block: Block;
|
||||
fragment: FragmentWrapper;
|
||||
is_dynamic: boolean;
|
||||
var: any;
|
||||
status: Status;
|
||||
value: string;
|
||||
value_index: Literal;
|
||||
value_contexts: Context[];
|
||||
is_destructured: boolean;
|
||||
constructor(status: Status, renderer: Renderer, block: Block, parent: AwaitBlockWrapper, node: PendingBlock | ThenBlock | CatchBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
add_context(node: Node | null, contexts: Context[]): void;
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
render_destructure(): void;
|
||||
}
|
||||
export default class AwaitBlockWrapper extends Wrapper {
|
||||
node: AwaitBlock;
|
||||
pending: AwaitBlockBranch;
|
||||
then: AwaitBlockBranch;
|
||||
catch: AwaitBlockBranch;
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: AwaitBlock, strip_whitespace: boolean, next_sibling: Wrapper);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
||||
export {};
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operators/elementAt"));
|
||||
//# sourceMappingURL=elementAt.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"switchMap.js","sources":["../../../src/internal/operators/switchMap.ts"],"names":[],"mappings":"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"}
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operators/windowCount"));
|
||||
//# sourceMappingURL=windowCount.js.map
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operators/tap';
|
||||
@@ -0,0 +1,4 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("rxjs-compat/add/operator/merge");
|
||||
//# sourceMappingURL=merge.js.map
|
||||
@@ -0,0 +1,12 @@
|
||||
/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
|
||||
import { async } from '../scheduler/async';
|
||||
import { TimeoutError } from '../util/TimeoutError';
|
||||
import { timeoutWith } from './timeoutWith';
|
||||
import { throwError } from '../observable/throwError';
|
||||
export function timeout(due, scheduler) {
|
||||
if (scheduler === void 0) {
|
||||
scheduler = async;
|
||||
}
|
||||
return timeoutWith(due, throwError(new TimeoutError()), scheduler);
|
||||
}
|
||||
//# sourceMappingURL=timeout.js.map
|
||||
@@ -0,0 +1,302 @@
|
||||
"use strict";
|
||||
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _toDate = _interopRequireDefault(require("./lib/toDate"));
|
||||
|
||||
var _toFloat = _interopRequireDefault(require("./lib/toFloat"));
|
||||
|
||||
var _toInt = _interopRequireDefault(require("./lib/toInt"));
|
||||
|
||||
var _toBoolean = _interopRequireDefault(require("./lib/toBoolean"));
|
||||
|
||||
var _equals = _interopRequireDefault(require("./lib/equals"));
|
||||
|
||||
var _contains = _interopRequireDefault(require("./lib/contains"));
|
||||
|
||||
var _matches = _interopRequireDefault(require("./lib/matches"));
|
||||
|
||||
var _isEmail = _interopRequireDefault(require("./lib/isEmail"));
|
||||
|
||||
var _isURL = _interopRequireDefault(require("./lib/isURL"));
|
||||
|
||||
var _isMACAddress = _interopRequireDefault(require("./lib/isMACAddress"));
|
||||
|
||||
var _isIP = _interopRequireDefault(require("./lib/isIP"));
|
||||
|
||||
var _isIPRange = _interopRequireDefault(require("./lib/isIPRange"));
|
||||
|
||||
var _isFQDN = _interopRequireDefault(require("./lib/isFQDN"));
|
||||
|
||||
var _isDate = _interopRequireDefault(require("./lib/isDate"));
|
||||
|
||||
var _isBoolean = _interopRequireDefault(require("./lib/isBoolean"));
|
||||
|
||||
var _isLocale = _interopRequireDefault(require("./lib/isLocale"));
|
||||
|
||||
var _isAlpha = _interopRequireWildcard(require("./lib/isAlpha"));
|
||||
|
||||
var _isAlphanumeric = _interopRequireWildcard(require("./lib/isAlphanumeric"));
|
||||
|
||||
var _isNumeric = _interopRequireDefault(require("./lib/isNumeric"));
|
||||
|
||||
var _isPassportNumber = _interopRequireDefault(require("./lib/isPassportNumber"));
|
||||
|
||||
var _isPort = _interopRequireDefault(require("./lib/isPort"));
|
||||
|
||||
var _isLowercase = _interopRequireDefault(require("./lib/isLowercase"));
|
||||
|
||||
var _isUppercase = _interopRequireDefault(require("./lib/isUppercase"));
|
||||
|
||||
var _isIMEI = _interopRequireDefault(require("./lib/isIMEI"));
|
||||
|
||||
var _isAscii = _interopRequireDefault(require("./lib/isAscii"));
|
||||
|
||||
var _isFullWidth = _interopRequireDefault(require("./lib/isFullWidth"));
|
||||
|
||||
var _isHalfWidth = _interopRequireDefault(require("./lib/isHalfWidth"));
|
||||
|
||||
var _isVariableWidth = _interopRequireDefault(require("./lib/isVariableWidth"));
|
||||
|
||||
var _isMultibyte = _interopRequireDefault(require("./lib/isMultibyte"));
|
||||
|
||||
var _isSemVer = _interopRequireDefault(require("./lib/isSemVer"));
|
||||
|
||||
var _isSurrogatePair = _interopRequireDefault(require("./lib/isSurrogatePair"));
|
||||
|
||||
var _isInt = _interopRequireDefault(require("./lib/isInt"));
|
||||
|
||||
var _isFloat = _interopRequireWildcard(require("./lib/isFloat"));
|
||||
|
||||
var _isDecimal = _interopRequireDefault(require("./lib/isDecimal"));
|
||||
|
||||
var _isHexadecimal = _interopRequireDefault(require("./lib/isHexadecimal"));
|
||||
|
||||
var _isOctal = _interopRequireDefault(require("./lib/isOctal"));
|
||||
|
||||
var _isDivisibleBy = _interopRequireDefault(require("./lib/isDivisibleBy"));
|
||||
|
||||
var _isHexColor = _interopRequireDefault(require("./lib/isHexColor"));
|
||||
|
||||
var _isRgbColor = _interopRequireDefault(require("./lib/isRgbColor"));
|
||||
|
||||
var _isHSL = _interopRequireDefault(require("./lib/isHSL"));
|
||||
|
||||
var _isISRC = _interopRequireDefault(require("./lib/isISRC"));
|
||||
|
||||
var _isIBAN = _interopRequireDefault(require("./lib/isIBAN"));
|
||||
|
||||
var _isBIC = _interopRequireDefault(require("./lib/isBIC"));
|
||||
|
||||
var _isMD = _interopRequireDefault(require("./lib/isMD5"));
|
||||
|
||||
var _isHash = _interopRequireDefault(require("./lib/isHash"));
|
||||
|
||||
var _isJWT = _interopRequireDefault(require("./lib/isJWT"));
|
||||
|
||||
var _isJSON = _interopRequireDefault(require("./lib/isJSON"));
|
||||
|
||||
var _isEmpty = _interopRequireDefault(require("./lib/isEmpty"));
|
||||
|
||||
var _isLength = _interopRequireDefault(require("./lib/isLength"));
|
||||
|
||||
var _isByteLength = _interopRequireDefault(require("./lib/isByteLength"));
|
||||
|
||||
var _isUUID = _interopRequireDefault(require("./lib/isUUID"));
|
||||
|
||||
var _isMongoId = _interopRequireDefault(require("./lib/isMongoId"));
|
||||
|
||||
var _isAfter = _interopRequireDefault(require("./lib/isAfter"));
|
||||
|
||||
var _isBefore = _interopRequireDefault(require("./lib/isBefore"));
|
||||
|
||||
var _isIn = _interopRequireDefault(require("./lib/isIn"));
|
||||
|
||||
var _isCreditCard = _interopRequireDefault(require("./lib/isCreditCard"));
|
||||
|
||||
var _isIdentityCard = _interopRequireDefault(require("./lib/isIdentityCard"));
|
||||
|
||||
var _isEAN = _interopRequireDefault(require("./lib/isEAN"));
|
||||
|
||||
var _isISIN = _interopRequireDefault(require("./lib/isISIN"));
|
||||
|
||||
var _isISBN = _interopRequireDefault(require("./lib/isISBN"));
|
||||
|
||||
var _isISSN = _interopRequireDefault(require("./lib/isISSN"));
|
||||
|
||||
var _isTaxID = _interopRequireDefault(require("./lib/isTaxID"));
|
||||
|
||||
var _isMobilePhone = _interopRequireWildcard(require("./lib/isMobilePhone"));
|
||||
|
||||
var _isEthereumAddress = _interopRequireDefault(require("./lib/isEthereumAddress"));
|
||||
|
||||
var _isCurrency = _interopRequireDefault(require("./lib/isCurrency"));
|
||||
|
||||
var _isBtcAddress = _interopRequireDefault(require("./lib/isBtcAddress"));
|
||||
|
||||
var _isISO = _interopRequireDefault(require("./lib/isISO8601"));
|
||||
|
||||
var _isRFC = _interopRequireDefault(require("./lib/isRFC3339"));
|
||||
|
||||
var _isISO31661Alpha = _interopRequireDefault(require("./lib/isISO31661Alpha2"));
|
||||
|
||||
var _isISO31661Alpha2 = _interopRequireDefault(require("./lib/isISO31661Alpha3"));
|
||||
|
||||
var _isBase = _interopRequireDefault(require("./lib/isBase32"));
|
||||
|
||||
var _isBase2 = _interopRequireDefault(require("./lib/isBase58"));
|
||||
|
||||
var _isBase3 = _interopRequireDefault(require("./lib/isBase64"));
|
||||
|
||||
var _isDataURI = _interopRequireDefault(require("./lib/isDataURI"));
|
||||
|
||||
var _isMagnetURI = _interopRequireDefault(require("./lib/isMagnetURI"));
|
||||
|
||||
var _isMimeType = _interopRequireDefault(require("./lib/isMimeType"));
|
||||
|
||||
var _isLatLong = _interopRequireDefault(require("./lib/isLatLong"));
|
||||
|
||||
var _isPostalCode = _interopRequireWildcard(require("./lib/isPostalCode"));
|
||||
|
||||
var _ltrim = _interopRequireDefault(require("./lib/ltrim"));
|
||||
|
||||
var _rtrim = _interopRequireDefault(require("./lib/rtrim"));
|
||||
|
||||
var _trim = _interopRequireDefault(require("./lib/trim"));
|
||||
|
||||
var _escape = _interopRequireDefault(require("./lib/escape"));
|
||||
|
||||
var _unescape = _interopRequireDefault(require("./lib/unescape"));
|
||||
|
||||
var _stripLow = _interopRequireDefault(require("./lib/stripLow"));
|
||||
|
||||
var _whitelist = _interopRequireDefault(require("./lib/whitelist"));
|
||||
|
||||
var _blacklist = _interopRequireDefault(require("./lib/blacklist"));
|
||||
|
||||
var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted"));
|
||||
|
||||
var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail"));
|
||||
|
||||
var _isSlug = _interopRequireDefault(require("./lib/isSlug"));
|
||||
|
||||
var _isStrongPassword = _interopRequireDefault(require("./lib/isStrongPassword"));
|
||||
|
||||
var _isVAT = _interopRequireDefault(require("./lib/isVAT"));
|
||||
|
||||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var version = '13.5.2';
|
||||
var validator = {
|
||||
version: version,
|
||||
toDate: _toDate.default,
|
||||
toFloat: _toFloat.default,
|
||||
toInt: _toInt.default,
|
||||
toBoolean: _toBoolean.default,
|
||||
equals: _equals.default,
|
||||
contains: _contains.default,
|
||||
matches: _matches.default,
|
||||
isEmail: _isEmail.default,
|
||||
isURL: _isURL.default,
|
||||
isMACAddress: _isMACAddress.default,
|
||||
isIP: _isIP.default,
|
||||
isIPRange: _isIPRange.default,
|
||||
isFQDN: _isFQDN.default,
|
||||
isBoolean: _isBoolean.default,
|
||||
isIBAN: _isIBAN.default,
|
||||
isBIC: _isBIC.default,
|
||||
isAlpha: _isAlpha.default,
|
||||
isAlphaLocales: _isAlpha.locales,
|
||||
isAlphanumeric: _isAlphanumeric.default,
|
||||
isAlphanumericLocales: _isAlphanumeric.locales,
|
||||
isNumeric: _isNumeric.default,
|
||||
isPassportNumber: _isPassportNumber.default,
|
||||
isPort: _isPort.default,
|
||||
isLowercase: _isLowercase.default,
|
||||
isUppercase: _isUppercase.default,
|
||||
isAscii: _isAscii.default,
|
||||
isFullWidth: _isFullWidth.default,
|
||||
isHalfWidth: _isHalfWidth.default,
|
||||
isVariableWidth: _isVariableWidth.default,
|
||||
isMultibyte: _isMultibyte.default,
|
||||
isSemVer: _isSemVer.default,
|
||||
isSurrogatePair: _isSurrogatePair.default,
|
||||
isInt: _isInt.default,
|
||||
isIMEI: _isIMEI.default,
|
||||
isFloat: _isFloat.default,
|
||||
isFloatLocales: _isFloat.locales,
|
||||
isDecimal: _isDecimal.default,
|
||||
isHexadecimal: _isHexadecimal.default,
|
||||
isOctal: _isOctal.default,
|
||||
isDivisibleBy: _isDivisibleBy.default,
|
||||
isHexColor: _isHexColor.default,
|
||||
isRgbColor: _isRgbColor.default,
|
||||
isHSL: _isHSL.default,
|
||||
isISRC: _isISRC.default,
|
||||
isMD5: _isMD.default,
|
||||
isHash: _isHash.default,
|
||||
isJWT: _isJWT.default,
|
||||
isJSON: _isJSON.default,
|
||||
isEmpty: _isEmpty.default,
|
||||
isLength: _isLength.default,
|
||||
isLocale: _isLocale.default,
|
||||
isByteLength: _isByteLength.default,
|
||||
isUUID: _isUUID.default,
|
||||
isMongoId: _isMongoId.default,
|
||||
isAfter: _isAfter.default,
|
||||
isBefore: _isBefore.default,
|
||||
isIn: _isIn.default,
|
||||
isCreditCard: _isCreditCard.default,
|
||||
isIdentityCard: _isIdentityCard.default,
|
||||
isEAN: _isEAN.default,
|
||||
isISIN: _isISIN.default,
|
||||
isISBN: _isISBN.default,
|
||||
isISSN: _isISSN.default,
|
||||
isMobilePhone: _isMobilePhone.default,
|
||||
isMobilePhoneLocales: _isMobilePhone.locales,
|
||||
isPostalCode: _isPostalCode.default,
|
||||
isPostalCodeLocales: _isPostalCode.locales,
|
||||
isEthereumAddress: _isEthereumAddress.default,
|
||||
isCurrency: _isCurrency.default,
|
||||
isBtcAddress: _isBtcAddress.default,
|
||||
isISO8601: _isISO.default,
|
||||
isRFC3339: _isRFC.default,
|
||||
isISO31661Alpha2: _isISO31661Alpha.default,
|
||||
isISO31661Alpha3: _isISO31661Alpha2.default,
|
||||
isBase32: _isBase.default,
|
||||
isBase58: _isBase2.default,
|
||||
isBase64: _isBase3.default,
|
||||
isDataURI: _isDataURI.default,
|
||||
isMagnetURI: _isMagnetURI.default,
|
||||
isMimeType: _isMimeType.default,
|
||||
isLatLong: _isLatLong.default,
|
||||
ltrim: _ltrim.default,
|
||||
rtrim: _rtrim.default,
|
||||
trim: _trim.default,
|
||||
escape: _escape.default,
|
||||
unescape: _unescape.default,
|
||||
stripLow: _stripLow.default,
|
||||
whitelist: _whitelist.default,
|
||||
blacklist: _blacklist.default,
|
||||
isWhitelisted: _isWhitelisted.default,
|
||||
normalizeEmail: _normalizeEmail.default,
|
||||
toString: toString,
|
||||
isSlug: _isSlug.default,
|
||||
isStrongPassword: _isStrongPassword.default,
|
||||
isTaxID: _isTaxID.default,
|
||||
isDate: _isDate.default,
|
||||
isVAT: _isVAT.default
|
||||
};
|
||||
var _default = validator;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,208 @@
|
||||
var util = require('util');
|
||||
var Stream = require('stream').Stream;
|
||||
var DelayedStream = require('delayed-stream');
|
||||
|
||||
module.exports = CombinedStream;
|
||||
function CombinedStream() {
|
||||
this.writable = false;
|
||||
this.readable = true;
|
||||
this.dataSize = 0;
|
||||
this.maxDataSize = 2 * 1024 * 1024;
|
||||
this.pauseStreams = true;
|
||||
|
||||
this._released = false;
|
||||
this._streams = [];
|
||||
this._currentStream = null;
|
||||
this._insideLoop = false;
|
||||
this._pendingNext = false;
|
||||
}
|
||||
util.inherits(CombinedStream, Stream);
|
||||
|
||||
CombinedStream.create = function(options) {
|
||||
var combinedStream = new this();
|
||||
|
||||
options = options || {};
|
||||
for (var option in options) {
|
||||
combinedStream[option] = options[option];
|
||||
}
|
||||
|
||||
return combinedStream;
|
||||
};
|
||||
|
||||
CombinedStream.isStreamLike = function(stream) {
|
||||
return (typeof stream !== 'function')
|
||||
&& (typeof stream !== 'string')
|
||||
&& (typeof stream !== 'boolean')
|
||||
&& (typeof stream !== 'number')
|
||||
&& (!Buffer.isBuffer(stream));
|
||||
};
|
||||
|
||||
CombinedStream.prototype.append = function(stream) {
|
||||
var isStreamLike = CombinedStream.isStreamLike(stream);
|
||||
|
||||
if (isStreamLike) {
|
||||
if (!(stream instanceof DelayedStream)) {
|
||||
var newStream = DelayedStream.create(stream, {
|
||||
maxDataSize: Infinity,
|
||||
pauseStream: this.pauseStreams,
|
||||
});
|
||||
stream.on('data', this._checkDataSize.bind(this));
|
||||
stream = newStream;
|
||||
}
|
||||
|
||||
this._handleErrors(stream);
|
||||
|
||||
if (this.pauseStreams) {
|
||||
stream.pause();
|
||||
}
|
||||
}
|
||||
|
||||
this._streams.push(stream);
|
||||
return this;
|
||||
};
|
||||
|
||||
CombinedStream.prototype.pipe = function(dest, options) {
|
||||
Stream.prototype.pipe.call(this, dest, options);
|
||||
this.resume();
|
||||
return dest;
|
||||
};
|
||||
|
||||
CombinedStream.prototype._getNext = function() {
|
||||
this._currentStream = null;
|
||||
|
||||
if (this._insideLoop) {
|
||||
this._pendingNext = true;
|
||||
return; // defer call
|
||||
}
|
||||
|
||||
this._insideLoop = true;
|
||||
try {
|
||||
do {
|
||||
this._pendingNext = false;
|
||||
this._realGetNext();
|
||||
} while (this._pendingNext);
|
||||
} finally {
|
||||
this._insideLoop = false;
|
||||
}
|
||||
};
|
||||
|
||||
CombinedStream.prototype._realGetNext = function() {
|
||||
var stream = this._streams.shift();
|
||||
|
||||
|
||||
if (typeof stream == 'undefined') {
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof stream !== 'function') {
|
||||
this._pipeNext(stream);
|
||||
return;
|
||||
}
|
||||
|
||||
var getStream = stream;
|
||||
getStream(function(stream) {
|
||||
var isStreamLike = CombinedStream.isStreamLike(stream);
|
||||
if (isStreamLike) {
|
||||
stream.on('data', this._checkDataSize.bind(this));
|
||||
this._handleErrors(stream);
|
||||
}
|
||||
|
||||
this._pipeNext(stream);
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
CombinedStream.prototype._pipeNext = function(stream) {
|
||||
this._currentStream = stream;
|
||||
|
||||
var isStreamLike = CombinedStream.isStreamLike(stream);
|
||||
if (isStreamLike) {
|
||||
stream.on('end', this._getNext.bind(this));
|
||||
stream.pipe(this, {end: false});
|
||||
return;
|
||||
}
|
||||
|
||||
var value = stream;
|
||||
this.write(value);
|
||||
this._getNext();
|
||||
};
|
||||
|
||||
CombinedStream.prototype._handleErrors = function(stream) {
|
||||
var self = this;
|
||||
stream.on('error', function(err) {
|
||||
self._emitError(err);
|
||||
});
|
||||
};
|
||||
|
||||
CombinedStream.prototype.write = function(data) {
|
||||
this.emit('data', data);
|
||||
};
|
||||
|
||||
CombinedStream.prototype.pause = function() {
|
||||
if (!this.pauseStreams) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause();
|
||||
this.emit('pause');
|
||||
};
|
||||
|
||||
CombinedStream.prototype.resume = function() {
|
||||
if (!this._released) {
|
||||
this._released = true;
|
||||
this.writable = true;
|
||||
this._getNext();
|
||||
}
|
||||
|
||||
if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume();
|
||||
this.emit('resume');
|
||||
};
|
||||
|
||||
CombinedStream.prototype.end = function() {
|
||||
this._reset();
|
||||
this.emit('end');
|
||||
};
|
||||
|
||||
CombinedStream.prototype.destroy = function() {
|
||||
this._reset();
|
||||
this.emit('close');
|
||||
};
|
||||
|
||||
CombinedStream.prototype._reset = function() {
|
||||
this.writable = false;
|
||||
this._streams = [];
|
||||
this._currentStream = null;
|
||||
};
|
||||
|
||||
CombinedStream.prototype._checkDataSize = function() {
|
||||
this._updateDataSize();
|
||||
if (this.dataSize <= this.maxDataSize) {
|
||||
return;
|
||||
}
|
||||
|
||||
var message =
|
||||
'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.';
|
||||
this._emitError(new Error(message));
|
||||
};
|
||||
|
||||
CombinedStream.prototype._updateDataSize = function() {
|
||||
this.dataSize = 0;
|
||||
|
||||
var self = this;
|
||||
this._streams.forEach(function(stream) {
|
||||
if (!stream.dataSize) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.dataSize += stream.dataSize;
|
||||
});
|
||||
|
||||
if (this._currentStream && this._currentStream.dataSize) {
|
||||
this.dataSize += this._currentStream.dataSize;
|
||||
}
|
||||
};
|
||||
|
||||
CombinedStream.prototype._emitError = function(err) {
|
||||
this._reset();
|
||||
this.emit('error', err);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.02164,"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.00361,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.00361,"108":0.34257,"109":0.09015,"110":0,"111":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00361,"50":0,"51":0,"52":0,"53":0.02524,"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,"83":0,"84":0,"85":0,"86":0,"87":0.00361,"88":0,"89":0,"90":0,"91":0,"92":0.00361,"93":0,"94":0.00361,"95":0,"96":0,"97":0,"98":0,"99":0.00361,"100":0,"101":0,"102":0,"103":0.02164,"104":0,"105":0.05048,"106":0.03245,"107":0.07573,"108":4.88974,"109":5.52079,"110":0,"111":0,"112":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.01442,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0.00361,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.01442,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0.00361,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0.00361,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0.00721,"107":0.00361,"108":0.36781,"109":0.34978},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00361,"14":0.05048,"15":0.00361,_:"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.00721,"13.1":0.01082,"14.1":0.10097,"15.1":0.01442,"15.2-15.3":0.01082,"15.4":0.02885,"15.5":0.0613,"15.6":0.33536,"16.0":0.01442,"16.1":0.03967,"16.2":0.11179,"16.3":0.00361},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.0138,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0,"11.0-11.2":0.0069,"11.3-11.4":0,"12.0-12.1":0.0276,"12.2-12.5":0.29323,"13.0-13.1":0,"13.2":0.0069,"13.3":0.02415,"13.4-13.7":0.13799,"14.0-14.4":0.53472,"14.5-14.8":1.15224,"15.0-15.1":0.51057,"15.2-15.3":0.95215,"15.4":0.39673,"15.5":1.62832,"15.6":5.50936,"16.0":3.40842,"16.1":13.04377,"16.2":5.28168,"16.3":0.43468},P:{"4":0.01008,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.03024,"8.2":0.02016,"9.2":0.02016,"10.1":0,"11.1-11.2":0.04032,"12.0":0,"13.0":0.04032,"14.0":0.02016,"15.0":0.0504,"16.0":0.33262,"17.0":0.08063,"18.0":0.42333,"19.0":4.4752},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00721},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0.01082,"11":0.06491,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.20461},Q:{"13.1":0},O:{"0":0.63301},H:{"0":0.15739},L:{"0":44.91985},S:{"2.5":0}};
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { SchedulerLike } from '../types';
|
||||
import { Subscription } from '../Subscription';
|
||||
|
||||
export function scheduleArray<T>(input: ArrayLike<T>, scheduler: SchedulerLike) {
|
||||
return new Observable<T>(subscriber => {
|
||||
const sub = new Subscription();
|
||||
let i = 0;
|
||||
sub.add(scheduler.schedule(function () {
|
||||
if (i === input.length) {
|
||||
subscriber.complete();
|
||||
return;
|
||||
}
|
||||
subscriber.next(input[i++]);
|
||||
if (!subscriber.closed) {
|
||||
sub.add(this.schedule());
|
||||
}
|
||||
}));
|
||||
return sub;
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export declare function applyMixins(derivedCtor: any, baseCtors: any[]): void;
|
||||
Reference in New Issue
Block a user