new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
import { Parser } from '../index';
|
||||
import { Script } from '../../interfaces';
|
||||
import { Node } from 'estree';
|
||||
export default function read_script(parser: Parser, start: number, attributes: Node[]): Script;
|
||||
@@ -0,0 +1,2 @@
|
||||
export declare const throwError: (msg: string) => never;
|
||||
export declare const throwTypescriptError: () => void;
|
||||
@@ -0,0 +1,31 @@
|
||||
var baseDifference = require('./_baseDifference'),
|
||||
baseRest = require('./_baseRest'),
|
||||
isArrayLikeObject = require('./isArrayLikeObject');
|
||||
|
||||
/**
|
||||
* Creates an array excluding all given values using
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* **Note:** Unlike `_.pull`, this method returns a new array.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to inspect.
|
||||
* @param {...*} [values] The values to exclude.
|
||||
* @returns {Array} Returns the new array of filtered values.
|
||||
* @see _.difference, _.xor
|
||||
* @example
|
||||
*
|
||||
* _.without([2, 1, 2, 3], 1, 2);
|
||||
* // => [3]
|
||||
*/
|
||||
var without = baseRest(function(array, values) {
|
||||
return isArrayLikeObject(array)
|
||||
? baseDifference(array, values)
|
||||
: [];
|
||||
});
|
||||
|
||||
module.exports = without;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"arrRemove.js","sourceRoot":"","sources":["../../../../src/internal/util/arrRemove.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,SAAS,CAAI,GAA2B,EAAE,IAAO;IAC/D,IAAI,GAAG,EAAE;QACP,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;KACpC;AACH,CAAC"}
|
||||
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = (options) => ({
|
||||
async markup({ content, filename }) {
|
||||
const { transformer } = await Promise.resolve().then(() => __importStar(require('../transformers/replace')));
|
||||
return transformer({ content, filename, options });
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,95 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.combinator = exports.word = exports.comment = exports.str = exports.tab = exports.newline = exports.feed = exports.cr = exports.backslash = exports.bang = exports.slash = exports.doubleQuote = exports.singleQuote = exports.space = exports.greaterThan = exports.pipe = exports.equals = exports.plus = exports.caret = exports.tilde = exports.dollar = exports.closeSquare = exports.openSquare = exports.closeParenthesis = exports.openParenthesis = exports.semicolon = exports.colon = exports.comma = exports.at = exports.asterisk = exports.ampersand = void 0;
|
||||
var ampersand = 38; // `&`.charCodeAt(0);
|
||||
|
||||
exports.ampersand = ampersand;
|
||||
var asterisk = 42; // `*`.charCodeAt(0);
|
||||
|
||||
exports.asterisk = asterisk;
|
||||
var at = 64; // `@`.charCodeAt(0);
|
||||
|
||||
exports.at = at;
|
||||
var comma = 44; // `,`.charCodeAt(0);
|
||||
|
||||
exports.comma = comma;
|
||||
var colon = 58; // `:`.charCodeAt(0);
|
||||
|
||||
exports.colon = colon;
|
||||
var semicolon = 59; // `;`.charCodeAt(0);
|
||||
|
||||
exports.semicolon = semicolon;
|
||||
var openParenthesis = 40; // `(`.charCodeAt(0);
|
||||
|
||||
exports.openParenthesis = openParenthesis;
|
||||
var closeParenthesis = 41; // `)`.charCodeAt(0);
|
||||
|
||||
exports.closeParenthesis = closeParenthesis;
|
||||
var openSquare = 91; // `[`.charCodeAt(0);
|
||||
|
||||
exports.openSquare = openSquare;
|
||||
var closeSquare = 93; // `]`.charCodeAt(0);
|
||||
|
||||
exports.closeSquare = closeSquare;
|
||||
var dollar = 36; // `$`.charCodeAt(0);
|
||||
|
||||
exports.dollar = dollar;
|
||||
var tilde = 126; // `~`.charCodeAt(0);
|
||||
|
||||
exports.tilde = tilde;
|
||||
var caret = 94; // `^`.charCodeAt(0);
|
||||
|
||||
exports.caret = caret;
|
||||
var plus = 43; // `+`.charCodeAt(0);
|
||||
|
||||
exports.plus = plus;
|
||||
var equals = 61; // `=`.charCodeAt(0);
|
||||
|
||||
exports.equals = equals;
|
||||
var pipe = 124; // `|`.charCodeAt(0);
|
||||
|
||||
exports.pipe = pipe;
|
||||
var greaterThan = 62; // `>`.charCodeAt(0);
|
||||
|
||||
exports.greaterThan = greaterThan;
|
||||
var space = 32; // ` `.charCodeAt(0);
|
||||
|
||||
exports.space = space;
|
||||
var singleQuote = 39; // `'`.charCodeAt(0);
|
||||
|
||||
exports.singleQuote = singleQuote;
|
||||
var doubleQuote = 34; // `"`.charCodeAt(0);
|
||||
|
||||
exports.doubleQuote = doubleQuote;
|
||||
var slash = 47; // `/`.charCodeAt(0);
|
||||
|
||||
exports.slash = slash;
|
||||
var bang = 33; // `!`.charCodeAt(0);
|
||||
|
||||
exports.bang = bang;
|
||||
var backslash = 92; // '\\'.charCodeAt(0);
|
||||
|
||||
exports.backslash = backslash;
|
||||
var cr = 13; // '\r'.charCodeAt(0);
|
||||
|
||||
exports.cr = cr;
|
||||
var feed = 12; // '\f'.charCodeAt(0);
|
||||
|
||||
exports.feed = feed;
|
||||
var newline = 10; // '\n'.charCodeAt(0);
|
||||
|
||||
exports.newline = newline;
|
||||
var tab = 9; // '\t'.charCodeAt(0);
|
||||
// Expose aliases primarily for readability.
|
||||
|
||||
exports.tab = tab;
|
||||
var str = singleQuote; // No good single character representation!
|
||||
|
||||
exports.str = str;
|
||||
var comment = -1;
|
||||
exports.comment = comment;
|
||||
var word = -2;
|
||||
exports.word = word;
|
||||
var combinator = -3;
|
||||
exports.combinator = combinator;
|
||||
@@ -0,0 +1 @@
|
||||
{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"v0.10":{"start":"2013-03-11","end":"2016-10-31"},"v0.12":{"start":"2015-02-06","end":"2016-12-31"},"v4":{"start":"2015-09-08","lts":"2015-10-12","maintenance":"2017-04-01","end":"2018-04-30","codename":"Argon"},"v5":{"start":"2015-10-29","maintenance":"2016-04-30","end":"2016-06-30"},"v6":{"start":"2016-04-26","lts":"2016-10-18","maintenance":"2018-04-30","end":"2019-04-30","codename":"Boron"},"v7":{"start":"2016-10-25","maintenance":"2017-04-30","end":"2017-06-30"},"v8":{"start":"2017-05-30","lts":"2017-10-31","maintenance":"2019-01-01","end":"2019-12-31","codename":"Carbon"},"v9":{"start":"2017-10-01","maintenance":"2018-04-01","end":"2018-06-30"},"v10":{"start":"2018-04-24","lts":"2018-10-30","maintenance":"2020-05-19","end":"2021-04-30","codename":"Dubnium"},"v11":{"start":"2018-10-23","maintenance":"2019-04-22","end":"2019-06-01"},"v12":{"start":"2019-04-23","lts":"2019-10-21","maintenance":"2020-11-30","end":"2022-04-30","codename":"Erbium"},"v13":{"start":"2019-10-22","maintenance":"2020-04-01","end":"2020-06-01"},"v14":{"start":"2020-04-21","lts":"2020-10-27","maintenance":"2021-10-19","end":"2023-04-30","codename":"Fermium"},"v15":{"start":"2020-10-20","maintenance":"2021-04-01","end":"2021-06-01"},"v16":{"start":"2021-04-20","lts":"2021-10-26","maintenance":"2022-10-18","end":"2023-09-11","codename":"Gallium"},"v17":{"start":"2021-10-19","maintenance":"2022-04-01","end":"2022-06-01"},"v18":{"start":"2022-04-19","lts":"2022-10-25","maintenance":"2023-10-18","end":"2025-04-30","codename":"Hydrogen"},"v19":{"start":"2022-10-18","maintenance":"2023-04-01","end":"2023-06-01"},"v20":{"start":"2023-04-18","lts":"2023-10-24","maintenance":"2024-10-22","end":"2026-04-30","codename":""}}
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[808] = (function(){ var d = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,MAAM,GAAiB;IAClC,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,OAAO,EAAE,SAAS;IAClB,qCAAqC,EAAE,KAAK;IAC5C,wBAAwB,EAAE,KAAK;CAChC,CAAC"}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@types/html-minifier",
|
||||
"version": "4.0.2",
|
||||
"description": "TypeScript definitions for html-minifier",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/html-minifier",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Tanguy Krotoff",
|
||||
"url": "https://github.com/tkrotoff",
|
||||
"githubUsername": "tkrotoff"
|
||||
},
|
||||
{
|
||||
"name": "Piotr Błażejewicz",
|
||||
"url": "https://github.com/peterblazejewicz",
|
||||
"githubUsername": "peterblazejewicz"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/html-minifier"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {
|
||||
"@types/clean-css": "*",
|
||||
"@types/relateurl": "*",
|
||||
"@types/uglify-js": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "29f17b6687b32480776242fb86d8dfe4d4674e862bbc34983f8ef8cbd6c6200f",
|
||||
"typeScriptVersion": "3.8"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
var Symbol = require('./_Symbol'),
|
||||
getRawTag = require('./_getRawTag'),
|
||||
objectToString = require('./_objectToString');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var nullTag = '[object Null]',
|
||||
undefinedTag = '[object Undefined]';
|
||||
|
||||
/** Built-in value references. */
|
||||
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
||||
|
||||
/**
|
||||
* The base implementation of `getTag` without fallbacks for buggy environments.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to query.
|
||||
* @returns {string} Returns the `toStringTag`.
|
||||
*/
|
||||
function baseGetTag(value) {
|
||||
if (value == null) {
|
||||
return value === undefined ? undefinedTag : nullTag;
|
||||
}
|
||||
return (symToStringTag && symToStringTag in Object(value))
|
||||
? getRawTag(value)
|
||||
: objectToString(value);
|
||||
}
|
||||
|
||||
module.exports = baseGetTag;
|
||||
@@ -0,0 +1,178 @@
|
||||
import is from '@sindresorhus/is';
|
||||
// A hacky check to prevent circular references.
|
||||
function isRequest(x) {
|
||||
return is.object(x) && '_onResponse' in x;
|
||||
}
|
||||
/**
|
||||
An error to be thrown when a request fails.
|
||||
Contains a `code` property with error class code, like `ECONNREFUSED`.
|
||||
*/
|
||||
export class RequestError extends Error {
|
||||
constructor(message, error, self) {
|
||||
super(message);
|
||||
Object.defineProperty(this, "input", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, "code", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, "stack", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, "response", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, "request", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, "timings", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
this.name = 'RequestError';
|
||||
this.code = error.code ?? 'ERR_GOT_REQUEST_ERROR';
|
||||
this.input = error.input;
|
||||
if (isRequest(self)) {
|
||||
Object.defineProperty(this, 'request', {
|
||||
enumerable: false,
|
||||
value: self,
|
||||
});
|
||||
Object.defineProperty(this, 'response', {
|
||||
enumerable: false,
|
||||
value: self.response,
|
||||
});
|
||||
this.options = self.options;
|
||||
}
|
||||
else {
|
||||
this.options = self;
|
||||
}
|
||||
this.timings = this.request?.timings;
|
||||
// Recover the original stacktrace
|
||||
if (is.string(error.stack) && is.string(this.stack)) {
|
||||
const indexOfMessage = this.stack.indexOf(this.message) + this.message.length;
|
||||
const thisStackTrace = this.stack.slice(indexOfMessage).split('\n').reverse();
|
||||
const errorStackTrace = error.stack.slice(error.stack.indexOf(error.message) + error.message.length).split('\n').reverse();
|
||||
// Remove duplicated traces
|
||||
while (errorStackTrace.length > 0 && errorStackTrace[0] === thisStackTrace[0]) {
|
||||
thisStackTrace.shift();
|
||||
}
|
||||
this.stack = `${this.stack.slice(0, indexOfMessage)}${thisStackTrace.reverse().join('\n')}${errorStackTrace.reverse().join('\n')}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error to be thrown when the server redirects you more than ten times.
|
||||
Includes a `response` property.
|
||||
*/
|
||||
export class MaxRedirectsError extends RequestError {
|
||||
constructor(request) {
|
||||
super(`Redirected ${request.options.maxRedirects} times. Aborting.`, {}, request);
|
||||
this.name = 'MaxRedirectsError';
|
||||
this.code = 'ERR_TOO_MANY_REDIRECTS';
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error to be thrown when the server response code is not 2xx nor 3xx if `options.followRedirect` is `true`, but always except for 304.
|
||||
Includes a `response` property.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
export class HTTPError extends RequestError {
|
||||
constructor(response) {
|
||||
super(`Response code ${response.statusCode} (${response.statusMessage})`, {}, response.request);
|
||||
this.name = 'HTTPError';
|
||||
this.code = 'ERR_NON_2XX_3XX_RESPONSE';
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error to be thrown when a cache method fails.
|
||||
For example, if the database goes down or there's a filesystem error.
|
||||
*/
|
||||
export class CacheError extends RequestError {
|
||||
constructor(error, request) {
|
||||
super(error.message, error, request);
|
||||
this.name = 'CacheError';
|
||||
this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_CACHE_ACCESS' : this.code;
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error to be thrown when the request body is a stream and an error occurs while reading from that stream.
|
||||
*/
|
||||
export class UploadError extends RequestError {
|
||||
constructor(error, request) {
|
||||
super(error.message, error, request);
|
||||
this.name = 'UploadError';
|
||||
this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_UPLOAD' : this.code;
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error to be thrown when the request is aborted due to a timeout.
|
||||
Includes an `event` and `timings` property.
|
||||
*/
|
||||
export class TimeoutError extends RequestError {
|
||||
constructor(error, timings, request) {
|
||||
super(error.message, error, request);
|
||||
Object.defineProperty(this, "timings", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, "event", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
this.name = 'TimeoutError';
|
||||
this.event = error.event;
|
||||
this.timings = timings;
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error to be thrown when reading from response stream fails.
|
||||
*/
|
||||
export class ReadError extends RequestError {
|
||||
constructor(error, request) {
|
||||
super(error.message, error, request);
|
||||
this.name = 'ReadError';
|
||||
this.code = this.code === 'ERR_GOT_REQUEST_ERROR' ? 'ERR_READING_RESPONSE_STREAM' : this.code;
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error which always triggers a new retry when thrown.
|
||||
*/
|
||||
export class RetryError extends RequestError {
|
||||
constructor(request) {
|
||||
super('Retrying', {}, request);
|
||||
this.name = 'RetryError';
|
||||
this.code = 'ERR_RETRYING';
|
||||
}
|
||||
}
|
||||
/**
|
||||
An error to be thrown when the request is aborted by AbortController.
|
||||
*/
|
||||
export class AbortError extends RequestError {
|
||||
constructor(request) {
|
||||
super('This operation was aborted.', {}, request);
|
||||
this.code = 'ERR_ABORTED';
|
||||
this.name = 'AbortError';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
export function bufFromString(str: string): Buffer {
|
||||
const length = Buffer.byteLength(str);
|
||||
const buffer = Buffer.allocUnsafe
|
||||
? Buffer.allocUnsafe(length)
|
||||
: new Buffer(length);
|
||||
buffer.write(str);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
export function emptyBuffer(): Buffer{
|
||||
const buffer = Buffer.allocUnsafe
|
||||
? Buffer.allocUnsafe(0)
|
||||
: new Buffer(0);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
export function filterArray(arr: any[], filter: number[]): any[] {
|
||||
const rtn: any[] = [];
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (filter.indexOf(i) > -1) {
|
||||
rtn.push(arr[i]);
|
||||
}
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
||||
export const trimLeft=String.prototype.trimLeft?function trimLeftNative(str:string){
|
||||
return str.trimLeft();
|
||||
}:function trimLeftRegExp(str:string){
|
||||
return str.replace(/^\s+/, "");
|
||||
}
|
||||
|
||||
export const trimRight=String.prototype.trimRight?function trimRightNative(str:string){
|
||||
return str.trimRight();
|
||||
}:function trimRightRegExp(str:string){
|
||||
return str.replace(/\s+$/, "");
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"distinctUntilKeyChanged.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilKeyChanged.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACtF,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
||||
|
||||
@category Type
|
||||
*/
|
||||
export type Primitive =
|
||||
| null
|
||||
| undefined
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| symbol
|
||||
| bigint;
|
||||
@@ -0,0 +1,103 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ImportService = void 0;
|
||||
const request_1 = require("../core/request");
|
||||
class ImportService {
|
||||
/**
|
||||
* Post json
|
||||
* Create new runners from json and insert them into the provided group. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
|
||||
* @param group
|
||||
* @param requestBody ImportRunner
|
||||
* @result ResponseRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async importControllerPostJson(group, requestBody) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/runners/import`,
|
||||
query: {
|
||||
'group': group,
|
||||
},
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post orgs json
|
||||
* Create new runners from json and insert them into the provided org. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
|
||||
* @param id
|
||||
* @param requestBody ImportRunner
|
||||
* @result ResponseRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async importControllerPostOrgsJson(id, requestBody) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/organizations/${id}/import`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post teams json
|
||||
* Create new runners from json and insert them into the provided team
|
||||
* @param id
|
||||
* @param requestBody ImportRunner
|
||||
* @result ResponseRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async importControllerPostTeamsJson(id, requestBody) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/teams/${id}/import`,
|
||||
body: requestBody,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post csv
|
||||
* Create new runners from csv and insert them into the provided group. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
|
||||
* @param group
|
||||
* @result ResponseRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async importControllerPostCsv(group) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/runners/import/csv`,
|
||||
query: {
|
||||
'group': group,
|
||||
},
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post orgs csv
|
||||
* Create new runners from csv and insert them into the provided org. <br> If teams/classes are provided alongside the runner's name they'll automaticly be created under the provided org and the runners will be inserted into the teams instead.
|
||||
* @param id
|
||||
* @result ResponseRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async importControllerPostOrgsCsv(id) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/organizations/${id}/import/csv`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
/**
|
||||
* Post teams csv
|
||||
* Create new runners from csv and insert them into the provided team
|
||||
* @param id
|
||||
* @result ResponseRunner
|
||||
* @throws ApiError
|
||||
*/
|
||||
static async importControllerPostTeamsCsv(id) {
|
||||
const result = await (0, request_1.request)({
|
||||
method: 'POST',
|
||||
path: `/api/teams/${id}/import/csv`,
|
||||
});
|
||||
return result.body;
|
||||
}
|
||||
}
|
||||
exports.ImportService = ImportService;
|
||||
@@ -0,0 +1,102 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Code coverage report for csv2json/testNew/testErrorHandle.ts</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="../../prettify.css" />
|
||||
<link rel="stylesheet" href="../../base.css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type='text/css'>
|
||||
.coverage-summary .sorter {
|
||||
background-image: url(../../sort-arrow-sprite.png);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class='wrapper'>
|
||||
<div class='pad1'>
|
||||
<h1>
|
||||
<a href="../../index.html">All files</a> / <a href="index.html">csv2json/testNew</a> testErrorHandle.ts
|
||||
</h1>
|
||||
<div class='clearfix'>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Statements</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Branches</span>
|
||||
<span class='fraction'>0/0</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Functions</span>
|
||||
<span class='fraction'>2/2</span>
|
||||
</div>
|
||||
<div class='fl pad1y space-right2'>
|
||||
<span class="strong">100% </span>
|
||||
<span class="quiet">Lines</span>
|
||||
<span class='fraction'>12/12</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="quiet">
|
||||
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||
</p>
|
||||
</div>
|
||||
<div class='status-line high'></div>
|
||||
<pre><table class="coverage">
|
||||
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||
<a name='L2'></a><a href='#L2'>2</a>
|
||||
<a name='L3'></a><a href='#L3'>3</a>
|
||||
<a name='L4'></a><a href='#L4'>4</a>
|
||||
<a name='L5'></a><a href='#L5'>5</a>
|
||||
<a name='L6'></a><a href='#L6'>6</a>
|
||||
<a name='L7'></a><a href='#L7'>7</a>
|
||||
<a name='L8'></a><a href='#L8'>8</a>
|
||||
<a name='L9'></a><a href='#L9'>9</a>
|
||||
<a name='L10'></a><a href='#L10'>10</a>
|
||||
<a name='L11'></a><a href='#L11'>11</a>
|
||||
<a name='L12'></a><a href='#L12'>12</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span>
|
||||
<span class="cline-any cline-no">0</span></td><td class="text"><pre class="prettyprint lang-js">Unable to lookup source: /Users/kxiang/work/projects/csv2json/testNew/testErrorHandle.ts(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/testNew/testErrorHandle.ts')
|
||||
Error: Unable to lookup source: /Users/kxiang/work/projects/csv2json/testNew/testErrorHandle.ts(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/testNew/testErrorHandle.ts')
|
||||
at Context.defaultSourceLookup [as sourceFinder] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:15:15)
|
||||
at Context.getSource (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:74:17)
|
||||
at Object.annotateSourceCode (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/annotator.js:172:38)
|
||||
at HtmlReport.onDetail (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/index.js:237:39)
|
||||
at Visitor.(anonymous function) [as onDetail] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:34:30)
|
||||
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:123:17)
|
||||
at /Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:116:23
|
||||
at Array.forEach (native)
|
||||
at visitChildren (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:115:32)
|
||||
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:126:5)</pre></td></tr>
|
||||
</table></pre>
|
||||
<div class='push'></div><!-- for sticky footer -->
|
||||
</div><!-- /wrapper -->
|
||||
<div class='footer quiet pad2 space-top1 center small'>
|
||||
Code coverage
|
||||
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:36:07 GMT+0100 (IST)
|
||||
</div>
|
||||
</div>
|
||||
<script src="../../prettify.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
if (typeof prettyPrint === 'function') {
|
||||
prettyPrint();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="../../sorter.js"></script>
|
||||
<script src="../../block-navigation.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
var compose = require("es5-ext/function/#/compose")
|
||||
, callable = require("es5-ext/object/valid-callable")
|
||||
, d = require("d")
|
||||
, validTimeout = require("timers-ext/valid-timeout");
|
||||
|
||||
var chars = "-\\|/", l = chars.length, ThrobberIterator;
|
||||
|
||||
ThrobberIterator = function () {
|
||||
// no setup needed
|
||||
};
|
||||
Object.defineProperties(ThrobberIterator.prototype, {
|
||||
index: d(-1),
|
||||
running: d(false),
|
||||
next: d(function () {
|
||||
var str = this.running ? "\u0008" : "";
|
||||
if (!this.running) this.running = true;
|
||||
return str + chars[(this.index = (this.index + 1) % l)];
|
||||
}),
|
||||
reset: d(function () {
|
||||
if (!this.running) return "";
|
||||
this.index = -1;
|
||||
this.running = false;
|
||||
return "\u0008";
|
||||
})
|
||||
});
|
||||
|
||||
module.exports = exports = function (write, interval /*, format*/) {
|
||||
var format = arguments[2], token, iterator = new ThrobberIterator();
|
||||
callable(write);
|
||||
interval = validTimeout(interval);
|
||||
if (format !== undefined) write = compose.call(write, callable(format));
|
||||
return {
|
||||
start: function () {
|
||||
if (token) return;
|
||||
token = setInterval(function () { write(iterator.next()); }, interval);
|
||||
},
|
||||
restart: function () {
|
||||
this.stop();
|
||||
this.start();
|
||||
},
|
||||
stop: function () {
|
||||
if (!token) return;
|
||||
clearInterval(token);
|
||||
token = null;
|
||||
write(iterator.reset());
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Object.defineProperty(exports, "Iterator", d(ThrobberIterator));
|
||||
@@ -0,0 +1,86 @@
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
const Conf = require('./lib/conf');
|
||||
const _defaults = require('./lib/defaults');
|
||||
|
||||
// https://github.com/npm/cli/blob/latest/lib/config/core.js#L101-L200
|
||||
module.exports = (opts, types, defaults) => {
|
||||
const conf = new Conf(Object.assign({}, _defaults.defaults, defaults), types);
|
||||
|
||||
conf.add(Object.assign({}, opts), 'cli');
|
||||
const warnings = [];
|
||||
let failedToLoadBuiltInConfig = false;
|
||||
|
||||
if (require.resolve.paths) {
|
||||
const paths = require.resolve.paths('npm');
|
||||
// Assume that last path in resolve paths is builtin modules directory
|
||||
let npmPath;
|
||||
try {
|
||||
npmPath = require.resolve('npm', {paths: paths.slice(-1)});
|
||||
} catch (error) {
|
||||
// Error will be thrown if module cannot be found.
|
||||
// Update the flag while loading builtin config failed.
|
||||
failedToLoadBuiltInConfig = true;
|
||||
}
|
||||
|
||||
if (npmPath) {
|
||||
/**
|
||||
* According to https://github.com/npm/cli/blob/86f5bdb91f7a5971953a5171d32d6eeda6a2e972/lib/npm.js#L258
|
||||
* and https://github.com/npm/cli/blob/86f5bdb91f7a5971953a5171d32d6eeda6a2e972/lib/config/core.js#L92
|
||||
*/
|
||||
warnings.push(conf.addFile(path.resolve(path.dirname(npmPath), '..', 'npmrc'), 'builtin'));
|
||||
}
|
||||
}
|
||||
|
||||
conf.addEnv();
|
||||
conf.loadPrefix();
|
||||
|
||||
const projectConf = path.resolve(conf.localPrefix, '.npmrc');
|
||||
const userConf = conf.get('userconfig');
|
||||
|
||||
if (!conf.get('global') && projectConf !== userConf) {
|
||||
warnings.push(conf.addFile(projectConf, 'project'));
|
||||
} else {
|
||||
conf.add({}, 'project');
|
||||
}
|
||||
|
||||
// TODO: cover with tests that configs from workspace .npmrc have bigger priority
|
||||
// than the ones in userconfig
|
||||
if (conf.get('workspace-prefix') && conf.get('workspace-prefix') !== projectConf) {
|
||||
const workspaceConf = path.resolve(conf.get('workspace-prefix'), '.npmrc');
|
||||
warnings.push(conf.addFile(workspaceConf, 'workspace'));
|
||||
}
|
||||
|
||||
warnings.push(conf.addFile(conf.get('userconfig'), 'user'));
|
||||
|
||||
if (conf.get('prefix')) {
|
||||
const etc = path.resolve(conf.get('prefix'), 'etc');
|
||||
conf.root.globalconfig = path.resolve(etc, 'npmrc');
|
||||
conf.root.globalignorefile = path.resolve(etc, 'npmignore');
|
||||
}
|
||||
|
||||
warnings.push(conf.addFile(conf.get('globalconfig'), 'global'));
|
||||
if (conf.get('globalPnpmConfig')) {
|
||||
warnings.push(conf.addFile(conf.get('globalPnpmConfig'), 'pnpm-global'));
|
||||
}
|
||||
conf.loadUser();
|
||||
|
||||
const caFile = conf.get('cafile');
|
||||
|
||||
if (caFile) {
|
||||
conf.loadCAFile(caFile);
|
||||
}
|
||||
|
||||
return {
|
||||
config: conf,
|
||||
warnings: warnings.filter(Boolean),
|
||||
failedToLoadBuiltInConfig,
|
||||
};
|
||||
};
|
||||
|
||||
Object.defineProperty(module.exports, 'defaults', {
|
||||
get() {
|
||||
return _defaults.defaults;
|
||||
},
|
||||
enumerable: true
|
||||
})
|
||||
@@ -0,0 +1,25 @@
|
||||
import { h, JSX } from 'preact';
|
||||
import { BaseComponent, BaseProps } from '../base';
|
||||
import { CSSDeclaration, TColumn } from '../../types';
|
||||
export interface THProps
|
||||
extends BaseProps,
|
||||
JSX.HTMLAttributes<HTMLTableCellElement> {
|
||||
index: number;
|
||||
column: TColumn;
|
||||
style?: CSSDeclaration;
|
||||
}
|
||||
export interface THState {
|
||||
style: CSSDeclaration;
|
||||
}
|
||||
export declare class TH extends BaseComponent<THProps, THState> {
|
||||
private sortRef;
|
||||
private thRef;
|
||||
constructor(props: any, context: any);
|
||||
private isSortable;
|
||||
private onClick;
|
||||
private keyDown;
|
||||
componentDidMount(): void;
|
||||
private content;
|
||||
private getCustomAttributes;
|
||||
render(): h.JSX.Element;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"100": "Continue",
|
||||
"101": "Switching Protocols",
|
||||
"102": "Processing",
|
||||
"103": "Early Hints",
|
||||
"200": "OK",
|
||||
"201": "Created",
|
||||
"202": "Accepted",
|
||||
"203": "Non-Authoritative Information",
|
||||
"204": "No Content",
|
||||
"205": "Reset Content",
|
||||
"206": "Partial Content",
|
||||
"207": "Multi-Status",
|
||||
"208": "Already Reported",
|
||||
"226": "IM Used",
|
||||
"300": "Multiple Choices",
|
||||
"301": "Moved Permanently",
|
||||
"302": "Found",
|
||||
"303": "See Other",
|
||||
"304": "Not Modified",
|
||||
"305": "Use Proxy",
|
||||
"307": "Temporary Redirect",
|
||||
"308": "Permanent Redirect",
|
||||
"400": "Bad Request",
|
||||
"401": "Unauthorized",
|
||||
"402": "Payment Required",
|
||||
"403": "Forbidden",
|
||||
"404": "Not Found",
|
||||
"405": "Method Not Allowed",
|
||||
"406": "Not Acceptable",
|
||||
"407": "Proxy Authentication Required",
|
||||
"408": "Request Timeout",
|
||||
"409": "Conflict",
|
||||
"410": "Gone",
|
||||
"411": "Length Required",
|
||||
"412": "Precondition Failed",
|
||||
"413": "Payload Too Large",
|
||||
"414": "URI Too Long",
|
||||
"415": "Unsupported Media Type",
|
||||
"416": "Range Not Satisfiable",
|
||||
"417": "Expectation Failed",
|
||||
"418": "I'm a Teapot",
|
||||
"421": "Misdirected Request",
|
||||
"422": "Unprocessable Entity",
|
||||
"423": "Locked",
|
||||
"424": "Failed Dependency",
|
||||
"425": "Too Early",
|
||||
"426": "Upgrade Required",
|
||||
"428": "Precondition Required",
|
||||
"429": "Too Many Requests",
|
||||
"431": "Request Header Fields Too Large",
|
||||
"451": "Unavailable For Legal Reasons",
|
||||
"500": "Internal Server Error",
|
||||
"501": "Not Implemented",
|
||||
"502": "Bad Gateway",
|
||||
"503": "Service Unavailable",
|
||||
"504": "Gateway Timeout",
|
||||
"505": "HTTP Version Not Supported",
|
||||
"506": "Variant Also Negotiates",
|
||||
"507": "Insufficient Storage",
|
||||
"508": "Loop Detected",
|
||||
"509": "Bandwidth Limit Exceeded",
|
||||
"510": "Not Extended",
|
||||
"511": "Network Authentication Required"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = blacklist;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function blacklist(str, chars) {
|
||||
(0, _assertString.default)(str);
|
||||
return str.replace(new RegExp("[".concat(chars, "]+"), 'g'), '');
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,34 @@
|
||||
module.exports = {
|
||||
'attempt': require('./attempt'),
|
||||
'bindAll': require('./bindAll'),
|
||||
'cond': require('./cond'),
|
||||
'conforms': require('./conforms'),
|
||||
'constant': require('./constant'),
|
||||
'defaultTo': require('./defaultTo'),
|
||||
'flow': require('./flow'),
|
||||
'flowRight': require('./flowRight'),
|
||||
'identity': require('./identity'),
|
||||
'iteratee': require('./iteratee'),
|
||||
'matches': require('./matches'),
|
||||
'matchesProperty': require('./matchesProperty'),
|
||||
'method': require('./method'),
|
||||
'methodOf': require('./methodOf'),
|
||||
'mixin': require('./mixin'),
|
||||
'noop': require('./noop'),
|
||||
'nthArg': require('./nthArg'),
|
||||
'over': require('./over'),
|
||||
'overEvery': require('./overEvery'),
|
||||
'overSome': require('./overSome'),
|
||||
'property': require('./property'),
|
||||
'propertyOf': require('./propertyOf'),
|
||||
'range': require('./range'),
|
||||
'rangeRight': require('./rangeRight'),
|
||||
'stubArray': require('./stubArray'),
|
||||
'stubFalse': require('./stubFalse'),
|
||||
'stubObject': require('./stubObject'),
|
||||
'stubString': require('./stubString'),
|
||||
'stubTrue': require('./stubTrue'),
|
||||
'times': require('./times'),
|
||||
'toPath': require('./toPath'),
|
||||
'uniqueId': require('./uniqueId')
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* This function takes one parameter and just returns it. Simply put,
|
||||
* this is like `<T>(x: T): T => x`.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* This is useful in some cases when using things like `mergeMap`
|
||||
*
|
||||
* ```ts
|
||||
* import { interval, take, map, range, mergeMap, identity } from 'rxjs';
|
||||
*
|
||||
* const source$ = interval(1000).pipe(take(5));
|
||||
*
|
||||
* const result$ = source$.pipe(
|
||||
* map(i => range(i)),
|
||||
* mergeMap(identity) // same as mergeMap(x => x)
|
||||
* );
|
||||
*
|
||||
* result$.subscribe({
|
||||
* next: console.log
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* Or when you want to selectively apply an operator
|
||||
*
|
||||
* ```ts
|
||||
* import { interval, take, identity } from 'rxjs';
|
||||
*
|
||||
* const shouldLimit = () => Math.random() < 0.5;
|
||||
*
|
||||
* const source$ = interval(1000);
|
||||
*
|
||||
* const result$ = source$.pipe(shouldLimit() ? take(5) : identity);
|
||||
*
|
||||
* result$.subscribe({
|
||||
* next: console.log
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @param x Any value that is returned by this function
|
||||
* @returns The value passed as the first parameter to this function
|
||||
*/
|
||||
export function identity<T>(x: T): T {
|
||||
return x;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
var baseCreate = require('./_baseCreate'),
|
||||
baseLodash = require('./_baseLodash');
|
||||
|
||||
/**
|
||||
* The base constructor for creating `lodash` wrapper objects.
|
||||
*
|
||||
* @private
|
||||
* @param {*} value The value to wrap.
|
||||
* @param {boolean} [chainAll] Enable explicit method chain sequences.
|
||||
*/
|
||||
function LodashWrapper(value, chainAll) {
|
||||
this.__wrapped__ = value;
|
||||
this.__actions__ = [];
|
||||
this.__chain__ = !!chainAll;
|
||||
this.__index__ = 0;
|
||||
this.__values__ = undefined;
|
||||
}
|
||||
|
||||
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
|
||||
LodashWrapper.prototype.constructor = LodashWrapper;
|
||||
|
||||
module.exports = LodashWrapper;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,88 @@
|
||||
import { get_store_value } from 'svelte/internal';
|
||||
/** Callback to inform of a value updates. */
|
||||
export declare type Subscriber<T> = (value: T) => void;
|
||||
/** Unsubscribes from value updates. */
|
||||
export declare type Unsubscriber = () => void;
|
||||
/** Callback to update a value. */
|
||||
export declare type Updater<T> = (value: T) => T;
|
||||
/** Cleanup logic callback. */
|
||||
declare type Invalidator<T> = (value?: T) => void;
|
||||
/** Start and stop notification callbacks. */
|
||||
export declare type StartStopNotifier<T> = (set: Subscriber<T>) => Unsubscriber | void;
|
||||
/** Readable interface for subscribing. */
|
||||
export interface Readable<T> {
|
||||
/**
|
||||
* Subscribe on value changes.
|
||||
* @param run subscription callback
|
||||
* @param invalidate cleanup callback
|
||||
*/
|
||||
subscribe(this: void, run: Subscriber<T>, invalidate?: Invalidator<T>): Unsubscriber;
|
||||
}
|
||||
/** Writable interface for both updating and subscribing. */
|
||||
export interface Writable<T> extends Readable<T> {
|
||||
/**
|
||||
* Set value and inform subscribers.
|
||||
* @param value to set
|
||||
*/
|
||||
set(this: void, value: T): void;
|
||||
/**
|
||||
* Update value using callback and inform subscribers.
|
||||
* @param updater callback
|
||||
*/
|
||||
update(this: void, updater: Updater<T>): void;
|
||||
}
|
||||
/**
|
||||
* Creates a `Readable` store that allows reading by subscription.
|
||||
* @param value initial value
|
||||
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
||||
*/
|
||||
export declare function readable<T>(value?: T, start?: StartStopNotifier<T>): Readable<T>;
|
||||
/**
|
||||
* Create a `Writable` store that allows both updating and reading by subscription.
|
||||
* @param {*=}value initial value
|
||||
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
||||
*/
|
||||
export declare function writable<T>(value?: T, start?: StartStopNotifier<T>): Writable<T>;
|
||||
/** One or more `Readable`s. */
|
||||
declare type Stores = Readable<any> | [Readable<any>, ...Array<Readable<any>>] | Array<Readable<any>>;
|
||||
/** One or more values from `Readable` stores. */
|
||||
declare type StoresValues<T> = T extends Readable<infer U> ? U : {
|
||||
[K in keyof T]: T[K] extends Readable<infer U> ? U : never;
|
||||
};
|
||||
/**
|
||||
* Derived value store by synchronizing one or more readable stores and
|
||||
* applying an aggregation function over its input values.
|
||||
*
|
||||
* @param stores - input stores
|
||||
* @param fn - function callback that aggregates the values
|
||||
* @param initial_value - when used asynchronously
|
||||
*/
|
||||
export declare function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>, set: (value: T) => void) => Unsubscriber | void, initial_value?: T): Readable<T>;
|
||||
/**
|
||||
* Derived value store by synchronizing one or more readable stores and
|
||||
* applying an aggregation function over its input values.
|
||||
*
|
||||
* @param stores - input stores
|
||||
* @param fn - function callback that aggregates the values
|
||||
* @param initial_value - initial value
|
||||
*/
|
||||
export declare function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T, initial_value?: T): Readable<T>;
|
||||
/**
|
||||
* Derived value store by synchronizing one or more readable stores and
|
||||
* applying an aggregation function over its input values.
|
||||
*
|
||||
* @param stores - input stores
|
||||
* @param fn - function callback that aggregates the values
|
||||
*/
|
||||
export declare function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T): Readable<T>;
|
||||
/**
|
||||
* Takes a store and returns a new one derived from the old one that is readable.
|
||||
*
|
||||
* @param store - store to make readonly
|
||||
*/
|
||||
export declare function readonly<T>(store: Readable<T>): Readable<T>;
|
||||
/**
|
||||
* Get the current value from a store by subscribing and immediately unsubscribing.
|
||||
* @param store readable
|
||||
*/
|
||||
export { get_store_value as get };
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"dateTimestampProvider.d.ts","sourceRoot":"","sources":["../../../../src/internal/scheduler/dateTimestampProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,UAAU,qBAAsB,SAAQ,iBAAiB;IACvD,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACzC;AAED,eAAO,MAAM,qBAAqB,EAAE,qBAOnC,CAAC"}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D CC","260":"F","1026":"E"},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 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","4":"DC tB EC FC","132":"I v J D E F A B C K L G M N O w g"},D:{"1":"0 1 2 3 4 5 6 7 8 9 z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB 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","4":"I v J D E F A B C K L G M N O","132":"w g x y"},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","4":"I v HC zB IC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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","4":"F B C PC QC RC SC qB AC TC","132":"rB"},G:{"1":"E 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","4":"zB UC BC VC"},H:{"132":"oC"},I:{"1":"f tC uC","4":"tB pC qC rC","132":"sC BC","900":"I"},J:{"1":"A","4":"D"},K:{"1":"h","4":"A B C qB AC","132":"rB"},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:6,C:"ECMAScript 5"};
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "mri",
|
||||
"version": "1.2.0",
|
||||
"description": "Quickly scan for CLI flags and arguments",
|
||||
"repository": "lukeed/mri",
|
||||
"module": "lib/index.mjs",
|
||||
"main": "lib/index.js",
|
||||
"types": "index.d.ts",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"*.d.ts",
|
||||
"lib"
|
||||
],
|
||||
"author": {
|
||||
"name": "Luke Edwards",
|
||||
"email": "luke.edwards05@gmail.com",
|
||||
"url": "https://lukeed.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "bundt",
|
||||
"bench": "node bench",
|
||||
"pretest": "npm run build",
|
||||
"test": "tape test/*.js | tap-spec"
|
||||
},
|
||||
"keywords": [
|
||||
"argv",
|
||||
"arguments",
|
||||
"cli",
|
||||
"minimist",
|
||||
"options",
|
||||
"optimist",
|
||||
"parser",
|
||||
"args"
|
||||
],
|
||||
"devDependencies": {
|
||||
"bundt": "1.0.2",
|
||||
"tap-spec": "4.1.2",
|
||||
"tape": "4.13.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('isString', require('../isString'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,3 @@
|
||||
const compare = require('./compare')
|
||||
const neq = (a, b, loose) => compare(a, b, loose) !== 0
|
||||
module.exports = neq
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"262.d.ts","sourceRoot":"","sources":["../../../../../packages/ecma402-abstract/262.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAM3C;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAiBzC;AAwBD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,UAQpC;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,GAAG,EAAE,CAAC,GACL,CAAC,SAAS,IAAI,GAAG,KAAK,GAAG,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAK1D;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,WAYvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,SAEtC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,WAErD;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,GAAG,uGAyB1B;AAcD;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,UAE5B;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,UAEhC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAEpC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAErC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAErC;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,aAWnC;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,UAEtC;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,CAE3C;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,mDAwCtC;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAyCrC;AASD,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,UAErC;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAEpC;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAEpC;AAMD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,GAAG,EACN,aAAa,CAAC,EAAE;IAAC,mBAAmB,EAAE,GAAG,CAAA;CAAC,WAmB3C;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE5C"}
|
||||
@@ -0,0 +1,10 @@
|
||||
/***
|
||||
* Node External Editor
|
||||
*
|
||||
* Kevin Gravier <kevin@mrkmg.com>
|
||||
* MIT 2018
|
||||
*/
|
||||
export declare class RemoveFileError extends Error {
|
||||
originalError: Error;
|
||||
constructor(originalError: Error);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { MonoTypeOperatorFunction, ObservableInput } from '../types';
|
||||
/**
|
||||
* Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable
|
||||
* calls `error`, this method will emit the Throwable that caused the error to the `ObservableInput` returned from `notifier`.
|
||||
* If that Observable calls `complete` or `error` then this method will call `complete` or `error` on the child
|
||||
* subscription. Otherwise this method will resubscribe to the source Observable.
|
||||
*
|
||||
* 
|
||||
*
|
||||
* Retry an observable sequence on error based on custom criteria.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* ```ts
|
||||
* import { interval, map, retryWhen, tap, delayWhen, timer } from 'rxjs';
|
||||
*
|
||||
* const source = interval(1000);
|
||||
* const result = source.pipe(
|
||||
* map(value => {
|
||||
* if (value > 5) {
|
||||
* // error will be picked up by retryWhen
|
||||
* throw value;
|
||||
* }
|
||||
* return value;
|
||||
* }),
|
||||
* retryWhen(errors =>
|
||||
* errors.pipe(
|
||||
* // log error message
|
||||
* tap(value => console.log(`Value ${ value } was too high!`)),
|
||||
* // restart in 5 seconds
|
||||
* delayWhen(value => timer(value * 1000))
|
||||
* )
|
||||
* )
|
||||
* );
|
||||
*
|
||||
* result.subscribe(value => console.log(value));
|
||||
*
|
||||
* // results:
|
||||
* // 0
|
||||
* // 1
|
||||
* // 2
|
||||
* // 3
|
||||
* // 4
|
||||
* // 5
|
||||
* // 'Value 6 was too high!'
|
||||
* // - Wait 5 seconds then repeat
|
||||
* ```
|
||||
*
|
||||
* @see {@link retry}
|
||||
*
|
||||
* @param notifier Function that receives an Observable of notifications with which a
|
||||
* user can `complete` or `error`, aborting the retry.
|
||||
* @return A function that returns an `ObservableInput` that mirrors the source
|
||||
* Observable with the exception of an `error`.
|
||||
* @deprecated Will be removed in v9 or v10, use {@link retry}'s `delay` option instead.
|
||||
* Will be removed in v9 or v10. Use {@link retry}'s {@link RetryConfig#delay delay} option instead.
|
||||
* Instead of `retryWhen(() => notify$)`, use: `retry({ delay: () => notify$ })`.
|
||||
*/
|
||||
export declare function retryWhen<T>(notifier: (errors: Observable<any>) => ObservableInput<any>): MonoTypeOperatorFunction<T>;
|
||||
//# sourceMappingURL=retryWhen.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"min.js","sourceRoot":"","sources":["../../../../src/internal/operators/min.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAgDhD,MAAM,UAAU,GAAG,CAAI,QAAiC;IACtD,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAA5B,CAA4B,CAAC,CAAC,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAf,CAAe,CAAC,CAAC;AAC3G,CAAC"}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "@babel/code-frame",
|
||||
"version": "7.18.6",
|
||||
"description": "Generate errors that contain a code frame that point to source locations.",
|
||||
"author": "The Babel Team (https://babel.dev/team)",
|
||||
"homepage": "https://babel.dev/docs/en/next/babel-code-frame",
|
||||
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-code-frame"
|
||||
},
|
||||
"main": "./lib/index.js",
|
||||
"dependencies": {
|
||||
"@babel/highlight": "^7.18.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chalk": "^2.0.0",
|
||||
"chalk": "^2.0.0",
|
||||
"strip-ansi": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
},
|
||||
"type": "commonjs"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function () {
|
||||
var atanh = Math.atanh;
|
||||
if (typeof atanh !== "function") return false;
|
||||
return Math.round(atanh(0.5) * 1e15) === 549306144334055;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"BestFitMatcher.d.ts","sourceRoot":"","sources":["../../../../../../packages/intl-localematcher/abstract/BestFitMatcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAG3C;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,EAC7B,gBAAgB,EAAE,MAAM,EAAE,EAC1B,gBAAgB,EAAE,MAAM,MAAM,GAC7B,mBAAmB,CAiErB"}
|
||||
@@ -0,0 +1,115 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isStrongPassword;
|
||||
|
||||
var _merge = _interopRequireDefault(require("./util/merge"));
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var upperCaseRegex = /^[A-Z]$/;
|
||||
var lowerCaseRegex = /^[a-z]$/;
|
||||
var numberRegex = /^[0-9]$/;
|
||||
var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/;
|
||||
var defaultOptions = {
|
||||
minLength: 8,
|
||||
minLowercase: 1,
|
||||
minUppercase: 1,
|
||||
minNumbers: 1,
|
||||
minSymbols: 1,
|
||||
returnScore: false,
|
||||
pointsPerUnique: 1,
|
||||
pointsPerRepeat: 0.5,
|
||||
pointsForContainingLower: 10,
|
||||
pointsForContainingUpper: 10,
|
||||
pointsForContainingNumber: 10,
|
||||
pointsForContainingSymbol: 10
|
||||
};
|
||||
/* Counts number of occurrences of each char in a string
|
||||
* could be moved to util/ ?
|
||||
*/
|
||||
|
||||
function countChars(str) {
|
||||
var result = {};
|
||||
Array.from(str).forEach(function (char) {
|
||||
var curVal = result[char];
|
||||
|
||||
if (curVal) {
|
||||
result[char] += 1;
|
||||
} else {
|
||||
result[char] = 1;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
/* Return information about a password */
|
||||
|
||||
|
||||
function analyzePassword(password) {
|
||||
var charMap = countChars(password);
|
||||
var analysis = {
|
||||
length: password.length,
|
||||
uniqueChars: Object.keys(charMap).length,
|
||||
uppercaseCount: 0,
|
||||
lowercaseCount: 0,
|
||||
numberCount: 0,
|
||||
symbolCount: 0
|
||||
};
|
||||
Object.keys(charMap).forEach(function (char) {
|
||||
/* istanbul ignore else */
|
||||
if (upperCaseRegex.test(char)) {
|
||||
analysis.uppercaseCount += charMap[char];
|
||||
} else if (lowerCaseRegex.test(char)) {
|
||||
analysis.lowercaseCount += charMap[char];
|
||||
} else if (numberRegex.test(char)) {
|
||||
analysis.numberCount += charMap[char];
|
||||
} else if (symbolRegex.test(char)) {
|
||||
analysis.symbolCount += charMap[char];
|
||||
}
|
||||
});
|
||||
return analysis;
|
||||
}
|
||||
|
||||
function scorePassword(analysis, scoringOptions) {
|
||||
var points = 0;
|
||||
points += analysis.uniqueChars * scoringOptions.pointsPerUnique;
|
||||
points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat;
|
||||
|
||||
if (analysis.lowercaseCount > 0) {
|
||||
points += scoringOptions.pointsForContainingLower;
|
||||
}
|
||||
|
||||
if (analysis.uppercaseCount > 0) {
|
||||
points += scoringOptions.pointsForContainingUpper;
|
||||
}
|
||||
|
||||
if (analysis.numberCount > 0) {
|
||||
points += scoringOptions.pointsForContainingNumber;
|
||||
}
|
||||
|
||||
if (analysis.symbolCount > 0) {
|
||||
points += scoringOptions.pointsForContainingSymbol;
|
||||
}
|
||||
|
||||
return points;
|
||||
}
|
||||
|
||||
function isStrongPassword(str) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
||||
(0, _assertString.default)(str);
|
||||
var analysis = analyzePassword(str);
|
||||
options = (0, _merge.default)(options || {}, defaultOptions);
|
||||
|
||||
if (options.returnScore) {
|
||||
return scorePassword(analysis, options);
|
||||
}
|
||||
|
||||
return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols;
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,300 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseNumberSkeleton = exports.parseNumberSkeletonFromString = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
var regex_generated_1 = require("./regex.generated");
|
||||
function parseNumberSkeletonFromString(skeleton) {
|
||||
if (skeleton.length === 0) {
|
||||
throw new Error('Number skeleton cannot be empty');
|
||||
}
|
||||
// Parse the skeleton
|
||||
var stringTokens = skeleton
|
||||
.split(regex_generated_1.WHITE_SPACE_REGEX)
|
||||
.filter(function (x) { return x.length > 0; });
|
||||
var tokens = [];
|
||||
for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {
|
||||
var stringToken = stringTokens_1[_i];
|
||||
var stemAndOptions = stringToken.split('/');
|
||||
if (stemAndOptions.length === 0) {
|
||||
throw new Error('Invalid number skeleton');
|
||||
}
|
||||
var stem = stemAndOptions[0], options = stemAndOptions.slice(1);
|
||||
for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {
|
||||
var option = options_1[_a];
|
||||
if (option.length === 0) {
|
||||
throw new Error('Invalid number skeleton');
|
||||
}
|
||||
}
|
||||
tokens.push({ stem: stem, options: options });
|
||||
}
|
||||
return tokens;
|
||||
}
|
||||
exports.parseNumberSkeletonFromString = parseNumberSkeletonFromString;
|
||||
function icuUnitToEcma(unit) {
|
||||
return unit.replace(/^(.*?)-/, '');
|
||||
}
|
||||
var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
||||
var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?[rs]?$/g;
|
||||
var INTEGER_WIDTH_REGEX = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
||||
var CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;
|
||||
function parseSignificantPrecision(str) {
|
||||
var result = {};
|
||||
if (str[str.length - 1] === 'r') {
|
||||
result.roundingPriority = 'morePrecision';
|
||||
}
|
||||
else if (str[str.length - 1] === 's') {
|
||||
result.roundingPriority = 'lessPrecision';
|
||||
}
|
||||
str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
|
||||
// @@@ case
|
||||
if (typeof g2 !== 'string') {
|
||||
result.minimumSignificantDigits = g1.length;
|
||||
result.maximumSignificantDigits = g1.length;
|
||||
}
|
||||
// @@@+ case
|
||||
else if (g2 === '+') {
|
||||
result.minimumSignificantDigits = g1.length;
|
||||
}
|
||||
// .### case
|
||||
else if (g1[0] === '#') {
|
||||
result.maximumSignificantDigits = g1.length;
|
||||
}
|
||||
// .@@## or .@@@ case
|
||||
else {
|
||||
result.minimumSignificantDigits = g1.length;
|
||||
result.maximumSignificantDigits =
|
||||
g1.length + (typeof g2 === 'string' ? g2.length : 0);
|
||||
}
|
||||
return '';
|
||||
});
|
||||
return result;
|
||||
}
|
||||
function parseSign(str) {
|
||||
switch (str) {
|
||||
case 'sign-auto':
|
||||
return {
|
||||
signDisplay: 'auto',
|
||||
};
|
||||
case 'sign-accounting':
|
||||
case '()':
|
||||
return {
|
||||
currencySign: 'accounting',
|
||||
};
|
||||
case 'sign-always':
|
||||
case '+!':
|
||||
return {
|
||||
signDisplay: 'always',
|
||||
};
|
||||
case 'sign-accounting-always':
|
||||
case '()!':
|
||||
return {
|
||||
signDisplay: 'always',
|
||||
currencySign: 'accounting',
|
||||
};
|
||||
case 'sign-except-zero':
|
||||
case '+?':
|
||||
return {
|
||||
signDisplay: 'exceptZero',
|
||||
};
|
||||
case 'sign-accounting-except-zero':
|
||||
case '()?':
|
||||
return {
|
||||
signDisplay: 'exceptZero',
|
||||
currencySign: 'accounting',
|
||||
};
|
||||
case 'sign-never':
|
||||
case '+_':
|
||||
return {
|
||||
signDisplay: 'never',
|
||||
};
|
||||
}
|
||||
}
|
||||
function parseConciseScientificAndEngineeringStem(stem) {
|
||||
// Engineering
|
||||
var result;
|
||||
if (stem[0] === 'E' && stem[1] === 'E') {
|
||||
result = {
|
||||
notation: 'engineering',
|
||||
};
|
||||
stem = stem.slice(2);
|
||||
}
|
||||
else if (stem[0] === 'E') {
|
||||
result = {
|
||||
notation: 'scientific',
|
||||
};
|
||||
stem = stem.slice(1);
|
||||
}
|
||||
if (result) {
|
||||
var signDisplay = stem.slice(0, 2);
|
||||
if (signDisplay === '+!') {
|
||||
result.signDisplay = 'always';
|
||||
stem = stem.slice(2);
|
||||
}
|
||||
else if (signDisplay === '+?') {
|
||||
result.signDisplay = 'exceptZero';
|
||||
stem = stem.slice(2);
|
||||
}
|
||||
if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {
|
||||
throw new Error('Malformed concise eng/scientific notation');
|
||||
}
|
||||
result.minimumIntegerDigits = stem.length;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function parseNotationOptions(opt) {
|
||||
var result = {};
|
||||
var signOpts = parseSign(opt);
|
||||
if (signOpts) {
|
||||
return signOpts;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
|
||||
*/
|
||||
function parseNumberSkeleton(tokens) {
|
||||
var result = {};
|
||||
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
|
||||
var token = tokens_1[_i];
|
||||
switch (token.stem) {
|
||||
case 'percent':
|
||||
case '%':
|
||||
result.style = 'percent';
|
||||
continue;
|
||||
case '%x100':
|
||||
result.style = 'percent';
|
||||
result.scale = 100;
|
||||
continue;
|
||||
case 'currency':
|
||||
result.style = 'currency';
|
||||
result.currency = token.options[0];
|
||||
continue;
|
||||
case 'group-off':
|
||||
case ',_':
|
||||
result.useGrouping = false;
|
||||
continue;
|
||||
case 'precision-integer':
|
||||
case '.':
|
||||
result.maximumFractionDigits = 0;
|
||||
continue;
|
||||
case 'measure-unit':
|
||||
case 'unit':
|
||||
result.style = 'unit';
|
||||
result.unit = icuUnitToEcma(token.options[0]);
|
||||
continue;
|
||||
case 'compact-short':
|
||||
case 'K':
|
||||
result.notation = 'compact';
|
||||
result.compactDisplay = 'short';
|
||||
continue;
|
||||
case 'compact-long':
|
||||
case 'KK':
|
||||
result.notation = 'compact';
|
||||
result.compactDisplay = 'long';
|
||||
continue;
|
||||
case 'scientific':
|
||||
result = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, all), parseNotationOptions(opt))); }, {}));
|
||||
continue;
|
||||
case 'engineering':
|
||||
result = (0, tslib_1.__assign)((0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return ((0, tslib_1.__assign)((0, tslib_1.__assign)({}, all), parseNotationOptions(opt))); }, {}));
|
||||
continue;
|
||||
case 'notation-simple':
|
||||
result.notation = 'standard';
|
||||
continue;
|
||||
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
|
||||
case 'unit-width-narrow':
|
||||
result.currencyDisplay = 'narrowSymbol';
|
||||
result.unitDisplay = 'narrow';
|
||||
continue;
|
||||
case 'unit-width-short':
|
||||
result.currencyDisplay = 'code';
|
||||
result.unitDisplay = 'short';
|
||||
continue;
|
||||
case 'unit-width-full-name':
|
||||
result.currencyDisplay = 'name';
|
||||
result.unitDisplay = 'long';
|
||||
continue;
|
||||
case 'unit-width-iso-code':
|
||||
result.currencyDisplay = 'symbol';
|
||||
continue;
|
||||
case 'scale':
|
||||
result.scale = parseFloat(token.options[0]);
|
||||
continue;
|
||||
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
||||
case 'integer-width':
|
||||
if (token.options.length > 1) {
|
||||
throw new RangeError('integer-width stems only accept a single optional option');
|
||||
}
|
||||
token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {
|
||||
if (g1) {
|
||||
result.minimumIntegerDigits = g2.length;
|
||||
}
|
||||
else if (g3 && g4) {
|
||||
throw new Error('We currently do not support maximum integer digits');
|
||||
}
|
||||
else if (g5) {
|
||||
throw new Error('We currently do not support exact integer digits');
|
||||
}
|
||||
return '';
|
||||
});
|
||||
continue;
|
||||
}
|
||||
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width
|
||||
if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {
|
||||
result.minimumIntegerDigits = token.stem.length;
|
||||
continue;
|
||||
}
|
||||
if (FRACTION_PRECISION_REGEX.test(token.stem)) {
|
||||
// Precision
|
||||
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision
|
||||
// precision-integer case
|
||||
if (token.options.length > 1) {
|
||||
throw new RangeError('Fraction-precision stems only accept a single optional option');
|
||||
}
|
||||
token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {
|
||||
// .000* case (before ICU67 it was .000+)
|
||||
if (g2 === '*') {
|
||||
result.minimumFractionDigits = g1.length;
|
||||
}
|
||||
// .### case
|
||||
else if (g3 && g3[0] === '#') {
|
||||
result.maximumFractionDigits = g3.length;
|
||||
}
|
||||
// .00## case
|
||||
else if (g4 && g5) {
|
||||
result.minimumFractionDigits = g4.length;
|
||||
result.maximumFractionDigits = g4.length + g5.length;
|
||||
}
|
||||
else {
|
||||
result.minimumFractionDigits = g1.length;
|
||||
result.maximumFractionDigits = g1.length;
|
||||
}
|
||||
return '';
|
||||
});
|
||||
var opt = token.options[0];
|
||||
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display
|
||||
if (opt === 'w') {
|
||||
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), { trailingZeroDisplay: 'stripIfInteger' });
|
||||
}
|
||||
else if (opt) {
|
||||
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), parseSignificantPrecision(opt));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision
|
||||
if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
|
||||
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), parseSignificantPrecision(token.stem));
|
||||
continue;
|
||||
}
|
||||
var signOpts = parseSign(token.stem);
|
||||
if (signOpts) {
|
||||
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), signOpts);
|
||||
}
|
||||
var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);
|
||||
if (conciseScientificAndEngineeringOpts) {
|
||||
result = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, result), conciseScientificAndEngineeringOpts);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
exports.parseNumberSkeleton = parseNumberSkeleton;
|
||||
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Type = require('../Type');
|
||||
var BigIntEqual = require('./equal');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValue
|
||||
|
||||
module.exports = function BigIntSameValue(x, y) {
|
||||
if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
|
||||
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
|
||||
}
|
||||
|
||||
return BigIntEqual(x, y);
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
||||
const fs = require("fs");
|
||||
const os = require("os");
|
||||
/**
|
||||
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
||||
* https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
|
||||
*/
|
||||
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
||||
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
||||
lstat: fs.lstat,
|
||||
lstatSync: fs.lstatSync,
|
||||
stat: fs.stat,
|
||||
statSync: fs.statSync,
|
||||
readdir: fs.readdir,
|
||||
readdirSync: fs.readdirSync
|
||||
};
|
||||
class Settings {
|
||||
constructor(_options = {}) {
|
||||
this._options = _options;
|
||||
this.absolute = this._getValue(this._options.absolute, false);
|
||||
this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
|
||||
this.braceExpansion = this._getValue(this._options.braceExpansion, true);
|
||||
this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
|
||||
this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
|
||||
this.cwd = this._getValue(this._options.cwd, process.cwd());
|
||||
this.deep = this._getValue(this._options.deep, Infinity);
|
||||
this.dot = this._getValue(this._options.dot, false);
|
||||
this.extglob = this._getValue(this._options.extglob, true);
|
||||
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
|
||||
this.fs = this._getFileSystemMethods(this._options.fs);
|
||||
this.globstar = this._getValue(this._options.globstar, true);
|
||||
this.ignore = this._getValue(this._options.ignore, []);
|
||||
this.markDirectories = this._getValue(this._options.markDirectories, false);
|
||||
this.objectMode = this._getValue(this._options.objectMode, false);
|
||||
this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
|
||||
this.onlyFiles = this._getValue(this._options.onlyFiles, true);
|
||||
this.stats = this._getValue(this._options.stats, false);
|
||||
this.suppressErrors = this._getValue(this._options.suppressErrors, false);
|
||||
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
|
||||
this.unique = this._getValue(this._options.unique, true);
|
||||
if (this.onlyDirectories) {
|
||||
this.onlyFiles = false;
|
||||
}
|
||||
if (this.stats) {
|
||||
this.objectMode = true;
|
||||
}
|
||||
}
|
||||
_getValue(option, value) {
|
||||
return option === undefined ? value : option;
|
||||
}
|
||||
_getFileSystemMethods(methods = {}) {
|
||||
return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
|
||||
}
|
||||
}
|
||||
exports.default = Settings;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"C K L G M N O","33":"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:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB 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 EC FC"},D:{"33":"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 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"},E:{"2":"HC zB","33":"I v J D E F A B C K L G IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"F B C PC QC RC SC qB AC TC rB","33":"0 1 2 3 4 5 6 7 8 9 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"},G:{"33":"E zB UC BC 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"},H:{"2":"oC"},I:{"33":"tB I f pC qC rC sC BC tC uC"},J:{"33":"D A"},K:{"2":"A B C qB AC rB","33":"h"},L:{"33":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"33":"vC"},P:{"33":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"33":"1B"},R:{"33":"9C"},S:{"2":"AD BD"}},B:7,C:"CSS Reflections"};
|
||||
Reference in New Issue
Block a user