new license file version [CI SKIP]

This commit is contained in:
2023-03-15 12:34:41 +00:00
parent 0a6d92a1f3
commit 61328d20ed
13115 changed files with 1892314 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
'use strict';
var IteratorComplete = require('./IteratorComplete');
var IteratorNext = require('./IteratorNext');
// https://262.ecma-international.org/6.0/#sec-iteratorstep
module.exports = function IteratorStep(iterator) {
var result = IteratorNext(iterator);
var done = IteratorComplete(result);
return done === true ? false : result;
};

View File

@@ -0,0 +1,66 @@
# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
> Detect whether a terminal supports color
## Install
```
$ npm install supports-color
```
## Usage
```js
const supportsColor = require('supports-color');
if (supportsColor.stdout) {
console.log('Terminal stdout supports color');
}
if (supportsColor.stdout.has256) {
console.log('Terminal stdout supports 256 colors');
}
if (supportsColor.stderr.has16m) {
console.log('Terminal stderr supports 16 million colors (truecolor)');
}
```
## API
Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.
The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:
- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
- `.level = 2` and `.has256 = true`: 256 color support
- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)
## Info
It obeys the `--color` and `--no-color` CLI flags.
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
## Related
- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
## License
MIT

View File

@@ -0,0 +1,18 @@
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
module.exports = stubFalse;

View File

@@ -0,0 +1,19 @@
import { SchedulerLike } from '../types';
import { isFunction } from './isFunction';
import { isScheduler } from './isScheduler';
function last<T>(arr: T[]): T | undefined {
return arr[arr.length - 1];
}
export function popResultSelector(args: any[]): ((...args: unknown[]) => unknown) | undefined {
return isFunction(last(args)) ? args.pop() : undefined;
}
export function popScheduler(args: any[]): SchedulerLike | undefined {
return isScheduler(last(args)) ? args.pop() : undefined;
}
export function popNumber(args: any[], defaultValue: number): number {
return typeof last(args) === 'number' ? args.pop()! : defaultValue;
}

View File

