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,257 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
updateAllClasses: ()=>updateAllClasses,
asValue: ()=>asValue,
parseColorFormat: ()=>parseColorFormat,
asColor: ()=>asColor,
asLookupValue: ()=>asLookupValue,
typeMap: ()=>typeMap,
coerceValue: ()=>coerceValue,
getMatchingTypes: ()=>getMatchingTypes
});
const _escapeCommas = /*#__PURE__*/ _interopRequireDefault(require("./escapeCommas"));
const _withAlphaVariable = require("./withAlphaVariable");
const _dataTypes = require("./dataTypes");
const _negateValue = /*#__PURE__*/ _interopRequireDefault(require("./negateValue"));
const _validateFormalSyntax = require("./validateFormalSyntax");
const _featureFlagsJs = require("../featureFlags.js");
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function updateAllClasses(selectors, updateClass) {
selectors.walkClasses((sel)=>{
sel.value = updateClass(sel.value);
if (sel.raws && sel.raws.value) {
sel.raws.value = (0, _escapeCommas.default)(sel.raws.value);
}
});
}
function resolveArbitraryValue(modifier, validate) {
if (!isArbitraryValue(modifier)) {
return undefined;
}
let value = modifier.slice(1, -1);
if (!validate(value)) {
return undefined;
}
return (0, _dataTypes.normalize)(value);
}
function asNegativeValue(modifier, lookup = {}, validate) {
let positiveValue = lookup[modifier];
if (positiveValue !== undefined) {
return (0, _negateValue.default)(positiveValue);
}
if (isArbitraryValue(modifier)) {
let resolved = resolveArbitraryValue(modifier, validate);
if (resolved === undefined) {
return undefined;
}
return (0, _negateValue.default)(resolved);
}
}
function asValue(modifier, options = {}, { validate =()=>true } = {}) {
var _options_values;
let value = (_options_values = options.values) === null || _options_values === void 0 ? void 0 : _options_values[modifier];
if (value !== undefined) {
return value;
}
if (options.supportsNegativeValues && modifier.startsWith("-")) {
return asNegativeValue(modifier.slice(1), options.values, validate);
}
return resolveArbitraryValue(modifier, validate);
}
function isArbitraryValue(input) {
return input.startsWith("[") && input.endsWith("]");
}
function splitUtilityModifier(modifier) {
let slashIdx = modifier.lastIndexOf("/");
if (slashIdx === -1 || slashIdx === modifier.length - 1) {
return [
modifier,
undefined
];
}
let arbitrary = isArbitraryValue(modifier);
// The modifier could be of the form `[foo]/[bar]`
// We want to handle this case properly
// without affecting `[foo/bar]`
if (arbitrary && !modifier.includes("]/[")) {
return [
modifier,
undefined
];
}
return [
modifier.slice(0, slashIdx),
modifier.slice(slashIdx + 1)
];
}
function parseColorFormat(value) {
if (typeof value === "string" && value.includes("<alpha-value>")) {
let oldValue = value;
return ({ opacityValue =1 })=>oldValue.replace("<alpha-value>", opacityValue);
}
return value;
}
function asColor(modifier, options = {}, { tailwindConfig ={} } = {}) {
var _options_values;
if (((_options_values = options.values) === null || _options_values === void 0 ? void 0 : _options_values[modifier]) !== undefined) {
var _options_values1;
return parseColorFormat((_options_values1 = options.values) === null || _options_values1 === void 0 ? void 0 : _options_values1[modifier]);
}
// TODO: Hoist this up to getMatchingTypes or something
// We do this here because we need the alpha value (if any)
let [color, alpha] = splitUtilityModifier(modifier);
if (alpha !== undefined) {
var _options_values2, _tailwindConfig_theme, _tailwindConfig_theme_opacity;
var _options_values_color;
let normalizedColor = (_options_values_color = (_options_values2 = options.values) === null || _options_values2 === void 0 ? void 0 : _options_values2[color]) !== null && _options_values_color !== void 0 ? _options_values_color : isArbitraryValue(color) ? color.slice(1, -1) : undefined;
if (normalizedColor === undefined) {
return undefined;
}
normalizedColor = parseColorFormat(normalizedColor);
if (isArbitraryValue(alpha)) {
return (0, _withAlphaVariable.withAlphaValue)(normalizedColor, alpha.slice(1, -1));
}
if (((_tailwindConfig_theme = tailwindConfig.theme) === null || _tailwindConfig_theme === void 0 ? void 0 : (_tailwindConfig_theme_opacity = _tailwindConfig_theme.opacity) === null || _tailwindConfig_theme_opacity === void 0 ? void 0 : _tailwindConfig_theme_opacity[alpha]) === undefined) {
return undefined;
}
return (0, _withAlphaVariable.withAlphaValue)(normalizedColor, tailwindConfig.theme.opacity[alpha]);
}
return asValue(modifier, options, {
validate: _dataTypes.color
});
}
function asLookupValue(modifier, options = {}) {
var _options_values;
return (_options_values = options.values) === null || _options_values === void 0 ? void 0 : _options_values[modifier];
}
function guess(validate) {
return (modifier, options)=>{
return asValue(modifier, options, {
validate
});
};
}
let typeMap = {
any: asValue,
color: asColor,
url: guess(_dataTypes.url),
image: guess(_dataTypes.image),
length: guess(_dataTypes.length),
percentage: guess(_dataTypes.percentage),
position: guess(_dataTypes.position),
lookup: asLookupValue,
"generic-name": guess(_dataTypes.genericName),
"family-name": guess(_dataTypes.familyName),
number: guess(_dataTypes.number),
"line-width": guess(_dataTypes.lineWidth),
"absolute-size": guess(_dataTypes.absoluteSize),
"relative-size": guess(_dataTypes.relativeSize),
shadow: guess(_dataTypes.shadow),
size: guess(_validateFormalSyntax.backgroundSize)
};
let supportedTypes = Object.keys(typeMap);
function splitAtFirst(input, delim) {
let idx = input.indexOf(delim);
if (idx === -1) return [
undefined,
input
];
return [
input.slice(0, idx),
input.slice(idx + 1)
];
}
function coerceValue(types, modifier, options, tailwindConfig) {
if (options.values && modifier in options.values) {
for (let { type } of types !== null && types !== void 0 ? types : []){
let result = typeMap[type](modifier, options, {
tailwindConfig
});
if (result === undefined) {
continue;
}
return [
result,
type,
null
];
}
}
if (isArbitraryValue(modifier)) {
let arbitraryValue = modifier.slice(1, -1);
let [explicitType, value] = splitAtFirst(arbitraryValue, ":");
// It could be that this resolves to `url(https` which is not a valid
// identifier. We currently only support "simple" words with dashes or
// underscores. E.g.: family-name
if (!/^[\w-_]+$/g.test(explicitType)) {
value = arbitraryValue;
} else if (explicitType !== undefined && !supportedTypes.includes(explicitType)) {
return [];
}
if (value.length > 0 && supportedTypes.includes(explicitType)) {
return [
asValue(`[${value}]`, options),
explicitType,
null
];
}
}
let matches = getMatchingTypes(types, modifier, options, tailwindConfig);
// Find first matching type
for (let match of matches){
return match;
}
return [];
}
function* getMatchingTypes(types, rawModifier, options, tailwindConfig) {
let modifiersEnabled = (0, _featureFlagsJs.flagEnabled)(tailwindConfig, "generalizedModifiers");
let [modifier, utilityModifier] = splitUtilityModifier(rawModifier);
let canUseUtilityModifier = modifiersEnabled && options.modifiers != null && (options.modifiers === "any" || typeof options.modifiers === "object" && (utilityModifier && isArbitraryValue(utilityModifier) || utilityModifier in options.modifiers));
if (!canUseUtilityModifier) {
modifier = rawModifier;
utilityModifier = undefined;
}
if (utilityModifier !== undefined && modifier === "") {
modifier = "DEFAULT";
}
// Check the full value first
// TODO: Move to asValue… somehow
if (utilityModifier !== undefined) {
if (typeof options.modifiers === "object") {
var _options_modifiers;
var _options_modifiers_utilityModifier;
let configValue = (_options_modifiers_utilityModifier = (_options_modifiers = options.modifiers) === null || _options_modifiers === void 0 ? void 0 : _options_modifiers[utilityModifier]) !== null && _options_modifiers_utilityModifier !== void 0 ? _options_modifiers_utilityModifier : null;
if (configValue !== null) {
utilityModifier = configValue;
} else if (isArbitraryValue(utilityModifier)) {
utilityModifier = utilityModifier.slice(1, -1);
}
}
}
for (let { type } of types !== null && types !== void 0 ? types : []){
let result = typeMap[type](modifier, options, {
tailwindConfig
});
if (result === undefined) {
continue;
}
yield [
result,
type,
utilityModifier !== null && utilityModifier !== void 0 ? utilityModifier : null
];
}
}

View File

