new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"name": "auto-changelog",
|
||||
"version": "2.4.0",
|
||||
"description": "Command line tool for generating a changelog from git tags and commit history",
|
||||
"main": "./src/index.js",
|
||||
"bin": {
|
||||
"auto-changelog": "./src/index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.3"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "standard --verbose | snazzy",
|
||||
"lint-fix": "standard --fix",
|
||||
"lint-markdown": "markdownlint README.md test/data/*.md",
|
||||
"test": "cross-env NODE_ENV=test mocha -r @babel/register test",
|
||||
"test-coverage": "cross-env NODE_ENV=test nyc mocha test",
|
||||
"report-coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json",
|
||||
"preversion": "npm run lint && npm run test",
|
||||
"version": "node src/index.js --package && git add CHANGELOG.md",
|
||||
"generate-test-data": "cross-env NODE_ENV=test node scripts/generate-test-data.js"
|
||||
},
|
||||
"author": "Pete Cook <pete@cookpete.com> (https://github.com/cookpete)",
|
||||
"homepage": "https://github.com/CookPete/auto-changelog",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/CookPete/auto-changelog.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/CookPete/auto-changelog/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"auto",
|
||||
"automatic",
|
||||
"changelog",
|
||||
"change",
|
||||
"log",
|
||||
"generator",
|
||||
"git",
|
||||
"commit",
|
||||
"commits",
|
||||
"history"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commander": "^7.2.0",
|
||||
"handlebars": "^4.7.7",
|
||||
"node-fetch": "^2.6.1",
|
||||
"parse-github-url": "^1.0.2",
|
||||
"semver": "^7.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/register": "^7.13.16",
|
||||
"babel-plugin-istanbul": "^6.0.0",
|
||||
"babel-plugin-rewire": "^1.2.0",
|
||||
"chai": "^4.3.4",
|
||||
"codecov": "^3.8.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"markdownlint-cli": "^0.30.0",
|
||||
"mocha": "^9.2.0",
|
||||
"nyc": "^15.1.0",
|
||||
"snazzy": "^9.0.0",
|
||||
"standard": "^16.0.3"
|
||||
},
|
||||
"babel": {
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": [
|
||||
"istanbul",
|
||||
"rewire"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"standard": {
|
||||
"ignore": [
|
||||
"test/data/"
|
||||
]
|
||||
},
|
||||
"nyc": {
|
||||
"all": true,
|
||||
"include": "src",
|
||||
"exclude": "src/index.js",
|
||||
"sourceMap": false,
|
||||
"instrument": false,
|
||||
"report-dir": "./coverage",
|
||||
"temp-dir": "./coverage/.nyc_output",
|
||||
"require": [
|
||||
"@babel/register"
|
||||
],
|
||||
"reporter": [
|
||||
"text",
|
||||
"html"
|
||||
]
|
||||
},
|
||||
"auto-changelog": {
|
||||
"breakingPattern": "Breaking change"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
export type TrackHasScanStationsError = {
|
||||
name: string;
|
||||
message: string;
|
||||
};
|
||||
@@ -0,0 +1,97 @@
|
||||
declare namespace QuickLRU {
|
||||
interface Options<KeyType, ValueType> {
|
||||
/**
|
||||
The maximum number of items before evicting the least recently used items.
|
||||
*/
|
||||
readonly maxSize: number;
|
||||
|
||||
/**
|
||||
Called right before an item is evicted from the cache.
|
||||
|
||||
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
|
||||
*/
|
||||
onEviction?: (key: KeyType, value: ValueType) => void;
|
||||
}
|
||||
}
|
||||
|
||||
declare class QuickLRU<KeyType, ValueType>
|
||||
implements Iterable<[KeyType, ValueType]> {
|
||||
/**
|
||||
The stored item count.
|
||||
*/
|
||||
readonly size: number;
|
||||
|
||||
/**
|
||||
Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29).
|
||||
|
||||
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
|
||||
|
||||
@example
|
||||
```
|
||||
import QuickLRU = require('quick-lru');
|
||||
|
||||
const lru = new QuickLRU({maxSize: 1000});
|
||||
|
||||
lru.set('🦄', '🌈');
|
||||
|
||||
lru.has('🦄');
|
||||
//=> true
|
||||
|
||||
lru.get('🦄');
|
||||
//=> '🌈'
|
||||
```
|
||||
*/
|
||||
constructor(options: QuickLRU.Options<KeyType, ValueType>);
|
||||
|
||||
[Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
|
||||
|
||||
/**
|
||||
Set an item.
|
||||
|
||||
@returns The list instance.
|
||||
*/
|
||||
set(key: KeyType, value: ValueType): this;
|
||||
|
||||
/**
|
||||
Get an item.
|
||||
|
||||
@returns The stored item or `undefined`.
|
||||
*/
|
||||
get(key: KeyType): ValueType | undefined;
|
||||
|
||||
/**
|
||||
Check if an item exists.
|
||||
*/
|
||||
has(key: KeyType): boolean;
|
||||
|
||||
/**
|
||||
Get an item without marking it as recently used.
|
||||
|
||||
@returns The stored item or `undefined`.
|
||||
*/
|
||||
peek(key: KeyType): ValueType | undefined;
|
||||
|
||||
/**
|
||||
Delete an item.
|
||||
|
||||
@returns `true` if the item is removed or `false` if the item doesn't exist.
|
||||
*/
|
||||
delete(key: KeyType): boolean;
|
||||
|
||||
/**
|
||||
Delete all items.
|
||||
*/
|
||||
clear(): void;
|
||||
|
||||
/**
|
||||
Iterable for all the keys.
|
||||
*/
|
||||
keys(): IterableIterator<KeyType>;
|
||||
|
||||
/**
|
||||
Iterable for all the values.
|
||||
*/
|
||||
values(): IterableIterator<ValueType>;
|
||||
}
|
||||
|
||||
export = QuickLRU;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
import { EndpointDefaults } from "@octokit/types";
|
||||
export declare const DEFAULTS: EndpointDefaults;
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Anton Kastritskiy
|
||||
|
||||
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,8 @@
|
||||
"use strict";
|
||||
|
||||
var d = require("d");
|
||||
|
||||
Object.defineProperties(exports, {
|
||||
width: d.gs("ce", function () { return process.stdout.columns || 0; }),
|
||||
height: d.gs("ce", function () { return process.stdout.rows || 0; })
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[1254] = (function(){ var d = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~€<7F>‚ƒ„…†‡ˆ‰Š‹Œ<E280B9><C592><EFBFBD><EFBFBD>‘’“”•–—˜™š›œ<E280BA><C593>Ÿ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖרÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1,140 @@
|
||||
export var alpha = {
|
||||
'en-US': /^[A-Z]+$/i,
|
||||
'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
||||
'bg-BG': /^[А-Я]+$/i,
|
||||
'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
||||
'da-DK': /^[A-ZÆØÅ]+$/i,
|
||||
'de-DE': /^[A-ZÄÖÜß]+$/i,
|
||||
'el-GR': /^[Α-ώ]+$/i,
|
||||
'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i,
|
||||
'fa-IR': /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,
|
||||
'fi-FI': /^[A-ZÅÄÖ]+$/i,
|
||||
'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
||||
'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
||||
'ja-JP': /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
||||
'nb-NO': /^[A-ZÆØÅ]+$/i,
|
||||
'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i,
|
||||
'nn-NO': /^[A-ZÆØÅ]+$/i,
|
||||
'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
||||
'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
||||
'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
||||
'ru-RU': /^[А-ЯЁ]+$/i,
|
||||
'sl-SI': /^[A-ZČĆĐŠŽ]+$/i,
|
||||
'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
||||
'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i,
|
||||
'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i,
|
||||
'sv-SE': /^[A-ZÅÄÖ]+$/i,
|
||||
'th-TH': /^[ก-๐\s]+$/i,
|
||||
'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
|
||||
'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,
|
||||
'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
||||
'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
||||
'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
||||
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
||||
he: /^[א-ת]+$/,
|
||||
fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,
|
||||
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
||||
'hi-IN': /^[\u0900-\u0961]+[\u0972-\u097F]*$/i,
|
||||
'si-LK': /^[\u0D80-\u0DFF]+$/
|
||||
};
|
||||
export var alphanumeric = {
|
||||
'en-US': /^[0-9A-Z]+$/i,
|
||||
'az-AZ': /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,
|
||||
'bg-BG': /^[0-9А-Я]+$/i,
|
||||
'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
|
||||
'da-DK': /^[0-9A-ZÆØÅ]+$/i,
|
||||
'de-DE': /^[0-9A-ZÄÖÜß]+$/i,
|
||||
'el-GR': /^[0-9Α-ω]+$/i,
|
||||
'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
|
||||
'fi-FI': /^[0-9A-ZÅÄÖ]+$/i,
|
||||
'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
|
||||
'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
|
||||
'ja-JP': /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,
|
||||
'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
||||
'nb-NO': /^[0-9A-ZÆØÅ]+$/i,
|
||||
'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
|
||||
'nn-NO': /^[0-9A-ZÆØÅ]+$/i,
|
||||
'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
||||
'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
||||
'ru-RU': /^[0-9А-ЯЁ]+$/i,
|
||||
'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i,
|
||||
'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
||||
'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i,
|
||||
'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
|
||||
'sv-SE': /^[0-9A-ZÅÄÖ]+$/i,
|
||||
'th-TH': /^[ก-๙\s]+$/i,
|
||||
'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
|
||||
'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
|
||||
'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
|
||||
'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
||||
'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
|
||||
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
||||
he: /^[0-9א-ת]+$/,
|
||||
fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
|
||||
bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,
|
||||
'hi-IN': /^[\u0900-\u0963]+[\u0966-\u097F]*$/i,
|
||||
'si-LK': /^[0-9\u0D80-\u0DFF]+$/
|
||||
};
|
||||
export var decimal = {
|
||||
'en-US': '.',
|
||||
ar: '٫'
|
||||
};
|
||||
export var englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM'];
|
||||
|
||||
for (var locale, i = 0; i < englishLocales.length; i++) {
|
||||
locale = "en-".concat(englishLocales[i]);
|
||||
alpha[locale] = alpha['en-US'];
|
||||
alphanumeric[locale] = alphanumeric['en-US'];
|
||||
decimal[locale] = decimal['en-US'];
|
||||
} // Source: http://www.localeplanet.com/java/
|
||||
|
||||
|
||||
export var arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY', 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE'];
|
||||
|
||||
for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
|
||||
_locale = "ar-".concat(arabicLocales[_i]);
|
||||
alpha[_locale] = alpha.ar;
|
||||
alphanumeric[_locale] = alphanumeric.ar;
|
||||
decimal[_locale] = decimal.ar;
|
||||
}
|
||||
|
||||
export var farsiLocales = ['IR', 'AF'];
|
||||
|
||||
for (var _locale2, _i2 = 0; _i2 < farsiLocales.length; _i2++) {
|
||||
_locale2 = "fa-".concat(farsiLocales[_i2]);
|
||||
alphanumeric[_locale2] = alphanumeric.fa;
|
||||
decimal[_locale2] = decimal.ar;
|
||||
}
|
||||
|
||||
export var bengaliLocales = ['BD', 'IN'];
|
||||
|
||||
for (var _locale3, _i3 = 0; _i3 < bengaliLocales.length; _i3++) {
|
||||
_locale3 = "bn-".concat(bengaliLocales[_i3]);
|
||||
alpha[_locale3] = alpha.bn;
|
||||
alphanumeric[_locale3] = alphanumeric.bn;
|
||||
decimal[_locale3] = decimal['en-US'];
|
||||
} // Source: https://en.wikipedia.org/wiki/Decimal_mark
|
||||
|
||||
|
||||
export var dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY'];
|
||||
export var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'es-ES', 'fr-CA', 'fr-FR', 'id-ID', 'it-IT', 'ku-IQ', 'hi-IN', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN'];
|
||||
|
||||
for (var _i4 = 0; _i4 < dotDecimal.length; _i4++) {
|
||||
decimal[dotDecimal[_i4]] = decimal['en-US'];
|
||||
}
|
||||
|
||||
for (var _i5 = 0; _i5 < commaDecimal.length; _i5++) {
|
||||
decimal[commaDecimal[_i5]] = ',';
|
||||
}
|
||||
|
||||
alpha['fr-CA'] = alpha['fr-FR'];
|
||||
alphanumeric['fr-CA'] = alphanumeric['fr-FR'];
|
||||
alpha['pt-BR'] = alpha['pt-PT'];
|
||||
alphanumeric['pt-BR'] = alphanumeric['pt-PT'];
|
||||
decimal['pt-BR'] = decimal['pt-PT']; // see #862
|
||||
|
||||
alpha['pl-Pl'] = alpha['pl-PL'];
|
||||
alphanumeric['pl-Pl'] = alphanumeric['pl-PL'];
|
||||
decimal['pl-Pl'] = decimal['pl-PL']; // see #1455
|
||||
|
||||
alpha['fa-AF'] = alpha.fa;
|
||||
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.mergeInternals = void 0;
|
||||
var innerFrom_1 = require("../observable/innerFrom");
|
||||
var executeSchedule_1 = require("../util/executeSchedule");
|
||||
var OperatorSubscriber_1 = require("./OperatorSubscriber");
|
||||
function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
|
||||
var buffer = [];
|
||||
var active = 0;
|
||||
var index = 0;
|
||||
var isComplete = false;
|
||||
var checkComplete = function () {
|
||||
if (isComplete && !buffer.length && !active) {
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
var outerNext = function (value) { return (active < concurrent ? doInnerSub(value) : buffer.push(value)); };
|
||||
var doInnerSub = function (value) {
|
||||
expand && subscriber.next(value);
|
||||
active++;
|
||||
var innerComplete = false;
|
||||
innerFrom_1.innerFrom(project(value, index++)).subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (innerValue) {
|
||||
onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
|
||||
if (expand) {
|
||||
outerNext(innerValue);
|
||||
}
|
||||
else {
|
||||
subscriber.next(innerValue);
|
||||
}
|
||||
}, function () {
|
||||
innerComplete = true;
|
||||
}, undefined, function () {
|
||||
if (innerComplete) {
|
||||
try {
|
||||
active--;
|
||||
var _loop_1 = function () {
|
||||
var bufferedValue = buffer.shift();
|
||||
if (innerSubScheduler) {
|
||||
executeSchedule_1.executeSchedule(subscriber, innerSubScheduler, function () { return doInnerSub(bufferedValue); });
|
||||
}
|
||||
else {
|
||||
doInnerSub(bufferedValue);
|
||||
}
|
||||
};
|
||||
while (buffer.length && active < concurrent) {
|
||||
_loop_1();
|
||||
}
|
||||
checkComplete();
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
}
|
||||
}
|
||||
}));
|
||||
};
|
||||
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, outerNext, function () {
|
||||
isComplete = true;
|
||||
checkComplete();
|
||||
}));
|
||||
return function () {
|
||||
additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
|
||||
};
|
||||
}
|
||||
exports.mergeInternals = mergeInternals;
|
||||
//# sourceMappingURL=mergeInternals.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
export { ajax } from '../internal/ajax/ajax';
|
||||
export { AjaxError, AjaxTimeoutError } from '../internal/ajax/errors';
|
||||
export { AjaxResponse } from '../internal/ajax/AjaxResponse';
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,875 @@
|
||||
# API Documentation
|
||||
|
||||
*Please use only this documented API when working with the parser. Methods
|
||||
not documented here are subject to change at any point.*
|
||||
|
||||
## `parser` function
|
||||
|
||||
This is the module's main entry point.
|
||||
|
||||
```js
|
||||
const parser = require('postcss-selector-parser');
|
||||
```
|
||||
|
||||
### `parser([transform], [options])`
|
||||
|
||||
Creates a new `processor` instance
|
||||
|
||||
```js
|
||||
const processor = parser();
|
||||
```
|
||||
|
||||
Or, with optional transform function
|
||||
|
||||
```js
|
||||
const transform = selectors => {
|
||||
selectors.walkUniversals(selector => {
|
||||
selector.remove();
|
||||
});
|
||||
};
|
||||
|
||||
const processor = parser(transform)
|
||||
|
||||
// Example
|
||||
const result = processor.processSync('*.class');
|
||||
// => .class
|
||||
```
|
||||
|
||||
[See processor documentation](#processor)
|
||||
|
||||
Arguments:
|
||||
|
||||
* `transform (function)`: Provide a function to work with the parsed AST.
|
||||
* `options (object)`: Provide default options for all calls on the returned `Processor`.
|
||||
|
||||
### `parser.attribute([props])`
|
||||
|
||||
Creates a new attribute selector.
|
||||
|
||||
```js
|
||||
parser.attribute({attribute: 'href'});
|
||||
// => [href]
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.className([props])`
|
||||
|
||||
Creates a new class selector.
|
||||
|
||||
```js
|
||||
parser.className({value: 'button'});
|
||||
// => .button
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.combinator([props])`
|
||||
|
||||
Creates a new selector combinator.
|
||||
|
||||
```js
|
||||
parser.combinator({value: '+'});
|
||||
// => +
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
Notes:
|
||||
* **Descendant Combinators** The value of descendant combinators created by the
|
||||
parser always just a single space (`" "`). For descendant selectors with no
|
||||
comments, additional space is now stored in `node.spaces.before`. Depending
|
||||
on the location of comments, additional spaces may be stored in
|
||||
`node.raws.spaces.before`, `node.raws.spaces.after`, or `node.raws.value`.
|
||||
* **Named Combinators** Although, nonstandard and unlikely to ever become a standard,
|
||||
named combinators like `/deep/` and `/for/` are parsed as combinators. The
|
||||
`node.value` is name after being unescaped and normalized as lowercase. The
|
||||
original value for the combinator name is stored in `node.raws.value`.
|
||||
|
||||
|
||||
### `parser.comment([props])`
|
||||
|
||||
Creates a new comment.
|
||||
|
||||
```js
|
||||
parser.comment({value: '/* Affirmative, Dave. I read you. */'});
|
||||
// => /* Affirmative, Dave. I read you. */
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.id([props])`
|
||||
|
||||
Creates a new id selector.
|
||||
|
||||
```js
|
||||
parser.id({value: 'search'});
|
||||
// => #search
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.nesting([props])`
|
||||
|
||||
Creates a new nesting selector.
|
||||
|
||||
```js
|
||||
parser.nesting();
|
||||
// => &
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.pseudo([props])`
|
||||
|
||||
Creates a new pseudo selector.
|
||||
|
||||
```js
|
||||
parser.pseudo({value: '::before'});
|
||||
// => ::before
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.root([props])`
|
||||
|
||||
Creates a new root node.
|
||||
|
||||
```js
|
||||
parser.root();
|
||||
// => (empty)
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.selector([props])`
|
||||
|
||||
Creates a new selector node.
|
||||
|
||||
```js
|
||||
parser.selector();
|
||||
// => (empty)
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.string([props])`
|
||||
|
||||
Creates a new string node.
|
||||
|
||||
```js
|
||||
parser.string();
|
||||
// => (empty)
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.tag([props])`
|
||||
|
||||
Creates a new tag selector.
|
||||
|
||||
```js
|
||||
parser.tag({value: 'button'});
|
||||
// => button
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
### `parser.universal([props])`
|
||||
|
||||
Creates a new universal selector.
|
||||
|
||||
```js
|
||||
parser.universal();
|
||||
// => *
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `props (object)`: The new node's properties.
|
||||
|
||||
## Node types
|
||||
|
||||
### `node.type`
|
||||
|
||||
A string representation of the selector type. It can be one of the following;
|
||||
`attribute`, `class`, `combinator`, `comment`, `id`, `nesting`, `pseudo`,
|
||||
`root`, `selector`, `string`, `tag`, or `universal`. Note that for convenience,
|
||||
these constants are exposed on the main `parser` as uppercased keys. So for
|
||||
example you can get `id` by querying `parser.ID`.
|
||||
|
||||
```js
|
||||
parser.attribute({attribute: 'href'}).type;
|
||||
// => 'attribute'
|
||||
```
|
||||
|
||||
### `node.parent`
|
||||
|
||||
Returns the parent node.
|
||||
|
||||
```js
|
||||
root.nodes[0].parent === root;
|
||||
```
|
||||
|
||||
### `node.toString()`, `String(node)`, or `'' + node`
|
||||
|
||||
Returns a string representation of the node.
|
||||
|
||||
```js
|
||||
const id = parser.id({value: 'search'});
|
||||
console.log(String(id));
|
||||
// => #search
|
||||
```
|
||||
|
||||
### `node.next()` & `node.prev()`
|
||||
|
||||
Returns the next/previous child of the parent node.
|
||||
|
||||
```js
|
||||
const next = id.next();
|
||||
if (next && next.type !== 'combinator') {
|
||||
throw new Error('Qualified IDs are not allowed!');
|
||||
}
|
||||
```
|
||||
|
||||
### `node.replaceWith(node)`
|
||||
|
||||
Replace a node with another.
|
||||
|
||||
```js
|
||||
const attr = selectors.first.first;
|
||||
const className = parser.className({value: 'test'});
|
||||
attr.replaceWith(className);
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `node`: The node to substitute the original with.
|
||||
|
||||
### `node.remove()`
|
||||
|
||||
Removes the node from its parent node.
|
||||
|
||||
```js
|
||||
if (node.type === 'id') {
|
||||
node.remove();
|
||||
}
|
||||
```
|
||||
|
||||
### `node.clone()`
|
||||
|
||||
Returns a copy of a node, detached from any parent containers that the
|
||||
original might have had.
|
||||
|
||||
```js
|
||||
const cloned = parser.id({value: 'search'});
|
||||
String(cloned);
|
||||
|
||||
// => #search
|
||||
```
|
||||
|
||||
### `node.isAtPosition(line, column)`
|
||||
|
||||
Return a `boolean` indicating whether this node includes the character at the
|
||||
position of the given line and column. Returns `undefined` if the nodes lack
|
||||
sufficient source metadata to determine the position.
|
||||
|
||||
Arguments:
|
||||
|
||||
* `line`: 1-index based line number relative to the start of the selector.
|
||||
* `column`: 1-index based column number relative to the start of the selector.
|
||||
|
||||
### `node.spaces`
|
||||
|
||||
Extra whitespaces around the node will be moved into `node.spaces.before` and
|
||||
`node.spaces.after`. So for example, these spaces will be moved as they have
|
||||
no semantic meaning:
|
||||
|
||||
```css
|
||||
h1 , h2 {}
|
||||
```
|
||||
|
||||
For descendent selectors, the value is always a single space.
|
||||
|
||||
```css
|
||||
h1 h2 {}
|
||||
```
|
||||
|
||||
Additional whitespace is found in either the `node.spaces.before` and `node.spaces.after` depending on the presence of comments or other whitespace characters. If the actual whitespace does not start or end with a single space, the node's raw value is set to the actual space(s) found in the source.
|
||||
|
||||
### `node.source`
|
||||
|
||||
An object describing the node's start/end, line/column source position.
|
||||
|
||||
Within the following CSS, the `.bar` class node ...
|
||||
|
||||
```css
|
||||
.foo,
|
||||
.bar {}
|
||||
```
|
||||
|
||||
... will contain the following `source` object.
|
||||
|
||||
```js
|
||||
source: {
|
||||
start: {
|
||||
line: 2,
|
||||
column: 3
|
||||
},
|
||||
end: {
|
||||
line: 2,
|
||||
column: 6
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### `node.sourceIndex`
|
||||
|
||||
The zero-based index of the node within the original source string.
|
||||
|
||||
Within the following CSS, the `.baz` class node will have a `sourceIndex` of `12`.
|
||||
|
||||
```css
|
||||
.foo, .bar, .baz {}
|
||||
```
|
||||
|
||||
## Container types
|
||||
|
||||
The `root`, `selector`, and `pseudo` nodes have some helper methods for working
|
||||
with their children.
|
||||
|
||||
### `container.nodes`
|
||||
|
||||
An array of the container's children.
|
||||
|
||||
```js
|
||||
// Input: h1 h2
|
||||
selectors.at(0).nodes.length // => 3
|
||||
selectors.at(0).nodes[0].value // => 'h1'
|
||||
selectors.at(0).nodes[1].value // => ' '
|
||||
```
|
||||
|
||||
### `container.first` & `container.last`
|
||||
|
||||
The first/last child of the container.
|
||||
|
||||
```js
|
||||
selector.first === selector.nodes[0];
|
||||
selector.last === selector.nodes[selector.nodes.length - 1];
|
||||
```
|
||||
|
||||
### `container.at(index)`
|
||||
|
||||
Returns the node at position `index`.
|
||||
|
||||
```js
|
||||
selector.at(0) === selector.first;
|
||||
selector.at(0) === selector.nodes[0];
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `index`: The index of the node to return.
|
||||
|
||||
### `container.atPosition(line, column)`
|
||||
|
||||
Returns the node at the source position `line` and `column`.
|
||||
|
||||
```js
|
||||
// Input: :not(.foo),\n#foo > :matches(ol, ul)
|
||||
selector.atPosition(1, 1); // => :not(.foo)
|
||||
selector.atPosition(2, 1); // => \n#foo
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `line`: The line number of the node to return.
|
||||
* `column`: The column number of the node to return.
|
||||
|
||||
### `container.index(node)`
|
||||
|
||||
Return the index of the node within its container.
|
||||
|
||||
```js
|
||||
selector.index(selector.nodes[2]) // => 2
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `node`: A node within the current container.
|
||||
|
||||
### `container.length`
|
||||
|
||||
Proxy to the length of the container's nodes.
|
||||
|
||||
```js
|
||||
container.length === container.nodes.length
|
||||
```
|
||||
|
||||
### `container` Array iterators
|
||||
|
||||
The container class provides proxies to certain Array methods; these are:
|
||||
|
||||
* `container.map === container.nodes.map`
|
||||
* `container.reduce === container.nodes.reduce`
|
||||
* `container.every === container.nodes.every`
|
||||
* `container.some === container.nodes.some`
|
||||
* `container.filter === container.nodes.filter`
|
||||
* `container.sort === container.nodes.sort`
|
||||
|
||||
Note that these methods only work on a container's immediate children; recursive
|
||||
iteration is provided by `container.walk`.
|
||||
|
||||
### `container.each(callback)`
|
||||
|
||||
Iterate the container's immediate children, calling `callback` for each child.
|
||||
You may return `false` within the callback to break the iteration.
|
||||
|
||||
```js
|
||||
let className;
|
||||
selectors.each((selector, index) => {
|
||||
if (selector.type === 'class') {
|
||||
className = selector.value;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Note that unlike `Array#forEach()`, this iterator is safe to use whilst adding
|
||||
or removing nodes from the container.
|
||||
|
||||
Arguments:
|
||||
|
||||
* `callback (function)`: A function to call for each node, which receives `node`
|
||||
and `index` arguments.
|
||||
|
||||
### `container.walk(callback)`
|
||||
|
||||
Like `container#each`, but will also iterate child nodes as long as they are
|
||||
`container` types.
|
||||
|
||||
```js
|
||||
selectors.walk((selector, index) => {
|
||||
// all nodes
|
||||
});
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `callback (function)`: A function to call for each node, which receives `node`
|
||||
and `index` arguments.
|
||||
|
||||
This iterator is safe to use whilst mutating `container.nodes`,
|
||||
like `container#each`.
|
||||
|
||||
### `container.walk` proxies
|
||||
|
||||
The container class provides proxy methods for iterating over types of nodes,
|
||||
so that it is easier to write modules that target specific selectors. Those
|
||||
methods are:
|
||||
|
||||
* `container.walkAttributes`
|
||||
* `container.walkClasses`
|
||||
* `container.walkCombinators`
|
||||
* `container.walkComments`
|
||||
* `container.walkIds`
|
||||
* `container.walkNesting`
|
||||
* `container.walkPseudos`
|
||||
* `container.walkTags`
|
||||
* `container.walkUniversals`
|
||||
|
||||
### `container.split(callback)`
|
||||
|
||||
This method allows you to split a group of nodes by returning `true` from
|
||||
a callback. It returns an array of arrays, where each inner array corresponds
|
||||
to the groups that you created via the callback.
|
||||
|
||||
```js
|
||||
// (input) => h1 h2>>h3
|
||||
const list = selectors.first.split(selector => {
|
||||
return selector.type === 'combinator';
|
||||
});
|
||||
|
||||
// (node values) => [['h1', ' '], ['h2', '>>'], ['h3']]
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `callback (function)`: A function to call for each node, which receives `node`
|
||||
as an argument.
|
||||
|
||||
### `container.prepend(node)` & `container.append(node)`
|
||||
|
||||
Add a node to the start/end of the container. Note that doing so will set
|
||||
the parent property of the node to this container.
|
||||
|
||||
```js
|
||||
const id = parser.id({value: 'search'});
|
||||
selector.append(id);
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `node`: The node to add.
|
||||
|
||||
### `container.insertBefore(old, new)` & `container.insertAfter(old, new)`
|
||||
|
||||
Add a node before or after an existing node in a container:
|
||||
|
||||
```js
|
||||
selectors.walk(selector => {
|
||||
if (selector.type !== 'class') {
|
||||
const className = parser.className({value: 'theme-name'});
|
||||
selector.parent.insertAfter(selector, className);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `old`: The existing node in the container.
|
||||
* `new`: The new node to add before/after the existing node.
|
||||
|
||||
### `container.removeChild(node)`
|
||||
|
||||
Remove the node from the container. Note that you can also use
|
||||
`node.remove()` if you would like to remove just a single node.
|
||||
|
||||
```js
|
||||
selector.length // => 2
|
||||
selector.remove(id)
|
||||
selector.length // => 1;
|
||||
id.parent // undefined
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `node`: The node to remove.
|
||||
|
||||
### `container.removeAll()` or `container.empty()`
|
||||
|
||||
Remove all children from the container.
|
||||
|
||||
```js
|
||||
selector.removeAll();
|
||||
selector.length // => 0
|
||||
```
|
||||
|
||||
## Root nodes
|
||||
|
||||
A root node represents a comma separated list of selectors. Indeed, all
|
||||
a root's `toString()` method does is join its selector children with a ','.
|
||||
Other than this, it has no special functionality and acts like a container.
|
||||
|
||||
### `root.trailingComma`
|
||||
|
||||
This will be set to `true` if the input has a trailing comma, in order to
|
||||
support parsing of legacy CSS hacks.
|
||||
|
||||
## Selector nodes
|
||||
|
||||
A selector node represents a single complex selector. For example, this
|
||||
selector string `h1 h2 h3, [href] > p`, is represented as two selector nodes.
|
||||
It has no special functionality of its own.
|
||||
|
||||
## Pseudo nodes
|
||||
|
||||
A pseudo selector extends a container node; if it has any parameters of its
|
||||
own (such as `h1:not(h2, h3)`), they will be its children. Note that the pseudo
|
||||
`value` will always contain the colons preceding the pseudo identifier. This
|
||||
is so that both `:before` and `::before` are properly represented in the AST.
|
||||
|
||||
## Attribute nodes
|
||||
|
||||
### `attribute.quoted`
|
||||
|
||||
Returns `true` if the attribute's value is wrapped in quotation marks, false if it is not.
|
||||
Remains `undefined` if there is no attribute value.
|
||||
|
||||
```css
|
||||
[href=foo] /* false */
|
||||
[href='foo'] /* true */
|
||||
[href="foo"] /* true */
|
||||
[href] /* undefined */
|
||||
```
|
||||
|
||||
### `attribute.qualifiedAttribute`
|
||||
|
||||
Returns the attribute name qualified with the namespace if one is given.
|
||||
|
||||
### `attribute.offsetOf(part)`
|
||||
|
||||
Returns the offset of the attribute part specified relative to the
|
||||
start of the node of the output string. This is useful in raising
|
||||
error messages about a specific part of the attribute, especially
|
||||
in combination with `attribute.sourceIndex`.
|
||||
|
||||
Returns `-1` if the name is invalid or the value doesn't exist in this
|
||||
attribute.
|
||||
|
||||
The legal values for `part` are:
|
||||
|
||||
* `"ns"` - alias for "namespace"
|
||||
* `"namespace"` - the namespace if it exists.
|
||||
* `"attribute"` - the attribute name
|
||||
* `"attributeNS"` - the start of the attribute or its namespace
|
||||
* `"operator"` - the match operator of the attribute
|
||||
* `"value"` - The value (string or identifier)
|
||||
* `"insensitive"` - the case insensitivity flag
|
||||
|
||||
### `attribute.raws.unquoted`
|
||||
|
||||
Returns the unquoted content of the attribute's value.
|
||||
Remains `undefined` if there is no attribute value.
|
||||
|
||||
```css
|
||||
[href=foo] /* foo */
|
||||
[href='foo'] /* foo */
|
||||
[href="foo"] /* foo */
|
||||
[href] /* undefined */
|
||||
```
|
||||
|
||||
### `attribute.spaces`
|
||||
|
||||
Like `node.spaces` with the `before` and `after` values containing the spaces
|
||||
around the element, the parts of the attribute can also have spaces before
|
||||
and after them. The for each of `attribute`, `operator`, `value` and
|
||||
`insensitive` there is corresponding property of the same nam in
|
||||
`node.spaces` that has an optional `before` or `after` string containing only
|
||||
whitespace.
|
||||
|
||||
Note that corresponding values in `attributes.raws.spaces` contain values
|
||||
including any comments. If set, these values will override the
|
||||
`attribute.spaces` value. Take care to remove them if changing
|
||||
`attribute.spaces`.
|
||||
|
||||
### `attribute.raws`
|
||||
|
||||
The raws object stores comments and other information necessary to re-render
|
||||
the node exactly as it was in the source.
|
||||
|
||||
If a comment is embedded within the identifiers for the `namespace`, `attribute`
|
||||
or `value` then a property is placed in the raws for that value containing the full source of the propery including comments.
|
||||
|
||||
If a comment is embedded within the space between parts of the attribute
|
||||
then the raw for that space is set accordingly.
|
||||
|
||||
Setting an attribute's property `raws` value to be deleted.
|
||||
|
||||
For now, changing the spaces required also updating or removing any of the
|
||||
raws values that override them.
|
||||
|
||||
Example: `[ /*before*/ href /* after-attr */ = /* after-operator */ te/*inside-value*/st/* wow */ /*omg*/i/*bbq*/ /*whodoesthis*/]` would parse as:
|
||||
|
||||
```js
|
||||
{
|
||||
attribute: "href",
|
||||
operator: "=",
|
||||
value: "test",
|
||||
spaces: {
|
||||
before: '',
|
||||
after: '',
|
||||
attribute: { before: ' ', after: ' ' },
|
||||
operator: { after: ' ' },
|
||||
value: { after: ' ' },
|
||||
insensitive: { after: ' ' }
|
||||
},
|
||||
raws: {
|
||||
spaces: {
|
||||
attribute: { before: ' /*before*/ ', after: ' /* after-attr */ ' },
|
||||
operator: { after: ' /* after-operator */ ' },
|
||||
value: { after: '/* wow */ /*omg*/' },
|
||||
insensitive: { after: '/*bbq*/ /*whodoesthis*/' }
|
||||
},
|
||||
unquoted: 'test',
|
||||
value: 'te/*inside-value*/st'
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `Processor`
|
||||
|
||||
### `ProcessorOptions`
|
||||
|
||||
* `lossless` - When `true`, whitespace is preserved. Defaults to `true`.
|
||||
* `updateSelector` - When `true`, if any processor methods are passed a postcss
|
||||
`Rule` node instead of a string, then that Rule's selector is updated
|
||||
with the results of the processing. Defaults to `true`.
|
||||
|
||||
### `process|processSync(selectors, [options])`
|
||||
|
||||
Processes the `selectors`, returning a string from the result of processing.
|
||||
|
||||
Note: when the `updateSelector` option is set, the rule's selector
|
||||
will be updated with the resulting string.
|
||||
|
||||
**Example:**
|
||||
|
||||
```js
|
||||
const parser = require("postcss-selector-parser");
|
||||
const processor = parser();
|
||||
|
||||
let result = processor.processSync(' .class');
|
||||
console.log(result);
|
||||
// => .class
|
||||
|
||||
// Asynchronous operation
|
||||
let promise = processor.process(' .class').then(result => {
|
||||
console.log(result)
|
||||
// => .class
|
||||
});
|
||||
|
||||
// To have the parser normalize whitespace values, utilize the options
|
||||
result = processor.processSync(' .class ', {lossless: false});
|
||||
console.log(result);
|
||||
// => .class
|
||||
|
||||
// For better syntax errors, pass a PostCSS Rule node.
|
||||
const postcss = require('postcss');
|
||||
rule = postcss.rule({selector: ' #foo > a, .class '});
|
||||
processor.process(rule, {lossless: false, updateSelector: true}).then(result => {
|
||||
console.log(result);
|
||||
// => #foo>a,.class
|
||||
console.log("rule:", rule.selector);
|
||||
// => rule: #foo>a,.class
|
||||
})
|
||||
```
|
||||
|
||||
Arguments:
|
||||
|
||||
* `selectors (string|postcss.Rule)`: Either a selector string or a PostCSS Rule
|
||||
node.
|
||||
* `[options] (object)`: Process options
|
||||
|
||||
|
||||
### `ast|astSync(selectors, [options])`
|
||||
|
||||
Like `process()` and `processSync()` but after
|
||||
processing the `selectors` these methods return the `Root` node of the result
|
||||
instead of a string.
|
||||
|
||||
Note: when the `updateSelector` option is set, the rule's selector
|
||||
will be updated with the resulting string.
|
||||
|
||||
### `transform|transformSync(selectors, [options])`
|
||||
|
||||
Like `process()` and `processSync()` but after
|
||||
processing the `selectors` these methods return the value returned by the
|
||||
processor callback.
|
||||
|
||||
Note: when the `updateSelector` option is set, the rule's selector
|
||||
will be updated with the resulting string.
|
||||
|
||||
### Error Handling Within Selector Processors
|
||||
|
||||
The root node passed to the selector processor callback
|
||||
has a method `error(message, options)` that returns an
|
||||
error object. This method should always be used to raise
|
||||
errors relating to the syntax of selectors. The options
|
||||
to this method are passed to postcss's error constructor
|
||||
([documentation](http://api.postcss.org/Container.html#error)).
|
||||
|
||||
#### Async Error Example
|
||||
|
||||
```js
|
||||
let processor = (root) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
root.walkClasses((classNode) => {
|
||||
if (/^(.*)[-_]/.test(classNode.value)) {
|
||||
let msg = "classes may not have underscores or dashes in them";
|
||||
reject(root.error(msg, {
|
||||
index: classNode.sourceIndex + RegExp.$1.length + 1,
|
||||
word: classNode.value
|
||||
}));
|
||||
}
|
||||
});
|
||||
resolve();
|
||||
});
|
||||
};
|
||||
|
||||
const postcss = require("postcss");
|
||||
const parser = require("postcss-selector-parser");
|
||||
const selectorProcessor = parser(processor);
|
||||
const plugin = postcss.plugin('classValidator', (options) => {
|
||||
return (root) => {
|
||||
let promises = [];
|
||||
root.walkRules(rule => {
|
||||
promises.push(selectorProcessor.process(rule));
|
||||
});
|
||||
return Promise.all(promises);
|
||||
};
|
||||
});
|
||||
postcss(plugin()).process(`
|
||||
.foo-bar {
|
||||
color: red;
|
||||
}
|
||||
`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString()));
|
||||
|
||||
// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them
|
||||
//
|
||||
// > 1 | .foo-bar {
|
||||
// | ^
|
||||
// 2 | color: red;
|
||||
// 3 | }
|
||||
```
|
||||
|
||||
#### Synchronous Error Example
|
||||
|
||||
```js
|
||||
let processor = (root) => {
|
||||
root.walkClasses((classNode) => {
|
||||
if (/.*[-_]/.test(classNode.value)) {
|
||||
let msg = "classes may not have underscores or dashes in them";
|
||||
throw root.error(msg, {
|
||||
index: classNode.sourceIndex,
|
||||
word: classNode.value
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const postcss = require("postcss");
|
||||
const parser = require("postcss-selector-parser");
|
||||
const selectorProcessor = parser(processor);
|
||||
const plugin = postcss.plugin('classValidator', (options) => {
|
||||
return (root) => {
|
||||
root.walkRules(rule => {
|
||||
selectorProcessor.processSync(rule);
|
||||
});
|
||||
};
|
||||
});
|
||||
postcss(plugin()).process(`
|
||||
.foo-bar {
|
||||
color: red;
|
||||
}
|
||||
`.trim(), {from: 'test.css'}).catch((e) => console.error(e.toString()));
|
||||
|
||||
// CssSyntaxError: classValidator: ./test.css:1:5: classes may not have underscores or dashes in them
|
||||
//
|
||||
// > 1 | .foo-bar {
|
||||
// | ^
|
||||
// 2 | color: red;
|
||||
// 3 | }
|
||||
```
|
||||
@@ -0,0 +1,24 @@
|
||||
let Declaration = require('../declaration')
|
||||
let utils = require('../utils')
|
||||
|
||||
class BackgroundClip extends Declaration {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(
|
||||
this.prefixes.map(i => {
|
||||
return i === '-ms-' ? '-webkit-' : i
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
check(decl) {
|
||||
return decl.value.toLowerCase() === 'text'
|
||||
}
|
||||
}
|
||||
|
||||
BackgroundClip.names = ['background-clip']
|
||||
|
||||
module.exports = BackgroundClip
|
||||
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var StringIndexOf = require('./StringIndexOf');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/13.0/#sec-isstringprefix
|
||||
|
||||
module.exports = function IsStringPrefix(p, q) {
|
||||
if (Type(p) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: "p" must be a String');
|
||||
}
|
||||
|
||||
if (Type(q) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: "q" must be a String');
|
||||
}
|
||||
|
||||
return StringIndexOf(q, p, 0) === 0;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
export declare type SourceLocation = {
|
||||
line: number;
|
||||
column: number;
|
||||
};
|
||||
export declare class LinesAndColumns {
|
||||
private string;
|
||||
private offsets;
|
||||
constructor(string: string);
|
||||
locationForIndex(index: number): SourceLocation | null;
|
||||
indexForLocation(location: SourceLocation): number | null;
|
||||
private lengthOfLine;
|
||||
}
|
||||
export default LinesAndColumns;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"mri","version":"1.2.0","files":{"package.json":{"checkedAt":1678883668735,"integrity":"sha512-s5ipoVX0JEsdmTtNPx9Zcr5kHJOhlBNfPT/BbJOtClZAWSgDiiHX+KPpPvdxdWEg7Hb8DYeVjGGKDDnhaVM3gg==","mode":420,"size":803},"index.d.ts":{"checkedAt":1678883668735,"integrity":"sha512-LddoGnfTGW4hrIn4Ds91KcFQ1mOizB6n4ts3WwuAQ9JVwnYO5L7OXyK9IrmiYeUhmxabLZPwes4nwx1fI6xUIA==","mode":420,"size":456},"license.md":{"checkedAt":1678883668735,"integrity":"sha512-LbHCVS6fVjLVsjN/qfzzpl8E/Kyt6J7TssYbnq/1iV+QoD7PWt5zm3ZLSVE5kOnDFIX7fVVI4/VgkcyqYOGA1g==","mode":420,"size":1114},"readme.md":{"checkedAt":1678883668735,"integrity":"sha512-9UebNkLKDFhl+8m4ZTdr+yedahRevlIXsEIGHO+FOULntLSmLb/QsopLx2kaceQR/pAvc05uTVxlmyzojNp2Mw==","mode":420,"size":5054},"lib/index.js":{"checkedAt":1678883668735,"integrity":"sha512-wr3U6WIlVnretjWkvYN/mmQdOLTPemPlaFcGRuRNlta39jwkGIABZLQNv8vyEH0J+BGkaSAz2Nj1AC6ZK+Rbfg==","mode":420,"size":2918},"lib/index.mjs":{"checkedAt":1678883668743,"integrity":"sha512-Solpq8wvvY3NWvlqIAIPIlT4klwfBCOlUSyviE+opUIjia3zl25npUvh9+MZkc+epe51kUi1MPu64K/gdrGOhA==","mode":420,"size":2916}}}
|
||||
@@ -0,0 +1,37 @@
|
||||
var baseForRight = require('./_baseForRight'),
|
||||
castFunction = require('./_castFunction'),
|
||||
keysIn = require('./keysIn');
|
||||
|
||||
/**
|
||||
* This method is like `_.forIn` except that it iterates over properties of
|
||||
* `object` in the opposite order.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 2.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @see _.forIn
|
||||
* @example
|
||||
*
|
||||
* function Foo() {
|
||||
* this.a = 1;
|
||||
* this.b = 2;
|
||||
* }
|
||||
*
|
||||
* Foo.prototype.c = 3;
|
||||
*
|
||||
* _.forInRight(new Foo, function(value, key) {
|
||||
* console.log(key);
|
||||
* });
|
||||
* // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
|
||||
*/
|
||||
function forInRight(object, iteratee) {
|
||||
return object == null
|
||||
? object
|
||||
: baseForRight(object, castFunction(iteratee), keysIn);
|
||||
}
|
||||
|
||||
module.exports = forInRight;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J CC","2340":"D E F A B"},B:{"2":"C K L G M N O","1025":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB EC","513":"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","545":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB FC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB","1025":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"A B C K L G 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v HC zB IC","164":"J","4644":"D E F JC KC LC"},F:{"2":"0 1 2 3 F B G M N O w g x y z PC QC RC SC qB AC","545":"C TC rB","1025":"4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e"},G:{"1":"bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC","4260":"VC WC","4644":"E XC YC ZC aC"},H:{"2":"oC"},I:{"2":"tB I pC qC rC sC BC tC uC","1025":"f"},J:{"2":"D","4260":"A"},K:{"2":"A B qB AC","545":"C rB","1025":"h"},L:{"1025":"H"},M:{"1":"H"},N:{"2340":"A B"},O:{"1025":"vC"},P:{"1025":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1025":"1B"},R:{"1025":"9C"},S:{"1":"BD","4097":"AD"}},B:4,C:"Crisp edges/pixelated images"};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"NotificationFactories.js","sourceRoot":"","sources":["../../../src/internal/NotificationFactories.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,qBAAqB,GAAG,CAAC,cAAM,OAAA,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAyB,EAArE,CAAqE,CAAC,EAAE,CAAC;AAOrH,MAAM,UAAU,iBAAiB,CAAC,KAAU;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAQ,CAAC;AAC1D,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAI,KAAQ;IAC1C,OAAO,kBAAkB,CAAC,GAAG,EAAE,KAAK,EAAE,SAAS,CAAwB,CAAC;AAC1E,CAAC;AAQD,MAAM,UAAU,kBAAkB,CAAC,IAAqB,EAAE,KAAU,EAAE,KAAU;IAC9E,OAAO;QACL,IAAI,MAAA;QACJ,KAAK,OAAA;QACL,KAAK,OAAA;KACN,CAAC;AACJ,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"finalize.js","sourceRoot":"","sources":["../../../../src/internal/operators/finalize.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AA+DvC,SAAgB,QAAQ,CAAI,QAAoB;IAC9C,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAGhC,IAAI;YACF,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAC9B;gBAAS;YACR,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,4BAUC"}
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
var objToString = Object.prototype.toString, id = objToString.call("");
|
||||
|
||||
module.exports = function (value) {
|
||||
return (
|
||||
typeof value === "string" ||
|
||||
(value &&
|
||||
typeof value === "object" &&
|
||||
(value instanceof String || objToString.call(value) === id)) ||
|
||||
false
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
var createCompounder = require('./_createCompounder');
|
||||
|
||||
/**
|
||||
* Converts `string`, as space separated words, to upper case.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category String
|
||||
* @param {string} [string=''] The string to convert.
|
||||
* @returns {string} Returns the upper cased string.
|
||||
* @example
|
||||
*
|
||||
* _.upperCase('--foo-bar');
|
||||
* // => 'FOO BAR'
|
||||
*
|
||||
* _.upperCase('fooBar');
|
||||
* // => 'FOO BAR'
|
||||
*
|
||||
* _.upperCase('__foo_bar__');
|
||||
* // => 'FOO BAR'
|
||||
*/
|
||||
var upperCase = createCompounder(function(result, word, index) {
|
||||
return result + (index ? ' ' : '') + word.toUpperCase();
|
||||
});
|
||||
|
||||
module.exports = upperCase;
|
||||
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Invoke = require('./Invoke');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-iteratornext
|
||||
|
||||
module.exports = function IteratorNext(iterator, value) {
|
||||
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
|
||||
if (Type(result) !== 'Object') {
|
||||
throw new $TypeError('iterator next must return an object');
|
||||
}
|
||||
return result;
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
var baseUnset = require('./_baseUnset');
|
||||
|
||||
/**
|
||||
* Removes the property at `path` of `object`.
|
||||
*
|
||||
* **Note:** This method mutates `object`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to modify.
|
||||
* @param {Array|string} path The path of the property to unset.
|
||||
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'a': [{ 'b': { 'c': 7 } }] };
|
||||
* _.unset(object, 'a[0].b.c');
|
||||
* // => true
|
||||
*
|
||||
* console.log(object);
|
||||
* // => { 'a': [{ 'b': {} }] };
|
||||
*
|
||||
* _.unset(object, ['a', '0', 'b', 'c']);
|
||||
* // => true
|
||||
*
|
||||
* console.log(object);
|
||||
* // => { 'a': [{ 'b': {} }] };
|
||||
*/
|
||||
function unset(object, path) {
|
||||
return object == null ? true : baseUnset(object, path);
|
||||
}
|
||||
|
||||
module.exports = unset;
|
||||
@@ -0,0 +1,25 @@
|
||||
var baseFlatten = require('./_baseFlatten');
|
||||
|
||||
/** Used as references for various `Number` constants. */
|
||||
var INFINITY = 1 / 0;
|
||||
|
||||
/**
|
||||
* Recursively flattens `array`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Array
|
||||
* @param {Array} array The array to flatten.
|
||||
* @returns {Array} Returns the new flattened array.
|
||||
* @example
|
||||
*
|
||||
* _.flattenDeep([1, [2, [3, [4]], 5]]);
|
||||
* // => [1, 2, 3, 4, 5]
|
||||
*/
|
||||
function flattenDeep(array) {
|
||||
var length = array == null ? 0 : array.length;
|
||||
return length ? baseFlatten(array, INFINITY) : [];
|
||||
}
|
||||
|
||||
module.exports = flattenDeep;
|
||||
@@ -0,0 +1,13 @@
|
||||
import { NumberFormatInternal, NumberFormatOptions, NumberFormatLocaleInternalData } from '../types/number';
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-initializenumberformat
|
||||
*/
|
||||
export declare function InitializeNumberFormat(nf: Intl.NumberFormat, locales: string | ReadonlyArray<string> | undefined, opts: NumberFormatOptions | undefined, { getInternalSlots, localeData, availableLocales, numberingSystemNames, getDefaultLocale, currencyDigitsData, }: {
|
||||
getInternalSlots(nf: Intl.NumberFormat): NumberFormatInternal;
|
||||
localeData: Record<string, NumberFormatLocaleInternalData | undefined>;
|
||||
availableLocales: Set<string>;
|
||||
numberingSystemNames: ReadonlyArray<string>;
|
||||
getDefaultLocale(): string;
|
||||
currencyDigitsData: Record<string, number>;
|
||||
}): Intl.NumberFormat;
|
||||
//# sourceMappingURL=InitializeNumberFormat.d.ts.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ColdObservable.js","sourceRoot":"","sources":["../../../../src/internal/testing/ColdObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,OAAO,cAAkB,SAAQ,UAAa;IAQlD,YAAmB,QAAuB,EAAE,SAAoB;QAC9D,KAAK,CAAC,UAA+B,UAA2B;YAC9D,MAAM,UAAU,GAAsB,IAAW,CAAC;YAClD,MAAM,KAAK,GAAG,UAAU,CAAC,kBAAkB,EAAE,CAAC;YAC9C,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;YACxC,YAAY,CAAC,GAAG,CACd,IAAI,YAAY,CAAC,GAAG,EAAE;gBACpB,UAAU,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CACH,CAAC;YACF,UAAU,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACxC,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC,CAAC;QAZc,aAAQ,GAAR,QAAQ,CAAe;QAPnC,kBAAa,GAAsB,EAAE,CAAC;QAoB3C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,gBAAgB,CAAC,UAA2B;QAC1C,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,EAAE,CAAC,EAAE,EAAE;YACvC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACjC,UAAU,CAAC,GAAG,CACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,CACrB,CAAC,KAAK,EAAE,EAAE;gBACR,MAAM,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,KAAM,CAAC;gBACtE,mBAAmB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC,EACD,OAAO,CAAC,KAAK,EACb,EAAE,OAAO,EAAE,UAAU,EAAE,CACxB,CACF,CAAC;SACH;IACH,CAAC;CACF;AACD,WAAW,CAAC,cAAc,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1,14 @@
|
||||
import Element from './Element';
|
||||
import Attribute from './Attribute';
|
||||
import Component from '../Component';
|
||||
import TemplateScope from './shared/TemplateScope';
|
||||
import { INode } from './interfaces';
|
||||
import { TemplateNode } from '../../interfaces';
|
||||
export default class Slot extends Element {
|
||||
type: 'Element';
|
||||
name: string;
|
||||
children: INode[];
|
||||
slot_name: string;
|
||||
values: Map<string, Attribute>;
|
||||
constructor(component: Component, parent: INode, scope: TemplateScope, info: TemplateNode);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
var modulo = require('./modulo');
|
||||
|
||||
var msPerDay = require('../helpers/timeConstants').msPerDay;
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.2
|
||||
|
||||
module.exports = function TimeWithinDay(t) {
|
||||
return modulo(t, msPerDay);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $abs = GetIntrinsic('%Math.abs%');
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-5.2
|
||||
|
||||
module.exports = function abs(x) {
|
||||
return $abs(x);
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
module.exports =
|
||||
function(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {
|
||||
var util = require("./util");
|
||||
var tryCatch = util.tryCatch;
|
||||
|
||||
Promise.method = function (fn) {
|
||||
if (typeof fn !== "function") {
|
||||
throw new Promise.TypeError("expecting a function but got " + util.classString(fn));
|
||||
}
|
||||
return function () {
|
||||
var ret = new Promise(INTERNAL);
|
||||
ret._captureStackTrace();
|
||||
ret._pushContext();
|
||||
var value = tryCatch(fn).apply(this, arguments);
|
||||
var promiseCreated = ret._popContext();
|
||||
debug.checkForgottenReturns(
|
||||
value, promiseCreated, "Promise.method", ret);
|
||||
ret._resolveFromSyncValue(value);
|
||||
return ret;
|
||||
};
|
||||
};
|
||||
|
||||
Promise.attempt = Promise["try"] = function (fn) {
|
||||
if (typeof fn !== "function") {
|
||||
return apiRejection("expecting a function but got " + util.classString(fn));
|
||||
}
|
||||
var ret = new Promise(INTERNAL);
|
||||
ret._captureStackTrace();
|
||||
ret._pushContext();
|
||||
var value;
|
||||
if (arguments.length > 1) {
|
||||
debug.deprecated("calling Promise.try with more than 1 argument");
|
||||
var arg = arguments[1];
|
||||
var ctx = arguments[2];
|
||||
value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg)
|
||||
: tryCatch(fn).call(ctx, arg);
|
||||
} else {
|
||||
value = tryCatch(fn)();
|
||||
}
|
||||
var promiseCreated = ret._popContext();
|
||||
debug.checkForgottenReturns(
|
||||
value, promiseCreated, "Promise.try", ret);
|
||||
ret._resolveFromSyncValue(value);
|
||||
return ret;
|
||||
};
|
||||
|
||||
Promise.prototype._resolveFromSyncValue = function (value) {
|
||||
if (value === util.errorObj) {
|
||||
this._rejectCallback(value.e, false);
|
||||
} else {
|
||||
this._resolveCallback(value, true);
|
||||
}
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* The base implementation of `_.sum` and `_.sumBy` without support for
|
||||
* iteratee shorthands.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} iteratee The function invoked per iteration.
|
||||
* @returns {number} Returns the sum.
|
||||
*/
|
||||
function baseSum(array, iteratee) {
|
||||
var result,
|
||||
index = -1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
var current = iteratee(array[index]);
|
||||
if (current !== undefined) {
|
||||
result = result === undefined ? current : (result + current);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = baseSum;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TestScheduler.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/TestScheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAiB,MAAM,mCAAmC,CAAC;AAaxF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC;IAC1D,GAAG,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC;IACxD,KAAK,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC;IAC5C,IAAI,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,UAAU,CAAC;IAChD,gBAAgB,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAClE,mBAAmB,EAAE,OAAO,aAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC;IACxE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAQD,oBAAY,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,UAAU,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AACzF,oBAAY,sBAAsB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;AAE1E,qBAAa,aAAc,SAAQ,oBAAoB;IAkClC,eAAe,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,OAAO,GAAG,IAAI;IAjClF;;;;;OAKG;IACH,MAAM,CAAC,eAAe,SAAM;IAE5B;;OAEG;IACH,SAAgB,cAAc,EAAE,aAAa,CAAC,GAAG,CAAC,EAAE,CAAM;IAE1D;;OAEG;IACH,SAAgB,eAAe,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,CAAM;IAE5D;;OAEG;IACH,OAAO,CAAC,UAAU,CAAuB;IAEzC;;;OAGG;IACH,OAAO,CAAC,OAAO,CAAS;IAExB;;;OAGG;gBACgB,eAAe,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,OAAO,GAAG,IAAI;IAIlF,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAQnC;;;;OAIG;IACH,oBAAoB,CAAC,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAA;KAAE,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,cAAc,CAAC,CAAC,CAAC;IAanH;;;;OAIG;IACH,mBAAmB,CAAC,CAAC,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAA;KAAE,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,aAAa,CAAC,CAAC,CAAC;IAUjH,OAAO,CAAC,0BAA0B;IAgBlC,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,mBAAmB,GAAE,MAAM,GAAG,IAAW;sBAgCtE,MAAM,WAAW,GAAG,eAAe,GAAG;yBAInC,WAAW,CAAC,CAAC;;IAsBlC,mBAAmB,CAAC,sBAAsB,EAAE,eAAe,EAAE,GAAG;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE;IAehG,KAAK;IAiBL,kBAAkB;IAClB,MAAM,CAAC,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,UAAQ,GAAG,eAAe;IAiG5F,kBAAkB;IAClB,MAAM,CAAC,YAAY,CACjB,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,GAAG,EACZ,UAAU,CAAC,EAAE,GAAG,EAChB,2BAA2B,GAAE,OAAe,EAC5C,OAAO,UAAQ,GACd,WAAW,EAAE;IA4GhB,OAAO,CAAC,cAAc;IA+DtB,OAAO,CAAC,eAAe;IA8IvB;;;;;;;OAOG;IACH,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,CAAC,GAAG,CAAC;CA2ChD"}
|
||||
@@ -0,0 +1,412 @@
|
||||
<!-- Please do not edit this file. Edit the `blah` field in the `package.json` instead. If in doubt, open an issue. -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# parse-url
|
||||
|
||||
[![Support me on Patreon][badge_patreon]][patreon] [![Buy me a book][badge_amazon]][amazon] [![PayPal][badge_paypal_donate]][paypal-donations] [](https://github.com/IonicaBizau/ama) [](https://www.npmjs.com/package/parse-url) [](https://www.npmjs.com/package/parse-url) [](https://www.codementor.io/johnnyb?utm_source=github&utm_medium=button&utm_term=johnnyb&utm_campaign=github)
|
||||
|
||||
<a href="https://www.buymeacoffee.com/H96WwChMy" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/yellow_img.png" alt="Buy Me A Coffee"></a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
> An advanced url parser supporting git urls too.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
For low-level path parsing, check out [`parse-path`](https://github.com/IonicaBizau/parse-path). This very module is designed to parse urls. By default the urls are normalized.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## :cloud: Installation
|
||||
|
||||
```sh
|
||||
# Using npm
|
||||
npm install --save parse-url
|
||||
|
||||
# Using yarn
|
||||
yarn add parse-url
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## :clipboard: Example
|
||||
|
||||
|
||||
|
||||
```js
|
||||
// Dependencies
|
||||
import parseUrl from "../lib/index.js";
|
||||
|
||||
console.log(parseUrl("http://ionicabizau.net/blog"))
|
||||
// {
|
||||
// protocols: [ 'http' ],
|
||||
// protocol: 'http',
|
||||
// port: '',
|
||||
// resource: 'ionicabizau.net',
|
||||
// user: '',
|
||||
// password: '',
|
||||
// pathname: '/blog',
|
||||
// hash: '',
|
||||
// search: '',
|
||||
// href: 'http://ionicabizau.net/blog',
|
||||
// query: {}
|
||||
// }
|
||||
|
||||
console.log(parseUrl("http://domain.com/path/name?foo=bar&bar=42#some-hash"))
|
||||
// {
|
||||
// protocols: [ 'http' ],
|
||||
// protocol: 'http',
|
||||
// port: '',
|
||||
// resource: 'domain.com',
|
||||
// user: '',
|
||||
// password: '',
|
||||
// pathname: '/path/name',
|
||||
// hash: 'some-hash',
|
||||
// search: 'foo=bar&bar=42',
|
||||
// href: 'http://domain.com/path/name?foo=bar&bar=42#some-hash',
|
||||
// query: { foo: 'bar', bar: '42' }
|
||||
// }
|
||||
|
||||
// If you want to parse fancy Git urls, turn off the automatic url normalization
|
||||
console.log(parseUrl("git+ssh://git@host.xz/path/name.git", false))
|
||||
// {
|
||||
// protocols: [ 'git', 'ssh' ],
|
||||
// protocol: 'git',
|
||||
// port: '',
|
||||
// resource: 'host.xz',
|
||||
// user: 'git',
|
||||
// password: '',
|
||||
// pathname: '/path/name.git',
|
||||
// hash: '',
|
||||
// search: '',
|
||||
// href: 'git+ssh://git@host.xz/path/name.git',
|
||||
// query: {}
|
||||
// }
|
||||
|
||||
console.log(parseUrl("git@github.com:IonicaBizau/git-stats.git", false))
|
||||
// {
|
||||
// protocols: [ 'ssh' ],
|
||||
// protocol: 'ssh',
|
||||
// port: '',
|
||||
// resource: 'github.com',
|
||||
// user: 'git',
|
||||
// password: '',
|
||||
// pathname: '/IonicaBizau/git-stats.git',
|
||||
// hash: '',
|
||||
// search: '',
|
||||
// href: 'git@github.com:IonicaBizau/git-stats.git',
|
||||
// query: {}
|
||||
// }
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## :question: Get Help
|
||||
|
||||
There are few ways to get help:
|
||||
|
||||
|
||||
|
||||
1. Please [post questions on Stack Overflow](https://stackoverflow.com/questions/ask). You can open issues with questions, as long you add a link to your Stack Overflow question.
|
||||
2. For bug reports and feature requests, open issues. :bug:
|
||||
3. For direct and quick help, you can [use Codementor](https://www.codementor.io/johnnyb). :rocket:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## :memo: Documentation
|
||||
|
||||
|
||||
### `interopDefaultLegacy()`
|
||||
#__PURE__
|
||||
|
||||
### `parseUrl(url, normalize)`
|
||||
Parses the input url.
|
||||
|
||||
**Note**: This *throws* if invalid urls are provided.
|
||||
|
||||
#### Params
|
||||
|
||||
- **String** `url`: The input url.
|
||||
- **Boolean|Object** `normalize`: Whether to normalize the url or not. Default is `false`. If `true`, the url will
|
||||
be normalized. If an object, it will be the
|
||||
options object sent to [`normalize-url`](https://github.com/sindresorhus/normalize-url).
|
||||
|
||||
For SSH urls, normalize won't work.
|
||||
|
||||
#### Return
|
||||
- **Object** An object containing the following fields:
|
||||
- `protocols` (Array): An array with the url protocols (usually it has one element).
|
||||
- `protocol` (String): The first protocol, `"ssh"` (if the url is a ssh url) or `"file"`.
|
||||
- `port` (null|Number): The domain port.
|
||||
- `resource` (String): The url domain (including subdomains).
|
||||
- `user` (String): The authentication user (usually for ssh urls).
|
||||
- `pathname` (String): The url pathname.
|
||||
- `hash` (String): The url hash.
|
||||
- `search` (String): The url querystring value.
|
||||
- `href` (String): The input url.
|
||||
- `query` (Object): The url querystring, parsed as object.
|
||||
- `parse_failed` (Boolean): Whether the parsing failed or not.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## :yum: How to contribute
|
||||
Have an idea? Found a bug? See [how to contribute][contributing].
|
||||
|
||||
|
||||
## :sparkling_heart: Support my projects
|
||||
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously,
|
||||
this takes time. You can integrate and use these projects in your applications *for free*! You can even change the source code and redistribute (even resell it).
|
||||
|
||||
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
|
||||
|
||||
|
||||
- Starring and sharing the projects you like :rocket:
|
||||
- [![Buy me a book][badge_amazon]][amazon]—I love books! I will remember you after years if you buy me one. :grin: :book:
|
||||
- [![PayPal][badge_paypal]][paypal-donations]—You can make one-time donations via PayPal. I'll probably buy a ~~coffee~~ tea. :tea:
|
||||
- [![Support me on Patreon][badge_patreon]][patreon]—Set up a recurring monthly donation and you will get interesting news about what I'm doing (things that I don't share with everyone).
|
||||
- **Bitcoin**—You can send me bitcoins at this address (or scanning the code below): `1P9BRsmazNQcuyTxEqveUsnf5CERdq35V6`
|
||||
|
||||

|
||||
|
||||
|
||||
Thanks! :heart:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## :dizzy: Where is this library used?
|
||||
If you are using this library in one of your projects, add it in this list. :sparkles:
|
||||
|
||||
- `git-up`
|
||||
- `@semantic-release/gitlab`
|
||||
- `lien`
|
||||
- `stun`
|
||||
- `@open-wa/wa-automate`
|
||||
- `kakapo`
|
||||
- `parse-db-uri`
|
||||
- `fuge-runner`
|
||||
- `url-local`
|
||||
- `build-plugin-ssr`
|
||||
- `rucksack`
|
||||
- `egg-muc-custom-loader`
|
||||
- `hologit`
|
||||
- `@enkeledi/react-native-week-month-date-picker`
|
||||
- `normalize-ssh`
|
||||
- `robots-agent`
|
||||
- `warp-api`
|
||||
- `normalize-id`
|
||||
- `xl-git-up`
|
||||
- `warp-server`
|
||||
- `@hemith/react-native-tnk`
|
||||
- `@kriblet/wa-automate`
|
||||
- `@notnuzzel/crawl`
|
||||
- `gitlab-backup-util-harduino`
|
||||
- `miguelcostero-ng2-toasty`
|
||||
- `native-kakao-login`
|
||||
- `npm_one_1_2_3`
|
||||
- `react-native-biometric-authenticate`
|
||||
- `react-native-arunmeena1987`
|
||||
- `react-native-contact-list`
|
||||
- `react-native-payu-payment-testing`
|
||||
- `react-native-is7`
|
||||
- `react-native-my-first-try-arun-ramya`
|
||||
- `react-native-kakao-maps`
|
||||
- `react-native-ytximkit`
|
||||
- `rn-adyen-dropin`
|
||||
- `begg`
|
||||
- `@positionex/position-sdk`
|
||||
- `@corelmax/react-native-my2c2p-sdk`
|
||||
- `@felipesimmi/react-native-datalogic-module`
|
||||
- `@hawkingnetwork/react-native-tab-view`
|
||||
- `@jprustv/sulla-hotfix`
|
||||
- `@mergulhao/wa-automate`
|
||||
- `cli-live-tutorial`
|
||||
- `drowl-base-theme-iconset`
|
||||
- `native-apple-login`
|
||||
- `react-native-cplus`
|
||||
- `npm_qwerty`
|
||||
- `vrt-cli`
|
||||
- `vue-cli-plugin-ice-builder`
|
||||
- `react-native-arunjeyam1987`
|
||||
- `soajs.repositories`
|
||||
- `ssh-host-manager`
|
||||
- `native-zip`
|
||||
- `graphmilker`
|
||||
- `react-native-bubble-chart`
|
||||
- `verify-aws-sns-signature`
|
||||
- `@dataparty/api`
|
||||
- `react-native-flyy`
|
||||
- `@react-18-pdf/root`
|
||||
- `@apardellass/react-native-audio-stream`
|
||||
- `@geeky-apo/react-native-advanced-clipboard`
|
||||
- `@hsui/plugin-wss`
|
||||
- `blitzzz`
|
||||
- `candlelabssdk`
|
||||
- `@roshub/api`
|
||||
- `@saad27/react-native-bottom-tab-tour`
|
||||
- `generator-bootstrap-boilerplate-template`
|
||||
- `npm_one_12_34_1_`
|
||||
- `npm_one_2_2`
|
||||
- `payutesting`
|
||||
- `react-native-responsive-size`
|
||||
- `vue-cli-plugin-ut-builder`
|
||||
- `xbuilder-forms`
|
||||
- `deploy-versioning`
|
||||
- `eval-spider`
|
||||
- `homebridge-pushcutter`
|
||||
- `@con-test/react-native-concent-common`
|
||||
- `tumblr-text`
|
||||
- `react-native-shekhar-bridge-test`
|
||||
- `loast`
|
||||
- `react-feedback-sdk`
|
||||
- `@oiti/documentoscopy-react-native`
|
||||
- `@snyk/sweater-comb`
|
||||
- `@angga30prabu/wa-modified`
|
||||
- `@hstech/utils`
|
||||
- `birken-react-native-community-image-editor`
|
||||
- `get-tarball-cli`
|
||||
- `luojia-cli-dev`
|
||||
- `reac-native-arun-ramya-test`
|
||||
- `react-native-plugpag-wrapper`
|
||||
- `react-native-pulsator-native`
|
||||
- `react-native-arun-ramya-test`
|
||||
- `react-native-arunramya151`
|
||||
- `react-native-transtracker-library`
|
||||
- `workpad`
|
||||
- `delta-screen`
|
||||
- `microbe.js`
|
||||
- `ndla-source-map-resolver`
|
||||
- `@jfilipe-sparta/react-native-module_2`
|
||||
- `cogoportutils`
|
||||
- `@lakutata-module/service`
|
||||
- `@buganto/client`
|
||||
- `@mockswitch/cli`
|
||||
- `angularvezba`
|
||||
- `api-reach-react-native-fix`
|
||||
- `react-native-syan-photo-picker`
|
||||
- `@wecraftapps/react-native-use-keyboard`
|
||||
- `hui-plugin-wss`
|
||||
- `l2forlerna`
|
||||
- `native-google-login`
|
||||
- `raact-native-arunramya151`
|
||||
- `react-native-modal-progress-bar`
|
||||
- `react-native-test-module-hhh`
|
||||
- `react-native-jsi-device-info`
|
||||
- `react-native-badge-control`
|
||||
- `wander-cli`
|
||||
- `heroku-wp-environment-sync`
|
||||
- `hubot-will-it-connect`
|
||||
- `normalize-ssh-url`
|
||||
- `ba-js-cookie-banner`
|
||||
- `ts-scraper`
|
||||
- `electron-info`
|
||||
- `rn-tm-notify`
|
||||
- `native-date-picker-module`
|
||||
- `@ndla/source-map-resolver`
|
||||
- `@jimengio/mocked-proxy`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## :scroll: License
|
||||
|
||||
[MIT][license] © [Ionică Bizău][website]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[license]: /LICENSE
|
||||
[website]: https://ionicabizau.net
|
||||
[contributing]: /CONTRIBUTING.md
|
||||
[docs]: /DOCUMENTATION.md
|
||||
[badge_patreon]: https://ionicabizau.github.io/badges/patreon.svg
|
||||
[badge_amazon]: https://ionicabizau.github.io/badges/amazon.svg
|
||||
[badge_paypal]: https://ionicabizau.github.io/badges/paypal.svg
|
||||
[badge_paypal_donate]: https://ionicabizau.github.io/badges/paypal_donate.svg
|
||||
[patreon]: https://www.patreon.com/ionicabizau
|
||||
[amazon]: http://amzn.eu/hRo9sIZ
|
||||
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVXDDLKKLQRJW
|
||||
@@ -0,0 +1,124 @@
|
||||
/**
|
||||
* `password` type prompt
|
||||
*/
|
||||
|
||||
import chalk from 'chalk';
|
||||
import { map, takeUntil } from 'rxjs';
|
||||
import Base from './base.js';
|
||||
import observe from '../utils/events.js';
|
||||
|
||||
function mask(input, maskChar) {
|
||||
input = String(input);
|
||||
maskChar = typeof maskChar === 'string' ? maskChar : '*';
|
||||
if (input.length === 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return new Array(input.length + 1).join(maskChar);
|
||||
}
|
||||
|
||||
export default class PasswordPrompt extends Base {
|
||||
/**
|
||||
* Start the Inquiry session
|
||||
* @param {Function} cb Callback when prompt is done
|
||||
* @return {this}
|
||||
*/
|
||||
|
||||
_run(cb) {
|
||||
this.done = cb;
|
||||
|
||||
const events = observe(this.rl);
|
||||
|
||||
// Once user confirm (enter key)
|
||||
const submit = events.line.pipe(map(this.filterInput.bind(this)));
|
||||
|
||||
const validation = this.handleSubmitEvents(submit);
|
||||
validation.success.forEach(this.onEnd.bind(this));
|
||||
validation.error.forEach(this.onError.bind(this));
|
||||
|
||||
events.keypress
|
||||
.pipe(takeUntil(validation.success))
|
||||
.forEach(this.onKeypress.bind(this));
|
||||
|
||||
// Init
|
||||
this.render();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the prompt to screen
|
||||
* @return {PasswordPrompt} self
|
||||
*/
|
||||
|
||||
render(error) {
|
||||
let message = this.getQuestion();
|
||||
let bottomContent = '';
|
||||
|
||||
if (this.status === 'answered') {
|
||||
message += this.getMaskedValue(this.answer);
|
||||
} else {
|
||||
message += this.getMaskedValue(this.rl.line || '');
|
||||
}
|
||||
|
||||
if (error) {
|
||||
bottomContent = '\n' + chalk.red('>> ') + error;
|
||||
}
|
||||
|
||||
this.screen.render(message, bottomContent);
|
||||
}
|
||||
|
||||
getMaskedValue(value) {
|
||||
if (this.status === 'answered') {
|
||||
return this.opt.mask
|
||||
? chalk.cyan(mask(value, this.opt.mask))
|
||||
: chalk.italic.dim('[hidden]');
|
||||
}
|
||||
return this.opt.mask
|
||||
? mask(value, this.opt.mask)
|
||||
: chalk.italic.dim('[input is hidden] ');
|
||||
}
|
||||
|
||||
/**
|
||||
* Mask value during async filter/validation.
|
||||
*/
|
||||
getSpinningValue(value) {
|
||||
return this.getMaskedValue(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* When user press `enter` key
|
||||
*/
|
||||
|
||||
filterInput(input) {
|
||||
if (!input) {
|
||||
return this.opt.default == null ? '' : this.opt.default;
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
onEnd(state) {
|
||||
this.status = 'answered';
|
||||
this.answer = state.value;
|
||||
|
||||
// Re-render prompt
|
||||
this.render();
|
||||
|
||||
this.screen.done();
|
||||
this.done(state.value);
|
||||
}
|
||||
|
||||
onError(state) {
|
||||
this.render(state.isValid);
|
||||
}
|
||||
|
||||
onKeypress() {
|
||||
// If user press a key, just clear the default value
|
||||
if (this.opt.default) {
|
||||
this.opt.default = undefined;
|
||||
}
|
||||
|
||||
this.render();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "util-deprecate",
|
||||
"version": "1.0.2",
|
||||
"description": "The Node.js `util.deprecate()` function with browser support",
|
||||
"main": "node.js",
|
||||
"browser": "browser.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/TooTallNate/util-deprecate.git"
|
||||
},
|
||||
"keywords": [
|
||||
"util",
|
||||
"deprecate",
|
||||
"browserify",
|
||||
"browser",
|
||||
"node"
|
||||
],
|
||||
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/TooTallNate/util-deprecate/issues"
|
||||
},
|
||||
"homepage": "https://github.com/TooTallNate/util-deprecate"
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
import { OperatorFunction, ObservableInput } from '../types';
|
||||
/**
|
||||
* Compares all values of two observables in sequence using an optional comparator function
|
||||
* and returns an observable of a single boolean value representing whether or not the two sequences
|
||||
* are equal.
|
||||
*
|
||||
* <span class="informal">Checks to see of all values emitted by both observables are equal, in order.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `sequenceEqual` subscribes to source observable and `compareTo` `ObservableInput` (that internally
|
||||
* gets converted to an observable) and buffers incoming values from each observable. Whenever either
|
||||
* observable emits a value, the value is buffered and the buffers are shifted and compared from the bottom
|
||||
* up; If any value pair doesn't match, the returned observable will emit `false` and complete. If one of the
|
||||
* observables completes, the operator will wait for the other observable to complete; If the other
|
||||
* observable emits before completing, the returned observable will emit `false` and complete. If one observable never
|
||||
* completes or emits after the other completes, the returned observable will never complete.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Figure out if the Konami code matches
|
||||
*
|
||||
* ```ts
|
||||
* import { from, fromEvent, map, bufferCount, mergeMap, sequenceEqual } from 'rxjs';
|
||||
*
|
||||
* const codes = from([
|
||||
* 'ArrowUp',
|
||||
* 'ArrowUp',
|
||||
* 'ArrowDown',
|
||||
* 'ArrowDown',
|
||||
* 'ArrowLeft',
|
||||
* 'ArrowRight',
|
||||
* 'ArrowLeft',
|
||||
* 'ArrowRight',
|
||||
* 'KeyB',
|
||||
* 'KeyA',
|
||||
* 'Enter', // no start key, clearly.
|
||||
* ]);
|
||||
*
|
||||
* const keys = fromEvent<KeyboardEvent>(document, 'keyup').pipe(map(e => e.code));
|
||||
* const matches = keys.pipe(
|
||||
* bufferCount(11, 1),
|
||||
* mergeMap(last11 => from(last11).pipe(sequenceEqual(codes)))
|
||||
* );
|
||||
* matches.subscribe(matched => console.log('Successful cheat at Contra? ', matched));
|
||||
* ```
|
||||
*
|
||||
* @see {@link combineLatest}
|
||||
* @see {@link zip}
|
||||
* @see {@link withLatestFrom}
|
||||
*
|
||||
* @param compareTo The `ObservableInput` sequence to compare the source sequence to.
|
||||
* @param comparator An optional function to compare each value pair.
|
||||
*
|
||||
* @return A function that returns an Observable that emits a single boolean
|
||||
* value representing whether or not the values emitted by the source
|
||||
* Observable and provided `ObservableInput` were equal in sequence.
|
||||
*/
|
||||
export declare function sequenceEqual<T>(compareTo: ObservableInput<T>, comparator?: (a: T, b: T) => boolean): OperatorFunction<T, boolean>;
|
||||
//# sourceMappingURL=sequenceEqual.d.ts.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,48 @@
|
||||
# slash
|
||||
|
||||
> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar`
|
||||
|
||||
[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters.
|
||||
|
||||
This was created since the `path` methods in Node.js outputs `\\` paths on Windows.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install slash
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import path from 'path';
|
||||
import slash from 'slash';
|
||||
|
||||
const string = path.join('foo', 'bar');
|
||||
// Unix => foo/bar
|
||||
// Windows => foo\\bar
|
||||
|
||||
slash(string);
|
||||
// Unix => foo/bar
|
||||
// Windows => foo/bar
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### slash(path)
|
||||
|
||||
Type: `string`
|
||||
|
||||
Accepts a Windows backslash path and returns a path with forward slashes.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-slash?utm_source=npm-slash&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
var isIterable = require("./is-iterable");
|
||||
|
||||
module.exports = function (value) {
|
||||
if (!isIterable(value)) throw new TypeError(value + " is not iterable");
|
||||
return value;
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.iterator = exports.getSymbolIterator = void 0;
|
||||
function getSymbolIterator() {
|
||||
if (typeof Symbol !== 'function' || !Symbol.iterator) {
|
||||
return '@@iterator';
|
||||
}
|
||||
return Symbol.iterator;
|
||||
}
|
||||
exports.getSymbolIterator = getSymbolIterator;
|
||||
exports.iterator = getSymbolIterator();
|
||||
//# sourceMappingURL=iterator.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"iterate-iterator","version":"1.0.2","files":{".eslintignore":{"checkedAt":1678883671537,"integrity":"sha512-VLhEcqup3IHXtZJPt07ZYoA9JNRjy1jhU/NU41Yw4E8mEyea/z+6bw5hL3lhCO09pji9E0BH2Q3aDXdc3i9zBg==","mode":420,"size":10},".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1678883671537,"integrity":"sha512-EqKjvyq6+l4/ZpJ47jMsh+ShZM/lTvYBnKi189QfOPECJNUvRx0CVqrWYA3sn7Oh7fPITzjMnxz9Trmir4oAZg==","mode":420,"size":1071},".eslintrc":{"checkedAt":1678883671909,"integrity":"sha512-JxQJ+3E3MPSCFJ1Q4sb/0qas067kTotv4vvKoa8mE/cXrDOSDWgvQ89saSL0L6fKu+JtKDI2ouKyW2tCL14sPA==","mode":420,"size":178},"index.js":{"checkedAt":1678883671909,"integrity":"sha512-RzrTqQRYIh/cgEg9CjTOfZo7A9ufONLM5K6pwFx1slDmRFW/WeoAfsi1iM+x1QiHyu6vMyjp7nkukxWUXHVSBQ==","mode":420,"size":728},"test/index.js":{"checkedAt":1678883671909,"integrity":"sha512-loIl/dd5DEDRLZcT5L2E1iEXuVf7OMQNCBU4mjVf5Q8EKflu6f/cJ0mYgUWIgI642sFCXny+mgZzsly6erH/xQ==","mode":420,"size":2662},"package.json":{"checkedAt":1678883671909,"integrity":"sha512-EZ+c4JdHeRXGmnD23Oa7v98iK2rGIVwvoryyeh5PwCRCuwq//9ChY+4FBustLQTyGNNYvOko2kmxZ8sT4fGfVQ==","mode":420,"size":1850},"CHANGELOG.md":{"checkedAt":1678883671913,"integrity":"sha512-iBquhCbRyHPcSXLNK3cMMtZvJrTcT/YFHODjzzWi0WQ0lGcayWVrQrMcp3oRMtZRgpk8mIccYKPzub4fKd6tTg==","mode":420,"size":5439},"README.md":{"checkedAt":1678883671913,"integrity":"sha512-0Xlg+isS9xfCtm8A/2XXqJ/7Mj7RVfz5+m3rZl+uatOJvKz9+4m5Yfg+pNQ9uljqtjZYITbQQgx5cFf0ruOklw==","mode":420,"size":3537},".github/FUNDING.yml":{"checkedAt":1678883671913,"integrity":"sha512-ohCtgXbOiLJ+sL/UHbQ0CdCLj5ZDCnwGFHh70sUtGo1jvAsl6jwfU8CbxJd9RRfiL9BioMaWlh8x6sqRWGDx7Q==","mode":420,"size":587}}}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "dot-prop",
|
||||
"version": "6.0.1",
|
||||
"description": "Get, set, or delete a property from a nested object using a dot path",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/dot-prop",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd",
|
||||
"bench": "node bench.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"object",
|
||||
"prop",
|
||||
"property",
|
||||
"dot",
|
||||
"path",
|
||||
"get",
|
||||
"set",
|
||||
"delete",
|
||||
"access",
|
||||
"notation",
|
||||
"dotty"
|
||||
],
|
||||
"dependencies": {
|
||||
"is-obj": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^2.1.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"tsd": "^0.13.1",
|
||||
"xo": "^0.33.1"
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"@typescript-eslint/method-signature-style": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.fs = void 0;
|
||||
const fs = require("./fs");
|
||||
exports.fs = fs;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineLatestAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/combineLatestAll.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG7D,wBAAgB,gBAAgB,CAAC,CAAC,KAAK,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACjF,wBAAgB,gBAAgB,CAAC,CAAC,KAAK,gBAAgB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAClE,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAChH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O"},C:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB EC FC","132":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB"},D:{"1":"2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I","16":"0 1 v J D E x y z","132":"F A B C K L G M N O w g"},E:{"1":"C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v HC zB IC","132":"J D E F A B JC KC LC 0B"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"F B C PC QC RC SC qB AC TC rB"},G:{"2":"WC XC","132":"E YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","514":"zB UC BC VC"},H:{"2":"oC"},I:{"2":"pC qC rC","260":"tB I sC BC","514":"f tC uC"},J:{"132":"A","260":"D"},K:{"2":"A B C qB AC rB","514":"h"},L:{"260":"H"},M:{"2":"H"},N:{"514":"A","1028":"B"},O:{"2":"vC"},P:{"260":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"260":"1B"},R:{"260":"9C"},S:{"1":"AD BD"}},B:1,C:"accept attribute for file input"};
|
||||
@@ -0,0 +1,44 @@
|
||||
import nock from 'nock';
|
||||
|
||||
export let interceptUser = ({ host = 'https://gitlab.com', owner = 'user' } = {}, options) =>
|
||||
nock(host, options).get('/api/v4/user').reply(200, { id: 1, username: owner });
|
||||
|
||||
export let interceptCollaborator = (
|
||||
{ host = 'https://gitlab.com', owner = 'user', project = 'repo', group, userId = 1 } = {},
|
||||
options
|
||||
) =>
|
||||
nock(host, options)
|
||||
.get(`/api/v4/projects/${group ? `${group}%2F` : ''}${owner}%2F${project}/members/all/${userId}`)
|
||||
.reply(200, { id: userId, username: owner, access_level: 30 });
|
||||
|
||||
export let interceptPublish = ({ host = 'https://gitlab.com', owner = 'user', project = 'repo', body } = {}, options) =>
|
||||
nock(host, options).post(`/api/v4/projects/${owner}%2F${project}/releases`, body).reply(200, {});
|
||||
|
||||
export let interceptMilestones = (
|
||||
{ host = 'https://gitlab.com', owner = 'user', project = 'repo', query = {}, milestones = [] } = {},
|
||||
options
|
||||
) =>
|
||||
nock(host, options)
|
||||
.get(`/api/v4/projects/${owner}%2F${project}/milestones`)
|
||||
.query(
|
||||
Object.assign(
|
||||
{
|
||||
include_parent_milestones: true
|
||||
},
|
||||
query
|
||||
)
|
||||
)
|
||||
.reply(200, JSON.stringify(milestones));
|
||||
|
||||
export let interceptAsset = ({ host = 'https://gitlab.com', owner = 'user', project = 'repo' } = {}) =>
|
||||
nock(host)
|
||||
.post(`/api/v4/projects/${owner}%2F${project}/uploads`)
|
||||
.query(true)
|
||||
.reply(200, function (_, requestBody) {
|
||||
const [, name] = requestBody.match(/filename="([^"]+)/);
|
||||
return {
|
||||
alt: name,
|
||||
url: `/uploads/7e8bec1fe27cc46a4bc6a91b9e82a07c/${name}`,
|
||||
markdown: `[${name}](/uploads/7e8bec1fe27cc46a4bc6a91b9e82a07c/${name})`
|
||||
};
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"C K L G M N O","2":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC","386":"x y"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:6,C:"Dynamic Adaptive Streaming over HTTP (MPEG-DASH)"};
|
||||
@@ -0,0 +1,3 @@
|
||||
let urlAlphabet =
|
||||
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
|
||||
export { urlAlphabet }
|
||||
@@ -0,0 +1,26 @@
|
||||
let Selector = require('../selector')
|
||||
let utils = require('../utils')
|
||||
|
||||
class Autofill extends Selector {
|
||||
constructor(name, prefixes, all) {
|
||||
super(name, prefixes, all)
|
||||
|
||||
if (this.prefixes) {
|
||||
this.prefixes = utils.uniq(this.prefixes.map(() => '-webkit-'))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return different selectors depend on prefix
|
||||
*/
|
||||
prefixed(prefix) {
|
||||
if (prefix === '-webkit-') {
|
||||
return ':-webkit-autofill'
|
||||
}
|
||||
return `:${prefix}autofill`
|
||||
}
|
||||
}
|
||||
|
||||
Autofill.names = [':autofill']
|
||||
|
||||
module.exports = Autofill
|
||||
@@ -0,0 +1,63 @@
|
||||
'use strict'
|
||||
|
||||
const u = require('universalify').fromCallback
|
||||
const path = require('path')
|
||||
const fs = require('graceful-fs')
|
||||
const _mkdirs = require('../mkdirs')
|
||||
const mkdirs = _mkdirs.mkdirs
|
||||
const mkdirsSync = _mkdirs.mkdirsSync
|
||||
|
||||
const _symlinkPaths = require('./symlink-paths')
|
||||
const symlinkPaths = _symlinkPaths.symlinkPaths
|
||||
const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
|
||||
|
||||
const _symlinkType = require('./symlink-type')
|
||||
const symlinkType = _symlinkType.symlinkType
|
||||
const symlinkTypeSync = _symlinkType.symlinkTypeSync
|
||||
|
||||
const pathExists = require('../path-exists').pathExists
|
||||
|
||||
function createSymlink (srcpath, dstpath, type, callback) {
|
||||
callback = (typeof type === 'function') ? type : callback
|
||||
type = (typeof type === 'function') ? false : type
|
||||
|
||||
pathExists(dstpath, (err, destinationExists) => {
|
||||
if (err) return callback(err)
|
||||
if (destinationExists) return callback(null)
|
||||
symlinkPaths(srcpath, dstpath, (err, relative) => {
|
||||
if (err) return callback(err)
|
||||
srcpath = relative.toDst
|
||||
symlinkType(relative.toCwd, type, (err, type) => {
|
||||
if (err) return callback(err)
|
||||
const dir = path.dirname(dstpath)
|
||||
pathExists(dir, (err, dirExists) => {
|
||||
if (err) return callback(err)
|
||||
if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
|
||||
mkdirs(dir, err => {
|
||||
if (err) return callback(err)
|
||||
fs.symlink(srcpath, dstpath, type, callback)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function createSymlinkSync (srcpath, dstpath, type) {
|
||||
const destinationExists = fs.existsSync(dstpath)
|
||||
if (destinationExists) return undefined
|
||||
|
||||
const relative = symlinkPathsSync(srcpath, dstpath)
|
||||
srcpath = relative.toDst
|
||||
type = symlinkTypeSync(relative.toCwd, type)
|
||||
const dir = path.dirname(dstpath)
|
||||
const exists = fs.existsSync(dir)
|
||||
if (exists) return fs.symlinkSync(srcpath, dstpath, type)
|
||||
mkdirsSync(dir)
|
||||
return fs.symlinkSync(srcpath, dstpath, type)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
createSymlink: u(createSymlink),
|
||||
createSymlinkSync
|
||||
}
|
||||
Reference in New Issue
Block a user