@@ -0,0 +1,718 @@
let parser = require('postcss-value-parser')
let Value = require('./value')
let insertAreas = require('./hacks/grid-utils').insertAreas
const OLD_LINEAR = /(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i
const OLD_RADIAL = /(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i
const IGNORE_NEXT = /(!\s*)?autoprefixer:\s*ignore\s+next/i
const GRID_REGEX = /(!\s*)?autoprefixer\s*grid:\s*(on|off|(no-)?autoplace)/i
const SIZES = [
'width',
'height',
'min-width',
'max-width',
'min-height',
'max-height',
'inline-size',
'min-inline-size',
'max-inline-size',
'block-size',
'min-block-size',
'max-block-size'
]
function hasGridTemplate(decl) {
return decl.parent.some(
i => i.prop === 'grid-template' || i.prop === 'grid-template-areas'
)
}
function hasRowsAndColumns(decl) {
let hasRows = decl.parent.some(i => i.prop === 'grid-template-rows')
let hasColumns = decl.parent.some(i => i.prop === 'grid-template-columns')
return hasRows && hasColumns
}
class Processor {
constructor(prefixes) {
this.prefixes = prefixes
}
/**
* Add necessary prefixes
*/
add(css, result) {
// At-rules
let resolution = this.prefixes.add['@resolution']
let keyframes = this.prefixes.add['@keyframes']
let viewport = this.prefixes.add['@viewport']
let supports = this.prefixes.add['@supports']
css.walkAtRules(rule => {
if (rule.name === 'keyframes') {
if (!this.disabled(rule, result)) {
return keyframes && keyframes.process(rule)
}
} else if (rule.name === 'viewport') {
if (!this.disabled(rule, result)) {
return viewport && viewport.process(rule)
}
} else if (rule.name === 'supports') {
if (
this.prefixes.options.supports !== false &&
!this.disabled(rule, result)
) {
return supports.process(rule)
}
} else if (rule.name === 'media' && rule.params.includes('-resolution')) {
if (!this.disabled(rule, result)) {
return resolution && resolution.process(rule)
}
}
return undefined
})
// Selectors
css.walkRules(rule => {
if (this.disabled(rule, result)) return undefined
return this.prefixes.add.selectors.map(selector => {
return selector.process(rule, result)
})
})
function insideGrid(decl) {
return decl.parent.nodes.some(node => {
if (node.type !== 'decl') return false
let displayGrid =
node.prop === 'display' && /(inline-)?grid/.test(node.value)
let gridTemplate = node.prop.startsWith('grid-template')
let gridGap = /^grid-([A-z]+-)?gap/.test(node.prop)
return displayGrid || gridTemplate || gridGap
})
}
function insideFlex(decl) {
return decl.parent.some(node => {
return node.prop === 'display' && /(inline-)?flex/.test(node.value)
})
}
let gridPrefixes =
this.gridStatus(css, result) &&
this.prefixes.add['grid-area'] &&
this.prefixes.add['grid-area'].prefixes
css.walkDecls(decl => {
if (this.disabledDecl(decl, result)) return undefined
let parent = decl.parent
let prop = decl.prop
let value = decl.value
if (prop === 'color-adjust') {
if (parent.every(i => i.prop !== 'print-color-adjust')) {
result.warn(
'Replace color-adjust to print-color-adjust. ' +
'The color-adjust shorthand is currently deprecated.',
{ node: decl }
)
}
} else if (prop === 'grid-row-span') {
result.warn(
'grid-row-span is not part of final Grid Layout. Use grid-row.',
{ node: decl }
)
return undefined
} else if (prop === 'grid-column-span') {
result.warn(
'grid-column-span is not part of final Grid Layout. Use grid-column.',
{ node: decl }
)
return undefined
} else if (prop === 'display' && value === 'box') {
result.warn(
'You should write display: flex by final spec ' +
'instead of display: box',
{ node: decl }
)
return undefined
} else if (prop === 'text-emphasis-position') {
if (value === 'under' || value === 'over') {
result.warn(
'You should use 2 values for text-emphasis-position ' +
'For example, `under left` instead of just `under`.',
{ node: decl }
)
}
} else if (
/^(align|justify|place)-(items|content)$/.test(prop) &&
insideFlex(decl)
) {
if (value === 'start' || value === 'end') {
result.warn(
`${value} value has mixed support, consider using ` +
`flex-${value} instead`,
{ node: decl }
)
}
} else if (prop === 'text-decoration-skip' && value === 'ink') {
result.warn(
'Replace text-decoration-skip: ink to ' +
'text-decoration-skip-ink: auto, because spec had been changed',
{ node: decl }
)
} else {
if (gridPrefixes && this.gridStatus(decl, result)) {
if (decl.value === 'subgrid') {
result.warn('IE does not support subgrid', { node: decl })
}
if (/^(align|justify|place)-items$/.test(prop) && insideGrid(decl)) {
let fixed = prop.replace('-items', '-self')
result.warn(
`IE does not support ${prop} on grid containers. ` +
`Try using ${fixed} on child elements instead: ` +
`${decl.parent.selector} > * { ${fixed}: ${decl.value} }`,
{ node: decl }
)
} else if (
/^(align|justify|place)-content$/.test(prop) &&
insideGrid(decl)
) {
result.warn(`IE does not support ${decl.prop} on grid containers`, {
node: decl
})
} else if (prop === 'display' && decl.value === 'contents') {
result.warn(
'Please do not use display: contents; ' +
'if you have grid setting enabled',
{ node: decl }
)
return undefined
} else if (decl.prop === 'grid-gap') {
let status = this.gridStatus(decl, result)
if (
status === 'autoplace' &&
!hasRowsAndColumns(decl) &&
!hasGridTemplate(decl)
) {
result.warn(
'grid-gap only works if grid-template(-areas) is being ' +
'used or both rows and columns have been declared ' +
'and cells have not been manually ' +
'placed inside the explicit grid',
{ node: decl }
)
} else if (
(status === true || status === 'no-autoplace') &&
!hasGridTemplate(decl)
) {
result.warn(
'grid-gap only works if grid-template(-areas) is being used',
{ node: decl }
)
}
} else if (prop === 'grid-auto-columns') {
result.warn('grid-auto-columns is not supported by IE', {
node: decl
})
return undefined
} else if (prop === 'grid-auto-rows') {
result.warn('grid-auto-rows is not supported by IE', { node: decl })
return undefined
} else if (prop === 'grid-auto-flow') {
let hasRows = parent.some(i => i.prop === 'grid-template-rows')
let hasCols = parent.some(i => i.prop === 'grid-template-columns')
if (hasGridTemplate(decl)) {
result.warn('grid-auto-flow is not supported by IE', {
node: decl
})
} else if (value.includes('dense')) {
result.warn('grid-auto-flow: dense is not supported by IE', {
node: decl
})
} else if (!hasRows && !hasCols) {
result.warn(
'grid-auto-flow works only if grid-template-rows and ' +
'grid-template-columns are present in the same rule',
{ node: decl }
)
}
return undefined
} else if (value.includes('auto-fit')) {
result.warn('auto-fit value is not supported by IE', {
node: decl,
word: 'auto-fit'
})
return undefined
} else if (value.includes('auto-fill')) {
result.warn('auto-fill value is not supported by IE', {
node: decl,
word: 'auto-fill'
})
return undefined
} else if (prop.startsWith('grid-template') && value.includes('[')) {
result.warn(
'Autoprefixer currently does not support line names. ' +
'Try using grid-template-areas instead.',
{ node: decl, word: '[' }
)
}
}
if (value.includes('radial-gradient')) {
if (OLD_RADIAL.test(decl.value)) {
result.warn(
'Gradient has outdated direction syntax. ' +
'New syntax is like `closest-side at 0 0` ' +
'instead of `0 0, closest-side`.',
{ node: decl }
)
} else {
let ast = parser(value)
for (let i of ast.nodes) {
if (i.type === 'function' && i.value === 'radial-gradient') {
for (let word of i.nodes) {
if (word.type === 'word') {
if (word.value === 'cover') {
result.warn(
'Gradient has outdated direction syntax. ' +
'Replace `cover` to `farthest-corner`.',
{ node: decl }
)
} else if (word.value === 'contain') {
result.warn(
'Gradient has outdated direction syntax. ' +
'Replace `contain` to `closest-side`.',
{ node: decl }
)
}
}
}
}
}
}
}
if (value.includes('linear-gradient')) {
if (OLD_LINEAR.test(value)) {
result.warn(
'Gradient has outdated direction syntax. ' +
'New syntax is like `to left` instead of `right`.',
{ node: decl }
)
}
}
}
if (SIZES.includes(decl.prop)) {
if (!decl.value.includes('-fill-available')) {
if (decl.value.includes('fill-available')) {
result.warn(
'Replace fill-available to stretch, ' +
'because spec had been changed',
{ node: decl }
)
} else if (decl.value.includes('fill')) {
let ast = parser(value)
if (ast.nodes.some(i => i.type === 'word' && i.value === 'fill')) {
result.warn(
'Replace fill to stretch, because spec had been changed',
{ node: decl }
)
}
}
}
}
let prefixer
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
// Transition
return this.prefixes.transition.add(decl, result)
} else if (decl.prop === 'align-self') {
// align-self flexbox or grid
let display = this.displayType(decl)
if (display !== 'grid' && this.prefixes.options.flexbox !== false) {
prefixer = this.prefixes.add['align-self']
if (prefixer && prefixer.prefixes) {
prefixer.process(decl)
}
}
if (this.gridStatus(decl, result) !== false) {
prefixer = this.prefixes.add['grid-row-align']
if (prefixer && prefixer.prefixes) {
return prefixer.process(decl, result)
}
}
} else if (decl.prop === 'justify-self') {
// justify-self flexbox or grid
if (this.gridStatus(decl, result) !== false) {
prefixer = this.prefixes.add['grid-column-align']
if (prefixer && prefixer.prefixes) {
return prefixer.process(decl, result)
}
}
} else if (decl.prop === 'place-self') {
prefixer = this.prefixes.add['place-self']
if (
prefixer &&
prefixer.prefixes &&
this.gridStatus(decl, result) !== false
) {
return prefixer.process(decl, result)
}
} else {
// Properties
prefixer = this.prefixes.add[decl.prop]
if (prefixer && prefixer.prefixes) {
return prefixer.process(decl, result)
}
}
return undefined
})
// Insert grid-area prefixes. We need to be able to store the different
// rules as a data and hack API is not enough for this
if (this.gridStatus(css, result)) {
insertAreas(css, this.disabled)
}
// Values
return css.walkDecls(decl => {
if (this.disabledValue(decl, result)) return
let unprefixed = this.prefixes.unprefixed(decl.prop)
let list = this.prefixes.values('add', unprefixed)
if (Array.isArray(list)) {
for (let value of list) {
if (value.process) value.process(decl, result)
}
}
Value.save(this.prefixes, decl)
})
}
/**
* Remove unnecessary pefixes
*/
remove(css, result) {
// At-rules
let resolution = this.prefixes.remove['@resolution']
css.walkAtRules((rule, i) => {
if (this.prefixes.remove[`@${rule.name}`]) {
if (!this.disabled(rule, result)) {
rule.parent.removeChild(i)
}
} else if (
rule.name === 'media' &&
rule.params.includes('-resolution') &&
resolution
) {
resolution.clean(rule)
}
})
// Selectors
for (let checker of this.prefixes.remove.selectors) {
css.walkRules((rule, i) => {
if (checker.check(rule)) {
if (!this.disabled(rule, result)) {
rule.parent.removeChild(i)
}
}
})
}
return css.walkDecls((decl, i) => {
if (this.disabled(decl, result)) return
let rule = decl.parent
let unprefixed = this.prefixes.unprefixed(decl.prop)
// Transition
if (decl.prop === 'transition' || decl.prop === 'transition-property') {
this.prefixes.transition.remove(decl)
}
// Properties
if (
this.prefixes.remove[decl.prop] &&
this.prefixes.remove[decl.prop].remove
) {
let notHack = this.prefixes.group(decl).down(other => {
return this.prefixes.normalize(other.prop) === unprefixed
})
if (unprefixed === 'flex-flow') {
notHack = true
}
if (decl.prop === '-webkit-box-orient') {
let hacks = { 'flex-direction': true, 'flex-flow': true }
if (!decl.parent.some(j => hacks[j.prop])) return
}
if (notHack && !this.withHackValue(decl)) {
if (decl.raw('before').includes('\n')) {
this.reduceSpaces(decl)
}
rule.removeChild(i)
return
}
}
// Values
for (let checker of this.prefixes.values('remove', unprefixed)) {
if (!checker.check) continue
if (!checker.check(decl.value)) continue
unprefixed = checker.unprefixed
let notHack = this.prefixes.group(decl).down(other => {
return other.value.includes(unprefixed)
})
if (notHack) {
rule.removeChild(i)
return
}
}
})
}
/**
* Some rare old values, which is not in standard
*/
withHackValue(decl) {
return decl.prop === '-webkit-background-clip' && decl.value === 'text'
}
/**
* Check for grid/flexbox options.
*/
disabledValue(node, result) {
if (this.gridStatus(node, result) === false && node.type === 'decl') {
if (node.prop === 'display' && node.value.includes('grid')) {
return true
}
}
if (this.prefixes.options.flexbox === false && node.type === 'decl') {
if (node.prop === 'display' && node.value.includes('flex')) {
return true
}
}
if (node.type === 'decl' && node.prop === 'content') {
return true
}
return this.disabled(node, result)
}
/**
* Check for grid/flexbox options.
*/
disabledDecl(node, result) {
if (this.gridStatus(node, result) === false && node.type === 'decl') {
if (node.prop.includes('grid') || node.prop === 'justify-items') {
return true
}
}
if (this.prefixes.options.flexbox === false && node.type === 'decl') {
let other = ['order', 'justify-content', 'align-items', 'align-content']
if (node.prop.includes('flex') || other.includes(node.prop)) {
return true
}
}
return this.disabled(node, result)
}
/**
* Check for control comment and global options
*/
disabled(node, result) {
if (!node) return false
if (node._autoprefixerDisabled !== undefined) {
return node._autoprefixerDisabled
}
if (node.parent) {
let p = node.prev()
if (p && p.type === 'comment' && IGNORE_NEXT.test(p.text)) {
node._autoprefixerDisabled = true
node._autoprefixerSelfDisabled = true
return true
}
}
let value = null
if (node.nodes) {
let status
node.each(i => {
if (i.type !== 'comment') return
if (/(!\s*)?autoprefixer:\s*(off|on)/i.test(i.text)) {
if (typeof status !== 'undefined') {
result.warn(
'Second Autoprefixer control comment ' +
'was ignored. Autoprefixer applies control ' +
'comment to whole block, not to next rules.',
{ node: i }
)
} else {
status = /on/i.test(i.text)
}
}
})
if (status !== undefined) {
value = !status
}
}
if (!node.nodes || value === null) {
if (node.parent) {
let isParentDisabled = this.disabled(node.parent, result)
if (node.parent._autoprefixerSelfDisabled === true) {
value = false
} else {
value = isParentDisabled
}
} else {
value = false
}
}
node._autoprefixerDisabled = value
return value
}
/**
* Normalize spaces in cascade declaration group
*/
reduceSpaces(decl) {
let stop = false
this.prefixes.group(decl).up(() => {
stop = true
return true
})
if (stop) {
return
}
let parts = decl.raw('before').split('\n')
let prevMin = parts[parts.length - 1].length
let diff = false
this.prefixes.group(decl).down(other => {
parts = other.raw('before').split('\n')
let last = parts.length - 1
if (parts[last].length > prevMin) {
if (diff === false) {
diff = parts[last].length - prevMin
}
parts[last] = parts[last].slice(0, -diff)
other.raws.before = parts.join('\n')
}
})
}
/**
* Is it flebox or grid rule
*/
displayType(decl) {
for (let i of decl.parent.nodes) {
if (i.prop !== 'display') {
continue
}
if (i.value.includes('flex')) {
return 'flex'
}
if (i.value.includes('grid')) {
return 'grid'
}
}
return false
}
/**
* Set grid option via control comment
*/
gridStatus(node, result) {
if (!node) return false
if (node._autoprefixerGridStatus !== undefined) {
return node._autoprefixerGridStatus
}
let value = null
if (node.nodes) {
let status
node.each(i => {
if (i.type !== 'comment') return
if (GRID_REGEX.test(i.text)) {
let hasAutoplace = /:\s*autoplace/i.test(i.text)
let noAutoplace = /no-autoplace/i.test(i.text)
if (typeof status !== 'undefined') {
result.warn(
'Second Autoprefixer grid control comment was ' +
'ignored. Autoprefixer applies control comments to the whole ' +
'block, not to the next rules.',
{ node: i }
)
} else if (hasAutoplace) {
status = 'autoplace'
} else if (noAutoplace) {
status = true
} else {
status = /on/i.test(i.text)
}
}
})
if (status !== undefined) {
value = status
}
}
if (node.type === 'atrule' && node.name === 'supports') {
let params = node.params
if (params.includes('grid') && params.includes('auto')) {
value = false
}
}
if (!node.nodes || value === null) {
if (node.parent) {
let isParentGrid = this.gridStatus(node.parent, result)
if (node.parent._autoprefixerSelfDisabled === true) {
value = false
} else {
value = isParentGrid
}
} else if (typeof this.prefixes.options.grid !== 'undefined') {
value = this.prefixes.options.grid
} else if (typeof process.env.AUTOPREFIXER_GRID !== 'undefined') {
if (process.env.AUTOPREFIXER_GRID === 'autoplace') {
value = 'autoplace'
} else {
value = true
}
} else {
value = false
}
}
node._autoprefixerGridStatus = value
return value
}
}
module.exports = Processor

View File

@@ -0,0 +1 @@
{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,CAAC,UAAI,CAAM,IAAwB,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,EAA5D,CAA4D,CAAC,CAAC"}

View File

@@ -0,0 +1,4 @@
export type UserGroupNotFoundError = {
name: string;
message: string;
};

View File

@@ -0,0 +1,26 @@
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeJoin = arrayProto.join;
/**
* Converts all elements in `array` into a string separated by `separator`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to convert.
* @param {string} [separator=','] The element separator.
* @returns {string} Returns the joined string.
* @example
*
* _.join(['a', 'b', 'c'], '~');
* // => 'a~b~c'
*/
function join(array, separator) {
return array == null ? '' : nativeJoin.call(array, separator);
}
module.exports = join;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('trim', require('../trim'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,5 @@
export * from "./FormDataEncoder.js";
export * from "./FileLike.js";
export * from "./FormDataLike.js";
export * from "./util/isFile.js";
export * from "./util/isFormData.js";

View File

@@ -0,0 +1,143 @@
/* eslint max-lines: "off" */
"use strict";
var reAnsi = require("./regex-ansi")
, stringifiable = require("es5-ext/object/validate-stringifiable-value")
, length = require("./get-stripped-length")
, sgr = require("./lib/sgr")
, max = Math.max;
var Token = function (token) { this.token = token; };
var tokenize = function (str) {
var match = reAnsi().exec(str);
if (!match) {
return [str];
}
var index = match.index, head, prehead, tail;
if (index === 0) {
head = match[0];
tail = str.slice(head.length);
return [new Token(head)].concat(tokenize(tail));
}
prehead = str.slice(0, index);
head = match[0];
tail = str.slice(index + head.length);
return [prehead, new Token(head)].concat(tokenize(tail));
};
var isChunkInSlice = function (chunk, index, begin, end) {
var endIndex = chunk.length + index;
if (begin > endIndex) return false;
if (end < index) return false;
return true;
};
// eslint-disable-next-line max-lines-per-function
var sliceSeq = function (seq, begin, end) {
var sliced = seq.reduce(
function (state, chunk) {
var index = state.index;
if (chunk instanceof Token) {
var code = sgr.extractCode(chunk.token);
if (index <= begin) {
if (code in sgr.openers) {
sgr.openStyle(state.preOpeners, code);
}
if (code in sgr.closers) {
sgr.closeStyle(state.preOpeners, code);
}
} else if (index < end) {
if (code in sgr.openers) {
sgr.openStyle(state.inOpeners, code);
state.seq.push(chunk);
} else if (code in sgr.closers) {
state.inClosers.push(code);
state.seq.push(chunk);
}
}
} else {
var nextChunk = "";
if (isChunkInSlice(chunk, index, begin, end)) {
var relBegin = Math.max(begin - index, 0)
, relEnd = Math.min(end - index, chunk.length);
nextChunk = chunk.slice(relBegin, relEnd);
}
state.seq.push(nextChunk);
state.index = index + chunk.length;
}
return state;
},
{
index: 0,
seq: [],
// preOpeners -> [ mod ]
// preOpeners must be prepended to the slice if they wasn't closed til the end of it
// preOpeners must be closed if they wasn't closed til the end of the slice
preOpeners: [],
// inOpeners -> [ mod ]
// inOpeners already in the slice and must not be prepended to the slice
// inOpeners must be closed if they wasn't closed til the end of the slice
inOpeners: [], // opener CSI inside slice
// inClosers -> [ code ]
// closer CSIs for determining which pre/in-Openers must be closed
inClosers: []
}
);
sliced.seq = [].concat(
sgr.prepend(sliced.preOpeners), sliced.seq,
sgr.complete([].concat(sliced.preOpeners, sliced.inOpeners), sliced.inClosers)
);
return sliced.seq;
};
module.exports = function (str /*, begin, end*/) {
var seq, begin = Number(arguments[1]), end = Number(arguments[2]), len;
str = stringifiable(str);
len = length(str);
if (isNaN(begin)) {
begin = 0;
}
if (isNaN(end)) {
end = len;
}
if (begin < 0) {
begin = max(len + begin, 0);
}
if (end < 0) {
end = max(len + end, 0);
}
seq = tokenize(str);
seq = sliceSeq(seq, begin, end);
return seq
.map(function (chunk) {
if (chunk instanceof Token) {
return chunk.token;
}
return chunk;
})
.join("");
};

View File

@@ -0,0 +1,37 @@
import { operate } from '../util/lift';
import { innerFrom } from '../observable/innerFrom';
import { createOperatorSubscriber } from './OperatorSubscriber';
export function audit(durationSelector) {
return operate(function (source, subscriber) {
var hasValue = false;
var lastValue = null;
var durationSubscriber = null;
var isComplete = false;
var endDuration = function () {
durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();
durationSubscriber = null;
if (hasValue) {
hasValue = false;
var value = lastValue;
lastValue = null;
subscriber.next(value);
}
isComplete && subscriber.complete();
};
var cleanupDuration = function () {
durationSubscriber = null;
isComplete && subscriber.complete();
};
source.subscribe(createOperatorSubscriber(subscriber, function (value) {
hasValue = true;
lastValue = value;
if (!durationSubscriber) {
innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));
}
}, function () {
isComplete = true;
(!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();
}));
});
}
//# sourceMappingURL=audit.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwDhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;AAC1H,CAAC"}

View File

@@ -0,0 +1,40 @@
{
"author": "Troy Goode <troygoode@gmail.com> (http://github.com/troygoode/)",
"name": "require-directory",
"version": "2.1.1",
"description": "Recursively iterates over specified directory, require()'ing each file, and returning a nested hash structure containing those modules.",
"keywords": [
"require",
"directory",
"library",
"recursive"
],
"homepage": "https://github.com/troygoode/node-require-directory/",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/troygoode/node-require-directory.git"
},
"contributors": [
{
"name": "Troy Goode",
"email": "troygoode@gmail.com",
"web": "http://github.com/troygoode/"
}
],
"license": "MIT",
"bugs": {
"url": "http://github.com/troygoode/node-require-directory/issues/"
},
"engines": {
"node": ">=0.10.0"
},
"devDependencies": {
"jshint": "^2.6.0",
"mocha": "^2.1.0"
},
"scripts": {
"test": "mocha",
"lint": "jshint index.js test/test.js"
}
}

View File

@@ -0,0 +1,15 @@
# 2.0.0
- Now takes into account result of calling `valueOf` functions when they exist
# 1.0.2 Quick Sort
- Sorts object keys so that property order doesn't affect outcome
# 1.0.1 Perfect Circle
- Guard against circular references
# 1.0.0 IPO
- Initial Public Release

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operators/index.ts"],"names":[],"mappings":";;;;;AACA,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,2EAA0E;AAAjE,oHAAA,gBAAgB,OAAA;AACzB,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,6EAA4E;AAAnE,sHAAA,iBAAiB,OAAA;AAC1B,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,yDAAuE;AAA9D,kGAAA,OAAO,OAAA;AAChB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,mFAAkF;AAAzE,4HAAA,oBAAoB,OAAA;AAC7B,yFAAwF;AAA/E,kIAAA,uBAAuB,OAAA;AAChC,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,yDAAwG;AAA/F,kGAAA,OAAO,OAAA;AAChB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qFAAgF;AAAvE,0HAAA,iBAAiB,OAAA;AAC1B,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,qDAAoD;AAA3C,8FAAA,KAAK,OAAA;AACd,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,yEAAwE;AAA/D,kHAAA,eAAe,OAAA;AACxB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,uDAAoE;AAA3D,gGAAA,MAAM,OAAA;AACf,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,qDAAiE;AAAxD,8FAAA,KAAK,OAAA;AACd,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,qEAAoE;AAA3D,8GAAA,aAAa,OAAA;AACtB,qDAAiE;AAAxD,8FAAA,KAAK,OAAA;AACd,iEAAmF;AAA1E,0GAAA,WAAW,OAAA;AACpB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mDAAkD;AAAzC,4FAAA,IAAI,OAAA;AACb,2DAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,2DAA0E;AAAjE,oGAAA,QAAQ,OAAA;AACjB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,yDAAoF;AAA3E,kGAAA,OAAO,OAAA;AAChB,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,sGAAA,SAAS,OAAA;AAClB,yDAAwD;AAA/C,kGAAA,OAAO,OAAA;AAChB,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,iEAAgE;AAAvD,0GAAA,WAAW,OAAA;AACpB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,mEAAkE;AAAzD,4GAAA,YAAY,OAAA;AACrB,+DAA8D;AAArD,wGAAA,UAAU,OAAA;AACnB,uEAAsE;AAA7D,gHAAA,cAAc,OAAA;AACvB,iDAAgD;AAAvC,0FAAA,GAAG,OAAA;AACZ,uDAAsD;AAA7C,gGAAA,MAAM,OAAA;AACf,yDAAwD;AAA/C,kGAAA,OAAO,OAAA"}

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2016 Jimmy Karl Roland Wärting
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.

View File

@@ -0,0 +1,13 @@
/* eslint-disable no-console */
'use strict'
let printed = {}
module.exports = function warnOnce(message) {
if (printed[message]) return
printed[message] = true
if (typeof console !== 'undefined' && console.warn) {
console.warn(message)
}
}

View File

@@ -0,0 +1,341 @@
var fs = require('fs');
var path = require('path');
var applySourceMaps = require('./apply-source-maps');
var extractImportUrlAndMedia = require('./extract-import-url-and-media');
var isAllowedResource = require('./is-allowed-resource');
var loadOriginalSources = require('./load-original-sources');
var normalizePath = require('./normalize-path');
var rebase = require('./rebase');
var rebaseLocalMap = require('./rebase-local-map');
var rebaseRemoteMap = require('./rebase-remote-map');
var restoreImport = require('./restore-import');
var tokenize = require('../tokenizer/tokenize');
var Token = require('../tokenizer/token');
var Marker = require('../tokenizer/marker');
var hasProtocol = require('../utils/has-protocol');
var isImport = require('../utils/is-import');
var isRemoteResource = require('../utils/is-remote-resource');
var UNKNOWN_URI = 'uri:unknown';
function readSources(input, context, callback) {
return doReadSources(input, context, function (tokens) {
return applySourceMaps(tokens, context, function () {
return loadOriginalSources(context, function () { return callback(tokens); });
});
});
}
function doReadSources(input, context, callback) {
if (typeof input == 'string') {
return fromString(input, context, callback);
} else if (Buffer.isBuffer(input)) {
return fromString(input.toString(), context, callback);
} else if (Array.isArray(input)) {
return fromArray(input, context, callback);
} else if (typeof input == 'object') {
return fromHash(input, context, callback);
}
}
function fromString(input, context, callback) {
context.source = undefined;
context.sourcesContent[undefined] = input;
context.stats.originalSize += input.length;
return fromStyles(input, context, { inline: context.options.inline }, callback);
}
function fromArray(input, context, callback) {
var inputAsImports = input.reduce(function (accumulator, uriOrHash) {
if (typeof uriOrHash === 'string') {
return addStringSource(uriOrHash, accumulator);
} else {
return addHashSource(uriOrHash, context, accumulator);
}
}, []);
return fromStyles(inputAsImports.join(''), context, { inline: ['all'] }, callback);
}
function fromHash(input, context, callback) {
var inputAsImports = addHashSource(input, context, []);
return fromStyles(inputAsImports.join(''), context, { inline: ['all'] }, callback);
}
function addStringSource(input, imports) {
imports.push(restoreAsImport(normalizeUri(input)));
return imports;
}
function addHashSource(input, context, imports) {
var uri;
var normalizedUri;
var source;
for (uri in input) {
source = input[uri];
normalizedUri = normalizeUri(uri);
imports.push(restoreAsImport(normalizedUri));
context.sourcesContent[normalizedUri] = source.styles;
if (source.sourceMap) {
trackSourceMap(source.sourceMap, normalizedUri, context);
}
}
return imports;
}
function normalizeUri(uri) {
var currentPath = path.resolve('');
var absoluteUri;
var relativeToCurrentPath;
var normalizedUri;
if (isRemoteResource(uri)) {
return uri;
}
absoluteUri = path.isAbsolute(uri) ?
uri :
path.resolve(uri);
relativeToCurrentPath = path.relative(currentPath, absoluteUri);
normalizedUri = normalizePath(relativeToCurrentPath);
return normalizedUri;
}
function trackSourceMap(sourceMap, uri, context) {
var parsedMap = typeof sourceMap == 'string' ?
JSON.parse(sourceMap) :
sourceMap;
var rebasedMap = isRemoteResource(uri) ?
rebaseRemoteMap(parsedMap, uri) :
rebaseLocalMap(parsedMap, uri || UNKNOWN_URI, context.options.rebaseTo);
context.inputSourceMapTracker.track(uri, rebasedMap);
}
function restoreAsImport(uri) {
return restoreImport('url(' + uri + ')', '') + Marker.SEMICOLON;
}
function fromStyles(styles, context, parentInlinerContext, callback) {
var tokens;
var rebaseConfig = {};
if (!context.source) {
rebaseConfig.fromBase = path.resolve('');
rebaseConfig.toBase = context.options.rebaseTo;
} else if (isRemoteResource(context.source)) {
rebaseConfig.fromBase = context.source;
rebaseConfig.toBase = context.source;
} else if (path.isAbsolute(context.source)) {
rebaseConfig.fromBase = path.dirname(context.source);
rebaseConfig.toBase = context.options.rebaseTo;
} else {
rebaseConfig.fromBase = path.dirname(path.resolve(context.source));
rebaseConfig.toBase = context.options.rebaseTo;
}
tokens = tokenize(styles, context);
tokens = rebase(tokens, context.options.rebase, context.validator, rebaseConfig);
return allowsAnyImports(parentInlinerContext.inline) ?
inline(tokens, context, parentInlinerContext, callback) :
callback(tokens);
}
function allowsAnyImports(inline) {
return !(inline.length == 1 && inline[0] == 'none');
}
function inline(tokens, externalContext, parentInlinerContext, callback) {
var inlinerContext = {
afterContent: false,
callback: callback,
errors: externalContext.errors,
externalContext: externalContext,
fetch: externalContext.options.fetch,
inlinedStylesheets: parentInlinerContext.inlinedStylesheets || externalContext.inlinedStylesheets,
inline: parentInlinerContext.inline,
inlineRequest: externalContext.options.inlineRequest,
inlineTimeout: externalContext.options.inlineTimeout,
isRemote: parentInlinerContext.isRemote || false,
localOnly: externalContext.localOnly,
outputTokens: [],
rebaseTo: externalContext.options.rebaseTo,
sourceTokens: tokens,
warnings: externalContext.warnings
};
return doInlineImports(inlinerContext);
}
function doInlineImports(inlinerContext) {
var token;
var i, l;
for (i = 0, l = inlinerContext.sourceTokens.length; i < l; i++) {
token = inlinerContext.sourceTokens[i];
if (token[0] == Token.AT_RULE && isImport(token[1])) {
inlinerContext.sourceTokens.splice(0, i);
return inlineStylesheet(token, inlinerContext);
} else if (token[0] == Token.AT_RULE || token[0] == Token.COMMENT) {
inlinerContext.outputTokens.push(token);
} else {
inlinerContext.outputTokens.push(token);
inlinerContext.afterContent = true;
}
}
inlinerContext.sourceTokens = [];
return inlinerContext.callback(inlinerContext.outputTokens);
}
function inlineStylesheet(token, inlinerContext) {
var uriAndMediaQuery = extractImportUrlAndMedia(token[1]);
var uri = uriAndMediaQuery[0];
var mediaQuery = uriAndMediaQuery[1];
var metadata = token[2];
return isRemoteResource(uri) ?
inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) :
inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext);
}
function inlineRemoteStylesheet(uri, mediaQuery, metadata, inlinerContext) {
var isAllowed = isAllowedResource(uri, true, inlinerContext.inline);
var originalUri = uri;
var isLoaded = uri in inlinerContext.externalContext.sourcesContent;
var isRuntimeResource = !hasProtocol(uri);
if (inlinerContext.inlinedStylesheets.indexOf(uri) > -1) {
inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as it has already been imported.');
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
} else if (inlinerContext.localOnly && inlinerContext.afterContent) {
inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as no callback given and after other content.');
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
} else if (isRuntimeResource) {
inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as no protocol given.');
inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
} else if (inlinerContext.localOnly && !isLoaded) {
inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as no callback given.');
inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
} else if (!isAllowed && inlinerContext.afterContent) {
inlinerContext.warnings.push('Ignoring remote @import of "' + uri + '" as resource is not allowed and after other content.');
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
} else if (!isAllowed) {
inlinerContext.warnings.push('Skipping remote @import of "' + uri + '" as resource is not allowed.');
inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
}
inlinerContext.inlinedStylesheets.push(uri);
function whenLoaded(error, importedStyles) {
if (error) {
inlinerContext.errors.push('Broken @import declaration of "' + uri + '" - ' + error);
return process.nextTick(function () {
inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
doInlineImports(inlinerContext);
});
}
inlinerContext.inline = inlinerContext.externalContext.options.inline;
inlinerContext.isRemote = true;
inlinerContext.externalContext.source = originalUri;
inlinerContext.externalContext.sourcesContent[uri] = importedStyles;
inlinerContext.externalContext.stats.originalSize += importedStyles.length;
return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function (importedTokens) {
importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);
inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
});
}
return isLoaded ?
whenLoaded(null, inlinerContext.externalContext.sourcesContent[uri]) :
inlinerContext.fetch(uri, inlinerContext.inlineRequest, inlinerContext.inlineTimeout, whenLoaded);
}
function inlineLocalStylesheet(uri, mediaQuery, metadata, inlinerContext) {
var currentPath = path.resolve('');
var absoluteUri = path.isAbsolute(uri) ?
path.resolve(currentPath, uri[0] == '/' ? uri.substring(1) : uri) :
path.resolve(inlinerContext.rebaseTo, uri);
var relativeToCurrentPath = path.relative(currentPath, absoluteUri);
var importedStyles;
var isAllowed = isAllowedResource(uri, false, inlinerContext.inline);
var normalizedPath = normalizePath(relativeToCurrentPath);
var isLoaded = normalizedPath in inlinerContext.externalContext.sourcesContent;
if (inlinerContext.inlinedStylesheets.indexOf(absoluteUri) > -1) {
inlinerContext.warnings.push('Ignoring local @import of "' + uri + '" as it has already been imported.');
} else if (!isLoaded && (!fs.existsSync(absoluteUri) || !fs.statSync(absoluteUri).isFile())) {
inlinerContext.errors.push('Ignoring local @import of "' + uri + '" as resource is missing.');
} else if (!isAllowed && inlinerContext.afterContent) {
inlinerContext.warnings.push('Ignoring local @import of "' + uri + '" as resource is not allowed and after other content.');
} else if (inlinerContext.afterContent) {
inlinerContext.warnings.push('Ignoring local @import of "' + uri + '" as after other content.');
} else if (!isAllowed) {
inlinerContext.warnings.push('Skipping local @import of "' + uri + '" as resource is not allowed.');
inlinerContext.outputTokens = inlinerContext.outputTokens.concat(inlinerContext.sourceTokens.slice(0, 1));
} else {
importedStyles = isLoaded ?
inlinerContext.externalContext.sourcesContent[normalizedPath] :
fs.readFileSync(absoluteUri, 'utf-8');
inlinerContext.inlinedStylesheets.push(absoluteUri);
inlinerContext.inline = inlinerContext.externalContext.options.inline;
inlinerContext.externalContext.source = normalizedPath;
inlinerContext.externalContext.sourcesContent[normalizedPath] = importedStyles;
inlinerContext.externalContext.stats.originalSize += importedStyles.length;
return fromStyles(importedStyles, inlinerContext.externalContext, inlinerContext, function (importedTokens) {
importedTokens = wrapInMedia(importedTokens, mediaQuery, metadata);
inlinerContext.outputTokens = inlinerContext.outputTokens.concat(importedTokens);
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
});
}
inlinerContext.sourceTokens = inlinerContext.sourceTokens.slice(1);
return doInlineImports(inlinerContext);
}
function wrapInMedia(tokens, mediaQuery, metadata) {
if (mediaQuery) {
return [[Token.NESTED_BLOCK, [[Token.NESTED_BLOCK_SCOPE, '@media ' + mediaQuery, metadata]], tokens]];
} else {
return tokens;
}
}
module.exports = readSources;