@@ -0,0 +1,63 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $RangeError = GetIntrinsic('%RangeError%');
var $TypeError = GetIntrinsic('%TypeError%');
var callBound = require('call-bind/callBound');
// node 0.10 doesn't have a prototype method
var $byteOffset = callBound('TypedArray.prototype.byteOffset', true) || function (x) { return x.byteOffset; };
var ToIndex = require('./ToIndex');
var isTypedArray = require('is-typed-array');
var typedArrayLength = require('typed-array-length');
var whichTypedArray = require('which-typed-array');
var table60 = {
__proto__: null,
$Int8Array: 1,
$Uint8Array: 1,
$Uint8ClampedArray: 1,
$Int16Array: 2,
$Uint16Array: 2,
$Int32Array: 4,
$Uint32Array: 4,
$BigInt64Array: 8,
$BigUint64Array: 8,
$Float32Array: 4,
$Float64Array: 8
};
// https://262.ecma-international.org/12.0/#sec-validateatomicaccess
module.exports = function ValidateAtomicAccess(typedArray, requestIndex) {
if (!isTypedArray(typedArray)) {
throw new $TypeError('Assertion failed: `typedArray` must be a TypedArray'); // step 1
}
var length = typedArrayLength(typedArray); // step 2
var accessIndex = ToIndex(requestIndex); // step 3
/*
// this assertion can never be reached
if (!(accessIndex >= 0)) {
throw new $TypeError('Assertion failed: accessIndex >= 0'); // step 4
}
*/
if (accessIndex >= length) {
throw new $RangeError('index out of range'); // step 5
}
var arrayTypeName = whichTypedArray(typedArray); // step 6
var elementSize = table60['$' + arrayTypeName]; // step 7
var offset = $byteOffset(typedArray); // step 8
return (accessIndex * elementSize) + offset; // step 9
};

View File

@@ -0,0 +1,23 @@
import { ReadableStreamLike } from '../types';
import { isFunction } from './isFunction';
export async function* readableStreamLikeToAsyncGenerator<T>(readableStream: ReadableStreamLike<T>): AsyncGenerator<T> {
const reader = readableStream.getReader();
try {
while (true) {
const { value, done } = await reader.read();
if (done) {
return;
}
yield value!;
}
} finally {
reader.releaseLock();
}
}
export function isReadableStreamLike<T>(obj: any): obj is ReadableStreamLike<T> {
// We don't want to use instanceof checks because they would return
// false for instances from another Realm, like an <iframe>.
return isFunction(obj?.getReader);
}

View File

@@ -0,0 +1,7 @@
"use strict";
var indexOf = require("./e-index-of");
module.exports = function (searchElement /*, position*/) {
return indexOf.call(this, searchElement, arguments[1]) > -1;
};

View File

@@ -0,0 +1,152 @@
# p-cancelable
> Create a promise that can be canceled
Useful for animation, loading resources, long-running async computations, async iteration, etc.
*If you target [Node.js 15](https://medium.com/@nodejs/node-js-v15-0-0-is-here-deb00750f278) or later, this package is [less useful](https://github.com/sindresorhus/p-cancelable/issues/27) and you should probably use [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) instead.*
## Install
```
$ npm install p-cancelable
```
## Usage
```js
import PCancelable from 'p-cancelable';
const cancelablePromise = new PCancelable((resolve, reject, onCancel) => {
const worker = new SomeLongRunningOperation();
onCancel(() => {
worker.close();
});
worker.on('finish', resolve);
worker.on('error', reject);
});
// Cancel the operation after 10 seconds
setTimeout(() => {
cancelablePromise.cancel('Unicorn has changed its color');
}, 10000);
try {
console.log('Operation finished successfully:', await cancelablePromise);
} catch (error) {
if (cancelablePromise.isCanceled) {
// Handle the cancelation here
console.log('Operation was canceled');
return;
}
throw error;
}
```
## API
### new PCancelable(executor)
Same as the [`Promise` constructor](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise), but with an appended `onCancel` parameter in `executor`.
Cancelling will reject the promise with `CancelError`. To avoid that, set `onCancel.shouldReject` to `false`.
```js
import PCancelable from 'p-cancelable';
const cancelablePromise = new PCancelable((resolve, reject, onCancel) => {
const job = new Job();
onCancel.shouldReject = false;
onCancel(() => {
job.stop();
});
job.on('finish', resolve);
});
cancelablePromise.cancel(); // Doesn't throw an error
```
`PCancelable` is a subclass of `Promise`.
#### onCanceled(fn)
Type: `Function`
Accepts a function that is called when the promise is canceled.
You're not required to call this function. You can call this function multiple times to add multiple cancel handlers.
### PCancelable#cancel(reason?)
Type: `Function`
Cancel the promise and optionally provide a reason.
The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing.
### PCancelable#isCanceled
Type: `boolean`
Whether the promise is canceled.
### PCancelable.fn(fn)
Convenience method to make your promise-returning or async function cancelable.
The function you specify will have `onCancel` appended to its parameters.
```js
import PCancelable from 'p-cancelable';
const fn = PCancelable.fn((input, onCancel) => {
const job = new Job();
onCancel(() => {
job.cleanup();
});
return job.start(); //=> Promise
});
const cancelablePromise = fn('input'); //=> PCancelable
// …
cancelablePromise.cancel();
```
### CancelError
Type: `Error`
Rejection reason when `.cancel()` is called.
It includes a `.isCanceled` property for convenience.
## FAQ
### Cancelable vs. Cancellable
[In American English, the verb cancel is usually inflected canceled and canceling—with one l.](http://grammarist.com/spelling/cancel/) Both a [browser API](https://developer.mozilla.org/en-US/docs/Web/API/Event/cancelable) and the [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises) use this spelling.
### What about the official [Cancelable Promises proposal](https://github.com/tc39/proposal-cancelable-promises)?
~~It's still an early draft and I don't really like its current direction. It complicates everything and will require deep changes in the ecosystem to adapt to it. And the way you have to use cancel tokens is verbose and convoluted. I much prefer the more pragmatic and less invasive approach in this module.~~ The proposal was withdrawn.
## p-cancelable for enterprise
Available as part of the Tidelift Subscription.
The maintainers of p-cancelable and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-p-cancelable?utm_source=npm-p-cancelable&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## Related
- [p-progress](https://github.com/sindresorhus/p-progress) - Create a promise that reports progress
- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise that defers execution until `.then()` or `.catch()` is called
- [More…](https://github.com/sindresorhus/promise-fun)

View File

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

View File

@@ -0,0 +1,41 @@
{
"name": "lowercase-keys",
"version": "3.0.0",
"description": "Lowercase the keys of an object",
"license": "MIT",
"repository": "sindresorhus/lowercase-keys",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"object",
"assign",
"extend",
"properties",
"lowercase",
"lower-case",
"case",
"keys",
"key"
],
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.18.0",
"xo": "^0.45.0"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"distinctUntilChanged.js","sourceRoot":"","sources":["../../../../src/internal/operators/distinctUntilChanged.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAC5C,qCAAuC;AACvC,2DAAgE;AAuIhE,SAAgB,oBAAoB,CAClC,UAAiD,EACjD,WAA0D;IAA1D,4BAAA,EAAA,cAA+B,mBAA2B;IAK1D,UAAU,GAAG,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,cAAc,CAAC;IAE1C,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI,WAAc,CAAC;QAEnB,IAAI,KAAK,GAAG,IAAI,CAAC;QAEjB,MAAM,CAAC,SAAS,CACd,6CAAwB,CAAC,UAAU,EAAE,UAAC,KAAK;YAEzC,IAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;YAKtC,IAAI,KAAK,IAAI,CAAC,UAAW,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE;gBAMlD,KAAK,GAAG,KAAK,CAAC;gBACd,WAAW,GAAG,UAAU,CAAC;gBAGzB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAvCD,oDAuCC;AAED,SAAS,cAAc,CAAC,CAAM,EAAE,CAAM;IACpC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC"}

View File

@@ -0,0 +1,2 @@
module.exports = require('./dist/types').Pair
require('./dist/legacy-exports').warnFileDeprecation(__filename)

View File

@@ -0,0 +1,19 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
// https://262.ecma-international.org/11.0/#sec-utf16decodesurrogatepair
module.exports = function UTF16DecodeSurrogatePair(lead, trail) {
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
}
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
return $fromCharCode(lead) + $fromCharCode(trail);
};

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

View File

@@ -0,0 +1,117 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for csv2json/src/Processor.ts</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../prettify.css" />
<link rel="stylesheet" href="../../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../../index.html">All files</a> / <a href="index.html">csv2json/src</a> Processor.ts
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>6/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>2/2</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>5/5</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-yes">75x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { Converter } from "./Converter";
import P from "bluebird";
import { JSONResult } from "./lineToJson";
import { CSVParseParam } from "./Parameters";
import { ParseRuntime } from "./ParseRuntime";
&nbsp;
export abstract class Processor {
protected params: CSVParseParam;
protected runtime: ParseRuntime;
constructor(protected converter: Converter) {
this.params = converter.parseParam;
this.runtime = converter.parseRuntime;
}
abstract process(chunk: Buffer,finalChunk?:boolean): P&lt;ProcessLineResult[]&gt;
}
export type ProcessLineResult = string | string[] | JSONResult;
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Fri May 11 2018 21:20:20 GMT+0100 (IST)
</div>
</div>
<script src="../../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../../sorter.js"></script>
<script src="../../block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: ()=>_default
});
function isRoot(node) {
return node.type === "root";
}
function isAtLayer(node) {
return node.type === "atrule" && node.name === "layer";
}
function _default(_context) {
return (root, result)=>{
let found = false;
root.walkAtRules("tailwind", (node)=>{
if (found) return false;
if (node.parent && !(isRoot(node.parent) || isAtLayer(node.parent))) {
found = true;
node.warn(result, [
"Nested @tailwind rules were detected, but are not supported.",
"Consider using a prefix to scope Tailwind's classes: https://tailwindcss.com/docs/configuration#prefix",
"Alternatively, use the important selector strategy: https://tailwindcss.com/docs/configuration#selector-strategy"
].join("\n"));
return false;
}
});
root.walkRules((rule)=>{
if (found) return false;
rule.walkRules((nestedRule)=>{
found = true;
nestedRule.warn(result, [
"Nested CSS was detected, but CSS nesting has not been configured correctly.",
"Please enable a CSS nesting plugin *before* Tailwind in your configuration.",
"See how here: https://tailwindcss.com/docs/using-with-preprocessors#nesting"
].join("\n"));
return false;
});
});
};
}

View File

@@ -0,0 +1,59 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fsScandir = require("@nodelib/fs.scandir");
const common = require("./common");
const reader_1 = require("./reader");
class SyncReader extends reader_1.default {
constructor() {
super(...arguments);
this._scandir = fsScandir.scandirSync;
this._storage = [];
this._queue = new Set();
}
read() {
this._pushToQueue(this._root, this._settings.basePath);
this._handleQueue();
return this._storage;
}
_pushToQueue(directory, base) {
this._queue.add({ directory, base });
}
_handleQueue() {
for (const item of this._queue.values()) {
this._handleDirectory(item.directory, item.base);
}
}
_handleDirectory(directory, base) {
try {
const entries = this._scandir(directory, this._settings.fsScandirSettings);
for (const entry of entries) {
this._handleEntry(entry, base);
}
}
catch (error) {
this._handleError(error);
}
}
_handleError(error) {
if (!common.isFatalError(this._settings, error)) {
return;
}
throw error;
}
_handleEntry(entry, base) {
const fullpath = entry.path;
if (base !== undefined) {
entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
}
if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
this._pushToStorage(entry);
}
if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
}
}
_pushToStorage(entry) {
this._storage.push(entry);
}
}
exports.default = SyncReader;

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').groupBy;

