new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isObservable = void 0;
|
||||
var Observable_1 = require("../Observable");
|
||||
var isFunction_1 = require("./isFunction");
|
||||
function isObservable(obj) {
|
||||
return !!obj && (obj instanceof Observable_1.Observable || (isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe)));
|
||||
}
|
||||
exports.isObservable = isObservable;
|
||||
//# sourceMappingURL=isObservable.js.map
|
||||
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Maxime Thirouin, Jason Campbell & Kevin Mårtensson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,344 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = global || self, factory(global.estreeWalker = {}));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
// @ts-check
|
||||
/** @typedef { import('estree').BaseNode} BaseNode */
|
||||
|
||||
/** @typedef {{
|
||||
skip: () => void;
|
||||
remove: () => void;
|
||||
replace: (node: BaseNode) => void;
|
||||
}} WalkerContext */
|
||||
|
||||
class WalkerBase {
|
||||
constructor() {
|
||||
/** @type {boolean} */
|
||||
this.should_skip = false;
|
||||
|
||||
/** @type {boolean} */
|
||||
this.should_remove = false;
|
||||
|
||||
/** @type {BaseNode | null} */
|
||||
this.replacement = null;
|
||||
|
||||
/** @type {WalkerContext} */
|
||||
this.context = {
|
||||
skip: () => (this.should_skip = true),
|
||||
remove: () => (this.should_remove = true),
|
||||
replace: (node) => (this.replacement = node)
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {any} parent
|
||||
* @param {string} prop
|
||||
* @param {number} index
|
||||
* @param {BaseNode} node
|
||||
*/
|
||||
replace(parent, prop, index, node) {
|
||||
if (parent) {
|
||||
if (index !== null) {
|
||||
parent[prop][index] = node;
|
||||
} else {
|
||||
parent[prop] = node;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {any} parent
|
||||
* @param {string} prop
|
||||
* @param {number} index
|
||||
*/
|
||||
remove(parent, prop, index) {
|
||||
if (parent) {
|
||||
if (index !== null) {
|
||||
parent[prop].splice(index, 1);
|
||||
} else {
|
||||
delete parent[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @typedef { import('estree').BaseNode} BaseNode */
|
||||
/** @typedef { import('./walker.js').WalkerContext} WalkerContext */
|
||||
|
||||
/** @typedef {(
|
||||
* this: WalkerContext,
|
||||
* node: BaseNode,
|
||||
* parent: BaseNode,
|
||||
* key: string,
|
||||
* index: number
|
||||
* ) => void} SyncHandler */
|
||||
|
||||
class SyncWalker extends WalkerBase {
|
||||
/**
|
||||
*
|
||||
* @param {SyncHandler} enter
|
||||
* @param {SyncHandler} leave
|
||||
*/
|
||||
constructor(enter, leave) {
|
||||
super();
|
||||
|
||||
/** @type {SyncHandler} */
|
||||
this.enter = enter;
|
||||
|
||||
/** @type {SyncHandler} */
|
||||
this.leave = leave;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {BaseNode} node
|
||||
* @param {BaseNode} parent
|
||||
* @param {string} [prop]
|
||||
* @param {number} [index]
|
||||
* @returns {BaseNode}
|
||||
*/
|
||||
visit(node, parent, prop, index) {
|
||||
if (node) {
|
||||
if (this.enter) {
|
||||
const _should_skip = this.should_skip;
|
||||
const _should_remove = this.should_remove;
|
||||
const _replacement = this.replacement;
|
||||
this.should_skip = false;
|
||||
this.should_remove = false;
|
||||
this.replacement = null;
|
||||
|
||||
this.enter.call(this.context, node, parent, prop, index);
|
||||
|
||||
if (this.replacement) {
|
||||
node = this.replacement;
|
||||
this.replace(parent, prop, index, node);
|
||||
}
|
||||
|
||||
if (this.should_remove) {
|
||||
this.remove(parent, prop, index);
|
||||
}
|
||||
|
||||
const skipped = this.should_skip;
|
||||
const removed = this.should_remove;
|
||||
|
||||
this.should_skip = _should_skip;
|
||||
this.should_remove = _should_remove;
|
||||
this.replacement = _replacement;
|
||||
|
||||
if (skipped) return node;
|
||||
if (removed) return null;
|
||||
}
|
||||
|
||||
for (const key in node) {
|
||||
const value = node[key];
|
||||
|
||||
if (typeof value !== "object") {
|
||||
continue;
|
||||
} else if (Array.isArray(value)) {
|
||||
for (let i = 0; i < value.length; i += 1) {
|
||||
if (value[i] !== null && typeof value[i].type === 'string') {
|
||||
if (!this.visit(value[i], node, key, i)) {
|
||||
// removed
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (value !== null && typeof value.type === "string") {
|
||||
this.visit(value, node, key, null);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.leave) {
|
||||
const _replacement = this.replacement;
|
||||
const _should_remove = this.should_remove;
|
||||
this.replacement = null;
|
||||
this.should_remove = false;
|
||||
|
||||
this.leave.call(this.context, node, parent, prop, index);
|
||||
|
||||
if (this.replacement) {
|
||||
node = this.replacement;
|
||||
this.replace(parent, prop, index, node);
|
||||
}
|
||||
|
||||
if (this.should_remove) {
|
||||
this.remove(parent, prop, index);
|
||||
}
|
||||
|
||||
const removed = this.should_remove;
|
||||
|
||||
this.replacement = _replacement;
|
||||
this.should_remove = _should_remove;
|
||||
|
||||
if (removed) return null;
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @typedef { import('estree').BaseNode} BaseNode */
|
||||
/** @typedef { import('./walker').WalkerContext} WalkerContext */
|
||||
|
||||
/** @typedef {(
|
||||
* this: WalkerContext,
|
||||
* node: BaseNode,
|
||||
* parent: BaseNode,
|
||||
* key: string,
|
||||
* index: number
|
||||
* ) => Promise<void>} AsyncHandler */
|
||||
|
||||
class AsyncWalker extends WalkerBase {
|
||||
/**
|
||||
*
|
||||
* @param {AsyncHandler} enter
|
||||
* @param {AsyncHandler} leave
|
||||
*/
|
||||
constructor(enter, leave) {
|
||||
super();
|
||||
|
||||
/** @type {AsyncHandler} */
|
||||
this.enter = enter;
|
||||
|
||||
/** @type {AsyncHandler} */
|
||||
this.leave = leave;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {BaseNode} node
|
||||
* @param {BaseNode} parent
|
||||
* @param {string} [prop]
|
||||
* @param {number} [index]
|
||||
* @returns {Promise<BaseNode>}
|
||||
*/
|
||||
async visit(node, parent, prop, index) {
|
||||
if (node) {
|
||||
if (this.enter) {
|
||||
const _should_skip = this.should_skip;
|
||||
const _should_remove = this.should_remove;
|
||||
const _replacement = this.replacement;
|
||||
this.should_skip = false;
|
||||
this.should_remove = false;
|
||||
this.replacement = null;
|
||||
|
||||
await this.enter.call(this.context, node, parent, prop, index);
|
||||
|
||||
if (this.replacement) {
|
||||
node = this.replacement;
|
||||
this.replace(parent, prop, index, node);
|
||||
}
|
||||
|
||||
if (this.should_remove) {
|
||||
this.remove(parent, prop, index);
|
||||
}
|
||||
|
||||
const skipped = this.should_skip;
|
||||
const removed = this.should_remove;
|
||||
|
||||
this.should_skip = _should_skip;
|
||||
this.should_remove = _should_remove;
|
||||
this.replacement = _replacement;
|
||||
|
||||
if (skipped) return node;
|
||||
if (removed) return null;
|
||||
}
|
||||
|
||||
for (const key in node) {
|
||||
const value = node[key];
|
||||
|
||||
if (typeof value !== "object") {
|
||||
continue;
|
||||
} else if (Array.isArray(value)) {
|
||||
for (let i = 0; i < value.length; i += 1) {
|
||||
if (value[i] !== null && typeof value[i].type === 'string') {
|
||||
if (!(await this.visit(value[i], node, key, i))) {
|
||||
// removed
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (value !== null && typeof value.type === "string") {
|
||||
await this.visit(value, node, key, null);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.leave) {
|
||||
const _replacement = this.replacement;
|
||||
const _should_remove = this.should_remove;
|
||||
this.replacement = null;
|
||||
this.should_remove = false;
|
||||
|
||||
await this.leave.call(this.context, node, parent, prop, index);
|
||||
|
||||
if (this.replacement) {
|
||||
node = this.replacement;
|
||||
this.replace(parent, prop, index, node);
|
||||
}
|
||||
|
||||
if (this.should_remove) {
|
||||
this.remove(parent, prop, index);
|
||||
}
|
||||
|
||||
const removed = this.should_remove;
|
||||
|
||||
this.replacement = _replacement;
|
||||
this.should_remove = _should_remove;
|
||||
|
||||
if (removed) return null;
|
||||
}
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-check
|
||||
|
||||
/** @typedef { import('estree').BaseNode} BaseNode */
|
||||
/** @typedef { import('./sync.js').SyncHandler} SyncHandler */
|
||||
/** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {BaseNode} ast
|
||||
* @param {{
|
||||
* enter?: SyncHandler
|
||||
* leave?: SyncHandler
|
||||
* }} walker
|
||||
* @returns {BaseNode}
|
||||
*/
|
||||
function walk(ast, { enter, leave }) {
|
||||
const instance = new SyncWalker(enter, leave);
|
||||
return instance.visit(ast, null);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {BaseNode} ast
|
||||
* @param {{
|
||||
* enter?: AsyncHandler
|
||||
* leave?: AsyncHandler
|
||||
* }} walker
|
||||
* @returns {Promise<BaseNode>}
|
||||
*/
|
||||
async function asyncWalk(ast, { enter, leave }) {
|
||||
const instance = new AsyncWalker(enter, leave);
|
||||
return await instance.visit(ast, null);
|
||||
}
|
||||
|
||||
exports.asyncWalk = asyncWalk;
|
||||
exports.walk = walk;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
@@ -0,0 +1,123 @@
|
||||
let browserslist = require('browserslist')
|
||||
|
||||
function capitalize(str) {
|
||||
return str.slice(0, 1).toUpperCase() + str.slice(1)
|
||||
}
|
||||
|
||||
const NAMES = {
|
||||
ie: 'IE',
|
||||
ie_mob: 'IE Mobile',
|
||||
ios_saf: 'iOS Safari',
|
||||
op_mini: 'Opera Mini',
|
||||
op_mob: 'Opera Mobile',
|
||||
and_chr: 'Chrome for Android',
|
||||
and_ff: 'Firefox for Android',
|
||||
and_uc: 'UC for Android',
|
||||
and_qq: 'QQ Browser',
|
||||
kaios: 'KaiOS Browser',
|
||||
baidu: 'Baidu Browser',
|
||||
samsung: 'Samsung Internet'
|
||||
}
|
||||
|
||||
function prefix(name, prefixes, note) {
|
||||
let out = ` ${name}`
|
||||
if (note) out += ' *'
|
||||
out += ': '
|
||||
out += prefixes.map(i => i.replace(/^-(.*)-$/g, '$1')).join(', ')
|
||||
out += '\n'
|
||||
return out
|
||||
}
|
||||
|
||||
module.exports = function (prefixes) {
|
||||
if (prefixes.browsers.selected.length === 0) {
|
||||
return 'No browsers selected'
|
||||
}
|
||||
|
||||
let versions = {}
|
||||
for (let browser of prefixes.browsers.selected) {
|
||||
let parts = browser.split(' ')
|
||||
let name = parts[0]
|
||||
let version = parts[1]
|
||||
|
||||
name = NAMES[name] || capitalize(name)
|
||||
if (versions[name]) {
|
||||
versions[name].push(version)
|
||||
} else {
|
||||
versions[name] = [version]
|
||||
}
|
||||
}
|
||||
|
||||
let out = 'Browsers:\n'
|
||||
for (let browser in versions) {
|
||||
let list = versions[browser]
|
||||
list = list.sort((a, b) => parseFloat(b) - parseFloat(a))
|
||||
out += ` ${browser}: ${list.join(', ')}\n`
|
||||
}
|
||||
|
||||
let coverage = browserslist.coverage(prefixes.browsers.selected)
|
||||
let round = Math.round(coverage * 100) / 100.0
|
||||
out += `\nThese browsers account for ${round}% of all users globally\n`
|
||||
|
||||
let atrules = []
|
||||
for (let name in prefixes.add) {
|
||||
let data = prefixes.add[name]
|
||||
if (name[0] === '@' && data.prefixes) {
|
||||
atrules.push(prefix(name, data.prefixes))
|
||||
}
|
||||
}
|
||||
if (atrules.length > 0) {
|
||||
out += `\nAt-Rules:\n${atrules.sort().join('')}`
|
||||
}
|
||||
|
||||
let selectors = []
|
||||
for (let selector of prefixes.add.selectors) {
|
||||
if (selector.prefixes) {
|
||||
selectors.push(prefix(selector.name, selector.prefixes))
|
||||
}
|
||||
}
|
||||
if (selectors.length > 0) {
|
||||
out += `\nSelectors:\n${selectors.sort().join('')}`
|
||||
}
|
||||
|
||||
let values = []
|
||||
let props = []
|
||||
let hadGrid = false
|
||||
for (let name in prefixes.add) {
|
||||
let data = prefixes.add[name]
|
||||
if (name[0] !== '@' && data.prefixes) {
|
||||
let grid = name.indexOf('grid-') === 0
|
||||
if (grid) hadGrid = true
|
||||
props.push(prefix(name, data.prefixes, grid))
|
||||
}
|
||||
|
||||
if (!Array.isArray(data.values)) {
|
||||
continue
|
||||
}
|
||||
for (let value of data.values) {
|
||||
let grid = value.name.includes('grid')
|
||||
if (grid) hadGrid = true
|
||||
let string = prefix(value.name, value.prefixes, grid)
|
||||
if (!values.includes(string)) {
|
||||
values.push(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (props.length > 0) {
|
||||
out += `\nProperties:\n${props.sort().join('')}`
|
||||
}
|
||||
if (values.length > 0) {
|
||||
out += `\nValues:\n${values.sort().join('')}`
|
||||
}
|
||||
if (hadGrid) {
|
||||
out += '\n* - Prefixes will be added only on grid: true option.\n'
|
||||
}
|
||||
|
||||
if (!atrules.length && !selectors.length && !props.length && !values.length) {
|
||||
out +=
|
||||
"\nAwesome! Your browsers don't require any vendor prefixes." +
|
||||
'\nNow you can remove Autoprefixer from build steps.'
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
@@ -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.00323,"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.00323,"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.00323,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0.00323,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00323,"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.00323,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.00968,"103":0,"104":0,"105":0.00323,"106":0.00968,"107":0.00323,"108":0.00968,"109":0.24856,"110":0.17431,"111":0.00323,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.00646,"50":0,"51":0,"52":0.00323,"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.00968,"69":0.0807,"70":0,"71":0,"72":0.00323,"73":0.00323,"74":0.0226,"75":0,"76":0.00646,"77":0.00646,"78":0.00323,"79":0.02582,"80":0,"81":0.01291,"83":0.00323,"84":0,"85":0.00646,"86":0.00323,"87":0.00646,"88":0.01614,"89":0.00646,"90":0,"91":0.00646,"92":0.01937,"93":0.00323,"94":0.00323,"95":0.01291,"96":0.00646,"97":0.00323,"98":0.00323,"99":0.00323,"100":0.00323,"101":0.01291,"102":0.00646,"103":0.03228,"104":0.00968,"105":0.0226,"106":0.01614,"107":0.03228,"108":0.12912,"109":3.85423,"110":2.08529,"111":0.00323,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00323,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0.00323,"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.00968,"65":0,"66":0,"67":0.18077,"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.01614,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.03874,"95":0.05165,"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.00646,"13":0,"14":0,"15":0,"16":0,"17":0.00323,"18":0.00646,"79":0,"80":0,"81":0,"83":0,"84":0.00323,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0.00323,"91":0,"92":0.00968,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0.00646,"101":0,"102":0,"103":0.00323,"104":0.00323,"105":0.00646,"106":0,"107":0.01937,"108":0.03228,"109":0.47129,"110":0.64237},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00323,"15":0.00323,_:"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.00323,"13.1":0.02582,"14.1":0.01291,"15.1":0.00323,"15.2-15.3":0.00323,"15.4":0.0226,"15.5":0.01614,"15.6":0.07747,"16.0":0.01291,"16.1":0.02905,"16.2":0.06456,"16.3":0.04519,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00608,"6.0-6.1":0,"7.0-7.1":0.16829,"8.1-8.4":0.00203,"9.0-9.2":0,"9.3":0.15105,"10.0-10.2":0,"10.3":0.17741,"11.0-11.2":0.00304,"11.3-11.4":0.00203,"12.0-12.1":0.04968,"12.2-12.5":0.54541,"13.0-13.1":0.00406,"13.2":0.00507,"13.3":0.147,"13.4-13.7":0.04968,"14.0-14.4":0.40754,"14.5-14.8":0.28487,"15.0-15.1":0.0811,"15.2-15.3":0.18856,"15.4":0.12165,"15.5":0.49574,"15.6":0.65794,"16.0":0.74918,"16.1":1.81568,"16.2":1.65246,"16.3":1.23783,"16.4":0.00203},P:{"4":0.21612,"20":2.81983,"5.0-5.4":0,"6.2-6.4":0.01029,"7.2-7.4":0.90564,"8.2":0,"9.2":0.03087,"10.1":0.01029,"11.1-11.2":0.13379,"12.0":0.02058,"13.0":0.16466,"14.0":0.16466,"15.0":0.19554,"16.0":0.61748,"17.0":0.48369,"18.0":0.42195,"19.0":4.51791},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.01305,"4.4":0,"4.4.3-4.4.4":0.12182},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0.00538,"11":0.01076,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":1.08352},H:{"0":0.795},L:{"0":65.41168},R:{_:"0"},M:{"0":0.05418},Q:{"13.1":0.00677}};
|
||||
@@ -0,0 +1,5 @@
|
||||
declare module 'emoji-regex/es2015' {
|
||||
function emojiRegex(): RegExp;
|
||||
|
||||
export = emojiRegex;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
var isArguments = require("es5-ext/function/is-arguments")
|
||||
, isString = require("es5-ext/string/is-string")
|
||||
, ArrayIterator = require("./array")
|
||||
, StringIterator = require("./string")
|
||||
, iterable = require("./valid-iterable")
|
||||
, iteratorSymbol = require("es6-symbol").iterator;
|
||||
|
||||
module.exports = function (obj) {
|
||||
if (typeof iterable(obj)[iteratorSymbol] === "function") return obj[iteratorSymbol]();
|
||||
if (isArguments(obj)) return new ArrayIterator(obj);
|
||||
if (isString(obj)) return new StringIterator(obj);
|
||||
return new ArrayIterator(obj);
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "resolve-from",
|
||||
"version": "4.0.0",
|
||||
"description": "Resolve the path of a module like `require.resolve()` but from a given path",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/resolve-from",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"require",
|
||||
"resolve",
|
||||
"path",
|
||||
"module",
|
||||
"from",
|
||||
"like",
|
||||
"import"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
declare var global: typeof globalThis;
|
||||
@@ -0,0 +1,7 @@
|
||||
MIT License Copyright (c) 2020 Octokit contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('lt', require('../lt'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,46 @@
|
||||
import { BLAKE2 } from './_blake2.js';
|
||||
import { Input, HashXOF } from './utils.js';
|
||||
export declare type Blake3Opts = {
|
||||
dkLen?: number;
|
||||
key?: Input;
|
||||
context?: Input;
|
||||
};
|
||||
declare class BLAKE3 extends BLAKE2<BLAKE3> implements HashXOF<BLAKE3> {
|
||||
private IV;
|
||||
private flags;
|
||||
private state;
|
||||
private chunkPos;
|
||||
private chunksDone;
|
||||
private stack;
|
||||
private posOut;
|
||||
private bufferOut32;
|
||||
private bufferOut;
|
||||
private chunkOut;
|
||||
private enableXOF;
|
||||
constructor(opts?: Blake3Opts, flags?: number);
|
||||
protected get(): never[];
|
||||
protected set(): void;
|
||||
private b2Compress;
|
||||
protected compress(buf: Uint32Array, bufPos?: number, isLast?: boolean): void;
|
||||
_cloneInto(to?: BLAKE3): BLAKE3;
|
||||
destroy(): void;
|
||||
private b2CompressOut;
|
||||
protected finish(): void;
|
||||
private writeInto;
|
||||
xofInto(out: Uint8Array): Uint8Array;
|
||||
xof(bytes: number): Uint8Array;
|
||||
digestInto(out: Uint8Array): Uint8Array;
|
||||
digest(): Uint8Array;
|
||||
}
|
||||
/**
|
||||
* BLAKE3 hash function.
|
||||
* @param msg - message that would be hashed
|
||||
* @param opts - dkLen, key, context
|
||||
*/
|
||||
export declare const blake3: {
|
||||
(msg: Input, opts?: Blake3Opts | undefined): Uint8Array;
|
||||
outputLen: number;
|
||||
blockLen: number;
|
||||
create(opts: Blake3Opts): import("./utils.js").Hash<BLAKE3>;
|
||||
};
|
||||
export {};
|
||||
@@ -0,0 +1,158 @@
|
||||
get-uri
|
||||
=======
|
||||
### Returns a `stream.Readable` from a URI string
|
||||
[](https://github.com/TooTallNate/node-get-uri/actions?workflow=Node+CI)
|
||||
|
||||
This high-level module accepts a URI string and returns a `Readable` stream
|
||||
instance. There is built-in support for a variety of "protocols", and it's
|
||||
easily extensible with more:
|
||||
|
||||
| Protocol | Description | Example
|
||||
|:---------:|:-------------------------------:|:---------------------------------:
|
||||
| `data` | [Data URIs][data] | `data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D`
|
||||
| `file` | [File URIs][file] | `file:///c:/windows/example.ini`
|
||||
| `ftp` | [FTP URIs][ftp] | `ftp://ftp.kernel.org/pub/site/README`
|
||||
| `http` | [HTTP URIs][http] | `http://www.example.com/path/to/name`
|
||||
| `https` | [HTTPS URIs][https] | `https://www.example.com/path/to/name`
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Install with `npm`:
|
||||
|
||||
``` bash
|
||||
$ npm install get-uri
|
||||
```
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
To simply get a `stream.Readable` instance from a `file:` URI, try something like:
|
||||
|
||||
``` js
|
||||
var getUri = require('get-uri');
|
||||
|
||||
// `file:` maps to a `fs.ReadStream` instance…
|
||||
getUri('file:///Users/nrajlich/wat.json', function (err, rs) {
|
||||
if (err) throw err;
|
||||
rs.pipe(process.stdout);
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Missing Endpoints
|
||||
-----------------
|
||||
|
||||
When you pass in a URI in which the resource referenced does not exist on the
|
||||
destination server, then a `NotFoundError` will be returned. The `code` of the
|
||||
error instance is set to `"ENOTFOUND"`, so you can special-case that in your code
|
||||
to detect when a bad filename is requested:
|
||||
|
||||
``` js
|
||||
getUri('http://example.com/resource.json', function (err, rs) {
|
||||
if (err) {
|
||||
if ('ENOTFOUND' == err.code) {
|
||||
// bad file path requested
|
||||
} else {
|
||||
// something else bad happened...
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
// your app code…
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Cacheability
|
||||
------------
|
||||
|
||||
When calling `getUri()` with the same URI multiple times, the `get-uri` module
|
||||
supports sending an indicator that the remote resource has not been modified
|
||||
since the last time it has been retreived from that node process.
|
||||
|
||||
To do this, pass in a `cache` option to the "options object" argument
|
||||
with the value set to the `stream.Readable` instance that was previously
|
||||
returned. If the remote resource has not been changed since the last call for
|
||||
that same URI, then a `NotModifiedError` instance will be returned with it's
|
||||
`code` property set to `"ENOTMODIFIED"`.
|
||||
|
||||
When the `"ENOTMODIFIED"` error occurs, then you can safely re-use the
|
||||
results from the previous `getUri()` call for that same URI:
|
||||
|
||||
``` js
|
||||
// maps to a `fs.ReadStream` instance
|
||||
getUri('http://example.com/resource.json', function (err, rs) {
|
||||
if (err) throw err;
|
||||
|
||||
// … some time later, if you need to get this same URI again, pass in the
|
||||
// previous `stream.Readable` instance as `cache` option to potentially
|
||||
// receive an "ENOTMODIFIED" response:
|
||||
var opts = { cache: rs };
|
||||
getUri('http://example.com/resource.json', opts, function (err, rs2) {
|
||||
if (err) {
|
||||
if ('ENOTFOUND' == err.code) {
|
||||
// bad file path requested
|
||||
} else if ('ENOTMODIFIED' == err.code) {
|
||||
// source file has not been modified since last time it was requested,
|
||||
// so `rs2` is undefined and you are expected to re-use results from
|
||||
// a previous call to `getUri()`
|
||||
} else {
|
||||
// something else bad happened...
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
### getUri(String uri[, Object options,] Function callback)
|
||||
|
||||
A `uri` String is required. An optional `options` object may be passed in:
|
||||
|
||||
- `cache` - A `stream.Readable` instance from a previous call to `getUri()` with the same URI. If this option is passed in, and the destination endpoint has not been modified, then an `ENOTMODIFIED` error is returned
|
||||
|
||||
Any other options passed in to the `options` object will be passed through
|
||||
to the low-level connection creation functions (`http.get()`, `ftp.connect()`,
|
||||
etc).
|
||||
|
||||
Invokes the given `callback` function with a `stream.Readable` instance to
|
||||
read the resource at the given `uri`.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
[data]: http://tools.ietf.org/html/rfc2397
|
||||
[file]: http://tools.ietf.org/html/draft-hoffman-file-uri-03
|
||||
[ftp]: http://www.w3.org/Protocols/rfc959/
|
||||
[http]: http://www.w3.org/Protocols/rfc2616/rfc2616.html
|
||||
[https]: http://wikipedia.org/wiki/HTTP_Secure
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,+BAA2B;AAE3B;;;;;;GAMG;AAEH,SAAS,aAAa,CAAC,GAAW;IACjC,IACC,OAAO,GAAG,KAAK,QAAQ;QACvB,GAAG,CAAC,MAAM,IAAI,CAAC;QACf,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,SAAS,EAChC;QACD,MAAM,IAAI,SAAS,CAClB,sDAAsD,CACtD,CAAC;KACF;IAED,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IACzC,IAAI,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAE1C,wBAAwB;IACxB,uEAAuE;IACvE,oEAAoE;IACpE,sBAAsB;IACtB,IAAI,IAAI,KAAK,WAAW,EAAE;QACzB,IAAI,GAAG,EAAE,CAAC;KACV;IAED,IAAI,IAAI,EAAE;QACT,IAAI,GAAG,UAAG,GAAG,UAAG,GAAG,IAAI,CAAC;KACxB;IAED,6DAA6D;IAC7D,uEAAuE;IACvE,gEAAgE;IAChE,oEAAoE;IACpE,+DAA+D;IAC/D,mEAAmE;IACnE,2DAA2D;IAC3D,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IAEtC,0EAA0E;IAC1E,IAAI,UAAG,KAAK,IAAI,EAAE;QACjB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;KACjC;IAED,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QACtB,yCAAyC;KACzC;SAAM;QACN,aAAa;QACb,IAAI,GAAG,UAAG,GAAG,IAAI,CAAC;KAClB;IAED,OAAO,IAAI,GAAG,IAAI,CAAC;AACpB,CAAC;AAED,iBAAS,aAAa,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
export * from '../types/runtime/store/index';
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,128 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var regexTester = require('safe-regex-test');
|
||||
var every = require('../helpers/every');
|
||||
|
||||
var $charAt = callBound('String.prototype.charAt');
|
||||
var $strSlice = callBound('String.prototype.slice');
|
||||
var $indexOf = callBound('String.prototype.indexOf');
|
||||
var $parseInt = parseInt;
|
||||
|
||||
var isDigit = regexTester(/^[0-9]$/);
|
||||
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var IsInteger = require('./IsInteger');
|
||||
var ToObject = require('./ToObject');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false
|
||||
|
||||
var isStringOrHole = function (capture, index, arr) {
|
||||
return Type(capture) === 'String' || (canDistinguishSparseFromUndefined ? !(index in arr) : Type(capture) === 'Undefined');
|
||||
};
|
||||
|
||||
// http://262.ecma-international.org/9.0/#sec-getsubstitution
|
||||
|
||||
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
|
||||
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
||||
if (Type(matched) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `matched` must be a String');
|
||||
}
|
||||
var matchLength = matched.length;
|
||||
|
||||
if (Type(str) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `str` must be a String');
|
||||
}
|
||||
var stringLength = str.length;
|
||||
|
||||
if (!IsInteger(position) || position < 0 || position > stringLength) {
|
||||
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
|
||||
}
|
||||
|
||||
if (!IsArray(captures) || !every(captures, isStringOrHole)) {
|
||||
throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures));
|
||||
}
|
||||
|
||||
if (Type(replacement) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `replacement` must be a String');
|
||||
}
|
||||
|
||||
var tailPos = position + matchLength;
|
||||
var m = captures.length;
|
||||
if (Type(namedCaptures) !== 'Undefined') {
|
||||
namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign
|
||||
}
|
||||
|
||||
var result = '';
|
||||
for (var i = 0; i < replacement.length; i += 1) {
|
||||
// if this is a $, and it's not the end of the replacement
|
||||
var current = $charAt(replacement, i);
|
||||
var isLast = (i + 1) >= replacement.length;
|
||||
var nextIsLast = (i + 2) >= replacement.length;
|
||||
if (current === '$' && !isLast) {
|
||||
var next = $charAt(replacement, i + 1);
|
||||
if (next === '$') {
|
||||
result += '$';
|
||||
i += 1;
|
||||
} else if (next === '&') {
|
||||
result += matched;
|
||||
i += 1;
|
||||
} else if (next === '`') {
|
||||
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
|
||||
i += 1;
|
||||
} else if (next === "'") {
|
||||
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
|
||||
i += 1;
|
||||
} else {
|
||||
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
|
||||
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
|
||||
// $1 through $9, and not followed by a digit
|
||||
var n = $parseInt(next, 10);
|
||||
// if (n > m, impl-defined)
|
||||
result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1];
|
||||
i += 1;
|
||||
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
|
||||
// $00 through $99
|
||||
var nn = next + nextNext;
|
||||
var nnI = $parseInt(nn, 10) - 1;
|
||||
// if nn === '00' or nn > m, impl-defined
|
||||
result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI];
|
||||
i += 2;
|
||||
} else if (next === '<') {
|
||||
// eslint-disable-next-line max-depth
|
||||
if (Type(namedCaptures) === 'Undefined') {
|
||||
result += '$<';
|
||||
i += 2;
|
||||
} else {
|
||||
var endIndex = $indexOf(replacement, '>', i);
|
||||
// eslint-disable-next-line max-depth
|
||||
if (endIndex > -1) {
|
||||
var groupName = $strSlice(replacement, i + '$<'.length, endIndex);
|
||||
var capture = Get(namedCaptures, groupName);
|
||||
// eslint-disable-next-line max-depth
|
||||
if (Type(capture) !== 'Undefined') {
|
||||
result += ToString(capture);
|
||||
}
|
||||
i += ('<' + groupName + '>').length;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result += '$';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// the final $, or else not a $
|
||||
result += $charAt(replacement, i);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
var baseIsArrayBuffer = require('./_baseIsArrayBuffer'),
|
||||
baseUnary = require('./_baseUnary'),
|
||||
nodeUtil = require('./_nodeUtil');
|
||||
|
||||
/* Node.js helper references. */
|
||||
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as an `ArrayBuffer` object.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.3.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isArrayBuffer(new ArrayBuffer(2));
|
||||
* // => true
|
||||
*
|
||||
* _.isArrayBuffer(new Array(2));
|
||||
* // => false
|
||||
*/
|
||||
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
|
||||
|
||||
module.exports = isArrayBuffer;
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "merge2",
|
||||
"description": "Merge multiple streams into one stream in sequence or parallel.",
|
||||
"authors": [
|
||||
"Yan Qing <admin@zensh.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"version": "1.4.1",
|
||||
"main": "./index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:teambition/merge2.git"
|
||||
},
|
||||
"homepage": "https://github.com/teambition/merge2",
|
||||
"keywords": [
|
||||
"merge2",
|
||||
"multiple",
|
||||
"sequence",
|
||||
"parallel",
|
||||
"merge",
|
||||
"stream",
|
||||
"merge stream",
|
||||
"sync"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"standard": "^14.3.4",
|
||||
"through2": "^3.0.1",
|
||||
"thunks": "^4.9.6",
|
||||
"tman": "^1.10.0",
|
||||
"to-through": "^2.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && tman"
|
||||
},
|
||||
"files": [
|
||||
"README.md",
|
||||
"index.js"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
var getPolyfill = require('./polyfill');
|
||||
|
||||
module.exports = function shimTrimStart() {
|
||||
var polyfill = getPolyfill();
|
||||
define(
|
||||
String.prototype,
|
||||
{ trimStart: polyfill },
|
||||
{ trimStart: function () { return String.prototype.trimStart !== polyfill; } }
|
||||
);
|
||||
return polyfill;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"globalthis","version":"1.0.3","files":{"LICENSE":{"checkedAt":1678883671620,"integrity":"sha512-IdtCjxo0Y/7mc2InibsN6mrJ15lI/fOtADCwsj+zRjDS3Hsxxtykg6RdC89DCbkE9p4ax4Qz24vZKuihcPHWew==","mode":420,"size":1081},"auto.js":{"checkedAt":1678883671533,"integrity":"sha512-8Q3Im5cACiIFrMmxvLnJnA8SXOjAd1kh/R0UIDVnErDD1WUlJIDrNfaOcIB6rtjAXNhq/OdL1374JM/QcAJ1VQ==","mode":420,"size":36},".nycrc":{"checkedAt":1678883671649,"integrity":"sha512-WkL3mjLFU/XLVvvAT3t60vkBYVLgMm0sHReVgm+Nw35gd5Jhr1XlYBL5bXPdBxXA1mWPbqf9bFqqj+sGYDkiGQ==","mode":420,"size":149},".eslintrc":{"checkedAt":1678883671649,"integrity":"sha512-BL+S4MJg36LQua4BmYTBB7t3/dlXOKgYEWYMhdsiU1gRtdfm8ssBJLakeqje7pyg+q31HCAlJ3AfpCsuoaFNdA==","mode":420,"size":192},"implementation.browser.js":{"checkedAt":1678883671649,"integrity":"sha512-0jFwvO8GY+pli94fAESnXM9KyplSltiEm09E7Hv5LMZTQEqAM1tBYNgyFsqwXCl6eX5kd/a74VbLnamUaG/c+A==","mode":420,"size":254},"implementation.js":{"checkedAt":1678883671649,"integrity":"sha512-VryEyvd6xL3QehMIzqaVBs/xiGHBT2AQAY0gxSKpLwgKBGFxq035D6sklWTUvQmCGNfiPabZpUHmS7E0ocRP0Q==","mode":420,"size":40},"test/implementation.js":{"checkedAt":1678883671649,"integrity":"sha512-ObY0qaKHmxo2s62OOlpkhebXyv1OZncYydC4X02QHp/5cPEeRoZjuZ+pPD1Ng3kV9jssmArMpGy4MJ7GaBmyIw==","mode":420,"size":213},"index.js":{"checkedAt":1678883671649,"integrity":"sha512-bUsJl5Wnrlzr5rOvdolD5rICss0d9W1RI6BwDyFKW1BlTOINzUrN2QO2pNyySaIVsBNyJtJvIKbyuZILUfXvBg==","mode":420,"size":408},"test/index.js":{"checkedAt":1678883671649,"integrity":"sha512-A3jLT0YvJ10ulTpsly0wJN0yAMRgl2M1xShATBNVCupKfsIMMM28m1LQrVahNxVQ0Fpg9g8kCBUg1jtVEx4ZWg==","mode":420,"size":196},"test/native.js":{"checkedAt":1678883671649,"integrity":"sha512-jI7bajF92sNAXgfWUCE4EwQIhhITFdTrbVElOTvqqg7n3Dm7WtZqHQ7/E9Xf6FMUm7TpUlu4+hRfU/ugWpyalQ==","mode":420,"size":767},"shim.js":{"checkedAt":1678883671649,"integrity":"sha512-xiQFLE8pW9iRmjDGAqsKOcU/Cv8x2A9vPUytqjk+8CjD30WxbLknh2VHcbYtTExObvlHB2ahUPrpVI4OM/yA8w==","mode":420,"size":722},"polyfill.js":{"checkedAt":1678883671649,"integrity":"sha512-zLizZraNtN5EOI4ogtRRHJzv1Ev7GOx7sOmqOYFsav/i7PJl6LrCuOyQT5TuzIDDkjcym87GKP91hCsawvSDGA==","mode":420,"size":251},"test/shimmed.js":{"checkedAt":1678883671649,"integrity":"sha512-Jd0t1EF4BbJpCHXhWDBC4zeRIuoYbOEdfBn4uIjiXGW/a6sgtUhXiZOnuopGDTCI8hDcIxpolqIEFoNTd0jYYQ==","mode":420,"size":900},"test/tests.js":{"checkedAt":1678883671653,"integrity":"sha512-OLevRm9466KgUcPWQWUYrtj+OeGIBXBVk0SmlKVSWgwxkbK2jZGjp9+bLHvkRc1SRJt3xcwELAmsCr93HNl7Mw==","mode":420,"size":1399},"package.json":{"checkedAt":1678883671653,"integrity":"sha512-xFiyHFXaCc+l9JYCxGm31M+bs7BHVMu8kbl1OfyzvHmjGiF7iZ398XPu6ezvU9YSA5hYEllCQ5q4Ol5HT3+biw==","mode":420,"size":2418},"CHANGELOG.md":{"checkedAt":1678883671653,"integrity":"sha512-8bUozIR/D4yVkhRKfba1F6Y4A9NDA9d5oiGRM2VfDp728M/48GXmreMy2AD/NC8ZB+GfpRUnXXW1YY4AGd7ajA==","mode":420,"size":10638},"README.md":{"checkedAt":1678883671655,"integrity":"sha512-Hl0PEqX4oK4ia0dkbL8XntjppfdOI9VmozmWSGuOhq9A/6Nj5m/IU5iUF8//Z0Pqt6O4iO82+XJqaByujsAIJA==","mode":420,"size":2716}}}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { isFunction } from './isFunction';
|
||||
import { isScheduler } from './isScheduler';
|
||||
function last(arr) {
|
||||
return arr[arr.length - 1];
|
||||
}
|
||||
export function popResultSelector(args) {
|
||||
return isFunction(last(args)) ? args.pop() : undefined;
|
||||
}
|
||||
export function popScheduler(args) {
|
||||
return isScheduler(last(args)) ? args.pop() : undefined;
|
||||
}
|
||||
export function popNumber(args, defaultValue) {
|
||||
return typeof last(args) === 'number' ? args.pop() : defaultValue;
|
||||
}
|
||||
//# sourceMappingURL=args.js.map
|
||||
@@ -0,0 +1,3 @@
|
||||
import { TableEvents } from './view/table/events';
|
||||
import { ContainerEvents } from './view/events';
|
||||
export declare type GridEvents = ContainerEvents & TableEvents;
|
||||
@@ -0,0 +1,15 @@
|
||||
# Global Bind
|
||||
|
||||
This extension allows you to specify keyboard events that will work anywhere including inside textarea/input fields.
|
||||
|
||||
Usage looks like:
|
||||
|
||||
```javascript
|
||||
Mousetrap.bindGlobal('ctrl+s', function() {
|
||||
_save();
|
||||
});
|
||||
```
|
||||
|
||||
This means that a keyboard event bound using ``Mousetrap.bind`` will only work outside of form input fields, but using ``Moustrap.bindGlobal`` will work in both places.
|
||||
|
||||
If you wanted to create keyboard shortcuts that only work when you are inside a specific textarea you can do that too by creating your own extension.
|
||||
@@ -0,0 +1,6 @@
|
||||
export interface CssNode {
|
||||
type: string;
|
||||
start: number;
|
||||
end: number;
|
||||
[prop_name: string]: any;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"ms","version":"2.1.2","files":{"package.json":{"checkedAt":1678883669471,"integrity":"sha512-AZddZbxJHQs5Q115OmK826a17fT7iG3g5IqKOT4m/fMb37T5HdfhC6aaHmLtCR1eoE+fi/V9eEw0kaXFyEcpiA==","mode":420,"size":705},"index.js":{"checkedAt":1678883669471,"integrity":"sha512-JSZEFpqTmFJ5J7aaLxnGV4vWLc0YC5SYTZkZOfU79Od8pofoQNtC99ujs3EkpePz7ag1NedUkbvmykQKcUmRPw==","mode":420,"size":3023},"license.md":{"checkedAt":1678883669471,"integrity":"sha512-K+we+03Fn6Q2w4obRbPb1Uo2hGC8u7PZeRtlJ1tdw8caTFS+RY9MdHYdzLiJfvqrRt9aQHcj2lxI89sC1VXVuQ==","mode":420,"size":1077},"readme.md":{"checkedAt":1678883669471,"integrity":"sha512-rR6XpmZ3khaEc1PEFEjQ+eWyBIIQmf9IKnTxTzCNZPW1L/np4lBGDbjtUvGvHspsa3pFGXYhTDpl7sU5McCOxg==","mode":420,"size":2037}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../../src/internal/operators/find.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA4DhE,MAAM,UAAU,IAAI,CAClB,SAAsE,EACtE,OAAa;IAEb,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,SAAsE,EACtE,OAAY,EACZ,IAAuB;IAEvB,MAAM,SAAS,GAAG,IAAI,KAAK,OAAO,CAAC;IACnC,OAAO,CAAC,MAAqB,EAAE,UAA2B,EAAE,EAAE;QAC5D,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;YAClB,IAAI,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE;gBAC7C,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACvC,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YAC5C,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
||||
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var callBind = require('./');
|
||||
|
||||
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
||||
|
||||
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
||||
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
||||
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
||||
return callBind(intrinsic);
|
||||
}
|
||||
return intrinsic;
|
||||
};
|
||||
@@ -0,0 +1,112 @@
|
||||
{
|
||||
"name": "esprima",
|
||||
"description": "ECMAScript parsing infrastructure for multipurpose analysis",
|
||||
"homepage": "http://esprima.org",
|
||||
"main": "dist/esprima.js",
|
||||
"bin": {
|
||||
"esparse": "./bin/esparse.js",
|
||||
"esvalidate": "./bin/esvalidate.js"
|
||||
},
|
||||
"version": "4.0.1",
|
||||
"files": [
|
||||
"bin",
|
||||
"dist/esprima.js"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"author": {
|
||||
"name": "Ariya Hidayat",
|
||||
"email": "ariya.hidayat@gmail.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Ariya Hidayat",
|
||||
"email": "ariya.hidayat@gmail.com",
|
||||
"web": "http://ariya.ofilabs.com"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jquery/esprima.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/jquery/esprima/issues"
|
||||
},
|
||||
"license": "BSD-2-Clause",
|
||||
"devDependencies": {
|
||||
"codecov.io": "~0.1.6",
|
||||
"escomplex-js": "1.2.0",
|
||||
"everything.js": "~1.0.3",
|
||||
"glob": "~7.1.0",
|
||||
"istanbul": "~0.4.0",
|
||||
"json-diff": "~0.3.1",
|
||||
"karma": "~1.3.0",
|
||||
"karma-chrome-launcher": "~2.0.0",
|
||||
"karma-detect-browsers": "~2.2.3",
|
||||
"karma-edge-launcher": "~0.2.0",
|
||||
"karma-firefox-launcher": "~1.0.0",
|
||||
"karma-ie-launcher": "~1.0.0",
|
||||
"karma-mocha": "~1.3.0",
|
||||
"karma-safari-launcher": "~1.0.0",
|
||||
"karma-safaritechpreview-launcher": "~0.0.4",
|
||||
"karma-sauce-launcher": "~1.1.0",
|
||||
"lodash": "~3.10.1",
|
||||
"mocha": "~3.2.0",
|
||||
"node-tick-processor": "~0.0.2",
|
||||
"regenerate": "~1.3.2",
|
||||
"temp": "~0.8.3",
|
||||
"tslint": "~5.1.0",
|
||||
"typescript": "~2.3.2",
|
||||
"typescript-formatter": "~5.1.3",
|
||||
"unicode-8.0.0": "~0.7.0",
|
||||
"webpack": "~1.14.0"
|
||||
},
|
||||
"keywords": [
|
||||
"ast",
|
||||
"ecmascript",
|
||||
"esprima",
|
||||
"javascript",
|
||||
"parser",
|
||||
"syntax"
|
||||
],
|
||||
"scripts": {
|
||||
"check-version": "node test/check-version.js",
|
||||
"tslint": "tslint src/*.ts",
|
||||
"code-style": "tsfmt --verify src/*.ts && tsfmt --verify test/*.js",
|
||||
"format-code": "tsfmt -r src/*.ts && tsfmt -r test/*.js",
|
||||
"complexity": "node test/check-complexity.js",
|
||||
"static-analysis": "npm run check-version && npm run tslint && npm run code-style && npm run complexity",
|
||||
"hostile-env-tests": "node test/hostile-environment-tests.js",
|
||||
"unit-tests": "node test/unit-tests.js",
|
||||
"api-tests": "mocha -R dot test/api-tests.js",
|
||||
"grammar-tests": "node test/grammar-tests.js",
|
||||
"regression-tests": "node test/regression-tests.js",
|
||||
"all-tests": "npm run verify-line-ending && npm run generate-fixtures && npm run unit-tests && npm run api-tests && npm run grammar-tests && npm run regression-tests && npm run hostile-env-tests",
|
||||
"verify-line-ending": "node test/verify-line-ending.js",
|
||||
"generate-fixtures": "node tools/generate-fixtures.js",
|
||||
"browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run",
|
||||
"saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js",
|
||||
"saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js",
|
||||
"saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js",
|
||||
"saucelabs": "npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari",
|
||||
"analyze-coverage": "istanbul cover test/unit-tests.js",
|
||||
"check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100",
|
||||
"dynamic-analysis": "npm run analyze-coverage && npm run check-coverage",
|
||||
"compile": "tsc -p src/ && webpack && node tools/fixupbundle.js",
|
||||
"test": "npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis",
|
||||
"prepublish": "npm run compile",
|
||||
"profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor",
|
||||
"benchmark-parser": "node -expose_gc test/benchmark-parser.js",
|
||||
"benchmark-tokenizer": "node --expose_gc test/benchmark-tokenizer.js",
|
||||
"benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer",
|
||||
"codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml",
|
||||
"downstream": "node test/downstream.js",
|
||||
"travis": "npm test",
|
||||
"circleci": "npm test && npm run codecov && npm run downstream",
|
||||
"appveyor": "npm run compile && npm run all-tests && npm run browser-tests",
|
||||
"droneio": "npm run compile && npm run all-tests && npm run saucelabs",
|
||||
"generate-regex": "node tools/generate-identifier-regex.js",
|
||||
"generate-xhtml-entities": "node tools/generate-xhtml-entities.js"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('reject', require('../reject'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,61 @@
|
||||
import { Subscription } from '../Subscription';
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
import { arrRemove } from '../util/arrRemove';
|
||||
import { asyncScheduler } from '../scheduler/async';
|
||||
import { popScheduler } from '../util/args';
|
||||
import { executeSchedule } from '../util/executeSchedule';
|
||||
export function bufferTime(bufferTimeSpan, ...otherArgs) {
|
||||
var _a, _b;
|
||||
const scheduler = (_a = popScheduler(otherArgs)) !== null && _a !== void 0 ? _a : asyncScheduler;
|
||||
const bufferCreationInterval = (_b = otherArgs[0]) !== null && _b !== void 0 ? _b : null;
|
||||
const maxBufferSize = otherArgs[1] || Infinity;
|
||||
return operate((source, subscriber) => {
|
||||
let bufferRecords = [];
|
||||
let restartOnEmit = false;
|
||||
const emit = (record) => {
|
||||
const { buffer, subs } = record;
|
||||
subs.unsubscribe();
|
||||
arrRemove(bufferRecords, record);
|
||||
subscriber.next(buffer);
|
||||
restartOnEmit && startBuffer();
|
||||
};
|
||||
const startBuffer = () => {
|
||||
if (bufferRecords) {
|
||||
const subs = new Subscription();
|
||||
subscriber.add(subs);
|
||||
const buffer = [];
|
||||
const record = {
|
||||
buffer,
|
||||
subs,
|
||||
};
|
||||
bufferRecords.push(record);
|
||||
executeSchedule(subs, scheduler, () => emit(record), bufferTimeSpan);
|
||||
}
|
||||
};
|
||||
if (bufferCreationInterval !== null && bufferCreationInterval >= 0) {
|
||||
executeSchedule(subscriber, scheduler, startBuffer, bufferCreationInterval, true);
|
||||
}
|
||||
else {
|
||||
restartOnEmit = true;
|
||||
}
|
||||
startBuffer();
|
||||
const bufferTimeSubscriber = createOperatorSubscriber(subscriber, (value) => {
|
||||
const recordsCopy = bufferRecords.slice();
|
||||
for (const record of recordsCopy) {
|
||||
const { buffer } = record;
|
||||
buffer.push(value);
|
||||
maxBufferSize <= buffer.length && emit(record);
|
||||
}
|
||||
}, () => {
|
||||
while (bufferRecords === null || bufferRecords === void 0 ? void 0 : bufferRecords.length) {
|
||||
subscriber.next(bufferRecords.shift().buffer);
|
||||
}
|
||||
bufferTimeSubscriber === null || bufferTimeSubscriber === void 0 ? void 0 : bufferTimeSubscriber.unsubscribe();
|
||||
subscriber.complete();
|
||||
subscriber.unsubscribe();
|
||||
}, undefined, () => (bufferRecords = null));
|
||||
source.subscribe(bufferTimeSubscriber);
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=bufferTime.js.map
|
||||
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var modulo = require('./modulo');
|
||||
|
||||
var msPerSecond = require('../helpers/timeConstants').msPerSecond;
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
|
||||
|
||||
module.exports = function msFromTime(t) {
|
||||
return modulo(t, msPerSecond);
|
||||
};
|
||||
@@ -0,0 +1,170 @@
|
||||
// Type definitions for http-cache-semantics 4.0
|
||||
// Project: https://github.com/kornelski/http-cache-semantics#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = CachePolicy;
|
||||
|
||||
declare class CachePolicy {
|
||||
constructor(req: CachePolicy.Request, res: CachePolicy.Response, options?: CachePolicy.Options);
|
||||
|
||||
/**
|
||||
* Returns `true` if the response can be stored in a cache.
|
||||
* If it's `false` then you MUST NOT store either the request or the response.
|
||||
*/
|
||||
storable(): boolean;
|
||||
|
||||
/**
|
||||
* This is the most important method. Use this method to check whether the cached response is still fresh
|
||||
* in the context of the new request.
|
||||
*
|
||||
* If it returns `true`, then the given `request` matches the original response this cache policy has been
|
||||
* created with, and the response can be reused without contacting the server. Note that the old response
|
||||
* can't be returned without being updated, see `responseHeaders()`.
|
||||
*
|
||||
* If it returns `false`, then the response may not be matching at all (e.g. it's for a different URL or method),
|
||||
* or may require to be refreshed first (see `revalidationHeaders()`).
|
||||
*/
|
||||
satisfiesWithoutRevalidation(newRequest: CachePolicy.Request): boolean;
|
||||
|
||||
/**
|
||||
* Returns updated, filtered set of response headers to return to clients receiving the cached response.
|
||||
* This function is necessary, because proxies MUST always remove hop-by-hop headers (such as `TE` and `Connection`)
|
||||
* and update response's `Age` to avoid doubling cache time.
|
||||
*
|
||||
* @example
|
||||
* cachedResponse.headers = cachePolicy.responseHeaders(cachedResponse);
|
||||
*/
|
||||
responseHeaders(): CachePolicy.Headers;
|
||||
|
||||
/**
|
||||
* Returns approximate time in milliseconds until the response becomes stale (i.e. not fresh).
|
||||
*
|
||||
* After that time (when `timeToLive() <= 0`) the response might not be usable without revalidation. However,
|
||||
* there are exceptions, e.g. a client can explicitly allow stale responses, so always check with
|
||||
* `satisfiesWithoutRevalidation()`.
|
||||
*/
|
||||
timeToLive(): number;
|
||||
|
||||
/**
|
||||
* Chances are you'll want to store the `CachePolicy` object along with the cached response.
|
||||
* `obj = policy.toObject()` gives a plain JSON-serializable object.
|
||||
*/
|
||||
toObject(): CachePolicy.CachePolicyObject;
|
||||
|
||||
/**
|
||||
* `policy = CachePolicy.fromObject(obj)` creates an instance from object created by `toObject()`.
|
||||
*/
|
||||
static fromObject(obj: CachePolicy.CachePolicyObject): CachePolicy;
|
||||
|
||||
/**
|
||||
* Returns updated, filtered set of request headers to send to the origin server to check if the cached
|
||||
* response can be reused. These headers allow the origin server to return status 304 indicating the
|
||||
* response is still fresh. All headers unrelated to caching are passed through as-is.
|
||||
*
|
||||
* Use this method when updating cache from the origin server.
|
||||
*
|
||||
* @example
|
||||
* updateRequest.headers = cachePolicy.revalidationHeaders(updateRequest);
|
||||
*/
|
||||
revalidationHeaders(newRequest: CachePolicy.Request): CachePolicy.Headers;
|
||||
|
||||
/**
|
||||
* Use this method to update the cache after receiving a new response from the origin server.
|
||||
*/
|
||||
revalidatedPolicy(
|
||||
revalidationRequest: CachePolicy.Request,
|
||||
revalidationResponse: CachePolicy.Response
|
||||
): CachePolicy.RevalidationPolicy;
|
||||
}
|
||||
|
||||
declare namespace CachePolicy {
|
||||
interface Request {
|
||||
url?: string | undefined;
|
||||
method?: string | undefined;
|
||||
headers: Headers;
|
||||
}
|
||||
|
||||
interface Response {
|
||||
status?: number | undefined;
|
||||
headers: Headers;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* If `true`, then the response is evaluated from a perspective of a shared cache (i.e. `private` is not
|
||||
* cacheable and `s-maxage` is respected). If `false`, then the response is evaluated from a perspective
|
||||
* of a single-user cache (i.e. `private` is cacheable and `s-maxage` is ignored).
|
||||
* `true` is recommended for HTTP clients.
|
||||
* @default true
|
||||
*/
|
||||
shared?: boolean | undefined;
|
||||
/**
|
||||
* A fraction of response's age that is used as a fallback cache duration. The default is 0.1 (10%),
|
||||
* e.g. if a file hasn't been modified for 100 days, it'll be cached for 100*0.1 = 10 days.
|
||||
* @default 0.1
|
||||
*/
|
||||
cacheHeuristic?: number | undefined;
|
||||
/**
|
||||
* A number of milliseconds to assume as the default time to cache responses with `Cache-Control: immutable`.
|
||||
* Note that [per RFC](https://httpwg.org/specs/rfc8246.html#the-immutable-cache-control-extension)
|
||||
* these can become stale, so `max-age` still overrides the default.
|
||||
* @default 24*3600*1000 (24h)
|
||||
*/
|
||||
immutableMinTimeToLive?: number | undefined;
|
||||
/**
|
||||
* If `true`, common anti-cache directives will be completely ignored if the non-standard `pre-check`
|
||||
* and `post-check` directives are present. These two useless directives are most commonly found
|
||||
* in bad StackOverflow answers and PHP's "session limiter" defaults.
|
||||
* @default false
|
||||
*/
|
||||
ignoreCargoCult?: boolean | undefined;
|
||||
/**
|
||||
* If `false`, then server's `Date` header won't be used as the base for `max-age`. This is against the RFC,
|
||||
* but it's useful if you want to cache responses with very short `max-age`, but your local clock
|
||||
* is not exactly in sync with the server's.
|
||||
* @default true
|
||||
*/
|
||||
trustServerDate?: boolean | undefined;
|
||||
}
|
||||
|
||||
interface CachePolicyObject {
|
||||
v: number;
|
||||
t: number;
|
||||
sh: boolean;
|
||||
ch: number;
|
||||
imm: number;
|
||||
st: number;
|
||||
resh: Headers;
|
||||
rescc: { [key: string]: string };
|
||||
m: string;
|
||||
u?: string | undefined;
|
||||
h?: string | undefined;
|
||||
a: boolean;
|
||||
reqh: Headers | null;
|
||||
reqcc: { [key: string]: string };
|
||||
}
|
||||
|
||||
interface Headers {
|
||||
[header: string]: string | string[] | undefined;
|
||||
}
|
||||
|
||||
interface RevalidationPolicy {
|
||||
/**
|
||||
* A new `CachePolicy` with HTTP headers updated from `revalidationResponse`. You can always replace
|
||||
* the old cached `CachePolicy` with the new one.
|
||||
*/
|
||||
policy: CachePolicy;
|
||||
/**
|
||||
* Boolean indicating whether the response body has changed.
|
||||
*
|
||||
* - If `false`, then a valid 304 Not Modified response has been received, and you can reuse the old
|
||||
* cached response body.
|
||||
* - If `true`, you should use new response's body (if present), or make another request to the origin
|
||||
* server without any conditional headers (i.e. don't use `revalidationHeaders()` this time) to get
|
||||
* the new resource.
|
||||
*/
|
||||
modified: boolean;
|
||||
matches: boolean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
exports.__esModule = true;
|
||||
// istanbul ignore next
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
||||
|
||||
var _exception = require('../exception');
|
||||
|
||||
var _exception2 = _interopRequireDefault(_exception);
|
||||
|
||||
exports['default'] = function (instance) {
|
||||
instance.registerHelper('helperMissing', function () /* [args, ]options */{
|
||||
if (arguments.length === 1) {
|
||||
// A missing field in a {{foo}} construct.
|
||||
return undefined;
|
||||
} else {
|
||||
// Someone is actually trying to call something, blow up.
|
||||
throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = exports['default'];
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvaGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozt5QkFBc0IsY0FBYzs7OztxQkFFckIsVUFBUyxRQUFRLEVBQUU7QUFDaEMsVUFBUSxDQUFDLGNBQWMsQ0FBQyxlQUFlLEVBQUUsaUNBQWdDO0FBQ3ZFLFFBQUksU0FBUyxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7O0FBRTFCLGFBQU8sU0FBUyxDQUFDO0tBQ2xCLE1BQU07O0FBRUwsWUFBTSwyQkFDSixtQkFBbUIsR0FBRyxTQUFTLENBQUMsU0FBUyxDQUFDLE1BQU0sR0FBRyxDQUFDLENBQUMsQ0FBQyxJQUFJLEdBQUcsR0FBRyxDQUNqRSxDQUFDO0tBQ0g7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJoZWxwZXItbWlzc2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBFeGNlcHRpb24gZnJvbSAnLi4vZXhjZXB0aW9uJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2hlbHBlck1pc3NpbmcnLCBmdW5jdGlvbigvKiBbYXJncywgXW9wdGlvbnMgKi8pIHtcbiAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA9PT0gMSkge1xuICAgICAgLy8gQSBtaXNzaW5nIGZpZWxkIGluIGEge3tmb299fSBjb25zdHJ1Y3QuXG4gICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBTb21lb25lIGlzIGFjdHVhbGx5IHRyeWluZyB0byBjYWxsIHNvbWV0aGluZywgYmxvdyB1cC5cbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oXG4gICAgICAgICdNaXNzaW5nIGhlbHBlcjogXCInICsgYXJndW1lbnRzW2FyZ3VtZW50cy5sZW5ndGggLSAxXS5uYW1lICsgJ1wiJ1xuICAgICAgKTtcbiAgICB9XG4gIH0pO1xufVxuIl19
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
import type { Transformer, Options } from '../types';
|
||||
declare const transformer: Transformer<Options.Sass>;
|
||||
export { transformer };
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"npm-run-path","version":"5.1.0","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1678883670752,"integrity":"sha512-z2d6EKJ/2Tu8P6/pXmt8I67Jn+DxiS1cIlzs/FiaFpKPVvIbYMnKguJsygWlzC6+GA3kdtArJSJOHQ3wTZJK3g==","mode":420,"size":938},"package.json":{"checkedAt":1678883670752,"integrity":"sha512-gvH5VR0NNii+mFhFenWVGQgrYh26WJRDirWxp1cFJUOzTZG23VWPSgHBOAWkdTfKDdWUqwEKCdhgrcs8eeQWSQ==","mode":420,"size":852},"readme.md":{"checkedAt":1678883670752,"integrity":"sha512-xNXmf1vKSi5p89mtiwY8qKTQkTmAGleT+Xje/s63BA0T5bOEbpb5x4Yw4EW88AhycAKaJyGVJQvKxdXvUWSjgA==","mode":420,"size":2850},"index.d.ts":{"checkedAt":1678883670752,"integrity":"sha512-r+9gwp91VMRVYCx7iHqJItRKi6Nk66mDESfA54ipr/BsReIznWzkoUoJYOTWsX4G5LLqNiLSUOPV5yJoj2zPRw==","mode":420,"size":2261}}}
|
||||
@@ -0,0 +1,184 @@
|
||||
'use strict';
|
||||
|
||||
/* eslint global-require: 0 */
|
||||
// https://262.ecma-international.org/11.0/#sec-abstract-operations
|
||||
var ES2020 = {
|
||||
'Abstract Equality Comparison': require('./2020/AbstractEqualityComparison'),
|
||||
'Abstract Relational Comparison': require('./2020/AbstractRelationalComparison'),
|
||||
'Strict Equality Comparison': require('./2020/StrictEqualityComparison'),
|
||||
abs: require('./2020/abs'),
|
||||
AddEntriesFromIterable: require('./2020/AddEntriesFromIterable'),
|
||||
AdvanceStringIndex: require('./2020/AdvanceStringIndex'),
|
||||
ArrayCreate: require('./2020/ArrayCreate'),
|
||||
ArraySetLength: require('./2020/ArraySetLength'),
|
||||
ArraySpeciesCreate: require('./2020/ArraySpeciesCreate'),
|
||||
AsyncFromSyncIteratorContinuation: require('./2020/AsyncFromSyncIteratorContinuation'),
|
||||
AsyncIteratorClose: require('./2020/AsyncIteratorClose'),
|
||||
BigInt: require('./2020/BigInt'),
|
||||
BigIntBitwiseOp: require('./2020/BigIntBitwiseOp'),
|
||||
BinaryAnd: require('./2020/BinaryAnd'),
|
||||
BinaryOr: require('./2020/BinaryOr'),
|
||||
BinaryXor: require('./2020/BinaryXor'),
|
||||
Call: require('./2020/Call'),
|
||||
CanonicalNumericIndexString: require('./2020/CanonicalNumericIndexString'),
|
||||
CharacterRange: require('./2020/CharacterRange'),
|
||||
CodePointAt: require('./2020/CodePointAt'),
|
||||
CompletePropertyDescriptor: require('./2020/CompletePropertyDescriptor'),
|
||||
CompletionRecord: require('./2020/CompletionRecord'),
|
||||
CopyDataProperties: require('./2020/CopyDataProperties'),
|
||||
CreateAsyncFromSyncIterator: require('./2020/CreateAsyncFromSyncIterator'),
|
||||
CreateDataProperty: require('./2020/CreateDataProperty'),
|
||||
CreateDataPropertyOrThrow: require('./2020/CreateDataPropertyOrThrow'),
|
||||
CreateHTML: require('./2020/CreateHTML'),
|
||||
CreateIterResultObject: require('./2020/CreateIterResultObject'),
|
||||
CreateListFromArrayLike: require('./2020/CreateListFromArrayLike'),
|
||||
CreateMethodProperty: require('./2020/CreateMethodProperty'),
|
||||
CreateRegExpStringIterator: require('./2020/CreateRegExpStringIterator'),
|
||||
DateFromTime: require('./2020/DateFromTime'),
|
||||
DateString: require('./2020/DateString'),
|
||||
Day: require('./2020/Day'),
|
||||
DayFromYear: require('./2020/DayFromYear'),
|
||||
DaysInYear: require('./2020/DaysInYear'),
|
||||
DayWithinYear: require('./2020/DayWithinYear'),
|
||||
DefinePropertyOrThrow: require('./2020/DefinePropertyOrThrow'),
|
||||
DeletePropertyOrThrow: require('./2020/DeletePropertyOrThrow'),
|
||||
DetachArrayBuffer: require('./2020/DetachArrayBuffer'),
|
||||
EnumerableOwnPropertyNames: require('./2020/EnumerableOwnPropertyNames'),
|
||||
FlattenIntoArray: require('./2020/FlattenIntoArray'),
|
||||
floor: require('./2020/floor'),
|
||||
FromPropertyDescriptor: require('./2020/FromPropertyDescriptor'),
|
||||
Get: require('./2020/Get'),
|
||||
GetGlobalObject: require('./2020/GetGlobalObject'),
|
||||
GetIterator: require('./2020/GetIterator'),
|
||||
GetMethod: require('./2020/GetMethod'),
|
||||
GetOwnPropertyKeys: require('./2020/GetOwnPropertyKeys'),
|
||||
GetPrototypeFromConstructor: require('./2020/GetPrototypeFromConstructor'),
|
||||
GetSubstitution: require('./2020/GetSubstitution'),
|
||||
GetV: require('./2020/GetV'),
|
||||
HasOwnProperty: require('./2020/HasOwnProperty'),
|
||||
HasProperty: require('./2020/HasProperty'),
|
||||
HourFromTime: require('./2020/HourFromTime'),
|
||||
InLeapYear: require('./2020/InLeapYear'),
|
||||
InstanceofOperator: require('./2020/InstanceofOperator'),
|
||||
Invoke: require('./2020/Invoke'),
|
||||
IsAccessorDescriptor: require('./2020/IsAccessorDescriptor'),
|
||||
IsArray: require('./2020/IsArray'),
|
||||
IsBigIntElementType: require('./2020/IsBigIntElementType'),
|
||||
IsCallable: require('./2020/IsCallable'),
|
||||
IsCompatiblePropertyDescriptor: require('./2020/IsCompatiblePropertyDescriptor'),
|
||||
IsConcatSpreadable: require('./2020/IsConcatSpreadable'),
|
||||
IsConstructor: require('./2020/IsConstructor'),
|
||||
IsDataDescriptor: require('./2020/IsDataDescriptor'),
|
||||
IsDetachedBuffer: require('./2020/IsDetachedBuffer'),
|
||||
IsExtensible: require('./2020/IsExtensible'),
|
||||
IsGenericDescriptor: require('./2020/IsGenericDescriptor'),
|
||||
IsInteger: require('./2020/IsInteger'),
|
||||
IsNonNegativeInteger: require('./2020/IsNonNegativeInteger'),
|
||||
IsNoTearConfiguration: require('./2020/IsNoTearConfiguration'),
|
||||
IsPromise: require('./2020/IsPromise'),
|
||||
IsPropertyKey: require('./2020/IsPropertyKey'),
|
||||
IsRegExp: require('./2020/IsRegExp'),
|
||||
IsSharedArrayBuffer: require('./2020/IsSharedArrayBuffer'),
|
||||
IsStringPrefix: require('./2020/IsStringPrefix'),
|
||||
IsUnclampedIntegerElementType: require('./2020/IsUnclampedIntegerElementType'),
|
||||
IsUnsignedElementType: require('./2020/IsUnsignedElementType'),
|
||||
IterableToList: require('./2020/IterableToList'),
|
||||
IteratorClose: require('./2020/IteratorClose'),
|
||||
IteratorComplete: require('./2020/IteratorComplete'),
|
||||
IteratorNext: require('./2020/IteratorNext'),
|
||||
IteratorStep: require('./2020/IteratorStep'),
|
||||
IteratorValue: require('./2020/IteratorValue'),
|
||||
LengthOfArrayLike: require('./2020/LengthOfArrayLike'),
|
||||
MakeDate: require('./2020/MakeDate'),
|
||||
MakeDay: require('./2020/MakeDay'),
|
||||
MakeTime: require('./2020/MakeTime'),
|
||||
max: require('./2020/max'),
|
||||
min: require('./2020/min'),
|
||||
MinFromTime: require('./2020/MinFromTime'),
|
||||
modulo: require('./2020/modulo'),
|
||||
MonthFromTime: require('./2020/MonthFromTime'),
|
||||
msFromTime: require('./2020/msFromTime'),
|
||||
NormalCompletion: require('./2020/NormalCompletion'),
|
||||
Number: require('./2020/Number'),
|
||||
NumberBitwiseOp: require('./2020/NumberBitwiseOp'),
|
||||
NumberToBigInt: require('./2020/NumberToBigInt'),
|
||||
NumericToRawBytes: require('./2020/NumericToRawBytes'),
|
||||
ObjectDefineProperties: require('./2020/ObjectDefineProperties'),
|
||||
OrdinaryCreateFromConstructor: require('./2020/OrdinaryCreateFromConstructor'),
|
||||
OrdinaryDefineOwnProperty: require('./2020/OrdinaryDefineOwnProperty'),
|
||||
OrdinaryGetOwnProperty: require('./2020/OrdinaryGetOwnProperty'),
|
||||
OrdinaryGetPrototypeOf: require('./2020/OrdinaryGetPrototypeOf'),
|
||||
OrdinaryHasInstance: require('./2020/OrdinaryHasInstance'),
|
||||
OrdinaryHasProperty: require('./2020/OrdinaryHasProperty'),
|
||||
OrdinaryObjectCreate: require('./2020/OrdinaryObjectCreate'),
|
||||
OrdinarySetPrototypeOf: require('./2020/OrdinarySetPrototypeOf'),
|
||||
OrdinaryToPrimitive: require('./2020/OrdinaryToPrimitive'),
|
||||
PromiseResolve: require('./2020/PromiseResolve'),
|
||||
QuoteJSONString: require('./2020/QuoteJSONString'),
|
||||
RawBytesToNumeric: require('./2020/RawBytesToNumeric'),
|
||||
RegExpCreate: require('./2020/RegExpCreate'),
|
||||
RegExpExec: require('./2020/RegExpExec'),
|
||||
RequireObjectCoercible: require('./2020/RequireObjectCoercible'),
|
||||
SameValue: require('./2020/SameValue'),
|
||||
SameValueNonNumeric: require('./2020/SameValueNonNumeric'),
|
||||
SameValueZero: require('./2020/SameValueZero'),
|
||||
SecFromTime: require('./2020/SecFromTime'),
|
||||
Set: require('./2020/Set'),
|
||||
SetFunctionLength: require('./2020/SetFunctionLength'),
|
||||
SetFunctionName: require('./2020/SetFunctionName'),
|
||||
SetIntegrityLevel: require('./2020/SetIntegrityLevel'),
|
||||
SpeciesConstructor: require('./2020/SpeciesConstructor'),
|
||||
SplitMatch: require('./2020/SplitMatch'),
|
||||
StringCreate: require('./2020/StringCreate'),
|
||||
StringGetOwnProperty: require('./2020/StringGetOwnProperty'),
|
||||
StringPad: require('./2020/StringPad'),
|
||||
StringToBigInt: require('./2020/StringToBigInt'),
|
||||
SymbolDescriptiveString: require('./2020/SymbolDescriptiveString'),
|
||||
TestIntegrityLevel: require('./2020/TestIntegrityLevel'),
|
||||
thisBigIntValue: require('./2020/thisBigIntValue'),
|
||||
thisBooleanValue: require('./2020/thisBooleanValue'),
|
||||
thisNumberValue: require('./2020/thisNumberValue'),
|
||||
thisStringValue: require('./2020/thisStringValue'),
|
||||
thisSymbolValue: require('./2020/thisSymbolValue'),
|
||||
thisTimeValue: require('./2020/thisTimeValue'),
|
||||
ThrowCompletion: require('./2020/ThrowCompletion'),
|
||||
TimeClip: require('./2020/TimeClip'),
|
||||
TimeFromYear: require('./2020/TimeFromYear'),
|
||||
TimeString: require('./2020/TimeString'),
|
||||
TimeWithinDay: require('./2020/TimeWithinDay'),
|
||||
ToBigInt: require('./2020/ToBigInt'),
|
||||
ToBigInt64: require('./2020/ToBigInt64'),
|
||||
ToBigUint64: require('./2020/ToBigUint64'),
|
||||
ToBoolean: require('./2020/ToBoolean'),
|
||||
ToDateString: require('./2020/ToDateString'),
|
||||
ToIndex: require('./2020/ToIndex'),
|
||||
ToInt16: require('./2020/ToInt16'),
|
||||
ToInt32: require('./2020/ToInt32'),
|
||||
ToInt8: require('./2020/ToInt8'),
|
||||
ToInteger: require('./2020/ToInteger'),
|
||||
ToLength: require('./2020/ToLength'),
|
||||
ToNumber: require('./2020/ToNumber'),
|
||||
ToNumeric: require('./2020/ToNumeric'),
|
||||
ToObject: require('./2020/ToObject'),
|
||||
ToPrimitive: require('./2020/ToPrimitive'),
|
||||
ToPropertyDescriptor: require('./2020/ToPropertyDescriptor'),
|
||||
ToPropertyKey: require('./2020/ToPropertyKey'),
|
||||
ToString: require('./2020/ToString'),
|
||||
ToUint16: require('./2020/ToUint16'),
|
||||
ToUint32: require('./2020/ToUint32'),
|
||||
ToUint8: require('./2020/ToUint8'),
|
||||
ToUint8Clamp: require('./2020/ToUint8Clamp'),
|
||||
TrimString: require('./2020/TrimString'),
|
||||
Type: require('./2020/Type'),
|
||||
UnicodeEscape: require('./2020/UnicodeEscape'),
|
||||
UTF16DecodeString: require('./2020/UTF16DecodeString'),
|
||||
UTF16DecodeSurrogatePair: require('./2020/UTF16DecodeSurrogatePair'),
|
||||
UTF16Encoding: require('./2020/UTF16Encoding'),
|
||||
ValidateAndApplyPropertyDescriptor: require('./2020/ValidateAndApplyPropertyDescriptor'),
|
||||
ValidateAtomicAccess: require('./2020/ValidateAtomicAccess'),
|
||||
ValidateTypedArray: require('./2020/ValidateTypedArray'),
|
||||
WeekDay: require('./2020/WeekDay'),
|
||||
YearFromTime: require('./2020/YearFromTime')
|
||||
};
|
||||
|
||||
module.exports = ES2020;
|
||||
@@ -0,0 +1,107 @@
|
||||
declare const tag: unique symbol;
|
||||
|
||||
declare type Tagged<Token> = {
|
||||
readonly [tag]: Token;
|
||||
};
|
||||
|
||||
/**
|
||||
Create an opaque type, which hides its internal details from the public, and can only be created by being used explicitly.
|
||||
|
||||
The generic type parameter can be anything. It doesn't have to be an object.
|
||||
|
||||
[Read more about opaque types.](https://codemix.com/opaque-types-in-javascript/)
|
||||
|
||||
There have been several discussions about adding this feature to TypeScript via the `opaque type` operator, similar to how Flow does it. Unfortunately, nothing has (yet) moved forward:
|
||||
- [Microsoft/TypeScript#202](https://github.com/microsoft/TypeScript/issues/202)
|
||||
- [Microsoft/TypeScript#15408](https://github.com/Microsoft/TypeScript/issues/15408)
|
||||
- [Microsoft/TypeScript#15807](https://github.com/Microsoft/TypeScript/issues/15807)
|
||||
|
||||
@example
|
||||
```
|
||||
import type {Opaque} from 'type-fest';
|
||||
|
||||
type AccountNumber = Opaque<number, 'AccountNumber'>;
|
||||
type AccountBalance = Opaque<number, 'AccountBalance'>;
|
||||
|
||||
// The `Token` parameter allows the compiler to differentiate between types, whereas "unknown" will not. For example, consider the following structures:
|
||||
type ThingOne = Opaque<string>;
|
||||
type ThingTwo = Opaque<string>;
|
||||
|
||||
// To the compiler, these types are allowed to be cast to each other as they have the same underlying type. They are both `string & { __opaque__: unknown }`.
|
||||
// To avoid this behaviour, you would instead pass the "Token" parameter, like so.
|
||||
type NewThingOne = Opaque<string, 'ThingOne'>;
|
||||
type NewThingTwo = Opaque<string, 'ThingTwo'>;
|
||||
|
||||
// Now they're completely separate types, so the following will fail to compile.
|
||||
function createNewThingOne (): NewThingOne {
|
||||
// As you can see, casting from a string is still allowed. However, you may not cast NewThingOne to NewThingTwo, and vice versa.
|
||||
return 'new thing one' as NewThingOne;
|
||||
}
|
||||
|
||||
// This will fail to compile, as they are fundamentally different types.
|
||||
const thingTwo = createNewThingOne() as NewThingTwo;
|
||||
|
||||
// Here's another example of opaque typing.
|
||||
function createAccountNumber(): AccountNumber {
|
||||
return 2 as AccountNumber;
|
||||
}
|
||||
|
||||
function getMoneyForAccount(accountNumber: AccountNumber): AccountBalance {
|
||||
return 4 as AccountBalance;
|
||||
}
|
||||
|
||||
// This will compile successfully.
|
||||
getMoneyForAccount(createAccountNumber());
|
||||
|
||||
// But this won't, because it has to be explicitly passed as an `AccountNumber` type.
|
||||
getMoneyForAccount(2);
|
||||
|
||||
// You can use opaque values like they aren't opaque too.
|
||||
const accountNumber = createAccountNumber();
|
||||
|
||||
// This will not compile successfully.
|
||||
const newAccountNumber = accountNumber + 2;
|
||||
|
||||
// As a side note, you can (and should) use recursive types for your opaque types to make them stronger and hopefully easier to type.
|
||||
type Person = {
|
||||
id: Opaque<number, Person>;
|
||||
name: string;
|
||||
};
|
||||
```
|
||||
|
||||
@category Type
|
||||
*/
|
||||
export type Opaque<Type, Token = unknown> = Type & Tagged<Token>;
|
||||
|
||||
/**
|
||||
Revert an opaque type back to its original type by removing the readonly `[tag]`.
|
||||
|
||||
Why is this necessary?
|
||||
|
||||
1. Use an `Opaque` type as object keys
|
||||
2. Prevent TS4058 error: "Return type of exported function has or is using name X from external module Y but cannot be named"
|
||||
|
||||
@example
|
||||
```
|
||||
import type {Opaque, UnwrapOpaque} from 'type-fest';
|
||||
|
||||
type AccountType = Opaque<'SAVINGS' | 'CHECKING', 'AccountType'>;
|
||||
|
||||
const moneyByAccountType: Record<UnwrapOpaque<AccountType>, number> = {
|
||||
SAVINGS: 99,
|
||||
CHECKING: 0.1
|
||||
};
|
||||
|
||||
// Without UnwrapOpaque, the following expression would throw a type error.
|
||||
const money = moneyByAccountType.SAVINGS; // TS error: Property 'SAVINGS' does not exist
|
||||
|
||||
// Attempting to pass an non-Opaque type to UnwrapOpaque will raise a type error.
|
||||
type WontWork = UnwrapOpaque<string>;
|
||||
```
|
||||
|
||||
@category Type
|
||||
*/
|
||||
export type UnwrapOpaque<OpaqueType extends Tagged<unknown>> =
|
||||
OpaqueType extends Opaque<infer Type, OpaqueType[typeof tag]>
|
||||
? Type
|
||||
: OpaqueType;
|
||||
@@ -0,0 +1,5 @@
|
||||
import { QueueAction } from './QueueAction';
|
||||
import { QueueScheduler } from './QueueScheduler';
|
||||
export var queueScheduler = new QueueScheduler(QueueAction);
|
||||
export var queue = queueScheduler;
|
||||
//# sourceMappingURL=queue.js.map
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
{"name":"has-flag","version":"3.0.0","files":{"license":{"checkedAt":1678883669272,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"package.json":{"checkedAt":1678883670599,"integrity":"sha512-/4c227BQgxdNMqRGAKs5ZWajLlWzdWTbb29HfAw2QJHgDOvNMJJIES2+DWThxZq5F8K81nWIbbJZPpDYOe3T8g==","mode":420,"size":710},"index.js":{"checkedAt":1678883670599,"integrity":"sha512-1C/aTMo0p3uwKhg/nNeUUsAzdj0a8PARrfGUmVld1XpKYNBUT1aSAZjva4nBKYAeTUtPcPYckQOTBfqQ6RVeCA==","mode":420,"size":320},"readme.md":{"checkedAt":1678883670599,"integrity":"sha512-GOYoNB1ifrHjGzqR+wjI9MF8XN6jn9ushJ94zsmVCvxM9XR9wk9wg9CPke7+aYufRdIML1LNgplWnxSUEF6o1w==","mode":420,"size":986}}}
|
||||
@@ -0,0 +1,146 @@
|
||||
'use strict';
|
||||
|
||||
/* eslint global-require: 0 */
|
||||
// https://262.ecma-international.org/8.0/#sec-abstract-operations
|
||||
var ES2017 = {
|
||||
'Abstract Equality Comparison': require('./2017/AbstractEqualityComparison'),
|
||||
'Abstract Relational Comparison': require('./2017/AbstractRelationalComparison'),
|
||||
'Strict Equality Comparison': require('./2017/StrictEqualityComparison'),
|
||||
abs: require('./2017/abs'),
|
||||
AdvanceStringIndex: require('./2017/AdvanceStringIndex'),
|
||||
ArrayCreate: require('./2017/ArrayCreate'),
|
||||
ArraySetLength: require('./2017/ArraySetLength'),
|
||||
ArraySpeciesCreate: require('./2017/ArraySpeciesCreate'),
|
||||
Call: require('./2017/Call'),
|
||||
CanonicalNumericIndexString: require('./2017/CanonicalNumericIndexString'),
|
||||
CharacterRange: require('./2017/CharacterRange'),
|
||||
CompletePropertyDescriptor: require('./2017/CompletePropertyDescriptor'),
|
||||
CompletionRecord: require('./2017/CompletionRecord'),
|
||||
CreateDataProperty: require('./2017/CreateDataProperty'),
|
||||
CreateDataPropertyOrThrow: require('./2017/CreateDataPropertyOrThrow'),
|
||||
CreateHTML: require('./2017/CreateHTML'),
|
||||
CreateIterResultObject: require('./2017/CreateIterResultObject'),
|
||||
CreateListFromArrayLike: require('./2017/CreateListFromArrayLike'),
|
||||
CreateMethodProperty: require('./2017/CreateMethodProperty'),
|
||||
DateFromTime: require('./2017/DateFromTime'),
|
||||
Day: require('./2017/Day'),
|
||||
DayFromYear: require('./2017/DayFromYear'),
|
||||
DaysInYear: require('./2017/DaysInYear'),
|
||||
DayWithinYear: require('./2017/DayWithinYear'),
|
||||
DefinePropertyOrThrow: require('./2017/DefinePropertyOrThrow'),
|
||||
DeletePropertyOrThrow: require('./2017/DeletePropertyOrThrow'),
|
||||
DetachArrayBuffer: require('./2017/DetachArrayBuffer'),
|
||||
EnumerableOwnProperties: require('./2017/EnumerableOwnProperties'),
|
||||
floor: require('./2017/floor'),
|
||||
FromPropertyDescriptor: require('./2017/FromPropertyDescriptor'),
|
||||
Get: require('./2017/Get'),
|
||||
GetGlobalObject: require('./2017/GetGlobalObject'),
|
||||
GetIterator: require('./2017/GetIterator'),
|
||||
GetMethod: require('./2017/GetMethod'),
|
||||
GetOwnPropertyKeys: require('./2017/GetOwnPropertyKeys'),
|
||||
GetPrototypeFromConstructor: require('./2017/GetPrototypeFromConstructor'),
|
||||
GetSubstitution: require('./2017/GetSubstitution'),
|
||||
GetV: require('./2017/GetV'),
|
||||
HasOwnProperty: require('./2017/HasOwnProperty'),
|
||||
HasProperty: require('./2017/HasProperty'),
|
||||
HourFromTime: require('./2017/HourFromTime'),
|
||||
InLeapYear: require('./2017/InLeapYear'),
|
||||
InstanceofOperator: require('./2017/InstanceofOperator'),
|
||||
Invoke: require('./2017/Invoke'),
|
||||
IsAccessorDescriptor: require('./2017/IsAccessorDescriptor'),
|
||||
IsArray: require('./2017/IsArray'),
|
||||
IsCallable: require('./2017/IsCallable'),
|
||||
IsCompatiblePropertyDescriptor: require('./2017/IsCompatiblePropertyDescriptor'),
|
||||
IsConcatSpreadable: require('./2017/IsConcatSpreadable'),
|
||||
IsConstructor: require('./2017/IsConstructor'),
|
||||
IsDataDescriptor: require('./2017/IsDataDescriptor'),
|
||||
IsDetachedBuffer: require('./2017/IsDetachedBuffer'),
|
||||
IsExtensible: require('./2017/IsExtensible'),
|
||||
IsGenericDescriptor: require('./2017/IsGenericDescriptor'),
|
||||
IsInteger: require('./2017/IsInteger'),
|
||||
IsPromise: require('./2017/IsPromise'),
|
||||
IsPropertyDescriptor: require('./2017/IsPropertyDescriptor'),
|
||||
IsPropertyKey: require('./2017/IsPropertyKey'),
|
||||
IsRegExp: require('./2017/IsRegExp'),
|
||||
IsSharedArrayBuffer: require('./2017/IsSharedArrayBuffer'),
|
||||
IterableToList: require('./2017/IterableToList'),
|
||||
IteratorClose: require('./2017/IteratorClose'),
|
||||
IteratorComplete: require('./2017/IteratorComplete'),
|
||||
IteratorNext: require('./2017/IteratorNext'),
|
||||
IteratorStep: require('./2017/IteratorStep'),
|
||||
IteratorValue: require('./2017/IteratorValue'),
|
||||
MakeDate: require('./2017/MakeDate'),
|
||||
MakeDay: require('./2017/MakeDay'),
|
||||
MakeTime: require('./2017/MakeTime'),
|
||||
max: require('./2017/max'),
|
||||
min: require('./2017/min'),
|
||||
MinFromTime: require('./2017/MinFromTime'),
|
||||
modulo: require('./2017/modulo'),
|
||||
MonthFromTime: require('./2017/MonthFromTime'),
|
||||
msFromTime: require('./2017/msFromTime'),
|
||||
NormalCompletion: require('./2017/NormalCompletion'),
|
||||
NumberToRawBytes: require('./2017/NumberToRawBytes'),
|
||||
ObjectCreate: require('./2017/ObjectCreate'),
|
||||
ObjectDefineProperties: require('./2017/ObjectDefineProperties'),
|
||||
OrdinaryCreateFromConstructor: require('./2017/OrdinaryCreateFromConstructor'),
|
||||
OrdinaryDefineOwnProperty: require('./2017/OrdinaryDefineOwnProperty'),
|
||||
OrdinaryGetOwnProperty: require('./2017/OrdinaryGetOwnProperty'),
|
||||
OrdinaryGetPrototypeOf: require('./2017/OrdinaryGetPrototypeOf'),
|
||||
OrdinaryHasInstance: require('./2017/OrdinaryHasInstance'),
|
||||
OrdinaryHasProperty: require('./2017/OrdinaryHasProperty'),
|
||||
OrdinarySetPrototypeOf: require('./2017/OrdinarySetPrototypeOf'),
|
||||
OrdinaryToPrimitive: require('./2017/OrdinaryToPrimitive'),
|
||||
QuoteJSONString: require('./2017/QuoteJSONString'),
|
||||
RawBytesToNumber: require('./2017/RawBytesToNumber'),
|
||||
RegExpCreate: require('./2017/RegExpCreate'),
|
||||
RegExpExec: require('./2017/RegExpExec'),
|
||||
RequireObjectCoercible: require('./2017/RequireObjectCoercible'),
|
||||
SameValue: require('./2017/SameValue'),
|
||||
SameValueNonNumber: require('./2017/SameValueNonNumber'),
|
||||
SameValueZero: require('./2017/SameValueZero'),
|
||||
SecFromTime: require('./2017/SecFromTime'),
|
||||
Set: require('./2017/Set'),
|
||||
SetFunctionName: require('./2017/SetFunctionName'),
|
||||
SetIntegrityLevel: require('./2017/SetIntegrityLevel'),
|
||||
SpeciesConstructor: require('./2017/SpeciesConstructor'),
|
||||
SplitMatch: require('./2017/SplitMatch'),
|
||||
StringCreate: require('./2017/StringCreate'),
|
||||
StringGetOwnProperty: require('./2017/StringGetOwnProperty'),
|
||||
SymbolDescriptiveString: require('./2017/SymbolDescriptiveString'),
|
||||
TestIntegrityLevel: require('./2017/TestIntegrityLevel'),
|
||||
thisBooleanValue: require('./2017/thisBooleanValue'),
|
||||
thisNumberValue: require('./2017/thisNumberValue'),
|
||||
thisStringValue: require('./2017/thisStringValue'),
|
||||
thisTimeValue: require('./2017/thisTimeValue'),
|
||||
TimeClip: require('./2017/TimeClip'),
|
||||
TimeFromYear: require('./2017/TimeFromYear'),
|
||||
TimeWithinDay: require('./2017/TimeWithinDay'),
|
||||
ToBoolean: require('./2017/ToBoolean'),
|
||||
ToDateString: require('./2017/ToDateString'),
|
||||
ToIndex: require('./2017/ToIndex'),
|
||||
ToInt16: require('./2017/ToInt16'),
|
||||
ToInt32: require('./2017/ToInt32'),
|
||||
ToInt8: require('./2017/ToInt8'),
|
||||
ToInteger: require('./2017/ToInteger'),
|
||||
ToLength: require('./2017/ToLength'),
|
||||
ToNumber: require('./2017/ToNumber'),
|
||||
ToObject: require('./2017/ToObject'),
|
||||
ToPrimitive: require('./2017/ToPrimitive'),
|
||||
ToPropertyDescriptor: require('./2017/ToPropertyDescriptor'),
|
||||
ToPropertyKey: require('./2017/ToPropertyKey'),
|
||||
ToString: require('./2017/ToString'),
|
||||
ToUint16: require('./2017/ToUint16'),
|
||||
ToUint32: require('./2017/ToUint32'),
|
||||
ToUint8: require('./2017/ToUint8'),
|
||||
ToUint8Clamp: require('./2017/ToUint8Clamp'),
|
||||
Type: require('./2017/Type'),
|
||||
UTF16Decode: require('./2017/UTF16Decode'),
|
||||
UTF16Encoding: require('./2017/UTF16Encoding'),
|
||||
ValidateAndApplyPropertyDescriptor: require('./2017/ValidateAndApplyPropertyDescriptor'),
|
||||
ValidateAtomicAccess: require('./2017/ValidateAtomicAccess'),
|
||||
ValidateTypedArray: require('./2017/ValidateTypedArray'),
|
||||
WeekDay: require('./2017/WeekDay'),
|
||||
YearFromTime: require('./2017/YearFromTime')
|
||||
};
|
||||
|
||||
module.exports = ES2017;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/signals.js"],"names":["getSignals","realtimeSignals","signals","SIGNALS","map","normalizeSignal","name","number","defaultNumber","description","action","forced","standard","constantSignal","constants","supported","undefined"],"mappings":"gGAAA;;AAEA;AACA;;;;AAIO,KAAMA,CAAAA,UAAU,CAAG,UAAW;AACnC,KAAMC,CAAAA,eAAe,CAAG,kCAAxB;AACA,KAAMC,CAAAA,OAAO,CAAG,CAAC,GAAGC,aAAJ,CAAa,GAAGF,eAAhB,EAAiCG,GAAjC,CAAqCC,eAArC,CAAhB;AACA,MAAOH,CAAAA,OAAP;AACD,CAJM,C;;;;;;;;AAYP,KAAMG,CAAAA,eAAe,CAAG,SAAS;AAC/BC,IAD+B;AAE/BC,MAAM,CAAEC,aAFuB;AAG/BC,WAH+B;AAI/BC,MAJ+B;AAK/BC,MAAM,CAAG,KALsB;AAM/BC,QAN+B,CAAT;AAOrB;AACD,KAAM;AACJV,OAAO,CAAE,CAAE,CAACI,IAAD,EAAQO,cAAV,CADL;AAEFC,aAFJ;AAGA,KAAMC,CAAAA,SAAS,CAAGF,cAAc,GAAKG,SAArC;AACA,KAAMT,CAAAA,MAAM,CAAGQ,SAAS,CAAGF,cAAH,CAAoBL,aAA5C;AACA,MAAO,CAAEF,IAAF,CAAQC,MAAR,CAAgBE,WAAhB,CAA6BM,SAA7B,CAAwCL,MAAxC,CAAgDC,MAAhD,CAAwDC,QAAxD,CAAP;AACD,CAdD","sourcesContent":["import { constants } from 'os'\n\nimport { SIGNALS } from './core.js'\nimport { getRealtimeSignals } from './realtime.js'\n\n// Retrieve list of know signals (including realtime) with information about\n// them\nexport const getSignals = function() {\n const realtimeSignals = getRealtimeSignals()\n const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal)\n return signals\n}\n\n// Normalize signal:\n// - `number`: signal numbers are OS-specific. This is taken into account by\n// `os.constants.signals`. However we provide a default `number` since some\n// signals are not defined for some OS.\n// - `forced`: set default to `false`\n// - `supported`: set value\nconst normalizeSignal = function({\n name,\n number: defaultNumber,\n description,\n action,\n forced = false,\n standard,\n}) {\n const {\n signals: { [name]: constantSignal },\n } = constants\n const supported = constantSignal !== undefined\n const number = supported ? constantSignal : defaultNumber\n return { name, number, description, supported, action, forced, standard }\n}\n"],"file":"src/signals.js"}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { AgentOptions } from 'agent-base';
|
||||
import { PacResolverOptions } from 'pac-resolver';
|
||||
import { HttpProxyAgentOptions } from 'http-proxy-agent';
|
||||
import { HttpsProxyAgentOptions } from 'https-proxy-agent';
|
||||
import { SocksProxyAgentOptions } from 'socks-proxy-agent';
|
||||
import _PacProxyAgent from './agent';
|
||||
declare function createPacProxyAgent(uri: string, opts?: createPacProxyAgent.PacProxyAgentOptions): _PacProxyAgent;
|
||||
declare function createPacProxyAgent(opts: createPacProxyAgent.PacProxyAgentOptions): _PacProxyAgent;
|
||||
declare namespace createPacProxyAgent {
|
||||
interface PacProxyAgentOptions extends AgentOptions, PacResolverOptions, HttpProxyAgentOptions, HttpsProxyAgentOptions, SocksProxyAgentOptions {
|
||||
uri?: string;
|
||||
fallbackToDirect?: boolean;
|
||||
}
|
||||
type PacProxyAgent = _PacProxyAgent;
|
||||
const PacProxyAgent: typeof _PacProxyAgent;
|
||||
/**
|
||||
* Supported "protocols". Delegates out to the `get-uri` module.
|
||||
*/
|
||||
const protocols: string[];
|
||||
}
|
||||
export = createPacProxyAgent;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A CC","164":"B"},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":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 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 EC FC"},D:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"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","132":"BB CB DB EB FB GB HB"},E:{"1":"C K L G rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J HC zB IC JC","164":"D E F A B KC LC 0B qB"},F:{"1":"5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"F B C G M N O w g x PC QC RC SC qB AC TC rB","132":"0 1 2 3 4 y z"},G:{"1":"eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC dC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:2,C:"Encrypted Media Extensions"};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/fast-memoize/index.ts"],"names":[],"mappings":"AAIA,aAAK,IAAI,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;AAEnC,MAAM,WAAW,KAAK,CAAC,CAAC,EAAE,CAAC;IACzB,MAAM,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAC9B;AAED,UAAU,eAAe,CAAC,CAAC,EAAE,CAAC;IAC5B,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CACvB;AAED,UAAU,YAAY,CAAC,CAAC,EAAE,CAAC;IACzB,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;IACd,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAA;CAC5B;AAED,oBAAY,UAAU,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,CAAA;AAEhD,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,IAAI;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IACpC,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CAC1B;AAED,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,IAAI;IAC7C,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;IACnC,UAAU,EAAE,UAAU,CAAA;CACvB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,IAAI;IACzC,CAAC,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,2BAa1E;AAYD,oBAAY,UAAU,GAAG,CAAC,CAAC,SAAS,IAAI,EACtC,IAAI,EAAE,OAAO,EACb,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,EAC1C,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,KACL,GAAG,CAAA;AA4HR,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,IAAI;IACxC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;IACxB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAA;CACxB;AAED,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,IAAI,CAGvC,CAAA"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"interval.js","sourceRoot":"","sources":["../../../../src/internal/observable/interval.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA+ChC,MAAM,UAAU,QAAQ,CAAC,MAAU,EAAE,SAAyC;IAArD,uBAAA,EAAA,UAAU;IAAE,0BAAA,EAAA,0BAAyC;IAC5E,IAAI,MAAM,GAAG,CAAC,EAAE;QAEd,MAAM,GAAG,CAAC,CAAC;KACZ;IAED,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC"}
|
||||
@@ -0,0 +1,40 @@
|
||||
import { OperatorFunction, ObservableInputTuple } from '../types';
|
||||
import { raceInit } from '../observable/race';
|
||||
import { operate } from '../util/lift';
|
||||
import { identity } from '../util/identity';
|
||||
|
||||
/**
|
||||
* Creates an Observable that mirrors the first source Observable to emit a next,
|
||||
* error or complete notification from the combination of the Observable to which
|
||||
* the operator is applied and supplied Observables.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* ```ts
|
||||
* import { interval, map, raceWith } from 'rxjs';
|
||||
*
|
||||
* const obs1 = interval(7000).pipe(map(() => 'slow one'));
|
||||
* const obs2 = interval(3000).pipe(map(() => 'fast one'));
|
||||
* const obs3 = interval(5000).pipe(map(() => 'medium one'));
|
||||
*
|
||||
* obs1
|
||||
* .pipe(raceWith(obs2, obs3))
|
||||
* .subscribe(winner => console.log(winner));
|
||||
*
|
||||
* // Outputs
|
||||
* // a series of 'fast one'
|
||||
* ```
|
||||
*
|
||||
* @param otherSources Sources used to race for which Observable emits first.
|
||||
* @return A function that returns an Observable that mirrors the output of the
|
||||
* first Observable to emit an item.
|
||||
*/
|
||||
export function raceWith<T, A extends readonly unknown[]>(
|
||||
...otherSources: [...ObservableInputTuple<A>]
|
||||
): OperatorFunction<T, T | A[number]> {
|
||||
return !otherSources.length
|
||||
? identity
|
||||
: operate((source, subscriber) => {
|
||||
raceInit<T | A[number]>([source, ...otherSources])(subscriber);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "postcss-load-config",
|
||||
"version": "3.1.4",
|
||||
"description": "Autoload Config for PostCSS",
|
||||
"main": "src/index.js",
|
||||
"types": "src/index.d.ts",
|
||||
"files": [
|
||||
"src"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
"dependencies": {
|
||||
"lilconfig": "^2.0.5",
|
||||
"yaml": "^1.10.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": ">=8.0.9",
|
||||
"ts-node": ">=9.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"ts-node": {
|
||||
"optional": true
|
||||
},
|
||||
"postcss": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"keywords": [
|
||||
"postcss",
|
||||
"postcssrc",
|
||||
"postcss.config.js"
|
||||
],
|
||||
"author": "Michael Ciniawky <michael.ciniawsky@gmail.com>",
|
||||
"contributors": [
|
||||
"Ryan Dunckel",
|
||||
"Mateusz Derks",
|
||||
"Dalton Santos",
|
||||
"Patrick Gilday",
|
||||
"François Wouts"
|
||||
],
|
||||
"repository": "postcss/postcss-load-config",
|
||||
"license": "MIT"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// see dirs.js
|
||||
@@ -0,0 +1,22 @@
|
||||
import { NumberFormatOptionsStyle, NumberFormatOptionsNotation, NumberFormatOptionsCompactDisplay, NumberFormatOptionsCurrencyDisplay, NumberFormatOptionsCurrencySign, NumberFormatOptionsUnitDisplay, NumberFormatLocaleInternalData, NumberFormatPart } from '../types/number';
|
||||
interface NumberResult {
|
||||
formattedString: string;
|
||||
roundedNumber: number;
|
||||
sign: -1 | 0 | 1;
|
||||
exponent: number;
|
||||
magnitude: number;
|
||||
}
|
||||
export default function formatToParts(numberResult: NumberResult, data: NumberFormatLocaleInternalData, pl: Intl.PluralRules, options: {
|
||||
numberingSystem: string;
|
||||
useGrouping: boolean;
|
||||
style: NumberFormatOptionsStyle;
|
||||
notation: NumberFormatOptionsNotation;
|
||||
compactDisplay?: NumberFormatOptionsCompactDisplay;
|
||||
currency?: string;
|
||||
currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
||||
currencySign?: NumberFormatOptionsCurrencySign;
|
||||
unit?: string;
|
||||
unitDisplay?: NumberFormatOptionsUnitDisplay;
|
||||
}): NumberFormatPart[];
|
||||
export {};
|
||||
//# sourceMappingURL=format_to_parts.d.ts.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"name":"mime-db","version":"1.52.0","files":{"LICENSE":{"checkedAt":1678883671430,"integrity":"sha512-2Qg6Jzsp/k37D4lnXY6/5xgcAVpzuji/pHSedmeDXI5A8R9NgH27YkijNdZoMDF00BYkMq4nSoHWomxfY3IBhQ==","mode":420,"size":1172},"index.js":{"checkedAt":1678883671430,"integrity":"sha512-gopGcxBIPMG9hSxVXJZR5jygUhm29DjH/u1TyZilj+fwDjoBHPjFxnYOXrgfB1WJmDjnJIcHtBbafPMagY5Ysw==","mode":420,"size":189},"package.json":{"checkedAt":1678883671484,"integrity":"sha512-k0TD3yqLXTq/Txp76KejuIVEXRNVspTGn4VRhbwVVvF5q04thle1zMVYSUo4LbN99X36u4NXRgTCL43l9yM4CA==","mode":420,"size":1624},"db.json":{"checkedAt":1678883671484,"integrity":"sha512-TGKaGkUjMaVWjLG+aqAO7TGuiOqPR1HFU6Il3Us6DDLv8wq229pEAS+vsJRuJa0RqR5pcUJHcdJpILJoRAk63g==","mode":420,"size":185882},"README.md":{"checkedAt":1678883671491,"integrity":"sha512-e8trRj174gZozLP1qTxgubWkimJkq04nCUqMJfLuNimVgpMmIiylk+fBaeHhnWugqqSnilXGwjBG2TkagKepJw==","mode":420,"size":4091},"HISTORY.md":{"checkedAt":1678883671491,"integrity":"sha512-XNl2BVLTAMVF3F3hgXCjoP2/t5nHDUh0CKu3iE2gmiV1ppPD/+LJcWsov0ZIimjxooQ35jDQS8wRZuboSZIydA==","mode":420,"size":12581}}}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"es-get-iterator","version":"1.1.3","files":{".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1678883671533,"integrity":"sha512-d2fjYr50p8QKjqC0qhH5nWv3sgAsKHHicw91kVzLPCZ54cpPIRw8zJk+nn45Y6q/yJ/T/xdxK77zBLuAvFgmVg==","mode":420,"size":1071},"test/core-js.js":{"checkedAt":1678883671909,"integrity":"sha512-57U3Xo77c4Lu71Maut2wPlTQZVar3hWkrNmXoWi0FwrlfQMEw3BJBiXfVp5JyjF/fMKN01tp+fRwY7YhBRy1Gw==","mode":420,"size":51},".eslintrc":{"checkedAt":1678883671909,"integrity":"sha512-/a/Gww4S0GxGo8w1gFxVDe003NwcHHG/BiF0CHWhNM27gks3XKLapSX2G7NcZg3Nc//bApwfel8jQxLNOuYZIA==","mode":420,"size":534},"index.js":{"checkedAt":1678883671909,"integrity":"sha512-XSZJTb8rEb1Gof1xY+ZJsi7+441aa8uVKHe7bx1bCbNr34EzvuNurciOzvp+hDCekPc3ULE3+fSGWynXxzMxXA==","mode":420,"size":5811},"test/es6-shim.js":{"checkedAt":1678883671909,"integrity":"sha512-HTt7kScFhgRG5ky8ZsYHAUQpqKA7nxijwqCCQ1LfwxcJmKnvkZvOfiJlYRQfH1K1z7gp3fFKB9woQqceYvt0yg==","mode":420,"size":177},"test/index.js":{"checkedAt":1678883671913,"integrity":"sha512-L9Bi2/u+7lbIwBHeC7XUpAkg/2X7ZlG41uPZ/xwOesg37Mjnn4a86EqGmbZhCgNN5K5oKzPiBODCVzp7v+5pBg==","mode":420,"size":5265},"test/node.js":{"checkedAt":1678883671913,"integrity":"sha512-TeBcpj1qkdRGv9vV8bop7vUXQDBUUPx2OsCH7iq2uCvgPzoUeyNrp6IqXiMaGrdx19Vwlg1OsUuBV4kJr+Jk/g==","mode":420,"size":30},"node.js":{"checkedAt":1678883671913,"integrity":"sha512-LNlgQp13h6XiCy4dE2sFDtSNY35ciq7Y1afQZcDAsOFY0liq79YrpNuSbgk9bWiHakpJ5vbxc5rbkjkdkw4LhQ==","mode":420,"size":372},"package.json":{"checkedAt":1678883671913,"integrity":"sha512-qQqY5+6tnVANVwjdh5yW3QUrEfqWMUxpBLZipT6W3A6Uj8X+vbhRP6kjiwrQS7HLEs011/aoC6He0Q3iWv+u2Q==","mode":420,"size":2749},"CHANGELOG.md":{"checkedAt":1678883671918,"integrity":"sha512-o9Lh9QjwEBQfzfu3FXR4g6gRW8e1HC4q8DQAT8ONr+X8ZMfmB8Bpj83IE6E2QYlmcvPsZXSo7S2c13a9KubM/w==","mode":420,"size":10618},"README.md":{"checkedAt":1678883671918,"integrity":"sha512-sSdjcBPuV0x3O27fnZ3nWVnvAB5FyMpVF8P9memoxgVErpEGadpl113rMwnzidGtNajsb9U8rESldVwFYZHwMw==","mode":420,"size":3646},"node.mjs":{"checkedAt":1678883671918,"integrity":"sha512-WHnOm0Fg93oQww5dfrgn4gD4l1yuCdvPkxs6VhS6sLNLJgOk01MMav8hQpIBcwWeLaTCsiDO5uAjmPECYo+P+A==","mode":420,"size":346},".github/FUNDING.yml":{"checkedAt":1678883671918,"integrity":"sha512-mMPIDNqgAvdjPyBv3GLHEmIdHWZbqWIQKeH2GTZo5BumUDv7Jk96cN2O1c79fVBibEF88/71797RIe4x9E0cTw==","mode":420,"size":561},"test/node.mjs":{"checkedAt":1678883671918,"integrity":"sha512-3k3B1akrWdcDJatOFGn9UoP2lNTb/7g9hiNEmLmnPPvoZifQteO18/piLpbW3xwAd3GVQihPkLNsBAr1epQXCA==","mode":420,"size":263}}}
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('cond', require('../cond'), require('./_falseOptions'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@pnpm/network.ca-file",
|
||||
"version": "1.0.2",
|
||||
"homepage": "https://bit.dev/pnpm/network/ca-file",
|
||||
"main": "dist/index.js",
|
||||
"componentId": {
|
||||
"scope": "pnpm.network",
|
||||
"name": "ca-file",
|
||||
"version": "1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"graceful-fs": "4.2.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/graceful-fs": "4.1.5",
|
||||
"@babel/runtime": "7.20.0",
|
||||
"@types/node": "12.20.4",
|
||||
"@types/jest": "26.0.20"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"engines": {
|
||||
"node": ">=12.22.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pnpm/components"
|
||||
},
|
||||
"keywords": [],
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
define(['exports', 'module'], function (exports, module) {
|
||||
// Build out our basic SafeString type
|
||||
'use strict';
|
||||
|
||||
function SafeString(string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
||||
return '' + this.string;
|
||||
};
|
||||
|
||||
module.exports = SafeString;
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL3NhZmUtc3RyaW5nLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFDQSxXQUFTLFVBQVUsQ0FBQyxNQUFNLEVBQUU7QUFDMUIsUUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7R0FDdEI7O0FBRUQsWUFBVSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsWUFBVztBQUN2RSxXQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDO0dBQ3pCLENBQUM7O21CQUVhLFVBQVUiLCJmaWxlIjoic2FmZS1zdHJpbmcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBCdWlsZCBvdXQgb3VyIGJhc2ljIFNhZmVTdHJpbmcgdHlwZVxuZnVuY3Rpb24gU2FmZVN0cmluZyhzdHJpbmcpIHtcbiAgdGhpcy5zdHJpbmcgPSBzdHJpbmc7XG59XG5cblNhZmVTdHJpbmcucHJvdG90eXBlLnRvU3RyaW5nID0gU2FmZVN0cmluZy5wcm90b3R5cGUudG9IVE1MID0gZnVuY3Rpb24oKSB7XG4gIHJldHVybiAnJyArIHRoaXMuc3RyaW5nO1xufTtcblxuZXhwb3J0IGRlZmF1bHQgU2FmZVN0cmluZztcbiJdfQ==
|
||||
Reference in New Issue
Block a user