View File

@@ -0,0 +1,58 @@
import type { SvelteComponent } from "svelte";
export interface SelectProps {
container?: HTMLElement;
input?: HTMLInputElement;
Item?: any;
Selection?: any;
MultiSelection?: any;
isMulti?: boolean;
isDisabled?: boolean;
isCreatable?: boolean;
isFocused?: boolean;
selectedValue?: any;
filterText?: string;
placeholder?: string;
items?: any[];
itemFilter?: (label: string, filterText: string, option: any) => boolean;
groupBy?: (item: any) => any;
groupFilter?: (groups: any) => any;
isGroupHeaderSelectable?: boolean;
getGroupHeaderLabel?: (option: any) => string;
getOptionLabel?: (option: any, filterText: string) => string;
optionIdentifier?: string;
loadOptions?: (filterText: string) => Promise<any[]>;
hasError?: boolean;
containerStyles?: string;
getSelectionLabel?: (option: any) => string;
createGroupHeaderItem?: (groupValue: any) => any;
createItem?: (filterText: string) => any;
isSearchable?: boolean;
inputStyles?: string;
isClearable?: boolean;
isWaiting?: boolean;
listPlacement?: "auto" | "top" | "bottom";
listOpen?: boolean;
list?: any;
isVirtualList?: boolean;
loadOptionsInterval?: number;
noOptionsMessage?: string;
hideEmptyState?: boolean;
filteredItems?: any[];
inputAttributes?: object;
listAutoWidth?: boolean;
itemHeight?: number;
Icon?: any;
iconProps?: object;
showChevron?: boolean;
showIndicator?: boolean;
containerClasses?: string;
indicatorSvg?: string;
handleClear?: () => void;
}
declare class Select extends SvelteComponent {
$$prop_def: SelectProps;
}
export default Select;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('multiply', require('../multiply'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00606,"53":0,"54":0,"55":0.00303,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0.00303,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0.00303,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.00303,"99":0,"100":0,"101":0,"102":0.02729,"103":0,"104":0,"105":0,"106":0.00606,"107":0,"108":0.01213,"109":0.22134,"110":0.16676,"111":0.00303,"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.11522,"41":0,"42":0,"43":0.01516,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0.01516,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0.00606,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0.00303,"66":0,"67":0,"68":0,"69":0,"70":0.01819,"71":0,"72":0,"73":0,"74":0.0091,"75":0.0091,"76":0,"77":0.01213,"78":0,"79":0.00303,"80":0,"81":0.08186,"83":0.0091,"84":0.00303,"85":0,"86":0.00606,"87":0.00303,"88":0,"89":0,"90":0.00606,"91":0.01213,"92":0.00303,"93":0,"94":0.00303,"95":0.01213,"96":0.00606,"97":0.00606,"98":0.00606,"99":0.00303,"100":0.00303,"101":0.03638,"102":0.0091,"103":0.01213,"104":0.00606,"105":0.0091,"106":0.03032,"107":0.02426,"108":0.0849,"109":2.26794,"110":1.13397,"111":0,"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.02426,"27":0,"28":0.00303,"29":0,"30":0,"31":0.00303,"32":0.03335,"33":0,"34":0,"35":0.04851,"36":0,"37":0,"38":0.00303,"39":0,"40":0.00303,"41":0,"42":0,"43":0,"44":0,"45":0.00303,"46":0.02122,"47":0.00606,"48":0,"49":0,"50":0.00303,"51":0.00303,"52":0,"53":0,"54":0.00303,"55":0,"56":0.03335,"57":0.00303,"58":0.0091,"60":0.02729,"62":0.0091,"63":0.09702,"64":0.15463,"65":0.01213,"66":0.03638,"67":0.16676,"68":0.00606,"69":0,"70":0.00303,"71":0,"72":0,"73":0.00303,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00303,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0.00606,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.00303,"94":0.07883,"95":0.16373,"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.01213},B:{"12":0.00606,"13":0.00303,"14":0.00606,"15":0,"16":0.01213,"17":0.00606,"18":0.01516,"79":0,"80":0,"81":0,"83":0,"84":0.00303,"85":0,"86":0,"87":0,"88":0,"89":0.00606,"90":0,"91":0,"92":0.01213,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.00303,"99":0.00303,"100":0.00303,"101":0,"102":0.00606,"103":0.00303,"104":0.00606,"105":0.01213,"106":0.00303,"107":0.03032,"108":0.03942,"109":0.65491,"110":0.58214},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.00606,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00303,"14.1":0.00303,"15.1":0.00303,"15.2-15.3":0,"15.4":0,"15.5":0.00303,"15.6":0.01213,"16.0":0,"16.1":0.00303,"16.2":0.00606,"16.3":0.02426,"16.4":0},G:{"8":0,"3.2":0.00358,"4.0-4.1":0,"4.2-4.3":0.00179,"5.0-5.1":0.00107,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.03933,"10.0-10.2":0,"10.3":0.00894,"11.0-11.2":0.00179,"11.3-11.4":0.00107,"12.0-12.1":0.00429,"12.2-12.5":0.30038,"13.0-13.1":0.02217,"13.2":0,"13.3":0.0025,"13.4-13.7":0.11014,"14.0-14.4":0.12587,"14.5-14.8":0.09941,"15.0-15.1":0.15698,"15.2-15.3":0.05936,"15.4":0.08618,"15.5":0.12837,"15.6":0.16699,"16.0":0.23708,"16.1":0.85321,"16.2":0.44413,"16.3":0.25711,"16.4":0},P:{"4":0.31706,"20":0.29661,"5.0-5.4":0,"6.2-6.4":0.03068,"7.2-7.4":1.20689,"8.2":0,"9.2":0.0716,"10.1":0,"11.1-11.2":0.0716,"12.0":0,"13.0":0.0716,"14.0":0.14319,"15.0":0.05114,"16.0":0.30684,"17.0":0.20456,"18.0":0.12273,"19.0":0.60345},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00261,"4.4":0,"4.4.3-4.4.4":0.06952},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.01213,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0.18814,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":1.0661},H:{"0":6.0757},L:{"0":75.52104},R:{_:"0"},M:{"0":0.06968},Q:{"13.1":0}};