View File

@@ -0,0 +1,143 @@
/*!
* parse-github-url <https://github.com/jonschlinkert/parse-github-url>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var url = require('url');
var cache = {};
module.exports = function parseGithubUrl(str) {
return cache[str] || (cache[str] = parse(str));
};
function parse(str) {
if (typeof str !== 'string' || !str.length) {
return null;
}
if (str.indexOf('git@gist') !== -1 || str.indexOf('//gist') !== -1) {
return null;
}
// parse the URL
var obj = url.parse(str);
if (typeof obj.path !== 'string' || !obj.path.length || typeof obj.pathname !== 'string' || !obj.pathname.length) {
return null;
}
if (!obj.host && /^git@/.test(str) === true) {
// return the correct host for git@ URLs
obj.host = url.parse('http://' + str).host;
}
obj.path = trimSlash(obj.path);
obj.pathname = trimSlash(obj.pathname);
obj.filepath = null;
if (obj.path.indexOf('repos') === 0) {
obj.path = obj.path.slice(6);
}
var seg = obj.path.split('/').filter(Boolean);
var hasBlob = seg[2] === 'blob';
if (hasBlob && !isChecksum(seg[3])) {
obj.branch = seg[3];
if (seg.length > 4) {
obj.filepath = seg.slice(4).join('/');
}
}
var blob = str.indexOf('blob');
if (blob !== -1) {
obj.blob = str.slice(blob + 5);
}
var tree = str.indexOf('tree');
if (tree !== -1) {
var idx = tree + 5;
var branch = str.slice(idx);
var slash = branch.indexOf('/');
if (slash !== -1) {
branch = branch.slice(0, slash);
}
obj.branch = branch;
}
obj.owner = owner(seg[0]);
obj.name = name(seg[1]);
if (seg.length > 1 && obj.owner && obj.name) {
obj.repo = obj.owner + '/' + obj.name;
} else {
var href = obj.href.split(':');
if (href.length === 2 && obj.href.indexOf('//') === -1) {
obj.repo = obj.repo || href[href.length - 1];
var repoSegments = obj.repo.split('/');
obj.owner = repoSegments[0];
obj.name = repoSegments[1];
} else {
var match = obj.href.match(/\/([^\/]*)$/);
obj.owner = match ? match[1] : null;
obj.repo = null;
}
if (obj.repo && (!obj.owner || !obj.name)) {
var segs = obj.repo.split('/');
if (segs.length === 2) {
obj.owner = segs[0];
obj.name = segs[1];
}
}
}
if (!obj.branch) {
obj.branch = seg[2] || getBranch(obj.path, obj);
if (seg.length > 3) {
obj.filepath = seg.slice(3).join('/');
}
}
obj.host = obj.host || 'github.com';
obj.owner = obj.owner || null;
obj.name = obj.name || null;
obj.repository = obj.repo;
return obj;
}
function isChecksum(str) {
return /^[a-f0-9]{40}$/i.test(str);
}
function getBranch(str, obj) {
var segs = str.split('#');
var branch;
if (segs.length > 1) {
branch = segs[segs.length - 1];
}
if (!branch && obj.hash && obj.hash.charAt(0) === '#') {
branch = obj.hash.slice(1);
}
return branch || 'master';
}
function trimSlash(path) {
return path.charAt(0) === '/' ? path.slice(1) : path;
}
function name(str) {
return str ? str.replace(/^\W+|\.git$/g, '') : null;
}
function owner(str) {
if (!str) return null;
var idx = str.indexOf(':');
if (idx > -1) {
return str.slice(idx + 1);
}
return str;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"dematerialize.js","sourceRoot":"","sources":["../../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":";;;AAAA,gDAAsD;AAEtD,qCAAuC;AACvC,2DAAgE;AAkDhE,SAAgB,aAAa;IAC3B,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,MAAM,CAAC,SAAS,CAAC,6CAAwB,CAAC,UAAU,EAAE,UAAC,YAAY,IAAK,OAAA,kCAAmB,CAAC,YAAY,EAAE,UAAU,CAAC,EAA7C,CAA6C,CAAC,CAAC,CAAC;IAC1H,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,sCAIC"}

View File

@@ -0,0 +1,62 @@
import { YError } from './yerror.js';
import { parseCommand } from './parse-command.js';
const positionName = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth'];
export function argsert(arg1, arg2, arg3) {
function parseArgs() {
return typeof arg1 === 'object'
? [{ demanded: [], optional: [] }, arg1, arg2]
: [
parseCommand(`cmd ${arg1}`),
arg2,
arg3,
];
}
try {
let position = 0;
const [parsed, callerArguments, _length] = parseArgs();
const args = [].slice.call(callerArguments);
while (args.length && args[args.length - 1] === undefined)
args.pop();
const length = _length || args.length;
if (length < parsed.demanded.length) {
throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`);
}
const totalCommands = parsed.demanded.length + parsed.optional.length;
if (length > totalCommands) {
throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`);
}
parsed.demanded.forEach(demanded => {
const arg = args.shift();
const observedType = guessType(arg);
const matchingTypes = demanded.cmd.filter(type => type === observedType || type === '*');
if (matchingTypes.length === 0)
argumentTypeError(observedType, demanded.cmd, position);
position += 1;
});
parsed.optional.forEach(optional => {
if (args.length === 0)
return;
const arg = args.shift();
const observedType = guessType(arg);
const matchingTypes = optional.cmd.filter(type => type === observedType || type === '*');
if (matchingTypes.length === 0)
argumentTypeError(observedType, optional.cmd, position);
position += 1;
});
}
catch (err) {
console.warn(err.stack);
}
}
function guessType(arg) {
if (Array.isArray(arg)) {
return 'array';
}
else if (arg === null) {
return 'null';
}
return typeof arg;
}
function argumentTypeError(observedType, allowedTypes, position) {
throw new YError(`Invalid ${positionName[position] || 'manyith'} argument. Expected ${allowedTypes.join(' or ')} but received ${observedType}.`);
}

View File

@@ -0,0 +1,2 @@
export declare const WHITE_SPACE_REGEX: RegExp;
//# sourceMappingURL=regex.generated.d.ts.map

View File

@@ -0,0 +1,121 @@
'use strict'
const hexify = char => {
const h = char.charCodeAt(0).toString(16).toUpperCase()
return '0x' + (h.length % 2 ? '0' : '') + h
}
const parseError = (e, txt, context) => {
if (!txt) {
return {
message: e.message + ' while parsing empty string',
position: 0,
}
}
const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i)
const errIdx = badToken ? +badToken[2]
: e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1
: null
const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${
JSON.stringify(badToken[1])
} (${hexify(badToken[1])})`)
: e.message
if (errIdx !== null && errIdx !== undefined) {
const start = errIdx <= context ? 0
: errIdx - context
const end = errIdx + context >= txt.length ? txt.length
: errIdx + context
const slice = (start === 0 ? '' : '...') +
txt.slice(start, end) +
(end === txt.length ? '' : '...')
const near = txt === slice ? '' : 'near '
return {
message: msg + ` while parsing ${near}${JSON.stringify(slice)}`,
position: errIdx,
}
} else {
return {
message: msg + ` while parsing '${txt.slice(0, context * 2)}'`,
position: 0,
}
}
}
class JSONParseError extends SyntaxError {
constructor (er, txt, context, caller) {
context = context || 20
const metadata = parseError(er, txt, context)
super(metadata.message)
Object.assign(this, metadata)
this.code = 'EJSONPARSE'
this.systemError = er
Error.captureStackTrace(this, caller || this.constructor)
}
get name () { return this.constructor.name }
set name (n) {}
get [Symbol.toStringTag] () { return this.constructor.name }
}
const kIndent = Symbol.for('indent')
const kNewline = Symbol.for('newline')
// only respect indentation if we got a line break, otherwise squash it
// things other than objects and arrays aren't indented, so ignore those
// Important: in both of these regexps, the $1 capture group is the newline
// or undefined, and the $2 capture group is the indent, or undefined.
const formatRE = /^\s*[{\[]((?:\r?\n)+)([\s\t]*)/
const emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/
const parseJson = (txt, reviver, context) => {
const parseText = stripBOM(txt)
context = context || 20
try {
// get the indentation so that we can save it back nicely
// if the file starts with {" then we have an indent of '', ie, none
// otherwise, pick the indentation of the next line after the first \n
// If the pattern doesn't match, then it means no indentation.
// JSON.stringify ignores symbols, so this is reasonably safe.
// if the string is '{}' or '[]', then use the default 2-space indent.
const [, newline = '\n', indent = ' '] = parseText.match(emptyRE) ||
parseText.match(formatRE) ||
[, '', '']
const result = JSON.parse(parseText, reviver)
if (result && typeof result === 'object') {
result[kNewline] = newline
result[kIndent] = indent
}
return result
} catch (e) {
if (typeof txt !== 'string' && !Buffer.isBuffer(txt)) {
const isEmptyArray = Array.isArray(txt) && txt.length === 0
throw Object.assign(new TypeError(
`Cannot parse ${isEmptyArray ? 'an empty array' : String(txt)}`
), {
code: 'EJSONPARSE',
systemError: e,
})
}
throw new JSONParseError(e, parseText, context, parseJson)
}
}
// Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
// because the buffer-to-string conversion in `fs.readFileSync()`
// translates it to FEFF, the UTF-16 BOM.
const stripBOM = txt => String(txt).replace(/^\uFEFF/, '')
module.exports = parseJson
parseJson.JSONParseError = JSONParseError
parseJson.noExceptions = (txt, reviver) => {
try {
return JSON.parse(stripBOM(txt), reviver)
} catch (e) {}
}

View File

@@ -0,0 +1,17 @@
"use strict";
module.exports = {
"#": require("./#"),
"EPSILON": require("./epsilon"),
"isFinite": require("./is-finite"),
"isInteger": require("./is-integer"),
"isNaN": require("./is-nan"),
"isNatural": require("./is-natural"),
"isNumber": require("./is-number"),
"isSafeInteger": require("./is-safe-integer"),
"MAX_SAFE_INTEGER": require("./max-safe-integer"),
"MIN_SAFE_INTEGER": require("./min-safe-integer"),
"toInteger": require("./to-integer"),
"toPosInteger": require("./to-pos-integer"),
"toUint32": require("./to-uint32")
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"AnimationFrameAction.js","sourceRoot":"","sources":["../../../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE;IAA6C,wCAAc;IACzD,8BAAsB,SAAkC,EAAY,IAAmD;QAAvH,YACE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAFqB,eAAS,GAAT,SAAS,CAAyB;QAAY,UAAI,GAAJ,IAAI,CAA+C;;IAEvH,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAE9F,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,UAAU,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,cAAM,OAAA,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,EAA1B,CAA0B,CAAC,CAAC,CAAC;IACzI,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAgB,EAAE,KAAiB;;QAAjB,sBAAA,EAAA,SAAiB;QAI9F,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE;YAC9C,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAIO,IAAA,OAAO,GAAK,SAAS,QAAd,CAAe;QAC9B,IAAI,EAAE,IAAI,IAAI,IAAI,CAAA,MAAA,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,0CAAE,EAAE,MAAK,EAAE,EAAE;YACxD,sBAAsB,CAAC,oBAAoB,CAAC,EAAY,CAAC,CAAC;YAC1D,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC;SAClC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,2BAAC;AAAD,CAAC,AApCD,CAA6C,WAAW,GAoCvD"}

View File

@@ -0,0 +1,12 @@
{
"type": "module",
"main": "index.cjs",
"module": "index.js",
"react-native": {
"./index.js": "./index.native.js"
},
"browser": {
"./index.js": "./index.browser.js",
"./index.cjs": "./index.browser.cjs"
}
}

View File

@@ -0,0 +1,141 @@
var util = require('util'),
Match = require ('../match');
/**
* This is a superclass for the individual detectors for
* each of the detectable members of the ISO 2022 family
* of encodings.
*/
function ISO_2022() {}
ISO_2022.prototype.match = function(det) {
/**
* Matching function shared among the 2022 detectors JP, CN and KR
* Counts up the number of legal an unrecognized escape sequences in
* the sample of text, and computes a score based on the total number &
* the proportion that fit the encoding.
*
*
* @param text the byte buffer containing text to analyse
* @param textLen the size of the text in the byte.
* @param escapeSequences the byte escape sequences to test for.
* @return match quality, in the range of 0-100.
*/
var i, j;
var escN;
var hits = 0;
var misses = 0;
var shifts = 0;
var quality;
// TODO: refactor me
var text = det.fInputBytes;
var textLen = det.fInputLen;
scanInput:
for (i = 0; i < textLen; i++) {
if (text[i] == 0x1b) {
checkEscapes:
for (escN = 0; escN < this.escapeSequences.length; escN++) {
var seq = this.escapeSequences[escN];
if ((textLen - i) < seq.length)
continue checkEscapes;
for (j = 1; j < seq.length; j++)
if (seq[j] != text[i + j])
continue checkEscapes;
hits++;
i += seq.length - 1;
continue scanInput;
}
misses++;
}
// Shift in/out
if (text[i] == 0x0e || text[i] == 0x0f)
shifts++;
}
if (hits == 0)
return null;
//
// Initial quality is based on relative proportion of recongized vs.
// unrecognized escape sequences.
// All good: quality = 100;
// half or less good: quality = 0;
// linear inbetween.
quality = (100 * hits - 100 * misses) / (hits + misses);
// Back off quality if there were too few escape sequences seen.
// Include shifts in this computation, so that KR does not get penalized
// for having only a single Escape sequence, but many shifts.
if (hits + shifts < 5)
quality -= (5 - (hits + shifts)) * 10;
return quality <= 0 ? null : new Match(det, this, quality);
};
module.exports.ISO_2022_JP = function() {
this.name = function() {
return 'ISO-2022-JP';
};
this.escapeSequences = [
[ 0x1b, 0x24, 0x28, 0x43 ], // KS X 1001:1992
[ 0x1b, 0x24, 0x28, 0x44 ], // JIS X 212-1990
[ 0x1b, 0x24, 0x40 ], // JIS C 6226-1978
[ 0x1b, 0x24, 0x41 ], // GB 2312-80
[ 0x1b, 0x24, 0x42 ], // JIS X 208-1983
[ 0x1b, 0x26, 0x40 ], // JIS X 208 1990, 1997
[ 0x1b, 0x28, 0x42 ], // ASCII
[ 0x1b, 0x28, 0x48 ], // JIS-Roman
[ 0x1b, 0x28, 0x49 ], // Half-width katakana
[ 0x1b, 0x28, 0x4a ], // JIS-Roman
[ 0x1b, 0x2e, 0x41 ], // ISO 8859-1
[ 0x1b, 0x2e, 0x46 ] // ISO 8859-7
];
};
util.inherits(module.exports.ISO_2022_JP, ISO_2022);
module.exports.ISO_2022_KR = function() {
this.name = function() {
return 'ISO-2022-KR';
};
this.escapeSequences = [
[ 0x1b, 0x24, 0x29, 0x43 ]
];
};
util.inherits(module.exports.ISO_2022_KR, ISO_2022);
module.exports.ISO_2022_CN = function() {
this.name = function() {
return 'ISO-2022-CN';
};
this.escapeSequences = [
[ 0x1b, 0x24, 0x29, 0x41 ], // GB 2312-80
[ 0x1b, 0x24, 0x29, 0x47 ], // CNS 11643-1992 Plane 1
[ 0x1b, 0x24, 0x2A, 0x48 ], // CNS 11643-1992 Plane 2
[ 0x1b, 0x24, 0x29, 0x45 ], // ISO-IR-165
[ 0x1b, 0x24, 0x2B, 0x49 ], // CNS 11643-1992 Plane 3
[ 0x1b, 0x24, 0x2B, 0x4A ], // CNS 11643-1992 Plane 4
[ 0x1b, 0x24, 0x2B, 0x4B ], // CNS 11643-1992 Plane 5
[ 0x1b, 0x24, 0x2B, 0x4C ], // CNS 11643-1992 Plane 6
[ 0x1b, 0x24, 0x2B, 0x4D ], // CNS 11643-1992 Plane 7
[ 0x1b, 0x4e ], // SS2
[ 0x1b, 0x4f ] // SS3
];
};
util.inherits(module.exports.ISO_2022_CN, ISO_2022);

