new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { refCount as higherOrderRefCount } from '../operators/refCount';
|
||||
import { createOperatorSubscriber } from '../operators/OperatorSubscriber';
|
||||
import { hasLift } from '../util/lift';
|
||||
export class ConnectableObservable extends Observable {
|
||||
constructor(source, subjectFactory) {
|
||||
super();
|
||||
this.source = source;
|
||||
this.subjectFactory = subjectFactory;
|
||||
this._subject = null;
|
||||
this._refCount = 0;
|
||||
this._connection = null;
|
||||
if (hasLift(source)) {
|
||||
this.lift = source.lift;
|
||||
}
|
||||
}
|
||||
_subscribe(subscriber) {
|
||||
return this.getSubject().subscribe(subscriber);
|
||||
}
|
||||
getSubject() {
|
||||
const subject = this._subject;
|
||||
if (!subject || subject.isStopped) {
|
||||
this._subject = this.subjectFactory();
|
||||
}
|
||||
return this._subject;
|
||||
}
|
||||
_teardown() {
|
||||
this._refCount = 0;
|
||||
const { _connection } = this;
|
||||
this._subject = this._connection = null;
|
||||
_connection === null || _connection === void 0 ? void 0 : _connection.unsubscribe();
|
||||
}
|
||||
connect() {
|
||||
let connection = this._connection;
|
||||
if (!connection) {
|
||||
connection = this._connection = new Subscription();
|
||||
const subject = this.getSubject();
|
||||
connection.add(this.source.subscribe(createOperatorSubscriber(subject, undefined, () => {
|
||||
this._teardown();
|
||||
subject.complete();
|
||||
}, (err) => {
|
||||
this._teardown();
|
||||
subject.error(err);
|
||||
}, () => this._teardown())));
|
||||
if (connection.closed) {
|
||||
this._connection = null;
|
||||
connection = Subscription.EMPTY;
|
||||
}
|
||||
}
|
||||
return connection;
|
||||
}
|
||||
refCount() {
|
||||
return higherOrderRefCount()(this);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=ConnectableObservable.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"firstValueFrom.js","sourceRoot":"","sources":["../../../src/internal/firstValueFrom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqD9C,MAAM,UAAU,cAAc,CAAO,MAAqB,EAAE,MAAgC;IAC1F,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC;IAC7C,OAAO,IAAI,OAAO,CAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,MAAM,UAAU,GAAG,IAAI,cAAc,CAAI;YACvC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3B,CAAC;YACD,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,GAAG,EAAE;gBACb,IAAI,SAAS,EAAE;oBACb,OAAO,CAAC,MAAO,CAAC,YAAY,CAAC,CAAC;iBAC/B;qBAAM;oBACL,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC,CAAC;iBAC1B;YACH,CAAC;SACF,CAAC,CAAC;QACH,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,49 @@
|
||||
# es-to-primitive <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![Build Status][travis-svg]][travis-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
ECMAScript “ToPrimitive” algorithm. Provides ES5 and ES2015 versions.
|
||||
When different versions of the spec conflict, the default export will be the latest version of the abstract operation.
|
||||
Alternative versions will also be available under an `es5`/`es2015` exported property if you require a specific version.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var toPrimitive = require('es-to-primitive');
|
||||
var assert = require('assert');
|
||||
|
||||
assert(toPrimitive(function () {}) === String(function () {}));
|
||||
|
||||
var date = new Date();
|
||||
assert(toPrimitive(date) === String(date));
|
||||
|
||||
assert(toPrimitive({ valueOf: function () { return 3; } }) === 3);
|
||||
|
||||
assert(toPrimitive(['a', 'b', 3]) === String(['a', 'b', 3]));
|
||||
|
||||
var sym = Symbol();
|
||||
assert(toPrimitive(Object(sym)) === sym);
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/es-to-primitive
|
||||
[npm-version-svg]: http://versionbadg.es/ljharb/es-to-primitive.svg
|
||||
[travis-svg]: https://travis-ci.org/ljharb/es-to-primitive.svg
|
||||
[travis-url]: https://travis-ci.org/ljharb/es-to-primitive
|
||||
[deps-svg]: https://david-dm.org/ljharb/es-to-primitive.svg
|
||||
[deps-url]: https://david-dm.org/ljharb/es-to-primitive
|
||||
[dev-deps-svg]: https://david-dm.org/ljharb/es-to-primitive/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/ljharb/es-to-primitive#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/es-to-primitive.png?downloads=true&stars=true
|
||||
[license-image]: http://img.shields.io/npm/l/es-to-primitive.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: http://img.shields.io/npm/dm/es-to-primitive.svg
|
||||
[downloads-url]: http://npm-stat.com/charts.html?package=es-to-primitive
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "ci-info",
|
||||
"version": "3.8.0",
|
||||
"description": "Get details about the current Continuous Integration environment",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"author": "Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/watson/ci-info.git",
|
||||
"bugs": "https://github.com/watson/ci-info/issues",
|
||||
"homepage": "https://github.com/watson/ci-info",
|
||||
"keywords": [
|
||||
"ci",
|
||||
"continuous",
|
||||
"integration",
|
||||
"test",
|
||||
"detect"
|
||||
],
|
||||
"files": [
|
||||
"vendors.json",
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/sibiraj-s"
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"lint:fix": "standard --fix",
|
||||
"test": "standard && node test.js",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"devDependencies": {
|
||||
"clear-module": "^4.1.2",
|
||||
"husky": "^8.0.2",
|
||||
"standard": "^17.0.0",
|
||||
"tape": "^5.6.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-isvalidtimezonename
|
||||
* @param tz
|
||||
* @param implDetails implementation details
|
||||
*/
|
||||
export function IsValidTimeZoneName(tz, _a) {
|
||||
var tzData = _a.tzData, uppercaseLinks = _a.uppercaseLinks;
|
||||
var uppercasedTz = tz.toUpperCase();
|
||||
var zoneNames = new Set();
|
||||
var linkNames = new Set();
|
||||
Object.keys(tzData)
|
||||
.map(function (z) { return z.toUpperCase(); })
|
||||
.forEach(function (z) { return zoneNames.add(z); });
|
||||
Object.keys(uppercaseLinks).forEach(function (linkName) {
|
||||
linkNames.add(linkName.toUpperCase());
|
||||
zoneNames.add(uppercaseLinks[linkName].toUpperCase());
|
||||
});
|
||||
return zoneNames.has(uppercasedTz) || linkNames.has(uppercasedTz);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
export function executeSchedule(parentSubscription, scheduler, work, delay, repeat) {
|
||||
if (delay === void 0) { delay = 0; }
|
||||
if (repeat === void 0) { repeat = false; }
|
||||
var scheduleSubscription = scheduler.schedule(function () {
|
||||
work();
|
||||
if (repeat) {
|
||||
parentSubscription.add(this.schedule(null, delay));
|
||||
}
|
||||
else {
|
||||
this.unsubscribe();
|
||||
}
|
||||
}, delay);
|
||||
parentSubscription.add(scheduleSubscription);
|
||||
if (!repeat) {
|
||||
return scheduleSubscription;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=executeSchedule.js.map
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('mergeAll', require('../merge'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,524 @@
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const sysPath = require('path');
|
||||
const { promisify } = require('util');
|
||||
|
||||
let fsevents;
|
||||
try {
|
||||
fsevents = require('fsevents');
|
||||
} catch (error) {
|
||||
if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
|
||||
}
|
||||
|
||||
if (fsevents) {
|
||||
// TODO: real check
|
||||
const mtch = process.version.match(/v(\d+)\.(\d+)/);
|
||||
if (mtch && mtch[1] && mtch[2]) {
|
||||
const maj = Number.parseInt(mtch[1], 10);
|
||||
const min = Number.parseInt(mtch[2], 10);
|
||||
if (maj === 8 && min < 16) {
|
||||
fsevents = undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const {
|
||||
EV_ADD,
|
||||
EV_CHANGE,
|
||||
EV_ADD_DIR,
|
||||
EV_UNLINK,
|
||||
EV_ERROR,
|
||||
STR_DATA,
|
||||
STR_END,
|
||||
FSEVENT_CREATED,
|
||||
FSEVENT_MODIFIED,
|
||||
FSEVENT_DELETED,
|
||||
FSEVENT_MOVED,
|
||||
// FSEVENT_CLONED,
|
||||
FSEVENT_UNKNOWN,
|
||||
FSEVENT_TYPE_FILE,
|
||||
FSEVENT_TYPE_DIRECTORY,
|
||||
FSEVENT_TYPE_SYMLINK,
|
||||
|
||||
ROOT_GLOBSTAR,
|
||||
DIR_SUFFIX,
|
||||
DOT_SLASH,
|
||||
FUNCTION_TYPE,
|
||||
EMPTY_FN,
|
||||
IDENTITY_FN
|
||||
} = require('./constants');
|
||||
|
||||
const Depth = (value) => isNaN(value) ? {} : {depth: value};
|
||||
|
||||
const stat = promisify(fs.stat);
|
||||
const lstat = promisify(fs.lstat);
|
||||
const realpath = promisify(fs.realpath);
|
||||
|
||||
const statMethods = { stat, lstat };
|
||||
|
||||
/**
|
||||
* @typedef {String} Path
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} FsEventsWatchContainer
|
||||
* @property {Set<Function>} listeners
|
||||
* @property {Function} rawEmitter
|
||||
* @property {{stop: Function}} watcher
|
||||
*/
|
||||
|
||||
// fsevents instance helper functions
|
||||
/**
|
||||
* Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)
|
||||
* @type {Map<Path,FsEventsWatchContainer>}
|
||||
*/
|
||||
const FSEventsWatchers = new Map();
|
||||
|
||||
// Threshold of duplicate path prefixes at which to start
|
||||
// consolidating going forward
|
||||
const consolidateThreshhold = 10;
|
||||
|
||||
const wrongEventFlags = new Set([
|
||||
69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912
|
||||
]);
|
||||
|
||||
/**
|
||||
* Instantiates the fsevents interface
|
||||
* @param {Path} path path to be watched
|
||||
* @param {Function} callback called when fsevents is bound and ready
|
||||
* @returns {{stop: Function}} new fsevents instance
|
||||
*/
|
||||
const createFSEventsInstance = (path, callback) => {
|
||||
const stop = fsevents.watch(path, callback);
|
||||
return {stop};
|
||||
};
|
||||
|
||||
/**
|
||||
* Instantiates the fsevents interface or binds listeners to an existing one covering
|
||||
* the same file tree.
|
||||
* @param {Path} path - to be watched
|
||||
* @param {Path} realPath - real path for symlinks
|
||||
* @param {Function} listener - called when fsevents emits events
|
||||
* @param {Function} rawEmitter - passes data to listeners of the 'raw' event
|
||||
* @returns {Function} closer
|
||||
*/
|
||||
function setFSEventsListener(path, realPath, listener, rawEmitter) {
|
||||
let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;
|
||||
|
||||
const parentPath = sysPath.dirname(watchPath);
|
||||
let cont = FSEventsWatchers.get(watchPath);
|
||||
|
||||
// If we've accumulated a substantial number of paths that
|
||||
// could have been consolidated by watching one directory
|
||||
// above the current one, create a watcher on the parent
|
||||
// path instead, so that we do consolidate going forward.
|
||||
if (couldConsolidate(parentPath)) {
|
||||
watchPath = parentPath;
|
||||
}
|
||||
|
||||
const resolvedPath = sysPath.resolve(path);
|
||||
const hasSymlink = resolvedPath !== realPath;
|
||||
|
||||
const filteredListener = (fullPath, flags, info) => {
|
||||
if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
|
||||
if (
|
||||
fullPath === resolvedPath ||
|
||||
!fullPath.indexOf(resolvedPath + sysPath.sep)
|
||||
) listener(fullPath, flags, info);
|
||||
};
|
||||
|
||||
// check if there is already a watcher on a parent path
|
||||
// modifies `watchPath` to the parent path when it finds a match
|
||||
let watchedParent = false;
|
||||
for (const watchedPath of FSEventsWatchers.keys()) {
|
||||
if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
|
||||
watchPath = watchedPath;
|
||||
cont = FSEventsWatchers.get(watchPath);
|
||||
watchedParent = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (cont || watchedParent) {
|
||||
cont.listeners.add(filteredListener);
|
||||
} else {
|
||||
cont = {
|
||||
listeners: new Set([filteredListener]),
|
||||
rawEmitter,
|
||||
watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {
|
||||
if (!cont.listeners.size) return;
|
||||
const info = fsevents.getInfo(fullPath, flags);
|
||||
cont.listeners.forEach(list => {
|
||||
list(fullPath, flags, info);
|
||||
});
|
||||
|
||||
cont.rawEmitter(info.event, fullPath, info);
|
||||
})
|
||||
};
|
||||
FSEventsWatchers.set(watchPath, cont);
|
||||
}
|
||||
|
||||
// removes this instance's listeners and closes the underlying fsevents
|
||||
// instance if there are no more listeners left
|
||||
return () => {
|
||||
const lst = cont.listeners;
|
||||
|
||||
lst.delete(filteredListener);
|
||||
if (!lst.size) {
|
||||
FSEventsWatchers.delete(watchPath);
|
||||
if (cont.watcher) return cont.watcher.stop().then(() => {
|
||||
cont.rawEmitter = cont.watcher = undefined;
|
||||
Object.freeze(cont);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Decide whether or not we should start a new higher-level
|
||||
// parent watcher
|
||||
const couldConsolidate = (path) => {
|
||||
let count = 0;
|
||||
for (const watchPath of FSEventsWatchers.keys()) {
|
||||
if (watchPath.indexOf(path) === 0) {
|
||||
count++;
|
||||
if (count >= consolidateThreshhold) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
// returns boolean indicating whether fsevents can be used
|
||||
const canUse = () => fsevents && FSEventsWatchers.size < 128;
|
||||
|
||||
// determines subdirectory traversal levels from root to path
|
||||
const calcDepth = (path, root) => {
|
||||
let i = 0;
|
||||
while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
|
||||
return i;
|
||||
};
|
||||
|
||||
// returns boolean indicating whether the fsevents' event info has the same type
|
||||
// as the one returned by fs.stat
|
||||
const sameTypes = (info, stats) => (
|
||||
info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||
|
||||
info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||
|
||||
info.type === FSEVENT_TYPE_FILE && stats.isFile()
|
||||
)
|
||||
|
||||
/**
|
||||
* @mixin
|
||||
*/
|
||||
class FsEventsHandler {
|
||||
|
||||
/**
|
||||
* @param {import('../index').FSWatcher} fsw
|
||||
*/
|
||||
constructor(fsw) {
|
||||
this.fsw = fsw;
|
||||
}
|
||||
checkIgnored(path, stats) {
|
||||
const ipaths = this.fsw._ignoredPaths;
|
||||
if (this.fsw._isIgnored(path, stats)) {
|
||||
ipaths.add(path);
|
||||
if (stats && stats.isDirectory()) {
|
||||
ipaths.add(path + ROOT_GLOBSTAR);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
ipaths.delete(path);
|
||||
ipaths.delete(path + ROOT_GLOBSTAR);
|
||||
}
|
||||
|
||||
addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
||||
const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;
|
||||
this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
}
|
||||
|
||||
async checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
||||
try {
|
||||
const stats = await stat(path)
|
||||
if (this.fsw.closed) return;
|
||||
if (sameTypes(info, stats)) {
|
||||
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
} else {
|
||||
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.code === 'EACCES') {
|
||||
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
} else {
|
||||
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {
|
||||
if (this.fsw.closed || this.checkIgnored(path)) return;
|
||||
|
||||
if (event === EV_UNLINK) {
|
||||
const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY
|
||||
// suppress unlink events on never before seen files
|
||||
if (isDirectory || watchedDir.has(item)) {
|
||||
this.fsw._remove(parent, item, isDirectory);
|
||||
}
|
||||
} else {
|
||||
if (event === EV_ADD) {
|
||||
// track new directories
|
||||
if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);
|
||||
|
||||
if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {
|
||||
// push symlinks back to the top of the stack to get handled
|
||||
const curDepth = opts.depth === undefined ?
|
||||
undefined : calcDepth(fullPath, realPath) + 1;
|
||||
return this._addToFsEvents(path, false, true, curDepth);
|
||||
}
|
||||
|
||||
// track new paths
|
||||
// (other than symlinks being followed, which will be tracked soon)
|
||||
this.fsw._getWatchedDir(parent).add(item);
|
||||
}
|
||||
/**
|
||||
* @type {'add'|'addDir'|'unlink'|'unlinkDir'}
|
||||
*/
|
||||
const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;
|
||||
this.fsw._emit(eventName, path);
|
||||
if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle symlinks encountered during directory scan
|
||||
* @param {String} watchPath - file/dir path to be watched with fsevents
|
||||
* @param {String} realPath - real path (in case of symlinks)
|
||||
* @param {Function} transform - path transformer
|
||||
* @param {Function} globFilter - path filter in case a glob pattern was provided
|
||||
* @returns {Function} closer for the watcher instance
|
||||
*/
|
||||
_watchWithFsEvents(watchPath, realPath, transform, globFilter) {
|
||||
if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;
|
||||
const opts = this.fsw.options;
|
||||
const watchCallback = async (fullPath, flags, info) => {
|
||||
if (this.fsw.closed) return;
|
||||
if (
|
||||
opts.depth !== undefined &&
|
||||
calcDepth(fullPath, realPath) > opts.depth
|
||||
) return;
|
||||
const path = transform(sysPath.join(
|
||||
watchPath, sysPath.relative(watchPath, fullPath)
|
||||
));
|
||||
if (globFilter && !globFilter(path)) return;
|
||||
// ensure directories are tracked
|
||||
const parent = sysPath.dirname(path);
|
||||
const item = sysPath.basename(path);
|
||||
const watchedDir = this.fsw._getWatchedDir(
|
||||
info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
|
||||
);
|
||||
|
||||
// correct for wrong events emitted
|
||||
if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {
|
||||
if (typeof opts.ignored === FUNCTION_TYPE) {
|
||||
let stats;
|
||||
try {
|
||||
stats = await stat(path);
|
||||
} catch (error) {}
|
||||
if (this.fsw.closed) return;
|
||||
if (this.checkIgnored(path, stats)) return;
|
||||
if (sameTypes(info, stats)) {
|
||||
this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
} else {
|
||||
this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
}
|
||||
} else {
|
||||
this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
}
|
||||
} else {
|
||||
switch (info.event) {
|
||||
case FSEVENT_CREATED:
|
||||
case FSEVENT_MODIFIED:
|
||||
return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
case FSEVENT_DELETED:
|
||||
case FSEVENT_MOVED:
|
||||
return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const closer = setFSEventsListener(
|
||||
watchPath,
|
||||
realPath,
|
||||
watchCallback,
|
||||
this.fsw._emitRaw
|
||||
);
|
||||
|
||||
this.fsw._emitReady();
|
||||
return closer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle symlinks encountered during directory scan
|
||||
* @param {String} linkPath path to symlink
|
||||
* @param {String} fullPath absolute path to the symlink
|
||||
* @param {Function} transform pre-existing path transformer
|
||||
* @param {Number} curDepth level of subdirectories traversed to where symlink is
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
|
||||
// don't follow the same symlink more than once
|
||||
if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;
|
||||
|
||||
this.fsw._symlinkPaths.set(fullPath, true);
|
||||
this.fsw._incrReadyCount();
|
||||
|
||||
try {
|
||||
const linkTarget = await realpath(linkPath);
|
||||
if (this.fsw.closed) return;
|
||||
if (this.fsw._isIgnored(linkTarget)) {
|
||||
return this.fsw._emitReady();
|
||||
}
|
||||
|
||||
this.fsw._incrReadyCount();
|
||||
|
||||
// add the linkTarget for watching with a wrapper for transform
|
||||
// that causes emitted paths to incorporate the link's path
|
||||
this._addToFsEvents(linkTarget || linkPath, (path) => {
|
||||
let aliasedPath = linkPath;
|
||||
if (linkTarget && linkTarget !== DOT_SLASH) {
|
||||
aliasedPath = path.replace(linkTarget, linkPath);
|
||||
} else if (path !== DOT_SLASH) {
|
||||
aliasedPath = sysPath.join(linkPath, path);
|
||||
}
|
||||
return transform(aliasedPath);
|
||||
}, false, curDepth);
|
||||
} catch(error) {
|
||||
if (this.fsw._handleError(error)) {
|
||||
return this.fsw._emitReady();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Path} newPath
|
||||
* @param {fs.Stats} stats
|
||||
*/
|
||||
emitAdd(newPath, stats, processPath, opts, forceAdd) {
|
||||
const pp = processPath(newPath);
|
||||
const isDir = stats.isDirectory();
|
||||
const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
|
||||
const base = sysPath.basename(pp);
|
||||
|
||||
// ensure empty dirs get tracked
|
||||
if (isDir) this.fsw._getWatchedDir(pp);
|
||||
if (dirObj.has(base)) return;
|
||||
dirObj.add(base);
|
||||
|
||||
if (!opts.ignoreInitial || forceAdd === true) {
|
||||
this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);
|
||||
}
|
||||
}
|
||||
|
||||
initWatch(realPath, path, wh, processPath) {
|
||||
if (this.fsw.closed) return;
|
||||
const closer = this._watchWithFsEvents(
|
||||
wh.watchPath,
|
||||
sysPath.resolve(realPath || wh.watchPath),
|
||||
processPath,
|
||||
wh.globFilter
|
||||
);
|
||||
this.fsw._addPathCloser(path, closer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle added path with fsevents
|
||||
* @param {String} path file/dir path or glob pattern
|
||||
* @param {Function|Boolean=} transform converts working path to what the user expects
|
||||
* @param {Boolean=} forceAdd ensure add is emitted
|
||||
* @param {Number=} priorDepth Level of subdirectories already traversed.
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async _addToFsEvents(path, transform, forceAdd, priorDepth) {
|
||||
if (this.fsw.closed) {
|
||||
return;
|
||||
}
|
||||
const opts = this.fsw.options;
|
||||
const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;
|
||||
|
||||
const wh = this.fsw._getWatchHelpers(path);
|
||||
|
||||
// evaluate what is at the path we're being asked to watch
|
||||
try {
|
||||
const stats = await statMethods[wh.statMethod](wh.watchPath);
|
||||
if (this.fsw.closed) return;
|
||||
if (this.fsw._isIgnored(wh.watchPath, stats)) {
|
||||
throw null;
|
||||
}
|
||||
if (stats.isDirectory()) {
|
||||
// emit addDir unless this is a glob parent
|
||||
if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);
|
||||
|
||||
// don't recurse further if it would exceed depth setting
|
||||
if (priorDepth && priorDepth > opts.depth) return;
|
||||
|
||||
// scan the contents of the dir
|
||||
this.fsw._readdirp(wh.watchPath, {
|
||||
fileFilter: entry => wh.filterPath(entry),
|
||||
directoryFilter: entry => wh.filterDir(entry),
|
||||
...Depth(opts.depth - (priorDepth || 0))
|
||||
}).on(STR_DATA, (entry) => {
|
||||
// need to check filterPath on dirs b/c filterDir is less restrictive
|
||||
if (this.fsw.closed) {
|
||||
return;
|
||||
}
|
||||
if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
|
||||
|
||||
const joinedPath = sysPath.join(wh.watchPath, entry.path);
|
||||
const {fullPath} = entry;
|
||||
|
||||
if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
|
||||
// preserve the current depth here since it can't be derived from
|
||||
// real paths past the symlink
|
||||
const curDepth = opts.depth === undefined ?
|
||||
undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
|
||||
|
||||
this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
|
||||
} else {
|
||||
this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);
|
||||
}
|
||||
}).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {
|
||||
this.fsw._emitReady();
|
||||
});
|
||||
} else {
|
||||
this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);
|
||||
this.fsw._emitReady();
|
||||
}
|
||||
} catch (error) {
|
||||
if (!error || this.fsw._handleError(error)) {
|
||||
// TODO: Strange thing: "should not choke on an ignored watch path" will be failed without 2 ready calls -__-
|
||||
this.fsw._emitReady();
|
||||
this.fsw._emitReady();
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.persistent && forceAdd !== true) {
|
||||
if (typeof transform === FUNCTION_TYPE) {
|
||||
// realpath has already been resolved
|
||||
this.initWatch(undefined, path, wh, processPath);
|
||||
} else {
|
||||
let realPath;
|
||||
try {
|
||||
realPath = await realpath(wh.watchPath);
|
||||
} catch (e) {}
|
||||
this.initWatch(realPath, path, wh, processPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = FsEventsHandler;
|
||||
module.exports.canUse = canUse;
|
||||
@@ -0,0 +1,50 @@
|
||||
# No Case
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![NPM downloads][downloads-image]][downloads-url]
|
||||
[![Build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
[](https://greenkeeper.io/)
|
||||
|
||||
Transform a string to lower space cased. Optional locale and replacement character supported.
|
||||
|
||||
Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a `toString` property, numbers and booleans. Empty values (`null` and `undefined`) will result in an empty string.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install no-case --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var noCase = require('no-case')
|
||||
|
||||
noCase(null) //=> ""
|
||||
noCase('string') //=> "string"
|
||||
noCase('dot.case') //=> "dot case"
|
||||
noCase('camelCase') //=> "camel case"
|
||||
noCase('Beyoncé Knowles') //=> "beyoncé knowles"
|
||||
|
||||
noCase('A STRING', 'tr') //=> "a strıng"
|
||||
|
||||
noCase('HELLO WORLD!', null, '_') //=> "hello_world"
|
||||
```
|
||||
|
||||
## Typings
|
||||
|
||||
Includes a [TypeScript definition](no-case.d.ts).
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/no-case.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/no-case
|
||||
[downloads-image]: https://img.shields.io/npm/dm/no-case.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/no-case
|
||||
[travis-image]: https://img.shields.io/travis/blakeembrey/no-case.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/blakeembrey/no-case
|
||||
[coveralls-image]: https://img.shields.io/coveralls/blakeembrey/no-case.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/blakeembrey/no-case?branch=master
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"postcss-nested","version":"6.0.0","files":{"LICENSE":{"checkedAt":1678883673235,"integrity":"sha512-kf+pcSZyfzjtIrnfaqAbJfufb+i2wOV1P6N9+FEtyg9K1irHt7cMFB7znasCe03NozhQ7A82LvtW8Y3lkVjujA==","mode":420,"size":1095},"index.js":{"checkedAt":1678883673235,"integrity":"sha512-PJAaWUyFhOBzXYDI3YnXs1JnVwJDd84PW8flayKub6k6qqrquVam9Kmc0NbZRMEBmv1wgVAIAtzkJIwd1Q7RhQ==","mode":420,"size":9015},"package.json":{"checkedAt":1678883673235,"integrity":"sha512-cLeJDukg+OkiEA1pKlSbZZ4AZeJQx+eMyKtFZA6kwVaXYSVCPJ/VkjK8OXs77m4zv4US6M8HUN7xqlVr3j3ANg==","mode":420,"size":597},"README.md":{"checkedAt":1678883673235,"integrity":"sha512-3oNd5ITV0AdphYBtVcVHMtUZZ3O8kmGZrXyinLrfxPgTqjOJuU9viwX1r8fqFxTZIvCg0jvRIRI2+0tmo8npwA==","mode":420,"size":2254},"index.d.ts":{"checkedAt":1678883673238,"integrity":"sha512-ELlVU16c188tS1FokvTF6prmdnVtJb2xnlzGCmlMM8gkIF3fyoFHoPTlCdeBPzoCgNyV3u9K9BqzdVf00jVdHQ==","mode":420,"size":1161}}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"B","2":"J D E F A CC"},B:{"1":"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","129":"C K"},C:{"1":"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":"DC tB","260":"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","804":"I v J D E F A B C K L EC FC"},D:{"1":"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","260":"RB SB TB UB VB","388":"6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","1412":"0 1 2 3 4 5 G M N O w g x y z","1956":"I v J D E F A B C K L"},E:{"1":"3B 4B 5B sB 6B 7B 8B 9B OC","129":"A B C K L G LC 0B qB rB 1B MC NC 2B","1412":"J D E F JC KC","1956":"I v HC zB IC"},F:{"1":"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 PC QC","260":"EB FB GB HB IB","388":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB","1796":"RC SC","1828":"B C qB AC TC rB"},G:{"1":"3B 4B 5B sB 6B 7B 8B 9B","129":"aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B","1412":"E WC XC YC ZC","1956":"zB UC BC VC"},H:{"1828":"oC"},I:{"1":"f","388":"tC uC","1956":"tB I pC qC rC sC BC"},J:{"1412":"A","1924":"D"},K:{"1":"h","2":"A","1828":"B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"1":"B","2":"A"},O:{"1":"vC"},P:{"1":"g yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","260":"wC xC","388":"I"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"BD","260":"AD"}},B:4,C:"CSS3 Border images"};
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./lib/methods")(require("./"));
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) 2013 Thiago de Arruda
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,7 @@
|
||||
var getNative = require('./_getNative'),
|
||||
root = require('./_root');
|
||||
|
||||
/* Built-in method references that are verified to be native. */
|
||||
var Map = getNative(root, 'Map');
|
||||
|
||||
module.exports = Map;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/index.ts"],"names":[],"mappings":";;;AAAA,mEAA8E;AAArE,8GAAA,aAAa,OAAA"}
|
||||
@@ -0,0 +1,7 @@
|
||||
export const subscribeToArray = (array) => (subscriber) => {
|
||||
for (let i = 0, len = array.length; i < len && !subscriber.closed; i++) {
|
||||
subscriber.next(array[i]);
|
||||
}
|
||||
subscriber.complete();
|
||||
};
|
||||
//# sourceMappingURL=subscribeToArray.js.map
|
||||
@@ -0,0 +1,2 @@
|
||||
export declare function isAsyncIterable<T>(obj: any): obj is AsyncIterable<T>;
|
||||
//# sourceMappingURL=isAsyncIterable.d.ts.map
|
||||
@@ -0,0 +1,308 @@
|
||||
# Chokidar [](https://github.com/paulmillr/chokidar) [](https://github.com/paulmillr/chokidar)
|
||||
|
||||
> Minimal and efficient cross-platform file watching library
|
||||
|
||||
[](https://www.npmjs.com/package/chokidar)
|
||||
|
||||
## Why?
|
||||
|
||||
Node.js `fs.watch`:
|
||||
|
||||
* Doesn't report filenames on MacOS.
|
||||
* Doesn't report events at all when using editors like Sublime on MacOS.
|
||||
* Often reports events twice.
|
||||
* Emits most changes as `rename`.
|
||||
* Does not provide an easy way to recursively watch file trees.
|
||||
* Does not support recursive watching on Linux.
|
||||
|
||||
Node.js `fs.watchFile`:
|
||||
|
||||
* Almost as bad at event handling.
|
||||
* Also does not provide any recursive watching.
|
||||
* Results in high CPU utilization.
|
||||
|
||||
Chokidar resolves these problems.
|
||||
|
||||
Initially made for **[Brunch](https://brunch.io/)** (an ultra-swift web app build tool), it is now used in
|
||||
[Microsoft's Visual Studio Code](https://github.com/microsoft/vscode),
|
||||
[gulp](https://github.com/gulpjs/gulp/),
|
||||
[karma](https://karma-runner.github.io/),
|
||||
[PM2](https://github.com/Unitech/PM2),
|
||||
[browserify](http://browserify.org/),
|
||||
[webpack](https://webpack.github.io/),
|
||||
[BrowserSync](https://www.browsersync.io/),
|
||||
and [many others](https://www.npmjs.com/browse/depended/chokidar).
|
||||
It has proven itself in production environments.
|
||||
|
||||
Version 3 is out! Check out our blog post about it: [Chokidar 3: How to save 32TB of traffic every week](https://paulmillr.com/posts/chokidar-3-save-32tb-of-traffic/)
|
||||
|
||||
## How?
|
||||
|
||||
Chokidar does still rely on the Node.js core `fs` module, but when using
|
||||
`fs.watch` and `fs.watchFile` for watching, it normalizes the events it
|
||||
receives, often checking for truth by getting file stats and/or dir contents.
|
||||
|
||||
On MacOS, chokidar by default uses a native extension exposing the Darwin
|
||||
`FSEvents` API. This provides very efficient recursive watching compared with
|
||||
implementations like `kqueue` available on most \*nix platforms. Chokidar still
|
||||
does have to do some work to normalize the events received that way as well.
|
||||
|
||||
On most other platforms, the `fs.watch`-based implementation is the default, which
|
||||
avoids polling and keeps CPU usage down. Be advised that chokidar will initiate
|
||||
watchers recursively for everything within scope of the paths that have been
|
||||
specified, so be judicious about not wasting system resources by watching much
|
||||
more than needed.
|
||||
|
||||
## Getting started
|
||||
|
||||
Install with npm:
|
||||
|
||||
```sh
|
||||
npm install chokidar
|
||||
```
|
||||
|
||||
Then `require` and use it in your code:
|
||||
|
||||
```javascript
|
||||
const chokidar = require('chokidar');
|
||||
|
||||
// One-liner for current directory
|
||||
chokidar.watch('.').on('all', (event, path) => {
|
||||
console.log(event, path);
|
||||
});
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```javascript
|
||||
// Example of a more typical implementation structure
|
||||
|
||||
// Initialize watcher.
|
||||
const watcher = chokidar.watch('file, dir, glob, or array', {
|
||||
ignored: /(^|[\/\\])\../, // ignore dotfiles
|
||||
persistent: true
|
||||
});
|
||||
|
||||
// Something to use when events are received.
|
||||
const log = console.log.bind(console);
|
||||
// Add event listeners.
|
||||
watcher
|
||||
.on('add', path => log(`File ${path} has been added`))
|
||||
.on('change', path => log(`File ${path} has been changed`))
|
||||
.on('unlink', path => log(`File ${path} has been removed`));
|
||||
|
||||
// More possible events.
|
||||
watcher
|
||||
.on('addDir', path => log(`Directory ${path} has been added`))
|
||||
.on('unlinkDir', path => log(`Directory ${path} has been removed`))
|
||||
.on('error', error => log(`Watcher error: ${error}`))
|
||||
.on('ready', () => log('Initial scan complete. Ready for changes'))
|
||||
.on('raw', (event, path, details) => { // internal
|
||||
log('Raw event info:', event, path, details);
|
||||
});
|
||||
|
||||
// 'add', 'addDir' and 'change' events also receive stat() results as second
|
||||
// argument when available: https://nodejs.org/api/fs.html#fs_class_fs_stats
|
||||
watcher.on('change', (path, stats) => {
|
||||
if (stats) console.log(`File ${path} changed size to ${stats.size}`);
|
||||
});
|
||||
|
||||
// Watch new files.
|
||||
watcher.add('new-file');
|
||||
watcher.add(['new-file-2', 'new-file-3', '**/other-file*']);
|
||||
|
||||
// Get list of actual paths being watched on the filesystem
|
||||
var watchedPaths = watcher.getWatched();
|
||||
|
||||
// Un-watch some files.
|
||||
await watcher.unwatch('new-file*');
|
||||
|
||||
// Stop watching.
|
||||
// The method is async!
|
||||
watcher.close().then(() => console.log('closed'));
|
||||
|
||||
// Full list of options. See below for descriptions.
|
||||
// Do not use this example!
|
||||
chokidar.watch('file', {
|
||||
persistent: true,
|
||||
|
||||
ignored: '*.txt',
|
||||
ignoreInitial: false,
|
||||
followSymlinks: true,
|
||||
cwd: '.',
|
||||
disableGlobbing: false,
|
||||
|
||||
usePolling: false,
|
||||
interval: 100,
|
||||
binaryInterval: 300,
|
||||
alwaysStat: false,
|
||||
depth: 99,
|
||||
awaitWriteFinish: {
|
||||
stabilityThreshold: 2000,
|
||||
pollInterval: 100
|
||||
},
|
||||
|
||||
ignorePermissionErrors: false,
|
||||
atomic: true // or a custom 'atomicity delay', in milliseconds (default 100)
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
`chokidar.watch(paths, [options])`
|
||||
|
||||
* `paths` (string or array of strings). Paths to files, dirs to be watched
|
||||
recursively, or glob patterns.
|
||||
- Note: globs must not contain windows separators (`\`),
|
||||
because that's how they work by the standard —
|
||||
you'll need to replace them with forward slashes (`/`).
|
||||
- Note 2: for additional glob documentation, check out low-level
|
||||
library: [picomatch](https://github.com/micromatch/picomatch).
|
||||
* `options` (object) Options object as defined below:
|
||||
|
||||
#### Persistence
|
||||
|
||||
* `persistent` (default: `true`). Indicates whether the process
|
||||
should continue to run as long as files are being watched. If set to
|
||||
`false` when using `fsevents` to watch, no more events will be emitted
|
||||
after `ready`, even if the process continues to run.
|
||||
|
||||
#### Path filtering
|
||||
|
||||
* `ignored` ([anymatch](https://github.com/es128/anymatch)-compatible definition)
|
||||
Defines files/paths to be ignored. The whole relative or absolute path is
|
||||
tested, not just filename. If a function with two arguments is provided, it
|
||||
gets called twice per path - once with a single argument (the path), second
|
||||
time with two arguments (the path and the
|
||||
[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
|
||||
object of that path).
|
||||
* `ignoreInitial` (default: `false`). If set to `false` then `add`/`addDir` events are also emitted for matching paths while
|
||||
instantiating the watching as chokidar discovers these file paths (before the `ready` event).
|
||||
* `followSymlinks` (default: `true`). When `false`, only the
|
||||
symlinks themselves will be watched for changes instead of following
|
||||
the link references and bubbling events through the link's path.
|
||||
* `cwd` (no default). The base directory from which watch `paths` are to be
|
||||
derived. Paths emitted with events will be relative to this.
|
||||
* `disableGlobbing` (default: `false`). If set to `true` then the strings passed to `.watch()` and `.add()` are treated as
|
||||
literal path names, even if they look like globs.
|
||||
|
||||
#### Performance
|
||||
|
||||
* `usePolling` (default: `false`).
|
||||
Whether to use fs.watchFile (backed by polling), or fs.watch. If polling
|
||||
leads to high CPU utilization, consider setting this to `false`. It is
|
||||
typically necessary to **set this to `true` to successfully watch files over
|
||||
a network**, and it may be necessary to successfully watch files in other
|
||||
non-standard situations. Setting to `true` explicitly on MacOS overrides the
|
||||
`useFsEvents` default. You may also set the CHOKIDAR_USEPOLLING env variable
|
||||
to true (1) or false (0) in order to override this option.
|
||||
* _Polling-specific settings_ (effective when `usePolling: true`)
|
||||
* `interval` (default: `100`). Interval of file system polling, in milliseconds. You may also
|
||||
set the CHOKIDAR_INTERVAL env variable to override this option.
|
||||
* `binaryInterval` (default: `300`). Interval of file system
|
||||
polling for binary files.
|
||||
([see list of binary extensions](https://github.com/sindresorhus/binary-extensions/blob/master/binary-extensions.json))
|
||||
* `useFsEvents` (default: `true` on MacOS). Whether to use the
|
||||
`fsevents` watching interface if available. When set to `true` explicitly
|
||||
and `fsevents` is available this supercedes the `usePolling` setting. When
|
||||
set to `false` on MacOS, `usePolling: true` becomes the default.
|
||||
* `alwaysStat` (default: `false`). If relying upon the
|
||||
[`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats)
|
||||
object that may get passed with `add`, `addDir`, and `change` events, set
|
||||
this to `true` to ensure it is provided even in cases where it wasn't
|
||||
already available from the underlying watch events.
|
||||
* `depth` (default: `undefined`). If set, limits how many levels of
|
||||
subdirectories will be traversed.
|
||||
* `awaitWriteFinish` (default: `false`).
|
||||
By default, the `add` event will fire when a file first appears on disk, before
|
||||
the entire file has been written. Furthermore, in some cases some `change`
|
||||
events will be emitted while the file is being written. In some cases,
|
||||
especially when watching for large files there will be a need to wait for the
|
||||
write operation to finish before responding to a file creation or modification.
|
||||
Setting `awaitWriteFinish` to `true` (or a truthy value) will poll file size,
|
||||
holding its `add` and `change` events until the size does not change for a
|
||||
configurable amount of time. The appropriate duration setting is heavily
|
||||
dependent on the OS and hardware. For accurate detection this parameter should
|
||||
be relatively high, making file watching much less responsive.
|
||||
Use with caution.
|
||||
* *`options.awaitWriteFinish` can be set to an object in order to adjust
|
||||
timing params:*
|
||||
* `awaitWriteFinish.stabilityThreshold` (default: 2000). Amount of time in
|
||||
milliseconds for a file size to remain constant before emitting its event.
|
||||
* `awaitWriteFinish.pollInterval` (default: 100). File size polling interval, in milliseconds.
|
||||
|
||||
#### Errors
|
||||
|
||||
* `ignorePermissionErrors` (default: `false`). Indicates whether to watch files
|
||||
that don't have read permissions if possible. If watching fails due to `EPERM`
|
||||
or `EACCES` with this set to `true`, the errors will be suppressed silently.
|
||||
* `atomic` (default: `true` if `useFsEvents` and `usePolling` are `false`).
|
||||
Automatically filters out artifacts that occur when using editors that use
|
||||
"atomic writes" instead of writing directly to the source file. If a file is
|
||||
re-added within 100 ms of being deleted, Chokidar emits a `change` event
|
||||
rather than `unlink` then `add`. If the default of 100 ms does not work well
|
||||
for you, you can override it by setting `atomic` to a custom value, in
|
||||
milliseconds.
|
||||
|
||||
### Methods & Events
|
||||
|
||||
`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`:
|
||||
|
||||
* `.add(path / paths)`: Add files, directories, or glob patterns for tracking.
|
||||
Takes an array of strings or just one string.
|
||||
* `.on(event, callback)`: Listen for an FS event.
|
||||
Available events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `ready`,
|
||||
`raw`, `error`.
|
||||
Additionally `all` is available which gets emitted with the underlying event
|
||||
name and path for every event other than `ready`, `raw`, and `error`. `raw` is internal, use it carefully.
|
||||
* `.unwatch(path / paths)`: Stop watching files, directories, or glob patterns.
|
||||
Takes an array of strings or just one string.
|
||||
* `.close()`: **async** Removes all listeners from watched files. Asynchronous, returns Promise. Use with `await` to ensure bugs don't happen.
|
||||
* `.getWatched()`: Returns an object representing all the paths on the file
|
||||
system being watched by this `FSWatcher` instance. The object's keys are all the
|
||||
directories (using absolute paths unless the `cwd` option was used), and the
|
||||
values are arrays of the names of the items contained in each directory.
|
||||
|
||||
## CLI
|
||||
|
||||
If you need a CLI interface for your file watching, check out
|
||||
[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
|
||||
execute a command on each change, or get a stdio stream of change events.
|
||||
|
||||
## Install Troubleshooting
|
||||
|
||||
* `npm WARN optional dep failed, continuing fsevents@n.n.n`
|
||||
* This message is normal part of how `npm` handles optional dependencies and is
|
||||
not indicative of a problem. Even if accompanied by other related error messages,
|
||||
Chokidar should function properly.
|
||||
|
||||
* `TypeError: fsevents is not a constructor`
|
||||
* Update chokidar by doing `rm -rf node_modules package-lock.json yarn.lock && npm install`, or update your dependency that uses chokidar.
|
||||
|
||||
* Chokidar is producing `ENOSP` error on Linux, like this:
|
||||
* `bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell`
|
||||
`Error: watch /home/ ENOSPC`
|
||||
* This means Chokidar ran out of file handles and you'll need to increase their count by executing the following command in Terminal:
|
||||
`echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`
|
||||
|
||||
## Changelog
|
||||
|
||||
For more detailed changelog, see [`full_changelog.md`](.github/full_changelog.md).
|
||||
- **v3.5 (Jan 6, 2021):** Support for ARM Macs with Apple Silicon. Fixes for deleted symlinks.
|
||||
- **v3.4 (Apr 26, 2020):** Support for directory-based symlinks. Fixes for macos file replacement.
|
||||
- **v3.3 (Nov 2, 2019):** `FSWatcher#close()` method became async. That fixes IO race conditions related to close method.
|
||||
- **v3.2 (Oct 1, 2019):** Improve Linux RAM usage by 50%. Race condition fixes. Windows glob fixes. Improve stability by using tight range of dependency versions.
|
||||
- **v3.1 (Sep 16, 2019):** dotfiles are no longer filtered out by default. Use `ignored` option if needed. Improve initial Linux scan time by 50%.
|
||||
- **v3 (Apr 30, 2019):** massive CPU & RAM consumption improvements; reduces deps / package size by a factor of 17x and bumps Node.js requirement to v8.16 and higher.
|
||||
- **v2 (Dec 29, 2017):** Globs are now posix-style-only; without windows support. Tons of bugfixes.
|
||||
- **v1 (Apr 7, 2015):** Glob support, symlink support, tons of bugfixes. Node 0.8+ is supported
|
||||
- **v0.1 (Apr 20, 2012):** Initial release, extracted from [Brunch](https://github.com/brunch/brunch/blob/9847a065aea300da99bd0753f90354cde9de1261/src/helpers.coffee#L66)
|
||||
|
||||
## Also
|
||||
|
||||
Why was chokidar named this way? What's the meaning behind it?
|
||||
|
||||
>Chowkidar is a transliteration of a Hindi word meaning 'watchman, gatekeeper', चौकीदार. This ultimately comes from Sanskrit _ चतुष्क_ (crossway, quadrangle, consisting-of-four).
|
||||
|
||||
## License
|
||||
|
||||
MIT (c) Paul Miller (<https://paulmillr.com>), see [LICENSE](LICENSE) file.
|
||||
@@ -0,0 +1,30 @@
|
||||
import assertString from './util/assertString';
|
||||
export default function isLuhnNumber(str) {
|
||||
assertString(str);
|
||||
var sanitized = str.replace(/[- ]+/g, '');
|
||||
var sum = 0;
|
||||
var digit;
|
||||
var tmpNum;
|
||||
var shouldDouble;
|
||||
|
||||
for (var i = sanitized.length - 1; i >= 0; i--) {
|
||||
digit = sanitized.substring(i, i + 1);
|
||||
tmpNum = parseInt(digit, 10);
|
||||
|
||||
if (shouldDouble) {
|
||||
tmpNum *= 2;
|
||||
|
||||
if (tmpNum >= 10) {
|
||||
sum += tmpNum % 10 + 1;
|
||||
} else {
|
||||
sum += tmpNum;
|
||||
}
|
||||
} else {
|
||||
sum += tmpNum;
|
||||
}
|
||||
|
||||
shouldDouble = !shouldDouble;
|
||||
}
|
||||
|
||||
return !!(sum % 10 === 0 ? sanitized : false);
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=timerHandle.js.map
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
function hrefInfo(urlObj)
|
||||
{
|
||||
var minimumPathOnly = (!urlObj.scheme && !urlObj.auth && !urlObj.host.full && !urlObj.port);
|
||||
var minimumResourceOnly = (minimumPathOnly && !urlObj.path.absolute.string);
|
||||
var minimumQueryOnly = (minimumResourceOnly && !urlObj.resource);
|
||||
var minimumHashOnly = (minimumQueryOnly && !urlObj.query.string.full.length);
|
||||
var empty = (minimumHashOnly && !urlObj.hash);
|
||||
|
||||
urlObj.extra.hrefInfo.minimumPathOnly = minimumPathOnly;
|
||||
urlObj.extra.hrefInfo.minimumResourceOnly = minimumResourceOnly;
|
||||
urlObj.extra.hrefInfo.minimumQueryOnly = minimumQueryOnly;
|
||||
urlObj.extra.hrefInfo.minimumHashOnly = minimumHashOnly;
|
||||
urlObj.extra.hrefInfo.empty = empty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = hrefInfo;
|
||||
@@ -0,0 +1,16 @@
|
||||
# Installation
|
||||
> `npm install --save @types/sass`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for sass (https://github.com/sass/dart-sass).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sass.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Thu, 25 Nov 2021 14:01:04 GMT
|
||||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
||||
* Global values: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Alan Agius](https://github.com/alan-agius4), [Silas Rech](https://github.com/lenovouser), and [Justin Leider](https://github.com/jleider).
|
||||
@@ -0,0 +1,28 @@
|
||||
# Date
|
||||
|
||||
_Date_ instance
|
||||
|
||||
## `date/is`
|
||||
|
||||
Confirms if given object is a native date, and is not an _Invalid Date_
|
||||
|
||||
```javascript
|
||||
const isDate = require("type/date/is");
|
||||
|
||||
isDate(new Date()); // true
|
||||
isDate(new Date("Invalid date")); // false
|
||||
isDate(Date.now()); // false
|
||||
isDate("foo"); // false
|
||||
```
|
||||
|
||||
## `date/ensure`
|
||||
|
||||
If given argument is a date object, it is returned back. Otherwise `TypeError` is thrown.
|
||||
|
||||
```javascript
|
||||
const ensureDate = require("type/date/ensure");
|
||||
|
||||
const date = new Date();
|
||||
ensureDate(date); // date
|
||||
ensureDate(123123); // Thrown TypeError: 123123 is not a date object
|
||||
```
|
||||
@@ -0,0 +1,12 @@
|
||||
function cloneArray(array) {
|
||||
var cloned = array.slice(0);
|
||||
|
||||
for (var i = 0, l = cloned.length; i < l; i++) {
|
||||
if (Array.isArray(cloned[i]))
|
||||
cloned[i] = cloneArray(cloned[i]);
|
||||
}
|
||||
|
||||
return cloned;
|
||||
}
|
||||
|
||||
module.exports = cloneArray;
|
||||
@@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "before-after-hook",
|
||||
"version": "2.2.3",
|
||||
"description": "asynchronous before/error/after hooks for internal functionality",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"lib"
|
||||
],
|
||||
"types": "./index.d.ts",
|
||||
"scripts": {
|
||||
"prebuild": "rimraf dist && mkdirp dist",
|
||||
"build": "browserify index.js --standalone=Hook > dist/before-after-hook.js",
|
||||
"postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js",
|
||||
"lint": "prettier --check '{lib,test,examples}/**/*' 'index.*' README.md package.json",
|
||||
"lint:fix": "prettier --write '{lib,test,examples}/**/*' 'index.*' README.md package.json",
|
||||
"pretest": "npm run -s lint",
|
||||
"test": "npm run -s test:node | tap-spec",
|
||||
"posttest": "npm run validate:ts",
|
||||
"test:node": "node test",
|
||||
"test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'",
|
||||
"test:coverage": "istanbul cover test",
|
||||
"test:coverage:upload": "istanbul-coveralls",
|
||||
"validate:ts": "tsc --strict --target es6 index.d.ts",
|
||||
"postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts",
|
||||
"presemantic-release": "npm run build",
|
||||
"semantic-release": "semantic-release"
|
||||
},
|
||||
"repository": "github:gr2m/before-after-hook",
|
||||
"keywords": [
|
||||
"hook",
|
||||
"hooks",
|
||||
"api"
|
||||
],
|
||||
"author": "Gregor Martynus",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"browserify": "^16.0.0",
|
||||
"gaze-cli": "^0.2.0",
|
||||
"istanbul": "^0.4.0",
|
||||
"istanbul-coveralls": "^1.0.3",
|
||||
"mkdirp": "^1.0.3",
|
||||
"prettier": "^2.0.0",
|
||||
"rimraf": "^3.0.0",
|
||||
"semantic-release": "^19.0.3",
|
||||
"simple-mock": "^0.8.0",
|
||||
"tap-min": "^2.0.0",
|
||||
"tap-spec": "^5.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"typescript": "^3.5.3",
|
||||
"uglify-js": "^3.9.0"
|
||||
},
|
||||
"release": {
|
||||
"branches": [
|
||||
"+([0-9]).x",
|
||||
"main",
|
||||
"next",
|
||||
{
|
||||
"name": "beta",
|
||||
"prerelease": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"renovate": {
|
||||
"extends": [
|
||||
"github>gr2m/.github"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"semver-diff","version":"4.0.0","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1678883672780,"integrity":"sha512-tXxUFv/u7Q/Dku05Eh0bIzwHa+SUcLd9M90IeWIiUnsc3h5C53iXTvnEdFhTflwEr8/5QQutg9SVGYQS+6+R3w==","mode":420,"size":281},"package.json":{"checkedAt":1678883672780,"integrity":"sha512-ECDAGqnE+H6swns0/lN1RkUBiwPiOZmYOVT4ba61EEfqTDVYatuNLX1lBy0SIPRBlePLeTQOCykqzgfjn4ficg==","mode":420,"size":749},"readme.md":{"checkedAt":1678883672780,"integrity":"sha512-sSihy+odCDgr0zVoitKSLwGoFsk0ydnt3qW7DJLxh7F5RoAjN75nke8Kn7dyU3I64I3SQYl7EDJR1fr3QdLv0Q==","mode":420,"size":2005},"index.d.ts":{"checkedAt":1678883672780,"integrity":"sha512-plTU8fMsFAlR9wllsAMPWSRqSbKPcLciWQmSttUm1Qb+2c51m4H5yNifWBcXGHAlzZjnq7Mwgt7SfMMz92Y+4w==","mode":420,"size":1020}}}
|
||||
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
const spinners = Object.assign({}, require('./spinners.json')); // eslint-disable-line import/extensions
|
||||
|
||||
const spinnersList = Object.keys(spinners);
|
||||
|
||||
Object.defineProperty(spinners, 'random', {
|
||||
get() {
|
||||
const randomIndex = Math.floor(Math.random() * spinnersList.length);
|
||||
const spinnerName = spinnersList[randomIndex];
|
||||
return spinners[spinnerName];
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = spinners;
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./_iterate")("forEach");
|
||||
@@ -0,0 +1,77 @@
|
||||
import chalk from 'chalk';
|
||||
|
||||
/**
|
||||
* The paginator returns a subset of the choices if the list is too long.
|
||||
*/
|
||||
|
||||
export default class Paginator {
|
||||
/**
|
||||
* @param {import("./screen-manager")} [screen]
|
||||
* @param {{isInfinite?: boolean}} [options]
|
||||
*/
|
||||
constructor(screen, options = {}) {
|
||||
const { isInfinite = true } = options;
|
||||
this.lastIndex = 0;
|
||||
this.screen = screen;
|
||||
this.isInfinite = isInfinite;
|
||||
}
|
||||
|
||||
paginate(output, active, pageSize) {
|
||||
pageSize = pageSize || 7;
|
||||
let lines = output.split('\n');
|
||||
|
||||
if (this.screen) {
|
||||
lines = this.screen.breakLines(lines);
|
||||
active = lines
|
||||
.map((lineParts) => lineParts.length)
|
||||
.splice(0, active)
|
||||
.reduce((a, b) => a + b, 0);
|
||||
lines = lines.flat();
|
||||
}
|
||||
|
||||
// Make sure there's enough lines to paginate
|
||||
if (lines.length <= pageSize) {
|
||||
return output;
|
||||
}
|
||||
const visibleLines = this.isInfinite
|
||||
? this.getInfiniteLines(lines, active, pageSize)
|
||||
: this.getFiniteLines(lines, active, pageSize);
|
||||
this.lastIndex = active;
|
||||
return (
|
||||
visibleLines.join('\n') +
|
||||
'\n' +
|
||||
chalk.dim('(Move up and down to reveal more choices)')
|
||||
);
|
||||
}
|
||||
|
||||
getInfiniteLines(lines, active, pageSize) {
|
||||
if (this.pointer === undefined) {
|
||||
this.pointer = 0;
|
||||
}
|
||||
const middleOfList = Math.floor(pageSize / 2);
|
||||
// Move the pointer only when the user go down and limit it to the middle of the list
|
||||
if (
|
||||
this.pointer < middleOfList &&
|
||||
this.lastIndex < active &&
|
||||
active - this.lastIndex < pageSize
|
||||
) {
|
||||
this.pointer = Math.min(middleOfList, this.pointer + active - this.lastIndex);
|
||||
}
|
||||
|
||||
// Duplicate the lines so it give an infinite list look
|
||||
const infinite = [lines, lines, lines].flat();
|
||||
const topIndex = Math.max(0, active + lines.length - this.pointer);
|
||||
|
||||
return infinite.splice(topIndex, pageSize);
|
||||
}
|
||||
|
||||
getFiniteLines(lines, active, pageSize) {
|
||||
let topIndex = active - pageSize / 2;
|
||||
if (topIndex < 0) {
|
||||
topIndex = 0;
|
||||
} else if (topIndex + pageSize > lines.length) {
|
||||
topIndex = lines.length - pageSize;
|
||||
}
|
||||
return lines.splice(topIndex, pageSize);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/connect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B;;;OAGG;IACH,SAAS,EAAE,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC;CACjC;AASD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC3D,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EACtC,MAAM,GAAE,aAAa,CAAC,CAAC,CAAkB,GACxC,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAOzC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"52":0.13229,"55":0.01556,"60":0.00389,"65":0.05447,"72":0.00778,"78":0.01556,"80":0.00389,"81":0.00389,"84":0.00778,"91":0.00778,"94":0.00778,"99":0.01167,"100":0.00389,"101":0.00389,"102":0.03891,"103":0.00778,"104":0.06615,"105":0.00389,"106":0.01167,"107":0.03113,"108":0.06615,"109":1.33072,"110":0.98442,"111":0.01946,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 56 57 58 59 61 62 63 64 66 67 68 69 70 71 73 74 75 76 77 79 82 83 85 86 87 88 89 90 92 93 95 96 97 98 112 3.5 3.6"},D:{"29":0.00778,"43":0.00778,"49":0.08171,"50":0.00389,"56":0.01946,"63":0.01556,"64":0.00389,"65":0.00389,"66":0.00389,"67":0.21401,"68":0.01556,"69":0.15953,"70":0.00778,"71":0.00389,"72":0.02335,"73":0.00778,"74":0.01556,"75":0.01167,"76":0.01167,"77":0.00778,"78":0.00778,"79":0.07393,"80":0.01556,"81":0.01167,"83":0.05058,"84":0.03891,"85":0.0428,"86":0.0428,"87":0.0856,"88":0.03113,"89":0.01167,"90":0.01556,"91":0.01946,"92":0.03113,"93":0.01946,"94":0.01556,"95":0.01946,"96":0.03502,"97":0.03113,"98":0.03113,"99":0.03891,"100":0.0428,"101":0.03502,"102":0.05447,"103":0.13619,"104":0.04669,"105":0.28015,"106":0.14008,"107":0.1751,"108":0.59921,"109":15.85583,"110":9.18665,"111":0.01167,"112":0.00778,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 51 52 53 54 55 57 58 59 60 61 62 113"},F:{"28":0.00778,"79":0.01556,"85":0.01946,"89":0.00778,"92":0.00778,"93":0.09728,"94":1.15174,"95":0.75875,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 86 87 88 90 91 9.5-9.6 10.5 10.6 11.1 11.5 11.6 12.1","10.0-10.1":0},B:{"18":0.02724,"84":0.00778,"85":0.00778,"92":0.02724,"105":0.00389,"106":0.00389,"107":0.01556,"108":0.07393,"109":1.14006,"110":1.66924,_:"12 13 14 15 16 17 79 80 81 83 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104"},E:{"4":0,"13":0.00778,"14":0.08949,"15":0.00778,_:"0 5 6 7 8 9 10 11 12 3.1 3.2 6.1 7.1 9.1 10.1 11.1 16.4","5.1":0.07393,"12.1":0.01167,"13.1":0.06226,"14.1":0.10895,"15.1":0.02724,"15.2-15.3":0.01556,"15.4":0.03113,"15.5":0.04669,"15.6":0.18677,"16.0":0.0428,"16.1":0.07782,"16.2":0.16731,"16.3":0.14008},G:{"8":0.00073,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00364,"6.0-6.1":0.00291,"7.0-7.1":0.03926,"8.1-8.4":0.00582,"9.0-9.2":0.00218,"9.3":0.05598,"10.0-10.2":0.00145,"10.3":0.03999,"11.0-11.2":0.00654,"11.3-11.4":0.01381,"12.0-12.1":0.01599,"12.2-12.5":0.29953,"13.0-13.1":0.00945,"13.2":0.00945,"13.3":0.03053,"13.4-13.7":0.09088,"14.0-14.4":0.17957,"14.5-14.8":0.33879,"15.0-15.1":0.11414,"15.2-15.3":0.1614,"15.4":0.20647,"15.5":0.33443,"15.6":0.67831,"16.0":0.81353,"16.1":1.16468,"16.2":1.23956,"16.3":0.76991,"16.4":0.00436},P:{"4":0.28835,"20":0.76208,"5.0-5.4":0.01042,"6.2-6.4":0.0206,"7.2-7.4":0.21627,"8.2":0.02044,"9.2":0.04119,"10.1":0.0217,"11.1-11.2":0.06179,"12.0":0.0206,"13.0":0.10298,"14.0":0.07209,"15.0":0.05149,"16.0":0.08239,"17.0":0.12358,"18.0":0.13388,"19.0":1.56535},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00242,"4.2-4.3":0.0121,"4.4":0,"4.4.3-4.4.4":0.04657},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"8":0.05373,"9":0.01343,"10":0.01791,"11":0.24178,_:"6 7 5.5"},N:{"10":0.03712,"11":0.07423},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.15881},H:{"0":0.399},L:{"0":51.27082},R:{_:"0"},M:{"0":0.16492},Q:{"13.1":0}};
|
||||
@@ -0,0 +1,116 @@
|
||||
import {EventEmitter} from 'events';
|
||||
|
||||
type WithRequiredProperties<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
||||
|
||||
declare class Keyv<Value = any, Options extends Record<string, any> = Record<string, unknown>> extends EventEmitter {
|
||||
/**
|
||||
* `this.opts` is an object containing at least the properties listed
|
||||
* below. However, `Keyv.Options` allows arbitrary properties as well.
|
||||
* These properties can be specified as the second type parameter to `Keyv`.
|
||||
*/
|
||||
opts: WithRequiredProperties<
|
||||
Keyv.Options<Value>,
|
||||
'deserialize' | 'namespace' | 'serialize' | 'store' | 'uri'
|
||||
> &
|
||||
Options;
|
||||
|
||||
/**
|
||||
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
|
||||
*/
|
||||
constructor(options?: Keyv.Options<Value> & Options);
|
||||
/**
|
||||
* @param uri The connection string URI.
|
||||
*
|
||||
* Merged into the options object as options.uri.
|
||||
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
|
||||
*/
|
||||
constructor(uri?: string, options?: Keyv.Options<Value> & Options);
|
||||
|
||||
/** Returns the value. */
|
||||
get<Raw extends boolean = false>(key: string, options?: {raw?: Raw}):
|
||||
Promise<(Raw extends false
|
||||
? Value
|
||||
: Keyv.DeserializedData<Value>) | undefined>;
|
||||
|
||||
/** Returns an array of values. Uses `store.getMany` if it exists, otherwise uses parallel calls to `store.get`. */
|
||||
get<Raw extends boolean = false>(
|
||||
key: string[],
|
||||
options?: {raw?: Raw}
|
||||
): Promise<
|
||||
Array<(Raw extends false ? Value : Keyv.DeserializedData<Value>) | undefined>
|
||||
>;
|
||||
|
||||
/**
|
||||
* Set a value.
|
||||
*
|
||||
* By default keys are persistent. You can set an expiry TTL in milliseconds.
|
||||
*/
|
||||
set(key: string, value: Value, ttl?: number): Promise<true>;
|
||||
/**
|
||||
* Deletes an entry.
|
||||
*
|
||||
* Returns `true` if the key existed, `false` if not.
|
||||
*/
|
||||
delete(key: string | string[]): Promise<boolean>;
|
||||
/** Delete all entries in the current namespace. */
|
||||
clear(): Promise<void>;
|
||||
/** Check if key exists in current namespace. */
|
||||
has(key: string): Promise<boolean>;
|
||||
/** Iterator */
|
||||
iterator(namespace?: string): AsyncGenerator<any, void, any>;
|
||||
/**
|
||||
* Closes the connection.
|
||||
*
|
||||
* Returns `undefined` when the connection closes.
|
||||
*/
|
||||
disconnect(): Promise<void>;
|
||||
}
|
||||
|
||||
declare namespace Keyv {
|
||||
interface Options<Value> {
|
||||
[key: string]: any;
|
||||
|
||||
/** Namespace for the current instance. */
|
||||
namespace?: string | undefined;
|
||||
/** A custom serialization function. */
|
||||
serialize?: ((data: DeserializedData<Value>) => string) | undefined;
|
||||
/** A custom deserialization function. */
|
||||
deserialize?: ((data: string) => DeserializedData<Value> | undefined) | undefined;
|
||||
/** The connection string URI. */
|
||||
uri?: string | undefined;
|
||||
/** The storage adapter instance to be used by Keyv. */
|
||||
store?: Store<string | undefined> | undefined;
|
||||
/** Default TTL. Can be overridden by specififying a TTL on `.set()`. */
|
||||
ttl?: number | undefined;
|
||||
/** Specify an adapter to use. e.g `'redis'` or `'mongodb'`. */
|
||||
adapter?: 'redis' | 'mongodb' | 'mongo' | 'sqlite' | 'postgresql' | 'postgres' | 'mysql' | undefined;
|
||||
/** Enable compression option **/
|
||||
compression?: CompressionAdapter | undefined;
|
||||
}
|
||||
|
||||
interface CompressionAdapter {
|
||||
compress(value: any, options?: any): Promise<any>;
|
||||
decompress(value: any, options?: any): Promise<any>;
|
||||
serialize(value: any): Promise<any>;
|
||||
deserialize(value: any): Promise<any>;
|
||||
}
|
||||
|
||||
interface DeserializedData<Value> {
|
||||
value: Value; expires: number | undefined;
|
||||
}
|
||||
|
||||
type StoredData<Value> = DeserializedData<Value> | string | undefined;
|
||||
|
||||
interface Store<Value> {
|
||||
get(key: string): Value | Promise<Value | undefined> | undefined;
|
||||
set(key: string, value: Value, ttl?: number): any;
|
||||
delete(key: string): boolean | Promise<boolean>;
|
||||
clear(): void | Promise<void>;
|
||||
has?(key: string): boolean | Promise<boolean>;
|
||||
getMany?(
|
||||
keys: string[]
|
||||
): Array<StoredData<Value>> | Promise<Array<StoredData<Value>>> | undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export = Keyv;
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 vincjo
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "semver",
|
||||
"version": "7.3.5",
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "tap",
|
||||
"snap": "tap",
|
||||
"preversion": "npm test",
|
||||
"postversion": "npm publish",
|
||||
"postpublish": "git push origin --follow-tags"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tap": "^14.10.7"
|
||||
},
|
||||
"license": "ISC",
|
||||
"repository": "https://github.com/npm/node-semver",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"files": [
|
||||
"bin/**/*.js",
|
||||
"range.bnf",
|
||||
"classes/**/*.js",
|
||||
"functions/**/*.js",
|
||||
"internal/**/*.js",
|
||||
"ranges/**/*.js",
|
||||
"index.js",
|
||||
"preload.js"
|
||||
],
|
||||
"tap": {
|
||||
"check-coverage": true,
|
||||
"coverage-map": "map.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,682 @@
|
||||
import { _ as _createForOfIteratorHelper, h as _slicedToArray, a as _typeof, b as _createClass, e as _defineProperty, c as _classCallCheck, d as defaultTagPrefix, n as defaultTags } from './PlainValue-b8036b75.js';
|
||||
import { d as YAMLMap, g as resolveMap, Y as YAMLSeq, h as resolveSeq, j as resolveString, c as stringifyString, s as strOptions, S as Scalar, n as nullOptions, a as boolOptions, i as intOptions, k as stringifyNumber, N as Node, A as Alias, P as Pair } from './resolveSeq-492ab440.js';
|
||||
import { b as binary, o as omap, p as pairs, s as set, i as intTime, f as floatTime, t as timestamp, a as warnOptionDeprecation } from './warnings-df54cb69.js';
|
||||
|
||||
function createMap(schema, obj, ctx) {
|
||||
var map = new YAMLMap(schema);
|
||||
|
||||
if (obj instanceof Map) {
|
||||
var _iterator = _createForOfIteratorHelper(obj),
|
||||
_step;
|
||||
|
||||
try {
|
||||
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||
var _step$value = _slicedToArray(_step.value, 2),
|
||||
key = _step$value[0],
|
||||
value = _step$value[1];
|
||||
|
||||
map.items.push(schema.createPair(key, value, ctx));
|
||||
}
|
||||
} catch (err) {
|
||||
_iterator.e(err);
|
||||
} finally {
|
||||
_iterator.f();
|
||||
}
|
||||
} else if (obj && _typeof(obj) === 'object') {
|
||||
for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {
|
||||
var _key = _Object$keys[_i];
|
||||
map.items.push(schema.createPair(_key, obj[_key], ctx));
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof schema.sortMapEntries === 'function') {
|
||||
map.items.sort(schema.sortMapEntries);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
var map = {
|
||||
createNode: createMap,
|
||||
default: true,
|
||||
nodeClass: YAMLMap,
|
||||
tag: 'tag:yaml.org,2002:map',
|
||||
resolve: resolveMap
|
||||
};
|
||||
|
||||
function createSeq(schema, obj, ctx) {
|
||||
var seq = new YAMLSeq(schema);
|
||||
|
||||
if (obj && obj[Symbol.iterator]) {
|
||||
var _iterator = _createForOfIteratorHelper(obj),
|
||||
_step;
|
||||
|
||||
try {
|
||||
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||
var it = _step.value;
|
||||
var v = schema.createNode(it, ctx.wrapScalars, null, ctx);
|
||||
seq.items.push(v);
|
||||
}
|
||||
} catch (err) {
|
||||
_iterator.e(err);
|
||||
} finally {
|
||||
_iterator.f();
|
||||
}
|
||||
}
|
||||
|
||||
return seq;
|
||||
}
|
||||
|
||||
var seq = {
|
||||
createNode: createSeq,
|
||||
default: true,
|
||||
nodeClass: YAMLSeq,
|
||||
tag: 'tag:yaml.org,2002:seq',
|
||||
resolve: resolveSeq
|
||||
};
|
||||
|
||||
var string = {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'string';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:str',
|
||||
resolve: resolveString,
|
||||
stringify: function stringify(item, ctx, onComment, onChompKeep) {
|
||||
ctx = Object.assign({
|
||||
actualString: true
|
||||
}, ctx);
|
||||
return stringifyString(item, ctx, onComment, onChompKeep);
|
||||
},
|
||||
options: strOptions
|
||||
};
|
||||
|
||||
var failsafe = [map, seq, string];
|
||||
|
||||
/* global BigInt */
|
||||
|
||||
var intIdentify$2 = function intIdentify(value) {
|
||||
return typeof value === 'bigint' || Number.isInteger(value);
|
||||
};
|
||||
|
||||
var intResolve$1 = function intResolve(src, part, radix) {
|
||||
return intOptions.asBigInt ? BigInt(src) : parseInt(part, radix);
|
||||
};
|
||||
|
||||
function intStringify$1(node, radix, prefix) {
|
||||
var value = node.value;
|
||||
if (intIdentify$2(value) && value >= 0) return prefix + value.toString(radix);
|
||||
return stringifyNumber(node);
|
||||
}
|
||||
|
||||
var nullObj = {
|
||||
identify: function identify(value) {
|
||||
return value == null;
|
||||
},
|
||||
createNode: function createNode(schema, value, ctx) {
|
||||
return ctx.wrapScalars ? new Scalar(null) : null;
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:null',
|
||||
test: /^(?:~|[Nn]ull|NULL)?$/,
|
||||
resolve: function resolve() {
|
||||
return null;
|
||||
},
|
||||
options: nullOptions,
|
||||
stringify: function stringify() {
|
||||
return nullOptions.nullStr;
|
||||
}
|
||||
};
|
||||
var boolObj = {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'boolean';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:bool',
|
||||
test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
|
||||
resolve: function resolve(str) {
|
||||
return str[0] === 't' || str[0] === 'T';
|
||||
},
|
||||
options: boolOptions,
|
||||
stringify: function stringify(_ref) {
|
||||
var value = _ref.value;
|
||||
return value ? boolOptions.trueStr : boolOptions.falseStr;
|
||||
}
|
||||
};
|
||||
var octObj = {
|
||||
identify: function identify(value) {
|
||||
return intIdentify$2(value) && value >= 0;
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
format: 'OCT',
|
||||
test: /^0o([0-7]+)$/,
|
||||
resolve: function resolve(str, oct) {
|
||||
return intResolve$1(str, oct, 8);
|
||||
},
|
||||
options: intOptions,
|
||||
stringify: function stringify(node) {
|
||||
return intStringify$1(node, 8, '0o');
|
||||
}
|
||||
};
|
||||
var intObj = {
|
||||
identify: intIdentify$2,
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
test: /^[-+]?[0-9]+$/,
|
||||
resolve: function resolve(str) {
|
||||
return intResolve$1(str, str, 10);
|
||||
},
|
||||
options: intOptions,
|
||||
stringify: stringifyNumber
|
||||
};
|
||||
var hexObj = {
|
||||
identify: function identify(value) {
|
||||
return intIdentify$2(value) && value >= 0;
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
format: 'HEX',
|
||||
test: /^0x([0-9a-fA-F]+)$/,
|
||||
resolve: function resolve(str, hex) {
|
||||
return intResolve$1(str, hex, 16);
|
||||
},
|
||||
options: intOptions,
|
||||
stringify: function stringify(node) {
|
||||
return intStringify$1(node, 16, '0x');
|
||||
}
|
||||
};
|
||||
var nanObj = {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'number';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:float',
|
||||
test: /^(?:[-+]?\.inf|(\.nan))$/i,
|
||||
resolve: function resolve(str, nan) {
|
||||
return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;
|
||||
},
|
||||
stringify: stringifyNumber
|
||||
};
|
||||
var expObj = {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'number';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:float',
|
||||
format: 'EXP',
|
||||
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
|
||||
resolve: function resolve(str) {
|
||||
return parseFloat(str);
|
||||
},
|
||||
stringify: function stringify(_ref2) {
|
||||
var value = _ref2.value;
|
||||
return Number(value).toExponential();
|
||||
}
|
||||
};
|
||||
var floatObj = {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'number';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:float',
|
||||
test: /^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,
|
||||
resolve: function resolve(str, frac1, frac2) {
|
||||
var frac = frac1 || frac2;
|
||||
var node = new Scalar(parseFloat(str));
|
||||
if (frac && frac[frac.length - 1] === '0') node.minFractionDigits = frac.length;
|
||||
return node;
|
||||
},
|
||||
stringify: stringifyNumber
|
||||
};
|
||||
var core = failsafe.concat([nullObj, boolObj, octObj, intObj, hexObj, nanObj, expObj, floatObj]);
|
||||
|
||||
/* global BigInt */
|
||||
|
||||
var intIdentify$1 = function intIdentify(value) {
|
||||
return typeof value === 'bigint' || Number.isInteger(value);
|
||||
};
|
||||
|
||||
var stringifyJSON = function stringifyJSON(_ref) {
|
||||
var value = _ref.value;
|
||||
return JSON.stringify(value);
|
||||
};
|
||||
|
||||
var json = [map, seq, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'string';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:str',
|
||||
resolve: resolveString,
|
||||
stringify: stringifyJSON
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return value == null;
|
||||
},
|
||||
createNode: function createNode(schema, value, ctx) {
|
||||
return ctx.wrapScalars ? new Scalar(null) : null;
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:null',
|
||||
test: /^null$/,
|
||||
resolve: function resolve() {
|
||||
return null;
|
||||
},
|
||||
stringify: stringifyJSON
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'boolean';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:bool',
|
||||
test: /^true|false$/,
|
||||
resolve: function resolve(str) {
|
||||
return str === 'true';
|
||||
},
|
||||
stringify: stringifyJSON
|
||||
}, {
|
||||
identify: intIdentify$1,
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
test: /^-?(?:0|[1-9][0-9]*)$/,
|
||||
resolve: function resolve(str) {
|
||||
return intOptions.asBigInt ? BigInt(str) : parseInt(str, 10);
|
||||
},
|
||||
stringify: function stringify(_ref2) {
|
||||
var value = _ref2.value;
|
||||
return intIdentify$1(value) ? value.toString() : JSON.stringify(value);
|
||||
}
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'number';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:float',
|
||||
test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
|
||||
resolve: function resolve(str) {
|
||||
return parseFloat(str);
|
||||
},
|
||||
stringify: stringifyJSON
|
||||
}];
|
||||
|
||||
json.scalarFallback = function (str) {
|
||||
throw new SyntaxError("Unresolved plain scalar ".concat(JSON.stringify(str)));
|
||||
};
|
||||
|
||||
/* global BigInt */
|
||||
|
||||
var boolStringify = function boolStringify(_ref) {
|
||||
var value = _ref.value;
|
||||
return value ? boolOptions.trueStr : boolOptions.falseStr;
|
||||
};
|
||||
|
||||
var intIdentify = function intIdentify(value) {
|
||||
return typeof value === 'bigint' || Number.isInteger(value);
|
||||
};
|
||||
|
||||
function intResolve(sign, src, radix) {
|
||||
var str = src.replace(/_/g, '');
|
||||
|
||||
if (intOptions.asBigInt) {
|
||||
switch (radix) {
|
||||
case 2:
|
||||
str = "0b".concat(str);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
str = "0o".concat(str);
|
||||
break;
|
||||
|
||||
case 16:
|
||||
str = "0x".concat(str);
|
||||
break;
|
||||
}
|
||||
|
||||
var _n = BigInt(str);
|
||||
|
||||
return sign === '-' ? BigInt(-1) * _n : _n;
|
||||
}
|
||||
|
||||
var n = parseInt(str, radix);
|
||||
return sign === '-' ? -1 * n : n;
|
||||
}
|
||||
|
||||
function intStringify(node, radix, prefix) {
|
||||
var value = node.value;
|
||||
|
||||
if (intIdentify(value)) {
|
||||
var str = value.toString(radix);
|
||||
return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;
|
||||
}
|
||||
|
||||
return stringifyNumber(node);
|
||||
}
|
||||
|
||||
var yaml11 = failsafe.concat([{
|
||||
identify: function identify(value) {
|
||||
return value == null;
|
||||
},
|
||||
createNode: function createNode(schema, value, ctx) {
|
||||
return ctx.wrapScalars ? new Scalar(null) : null;
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:null',
|
||||
test: /^(?:~|[Nn]ull|NULL)?$/,
|
||||
resolve: function resolve() {
|
||||
return null;
|
||||
},
|
||||
options: nullOptions,
|
||||
stringify: function stringify() {
|
||||
return nullOptions.nullStr;
|
||||
}
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'boolean';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:bool',
|
||||
test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
|
||||
resolve: function resolve() {
|
||||
return true;
|
||||
},
|
||||
options: boolOptions,
|
||||
stringify: boolStringify
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'boolean';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:bool',
|
||||
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,
|
||||
resolve: function resolve() {
|
||||
return false;
|
||||
},
|
||||
options: boolOptions,
|
||||
stringify: boolStringify
|
||||
}, {
|
||||
identify: intIdentify,
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
format: 'BIN',
|
||||
test: /^([-+]?)0b([0-1_]+)$/,
|
||||
resolve: function resolve(str, sign, bin) {
|
||||
return intResolve(sign, bin, 2);
|
||||
},
|
||||
stringify: function stringify(node) {
|
||||
return intStringify(node, 2, '0b');
|
||||
}
|
||||
}, {
|
||||
identify: intIdentify,
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
format: 'OCT',
|
||||
test: /^([-+]?)0([0-7_]+)$/,
|
||||
resolve: function resolve(str, sign, oct) {
|
||||
return intResolve(sign, oct, 8);
|
||||
},
|
||||
stringify: function stringify(node) {
|
||||
return intStringify(node, 8, '0');
|
||||
}
|
||||
}, {
|
||||
identify: intIdentify,
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
test: /^([-+]?)([0-9][0-9_]*)$/,
|
||||
resolve: function resolve(str, sign, abs) {
|
||||
return intResolve(sign, abs, 10);
|
||||
},
|
||||
stringify: stringifyNumber
|
||||
}, {
|
||||
identify: intIdentify,
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:int',
|
||||
format: 'HEX',
|
||||
test: /^([-+]?)0x([0-9a-fA-F_]+)$/,
|
||||
resolve: function resolve(str, sign, hex) {
|
||||
return intResolve(sign, hex, 16);
|
||||
},
|
||||
stringify: function stringify(node) {
|
||||
return intStringify(node, 16, '0x');
|
||||
}
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'number';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:float',
|
||||
test: /^(?:[-+]?\.inf|(\.nan))$/i,
|
||||
resolve: function resolve(str, nan) {
|
||||
return nan ? NaN : str[0] === '-' ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;
|
||||
},
|
||||
stringify: stringifyNumber
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'number';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:float',
|
||||
format: 'EXP',
|
||||
test: /^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,
|
||||
resolve: function resolve(str) {
|
||||
return parseFloat(str.replace(/_/g, ''));
|
||||
},
|
||||
stringify: function stringify(_ref2) {
|
||||
var value = _ref2.value;
|
||||
return Number(value).toExponential();
|
||||
}
|
||||
}, {
|
||||
identify: function identify(value) {
|
||||
return typeof value === 'number';
|
||||
},
|
||||
default: true,
|
||||
tag: 'tag:yaml.org,2002:float',
|
||||
test: /^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,
|
||||
resolve: function resolve(str, frac) {
|
||||
var node = new Scalar(parseFloat(str.replace(/_/g, '')));
|
||||
|
||||
if (frac) {
|
||||
var f = frac.replace(/_/g, '');
|
||||
if (f[f.length - 1] === '0') node.minFractionDigits = f.length;
|
||||
}
|
||||
|
||||
return node;
|
||||
},
|
||||
stringify: stringifyNumber
|
||||
}], binary, omap, pairs, set, intTime, floatTime, timestamp);
|
||||
|
||||
var schemas = {
|
||||
core: core,
|
||||
failsafe: failsafe,
|
||||
json: json,
|
||||
yaml11: yaml11
|
||||
};
|
||||
var tags = {
|
||||
binary: binary,
|
||||
bool: boolObj,
|
||||
float: floatObj,
|
||||
floatExp: expObj,
|
||||
floatNaN: nanObj,
|
||||
floatTime: floatTime,
|
||||
int: intObj,
|
||||
intHex: hexObj,
|
||||
intOct: octObj,
|
||||
intTime: intTime,
|
||||
map: map,
|
||||
null: nullObj,
|
||||
omap: omap,
|
||||
pairs: pairs,
|
||||
seq: seq,
|
||||
set: set,
|
||||
timestamp: timestamp
|
||||
};
|
||||
|
||||
function findTagObject(value, tagName, tags) {
|
||||
if (tagName) {
|
||||
var match = tags.filter(function (t) {
|
||||
return t.tag === tagName;
|
||||
});
|
||||
var tagObj = match.find(function (t) {
|
||||
return !t.format;
|
||||
}) || match[0];
|
||||
if (!tagObj) throw new Error("Tag ".concat(tagName, " not found"));
|
||||
return tagObj;
|
||||
} // TODO: deprecate/remove class check
|
||||
|
||||
|
||||
return tags.find(function (t) {
|
||||
return (t.identify && t.identify(value) || t.class && value instanceof t.class) && !t.format;
|
||||
});
|
||||
}
|
||||
|
||||
function createNode(value, tagName, ctx) {
|
||||
if (value instanceof Node) return value;
|
||||
var defaultPrefix = ctx.defaultPrefix,
|
||||
onTagObj = ctx.onTagObj,
|
||||
prevObjects = ctx.prevObjects,
|
||||
schema = ctx.schema,
|
||||
wrapScalars = ctx.wrapScalars;
|
||||
if (tagName && tagName.startsWith('!!')) tagName = defaultPrefix + tagName.slice(2);
|
||||
var tagObj = findTagObject(value, tagName, schema.tags);
|
||||
|
||||
if (!tagObj) {
|
||||
if (typeof value.toJSON === 'function') value = value.toJSON();
|
||||
if (!value || _typeof(value) !== 'object') return wrapScalars ? new Scalar(value) : value;
|
||||
tagObj = value instanceof Map ? map : value[Symbol.iterator] ? seq : map;
|
||||
}
|
||||
|
||||
if (onTagObj) {
|
||||
onTagObj(tagObj);
|
||||
delete ctx.onTagObj;
|
||||
} // Detect duplicate references to the same object & use Alias nodes for all
|
||||
// after first. The `obj` wrapper allows for circular references to resolve.
|
||||
|
||||
|
||||
var obj = {
|
||||
value: undefined,
|
||||
node: undefined
|
||||
};
|
||||
|
||||
if (value && _typeof(value) === 'object' && prevObjects) {
|
||||
var prev = prevObjects.get(value);
|
||||
|
||||
if (prev) {
|
||||
var alias = new Alias(prev); // leaves source dirty; must be cleaned by caller
|
||||
|
||||
ctx.aliasNodes.push(alias); // defined along with prevObjects
|
||||
|
||||
return alias;
|
||||
}
|
||||
|
||||
obj.value = value;
|
||||
prevObjects.set(value, obj);
|
||||
}
|
||||
|
||||
obj.node = tagObj.createNode ? tagObj.createNode(ctx.schema, value, ctx) : wrapScalars ? new Scalar(value) : value;
|
||||
if (tagName && obj.node instanceof Node) obj.node.tag = tagName;
|
||||
return obj.node;
|
||||
}
|
||||
|
||||
function getSchemaTags(schemas, knownTags, customTags, schemaId) {
|
||||
var tags = schemas[schemaId.replace(/\W/g, '')]; // 'yaml-1.1' -> 'yaml11'
|
||||
|
||||
if (!tags) {
|
||||
var keys = Object.keys(schemas).map(function (key) {
|
||||
return JSON.stringify(key);
|
||||
}).join(', ');
|
||||
throw new Error("Unknown schema \"".concat(schemaId, "\"; use one of ").concat(keys));
|
||||
}
|
||||
|
||||
if (Array.isArray(customTags)) {
|
||||
var _iterator = _createForOfIteratorHelper(customTags),
|
||||
_step;
|
||||
|
||||
try {
|
||||
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||
var tag = _step.value;
|
||||
tags = tags.concat(tag);
|
||||
}
|
||||
} catch (err) {
|
||||
_iterator.e(err);
|
||||
} finally {
|
||||
_iterator.f();
|
||||
}
|
||||
} else if (typeof customTags === 'function') {
|
||||
tags = customTags(tags.slice());
|
||||
}
|
||||
|
||||
for (var i = 0; i < tags.length; ++i) {
|
||||
var _tag = tags[i];
|
||||
|
||||
if (typeof _tag === 'string') {
|
||||
var tagObj = knownTags[_tag];
|
||||
|
||||
if (!tagObj) {
|
||||
var _keys = Object.keys(knownTags).map(function (key) {
|
||||
return JSON.stringify(key);
|
||||
}).join(', ');
|
||||
|
||||
throw new Error("Unknown custom tag \"".concat(_tag, "\"; use one of ").concat(_keys));
|
||||
}
|
||||
|
||||
tags[i] = tagObj;
|
||||
}
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
var sortMapEntriesByKey = function sortMapEntriesByKey(a, b) {
|
||||
return a.key < b.key ? -1 : a.key > b.key ? 1 : 0;
|
||||
};
|
||||
|
||||
var Schema = /*#__PURE__*/function () {
|
||||
// TODO: remove in v2
|
||||
// TODO: remove in v2
|
||||
function Schema(_ref) {
|
||||
var customTags = _ref.customTags,
|
||||
merge = _ref.merge,
|
||||
schema = _ref.schema,
|
||||
sortMapEntries = _ref.sortMapEntries,
|
||||
deprecatedCustomTags = _ref.tags;
|
||||
|
||||
_classCallCheck(this, Schema);
|
||||
|
||||
this.merge = !!merge;
|
||||
this.name = schema;
|
||||
this.sortMapEntries = sortMapEntries === true ? sortMapEntriesByKey : sortMapEntries || null;
|
||||
if (!customTags && deprecatedCustomTags) warnOptionDeprecation('tags', 'customTags');
|
||||
this.tags = getSchemaTags(schemas, tags, customTags || deprecatedCustomTags, schema);
|
||||
}
|
||||
|
||||
_createClass(Schema, [{
|
||||
key: "createNode",
|
||||
value: function createNode$1(value, wrapScalars, tagName, ctx) {
|
||||
var baseCtx = {
|
||||
defaultPrefix: Schema.defaultPrefix,
|
||||
schema: this,
|
||||
wrapScalars: wrapScalars
|
||||
};
|
||||
var createCtx = ctx ? Object.assign(ctx, baseCtx) : baseCtx;
|
||||
return createNode(value, tagName, createCtx);
|
||||
}
|
||||
}, {
|
||||
key: "createPair",
|
||||
value: function createPair(key, value, ctx) {
|
||||
if (!ctx) ctx = {
|
||||
wrapScalars: true
|
||||
};
|
||||
var k = this.createNode(key, ctx.wrapScalars, null, ctx);
|
||||
var v = this.createNode(value, ctx.wrapScalars, null, ctx);
|
||||
return new Pair(k, v);
|
||||
}
|
||||
}]);
|
||||
|
||||
return Schema;
|
||||
}();
|
||||
|
||||
_defineProperty(Schema, "defaultPrefix", defaultTagPrefix);
|
||||
|
||||
_defineProperty(Schema, "defaultTags", defaultTags);
|
||||
|
||||
export { Schema as S };
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
var Converter_1 = require("./Converter");
|
||||
var helper = function (param, options) {
|
||||
return new Converter_1.Converter(param, options);
|
||||
};
|
||||
helper["csv"] = helper;
|
||||
helper["Converter"] = Converter_1.Converter;
|
||||
module.exports = helper;
|
||||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy9pbmRleC50cyIsInNvdXJjZXMiOlsiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBRUEseUNBQXdDO0FBRXhDLElBQU0sTUFBTSxHQUFHLFVBQVUsS0FBOEIsRUFBRSxPQUEwQjtJQUNqRixPQUFPLElBQUkscUJBQVMsQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDdkMsQ0FBQyxDQUFBO0FBQ0QsTUFBTSxDQUFDLEtBQUssQ0FBQyxHQUFHLE1BQU0sQ0FBQztBQUN2QixNQUFNLENBQUMsV0FBVyxDQUFDLEdBQUcscUJBQVMsQ0FBQztBQUNoQyxpQkFBUSxNQUFNLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBUcmFuc2Zvcm1PcHRpb25zIH0gZnJvbSBcInN0cmVhbVwiO1xuaW1wb3J0IHsgQ1NWUGFyc2VQYXJhbSB9IGZyb20gXCIuL1BhcmFtZXRlcnNcIjtcbmltcG9ydCB7IENvbnZlcnRlciB9IGZyb20gXCIuL0NvbnZlcnRlclwiO1xuXG5jb25zdCBoZWxwZXIgPSBmdW5jdGlvbiAocGFyYW0/OiBQYXJ0aWFsPENTVlBhcnNlUGFyYW0+LCBvcHRpb25zPzogVHJhbnNmb3JtT3B0aW9ucyk6IENvbnZlcnRlciB7XG4gIHJldHVybiBuZXcgQ29udmVydGVyKHBhcmFtLCBvcHRpb25zKTtcbn1cbmhlbHBlcltcImNzdlwiXSA9IGhlbHBlcjtcbmhlbHBlcltcIkNvbnZlcnRlclwiXSA9IENvbnZlcnRlcjtcbmV4cG9ydCA9aGVscGVyO1xuIl19
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"name": "which-typed-array",
|
||||
"version": "1.1.9",
|
||||
"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": "Which kind of Typed Array is this JavaScript value? Works cross-realm, without `instanceof`, and despite Symbol.toStringTag.",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"pretest": "npm run --silent lint",
|
||||
"test": "npm run tests-only && npm run test:harmony",
|
||||
"tests-only": "nyc tape test",
|
||||
"test:harmony": "nyc node --harmony --es-staging test",
|
||||
"posttest": "aud --production",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"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)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/inspect-js/which-typed-array.git"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"TypedArray",
|
||||
"typed array",
|
||||
"which",
|
||||
"typed",
|
||||
"Int8Array",
|
||||
"Uint8Array",
|
||||
"Uint8ClampedArray",
|
||||
"Int16Array",
|
||||
"Uint16Array",
|
||||
"Int32Array",
|
||||
"Uint32Array",
|
||||
"Float32Array",
|
||||
"Float64Array",
|
||||
"ES6",
|
||||
"toStringTag",
|
||||
"Symbol.toStringTag",
|
||||
"@@toStringTag"
|
||||
],
|
||||
"dependencies": {
|
||||
"available-typed-arrays": "^1.0.5",
|
||||
"call-bind": "^1.0.2",
|
||||
"for-each": "^0.3.3",
|
||||
"gopd": "^1.0.1",
|
||||
"has-tostringtag": "^1.0.0",
|
||||
"is-typed-array": "^1.1.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^21.0.0",
|
||||
"aud": "^2.0.1",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "=8.8.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"is-callable": "^1.2.7",
|
||||
"make-arrow-function": "^1.2.0",
|
||||
"make-generator-function": "^2.0.0",
|
||||
"npmignore": "^0.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.6.1"
|
||||
},
|
||||
"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
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"levn","version":"0.3.0","files":{"LICENSE":{"checkedAt":1678883672135,"integrity":"sha512-FkymZYtx329CmIaO3HdzaHZ6WrL5BZj/NGLWVaM6TuNvsbYcBnTjOd6Yzvi6lJfLVAW0oJGhl8mK9EKILopYDg==","mode":436,"size":1054},"package.json":{"checkedAt":1678883672263,"integrity":"sha512-GW+k54dXvr4NBaLUtWxBXXXnM06U2/EN6cYyr+AZduK3b0A4YiG2Ppbvnhdmf5pTKfsj2CoSXM4FsoPytdUG9w==","mode":436,"size":927},"README.md":{"checkedAt":1678883672263,"integrity":"sha512-p3kQ1Mw/z5WD3q/Z5MwXzuD9+QFWa18Dg8xOSnZZp60KLitcutU2CaS1DA6Y+h+cG1g4+TwBlTN04QKO5ZetpA==","mode":436,"size":10468},"lib/coerce.js":{"checkedAt":1678883672269,"integrity":"sha512-u/cRVG2Gj+y6MdLxeWYbenyBtP+JAcVXbMDeuZFrzqJpPr4S8P3W0eskV3GjycPiwQX9MBDkw9pCaQC/IqOSgg==","mode":436,"size":6435},"lib/cast.js":{"checkedAt":1678883672269,"integrity":"sha512-ItuIaHQY7bWDjTRgBvuNXVM4jwLDba0+i8GHcWCbAk6rr7owpx3E8TFRLAkW/oZNd+3+AfC+7oD4UYzdUJse+A==","mode":436,"size":7067},"lib/index.js":{"checkedAt":1678883672269,"integrity":"sha512-BqYdNqE/vHTRk21dKJN5ANSvljKK1gZf375WvGkFiW5coeJcc8Zrb1BQ+7+SMFeGXi8qGIGNxhGPPXXB07XgSg==","mode":436,"size":788},"lib/parse-string.js":{"checkedAt":1678883672271,"integrity":"sha512-Afh2g2rQpI+5/NJIAZ/MczGLATfPcURozTvjB64HwgbLIkfc1dT3mQMJSCCiJKk9+nywTQY88G23zCKkpB2z7g==","mode":436,"size":3912},"lib/parse.js":{"checkedAt":1678883672271,"integrity":"sha512-tliAaz1wDf37ucDVT9rWCiWx4zTa44RRgZM6tQ6NUzaauq1q6IyLgMPIEYGA2i6n2Ejp71Ks38vqdqh54JwR0A==","mode":436,"size":3381}}}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { __read, __spreadArray } from "tslib";
|
||||
import { zip } from './zip';
|
||||
export function zipWith() {
|
||||
var otherInputs = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
otherInputs[_i] = arguments[_i];
|
||||
}
|
||||
return zip.apply(void 0, __spreadArray([], __read(otherInputs)));
|
||||
}
|
||||
//# sourceMappingURL=zipWith.js.map
|
||||
@@ -0,0 +1,27 @@
|
||||
var baseIsTypedArray = require('./_baseIsTypedArray'),
|
||||
baseUnary = require('./_baseUnary'),
|
||||
nodeUtil = require('./_nodeUtil');
|
||||
|
||||
/* Node.js helper references. */
|
||||
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a typed array.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isTypedArray(new Uint8Array);
|
||||
* // => true
|
||||
*
|
||||
* _.isTypedArray([]);
|
||||
* // => false
|
||||
*/
|
||||
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
||||
|
||||
module.exports = isTypedArray;
|
||||
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: ()=>_default
|
||||
});
|
||||
const _plugin = require("./plugin");
|
||||
const _default = Object.assign(function(opts) {
|
||||
return {
|
||||
postcssPlugin: "tailwindcss/nesting",
|
||||
Once (root, { result }) {
|
||||
return (0, _plugin.nesting)(opts)(root, result);
|
||||
}
|
||||
};
|
||||
}, {
|
||||
postcss: true
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (t, a, d) {
|
||||
var invoked;
|
||||
|
||||
a(t(function () {
|
||||
a(arguments.length, 0, "Arguments");
|
||||
invoked = true;
|
||||
}), undefined, "Return");
|
||||
a(invoked, undefined, "Is not run immediately");
|
||||
setTimeout(function () {
|
||||
a(invoked, true, "Run in next tick");
|
||||
invoked = [];
|
||||
t(function () { invoked.push(0); });
|
||||
t(function () { invoked.push(1); });
|
||||
t(function () { invoked.push(2); });
|
||||
setTimeout(function () {
|
||||
a.deep(invoked, [0, 1, 2], "Serial");
|
||||
d();
|
||||
}, 10);
|
||||
}, 10);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isDate.js","sourceRoot":"","sources":["../../../../src/internal/util/isDate.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,KAAY,CAAC,CAAC;AACvD,CAAC"}
|
||||
Reference in New Issue
Block a user