View File

@@ -0,0 +1,148 @@
{
"name": "cosmiconfig",
"version": "8.1.0",
"description": "Find and load configuration from a package.json property, rc file, or CommonJS module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"clean": "del-cli --dot=true \"./dist/**/*\"",
"build": "npm run clean && npm run build:compile && npm run build:types",
"build:compile": "cross-env NODE_ENV=production babel src -d dist --verbose --extensions .js,.ts --ignore \"**/**/*.test.js\",\"**/**/*.test.ts\" --source-maps",
"build:types": "cross-env NODE_ENV=production tsc --project tsconfig.types.json",
"dev": "npm run clean && npm run build:compile -- --watch",
"lint": "eslint --ext .js,.ts . && npm run lint:md",
"lint:fix": "eslint --ext .js,.ts . --fix",
"lint:md": "remark-preset-davidtheclark",
"format": "prettier \"**/*.{js,ts,json,yml,yaml}\" --write",
"format:md": "remark-preset-davidtheclark --format",
"format:check": "prettier \"**/*.{js,ts,json,yml,yaml}\" --check",
"typescript": "tsc",
"test": "jest --coverage",
"test:watch": "jest --watch",
"check:all": "npm run test && npm run typescript && npm run lint && npm run format:check",
"prepublishOnly": "npm run check:all && npm run build"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm run typescript && npm run test",
"pre-push": "npm run check:all"
}
},
"lint-staged": {
"*.{js,ts}": [
"eslint --fix",
"prettier --write"
],
"*.{json,yml,yaml}": [
"prettier --write"
],
"*.md": [
"remark-preset-davidtheclark",
"remark-preset-davidtheclark --format"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/cosmiconfig/cosmiconfig.git"
},
"keywords": [
"load",
"configuration",
"config"
],
"author": "Daniel Fischer <daniel@d-fischer.dev>",
"contributors": [
"David Clark <david.dave.clark@gmail.com>",
"Bogdan Chadkin <trysound@yandex.ru>",
"Suhas Karanth <sudo.suhas@gmail.com>"
],
"funding": "https://github.com/sponsors/d-fischer",
"license": "MIT",
"bugs": {
"url": "https://github.com/cosmiconfig/cosmiconfig/issues"
},
"homepage": "https://github.com/cosmiconfig/cosmiconfig#readme",
"prettier": {
"trailingComma": "all",
"arrowParens": "always",
"singleQuote": true,
"printWidth": 80,
"tabWidth": 2
},
"jest": {
"testEnvironment": "node",
"collectCoverageFrom": [
"src/**/*.{js,ts}"
],
"coverageReporters": [
"text",
"html",
"lcov"
],
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
"resetModules": true,
"resetMocks": true,
"restoreMocks": true
},
"babel": {
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "14"
}
}
],
"@babel/preset-typescript"
]
},
"dependencies": {
"import-fresh": "^3.2.1",
"js-yaml": "^4.1.0",
"parse-json": "^5.0.0",
"path-type": "^4.0.0"
},
"devDependencies": {
"@babel/cli": "^7.10.4",
"@babel/core": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@types/jest": "^26.0.4",
"@types/js-yaml": "^4.0.5",
"@types/node": "^14.0.22",
"@types/parse-json": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"cross-env": "^7.0.2",
"del": "^5.1.0",
"del-cli": "^3.0.1",
"eslint": "^7.4.0",
"eslint-config-davidtheclark-node": "^0.2.2",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^23.18.0",
"eslint-plugin-node": "^11.1.0",
"husky": "^4.2.5",
"jest": "^26.1.0",
"lint-staged": "^10.2.11",
"make-dir": "^3.1.0",
"parent-module": "^2.0.0",
"prettier": "^2.0.5",
"remark-preset-davidtheclark": "^0.12.0",
"typescript": "^3.9.6"
},
"engines": {
"node": ">=14"
}
}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"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","2":"C K L G M N O"},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":"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 BB CB DB EB FB GB HB","194":"IB JB KB LB MB NB"},E:{"1":"B C K L G 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A HC zB IC JC KC LC"},F:{"1":"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":"0 1 2 3 4 F B C G M N O w g x y z PC QC RC SC qB AC TC rB","194":"5 6 7 8 9 AB"},G:{"1":"cC dC 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"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"194":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I","194":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"194":"9C"},S:{"1":"AD BD"}},B:5,C:"KeyboardEvent.code"};

View File