View File

@@ -0,0 +1,15 @@
export const timeoutProvider = {
setTimeout(handler, timeout, ...args) {
const { delegate } = timeoutProvider;
if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
return delegate.setTimeout(handler, timeout, ...args);
}
return setTimeout(handler, timeout, ...args);
},
clearTimeout(handle) {
const { delegate } = timeoutProvider;
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
},
delegate: undefined,
};
//# sourceMappingURL=timeoutProvider.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeMap = void 0;
var map_1 = require("./map");
var innerFrom_1 = require("../observable/innerFrom");
var lift_1 = require("../util/lift");
var mergeInternals_1 = require("./mergeInternals");
var isFunction_1 = require("../util/isFunction");
function mergeMap(project, resultSelector, concurrent) {
if (concurrent === void 0) { concurrent = Infinity; }
if (isFunction_1.isFunction(resultSelector)) {
return mergeMap(function (a, i) { return map_1.map(function (b, ii) { return resultSelector(a, b, i, ii); })(innerFrom_1.innerFrom(project(a, i))); }, concurrent);
}
else if (typeof resultSelector === 'number') {
concurrent = resultSelector;
}
return lift_1.operate(function (source, subscriber) { return mergeInternals_1.mergeInternals(source, subscriber, project, concurrent); });
}
exports.mergeMap = mergeMap;
//# sourceMappingURL=mergeMap.js.map

