`.
-
-### isFileSync(path)
-
-Synchronously check whether the passed `path` is a file.
-
-Returns a `boolean`.
-
-### isDirectorySync(path)
-
-Synchronously check whether the passed `path` is a directory.
-
-Returns a `boolean`.
-
-### isSymlinkSync(path)
-
-Synchronously check whether the passed `path` is a symlink.
-
-Returns a `boolean`.
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/picocolors/LICENSE b/node_modules/picocolors/LICENSE
deleted file mode 100644
index 496098c6..00000000
--- a/node_modules/picocolors/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-ISC License
-
-Copyright (c) 2021 Alexey Raspopov, Kostiantyn Denysov, Anton Verinov
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/node_modules/picocolors/README.md b/node_modules/picocolors/README.md
deleted file mode 100644
index 8e47aa8e..00000000
--- a/node_modules/picocolors/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# picocolors
-
-The tiniest and the fastest library for terminal output formatting with ANSI colors.
-
-```javascript
-import pc from "picocolors"
-
-console.log(
- pc.green(`How are ${pc.italic(`you`)} doing?`)
-)
-```
-
-- **No dependencies.**
-- **14 times** smaller and **2 times** faster than chalk.
-- Used by popular tools like PostCSS, SVGO, Stylelint, and Browserslist.
-- Node.js v6+ & browsers support. Support for both CJS and ESM projects.
-- TypeScript type declarations included.
-- [`NO_COLOR`](https://no-color.org/) friendly.
-
-## Docs
-Read **[full docs](https://github.com/alexeyraspopov/picocolors#readme)** on GitHub.
diff --git a/node_modules/picocolors/package.json b/node_modules/picocolors/package.json
deleted file mode 100644
index 85a12d52..00000000
--- a/node_modules/picocolors/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "picocolors",
- "version": "1.0.0",
- "main": "./picocolors.js",
- "types": "./picocolors.d.ts",
- "browser": {
- "./picocolors.js": "./picocolors.browser.js"
- },
- "sideEffects": false,
- "description": "The tiniest and the fastest library for terminal output formatting with ANSI colors",
- "files": [
- "picocolors.*",
- "types.ts"
- ],
- "keywords": [
- "terminal",
- "colors",
- "formatting",
- "cli",
- "console"
- ],
- "author": "Alexey Raspopov",
- "repository": "alexeyraspopov/picocolors",
- "license": "ISC"
-}
diff --git a/node_modules/picocolors/picocolors.browser.js b/node_modules/picocolors/picocolors.browser.js
deleted file mode 100644
index 5eb9fbe8..00000000
--- a/node_modules/picocolors/picocolors.browser.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var x=String;
-var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x}};
-module.exports=create();
-module.exports.createColors = create;
diff --git a/node_modules/picocolors/picocolors.d.ts b/node_modules/picocolors/picocolors.d.ts
deleted file mode 100644
index 94e146a8..00000000
--- a/node_modules/picocolors/picocolors.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { Colors } from "./types"
-
-declare const picocolors: Colors & { createColors: (enabled?: boolean) => Colors }
-
-export = picocolors
diff --git a/node_modules/picocolors/picocolors.js b/node_modules/picocolors/picocolors.js
deleted file mode 100644
index fdb63045..00000000
--- a/node_modules/picocolors/picocolors.js
+++ /dev/null
@@ -1,58 +0,0 @@
-let tty = require("tty")
-
-let isColorSupported =
- !("NO_COLOR" in process.env || process.argv.includes("--no-color")) &&
- ("FORCE_COLOR" in process.env ||
- process.argv.includes("--color") ||
- process.platform === "win32" ||
- (tty.isatty(1) && process.env.TERM !== "dumb") ||
- "CI" in process.env)
-
-let formatter =
- (open, close, replace = open) =>
- input => {
- let string = "" + input
- let index = string.indexOf(close, open.length)
- return ~index
- ? open + replaceClose(string, close, replace, index) + close
- : open + string + close
- }
-
-let replaceClose = (string, close, replace, index) => {
- let start = string.substring(0, index) + replace
- let end = string.substring(index + close.length)
- let nextIndex = end.indexOf(close)
- return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end
-}
-
-let createColors = (enabled = isColorSupported) => ({
- isColorSupported: enabled,
- reset: enabled ? s => `\x1b[0m${s}\x1b[0m` : String,
- bold: enabled ? formatter("\x1b[1m", "\x1b[22m", "\x1b[22m\x1b[1m") : String,
- dim: enabled ? formatter("\x1b[2m", "\x1b[22m", "\x1b[22m\x1b[2m") : String,
- italic: enabled ? formatter("\x1b[3m", "\x1b[23m") : String,
- underline: enabled ? formatter("\x1b[4m", "\x1b[24m") : String,
- inverse: enabled ? formatter("\x1b[7m", "\x1b[27m") : String,
- hidden: enabled ? formatter("\x1b[8m", "\x1b[28m") : String,
- strikethrough: enabled ? formatter("\x1b[9m", "\x1b[29m") : String,
- black: enabled ? formatter("\x1b[30m", "\x1b[39m") : String,
- red: enabled ? formatter("\x1b[31m", "\x1b[39m") : String,
- green: enabled ? formatter("\x1b[32m", "\x1b[39m") : String,
- yellow: enabled ? formatter("\x1b[33m", "\x1b[39m") : String,
- blue: enabled ? formatter("\x1b[34m", "\x1b[39m") : String,
- magenta: enabled ? formatter("\x1b[35m", "\x1b[39m") : String,
- cyan: enabled ? formatter("\x1b[36m", "\x1b[39m") : String,
- white: enabled ? formatter("\x1b[37m", "\x1b[39m") : String,
- gray: enabled ? formatter("\x1b[90m", "\x1b[39m") : String,
- bgBlack: enabled ? formatter("\x1b[40m", "\x1b[49m") : String,
- bgRed: enabled ? formatter("\x1b[41m", "\x1b[49m") : String,
- bgGreen: enabled ? formatter("\x1b[42m", "\x1b[49m") : String,
- bgYellow: enabled ? formatter("\x1b[43m", "\x1b[49m") : String,
- bgBlue: enabled ? formatter("\x1b[44m", "\x1b[49m") : String,
- bgMagenta: enabled ? formatter("\x1b[45m", "\x1b[49m") : String,
- bgCyan: enabled ? formatter("\x1b[46m", "\x1b[49m") : String,
- bgWhite: enabled ? formatter("\x1b[47m", "\x1b[49m") : String,
-})
-
-module.exports = createColors()
-module.exports.createColors = createColors
diff --git a/node_modules/picocolors/types.ts b/node_modules/picocolors/types.ts
deleted file mode 100644
index b4bacee4..00000000
--- a/node_modules/picocolors/types.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-export type Formatter = (input: string | number | null | undefined) => string
-
-export interface Colors {
- isColorSupported: boolean
- reset: Formatter
- bold: Formatter
- dim: Formatter
- italic: Formatter
- underline: Formatter
- inverse: Formatter
- hidden: Formatter
- strikethrough: Formatter
- black: Formatter
- red: Formatter
- green: Formatter
- yellow: Formatter
- blue: Formatter
- magenta: Formatter
- cyan: Formatter
- white: Formatter
- gray: Formatter
- bgBlack: Formatter
- bgRed: Formatter
- bgGreen: Formatter
- bgYellow: Formatter
- bgBlue: Formatter
- bgMagenta: Formatter
- bgCyan: Formatter
- bgWhite: Formatter
-}
diff --git a/node_modules/picomatch/CHANGELOG.md b/node_modules/picomatch/CHANGELOG.md
deleted file mode 100644
index 8ccc6c1b..00000000
--- a/node_modules/picomatch/CHANGELOG.md
+++ /dev/null
@@ -1,136 +0,0 @@
-# Release history
-
-**All notable changes to this project will be documented in this file.**
-
-The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
-and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
-
-
- Guiding Principles
-
-- Changelogs are for humans, not machines.
-- There should be an entry for every single version.
-- The same types of changes should be grouped.
-- Versions and sections should be linkable.
-- The latest version comes first.
-- The release date of each versions is displayed.
-- Mention whether you follow Semantic Versioning.
-
-
-
-
- Types of changes
-
-Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
-
-- `Added` for new features.
-- `Changed` for changes in existing functionality.
-- `Deprecated` for soon-to-be removed features.
-- `Removed` for now removed features.
-- `Fixed` for any bug fixes.
-- `Security` in case of vulnerabilities.
-
-
-
-## 2.3.1 (2022-01-02)
-
-### Fixed
-
-* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)).
-
-### Changed
-
-* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)).
-
-## 2.3.0 (2021-05-21)
-
-### Fixed
-
-* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef))
-
-## 2.2.3 (2021-04-10)
-
-### Fixed
-
-* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)).
-* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)).
-
-## 2.2.2 (2020-03-21)
-
-### Fixed
-
-* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)).
-
-## 2.2.1 (2020-01-04)
-
-* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals.
-
-## 2.2.0 (2020-01-04)
-
-* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f))
-* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`.
-
-## 2.1.0 (2019-10-31)
-
-* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92))
-* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650))
-* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c))
-* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9))
-* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625))
-* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0))
-* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8))
-* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07))
-* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45))
-* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34))
-* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55))
-* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03))
-* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87))
-* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d))
-* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa))
-* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d))
-* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54))
-* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367))
-* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569))
-* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77))
-* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038))
-* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd))
-
-## 2.0.7 (2019-05-14)
-
-* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71))
-* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e))
-* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279))
-* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44))
-
-## 2.0.4 (2019-04-10)
-
-### Fixed
-
-- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez.
-- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza.
-
-## 2.0.0 (2019-04-10)
-
-### Added
-
-- Adds support for `options.onIgnore`. See the readme for details
-- Adds support for `options.onResult`. See the readme for details
-
-### Breaking changes
-
-- The unixify option was renamed to `windows`
-- caching and all related options and methods have been removed
-
-## 1.0.0 (2018-11-05)
-
-- adds `.onMatch` option
-- improvements to `.scan` method
-- numerous improvements and optimizations for matching and parsing
-- better windows path handling
-
-## 0.1.0 - 2017-04-13
-
-First release.
-
-
-[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog
diff --git a/node_modules/picomatch/LICENSE b/node_modules/picomatch/LICENSE
deleted file mode 100644
index 3608dca2..00000000
--- a/node_modules/picomatch/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2017-present, Jon Schlinkert.
-
-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.
diff --git a/node_modules/picomatch/README.md b/node_modules/picomatch/README.md
deleted file mode 100644
index b0526e28..00000000
--- a/node_modules/picomatch/README.md
+++ /dev/null
@@ -1,708 +0,0 @@
-Picomatch
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Blazing fast and accurate glob matcher written in JavaScript.
-No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
-
-
-
-
-
-## Why picomatch?
-
-* **Lightweight** - No dependencies
-* **Minimal** - Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
-* **Fast** - Loads in about 2ms (that's several times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps)
-* **Performant** - Use the returned matcher function to speed up repeat matching (like when watching files)
-* **Accurate matching** - Using wildcards (`*` and `?`), globstars (`**`) for nested directories, [advanced globbing](#advanced-globbing) with extglobs, braces, and POSIX brackets, and support for escaping special characters with `\` or quotes.
-* **Well tested** - Thousands of unit tests
-
-See the [library comparison](#library-comparisons) to other libraries.
-
-
-
-
-## Table of Contents
-
- Click to expand
-
-- [Install](#install)
-- [Usage](#usage)
-- [API](#api)
- * [picomatch](#picomatch)
- * [.test](#test)
- * [.matchBase](#matchbase)
- * [.isMatch](#ismatch)
- * [.parse](#parse)
- * [.scan](#scan)
- * [.compileRe](#compilere)
- * [.makeRe](#makere)
- * [.toRegex](#toregex)
-- [Options](#options)
- * [Picomatch options](#picomatch-options)
- * [Scan Options](#scan-options)
- * [Options Examples](#options-examples)
-- [Globbing features](#globbing-features)
- * [Basic globbing](#basic-globbing)
- * [Advanced globbing](#advanced-globbing)
- * [Braces](#braces)
- * [Matching special characters as literals](#matching-special-characters-as-literals)
-- [Library Comparisons](#library-comparisons)
-- [Benchmarks](#benchmarks)
-- [Philosophies](#philosophies)
-- [About](#about)
- * [Author](#author)
- * [License](#license)
-
-_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
-
-
-
-
-
-
-## Install
-
-Install with [npm](https://www.npmjs.com/):
-
-```sh
-npm install --save picomatch
-```
-
-
-
-## Usage
-
-The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.
-
-```js
-const pm = require('picomatch');
-const isMatch = pm('*.js');
-
-console.log(isMatch('abcd')); //=> false
-console.log(isMatch('a.js')); //=> true
-console.log(isMatch('a.md')); //=> false
-console.log(isMatch('a/b.js')); //=> false
-```
-
-
-
-## API
-
-### [picomatch](lib/picomatch.js#L32)
-
-Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information.
-
-**Params**
-
-* `globs` **{String|Array}**: One or more glob patterns.
-* `options` **{Object=}**
-* `returns` **{Function=}**: Returns a matcher function.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch(glob[, options]);
-
-const isMatch = picomatch('*.!(*a)');
-console.log(isMatch('a.a')); //=> false
-console.log(isMatch('a.b')); //=> true
-```
-
-### [.test](lib/picomatch.js#L117)
-
-Test `input` with the given `regex`. This is used by the main `picomatch()` function to test the input string.
-
-**Params**
-
-* `input` **{String}**: String to test.
-* `regex` **{RegExp}**
-* `returns` **{Object}**: Returns an object with matching info.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.test(input, regex[, options]);
-
-console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
-// { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
-```
-
-### [.matchBase](lib/picomatch.js#L161)
-
-Match the basename of a filepath.
-
-**Params**
-
-* `input` **{String}**: String to test.
-* `glob` **{RegExp|String}**: Glob pattern or regex created by [.makeRe](#makeRe).
-* `returns` **{Boolean}**
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.matchBase(input, glob[, options]);
-console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
-```
-
-### [.isMatch](lib/picomatch.js#L183)
-
-Returns true if **any** of the given glob `patterns` match the specified `string`.
-
-**Params**
-
-* **{String|Array}**: str The string to test.
-* **{String|Array}**: patterns One or more glob patterns to use for matching.
-* **{Object}**: See available [options](#options).
-* `returns` **{Boolean}**: Returns true if any patterns match `str`
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.isMatch(string, patterns[, options]);
-
-console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
-console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
-```
-
-### [.parse](lib/picomatch.js#L199)
-
-Parse a glob pattern to create the source string for a regular expression.
-
-**Params**
-
-* `pattern` **{String}**
-* `options` **{Object}**
-* `returns` **{Object}**: Returns an object with useful properties and output to be used as a regex source string.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-const result = picomatch.parse(pattern[, options]);
-```
-
-### [.scan](lib/picomatch.js#L231)
-
-Scan a glob pattern to separate the pattern into segments.
-
-**Params**
-
-* `input` **{String}**: Glob pattern to scan.
-* `options` **{Object}**
-* `returns` **{Object}**: Returns an object with
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.scan(input[, options]);
-
-const result = picomatch.scan('!./foo/*.js');
-console.log(result);
-{ prefix: '!./',
- input: '!./foo/*.js',
- start: 3,
- base: 'foo',
- glob: '*.js',
- isBrace: false,
- isBracket: false,
- isGlob: true,
- isExtglob: false,
- isGlobstar: false,
- negated: true }
-```
-
-### [.compileRe](lib/picomatch.js#L245)
-
-Compile a regular expression from the `state` object returned by the
-[parse()](#parse) method.
-
-**Params**
-
-* `state` **{Object}**
-* `options` **{Object}**
-* `returnOutput` **{Boolean}**: Intended for implementors, this argument allows you to return the raw output from the parser.
-* `returnState` **{Boolean}**: Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
-* `returns` **{RegExp}**
-
-### [.makeRe](lib/picomatch.js#L286)
-
-Create a regular expression from a parsed glob pattern.
-
-**Params**
-
-* `state` **{String}**: The object returned from the `.parse` method.
-* `options` **{Object}**
-* `returnOutput` **{Boolean}**: Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
-* `returnState` **{Boolean}**: Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
-* `returns` **{RegExp}**: Returns a regex created from the given pattern.
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-const state = picomatch.parse('*.js');
-// picomatch.compileRe(state[, options]);
-
-console.log(picomatch.compileRe(state));
-//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
-```
-
-### [.toRegex](lib/picomatch.js#L321)
-
-Create a regular expression from the given regex source string.
-
-**Params**
-
-* `source` **{String}**: Regular expression source string.
-* `options` **{Object}**
-* `returns` **{RegExp}**
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-// picomatch.toRegex(source[, options]);
-
-const { output } = picomatch.parse('*.js');
-console.log(picomatch.toRegex(output));
-//=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
-```
-
-
-
-## Options
-
-### Picomatch options
-
-The following options may be used with the main `picomatch()` function or any of the methods on the picomatch API.
-
-| **Option** | **Type** | **Default value** | **Description** |
-| --- | --- | --- | --- |
-| `basename` | `boolean` | `false` | If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, `a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. |
-| `bash` | `boolean` | `false` | Follow bash matching rules more strictly - disallows backslashes as escape characters, and treats single stars as globstars (`**`). |
-| `capture` | `boolean` | `undefined` | Return regex matches in supporting methods. |
-| `contains` | `boolean` | `undefined` | Allows glob to match any part of the given string(s). |
-| `cwd` | `string` | `process.cwd()` | Current working directory. Used by `picomatch.split()` |
-| `debug` | `boolean` | `undefined` | Debug regular expressions when an error is thrown. |
-| `dot` | `boolean` | `false` | Enable dotfile matching. By default, dotfiles are ignored unless a `.` is explicitly defined in the pattern, or `options.dot` is true |
-| `expandRange` | `function` | `undefined` | Custom function for expanding ranges in brace patterns, such as `{a..z}`. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It's recommended that returned strings be wrapped in parentheses. |
-| `failglob` | `boolean` | `false` | Throws an error if no matches are found. Based on the bash option of the same name. |
-| `fastpaths` | `boolean` | `true` | To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to `false`. |
-| `flags` | `string` | `undefined` | Regex flags to use in the generated regex. If defined, the `nocase` option will be overridden. |
-| [format](#optionsformat) | `function` | `undefined` | Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc. |
-| `ignore` | `array\|string` | `undefined` | One or more glob patterns for excluding strings that should not be matched from the result. |
-| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
-| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
-| `matchBase` | `boolean` | `false` | Alias for `basename` |
-| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
-| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
-| `nobracket` | `boolean` | `undefined` | Disable matching with regex brackets. |
-| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
-| `nodupes` | `boolean` | `true` | Deprecated, use `nounique` instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false. |
-| `noext` | `boolean` | `false` | Alias for `noextglob` |
-| `noextglob` | `boolean` | `false` | Disable support for matching with extglobs (like `+(a\|b)`) |
-| `noglobstar` | `boolean` | `false` | Disable support for matching nested directories with globstars (`**`) |
-| `nonegate` | `boolean` | `false` | Disable support for negating with leading `!` |
-| `noquantifiers` | `boolean` | `false` | Disable support for regex quantifiers (like `a{1,2}`) and treat them as brace patterns to be expanded. |
-| [onIgnore](#optionsonIgnore) | `function` | `undefined` | Function to be called on ignored items. |
-| [onMatch](#optionsonMatch) | `function` | `undefined` | Function to be called on matched items. |
-| [onResult](#optionsonResult) | `function` | `undefined` | Function to be called on all items, regardless of whether or not they are matched or ignored. |
-| `posix` | `boolean` | `false` | Support POSIX character classes ("posix brackets"). |
-| `posixSlashes` | `boolean` | `undefined` | Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself |
-| `prepend` | `boolean` | `undefined` | String to prepend to the generated regex used for matching. |
-| `regex` | `boolean` | `false` | Use regular expression rules for `+` (instead of matching literal `+`), and for stars that follow closing parentheses or brackets (as in `)*` and `]*`). |
-| `strictBrackets` | `boolean` | `undefined` | Throw an error if brackets, braces, or parens are imbalanced. |
-| `strictSlashes` | `boolean` | `undefined` | When true, picomatch won't match trailing slashes with single stars. |
-| `unescape` | `boolean` | `undefined` | Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained. |
-| `unixify` | `boolean` | `undefined` | Alias for `posixSlashes`, for backwards compatibility. |
-
-picomatch has automatic detection for regex positive and negative lookbehinds. If the pattern contains a negative lookbehind, you must be using Node.js >= 8.10 or else picomatch will throw an error.
-
-### Scan Options
-
-In addition to the main [picomatch options](#picomatch-options), the following options may also be used with the [.scan](#scan) method.
-
-| **Option** | **Type** | **Default value** | **Description** |
-| --- | --- | --- | --- |
-| `tokens` | `boolean` | `false` | When `true`, the returned object will include an array of tokens (objects), representing each path "segment" in the scanned glob pattern |
-| `parts` | `boolean` | `false` | When `true`, the returned object will include an array of strings representing each path "segment" in the scanned glob pattern. This is automatically enabled when `options.tokens` is true |
-
-**Example**
-
-```js
-const picomatch = require('picomatch');
-const result = picomatch.scan('!./foo/*.js', { tokens: true });
-console.log(result);
-// {
-// prefix: '!./',
-// input: '!./foo/*.js',
-// start: 3,
-// base: 'foo',
-// glob: '*.js',
-// isBrace: false,
-// isBracket: false,
-// isGlob: true,
-// isExtglob: false,
-// isGlobstar: false,
-// negated: true,
-// maxDepth: 2,
-// tokens: [
-// { value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true },
-// { value: 'foo', depth: 1, isGlob: false },
-// { value: '*.js', depth: 1, isGlob: true }
-// ],
-// slashes: [ 2, 6 ],
-// parts: [ 'foo', '*.js' ]
-// }
-```
-
-
-
-### Options Examples
-
-#### options.expandRange
-
-**Type**: `function`
-
-**Default**: `undefined`
-
-Custom function for expanding ranges in brace patterns. The [fill-range](https://github.com/jonschlinkert/fill-range) library is ideal for this purpose, or you can use custom code to do whatever you need.
-
-**Example**
-
-The following example shows how to create a glob that matches a folder
-
-```js
-const fill = require('fill-range');
-const regex = pm.makeRe('foo/{01..25}/bar', {
- expandRange(a, b) {
- return `(${fill(a, b, { toRegex: true })})`;
- }
-});
-
-console.log(regex);
-//=> /^(?:foo\/((?:0[1-9]|1[0-9]|2[0-5]))\/bar)$/
-
-console.log(regex.test('foo/00/bar')) // false
-console.log(regex.test('foo/01/bar')) // true
-console.log(regex.test('foo/10/bar')) // true
-console.log(regex.test('foo/22/bar')) // true
-console.log(regex.test('foo/25/bar')) // true
-console.log(regex.test('foo/26/bar')) // false
-```
-
-#### options.format
-
-**Type**: `function`
-
-**Default**: `undefined`
-
-Custom function for formatting strings before they're matched.
-
-**Example**
-
-```js
-// strip leading './' from strings
-const format = str => str.replace(/^\.\//, '');
-const isMatch = picomatch('foo/*.js', { format });
-console.log(isMatch('./foo/bar.js')); //=> true
-```
-
-#### options.onMatch
-
-```js
-const onMatch = ({ glob, regex, input, output }) => {
- console.log({ glob, regex, input, output });
-};
-
-const isMatch = picomatch('*', { onMatch });
-isMatch('foo');
-isMatch('bar');
-isMatch('baz');
-```
-
-#### options.onIgnore
-
-```js
-const onIgnore = ({ glob, regex, input, output }) => {
- console.log({ glob, regex, input, output });
-};
-
-const isMatch = picomatch('*', { onIgnore, ignore: 'f*' });
-isMatch('foo');
-isMatch('bar');
-isMatch('baz');
-```
-
-#### options.onResult
-
-```js
-const onResult = ({ glob, regex, input, output }) => {
- console.log({ glob, regex, input, output });
-};
-
-const isMatch = picomatch('*', { onResult, ignore: 'f*' });
-isMatch('foo');
-isMatch('bar');
-isMatch('baz');
-```
-
-
-
-
-## Globbing features
-
-* [Basic globbing](#basic-globbing) (Wildcard matching)
-* [Advanced globbing](#advanced-globbing) (extglobs, posix brackets, brace matching)
-
-### Basic globbing
-
-| **Character** | **Description** |
-| --- | --- |
-| `*` | Matches any character zero or more times, excluding path separators. Does _not match_ path separators or hidden files or directories ("dotfiles"), unless explicitly enabled by setting the `dot` option to `true`. |
-| `**` | Matches any character zero or more times, including path separators. Note that `**` will only match path separators (`/`, and `\\` on Windows) when they are the only characters in a path segment. Thus, `foo**/bar` is equivalent to `foo*/bar`, and `foo/a**b/bar` is equivalent to `foo/a*b/bar`, and _more than two_ consecutive stars in a glob path segment are regarded as _a single star_. Thus, `foo/***/bar` is equivalent to `foo/*/bar`. |
-| `?` | Matches any character excluding path separators one time. Does _not match_ path separators or leading dots. |
-| `[abc]` | Matches any characters inside the brackets. For example, `[abc]` would match the characters `a`, `b` or `c`, and nothing else. |
-
-#### Matching behavior vs. Bash
-
-Picomatch's matching features and expected results in unit tests are based on Bash's unit tests and the Bash 4.3 specification, with the following exceptions:
-
-* Bash will match `foo/bar/baz` with `*`. Picomatch only matches nested directories with `**`.
-* Bash greedily matches with negated extglobs. For example, Bash 4.3 says that `!(foo)*` should match `foo` and `foobar`, since the trailing `*` bracktracks to match the preceding pattern. This is very memory-inefficient, and IMHO, also incorrect. Picomatch would return `false` for both `foo` and `foobar`.
-
-
-
-### Advanced globbing
-
-* [extglobs](#extglobs)
-* [POSIX brackets](#posix-brackets)
-* [Braces](#brace-expansion)
-
-#### Extglobs
-
-| **Pattern** | **Description** |
-| --- | --- |
-| `@(pattern)` | Match _only one_ consecutive occurrence of `pattern` |
-| `*(pattern)` | Match _zero or more_ consecutive occurrences of `pattern` |
-| `+(pattern)` | Match _one or more_ consecutive occurrences of `pattern` |
-| `?(pattern)` | Match _zero or **one**_ consecutive occurrences of `pattern` |
-| `!(pattern)` | Match _anything but_ `pattern` |
-
-**Examples**
-
-```js
-const pm = require('picomatch');
-
-// *(pattern) matches ZERO or more of "pattern"
-console.log(pm.isMatch('a', 'a*(z)')); // true
-console.log(pm.isMatch('az', 'a*(z)')); // true
-console.log(pm.isMatch('azzz', 'a*(z)')); // true
-
-// +(pattern) matches ONE or more of "pattern"
-console.log(pm.isMatch('a', 'a*(z)')); // true
-console.log(pm.isMatch('az', 'a*(z)')); // true
-console.log(pm.isMatch('azzz', 'a*(z)')); // true
-
-// supports multiple extglobs
-console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false
-
-// supports nested extglobs
-console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true
-```
-
-#### POSIX brackets
-
-POSIX classes are disabled by default. Enable this feature by setting the `posix` option to true.
-
-**Enable POSIX bracket support**
-
-```js
-console.log(pm.makeRe('[[:word:]]+', { posix: true }));
-//=> /^(?:(?=.)[A-Za-z0-9_]+\/?)$/
-```
-
-**Supported POSIX classes**
-
-The following named POSIX bracket expressions are supported:
-
-* `[:alnum:]` - Alphanumeric characters, equ `[a-zA-Z0-9]`
-* `[:alpha:]` - Alphabetical characters, equivalent to `[a-zA-Z]`.
-* `[:ascii:]` - ASCII characters, equivalent to `[\\x00-\\x7F]`.
-* `[:blank:]` - Space and tab characters, equivalent to `[ \\t]`.
-* `[:cntrl:]` - Control characters, equivalent to `[\\x00-\\x1F\\x7F]`.
-* `[:digit:]` - Numerical digits, equivalent to `[0-9]`.
-* `[:graph:]` - Graph characters, equivalent to `[\\x21-\\x7E]`.
-* `[:lower:]` - Lowercase letters, equivalent to `[a-z]`.
-* `[:print:]` - Print characters, equivalent to `[\\x20-\\x7E ]`.
-* `[:punct:]` - Punctuation and symbols, equivalent to `[\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~]`.
-* `[:space:]` - Extended space characters, equivalent to `[ \\t\\r\\n\\v\\f]`.
-* `[:upper:]` - Uppercase letters, equivalent to `[A-Z]`.
-* `[:word:]` - Word characters (letters, numbers and underscores), equivalent to `[A-Za-z0-9_]`.
-* `[:xdigit:]` - Hexadecimal digits, equivalent to `[A-Fa-f0-9]`.
-
-See the [Bash Reference Manual](https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html) for more information.
-
-### Braces
-
-Picomatch does not do brace expansion. For [brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html) and advanced matching with braces, use [micromatch](https://github.com/micromatch/micromatch) instead. Picomatch has very basic support for braces.
-
-### Matching special characters as literals
-
-If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes:
-
-**Special Characters**
-
-Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.
-
-To match any of the following characters as literals: `$^*+?()[]
-
-Examples:
-
-```js
-console.log(pm.makeRe('foo/bar \\(1\\)'));
-console.log(pm.makeRe('foo/bar \\(1\\)'));
-```
-
-
-
-
-## Library Comparisons
-
-The following table shows which features are supported by [minimatch](https://github.com/isaacs/minimatch), [micromatch](https://github.com/micromatch/micromatch), [picomatch](https://github.com/micromatch/picomatch), [nanomatch](https://github.com/micromatch/nanomatch), [extglob](https://github.com/micromatch/extglob), [braces](https://github.com/micromatch/braces), and [expand-brackets](https://github.com/micromatch/expand-brackets).
-
-| **Feature** | `minimatch` | `micromatch` | `picomatch` | `nanomatch` | `extglob` | `braces` | `expand-brackets` |
-| --- | --- | --- | --- | --- | --- | --- | --- |
-| Wildcard matching (`*?+`) | ✔ | ✔ | ✔ | ✔ | - | - | - |
-| Advancing globbing | ✔ | ✔ | ✔ | - | - | - | - |
-| Brace _matching_ | ✔ | ✔ | ✔ | - | - | ✔ | - |
-| Brace _expansion_ | ✔ | ✔ | - | - | - | ✔ | - |
-| Extglobs | partial | ✔ | ✔ | - | ✔ | - | - |
-| Posix brackets | - | ✔ | ✔ | - | - | - | ✔ |
-| Regular expression syntax | - | ✔ | ✔ | ✔ | ✔ | - | ✔ |
-| File system operations | - | - | - | - | - | - | - |
-
-
-
-
-## Benchmarks
-
-Performance comparison of picomatch and minimatch.
-
-```
-# .makeRe star
- picomatch x 1,993,050 ops/sec ±0.51% (91 runs sampled)
- minimatch x 627,206 ops/sec ±1.96% (87 runs sampled))
-
-# .makeRe star; dot=true
- picomatch x 1,436,640 ops/sec ±0.62% (91 runs sampled)
- minimatch x 525,876 ops/sec ±0.60% (88 runs sampled)
-
-# .makeRe globstar
- picomatch x 1,592,742 ops/sec ±0.42% (90 runs sampled)
- minimatch x 962,043 ops/sec ±1.76% (91 runs sampled)d)
-
-# .makeRe globstars
- picomatch x 1,615,199 ops/sec ±0.35% (94 runs sampled)
- minimatch x 477,179 ops/sec ±1.33% (91 runs sampled)
-
-# .makeRe with leading star
- picomatch x 1,220,856 ops/sec ±0.40% (92 runs sampled)
- minimatch x 453,564 ops/sec ±1.43% (94 runs sampled)
-
-# .makeRe - basic braces
- picomatch x 392,067 ops/sec ±0.70% (90 runs sampled)
- minimatch x 99,532 ops/sec ±2.03% (87 runs sampled))
-```
-
-
-
-
-## Philosophies
-
-The goal of this library is to be blazing fast, without compromising on accuracy.
-
-**Accuracy**
-
-The number one of goal of this library is accuracy. However, it's not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on: `!(**/{a,b,*/c})`.
-
-Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.
-
-**Performance**
-
-Although this library performs well in benchmarks, and in most cases it's faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It's not helpful to anyone if our library is faster at returning the wrong answer.
-
-
-
-
-## About
-
-
-Contributing
-
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
-
-Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.
-
-
-
-
-Running Tests
-
-Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
-
-```sh
-npm install && npm test
-```
-
-
-
-
-Building docs
-
-_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
-
-To generate the readme, run the following command:
-
-```sh
-npm install -g verbose/verb#dev verb-generate-readme && verb
-```
-
-
-
-### Author
-
-**Jon Schlinkert**
-
-* [GitHub Profile](https://github.com/jonschlinkert)
-* [Twitter Profile](https://twitter.com/jonschlinkert)
-* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
-
-### License
-
-Copyright © 2017-present, [Jon Schlinkert](https://github.com/jonschlinkert).
-Released under the [MIT License](LICENSE).
diff --git a/node_modules/picomatch/index.js b/node_modules/picomatch/index.js
deleted file mode 100644
index d2f2bc59..00000000
--- a/node_modules/picomatch/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./lib/picomatch');
diff --git a/node_modules/picomatch/lib/constants.js b/node_modules/picomatch/lib/constants.js
deleted file mode 100644
index a62ef387..00000000
--- a/node_modules/picomatch/lib/constants.js
+++ /dev/null
@@ -1,179 +0,0 @@
-'use strict';
-
-const path = require('path');
-const WIN_SLASH = '\\\\/';
-const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
-
-/**
- * Posix glob regex
- */
-
-const DOT_LITERAL = '\\.';
-const PLUS_LITERAL = '\\+';
-const QMARK_LITERAL = '\\?';
-const SLASH_LITERAL = '\\/';
-const ONE_CHAR = '(?=.)';
-const QMARK = '[^/]';
-const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
-const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
-const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
-const NO_DOT = `(?!${DOT_LITERAL})`;
-const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
-const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
-const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
-const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
-const STAR = `${QMARK}*?`;
-
-const POSIX_CHARS = {
- DOT_LITERAL,
- PLUS_LITERAL,
- QMARK_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- QMARK,
- END_ANCHOR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOTS,
- NO_DOT_SLASH,
- NO_DOTS_SLASH,
- QMARK_NO_DOT,
- STAR,
- START_ANCHOR
-};
-
-/**
- * Windows glob regex
- */
-
-const WINDOWS_CHARS = {
- ...POSIX_CHARS,
-
- SLASH_LITERAL: `[${WIN_SLASH}]`,
- QMARK: WIN_NO_SLASH,
- STAR: `${WIN_NO_SLASH}*?`,
- DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
- NO_DOT: `(?!${DOT_LITERAL})`,
- NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
- NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
- QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
- START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
-};
-
-/**
- * POSIX Bracket Regex
- */
-
-const POSIX_REGEX_SOURCE = {
- alnum: 'a-zA-Z0-9',
- alpha: 'a-zA-Z',
- ascii: '\\x00-\\x7F',
- blank: ' \\t',
- cntrl: '\\x00-\\x1F\\x7F',
- digit: '0-9',
- graph: '\\x21-\\x7E',
- lower: 'a-z',
- print: '\\x20-\\x7E ',
- punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
- space: ' \\t\\r\\n\\v\\f',
- upper: 'A-Z',
- word: 'A-Za-z0-9_',
- xdigit: 'A-Fa-f0-9'
-};
-
-module.exports = {
- MAX_LENGTH: 1024 * 64,
- POSIX_REGEX_SOURCE,
-
- // regular expressions
- REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
- REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
- REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
- REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
- REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
- REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
-
- // Replace globs with equivalent patterns to reduce parsing time.
- REPLACEMENTS: {
- '***': '*',
- '**/**': '**',
- '**/**/**': '**'
- },
-
- // Digits
- CHAR_0: 48, /* 0 */
- CHAR_9: 57, /* 9 */
-
- // Alphabet chars.
- CHAR_UPPERCASE_A: 65, /* A */
- CHAR_LOWERCASE_A: 97, /* a */
- CHAR_UPPERCASE_Z: 90, /* Z */
- CHAR_LOWERCASE_Z: 122, /* z */
-
- CHAR_LEFT_PARENTHESES: 40, /* ( */
- CHAR_RIGHT_PARENTHESES: 41, /* ) */
-
- CHAR_ASTERISK: 42, /* * */
-
- // Non-alphabetic chars.
- CHAR_AMPERSAND: 38, /* & */
- CHAR_AT: 64, /* @ */
- CHAR_BACKWARD_SLASH: 92, /* \ */
- CHAR_CARRIAGE_RETURN: 13, /* \r */
- CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
- CHAR_COLON: 58, /* : */
- CHAR_COMMA: 44, /* , */
- CHAR_DOT: 46, /* . */
- CHAR_DOUBLE_QUOTE: 34, /* " */
- CHAR_EQUAL: 61, /* = */
- CHAR_EXCLAMATION_MARK: 33, /* ! */
- CHAR_FORM_FEED: 12, /* \f */
- CHAR_FORWARD_SLASH: 47, /* / */
- CHAR_GRAVE_ACCENT: 96, /* ` */
- CHAR_HASH: 35, /* # */
- CHAR_HYPHEN_MINUS: 45, /* - */
- CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
- CHAR_LEFT_CURLY_BRACE: 123, /* { */
- CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
- CHAR_LINE_FEED: 10, /* \n */
- CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
- CHAR_PERCENT: 37, /* % */
- CHAR_PLUS: 43, /* + */
- CHAR_QUESTION_MARK: 63, /* ? */
- CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
- CHAR_RIGHT_CURLY_BRACE: 125, /* } */
- CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
- CHAR_SEMICOLON: 59, /* ; */
- CHAR_SINGLE_QUOTE: 39, /* ' */
- CHAR_SPACE: 32, /* */
- CHAR_TAB: 9, /* \t */
- CHAR_UNDERSCORE: 95, /* _ */
- CHAR_VERTICAL_LINE: 124, /* | */
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
-
- SEP: path.sep,
-
- /**
- * Create EXTGLOB_CHARS
- */
-
- extglobChars(chars) {
- return {
- '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
- '?': { type: 'qmark', open: '(?:', close: ')?' },
- '+': { type: 'plus', open: '(?:', close: ')+' },
- '*': { type: 'star', open: '(?:', close: ')*' },
- '@': { type: 'at', open: '(?:', close: ')' }
- };
- },
-
- /**
- * Create GLOB_CHARS
- */
-
- globChars(win32) {
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
- }
-};
diff --git a/node_modules/picomatch/lib/parse.js b/node_modules/picomatch/lib/parse.js
deleted file mode 100644
index 58269d01..00000000
--- a/node_modules/picomatch/lib/parse.js
+++ /dev/null
@@ -1,1091 +0,0 @@
-'use strict';
-
-const constants = require('./constants');
-const utils = require('./utils');
-
-/**
- * Constants
- */
-
-const {
- MAX_LENGTH,
- POSIX_REGEX_SOURCE,
- REGEX_NON_SPECIAL_CHARS,
- REGEX_SPECIAL_CHARS_BACKREF,
- REPLACEMENTS
-} = constants;
-
-/**
- * Helpers
- */
-
-const expandRange = (args, options) => {
- if (typeof options.expandRange === 'function') {
- return options.expandRange(...args, options);
- }
-
- args.sort();
- const value = `[${args.join('-')}]`;
-
- try {
- /* eslint-disable-next-line no-new */
- new RegExp(value);
- } catch (ex) {
- return args.map(v => utils.escapeRegex(v)).join('..');
- }
-
- return value;
-};
-
-/**
- * Create the message for a syntax error
- */
-
-const syntaxError = (type, char) => {
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
-};
-
-/**
- * Parse the given input string.
- * @param {String} input
- * @param {Object} options
- * @return {Object}
- */
-
-const parse = (input, options) => {
- if (typeof input !== 'string') {
- throw new TypeError('Expected a string');
- }
-
- input = REPLACEMENTS[input] || input;
-
- const opts = { ...options };
- const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
-
- let len = input.length;
- if (len > max) {
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
- }
-
- const bos = { type: 'bos', value: '', output: opts.prepend || '' };
- const tokens = [bos];
-
- const capture = opts.capture ? '' : '?:';
- const win32 = utils.isWindows(options);
-
- // create constants based on platform, for windows or posix
- const PLATFORM_CHARS = constants.globChars(win32);
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
-
- const {
- DOT_LITERAL,
- PLUS_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOT_SLASH,
- NO_DOTS_SLASH,
- QMARK,
- QMARK_NO_DOT,
- STAR,
- START_ANCHOR
- } = PLATFORM_CHARS;
-
- const globstar = opts => {
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
- };
-
- const nodot = opts.dot ? '' : NO_DOT;
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
- let star = opts.bash === true ? globstar(opts) : STAR;
-
- if (opts.capture) {
- star = `(${star})`;
- }
-
- // minimatch options support
- if (typeof opts.noext === 'boolean') {
- opts.noextglob = opts.noext;
- }
-
- const state = {
- input,
- index: -1,
- start: 0,
- dot: opts.dot === true,
- consumed: '',
- output: '',
- prefix: '',
- backtrack: false,
- negated: false,
- brackets: 0,
- braces: 0,
- parens: 0,
- quotes: 0,
- globstar: false,
- tokens
- };
-
- input = utils.removePrefix(input, state);
- len = input.length;
-
- const extglobs = [];
- const braces = [];
- const stack = [];
- let prev = bos;
- let value;
-
- /**
- * Tokenizing helpers
- */
-
- const eos = () => state.index === len - 1;
- const peek = state.peek = (n = 1) => input[state.index + n];
- const advance = state.advance = () => input[++state.index] || '';
- const remaining = () => input.slice(state.index + 1);
- const consume = (value = '', num = 0) => {
- state.consumed += value;
- state.index += num;
- };
-
- const append = token => {
- state.output += token.output != null ? token.output : token.value;
- consume(token.value);
- };
-
- const negate = () => {
- let count = 1;
-
- while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {
- advance();
- state.start++;
- count++;
- }
-
- if (count % 2 === 0) {
- return false;
- }
-
- state.negated = true;
- state.start++;
- return true;
- };
-
- const increment = type => {
- state[type]++;
- stack.push(type);
- };
-
- const decrement = type => {
- state[type]--;
- stack.pop();
- };
-
- /**
- * Push tokens onto the tokens array. This helper speeds up
- * tokenizing by 1) helping us avoid backtracking as much as possible,
- * and 2) helping us avoid creating extra tokens when consecutive
- * characters are plain text. This improves performance and simplifies
- * lookbehinds.
- */
-
- const push = tok => {
- if (prev.type === 'globstar') {
- const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
- const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));
-
- if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
- state.output = state.output.slice(0, -prev.output.length);
- prev.type = 'star';
- prev.value = '*';
- prev.output = star;
- state.output += prev.output;
- }
- }
-
- if (extglobs.length && tok.type !== 'paren') {
- extglobs[extglobs.length - 1].inner += tok.value;
- }
-
- if (tok.value || tok.output) append(tok);
- if (prev && prev.type === 'text' && tok.type === 'text') {
- prev.value += tok.value;
- prev.output = (prev.output || '') + tok.value;
- return;
- }
-
- tok.prev = prev;
- tokens.push(tok);
- prev = tok;
- };
-
- const extglobOpen = (type, value) => {
- const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
-
- token.prev = prev;
- token.parens = state.parens;
- token.output = state.output;
- const output = (opts.capture ? '(' : '') + token.open;
-
- increment('parens');
- push({ type, value, output: state.output ? '' : ONE_CHAR });
- push({ type: 'paren', extglob: true, value: advance(), output });
- extglobs.push(token);
- };
-
- const extglobClose = token => {
- let output = token.close + (opts.capture ? ')' : '');
- let rest;
-
- if (token.type === 'negate') {
- let extglobStar = star;
-
- if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
- extglobStar = globstar(opts);
- }
-
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
- output = token.close = `)$))${extglobStar}`;
- }
-
- if (token.inner.includes('*') && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
- // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.
- // In this case, we need to parse the string and use it in the output of the original pattern.
- // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.
- //
- // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.
- const expression = parse(rest, { ...options, fastpaths: false }).output;
-
- output = token.close = `)${expression})${extglobStar})`;
- }
-
- if (token.prev.type === 'bos') {
- state.negatedExtglob = true;
- }
- }
-
- push({ type: 'paren', extglob: true, value, output });
- decrement('parens');
- };
-
- /**
- * Fast paths
- */
-
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
- let backslashes = false;
-
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
- if (first === '\\') {
- backslashes = true;
- return m;
- }
-
- if (first === '?') {
- if (esc) {
- return esc + first + (rest ? QMARK.repeat(rest.length) : '');
- }
- if (index === 0) {
- return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
- }
- return QMARK.repeat(chars.length);
- }
-
- if (first === '.') {
- return DOT_LITERAL.repeat(chars.length);
- }
-
- if (first === '*') {
- if (esc) {
- return esc + first + (rest ? star : '');
- }
- return star;
- }
- return esc ? m : `\\${m}`;
- });
-
- if (backslashes === true) {
- if (opts.unescape === true) {
- output = output.replace(/\\/g, '');
- } else {
- output = output.replace(/\\+/g, m => {
- return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
- });
- }
- }
-
- if (output === input && opts.contains === true) {
- state.output = input;
- return state;
- }
-
- state.output = utils.wrapOutput(output, state, options);
- return state;
- }
-
- /**
- * Tokenize input until we reach end-of-string
- */
-
- while (!eos()) {
- value = advance();
-
- if (value === '\u0000') {
- continue;
- }
-
- /**
- * Escaped characters
- */
-
- if (value === '\\') {
- const next = peek();
-
- if (next === '/' && opts.bash !== true) {
- continue;
- }
-
- if (next === '.' || next === ';') {
- continue;
- }
-
- if (!next) {
- value += '\\';
- push({ type: 'text', value });
- continue;
- }
-
- // collapse slashes to reduce potential for exploits
- const match = /^\\+/.exec(remaining());
- let slashes = 0;
-
- if (match && match[0].length > 2) {
- slashes = match[0].length;
- state.index += slashes;
- if (slashes % 2 !== 0) {
- value += '\\';
- }
- }
-
- if (opts.unescape === true) {
- value = advance();
- } else {
- value += advance();
- }
-
- if (state.brackets === 0) {
- push({ type: 'text', value });
- continue;
- }
- }
-
- /**
- * If we're inside a regex character class, continue
- * until we reach the closing bracket.
- */
-
- if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
- if (opts.posix !== false && value === ':') {
- const inner = prev.value.slice(1);
- if (inner.includes('[')) {
- prev.posix = true;
-
- if (inner.includes(':')) {
- const idx = prev.value.lastIndexOf('[');
- const pre = prev.value.slice(0, idx);
- const rest = prev.value.slice(idx + 2);
- const posix = POSIX_REGEX_SOURCE[rest];
- if (posix) {
- prev.value = pre + posix;
- state.backtrack = true;
- advance();
-
- if (!bos.output && tokens.indexOf(prev) === 1) {
- bos.output = ONE_CHAR;
- }
- continue;
- }
- }
- }
- }
-
- if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
- value = `\\${value}`;
- }
-
- if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
- value = `\\${value}`;
- }
-
- if (opts.posix === true && value === '!' && prev.value === '[') {
- value = '^';
- }
-
- prev.value += value;
- append({ value });
- continue;
- }
-
- /**
- * If we're inside a quoted string, continue
- * until we reach the closing double quote.
- */
-
- if (state.quotes === 1 && value !== '"') {
- value = utils.escapeRegex(value);
- prev.value += value;
- append({ value });
- continue;
- }
-
- /**
- * Double quotes
- */
-
- if (value === '"') {
- state.quotes = state.quotes === 1 ? 0 : 1;
- if (opts.keepQuotes === true) {
- push({ type: 'text', value });
- }
- continue;
- }
-
- /**
- * Parentheses
- */
-
- if (value === '(') {
- increment('parens');
- push({ type: 'paren', value });
- continue;
- }
-
- if (value === ')') {
- if (state.parens === 0 && opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError('opening', '('));
- }
-
- const extglob = extglobs[extglobs.length - 1];
- if (extglob && state.parens === extglob.parens + 1) {
- extglobClose(extglobs.pop());
- continue;
- }
-
- push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
- decrement('parens');
- continue;
- }
-
- /**
- * Square brackets
- */
-
- if (value === '[') {
- if (opts.nobracket === true || !remaining().includes(']')) {
- if (opts.nobracket !== true && opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError('closing', ']'));
- }
-
- value = `\\${value}`;
- } else {
- increment('brackets');
- }
-
- push({ type: 'bracket', value });
- continue;
- }
-
- if (value === ']') {
- if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
- push({ type: 'text', value, output: `\\${value}` });
- continue;
- }
-
- if (state.brackets === 0) {
- if (opts.strictBrackets === true) {
- throw new SyntaxError(syntaxError('opening', '['));
- }
-
- push({ type: 'text', value, output: `\\${value}` });
- continue;
- }
-
- decrement('brackets');
-
- const prevValue = prev.value.slice(1);
- if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
- value = `/${value}`;
- }
-
- prev.value += value;
- append({ value });
-
- // when literal brackets are explicitly disabled
- // assume we should match with a regex character class
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
- continue;
- }
-
- const escaped = utils.escapeRegex(prev.value);
- state.output = state.output.slice(0, -prev.value.length);
-
- // when literal brackets are explicitly enabled
- // assume we should escape the brackets to match literal characters
- if (opts.literalBrackets === true) {
- state.output += escaped;
- prev.value = escaped;
- continue;
- }
-
- // when the user specifies nothing, try to match both
- prev.value = `(${capture}${escaped}|${prev.value})`;
- state.output += prev.value;
- continue;
- }
-
- /**
- * Braces
- */
-
- if (value === '{' && opts.nobrace !== true) {
- increment('braces');
-
- const open = {
- type: 'brace',
- value,
- output: '(',
- outputIndex: state.output.length,
- tokensIndex: state.tokens.length
- };
-
- braces.push(open);
- push(open);
- continue;
- }
-
- if (value === '}') {
- const brace = braces[braces.length - 1];
-
- if (opts.nobrace === true || !brace) {
- push({ type: 'text', value, output: value });
- continue;
- }
-
- let output = ')';
-
- if (brace.dots === true) {
- const arr = tokens.slice();
- const range = [];
-
- for (let i = arr.length - 1; i >= 0; i--) {
- tokens.pop();
- if (arr[i].type === 'brace') {
- break;
- }
- if (arr[i].type !== 'dots') {
- range.unshift(arr[i].value);
- }
- }
-
- output = expandRange(range, opts);
- state.backtrack = true;
- }
-
- if (brace.comma !== true && brace.dots !== true) {
- const out = state.output.slice(0, brace.outputIndex);
- const toks = state.tokens.slice(brace.tokensIndex);
- brace.value = brace.output = '\\{';
- value = output = '\\}';
- state.output = out;
- for (const t of toks) {
- state.output += (t.output || t.value);
- }
- }
-
- push({ type: 'brace', value, output });
- decrement('braces');
- braces.pop();
- continue;
- }
-
- /**
- * Pipes
- */
-
- if (value === '|') {
- if (extglobs.length > 0) {
- extglobs[extglobs.length - 1].conditions++;
- }
- push({ type: 'text', value });
- continue;
- }
-
- /**
- * Commas
- */
-
- if (value === ',') {
- let output = value;
-
- const brace = braces[braces.length - 1];
- if (brace && stack[stack.length - 1] === 'braces') {
- brace.comma = true;
- output = '|';
- }
-
- push({ type: 'comma', value, output });
- continue;
- }
-
- /**
- * Slashes
- */
-
- if (value === '/') {
- // if the beginning of the glob is "./", advance the start
- // to the current index, and don't add the "./" characters
- // to the state. This greatly simplifies lookbehinds when
- // checking for BOS characters like "!" and "." (not "./")
- if (prev.type === 'dot' && state.index === state.start + 1) {
- state.start = state.index + 1;
- state.consumed = '';
- state.output = '';
- tokens.pop();
- prev = bos; // reset "prev" to the first token
- continue;
- }
-
- push({ type: 'slash', value, output: SLASH_LITERAL });
- continue;
- }
-
- /**
- * Dots
- */
-
- if (value === '.') {
- if (state.braces > 0 && prev.type === 'dot') {
- if (prev.value === '.') prev.output = DOT_LITERAL;
- const brace = braces[braces.length - 1];
- prev.type = 'dots';
- prev.output += value;
- prev.value += value;
- brace.dots = true;
- continue;
- }
-
- if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {
- push({ type: 'text', value, output: DOT_LITERAL });
- continue;
- }
-
- push({ type: 'dot', value, output: DOT_LITERAL });
- continue;
- }
-
- /**
- * Question marks
- */
-
- if (value === '?') {
- const isGroup = prev && prev.value === '(';
- if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
- extglobOpen('qmark', value);
- continue;
- }
-
- if (prev && prev.type === 'paren') {
- const next = peek();
- let output = value;
-
- if (next === '<' && !utils.supportsLookbehinds()) {
- throw new Error('Node.js v10 or higher is required for regex lookbehinds');
- }
-
- if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\w+>)/.test(remaining()))) {
- output = `\\${value}`;
- }
-
- push({ type: 'text', value, output });
- continue;
- }
-
- if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
- push({ type: 'qmark', value, output: QMARK_NO_DOT });
- continue;
- }
-
- push({ type: 'qmark', value, output: QMARK });
- continue;
- }
-
- /**
- * Exclamation
- */
-
- if (value === '!') {
- if (opts.noextglob !== true && peek() === '(') {
- if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
- extglobOpen('negate', value);
- continue;
- }
- }
-
- if (opts.nonegate !== true && state.index === 0) {
- negate();
- continue;
- }
- }
-
- /**
- * Plus
- */
-
- if (value === '+') {
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
- extglobOpen('plus', value);
- continue;
- }
-
- if ((prev && prev.value === '(') || opts.regex === false) {
- push({ type: 'plus', value, output: PLUS_LITERAL });
- continue;
- }
-
- if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {
- push({ type: 'plus', value });
- continue;
- }
-
- push({ type: 'plus', value: PLUS_LITERAL });
- continue;
- }
-
- /**
- * Plain text
- */
-
- if (value === '@') {
- if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
- push({ type: 'at', extglob: true, value, output: '' });
- continue;
- }
-
- push({ type: 'text', value });
- continue;
- }
-
- /**
- * Plain text
- */
-
- if (value !== '*') {
- if (value === '$' || value === '^') {
- value = `\\${value}`;
- }
-
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
- if (match) {
- value += match[0];
- state.index += match[0].length;
- }
-
- push({ type: 'text', value });
- continue;
- }
-
- /**
- * Stars
- */
-
- if (prev && (prev.type === 'globstar' || prev.star === true)) {
- prev.type = 'star';
- prev.star = true;
- prev.value += value;
- prev.output = star;
- state.backtrack = true;
- state.globstar = true;
- consume(value);
- continue;
- }
-
- let rest = remaining();
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
- extglobOpen('star', value);
- continue;
- }
-
- if (prev.type === 'star') {
- if (opts.noglobstar === true) {
- consume(value);
- continue;
- }
-
- const prior = prev.prev;
- const before = prior.prev;
- const isStart = prior.type === 'slash' || prior.type === 'bos';
- const afterStar = before && (before.type === 'star' || before.type === 'globstar');
-
- if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {
- push({ type: 'star', value, output: '' });
- continue;
- }
-
- const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
- const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
- if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
- push({ type: 'star', value, output: '' });
- continue;
- }
-
- // strip consecutive `/**/`
- while (rest.slice(0, 3) === '/**') {
- const after = input[state.index + 4];
- if (after && after !== '/') {
- break;
- }
- rest = rest.slice(3);
- consume('/**', 3);
- }
-
- if (prior.type === 'bos' && eos()) {
- prev.type = 'globstar';
- prev.value += value;
- prev.output = globstar(opts);
- state.output = prev.output;
- state.globstar = true;
- consume(value);
- continue;
- }
-
- if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
- prior.output = `(?:${prior.output}`;
-
- prev.type = 'globstar';
- prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');
- prev.value += value;
- state.globstar = true;
- state.output += prior.output + prev.output;
- consume(value);
- continue;
- }
-
- if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {
- const end = rest[1] !== void 0 ? '|$' : '';
-
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
- prior.output = `(?:${prior.output}`;
-
- prev.type = 'globstar';
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
- prev.value += value;
-
- state.output += prior.output + prev.output;
- state.globstar = true;
-
- consume(value + advance());
-
- push({ type: 'slash', value: '/', output: '' });
- continue;
- }
-
- if (prior.type === 'bos' && rest[0] === '/') {
- prev.type = 'globstar';
- prev.value += value;
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
- state.output = prev.output;
- state.globstar = true;
- consume(value + advance());
- push({ type: 'slash', value: '/', output: '' });
- continue;
- }
-
- // remove single star from output
- state.output = state.output.slice(0, -prev.output.length);
-
- // reset previous token to globstar
- prev.type = 'globstar';
- prev.output = globstar(opts);
- prev.value += value;
-
- // reset output with globstar
- state.output += prev.output;
- state.globstar = true;
- consume(value);
- continue;
- }
-
- const token = { type: 'star', value, output: star };
-
- if (opts.bash === true) {
- token.output = '.*?';
- if (prev.type === 'bos' || prev.type === 'slash') {
- token.output = nodot + token.output;
- }
- push(token);
- continue;
- }
-
- if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
- token.output = value;
- push(token);
- continue;
- }
-
- if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
- if (prev.type === 'dot') {
- state.output += NO_DOT_SLASH;
- prev.output += NO_DOT_SLASH;
-
- } else if (opts.dot === true) {
- state.output += NO_DOTS_SLASH;
- prev.output += NO_DOTS_SLASH;
-
- } else {
- state.output += nodot;
- prev.output += nodot;
- }
-
- if (peek() !== '*') {
- state.output += ONE_CHAR;
- prev.output += ONE_CHAR;
- }
- }
-
- push(token);
- }
-
- while (state.brackets > 0) {
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
- state.output = utils.escapeLast(state.output, '[');
- decrement('brackets');
- }
-
- while (state.parens > 0) {
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
- state.output = utils.escapeLast(state.output, '(');
- decrement('parens');
- }
-
- while (state.braces > 0) {
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
- state.output = utils.escapeLast(state.output, '{');
- decrement('braces');
- }
-
- if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
- push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
- }
-
- // rebuild the output if we had to backtrack at any point
- if (state.backtrack === true) {
- state.output = '';
-
- for (const token of state.tokens) {
- state.output += token.output != null ? token.output : token.value;
-
- if (token.suffix) {
- state.output += token.suffix;
- }
- }
- }
-
- return state;
-};
-
-/**
- * Fast paths for creating regular expressions for common glob patterns.
- * This can significantly speed up processing and has very little downside
- * impact when none of the fast paths match.
- */
-
-parse.fastpaths = (input, options) => {
- const opts = { ...options };
- const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
- const len = input.length;
- if (len > max) {
- throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
- }
-
- input = REPLACEMENTS[input] || input;
- const win32 = utils.isWindows(options);
-
- // create constants based on platform, for windows or posix
- const {
- DOT_LITERAL,
- SLASH_LITERAL,
- ONE_CHAR,
- DOTS_SLASH,
- NO_DOT,
- NO_DOTS,
- NO_DOTS_SLASH,
- STAR,
- START_ANCHOR
- } = constants.globChars(win32);
-
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
- const capture = opts.capture ? '' : '?:';
- const state = { negated: false, prefix: '' };
- let star = opts.bash === true ? '.*?' : STAR;
-
- if (opts.capture) {
- star = `(${star})`;
- }
-
- const globstar = opts => {
- if (opts.noglobstar === true) return star;
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
- };
-
- const create = str => {
- switch (str) {
- case '*':
- return `${nodot}${ONE_CHAR}${star}`;
-
- case '.*':
- return `${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- case '*.*':
- return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- case '*/*':
- return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
-
- case '**':
- return nodot + globstar(opts);
-
- case '**/*':
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
-
- case '**/*.*':
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- case '**/.*':
- return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
-
- default: {
- const match = /^(.*?)\.(\w+)$/.exec(str);
- if (!match) return;
-
- const source = create(match[1]);
- if (!source) return;
-
- return source + DOT_LITERAL + match[2];
- }
- }
- };
-
- const output = utils.removePrefix(input, state);
- let source = create(output);
-
- if (source && opts.strictSlashes !== true) {
- source += `${SLASH_LITERAL}?`;
- }
-
- return source;
-};
-
-module.exports = parse;
diff --git a/node_modules/picomatch/lib/picomatch.js b/node_modules/picomatch/lib/picomatch.js
deleted file mode 100644
index 782d8094..00000000
--- a/node_modules/picomatch/lib/picomatch.js
+++ /dev/null
@@ -1,342 +0,0 @@
-'use strict';
-
-const path = require('path');
-const scan = require('./scan');
-const parse = require('./parse');
-const utils = require('./utils');
-const constants = require('./constants');
-const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
-
-/**
- * Creates a matcher function from one or more glob patterns. The
- * returned function takes a string to match as its first argument,
- * and returns true if the string is a match. The returned matcher
- * function also takes a boolean as the second argument that, when true,
- * returns an object with additional information.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch(glob[, options]);
- *
- * const isMatch = picomatch('*.!(*a)');
- * console.log(isMatch('a.a')); //=> false
- * console.log(isMatch('a.b')); //=> true
- * ```
- * @name picomatch
- * @param {String|Array} `globs` One or more glob patterns.
- * @param {Object=} `options`
- * @return {Function=} Returns a matcher function.
- * @api public
- */
-
-const picomatch = (glob, options, returnState = false) => {
- if (Array.isArray(glob)) {
- const fns = glob.map(input => picomatch(input, options, returnState));
- const arrayMatcher = str => {
- for (const isMatch of fns) {
- const state = isMatch(str);
- if (state) return state;
- }
- return false;
- };
- return arrayMatcher;
- }
-
- const isState = isObject(glob) && glob.tokens && glob.input;
-
- if (glob === '' || (typeof glob !== 'string' && !isState)) {
- throw new TypeError('Expected pattern to be a non-empty string');
- }
-
- const opts = options || {};
- const posix = utils.isWindows(options);
- const regex = isState
- ? picomatch.compileRe(glob, options)
- : picomatch.makeRe(glob, options, false, true);
-
- const state = regex.state;
- delete regex.state;
-
- let isIgnored = () => false;
- if (opts.ignore) {
- const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
- isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
- }
-
- const matcher = (input, returnObject = false) => {
- const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
- const result = { glob, state, regex, posix, input, output, match, isMatch };
-
- if (typeof opts.onResult === 'function') {
- opts.onResult(result);
- }
-
- if (isMatch === false) {
- result.isMatch = false;
- return returnObject ? result : false;
- }
-
- if (isIgnored(input)) {
- if (typeof opts.onIgnore === 'function') {
- opts.onIgnore(result);
- }
- result.isMatch = false;
- return returnObject ? result : false;
- }
-
- if (typeof opts.onMatch === 'function') {
- opts.onMatch(result);
- }
- return returnObject ? result : true;
- };
-
- if (returnState) {
- matcher.state = state;
- }
-
- return matcher;
-};
-
-/**
- * Test `input` with the given `regex`. This is used by the main
- * `picomatch()` function to test the input string.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.test(input, regex[, options]);
- *
- * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
- * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
- * ```
- * @param {String} `input` String to test.
- * @param {RegExp} `regex`
- * @return {Object} Returns an object with matching info.
- * @api public
- */
-
-picomatch.test = (input, regex, options, { glob, posix } = {}) => {
- if (typeof input !== 'string') {
- throw new TypeError('Expected input to be a string');
- }
-
- if (input === '') {
- return { isMatch: false, output: '' };
- }
-
- const opts = options || {};
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
- let match = input === glob;
- let output = (match && format) ? format(input) : input;
-
- if (match === false) {
- output = format ? format(input) : input;
- match = output === glob;
- }
-
- if (match === false || opts.capture === true) {
- if (opts.matchBase === true || opts.basename === true) {
- match = picomatch.matchBase(input, regex, options, posix);
- } else {
- match = regex.exec(output);
- }
- }
-
- return { isMatch: Boolean(match), match, output };
-};
-
-/**
- * Match the basename of a filepath.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.matchBase(input, glob[, options]);
- * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
- * ```
- * @param {String} `input` String to test.
- * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
- * @return {Boolean}
- * @api public
- */
-
-picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
- const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
- return regex.test(path.basename(input));
-};
-
-/**
- * Returns true if **any** of the given glob `patterns` match the specified `string`.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.isMatch(string, patterns[, options]);
- *
- * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
- * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
- * ```
- * @param {String|Array} str The string to test.
- * @param {String|Array} patterns One or more glob patterns to use for matching.
- * @param {Object} [options] See available [options](#options).
- * @return {Boolean} Returns true if any patterns match `str`
- * @api public
- */
-
-picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
-
-/**
- * Parse a glob pattern to create the source string for a regular
- * expression.
- *
- * ```js
- * const picomatch = require('picomatch');
- * const result = picomatch.parse(pattern[, options]);
- * ```
- * @param {String} `pattern`
- * @param {Object} `options`
- * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
- * @api public
- */
-
-picomatch.parse = (pattern, options) => {
- if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
- return parse(pattern, { ...options, fastpaths: false });
-};
-
-/**
- * Scan a glob pattern to separate the pattern into segments.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.scan(input[, options]);
- *
- * const result = picomatch.scan('!./foo/*.js');
- * console.log(result);
- * { prefix: '!./',
- * input: '!./foo/*.js',
- * start: 3,
- * base: 'foo',
- * glob: '*.js',
- * isBrace: false,
- * isBracket: false,
- * isGlob: true,
- * isExtglob: false,
- * isGlobstar: false,
- * negated: true }
- * ```
- * @param {String} `input` Glob pattern to scan.
- * @param {Object} `options`
- * @return {Object} Returns an object with
- * @api public
- */
-
-picomatch.scan = (input, options) => scan(input, options);
-
-/**
- * Compile a regular expression from the `state` object returned by the
- * [parse()](#parse) method.
- *
- * @param {Object} `state`
- * @param {Object} `options`
- * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
- * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
- * @return {RegExp}
- * @api public
- */
-
-picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
- if (returnOutput === true) {
- return state.output;
- }
-
- const opts = options || {};
- const prepend = opts.contains ? '' : '^';
- const append = opts.contains ? '' : '$';
-
- let source = `${prepend}(?:${state.output})${append}`;
- if (state && state.negated === true) {
- source = `^(?!${source}).*$`;
- }
-
- const regex = picomatch.toRegex(source, options);
- if (returnState === true) {
- regex.state = state;
- }
-
- return regex;
-};
-
-/**
- * Create a regular expression from a parsed glob pattern.
- *
- * ```js
- * const picomatch = require('picomatch');
- * const state = picomatch.parse('*.js');
- * // picomatch.compileRe(state[, options]);
- *
- * console.log(picomatch.compileRe(state));
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
- * ```
- * @param {String} `state` The object returned from the `.parse` method.
- * @param {Object} `options`
- * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
- * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
- * @return {RegExp} Returns a regex created from the given pattern.
- * @api public
- */
-
-picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
- if (!input || typeof input !== 'string') {
- throw new TypeError('Expected a non-empty string');
- }
-
- let parsed = { negated: false, fastpaths: true };
-
- if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
- parsed.output = parse.fastpaths(input, options);
- }
-
- if (!parsed.output) {
- parsed = parse(input, options);
- }
-
- return picomatch.compileRe(parsed, options, returnOutput, returnState);
-};
-
-/**
- * Create a regular expression from the given regex source string.
- *
- * ```js
- * const picomatch = require('picomatch');
- * // picomatch.toRegex(source[, options]);
- *
- * const { output } = picomatch.parse('*.js');
- * console.log(picomatch.toRegex(output));
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
- * ```
- * @param {String} `source` Regular expression source string.
- * @param {Object} `options`
- * @return {RegExp}
- * @api public
- */
-
-picomatch.toRegex = (source, options) => {
- try {
- const opts = options || {};
- return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
- } catch (err) {
- if (options && options.debug === true) throw err;
- return /$^/;
- }
-};
-
-/**
- * Picomatch constants.
- * @return {Object}
- */
-
-picomatch.constants = constants;
-
-/**
- * Expose "picomatch"
- */
-
-module.exports = picomatch;
diff --git a/node_modules/picomatch/lib/scan.js b/node_modules/picomatch/lib/scan.js
deleted file mode 100644
index e59cd7a1..00000000
--- a/node_modules/picomatch/lib/scan.js
+++ /dev/null
@@ -1,391 +0,0 @@
-'use strict';
-
-const utils = require('./utils');
-const {
- CHAR_ASTERISK, /* * */
- CHAR_AT, /* @ */
- CHAR_BACKWARD_SLASH, /* \ */
- CHAR_COMMA, /* , */
- CHAR_DOT, /* . */
- CHAR_EXCLAMATION_MARK, /* ! */
- CHAR_FORWARD_SLASH, /* / */
- CHAR_LEFT_CURLY_BRACE, /* { */
- CHAR_LEFT_PARENTHESES, /* ( */
- CHAR_LEFT_SQUARE_BRACKET, /* [ */
- CHAR_PLUS, /* + */
- CHAR_QUESTION_MARK, /* ? */
- CHAR_RIGHT_CURLY_BRACE, /* } */
- CHAR_RIGHT_PARENTHESES, /* ) */
- CHAR_RIGHT_SQUARE_BRACKET /* ] */
-} = require('./constants');
-
-const isPathSeparator = code => {
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
-};
-
-const depth = token => {
- if (token.isPrefix !== true) {
- token.depth = token.isGlobstar ? Infinity : 1;
- }
-};
-
-/**
- * Quickly scans a glob pattern and returns an object with a handful of
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
- *
- * ```js
- * const pm = require('picomatch');
- * console.log(pm.scan('foo/bar/*.js'));
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
- * ```
- * @param {String} `str`
- * @param {Object} `options`
- * @return {Object} Returns an object with tokens and regex source string.
- * @api public
- */
-
-const scan = (input, options) => {
- const opts = options || {};
-
- const length = input.length - 1;
- const scanToEnd = opts.parts === true || opts.scanToEnd === true;
- const slashes = [];
- const tokens = [];
- const parts = [];
-
- let str = input;
- let index = -1;
- let start = 0;
- let lastIndex = 0;
- let isBrace = false;
- let isBracket = false;
- let isGlob = false;
- let isExtglob = false;
- let isGlobstar = false;
- let braceEscaped = false;
- let backslashes = false;
- let negated = false;
- let negatedExtglob = false;
- let finished = false;
- let braces = 0;
- let prev;
- let code;
- let token = { value: '', depth: 0, isGlob: false };
-
- const eos = () => index >= length;
- const peek = () => str.charCodeAt(index + 1);
- const advance = () => {
- prev = code;
- return str.charCodeAt(++index);
- };
-
- while (index < length) {
- code = advance();
- let next;
-
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- code = advance();
-
- if (code === CHAR_LEFT_CURLY_BRACE) {
- braceEscaped = true;
- }
- continue;
- }
-
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
- braces++;
-
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- advance();
- continue;
- }
-
- if (code === CHAR_LEFT_CURLY_BRACE) {
- braces++;
- continue;
- }
-
- if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
- isBrace = token.isBrace = true;
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (braceEscaped !== true && code === CHAR_COMMA) {
- isBrace = token.isBrace = true;
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (code === CHAR_RIGHT_CURLY_BRACE) {
- braces--;
-
- if (braces === 0) {
- braceEscaped = false;
- isBrace = token.isBrace = true;
- finished = true;
- break;
- }
- }
- }
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (code === CHAR_FORWARD_SLASH) {
- slashes.push(index);
- tokens.push(token);
- token = { value: '', depth: 0, isGlob: false };
-
- if (finished === true) continue;
- if (prev === CHAR_DOT && index === (start + 1)) {
- start += 2;
- continue;
- }
-
- lastIndex = index + 1;
- continue;
- }
-
- if (opts.noext !== true) {
- const isExtglobChar = code === CHAR_PLUS
- || code === CHAR_AT
- || code === CHAR_ASTERISK
- || code === CHAR_QUESTION_MARK
- || code === CHAR_EXCLAMATION_MARK;
-
- if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {
- isGlob = token.isGlob = true;
- isExtglob = token.isExtglob = true;
- finished = true;
- if (code === CHAR_EXCLAMATION_MARK && index === start) {
- negatedExtglob = true;
- }
-
- if (scanToEnd === true) {
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- code = advance();
- continue;
- }
-
- if (code === CHAR_RIGHT_PARENTHESES) {
- isGlob = token.isGlob = true;
- finished = true;
- break;
- }
- }
- continue;
- }
- break;
- }
- }
-
- if (code === CHAR_ASTERISK) {
- if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
-
- if (code === CHAR_QUESTION_MARK) {
- isGlob = token.isGlob = true;
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
- break;
- }
-
- if (code === CHAR_LEFT_SQUARE_BRACKET) {
- while (eos() !== true && (next = advance())) {
- if (next === CHAR_BACKWARD_SLASH) {
- backslashes = token.backslashes = true;
- advance();
- continue;
- }
-
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
- isBracket = token.isBracket = true;
- isGlob = token.isGlob = true;
- finished = true;
- break;
- }
- }
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
-
- if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
- negated = token.negated = true;
- start++;
- continue;
- }
-
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
- isGlob = token.isGlob = true;
-
- if (scanToEnd === true) {
- while (eos() !== true && (code = advance())) {
- if (code === CHAR_LEFT_PARENTHESES) {
- backslashes = token.backslashes = true;
- code = advance();
- continue;
- }
-
- if (code === CHAR_RIGHT_PARENTHESES) {
- finished = true;
- break;
- }
- }
- continue;
- }
- break;
- }
-
- if (isGlob === true) {
- finished = true;
-
- if (scanToEnd === true) {
- continue;
- }
-
- break;
- }
- }
-
- if (opts.noext === true) {
- isExtglob = false;
- isGlob = false;
- }
-
- let base = str;
- let prefix = '';
- let glob = '';
-
- if (start > 0) {
- prefix = str.slice(0, start);
- str = str.slice(start);
- lastIndex -= start;
- }
-
- if (base && isGlob === true && lastIndex > 0) {
- base = str.slice(0, lastIndex);
- glob = str.slice(lastIndex);
- } else if (isGlob === true) {
- base = '';
- glob = str;
- } else {
- base = str;
- }
-
- if (base && base !== '' && base !== '/' && base !== str) {
- if (isPathSeparator(base.charCodeAt(base.length - 1))) {
- base = base.slice(0, -1);
- }
- }
-
- if (opts.unescape === true) {
- if (glob) glob = utils.removeBackslashes(glob);
-
- if (base && backslashes === true) {
- base = utils.removeBackslashes(base);
- }
- }
-
- const state = {
- prefix,
- input,
- start,
- base,
- glob,
- isBrace,
- isBracket,
- isGlob,
- isExtglob,
- isGlobstar,
- negated,
- negatedExtglob
- };
-
- if (opts.tokens === true) {
- state.maxDepth = 0;
- if (!isPathSeparator(code)) {
- tokens.push(token);
- }
- state.tokens = tokens;
- }
-
- if (opts.parts === true || opts.tokens === true) {
- let prevIndex;
-
- for (let idx = 0; idx < slashes.length; idx++) {
- const n = prevIndex ? prevIndex + 1 : start;
- const i = slashes[idx];
- const value = input.slice(n, i);
- if (opts.tokens) {
- if (idx === 0 && start !== 0) {
- tokens[idx].isPrefix = true;
- tokens[idx].value = prefix;
- } else {
- tokens[idx].value = value;
- }
- depth(tokens[idx]);
- state.maxDepth += tokens[idx].depth;
- }
- if (idx !== 0 || value !== '') {
- parts.push(value);
- }
- prevIndex = i;
- }
-
- if (prevIndex && prevIndex + 1 < input.length) {
- const value = input.slice(prevIndex + 1);
- parts.push(value);
-
- if (opts.tokens) {
- tokens[tokens.length - 1].value = value;
- depth(tokens[tokens.length - 1]);
- state.maxDepth += tokens[tokens.length - 1].depth;
- }
- }
-
- state.slashes = slashes;
- state.parts = parts;
- }
-
- return state;
-};
-
-module.exports = scan;
diff --git a/node_modules/picomatch/lib/utils.js b/node_modules/picomatch/lib/utils.js
deleted file mode 100644
index c3ca766a..00000000
--- a/node_modules/picomatch/lib/utils.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-const path = require('path');
-const win32 = process.platform === 'win32';
-const {
- REGEX_BACKSLASH,
- REGEX_REMOVE_BACKSLASH,
- REGEX_SPECIAL_CHARS,
- REGEX_SPECIAL_CHARS_GLOBAL
-} = require('./constants');
-
-exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
-exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
-exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
-exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
-exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
-
-exports.removeBackslashes = str => {
- return str.replace(REGEX_REMOVE_BACKSLASH, match => {
- return match === '\\' ? '' : match;
- });
-};
-
-exports.supportsLookbehinds = () => {
- const segs = process.version.slice(1).split('.').map(Number);
- if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
- return true;
- }
- return false;
-};
-
-exports.isWindows = options => {
- if (options && typeof options.windows === 'boolean') {
- return options.windows;
- }
- return win32 === true || path.sep === '\\';
-};
-
-exports.escapeLast = (input, char, lastIdx) => {
- const idx = input.lastIndexOf(char, lastIdx);
- if (idx === -1) return input;
- if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
-};
-
-exports.removePrefix = (input, state = {}) => {
- let output = input;
- if (output.startsWith('./')) {
- output = output.slice(2);
- state.prefix = './';
- }
- return output;
-};
-
-exports.wrapOutput = (input, state = {}, options = {}) => {
- const prepend = options.contains ? '' : '^';
- const append = options.contains ? '' : '$';
-
- let output = `${prepend}(?:${input})${append}`;
- if (state.negated === true) {
- output = `(?:^(?!${output}).*$)`;
- }
- return output;
-};
diff --git a/node_modules/picomatch/package.json b/node_modules/picomatch/package.json
deleted file mode 100644
index 3db22d40..00000000
--- a/node_modules/picomatch/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "name": "picomatch",
- "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
- "version": "2.3.1",
- "homepage": "https://github.com/micromatch/picomatch",
- "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
- "funding": "https://github.com/sponsors/jonschlinkert",
- "repository": "micromatch/picomatch",
- "bugs": {
- "url": "https://github.com/micromatch/picomatch/issues"
- },
- "license": "MIT",
- "files": [
- "index.js",
- "lib"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=8.6"
- },
- "scripts": {
- "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
- "mocha": "mocha --reporter dot",
- "test": "npm run lint && npm run mocha",
- "test:ci": "npm run test:cover",
- "test:cover": "nyc npm run mocha"
- },
- "devDependencies": {
- "eslint": "^6.8.0",
- "fill-range": "^7.0.1",
- "gulp-format-md": "^2.0.0",
- "mocha": "^6.2.2",
- "nyc": "^15.0.0",
- "time-require": "github:jonschlinkert/time-require"
- },
- "keywords": [
- "glob",
- "match",
- "picomatch"
- ],
- "nyc": {
- "reporter": [
- "html",
- "lcov",
- "text-summary"
- ]
- },
- "verb": {
- "toc": {
- "render": true,
- "method": "preWrite",
- "maxdepth": 3
- },
- "layout": "empty",
- "tasks": [
- "readme"
- ],
- "plugins": [
- "gulp-format-md"
- ],
- "lint": {
- "reflinks": true
- },
- "related": {
- "list": [
- "braces",
- "micromatch"
- ]
- },
- "reflinks": [
- "braces",
- "expand-brackets",
- "extglob",
- "fill-range",
- "micromatch",
- "minimatch",
- "nanomatch",
- "picomatch"
- ]
- }
-}
diff --git a/node_modules/pify/index.js b/node_modules/pify/index.js
deleted file mode 100644
index 7c720ebe..00000000
--- a/node_modules/pify/index.js
+++ /dev/null
@@ -1,68 +0,0 @@
-'use strict';
-
-var processFn = function (fn, P, opts) {
- return function () {
- var that = this;
- var args = new Array(arguments.length);
-
- for (var i = 0; i < arguments.length; i++) {
- args[i] = arguments[i];
- }
-
- return new P(function (resolve, reject) {
- args.push(function (err, result) {
- if (err) {
- reject(err);
- } else if (opts.multiArgs) {
- var results = new Array(arguments.length - 1);
-
- for (var i = 1; i < arguments.length; i++) {
- results[i - 1] = arguments[i];
- }
-
- resolve(results);
- } else {
- resolve(result);
- }
- });
-
- fn.apply(that, args);
- });
- };
-};
-
-var pify = module.exports = function (obj, P, opts) {
- if (typeof P !== 'function') {
- opts = P;
- P = Promise;
- }
-
- opts = opts || {};
- opts.exclude = opts.exclude || [/.+Sync$/];
-
- var filter = function (key) {
- var match = function (pattern) {
- return typeof pattern === 'string' ? key === pattern : pattern.test(key);
- };
-
- return opts.include ? opts.include.some(match) : !opts.exclude.some(match);
- };
-
- var ret = typeof obj === 'function' ? function () {
- if (opts.excludeMain) {
- return obj.apply(this, arguments);
- }
-
- return processFn(obj, P, opts).apply(this, arguments);
- } : {};
-
- return Object.keys(obj).reduce(function (ret, key) {
- var x = obj[key];
-
- ret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;
-
- return ret;
- }, ret);
-};
-
-pify.all = pify;
diff --git a/node_modules/pify/license b/node_modules/pify/license
deleted file mode 100644
index 654d0bfe..00000000
--- a/node_modules/pify/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus (sindresorhus.com)
-
-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.
diff --git a/node_modules/pify/package.json b/node_modules/pify/package.json
deleted file mode 100644
index 311d1982..00000000
--- a/node_modules/pify/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "pify",
- "version": "2.3.0",
- "description": "Promisify a callback-style function",
- "license": "MIT",
- "repository": "sindresorhus/pify",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "xo && ava && npm run optimization-test",
- "optimization-test": "node --allow-natives-syntax optimization-test.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "promise",
- "promises",
- "promisify",
- "denodify",
- "denodeify",
- "callback",
- "cb",
- "node",
- "then",
- "thenify",
- "convert",
- "transform",
- "wrap",
- "wrapper",
- "bind",
- "to",
- "async",
- "es2015"
- ],
- "devDependencies": {
- "ava": "*",
- "pinkie-promise": "^1.0.0",
- "v8-natives": "0.0.2",
- "xo": "*"
- }
-}
diff --git a/node_modules/pify/readme.md b/node_modules/pify/readme.md
deleted file mode 100644
index c79ca8bf..00000000
--- a/node_modules/pify/readme.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# pify [![Build Status](https://travis-ci.org/sindresorhus/pify.svg?branch=master)](https://travis-ci.org/sindresorhus/pify)
-
-> Promisify a callback-style function
-
-
-## Install
-
-```
-$ npm install --save pify
-```
-
-
-## Usage
-
-```js
-const fs = require('fs');
-const pify = require('pify');
-
-// promisify a single function
-
-pify(fs.readFile)('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-
-// or promisify all methods in a module
-
-pify(fs).readFile('package.json', 'utf8').then(data => {
- console.log(JSON.parse(data).name);
- //=> 'pify'
-});
-```
-
-
-## API
-
-### pify(input, [promiseModule], [options])
-
-Returns a promise wrapped version of the supplied function or module.
-
-#### input
-
-Type: `function`, `object`
-
-Callback-style function or module whose methods you want to promisify.
-
-#### promiseModule
-
-Type: `function`
-
-Custom promise module to use instead of the native one.
-
-Check out [`pinkie-promise`](https://github.com/floatdrop/pinkie-promise) if you need a tiny promise polyfill.
-
-#### options
-
-##### multiArgs
-
-Type: `boolean`
-Default: `false`
-
-By default, the promisified function will only return the second argument from the callback, which works fine for most APIs. This option can be useful for modules like `request` that return multiple arguments. Turning this on will make it return an array of all arguments from the callback, excluding the error argument, instead of just the second argument.
-
-```js
-const request = require('request');
-const pify = require('pify');
-
-pify(request, {multiArgs: true})('https://sindresorhus.com').then(result => {
- const [httpResponse, body] = result;
-});
-```
-
-##### include
-
-Type: `array` of (`string`|`regex`)
-
-Methods in a module to promisify. Remaining methods will be left untouched.
-
-##### exclude
-
-Type: `array` of (`string`|`regex`)
-Default: `[/.+Sync$/]`
-
-Methods in a module **not** to promisify. Methods with names ending with `'Sync'` are excluded by default.
-
-##### excludeMain
-
-Type: `boolean`
-Default: `false`
-
-By default, if given module is a function itself, this function will be promisified. Turn this option on if you want to promisify only methods of the module.
-
-```js
-const pify = require('pify');
-
-function fn() {
- return true;
-}
-
-fn.method = (data, callback) => {
- setImmediate(() => {
- callback(data, null);
- });
-};
-
-// promisify methods but not fn()
-const promiseFn = pify(fn, {excludeMain: true});
-
-if (promiseFn()) {
- promiseFn.method('hi').then(data => {
- console.log(data);
- });
-}
-```
-
-
-## License
-
-MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/postcss-cli/LICENSE b/node_modules/postcss-cli/LICENSE
deleted file mode 100644
index e4d2d4aa..00000000
--- a/node_modules/postcss-cli/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-License (MIT)
-
-Copyright (c) 2016 Michael Ciniawsky
-
-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.
diff --git a/node_modules/postcss-cli/README.md b/node_modules/postcss-cli/README.md
deleted file mode 100644
index 9dc9a2dc..00000000
--- a/node_modules/postcss-cli/README.md
+++ /dev/null
@@ -1,149 +0,0 @@
-[![npm][npm]][npm-url]
-[![node][node]][node-url]
-[![tests][tests]][tests-url]
-[![cover][cover]][cover-url]
-[![chat][chat]][chat-url]
-
-
-
-
-
-
-
PostCSS CLI
-
-
-Install
-
-```bash
-npm i -D postcss postcss-cli
-```
-
-Usage
-
-```
-Usage:
- postcss [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]
- postcss ... [OPTIONS] --dir [--watch|-w]
- postcss [OPTIONS] --dir [--watch|-w]
- postcss [OPTIONS] --dir [--watch|-w]
- postcss ... [OPTIONS] --replace
-
-Basic options:
- -o, --output Output file [string]
- -d, --dir Output directory [string]
- -r, --replace Replace (overwrite) the input file [boolean]
- -m, --map Create an external sourcemap
- --no-map Disable the default inline sourcemaps
- -w, --watch Watch files for changes and recompile as needed [boolean]
- --verbose Be verbose [boolean]
- --env A shortcut for setting NODE_ENV [string]
-
-Options for use without a config file:
- -u, --use List of postcss plugins to use [array]
- --parser Custom postcss parser [string]
- --stringifier Custom postcss stringifier [string]
- --syntax Custom postcss syntax [string]
-
-Options for use with --dir:
- --ext Override the output file extension; for use with --dir [string]
- --base Mirror the directory structure relative to this path in the output
- directory, for use with --dir [string]
-
-Advanced options:
- --include-dotfiles Enable glob to match files/dirs that begin with "."
- [boolean]
- --poll Use polling for file watching. Can optionally pass polling
- interval; default 100 ms
- --config Set a custom directory to look for a config file [string]
-
-Options:
- --version Show version number [boolean]
- -h, --help Show help [boolean]
-
-Examples:
- postcss input.css -o output.css Basic usage
- postcss src/**/*.css --base src --dir build Glob Pattern & output
- cat input.css | postcss -u autoprefixer > output.css Piping input & output
-
-If no input files are passed, it reads from stdin. If neither -o, --dir, or
---replace is passed, it writes to stdout.
-
-If there are multiple input files, the --dir or --replace option must be passed.
-
-Input files may contain globs (e.g. src/**/*.css). If you pass an input
-directory, it will process all files in the directory and any subdirectories,
-respecting the glob pattern.
-```
-
-> ℹ️ More details on custom parsers, stringifiers and syntaxes, can be found [here](https://github.com/postcss/postcss#syntaxes).
-
-### [Config](https://github.com/michael-ciniawsky/postcss-load-config)
-
-If you need to pass options to your plugins, or have a long plugin chain, you'll want to use a configuration file.
-
-**postcss.config.js**
-
-```js
-module.exports = {
- parser: 'sugarss',
- plugins: [
- require('postcss-import')({ ...options }),
- require('postcss-url')({ url: 'copy', useHash: true }),
- ],
-}
-```
-
-Note that you **can not** set the `from` or `to` options for postcss in the config file. They are set automatically based on the CLI arguments.
-
-### Context
-
-For more advanced usage, it's recommended to use a function in `postcss.config.js`; this gives you access to the CLI context to dynamically apply options and plugins **per file**
-
-| Name | Type | Default | Description |
-| :-------: | :--------: | :--------------------------------: | :------------------- |
-| `env` | `{String}` | `'development'` | process.env.NODE_ENV |
-| `file` | `{Object}` | `dirname, basename, extname` | File |
-| `options` | `{Object}` | `map, parser, syntax, stringifier` | PostCSS Options |
-
-**postcss.config.js**
-
-```js
-module.exports = (ctx) => ({
- map: ctx.options.map,
- parser: ctx.file.extname === '.sss' ? 'sugarss' : false,
- plugins: {
- 'postcss-import': { root: ctx.file.dirname },
- cssnano: ctx.env === 'production' ? {} : false,
- },
-})
-```
-
-> ⚠️ If you want to set options via CLI, it's mandatory to reference `ctx.options` in `postcss.config.js`
-
-```bash
-postcss input.sss -p sugarss -o output.css -m
-```
-
-**postcss.config.js**
-
-```js
-module.exports = (ctx) => ({
- map: ctx.options.map,
- parser: ctx.options.parser,
- plugins: {
- 'postcss-import': { root: ctx.file.dirname },
- cssnano: ctx.env === 'production' ? {} : false,
- },
-})
-```
-
-[npm]: https://img.shields.io/npm/v/postcss-cli.svg
-[npm-url]: https://npmjs.com/package/postcss-cli
-[node]: https://img.shields.io/node/v/postcss-cli.svg
-[node-url]: https://nodejs.org/
-[tests]: https://img.shields.io/github/workflow/status/postcss/postcss-cli/Node.js%20CI/master
-[tests-url]: https://github.com/postcss/postcss-cli/actions?query=branch%3Amaster
-[cover]: https://img.shields.io/coveralls/postcss/postcss-cli/master.svg
-[cover-url]: https://coveralls.io/github/postcss/postcss-cli
-[chat]: https://img.shields.io/gitter/room/postcss/postcss.svg
-[chat-url]: https://gitter.im/postcss/postcss
diff --git a/node_modules/postcss-cli/index.js b/node_modules/postcss-cli/index.js
deleted file mode 100755
index da052ce5..00000000
--- a/node_modules/postcss-cli/index.js
+++ /dev/null
@@ -1,354 +0,0 @@
-#!/usr/bin/env node
-
-import fs from 'fs-extra'
-import path from 'path'
-
-import prettyHrtime from 'pretty-hrtime'
-import stdin from 'get-stdin'
-import read from 'read-cache'
-import pc from 'picocolors'
-import { globby } from 'globby'
-import slash from 'slash'
-import chokidar from 'chokidar'
-
-import postcss from 'postcss'
-import postcssrc from 'postcss-load-config'
-import postcssReporter from 'postcss-reporter/lib/formatter.js'
-
-import argv from './lib/args.js'
-import createDependencyGraph from './lib/DependencyGraph.js'
-import getMapfile from './lib/getMapfile.js'
-
-const reporter = postcssReporter()
-const depGraph = createDependencyGraph()
-
-let input = argv._
-const { dir, output } = argv
-
-if (argv.map) argv.map = { inline: false }
-
-let cliConfig
-
-async function buildCliConfig() {
- cliConfig = {
- options: {
- map: argv.map !== undefined ? argv.map : { inline: true },
- parser: argv.parser ? await import(argv.parser) : undefined,
- syntax: argv.syntax ? await import(argv.syntax) : undefined,
- stringifier: argv.stringifier
- ? await import(argv.stringifier)
- : undefined,
- },
- plugins: argv.use
- ? await Promise.all(
- argv.use.map(async (plugin) => {
- try {
- return (await import(plugin)).default()
- } catch (e) {
- const msg = e.message || `Cannot find module '${plugin}'`
- let prefix = msg.includes(plugin) ? '' : ` (${plugin})`
- if (e.name && e.name !== 'Error') prefix += `: ${e.name}`
- return error(`Plugin Error${prefix}: ${msg}'`)
- }
- })
- )
- : [],
- }
-}
-
-let configFile
-
-if (argv.env) process.env.NODE_ENV = argv.env
-if (argv.config) argv.config = path.resolve(argv.config)
-
-let { isTTY } = process.stdin
-
-if (process.env.FORCE_IS_TTY === 'true') {
- isTTY = true
-}
-
-if (argv.watch && isTTY) {
- process.stdin.on('end', () => process.exit(0))
- process.stdin.resume()
-}
-
-/* istanbul ignore next */
-if (parseInt(postcss().version) < 8) {
- error('Please install PostCSS 8 or above')
-}
-
-buildCliConfig()
- .then(() => {
- if (argv.watch && !(argv.output || argv.replace || argv.dir)) {
- error('Cannot write to stdout in watch mode')
- // Need to explicitly exit here, since error() doesn't exit in watch mode
- process.exit(1)
- }
-
- if (input && input.length) {
- return globby(
- input.map((i) => slash(String(i))),
- { dot: argv.includeDotfiles }
- )
- }
-
- if (argv.replace || argv.dir) {
- error(
- 'Input Error: Cannot use --dir or --replace when reading from stdin'
- )
- }
-
- if (argv.watch) {
- error('Input Error: Cannot run in watch mode when reading from stdin')
- }
-
- return ['stdin']
- })
- .then((i) => {
- if (!i || !i.length) {
- error('Input Error: You must pass a valid list of files to parse')
- }
-
- if (i.length > 1 && !argv.dir && !argv.replace) {
- error(
- 'Input Error: Must use --dir or --replace with multiple input files'
- )
- }
-
- if (i[0] !== 'stdin') i = i.map((i) => path.resolve(i))
-
- input = i
-
- return files(input)
- })
- .then((results) => {
- if (argv.watch) {
- const printMessage = () =>
- printVerbose(pc.dim('\nWaiting for file changes...'))
- const watcher = chokidar.watch(input.concat(dependencies(results)), {
- usePolling: argv.poll,
- interval: argv.poll && typeof argv.poll === 'number' ? argv.poll : 100,
- awaitWriteFinish: {
- stabilityThreshold: 50,
- pollInterval: 10,
- },
- })
-
- if (configFile) watcher.add(configFile)
-
- watcher.on('ready', printMessage).on('change', (file) => {
- let recompile = []
-
- if (input.includes(file)) recompile.push(file)
-
- const dependants = depGraph
- .dependantsOf(file)
- .concat(getAncestorDirs(file).flatMap(depGraph.dependantsOf))
-
- recompile = recompile.concat(
- dependants.filter((file) => input.includes(file))
- )
-
- if (!recompile.length) recompile = input
-
- return files([...new Set(recompile)])
- .then((results) => watcher.add(dependencies(results)))
- .then(printMessage)
- .catch(error)
- })
- }
- })
- .catch((err) => {
- error(err)
-
- process.exit(1)
- })
-
-function rc(ctx, path) {
- if (argv.use) return Promise.resolve(cliConfig)
-
- return postcssrc(ctx, path)
- .then((rc) => {
- if (rc.options.from || rc.options.to) {
- error(
- 'Config Error: Can not set from or to options in config file, use CLI arguments instead'
- )
- }
- configFile = rc.file
- return rc
- })
- .catch((err) => {
- if (!err.message.includes('No PostCSS Config found')) throw err
- })
-}
-
-function files(files) {
- if (typeof files === 'string') files = [files]
-
- return Promise.all(
- files.map((file) => {
- if (file === 'stdin') {
- return stdin().then((content) => {
- if (!content) return error('Input Error: Did not receive any STDIN')
- return css(content, 'stdin')
- })
- }
-
- return read(file).then((content) => css(content, file))
- })
- )
-}
-
-function css(css, file) {
- const ctx = { options: cliConfig.options }
-
- if (file !== 'stdin') {
- ctx.file = {
- dirname: path.dirname(file),
- basename: path.basename(file),
- extname: path.extname(file),
- }
-
- if (!argv.config) argv.config = path.dirname(file)
- }
-
- const relativePath =
- file !== 'stdin' ? path.relative(path.resolve(), file) : file
-
- if (!argv.config) argv.config = process.cwd()
-
- const time = process.hrtime()
-
- printVerbose(pc.cyan(`Processing ${pc.bold(relativePath)}...`))
-
- return rc(ctx, argv.config)
- .then((config) => {
- config = config || cliConfig
- const options = { ...config.options }
-
- if (file === 'stdin' && output) file = output
-
- // TODO: Unit test this
- options.from = file === 'stdin' ? path.join(process.cwd(), 'stdin') : file
-
- if (output || dir || argv.replace) {
- const base = argv.base
- ? file.replace(path.resolve(argv.base), '')
- : path.basename(file)
- options.to = output || (argv.replace ? file : path.join(dir, base))
-
- if (argv.ext) {
- options.to = options.to.replace(path.extname(options.to), argv.ext)
- }
-
- options.to = path.resolve(options.to)
- }
-
- if (!options.to && config.options.map && !config.options.map.inline) {
- error(
- 'Output Error: Cannot output external sourcemaps when writing to STDOUT'
- )
- }
-
- return postcss(config.plugins)
- .process(css, options)
- .then((result) => {
- const tasks = []
-
- if (options.to) {
- tasks.push(outputFile(options.to, result.css))
-
- if (result.map) {
- const mapfile = getMapfile(options)
- tasks.push(outputFile(mapfile, result.map.toString()))
- }
- } else process.stdout.write(result.css, 'utf8')
-
- return Promise.all(tasks).then(() => {
- const prettyTime = prettyHrtime(process.hrtime(time))
- printVerbose(
- pc.green(
- `Finished ${pc.bold(relativePath)} in ${pc.bold(prettyTime)}`
- )
- )
-
- const messages = result.warnings()
- if (messages.length) {
- console.warn(reporter({ ...result, messages }))
- }
-
- return result
- })
- })
- })
- .catch((err) => {
- throw err
- })
-
- async function outputFile(file, string) {
- const fileExists = await fs.pathExists(file)
- const currentValue = fileExists ? await fs.readFile(file, 'utf8') : null
- if (currentValue === string) return
- return fs.outputFile(file, string)
- }
-}
-
-function dependencies(results) {
- if (!Array.isArray(results)) results = [results]
-
- const messages = []
-
- results.forEach((result) => {
- if (result.messages <= 0) return
-
- result.messages
- .filter((msg) =>
- msg.type === 'dependency' || msg.type === 'dir-dependency' ? msg : ''
- )
- .map(depGraph.add)
- .forEach((dependency) => {
- if (dependency.type === 'dir-dependency') {
- messages.push(
- dependency.glob
- ? path.join(dependency.dir, dependency.glob)
- : dependency.dir
- )
- } else {
- messages.push(dependency.file)
- }
- })
- })
-
- return messages
-}
-
-function printVerbose(message) {
- if (argv.verbose) console.warn(message)
-}
-
-function error(err) {
- // Seperate error from logging output
- if (argv.verbose) console.error()
-
- if (typeof err === 'string') {
- console.error(pc.red(err))
- } else if (err.name === 'CssSyntaxError') {
- console.error(err.toString())
- } else {
- console.error(err)
- }
- // Watch mode shouldn't exit on error
- if (argv.watch) return
- process.exit(1)
-}
-
-// Input: '/imports/components/button.css'
-// Output: ['/imports/components', '/imports', '/']
-function getAncestorDirs(fileOrDir) {
- const { root } = path.parse(fileOrDir)
- if (fileOrDir === root) {
- return []
- }
- const parentDir = path.dirname(fileOrDir)
- return [parentDir, ...getAncestorDirs(parentDir)]
-}
diff --git a/node_modules/postcss-cli/lib/DependencyGraph.js b/node_modules/postcss-cli/lib/DependencyGraph.js
deleted file mode 100644
index efb7ac33..00000000
--- a/node_modules/postcss-cli/lib/DependencyGraph.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import path from 'path'
-import { DepGraph } from 'dependency-graph'
-
-export default function createDependencyGraph() {
- const graph = new DepGraph()
- return {
- add(message) {
- message.parent = path.resolve(message.parent)
- graph.addNode(message.parent)
-
- if (message.type === 'dir-dependency') {
- message.dir = path.resolve(message.dir)
- graph.addNode(message.dir)
- graph.addDependency(message.parent, message.dir)
- } else {
- message.file = path.resolve(message.file)
- graph.addNode(message.file)
- graph.addDependency(message.parent, message.file)
- }
-
- return message
- },
- dependantsOf(node) {
- node = path.resolve(node)
-
- if (graph.hasNode(node)) return graph.dependantsOf(node)
- return []
- },
- }
-}
diff --git a/node_modules/postcss-cli/lib/args.js b/node_modules/postcss-cli/lib/args.js
deleted file mode 100644
index 35f0e839..00000000
--- a/node_modules/postcss-cli/lib/args.js
+++ /dev/null
@@ -1,115 +0,0 @@
-import yargs from 'yargs'
-
-const { argv } = yargs(process.argv.slice(2))
- .usage(
- `Usage:
- $0 [input.css] [OPTIONS] [-o|--output output.css] [--watch|-w]
- $0 ... [OPTIONS] --dir [--watch|-w]
- $0 [OPTIONS] --dir [--watch|-w]
- $0 [OPTIONS] --dir [--watch|-w]
- $0 ... [OPTIONS] --replace`
- )
- .group(
- ['o', 'd', 'r', 'map', 'no-map', 'watch', 'verbose', 'env'],
- 'Basic options:'
- )
- .option('o', {
- alias: 'output',
- desc: 'Output file',
- type: 'string',
- conflicts: ['dir', 'replace'],
- })
- .option('d', {
- alias: 'dir',
- desc: 'Output directory',
- type: 'string',
- conflicts: ['output', 'replace'],
- })
- .option('r', {
- alias: 'replace',
- desc: 'Replace (overwrite) the input file',
- type: 'boolean',
- conflicts: ['output', 'dir'],
- })
- .alias('m', 'map')
- .describe('map', 'Create an external sourcemap')
- .describe('no-map', 'Disable the default inline sourcemaps')
- .option('w', {
- alias: 'watch',
- desc: 'Watch files for changes and recompile as needed',
- type: 'boolean',
- conflicts: 'replace',
- })
- .option('verbose', {
- desc: 'Be verbose',
- type: 'boolean',
- })
- .option('env', {
- desc: 'A shortcut for setting NODE_ENV',
- type: 'string',
- })
- .group(
- ['u', 'parser', 'stringifier', 'syntax'],
- 'Options for use without a config file:'
- )
- .option('u', {
- alias: 'use',
- desc: 'List of postcss plugins to use',
- type: 'array',
- })
- .option('parser', {
- desc: 'Custom postcss parser',
- type: 'string',
- })
- .option('stringifier', {
- desc: 'Custom postcss stringifier',
- type: 'string',
- })
- .option('syntax', {
- desc: 'Custom postcss syntax',
- type: 'string',
- })
- .group(['ext', 'base'], 'Options for use with --dir:')
- .option('ext', {
- desc: 'Override the output file extension; for use with --dir',
- type: 'string',
- implies: 'dir',
- })
- .option('base', {
- desc: 'Mirror the directory structure relative to this path in the output directory, for use with --dir',
- type: 'string',
- implies: 'dir',
- })
- .group(['include-dotfiles', 'poll', 'config'], 'Advanced options:')
- .option('include-dotfiles', {
- desc: 'Enable glob to match files/dirs that begin with "."',
- type: 'boolean',
- })
- .option('poll', {
- desc: 'Use polling for file watching. Can optionally pass polling interval; default 100 ms',
- implies: 'watch',
- })
- .option('config', {
- desc: 'Set a custom directory to look for a config file',
- type: 'string',
- })
- .alias('h', 'help')
- .example('$0 input.css -o output.css', 'Basic usage')
- .example('$0 src/**/*.css --base src --dir build', 'Glob Pattern & output')
- .example(
- 'cat input.css | $0 -u autoprefixer > output.css',
- 'Piping input & output'
- )
- .epilog(
- `If no input files are passed, it reads from stdin. If neither -o, --dir, or --replace is passed, it writes to stdout.
-
-If there are multiple input files, the --dir or --replace option must be passed.
-
-Input files may contain globs (e.g. src/**/*.css). If you pass an input directory, it will process all files in the directory and any subdirectories, respecting the glob pattern.
-
-For more details, please see https://github.com/postcss/postcss-cli`
- )
-
-if (argv.ext && argv.ext.indexOf('.') !== 0) argv.ext = `.${argv.ext}`
-
-export default argv
diff --git a/node_modules/postcss-cli/lib/getMapfile.js b/node_modules/postcss-cli/lib/getMapfile.js
deleted file mode 100644
index e4d0c93e..00000000
--- a/node_modules/postcss-cli/lib/getMapfile.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import path from 'path'
-export default function getMapfile(options) {
- if (options.map && typeof options.map.annotation === 'string') {
- return `${path.dirname(options.to)}/${options.map.annotation}`
- }
- return `${options.to}.map`
-}
diff --git a/node_modules/postcss-cli/package.json b/node_modules/postcss-cli/package.json
deleted file mode 100644
index 1fc3037d..00000000
--- a/node_modules/postcss-cli/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "name": "postcss-cli",
- "version": "10.1.0",
- "description": "CLI for PostCSS",
- "type": "module",
- "engines": {
- "node": ">=14"
- },
- "bin": {
- "postcss": "./index.js"
- },
- "scripts": {
- "ci": "eslint . && c8 ava -v && npm run prettier -- --list-different",
- "clean": "node test/helpers/clean.js",
- "prettier": "prettier --single-quote --no-semi \"**/*.{js,md}\"",
- "format": "npm run prettier -- --write && eslint . --fix",
- "pretest": "npm run clean && npm run format",
- "test": "c8 ava -v"
- },
- "dependencies": {
- "chokidar": "^3.3.0",
- "dependency-graph": "^0.11.0",
- "fs-extra": "^11.0.0",
- "get-stdin": "^9.0.0",
- "globby": "^13.0.0",
- "picocolors": "^1.0.0",
- "postcss-load-config": "^4.0.0",
- "postcss-reporter": "^7.0.0",
- "pretty-hrtime": "^1.0.3",
- "read-cache": "^1.0.0",
- "slash": "^5.0.0",
- "yargs": "^17.0.0"
- },
- "devDependencies": {
- "ava": "^3.1.0",
- "c8": "^7.9.0",
- "coveralls": "^3.0.0",
- "eslint": "^8.2.0",
- "eslint-config-problems": "7.0.1",
- "postcss": "^8.0.4",
- "postcss-import": "^15.0.0",
- "prettier": "~2.8.0",
- "sugarss": "^4.0.0",
- "uuid": "^9.0.0"
- },
- "peerDependencies": {
- "postcss": "^8.0.0"
- },
- "files": [
- "index.js",
- "lib",
- "!**/*.test.js"
- ],
- "keywords": [
- "cli",
- "postcss",
- "postcss-runner"
- ],
- "contributors": [
- {
- "name": "Michael Ciniawky",
- "email": "michael.ciniawsky@gmail.com"
- },
- {
- "name": "Ryan Zimmermann",
- "email": "opensrc@ryanzim.com"
- }
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/postcss/postcss-cli.git"
- },
- "bugs": {
- "url": "https://github.com/postcss/postcss-cli/issues"
- },
- "homepage": "https://github.com/postcss/postcss-cli#readme",
- "license": "MIT"
-}
diff --git a/node_modules/postcss-load-config/LICENSE b/node_modules/postcss-load-config/LICENSE
deleted file mode 100644
index 458e8a34..00000000
--- a/node_modules/postcss-load-config/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright Michael Ciniawsky
-
-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.
diff --git a/node_modules/postcss-load-config/README.md b/node_modules/postcss-load-config/README.md
deleted file mode 100644
index c1700f4e..00000000
--- a/node_modules/postcss-load-config/README.md
+++ /dev/null
@@ -1,491 +0,0 @@
-[![npm][npm]][npm-url]
-[![node][node]][node-url]
-[![deps][deps]][deps-url]
-[![test][test]][test-url]
-[![coverage][cover]][cover-url]
-[![code style][style]][style-url]
-[![chat][chat]][chat-url]
-
-
-
-
-
-
-
-
Load Config
-
-
-Install
-
-```bash
-npm i -D postcss-load-config
-```
-
-Usage
-
-```bash
-npm i -S|-D postcss-plugin
-```
-
-Install all required PostCSS plugins and save them to your **package.json** `dependencies`/`devDependencies`
-
-Then create a PostCSS config file by choosing one of the following formats
-
-### `package.json`
-
-Create a **`postcss`** section in your project's **`package.json`**
-
-```
-Project (Root)
- |– client
- |– public
- |
- |- package.json
-```
-
-```json
-{
- "postcss": {
- "parser": "sugarss",
- "map": false,
- "plugins": {
- "postcss-plugin": {}
- }
- }
-}
-```
-
-### `.postcssrc`
-
-Create a **`.postcssrc`** file in JSON or YAML format
-
-> ℹ️ It's recommended to use an extension (e.g **`.postcssrc.json`** or **`.postcssrc.yml`**) instead of `.postcssrc`
-
-```
-Project (Root)
- |– client
- |– public
- |
- |- (.postcssrc|.postcssrc.json|.postcssrc.yml)
- |- package.json
-```
-
-**`.postcssrc.json`**
-```json
-{
- "parser": "sugarss",
- "map": false,
- "plugins": {
- "postcss-plugin": {}
- }
-}
-```
-
-**`.postcssrc.yml`**
-```yaml
-parser: sugarss
-map: false
-plugins:
- postcss-plugin: {}
-```
-
-### `.postcssrc.js` or `postcss.config.js`
-
-You may need some logic within your config.
-In this case create JS file named:
-- `.postcssrc.js`
-- `.postcssrc.mjs`
-- `.postcssrc.cjs`
-- `.postcssrc.ts`
-- `postcss.config.js`
-- `postcss.config.mjs`
-- `postcss.config.cjs`
-- `postcss.config.ts`
-
-```
-Project (Root)
- |– client
- |– public
- |- (.postcssrc|postcss.config).(js|mjs|cjs|ts)
- |- package.json
-```
-
-You can export the config as an `{Object}`
-
-**.postcssrc.js**
-```js
-module.exports = {
- parser: 'sugarss',
- map: false,
- plugins: {
- 'postcss-plugin': {}
- }
-}
-```
-
-Or export a `{Function}` that returns the config (more about the `ctx` param below)
-
-**.postcssrc.js**
-```js
-module.exports = (ctx) => ({
- parser: ctx.parser ? 'sugarss' : false,
- map: ctx.env === 'development' ? ctx.map : false,
- plugins: {
- 'postcss-plugin': ctx.options.plugin
- }
-})
-```
-
-Plugins can be loaded either using an `{Object}` or an `{Array}`
-
-#### `{Object}`
-
-**.postcssrc.js**
-```js
-module.exports = ({ env }) => ({
- ...options,
- plugins: {
- 'postcss-plugin': env === 'production' ? {} : false
- }
-})
-```
-
-> ℹ️ When using an `{Object}`, the key can be a Node.js module name, a path to a JavaScript file that is relative to the directory of the PostCSS config file, or an absolute path to a JavaScript file.
-
-#### `{Array}`
-
-**.postcssrc.js**
-```js
-module.exports = ({ env }) => ({
- ...options,
- plugins: [
- env === 'production' ? require('postcss-plugin')() : false
- ]
-})
-```
-> :warning: When using an `{Array}`, make sure to `require()` each plugin
-
-Options
-
-|Name|Type|Default|Description|
-|:--:|:--:|:-----:|:----------|
-|[**`to`**](#to)|`{String}`|`undefined`|Destination File Path|
-|[**`map`**](#map)|`{String\|Object}`|`false`|Enable/Disable Source Maps|
-|[**`from`**](#from)|`{String}`|`undefined`|Source File Path|
-|[**`parser`**](#parser)|`{String\|Function}`|`false`|Custom PostCSS Parser|
-|[**`syntax`**](#syntax)|`{String\|Function}`|`false`|Custom PostCSS Syntax|
-|[**`stringifier`**](#stringifier)|`{String\|Function}`|`false`|Custom PostCSS Stringifier|
-
-### `parser`
-
-**.postcssrc.js**
-```js
-module.exports = {
- parser: 'sugarss'
-}
-```
-
-### `syntax`
-
-**.postcssrc.js**
-```js
-module.exports = {
- syntax: 'postcss-scss'
-}
-```
-
-### `stringifier`
-
-**.postcssrc.js**
-```js
-module.exports = {
- stringifier: 'midas'
-}
-```
-
-### [**`map`**](https://github.com/postcss/postcss/blob/master/docs/source-maps.md)
-
-**.postcssrc.js**
-```js
-module.exports = {
- map: 'inline'
-}
-```
-
-> :warning: In most cases `options.from` && `options.to` are set by the third-party which integrates this package (CLI, gulp, webpack). It's unlikely one needs to set/use `options.from` && `options.to` within a config file. Unless you're a third-party plugin author using this module and its Node API directly **dont't set `options.from` && `options.to` yourself**
-
-### `to`
-
-```js
-module.exports = {
- to: 'path/to/dest.css'
-}
-```
-
-### `from`
-
-```js
-module.exports = {
- from: 'path/to/src.css'
-}
-```
-
-Plugins
-
-### `{} || null`
-
-The plugin will be loaded with defaults
-
-```js
-'postcss-plugin': {} || null
-```
-
-**.postcssrc.js**
-```js
-module.exports = {
- plugins: {
- 'postcss-plugin': {} || null
- }
-}
-```
-
-> :warning: `{}` must be an **empty** `{Object}` literal
-
-### `{Object}`
-
-The plugin will be loaded with given options
-
-```js
-'postcss-plugin': { option: '', option: '' }
-```
-
-**.postcssrc.js**
-```js
-module.exports = {
- plugins: {
- 'postcss-plugin': { option: '', option: '' }
- }
-}
-```
-
-### `false`
-
-The plugin will not be loaded
-
-```js
-'postcss-plugin': false
-```
-
-**.postcssrc.js**
-```js
-module.exports = {
- plugins: {
- 'postcss-plugin': false
- }
-}
-```
-
-### `Ordering`
-
-Plugin **execution order** is determined by declaration in the plugins section (**top-down**)
-
-```js
-{
- plugins: {
- 'postcss-plugin': {}, // [0]
- 'postcss-plugin': {}, // [1]
- 'postcss-plugin': {} // [2]
- }
-}
-```
-
-Context
-
-When using a `{Function}` (`postcss.config.js` or `.postcssrc.js`), it's possible to pass context to `postcss-load-config`, which will be evaluated while loading your config. By default `ctx.env (process.env.NODE_ENV)` and `ctx.cwd (process.cwd())` are available on the `ctx` `{Object}`
-
-> ℹ️ Most third-party integrations add additional properties to the `ctx` (e.g `postcss-loader`). Check the specific module's README for more information about what is available on the respective `ctx`
-
-Examples
-
-**postcss.config.js**
-
-```js
-module.exports = (ctx) => ({
- parser: ctx.parser ? 'sugarss' : false,
- map: ctx.env === 'development' ? ctx.map : false,
- plugins: {
- 'postcss-import': {},
- 'postcss-nested': {},
- cssnano: ctx.env === 'production' ? {} : false
- }
-})
-```
-
-
-
-
-
-```json
-"scripts": {
- "build": "NODE_ENV=production node postcss",
- "start": "NODE_ENV=development node postcss"
-}
-```
-
-```js
-const { readFileSync } = require('fs')
-
-const postcss = require('postcss')
-const postcssrc = require('postcss-load-config')
-
-const css = readFileSync('index.sss', 'utf8')
-
-const ctx = { parser: true, map: 'inline' }
-
-postcssrc(ctx).then(({ plugins, options }) => {
- postcss(plugins)
- .process(css, options)
- .then((result) => console.log(result.css))
-})
-```
-
-
-
-
-
-```json
-"scripts": {
- "build": "NODE_ENV=production gulp",
- "start": "NODE_ENV=development gulp"
-}
-```
-
-```js
-const { task, src, dest, series, watch } = require('gulp')
-
-const postcss = require('gulp-postcssrc')
-
-const css = () => {
- src('src/*.css')
- .pipe(postcss())
- .pipe(dest('dest'))
-})
-
-task('watch', () => {
- watch(['src/*.css', 'postcss.config.js'], css)
-})
-
-task('default', series(css, 'watch'))
-```
-
-
-
-
-
-```json
-"scripts": {
- "build": "NODE_ENV=production webpack",
- "start": "NODE_ENV=development webpack-dev-server"
-}
-```
-
-**webpack.config.js**
-```js
-module.exports = (env) => ({
- module: {
- rules: [
- {
- test: /\.css$/,
- use: [
- 'style-loader',
- 'css-loader',
- 'postcss-loader'
- ]
- }
- ]
- }
-})
-```
-
-Maintainers
-
-
-
-Contributors
-
-
-
-
-[npm]: https://img.shields.io/npm/v/postcss-load-config.svg
-[npm-url]: https://npmjs.com/package/postcss-load-config
-
-[node]: https://img.shields.io/node/v/postcss-load-plugins.svg
-[node-url]: https://nodejs.org/
-
-[deps]: https://david-dm.org/michael-ciniawsky/postcss-load-config.svg
-[deps-url]: https://david-dm.org/michael-ciniawsky/postcss-load-config
-
-[test]: http://img.shields.io/travis/michael-ciniawsky/postcss-load-config.svg
-[test-url]: https://travis-ci.org/michael-ciniawsky/postcss-load-config
-
-[cover]: https://coveralls.io/repos/github/michael-ciniawsky/postcss-load-config/badge.svg
-[cover-url]: https://coveralls.io/github/michael-ciniawsky/postcss-load-config
-
-[style]: https://img.shields.io/badge/code%20style-standard-yellow.svg
-[style-url]: http://standardjs.com/
-
-[chat]: https://img.shields.io/gitter/room/postcss/postcss.svg
-[chat-url]: https://gitter.im/postcss/postcss
-
-## Security Contact
-
-To report a security vulnerability, please use the [Tidelift security contact].
-Tidelift will coordinate the fix and disclosure.
-
-[Tidelift security contact]: https://tidelift.com/security
diff --git a/node_modules/postcss-load-config/package.json b/node_modules/postcss-load-config/package.json
deleted file mode 100644
index 7e40f912..00000000
--- a/node_modules/postcss-load-config/package.json
+++ /dev/null
@@ -1,48 +0,0 @@
-{
- "name": "postcss-load-config",
- "version": "4.0.1",
- "description": "Autoload Config for PostCSS",
- "main": "src/index.js",
- "types": "src/index.d.ts",
- "files": [
- "src"
- ],
- "engines": {
- "node": ">= 14"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- "dependencies": {
- "lilconfig": "^2.0.5",
- "yaml": "^2.1.1"
- },
- "peerDependencies": {
- "postcss": ">=8.0.9",
- "ts-node": ">=9.0.0"
- },
- "peerDependenciesMeta": {
- "ts-node": {
- "optional": true
- },
- "postcss": {
- "optional": true
- }
- },
- "keywords": [
- "postcss",
- "postcssrc",
- "postcss.config.js"
- ],
- "author": "Michael Ciniawky ",
- "contributors": [
- "Ryan Dunckel",
- "Mateusz Derks",
- "Dalton Santos",
- "Patrick Gilday",
- "François Wouts"
- ],
- "repository": "postcss/postcss-load-config",
- "license": "MIT"
-}
diff --git a/node_modules/postcss-load-config/src/index.d.ts b/node_modules/postcss-load-config/src/index.d.ts
deleted file mode 100644
index 49792204..00000000
--- a/node_modules/postcss-load-config/src/index.d.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-// based on @types/postcss-load-config@2.0.1
-// Type definitions for postcss-load-config 2.1
-import Processor from 'postcss/lib/processor';
-import { Plugin, ProcessOptions, Transformer } from 'postcss';
-import { Options as ConfigOptions } from "lilconfig";
-
-declare function postcssrc(
- ctx?: postcssrc.ConfigContext,
- path?: string,
- options?: ConfigOptions
-): Promise;
-
-declare namespace postcssrc {
- // In the ConfigContext, these three options can be instances of the
- // appropriate class, or strings. If they are strings, postcss-load-config will
- // require() them and pass the instances along.
- export interface ProcessOptionsPreload {
- parser?: string | ProcessOptions['parser'];
- stringifier?: string | ProcessOptions['stringifier'];
- syntax?: string | ProcessOptions['syntax'];
- }
-
- // The remaining ProcessOptions, sans the three above.
- export type RemainingProcessOptions = Pick<
- ProcessOptions,
- Exclude
- >;
-
- // Additional context options that postcss-load-config understands.
- export interface Context {
- cwd?: string;
- env?: string;
- }
-
- // The full shape of the ConfigContext.
- export type ConfigContext = Context &
- ProcessOptionsPreload &
- RemainingProcessOptions;
-
- // Result of postcssrc is a Promise containing the filename plus the options
- // and plugins that are ready to pass on to postcss.
- export type ResultPlugin = Plugin | Transformer | Processor;
-
- export interface Result {
- file: string;
- options: ProcessOptions;
- plugins: ResultPlugin[];
- }
-
- export type ConfigPlugin = Transformer | Plugin | Processor;
-
- export interface Config {
- parser?: string | ProcessOptions['parser'] | false;
- stringifier?: string | ProcessOptions['stringifier'] | false;
- syntax?: string | ProcessOptions['syntax'] | false;
- map?: string | false;
- from?: string;
- to?: string;
- plugins?: Array | Record;
- }
-
- export type ConfigFn = (ctx: ConfigContext) => Config | Promise;
-}
-
-export = postcssrc;
diff --git a/node_modules/postcss-load-config/src/index.js b/node_modules/postcss-load-config/src/index.js
deleted file mode 100644
index a7d16703..00000000
--- a/node_modules/postcss-load-config/src/index.js
+++ /dev/null
@@ -1,179 +0,0 @@
-'use strict'
-
-const resolve = require('path').resolve
-const url = require('url')
-
-const config = require('lilconfig')
-const yaml = require('yaml')
-
-const loadOptions = require('./options.js')
-const loadPlugins = require('./plugins.js')
-
-/* istanbul ignore next */
-const interopRequireDefault = (obj) => obj && obj.__esModule ? obj : { default: obj }
-
-/**
- * Process the result from cosmiconfig
- *
- * @param {Object} ctx Config Context
- * @param {Object} result Cosmiconfig result
- *
- * @return {Object} PostCSS Config
- */
-const processResult = (ctx, result) => {
- const file = result.filepath || ''
- let config = interopRequireDefault(result.config).default || {}
-
- if (typeof config === 'function') {
- config = config(ctx)
- } else {
- config = Object.assign({}, config, ctx)
- }
-
- if (!config.plugins) {
- config.plugins = []
- }
-
- return {
- plugins: loadPlugins(config, file),
- options: loadOptions(config, file),
- file
- }
-}
-
-/**
- * Builds the Config Context
- *
- * @param {Object} ctx Config Context
- *
- * @return {Object} Config Context
- */
-const createContext = (ctx) => {
- /**
- * @type {Object}
- *
- * @prop {String} cwd=process.cwd() Config search start location
- * @prop {String} env=process.env.NODE_ENV Config Enviroment, will be set to `development` by `postcss-load-config` if `process.env.NODE_ENV` is `undefined`
- */
- ctx = Object.assign({
- cwd: process.cwd(),
- env: process.env.NODE_ENV
- }, ctx)
-
- if (!ctx.env) {
- process.env.NODE_ENV = 'development'
- }
-
- return ctx
-}
-
-const importDefault = async filepath => {
- const module = await import(url.pathToFileURL(filepath).href)
- return module.default
-}
-
-const addTypeScriptLoader = (options = {}, loader) => {
- const moduleName = 'postcss'
-
- return {
- ...options,
- searchPlaces: [
- ...(options.searchPlaces || []),
- 'package.json',
- `.${moduleName}rc`,
- `.${moduleName}rc.json`,
- `.${moduleName}rc.yaml`,
- `.${moduleName}rc.yml`,
- `.${moduleName}rc.ts`,
- `.${moduleName}rc.js`,
- `.${moduleName}rc.cjs`,
- `.${moduleName}rc.mjs`,
- `${moduleName}.config.ts`,
- `${moduleName}.config.js`,
- `${moduleName}.config.cjs`,
- `${moduleName}.config.mjs`
- ],
- loaders: {
- ...options.loaders,
- '.yaml': (filepath, content) => yaml.parse(content),
- '.yml': (filepath, content) => yaml.parse(content),
- '.js': importDefault,
- '.cjs': importDefault,
- '.mjs': importDefault,
- '.ts': loader
- }
- }
-}
-
-const withTypeScriptLoader = (rcFunc) => {
- return (ctx, path, options) => {
- return rcFunc(ctx, path, addTypeScriptLoader(options, (configFile) => {
- let registerer = { enabled () {} }
-
- try {
- // Register TypeScript compiler instance
- registerer = require('ts-node').register()
-
- return require(configFile)
- } catch (err) {
- if (err.code === 'MODULE_NOT_FOUND') {
- throw new Error(
- `'ts-node' is required for the TypeScript configuration files. Make sure it is installed\nError: ${err.message}`
- )
- }
-
- throw err
- } finally {
- registerer.enabled(false)
- }
- }))
- }
-}
-
-/**
- * Load Config
- *
- * @method rc
- *
- * @param {Object} ctx Config Context
- * @param {String} path Config Path
- * @param {Object} options Config Options
- *
- * @return {Promise} config PostCSS Config
- */
-const rc = withTypeScriptLoader((ctx, path, options) => {
- /**
- * @type {Object} The full Config Context
- */
- ctx = createContext(ctx)
-
- /**
- * @type {String} `process.cwd()`
- */
- path = path ? resolve(path) : process.cwd()
-
- return config.lilconfig('postcss', options)
- .search(path)
- .then((result) => {
- if (!result) {
- throw new Error(`No PostCSS Config found in: ${path}`)
- }
-
- return processResult(ctx, result)
- })
-})
-
-/**
- * Autoload Config for PostCSS
- *
- * @author Michael Ciniawsky @michael-ciniawsky
- * @license MIT
- *
- * @module postcss-load-config
- * @version 2.1.0
- *
- * @requires comsiconfig
- * @requires ./options
- * @requires ./plugins
- */
-module.exports = rc
diff --git a/node_modules/postcss-load-config/src/options.js b/node_modules/postcss-load-config/src/options.js
deleted file mode 100644
index d3ef2d65..00000000
--- a/node_modules/postcss-load-config/src/options.js
+++ /dev/null
@@ -1,47 +0,0 @@
-'use strict'
-
-const req = require('./req.js')
-
-/**
- * Load Options
- *
- * @private
- * @method options
- *
- * @param {Object} config PostCSS Config
- *
- * @return {Object} options PostCSS Options
- */
-const options = (config, file) => {
- if (config.parser && typeof config.parser === 'string') {
- try {
- config.parser = req(config.parser, file)
- } catch (err) {
- throw new Error(`Loading PostCSS Parser failed: ${err.message}\n\n(@${file})`)
- }
- }
-
- if (config.syntax && typeof config.syntax === 'string') {
- try {
- config.syntax = req(config.syntax, file)
- } catch (err) {
- throw new Error(`Loading PostCSS Syntax failed: ${err.message}\n\n(@${file})`)
- }
- }
-
- if (config.stringifier && typeof config.stringifier === 'string') {
- try {
- config.stringifier = req(config.stringifier, file)
- } catch (err) {
- throw new Error(`Loading PostCSS Stringifier failed: ${err.message}\n\n(@${file})`)
- }
- }
-
- if (config.plugins) {
- delete config.plugins
- }
-
- return config
-}
-
-module.exports = options
diff --git a/node_modules/postcss-load-config/src/plugins.js b/node_modules/postcss-load-config/src/plugins.js
deleted file mode 100644
index 6cb994bb..00000000
--- a/node_modules/postcss-load-config/src/plugins.js
+++ /dev/null
@@ -1,85 +0,0 @@
-'use strict'
-
-const req = require('./req.js')
-
-/**
- * Plugin Loader
- *
- * @private
- * @method load
- *
- * @param {String} plugin PostCSS Plugin Name
- * @param {Object} options PostCSS Plugin Options
- *
- * @return {Function} PostCSS Plugin
- */
-const load = (plugin, options, file) => {
- try {
- if (
- options === null ||
- options === undefined ||
- Object.keys(options).length === 0
- ) {
- return req(plugin, file)
- } else {
- return req(plugin, file)(options)
- }
- } catch (err) {
- throw new Error(`Loading PostCSS Plugin failed: ${err.message}\n\n(@${file})`)
- }
-}
-
-/**
- * Load Plugins
- *
- * @private
- * @method plugins
- *
- * @param {Object} config PostCSS Config Plugins
- *
- * @return {Array} plugins PostCSS Plugins
- */
-const plugins = (config, file) => {
- let plugins = []
-
- if (Array.isArray(config.plugins)) {
- plugins = config.plugins.filter(Boolean)
- } else {
- plugins = Object.keys(config.plugins)
- .filter((plugin) => {
- return config.plugins[plugin] !== false ? plugin : ''
- })
- .map((plugin) => {
- return load(plugin, config.plugins[plugin], file)
- })
- }
-
- if (plugins.length && plugins.length > 0) {
- plugins.forEach((plugin, i) => {
- if (plugin.default) {
- plugin = plugin.default
- }
-
- if (plugin.postcss === true) {
- plugin = plugin()
- } else if (plugin.postcss) {
- plugin = plugin.postcss
- }
-
- if (
- // eslint-disable-next-line
- !(
- (typeof plugin === 'object' && Array.isArray(plugin.plugins)) ||
- (typeof plugin === 'object' && plugin.postcssPlugin) ||
- (typeof plugin === 'function')
- )
- ) {
- throw new TypeError(`Invalid PostCSS Plugin found at: plugins[${i}]\n\n(@${file})`)
- }
- })
- }
-
- return plugins
-}
-
-module.exports = plugins
diff --git a/node_modules/postcss-load-config/src/req.js b/node_modules/postcss-load-config/src/req.js
deleted file mode 100644
index 42020c9b..00000000
--- a/node_modules/postcss-load-config/src/req.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// eslint-disable-next-line n/no-deprecated-api
-const { createRequire, createRequireFromPath } = require('module')
-
-function req (name, rootFile) {
- const create = createRequire || createRequireFromPath
- const require = create(rootFile)
- return require(name)
-}
-
-module.exports = req
diff --git a/node_modules/postcss-reporter/LICENSE b/node_modules/postcss-reporter/LICENSE
deleted file mode 100644
index 6d347c06..00000000
--- a/node_modules/postcss-reporter/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 David Clark
-
-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.
-
diff --git a/node_modules/postcss-reporter/README.md b/node_modules/postcss-reporter/README.md
deleted file mode 100644
index ca6c43b9..00000000
--- a/node_modules/postcss-reporter/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# postcss-reporter
-
-A PostCSS plugin to `console.log()` the messages (warnings, etc.) registered by other PostCSS plugins.
-
----
-
-**SEEKING A NEW MAINTAINER!** Interested in contributing to the ecosystem of PostCSS and Stylelint? Please open an issue if you'd like to take over maintenance of this package.
-
----
-
-## Docs
-Read **[full docs](https://github.com/postcss/postcss-reporter#readme)** on GitHub.
diff --git a/node_modules/postcss-reporter/index.js b/node_modules/postcss-reporter/index.js
deleted file mode 100644
index 01116aa4..00000000
--- a/node_modules/postcss-reporter/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var reporter = require('./lib/reporter');
-
-module.exports = reporter;
-module.exports.postcss = true;
diff --git a/node_modules/postcss-reporter/lib/formatter.js b/node_modules/postcss-reporter/lib/formatter.js
deleted file mode 100644
index 7358cc61..00000000
--- a/node_modules/postcss-reporter/lib/formatter.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var pico = require('picocolors');
-var path = require('path');
-var firstBy = require('thenby');
-var util = require('./util');
-
-var supportsLargeCharset =
- process.platform !== 'win32' ||
- process.env.CI ||
- process.env.TERM === 'xterm-256color';
-var warningSymbol = supportsLargeCharset ? '⚠' : '!!';
-
-function createSortFunction(positionless, sortByPosition) {
- var positionValue = 0
-
- if (positionless === 'any') { positionValue = 1; }
- if (positionless === 'first') { positionValue = 2; }
- if (positionless === 'last') { positionValue = 0; }
-
- var sortFunction = firstBy((m) => {
- if (!m.line) return 1;
- return positionValue;
- })
-
- if (sortByPosition) {
- sortFunction = sortFunction.thenBy('line').thenBy('column');
- }
-
- return sortFunction;
-}
-
-module.exports = function (opts) {
- var options = opts || {};
- var sortByPosition =
- typeof options.sortByPosition !== 'undefined'
- ? options.sortByPosition
- : true;
- var positionless = options.positionless || 'first';
-
- var sortFunction = createSortFunction(positionless, sortByPosition);
-
- return function (input) {
- var messages = input.messages.filter(function (message) {
- return typeof message.text === 'string';
- });
- var source = input.source;
-
- if (!messages.length) return '';
-
- var orderedMessages = messages.sort(sortFunction);
-
- var output = '\n';
-
- if (source) {
- output += pico.bold(pico.underline(logFrom(source))) + '\n';
- }
-
- orderedMessages.forEach(function (w) {
- output += messageToString(w) + '\n';
- });
-
- return output;
-
- function messageToString(message) {
- var location = util.getLocation(message);
- var str = '';
-
- if (location.line) {
- str += pico.bold(location.line);
- }
-
- if (location.column) {
- str += pico.bold(':' + location.column);
- }
-
- if (location.line || location.column) {
- str += '\t';
- }
-
- if (!options.noIcon && message.type === 'warning') {
- str += pico.yellow(warningSymbol + ' ');
- }
-
- str += message.text;
- if (!options.noPlugin) {
- str += pico.yellow(' [' + message.plugin + ']');
- }
- return str;
- }
-
- function logFrom(fromValue) {
- if (fromValue.charAt(0) === '<') return fromValue;
- return path.relative(process.cwd(), fromValue).split(path.sep).join('/');
- }
- };
-};
diff --git a/node_modules/postcss-reporter/lib/reporter.js b/node_modules/postcss-reporter/lib/reporter.js
deleted file mode 100644
index 71872a97..00000000
--- a/node_modules/postcss-reporter/lib/reporter.js
+++ /dev/null
@@ -1,101 +0,0 @@
-var defaultFormatter = require('./formatter');
-var pico = require('picocolors');
-var util = require('./util');
-
-module.exports = function (opts = {}) {
- var formatter =
- opts.formatter ||
- defaultFormatter({
- noIcon: opts.noIcon,
- noPlugin: opts.noPlugin,
- });
-
- var pluginFilter;
- if (!opts.plugins) {
- // Every plugin
- pluginFilter = function () {
- return true;
- };
- } else if (
- opts.plugins.every(function (plugin) {
- return plugin[0] === '!';
- })
- ) {
- // Deny list
- pluginFilter = function (message) {
- return opts.plugins.indexOf('!' + message.plugin) === -1;
- };
- } else {
- // Allow list
- pluginFilter = function (message) {
- return opts.plugins.indexOf(message.plugin) !== -1;
- };
- }
-
- var messageFilter = opts.filter || ((message) => message.type === 'warning');
-
- return {
- postcssPlugin: 'postcss-reporter',
- OnceExit(css, { result }) {
- var messagesToLog = result.messages
- .filter(pluginFilter)
- .filter(messageFilter);
-
- var resultSource = !result.root.source
- ? ''
- : result.root.source.input.file || result.root.source.input.id;
-
- var sourceGroupedMessages = messagesToLog.reduce((grouped, message) => {
- const key = util.getLocation(message).file || resultSource;
-
- if (!grouped.hasOwnProperty(key)) {
- grouped[key] = [];
- }
-
- grouped[key].push(message);
-
- return grouped;
- }, {});
-
- var report = '';
- for (const source in sourceGroupedMessages) {
- if (sourceGroupedMessages.hasOwnProperty(source)) {
- report += formatter({
- messages: sourceGroupedMessages[source],
- source: source,
- });
- }
- }
-
- if (opts.clearReportedMessages) {
- result.messages = result.messages.filter(message => !messagesToLog.includes(message));
- }
-
- if (opts.clearAllMessages) {
- var messagesToClear = result.messages.filter(pluginFilter);
- result.messages = result.messages.filter(message => !messagesToClear.includes(message));
- }
-
- if (!report) return;
-
- console.log(report);
-
- if (opts.throwError && shouldThrowError()) {
- throw new Error(
- pico.red(
- pico.bold('\n** postcss-reporter: warnings or errors were found **')
- )
- );
- }
-
- function shouldThrowError() {
- return (
- messagesToLog.length &&
- messagesToLog.some((message) => {
- return message.type === 'warning' || message.type === 'error';
- })
- );
- }
- },
- };
-};
diff --git a/node_modules/postcss-reporter/lib/util.js b/node_modules/postcss-reporter/lib/util.js
deleted file mode 100644
index 094b3acc..00000000
--- a/node_modules/postcss-reporter/lib/util.js
+++ /dev/null
@@ -1,19 +0,0 @@
-exports.getLocation = function (message) {
- var messageNode = message.node;
-
- var location = {
- line: message.line,
- column: message.column,
- };
-
- var messageInput = messageNode && messageNode.source && messageNode.source.input;
-
- if (!messageInput) return location;
-
- var originLocation =
- messageInput.origin && messageInput.origin(message.line, message.column);
- if (originLocation) return originLocation;
-
- location.file = messageInput.file || messageInput.id;
- return location;
-};
diff --git a/node_modules/postcss-reporter/package.json b/node_modules/postcss-reporter/package.json
deleted file mode 100644
index 15a9867c..00000000
--- a/node_modules/postcss-reporter/package.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "postcss-reporter",
- "version": "7.0.5",
- "description": "Log PostCSS messages in the console",
- "main": "index.js",
- "files": [
- "index.js",
- "lib"
- ],
- "engines": {
- "node": ">=10"
- },
- "repository": "postcss/postcss-reporter",
- "author": {
- "name": "David Clark",
- "email": "david.dave.clark@gmail.com",
- "url": "https://davidtheclark.com"
- },
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- },
- "dependencies": {
- "picocolors": "^1.0.0",
- "thenby": "^1.3.4"
- }
-}
diff --git a/node_modules/postcss/LICENSE b/node_modules/postcss/LICENSE
deleted file mode 100644
index da057b45..00000000
--- a/node_modules/postcss/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright 2013 Andrey Sitnik
-
-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.
diff --git a/node_modules/postcss/README.md b/node_modules/postcss/README.md
deleted file mode 100644
index 09dd856c..00000000
--- a/node_modules/postcss/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# PostCSS [![Gitter][chat-img]][chat]
-
-
-
-[chat-img]: https://img.shields.io/badge/Gitter-Join_the_PostCSS_chat-brightgreen.svg
-[chat]: https://gitter.im/postcss/postcss
-
-PostCSS is a tool for transforming styles with JS plugins.
-These plugins can lint your CSS, support variables and mixins,
-transpile future CSS syntax, inline images, and more.
-
-PostCSS is used by industry leaders including Wikipedia, Twitter, Alibaba,
-and JetBrains. The [Autoprefixer] PostCSS plugin is one of the most popular
-CSS processors.
-
-PostCSS takes a CSS file and provides an API to analyze and modify its rules
-(by transforming them into an [Abstract Syntax Tree]).
-This API can then be used by [plugins] to do a lot of useful things,
-e.g., to find errors automatically, or to insert vendor prefixes.
-
-**Support / Discussion:** [Gitter](https://gitter.im/postcss/postcss)
-**Twitter account:** [@postcss](https://twitter.com/postcss)
-**VK.com page:** [postcss](https://vk.com/postcss)
-**中文翻译**: [`docs/README-cn.md`](./docs/README-cn.md)
-
-For PostCSS commercial support (consulting, improving the front-end culture
-of your company, PostCSS plugins), contact [Evil Martians]
-at .
-
-[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree
-[Evil Martians]: https://evilmartians.com/?utm_source=postcss
-[Autoprefixer]: https://github.com/postcss/autoprefixer
-[plugins]: https://github.com/postcss/postcss#plugins
-
-
-
-
-
-
-## Docs
-Read full docs **[here](https://postcss.org/)**.
diff --git a/node_modules/postcss/lib/at-rule.d.ts b/node_modules/postcss/lib/at-rule.d.ts
deleted file mode 100644
index 186fae0c..00000000
--- a/node_modules/postcss/lib/at-rule.d.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-import Container, { ContainerProps } from './container.js'
-
-declare namespace AtRule {
- export interface AtRuleRaws extends Record {
- /**
- * The space symbols before the node. It also stores `*`
- * and `_` symbols before the declaration (IE hack).
- */
- before?: string
-
- /**
- * The space symbols after the last child of the node to the end of the node.
- */
- after?: string
-
- /**
- * The space between the at-rule name and its parameters.
- */
- afterName?: string
-
- /**
- * The symbols between the last parameter and `{` for rules.
- */
- between?: string
-
- /**
- * Contains `true` if the last child has an (optional) semicolon.
- */
- semicolon?: boolean
-
- /**
- * The rule’s selector with comments.
- */
- params?: {
- value: string
- raw: string
- }
- }
-
- export interface AtRuleProps extends ContainerProps {
- /** Name of the at-rule. */
- name: string
- /** Parameters following the name of the at-rule. */
- params?: string | number
- /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
- raws?: AtRuleRaws
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { AtRule_ as default }
-}
-
-/**
- * Represents an at-rule.
- *
- * ```js
- * Once (root, { AtRule }) {
- * let media = new AtRule({ name: 'media', params: 'print' })
- * media.append(…)
- * root.append(media)
- * }
- * ```
- *
- * If it’s followed in the CSS by a `{}` block, this node will have
- * a nodes property representing its children.
- *
- * ```js
- * const root = postcss.parse('@charset "UTF-8"; @media print {}')
- *
- * const charset = root.first
- * charset.type //=> 'atrule'
- * charset.nodes //=> undefined
- *
- * const media = root.last
- * media.nodes //=> []
- * ```
- */
-declare class AtRule_ extends Container {
- type: 'atrule'
- parent: Container | undefined
- raws: AtRule.AtRuleRaws
-
- /**
- * The at-rule’s name immediately follows the `@`.
- *
- * ```js
- * const root = postcss.parse('@media print {}')
- * media.name //=> 'media'
- * const media = root.first
- * ```
- */
- name: string
-
- /**
- * The at-rule’s parameters, the values that follow the at-rule’s name
- * but precede any `{}` block.
- *
- * ```js
- * const root = postcss.parse('@media print, screen {}')
- * const media = root.first
- * media.params //=> 'print, screen'
- * ```
- */
- params: string
-
- constructor(defaults?: AtRule.AtRuleProps)
- assign(overrides: object | AtRule.AtRuleProps): this
- clone(overrides?: Partial): this
- cloneBefore(overrides?: Partial): this
- cloneAfter(overrides?: Partial): this
-}
-
-declare class AtRule extends AtRule_ {}
-
-export = AtRule
diff --git a/node_modules/postcss/lib/at-rule.js b/node_modules/postcss/lib/at-rule.js
deleted file mode 100644
index 9486447b..00000000
--- a/node_modules/postcss/lib/at-rule.js
+++ /dev/null
@@ -1,25 +0,0 @@
-'use strict'
-
-let Container = require('./container')
-
-class AtRule extends Container {
- constructor(defaults) {
- super(defaults)
- this.type = 'atrule'
- }
-
- append(...children) {
- if (!this.proxyOf.nodes) this.nodes = []
- return super.append(...children)
- }
-
- prepend(...children) {
- if (!this.proxyOf.nodes) this.nodes = []
- return super.prepend(...children)
- }
-}
-
-module.exports = AtRule
-AtRule.default = AtRule
-
-Container.registerAtRule(AtRule)
diff --git a/node_modules/postcss/lib/comment.d.ts b/node_modules/postcss/lib/comment.d.ts
deleted file mode 100644
index 2f00ff7b..00000000
--- a/node_modules/postcss/lib/comment.d.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import Container from './container.js'
-import Node, { NodeProps } from './node.js'
-
-declare namespace Comment {
- export interface CommentRaws extends Record {
- /**
- * The space symbols before the node.
- */
- before?: string
-
- /**
- * The space symbols between `/*` and the comment’s text.
- */
- left?: string
-
- /**
- * The space symbols between the comment’s text.
- */
- right?: string
- }
-
- export interface CommentProps extends NodeProps {
- /** Content of the comment. */
- text: string
- /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
- raws?: CommentRaws
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Comment_ as default }
-}
-
-/**
- * Represents a comment between declarations or statements (rule and at-rules).
- *
- * ```js
- * Once (root, { Comment }) {
- * let note = new Comment({ text: 'Note: …' })
- * root.append(note)
- * }
- * ```
- *
- * Comments inside selectors, at-rule parameters, or declaration values
- * will be stored in the `raws` properties explained above.
- */
-declare class Comment_ extends Node {
- type: 'comment'
- parent: Container | undefined
- raws: Comment.CommentRaws
-
- /**
- * The comment's text.
- */
- text: string
-
- constructor(defaults?: Comment.CommentProps)
- assign(overrides: object | Comment.CommentProps): this
- clone(overrides?: Partial): this
- cloneBefore(overrides?: Partial): this
- cloneAfter(overrides?: Partial): this
-}
-
-declare class Comment extends Comment_ {}
-
-export = Comment
diff --git a/node_modules/postcss/lib/comment.js b/node_modules/postcss/lib/comment.js
deleted file mode 100644
index c5665064..00000000
--- a/node_modules/postcss/lib/comment.js
+++ /dev/null
@@ -1,13 +0,0 @@
-'use strict'
-
-let Node = require('./node')
-
-class Comment extends Node {
- constructor(defaults) {
- super(defaults)
- this.type = 'comment'
- }
-}
-
-module.exports = Comment
-Comment.default = Comment
diff --git a/node_modules/postcss/lib/container.d.ts b/node_modules/postcss/lib/container.d.ts
deleted file mode 100644
index 32953fe3..00000000
--- a/node_modules/postcss/lib/container.d.ts
+++ /dev/null
@@ -1,451 +0,0 @@
-import Node, { ChildNode, NodeProps, ChildProps } from './node.js'
-import Declaration from './declaration.js'
-import Comment from './comment.js'
-import AtRule from './at-rule.js'
-import Rule from './rule.js'
-
-declare namespace Container {
- export interface ValueOptions {
- /**
- * An array of property names.
- */
- props?: string[]
-
- /**
- * String that’s used to narrow down values and speed up the regexp search.
- */
- fast?: string
- }
-
- export interface ContainerProps extends NodeProps {
- nodes?: (ChildNode | ChildProps)[]
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Container_ as default }
-}
-
-/**
- * The `Root`, `AtRule`, and `Rule` container nodes
- * inherit some common methods to help work with their children.
- *
- * Note that all containers can store any content. If you write a rule inside
- * a rule, PostCSS will parse it.
- */
-declare abstract class Container_<
- Child extends Node = ChildNode
-> extends Node {
- /**
- * An array containing the container’s children.
- *
- * ```js
- * const root = postcss.parse('a { color: black }')
- * root.nodes.length //=> 1
- * root.nodes[0].selector //=> 'a'
- * root.nodes[0].nodes[0].prop //=> 'color'
- * ```
- */
- nodes: Child[]
-
- /**
- * The container’s first child.
- *
- * ```js
- * rule.first === rules.nodes[0]
- * ```
- */
- get first(): Child | undefined
-
- /**
- * The container’s last child.
- *
- * ```js
- * rule.last === rule.nodes[rule.nodes.length - 1]
- * ```
- */
- get last(): Child | undefined
-
- /**
- * Iterates through the container’s immediate children,
- * calling `callback` for each child.
- *
- * Returning `false` in the callback will break iteration.
- *
- * This method only iterates through the container’s immediate children.
- * If you need to recursively iterate through all the container’s descendant
- * nodes, use `Container#walk`.
- *
- * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe
- * if you are mutating the array of child nodes during iteration.
- * PostCSS will adjust the current index to match the mutations.
- *
- * ```js
- * const root = postcss.parse('a { color: black; z-index: 1 }')
- * const rule = root.first
- *
- * for (const decl of rule.nodes) {
- * decl.cloneBefore({ prop: '-webkit-' + decl.prop })
- * // Cycle will be infinite, because cloneBefore moves the current node
- * // to the next index
- * }
- *
- * rule.each(decl => {
- * decl.cloneBefore({ prop: '-webkit-' + decl.prop })
- * // Will be executed only for color and z-index
- * })
- * ```
- *
- * @param callback Iterator receives each node and index.
- * @return Returns `false` if iteration was broke.
- */
- each(
- callback: (node: Child, index: number) => false | void
- ): false | undefined
-
- /**
- * Traverses the container’s descendant nodes, calling callback
- * for each node.
- *
- * Like container.each(), this method is safe to use
- * if you are mutating arrays during iteration.
- *
- * If you only need to iterate through the container’s immediate children,
- * use `Container#each`.
- *
- * ```js
- * root.walk(node => {
- * // Traverses all descendant nodes.
- * })
- * ```
- *
- * @param callback Iterator receives each node and index.
- * @return Returns `false` if iteration was broke.
- */
- walk(
- callback: (node: ChildNode, index: number) => false | void
- ): false | undefined
-
- /**
- * Traverses the container’s descendant nodes, calling callback
- * for each declaration node.
- *
- * If you pass a filter, iteration will only happen over declarations
- * with matching properties.
- *
- * ```js
- * root.walkDecls(decl => {
- * checkPropertySupport(decl.prop)
- * })
- *
- * root.walkDecls('border-radius', decl => {
- * decl.remove()
- * })
- *
- * root.walkDecls(/^background/, decl => {
- * decl.value = takeFirstColorFromGradient(decl.value)
- * })
- * ```
- *
- * Like `Container#each`, this method is safe
- * to use if you are mutating arrays during iteration.
- *
- * @param prop String or regular expression to filter declarations
- * by property name.
- * @param callback Iterator receives each node and index.
- * @return Returns `false` if iteration was broke.
- */
- walkDecls(
- propFilter: string | RegExp,
- callback: (decl: Declaration, index: number) => false | void
- ): false | undefined
- walkDecls(
- callback: (decl: Declaration, index: number) => false | void
- ): false | undefined
-
- /**
- * Traverses the container’s descendant nodes, calling callback
- * for each rule node.
- *
- * If you pass a filter, iteration will only happen over rules
- * with matching selectors.
- *
- * Like `Container#each`, this method is safe
- * to use if you are mutating arrays during iteration.
- *
- * ```js
- * const selectors = []
- * root.walkRules(rule => {
- * selectors.push(rule.selector)
- * })
- * console.log(`Your CSS uses ${ selectors.length } selectors`)
- * ```
- *
- * @param selector String or regular expression to filter rules by selector.
- * @param callback Iterator receives each node and index.
- * @return Returns `false` if iteration was broke.
- */
- walkRules(
- selectorFilter: string | RegExp,
- callback: (rule: Rule, index: number) => false | void
- ): false | undefined
- walkRules(
- callback: (rule: Rule, index: number) => false | void
- ): false | undefined
-
- /**
- * Traverses the container’s descendant nodes, calling callback
- * for each at-rule node.
- *
- * If you pass a filter, iteration will only happen over at-rules
- * that have matching names.
- *
- * Like `Container#each`, this method is safe
- * to use if you are mutating arrays during iteration.
- *
- * ```js
- * root.walkAtRules(rule => {
- * if (isOld(rule.name)) rule.remove()
- * })
- *
- * let first = false
- * root.walkAtRules('charset', rule => {
- * if (!first) {
- * first = true
- * } else {
- * rule.remove()
- * }
- * })
- * ```
- *
- * @param name String or regular expression to filter at-rules by name.
- * @param callback Iterator receives each node and index.
- * @return Returns `false` if iteration was broke.
- */
- walkAtRules(
- nameFilter: string | RegExp,
- callback: (atRule: AtRule, index: number) => false | void
- ): false | undefined
- walkAtRules(
- callback: (atRule: AtRule, index: number) => false | void
- ): false | undefined
-
- /**
- * Traverses the container’s descendant nodes, calling callback
- * for each comment node.
- *
- * Like `Container#each`, this method is safe
- * to use if you are mutating arrays during iteration.
- *
- * ```js
- * root.walkComments(comment => {
- * comment.remove()
- * })
- * ```
- *
- * @param callback Iterator receives each node and index.
- * @return Returns `false` if iteration was broke.
- */
-
- walkComments(
- callback: (comment: Comment, indexed: number) => false | void
- ): false | undefined
- walkComments(
- callback: (comment: Comment, indexed: number) => false | void
- ): false | undefined
-
- /**
- * Inserts new nodes to the end of the container.
- *
- * ```js
- * const decl1 = new Declaration({ prop: 'color', value: 'black' })
- * const decl2 = new Declaration({ prop: 'background-color', value: 'white' })
- * rule.append(decl1, decl2)
- *
- * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule
- * root.append({ selector: 'a' }) // rule
- * rule.append({ prop: 'color', value: 'black' }) // declaration
- * rule.append({ text: 'Comment' }) // comment
- *
- * root.append('a {}')
- * root.first.append('color: black; z-index: 1')
- * ```
- *
- * @param nodes New nodes.
- * @return This node for methods chain.
- */
- append(
- ...nodes: (Node | Node[] | ChildProps | ChildProps[] | string | string[])[]
- ): this
-
- /**
- * Inserts new nodes to the start of the container.
- *
- * ```js
- * const decl1 = new Declaration({ prop: 'color', value: 'black' })
- * const decl2 = new Declaration({ prop: 'background-color', value: 'white' })
- * rule.prepend(decl1, decl2)
- *
- * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule
- * root.append({ selector: 'a' }) // rule
- * rule.append({ prop: 'color', value: 'black' }) // declaration
- * rule.append({ text: 'Comment' }) // comment
- *
- * root.append('a {}')
- * root.first.append('color: black; z-index: 1')
- * ```
- *
- * @param nodes New nodes.
- * @return This node for methods chain.
- */
- prepend(
- ...nodes: (Node | Node[] | ChildProps | ChildProps[] | string | string[])[]
- ): this
-
- /**
- * Add child to the end of the node.
- *
- * ```js
- * rule.push(new Declaration({ prop: 'color', value: 'black' }))
- * ```
- *
- * @param child New node.
- * @return This node for methods chain.
- */
- push(child: Child): this
-
- /**
- * Insert new node before old node within the container.
- *
- * ```js
- * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop }))
- * ```
- *
- * @param oldNode Child or child’s index.
- * @param newNode New node.
- * @return This node for methods chain.
- */
- insertBefore(
- oldNode: Child | number,
- newNode: Child | ChildProps | string | Child[] | ChildProps[] | string[]
- ): this
-
- /**
- * Insert new node after old node within the container.
- *
- * @param oldNode Child or child’s index.
- * @param newNode New node.
- * @return This node for methods chain.
- */
- insertAfter(
- oldNode: Child | number,
- newNode: Child | ChildProps | string | Child[] | ChildProps[] | string[]
- ): this
-
- /**
- * Removes node from the container and cleans the parent properties
- * from the node and its children.
- *
- * ```js
- * rule.nodes.length //=> 5
- * rule.removeChild(decl)
- * rule.nodes.length //=> 4
- * decl.parent //=> undefined
- * ```
- *
- * @param child Child or child’s index.
- * @return This node for methods chain.
- */
- removeChild(child: Child | number): this
-
- /**
- * Removes all children from the container
- * and cleans their parent properties.
- *
- * ```js
- * rule.removeAll()
- * rule.nodes.length //=> 0
- * ```
- *
- * @return This node for methods chain.
- */
- removeAll(): this
-
- /**
- * Passes all declaration values within the container that match pattern
- * through callback, replacing those values with the returned result
- * of callback.
- *
- * This method is useful if you are using a custom unit or function
- * and need to iterate through all values.
- *
- * ```js
- * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => {
- * return 15 * parseInt(string) + 'px'
- * })
- * ```
- *
- * @param pattern Replace pattern.
- * @param {object} opts Options to speed up the search.
- * @param callback String to replace pattern or callback
- * that returns a new value. The callback
- * will receive the same arguments
- * as those passed to a function parameter
- * of `String#replace`.
- * @return This node for methods chain.
- */
- replaceValues(
- pattern: string | RegExp,
- options: Container.ValueOptions,
- replaced: string | { (substring: string, ...args: any[]): string }
- ): this
- replaceValues(
- pattern: string | RegExp,
- replaced: string | { (substring: string, ...args: any[]): string }
- ): this
-
- /**
- * Returns `true` if callback returns `true`
- * for all of the container’s children.
- *
- * ```js
- * const noPrefixes = rule.every(i => i.prop[0] !== '-')
- * ```
- *
- * @param condition Iterator returns true or false.
- * @return Is every child pass condition.
- */
- every(
- condition: (node: Child, index: number, nodes: Child[]) => boolean
- ): boolean
-
- /**
- * Returns `true` if callback returns `true` for (at least) one
- * of the container’s children.
- *
- * ```js
- * const hasPrefix = rule.some(i => i.prop[0] === '-')
- * ```
- *
- * @param condition Iterator returns true or false.
- * @return Is some child pass condition.
- */
- some(
- condition: (node: Child, index: number, nodes: Child[]) => boolean
- ): boolean
-
- /**
- * Returns a `child`’s index within the `Container#nodes` array.
- *
- * ```js
- * rule.index( rule.nodes[2] ) //=> 2
- * ```
- *
- * @param child Child of the current container.
- * @return Child index.
- */
- index(child: Child | number): number
-}
-
-declare class Container extends Container_ {}
-
-export = Container
diff --git a/node_modules/postcss/lib/container.js b/node_modules/postcss/lib/container.js
deleted file mode 100644
index 0f047bea..00000000
--- a/node_modules/postcss/lib/container.js
+++ /dev/null
@@ -1,439 +0,0 @@
-'use strict'
-
-let { isClean, my } = require('./symbols')
-let Declaration = require('./declaration')
-let Comment = require('./comment')
-let Node = require('./node')
-
-let parse, Rule, AtRule, Root
-
-function cleanSource(nodes) {
- return nodes.map(i => {
- if (i.nodes) i.nodes = cleanSource(i.nodes)
- delete i.source
- return i
- })
-}
-
-function markDirtyUp(node) {
- node[isClean] = false
- if (node.proxyOf.nodes) {
- for (let i of node.proxyOf.nodes) {
- markDirtyUp(i)
- }
- }
-}
-
-class Container extends Node {
- push(child) {
- child.parent = this
- this.proxyOf.nodes.push(child)
- return this
- }
-
- each(callback) {
- if (!this.proxyOf.nodes) return undefined
- let iterator = this.getIterator()
-
- let index, result
- while (this.indexes[iterator] < this.proxyOf.nodes.length) {
- index = this.indexes[iterator]
- result = callback(this.proxyOf.nodes[index], index)
- if (result === false) break
-
- this.indexes[iterator] += 1
- }
-
- delete this.indexes[iterator]
- return result
- }
-
- walk(callback) {
- return this.each((child, i) => {
- let result
- try {
- result = callback(child, i)
- } catch (e) {
- throw child.addToError(e)
- }
- if (result !== false && child.walk) {
- result = child.walk(callback)
- }
-
- return result
- })
- }
-
- walkDecls(prop, callback) {
- if (!callback) {
- callback = prop
- return this.walk((child, i) => {
- if (child.type === 'decl') {
- return callback(child, i)
- }
- })
- }
- if (prop instanceof RegExp) {
- return this.walk((child, i) => {
- if (child.type === 'decl' && prop.test(child.prop)) {
- return callback(child, i)
- }
- })
- }
- return this.walk((child, i) => {
- if (child.type === 'decl' && child.prop === prop) {
- return callback(child, i)
- }
- })
- }
-
- walkRules(selector, callback) {
- if (!callback) {
- callback = selector
-
- return this.walk((child, i) => {
- if (child.type === 'rule') {
- return callback(child, i)
- }
- })
- }
- if (selector instanceof RegExp) {
- return this.walk((child, i) => {
- if (child.type === 'rule' && selector.test(child.selector)) {
- return callback(child, i)
- }
- })
- }
- return this.walk((child, i) => {
- if (child.type === 'rule' && child.selector === selector) {
- return callback(child, i)
- }
- })
- }
-
- walkAtRules(name, callback) {
- if (!callback) {
- callback = name
- return this.walk((child, i) => {
- if (child.type === 'atrule') {
- return callback(child, i)
- }
- })
- }
- if (name instanceof RegExp) {
- return this.walk((child, i) => {
- if (child.type === 'atrule' && name.test(child.name)) {
- return callback(child, i)
- }
- })
- }
- return this.walk((child, i) => {
- if (child.type === 'atrule' && child.name === name) {
- return callback(child, i)
- }
- })
- }
-
- walkComments(callback) {
- return this.walk((child, i) => {
- if (child.type === 'comment') {
- return callback(child, i)
- }
- })
- }
-
- append(...children) {
- for (let child of children) {
- let nodes = this.normalize(child, this.last)
- for (let node of nodes) this.proxyOf.nodes.push(node)
- }
-
- this.markDirty()
-
- return this
- }
-
- prepend(...children) {
- children = children.reverse()
- for (let child of children) {
- let nodes = this.normalize(child, this.first, 'prepend').reverse()
- for (let node of nodes) this.proxyOf.nodes.unshift(node)
- for (let id in this.indexes) {
- this.indexes[id] = this.indexes[id] + nodes.length
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- cleanRaws(keepBetween) {
- super.cleanRaws(keepBetween)
- if (this.nodes) {
- for (let node of this.nodes) node.cleanRaws(keepBetween)
- }
- }
-
- insertBefore(exist, add) {
- let existIndex = this.index(exist)
- let type = existIndex === 0 ? 'prepend' : false
- let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()
- existIndex = this.index(exist)
- for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
-
- let index
- for (let id in this.indexes) {
- index = this.indexes[id]
- if (existIndex <= index) {
- this.indexes[id] = index + nodes.length
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- insertAfter(exist, add) {
- let existIndex = this.index(exist)
- let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()
- existIndex = this.index(exist)
- for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
-
- let index
- for (let id in this.indexes) {
- index = this.indexes[id]
- if (existIndex < index) {
- this.indexes[id] = index + nodes.length
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- removeChild(child) {
- child = this.index(child)
- this.proxyOf.nodes[child].parent = undefined
- this.proxyOf.nodes.splice(child, 1)
-
- let index
- for (let id in this.indexes) {
- index = this.indexes[id]
- if (index >= child) {
- this.indexes[id] = index - 1
- }
- }
-
- this.markDirty()
-
- return this
- }
-
- removeAll() {
- for (let node of this.proxyOf.nodes) node.parent = undefined
- this.proxyOf.nodes = []
-
- this.markDirty()
-
- return this
- }
-
- replaceValues(pattern, opts, callback) {
- if (!callback) {
- callback = opts
- opts = {}
- }
-
- this.walkDecls(decl => {
- if (opts.props && !opts.props.includes(decl.prop)) return
- if (opts.fast && !decl.value.includes(opts.fast)) return
-
- decl.value = decl.value.replace(pattern, callback)
- })
-
- this.markDirty()
-
- return this
- }
-
- every(condition) {
- return this.nodes.every(condition)
- }
-
- some(condition) {
- return this.nodes.some(condition)
- }
-
- index(child) {
- if (typeof child === 'number') return child
- if (child.proxyOf) child = child.proxyOf
- return this.proxyOf.nodes.indexOf(child)
- }
-
- get first() {
- if (!this.proxyOf.nodes) return undefined
- return this.proxyOf.nodes[0]
- }
-
- get last() {
- if (!this.proxyOf.nodes) return undefined
- return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
- }
-
- normalize(nodes, sample) {
- if (typeof nodes === 'string') {
- nodes = cleanSource(parse(nodes).nodes)
- } else if (Array.isArray(nodes)) {
- nodes = nodes.slice(0)
- for (let i of nodes) {
- if (i.parent) i.parent.removeChild(i, 'ignore')
- }
- } else if (nodes.type === 'root' && this.type !== 'document') {
- nodes = nodes.nodes.slice(0)
- for (let i of nodes) {
- if (i.parent) i.parent.removeChild(i, 'ignore')
- }
- } else if (nodes.type) {
- nodes = [nodes]
- } else if (nodes.prop) {
- if (typeof nodes.value === 'undefined') {
- throw new Error('Value field is missed in node creation')
- } else if (typeof nodes.value !== 'string') {
- nodes.value = String(nodes.value)
- }
- nodes = [new Declaration(nodes)]
- } else if (nodes.selector) {
- nodes = [new Rule(nodes)]
- } else if (nodes.name) {
- nodes = [new AtRule(nodes)]
- } else if (nodes.text) {
- nodes = [new Comment(nodes)]
- } else {
- throw new Error('Unknown node type in node creation')
- }
-
- let processed = nodes.map(i => {
- /* c8 ignore next */
- if (!i[my]) Container.rebuild(i)
- i = i.proxyOf
- if (i.parent) i.parent.removeChild(i)
- if (i[isClean]) markDirtyUp(i)
- if (typeof i.raws.before === 'undefined') {
- if (sample && typeof sample.raws.before !== 'undefined') {
- i.raws.before = sample.raws.before.replace(/\S/g, '')
- }
- }
- i.parent = this.proxyOf
- return i
- })
-
- return processed
- }
-
- getProxyProcessor() {
- return {
- set(node, prop, value) {
- if (node[prop] === value) return true
- node[prop] = value
- if (prop === 'name' || prop === 'params' || prop === 'selector') {
- node.markDirty()
- }
- return true
- },
-
- get(node, prop) {
- if (prop === 'proxyOf') {
- return node
- } else if (!node[prop]) {
- return node[prop]
- } else if (
- prop === 'each' ||
- (typeof prop === 'string' && prop.startsWith('walk'))
- ) {
- return (...args) => {
- return node[prop](
- ...args.map(i => {
- if (typeof i === 'function') {
- return (child, index) => i(child.toProxy(), index)
- } else {
- return i
- }
- })
- )
- }
- } else if (prop === 'every' || prop === 'some') {
- return cb => {
- return node[prop]((child, ...other) =>
- cb(child.toProxy(), ...other)
- )
- }
- } else if (prop === 'root') {
- return () => node.root().toProxy()
- } else if (prop === 'nodes') {
- return node.nodes.map(i => i.toProxy())
- } else if (prop === 'first' || prop === 'last') {
- return node[prop].toProxy()
- } else {
- return node[prop]
- }
- }
- }
- }
-
- getIterator() {
- if (!this.lastEach) this.lastEach = 0
- if (!this.indexes) this.indexes = {}
-
- this.lastEach += 1
- let iterator = this.lastEach
- this.indexes[iterator] = 0
-
- return iterator
- }
-}
-
-Container.registerParse = dependant => {
- parse = dependant
-}
-
-Container.registerRule = dependant => {
- Rule = dependant
-}
-
-Container.registerAtRule = dependant => {
- AtRule = dependant
-}
-
-Container.registerRoot = dependant => {
- Root = dependant
-}
-
-module.exports = Container
-Container.default = Container
-
-/* c8 ignore start */
-Container.rebuild = node => {
- if (node.type === 'atrule') {
- Object.setPrototypeOf(node, AtRule.prototype)
- } else if (node.type === 'rule') {
- Object.setPrototypeOf(node, Rule.prototype)
- } else if (node.type === 'decl') {
- Object.setPrototypeOf(node, Declaration.prototype)
- } else if (node.type === 'comment') {
- Object.setPrototypeOf(node, Comment.prototype)
- } else if (node.type === 'root') {
- Object.setPrototypeOf(node, Root.prototype)
- }
-
- node[my] = true
-
- if (node.nodes) {
- node.nodes.forEach(child => {
- Container.rebuild(child)
- })
- }
-}
-/* c8 ignore stop */
diff --git a/node_modules/postcss/lib/css-syntax-error.d.ts b/node_modules/postcss/lib/css-syntax-error.d.ts
deleted file mode 100644
index f89b4847..00000000
--- a/node_modules/postcss/lib/css-syntax-error.d.ts
+++ /dev/null
@@ -1,248 +0,0 @@
-import { FilePosition } from './input.js'
-
-declare namespace CssSyntaxError {
- /**
- * A position that is part of a range.
- */
- export interface RangePosition {
- /**
- * The line number in the input.
- */
- line: number
-
- /**
- * The column number in the input.
- */
- column: number
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { CssSyntaxError_ as default }
-}
-
-/**
- * The CSS parser throws this error for broken CSS.
- *
- * Custom parsers can throw this error for broken custom syntax using
- * the `Node#error` method.
- *
- * PostCSS will use the input source map to detect the original error location.
- * If you wrote a Sass file, compiled it to CSS and then parsed it with PostCSS,
- * PostCSS will show the original position in the Sass file.
- *
- * If you need the position in the PostCSS input
- * (e.g., to debug the previous compiler), use `error.input.file`.
- *
- * ```js
- * // Raising error from plugin
- * throw node.error('Unknown variable', { plugin: 'postcss-vars' })
- * ```
- *
- * ```js
- * // Catching and checking syntax error
- * try {
- * postcss.parse('a{')
- * } catch (error) {
- * if (error.name === 'CssSyntaxError') {
- * error //=> CssSyntaxError
- * }
- * }
- * ```
- */
-declare class CssSyntaxError_ {
- /**
- * Instantiates a CSS syntax error. Can be instantiated for a single position
- * or for a range.
- * @param message Error message.
- * @param lineOrStartPos If for a single position, the line number, or if for
- * a range, the inclusive start position of the error.
- * @param columnOrEndPos If for a single position, the column number, or if for
- * a range, the exclusive end position of the error.
- * @param source Source code of the broken file.
- * @param file Absolute path to the broken file.
- * @param plugin PostCSS plugin name, if error came from plugin.
- */
- constructor(
- message: string,
- lineOrStartPos?: number | CssSyntaxError.RangePosition,
- columnOrEndPos?: number | CssSyntaxError.RangePosition,
- source?: string,
- file?: string,
- plugin?: string
- )
-
- stack: string
-
- /**
- * Always equal to `'CssSyntaxError'`. You should always check error type
- * by `error.name === 'CssSyntaxError'`
- * instead of `error instanceof CssSyntaxError`,
- * because npm could have several PostCSS versions.
- *
- * ```js
- * if (error.name === 'CssSyntaxError') {
- * error //=> CssSyntaxError
- * }
- * ```
- */
- name: 'CssSyntaxError'
-
- /**
- * Error message.
- *
- * ```js
- * error.message //=> 'Unclosed block'
- * ```
- */
- reason: string
-
- /**
- * Full error text in the GNU error format
- * with plugin, file, line and column.
- *
- * ```js
- * error.message //=> 'a.css:1:1: Unclosed block'
- * ```
- */
- message: string
-
- /**
- * Absolute path to the broken file.
- *
- * ```js
- * error.file //=> 'a.sass'
- * error.input.file //=> 'a.css'
- * ```
- *
- * PostCSS will use the input source map to detect the original location.
- * If you need the position in the PostCSS input, use `error.input.file`.
- */
- file?: string
-
- /**
- * Source line of the error.
- *
- * ```js
- * error.line //=> 2
- * error.input.line //=> 4
- * ```
- *
- * PostCSS will use the input source map to detect the original location.
- * If you need the position in the PostCSS input, use `error.input.line`.
- */
- line?: number
-
- /**
- * Source column of the error.
- *
- * ```js
- * error.column //=> 1
- * error.input.column //=> 4
- * ```
- *
- * PostCSS will use the input source map to detect the original location.
- * If you need the position in the PostCSS input, use `error.input.column`.
- */
- column?: number
-
- /**
- * Source line of the error's end, exclusive. Provided if the error pertains
- * to a range.
- *
- * ```js
- * error.endLine //=> 3
- * error.input.endLine //=> 4
- * ```
- *
- * PostCSS will use the input source map to detect the original location.
- * If you need the position in the PostCSS input, use `error.input.endLine`.
- */
- endLine?: number
-
- /**
- * Source column of the error's end, exclusive. Provided if the error pertains
- * to a range.
- *
- * ```js
- * error.endColumn //=> 1
- * error.input.endColumn //=> 4
- * ```
- *
- * PostCSS will use the input source map to detect the original location.
- * If you need the position in the PostCSS input, use `error.input.endColumn`.
- */
- endColumn?: number
-
- /**
- * Source code of the broken file.
- *
- * ```js
- * error.source //=> 'a { b {} }'
- * error.input.source //=> 'a b { }'
- * ```
- */
- source?: string
-
- /**
- * Plugin name, if error came from plugin.
- *
- * ```js
- * error.plugin //=> 'postcss-vars'
- * ```
- */
- plugin?: string
-
- /**
- * Input object with PostCSS internal information
- * about input file. If input has source map
- * from previous tool, PostCSS will use origin
- * (for example, Sass) source. You can use this
- * object to get PostCSS input source.
- *
- * ```js
- * error.input.file //=> 'a.css'
- * error.file //=> 'a.sass'
- * ```
- */
- input?: FilePosition
-
- /**
- * Returns error position, message and source code of the broken part.
- *
- * ```js
- * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block
- * // > 1 | a {
- * // | ^"
- * ```
- *
- * @return Error position, message and source code.
- */
- toString(): string
-
- /**
- * Returns a few lines of CSS source that caused the error.
- *
- * If the CSS has an input source map without `sourceContent`,
- * this method will return an empty string.
- *
- * ```js
- * error.showSourceCode() //=> " 4 | }
- * // 5 | a {
- * // > 6 | bad
- * // | ^
- * // 7 | }
- * // 8 | b {"
- * ```
- *
- * @param color Whether arrow will be colored red by terminal
- * color codes. By default, PostCSS will detect
- * color support by `process.stdout.isTTY`
- * and `process.env.NODE_DISABLE_COLORS`.
- * @return Few lines of CSS source that caused the error.
- */
- showSourceCode(color?: boolean): string
-}
-
-declare class CssSyntaxError extends CssSyntaxError_ {}
-
-export = CssSyntaxError
diff --git a/node_modules/postcss/lib/css-syntax-error.js b/node_modules/postcss/lib/css-syntax-error.js
deleted file mode 100644
index d6b369b8..00000000
--- a/node_modules/postcss/lib/css-syntax-error.js
+++ /dev/null
@@ -1,100 +0,0 @@
-'use strict'
-
-let pico = require('picocolors')
-
-let terminalHighlight = require('./terminal-highlight')
-
-class CssSyntaxError extends Error {
- constructor(message, line, column, source, file, plugin) {
- super(message)
- this.name = 'CssSyntaxError'
- this.reason = message
-
- if (file) {
- this.file = file
- }
- if (source) {
- this.source = source
- }
- if (plugin) {
- this.plugin = plugin
- }
- if (typeof line !== 'undefined' && typeof column !== 'undefined') {
- if (typeof line === 'number') {
- this.line = line
- this.column = column
- } else {
- this.line = line.line
- this.column = line.column
- this.endLine = column.line
- this.endColumn = column.column
- }
- }
-
- this.setMessage()
-
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, CssSyntaxError)
- }
- }
-
- setMessage() {
- this.message = this.plugin ? this.plugin + ': ' : ''
- this.message += this.file ? this.file : ''
- if (typeof this.line !== 'undefined') {
- this.message += ':' + this.line + ':' + this.column
- }
- this.message += ': ' + this.reason
- }
-
- showSourceCode(color) {
- if (!this.source) return ''
-
- let css = this.source
- if (color == null) color = pico.isColorSupported
- if (terminalHighlight) {
- if (color) css = terminalHighlight(css)
- }
-
- let lines = css.split(/\r?\n/)
- let start = Math.max(this.line - 3, 0)
- let end = Math.min(this.line + 2, lines.length)
-
- let maxWidth = String(end).length
-
- let mark, aside
- if (color) {
- let { bold, red, gray } = pico.createColors(true)
- mark = text => bold(red(text))
- aside = text => gray(text)
- } else {
- mark = aside = str => str
- }
-
- return lines
- .slice(start, end)
- .map((line, index) => {
- let number = start + 1 + index
- let gutter = ' ' + (' ' + number).slice(-maxWidth) + ' | '
- if (number === this.line) {
- let spacing =
- aside(gutter.replace(/\d/g, ' ')) +
- line.slice(0, this.column - 1).replace(/[^\t]/g, ' ')
- return mark('>') + aside(gutter) + line + '\n ' + spacing + mark('^')
- }
- return ' ' + aside(gutter) + line
- })
- .join('\n')
- }
-
- toString() {
- let code = this.showSourceCode()
- if (code) {
- code = '\n\n' + code + '\n'
- }
- return this.name + ': ' + this.message + code
- }
-}
-
-module.exports = CssSyntaxError
-CssSyntaxError.default = CssSyntaxError
diff --git a/node_modules/postcss/lib/declaration.d.ts b/node_modules/postcss/lib/declaration.d.ts
deleted file mode 100644
index c9984a47..00000000
--- a/node_modules/postcss/lib/declaration.d.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-import Container from './container.js'
-import Node from './node.js'
-
-declare namespace Declaration {
- export interface DeclarationRaws extends Record {
- /**
- * The space symbols before the node. It also stores `*`
- * and `_` symbols before the declaration (IE hack).
- */
- before?: string
-
- /**
- * The symbols between the property and value for declarations.
- */
- between?: string
-
- /**
- * The content of the important statement, if it is not just `!important`.
- */
- important?: string
-
- /**
- * Declaration value with comments.
- */
- value?: {
- value: string
- raw: string
- }
- }
-
- export interface DeclarationProps {
- /** Name of the declaration. */
- prop: string
- /** Value of the declaration. */
- value: string
- /** Whether the declaration has an `!important` annotation. */
- important?: boolean
- /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
- raws?: DeclarationRaws
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Declaration_ as default }
-}
-
-/**
- * Represents a CSS declaration.
- *
- * ```js
- * Once (root, { Declaration }) {
- * let color = new Declaration({ prop: 'color', value: 'black' })
- * root.append(color)
- * }
- * ```
- *
- * ```js
- * const root = postcss.parse('a { color: black }')
- * const decl = root.first.first
- * decl.type //=> 'decl'
- * decl.toString() //=> ' color: black'
- * ```
- */
-declare class Declaration_ extends Node {
- type: 'decl'
- parent: Container | undefined
- raws: Declaration.DeclarationRaws
-
- /**
- * The declaration's property name.
- *
- * ```js
- * const root = postcss.parse('a { color: black }')
- * const decl = root.first.first
- * decl.prop //=> 'color'
- * ```
- */
- prop: string
-
- /**
- * The declaration’s value.
- *
- * This value will be cleaned of comments. If the source value contained
- * comments, those comments will be available in the `raws` property.
- * If you have not changed the value, the result of `decl.toString()`
- * will include the original raws value (comments and all).
- *
- * ```js
- * const root = postcss.parse('a { color: black }')
- * const decl = root.first.first
- * decl.value //=> 'black'
- * ```
- */
- value: string
-
- /**
- * `true` if the declaration has an `!important` annotation.
- *
- * ```js
- * const root = postcss.parse('a { color: black !important; color: red }')
- * root.first.first.important //=> true
- * root.first.last.important //=> undefined
- * ```
- */
- important: boolean
-
- /**
- * `true` if declaration is declaration of CSS Custom Property
- * or Sass variable.
- *
- * ```js
- * const root = postcss.parse(':root { --one: 1 }')
- * let one = root.first.first
- * one.variable //=> true
- * ```
- *
- * ```js
- * const root = postcss.parse('$one: 1')
- * let one = root.first
- * one.variable //=> true
- * ```
- */
- variable: boolean
-
- constructor(defaults?: Declaration.DeclarationProps)
- assign(overrides: object | Declaration.DeclarationProps): this
- clone(overrides?: Partial): this
- cloneBefore(overrides?: Partial): this
- cloneAfter(overrides?: Partial): this
-}
-
-declare class Declaration extends Declaration_ {}
-
-export = Declaration
diff --git a/node_modules/postcss/lib/declaration.js b/node_modules/postcss/lib/declaration.js
deleted file mode 100644
index a04bdec3..00000000
--- a/node_modules/postcss/lib/declaration.js
+++ /dev/null
@@ -1,24 +0,0 @@
-'use strict'
-
-let Node = require('./node')
-
-class Declaration extends Node {
- constructor(defaults) {
- if (
- defaults &&
- typeof defaults.value !== 'undefined' &&
- typeof defaults.value !== 'string'
- ) {
- defaults = { ...defaults, value: String(defaults.value) }
- }
- super(defaults)
- this.type = 'decl'
- }
-
- get variable() {
- return this.prop.startsWith('--') || this.prop[0] === '$'
- }
-}
-
-module.exports = Declaration
-Declaration.default = Declaration
diff --git a/node_modules/postcss/lib/document.d.ts b/node_modules/postcss/lib/document.d.ts
deleted file mode 100644
index 7afb3747..00000000
--- a/node_modules/postcss/lib/document.d.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import Container, { ContainerProps } from './container.js'
-import { ProcessOptions } from './postcss.js'
-import Result from './result.js'
-import Root from './root.js'
-
-declare namespace Document {
- export interface DocumentProps extends ContainerProps {
- nodes?: Root[]
-
- /**
- * Information to generate byte-to-byte equal node string as it was
- * in the origin input.
- *
- * Every parser saves its own properties.
- */
- raws?: Record
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Document_ as default }
-}
-
-/**
- * Represents a file and contains all its parsed nodes.
- *
- * **Experimental:** some aspects of this node could change within minor
- * or patch version releases.
- *
- * ```js
- * const document = htmlParser(
- * ''
- * )
- * document.type //=> 'document'
- * document.nodes.length //=> 2
- * ```
- */
-declare class Document_ extends Container {
- type: 'document'
- parent: undefined
-
- constructor(defaults?: Document.DocumentProps)
-
- /**
- * Returns a `Result` instance representing the document’s CSS roots.
- *
- * ```js
- * const root1 = postcss.parse(css1, { from: 'a.css' })
- * const root2 = postcss.parse(css2, { from: 'b.css' })
- * const document = postcss.document()
- * document.append(root1)
- * document.append(root2)
- * const result = document.toResult({ to: 'all.css', map: true })
- * ```
- *
- * @param opts Options.
- * @return Result with current document’s CSS.
- */
- toResult(options?: ProcessOptions): Result
-}
-
-declare class Document extends Document_ {}
-
-export = Document
diff --git a/node_modules/postcss/lib/document.js b/node_modules/postcss/lib/document.js
deleted file mode 100644
index 44689917..00000000
--- a/node_modules/postcss/lib/document.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict'
-
-let Container = require('./container')
-
-let LazyResult, Processor
-
-class Document extends Container {
- constructor(defaults) {
- // type needs to be passed to super, otherwise child roots won't be normalized correctly
- super({ type: 'document', ...defaults })
-
- if (!this.nodes) {
- this.nodes = []
- }
- }
-
- toResult(opts = {}) {
- let lazy = new LazyResult(new Processor(), this, opts)
-
- return lazy.stringify()
- }
-}
-
-Document.registerLazyResult = dependant => {
- LazyResult = dependant
-}
-
-Document.registerProcessor = dependant => {
- Processor = dependant
-}
-
-module.exports = Document
-Document.default = Document
diff --git a/node_modules/postcss/lib/fromJSON.d.ts b/node_modules/postcss/lib/fromJSON.d.ts
deleted file mode 100644
index e1deedbd..00000000
--- a/node_modules/postcss/lib/fromJSON.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { JSONHydrator } from './postcss.js'
-
-interface FromJSON extends JSONHydrator {
- default: FromJSON
-}
-
-declare const fromJSON: FromJSON
-
-export = fromJSON
diff --git a/node_modules/postcss/lib/fromJSON.js b/node_modules/postcss/lib/fromJSON.js
deleted file mode 100644
index 09f2b89a..00000000
--- a/node_modules/postcss/lib/fromJSON.js
+++ /dev/null
@@ -1,54 +0,0 @@
-'use strict'
-
-let Declaration = require('./declaration')
-let PreviousMap = require('./previous-map')
-let Comment = require('./comment')
-let AtRule = require('./at-rule')
-let Input = require('./input')
-let Root = require('./root')
-let Rule = require('./rule')
-
-function fromJSON(json, inputs) {
- if (Array.isArray(json)) return json.map(n => fromJSON(n))
-
- let { inputs: ownInputs, ...defaults } = json
- if (ownInputs) {
- inputs = []
- for (let input of ownInputs) {
- let inputHydrated = { ...input, __proto__: Input.prototype }
- if (inputHydrated.map) {
- inputHydrated.map = {
- ...inputHydrated.map,
- __proto__: PreviousMap.prototype
- }
- }
- inputs.push(inputHydrated)
- }
- }
- if (defaults.nodes) {
- defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))
- }
- if (defaults.source) {
- let { inputId, ...source } = defaults.source
- defaults.source = source
- if (inputId != null) {
- defaults.source.input = inputs[inputId]
- }
- }
- if (defaults.type === 'root') {
- return new Root(defaults)
- } else if (defaults.type === 'decl') {
- return new Declaration(defaults)
- } else if (defaults.type === 'rule') {
- return new Rule(defaults)
- } else if (defaults.type === 'comment') {
- return new Comment(defaults)
- } else if (defaults.type === 'atrule') {
- return new AtRule(defaults)
- } else {
- throw new Error('Unknown node type: ' + json.type)
- }
-}
-
-module.exports = fromJSON
-fromJSON.default = fromJSON
diff --git a/node_modules/postcss/lib/input.d.ts b/node_modules/postcss/lib/input.d.ts
deleted file mode 100644
index 73769433..00000000
--- a/node_modules/postcss/lib/input.d.ts
+++ /dev/null
@@ -1,194 +0,0 @@
-import { CssSyntaxError, ProcessOptions } from './postcss.js'
-import PreviousMap from './previous-map.js'
-
-declare namespace Input {
- export interface FilePosition {
- /**
- * URL for the source file.
- */
- url: string
-
- /**
- * Absolute path to the source file.
- */
- file?: string
-
- /**
- * Line of inclusive start position in source file.
- */
- line: number
-
- /**
- * Column of inclusive start position in source file.
- */
- column: number
-
- /**
- * Line of exclusive end position in source file.
- */
- endLine?: number
-
- /**
- * Column of exclusive end position in source file.
- */
- endColumn?: number
-
- /**
- * Source code.
- */
- source?: string
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Input_ as default }
-}
-
-/**
- * Represents the source CSS.
- *
- * ```js
- * const root = postcss.parse(css, { from: file })
- * const input = root.source.input
- * ```
- */
-declare class Input_ {
- /**
- * Input CSS source.
- *
- * ```js
- * const input = postcss.parse('a{}', { from: file }).input
- * input.css //=> "a{}"
- * ```
- */
- css: string
-
- /**
- * The input source map passed from a compilation step before PostCSS
- * (for example, from Sass compiler).
- *
- * ```js
- * root.source.input.map.consumer().sources //=> ['a.sass']
- * ```
- */
- map: PreviousMap
-
- /**
- * The absolute path to the CSS source file defined
- * with the `from` option.
- *
- * ```js
- * const root = postcss.parse(css, { from: 'a.css' })
- * root.source.input.file //=> '/home/ai/a.css'
- * ```
- */
- file?: string
-
- /**
- * The unique ID of the CSS source. It will be created if `from` option
- * is not provided (because PostCSS does not know the file path).
- *
- * ```js
- * const root = postcss.parse(css)
- * root.source.input.file //=> undefined
- * root.source.input.id //=> " "
- * ```
- */
- id?: string
-
- /**
- * The flag to indicate whether or not the source code has Unicode BOM.
- */
- hasBOM: boolean
-
- /**
- * @param css Input CSS source.
- * @param opts Process options.
- */
- constructor(css: string, opts?: ProcessOptions)
-
- /**
- * The CSS source identifier. Contains `Input#file` if the user
- * set the `from` option, or `Input#id` if they did not.
- *
- * ```js
- * const root = postcss.parse(css, { from: 'a.css' })
- * root.source.input.from //=> "/home/ai/a.css"
- *
- * const root = postcss.parse(css)
- * root.source.input.from //=> " "
- * ```
- */
- get from(): string
-
- /**
- * Reads the input source map and returns a symbol position
- * in the input source (e.g., in a Sass file that was compiled
- * to CSS before being passed to PostCSS). Optionally takes an
- * end position, exclusive.
- *
- * ```js
- * root.source.input.origin(1, 1) //=> { file: 'a.css', line: 3, column: 1 }
- * root.source.input.origin(1, 1, 1, 4)
- * //=> { file: 'a.css', line: 3, column: 1, endLine: 3, endColumn: 4 }
- * ```
- *
- * @param line Line for inclusive start position in input CSS.
- * @param column Column for inclusive start position in input CSS.
- * @param endLine Line for exclusive end position in input CSS.
- * @param endColumn Column for exclusive end position in input CSS.
- *
- * @return Position in input source.
- */
- origin(
- line: number,
- column: number,
- endLine?: number,
- endColumn?: number
- ): Input.FilePosition | false
-
- /**
- * Converts source offset to line and column.
- *
- * @param offset Source offset.
- */
- fromOffset(offset: number): { line: number; col: number } | null
-
- /**
- * Returns `CssSyntaxError` with information about the error and its position.
- */
- error(
- message: string,
- line: number,
- column: number,
- opts?: { plugin?: CssSyntaxError['plugin'] }
- ): CssSyntaxError
- error(
- message: string,
- offset: number,
- opts?: { plugin?: CssSyntaxError['plugin'] }
- ): CssSyntaxError
- error(
- message: string,
- start:
- | {
- offset: number
- }
- | {
- line: number
- column: number
- },
- end:
- | {
- offset: number
- }
- | {
- line: number
- column: number
- },
- opts?: { plugin?: CssSyntaxError['plugin'] }
- ): CssSyntaxError
-}
-
-declare class Input extends Input_ {}
-
-export = Input
diff --git a/node_modules/postcss/lib/input.js b/node_modules/postcss/lib/input.js
deleted file mode 100644
index a1c52c70..00000000
--- a/node_modules/postcss/lib/input.js
+++ /dev/null
@@ -1,248 +0,0 @@
-'use strict'
-
-let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
-let { fileURLToPath, pathToFileURL } = require('url')
-let { resolve, isAbsolute } = require('path')
-let { nanoid } = require('nanoid/non-secure')
-
-let terminalHighlight = require('./terminal-highlight')
-let CssSyntaxError = require('./css-syntax-error')
-let PreviousMap = require('./previous-map')
-
-let fromOffsetCache = Symbol('fromOffsetCache')
-
-let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
-let pathAvailable = Boolean(resolve && isAbsolute)
-
-class Input {
- constructor(css, opts = {}) {
- if (
- css === null ||
- typeof css === 'undefined' ||
- (typeof css === 'object' && !css.toString)
- ) {
- throw new Error(`PostCSS received ${css} instead of CSS string`)
- }
-
- this.css = css.toString()
-
- if (this.css[0] === '\uFEFF' || this.css[0] === '\uFFFE') {
- this.hasBOM = true
- this.css = this.css.slice(1)
- } else {
- this.hasBOM = false
- }
-
- if (opts.from) {
- if (
- !pathAvailable ||
- /^\w+:\/\//.test(opts.from) ||
- isAbsolute(opts.from)
- ) {
- this.file = opts.from
- } else {
- this.file = resolve(opts.from)
- }
- }
-
- if (pathAvailable && sourceMapAvailable) {
- let map = new PreviousMap(this.css, opts)
- if (map.text) {
- this.map = map
- let file = map.consumer().file
- if (!this.file && file) this.file = this.mapResolve(file)
- }
- }
-
- if (!this.file) {
- this.id = ' '
- }
- if (this.map) this.map.file = this.from
- }
-
- fromOffset(offset) {
- let lastLine, lineToIndex
- if (!this[fromOffsetCache]) {
- let lines = this.css.split('\n')
- lineToIndex = new Array(lines.length)
- let prevIndex = 0
-
- for (let i = 0, l = lines.length; i < l; i++) {
- lineToIndex[i] = prevIndex
- prevIndex += lines[i].length + 1
- }
-
- this[fromOffsetCache] = lineToIndex
- } else {
- lineToIndex = this[fromOffsetCache]
- }
- lastLine = lineToIndex[lineToIndex.length - 1]
-
- let min = 0
- if (offset >= lastLine) {
- min = lineToIndex.length - 1
- } else {
- let max = lineToIndex.length - 2
- let mid
- while (min < max) {
- mid = min + ((max - min) >> 1)
- if (offset < lineToIndex[mid]) {
- max = mid - 1
- } else if (offset >= lineToIndex[mid + 1]) {
- min = mid + 1
- } else {
- min = mid
- break
- }
- }
- }
- return {
- line: min + 1,
- col: offset - lineToIndex[min] + 1
- }
- }
-
- error(message, line, column, opts = {}) {
- let result, endLine, endColumn
-
- if (line && typeof line === 'object') {
- let start = line
- let end = column
- if (typeof start.offset === 'number') {
- let pos = this.fromOffset(start.offset)
- line = pos.line
- column = pos.col
- } else {
- line = start.line
- column = start.column
- }
- if (typeof end.offset === 'number') {
- let pos = this.fromOffset(end.offset)
- endLine = pos.line
- endColumn = pos.col
- } else {
- endLine = end.line
- endColumn = end.column
- }
- } else if (!column) {
- let pos = this.fromOffset(line)
- line = pos.line
- column = pos.col
- }
-
- let origin = this.origin(line, column, endLine, endColumn)
- if (origin) {
- result = new CssSyntaxError(
- message,
- origin.endLine === undefined
- ? origin.line
- : { line: origin.line, column: origin.column },
- origin.endLine === undefined
- ? origin.column
- : { line: origin.endLine, column: origin.endColumn },
- origin.source,
- origin.file,
- opts.plugin
- )
- } else {
- result = new CssSyntaxError(
- message,
- endLine === undefined ? line : { line, column },
- endLine === undefined ? column : { line: endLine, column: endColumn },
- this.css,
- this.file,
- opts.plugin
- )
- }
-
- result.input = { line, column, endLine, endColumn, source: this.css }
- if (this.file) {
- if (pathToFileURL) {
- result.input.url = pathToFileURL(this.file).toString()
- }
- result.input.file = this.file
- }
-
- return result
- }
-
- origin(line, column, endLine, endColumn) {
- if (!this.map) return false
- let consumer = this.map.consumer()
-
- let from = consumer.originalPositionFor({ line, column })
- if (!from.source) return false
-
- let to
- if (typeof endLine === 'number') {
- to = consumer.originalPositionFor({ line: endLine, column: endColumn })
- }
-
- let fromUrl
-
- if (isAbsolute(from.source)) {
- fromUrl = pathToFileURL(from.source)
- } else {
- fromUrl = new URL(
- from.source,
- this.map.consumer().sourceRoot || pathToFileURL(this.map.mapFile)
- )
- }
-
- let result = {
- url: fromUrl.toString(),
- line: from.line,
- column: from.column,
- endLine: to && to.line,
- endColumn: to && to.column
- }
-
- if (fromUrl.protocol === 'file:') {
- if (fileURLToPath) {
- result.file = fileURLToPath(fromUrl)
- } else {
- /* c8 ignore next 2 */
- throw new Error(`file: protocol is not available in this PostCSS build`)
- }
- }
-
- let source = consumer.sourceContentFor(from.source)
- if (source) result.source = source
-
- return result
- }
-
- mapResolve(file) {
- if (/^\w+:\/\//.test(file)) {
- return file
- }
- return resolve(this.map.consumer().sourceRoot || this.map.root || '.', file)
- }
-
- get from() {
- return this.file || this.id
- }
-
- toJSON() {
- let json = {}
- for (let name of ['hasBOM', 'css', 'file', 'id']) {
- if (this[name] != null) {
- json[name] = this[name]
- }
- }
- if (this.map) {
- json.map = { ...this.map }
- if (json.map.consumerCache) {
- json.map.consumerCache = undefined
- }
- }
- return json
- }
-}
-
-module.exports = Input
-Input.default = Input
-
-if (terminalHighlight && terminalHighlight.registerInput) {
- terminalHighlight.registerInput(Input)
-}
diff --git a/node_modules/postcss/lib/lazy-result.d.ts b/node_modules/postcss/lib/lazy-result.d.ts
deleted file mode 100644
index 089495c0..00000000
--- a/node_modules/postcss/lib/lazy-result.d.ts
+++ /dev/null
@@ -1,185 +0,0 @@
-import Result, { Message, ResultOptions } from './result.js'
-import { SourceMap } from './postcss.js'
-import Processor from './processor.js'
-import Warning from './warning.js'
-import Root from './root.js'
-
-declare namespace LazyResult {
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { LazyResult_ as default }
-}
-
-/**
- * A Promise proxy for the result of PostCSS transformations.
- *
- * A `LazyResult` instance is returned by `Processor#process`.
- *
- * ```js
- * const lazy = postcss([autoprefixer]).process(css)
- * ```
- */
-declare class LazyResult_ implements PromiseLike {
- /**
- * Processes input CSS through synchronous and asynchronous plugins
- * and calls `onFulfilled` with a Result instance. If a plugin throws
- * an error, the `onRejected` callback will be executed.
- *
- * It implements standard Promise API.
- *
- * ```js
- * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => {
- * console.log(result.css)
- * })
- * ```
- */
- then: Promise['then']
-
- /**
- * Processes input CSS through synchronous and asynchronous plugins
- * and calls onRejected for each error thrown in any plugin.
- *
- * It implements standard Promise API.
- *
- * ```js
- * postcss([autoprefixer]).process(css).then(result => {
- * console.log(result.css)
- * }).catch(error => {
- * console.error(error)
- * })
- * ```
- */
- catch: Promise['catch']
-
- /**
- * Processes input CSS through synchronous and asynchronous plugins
- * and calls onFinally on any error or when all plugins will finish work.
- *
- * It implements standard Promise API.
- *
- * ```js
- * postcss([autoprefixer]).process(css).finally(() => {
- * console.log('processing ended')
- * })
- * ```
- */
- finally: Promise['finally']
-
- /**
- * @param processor Processor used for this transformation.
- * @param css CSS to parse and transform.
- * @param opts Options from the `Processor#process` or `Root#toResult`.
- */
- constructor(processor: Processor, css: string, opts: ResultOptions)
-
- /**
- * Returns the default string description of an object.
- * Required to implement the Promise interface.
- */
- get [Symbol.toStringTag](): string
-
- /**
- * Returns a `Processor` instance, which will be used
- * for CSS transformations.
- */
- get processor(): Processor
-
- /**
- * Options from the `Processor#process` call.
- */
- get opts(): ResultOptions
-
- /**
- * Processes input CSS through synchronous plugins, converts `Root`
- * to a CSS string and returns `Result#css`.
- *
- * This property will only work with synchronous plugins.
- * If the processor contains any asynchronous plugins
- * it will throw an error.
- *
- * PostCSS runners should always use `LazyResult#then`.
- */
- get css(): string
-
- /**
- * An alias for the `css` property. Use it with syntaxes
- * that generate non-CSS output.
- *
- * This property will only work with synchronous plugins.
- * If the processor contains any asynchronous plugins
- * it will throw an error.
- *
- * PostCSS runners should always use `LazyResult#then`.
- */
- get content(): string
-
- /**
- * Processes input CSS through synchronous plugins
- * and returns `Result#map`.
- *
- * This property will only work with synchronous plugins.
- * If the processor contains any asynchronous plugins
- * it will throw an error.
- *
- * PostCSS runners should always use `LazyResult#then`.
- */
- get map(): SourceMap
-
- /**
- * Processes input CSS through synchronous plugins
- * and returns `Result#root`.
- *
- * This property will only work with synchronous plugins. If the processor
- * contains any asynchronous plugins it will throw an error.
- *
- * PostCSS runners should always use `LazyResult#then`.
- */
- get root(): Root
-
- /**
- * Processes input CSS through synchronous plugins
- * and returns `Result#messages`.
- *
- * This property will only work with synchronous plugins. If the processor
- * contains any asynchronous plugins it will throw an error.
- *
- * PostCSS runners should always use `LazyResult#then`.
- */
- get messages(): Message[]
-
- /**
- * Processes input CSS through synchronous plugins
- * and calls `Result#warnings`.
- *
- * @return Warnings from plugins.
- */
- warnings(): Warning[]
-
- /**
- * Alias for the `LazyResult#css` property.
- *
- * ```js
- * lazy + '' === lazy.css
- * ```
- *
- * @return Output CSS.
- */
- toString(): string
-
- /**
- * Run plugin in sync way and return `Result`.
- *
- * @return Result with output content.
- */
- sync(): Result
-
- /**
- * Run plugin in async way and return `Result`.
- *
- * @return Result with output content.
- */
- async(): Promise
-}
-
-declare class LazyResult extends LazyResult_ {}
-
-export = LazyResult
diff --git a/node_modules/postcss/lib/lazy-result.js b/node_modules/postcss/lib/lazy-result.js
deleted file mode 100644
index 584a95dc..00000000
--- a/node_modules/postcss/lib/lazy-result.js
+++ /dev/null
@@ -1,550 +0,0 @@
-'use strict'
-
-let { isClean, my } = require('./symbols')
-let MapGenerator = require('./map-generator')
-let stringify = require('./stringify')
-let Container = require('./container')
-let Document = require('./document')
-let warnOnce = require('./warn-once')
-let Result = require('./result')
-let parse = require('./parse')
-let Root = require('./root')
-
-const TYPE_TO_CLASS_NAME = {
- document: 'Document',
- root: 'Root',
- atrule: 'AtRule',
- rule: 'Rule',
- decl: 'Declaration',
- comment: 'Comment'
-}
-
-const PLUGIN_PROPS = {
- postcssPlugin: true,
- prepare: true,
- Once: true,
- Document: true,
- Root: true,
- Declaration: true,
- Rule: true,
- AtRule: true,
- Comment: true,
- DeclarationExit: true,
- RuleExit: true,
- AtRuleExit: true,
- CommentExit: true,
- RootExit: true,
- DocumentExit: true,
- OnceExit: true
-}
-
-const NOT_VISITORS = {
- postcssPlugin: true,
- prepare: true,
- Once: true
-}
-
-const CHILDREN = 0
-
-function isPromise(obj) {
- return typeof obj === 'object' && typeof obj.then === 'function'
-}
-
-function getEvents(node) {
- let key = false
- let type = TYPE_TO_CLASS_NAME[node.type]
- if (node.type === 'decl') {
- key = node.prop.toLowerCase()
- } else if (node.type === 'atrule') {
- key = node.name.toLowerCase()
- }
-
- if (key && node.append) {
- return [
- type,
- type + '-' + key,
- CHILDREN,
- type + 'Exit',
- type + 'Exit-' + key
- ]
- } else if (key) {
- return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]
- } else if (node.append) {
- return [type, CHILDREN, type + 'Exit']
- } else {
- return [type, type + 'Exit']
- }
-}
-
-function toStack(node) {
- let events
- if (node.type === 'document') {
- events = ['Document', CHILDREN, 'DocumentExit']
- } else if (node.type === 'root') {
- events = ['Root', CHILDREN, 'RootExit']
- } else {
- events = getEvents(node)
- }
-
- return {
- node,
- events,
- eventIndex: 0,
- visitors: [],
- visitorIndex: 0,
- iterator: 0
- }
-}
-
-function cleanMarks(node) {
- node[isClean] = false
- if (node.nodes) node.nodes.forEach(i => cleanMarks(i))
- return node
-}
-
-let postcss = {}
-
-class LazyResult {
- constructor(processor, css, opts) {
- this.stringified = false
- this.processed = false
-
- let root
- if (
- typeof css === 'object' &&
- css !== null &&
- (css.type === 'root' || css.type === 'document')
- ) {
- root = cleanMarks(css)
- } else if (css instanceof LazyResult || css instanceof Result) {
- root = cleanMarks(css.root)
- if (css.map) {
- if (typeof opts.map === 'undefined') opts.map = {}
- if (!opts.map.inline) opts.map.inline = false
- opts.map.prev = css.map
- }
- } else {
- let parser = parse
- if (opts.syntax) parser = opts.syntax.parse
- if (opts.parser) parser = opts.parser
- if (parser.parse) parser = parser.parse
-
- try {
- root = parser(css, opts)
- } catch (error) {
- this.processed = true
- this.error = error
- }
-
- if (root && !root[my]) {
- /* c8 ignore next 2 */
- Container.rebuild(root)
- }
- }
-
- this.result = new Result(processor, root, opts)
- this.helpers = { ...postcss, result: this.result, postcss }
- this.plugins = this.processor.plugins.map(plugin => {
- if (typeof plugin === 'object' && plugin.prepare) {
- return { ...plugin, ...plugin.prepare(this.result) }
- } else {
- return plugin
- }
- })
- }
-
- get [Symbol.toStringTag]() {
- return 'LazyResult'
- }
-
- get processor() {
- return this.result.processor
- }
-
- get opts() {
- return this.result.opts
- }
-
- get css() {
- return this.stringify().css
- }
-
- get content() {
- return this.stringify().content
- }
-
- get map() {
- return this.stringify().map
- }
-
- get root() {
- return this.sync().root
- }
-
- get messages() {
- return this.sync().messages
- }
-
- warnings() {
- return this.sync().warnings()
- }
-
- toString() {
- return this.css
- }
-
- then(onFulfilled, onRejected) {
- if (process.env.NODE_ENV !== 'production') {
- if (!('from' in this.opts)) {
- warnOnce(
- 'Without `from` option PostCSS could generate wrong source map ' +
- 'and will not find Browserslist config. Set it to CSS file path ' +
- 'or to `undefined` to prevent this warning.'
- )
- }
- }
- return this.async().then(onFulfilled, onRejected)
- }
-
- catch(onRejected) {
- return this.async().catch(onRejected)
- }
-
- finally(onFinally) {
- return this.async().then(onFinally, onFinally)
- }
-
- async() {
- if (this.error) return Promise.reject(this.error)
- if (this.processed) return Promise.resolve(this.result)
- if (!this.processing) {
- this.processing = this.runAsync()
- }
- return this.processing
- }
-
- sync() {
- if (this.error) throw this.error
- if (this.processed) return this.result
- this.processed = true
-
- if (this.processing) {
- throw this.getAsyncError()
- }
-
- for (let plugin of this.plugins) {
- let promise = this.runOnRoot(plugin)
- if (isPromise(promise)) {
- throw this.getAsyncError()
- }
- }
-
- this.prepareVisitors()
- if (this.hasListener) {
- let root = this.result.root
- while (!root[isClean]) {
- root[isClean] = true
- this.walkSync(root)
- }
- if (this.listeners.OnceExit) {
- if (root.type === 'document') {
- for (let subRoot of root.nodes) {
- this.visitSync(this.listeners.OnceExit, subRoot)
- }
- } else {
- this.visitSync(this.listeners.OnceExit, root)
- }
- }
- }
-
- return this.result
- }
-
- stringify() {
- if (this.error) throw this.error
- if (this.stringified) return this.result
- this.stringified = true
-
- this.sync()
-
- let opts = this.result.opts
- let str = stringify
- if (opts.syntax) str = opts.syntax.stringify
- if (opts.stringifier) str = opts.stringifier
- if (str.stringify) str = str.stringify
-
- let map = new MapGenerator(str, this.result.root, this.result.opts)
- let data = map.generate()
- this.result.css = data[0]
- this.result.map = data[1]
-
- return this.result
- }
-
- walkSync(node) {
- node[isClean] = true
- let events = getEvents(node)
- for (let event of events) {
- if (event === CHILDREN) {
- if (node.nodes) {
- node.each(child => {
- if (!child[isClean]) this.walkSync(child)
- })
- }
- } else {
- let visitors = this.listeners[event]
- if (visitors) {
- if (this.visitSync(visitors, node.toProxy())) return
- }
- }
- }
- }
-
- visitSync(visitors, node) {
- for (let [plugin, visitor] of visitors) {
- this.result.lastPlugin = plugin
- let promise
- try {
- promise = visitor(node, this.helpers)
- } catch (e) {
- throw this.handleError(e, node.proxyOf)
- }
- if (node.type !== 'root' && node.type !== 'document' && !node.parent) {
- return true
- }
- if (isPromise(promise)) {
- throw this.getAsyncError()
- }
- }
- }
-
- runOnRoot(plugin) {
- this.result.lastPlugin = plugin
- try {
- if (typeof plugin === 'object' && plugin.Once) {
- if (this.result.root.type === 'document') {
- let roots = this.result.root.nodes.map(root =>
- plugin.Once(root, this.helpers)
- )
-
- if (isPromise(roots[0])) {
- return Promise.all(roots)
- }
-
- return roots
- }
-
- return plugin.Once(this.result.root, this.helpers)
- } else if (typeof plugin === 'function') {
- return plugin(this.result.root, this.result)
- }
- } catch (error) {
- throw this.handleError(error)
- }
- }
-
- getAsyncError() {
- throw new Error('Use process(css).then(cb) to work with async plugins')
- }
-
- handleError(error, node) {
- let plugin = this.result.lastPlugin
- try {
- if (node) node.addToError(error)
- this.error = error
- if (error.name === 'CssSyntaxError' && !error.plugin) {
- error.plugin = plugin.postcssPlugin
- error.setMessage()
- } else if (plugin.postcssVersion) {
- if (process.env.NODE_ENV !== 'production') {
- let pluginName = plugin.postcssPlugin
- let pluginVer = plugin.postcssVersion
- let runtimeVer = this.result.processor.version
- let a = pluginVer.split('.')
- let b = runtimeVer.split('.')
-
- if (a[0] !== b[0] || parseInt(a[1]) > parseInt(b[1])) {
- // eslint-disable-next-line no-console
- console.error(
- 'Unknown error from PostCSS plugin. Your current PostCSS ' +
- 'version is ' +
- runtimeVer +
- ', but ' +
- pluginName +
- ' uses ' +
- pluginVer +
- '. Perhaps this is the source of the error below.'
- )
- }
- }
- }
- } catch (err) {
- /* c8 ignore next 3 */
- // eslint-disable-next-line no-console
- if (console && console.error) console.error(err)
- }
- return error
- }
-
- async runAsync() {
- this.plugin = 0
- for (let i = 0; i < this.plugins.length; i++) {
- let plugin = this.plugins[i]
- let promise = this.runOnRoot(plugin)
- if (isPromise(promise)) {
- try {
- await promise
- } catch (error) {
- throw this.handleError(error)
- }
- }
- }
-
- this.prepareVisitors()
- if (this.hasListener) {
- let root = this.result.root
- while (!root[isClean]) {
- root[isClean] = true
- let stack = [toStack(root)]
- while (stack.length > 0) {
- let promise = this.visitTick(stack)
- if (isPromise(promise)) {
- try {
- await promise
- } catch (e) {
- let node = stack[stack.length - 1].node
- throw this.handleError(e, node)
- }
- }
- }
- }
-
- if (this.listeners.OnceExit) {
- for (let [plugin, visitor] of this.listeners.OnceExit) {
- this.result.lastPlugin = plugin
- try {
- if (root.type === 'document') {
- let roots = root.nodes.map(subRoot =>
- visitor(subRoot, this.helpers)
- )
-
- await Promise.all(roots)
- } else {
- await visitor(root, this.helpers)
- }
- } catch (e) {
- throw this.handleError(e)
- }
- }
- }
- }
-
- this.processed = true
- return this.stringify()
- }
-
- prepareVisitors() {
- this.listeners = {}
- let add = (plugin, type, cb) => {
- if (!this.listeners[type]) this.listeners[type] = []
- this.listeners[type].push([plugin, cb])
- }
- for (let plugin of this.plugins) {
- if (typeof plugin === 'object') {
- for (let event in plugin) {
- if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {
- throw new Error(
- `Unknown event ${event} in ${plugin.postcssPlugin}. ` +
- `Try to update PostCSS (${this.processor.version} now).`
- )
- }
- if (!NOT_VISITORS[event]) {
- if (typeof plugin[event] === 'object') {
- for (let filter in plugin[event]) {
- if (filter === '*') {
- add(plugin, event, plugin[event][filter])
- } else {
- add(
- plugin,
- event + '-' + filter.toLowerCase(),
- plugin[event][filter]
- )
- }
- }
- } else if (typeof plugin[event] === 'function') {
- add(plugin, event, plugin[event])
- }
- }
- }
- }
- }
- this.hasListener = Object.keys(this.listeners).length > 0
- }
-
- visitTick(stack) {
- let visit = stack[stack.length - 1]
- let { node, visitors } = visit
-
- if (node.type !== 'root' && node.type !== 'document' && !node.parent) {
- stack.pop()
- return
- }
-
- if (visitors.length > 0 && visit.visitorIndex < visitors.length) {
- let [plugin, visitor] = visitors[visit.visitorIndex]
- visit.visitorIndex += 1
- if (visit.visitorIndex === visitors.length) {
- visit.visitors = []
- visit.visitorIndex = 0
- }
- this.result.lastPlugin = plugin
- try {
- return visitor(node.toProxy(), this.helpers)
- } catch (e) {
- throw this.handleError(e, node)
- }
- }
-
- if (visit.iterator !== 0) {
- let iterator = visit.iterator
- let child
- while ((child = node.nodes[node.indexes[iterator]])) {
- node.indexes[iterator] += 1
- if (!child[isClean]) {
- child[isClean] = true
- stack.push(toStack(child))
- return
- }
- }
- visit.iterator = 0
- delete node.indexes[iterator]
- }
-
- let events = visit.events
- while (visit.eventIndex < events.length) {
- let event = events[visit.eventIndex]
- visit.eventIndex += 1
- if (event === CHILDREN) {
- if (node.nodes && node.nodes.length) {
- node[isClean] = true
- visit.iterator = node.getIterator()
- }
- return
- } else if (this.listeners[event]) {
- visit.visitors = this.listeners[event]
- return
- }
- }
- stack.pop()
- }
-}
-
-LazyResult.registerPostcss = dependant => {
- postcss = dependant
-}
-
-module.exports = LazyResult
-LazyResult.default = LazyResult
-
-Root.registerLazyResult(LazyResult)
-Document.registerLazyResult(LazyResult)
diff --git a/node_modules/postcss/lib/list.d.ts b/node_modules/postcss/lib/list.d.ts
deleted file mode 100644
index 6a56cad6..00000000
--- a/node_modules/postcss/lib/list.d.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-declare namespace list {
- type List = {
- default: List
-
- /**
- * Safely splits values.
- *
- * ```js
- * Once (root, { list }) {
- * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)']
- * }
- * ```
- *
- * @param string separated values.
- * @param separators array of separators.
- * @param last boolean indicator.
- * @return Split values.
- */
- split(string: string, separators: string[], last: boolean): string[]
-
- /**
- * Safely splits space-separated values (such as those for `background`,
- * `border-radius`, and other shorthand properties).
- *
- * ```js
- * Once (root, { list }) {
- * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']
- * }
- * ```
- *
- * @param str Space-separated values.
- * @return Split values.
- */
- space(str: string): string[]
-
- /**
- * Safely splits comma-separated values (such as those for `transition-*`
- * and `background` properties).
- *
- * ```js
- * Once (root, { list }) {
- * list.comma('black, linear-gradient(white, black)')
- * //=> ['black', 'linear-gradient(white, black)']
- * }
- * ```
- *
- * @param str Comma-separated values.
- * @return Split values.
- */
- comma(str: string): string[]
- }
-}
-
-// eslint-disable-next-line @typescript-eslint/no-redeclare
-declare const list: list.List
-
-export = list
diff --git a/node_modules/postcss/lib/list.js b/node_modules/postcss/lib/list.js
deleted file mode 100644
index c3f9646c..00000000
--- a/node_modules/postcss/lib/list.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict'
-
-let list = {
- split(string, separators, last) {
- let array = []
- let current = ''
- let split = false
-
- let func = 0
- let inQuote = false
- let prevQuote = ''
- let escape = false
-
- for (let letter of string) {
- if (escape) {
- escape = false
- } else if (letter === '\\') {
- escape = true
- } else if (inQuote) {
- if (letter === prevQuote) {
- inQuote = false
- }
- } else if (letter === '"' || letter === "'") {
- inQuote = true
- prevQuote = letter
- } else if (letter === '(') {
- func += 1
- } else if (letter === ')') {
- if (func > 0) func -= 1
- } else if (func === 0) {
- if (separators.includes(letter)) split = true
- }
-
- if (split) {
- if (current !== '') array.push(current.trim())
- current = ''
- split = false
- } else {
- current += letter
- }
- }
-
- if (last || current !== '') array.push(current.trim())
- return array
- },
-
- space(string) {
- let spaces = [' ', '\n', '\t']
- return list.split(string, spaces)
- },
-
- comma(string) {
- return list.split(string, [','], true)
- }
-}
-
-module.exports = list
-list.default = list
diff --git a/node_modules/postcss/lib/map-generator.js b/node_modules/postcss/lib/map-generator.js
deleted file mode 100644
index a1ea65e1..00000000
--- a/node_modules/postcss/lib/map-generator.js
+++ /dev/null
@@ -1,338 +0,0 @@
-'use strict'
-
-let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
-let { dirname, resolve, relative, sep } = require('path')
-let { pathToFileURL } = require('url')
-
-let Input = require('./input')
-
-let sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator)
-let pathAvailable = Boolean(dirname && resolve && relative && sep)
-
-class MapGenerator {
- constructor(stringify, root, opts, cssString) {
- this.stringify = stringify
- this.mapOpts = opts.map || {}
- this.root = root
- this.opts = opts
- this.css = cssString
- this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute
- }
-
- isMap() {
- if (typeof this.opts.map !== 'undefined') {
- return !!this.opts.map
- }
- return this.previous().length > 0
- }
-
- previous() {
- if (!this.previousMaps) {
- this.previousMaps = []
- if (this.root) {
- this.root.walk(node => {
- if (node.source && node.source.input.map) {
- let map = node.source.input.map
- if (!this.previousMaps.includes(map)) {
- this.previousMaps.push(map)
- }
- }
- })
- } else {
- let input = new Input(this.css, this.opts)
- if (input.map) this.previousMaps.push(input.map)
- }
- }
-
- return this.previousMaps
- }
-
- isInline() {
- if (typeof this.mapOpts.inline !== 'undefined') {
- return this.mapOpts.inline
- }
-
- let annotation = this.mapOpts.annotation
- if (typeof annotation !== 'undefined' && annotation !== true) {
- return false
- }
-
- if (this.previous().length) {
- return this.previous().some(i => i.inline)
- }
- return true
- }
-
- isSourcesContent() {
- if (typeof this.mapOpts.sourcesContent !== 'undefined') {
- return this.mapOpts.sourcesContent
- }
- if (this.previous().length) {
- return this.previous().some(i => i.withContent())
- }
- return true
- }
-
- clearAnnotation() {
- if (this.mapOpts.annotation === false) return
-
- if (this.root) {
- let node
- for (let i = this.root.nodes.length - 1; i >= 0; i--) {
- node = this.root.nodes[i]
- if (node.type !== 'comment') continue
- if (node.text.indexOf('# sourceMappingURL=') === 0) {
- this.root.removeChild(i)
- }
- }
- } else if (this.css) {
- this.css = this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm, '')
- }
- }
-
- setSourcesContent() {
- let already = {}
- if (this.root) {
- this.root.walk(node => {
- if (node.source) {
- let from = node.source.input.from
- if (from && !already[from]) {
- already[from] = true
- let fromUrl = this.usesFileUrls
- ? this.toFileUrl(from)
- : this.toUrl(this.path(from))
- this.map.setSourceContent(fromUrl, node.source.input.css)
- }
- }
- })
- } else if (this.css) {
- let from = this.opts.from
- ? this.toUrl(this.path(this.opts.from))
- : ''
- this.map.setSourceContent(from, this.css)
- }
- }
-
- applyPrevMaps() {
- for (let prev of this.previous()) {
- let from = this.toUrl(this.path(prev.file))
- let root = prev.root || dirname(prev.file)
- let map
-
- if (this.mapOpts.sourcesContent === false) {
- map = new SourceMapConsumer(prev.text)
- if (map.sourcesContent) {
- map.sourcesContent = map.sourcesContent.map(() => null)
- }
- } else {
- map = prev.consumer()
- }
-
- this.map.applySourceMap(map, from, this.toUrl(this.path(root)))
- }
- }
-
- isAnnotation() {
- if (this.isInline()) {
- return true
- }
- if (typeof this.mapOpts.annotation !== 'undefined') {
- return this.mapOpts.annotation
- }
- if (this.previous().length) {
- return this.previous().some(i => i.annotation)
- }
- return true
- }
-
- toBase64(str) {
- if (Buffer) {
- return Buffer.from(str).toString('base64')
- } else {
- return window.btoa(unescape(encodeURIComponent(str)))
- }
- }
-
- addAnnotation() {
- let content
-
- if (this.isInline()) {
- content =
- 'data:application/json;base64,' + this.toBase64(this.map.toString())
- } else if (typeof this.mapOpts.annotation === 'string') {
- content = this.mapOpts.annotation
- } else if (typeof this.mapOpts.annotation === 'function') {
- content = this.mapOpts.annotation(this.opts.to, this.root)
- } else {
- content = this.outputFile() + '.map'
- }
- let eol = '\n'
- if (this.css.includes('\r\n')) eol = '\r\n'
-
- this.css += eol + '/*# sourceMappingURL=' + content + ' */'
- }
-
- outputFile() {
- if (this.opts.to) {
- return this.path(this.opts.to)
- } else if (this.opts.from) {
- return this.path(this.opts.from)
- } else {
- return 'to.css'
- }
- }
-
- generateMap() {
- if (this.root) {
- this.generateString()
- } else if (this.previous().length === 1) {
- let prev = this.previous()[0].consumer()
- prev.file = this.outputFile()
- this.map = SourceMapGenerator.fromSourceMap(prev)
- } else {
- this.map = new SourceMapGenerator({ file: this.outputFile() })
- this.map.addMapping({
- source: this.opts.from
- ? this.toUrl(this.path(this.opts.from))
- : '',
- generated: { line: 1, column: 0 },
- original: { line: 1, column: 0 }
- })
- }
-
- if (this.isSourcesContent()) this.setSourcesContent()
- if (this.root && this.previous().length > 0) this.applyPrevMaps()
- if (this.isAnnotation()) this.addAnnotation()
-
- if (this.isInline()) {
- return [this.css]
- } else {
- return [this.css, this.map]
- }
- }
-
- path(file) {
- if (file.indexOf('<') === 0) return file
- if (/^\w+:\/\//.test(file)) return file
- if (this.mapOpts.absolute) return file
-
- let from = this.opts.to ? dirname(this.opts.to) : '.'
-
- if (typeof this.mapOpts.annotation === 'string') {
- from = dirname(resolve(from, this.mapOpts.annotation))
- }
-
- file = relative(from, file)
- return file
- }
-
- toUrl(path) {
- if (sep === '\\') {
- path = path.replace(/\\/g, '/')
- }
- return encodeURI(path).replace(/[#?]/g, encodeURIComponent)
- }
-
- toFileUrl(path) {
- if (pathToFileURL) {
- return pathToFileURL(path).toString()
- } else {
- throw new Error(
- '`map.absolute` option is not available in this PostCSS build'
- )
- }
- }
-
- sourcePath(node) {
- if (this.mapOpts.from) {
- return this.toUrl(this.mapOpts.from)
- } else if (this.usesFileUrls) {
- return this.toFileUrl(node.source.input.from)
- } else {
- return this.toUrl(this.path(node.source.input.from))
- }
- }
-
- generateString() {
- this.css = ''
- this.map = new SourceMapGenerator({ file: this.outputFile() })
-
- let line = 1
- let column = 1
-
- let noSource = ''
- let mapping = {
- source: '',
- generated: { line: 0, column: 0 },
- original: { line: 0, column: 0 }
- }
-
- let lines, last
- this.stringify(this.root, (str, node, type) => {
- this.css += str
-
- if (node && type !== 'end') {
- mapping.generated.line = line
- mapping.generated.column = column - 1
- if (node.source && node.source.start) {
- mapping.source = this.sourcePath(node)
- mapping.original.line = node.source.start.line
- mapping.original.column = node.source.start.column - 1
- this.map.addMapping(mapping)
- } else {
- mapping.source = noSource
- mapping.original.line = 1
- mapping.original.column = 0
- this.map.addMapping(mapping)
- }
- }
-
- lines = str.match(/\n/g)
- if (lines) {
- line += lines.length
- last = str.lastIndexOf('\n')
- column = str.length - last
- } else {
- column += str.length
- }
-
- if (node && type !== 'start') {
- let p = node.parent || { raws: {} }
- let childless =
- node.type === 'decl' || (node.type === 'atrule' && !node.nodes)
- if (!childless || node !== p.last || p.raws.semicolon) {
- if (node.source && node.source.end) {
- mapping.source = this.sourcePath(node)
- mapping.original.line = node.source.end.line
- mapping.original.column = node.source.end.column - 1
- mapping.generated.line = line
- mapping.generated.column = column - 2
- this.map.addMapping(mapping)
- } else {
- mapping.source = noSource
- mapping.original.line = 1
- mapping.original.column = 0
- mapping.generated.line = line
- mapping.generated.column = column - 1
- this.map.addMapping(mapping)
- }
- }
- }
- })
- }
-
- generate() {
- this.clearAnnotation()
- if (pathAvailable && sourceMapAvailable && this.isMap()) {
- return this.generateMap()
- } else {
- let result = ''
- this.stringify(this.root, i => {
- result += i
- })
- return [result]
- }
- }
-}
-
-module.exports = MapGenerator
diff --git a/node_modules/postcss/lib/no-work-result.d.ts b/node_modules/postcss/lib/no-work-result.d.ts
deleted file mode 100644
index dd150c64..00000000
--- a/node_modules/postcss/lib/no-work-result.d.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import Result, { Message, ResultOptions } from './result.js'
-import { SourceMap } from './postcss.js'
-import Processor from './processor.js'
-import Warning from './warning.js'
-import Root from './root.js'
-import LazyResult from './lazy-result.js'
-
-declare namespace NoWorkResult {
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { NoWorkResult_ as default }
-}
-
-/**
- * A Promise proxy for the result of PostCSS transformations.
- * This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root`
- * are accessed. See the example below for details.
- * A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined.
- *
- * ```js
- * const noWorkResult = postcss().process(css) // No plugins are defined.
- * // CSS is not parsed
- * let root = noWorkResult.root // now css is parsed because we accessed the root
- * ```
- */
-declare class NoWorkResult_ implements LazyResult {
- then: Promise['then']
- catch: Promise['catch']
- finally: Promise['finally']
- constructor(processor: Processor, css: string, opts: ResultOptions)
- get [Symbol.toStringTag](): string
- get processor(): Processor
- get opts(): ResultOptions
- get css(): string
- get content(): string
- get map(): SourceMap
- get root(): Root
- get messages(): Message[]
- warnings(): Warning[]
- toString(): string
- sync(): Result
- async(): Promise
-}
-
-declare class NoWorkResult extends NoWorkResult_ {}
-
-export = NoWorkResult
diff --git a/node_modules/postcss/lib/no-work-result.js b/node_modules/postcss/lib/no-work-result.js
deleted file mode 100644
index 8bab6f5a..00000000
--- a/node_modules/postcss/lib/no-work-result.js
+++ /dev/null
@@ -1,135 +0,0 @@
-'use strict'
-
-let MapGenerator = require('./map-generator')
-let stringify = require('./stringify')
-let warnOnce = require('./warn-once')
-let parse = require('./parse')
-const Result = require('./result')
-
-class NoWorkResult {
- constructor(processor, css, opts) {
- css = css.toString()
- this.stringified = false
-
- this._processor = processor
- this._css = css
- this._opts = opts
- this._map = undefined
- let root
-
- let str = stringify
- this.result = new Result(this._processor, root, this._opts)
- this.result.css = css
-
- let self = this
- Object.defineProperty(this.result, 'root', {
- get() {
- return self.root
- }
- })
-
- let map = new MapGenerator(str, root, this._opts, css)
- if (map.isMap()) {
- let [generatedCSS, generatedMap] = map.generate()
- if (generatedCSS) {
- this.result.css = generatedCSS
- }
- if (generatedMap) {
- this.result.map = generatedMap
- }
- }
- }
-
- get [Symbol.toStringTag]() {
- return 'NoWorkResult'
- }
-
- get processor() {
- return this.result.processor
- }
-
- get opts() {
- return this.result.opts
- }
-
- get css() {
- return this.result.css
- }
-
- get content() {
- return this.result.css
- }
-
- get map() {
- return this.result.map
- }
-
- get root() {
- if (this._root) {
- return this._root
- }
-
- let root
- let parser = parse
-
- try {
- root = parser(this._css, this._opts)
- } catch (error) {
- this.error = error
- }
-
- if (this.error) {
- throw this.error
- } else {
- this._root = root
- return root
- }
- }
-
- get messages() {
- return []
- }
-
- warnings() {
- return []
- }
-
- toString() {
- return this._css
- }
-
- then(onFulfilled, onRejected) {
- if (process.env.NODE_ENV !== 'production') {
- if (!('from' in this._opts)) {
- warnOnce(
- 'Without `from` option PostCSS could generate wrong source map ' +
- 'and will not find Browserslist config. Set it to CSS file path ' +
- 'or to `undefined` to prevent this warning.'
- )
- }
- }
-
- return this.async().then(onFulfilled, onRejected)
- }
-
- catch(onRejected) {
- return this.async().catch(onRejected)
- }
-
- finally(onFinally) {
- return this.async().then(onFinally, onFinally)
- }
-
- async() {
- if (this.error) return Promise.reject(this.error)
- return Promise.resolve(this.result)
- }
-
- sync() {
- if (this.error) throw this.error
- return this.result
- }
-}
-
-module.exports = NoWorkResult
-NoWorkResult.default = NoWorkResult
diff --git a/node_modules/postcss/lib/node.d.ts b/node_modules/postcss/lib/node.d.ts
deleted file mode 100644
index 00f62b77..00000000
--- a/node_modules/postcss/lib/node.d.ts
+++ /dev/null
@@ -1,489 +0,0 @@
-import Declaration, { DeclarationProps } from './declaration.js'
-import Comment, { CommentProps } from './comment.js'
-import { Stringifier, Syntax } from './postcss.js'
-import AtRule = require('./at-rule.js')
-import { AtRuleProps } from './at-rule.js'
-import Rule, { RuleProps } from './rule.js'
-import Warning, { WarningOptions } from './warning.js'
-import CssSyntaxError from './css-syntax-error.js'
-import Result from './result.js'
-import Input from './input.js'
-import Root from './root.js'
-import Document from './document.js'
-import Container from './container.js'
-
-declare namespace Node {
- export type ChildNode = AtRule.default | Rule | Declaration | Comment
-
- export type AnyNode = AtRule.default | Rule | Declaration | Comment | Root | Document
-
- export type ChildProps =
- | AtRuleProps
- | RuleProps
- | DeclarationProps
- | CommentProps
-
- export interface Position {
- /**
- * Source offset in file. It starts from 0.
- */
- offset: number
-
- /**
- * Source line in file. In contrast to `offset` it starts from 1.
- */
- column: number
-
- /**
- * Source column in file.
- */
- line: number
- }
-
- export interface Range {
- /**
- * Start position, inclusive.
- */
- start: Position
-
- /**
- * End position, exclusive.
- */
- end: Position
- }
-
- export interface Source {
- /**
- * The file source of the node.
- */
- input: Input
- /**
- * The inclusive starting position of the node’s source.
- */
- start?: Position
- /**
- * The inclusive ending position of the node's source.
- */
- end?: Position
- }
-
- export interface NodeProps {
- source?: Source
- }
-
- export interface NodeErrorOptions {
- /**
- * Plugin name that created this error. PostCSS will set it automatically.
- */
- plugin?: string
- /**
- * A word inside a node's string, that should be highlighted as source
- * of error.
- */
- word?: string
- /**
- * An index inside a node's string that should be highlighted as source
- * of error.
- */
- index?: number
- /**
- * An ending index inside a node's string that should be highlighted as
- * source of error.
- */
- endIndex?: number
- }
-
- // eslint-disable-next-line @typescript-eslint/no-shadow
- class Node extends Node_ {}
- export { Node as default }
-}
-
-/**
- * All node classes inherit the following common methods.
- *
- * You should not extend this classes to create AST for selector or value
- * parser.
- */
-declare abstract class Node_ {
- /**
- * tring representing the node’s type. Possible values are `root`, `atrule`,
- * `rule`, `decl`, or `comment`.
- *
- * ```js
- * new Declaration({ prop: 'color', value: 'black' }).type //=> 'decl'
- * ```
- */
- type: string
-
- /**
- * The node’s parent node.
- *
- * ```js
- * root.nodes[0].parent === root
- * ```
- */
- parent: Document | Container | undefined
-
- /**
- * The input source of the node.
- *
- * The property is used in source map generation.
- *
- * If you create a node manually (e.g., with `postcss.decl()`),
- * that node will not have a `source` property and will be absent
- * from the source map. For this reason, the plugin developer should
- * consider cloning nodes to create new ones (in which case the new node’s
- * source will reference the original, cloned node) or setting
- * the `source` property manually.
- *
- * ```js
- * decl.source.input.from //=> '/home/ai/a.sass'
- * decl.source.start //=> { line: 10, column: 2 }
- * decl.source.end //=> { line: 10, column: 12 }
- * ```
- *
- * ```js
- * // Bad
- * const prefixed = postcss.decl({
- * prop: '-moz-' + decl.prop,
- * value: decl.value
- * })
- *
- * // Good
- * const prefixed = decl.clone({ prop: '-moz-' + decl.prop })
- * ```
- *
- * ```js
- * if (atrule.name === 'add-link') {
- * const rule = postcss.rule({ selector: 'a', source: atrule.source })
- * atrule.parent.insertBefore(atrule, rule)
- * }
- * ```
- */
- source?: Node.Source
-
- /**
- * Information to generate byte-to-byte equal node string as it was
- * in the origin input.
- *
- * Every parser saves its own properties,
- * but the default CSS parser uses:
- *
- * * `before`: the space symbols before the node. It also stores `*`
- * and `_` symbols before the declaration (IE hack).
- * * `after`: the space symbols after the last child of the node
- * to the end of the node.
- * * `between`: the symbols between the property and value
- * for declarations, selector and `{` for rules, or last parameter
- * and `{` for at-rules.
- * * `semicolon`: contains true if the last child has
- * an (optional) semicolon.
- * * `afterName`: the space between the at-rule name and its parameters.
- * * `left`: the space symbols between `/*` and the comment’s text.
- * * `right`: the space symbols between the comment’s text
- * and */
.
- * * `important`: the content of the important statement,
- * if it is not just `!important`.
- *
- * PostCSS cleans selectors, declaration values and at-rule parameters
- * from comments and extra spaces, but it stores origin content in raws
- * properties. As such, if you don’t change a declaration’s value,
- * PostCSS will use the raw value with comments.
- *
- * ```js
- * const root = postcss.parse('a {\n color:black\n}')
- * root.first.first.raws //=> { before: '\n ', between: ':' }
- * ```
- */
- raws: any
-
- /**
- * @param defaults Value for node properties.
- */
- constructor(defaults?: object)
-
- /**
- * Returns a `CssSyntaxError` instance containing the original position
- * of the node in the source, showing line and column numbers and also
- * a small excerpt to facilitate debugging.
- *
- * If present, an input source map will be used to get the original position
- * of the source, even from a previous compilation step
- * (e.g., from Sass compilation).
- *
- * This method produces very useful error messages.
- *
- * ```js
- * if (!variables[name]) {
- * throw decl.error(`Unknown variable ${name}`, { word: name })
- * // CssSyntaxError: postcss-vars:a.sass:4:3: Unknown variable $black
- * // color: $black
- * // a
- * // ^
- * // background: white
- * }
- * ```
- *
- * @param message Error description.
- * @param opts Options.
- *
- * @return Error object to throw it.
- */
- error(message: string, options?: Node.NodeErrorOptions): CssSyntaxError
-
- /**
- * This method is provided as a convenience wrapper for `Result#warn`.
- *
- * ```js
- * Declaration: {
- * bad: (decl, { result }) => {
- * decl.warn(result, 'Deprecated property bad')
- * }
- * }
- * ```
- *
- * @param result The `Result` instance that will receive the warning.
- * @param text Warning message.
- * @param opts Warning Options.
- *
- * @return Created warning object.
- */
- warn(result: Result, text: string, opts?: WarningOptions): Warning
-
- /**
- * Removes the node from its parent and cleans the parent properties
- * from the node and its children.
- *
- * ```js
- * if (decl.prop.match(/^-webkit-/)) {
- * decl.remove()
- * }
- * ```
- *
- * @return Node to make calls chain.
- */
- remove(): this
-
- /**
- * Returns a CSS string representing the node.
- *
- * ```js
- * new Rule({ selector: 'a' }).toString() //=> "a {}"
- * ```
- *
- * @param stringifier A syntax to use in string generation.
- * @return CSS string of this node.
- */
- toString(stringifier?: Stringifier | Syntax): string
-
- /**
- * Assigns properties to the current node.
- *
- * ```js
- * decl.assign({ prop: 'word-wrap', value: 'break-word' })
- * ```
- *
- * @param overrides New properties to override the node.
- * @return Current node to methods chain.
- */
- assign(overrides: object): this
-
- /**
- * Returns an exact clone of the node.
- *
- * The resulting cloned node and its (cloned) children will retain
- * code style properties.
- *
- * ```js
- * decl.raws.before //=> "\n "
- * const cloned = decl.clone({ prop: '-moz-' + decl.prop })
- * cloned.raws.before //=> "\n "
- * cloned.toString() //=> -moz-transform: scale(0)
- * ```
- *
- * @param overrides New properties to override in the clone.
- * @return Clone of the node.
- */
- clone(overrides?: object): this
-
- /**
- * Shortcut to clone the node and insert the resulting cloned node
- * before the current node.
- *
- * ```js
- * decl.cloneBefore({ prop: '-moz-' + decl.prop })
- * ```
- *
- * @param overrides Mew properties to override in the clone.
- *
- * @return New node
- */
- cloneBefore(overrides?: object): this
-
- /**
- * Shortcut to clone the node and insert the resulting cloned node
- * after the current node.
- *
- * @param overrides New properties to override in the clone.
- * @return New node.
- */
- cloneAfter(overrides?: object): this
-
- /**
- * Inserts node(s) before the current node and removes the current node.
- *
- * ```js
- * AtRule: {
- * mixin: atrule => {
- * atrule.replaceWith(mixinRules[atrule.params])
- * }
- * }
- * ```
- *
- * @param nodes Mode(s) to replace current one.
- * @return Current node to methods chain.
- */
- replaceWith(
- ...nodes: (Node.ChildNode | Node.ChildProps | Node.ChildNode[] | Node.ChildProps[])[]
- ): this
-
- /**
- * Returns the next child of the node’s parent.
- * Returns `undefined` if the current node is the last child.
- *
- * ```js
- * if (comment.text === 'delete next') {
- * const next = comment.next()
- * if (next) {
- * next.remove()
- * }
- * }
- * ```
- *
- * @return Next node.
- */
- next(): Node.ChildNode | undefined
-
- /**
- * Returns the previous child of the node’s parent.
- * Returns `undefined` if the current node is the first child.
- *
- * ```js
- * const annotation = decl.prev()
- * if (annotation.type === 'comment') {
- * readAnnotation(annotation.text)
- * }
- * ```
- *
- * @return Previous node.
- */
- prev(): Node.ChildNode | undefined
-
- /**
- * Insert new node before current node to current node’s parent.
- *
- * Just alias for `node.parent.insertBefore(node, add)`.
- *
- * ```js
- * decl.before('content: ""')
- * ```
- *
- * @param newNode New node.
- * @return This node for methods chain.
- */
- before(newNode: Node | Node.ChildProps | string | Node[]): this
-
- /**
- * Insert new node after current node to current node’s parent.
- *
- * Just alias for `node.parent.insertAfter(node, add)`.
- *
- * ```js
- * decl.after('color: black')
- * ```
- *
- * @param newNode New node.
- * @return This node for methods chain.
- */
- after(newNode: Node | Node.ChildProps | string | Node[]): this
-
- /**
- * Finds the Root instance of the node’s tree.
- *
- * ```js
- * root.nodes[0].nodes[0].root() === root
- * ```
- *
- * @return Root parent.
- */
- root(): Root
-
- /**
- * Returns a `Node#raws` value. If the node is missing
- * the code style property (because the node was manually built or cloned),
- * PostCSS will try to autodetect the code style property by looking
- * at other nodes in the tree.
- *
- * ```js
- * const root = postcss.parse('a { background: white }')
- * root.nodes[0].append({ prop: 'color', value: 'black' })
- * root.nodes[0].nodes[1].raws.before //=> undefined
- * root.nodes[0].nodes[1].raw('before') //=> ' '
- * ```
- *
- * @param prop Name of code style property.
- * @param defaultType Name of default value, it can be missed
- * if the value is the same as prop.
- * @return {string} Code style value.
- */
- raw(prop: string, defaultType?: string): string
-
- /**
- * Clear the code style properties for the node and its children.
- *
- * ```js
- * node.raws.before //=> ' '
- * node.cleanRaws()
- * node.raws.before //=> undefined
- * ```
- *
- * @param keepBetween Keep the `raws.between` symbols.
- */
- cleanRaws(keepBetween?: boolean): void
-
- /**
- * Fix circular links on `JSON.stringify()`.
- *
- * @return Cleaned object.
- */
- toJSON(): object
-
- /**
- * Convert string index to line/column.
- *
- * @param index The symbol number in the node’s string.
- * @return Symbol position in file.
- */
- positionInside(index: number): Node.Position
-
- /**
- * Get the position for a word or an index inside the node.
- *
- * @param opts Options.
- * @return Position.
- */
- positionBy(opts?: Pick): Node.Position
-
- /**
- * Get the range for a word or start and end index inside the node.
- * The start index is inclusive; the end index is exclusive.
- *
- * @param opts Options.
- * @return Range.
- */
- rangeBy(opts?: Pick): Node.Range
-}
-
-declare class Node extends Node_ {}
-
-export = Node
diff --git a/node_modules/postcss/lib/node.js b/node_modules/postcss/lib/node.js
deleted file mode 100644
index bdcbac0e..00000000
--- a/node_modules/postcss/lib/node.js
+++ /dev/null
@@ -1,379 +0,0 @@
-'use strict'
-
-let { isClean, my } = require('./symbols')
-let CssSyntaxError = require('./css-syntax-error')
-let Stringifier = require('./stringifier')
-let stringify = require('./stringify')
-
-function cloneNode(obj, parent) {
- let cloned = new obj.constructor()
-
- for (let i in obj) {
- if (!Object.prototype.hasOwnProperty.call(obj, i)) {
- /* c8 ignore next 2 */
- continue
- }
- if (i === 'proxyCache') continue
- let value = obj[i]
- let type = typeof value
-
- if (i === 'parent' && type === 'object') {
- if (parent) cloned[i] = parent
- } else if (i === 'source') {
- cloned[i] = value
- } else if (Array.isArray(value)) {
- cloned[i] = value.map(j => cloneNode(j, cloned))
- } else {
- if (type === 'object' && value !== null) value = cloneNode(value)
- cloned[i] = value
- }
- }
-
- return cloned
-}
-
-class Node {
- constructor(defaults = {}) {
- this.raws = {}
- this[isClean] = false
- this[my] = true
-
- for (let name in defaults) {
- if (name === 'nodes') {
- this.nodes = []
- for (let node of defaults[name]) {
- if (typeof node.clone === 'function') {
- this.append(node.clone())
- } else {
- this.append(node)
- }
- }
- } else {
- this[name] = defaults[name]
- }
- }
- }
-
- error(message, opts = {}) {
- if (this.source) {
- let { start, end } = this.rangeBy(opts)
- return this.source.input.error(
- message,
- { line: start.line, column: start.column },
- { line: end.line, column: end.column },
- opts
- )
- }
- return new CssSyntaxError(message)
- }
-
- warn(result, text, opts) {
- let data = { node: this }
- for (let i in opts) data[i] = opts[i]
- return result.warn(text, data)
- }
-
- remove() {
- if (this.parent) {
- this.parent.removeChild(this)
- }
- this.parent = undefined
- return this
- }
-
- toString(stringifier = stringify) {
- if (stringifier.stringify) stringifier = stringifier.stringify
- let result = ''
- stringifier(this, i => {
- result += i
- })
- return result
- }
-
- assign(overrides = {}) {
- for (let name in overrides) {
- this[name] = overrides[name]
- }
- return this
- }
-
- clone(overrides = {}) {
- let cloned = cloneNode(this)
- for (let name in overrides) {
- cloned[name] = overrides[name]
- }
- return cloned
- }
-
- cloneBefore(overrides = {}) {
- let cloned = this.clone(overrides)
- this.parent.insertBefore(this, cloned)
- return cloned
- }
-
- cloneAfter(overrides = {}) {
- let cloned = this.clone(overrides)
- this.parent.insertAfter(this, cloned)
- return cloned
- }
-
- replaceWith(...nodes) {
- if (this.parent) {
- let bookmark = this
- let foundSelf = false
- for (let node of nodes) {
- if (node === this) {
- foundSelf = true
- } else if (foundSelf) {
- this.parent.insertAfter(bookmark, node)
- bookmark = node
- } else {
- this.parent.insertBefore(bookmark, node)
- }
- }
-
- if (!foundSelf) {
- this.remove()
- }
- }
-
- return this
- }
-
- next() {
- if (!this.parent) return undefined
- let index = this.parent.index(this)
- return this.parent.nodes[index + 1]
- }
-
- prev() {
- if (!this.parent) return undefined
- let index = this.parent.index(this)
- return this.parent.nodes[index - 1]
- }
-
- before(add) {
- this.parent.insertBefore(this, add)
- return this
- }
-
- after(add) {
- this.parent.insertAfter(this, add)
- return this
- }
-
- root() {
- let result = this
- while (result.parent && result.parent.type !== 'document') {
- result = result.parent
- }
- return result
- }
-
- raw(prop, defaultType) {
- let str = new Stringifier()
- return str.raw(this, prop, defaultType)
- }
-
- cleanRaws(keepBetween) {
- delete this.raws.before
- delete this.raws.after
- if (!keepBetween) delete this.raws.between
- }
-
- toJSON(_, inputs) {
- let fixed = {}
- let emitInputs = inputs == null
- inputs = inputs || new Map()
- let inputsNextIndex = 0
-
- for (let name in this) {
- if (!Object.prototype.hasOwnProperty.call(this, name)) {
- /* c8 ignore next 2 */
- continue
- }
- if (name === 'parent' || name === 'proxyCache') continue
- let value = this[name]
-
- if (Array.isArray(value)) {
- fixed[name] = value.map(i => {
- if (typeof i === 'object' && i.toJSON) {
- return i.toJSON(null, inputs)
- } else {
- return i
- }
- })
- } else if (typeof value === 'object' && value.toJSON) {
- fixed[name] = value.toJSON(null, inputs)
- } else if (name === 'source') {
- let inputId = inputs.get(value.input)
- if (inputId == null) {
- inputId = inputsNextIndex
- inputs.set(value.input, inputsNextIndex)
- inputsNextIndex++
- }
- fixed[name] = {
- inputId,
- start: value.start,
- end: value.end
- }
- } else {
- fixed[name] = value
- }
- }
-
- if (emitInputs) {
- fixed.inputs = [...inputs.keys()].map(input => input.toJSON())
- }
-
- return fixed
- }
-
- positionInside(index) {
- let string = this.toString()
- let column = this.source.start.column
- let line = this.source.start.line
-
- for (let i = 0; i < index; i++) {
- if (string[i] === '\n') {
- column = 1
- line += 1
- } else {
- column += 1
- }
- }
-
- return { line, column }
- }
-
- positionBy(opts) {
- let pos = this.source.start
- if (opts.index) {
- pos = this.positionInside(opts.index)
- } else if (opts.word) {
- let index = this.toString().indexOf(opts.word)
- if (index !== -1) pos = this.positionInside(index)
- }
- return pos
- }
-
- rangeBy(opts) {
- let start = {
- line: this.source.start.line,
- column: this.source.start.column
- }
- let end = this.source.end
- ? {
- line: this.source.end.line,
- column: this.source.end.column + 1
- }
- : {
- line: start.line,
- column: start.column + 1
- }
-
- if (opts.word) {
- let index = this.toString().indexOf(opts.word)
- if (index !== -1) {
- start = this.positionInside(index)
- end = this.positionInside(index + opts.word.length)
- }
- } else {
- if (opts.start) {
- start = {
- line: opts.start.line,
- column: opts.start.column
- }
- } else if (opts.index) {
- start = this.positionInside(opts.index)
- }
-
- if (opts.end) {
- end = {
- line: opts.end.line,
- column: opts.end.column
- }
- } else if (opts.endIndex) {
- end = this.positionInside(opts.endIndex)
- } else if (opts.index) {
- end = this.positionInside(opts.index + 1)
- }
- }
-
- if (
- end.line < start.line ||
- (end.line === start.line && end.column <= start.column)
- ) {
- end = { line: start.line, column: start.column + 1 }
- }
-
- return { start, end }
- }
-
- getProxyProcessor() {
- return {
- set(node, prop, value) {
- if (node[prop] === value) return true
- node[prop] = value
- if (
- prop === 'prop' ||
- prop === 'value' ||
- prop === 'name' ||
- prop === 'params' ||
- prop === 'important' ||
- /* c8 ignore next */
- prop === 'text'
- ) {
- node.markDirty()
- }
- return true
- },
-
- get(node, prop) {
- if (prop === 'proxyOf') {
- return node
- } else if (prop === 'root') {
- return () => node.root().toProxy()
- } else {
- return node[prop]
- }
- }
- }
- }
-
- toProxy() {
- if (!this.proxyCache) {
- this.proxyCache = new Proxy(this, this.getProxyProcessor())
- }
- return this.proxyCache
- }
-
- addToError(error) {
- error.postcssNode = this
- if (error.stack && this.source && /\n\s{4}at /.test(error.stack)) {
- let s = this.source
- error.stack = error.stack.replace(
- /\n\s{4}at /,
- `$&${s.input.from}:${s.start.line}:${s.start.column}$&`
- )
- }
- return error
- }
-
- markDirty() {
- if (this[isClean]) {
- this[isClean] = false
- let next = this
- while ((next = next.parent)) {
- next[isClean] = false
- }
- }
- }
-
- get proxyOf() {
- return this
- }
-}
-
-module.exports = Node
-Node.default = Node
diff --git a/node_modules/postcss/lib/parse.d.ts b/node_modules/postcss/lib/parse.d.ts
deleted file mode 100644
index 4c943a4d..00000000
--- a/node_modules/postcss/lib/parse.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { Parser } from './postcss.js'
-
-interface Parse extends Parser {
- default: Parse
-}
-
-declare const parse: Parse
-
-export = parse
diff --git a/node_modules/postcss/lib/parse.js b/node_modules/postcss/lib/parse.js
deleted file mode 100644
index 971431f2..00000000
--- a/node_modules/postcss/lib/parse.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict'
-
-let Container = require('./container')
-let Parser = require('./parser')
-let Input = require('./input')
-
-function parse(css, opts) {
- let input = new Input(css, opts)
- let parser = new Parser(input)
- try {
- parser.parse()
- } catch (e) {
- if (process.env.NODE_ENV !== 'production') {
- if (e.name === 'CssSyntaxError' && opts && opts.from) {
- if (/\.scss$/i.test(opts.from)) {
- e.message +=
- '\nYou tried to parse SCSS with ' +
- 'the standard CSS parser; ' +
- 'try again with the postcss-scss parser'
- } else if (/\.sass/i.test(opts.from)) {
- e.message +=
- '\nYou tried to parse Sass with ' +
- 'the standard CSS parser; ' +
- 'try again with the postcss-sass parser'
- } else if (/\.less$/i.test(opts.from)) {
- e.message +=
- '\nYou tried to parse Less with ' +
- 'the standard CSS parser; ' +
- 'try again with the postcss-less parser'
- }
- }
- }
- throw e
- }
-
- return parser.root
-}
-
-module.exports = parse
-parse.default = parse
-
-Container.registerParse(parse)
diff --git a/node_modules/postcss/lib/parser.js b/node_modules/postcss/lib/parser.js
deleted file mode 100644
index 752d2643..00000000
--- a/node_modules/postcss/lib/parser.js
+++ /dev/null
@@ -1,603 +0,0 @@
-'use strict'
-
-let Declaration = require('./declaration')
-let tokenizer = require('./tokenize')
-let Comment = require('./comment')
-let AtRule = require('./at-rule')
-let Root = require('./root')
-let Rule = require('./rule')
-
-const SAFE_COMMENT_NEIGHBOR = {
- empty: true,
- space: true
-}
-
-function findLastWithPosition(tokens) {
- for (let i = tokens.length - 1; i >= 0; i--) {
- let token = tokens[i]
- let pos = token[3] || token[2]
- if (pos) return pos
- }
-}
-
-class Parser {
- constructor(input) {
- this.input = input
-
- this.root = new Root()
- this.current = this.root
- this.spaces = ''
- this.semicolon = false
- this.customProperty = false
-
- this.createTokenizer()
- this.root.source = { input, start: { offset: 0, line: 1, column: 1 } }
- }
-
- createTokenizer() {
- this.tokenizer = tokenizer(this.input)
- }
-
- parse() {
- let token
- while (!this.tokenizer.endOfFile()) {
- token = this.tokenizer.nextToken()
-
- switch (token[0]) {
- case 'space':
- this.spaces += token[1]
- break
-
- case ';':
- this.freeSemicolon(token)
- break
-
- case '}':
- this.end(token)
- break
-
- case 'comment':
- this.comment(token)
- break
-
- case 'at-word':
- this.atrule(token)
- break
-
- case '{':
- this.emptyRule(token)
- break
-
- default:
- this.other(token)
- break
- }
- }
- this.endFile()
- }
-
- comment(token) {
- let node = new Comment()
- this.init(node, token[2])
- node.source.end = this.getPosition(token[3] || token[2])
-
- let text = token[1].slice(2, -2)
- if (/^\s*$/.test(text)) {
- node.text = ''
- node.raws.left = text
- node.raws.right = ''
- } else {
- let match = text.match(/^(\s*)([^]*\S)(\s*)$/)
- node.text = match[2]
- node.raws.left = match[1]
- node.raws.right = match[3]
- }
- }
-
- emptyRule(token) {
- let node = new Rule()
- this.init(node, token[2])
- node.selector = ''
- node.raws.between = ''
- this.current = node
- }
-
- other(start) {
- let end = false
- let type = null
- let colon = false
- let bracket = null
- let brackets = []
- let customProperty = start[1].startsWith('--')
-
- let tokens = []
- let token = start
- while (token) {
- type = token[0]
- tokens.push(token)
-
- if (type === '(' || type === '[') {
- if (!bracket) bracket = token
- brackets.push(type === '(' ? ')' : ']')
- } else if (customProperty && colon && type === '{') {
- if (!bracket) bracket = token
- brackets.push('}')
- } else if (brackets.length === 0) {
- if (type === ';') {
- if (colon) {
- this.decl(tokens, customProperty)
- return
- } else {
- break
- }
- } else if (type === '{') {
- this.rule(tokens)
- return
- } else if (type === '}') {
- this.tokenizer.back(tokens.pop())
- end = true
- break
- } else if (type === ':') {
- colon = true
- }
- } else if (type === brackets[brackets.length - 1]) {
- brackets.pop()
- if (brackets.length === 0) bracket = null
- }
-
- token = this.tokenizer.nextToken()
- }
-
- if (this.tokenizer.endOfFile()) end = true
- if (brackets.length > 0) this.unclosedBracket(bracket)
-
- if (end && colon) {
- if (!customProperty) {
- while (tokens.length) {
- token = tokens[tokens.length - 1][0]
- if (token !== 'space' && token !== 'comment') break
- this.tokenizer.back(tokens.pop())
- }
- }
- this.decl(tokens, customProperty)
- } else {
- this.unknownWord(tokens)
- }
- }
-
- rule(tokens) {
- tokens.pop()
-
- let node = new Rule()
- this.init(node, tokens[0][2])
-
- node.raws.between = this.spacesAndCommentsFromEnd(tokens)
- this.raw(node, 'selector', tokens)
- this.current = node
- }
-
- decl(tokens, customProperty) {
- let node = new Declaration()
- this.init(node, tokens[0][2])
-
- let last = tokens[tokens.length - 1]
- if (last[0] === ';') {
- this.semicolon = true
- tokens.pop()
- }
-
- node.source.end = this.getPosition(
- last[3] || last[2] || findLastWithPosition(tokens)
- )
-
- while (tokens[0][0] !== 'word') {
- if (tokens.length === 1) this.unknownWord(tokens)
- node.raws.before += tokens.shift()[1]
- }
- node.source.start = this.getPosition(tokens[0][2])
-
- node.prop = ''
- while (tokens.length) {
- let type = tokens[0][0]
- if (type === ':' || type === 'space' || type === 'comment') {
- break
- }
- node.prop += tokens.shift()[1]
- }
-
- node.raws.between = ''
-
- let token
- while (tokens.length) {
- token = tokens.shift()
-
- if (token[0] === ':') {
- node.raws.between += token[1]
- break
- } else {
- if (token[0] === 'word' && /\w/.test(token[1])) {
- this.unknownWord([token])
- }
- node.raws.between += token[1]
- }
- }
-
- if (node.prop[0] === '_' || node.prop[0] === '*') {
- node.raws.before += node.prop[0]
- node.prop = node.prop.slice(1)
- }
-
- let firstSpaces = []
- let next
- while (tokens.length) {
- next = tokens[0][0]
- if (next !== 'space' && next !== 'comment') break
- firstSpaces.push(tokens.shift())
- }
-
- this.precheckMissedSemicolon(tokens)
-
- for (let i = tokens.length - 1; i >= 0; i--) {
- token = tokens[i]
- if (token[1].toLowerCase() === '!important') {
- node.important = true
- let string = this.stringFrom(tokens, i)
- string = this.spacesFromEnd(tokens) + string
- if (string !== ' !important') node.raws.important = string
- break
- } else if (token[1].toLowerCase() === 'important') {
- let cache = tokens.slice(0)
- let str = ''
- for (let j = i; j > 0; j--) {
- let type = cache[j][0]
- if (str.trim().indexOf('!') === 0 && type !== 'space') {
- break
- }
- str = cache.pop()[1] + str
- }
- if (str.trim().indexOf('!') === 0) {
- node.important = true
- node.raws.important = str
- tokens = cache
- }
- }
-
- if (token[0] !== 'space' && token[0] !== 'comment') {
- break
- }
- }
-
- let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')
-
- if (hasWord) {
- node.raws.between += firstSpaces.map(i => i[1]).join('')
- firstSpaces = []
- }
- this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)
-
- if (node.value.includes(':') && !customProperty) {
- this.checkMissedSemicolon(tokens)
- }
- }
-
- atrule(token) {
- let node = new AtRule()
- node.name = token[1].slice(1)
- if (node.name === '') {
- this.unnamedAtrule(node, token)
- }
- this.init(node, token[2])
-
- let type
- let prev
- let shift
- let last = false
- let open = false
- let params = []
- let brackets = []
-
- while (!this.tokenizer.endOfFile()) {
- token = this.tokenizer.nextToken()
- type = token[0]
-
- if (type === '(' || type === '[') {
- brackets.push(type === '(' ? ')' : ']')
- } else if (type === '{' && brackets.length > 0) {
- brackets.push('}')
- } else if (type === brackets[brackets.length - 1]) {
- brackets.pop()
- }
-
- if (brackets.length === 0) {
- if (type === ';') {
- node.source.end = this.getPosition(token[2])
- this.semicolon = true
- break
- } else if (type === '{') {
- open = true
- break
- } else if (type === '}') {
- if (params.length > 0) {
- shift = params.length - 1
- prev = params[shift]
- while (prev && prev[0] === 'space') {
- prev = params[--shift]
- }
- if (prev) {
- node.source.end = this.getPosition(prev[3] || prev[2])
- }
- }
- this.end(token)
- break
- } else {
- params.push(token)
- }
- } else {
- params.push(token)
- }
-
- if (this.tokenizer.endOfFile()) {
- last = true
- break
- }
- }
-
- node.raws.between = this.spacesAndCommentsFromEnd(params)
- if (params.length) {
- node.raws.afterName = this.spacesAndCommentsFromStart(params)
- this.raw(node, 'params', params)
- if (last) {
- token = params[params.length - 1]
- node.source.end = this.getPosition(token[3] || token[2])
- this.spaces = node.raws.between
- node.raws.between = ''
- }
- } else {
- node.raws.afterName = ''
- node.params = ''
- }
-
- if (open) {
- node.nodes = []
- this.current = node
- }
- }
-
- end(token) {
- if (this.current.nodes && this.current.nodes.length) {
- this.current.raws.semicolon = this.semicolon
- }
- this.semicolon = false
-
- this.current.raws.after = (this.current.raws.after || '') + this.spaces
- this.spaces = ''
-
- if (this.current.parent) {
- this.current.source.end = this.getPosition(token[2])
- this.current = this.current.parent
- } else {
- this.unexpectedClose(token)
- }
- }
-
- endFile() {
- if (this.current.parent) this.unclosedBlock()
- if (this.current.nodes && this.current.nodes.length) {
- this.current.raws.semicolon = this.semicolon
- }
- this.current.raws.after = (this.current.raws.after || '') + this.spaces
- }
-
- freeSemicolon(token) {
- this.spaces += token[1]
- if (this.current.nodes) {
- let prev = this.current.nodes[this.current.nodes.length - 1]
- if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {
- prev.raws.ownSemicolon = this.spaces
- this.spaces = ''
- }
- }
- }
-
- // Helpers
-
- getPosition(offset) {
- let pos = this.input.fromOffset(offset)
- return {
- offset,
- line: pos.line,
- column: pos.col
- }
- }
-
- init(node, offset) {
- this.current.push(node)
- node.source = {
- start: this.getPosition(offset),
- input: this.input
- }
- node.raws.before = this.spaces
- this.spaces = ''
- if (node.type !== 'comment') this.semicolon = false
- }
-
- raw(node, prop, tokens, customProperty) {
- let token, type
- let length = tokens.length
- let value = ''
- let clean = true
- let next, prev
-
- for (let i = 0; i < length; i += 1) {
- token = tokens[i]
- type = token[0]
- if (type === 'space' && i === length - 1 && !customProperty) {
- clean = false
- } else if (type === 'comment') {
- prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'
- next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'
- if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {
- if (value.slice(-1) === ',') {
- clean = false
- } else {
- value += token[1]
- }
- } else {
- clean = false
- }
- } else {
- value += token[1]
- }
- }
- if (!clean) {
- let raw = tokens.reduce((all, i) => all + i[1], '')
- node.raws[prop] = { value, raw }
- }
- node[prop] = value
- }
-
- spacesAndCommentsFromEnd(tokens) {
- let lastTokenType
- let spaces = ''
- while (tokens.length) {
- lastTokenType = tokens[tokens.length - 1][0]
- if (lastTokenType !== 'space' && lastTokenType !== 'comment') break
- spaces = tokens.pop()[1] + spaces
- }
- return spaces
- }
-
- spacesAndCommentsFromStart(tokens) {
- let next
- let spaces = ''
- while (tokens.length) {
- next = tokens[0][0]
- if (next !== 'space' && next !== 'comment') break
- spaces += tokens.shift()[1]
- }
- return spaces
- }
-
- spacesFromEnd(tokens) {
- let lastTokenType
- let spaces = ''
- while (tokens.length) {
- lastTokenType = tokens[tokens.length - 1][0]
- if (lastTokenType !== 'space') break
- spaces = tokens.pop()[1] + spaces
- }
- return spaces
- }
-
- stringFrom(tokens, from) {
- let result = ''
- for (let i = from; i < tokens.length; i++) {
- result += tokens[i][1]
- }
- tokens.splice(from, tokens.length - from)
- return result
- }
-
- colon(tokens) {
- let brackets = 0
- let token, type, prev
- for (let [i, element] of tokens.entries()) {
- token = element
- type = token[0]
-
- if (type === '(') {
- brackets += 1
- }
- if (type === ')') {
- brackets -= 1
- }
- if (brackets === 0 && type === ':') {
- if (!prev) {
- this.doubleColon(token)
- } else if (prev[0] === 'word' && prev[1] === 'progid') {
- continue
- } else {
- return i
- }
- }
-
- prev = token
- }
- return false
- }
-
- // Errors
-
- unclosedBracket(bracket) {
- throw this.input.error(
- 'Unclosed bracket',
- { offset: bracket[2] },
- { offset: bracket[2] + 1 }
- )
- }
-
- unknownWord(tokens) {
- throw this.input.error(
- 'Unknown word',
- { offset: tokens[0][2] },
- { offset: tokens[0][2] + tokens[0][1].length }
- )
- }
-
- unexpectedClose(token) {
- throw this.input.error(
- 'Unexpected }',
- { offset: token[2] },
- { offset: token[2] + 1 }
- )
- }
-
- unclosedBlock() {
- let pos = this.current.source.start
- throw this.input.error('Unclosed block', pos.line, pos.column)
- }
-
- doubleColon(token) {
- throw this.input.error(
- 'Double colon',
- { offset: token[2] },
- { offset: token[2] + token[1].length }
- )
- }
-
- unnamedAtrule(node, token) {
- throw this.input.error(
- 'At-rule without name',
- { offset: token[2] },
- { offset: token[2] + token[1].length }
- )
- }
-
- precheckMissedSemicolon(/* tokens */) {
- // Hook for Safe Parser
- }
-
- checkMissedSemicolon(tokens) {
- let colon = this.colon(tokens)
- if (colon === false) return
-
- let founded = 0
- let token
- for (let j = colon - 1; j >= 0; j--) {
- token = tokens[j]
- if (token[0] !== 'space') {
- founded += 1
- if (founded === 2) break
- }
- }
- // If the token is a word, e.g. `!important`, `red` or any other valid property's value.
- // Then we need to return the colon after that word token. [3] is the "end" colon of that word.
- // And because we need it after that one we do +1 to get the next one.
- throw this.input.error(
- 'Missed semicolon',
- token[0] === 'word' ? token[3] + 1 : token[2]
- )
- }
-}
-
-module.exports = Parser
diff --git a/node_modules/postcss/lib/postcss.d.ts b/node_modules/postcss/lib/postcss.d.ts
deleted file mode 100644
index 5394ca7f..00000000
--- a/node_modules/postcss/lib/postcss.d.ts
+++ /dev/null
@@ -1,448 +0,0 @@
-import { SourceMapGenerator, RawSourceMap } from 'source-map-js'
-
-import Node, {
- Position,
- Source,
- ChildNode,
- NodeErrorOptions,
- NodeProps,
- ChildProps,
- AnyNode
-} from './node.js'
-import Declaration, { DeclarationProps } from './declaration.js'
-import Container, { ContainerProps } from './container.js'
-import Document, { DocumentProps } from './document.js'
-import Warning, { WarningOptions } from './warning.js'
-import Comment, { CommentProps } from './comment.js'
-import AtRule, { AtRuleProps } from './at-rule.js'
-import Input, { FilePosition } from './input.js'
-import Result, { Message } from './result.js'
-import Root, { RootProps } from './root.js'
-import Rule, { RuleProps } from './rule.js'
-import CssSyntaxError from './css-syntax-error.js'
-import list from './list.js'
-import LazyResult from './lazy-result.js'
-import Processor from './processor.js'
-
-type DocumentProcessor = (
- document: Document,
- helper: postcss.Helpers
-) => Promise | void
-type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise | void
-type DeclarationProcessor = (
- decl: Declaration,
- helper: postcss.Helpers
-) => Promise | void
-type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise | void
-type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise | void
-type CommentProcessor = (
- comment: Comment,
- helper: postcss.Helpers
-) => Promise | void
-
-interface Processors {
- /**
- * Will be called on `Document` node.
- *
- * Will be called again on children changes.
- */
- Document?: DocumentProcessor
-
- /**
- * Will be called on `Document` node, when all children will be processed.
- *
- * Will be called again on children changes.
- */
- DocumentExit?: DocumentProcessor
-
- /**
- * Will be called on `Root` node once.
- */
- Once?: RootProcessor
-
- /**
- * Will be called on `Root` node once, when all children will be processed.
- */
- OnceExit?: RootProcessor
-
- /**
- * Will be called on `Root` node.
- *
- * Will be called again on children changes.
- */
- Root?: RootProcessor
-
- /**
- * Will be called on `Root` node, when all children will be processed.
- *
- * Will be called again on children changes.
- */
- RootExit?: RootProcessor
-
- /**
- * Will be called on all `Declaration` nodes after listeners
- * for `Declaration` event.
- *
- * Will be called again on node or children changes.
- */
- Declaration?: DeclarationProcessor | { [prop: string]: DeclarationProcessor }
-
- /**
- * Will be called on all `Declaration` nodes.
- *
- * Will be called again on node or children changes.
- */
- DeclarationExit?:
- | DeclarationProcessor
- | { [prop: string]: DeclarationProcessor }
-
- /**
- * Will be called on all `Rule` nodes.
- *
- * Will be called again on node or children changes.
- */
- Rule?: RuleProcessor
-
- /**
- * Will be called on all `Rule` nodes, when all children will be processed.
- *
- * Will be called again on node or children changes.
- */
- RuleExit?: RuleProcessor
-
- /**
- * Will be called on all`AtRule` nodes.
- *
- * Will be called again on node or children changes.
- */
- AtRule?: AtRuleProcessor | { [name: string]: AtRuleProcessor }
-
- /**
- * Will be called on all `AtRule` nodes, when all children will be processed.
- *
- * Will be called again on node or children changes.
- */
- AtRuleExit?: AtRuleProcessor | { [name: string]: AtRuleProcessor }
-
- /**
- * Will be called on all `Comment` nodes.
- *
- * Will be called again on node or children changes.
- */
- Comment?: CommentProcessor
-
- /**
- * Will be called on all `Comment` nodes after listeners
- * for `Comment` event.
- *
- * Will be called again on node or children changes.
- */
- CommentExit?: CommentProcessor
-
- /**
- * Will be called when all other listeners processed the document.
- *
- * This listener will not be called again.
- */
- Exit?: RootProcessor
-}
-
-declare namespace postcss {
- export {
- NodeErrorOptions,
- DeclarationProps,
- CssSyntaxError,
- ContainerProps,
- WarningOptions,
- DocumentProps,
- FilePosition,
- CommentProps,
- AtRuleProps,
- Declaration,
- ChildProps,
- LazyResult,
- ChildNode,
- NodeProps,
- Processor,
- RuleProps,
- RootProps,
- Container,
- Position,
- Document,
- AnyNode,
- Warning,
- Message,
- Comment,
- Source,
- AtRule,
- Result,
- Input,
- Node,
- list,
- Rule,
- Root
- }
-
- export type SourceMap = SourceMapGenerator & {
- toJSON(): RawSourceMap
- }
-
- export type Helpers = { result: Result; postcss: Postcss } & Postcss
-
- export interface Plugin extends Processors {
- postcssPlugin: string
- prepare?: (result: Result) => Processors
- }
-
- export interface PluginCreator {
- (opts?: PluginOptions): Plugin | Processor
- postcss: true
- }
-
- export interface Transformer extends TransformCallback {
- postcssPlugin: string
- postcssVersion: string
- }
-
- export interface TransformCallback {
- (root: Root, result: Result): Promise | void
- }
-
- export interface OldPlugin extends Transformer {
- (opts?: T): Transformer
- postcss: Transformer
- }
-
- export type AcceptedPlugin =
- | Plugin
- | PluginCreator
- | OldPlugin
- | TransformCallback
- | {
- postcss: TransformCallback | Processor
- }
- | Processor
-
- export interface Parser {
- (
- css: string | { toString(): string },
- opts?: Pick
- ): RootNode
- }
-
- export interface Builder {
- (part: string, node?: AnyNode, type?: 'start' | 'end'): void
- }
-
- export interface Stringifier {
- (node: AnyNode, builder: Builder): void
- }
-
- export interface JSONHydrator {
- (data: object[]): Node[]
- (data: object): Node
- }
-
- export interface Syntax {
- /**
- * Function to generate AST by string.
- */
- parse?: Parser
-
- /**
- * Class to generate string by AST.
- */
- stringify?: Stringifier
- }
-
- export interface SourceMapOptions {
- /**
- * Indicates that the source map should be embedded in the output CSS
- * as a Base64-encoded comment. By default, it is `true`.
- * But if all previous maps are external, not inline, PostCSS will not embed
- * the map even if you do not set this option.
- *
- * If you have an inline source map, the result.map property will be empty,
- * as the source map will be contained within the text of `result.css`.
- */
- inline?: boolean
-
- /**
- * Source map content from a previous processing step (e.g., Sass).
- *
- * PostCSS will try to read the previous source map
- * automatically (based on comments within the source CSS), but you can use
- * this option to identify it manually.
- *
- * If desired, you can omit the previous map with prev: `false`.
- */
- prev?: string | boolean | object | ((file: string) => string)
-
- /**
- * Indicates that PostCSS should set the origin content (e.g., Sass source)
- * of the source map. By default, it is true. But if all previous maps do not
- * contain sources content, PostCSS will also leave it out even if you
- * do not set this option.
- */
- sourcesContent?: boolean
-
- /**
- * Indicates that PostCSS should add annotation comments to the CSS.
- * By default, PostCSS will always add a comment with a path
- * to the source map. PostCSS will not add annotations to CSS files
- * that do not contain any comments.
- *
- * By default, PostCSS presumes that you want to save the source map as
- * `opts.to + '.map'` and will use this path in the annotation comment.
- * A different path can be set by providing a string value for annotation.
- *
- * If you have set `inline: true`, annotation cannot be disabled.
- */
- annotation?: string | boolean | ((file: string, root: Root) => string)
-
- /**
- * Override `from` in map’s sources.
- */
- from?: string
-
- /**
- * Use absolute path in generated source map.
- */
- absolute?: boolean
- }
-
- export interface ProcessOptions {
- /**
- * The path of the CSS source file. You should always set `from`,
- * because it is used in source map generation and syntax error messages.
- */
- from?: string
-
- /**
- * The path where you'll put the output CSS file. You should always set `to`
- * to generate correct source maps.
- */
- to?: string
-
- /**
- * Function to generate AST by string.
- */
- parser?: Syntax | Parser
-
- /**
- * Class to generate string by AST.
- */
- stringifier?: Syntax | Stringifier
-
- /**
- * Object with parse and stringify.
- */
- syntax?: Syntax
-
- /**
- * Source map options
- */
- map?: SourceMapOptions | boolean
- }
-
- export type Postcss = typeof postcss
-
- /**
- * Default function to convert a node tree into a CSS string.
- */
- export let stringify: Stringifier
-
- /**
- * Parses source css and returns a new `Root` or `Document` node,
- * which contains the source CSS nodes.
- *
- * ```js
- * // Simple CSS concatenation with source map support
- * const root1 = postcss.parse(css1, { from: file1 })
- * const root2 = postcss.parse(css2, { from: file2 })
- * root1.append(root2).toResult().css
- * ```
- */
- export let parse: Parser
-
- /**
- * Rehydrate a JSON AST (from `Node#toJSON`) back into the AST classes.
- *
- * ```js
- * const json = root.toJSON()
- * // save to file, send by network, etc
- * const root2 = postcss.fromJSON(json)
- * ```
- */
- export let fromJSON: JSONHydrator
-
- /**
- * Creates a new `Comment` node.
- *
- * @param defaults Properties for the new node.
- * @return New comment node
- */
- export function comment(defaults?: CommentProps): Comment
-
- /**
- * Creates a new `AtRule` node.
- *
- * @param defaults Properties for the new node.
- * @return New at-rule node.
- */
- export function atRule(defaults?: AtRuleProps): AtRule
-
- /**
- * Creates a new `Declaration` node.
- *
- * @param defaults Properties for the new node.
- * @return New declaration node.
- */
- export function decl(defaults?: DeclarationProps): Declaration
-
- /**
- * Creates a new `Rule` node.
- *
- * @param default Properties for the new node.
- * @return New rule node.
- */
- export function rule(defaults?: RuleProps): Rule
-
- /**
- * Creates a new `Root` node.
- *
- * @param defaults Properties for the new node.
- * @return New root node.
- */
- export function root(defaults?: RootProps): Root
-
- /**
- * Creates a new `Document` node.
- *
- * @param defaults Properties for the new node.
- * @return New document node.
- */
- export function document(defaults?: DocumentProps): Document
-
- export { postcss as default }
-}
-
-/**
- * Create a new `Processor` instance that will apply `plugins`
- * as CSS processors.
- *
- * ```js
- * let postcss = require('postcss')
- *
- * postcss(plugins).process(css, { from, to }).then(result => {
- * console.log(result.css)
- * })
- * ```
- *
- * @param plugins PostCSS plugins.
- * @return Processor to process multiple CSS.
- */
-declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor
-declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor
-
-export = postcss
diff --git a/node_modules/postcss/lib/postcss.js b/node_modules/postcss/lib/postcss.js
deleted file mode 100644
index 080ee837..00000000
--- a/node_modules/postcss/lib/postcss.js
+++ /dev/null
@@ -1,101 +0,0 @@
-'use strict'
-
-let CssSyntaxError = require('./css-syntax-error')
-let Declaration = require('./declaration')
-let LazyResult = require('./lazy-result')
-let Container = require('./container')
-let Processor = require('./processor')
-let stringify = require('./stringify')
-let fromJSON = require('./fromJSON')
-let Document = require('./document')
-let Warning = require('./warning')
-let Comment = require('./comment')
-let AtRule = require('./at-rule')
-let Result = require('./result.js')
-let Input = require('./input')
-let parse = require('./parse')
-let list = require('./list')
-let Rule = require('./rule')
-let Root = require('./root')
-let Node = require('./node')
-
-function postcss(...plugins) {
- if (plugins.length === 1 && Array.isArray(plugins[0])) {
- plugins = plugins[0]
- }
- return new Processor(plugins)
-}
-
-postcss.plugin = function plugin(name, initializer) {
- let warningPrinted = false
- function creator(...args) {
- // eslint-disable-next-line no-console
- if (console && console.warn && !warningPrinted) {
- warningPrinted = true
- // eslint-disable-next-line no-console
- console.warn(
- name +
- ': postcss.plugin was deprecated. Migration guide:\n' +
- 'https://evilmartians.com/chronicles/postcss-8-plugin-migration'
- )
- if (process.env.LANG && process.env.LANG.startsWith('cn')) {
- /* c8 ignore next 7 */
- // eslint-disable-next-line no-console
- console.warn(
- name +
- ': 里面 postcss.plugin 被弃用. 迁移指南:\n' +
- 'https://www.w3ctech.com/topic/2226'
- )
- }
- }
- let transformer = initializer(...args)
- transformer.postcssPlugin = name
- transformer.postcssVersion = new Processor().version
- return transformer
- }
-
- let cache
- Object.defineProperty(creator, 'postcss', {
- get() {
- if (!cache) cache = creator()
- return cache
- }
- })
-
- creator.process = function (css, processOpts, pluginOpts) {
- return postcss([creator(pluginOpts)]).process(css, processOpts)
- }
-
- return creator
-}
-
-postcss.stringify = stringify
-postcss.parse = parse
-postcss.fromJSON = fromJSON
-postcss.list = list
-
-postcss.comment = defaults => new Comment(defaults)
-postcss.atRule = defaults => new AtRule(defaults)
-postcss.decl = defaults => new Declaration(defaults)
-postcss.rule = defaults => new Rule(defaults)
-postcss.root = defaults => new Root(defaults)
-postcss.document = defaults => new Document(defaults)
-
-postcss.CssSyntaxError = CssSyntaxError
-postcss.Declaration = Declaration
-postcss.Container = Container
-postcss.Processor = Processor
-postcss.Document = Document
-postcss.Comment = Comment
-postcss.Warning = Warning
-postcss.AtRule = AtRule
-postcss.Result = Result
-postcss.Input = Input
-postcss.Rule = Rule
-postcss.Root = Root
-postcss.Node = Node
-
-LazyResult.registerPostcss(postcss)
-
-module.exports = postcss
-postcss.default = postcss
diff --git a/node_modules/postcss/lib/postcss.mjs b/node_modules/postcss/lib/postcss.mjs
deleted file mode 100644
index 35075988..00000000
--- a/node_modules/postcss/lib/postcss.mjs
+++ /dev/null
@@ -1,30 +0,0 @@
-import postcss from './postcss.js'
-
-export default postcss
-
-export const stringify = postcss.stringify
-export const fromJSON = postcss.fromJSON
-export const plugin = postcss.plugin
-export const parse = postcss.parse
-export const list = postcss.list
-
-export const document = postcss.document
-export const comment = postcss.comment
-export const atRule = postcss.atRule
-export const rule = postcss.rule
-export const decl = postcss.decl
-export const root = postcss.root
-
-export const CssSyntaxError = postcss.CssSyntaxError
-export const Declaration = postcss.Declaration
-export const Container = postcss.Container
-export const Processor = postcss.Processor
-export const Document = postcss.Document
-export const Comment = postcss.Comment
-export const Warning = postcss.Warning
-export const AtRule = postcss.AtRule
-export const Result = postcss.Result
-export const Input = postcss.Input
-export const Rule = postcss.Rule
-export const Root = postcss.Root
-export const Node = postcss.Node
diff --git a/node_modules/postcss/lib/previous-map.d.ts b/node_modules/postcss/lib/previous-map.d.ts
deleted file mode 100644
index ce0ddc24..00000000
--- a/node_modules/postcss/lib/previous-map.d.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-import { SourceMapConsumer } from 'source-map-js'
-
-import { ProcessOptions } from './postcss.js'
-
-declare namespace PreviousMap {
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { PreviousMap_ as default }
-}
-
-/**
- * Source map information from input CSS.
- * For example, source map after Sass compiler.
- *
- * This class will automatically find source map in input CSS or in file system
- * near input file (according `from` option).
- *
- * ```js
- * const root = parse(css, { from: 'a.sass.css' })
- * root.input.map //=> PreviousMap
- * ```
- */
-declare class PreviousMap_ {
- /**
- * Was source map inlined by data-uri to input CSS.
- */
- inline: boolean
-
- /**
- * `sourceMappingURL` content.
- */
- annotation?: string
-
- /**
- * Source map file content.
- */
- text?: string
-
- /**
- * The directory with source map file, if source map is in separated file.
- */
- root?: string
-
- /**
- * The CSS source identifier. Contains `Input#file` if the user
- * set the `from` option, or `Input#id` if they did not.
- */
- file?: string
-
- /**
- * Path to source map file.
- */
- mapFile?: string
-
- /**
- * @param css Input CSS source.
- * @param opts Process options.
- */
- constructor(css: string, opts?: ProcessOptions)
-
- /**
- * Create a instance of `SourceMapGenerator` class
- * from the `source-map` library to work with source map information.
- *
- * It is lazy method, so it will create object only on first call
- * and then it will use cache.
- *
- * @return Object with source map information.
- */
- consumer(): SourceMapConsumer
-
- /**
- * Does source map contains `sourcesContent` with input source text.
- *
- * @return Is `sourcesContent` present.
- */
- withContent(): boolean
-}
-
-declare class PreviousMap extends PreviousMap_ {}
-
-export = PreviousMap
diff --git a/node_modules/postcss/lib/previous-map.js b/node_modules/postcss/lib/previous-map.js
deleted file mode 100644
index d13a93a3..00000000
--- a/node_modules/postcss/lib/previous-map.js
+++ /dev/null
@@ -1,142 +0,0 @@
-'use strict'
-
-let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js')
-let { existsSync, readFileSync } = require('fs')
-let { dirname, join } = require('path')
-
-function fromBase64(str) {
- if (Buffer) {
- return Buffer.from(str, 'base64').toString()
- } else {
- /* c8 ignore next 2 */
- return window.atob(str)
- }
-}
-
-class PreviousMap {
- constructor(css, opts) {
- if (opts.map === false) return
- this.loadAnnotation(css)
- this.inline = this.startWith(this.annotation, 'data:')
-
- let prev = opts.map ? opts.map.prev : undefined
- let text = this.loadMap(opts.from, prev)
- if (!this.mapFile && opts.from) {
- this.mapFile = opts.from
- }
- if (this.mapFile) this.root = dirname(this.mapFile)
- if (text) this.text = text
- }
-
- consumer() {
- if (!this.consumerCache) {
- this.consumerCache = new SourceMapConsumer(this.text)
- }
- return this.consumerCache
- }
-
- withContent() {
- return !!(
- this.consumer().sourcesContent &&
- this.consumer().sourcesContent.length > 0
- )
- }
-
- startWith(string, start) {
- if (!string) return false
- return string.substr(0, start.length) === start
- }
-
- getAnnotationURL(sourceMapString) {
- return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim()
- }
-
- loadAnnotation(css) {
- let comments = css.match(/\/\*\s*# sourceMappingURL=/gm)
- if (!comments) return
-
- // sourceMappingURLs from comments, strings, etc.
- let start = css.lastIndexOf(comments.pop())
- let end = css.indexOf('*/', start)
-
- if (start > -1 && end > -1) {
- // Locate the last sourceMappingURL to avoid pickin
- this.annotation = this.getAnnotationURL(css.substring(start, end))
- }
- }
-
- decodeInline(text) {
- let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/
- let baseUri = /^data:application\/json;base64,/
- let charsetUri = /^data:application\/json;charset=utf-?8,/
- let uri = /^data:application\/json,/
-
- if (charsetUri.test(text) || uri.test(text)) {
- return decodeURIComponent(text.substr(RegExp.lastMatch.length))
- }
-
- if (baseCharsetUri.test(text) || baseUri.test(text)) {
- return fromBase64(text.substr(RegExp.lastMatch.length))
- }
-
- let encoding = text.match(/data:application\/json;([^,]+),/)[1]
- throw new Error('Unsupported source map encoding ' + encoding)
- }
-
- loadFile(path) {
- this.root = dirname(path)
- if (existsSync(path)) {
- this.mapFile = path
- return readFileSync(path, 'utf-8').toString().trim()
- }
- }
-
- loadMap(file, prev) {
- if (prev === false) return false
-
- if (prev) {
- if (typeof prev === 'string') {
- return prev
- } else if (typeof prev === 'function') {
- let prevPath = prev(file)
- if (prevPath) {
- let map = this.loadFile(prevPath)
- if (!map) {
- throw new Error(
- 'Unable to load previous source map: ' + prevPath.toString()
- )
- }
- return map
- }
- } else if (prev instanceof SourceMapConsumer) {
- return SourceMapGenerator.fromSourceMap(prev).toString()
- } else if (prev instanceof SourceMapGenerator) {
- return prev.toString()
- } else if (this.isMap(prev)) {
- return JSON.stringify(prev)
- } else {
- throw new Error(
- 'Unsupported previous source map format: ' + prev.toString()
- )
- }
- } else if (this.inline) {
- return this.decodeInline(this.annotation)
- } else if (this.annotation) {
- let map = this.annotation
- if (file) map = join(dirname(file), map)
- return this.loadFile(map)
- }
- }
-
- isMap(map) {
- if (typeof map !== 'object') return false
- return (
- typeof map.mappings === 'string' ||
- typeof map._mappings === 'string' ||
- Array.isArray(map.sections)
- )
- }
-}
-
-module.exports = PreviousMap
-PreviousMap.default = PreviousMap
diff --git a/node_modules/postcss/lib/processor.d.ts b/node_modules/postcss/lib/processor.d.ts
deleted file mode 100644
index fe9825ba..00000000
--- a/node_modules/postcss/lib/processor.d.ts
+++ /dev/null
@@ -1,111 +0,0 @@
-import {
- AcceptedPlugin,
- Plugin,
- ProcessOptions,
- Transformer,
- TransformCallback
-} from './postcss.js'
-import LazyResult from './lazy-result.js'
-import Result from './result.js'
-import Root from './root.js'
-import NoWorkResult from './no-work-result.js'
-
-declare namespace Processor {
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Processor_ as default }
-}
-
-/**
- * Contains plugins to process CSS. Create one `Processor` instance,
- * initialize its plugins, and then use that instance on numerous CSS files.
- *
- * ```js
- * const processor = postcss([autoprefixer, postcssNested])
- * processor.process(css1).then(result => console.log(result.css))
- * processor.process(css2).then(result => console.log(result.css))
- * ```
- */
-declare class Processor_ {
- /**
- * Current PostCSS version.
- *
- * ```js
- * if (result.processor.version.split('.')[0] !== '6') {
- * throw new Error('This plugin works only with PostCSS 6')
- * }
- * ```
- */
- version: string
-
- /**
- * Plugins added to this processor.
- *
- * ```js
- * const processor = postcss([autoprefixer, postcssNested])
- * processor.plugins.length //=> 2
- * ```
- */
- plugins: (Plugin | Transformer | TransformCallback)[]
-
- /**
- * @param plugins PostCSS plugins
- */
- constructor(plugins?: AcceptedPlugin[])
-
- /**
- * Adds a plugin to be used as a CSS processor.
- *
- * PostCSS plugin can be in 4 formats:
- * * A plugin in `Plugin` format.
- * * A plugin creator function with `pluginCreator.postcss = true`.
- * PostCSS will call this function without argument to get plugin.
- * * A function. PostCSS will pass the function a {@link Root}
- * as the first argument and current `Result` instance
- * as the second.
- * * Another `Processor` instance. PostCSS will copy plugins
- * from that instance into this one.
- *
- * Plugins can also be added by passing them as arguments when creating
- * a `postcss` instance (see [`postcss(plugins)`]).
- *
- * Asynchronous plugins should return a `Promise` instance.
- *
- * ```js
- * const processor = postcss()
- * .use(autoprefixer)
- * .use(postcssNested)
- * ```
- *
- * @param plugin PostCSS plugin or `Processor` with plugins.
- * @return Current processor to make methods chain.
- */
- use(plugin: AcceptedPlugin): this
-
- /**
- * Parses source CSS and returns a `LazyResult` Promise proxy.
- * Because some plugins can be asynchronous it doesn’t make
- * any transformations. Transformations will be applied
- * in the `LazyResult` methods.
- *
- * ```js
- * processor.process(css, { from: 'a.css', to: 'a.out.css' })
- * .then(result => {
- * console.log(result.css)
- * })
- * ```
- *
- * @param css String with input CSS or any object with a `toString()` method,
- * like a Buffer. Optionally, send a `Result` instance
- * and the processor will take the `Root` from it.
- * @param opts Options.
- * @return Promise proxy.
- */
- process(
- css: string | { toString(): string } | Result | LazyResult | Root,
- options?: ProcessOptions
- ): LazyResult | NoWorkResult
-}
-
-declare class Processor extends Processor_ {}
-
-export = Processor
diff --git a/node_modules/postcss/lib/processor.js b/node_modules/postcss/lib/processor.js
deleted file mode 100644
index b047adfd..00000000
--- a/node_modules/postcss/lib/processor.js
+++ /dev/null
@@ -1,67 +0,0 @@
-'use strict'
-
-let NoWorkResult = require('./no-work-result')
-let LazyResult = require('./lazy-result')
-let Document = require('./document')
-let Root = require('./root')
-
-class Processor {
- constructor(plugins = []) {
- this.version = '8.4.23'
- this.plugins = this.normalize(plugins)
- }
-
- use(plugin) {
- this.plugins = this.plugins.concat(this.normalize([plugin]))
- return this
- }
-
- process(css, opts = {}) {
- if (
- this.plugins.length === 0 &&
- typeof opts.parser === 'undefined' &&
- typeof opts.stringifier === 'undefined' &&
- typeof opts.syntax === 'undefined'
- ) {
- return new NoWorkResult(this, css, opts)
- } else {
- return new LazyResult(this, css, opts)
- }
- }
-
- normalize(plugins) {
- let normalized = []
- for (let i of plugins) {
- if (i.postcss === true) {
- i = i()
- } else if (i.postcss) {
- i = i.postcss
- }
-
- if (typeof i === 'object' && Array.isArray(i.plugins)) {
- normalized = normalized.concat(i.plugins)
- } else if (typeof i === 'object' && i.postcssPlugin) {
- normalized.push(i)
- } else if (typeof i === 'function') {
- normalized.push(i)
- } else if (typeof i === 'object' && (i.parse || i.stringify)) {
- if (process.env.NODE_ENV !== 'production') {
- throw new Error(
- 'PostCSS syntaxes cannot be used as plugins. Instead, please use ' +
- 'one of the syntax/parser/stringifier options as outlined ' +
- 'in your PostCSS runner documentation.'
- )
- }
- } else {
- throw new Error(i + ' is not a PostCSS plugin')
- }
- }
- return normalized
- }
-}
-
-module.exports = Processor
-Processor.default = Processor
-
-Root.registerProcessor(Processor)
-Document.registerProcessor(Processor)
diff --git a/node_modules/postcss/lib/result.d.ts b/node_modules/postcss/lib/result.d.ts
deleted file mode 100644
index e5d27967..00000000
--- a/node_modules/postcss/lib/result.d.ts
+++ /dev/null
@@ -1,206 +0,0 @@
-import {
- ProcessOptions,
- Plugin,
- SourceMap,
- TransformCallback,
- Root,
- Document,
- Node,
- Warning,
- WarningOptions
-} from './postcss.js'
-import Processor from './processor.js'
-
-declare namespace Result {
- export interface Message {
- /**
- * Message type.
- */
- type: string
-
- /**
- * Source PostCSS plugin name.
- */
- plugin?: string
-
- [others: string]: any
- }
-
- export interface ResultOptions extends ProcessOptions {
- /**
- * The CSS node that was the source of the warning.
- */
- node?: Node
-
- /**
- * Name of plugin that created this warning. `Result#warn` will fill it
- * automatically with `Plugin#postcssPlugin` value.
- */
- plugin?: string
- }
-
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Result_ as default }
-}
-
-/**
- * Provides the result of the PostCSS transformations.
- *
- * A Result instance is returned by `LazyResult#then`
- * or `Root#toResult` methods.
- *
- * ```js
- * postcss([autoprefixer]).process(css).then(result => {
- * console.log(result.css)
- * })
- * ```
- *
- * ```js
- * const result2 = postcss.parse(css).toResult()
- * ```
- */
-declare class Result_ {
- /**
- * The Processor instance used for this transformation.
- *
- * ```js
- * for (const plugin of result.processor.plugins) {
- * if (plugin.postcssPlugin === 'postcss-bad') {
- * throw 'postcss-good is incompatible with postcss-bad'
- * }
- * })
- * ```
- */
- processor: Processor
-
- /**
- * Contains messages from plugins (e.g., warnings or custom messages).
- * Each message should have type and plugin properties.
- *
- * ```js
- * AtRule: {
- * import: (atRule, { result }) {
- * const importedFile = parseImport(atRule)
- * result.messages.push({
- * type: 'dependency',
- * plugin: 'postcss-import',
- * file: importedFile,
- * parent: result.opts.from
- * })
- * }
- * }
- * ```
- */
- messages: Result.Message[]
-
- /**
- * Root node after all transformations.
- *
- * ```js
- * root.toResult().root === root
- * ```
- */
- root: Root | Document
-
- /**
- * Options from the `Processor#process` or `Root#toResult` call
- * that produced this Result instance.]
- *
- * ```js
- * root.toResult(opts).opts === opts
- * ```
- */
- opts: Result.ResultOptions
-
- /**
- * A CSS string representing of `Result#root`.
- *
- * ```js
- * postcss.parse('a{}').toResult().css //=> "a{}"
- * ```
- */
- css: string
-
- /**
- * An instance of `SourceMapGenerator` class from the `source-map` library,
- * representing changes to the `Result#root` instance.
- *
- * ```js
- * result.map.toJSON() //=> { version: 3, file: 'a.css', … }
- * ```
- *
- * ```js
- * if (result.map) {
- * fs.writeFileSync(result.opts.to + '.map', result.map.toString())
- * }
- * ```
- */
- map: SourceMap
-
- /**
- * Last runned PostCSS plugin.
- */
- lastPlugin: Plugin | TransformCallback
-
- /**
- * @param processor Processor used for this transformation.
- * @param root Root node after all transformations.
- * @param opts Options from the `Processor#process` or `Root#toResult`.
- */
- constructor(processor: Processor, root: Root | Document, opts: Result.ResultOptions)
-
- /**
- * An alias for the `Result#css` property.
- * Use it with syntaxes that generate non-CSS output.
- *
- * ```js
- * result.css === result.content
- * ```
- */
- get content(): string
-
- /**
- * Returns for `Result#css` content.
- *
- * ```js
- * result + '' === result.css
- * ```
- *
- * @return String representing of `Result#root`.
- */
- toString(): string
-
- /**
- * Creates an instance of `Warning` and adds it to `Result#messages`.
- *
- * ```js
- * if (decl.important) {
- * result.warn('Avoid !important', { node: decl, word: '!important' })
- * }
- * ```
- *
- * @param text Warning message.
- * @param opts Warning options.
- * @return Created warning.
- */
- warn(message: string, options?: WarningOptions): Warning
-
- /**
- * Returns warnings from plugins. Filters `Warning` instances
- * from `Result#messages`.
- *
- * ```js
- * result.warnings().forEach(warn => {
- * console.warn(warn.toString())
- * })
- * ```
- *
- * @return Warnings from plugins.
- */
- warnings(): Warning[]
-}
-
-declare class Result extends Result_ {}
-
-export = Result
diff --git a/node_modules/postcss/lib/result.js b/node_modules/postcss/lib/result.js
deleted file mode 100644
index a39751de..00000000
--- a/node_modules/postcss/lib/result.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict'
-
-let Warning = require('./warning')
-
-class Result {
- constructor(processor, root, opts) {
- this.processor = processor
- this.messages = []
- this.root = root
- this.opts = opts
- this.css = undefined
- this.map = undefined
- }
-
- toString() {
- return this.css
- }
-
- warn(text, opts = {}) {
- if (!opts.plugin) {
- if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
- opts.plugin = this.lastPlugin.postcssPlugin
- }
- }
-
- let warning = new Warning(text, opts)
- this.messages.push(warning)
-
- return warning
- }
-
- warnings() {
- return this.messages.filter(i => i.type === 'warning')
- }
-
- get content() {
- return this.css
- }
-}
-
-module.exports = Result
-Result.default = Result
diff --git a/node_modules/postcss/lib/root.d.ts b/node_modules/postcss/lib/root.d.ts
deleted file mode 100644
index d00cfbc5..00000000
--- a/node_modules/postcss/lib/root.d.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import Container, { ContainerProps } from './container.js'
-import Document from './document.js'
-import { ProcessOptions } from './postcss.js'
-import Result from './result.js'
-
-declare namespace Root {
- export interface RootRaws extends Record {
- /**
- * The space symbols after the last child to the end of file.
- */
- after?: string
-
- /**
- * Non-CSS code before `Root`, when `Root` is inside `Document`.
- *
- * **Experimental:** some aspects of this node could change within minor
- * or patch version releases.
- */
- codeBefore?: string
-
- /**
- * Non-CSS code after `Root`, when `Root` is inside `Document`.
- *
- * **Experimental:** some aspects of this node could change within minor
- * or patch version releases.
- */
- codeAfter?: string
-
- /**
- * Is the last child has an (optional) semicolon.
- */
- semicolon?: boolean
- }
-
- export interface RootProps extends ContainerProps {
- /**
- * Information used to generate byte-to-byte equal node string
- * as it was in the origin input.
- * */
- raws?: RootRaws
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Root_ as default }
-}
-
-/**
- * Represents a CSS file and contains all its parsed nodes.
- *
- * ```js
- * const root = postcss.parse('a{color:black} b{z-index:2}')
- * root.type //=> 'root'
- * root.nodes.length //=> 2
- * ```
- */
-declare class Root_ extends Container {
- type: 'root'
- parent: Document | undefined
- raws: Root.RootRaws
-
- /**
- * Returns a `Result` instance representing the root’s CSS.
- *
- * ```js
- * const root1 = postcss.parse(css1, { from: 'a.css' })
- * const root2 = postcss.parse(css2, { from: 'b.css' })
- * root1.append(root2)
- * const result = root1.toResult({ to: 'all.css', map: true })
- * ```
- *
- * @param opts Options.
- * @return Result with current root’s CSS.
- */
- toResult(options?: ProcessOptions): Result
-
- constructor(defaults?: Root.RootProps)
- assign(overrides: object | Root.RootProps): this
-}
-
-declare class Root extends Root_ {}
-
-export = Root
diff --git a/node_modules/postcss/lib/root.js b/node_modules/postcss/lib/root.js
deleted file mode 100644
index 6f3dbb6f..00000000
--- a/node_modules/postcss/lib/root.js
+++ /dev/null
@@ -1,61 +0,0 @@
-'use strict'
-
-let Container = require('./container')
-
-let LazyResult, Processor
-
-class Root extends Container {
- constructor(defaults) {
- super(defaults)
- this.type = 'root'
- if (!this.nodes) this.nodes = []
- }
-
- removeChild(child, ignore) {
- let index = this.index(child)
-
- if (!ignore && index === 0 && this.nodes.length > 1) {
- this.nodes[1].raws.before = this.nodes[index].raws.before
- }
-
- return super.removeChild(child)
- }
-
- normalize(child, sample, type) {
- let nodes = super.normalize(child)
-
- if (sample) {
- if (type === 'prepend') {
- if (this.nodes.length > 1) {
- sample.raws.before = this.nodes[1].raws.before
- } else {
- delete sample.raws.before
- }
- } else if (this.first !== sample) {
- for (let node of nodes) {
- node.raws.before = sample.raws.before
- }
- }
- }
-
- return nodes
- }
-
- toResult(opts = {}) {
- let lazy = new LazyResult(new Processor(), this, opts)
- return lazy.stringify()
- }
-}
-
-Root.registerLazyResult = dependant => {
- LazyResult = dependant
-}
-
-Root.registerProcessor = dependant => {
- Processor = dependant
-}
-
-module.exports = Root
-Root.default = Root
-
-Container.registerRoot(Root)
diff --git a/node_modules/postcss/lib/rule.d.ts b/node_modules/postcss/lib/rule.d.ts
deleted file mode 100644
index 37fbb251..00000000
--- a/node_modules/postcss/lib/rule.d.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import Container, { ContainerProps } from './container.js'
-
-declare namespace Rule {
- export interface RuleRaws extends Record {
- /**
- * The space symbols before the node. It also stores `*`
- * and `_` symbols before the declaration (IE hack).
- */
- before?: string
-
- /**
- * The space symbols after the last child of the node to the end of the node.
- */
- after?: string
-
- /**
- * The symbols between the selector and `{` for rules.
- */
- between?: string
-
- /**
- * Contains `true` if the last child has an (optional) semicolon.
- */
- semicolon?: boolean
-
- /**
- * Contains `true` if there is semicolon after rule.
- */
- ownSemicolon?: string
-
- /**
- * The rule’s selector with comments.
- */
- selector?: {
- value: string
- raw: string
- }
- }
-
- export interface RuleProps extends ContainerProps {
- /** Selector or selectors of the rule. */
- selector?: string
- /** Selectors of the rule represented as an array of strings. */
- selectors?: string[]
- /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
- raws?: RuleRaws
- }
-
- // eslint-disable-next-line @typescript-eslint/no-use-before-define
- export { Rule_ as default }
-}
-
-/**
- * Represents a CSS rule: a selector followed by a declaration block.
- *
- * ```js
- * Once (root, { Rule }) {
- * let a = new Rule({ selector: 'a' })
- * a.append(…)
- * root.append(a)
- * }
- * ```
- *
- * ```js
- * const root = postcss.parse('a{}')
- * const rule = root.first
- * rule.type //=> 'rule'
- * rule.toString() //=> 'a{}'
- * ```
- */
-declare class Rule_ extends Container {
- type: 'rule'
- parent: Container | undefined
- raws: Rule.RuleRaws
-
- /**
- * The rule’s full selector represented as a string.
- *
- * ```js
- * const root = postcss.parse('a, b { }')
- * const rule = root.first
- * rule.selector //=> 'a, b'
- * ```
- */
- selector: string
-
- /**
- * An array containing the rule’s individual selectors.
- * Groups of selectors are split at commas.
- *
- * ```js
- * const root = postcss.parse('a, b { }')
- * const rule = root.first
- *
- * rule.selector //=> 'a, b'
- * rule.selectors //=> ['a', 'b']
- *
- * rule.selectors = ['a', 'strong']
- * rule.selector //=> 'a, strong'
- * ```
- */
- selectors: string[]
-
- constructor(defaults?: Rule.RuleProps)
- assign(overrides: object | Rule.RuleProps): this
- clone(overrides?: Partial): this
- cloneBefore(overrides?: Partial): this
- cloneAfter(overrides?: Partial