@@ -0,0 +1,20 @@
var isIndex = require('./_isIndex');
/**
* The base implementation of `_.nth` which doesn't coerce arguments.
*
* @private
* @param {Array} array The array to query.
* @param {number} n The index of the element to return.
* @returns {*} Returns the nth element of `array`.
*/
function baseNth(array, n) {
var length = array.length;
if (!length) {
return;
}
n += n < 0 ? length : 0;
return isIndex(n, length) ? array[n] : undefined;
}
module.exports = baseNth;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('takeRightWhile', require('../takeRightWhile'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,7 @@
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
export declare function concatMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function concatMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function concatMap<T, R, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
//# sourceMappingURL=concatMap.d.ts.map

View File

@@ -0,0 +1,359 @@
import process from 'node:process';
import stringWidth from 'string-width';
import chalk from 'chalk';
import widestLine from 'widest-line';
import cliBoxes from 'cli-boxes';
import camelCase from 'camelcase';
import ansiAlign from 'ansi-align';
import wrapAnsi from 'wrap-ansi';
const NEWLINE = '\n';
const PAD = ' ';
const BORDERS_WIDTH = 2;
const terminalColumns = () => {
const {env, stdout, stderr} = process;
if (stdout?.columns) {
return stdout.columns;
}
if (stderr?.columns) {
return stderr.columns;
}
if (env.COLUMNS) {
return Number.parseInt(env.COLUMNS, 10);
}
return 80;
};
const getObject = detail => typeof detail === 'number' ? {
top: detail,
right: detail * 3,
bottom: detail,
left: detail * 3,
} : {
top: 0,
right: 0,
bottom: 0,
left: 0,
...detail,
};
const getBorderChars = borderStyle => {
const sides = [
'topLeft',
'topRight',
'bottomRight',
'bottomLeft',
'left',
'right',
'top',
'bottom',
];
let characters;
if (typeof borderStyle === 'string') {
characters = cliBoxes[borderStyle];
if (!characters) {
throw new TypeError(`Invalid border style: ${borderStyle}`);
}
} else {
// Ensure retro-compatibility
if (typeof borderStyle?.vertical === 'string') {
borderStyle.left = borderStyle.vertical;
borderStyle.right = borderStyle.vertical;
}
// Ensure retro-compatibility
if (typeof borderStyle?.horizontal === 'string') {
borderStyle.top = borderStyle.horizontal;
borderStyle.bottom = borderStyle.horizontal;
}
for (const side of sides) {
if (!borderStyle[side] || typeof borderStyle[side] !== 'string') {
throw new TypeError(`Invalid border style: ${side}`);
}
}
characters = borderStyle;
}
return characters;
};
const makeTitle = (text, horizontal, alignement) => {
let title = '';
const textWidth = stringWidth(text);
switch (alignement) {
case 'left':
title = text + horizontal.slice(textWidth);
break;
case 'right':
title = horizontal.slice(textWidth) + text;
break;
default:
horizontal = horizontal.slice(textWidth);
if (horizontal.length % 2 === 1) { // This is needed in case the length is odd
horizontal = horizontal.slice(Math.floor(horizontal.length / 2));
title = horizontal.slice(1) + text + horizontal; // We reduce the left part of one character to avoid the bar to go beyond its limit
} else {
horizontal = horizontal.slice(horizontal.length / 2);
title = horizontal + text + horizontal;
}
break;
}
return title;
};
const makeContentText = (text, {padding, width, textAlignment, height}) => {
text = ansiAlign(text, {align: textAlignment});
let lines = text.split(NEWLINE);
const textWidth = widestLine(text);
const max = width - padding.left - padding.right;
if (textWidth > max) {
const newLines = [];
for (const line of lines) {
const createdLines = wrapAnsi(line, max, {hard: true});
const alignedLines = ansiAlign(createdLines, {align: textAlignment});
const alignedLinesArray = alignedLines.split('\n');
const longestLength = Math.max(...alignedLinesArray.map(s => stringWidth(s)));
for (const alignedLine of alignedLinesArray) {
let paddedLine;
switch (textAlignment) {
case 'center':
paddedLine = PAD.repeat((max - longestLength) / 2) + alignedLine;
break;
case 'right':
paddedLine = PAD.repeat(max - longestLength) + alignedLine;
break;
default:
paddedLine = alignedLine;
break;
}
newLines.push(paddedLine);
}
}
lines = newLines;
}
if (textAlignment === 'center' && textWidth < max) {
lines = lines.map(line => PAD.repeat((max - textWidth) / 2) + line);
} else if (textAlignment === 'right' && textWidth < max) {
lines = lines.map(line => PAD.repeat(max - textWidth) + line);
}
const paddingLeft = PAD.repeat(padding.left);
const paddingRight = PAD.repeat(padding.right);
lines = lines.map(line => paddingLeft + line + paddingRight);
lines = lines.map(line => {
if (width - stringWidth(line) > 0) {
switch (textAlignment) {
case 'center':
return line + PAD.repeat(width - stringWidth(line));
case 'right':
return line + PAD.repeat(width - stringWidth(line));
default:
return line + PAD.repeat(width - stringWidth(line));
}
}
return line;
});
if (padding.top > 0) {
lines = [...Array.from({length: padding.top}).fill(PAD.repeat(width)), ...lines];
}
if (padding.bottom > 0) {
lines = [...lines, ...Array.from({length: padding.bottom}).fill(PAD.repeat(width))];
}
if (height && lines.length > height) {
lines = lines.slice(0, height);
} else if (height && lines.length < height) {
lines = [...lines, ...Array.from({length: height - lines.length}).fill(PAD.repeat(width))];
}
return lines.join(NEWLINE);
};
const boxContent = (content, contentWidth, options) => {
const colorizeBorder = border => {
const newBorder = options.borderColor ? getColorFn(options.borderColor)(border) : border;
return options.dimBorder ? chalk.dim(newBorder) : newBorder;
};
const colorizeContent = content => options.backgroundColor ? getBGColorFn(options.backgroundColor)(content) : content;
const chars = getBorderChars(options.borderStyle);
const columns = terminalColumns();
let marginLeft = PAD.repeat(options.margin.left);
if (options.float === 'center') {
const marginWidth = Math.max((columns - contentWidth - BORDERS_WIDTH) / 2, 0);
marginLeft = PAD.repeat(marginWidth);
} else if (options.float === 'right') {
const marginWidth = Math.max(columns - contentWidth - options.margin.right - BORDERS_WIDTH, 0);
marginLeft = PAD.repeat(marginWidth);
}
const top = colorizeBorder(NEWLINE.repeat(options.margin.top) + marginLeft + chars.topLeft + (options.title ? makeTitle(options.title, chars.top.repeat(contentWidth), options.titleAlignment) : chars.top.repeat(contentWidth)) + chars.topRight);
const bottom = colorizeBorder(marginLeft + chars.bottomLeft + chars.bottom.repeat(contentWidth) + chars.bottomRight + NEWLINE.repeat(options.margin.bottom));
const lines = content.split(NEWLINE);
const middle = lines.map(line => marginLeft + colorizeBorder(chars.left) + colorizeContent(line) + colorizeBorder(chars.right)).join(NEWLINE);
return top + NEWLINE + middle + NEWLINE + bottom;
};
const sanitizeOptions = options => {
// If fullscreen is enabled, max-out unspecified width/height
if (options.fullscreen && process?.stdout) {
let newDimensions = [process.stdout.columns, process.stdout.rows];
if (typeof options.fullscreen === 'function') {
newDimensions = options.fullscreen(...newDimensions);
}
if (!options.width) {
options.width = newDimensions[0];
}
if (!options.height) {
options.height = newDimensions[1];
}
}
// If width is provided, make sure it's not below 1
if (options.width) {
options.width = Math.max(1, options.width - BORDERS_WIDTH);
}
// If height is provided, make sure it's not below 1
if (options.height) {
options.height = Math.max(1, options.height - BORDERS_WIDTH);
}
return options;
};
const determineDimensions = (text, options) => {
options = sanitizeOptions(options);
const widthOverride = options.width !== undefined;
const columns = terminalColumns();
const maxWidth = columns - options.margin.left - options.margin.right - BORDERS_WIDTH;
const widest = widestLine(wrapAnsi(text, columns - BORDERS_WIDTH, {hard: true, trim: false})) + options.padding.left + options.padding.right;
// If title and width are provided, title adheres to fixed width
if (options.title && widthOverride) {
options.title = options.title.slice(0, Math.max(0, options.width - 2));
if (options.title) {
options.title = ` ${options.title} `;
}
} else if (options.title) {
options.title = options.title.slice(0, Math.max(0, maxWidth - 2));
// Recheck if title isn't empty now
if (options.title) {
options.title = ` ${options.title} `;
// If the title is larger than content, box adheres to title width
if (stringWidth(options.title) > widest) {
options.width = stringWidth(options.title);
}
}
}
// If fixed width is provided, use it or content width as reference
options.width = options.width ? options.width : widest;
if (!widthOverride) {
if ((options.margin.left && options.margin.right) && options.width > maxWidth) {
// Let's assume we have margins: left = 3, right = 5, in total = 8
const spaceForMargins = columns - options.width - BORDERS_WIDTH;
// Let's assume we have space = 4
const multiplier = spaceForMargins / (options.margin.left + options.margin.right);
// Here: multiplier = 4/8 = 0.5
options.margin.left = Math.max(0, Math.floor(options.margin.left * multiplier));
options.margin.right = Math.max(0, Math.floor(options.margin.right * multiplier));
// Left: 3 * 0.5 = 1.5 -> 1
// Right: 6 * 0.5 = 3
}
// Re-cap width considering the margins after shrinking
options.width = Math.min(options.width, columns - BORDERS_WIDTH - options.margin.left - options.margin.right);
}
// Prevent padding overflow
if (options.width - (options.padding.left + options.padding.right) <= 0) {
options.padding.left = 0;
options.padding.right = 0;
}
if (options.height && options.height - (options.padding.top + options.padding.bottom) <= 0) {
options.padding.top = 0;
options.padding.bottom = 0;
}
return options;
};
const isHex = color => color.match(/^#(?:[0-f]{3}){1,2}$/i);
const isColorValid = color => typeof color === 'string' && (chalk[color] ?? isHex(color));
const getColorFn = color => isHex(color) ? chalk.hex(color) : chalk[color];
const getBGColorFn = color => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(['bg', color])];
export default function boxen(text, options) {
options = {
padding: 0,
borderStyle: 'single',
dimBorder: false,
textAlignment: 'left',
float: 'left',
titleAlignment: 'left',
...options,
};
// This option is deprecated
if (options.align) {
options.textAlignment = options.align;
}
if (options.borderColor && !isColorValid(options.borderColor)) {
throw new Error(`${options.borderColor} is not a valid borderColor`);
}
if (options.backgroundColor && !isColorValid(options.backgroundColor)) {
throw new Error(`${options.backgroundColor} is not a valid backgroundColor`);
}
options.padding = getObject(options.padding);
options.margin = getObject(options.margin);
options = determineDimensions(text, options);
text = makeContentText(text, options);
return boxContent(text, options.width, options);
}
export {default as _borderStyles} from 'cli-boxes';

View File

@@ -0,0 +1 @@
{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/concat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAMjF,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACtI,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,OAAO,EAAE,EACpD,GAAG,mBAAmB,EAAE,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,GAClE,gBAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,69 @@
{
"name": "wrap-ansi",
"version": "8.1.0",
"description": "Wordwrap a string with ANSI escape codes",
"license": "MIT",
"repository": "chalk/wrap-ansi",
"funding": "https://github.com/chalk/wrap-ansi?sponsor=1",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && nyc ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"wrap",
"break",
"wordwrap",
"wordbreak",
"linewrap",
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"log",
"logging",
"command-line",
"text"
],
"dependencies": {
"ansi-styles": "^6.1.0",
"string-width": "^5.0.1",
"strip-ansi": "^7.0.1"
},
"devDependencies": {
"ava": "^3.15.0",
"chalk": "^4.1.2",
"coveralls": "^3.1.1",
"has-ansi": "^5.0.1",
"nyc": "^15.1.0",
"tsd": "^0.25.0",
"xo": "^0.44.0"
}
}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","132":"J D E CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","132":"0 DC tB I v J D E F A B C K L G M N O w g x y z EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"v J D E F A B C IC JC KC LC 0B qB rB 3B 4B 5B sB 6B 7B 8B 9B OC","132":"I K HC zB 1B","2050":"L G MC NC 2B"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e RC SC qB AC TC rB","132":"F PC QC"},G:{"2":"zB UC BC","772":"E VC WC XC YC ZC aC bC cC dC eC fC gC","2050":"hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC tC uC","132":"sC BC"},J:{"260":"D A"},K:{"1":"B C h qB AC rB","132":"A"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"2":"I","1028":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:4,C:"CSS background-attachment"};

View File

@@ -0,0 +1,675 @@
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
[![git-url-parse](http://i.imgur.com/HlfMsVf.png)](#)
# git-url-parse
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [![Ask me anything](https://img.shields.io/badge/ask%20me-anything-1abc9c.svg)](https://github.com/IonicaBizau/ama) [![Travis](https://img.shields.io/travis/IonicaBizau/git-url-parse.svg)](https://travis-ci.org/IonicaBizau/git-url-parse/) [![Version](https://img.shields.io/npm/v/git-url-parse.svg)](https://www.npmjs.com/package/git-url-parse) [![Downloads](https://img.shields.io/npm/dt/git-url-parse.svg)](https://www.npmjs.com/package/git-url-parse) [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)
<a href="https://www.buymeacoffee.com/H96WwChMy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee"></a>
> A high level git url parser for common git providers.
## :cloud: Installation
```sh
# Using npm
npm install --save git-url-parse
# Using yarn
yarn add git-url-parse
```
## :clipboard: Example
```js
// Dependencies
const GitUrlParse = require("git-url-parse");
console.log(GitUrlParse("git@github.com:IonicaBizau/node-git-url-parse.git"));
// => {
// protocols: []
// , port: null
// , resource: "github.com"
// , user: "git"
// , pathname: "/IonicaBizau/node-git-url-parse.git"
// , hash: ""
// , search: ""
// , href: "git@github.com:IonicaBizau/node-git-url-parse.git"
// , token: ""
// , protocol: "ssh"
// , toString: [Function]
// , source: "github.com"
// , name: "node-git-url-parse"
// , owner: "IonicaBizau"
// }
console.log(GitUrlParse("https://github.com/IonicaBizau/node-git-url-parse.git"));
// => {
// protocols: ["https"]
// , port: null
// , resource: "github.com"
// , user: ""
// , pathname: "/IonicaBizau/node-git-url-parse.git"
// , hash: ""
// , search: ""
// , href: "https://github.com/IonicaBizau/node-git-url-parse.git"
// , token: ""
// , protocol: "https"
// , toString: [Function]
// , source: "github.com"
// , name: "node-git-url-parse"
// , owner: "IonicaBizau"
// }
console.log(GitUrlParse("https://github.com/IonicaBizau/git-url-parse/blob/master/test/index.js"));
// { protocols: [ 'https' ],
// protocol: 'https',
// port: null,
// resource: 'github.com',
// user: '',
// pathname: '/IonicaBizau/git-url-parse/blob/master/test/index.js',
// hash: '',
// search: '',
// href: 'https://github.com/IonicaBizau/git-url-parse/blob/master/test/index.js',
// token: '',
// toString: [Function],
// source: 'github.com',
// name: 'git-url-parse',
// owner: 'IonicaBizau',
// organization: '',
// ref: 'master',
// filepathtype: 'blob',
// filepath: 'test/index.js',
// full_name: 'IonicaBizau/git-url-parse' }
console.log(GitUrlParse("https://github.com/IonicaBizau/node-git-url-parse.git").toString("ssh"));
// => "git@github.com:IonicaBizau/node-git-url-parse.git"
console.log(GitUrlParse("git@github.com:IonicaBizau/node-git-url-parse.git").toString("https"));
// => "https://github.com/IonicaBizau/node-git-url-parse.git"
```
## :question: Get Help
There are few ways to get help:
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
2. For bug reports and feature requests, open issues. :bug:
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
## :memo: Documentation
### `gitUrlParse(url)`
Parses a Git url.
#### Params
- **String** `url`: The Git url to parse.
#### Return
- **GitUrl** The `GitUrl` object containing:
- `protocols` (Array): An array with the url protocols (usually it has one element).
- `port` (null|Number): The domain port.
- `resource` (String): The url domain (including subdomains).
- `user` (String): The authentication user (usually for ssh urls).
- `pathname` (String): The url pathname.
- `hash` (String): The url hash.
- `search` (String): The url querystring value.
- `href` (String): The input url.
- `protocol` (String): The git url protocol.
- `token` (String): The oauth token (could appear in the https urls).
- `source` (String): The Git provider (e.g. `"github.com"`).
- `owner` (String): The repository owner.
- `name` (String): The repository name.
- `ref` (String): The repository ref (e.g., "master" or "dev").
- `filepath` (String): A filepath relative to the repository root.
- `filepathtype` (String): The type of filepath in the url ("blob" or "tree").
- `full_name` (String): The owner and name values in the `owner/name` format.
- `toString` (Function): A function to stringify the parsed url into another url type.
- `organization` (String): The organization the owner belongs to. This is CloudForge specific.
- `git_suffix` (Boolean): Whether to add the `.git` suffix or not.
### `stringify(obj, type)`
Stringifies a `GitUrl` object.
#### Params
- **GitUrl** `obj`: The parsed Git url object.
- **String** `type`: The type of the stringified url (default `obj.protocol`).
#### Return
- **String** The stringified url.
## :yum: How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].
## :sparkling_heart: Support my projects
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,
this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
- Starring and sharing the projects you like :rocket:
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
![](https://i.imgur.com/z6OQI95.png)
Thanks! :heart:
## :dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
- `release-it`
- `documentation`
- `apollo`
- `@backstage/backend-common`
- `@plone/scripts`
- `@atomist/automation-client`
- `@storybook/storybook-deployer`
- `@backstage/integration`
- `@pvm/core`
- `@kadira/storybook-deployer`
- `workspace-tools`
- `gatsby-source-git`
- `@backstage/plugin-catalog-backend`
- `@backstage/plugin-scaffolder-backend`
- `@lerna-lite/core`
- `umi-build-dev`
- `@nuxt/telemetry`
- `@era-ci/utils`
- `@atomist/automation-client-ext-raven`
- `git-source`
- `semantic-release-gitmoji`
- `@qiwi/semantic-release-gh-pages-plugin`
- `@atomist/sdm-pack-analysis`
- `apify-shared`
- `@git-stack/server-core`
- `remax-stats`
- `strapi-generate-new`
- `common-boilerplate`
- `renovate`
- `@backstage/plugin-techdocs-node`
- `@instructure/ui-scripts`
- `@s-ui/studio`
- `@appworks/project-utils`
- `@jswork/next-git-url`
- `@umijs/block-sdk`
- `@lerna/github-client`
- `@micro-app/shared-utils`
- `@oumi/block-sdk`
- `@radjs/block-sdk`
- `@wetrial/block-sdk`
- `datoit-generate-new`
- `@appirio/appirio`
- `@backstage/plugin-techdocs`
- `@log4brains/core`
- `@xdn/cli`
- `@atomist/skill`
- `@zeplin/cli`
- `@koumoul/gh-pages-multi`
- `@pvm/gitlab`
- `@backstage/plugin-scaffolder`
- `@atomist/cli`
- `@brisk-docs/gatsby-generator`
- `@microservices/cli`
- `@vamsikc/plugin-catalog`
- `hzero-block-sdk`
- `@spryker-lerna/github-client`
- `gitbook-start-plugin-iaas-ull-es-noejaco2017`
- `omg`
- `clipped`
- `fotingo`
- `git-issues`
- `@guardian/cdk`
- `@stackbit/dev-common`
- `lambda-service`
- `octokit-downloader`
- `stylelint-formatter-utils`
- `sync-repos`
- `copy-github-directory`
- `@kevinbds/techdocs-common`
- `docula-ui`
- `@s-ui/mono`
- `@facadecompany/ignition-ui`
- `@focusworkstemp/project-utils`
- `@git-stack/hemera-plugin`
- `@jaredpalmer/workspace-tools`
- `@unibtc/release-it`
- `scaffolder-core`
- `testarmada-midway`
- `autorelease-setup`
- `@geut/git-url-parse`
- `sherry-utils`
- `wiby`
- `@erquhart/lerna-github-client`
- `@oumi/cli-ui`
- `changelog.md`
- `@yarnpkg/plugin-git`
- `@feizheng/next-git-url`
- `@iceworks/project-utils`
- `@hygiene/plugin-github-url`
- `@0x-lerna-fork/github-client`
- `@atomist/uhura`
- `@pmworks/project-utils`
- `@pubbo/github-client`
- `@sanv/apify-shared`
- `gcpayz-block-sdk`
- `documentation-custom-markdown`
- `generator-clearphp`
- `@antv/gatsby-theme-antv`
- `@scafflater/scafflater`
- `@emedvedev/renovate`
- `@dougkulak/semantic-release-gh-pages-plugin`
- `@hemith/react-native-tnk`
- `@hugomrdias/documentation`
- `@buschtoens/documentation`
- `@brisk-docs/website`
- `@dandean/storybook-deployer`
- `@lerna-test-v1/markdown`
- `@merna/github-client`
- `@jswork/topics2keywords`
- `@pvdlg/semantic-release`
- `@rianfowler/backstage-backend-common`
- `auto-changelog-vsts`
- `@deskbtm/workspace-tools`
- `debone`
- `cz-conventional-changelog-befe`
- `create-apex-js-app`
- `gatsby-source-git-remotes`
- `gatsby-source-npmjs`
- `flutter-boot`
- `fster`
- `gatsby-theme-zh`
- `git-service-node`
- `git-origin-check`
- `git-yoink`
- `harry-reporter`
- `jsnix`
- `kef-core`
- `konitor`
- `laborious`
- `l-other-data`
- `lime-cli`
- `npm_one_1_2_3`
- `miguelcostero-ng2-toasty`
- `mdnext-loader`
- `native-kakao-login`
- `open-pull-request`
- `rn-adyen-dropin`
- `snipx`
- `react-native-contact-list`
- `react-native-biometric-authenticate`
- `react-native-arunmeena1987`
- `react-native-is7`
- `react-native-my-first-try-arun-ramya`
- `react-native-kakao-maps`
- `react-native-ytximkit`
- `vuepress-plugin-remote-url`
- `@mmomtchev/documentation`
- `spk`
- `release-it-http`
- `todo2issue`
- `tooling-personal`
- `tmplr`
- `prep-barv11`
- `gitlab-ci-variables-cli`
- `gitbook-start-iaas-bbdd-alex-moi`
- `gitbook-start-iaas-ull-es-merquililycony`
- `gitc`
- `lcov-server`
- `gtni`
- `belt-repo`
- `@axetroy/gpm`
- `@belt/repo`
- `docula-ui-express`
- `@geut/git-compare-template`
- `cover-builder`
- `@positionex/position-sdk`
- `@cliz/gpm`
- `@gasket/plugin-metrics`
- `simple-github-release`
- `@salla.sa/cli`
- `ewizard-cli`
- `@1coin178/github-compare`
- `@arcanis/sherlock`
- `@cilyn/bitbucket`
- `@corelmax/react-native-my2c2p-sdk`
- `@csmith/release-it`
- `@esops/publish-github-pages`
- `@felipesimmi/react-native-datalogic-module`
- `@narfeta/catalog-backend`
- `@hawkingnetwork/react-native-tab-view`
- `@infinitecsolutions/storybook-deployer`
- `@pipelinedoc/cli`
- `ftl-renovate`
- `gatsby-theme-cone`
- `gatsby-theme-nestx`
- `generate-github-directory`
- `git-url-promise`
- `git-observer`
- `github-action-readme`
- `coc-discord-rpc`
- `@xyz/create-package`
- `@theowenyoung/gatsby-source-git`
- `@voodeng/uppacks`
- `bitbucket-pullr`
- `configorama`
- `drowl-base-theme-iconset`
- `dx-scanner`
- `native-apple-login`
- `react-native-cplus`
- `npm_qwerty`
- `patchanon-cli`
- `pbc`
- `wsj.gatsby-source-git`
- `semantic-release-github-milestones`
- `tldw`
- `react-native-arunjeyam1987`
- `publish-version`
- `complan`
- `@shopgate/pwa-releaser`
- `def-core`
- `pr-log`
- `@geut/chan-parser`
- `@evanpurkhiser/tooling-personal`
- `react-native-bubble-chart`
- `@blackglory/git-list`
- `nmrium-cli`
- `github-assistant`
- `@tmplr/node`
- `react-native-flyy`
- `@react-18-pdf/root`
- `@edgio/cli`
- `@stackbit/cli`
- `winx-form-winx`
- `test-cli-tested1`
- `@wekanteam/documentation`
- `@campus-online/gatsby-source-git`
- `@carrotwu/wcli`
- `@cratosw/gatsby-antd`
- `@cyber-tools/cyber-npm`
- `@domestika/mono`
- `@docomodigital/pdor`
- `@apardellass/react-native-audio-stream`
- `@amorist/gatsby-theme-antd`
- `@1nd/documentation`
- `@geeky-apo/react-native-advanced-clipboard`
- `@git-stack/module-server`
- `@lerna-test-v1/git`
- `@voodeng/archive`
- `@tjmonsi/generator-uplb-hci-lab-project-template`
- `@tjmonsi/generator-project-template`
- `@vicoders/cli2`
- `@patrickhulce/scripts`
- `@saad27/react-native-bottom-tab-tour`
- `aral-vps-test`
- `auto-clone`
- `cirodown`
- `candlelabssdk`
- `canarist`
- `@tagoro9/git`
- `committing`
- `detect-node-support`
- `gatsby-theme-art-graph`
- `gatsby-theme-cone-oc`
- `github-books`
- `git-upstream`
- `@turborepo/workspace-tools`
- `generator-bootstrap-boilerplate-template`
- `git-imitate`
- `just-dev-sdk`
- `learning-journal-ci`
- `meta-release`
- `nixitech_cli`
- `openapi-repo-generator`
- `npm_one_12_34_1_`
- `npm_one_2_2`
- `payutesting`
- `react-native-dsphoto-module`
- `react-native-sayhello-module`
- `react-native-responsive-size`
- `sn-flutter-boot`
- `wp-continuous-deployment`
- `umi-plugin-repo`
- `@axetroy/git-clone`
- `branch-release`
- `gatsby-theme-iot`
- `documentation-markdown-themes`
- `gd-cli`
- `gitline`
- `gitbook-start-iaas-ull-es-alex-moi`
- `download-repo-cli`
- `yarn-upgrade-on-ci`
- `react-native-shekhar-bridge-test`
- `react-feedback-sdk`
- `@oiti/documentoscopy-react-native`
- `@dvcorg/cml`
- `semantic-release-telegram`
- `@stagas/documentation-fork`
- `@kb-sanity/proto-kb-plugin`
- `@gogogosir/build-cli`
- `generate-preview`
- `@jupiterone/graph-checkmarx`
- `@pvm/github`
- `@pusdn/gatsby-theme-antv`
- `@layer0/cli`
- `@backstage/plugin-techdocs-module-addons-contrib`
- `gatsby-theme-hansin`
- `git-multi-profile`
- `gitlab-tool-cli`
- `luojia-cli-dev`
- `mdxbook`
- `myrenobatebot`
- `node-norman`
- `birken-react-native-community-image-editor`
- `cetus-cli`
- `@shushuer/cli`
- `create-release-it`
- `create-sourcegraph-extension`
- `@activeviam/documentation`
- `@hjin/generator-app`
- `@hnp/package-scripts`
- `@githubtraining/github-exercise-manager`
- `@epranka/create-tsx-package`
- `@elestu/actions-dependacop`
- `@mayahq/mayadev`
- `@pagedip/tool-autorelease`
- `@stavalfi/ci`
- `@kevinbds/plugin-techdocs`
- `one-more-gitlab-cli`
- `ogh`
- `ci-yarn-upgrade`
- `bibi`
- `@wpbrothers/sbcli`
- `ourbigbook`
- `@alitajs/block-sdk`
- `gitbook-start-https-alex-moi`
- `mira`
- `moto-connector`
- `nodeschool-admin`
- `ship-release`
- `ssh-remote`
- `strapper`
- `@jfilipe-sparta/react-native-module_2`
- `cc-flow`
- `release2hub`
- `cogoportutils`
- `sinanews-flutter-boot`
- `kube-workflow`
- `airbyte-faros-destination`
- `@rocket.chat/houston`
- `@saleor/cli`
- `@backstage/plugin-catalog-import`
- `@cloudoki/donderflow`
- `@epranka/create-package`
- `@buganto/client`
- `@cythral/renovate`
- `@georgs/beachball`
- `@generates/kdot`
- `@bcgov/gatsby-source-github-raw`
- `@atomist/ci-sdm`
- `@limejs/cli`
- `@makepad/puppeteer-cli`
- `@mockswitch/cli`
- `@rescribe/cli`
- `@pubcore/node-docker-build`
- `@reshiftsecurity/reshift-plugin-npm`
- `@tahini/nc`
- `@senti-techlabs/generator-senti-project-template`
- `@whey/gatsby-theme-whey`
- `@zpmpkg/zpm`
- `@zalando-backstage/plugin-catalog`
- `air-material_cli`
- `actions-package-update`
- `angularvezba`
- `aral-server`
- `astra-ufo-sdk`
- `blog-flutter-boot`
- `react-native-syan-photo-picker`
- `@wecraftapps/react-native-use-keyboard`
- `documentation-fork`
- `documentation42`
- `create-n`
- `gatsby-source-github-raw`
- `git-csv`
- `git-cherry-fix`
- `git-push-pr`
- `kit-command`
- `l2forlerna`
- `next-mdx-books`
## :scroll: License
[MIT][license] © [Ionică Bizău][website]
[license]: /LICENSE
[website]: https://ionicabizau.net
[contributing]: /CONTRIBUTING.md
[docs]: /DOCUMENTATION.md
[badge_patreon]: https://ionicabizau.github.io/badges/patreon.svg
[badge_amazon]: https://ionicabizau.github.io/badges/amazon.svg
[badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg
[badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg
[patreon]: https://www.patreon.com/ionicabizau
[amazon]: http://amzn.eu/hRo9sIZ
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW

View File

@@ -0,0 +1 @@
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI5C,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3F,gHAAgH;AAChH,wBAAgB,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetOption = void 0;
var _262_1 = require("./262");
/**
* https://tc39.es/ecma402/#sec-getoption
* @param opts
* @param prop
* @param type
* @param values
* @param fallback
*/
function GetOption(opts, prop, type, values, fallback) {
if (typeof opts !== 'object') {
throw new TypeError('Options must be an object');
}
var value = opts[prop];
if (value !== undefined) {
if (type !== 'boolean' && type !== 'string') {
throw new TypeError('invalid type');
}
if (type === 'boolean') {
value = Boolean(value);
}
if (type === 'string') {
value = (0, _262_1.ToString)(value);
}
if (values !== undefined && !values.filter(function (val) { return val == value; }).length) {
throw new RangeError("".concat(value, " is not within ").concat(values.join(', ')));
}
return value;
}
return fallback;
}
exports.GetOption = GetOption;

View File

@@ -0,0 +1,6 @@
import { mergeMap } from './mergeMap';
import { isFunction } from '../util/isFunction';
export function concatMap(project, resultSelector) {
return isFunction(resultSelector) ? mergeMap(project, resultSelector, 1) : mergeMap(project, 1);
}
//# sourceMappingURL=concatMap.js.map

View File

@@ -0,0 +1,11 @@
import { BaseComponent, BaseProps } from './base';
export interface HTMLContentProps extends BaseProps {
content: string;
parentElement?: string;
}
export declare class HTMLElement extends BaseComponent<HTMLContentProps, {}> {
static defaultProps: {
parentElement: string;
};
render(): import('preact').VNode<any>;
}

View File

@@ -0,0 +1,57 @@
'use strict';
var test = require('tape');
var hasPropertyDescriptors = require('../');
var sentinel = {};
test('hasPropertyDescriptors', function (t) {
t.equal(typeof hasPropertyDescriptors, 'function', 'is a function');
t.equal(typeof hasPropertyDescriptors.hasArrayLengthDefineBug, 'function', '`hasArrayLengthDefineBug` property is a function');
var yes = hasPropertyDescriptors();
t.test('property descriptors', { skip: !yes }, function (st) {
var o = { a: sentinel };
st.deepEqual(
Object.getOwnPropertyDescriptor(o, 'a'),
{
configurable: true,
enumerable: true,
value: sentinel,
writable: true
},
'has expected property descriptor'
);
Object.defineProperty(o, 'a', { enumerable: false, writable: false });
st.deepEqual(
Object.getOwnPropertyDescriptor(o, 'a'),
{
configurable: true,
enumerable: false,
value: sentinel,
writable: false
},
'has expected property descriptor after [[Define]]'
);
st.end();
});
var arrayBug = hasPropertyDescriptors.hasArrayLengthDefineBug();
t.test('defining array lengths', { skip: !yes || arrayBug }, function (st) {
var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays
st.equal(arr.length, 3, 'array starts with length 3');
Object.defineProperty(arr, 'length', { value: 5 });
st.equal(arr.length, 5, 'array ends with length 5');
st.end();
});
t.end();
});

View File

@@ -0,0 +1,2 @@
let defaultConfig = require('./lib/public/default-config')
module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default

View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findIndex = void 0;
var lift_1 = require("../util/lift");
var find_1 = require("./find");
function findIndex(predicate, thisArg) {
return lift_1.operate(find_1.createFind(predicate, thisArg, 'index'));
}
exports.findIndex = findIndex;
//# sourceMappingURL=findIndex.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"argsArgArrayOrObject.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/argsArgArrayOrObject.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;CAAE,CAgBlI"}

View File

@@ -0,0 +1,34 @@
import { Observable } from '../Observable';
import { async as asyncScheduler } from '../scheduler/async';
import { isScheduler } from '../util/isScheduler';
import { isValidDate } from '../util/isDate';
export function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {
let intervalDuration = -1;
if (intervalOrScheduler != null) {
if (isScheduler(intervalOrScheduler)) {
scheduler = intervalOrScheduler;
}
else {
intervalDuration = intervalOrScheduler;
}
}
return new Observable((subscriber) => {
let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;
if (due < 0) {
due = 0;
}
let n = 0;
return scheduler.schedule(function () {
if (!subscriber.closed) {
subscriber.next(n++);
if (0 <= intervalDuration) {
this.schedule(undefined, intervalDuration);
}
else {
subscriber.complete();
}
}
}, due);
});
}
//# sourceMappingURL=timer.js.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"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:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"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 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"L G 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A B C K HC zB IC JC KC LC 0B qB rB"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"1":"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 eC fC gC hC iC jC"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:5,C:"ui-serif, ui-sans-serif, ui-monospace and ui-rounded values for font-family"};

View File

@@ -0,0 +1,355 @@
var constants = require('constants')
var origCwd = process.cwd
var cwd = null
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
process.cwd = function() {
if (!cwd)
cwd = origCwd.call(process)
return cwd
}
try {
process.cwd()
} catch (er) {}
// This check is needed until node.js 12 is required
if (typeof process.chdir === 'function') {
var chdir = process.chdir
process.chdir = function (d) {
cwd = null
chdir.call(process, d)
}
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)
}
module.exports = patch
function patch (fs) {
// (re-)implement some things that are known busted or missing.
// lchmod, broken prior to 0.6.2
// back-port the fix here.
if (constants.hasOwnProperty('O_SYMLINK') &&
process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
patchLchmod(fs)
}
// lutimes implementation, or no-op
if (!fs.lutimes) {
patchLutimes(fs)
}
// https://github.com/isaacs/node-graceful-fs/issues/4
// Chown should not fail on einval or eperm if non-root.
// It should not fail on enosys ever, as this just indicates
// that a fs doesn't support the intended operation.
fs.chown = chownFix(fs.chown)
fs.fchown = chownFix(fs.fchown)
fs.lchown = chownFix(fs.lchown)
fs.chmod = chmodFix(fs.chmod)
fs.fchmod = chmodFix(fs.fchmod)
fs.lchmod = chmodFix(fs.lchmod)
fs.chownSync = chownFixSync(fs.chownSync)
fs.fchownSync = chownFixSync(fs.fchownSync)
fs.lchownSync = chownFixSync(fs.lchownSync)
fs.chmodSync = chmodFixSync(fs.chmodSync)
fs.fchmodSync = chmodFixSync(fs.fchmodSync)
fs.lchmodSync = chmodFixSync(fs.lchmodSync)
fs.stat = statFix(fs.stat)
fs.fstat = statFix(fs.fstat)
fs.lstat = statFix(fs.lstat)
fs.statSync = statFixSync(fs.statSync)
fs.fstatSync = statFixSync(fs.fstatSync)
fs.lstatSync = statFixSync(fs.lstatSync)
// if lchmod/lchown do not exist, then make them no-ops
if (fs.chmod && !fs.lchmod) {
fs.lchmod = function (path, mode, cb) {
if (cb) process.nextTick(cb)
}
fs.lchmodSync = function () {}
}
if (fs.chown && !fs.lchown) {
fs.lchown = function (path, uid, gid, cb) {
if (cb) process.nextTick(cb)
}
fs.lchownSync = function () {}
}
// on Windows, A/V software can lock the directory, causing this
// to fail with an EACCES or EPERM if the directory contains newly
// created files. Try again on failure, for up to 60 seconds.
// Set the timeout this long because some Windows Anti-Virus, such as Parity
// bit9, may lock files for up to a minute, causing npm package install
// failures. Also, take care to yield the scheduler. Windows scheduling gives
// CPU to a busy looping process, which can cause the program causing the lock
// contention to be starved of CPU by node, so the contention doesn't resolve.
if (platform === "win32") {
fs.rename = typeof fs.rename !== 'function' ? fs.rename
: (function (fs$rename) {
function rename (from, to, cb) {
var start = Date.now()
var backoff = 0;
fs$rename(from, to, function CB (er) {
if (er
&& (er.code === "EACCES" || er.code === "EPERM")
&& Date.now() - start < 60000) {
setTimeout(function() {
fs.stat(to, function (stater, st) {
if (stater && stater.code === "ENOENT")
fs$rename(from, to, CB);
else
cb(er)
})
}, backoff)
if (backoff < 100)
backoff += 10;
return;
}
if (cb) cb(er)
})
}
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)
return rename
})(fs.rename)
}
// if read() returns EAGAIN, then just try it again.
fs.read = typeof fs.read !== 'function' ? fs.read
: (function (fs$read) {
function read (fd, buffer, offset, length, position, callback_) {
var callback
if (callback_ && typeof callback_ === 'function') {
var eagCounter = 0
callback = function (er, _, __) {
if (er && er.code === 'EAGAIN' && eagCounter < 10) {
eagCounter ++
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
}
callback_.apply(this, arguments)
}
}
return fs$read.call(fs, fd, buffer, offset, length, position, callback)
}
// This ensures `util.promisify` works as it does for native `fs.read`.
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)
return read
})(fs.read)
fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync
: (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
var eagCounter = 0
while (true) {
try {
return fs$readSync.call(fs, fd, buffer, offset, length, position)
} catch (er) {
if (er.code === 'EAGAIN' && eagCounter < 10) {
eagCounter ++
continue
}
throw er
}
}
}})(fs.readSync)
function patchLchmod (fs) {
fs.lchmod = function (path, mode, callback) {
fs.open( path
, constants.O_WRONLY | constants.O_SYMLINK
, mode
, function (err, fd) {
if (err) {
if (callback) callback(err)
return
}
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
fs.fchmod(fd, mode, function (err) {
fs.close(fd, function(err2) {
if (callback) callback(err || err2)
})
})
})
}
fs.lchmodSync = function (path, mode) {
var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
// prefer to return the chmod error, if one occurs,
// but still try to close, and report closing errors if they occur.
var threw = true
var ret
try {
ret = fs.fchmodSync(fd, mode)
threw = false
} finally {
if (threw) {
try {
fs.closeSync(fd)
} catch (er) {}
} else {
fs.closeSync(fd)
}
}
return ret
}
}
function patchLutimes (fs) {
if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) {
fs.lutimes = function (path, at, mt, cb) {
fs.open(path, constants.O_SYMLINK, function (er, fd) {
if (er) {
if (cb) cb(er)
return
}
fs.futimes(fd, at, mt, function (er) {
fs.close(fd, function (er2) {
if (cb) cb(er || er2)
})
})
})
}
fs.lutimesSync = function (path, at, mt) {
var fd = fs.openSync(path, constants.O_SYMLINK)
var ret
var threw = true
try {
ret = fs.futimesSync(fd, at, mt)
threw = false
} finally {
if (threw) {
try {
fs.closeSync(fd)
} catch (er) {}
} else {
fs.closeSync(fd)
}
}
return ret
}
} else if (fs.futimes) {
fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
fs.lutimesSync = function () {}
}
}
function chmodFix (orig) {
if (!orig) return orig
return function (target, mode, cb) {
return orig.call(fs, target, mode, function (er) {
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
})
}
}
function chmodFixSync (orig) {
if (!orig) return orig
return function (target, mode) {
try {
return orig.call(fs, target, mode)
} catch (er) {
if (!chownErOk(er)) throw er
}
}
}
function chownFix (orig) {
if (!orig) return orig
return function (target, uid, gid, cb) {
return orig.call(fs, target, uid, gid, function (er) {
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
})
}
}
function chownFixSync (orig) {
if (!orig) return orig
return function (target, uid, gid) {
try {
return orig.call(fs, target, uid, gid)
} catch (er) {
if (!chownErOk(er)) throw er
}
}
}
function statFix (orig) {
if (!orig) return orig
// Older versions of Node erroneously returned signed integers for
// uid + gid.
return function (target, options, cb) {
if (typeof options === 'function') {
cb = options
options = null
}
function callback (er, stats) {
if (stats) {
if (stats.uid < 0) stats.uid += 0x100000000
if (stats.gid < 0) stats.gid += 0x100000000
}
if (cb) cb.apply(this, arguments)
}
return options ? orig.call(fs, target, options, callback)
: orig.call(fs, target, callback)
}
}
function statFixSync (orig) {
if (!orig) return orig
// Older versions of Node erroneously returned signed integers for
// uid + gid.
return function (target, options) {
var stats = options ? orig.call(fs, target, options)
: orig.call(fs, target)
if (stats) {
if (stats.uid < 0) stats.uid += 0x100000000
if (stats.gid < 0) stats.gid += 0x100000000
}
return stats;
}
}
// ENOSYS means that the fs doesn't support the op. Just ignore
// that, because it doesn't matter.
//
// if there's no getuid, or if getuid() is something other
// than 0, and the error is EINVAL or EPERM, then just ignore
// it.
//
// This specific case is a silent failure in cp, install, tar,
// and most other unix tools that manage permissions.
//
// When running as root, or if other types of errors are
// encountered, then it's strict.
function chownErOk (er) {
if (!er)
return true
if (er.code === "ENOSYS")
return true
var nonroot = !process.getuid || process.getuid() !== 0
if (nonroot) {
if (er.code === "EINVAL" || er.code === "EPERM")
return true
}
return false
}
}

View File

@@ -0,0 +1,101 @@
import merge from './util/merge';
import assertString from './util/assertString';
var upperCaseRegex = /^[A-Z]$/;
var lowerCaseRegex = /^[a-z]$/;
var numberRegex = /^[0-9]$/;
var symbolRegex = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/;
var defaultOptions = {
minLength: 8,
minLowercase: 1,
minUppercase: 1,
minNumbers: 1,
minSymbols: 1,
returnScore: false,
pointsPerUnique: 1,
pointsPerRepeat: 0.5,
pointsForContainingLower: 10,
pointsForContainingUpper: 10,
pointsForContainingNumber: 10,
pointsForContainingSymbol: 10
};
/* Counts number of occurrences of each char in a string
* could be moved to util/ ?
*/
function countChars(str) {
var result = {};
Array.from(str).forEach(function (_char) {
var curVal = result[_char];
if (curVal) {
result[_char] += 1;
} else {
result[_char] = 1;
}
});
return result;
}
/* Return information about a password */
function analyzePassword(password) {
var charMap = countChars(password);
var analysis = {
length: password.length,
uniqueChars: Object.keys(charMap).length,
uppercaseCount: 0,
lowercaseCount: 0,
numberCount: 0,
symbolCount: 0
};
Object.keys(charMap).forEach(function (_char2) {
/* istanbul ignore else */
if (upperCaseRegex.test(_char2)) {
analysis.uppercaseCount += charMap[_char2];
} else if (lowerCaseRegex.test(_char2)) {
analysis.lowercaseCount += charMap[_char2];
} else if (numberRegex.test(_char2)) {
analysis.numberCount += charMap[_char2];
} else if (symbolRegex.test(_char2)) {
analysis.symbolCount += charMap[_char2];
}
});
return analysis;
}
function scorePassword(analysis, scoringOptions) {
var points = 0;
points += analysis.uniqueChars * scoringOptions.pointsPerUnique;
points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat;
if (analysis.lowercaseCount > 0) {
points += scoringOptions.pointsForContainingLower;
}
if (analysis.uppercaseCount > 0) {
points += scoringOptions.pointsForContainingUpper;
}
if (analysis.numberCount > 0) {
points += scoringOptions.pointsForContainingNumber;
}
if (analysis.symbolCount > 0) {
points += scoringOptions.pointsForContainingSymbol;
}
return points;
}
export default function isStrongPassword(str) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
assertString(str);
var analysis = analyzePassword(str);
options = merge(options || {}, defaultOptions);
if (options.returnScore) {
return scorePassword(analysis, options);
}
return analysis.length >= options.minLength && analysis.lowercaseCount >= options.minLowercase && analysis.uppercaseCount >= options.minUppercase && analysis.numberCount >= options.minNumbers && analysis.symbolCount >= options.minSymbols;
}

View File

@@ -0,0 +1,46 @@
import { MonoTypeOperatorFunction, SchedulerLike } from '../types';
/**
* Emits the most recently emitted value from the source Observable within
* periodic time intervals.
*
* <span class="informal">Samples the source Observable at periodic time
* intervals, emitting what it samples.</span>
*
* ![](sampleTime.png)
*
* `sampleTime` periodically looks at the source Observable and emits whichever
* value it has most recently emitted since the previous sampling, unless the
* source has not emitted anything since the previous sampling. The sampling
* happens periodically in time every `period` milliseconds (or the time unit
* defined by the optional `scheduler` argument). The sampling starts as soon as
* the output Observable is subscribed.
*
* ## Example
*
* Every second, emit the most recent click at most once
*
* ```ts
* import { fromEvent, sampleTime } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(sampleTime(1000));
*
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link auditTime}
* @see {@link debounceTime}
* @see {@link delay}
* @see {@link sample}
* @see {@link throttleTime}
*
* @param {number} period The sampling period expressed in milliseconds or the
* time unit determined internally by the optional `scheduler`.
* @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for
* managing the timers that handle the sampling.
* @return A function that returns an Observable that emits the results of
* sampling the values emitted by the source Observable at the specified time
* interval.
*/
export declare function sampleTime<T>(period: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;
//# sourceMappingURL=sampleTime.d.ts.map

View File

@@ -0,0 +1 @@
{"name":"ansi-styles","version":"6.2.1","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.d.ts":{"checkedAt":1678883670511,"integrity":"sha512-55upX1Qew6JmrFf5tk3A6ZExuW0uy5wUMT0v4SGkwCXsMmRPsnka6+CO4H6Q08IP/hs9L1F3E3DaBpOHOR6eWw==","mode":420,"size":5198},"index.js":{"checkedAt":1678883671351,"integrity":"sha512-fRjKeR90pV/Jugj5h9BKc/7u2YY13dJ0+kFu9ZIY8931VJT0T2wcGJlpagak14bgRuZ/CK6tD9rHABthYZJdsw==","mode":420,"size":5267},"package.json":{"checkedAt":1678883671351,"integrity":"sha512-E4pwFl/eweXrpXLUrh+PmyUKYM1GBN3e5MPJ/LTMVTRKdXKOx7SYWTNdOIRVmronTBr6jUdawb/yAuSvqCGrtA==","mode":420,"size":1022},"readme.md":{"checkedAt":1678883671351,"integrity":"sha512-bWVEDSad+l7KfHf9CjEclNI1fzzovYflTpq+cs76FnKS4Mkwyvu9VzoKgufs/FnFc8V8kWHR46/yAyuhfZcvVQ==","mode":420,"size":4908}}}

View File

@@ -0,0 +1,22 @@
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
module.exports = arrayEach;

View File

@@ -0,0 +1,54 @@
import { MonoTypeOperatorFunction, ObservableInput } from '../types';
export interface ThrottleConfig {
leading?: boolean;
trailing?: boolean;
}
export declare const defaultThrottleConfig: ThrottleConfig;
/**
* Emits a value from the source Observable, then ignores subsequent source
* values for a duration determined by another Observable, then repeats this
* process.
*
* <span class="informal">It's like {@link throttleTime}, but the silencing
* duration is determined by a second Observable.</span>
*
* ![](throttle.svg)
*
* `throttle` emits the source Observable values on the output Observable
* when its internal timer is disabled, and ignores source values when the timer
* is enabled. Initially, the timer is disabled. As soon as the first source
* value arrives, it is forwarded to the output Observable, and then the timer
* is enabled by calling the `durationSelector` function with the source value,
* which returns the "duration" Observable. When the duration Observable emits a
* value, the timer is disabled, and this process repeats for the
* next source value.
*
* ## Example
*
* Emit clicks at a rate of at most one click per second
*
* ```ts
* import { fromEvent, throttle, interval } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(throttle(() => interval(1000)));
*
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link audit}
* @see {@link debounce}
* @see {@link delayWhen}
* @see {@link sample}
* @see {@link throttleTime}
*
* @param durationSelector A function
* that receives a value from the source Observable, for computing the silencing
* duration for each source value, returned as an Observable or a Promise.
* @param config a configuration object to define `leading` and `trailing` behavior. Defaults
* to `{ leading: true, trailing: false }`.
* @return A function that returns an Observable that performs the throttle
* operation to limit the rate of emissions from the source.
*/
export declare function throttle<T>(durationSelector: (value: T) => ObservableInput<any>, config?: ThrottleConfig): MonoTypeOperatorFunction<T>;
//# sourceMappingURL=throttle.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"argsOrArgArray.d.ts","sourceRoot":"","sources":["../../../../src/internal/util/argsOrArgArray.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAExD"}

View File

@@ -0,0 +1,88 @@
import { not } from '../util/not';
import { filter } from '../operators/filter';
import { ObservableInput } from '../types';
import { Observable } from '../Observable';
import { innerFrom } from './innerFrom';
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export function partition<T, U extends T, A>(
source: ObservableInput<T>,
predicate: (this: A, value: T, index: number) => value is U,
thisArg: A
): [Observable<U>, Observable<Exclude<T, U>>];
export function partition<T, U extends T>(
source: ObservableInput<T>,
predicate: (value: T, index: number) => value is U
): [Observable<U>, Observable<Exclude<T, U>>];
/** @deprecated Use a closure instead of a `thisArg`. Signatures accepting a `thisArg` will be removed in v8. */
export function partition<T, A>(
source: ObservableInput<T>,
predicate: (this: A, value: T, index: number) => boolean,
thisArg: A
): [Observable<T>, Observable<T>];
export function partition<T>(source: ObservableInput<T>, predicate: (value: T, index: number) => boolean): [Observable<T>, Observable<T>];
/**
* Splits the source Observable into two, one with values that satisfy a
* predicate, and another with values that don't satisfy the predicate.
*
* <span class="informal">It's like {@link filter}, but returns two Observables:
* one like the output of {@link filter}, and the other with values that did not
* pass the condition.</span>
*
* ![](partition.png)
*
* `partition` outputs an array with two Observables that partition the values
* from the source Observable through the given `predicate` function. The first
* Observable in that array emits source values for which the predicate argument
* returns true. The second Observable emits source values for which the
* predicate returns false. The first behaves like {@link filter} and the second
* behaves like {@link filter} with the predicate negated.
*
* ## Example
*
* Partition a set of numbers into odds and evens observables
*
* ```ts
* import { of, partition } from 'rxjs';
*
* const observableValues = of(1, 2, 3, 4, 5, 6);
* const [evens$, odds$] = partition(observableValues, value => value % 2 === 0);
*
* odds$.subscribe(x => console.log('odds', x));
* evens$.subscribe(x => console.log('evens', x));
*
* // Logs:
* // odds 1
* // odds 3
* // odds 5
* // evens 2
* // evens 4
* // evens 6
* ```
*
* @see {@link filter}
*
* @param {function(value: T, index: number): boolean} predicate A function that
* evaluates each value emitted by the source Observable. If it returns `true`,
* the value is emitted on the first Observable in the returned array, if
* `false` the value is emitted on the second Observable in the array. The
* `index` parameter is the number `i` for the i-th source emission that has
* happened since the subscription, starting from the number `0`.
* @param {any} [thisArg] An optional argument to determine the value of `this`
* in the `predicate` function.
* @return {[Observable<T>, Observable<T>]} An array with two Observables: one
* with values that passed the predicate, and another with values that did not
* pass the predicate.
*/
export function partition<T>(
source: ObservableInput<T>,
predicate: (this: any, value: T, index: number) => boolean,
thisArg?: any
): [Observable<T>, Observable<T>] {
return [filter(predicate, thisArg)(innerFrom(source)), filter(not(predicate, thisArg))(innerFrom(source))] as [
Observable<T>,
Observable<T>
];
}

View File

@@ -0,0 +1,119 @@
# parse-json
> Parse JSON with more helpful errors
## Install
```
$ npm install parse-json
```
## Usage
```js
const parseJson = require('parse-json');
const json = '{\n\t"foo": true,\n}';
JSON.parse(json);
/*
undefined:3
}
^
SyntaxError: Unexpected token }
*/
parseJson(json);
/*
JSONError: Unexpected token } in JSON at position 16 while parsing near '{ "foo": true,}'
1 | {
2 | "foo": true,
> 3 | }
| ^
*/
parseJson(json, 'foo.json');
/*
JSONError: Unexpected token } in JSON at position 16 while parsing near '{ "foo": true,}' in foo.json
1 | {
2 | "foo": true,
> 3 | }
| ^
*/
// You can also add the filename at a later point
try {
parseJson(json);
} catch (error) {
if (error instanceof parseJson.JSONError) {
error.fileName = 'foo.json';
}
throw error;
}
/*
JSONError: Unexpected token } in JSON at position 16 while parsing near '{ "foo": true,}' in foo.json
1 | {
2 | "foo": true,
> 3 | }
| ^
*/
```
## API
### parseJson(string, reviver?, filename?)
Throws a `JSONError` when there is a parsing error.
#### string
Type: `string`
#### reviver
Type: `Function`
Prescribes how the value originally produced by parsing is transformed, before being returned. See [`JSON.parse` docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter
) for more.
#### filename
Type: `string`
Filename displayed in the error message.
### parseJson.JSONError
Exposed for `instanceof` checking.
#### fileName
Type: `string`
The filename displayed in the error message.
#### codeFrame
Type: `string`
The printable section of the JSON which produces the error.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-parse-json?utm_source=npm-parse-json&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View File

@@ -0,0 +1,36 @@
/**
Create a type that requires all of the given keys or none of the given keys. The remaining keys are kept as is.
Use-cases:
- Creating interfaces for components with mutually-inclusive keys.
The caveat with `RequireAllOrNone` is that TypeScript doesn't always know at compile time every key that will exist at runtime. Therefore `RequireAllOrNone` can't do anything to prevent extra keys it doesn't know about.
@example
```
import type {RequireAllOrNone} from 'type-fest';
type Responder = {
text?: () => string;
json?: () => string;
secure: boolean;
};
const responder1: RequireAllOrNone<Responder, 'text' | 'json'> = {
secure: true
};
const responder2: RequireAllOrNone<Responder, 'text' | 'json'> = {
text: () => '{"message": "hi"}',
json: () => '{"message": "ok"}',
secure: true
};
```
@category Object
*/
export type RequireAllOrNone<ObjectType, KeysType extends keyof ObjectType = never> = (
| Required<Pick<ObjectType, KeysType>> // Require all of the given keys.
| Partial<Record<KeysType, never>> // Require none of the given keys.
) &
Omit<ObjectType, KeysType>; // The rest of the keys.

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0.00454,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00454,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.02722,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.01361,"89":0,"90":0,"91":0,"92":0.00907,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00907,"100":0,"101":0,"102":0.00907,"103":0,"104":0.01815,"105":0.00454,"106":0.00907,"107":0.00454,"108":0.02722,"109":0.40833,"110":0.24954,"111":0.00454,"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.00454,"36":0,"37":0,"38":0.00454,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.01361,"48":0,"49":0.02722,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0.00454,"57":0,"58":0.00454,"59":0,"60":0,"61":0,"62":0.00454,"63":0.00907,"64":0,"65":0,"66":0.00454,"67":0,"68":0.01361,"69":0,"70":0.00454,"71":0,"72":0,"73":0.01815,"74":0.00907,"75":0.00454,"76":0,"77":0.00454,"78":0.01361,"79":0.09528,"80":0.00907,"81":0.00907,"83":0.07713,"84":0.00454,"85":0.00907,"86":0.05444,"87":0.0363,"88":0.00907,"89":0.00454,"90":0.01815,"91":0.01815,"92":0.00907,"93":0.00454,"94":0.00907,"95":0.01361,"96":0.00907,"97":0.01361,"98":0.03176,"99":0.01361,"100":0.01361,"101":0.00907,"102":0.05444,"103":0.06352,"104":0.02269,"105":0.03176,"106":0.04537,"107":0.07713,"108":0.38565,"109":8.44789,"110":4.55061,"111":0.00454,"112":0.00454,"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.00907,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0.00454,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0.01815,"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.00454,"64":0,"65":0,"66":0,"67":0.00454,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.01361,"80":0,"81":0,"82":0,"83":0,"84":0.00454,"85":0.02269,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.06352,"94":0.75768,"95":0.73046,"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.00454,"13":0.01815,"14":0.07259,"15":0,"16":0.02722,"17":0,"18":0.02722,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.01361,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.00454,"99":0.00454,"100":0,"101":0.00907,"102":0,"103":0.00454,"104":0,"105":0.00907,"106":0.00907,"107":0.02269,"108":0.0363,"109":0.65787,"110":0.8212},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00454,"14":0.01815,"15":0.00907,_:"0","3.1":0,"3.2":0,"5.1":0.00454,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00454,"13.1":0.01815,"14.1":0.04537,"15.1":0.00907,"15.2-15.3":0.00454,"15.4":0.01815,"15.5":0.04083,"15.6":0.17241,"16.0":0.02269,"16.1":0.08167,"16.2":0.13611,"16.3":0.13157,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.02446,"6.0-6.1":0,"7.0-7.1":0.16744,"8.1-8.4":0.00376,"9.0-9.2":0.00188,"9.3":0.0602,"10.0-10.2":0,"10.3":0.12041,"11.0-11.2":0.04515,"11.3-11.4":0.00753,"12.0-12.1":0.0301,"12.2-12.5":0.79205,"13.0-13.1":0.00564,"13.2":0.00376,"13.3":0.03763,"13.4-13.7":0.13169,"14.0-14.4":0.44024,"14.5-14.8":0.69422,"15.0-15.1":0.17497,"15.2-15.3":0.27468,"15.4":0.39132,"15.5":0.50797,"15.6":1.23041,"16.0":2.79946,"16.1":3.25663,"16.2":3.42031,"16.3":2.37992,"16.4":0.00941},P:{"4":0.55301,"20":0.38606,"5.0-5.4":0.01043,"6.2-6.4":0,"7.2-7.4":0.0626,"8.2":0,"9.2":0.01043,"10.1":0,"11.1-11.2":0.0313,"12.0":0,"13.0":0.04174,"14.0":0.01043,"15.0":0.01043,"16.0":0.07304,"17.0":0.0626,"18.0":0.0626,"19.0":0.8869},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.01964,"4.2-4.3":0.15713,"4.4":0,"4.4.3-4.4.4":0.74637},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.01815,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.0437},H:{"0":0.27412},L:{"0":58.28374},R:{_:"0"},M:{"0":0.07102},Q:{"13.1":0}};

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0.00476,"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.04288,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00476,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00476,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.00476,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.00953,"103":0.00476,"104":0.00476,"105":0.00476,"106":0.00476,"107":0.00953,"108":0.01906,"109":0.79559,"110":0.34777,"111":0,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0.00953,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0.00476,"45":0.00476,"46":0,"47":0.00476,"48":0,"49":0.00953,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0.00476,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00476,"69":0.00476,"70":0.77177,"71":0.00476,"72":0,"73":0,"74":0,"75":0,"76":0.00476,"77":0.00476,"78":0.00476,"79":0.08575,"80":0.00476,"81":0.01429,"83":0.00953,"84":0.01429,"85":0.00953,"86":0.01906,"87":0.01906,"88":0.00476,"89":0,"90":0,"91":0.00953,"92":0.02858,"93":0.0524,"94":0,"95":0.00953,"96":0.00476,"97":0.00476,"98":0.01429,"99":0.00953,"100":0.01429,"101":0.00476,"102":0.00953,"103":0.07146,"104":0.01429,"105":0.05717,"106":0.04288,"107":0.02858,"108":1.02426,"109":9.94247,"110":3.84931,"111":0.00476,"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.00476,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00476,"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.00476,"62":0,"63":0.00476,"64":0,"65":0,"66":0,"67":0.02382,"68":0,"69":0,"70":0,"71":0.00476,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00476,"90":0,"91":0,"92":0,"93":0.04764,"94":0.5431,"95":0.20485,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0.00476,"79":0,"80":0,"81":0,"83":0,"84":0.00476,"85":0.00476,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00476,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0.00476,"104":0,"105":0,"106":0,"107":0.00953,"108":0.02382,"109":1.03379,"110":1.23864},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0.00476,"10":0,"11":0,"12":0,"13":0.00476,"14":0.04288,"15":0.00476,_:"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.00476,"13.1":0.20485,"14.1":0.0667,"15.1":0.02858,"15.2-15.3":0.01429,"15.4":0.01906,"15.5":0.04288,"15.6":0.23344,"16.0":0.02382,"16.1":0.07622,"16.2":0.33824,"16.3":0.21438,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0.00652,"7.0-7.1":0.01955,"8.1-8.4":0.00435,"9.0-9.2":0.00435,"9.3":0.06301,"10.0-10.2":0.00435,"10.3":0.06953,"11.0-11.2":0.01955,"11.3-11.4":0.01304,"12.0-12.1":0.01521,"12.2-12.5":0.34981,"13.0-13.1":0.00217,"13.2":0,"13.3":0.03259,"13.4-13.7":0.07822,"14.0-14.4":0.20206,"14.5-14.8":0.74524,"15.0-15.1":0.13471,"15.2-15.3":0.28463,"15.4":0.21075,"15.5":0.49755,"15.6":1.87289,"16.0":2.15534,"16.1":5.4796,"16.2":5.3601,"16.3":3.0744,"16.4":0.01086},P:{"4":0.14198,"20":1.39955,"5.0-5.4":0.01014,"6.2-6.4":0,"7.2-7.4":0.03043,"8.2":0,"9.2":0.01014,"10.1":0,"11.1-11.2":0.01014,"12.0":0,"13.0":0.01014,"14.0":0.02028,"15.0":0.01014,"16.0":0.05071,"17.0":0.06085,"18.0":0.07099,"19.0":2.51514},I:{"0":0,"3":0,"4":0.00876,"2.1":0,"2.2":0.02629,"2.3":0.00876,"4.1":0.00876,"4.2-4.3":0.01753,"4.4":0,"4.4.3-4.4.4":0.08325},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.01429,"9":0,"10":0.00476,"11":0.06193,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0.01047,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.21468},H:{"0":0.36683},L:{"0":48.9476},R:{_:"0"},M:{"0":0.17279},Q:{"13.1":0}};

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isDivisibleBy;
var _assertString = _interopRequireDefault(require("./util/assertString"));
var _toFloat = _interopRequireDefault(require("./toFloat"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function isDivisibleBy(str, num) {
(0, _assertString.default)(str);
return (0, _toFloat.default)(str) % parseInt(num, 10) === 0;
}
module.exports = exports.default;
module.exports.default = exports.default;

View File

@@ -0,0 +1,25 @@
'use strict'
exports.fromCallback = function (fn) {
return Object.defineProperty(function () {
if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)
else {
return new Promise((resolve, reject) => {
arguments[arguments.length] = (err, res) => {
if (err) return reject(err)
resolve(res)
}
arguments.length++
fn.apply(this, arguments)
})
}
}, 'name', { value: fn.name })
}
exports.fromPromise = function (fn) {
return Object.defineProperty(function () {
const cb = arguments[arguments.length - 1]
if (typeof cb !== 'function') return fn.apply(this, arguments)
else fn.apply(this, arguments).then(r => cb(null, r), cb)
}, 'name', { value: fn.name })
}

View File

@@ -0,0 +1,6 @@
import { Observable } from '../Observable';
import { OperatorFunction, SchedulerLike } from '../types';
export declare function windowTime<T>(windowTimeSpan: number, scheduler?: SchedulerLike): OperatorFunction<T, Observable<T>>;
export declare function windowTime<T>(windowTimeSpan: number, windowCreationInterval: number, scheduler?: SchedulerLike): OperatorFunction<T, Observable<T>>;
export declare function windowTime<T>(windowTimeSpan: number, windowCreationInterval: number | null | void, maxWindowSize: number, scheduler?: SchedulerLike): OperatorFunction<T, Observable<T>>;
//# sourceMappingURL=windowTime.d.ts.map

View File

@@ -0,0 +1,53 @@
{
"name": "type-fest",
"version": "3.6.1",
"description": "A collection of essential TypeScript types",
"license": "(MIT OR CC0-1.0)",
"repository": "sindresorhus/type-fest",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"types": "./index.d.ts",
"engines": {
"node": ">=14.16"
},
"scripts": {
"test": "xo && tsd && tsc && node script/test/source-files-extension.js"
},
"files": [
"index.d.ts",
"source"
],
"keywords": [
"typescript",
"ts",
"types",
"utility",
"util",
"utilities",
"omit",
"merge",
"json",
"generics"
],
"devDependencies": {
"@sindresorhus/tsconfig": "~0.7.0",
"expect-type": "^0.15.0",
"tsd": "^0.24.1",
"typescript": "^4.9.3",
"xo": "^0.53.1"
},
"xo": {
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/naming-convention": "off",
"import/extensions": "off",
"@typescript-eslint/no-redeclare": "off",
"@typescript-eslint/no-confusing-void-expression": "off"
}
}
}

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('findLastKey', require('../findLastKey'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1 @@
{"version":3,"file":"expand.js","sourceRoot":"","sources":["../../../../src/internal/operators/expand.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAuElD,MAAM,UAAU,MAAM,CACpB,OAAuC,EACvC,UAAqB,EACrB,SAAyB;IADzB,2BAAA,EAAA,qBAAqB;IAGrB,UAAU,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAC3D,OAAO,OAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,OAAA,cAAc,CAEZ,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EAGV,SAAS,EAGT,IAAI,EACJ,SAAS,CACV;IAbD,CAaC,CACF,CAAC;AACJ,CAAC"}