View File

@@ -0,0 +1,146 @@
import { options, Fragment } from 'preact';
/**
* Get human readable name of the component/dom node
* @param {import('./internal').VNode} vnode
* @param {import('./internal').VNode} vnode
* @returns {string}
*/
export function getDisplayName(vnode) {
if (vnode.type === Fragment) {
return 'Fragment';
} else if (typeof vnode.type == 'function') {
return vnode.type.displayName || vnode.type.name;
} else if (typeof vnode.type == 'string') {
return vnode.type;
}
return '#text';
}
/**
* Used to keep track of the currently rendered `vnode` and print it
* in debug messages.
*/
let renderStack = [];
/**
* Keep track of the current owners. An owner describes a component
* which was responsible to render a specific `vnode`. This exclude
* children that are passed via `props.children`, because they belong
* to the parent owner.
*
* ```jsx
* const Foo = props => <div>{props.children}</div> // div's owner is Foo
* const Bar = props => {
* return (
* <Foo><span /></Foo> // Foo's owner is Bar, span's owner is Bar
* )
* }
* ```
*
* Note: A `vnode` may be hoisted to the root scope due to compiler
* optimiztions. In these cases the `_owner` will be different.
*/
let ownerStack = [];
/**
* Get the currently rendered `vnode`
* @returns {import('./internal').VNode | null}
*/
export function getCurrentVNode() {
return renderStack.length > 0 ? renderStack[renderStack.length - 1] : null;
}
/**
* If the user doesn't have `@babel/plugin-transform-react-jsx-source`
* somewhere in his tool chain we can't print the filename and source
* location of a component. In that case we just omit that, but we'll
* print a helpful message to the console, notifying the user of it.
*/
let hasBabelPlugin = false;
/**
* Check if a `vnode` is a possible owner.
* @param {import('./internal').VNode} vnode
*/
function isPossibleOwner(vnode) {
return typeof vnode.type == 'function' && vnode.type != Fragment;
}
/**
* Return the component stack that was captured up to this point.
* @param {import('./internal').VNode} vnode
* @returns {string}
*/
export function getOwnerStack(vnode) {
const stack = [vnode];
let next = vnode;
while (next._owner != null) {
stack.push(next._owner);
next = next._owner;
}
return stack.reduce((acc, owner) => {
acc += ` in ${getDisplayName(owner)}`;
const source = owner.__source;
if (source) {
acc += ` (at ${source.fileName}:${source.lineNumber})`;
} else if (!hasBabelPlugin) {
hasBabelPlugin = true;
console.warn(
'Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.'
);
}
return (acc += '\n');
}, '');
}
/**
* Setup code to capture the component trace while rendering. Note that
* we cannot simply traverse `vnode._parent` upwards, because we have some
* debug messages for `this.setState` where the `vnode` is `undefined`.
*/
export function setupComponentStack() {
let oldDiff = options._diff;
let oldDiffed = options.diffed;
let oldRoot = options._root;
let oldVNode = options.vnode;
let oldRender = options._render;
options.diffed = vnode => {
if (isPossibleOwner(vnode)) {
ownerStack.pop();
}
renderStack.pop();
if (oldDiffed) oldDiffed(vnode);
};
options._diff = vnode => {
if (isPossibleOwner(vnode)) {
renderStack.push(vnode);
}
if (oldDiff) oldDiff(vnode);
};
options._root = (vnode, parent) => {
ownerStack = [];
if (oldRoot) oldRoot(vnode, parent);
};
options.vnode = vnode => {
vnode._owner =
ownerStack.length > 0 ? ownerStack[ownerStack.length - 1] : null;
if (oldVNode) oldVNode(vnode);
};
options._render = vnode => {
if (isPossibleOwner(vnode)) {
ownerStack.push(vnode);
}
if (oldRender) oldRender(vnode);
};
}

View File

@@ -0,0 +1,8 @@
"use strict";
var floorMonth = require("./floor-month");
module.exports = function () {
floorMonth.call(this).setMonth(0);
return this;
};

View File

@@ -0,0 +1,11 @@
import { operate } from '../util/lift';
import { mergeInternals } from './mergeInternals';
export function mergeScan(accumulator, seed, concurrent = Infinity) {
return operate((source, subscriber) => {
let state = seed;
return mergeInternals(source, subscriber, (value, index) => accumulator(state, value, index), concurrent, (value) => {
state = value;
}, false, undefined, () => (state = null));
});
}
//# sourceMappingURL=mergeScan.js.map

View File

@@ -0,0 +1,8 @@
"use strict";
var isError = require("./is-error");
module.exports = function (value) {
if (!isError(value)) throw new TypeError(value + " is not an Error object");
return value;
};

View File

@@ -0,0 +1,5 @@
import { reduce } from './reduce';
export function count(predicate) {
return reduce((total, value, i) => (!predicate || predicate(value, i) ? total + 1 : total), 0);
}
//# sourceMappingURL=count.js.map

View File

@@ -0,0 +1,75 @@
import { FormatNumericToString } from './FormatNumericToString';
import { SameValue } from '../262';
import { ComputeExponent } from './ComputeExponent';
import formatToParts from './format_to_parts';
/**
* https://tc39.es/ecma402/#sec-formatnumberstring
*/
export function PartitionNumberPattern(numberFormat, x, _a) {
var _b;
var getInternalSlots = _a.getInternalSlots;
var internalSlots = getInternalSlots(numberFormat);
var pl = internalSlots.pl, dataLocaleData = internalSlots.dataLocaleData, numberingSystem = internalSlots.numberingSystem;
var symbols = dataLocaleData.numbers.symbols[numberingSystem] ||
dataLocaleData.numbers.symbols[dataLocaleData.numbers.nu[0]];
var magnitude = 0;
var exponent = 0;
var n;
if (isNaN(x)) {
n = symbols.nan;
}
else if (!isFinite(x)) {
n = symbols.infinity;
}
else {
if (internalSlots.style === 'percent') {
x *= 100;
}
;
_b = ComputeExponent(numberFormat, x, {
getInternalSlots: getInternalSlots,
}), exponent = _b[0], magnitude = _b[1];
// Preserve more precision by doing multiplication when exponent is negative.
x = exponent < 0 ? x * Math.pow(10, -exponent) : x / Math.pow(10, exponent);
var formatNumberResult = FormatNumericToString(internalSlots, x);
n = formatNumberResult.formattedString;
x = formatNumberResult.roundedNumber;
}
// Based on https://tc39.es/ecma402/#sec-getnumberformatpattern
// We need to do this before `x` is rounded.
var sign;
var signDisplay = internalSlots.signDisplay;
switch (signDisplay) {
case 'never':
sign = 0;
break;
case 'auto':
if (SameValue(x, 0) || x > 0 || isNaN(x)) {
sign = 0;
}
else {
sign = -1;
}
break;
case 'always':
if (SameValue(x, 0) || x > 0 || isNaN(x)) {
sign = 1;
}
else {
sign = -1;
}
break;
default:
// x === 0 -> x is 0 or x is -0
if (x === 0 || isNaN(x)) {
sign = 0;
}
else if (x > 0) {
sign = 1;
}
else {
sign = -1;
}
}
return formatToParts({ roundedNumber: x, formattedString: n, exponent: exponent, magnitude: magnitude, sign: sign }, internalSlots.dataLocaleData, pl, internalSlots);
}

View File

@@ -0,0 +1,10 @@
"use strict";
if (!require("./is-implemented")()) {
Object.defineProperty(Object, "entries", {
value: require("./shim"),
configurable: true,
enumerable: false,
writable: true
});
}

View File

@@ -0,0 +1,36 @@
import { h } from 'preact';
import Tabular from '../tabular';
import { BaseComponent, BaseProps } from './base';
import { Status } from '../types';
import Pipeline from '../pipeline/pipeline';
import Header from '../header';
import { Config } from '../config';
interface ContainerProps extends BaseProps {
config: Config;
pipeline: Pipeline<Tabular>;
header?: Header;
width: string;
height: string;
}
interface ContainerState {
status: Status;
header?: Header;
data?: Tabular;
}
export declare class Container extends BaseComponent<
ContainerProps,
ContainerState
> {
private readonly configContext;
private processPipelineFn;
constructor(props: any, context: any);
private processPipeline;
componentDidMount(): Promise<void>;
componentWillUnmount(): void;
componentDidUpdate(
_: Readonly<ContainerProps>,
previousState: Readonly<ContainerState>,
): void;
render(): h.JSX.Element;
}
export {};

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: ()=>_default
});
function createPlugin(plugin, config) {
return {
handler: plugin,
config
};
}
createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
const optionsFunction = function(options) {
return {
__options: options,
handler: pluginFunction(options),
config: configFunction(options)
};
};
optionsFunction.__isOptionsFunction = true;
// Expose plugin dependencies so that `object-hash` returns a different
// value if anything here changes, to ensure a rebuild is triggered.
optionsFunction.__pluginFunction = pluginFunction;
optionsFunction.__configFunction = configFunction;
return optionsFunction;
};
const _default = createPlugin;

View File

@@ -0,0 +1,314 @@
# Tmp
A simple temporary file and directory creator for [node.js.][1]
[![Build Status](https://travis-ci.org/raszi/node-tmp.svg?branch=master)](https://travis-ci.org/raszi/node-tmp)
[![Dependencies](https://david-dm.org/raszi/node-tmp.svg)](https://david-dm.org/raszi/node-tmp)
[![npm version](https://badge.fury.io/js/tmp.svg)](https://badge.fury.io/js/tmp)
[![API documented](https://img.shields.io/badge/API-documented-brightgreen.svg)](https://raszi.github.io/node-tmp/)
[![Known Vulnerabilities](https://snyk.io/test/npm/tmp/badge.svg)](https://snyk.io/test/npm/tmp)
## About
This is a [widely used library][2] to create temporary files and directories
in a [node.js][1] environment.
Tmp offers both an asynchronous and a synchronous API. For all API calls, all
the parameters are optional. There also exists a promisified version of the
API, see (5) under references below.
Tmp uses crypto for determining random file names, or, when using templates,
a six letter random identifier. And just in case that you do not have that much
entropy left on your system, Tmp will fall back to pseudo random numbers.
You can set whether you want to remove the temporary file on process exit or
not, and the destination directory can also be set.
## How to install
```bash
npm install tmp
```
## Usage
Please also check [API docs][4].
### Asynchronous file creation
Simple temporary file creation, the file will be closed and unlinked on process exit.
```javascript
var tmp = require('tmp');
tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) {
if (err) throw err;
console.log('File: ', path);
console.log('Filedescriptor: ', fd);
// If we don't need the file anymore we could manually call the cleanupCallback
// But that is not necessary if we didn't pass the keep option because the library
// will clean after itself.
cleanupCallback();
});
```
### Synchronous file creation
A synchronous version of the above.
```javascript
var tmp = require('tmp');
var tmpobj = tmp.fileSync();
console.log('File: ', tmpobj.name);
console.log('Filedescriptor: ', tmpobj.fd);
// If we don't need the file anymore we could manually call the removeCallback
// But that is not necessary if we didn't pass the keep option because the library
// will clean after itself.
tmpobj.removeCallback();
```
Note that this might throw an exception if either the maximum limit of retries
for creating a temporary name fails, or, in case that you do not have the permission
to write to the directory where the temporary file should be created in.
### Asynchronous directory creation
Simple temporary directory creation, it will be removed on process exit.
If the directory still contains items on process exit, then it won't be removed.
```javascript
var tmp = require('tmp');
tmp.dir(function _tempDirCreated(err, path, cleanupCallback) {
if (err) throw err;
console.log('Dir: ', path);
// Manual cleanup
cleanupCallback();
});
```
If you want to cleanup the directory even when there are entries in it, then
you can pass the `unsafeCleanup` option when creating it.
### Synchronous directory creation
A synchronous version of the above.
```javascript
var tmp = require('tmp');
var tmpobj = tmp.dirSync();
console.log('Dir: ', tmpobj.name);
// Manual cleanup
tmpobj.removeCallback();
```
Note that this might throw an exception if either the maximum limit of retries
for creating a temporary name fails, or, in case that you do not have the permission
to write to the directory where the temporary directory should be created in.
### Asynchronous filename generation
It is possible with this library to generate a unique filename in the specified
directory.
```javascript
var tmp = require('tmp');
tmp.tmpName(function _tempNameGenerated(err, path) {
if (err) throw err;
console.log('Created temporary filename: ', path);
});
```
### Synchronous filename generation
A synchronous version of the above.
```javascript
var tmp = require('tmp');
var name = tmp.tmpNameSync();
console.log('Created temporary filename: ', name);
```
## Advanced usage
### Asynchronous file creation
Creates a file with mode `0644`, prefix will be `prefix-` and postfix will be `.txt`.
```javascript
var tmp = require('tmp');
tmp.file({ mode: 0644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) {
if (err) throw err;
console.log('File: ', path);
console.log('Filedescriptor: ', fd);
});
```
### Synchronous file creation
A synchronous version of the above.
```javascript
var tmp = require('tmp');
var tmpobj = tmp.fileSync({ mode: 0644, prefix: 'prefix-', postfix: '.txt' });
console.log('File: ', tmpobj.name);
console.log('Filedescriptor: ', tmpobj.fd);
```
### Controlling the Descriptor
As a side effect of creating a unique file `tmp` gets a file descriptor that is
returned to the user as the `fd` parameter. The descriptor may be used by the
application and is closed when the `removeCallback` is invoked.
In some use cases the application does not need the descriptor, needs to close it
without removing the file, or needs to remove the file without closing the
descriptor. Two options control how the descriptor is managed:
* `discardDescriptor` - if `true` causes `tmp` to close the descriptor after the file
is created. In this case the `fd` parameter is undefined.
* `detachDescriptor` - if `true` causes `tmp` to return the descriptor in the `fd`
parameter, but it is the application's responsibility to close it when it is no
longer needed.
```javascript
var tmp = require('tmp');
tmp.file({ discardDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) {
if (err) throw err;
// fd will be undefined, allowing application to use fs.createReadStream(path)
// without holding an unused descriptor open.
});
```
```javascript
var tmp = require('tmp');
tmp.file({ detachDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) {
if (err) throw err;
cleanupCallback();
// Application can store data through fd here; the space used will automatically
// be reclaimed by the operating system when the descriptor is closed or program
// terminates.
});
```
### Asynchronous directory creation
Creates a directory with mode `0755`, prefix will be `myTmpDir_`.
```javascript
var tmp = require('tmp');
tmp.dir({ mode: 0750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) {
if (err) throw err;
console.log('Dir: ', path);
});
```
### Synchronous directory creation
Again, a synchronous version of the above.
```javascript
var tmp = require('tmp');
var tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' });
console.log('Dir: ', tmpobj.name);
```
### mkstemp like, asynchronously
Creates a new temporary directory with mode `0700` and filename like `/tmp/tmp-nk2J1u`.
```javascript
var tmp = require('tmp');
tmp.dir({ template: '/tmp/tmp-XXXXXX' }, function _tempDirCreated(err, path) {
if (err) throw err;
console.log('Dir: ', path);
});
```
### mkstemp like, synchronously
This will behave similarly to the asynchronous version.
```javascript
var tmp = require('tmp');
var tmpobj = tmp.dirSync({ template: '/tmp/tmp-XXXXXX' });
console.log('Dir: ', tmpobj.name);
```
### Asynchronous filename generation
The `tmpName()` function accepts the `prefix`, `postfix`, `dir`, etc. parameters also:
```javascript
var tmp = require('tmp');
tmp.tmpName({ template: '/tmp/tmp-XXXXXX' }, function _tempNameGenerated(err, path) {
if (err) throw err;
console.log('Created temporary filename: ', path);
});
```
### Synchronous filename generation
The `tmpNameSync()` function works similarly to `tmpName()`.
```javascript
var tmp = require('tmp');
var tmpname = tmp.tmpNameSync({ template: '/tmp/tmp-XXXXXX' });
console.log('Created temporary filename: ', tmpname);
```
## Graceful cleanup
One may want to cleanup the temporary files even when an uncaught exception
occurs. To enforce this, you can call the `setGracefulCleanup()` method:
```javascript
var tmp = require('tmp');
tmp.setGracefulCleanup();
```
## Options
All options are optional :)
* `mode`: the file mode to create with, it fallbacks to `0600` on file creation and `0700` on directory creation
* `prefix`: the optional prefix, fallbacks to `tmp-` if not provided
* `postfix`: the optional postfix, fallbacks to `.tmp` on file creation
* `template`: [`mkstemp`][3] like filename template, no default
* `dir`: the optional temporary directory, fallbacks to system default (guesses from environment)
* `tries`: how many times should the function try to get a unique filename before giving up, default `3`
* `keep`: signals that the temporary file or directory should not be deleted on exit, default is `false`, means delete
* Please keep in mind that it is recommended in this case to call the provided `cleanupCallback` function manually.
* `unsafeCleanup`: recursively removes the created temporary directory, even when it's not empty. default is `false`
[1]: http://nodejs.org/
[2]: https://www.npmjs.com/browse/depended/tmp
[3]: http://www.kernel.org/doc/man-pages/online/pages/man3/mkstemp.3.html
[4]: https://raszi.github.io/node-tmp/
[5]: https://github.com/benjamingr/tmp-promise

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"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","2":"C K L G"},C:{"1":"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 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB EC FC"},D:{"1":"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 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB"},E:{"1":"K L G rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A B HC zB IC JC KC LC 0B","130":"C qB"},F:{"1":"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 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 PC QC RC SC qB AC TC rB"},G:{"1":"eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC dC"},H:{"2":"oC"},I:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"g 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I wC xC yC zC"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"BD","2":"AD"}},B:1,C:"AbortController & AbortSignal"};

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/mergeWith.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA2ChC,MAAM,UAAU,SAAS,CACvB,GAAG,YAA0C;IAE7C,OAAO,KAAK,CAAC,GAAG,YAAY,CAAC,CAAC;AAChC,CAAC"}

View File

@@ -0,0 +1,238 @@
import { join } from 'node:path';
import test from 'ava';
import sh from 'shelljs';
import sinon from 'sinon';
import Log from '../lib/log.js';
import Spinner from '../lib/spinner.js';
import Config from '../lib/config.js';
import { parseGitUrl } from '../lib/util.js';
import runTasks from '../lib/index.js';
import MyPlugin from './stub/plugin.js';
import ReplacePlugin from './stub/plugin-replace.js';
import ContextPlugin from './stub/plugin-context.js';
import { mkTmpDir } from './util/helpers.js';
import ShellStub from './stub/shell.js';
const noop = Promise.resolve();
const sandbox = sinon.createSandbox();
const testConfig = {
ci: true,
config: false
};
const log = sandbox.createStubInstance(Log);
const spinner = sandbox.createStubInstance(Spinner);
spinner.show.callsFake(({ enabled = true, task }) => (enabled ? task() : noop));
const getContainer = options => {
const config = new Config(Object.assign({}, testConfig, options));
const shell = new ShellStub({ container: { log, config } });
return {
log,
spinner,
config,
shell
};
};
test.before(t => {
t.timeout(60 * 1000);
sh.exec('npm link');
});
test.serial.beforeEach(t => {
const dir = mkTmpDir();
sh.pushd('-q', dir);
t.context = { dir };
});
test.serial.afterEach(() => {
sandbox.resetHistory();
});
test.serial('should instantiate plugins and execute all release-cycle methods', async t => {
const { dir } = t.context;
const pluginDir = mkTmpDir();
sh.pushd('-q', pluginDir);
sh.ShellString(JSON.stringify({ name: 'my-plugin', version: '1.0.0', type: 'module' })).toEnd(
join(pluginDir, 'package.json')
);
sh.exec(`npm link release-it`);
const content = "import { Plugin } from 'release-it'; " + MyPlugin.toString() + '; export default MyPlugin;';
sh.ShellString(content).toEnd(join(pluginDir, 'index.js'));
sh.pushd('-q', dir);
sh.mkdir('-p', 'my/plugin');
sh.pushd('-q', 'my/plugin');
sh.ShellString(content).toEnd(join(dir, 'my', 'plugin', 'index.js'));
sh.pushd('-q', dir);
sh.ShellString(JSON.stringify({ name: 'project', version: '1.0.0', type: 'module' })).toEnd(
join(dir, 'package.json')
);
sh.exec(`npm install ${pluginDir}`);
sh.exec(`npm link release-it`);
const config = {
plugins: {
'my-plugin': {
name: 'foo'
},
'./my/plugin/index.js': [
'named-plugin',
{
name: 'bar'
}
]
}
};
const container = getContainer(config);
const result = await runTasks({}, container);
t.deepEqual(container.log.info.args, [
['my-plugin:foo:init'],
['named-plugin:bar:init'],
['my-plugin:foo:getName'],
['my-plugin:foo:getLatestVersion'],
['my-plugin:foo:getIncrement'],
['my-plugin:foo:getIncrementedVersionCI'],
['named-plugin:bar:getIncrementedVersionCI'],
['my-plugin:foo:beforeBump'],
['named-plugin:bar:beforeBump'],
['my-plugin:foo:bump:1.3.0'],
['named-plugin:bar:bump:1.3.0'],
['my-plugin:foo:beforeRelease'],
['named-plugin:bar:beforeRelease'],
['my-plugin:foo:release'],
['named-plugin:bar:release'],
['my-plugin:foo:afterRelease'],
['named-plugin:bar:afterRelease']
]);
t.deepEqual(result, {
changelog: undefined,
name: 'new-project-name',
latestVersion: '1.2.3',
version: '1.3.0'
});
});
test.serial('should instantiate plugins and execute all release-cycle methods for scoped plugins', async t => {
const { dir } = t.context;
const pluginDir = mkTmpDir();
sh.pushd('-q', pluginDir);
sh.ShellString(JSON.stringify({ name: '@scoped/my-plugin', version: '1.0.0', type: 'module' })).toEnd(
join(pluginDir, 'package.json')
);
sh.exec(`npm link release-it`);
const content = "import { Plugin } from 'release-it'; " + MyPlugin.toString() + '; export default MyPlugin;';
sh.ShellString(content).toEnd(join(pluginDir, 'index.js'));
sh.pushd('-q', dir);
sh.ShellString(JSON.stringify({ name: 'project', version: '1.0.0', type: 'module' })).toEnd(
join(dir, 'package.json')
);
sh.exec(`npm install ${pluginDir}`);
sh.exec(`npm link release-it`);
const config = {
plugins: {
'@scoped/my-plugin': {
name: 'foo'
}
}
};
const container = getContainer(config);
const result = await runTasks({}, container);
t.deepEqual(container.log.info.args, [
['@scoped/my-plugin:foo:init'],
['@scoped/my-plugin:foo:getName'],
['@scoped/my-plugin:foo:getLatestVersion'],
['@scoped/my-plugin:foo:getIncrement'],
['@scoped/my-plugin:foo:getIncrementedVersionCI'],
['@scoped/my-plugin:foo:beforeBump'],
['@scoped/my-plugin:foo:bump:1.3.0'],
['@scoped/my-plugin:foo:beforeRelease'],
['@scoped/my-plugin:foo:release'],
['@scoped/my-plugin:foo:afterRelease']
]);
t.deepEqual(result, {
changelog: undefined,
name: 'new-project-name',
latestVersion: '1.2.3',
version: '1.3.0'
});
});
test.serial('should disable core plugins', async t => {
const { dir } = t.context;
sh.ShellString(JSON.stringify({ name: 'project', version: '1.0.0' })).toEnd(join(dir, 'package.json'));
const content =
"import { Plugin } from 'release-it'; " + ReplacePlugin.toString() + '; export default ReplacePlugin;';
sh.ShellString(content).toEnd(join(dir, 'replace-plugin.mjs'));
sh.exec(`npm link release-it`);
const config = {
plugins: {
'./replace-plugin.mjs': {}
}
};
const container = getContainer(config);
const result = await runTasks({}, container);
t.deepEqual(result, {
changelog: undefined,
name: undefined,
latestVersion: '0.0.0',
version: undefined
});
});
test.serial('should expose context to execute commands', async t => {
const { dir } = t.context;
sh.ShellString(JSON.stringify({ name: 'pkg-name', version: '1.0.0', type: 'module' })).toEnd(
join(dir, 'package.json')
);
const content =
"import { Plugin } from 'release-it'; " + ContextPlugin.toString() + '; export default ContextPlugin;';
sh.ShellString(content).toEnd(join(dir, 'context-plugin.js'));
sh.exec(`npm link release-it`);
const repo = parseGitUrl('https://github.com/user/pkg');
const container = getContainer({ plugins: { './context-plugin.js': {} } });
const exec = sinon.spy(container.shell, 'execFormattedCommand');
container.config.setContext({ repo });
container.config.setContext({ tagName: '1.0.1' });
await runTasks({}, container);
const pluginExecArgs = exec.args
.map(args => args[0])
.filter(arg => typeof arg === 'string' && arg.startsWith('echo'));
t.deepEqual(pluginExecArgs, [
'echo false',
'echo false',
`echo pkg-name user 1.0.0 1.0.1`,
`echo pkg-name user 1.0.0 1.0.1`,
`echo user pkg user/pkg 1.0.1`,
`echo user pkg user/pkg 1.0.1`,
`echo user pkg user/pkg 1.0.1`,
`echo user pkg user/pkg 1.0.1`,
`echo pkg 1.0.0 1.0.1 1.0.1`,
`echo pkg 1.0.0 1.0.1 1.0.1`,
`echo pkg 1.0.0 1.0.1 1.0.1`,
`echo pkg 1.0.0 1.0.1 1.0.1`
]);
});

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:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB","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 QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 z AB BB CB","2":"F B C G M N O w g x y 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:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"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:{"1":"I","2":"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:7,C:"Object.observe data binding"};

View File

@@ -0,0 +1 @@
{"name":"es-array-method-boxes-properly","version":"1.0.0","files":{"LICENSE":{"checkedAt":1678883671533,"integrity":"sha512-d2fjYr50p8QKjqC0qhH5nWv3sgAsKHHicw91kVzLPCZ54cpPIRw8zJk+nn45Y6q/yJ/T/xdxK77zBLuAvFgmVg==","mode":420,"size":1071},".eslintrc":{"checkedAt":1678883671904,"integrity":"sha512-6dNuOBQAI+TRX/1VCbAzNbC/cEnngoWGW1RgLvtOJg5ilMqxYvIkE/DeAWp4OUxOCuHJ6AMKjkgpziGmXP+Wag==","mode":420,"size":93},"index.js":{"checkedAt":1678883671904,"integrity":"sha512-KiwC5+WpSe9y0cdfkuPJLXxNsTcc5eqwF4WjR82Dd3KQiABt4ezZyznLLKfXWcTEaefK2wVBx4ZqTZewkyMecQ==","mode":420,"size":743},"test/index.js":{"checkedAt":1678883671904,"integrity":"sha512-Pk7B5kxrZx1PxpMjK+LHMFM6Vn/+OkKUo2waLoWoRRHQ+PvDnB6wPxJauXgmBJJY2ehJ4A76iZiyGqdFOIsVaQ==","mode":420,"size":289},"package.json":{"checkedAt":1678883671904,"integrity":"sha512-1M/GTyF/xd/yA1NZnCKLsyTTJQLYJwFP58zqzrSeV6XlHfahSxBCZep03krD/JliXyvNAK4Yel/zfndezQxFDw==","mode":420,"size":911},"README.md":{"checkedAt":1678883671904,"integrity":"sha512-lAKvhYjtXG6ajo6GIYL6nlZxJgkZQW35Bq4AxSC0ZXtNq4rWIHwMkDjQgWT+gpZfB+sDbVZdM2AJwTWPsdQDSw==","mode":420,"size":153},".github/FUNDING.yml":{"checkedAt":1678883671904,"integrity":"sha512-K0IC7GLP4CV5g3ewApPcFRWpICvpyj30RrKJYiglOGDzaB6oEFfs7lHLbJv+UV9+W2rFoQjHp/e0M3xObR/cZA==","mode":420,"size":601}}}

View File

@@ -0,0 +1,8 @@
export type ResponseScanStation = {
id: number;
description?: string;
key?: string;
prefix: string;
track: any;
enabled: boolean;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"Immediate.js","sourceRoot":"","sources":["../../../../src/internal/util/Immediate.ts"],"names":[],"mappings":"AAAA,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,IAAI,QAAsB,CAAC;AAC3B,IAAM,aAAa,GAA2B,EAAE,CAAC;AAOjD,SAAS,kBAAkB,CAAC,MAAc;IACxC,IAAI,MAAM,IAAI,aAAa,EAAE;QAC3B,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAKD,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,YAAY,EAAZ,UAAa,EAAc;QACzB,IAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,QAAQ,EAAE;YACb,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;SAC9B;QACD,QAAQ,CAAC,IAAI,CAAC,cAAM,OAAA,kBAAkB,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAlC,CAAkC,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,cAAc,EAAd,UAAe,MAAc;QAC3B,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;CACF,CAAC;AAKF,MAAM,CAAC,IAAM,SAAS,GAAG;IACvB,OAAO;QACL,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC;IAC3C,CAAC;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').forEach;

View File

@@ -0,0 +1,50 @@
export { Fragment } from '../../';
import {
ComponentType,
ComponentChild,
ComponentChildren,
VNode,
Attributes
} from '../../';
import { JSXInternal } from '../../src/jsx';
export function jsx(
type: string,
props: JSXInternal.HTMLAttributes &
JSXInternal.SVGAttributes &
Record<string, any> & { children?: ComponentChild },
key?: string
): VNode<any>;
export function jsx<P>(
type: ComponentType<P>,
props: Attributes & P & { children?: ComponentChild },
key?: string
): VNode<any>;
export function jsxs(
type: string,
props: JSXInternal.HTMLAttributes &
JSXInternal.SVGAttributes &
Record<string, any> & { children?: ComponentChild[] },
key?: string
): VNode<any>;
export function jsxs<P>(
type: ComponentType<P>,
props: Attributes & P & { children?: ComponentChild[] },
key?: string
): VNode<any>;
export function jsxDEV(
type: string,
props: JSXInternal.HTMLAttributes &
JSXInternal.SVGAttributes &
Record<string, any> & { children?: ComponentChildren },
key?: string
): VNode<any>;
export function jsxDEV<P>(
type: ComponentType<P>,
props: Attributes & P & { children?: ComponentChildren },
key?: string
): VNode<any>;
export { JSXInternal as JSX };

View File

@@ -0,0 +1 @@
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../packages/ecma402-abstract/data.ts"],"names":[],"mappings":"AAAA,cAAM,sBAAuB,SAAQ,KAAK;IACjC,IAAI,SAAwB;CACpC;AAED,wBAAgB,wBAAwB,CACtC,CAAC,EAAE,KAAK,GACP,CAAC,IAAI,sBAAsB,CAE7B"}

View File

@@ -0,0 +1,29 @@
{
"env": {
"node": true
},
"rules": {
"array-bracket-spacing": [2, "never"],
"block-scoped-var": 2,
"brace-style": [2, "1tbs"],
"camelcase": 1,
"computed-property-spacing": [2, "never"],
"curly": 2,
"eol-last": 2,
"eqeqeq": [2, "smart"],
"max-depth": [1, 3],
"max-len": [1, 80],
"max-statements": [1, 15],
"new-cap": 1,
"no-extend-native": 2,
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 2,
"no-unused-vars": 1,
"no-use-before-define": [2, "nofunc"],
"object-curly-spacing": [2, "never"],
"quotes": [2, "single", "avoid-escape"],
"semi": [2, "always"],
"keyword-spacing": [2, {"before": true, "after": true}],
"space-unary-ops": 2
}
}

View File

@@ -0,0 +1,106 @@
{
"name": "is-callable",
"version": "1.2.7",
"author": {
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"contributors": [
{
"name": "Jordan Harband",
"email": "ljharb@gmail.com",
"url": "http://ljharb.codes"
}
],
"description": "Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.",
"license": "MIT",
"main": "index.js",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run --silent lint",
"test": "npm run tests-only --",
"posttest": "aud --production",
"tests-only": "nyc tape 'test/**/*.js'",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs ."
},
"repository": {
"type": "git",
"url": "git://github.com/inspect-js/is-callable.git"
},
"keywords": [
"Function",
"function",
"callable",
"generator",
"generator function",
"arrow",
"arrow function",
"ES6",
"toStringTag",
"@@toStringTag"
],
"devDependencies": {
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.0",
"auto-changelog": "^2.4.0",
"available-typed-arrays": "^1.0.5",
"eclint": "^2.8.1",
"es-value-fixtures": "^1.4.2",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"has-tostringtag": "^1.0.0",
"make-arrow-function": "^1.2.0",
"make-async-function": "^1.0.0",
"make-generator-function": "^2.0.0",
"npmignore": "^0.3.0",
"nyc": "^10.3.2",
"object-inspect": "^1.12.2",
"rimraf": "^2.7.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.6.0"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true,
"startingVersion": "v1.2.5"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}

View File

@@ -0,0 +1 @@
{"name":"async-retry","version":"1.3.3","files":{"lib/index.js":{"checkedAt":1678883670500,"integrity":"sha512-pIgt38lWpQG/7gIj1DqfSJSlH1ZYl9L7xGP+4tScBroZZSLjQVpSk2XqRxSlsMUZa7pk8zejU646HQsysg3U/g==","mode":420,"size":1177},"LICENSE.md":{"checkedAt":1678883670500,"integrity":"sha512-n6B787HtuCwOi+8qSGBW3N2rNIfd5A//qMGUhosy1v2e10AQi7d7oGh0IbWs1xXxGCncFPuGBJFQDrMYxWgZnw==","mode":420,"size":1079},"package.json":{"checkedAt":1678883670500,"integrity":"sha512-jgOOligO3WFBKuuDGeZbrfZUMjCveB7vhJGwMg0Ls+fCDqZ2yhPV0ug8m5XgFXLPDMRAb8+Q9DcQHXRw5vzJRw==","mode":420,"size":1168},"README.md":{"checkedAt":1678883670500,"integrity":"sha512-DM1fjN6s/7NQx0vm/kg0yIczsD8JDAVlYfFqtPyUQOOENQbC1ssfSaA/8c9kS1Q5N1h00AlWeI7m7hRf2FfjcA==","mode":420,"size":1791}}}