Add progressive web app companion for cross-platform access
Vite + TypeScript PWA that mirrors the Android app's core features: - Pre-processed shelter data (build-time UTM33N→WGS84 conversion) - Leaflet map with shelter markers, user location, and offline tiles - Canvas compass arrow (ported from DirectionArrowView.kt) - IndexedDB shelter cache with 7-day staleness check - Service worker with CacheFirst tiles and precached app shell - i18n for en, nb, nn (ported from Android strings.xml) - iOS/Android compass handling with low-pass filter - Respects user map interaction (no auto-snap on pan/zoom) - Build revision cache-breaker for reliable SW updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
46365b713b
commit
e8428de775
12051 changed files with 1799735 additions and 0 deletions
292
pwa/node_modules/@rollup/plugin-babel/CHANGELOG.md
generated
vendored
Normal file
292
pwa/node_modules/@rollup/plugin-babel/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,292 @@
|
|||
# @rollup/plugin-babel ChangeLog
|
||||
|
||||
## v5.3.1
|
||||
|
||||
_2022-02-22_
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- fix: consider path delimeter on windows (#1090)
|
||||
|
||||
## v5.3.0
|
||||
|
||||
_2021-02-14_
|
||||
|
||||
### Features
|
||||
|
||||
- feat: add custom filter option (#767)
|
||||
- feat: pass rollup context as this context into override config function (#784)
|
||||
|
||||
### Updates
|
||||
|
||||
- docs: typo in README.md (#800)
|
||||
- chore: commit updated readme format (bfda6d8)
|
||||
|
||||
## v5.2.3
|
||||
|
||||
_2021-01-29_
|
||||
|
||||
### Updates
|
||||
|
||||
- docs: add usage with commonjs. fixes #622 (6b4b7b6)
|
||||
- docs: update export in README (#690)
|
||||
|
||||
## v5.2.2
|
||||
|
||||
_2020-11-30_
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- fix: clone cached helper identifier before returning it (#584)
|
||||
- fix: strip hash and query param in extension filter (#533)
|
||||
|
||||
## v5.2.1
|
||||
|
||||
_2020-09-09_
|
||||
|
||||
### Updates
|
||||
|
||||
- chore: add deprecation/migration warnings for the runtime (#534)
|
||||
|
||||
## v5.2.0
|
||||
|
||||
_2020-08-13_
|
||||
|
||||
### Features
|
||||
|
||||
- feat: `export * as ns` support (#511)
|
||||
|
||||
### Updates
|
||||
|
||||
- chore: update dependencies (13526d6)
|
||||
|
||||
## v5.1.0
|
||||
|
||||
_2020-07-12_
|
||||
|
||||
### Features
|
||||
|
||||
- feat: add typings (#462)
|
||||
|
||||
### Updates
|
||||
|
||||
- docs: add note about excluding @babel/runtime helpers via regex (#483)
|
||||
|
||||
## v5.0.4
|
||||
|
||||
_2020-06-22_
|
||||
|
||||
### Updates
|
||||
|
||||
- docs: remove unused import in "Usage" example (#460)
|
||||
- docs: update node requirement in readme (#443)
|
||||
- docs: fix typo in readme (#447)
|
||||
|
||||
## v5.0.3
|
||||
|
||||
_2020-06-05_
|
||||
|
||||
### Updates
|
||||
|
||||
- docs: update `babelHelpers` description (#397)
|
||||
|
||||
## v5.0.2
|
||||
|
||||
_2020-05-20_
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- fix: use loadPartialConfigAsync when it is available (#359)
|
||||
|
||||
### Updates
|
||||
|
||||
- docs: Cleanup misleading leftovers in the README (#377)
|
||||
- docs: correct breaking change note in v5 CHANGELOG (#368)
|
||||
|
||||
## v5.0.1
|
||||
|
||||
_2020-05-20_
|
||||
|
||||
### Bugfixes
|
||||
|
||||
- fix: use loadPartialConfigAsync when it is available (#359)
|
||||
|
||||
### Updates
|
||||
|
||||
- docs: Cleanup misleading leftovers in the README (#377)
|
||||
- docs: correct breaking change note in v5 CHANGELOG (#368)
|
||||
|
||||
# @rollup/plugin-babel changelog
|
||||
|
||||
## 5.0.0
|
||||
|
||||
_2020-04-27_
|
||||
|
||||
### Features
|
||||
|
||||
- Added `getBabelOutputPlugin` and `createBabelOutputPluginFactory` exports which can be used to transform generated code
|
||||
- Added `skipPreflightCheck` option. The plugin performs some extra checks to see if the passed configuration is correct and matching its expectations. This comes with some runtime overhead and can slow down builds. If you know what you are doing and you are confident that you have configured things correctly you can disable those checks with this option.
|
||||
- Published as `@rollup/plugin-babel`
|
||||
|
||||
### Updates
|
||||
|
||||
- Default export exported as `getBabelInputPlugin` for symmetry with `getBabelOutputPlugin`
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- Minimum compatible Rollup version is 1.2.0
|
||||
- Minimum supported Node version is 10.0.0
|
||||
- `.custom` factory is now available as separate `createBabelInputPluginFactory` export
|
||||
- Removed `externalHelpers` & `runtimeHelpers` options. There is now a single `babelHelpers` option which can take one of `'bundled'`, `'inline'`, `'runtime'` and `'external'` as a value. The default is `'bundled'` which matches 4.x behavior, but it is recommended to configure this option explicitly.
|
||||
|
||||
## 4.3.2
|
||||
|
||||
- Fixed usage with `externalHelpers: true` option
|
||||
|
||||
## 4.3.1
|
||||
|
||||
- Add `.js` extension to the virtual babel helpers file (only matters when using `preserveModules` option in rollup)
|
||||
|
||||
## 4.3.0
|
||||
|
||||
- Added `.custom` builder.
|
||||
- Fail build when a plugin tries to add non existent babel helper
|
||||
|
||||
## 4.2.0
|
||||
|
||||
Allow `rollup@1` as peer dependency.
|
||||
|
||||
## 4.1.0
|
||||
|
||||
- Fixed "preflight check" for ignored files.
|
||||
- Return `null` when no transformation has been done (fixing source maps for this case)
|
||||
|
||||
## 4.0.3
|
||||
|
||||
Fixed fallback class transform in "preflight check".
|
||||
|
||||
## 4.0.2
|
||||
|
||||
Fixed `rollup` peer dependency.
|
||||
|
||||
## 4.0.0
|
||||
|
||||
Babel 7 compatible! (dropped Babel 6 compatibility though).
|
||||
|
||||
Additionally:
|
||||
|
||||
- Internal preflight checks are created now per plugin instance, so using 2 instances of rollup-plugin-babel (i.e. targeting 2 different set of files with include/exclude options) shouldn't conflict with each other
|
||||
- Transpiling by default only what Babel transpiles - files with those extensions: .js, .jsx, .es6, .es, .mjs. You can customize this with new `extensions` option. This also fixes long standing issue with rollup-plugin-babel trying to transform JSON files.
|
||||
|
||||
## 3.0.3
|
||||
|
||||
- Drop babel7 support. Use 4.0.0-beta if you use babel 7
|
||||
- Use "module" in addition to "jsnext:main" ([#150](https://github.com/rollup/rollup-plugin-babel/issues/150))
|
||||
- Remove unused babel helpers namespace declaration & expression ([#164](https://github.com/rollup/rollup-plugin-babel/issues/164))
|
||||
|
||||
## 3.0.2
|
||||
|
||||
- Fix regression with Babel 6 ([#158](https://github.com/rollup/rollup-plugin-babel/issues/158))
|
||||
|
||||
## 3.0.1
|
||||
|
||||
- Wasn't working, fix bug with transform (not using es2015-classes for preflight check)
|
||||
|
||||
## 3.0.0
|
||||
|
||||
- Drop Node 0.10/0.12 (Use native `Object.assign`)
|
||||
- Change `babel-core` to be a peerDependency
|
||||
- Support `babel-core` v7 as well as a peerDep (no changes necessary)
|
||||
|
||||
## 2.7.1
|
||||
|
||||
- Prevent erroneous warnings about duplicated runtime helpers ([#105](https://github.com/rollup/rollup-plugin-babel/issues/105))
|
||||
- Ignore `ignore` option in preflight check ([#102](https://github.com/rollup/rollup-plugin-babel/issues/102))
|
||||
- Allow custom `moduleName` with `runtime-helpers` ([#95](https://github.com/rollup/rollup-plugin-babel/issues/95))
|
||||
|
||||
## 2.7.0
|
||||
|
||||
- Add `externalHelpersWhitelist` option ([#92](https://github.com/rollup/rollup-plugin-babel/pull/92))
|
||||
- Ignore `only` option during preflight checks ([#98](https://github.com/rollup/rollup-plugin-babel/issues/98))
|
||||
- Use `options.onwarn` if available ([#84](https://github.com/rollup/rollup-plugin-babel/issues/84))
|
||||
- Update documentation and dependencies
|
||||
|
||||
## 2.6.1
|
||||
|
||||
- Return a `name`
|
||||
|
||||
## 2.6.0
|
||||
|
||||
- Use `\0` convention for helper module ID ([#64](https://github.com/rollup/rollup-plugin-babel/issues/64))
|
||||
|
||||
## 2.5.1
|
||||
|
||||
- Don't mutate `options.plugins` ([#47](https://github.com/rollup/rollup-plugin-babel/issues/47))
|
||||
|
||||
## 2.5.0
|
||||
|
||||
- Import `babelHelpers` rather than injecting them – allows `transform` function to be pure ([#rollup/658](https://github.com/rollup/rollup/pull/658#issuecomment-223876824))
|
||||
|
||||
## 2.4.0
|
||||
|
||||
- Add `externalHelpers` option ([#41](https://github.com/rollup/rollup-plugin-babel/pull/41))
|
||||
|
||||
## 2.3.9
|
||||
|
||||
- Do not rename Babel helpers ([#34](https://github.com/rollup/rollup-plugin-babel/pull/34))
|
||||
|
||||
## 2.3.8
|
||||
|
||||
- Create new version to (hopefully) solve bizarre CI issue
|
||||
|
||||
## 2.3.7
|
||||
|
||||
- Be less clever about renaming Babel helpers ([#19](https://github.com/rollup/rollup-plugin-babel/issues/19))
|
||||
|
||||
## 2.3.6
|
||||
|
||||
- Fix cache misses in preflight check ([#29](https://github.com/rollup/rollup-plugin-babel/pull/29))
|
||||
|
||||
## 2.3.5
|
||||
|
||||
- Use class transformer local to plugin, not project being built
|
||||
|
||||
## 2.3.4
|
||||
|
||||
- Ensure class transformer is present for preflight check, and only run check once per directory ([#23](https://github.com/rollup/rollup-plugin-babel/issues/23))
|
||||
|
||||
## 2.3.3
|
||||
|
||||
- Fix helper renaming ([#22](https://github.com/rollup/rollup-plugin-babel/issues/22))
|
||||
|
||||
## 2.3.1-2
|
||||
|
||||
- Include correct files in npm package
|
||||
|
||||
## 2.3.0
|
||||
|
||||
- Allow `transform-runtime` Babel plugin, if combined with `runtimeHelpers: true` option ([#17](https://github.com/rollup/rollup-plugin-babel/issues/17))
|
||||
- More permissive handling of helpers – only warn if inline helpers are duplicated
|
||||
- Handle plugins that change export patterns ([#18](https://github.com/rollup/rollup-plugin-babel/issues/18))
|
||||
|
||||
## 2.2.0
|
||||
|
||||
- Preflight checks are run per-file, to avoid configuration snafus ([#16](https://github.com/rollup/rollup-plugin-babel/issues/16))
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- Generate sourcemaps by default
|
||||
|
||||
## 2.0.1
|
||||
|
||||
- Use object-assign ponyfill
|
||||
- Add travis support
|
||||
- Fix test
|
||||
|
||||
## 2.0.0
|
||||
|
||||
- Babel 6 compatible
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- First release
|
||||
21
pwa/node_modules/@rollup/plugin-babel/LICENSE
generated
vendored
Normal file
21
pwa/node_modules/@rollup/plugin-babel/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
|
||||
|
||||
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.
|
||||
380
pwa/node_modules/@rollup/plugin-babel/README.md
generated
vendored
Normal file
380
pwa/node_modules/@rollup/plugin-babel/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,380 @@
|
|||
[npm]: https://img.shields.io/npm/v/@rollup/plugin-babel
|
||||
[npm-url]: https://www.npmjs.com/package/@rollup/plugin-babel
|
||||
[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-babel
|
||||
[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-babel
|
||||
|
||||
[![npm][npm]][npm-url]
|
||||
[![size][size]][size-url]
|
||||
[](https://liberamanifesto.com)
|
||||
|
||||
# @rollup/plugin-babel
|
||||
|
||||
🍣 A Rollup plugin for seamless integration between Rollup and Babel.
|
||||
|
||||
## Why?
|
||||
|
||||
If you're using Babel to transpile your ES6/7 code and Rollup to generate a standalone bundle, you have a couple of options:
|
||||
|
||||
- run the code through Babel first, being careful to exclude the module transformer, or
|
||||
- run the code through Rollup first, and _then_ pass it to Babel.
|
||||
|
||||
Both approaches have disadvantages – in the first case, on top of the additional configuration complexity, you may end up with Babel's helpers (like `classCallCheck`) repeated throughout your code (once for each module where the helpers are used). In the second case, transpiling is likely to be slower, because transpiling a large bundle is much more work for Babel than transpiling a set of small files.
|
||||
|
||||
Either way, you have to worry about a place to put the intermediate files, and getting sourcemaps to behave becomes a royal pain.
|
||||
|
||||
Using Rollup with `@rollup/plugin-babel` makes the process far easier.
|
||||
|
||||
## Requirements
|
||||
|
||||
This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v10.0.0+) and Rollup v1.20.0+.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install @rollup/plugin-babel --save-dev
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Create a `rollup.config.js` [configuration file](https://www.rollupjs.org/guide/en/#configuration-files) and import the plugin:
|
||||
|
||||
```js
|
||||
import { babel } from '@rollup/plugin-babel';
|
||||
|
||||
const config = {
|
||||
input: 'src/index.js',
|
||||
output: {
|
||||
dir: 'output',
|
||||
format: 'esm'
|
||||
},
|
||||
plugins: [babel({ babelHelpers: 'bundled' })]
|
||||
};
|
||||
|
||||
export default config;
|
||||
```
|
||||
|
||||
Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#command-line-reference) or the [API](https://www.rollupjs.org/guide/en/#javascript-api).
|
||||
|
||||
### Using With `@rollup/plugin-commonjs`
|
||||
|
||||
When using `@rollup/plugin-babel` with `@rollup/plugin-commonjs` in the same Rollup configuration, it's important to note that `@rollup/plugin-commonjs` _must_ be placed before this plugin in the `plugins` array for the two to work together properly. e.g.
|
||||
|
||||
```js
|
||||
import { babel } from '@rollup/plugin-babel';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
|
||||
const config = {
|
||||
...
|
||||
plugins: [
|
||||
commonjs(),
|
||||
babel({ babelHelpers: 'bundled' })
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
This plugin respects Babel [configuration files](https://babeljs.io/docs/en/configuration) by default and they are generally the best place to put your configuration.
|
||||
|
||||
You can also run Babel on the generated chunks instead of the input files. Even though this is slower, it is the only way to transpile Rollup's auto-generated wrapper code to lower compatibility targets than ES5, see [Running Babel on the generated code](#running-babel-on-the-generated-code) for details.
|
||||
|
||||
All options are as per the [Babel documentation](https://babeljs.io/docs/en/options), plus the following:
|
||||
|
||||
### `exclude`
|
||||
|
||||
Type: `String | RegExp | Array[...String|RegExp]`<br>
|
||||
|
||||
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should _ignore_. When relying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself.
|
||||
|
||||
### `include`
|
||||
|
||||
Type: `String | RegExp | Array[...String|RegExp]`<br>
|
||||
|
||||
A [minimatch pattern](https://github.com/isaacs/minimatch), or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there.
|
||||
|
||||
### `filter`
|
||||
|
||||
Type: (id: string) => boolean<br>
|
||||
|
||||
Custom [filter function](https://github.com/rollup/plugins/tree/master/packages/pluginutils#createfilter) can be used to determine whether or not certain modules should be operated upon.
|
||||
|
||||
Usage:
|
||||
|
||||
```js
|
||||
import { createFilter } from '@rollup/pluginutils';
|
||||
const include = 'include/**.js';
|
||||
const exclude = 'exclude/**.js';
|
||||
const filter = createFilter(include, exclude, {});
|
||||
```
|
||||
|
||||
### `extensions`
|
||||
|
||||
Type: `Array[...String]`<br>
|
||||
Default: `['.js', '.jsx', '.es6', '.es', '.mjs']`
|
||||
|
||||
An array of file extensions that Babel should transpile. If you want to transpile TypeScript files with this plugin it's essential to include `.ts` and `.tsx` in this option.
|
||||
|
||||
### `babelHelpers`
|
||||
|
||||
Type: `'bundled' | 'runtime' | 'inline' | 'external'`<br>
|
||||
Default: `'bundled'`
|
||||
|
||||
It is recommended to configure this option explicitly (even if with its default value) so an informed decision is taken on how those babel helpers are inserted into the code.
|
||||
|
||||
We recommend to follow these guidelines to determine the most appropriate value for your project:
|
||||
|
||||
- `'runtime'` - you should use this especially when building libraries with Rollup. It has to be used in combination with `@babel/plugin-transform-runtime` and you should also specify `@babel/runtime` as dependency of your package. Don't forget to tell Rollup to treat the helpers imported from within the `@babel/runtime` module as external dependencies when bundling for `cjs` & `es` formats. This can be accomplished via regex (`external: [/@babel\/runtime/]`) or a function (`external: id => id.includes('@babel/runtime')`). It's important to not only specify `external: ['@babel/runtime']` since the helpers are imported from nested paths (e.g `@babel/runtime/helpers/get`) and [Rollup will only exclude modules that match strings exactly](https://rollupjs.org/guide/en/#peer-dependencies).
|
||||
- `'bundled'` - you should use this if you want your resulting bundle to contain those helpers (at most one copy of each). Useful especially if you bundle an application code.
|
||||
- `'external'` - use this only if you know what you are doing. It will reference helpers on **global** `babelHelpers` object. Used in combination with `@babel/plugin-external-helpers`.
|
||||
- `'inline'` - this is not recommended. Helpers will be inserted in each file using this option. This can cause serious code duplication. This is the default Babel behavior as Babel operates on isolated files - however, as Rollup is a bundler and is project-aware (and therefore likely operating across multiple input files), the default of this plugin is `"bundled"`.
|
||||
|
||||
### `skipPreflightCheck`
|
||||
|
||||
Type: `Boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Before transpiling your input files this plugin also transpile a short piece of code **for each** input file. This is used to validate some misconfiguration errors, but for sufficiently big projects it can slow your build times so if you are confident about your configuration then you might disable those checks with this option.
|
||||
|
||||
### External dependencies
|
||||
|
||||
Ideally, you should only be transforming your source code, rather than running all of your external dependencies through Babel (to ignore external dependencies from being handled by this plugin you might use `exclude: 'node_modules/**'` option). If you have a dependency that exposes untranspiled ES6 source code that doesn't run in your target environment, then you may need to break this rule, but it often causes problems with unusual `.babelrc` files or mismatched versions of Babel.
|
||||
|
||||
We encourage library authors not to distribute code that uses untranspiled ES6 features (other than modules) for this reason. Consumers of your library should _not_ have to transpile your ES6 code, any more than they should have to transpile your CoffeeScript, ClojureScript or TypeScript.
|
||||
|
||||
Use `babelrc: false` to prevent Babel from using local (i.e. to your external dependencies) `.babelrc` files, relying instead on the configuration you pass in.
|
||||
|
||||
### Helpers
|
||||
|
||||
In some cases Babel uses _helpers_ to avoid repeating chunks of code – for example, if you use the `class` keyword, it will use a `classCallCheck` function to ensure that the class is instantiated correctly.
|
||||
|
||||
By default, those helpers will be inserted at the top of the file being transformed, which can lead to duplication. This rollup plugin automatically deduplicates those helpers, keeping only one copy of each one used in the output bundle. Rollup will combine the helpers in a single block at the top of your bundle.
|
||||
|
||||
You can customize how those helpers are being inserted into the transformed file with [`babelHelpers`](#babelhelpers) option.
|
||||
|
||||
### Modules
|
||||
|
||||
This is not needed since Babel 7 - it knows automatically that Rollup understands ES modules & that it shouldn't use any module transform with it. Unless you forcefully include a module transform in your Babel configuration.
|
||||
|
||||
If you have been pointed to this section by an error thrown by this plugin, please check your Babel configuration files and disable any module transforms when running Rollup builds.
|
||||
|
||||
## Running Babel on the generated code
|
||||
|
||||
You can run `@rollup/plugin-babel` on the output files instead of the input files by using `getBabelOutputPlugin(...)`. This can be used to perform code transformations on the resulting chunks and is the only way to transform Rollup's auto-generated code. By default, the plugin will be applied to all outputs:
|
||||
|
||||
```js
|
||||
// rollup.config.js
|
||||
import { getBabelOutputPlugin } from '@rollup/plugin-babel';
|
||||
|
||||
export default {
|
||||
input: 'main.js',
|
||||
plugins: [
|
||||
getBabelOutputPlugin({
|
||||
presets: ['@babel/preset-env']
|
||||
})
|
||||
],
|
||||
output: [
|
||||
{ file: 'bundle.cjs.js', format: 'cjs' },
|
||||
{ file: 'bundle.esm.js', format: 'esm' }
|
||||
]
|
||||
};
|
||||
```
|
||||
|
||||
If you only want to apply it to specific outputs, you can use it as an output plugin (requires at least Rollup v1.27.0):
|
||||
|
||||
```js
|
||||
// rollup.config.js
|
||||
import { getBabelOutputPlugin } from '@rollup/plugin-babel';
|
||||
|
||||
export default {
|
||||
input: 'main.js',
|
||||
output: [
|
||||
{ file: 'bundle.js', format: 'esm' },
|
||||
{
|
||||
file: 'bundle.es5.js',
|
||||
format: 'esm',
|
||||
plugins: [getBabelOutputPlugin({ presets: ['@babel/preset-env'] })]
|
||||
}
|
||||
]
|
||||
};
|
||||
```
|
||||
|
||||
The `include`, `exclude` and `extensions` options are ignored when the when using `getBabelOutputPlugin` and `createBabelOutputPluginFactory` will produce warnings, and there are a few more points to note that users should be aware of.
|
||||
|
||||
You can also run the plugin twice on the code, once when processing the input files to transpile special syntax to JavaScript and once on the output to transpile to a lower compatibility target:
|
||||
|
||||
```js
|
||||
// rollup.config.js
|
||||
import babel, { getBabelOutputPlugin } from '@rollup/plugin-babel';
|
||||
|
||||
export default {
|
||||
input: 'main.js',
|
||||
plugins: [babel({ presets: ['@babel/preset-react'] })],
|
||||
output: [
|
||||
{
|
||||
file: 'bundle.js',
|
||||
format: 'esm',
|
||||
plugins: [getBabelOutputPlugin({ presets: ['@babel/preset-env'] })]
|
||||
}
|
||||
]
|
||||
};
|
||||
```
|
||||
|
||||
### Babel configuration files
|
||||
|
||||
Unlike the regular `babel` plugin, `getBabelOutputPlugin(...)` will **not** automatically search for [Babel configuration files](https://babeljs.io/docs/en/config-files). Besides passing in Babel options directly, however, you can specify a configuration file manually via Babel's [`configFile`](https://babeljs.io/docs/en/options#configfile) option:
|
||||
|
||||
```js
|
||||
getBabelOutputPlugin({
|
||||
configFile: path.resolve(__dirname, 'babel.config.js')
|
||||
});
|
||||
```
|
||||
|
||||
### Using formats other than ES modules or CommonJS
|
||||
|
||||
As `getBabelOutputPlugin(...)` will run _after_ Rollup has done all its transformations, it needs to make sure it preserves the semantics of Rollup's output format. This is especially important for Babel plugins that add, modify or remove imports or exports, but also for other transformations that add new variables as they can accidentally become global variables depending on the format. Therefore it is recommended that for formats other than `esm` or `cjs`, you set Rollup to use the `esm` output format and let Babel handle the transformation to another format, e.g. via
|
||||
|
||||
```
|
||||
presets: [['@babel/preset-env', { modules: 'umd' }], ...]
|
||||
```
|
||||
|
||||
to create a UMD/IIFE compatible output. If you want to use `getBabelOutputPlugin(...)` with other formats, you need to specify `allowAllFormats: true` as plugin option:
|
||||
|
||||
```js
|
||||
rollup.rollup({...})
|
||||
.then(bundle => bundle.generate({
|
||||
format: 'iife',
|
||||
plugins: [getBabelOutputPlugin({
|
||||
allowAllFormats: true,
|
||||
// ...
|
||||
})]
|
||||
}))
|
||||
```
|
||||
|
||||
### Injected helpers
|
||||
|
||||
By default, helpers e.g. when transpiling classes will be inserted at the top of each chunk. In contrast to when applying this plugin on the input files, helpers will not be deduplicated across chunks.
|
||||
|
||||
Alternatively, you can use imported runtime helpers by adding the `@babel/transform-runtime` plugin. This will make `@babel/runtime` an external dependency of your project, see [@babel/plugin-transform-runtime](https://babeljs.io/docs/en/babel-plugin-transform-runtime) for details.
|
||||
|
||||
Note that this will only work for `esm` and `cjs` formats, and you need to make sure to set the `useESModules` option of `@babel/plugin-transform-runtime` to `true` if you create ESM output:
|
||||
|
||||
```js
|
||||
rollup.rollup({...})
|
||||
.then(bundle => bundle.generate({
|
||||
format: 'esm',
|
||||
plugins: [getBabelOutputPlugin({
|
||||
presets: ['@babel/preset-env'],
|
||||
plugins: [['@babel/plugin-transform-runtime', { useESModules: true }]]
|
||||
})]
|
||||
}))
|
||||
```
|
||||
|
||||
```js
|
||||
// input
|
||||
export default class Foo {}
|
||||
|
||||
// output
|
||||
import _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';
|
||||
|
||||
var Foo = function Foo() {
|
||||
_classCallCheck(this, Foo);
|
||||
};
|
||||
|
||||
export default Foo;
|
||||
```
|
||||
|
||||
And for CommonJS:
|
||||
|
||||
```js
|
||||
rollup.rollup({...})
|
||||
.then(bundle => bundle.generate({
|
||||
format: 'cjs',
|
||||
plugins: [getBabelOutputPlugin({
|
||||
presets: ['@babel/preset-env'],
|
||||
plugins: [['@babel/plugin-transform-runtime', { useESModules: false }]]
|
||||
})]
|
||||
}))
|
||||
```
|
||||
|
||||
```js
|
||||
// input
|
||||
export default class Foo {}
|
||||
|
||||
// output
|
||||
('use strict');
|
||||
|
||||
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
||||
|
||||
var Foo = function Foo() {
|
||||
_classCallCheck(this, Foo);
|
||||
};
|
||||
|
||||
module.exports = Foo;
|
||||
```
|
||||
|
||||
Another option is to use `@babel/plugin-external-helpers`, which will reference the global `babelHelpers` object. It is your responsibility to make sure this global variable exists.
|
||||
|
||||
## Custom plugin builder
|
||||
|
||||
`@rollup/plugin-babel` exposes a plugin-builder utility that allows users to add custom handling of Babel's configuration for each file that it processes.
|
||||
|
||||
`createBabelInputPluginFactory` accepts a callback that will be called with the loader's instance of `babel` so that tooling can ensure that it using exactly the same `@babel/core` instance as the loader itself.
|
||||
|
||||
It's main purpose is to allow other tools for configuration of transpilation without forcing people to add extra configuration but still allow for using their own babelrc / babel config files.
|
||||
|
||||
### Example
|
||||
|
||||
```js
|
||||
import { createBabelInputPluginFactory } from '@rollup/plugin-babel';
|
||||
|
||||
export default createBabelInputPluginFactory((babelCore) => {
|
||||
function myPlugin() {
|
||||
return {
|
||||
visitor: {}
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
// Passed the plugin options.
|
||||
options({ opt1, opt2, ...pluginOptions }) {
|
||||
return {
|
||||
// Pull out any custom options that the plugin might have.
|
||||
customOptions: { opt1, opt2 },
|
||||
|
||||
// Pass the options back with the two custom options removed.
|
||||
pluginOptions
|
||||
};
|
||||
},
|
||||
|
||||
config(cfg /* Passed Babel's 'PartialConfig' object. */, { code, customOptions }) {
|
||||
if (cfg.hasFilesystemConfig()) {
|
||||
// Use the normal config
|
||||
return cfg.options;
|
||||
}
|
||||
|
||||
return {
|
||||
...cfg.options,
|
||||
plugins: [
|
||||
...(cfg.options.plugins || []),
|
||||
|
||||
// Include a custom plugin in the options.
|
||||
myPlugin
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
result(result, { code, customOptions, config, transformOptions }) {
|
||||
return {
|
||||
...result,
|
||||
code: result.code + '\n// Generated by some custom plugin'
|
||||
};
|
||||
}
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
## Meta
|
||||
|
||||
[CONTRIBUTING](/.github/CONTRIBUTING.md)
|
||||
|
||||
[LICENSE (MIT)](/LICENSE)
|
||||
488
pwa/node_modules/@rollup/plugin-babel/dist/index.es.js
generated
vendored
Normal file
488
pwa/node_modules/@rollup/plugin-babel/dist/index.es.js
generated
vendored
Normal file
|
|
@ -0,0 +1,488 @@
|
|||
import * as babel from '@babel/core';
|
||||
import { createFilter } from '@rollup/pluginutils';
|
||||
import { addNamed } from '@babel/helper-module-imports';
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function ownKeys(object, enumerableOnly) {
|
||||
var keys = Object.keys(object);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(object);
|
||||
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||||
});
|
||||
keys.push.apply(keys, symbols);
|
||||
}
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
function _objectSpread2(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {};
|
||||
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
|
||||
var key, i;
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
||||
|
||||
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
||||
key = sourceSymbolKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
const BUNDLED = 'bundled';
|
||||
const INLINE = 'inline';
|
||||
const RUNTIME = 'runtime';
|
||||
const EXTERNAL = 'external'; // NOTE: DO NOT REMOVE the null character `\0` as it may be used by other plugins
|
||||
// e.g. https://github.com/rollup/rollup-plugin-node-resolve/blob/313a3e32f432f9eb18cc4c231cc7aac6df317a51/src/index.js#L74
|
||||
|
||||
const HELPERS = '\0rollupPluginBabelHelpers.js';
|
||||
|
||||
function importHelperPlugin({
|
||||
types: t
|
||||
}) {
|
||||
return {
|
||||
pre(file) {
|
||||
const cachedHelpers = {};
|
||||
file.set('helperGenerator', name => {
|
||||
if (!file.availableHelper(name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (cachedHelpers[name]) {
|
||||
return t.cloneNode(cachedHelpers[name]);
|
||||
}
|
||||
|
||||
return cachedHelpers[name] = addNamed(file.path, name, HELPERS);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
const addBabelPlugin = (options, plugin) => {
|
||||
return _objectSpread2(_objectSpread2({}, options), {}, {
|
||||
plugins: options.plugins.concat(plugin)
|
||||
});
|
||||
};
|
||||
const warned = {};
|
||||
function warnOnce(ctx, msg) {
|
||||
if (warned[msg]) return;
|
||||
warned[msg] = true;
|
||||
ctx.warn(msg);
|
||||
}
|
||||
const regExpCharactersRegExp = /[\\^$.*+?()[\]{}|]/g;
|
||||
const escapeRegExpCharacters = str => str.replace(regExpCharactersRegExp, '\\$&');
|
||||
function stripQuery(id) {
|
||||
// strip query params from import
|
||||
const [bareId, query] = id.split('?');
|
||||
const suffix = `${query ? `?${query}` : ''}`;
|
||||
return {
|
||||
bareId,
|
||||
query,
|
||||
suffix
|
||||
};
|
||||
}
|
||||
|
||||
const MODULE_ERROR = 'Rollup requires that your Babel configuration keeps ES6 module syntax intact. ' + 'Unfortunately it looks like your configuration specifies a module transformer ' + 'to replace ES6 modules with another module format. To continue you have to disable it.' + '\n\n' + "Most commonly it's a CommonJS transform added by @babel/preset-env - " + 'in such case you should disable it by adding `modules: false` option to that preset ' + '(described in more detail here - https://github.com/rollup/plugins/tree/master/packages/babel#modules ).';
|
||||
const UNEXPECTED_ERROR = 'An unexpected situation arose. Please raise an issue at ' + 'https://github.com/rollup/plugins/issues. Thanks!';
|
||||
const PREFLIGHT_TEST_STRING = '__ROLLUP__PREFLIGHT_CHECK_DO_NOT_TOUCH__';
|
||||
const PREFLIGHT_INPUT = `export default "${PREFLIGHT_TEST_STRING}";`;
|
||||
|
||||
function helpersTestTransform() {
|
||||
return {
|
||||
visitor: {
|
||||
StringLiteral(path, state) {
|
||||
if (path.node.value === PREFLIGHT_TEST_STRING) {
|
||||
path.replaceWith(state.file.addHelper('inherits'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const mismatchError = (actual, expected, filename) => `You have declared using "${expected}" babelHelpers, but transforming ${filename} resulted in "${actual}". Please check your configuration.`; // Revert to /\/helpers\/(esm\/)?inherits/ when Babel 8 gets released, this was fixed in https://github.com/babel/babel/issues/14185
|
||||
|
||||
|
||||
const inheritsHelperRe = /[\\/]+helpers[\\/]+(esm[\\/]+)?inherits/;
|
||||
async function preflightCheck(ctx, babelHelpers, transformOptions) {
|
||||
const finalOptions = addBabelPlugin(transformOptions, helpersTestTransform);
|
||||
const check = (await babel.transformAsync(PREFLIGHT_INPUT, finalOptions)).code; // Babel sometimes splits ExportDefaultDeclaration into 2 statements, so we also check for ExportNamedDeclaration
|
||||
|
||||
if (!/export (d|{)/.test(check)) {
|
||||
ctx.error(MODULE_ERROR);
|
||||
}
|
||||
|
||||
if (inheritsHelperRe.test(check)) {
|
||||
if (babelHelpers === RUNTIME) {
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.error(mismatchError(RUNTIME, babelHelpers, transformOptions.filename));
|
||||
}
|
||||
|
||||
if (check.includes('babelHelpers.inherits')) {
|
||||
if (babelHelpers === EXTERNAL) {
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.error(mismatchError(EXTERNAL, babelHelpers, transformOptions.filename));
|
||||
} // test unminifiable string content
|
||||
|
||||
|
||||
if (check.includes('Super expression must either be null or a function')) {
|
||||
if (babelHelpers === INLINE || babelHelpers === BUNDLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (babelHelpers === RUNTIME && !transformOptions.plugins.length) {
|
||||
ctx.error(`You must use the \`@babel/plugin-transform-runtime\` plugin when \`babelHelpers\` is "${RUNTIME}".\n`);
|
||||
}
|
||||
|
||||
ctx.error(mismatchError(INLINE, babelHelpers, transformOptions.filename));
|
||||
}
|
||||
|
||||
ctx.error(UNEXPECTED_ERROR);
|
||||
}
|
||||
|
||||
async function transformCode(inputCode, babelOptions, overrides, customOptions, ctx, finalizeOptions) {
|
||||
// loadPartialConfigAsync has become available in @babel/core@7.8.0
|
||||
const config = await (babel.loadPartialConfigAsync || babel.loadPartialConfig)(babelOptions); // file is ignored by babel
|
||||
|
||||
if (!config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let transformOptions = !overrides.config ? config.options : await overrides.config.call(ctx, config, {
|
||||
code: inputCode,
|
||||
customOptions
|
||||
});
|
||||
|
||||
if (finalizeOptions) {
|
||||
transformOptions = await finalizeOptions(transformOptions);
|
||||
}
|
||||
|
||||
if (!overrides.result) {
|
||||
const {
|
||||
code,
|
||||
map
|
||||
} = await babel.transformAsync(inputCode, transformOptions);
|
||||
return {
|
||||
code,
|
||||
map
|
||||
};
|
||||
}
|
||||
|
||||
const result = await babel.transformAsync(inputCode, transformOptions);
|
||||
const {
|
||||
code,
|
||||
map
|
||||
} = await overrides.result.call(ctx, result, {
|
||||
code: inputCode,
|
||||
customOptions,
|
||||
config,
|
||||
transformOptions
|
||||
});
|
||||
return {
|
||||
code,
|
||||
map
|
||||
};
|
||||
}
|
||||
|
||||
const unpackOptions = (_ref = {}) => {
|
||||
let {
|
||||
extensions = babel.DEFAULT_EXTENSIONS,
|
||||
// rollup uses sourcemap, babel uses sourceMaps
|
||||
// just normalize them here so people don't have to worry about it
|
||||
sourcemap = true,
|
||||
sourcemaps = true,
|
||||
sourceMap = true,
|
||||
sourceMaps = true
|
||||
} = _ref,
|
||||
rest = _objectWithoutProperties(_ref, ["extensions", "sourcemap", "sourcemaps", "sourceMap", "sourceMaps"]);
|
||||
|
||||
return _objectSpread2(_objectSpread2({
|
||||
extensions,
|
||||
plugins: [],
|
||||
sourceMaps: sourcemap && sourcemaps && sourceMap && sourceMaps
|
||||
}, rest), {}, {
|
||||
caller: _objectSpread2({
|
||||
name: '@rollup/plugin-babel'
|
||||
}, rest.caller)
|
||||
});
|
||||
};
|
||||
|
||||
const warnAboutDeprecatedHelpersOption = ({
|
||||
deprecatedOption,
|
||||
suggestion
|
||||
}) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`\`${deprecatedOption}\` has been removed in favor a \`babelHelpers\` option. Try changing your configuration to \`${suggestion}\`. ` + `Refer to the documentation to learn more: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers`);
|
||||
};
|
||||
|
||||
const unpackInputPluginOptions = (_ref2, rollupVersion) => {
|
||||
let {
|
||||
skipPreflightCheck = false
|
||||
} = _ref2,
|
||||
rest = _objectWithoutProperties(_ref2, ["skipPreflightCheck"]);
|
||||
|
||||
if ('runtimeHelpers' in rest) {
|
||||
warnAboutDeprecatedHelpersOption({
|
||||
deprecatedOption: 'runtimeHelpers',
|
||||
suggestion: `babelHelpers: 'runtime'`
|
||||
});
|
||||
} else if ('externalHelpers' in rest) {
|
||||
warnAboutDeprecatedHelpersOption({
|
||||
deprecatedOption: 'externalHelpers',
|
||||
suggestion: `babelHelpers: 'external'`
|
||||
});
|
||||
} else if (!rest.babelHelpers) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn("babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: " + 'https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers');
|
||||
}
|
||||
|
||||
return unpackOptions(_objectSpread2(_objectSpread2({}, rest), {}, {
|
||||
skipPreflightCheck,
|
||||
babelHelpers: rest.babelHelpers || BUNDLED,
|
||||
caller: _objectSpread2({
|
||||
supportsStaticESM: true,
|
||||
supportsDynamicImport: true,
|
||||
supportsTopLevelAwait: true,
|
||||
// todo: remove version checks for 1.20 - 1.25 when we bump peer deps
|
||||
supportsExportNamespaceFrom: !rollupVersion.match(/^1\.2[0-5]\./)
|
||||
}, rest.caller)
|
||||
}));
|
||||
};
|
||||
|
||||
const unpackOutputPluginOptions = (options, {
|
||||
format
|
||||
}) => unpackOptions(_objectSpread2(_objectSpread2({
|
||||
configFile: false,
|
||||
sourceType: format === 'es' ? 'module' : 'script'
|
||||
}, options), {}, {
|
||||
caller: _objectSpread2({
|
||||
supportsStaticESM: format === 'es'
|
||||
}, options.caller)
|
||||
}));
|
||||
|
||||
function getOptionsWithOverrides(pluginOptions = {}, overrides = {}) {
|
||||
if (!overrides.options) return {
|
||||
customOptions: null,
|
||||
pluginOptionsWithOverrides: pluginOptions
|
||||
};
|
||||
const overridden = overrides.options(pluginOptions);
|
||||
|
||||
if (typeof overridden.then === 'function') {
|
||||
throw new Error(".options hook can't be asynchronous. It should return `{ customOptions, pluginsOptions }` synchronously.");
|
||||
}
|
||||
|
||||
return {
|
||||
customOptions: overridden.customOptions || null,
|
||||
pluginOptionsWithOverrides: overridden.pluginOptions || pluginOptions
|
||||
};
|
||||
}
|
||||
|
||||
const returnObject = () => {
|
||||
return {};
|
||||
};
|
||||
|
||||
function createBabelInputPluginFactory(customCallback = returnObject) {
|
||||
const overrides = customCallback(babel);
|
||||
return pluginOptions => {
|
||||
const {
|
||||
customOptions,
|
||||
pluginOptionsWithOverrides
|
||||
} = getOptionsWithOverrides(pluginOptions, overrides);
|
||||
let babelHelpers;
|
||||
let babelOptions;
|
||||
let filter;
|
||||
let skipPreflightCheck;
|
||||
return {
|
||||
name: 'babel',
|
||||
|
||||
options() {
|
||||
// todo: remove options hook and hoist declarations when version checks are removed
|
||||
let exclude;
|
||||
let include;
|
||||
let extensions;
|
||||
let customFilter;
|
||||
|
||||
var _unpackInputPluginOpt = unpackInputPluginOptions(pluginOptionsWithOverrides, this.meta.rollupVersion);
|
||||
|
||||
({
|
||||
exclude,
|
||||
extensions,
|
||||
babelHelpers,
|
||||
include,
|
||||
filter: customFilter,
|
||||
skipPreflightCheck
|
||||
} = _unpackInputPluginOpt);
|
||||
babelOptions = _objectWithoutProperties(_unpackInputPluginOpt, ["exclude", "extensions", "babelHelpers", "include", "filter", "skipPreflightCheck"]);
|
||||
const extensionRegExp = new RegExp(`(${extensions.map(escapeRegExpCharacters).join('|')})$`);
|
||||
|
||||
if (customFilter && (include || exclude)) {
|
||||
throw new Error('Could not handle include or exclude with custom filter together');
|
||||
}
|
||||
|
||||
const userDefinedFilter = typeof customFilter === 'function' ? customFilter : createFilter(include, exclude);
|
||||
|
||||
filter = id => extensionRegExp.test(stripQuery(id).bareId) && userDefinedFilter(id);
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
resolveId(id) {
|
||||
if (id !== HELPERS) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return id;
|
||||
},
|
||||
|
||||
load(id) {
|
||||
if (id !== HELPERS) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return babel.buildExternalHelpers(null, 'module');
|
||||
},
|
||||
|
||||
transform(code, filename) {
|
||||
if (!filter(filename)) return null;
|
||||
if (filename === HELPERS) return null;
|
||||
return transformCode(code, _objectSpread2(_objectSpread2({}, babelOptions), {}, {
|
||||
filename
|
||||
}), overrides, customOptions, this, async transformOptions => {
|
||||
if (!skipPreflightCheck) {
|
||||
await preflightCheck(this, babelHelpers, transformOptions);
|
||||
}
|
||||
|
||||
return babelHelpers === BUNDLED ? addBabelPlugin(transformOptions, importHelperPlugin) : transformOptions;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function getRecommendedFormat(rollupFormat) {
|
||||
switch (rollupFormat) {
|
||||
case 'amd':
|
||||
return 'amd';
|
||||
|
||||
case 'iife':
|
||||
case 'umd':
|
||||
return 'umd';
|
||||
|
||||
case 'system':
|
||||
return 'systemjs';
|
||||
|
||||
default:
|
||||
return '<module format>';
|
||||
}
|
||||
}
|
||||
|
||||
function createBabelOutputPluginFactory(customCallback = returnObject) {
|
||||
const overrides = customCallback(babel);
|
||||
return pluginOptions => {
|
||||
const {
|
||||
customOptions,
|
||||
pluginOptionsWithOverrides
|
||||
} = getOptionsWithOverrides(pluginOptions, overrides);
|
||||
return {
|
||||
name: 'babel',
|
||||
|
||||
renderStart(outputOptions) {
|
||||
const {
|
||||
extensions,
|
||||
include,
|
||||
exclude,
|
||||
allowAllFormats
|
||||
} = pluginOptionsWithOverrides;
|
||||
|
||||
if (extensions || include || exclude) {
|
||||
warnOnce(this, 'The "include", "exclude" and "extensions" options are ignored when transforming the output.');
|
||||
}
|
||||
|
||||
if (!allowAllFormats && outputOptions.format !== 'es' && outputOptions.format !== 'cjs') {
|
||||
this.error(`Using Babel on the generated chunks is strongly discouraged for formats other than "esm" or "cjs" as it can easily break wrapper code and lead to accidentally created global variables. Instead, you should set "output.format" to "esm" and use Babel to transform to another format, e.g. by adding "presets: [['@babel/env', { modules: '${getRecommendedFormat(outputOptions.format)}' }]]" to your Babel options. If you still want to proceed, add "allowAllFormats: true" to your plugin options.`);
|
||||
}
|
||||
},
|
||||
|
||||
renderChunk(code, chunk, outputOptions) {
|
||||
/* eslint-disable no-unused-vars */
|
||||
const _unpackOutputPluginOp = unpackOutputPluginOptions(pluginOptionsWithOverrides, outputOptions),
|
||||
babelOptions = _objectWithoutProperties(_unpackOutputPluginOp, ["allowAllFormats", "exclude", "extensions", "externalHelpers", "externalHelpersWhitelist", "include", "runtimeHelpers"]);
|
||||
/* eslint-enable no-unused-vars */
|
||||
|
||||
|
||||
return transformCode(code, babelOptions, overrides, customOptions, this);
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
} // export this for symmetry with output-related exports
|
||||
|
||||
|
||||
const getBabelInputPlugin = createBabelInputPluginFactory();
|
||||
const getBabelOutputPlugin = createBabelOutputPluginFactory();
|
||||
|
||||
export { getBabelInputPlugin as babel, createBabelInputPluginFactory, createBabelOutputPluginFactory, getBabelInputPlugin as default, getBabelInputPlugin, getBabelOutputPlugin };
|
||||
517
pwa/node_modules/@rollup/plugin-babel/dist/index.js
generated
vendored
Normal file
517
pwa/node_modules/@rollup/plugin-babel/dist/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,517 @@
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var babel = require('@babel/core');
|
||||
var pluginutils = require('@rollup/pluginutils');
|
||||
var helperModuleImports = require('@babel/helper-module-imports');
|
||||
|
||||
function _interopNamespace(e) {
|
||||
if (e && e.__esModule) return e;
|
||||
var n = Object.create(null);
|
||||
if (e) {
|
||||
Object.keys(e).forEach(function (k) {
|
||||
if (k !== 'default') {
|
||||
var d = Object.getOwnPropertyDescriptor(e, k);
|
||||
Object.defineProperty(n, k, d.get ? d : {
|
||||
enumerable: true,
|
||||
get: function () { return e[k]; }
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
n["default"] = e;
|
||||
return Object.freeze(n);
|
||||
}
|
||||
|
||||
var babel__namespace = /*#__PURE__*/_interopNamespace(babel);
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function ownKeys(object, enumerableOnly) {
|
||||
var keys = Object.keys(object);
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var symbols = Object.getOwnPropertySymbols(object);
|
||||
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
||||
});
|
||||
keys.push.apply(keys, symbols);
|
||||
}
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
function _objectSpread2(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {};
|
||||
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
|
||||
var key, i;
|
||||
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
||||
|
||||
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
||||
key = sourceSymbolKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
const BUNDLED = 'bundled';
|
||||
const INLINE = 'inline';
|
||||
const RUNTIME = 'runtime';
|
||||
const EXTERNAL = 'external'; // NOTE: DO NOT REMOVE the null character `\0` as it may be used by other plugins
|
||||
// e.g. https://github.com/rollup/rollup-plugin-node-resolve/blob/313a3e32f432f9eb18cc4c231cc7aac6df317a51/src/index.js#L74
|
||||
|
||||
const HELPERS = '\0rollupPluginBabelHelpers.js';
|
||||
|
||||
function importHelperPlugin({
|
||||
types: t
|
||||
}) {
|
||||
return {
|
||||
pre(file) {
|
||||
const cachedHelpers = {};
|
||||
file.set('helperGenerator', name => {
|
||||
if (!file.availableHelper(name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (cachedHelpers[name]) {
|
||||
return t.cloneNode(cachedHelpers[name]);
|
||||
}
|
||||
|
||||
return cachedHelpers[name] = helperModuleImports.addNamed(file.path, name, HELPERS);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
const addBabelPlugin = (options, plugin) => {
|
||||
return _objectSpread2(_objectSpread2({}, options), {}, {
|
||||
plugins: options.plugins.concat(plugin)
|
||||
});
|
||||
};
|
||||
const warned = {};
|
||||
function warnOnce(ctx, msg) {
|
||||
if (warned[msg]) return;
|
||||
warned[msg] = true;
|
||||
ctx.warn(msg);
|
||||
}
|
||||
const regExpCharactersRegExp = /[\\^$.*+?()[\]{}|]/g;
|
||||
const escapeRegExpCharacters = str => str.replace(regExpCharactersRegExp, '\\$&');
|
||||
function stripQuery(id) {
|
||||
// strip query params from import
|
||||
const [bareId, query] = id.split('?');
|
||||
const suffix = `${query ? `?${query}` : ''}`;
|
||||
return {
|
||||
bareId,
|
||||
query,
|
||||
suffix
|
||||
};
|
||||
}
|
||||
|
||||
const MODULE_ERROR = 'Rollup requires that your Babel configuration keeps ES6 module syntax intact. ' + 'Unfortunately it looks like your configuration specifies a module transformer ' + 'to replace ES6 modules with another module format. To continue you have to disable it.' + '\n\n' + "Most commonly it's a CommonJS transform added by @babel/preset-env - " + 'in such case you should disable it by adding `modules: false` option to that preset ' + '(described in more detail here - https://github.com/rollup/plugins/tree/master/packages/babel#modules ).';
|
||||
const UNEXPECTED_ERROR = 'An unexpected situation arose. Please raise an issue at ' + 'https://github.com/rollup/plugins/issues. Thanks!';
|
||||
const PREFLIGHT_TEST_STRING = '__ROLLUP__PREFLIGHT_CHECK_DO_NOT_TOUCH__';
|
||||
const PREFLIGHT_INPUT = `export default "${PREFLIGHT_TEST_STRING}";`;
|
||||
|
||||
function helpersTestTransform() {
|
||||
return {
|
||||
visitor: {
|
||||
StringLiteral(path, state) {
|
||||
if (path.node.value === PREFLIGHT_TEST_STRING) {
|
||||
path.replaceWith(state.file.addHelper('inherits'));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const mismatchError = (actual, expected, filename) => `You have declared using "${expected}" babelHelpers, but transforming ${filename} resulted in "${actual}". Please check your configuration.`; // Revert to /\/helpers\/(esm\/)?inherits/ when Babel 8 gets released, this was fixed in https://github.com/babel/babel/issues/14185
|
||||
|
||||
|
||||
const inheritsHelperRe = /[\\/]+helpers[\\/]+(esm[\\/]+)?inherits/;
|
||||
async function preflightCheck(ctx, babelHelpers, transformOptions) {
|
||||
const finalOptions = addBabelPlugin(transformOptions, helpersTestTransform);
|
||||
const check = (await babel__namespace.transformAsync(PREFLIGHT_INPUT, finalOptions)).code; // Babel sometimes splits ExportDefaultDeclaration into 2 statements, so we also check for ExportNamedDeclaration
|
||||
|
||||
if (!/export (d|{)/.test(check)) {
|
||||
ctx.error(MODULE_ERROR);
|
||||
}
|
||||
|
||||
if (inheritsHelperRe.test(check)) {
|
||||
if (babelHelpers === RUNTIME) {
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.error(mismatchError(RUNTIME, babelHelpers, transformOptions.filename));
|
||||
}
|
||||
|
||||
if (check.includes('babelHelpers.inherits')) {
|
||||
if (babelHelpers === EXTERNAL) {
|
||||
return;
|
||||
}
|
||||
|
||||
ctx.error(mismatchError(EXTERNAL, babelHelpers, transformOptions.filename));
|
||||
} // test unminifiable string content
|
||||
|
||||
|
||||
if (check.includes('Super expression must either be null or a function')) {
|
||||
if (babelHelpers === INLINE || babelHelpers === BUNDLED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (babelHelpers === RUNTIME && !transformOptions.plugins.length) {
|
||||
ctx.error(`You must use the \`@babel/plugin-transform-runtime\` plugin when \`babelHelpers\` is "${RUNTIME}".\n`);
|
||||
}
|
||||
|
||||
ctx.error(mismatchError(INLINE, babelHelpers, transformOptions.filename));
|
||||
}
|
||||
|
||||
ctx.error(UNEXPECTED_ERROR);
|
||||
}
|
||||
|
||||
async function transformCode(inputCode, babelOptions, overrides, customOptions, ctx, finalizeOptions) {
|
||||
// loadPartialConfigAsync has become available in @babel/core@7.8.0
|
||||
const config = await (babel__namespace.loadPartialConfigAsync || babel__namespace.loadPartialConfig)(babelOptions); // file is ignored by babel
|
||||
|
||||
if (!config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let transformOptions = !overrides.config ? config.options : await overrides.config.call(ctx, config, {
|
||||
code: inputCode,
|
||||
customOptions
|
||||
});
|
||||
|
||||
if (finalizeOptions) {
|
||||
transformOptions = await finalizeOptions(transformOptions);
|
||||
}
|
||||
|
||||
if (!overrides.result) {
|
||||
const {
|
||||
code,
|
||||
map
|
||||
} = await babel__namespace.transformAsync(inputCode, transformOptions);
|
||||
return {
|
||||
code,
|
||||
map
|
||||
};
|
||||
}
|
||||
|
||||
const result = await babel__namespace.transformAsync(inputCode, transformOptions);
|
||||
const {
|
||||
code,
|
||||
map
|
||||
} = await overrides.result.call(ctx, result, {
|
||||
code: inputCode,
|
||||
customOptions,
|
||||
config,
|
||||
transformOptions
|
||||
});
|
||||
return {
|
||||
code,
|
||||
map
|
||||
};
|
||||
}
|
||||
|
||||
const unpackOptions = (_ref = {}) => {
|
||||
let {
|
||||
extensions = babel__namespace.DEFAULT_EXTENSIONS,
|
||||
// rollup uses sourcemap, babel uses sourceMaps
|
||||
// just normalize them here so people don't have to worry about it
|
||||
sourcemap = true,
|
||||
sourcemaps = true,
|
||||
sourceMap = true,
|
||||
sourceMaps = true
|
||||
} = _ref,
|
||||
rest = _objectWithoutProperties(_ref, ["extensions", "sourcemap", "sourcemaps", "sourceMap", "sourceMaps"]);
|
||||
|
||||
return _objectSpread2(_objectSpread2({
|
||||
extensions,
|
||||
plugins: [],
|
||||
sourceMaps: sourcemap && sourcemaps && sourceMap && sourceMaps
|
||||
}, rest), {}, {
|
||||
caller: _objectSpread2({
|
||||
name: '@rollup/plugin-babel'
|
||||
}, rest.caller)
|
||||
});
|
||||
};
|
||||
|
||||
const warnAboutDeprecatedHelpersOption = ({
|
||||
deprecatedOption,
|
||||
suggestion
|
||||
}) => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`\`${deprecatedOption}\` has been removed in favor a \`babelHelpers\` option. Try changing your configuration to \`${suggestion}\`. ` + `Refer to the documentation to learn more: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers`);
|
||||
};
|
||||
|
||||
const unpackInputPluginOptions = (_ref2, rollupVersion) => {
|
||||
let {
|
||||
skipPreflightCheck = false
|
||||
} = _ref2,
|
||||
rest = _objectWithoutProperties(_ref2, ["skipPreflightCheck"]);
|
||||
|
||||
if ('runtimeHelpers' in rest) {
|
||||
warnAboutDeprecatedHelpersOption({
|
||||
deprecatedOption: 'runtimeHelpers',
|
||||
suggestion: `babelHelpers: 'runtime'`
|
||||
});
|
||||
} else if ('externalHelpers' in rest) {
|
||||
warnAboutDeprecatedHelpersOption({
|
||||
deprecatedOption: 'externalHelpers',
|
||||
suggestion: `babelHelpers: 'external'`
|
||||
});
|
||||
} else if (!rest.babelHelpers) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn("babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: " + 'https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers');
|
||||
}
|
||||
|
||||
return unpackOptions(_objectSpread2(_objectSpread2({}, rest), {}, {
|
||||
skipPreflightCheck,
|
||||
babelHelpers: rest.babelHelpers || BUNDLED,
|
||||
caller: _objectSpread2({
|
||||
supportsStaticESM: true,
|
||||
supportsDynamicImport: true,
|
||||
supportsTopLevelAwait: true,
|
||||
// todo: remove version checks for 1.20 - 1.25 when we bump peer deps
|
||||
supportsExportNamespaceFrom: !rollupVersion.match(/^1\.2[0-5]\./)
|
||||
}, rest.caller)
|
||||
}));
|
||||
};
|
||||
|
||||
const unpackOutputPluginOptions = (options, {
|
||||
format
|
||||
}) => unpackOptions(_objectSpread2(_objectSpread2({
|
||||
configFile: false,
|
||||
sourceType: format === 'es' ? 'module' : 'script'
|
||||
}, options), {}, {
|
||||
caller: _objectSpread2({
|
||||
supportsStaticESM: format === 'es'
|
||||
}, options.caller)
|
||||
}));
|
||||
|
||||
function getOptionsWithOverrides(pluginOptions = {}, overrides = {}) {
|
||||
if (!overrides.options) return {
|
||||
customOptions: null,
|
||||
pluginOptionsWithOverrides: pluginOptions
|
||||
};
|
||||
const overridden = overrides.options(pluginOptions);
|
||||
|
||||
if (typeof overridden.then === 'function') {
|
||||
throw new Error(".options hook can't be asynchronous. It should return `{ customOptions, pluginsOptions }` synchronously.");
|
||||
}
|
||||
|
||||
return {
|
||||
customOptions: overridden.customOptions || null,
|
||||
pluginOptionsWithOverrides: overridden.pluginOptions || pluginOptions
|
||||
};
|
||||
}
|
||||
|
||||
const returnObject = () => {
|
||||
return {};
|
||||
};
|
||||
|
||||
function createBabelInputPluginFactory(customCallback = returnObject) {
|
||||
const overrides = customCallback(babel__namespace);
|
||||
return pluginOptions => {
|
||||
const {
|
||||
customOptions,
|
||||
pluginOptionsWithOverrides
|
||||
} = getOptionsWithOverrides(pluginOptions, overrides);
|
||||
let babelHelpers;
|
||||
let babelOptions;
|
||||
let filter;
|
||||
let skipPreflightCheck;
|
||||
return {
|
||||
name: 'babel',
|
||||
|
||||
options() {
|
||||
// todo: remove options hook and hoist declarations when version checks are removed
|
||||
let exclude;
|
||||
let include;
|
||||
let extensions;
|
||||
let customFilter;
|
||||
|
||||
var _unpackInputPluginOpt = unpackInputPluginOptions(pluginOptionsWithOverrides, this.meta.rollupVersion);
|
||||
|
||||
({
|
||||
exclude,
|
||||
extensions,
|
||||
babelHelpers,
|
||||
include,
|
||||
filter: customFilter,
|
||||
skipPreflightCheck
|
||||
} = _unpackInputPluginOpt);
|
||||
babelOptions = _objectWithoutProperties(_unpackInputPluginOpt, ["exclude", "extensions", "babelHelpers", "include", "filter", "skipPreflightCheck"]);
|
||||
const extensionRegExp = new RegExp(`(${extensions.map(escapeRegExpCharacters).join('|')})$`);
|
||||
|
||||
if (customFilter && (include || exclude)) {
|
||||
throw new Error('Could not handle include or exclude with custom filter together');
|
||||
}
|
||||
|
||||
const userDefinedFilter = typeof customFilter === 'function' ? customFilter : pluginutils.createFilter(include, exclude);
|
||||
|
||||
filter = id => extensionRegExp.test(stripQuery(id).bareId) && userDefinedFilter(id);
|
||||
|
||||
return null;
|
||||
},
|
||||
|
||||
resolveId(id) {
|
||||
if (id !== HELPERS) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return id;
|
||||
},
|
||||
|
||||
load(id) {
|
||||
if (id !== HELPERS) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return babel__namespace.buildExternalHelpers(null, 'module');
|
||||
},
|
||||
|
||||
transform(code, filename) {
|
||||
if (!filter(filename)) return null;
|
||||
if (filename === HELPERS) return null;
|
||||
return transformCode(code, _objectSpread2(_objectSpread2({}, babelOptions), {}, {
|
||||
filename
|
||||
}), overrides, customOptions, this, async transformOptions => {
|
||||
if (!skipPreflightCheck) {
|
||||
await preflightCheck(this, babelHelpers, transformOptions);
|
||||
}
|
||||
|
||||
return babelHelpers === BUNDLED ? addBabelPlugin(transformOptions, importHelperPlugin) : transformOptions;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function getRecommendedFormat(rollupFormat) {
|
||||
switch (rollupFormat) {
|
||||
case 'amd':
|
||||
return 'amd';
|
||||
|
||||
case 'iife':
|
||||
case 'umd':
|
||||
return 'umd';
|
||||
|
||||
case 'system':
|
||||
return 'systemjs';
|
||||
|
||||
default:
|
||||
return '<module format>';
|
||||
}
|
||||
}
|
||||
|
||||
function createBabelOutputPluginFactory(customCallback = returnObject) {
|
||||
const overrides = customCallback(babel__namespace);
|
||||
return pluginOptions => {
|
||||
const {
|
||||
customOptions,
|
||||
pluginOptionsWithOverrides
|
||||
} = getOptionsWithOverrides(pluginOptions, overrides);
|
||||
return {
|
||||
name: 'babel',
|
||||
|
||||
renderStart(outputOptions) {
|
||||
const {
|
||||
extensions,
|
||||
include,
|
||||
exclude,
|
||||
allowAllFormats
|
||||
} = pluginOptionsWithOverrides;
|
||||
|
||||
if (extensions || include || exclude) {
|
||||
warnOnce(this, 'The "include", "exclude" and "extensions" options are ignored when transforming the output.');
|
||||
}
|
||||
|
||||
if (!allowAllFormats && outputOptions.format !== 'es' && outputOptions.format !== 'cjs') {
|
||||
this.error(`Using Babel on the generated chunks is strongly discouraged for formats other than "esm" or "cjs" as it can easily break wrapper code and lead to accidentally created global variables. Instead, you should set "output.format" to "esm" and use Babel to transform to another format, e.g. by adding "presets: [['@babel/env', { modules: '${getRecommendedFormat(outputOptions.format)}' }]]" to your Babel options. If you still want to proceed, add "allowAllFormats: true" to your plugin options.`);
|
||||
}
|
||||
},
|
||||
|
||||
renderChunk(code, chunk, outputOptions) {
|
||||
/* eslint-disable no-unused-vars */
|
||||
const _unpackOutputPluginOp = unpackOutputPluginOptions(pluginOptionsWithOverrides, outputOptions),
|
||||
babelOptions = _objectWithoutProperties(_unpackOutputPluginOp, ["allowAllFormats", "exclude", "extensions", "externalHelpers", "externalHelpersWhitelist", "include", "runtimeHelpers"]);
|
||||
/* eslint-enable no-unused-vars */
|
||||
|
||||
|
||||
return transformCode(code, babelOptions, overrides, customOptions, this);
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
} // export this for symmetry with output-related exports
|
||||
|
||||
|
||||
const getBabelInputPlugin = createBabelInputPluginFactory();
|
||||
const getBabelOutputPlugin = createBabelOutputPluginFactory();
|
||||
|
||||
exports.babel = getBabelInputPlugin;
|
||||
exports.createBabelInputPluginFactory = createBabelInputPluginFactory;
|
||||
exports.createBabelOutputPluginFactory = createBabelOutputPluginFactory;
|
||||
exports["default"] = getBabelInputPlugin;
|
||||
exports.getBabelInputPlugin = getBabelInputPlugin;
|
||||
exports.getBabelOutputPlugin = getBabelOutputPlugin;
|
||||
1
pwa/node_modules/@rollup/plugin-babel/node_modules/.bin/rollup
generated
vendored
Symbolic link
1
pwa/node_modules/@rollup/plugin-babel/node_modules/.bin/rollup
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../rollup/dist/bin/rollup
|
||||
703
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/LICENSE.md
generated
vendored
Normal file
703
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/LICENSE.md
generated
vendored
Normal file
|
|
@ -0,0 +1,703 @@
|
|||
# Rollup core license
|
||||
Rollup is released under the MIT license:
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 [these people](https://github.com/rollup/rollup/graphs/contributors)
|
||||
|
||||
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.
|
||||
|
||||
# Licenses of bundled dependencies
|
||||
The published Rollup artifact additionally contains code with the following licenses:
|
||||
MIT, ISC
|
||||
|
||||
# Bundled dependencies:
|
||||
## @rollup/pluginutils
|
||||
License: MIT
|
||||
By: Rich Harris
|
||||
Repository: rollup/plugins
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## acorn
|
||||
License: MIT
|
||||
By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
|
||||
Repository: https://github.com/acornjs/acorn.git
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (C) 2012-2022 by various contributors (see AUTHORS)
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## acorn-walk
|
||||
License: MIT
|
||||
By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
|
||||
Repository: https://github.com/acornjs/acorn.git
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (C) 2012-2020 by various contributors (see AUTHORS)
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## anymatch
|
||||
License: ISC
|
||||
By: Elan Shanker
|
||||
Repository: https://github.com/micromatch/anymatch
|
||||
|
||||
> The ISC License
|
||||
>
|
||||
> Copyright (c) 2019 Elan Shanker, Paul Miller (https://paulmillr.com)
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## binary-extensions
|
||||
License: MIT
|
||||
By: Sindre Sorhus
|
||||
Repository: sindresorhus/binary-extensions
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## braces
|
||||
License: MIT
|
||||
By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm
|
||||
Repository: micromatch/braces
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2014-2018, 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## chokidar
|
||||
License: MIT
|
||||
By: Paul Miller, Elan Shanker
|
||||
Repository: git+https://github.com/paulmillr/chokidar.git
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com), Elan Shanker
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## colorette
|
||||
License: MIT
|
||||
By: Jorge Bucaran
|
||||
Repository: jorgebucaran/colorette
|
||||
|
||||
> Copyright © Jorge Bucaran <<https://jorgebucaran.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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## date-time
|
||||
License: MIT
|
||||
By: Sindre Sorhus
|
||||
Repository: sindresorhus/date-time
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## fill-range
|
||||
License: MIT
|
||||
By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling
|
||||
Repository: jonschlinkert/fill-range
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2014-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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## glob-parent
|
||||
License: ISC
|
||||
By: Gulp Team, Elan Shanker, Blaine Bublitz
|
||||
Repository: gulpjs/glob-parent
|
||||
|
||||
> The ISC License
|
||||
>
|
||||
> Copyright (c) 2015, 2019 Elan Shanker
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## hash.js
|
||||
License: MIT
|
||||
By: Fedor Indutny
|
||||
Repository: git@github.com:indutny/hash.js
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## inherits
|
||||
License: ISC
|
||||
Repository: git://github.com/isaacs/inherits
|
||||
|
||||
> The ISC License
|
||||
>
|
||||
> Copyright (c) Isaac Z. Schlueter
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## is-binary-path
|
||||
License: MIT
|
||||
By: Sindre Sorhus
|
||||
Repository: sindresorhus/is-binary-path
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) 2019 Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com), Paul Miller (https://paulmillr.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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## is-extglob
|
||||
License: MIT
|
||||
By: Jon Schlinkert
|
||||
Repository: jonschlinkert/is-extglob
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2014-2016, 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## is-glob
|
||||
License: MIT
|
||||
By: Jon Schlinkert, Brian Woodward, Daniel Perez
|
||||
Repository: micromatch/is-glob
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2014-2017, 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## is-number
|
||||
License: MIT
|
||||
By: Jon Schlinkert, Olsten Larck, Rouven Weßling
|
||||
Repository: jonschlinkert/is-number
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2014-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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## is-reference
|
||||
License: MIT
|
||||
By: Rich Harris
|
||||
Repository: git+https://github.com/Rich-Harris/is-reference.git
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## locate-character
|
||||
License: MIT
|
||||
By: Rich Harris
|
||||
Repository: Rich-Harris/locate-character
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## magic-string
|
||||
License: MIT
|
||||
By: Rich Harris
|
||||
Repository: https://github.com/rich-harris/magic-string
|
||||
|
||||
> Copyright 2018 Rich Harris
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## minimalistic-assert
|
||||
License: ISC
|
||||
Repository: https://github.com/calvinmetcalf/minimalistic-assert.git
|
||||
|
||||
> Copyright 2015 Calvin Metcalf
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## normalize-path
|
||||
License: MIT
|
||||
By: Jon Schlinkert, Blaine Bublitz
|
||||
Repository: jonschlinkert/normalize-path
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2014-2018, 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## parse-ms
|
||||
License: MIT
|
||||
By: Sindre Sorhus
|
||||
Repository: sindresorhus/parse-ms
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## picomatch
|
||||
License: MIT
|
||||
By: Jon Schlinkert
|
||||
Repository: micromatch/picomatch
|
||||
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## pretty-bytes
|
||||
License: MIT
|
||||
By: Sindre Sorhus
|
||||
Repository: sindresorhus/pretty-bytes
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## pretty-ms
|
||||
License: MIT
|
||||
By: Sindre Sorhus
|
||||
Repository: sindresorhus/pretty-ms
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## readdirp
|
||||
License: MIT
|
||||
By: Thorsten Lorenz, Paul Miller
|
||||
Repository: git://github.com/paulmillr/readdirp.git
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## signal-exit
|
||||
License: ISC
|
||||
By: Ben Coe
|
||||
Repository: https://github.com/tapjs/signal-exit.git
|
||||
|
||||
> The ISC License
|
||||
>
|
||||
> Copyright (c) 2015, Contributors
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## sourcemap-codec
|
||||
License: MIT
|
||||
By: Rich Harris
|
||||
Repository: https://github.com/Rich-Harris/sourcemap-codec
|
||||
|
||||
> The MIT License
|
||||
>
|
||||
> Copyright (c) 2015 Rich Harris
|
||||
>
|
||||
> 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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## time-zone
|
||||
License: MIT
|
||||
By: Sindre Sorhus
|
||||
Repository: sindresorhus/time-zone
|
||||
|
||||
> MIT License
|
||||
>
|
||||
> Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## to-regex-range
|
||||
License: MIT
|
||||
By: Jon Schlinkert, Rouven Weßling
|
||||
Repository: micromatch/to-regex-range
|
||||
|
||||
> The MIT License (MIT)
|
||||
>
|
||||
> Copyright (c) 2015-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.
|
||||
|
||||
---------------------------------------
|
||||
|
||||
## yargs-parser
|
||||
License: ISC
|
||||
By: Ben Coe
|
||||
Repository: https://github.com/yargs/yargs-parser.git
|
||||
|
||||
> Copyright (c) 2016, Contributors
|
||||
>
|
||||
> 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.
|
||||
125
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/README.md
generated
vendored
Normal file
125
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
<p align="center">
|
||||
<a href="https://rollupjs.org/"><img src="https://rollupjs.org/logo.svg" width="150" /></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/package/rollup">
|
||||
<img src="https://img.shields.io/npm/v/rollup.svg" alt="npm version" >
|
||||
</a>
|
||||
<a href="https://packagephobia.now.sh/result?p=rollup">
|
||||
<img src="https://packagephobia.now.sh/badge?p=rollup" alt="install size" >
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/rollup/rollup">
|
||||
<img src="https://codecov.io/gh/rollup/rollup/graph/badge.svg" alt="code coverage" >
|
||||
</a>
|
||||
<a href="#backers" alt="sponsors on Open Collective">
|
||||
<img src="https://opencollective.com/rollup/backers/badge.svg" alt="backers" >
|
||||
</a>
|
||||
<a href="#sponsors" alt="Sponsors on Open Collective">
|
||||
<img src="https://opencollective.com/rollup/sponsors/badge.svg" alt="sponsors" >
|
||||
</a>
|
||||
<a href="https://github.com/rollup/rollup/blob/master/LICENSE.md">
|
||||
<img src="https://img.shields.io/npm/l/rollup.svg" alt="license">
|
||||
</a>
|
||||
|
||||
<a href='https://is.gd/rollup_chat?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge'>
|
||||
<img src='https://img.shields.io/discord/466787075518365708?color=778cd1&label=chat' alt='Join the chat at https://is.gd/rollup_chat'>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h1 align="center">Rollup</h1>
|
||||
|
||||
## Overview
|
||||
|
||||
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application. It uses the standardized ES module format for code, instead of previous idiosyncratic solutions such as CommonJS and AMD. ES modules let you freely and seamlessly combine the most useful individual functions from your favorite libraries. Rollup can optimize ES modules for faster native loading in modern browsers, or output a legacy module format allowing ES module workflows today.
|
||||
|
||||
## Quick Start Guide
|
||||
|
||||
Install with `npm install --global rollup`. Rollup can be used either through a [command line interface](https://rollupjs.org/#command-line-reference) with an optional configuration file or else through its [JavaScript API](https://rollupjs.org/guide/en/#javascript-api). Run `rollup --help` to see the available options and parameters. The starter project templates, [rollup-starter-lib](https://github.com/rollup/rollup-starter-lib) and [rollup-starter-app](https://github.com/rollup/rollup-starter-app), demonstrate common configuration options, and more detailed instructions are available throughout the [user guide](https://rollupjs.org/).
|
||||
|
||||
### Commands
|
||||
|
||||
These commands assume the entry point to your application is named main.js, and that you'd like all imports compiled into a single file named bundle.js.
|
||||
|
||||
For browsers:
|
||||
|
||||
```bash
|
||||
# compile to a <script> containing a self-executing function
|
||||
rollup main.js --format iife --name "myBundle" --file bundle.js
|
||||
```
|
||||
|
||||
For Node.js:
|
||||
|
||||
```bash
|
||||
# compile to a CommonJS module
|
||||
rollup main.js --format cjs --file bundle.js
|
||||
```
|
||||
|
||||
For both browsers and Node.js:
|
||||
|
||||
```bash
|
||||
# UMD format requires a bundle name
|
||||
rollup main.js --format umd --name "myBundle" --file bundle.js
|
||||
```
|
||||
|
||||
## Why
|
||||
|
||||
Developing software is usually easier if you break your project into smaller separate pieces, since that often removes unexpected interactions and dramatically reduces the complexity of the problems you'll need to solve, and simply writing smaller projects in the first place [isn't necessarily the answer](https://medium.com/@Rich_Harris/small-modules-it-s-not-quite-that-simple-3ca532d65de4). Unfortunately, JavaScript has not historically included this capability as a core feature in the language.
|
||||
|
||||
This finally changed with ES modules support in JavaScript, which provides a syntax for importing and exporting functions and data so they can be shared between separate scripts. Most browsers and Node.js support ES modules. However, Node.js releases before 12.17 support ES modules only behind the `--experimental-modules` flag, and older browsers like Internet Explorer do not support ES modules at all. Rollup allows you to write your code using ES modules, and run your application even in environments that do not support ES modules natively. For environments that support them, Rollup can output optimized ES modules; for environments that don't, Rollup can compile your code to other formats such as CommonJS modules, AMD modules, and IIFE-style scripts. This means that you get to _write future-proof code_, and you also get the tremendous benefits of...
|
||||
|
||||
## Tree Shaking
|
||||
|
||||
In addition to enabling the use of ES modules, Rollup also statically analyzes and optimizes the code you are importing, and will exclude anything that isn't actually used. This allows you to build on top of existing tools and modules without adding extra dependencies or bloating the size of your project.
|
||||
|
||||
For example, with CommonJS, the _entire tool or library must be imported_.
|
||||
|
||||
```js
|
||||
// import the entire utils object with CommonJS
|
||||
var utils = require('utils');
|
||||
var query = 'Rollup';
|
||||
// use the ajax method of the utils object
|
||||
utils.ajax('https://api.example.com?search=' + query).then(handleResponse);
|
||||
```
|
||||
|
||||
But with ES modules, instead of importing the whole `utils` object, we can just import the one `ajax` function we need:
|
||||
|
||||
```js
|
||||
// import the ajax function with an ES import statement
|
||||
import { ajax } from 'utils';
|
||||
var query = 'Rollup';
|
||||
// call the ajax function
|
||||
ajax('https://api.example.com?search=' + query).then(handleResponse);
|
||||
```
|
||||
|
||||
Because Rollup includes the bare minimum, it results in lighter, faster, and less complicated libraries and applications. Since this approach is based on explicit `import` and `export` statements, it is vastly more effective than simply running an automated minifier to detect unused variables in the compiled output code.
|
||||
|
||||
## Compatibility
|
||||
|
||||
### Importing CommonJS
|
||||
|
||||
Rollup can import existing CommonJS modules [through a plugin](https://github.com/rollup/plugins/tree/master/packages/commonjs).
|
||||
|
||||
### Publishing ES Modules
|
||||
|
||||
To make sure your ES modules are immediately usable by tools that work with CommonJS such as Node.js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the `main` property in your `package.json` file. If your `package.json` file also has a `module` field, ES-module-aware tools like Rollup and [webpack](https://webpack.js.org/) will [import the ES module version](https://github.com/rollup/rollup/wiki/pkg.module) directly.
|
||||
|
||||
## Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. <a href="https://github.com/rollup/rollup/graphs/contributors"><img src="https://opencollective.com/rollup/contributors.svg?width=890" /></a>
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/rollup#backer)]
|
||||
|
||||
<a href="https://opencollective.com/rollup#backers" target="_blank"><img src="https://opencollective.com/rollup/backers.svg?width=890"></a>
|
||||
|
||||
## Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/rollup#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/rollup/sponsor/0/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/0/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/1/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/1/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/2/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/2/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/3/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/3/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/4/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/4/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/5/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/5/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/6/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/6/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/7/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/7/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/8/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/8/avatar.svg"></a> <a href="https://opencollective.com/rollup/sponsor/9/website" target="_blank"><img src="https://opencollective.com/rollup/sponsor/9/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/rollup/rollup/blob/master/LICENSE.md)
|
||||
1721
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/bin/rollup
generated
vendored
Executable file
1721
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/bin/rollup
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/package.json
generated
vendored
Normal file
1
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"type":"module"}
|
||||
10
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/rollup.browser.js
generated
vendored
Normal file
10
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/rollup.browser.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
16
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/rollup.js
generated
vendored
Normal file
16
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/rollup.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
@license
|
||||
Rollup.js v2.80.0
|
||||
Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
export { version as VERSION, defineConfig, rollup, watch } from './shared/rollup.js';
|
||||
import 'path';
|
||||
import 'process';
|
||||
import 'perf_hooks';
|
||||
import 'crypto';
|
||||
import 'fs';
|
||||
import 'events';
|
||||
23984
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/shared/rollup.js
generated
vendored
Normal file
23984
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/shared/rollup.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
5003
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/shared/watch.js
generated
vendored
Normal file
5003
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/es/shared/watch.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
27
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/loadConfigFile.js
generated
vendored
Normal file
27
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/loadConfigFile.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
@license
|
||||
Rollup.js v2.80.0
|
||||
Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
require('path');
|
||||
require('process');
|
||||
require('url');
|
||||
const loadConfigFile_js = require('./shared/loadConfigFile.js');
|
||||
require('./shared/rollup.js');
|
||||
require('./shared/mergeOptions.js');
|
||||
require('tty');
|
||||
require('perf_hooks');
|
||||
require('crypto');
|
||||
require('fs');
|
||||
require('events');
|
||||
|
||||
|
||||
|
||||
module.exports = loadConfigFile_js.loadAndParseConfigFile;
|
||||
//# sourceMappingURL=loadConfigFile.js.map
|
||||
11
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.browser.js
generated
vendored
Normal file
11
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.browser.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.browser.js.map
generated
vendored
Normal file
1
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.browser.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
940
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.d.ts
generated
vendored
Normal file
940
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,940 @@
|
|||
export const VERSION: string;
|
||||
|
||||
export interface RollupError extends RollupLogProps {
|
||||
parserError?: Error;
|
||||
stack?: string;
|
||||
watchFiles?: string[];
|
||||
}
|
||||
|
||||
export interface RollupWarning extends RollupLogProps {
|
||||
chunkName?: string;
|
||||
cycle?: string[];
|
||||
exportName?: string;
|
||||
exporter?: string;
|
||||
guess?: string;
|
||||
importer?: string;
|
||||
missing?: string;
|
||||
modules?: string[];
|
||||
names?: string[];
|
||||
reexporter?: string;
|
||||
source?: string;
|
||||
sources?: string[];
|
||||
}
|
||||
|
||||
export interface RollupLogProps {
|
||||
code?: string;
|
||||
frame?: string;
|
||||
hook?: string;
|
||||
id?: string;
|
||||
loc?: {
|
||||
column: number;
|
||||
file?: string;
|
||||
line: number;
|
||||
};
|
||||
message: string;
|
||||
name?: string;
|
||||
plugin?: string;
|
||||
pluginCode?: string;
|
||||
pos?: number;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export type SourceMapSegment =
|
||||
| [number]
|
||||
| [number, number, number, number]
|
||||
| [number, number, number, number, number];
|
||||
|
||||
export interface ExistingDecodedSourceMap {
|
||||
file?: string;
|
||||
mappings: SourceMapSegment[][];
|
||||
names: string[];
|
||||
sourceRoot?: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
version: number;
|
||||
}
|
||||
|
||||
export interface ExistingRawSourceMap {
|
||||
file?: string;
|
||||
mappings: string;
|
||||
names: string[];
|
||||
sourceRoot?: string;
|
||||
sources: string[];
|
||||
sourcesContent?: string[];
|
||||
version: number;
|
||||
}
|
||||
|
||||
export type DecodedSourceMapOrMissing =
|
||||
| {
|
||||
mappings?: never;
|
||||
missing: true;
|
||||
plugin: string;
|
||||
}
|
||||
| ExistingDecodedSourceMap;
|
||||
|
||||
export interface SourceMap {
|
||||
file: string;
|
||||
mappings: string;
|
||||
names: string[];
|
||||
sources: string[];
|
||||
sourcesContent: string[];
|
||||
version: number;
|
||||
toString(): string;
|
||||
toUrl(): string;
|
||||
}
|
||||
|
||||
export type SourceMapInput = ExistingRawSourceMap | string | null | { mappings: '' };
|
||||
|
||||
type PartialNull<T> = {
|
||||
[P in keyof T]: T[P] | null;
|
||||
};
|
||||
|
||||
interface ModuleOptions {
|
||||
meta: CustomPluginOptions;
|
||||
moduleSideEffects: boolean | 'no-treeshake';
|
||||
syntheticNamedExports: boolean | string;
|
||||
}
|
||||
|
||||
export interface SourceDescription extends Partial<PartialNull<ModuleOptions>> {
|
||||
ast?: AcornNode;
|
||||
code: string;
|
||||
map?: SourceMapInput;
|
||||
}
|
||||
|
||||
export interface TransformModuleJSON {
|
||||
ast?: AcornNode;
|
||||
code: string;
|
||||
// note if plugins use new this.cache to opt-out auto transform cache
|
||||
customTransformCache: boolean;
|
||||
originalCode: string;
|
||||
originalSourcemap: ExistingDecodedSourceMap | null;
|
||||
sourcemapChain: DecodedSourceMapOrMissing[];
|
||||
transformDependencies: string[];
|
||||
}
|
||||
|
||||
export interface ModuleJSON extends TransformModuleJSON, ModuleOptions {
|
||||
ast: AcornNode;
|
||||
dependencies: string[];
|
||||
id: string;
|
||||
resolvedIds: ResolvedIdMap;
|
||||
transformFiles: EmittedFile[] | undefined;
|
||||
}
|
||||
|
||||
export interface PluginCache {
|
||||
delete(id: string): boolean;
|
||||
get<T = any>(id: string): T;
|
||||
has(id: string): boolean;
|
||||
set<T = any>(id: string, value: T): void;
|
||||
}
|
||||
|
||||
export interface MinimalPluginContext {
|
||||
meta: PluginContextMeta;
|
||||
}
|
||||
|
||||
export interface EmittedAsset {
|
||||
fileName?: string;
|
||||
name?: string;
|
||||
source?: string | Uint8Array;
|
||||
type: 'asset';
|
||||
}
|
||||
|
||||
export interface EmittedChunk {
|
||||
fileName?: string;
|
||||
id: string;
|
||||
implicitlyLoadedAfterOneOf?: string[];
|
||||
importer?: string;
|
||||
name?: string;
|
||||
preserveSignature?: PreserveEntrySignaturesOption;
|
||||
type: 'chunk';
|
||||
}
|
||||
|
||||
export type EmittedFile = EmittedAsset | EmittedChunk;
|
||||
|
||||
export type EmitAsset = (name: string, source?: string | Uint8Array) => string;
|
||||
|
||||
export type EmitChunk = (id: string, options?: { name?: string }) => string;
|
||||
|
||||
export type EmitFile = (emittedFile: EmittedFile) => string;
|
||||
|
||||
interface ModuleInfo extends ModuleOptions {
|
||||
ast: AcornNode | null;
|
||||
code: string | null;
|
||||
dynamicImporters: readonly string[];
|
||||
dynamicallyImportedIdResolutions: readonly ResolvedId[];
|
||||
dynamicallyImportedIds: readonly string[];
|
||||
hasDefaultExport: boolean | null;
|
||||
/** @deprecated Use `moduleSideEffects` instead */
|
||||
hasModuleSideEffects: boolean | 'no-treeshake';
|
||||
id: string;
|
||||
implicitlyLoadedAfterOneOf: readonly string[];
|
||||
implicitlyLoadedBefore: readonly string[];
|
||||
importedIdResolutions: readonly ResolvedId[];
|
||||
importedIds: readonly string[];
|
||||
importers: readonly string[];
|
||||
isEntry: boolean;
|
||||
isExternal: boolean;
|
||||
isIncluded: boolean | null;
|
||||
}
|
||||
|
||||
export type GetModuleInfo = (moduleId: string) => ModuleInfo | null;
|
||||
|
||||
export interface CustomPluginOptions {
|
||||
[plugin: string]: any;
|
||||
}
|
||||
|
||||
export interface PluginContext extends MinimalPluginContext {
|
||||
addWatchFile: (id: string) => void;
|
||||
cache: PluginCache;
|
||||
/** @deprecated Use `this.emitFile` instead */
|
||||
emitAsset: EmitAsset;
|
||||
/** @deprecated Use `this.emitFile` instead */
|
||||
emitChunk: EmitChunk;
|
||||
emitFile: EmitFile;
|
||||
error: (err: RollupError | string, pos?: number | { column: number; line: number }) => never;
|
||||
/** @deprecated Use `this.getFileName` instead */
|
||||
getAssetFileName: (assetReferenceId: string) => string;
|
||||
/** @deprecated Use `this.getFileName` instead */
|
||||
getChunkFileName: (chunkReferenceId: string) => string;
|
||||
getFileName: (fileReferenceId: string) => string;
|
||||
getModuleIds: () => IterableIterator<string>;
|
||||
getModuleInfo: GetModuleInfo;
|
||||
getWatchFiles: () => string[];
|
||||
/** @deprecated Use `this.resolve` instead */
|
||||
isExternal: IsExternal;
|
||||
load: (
|
||||
options: { id: string; resolveDependencies?: boolean } & Partial<PartialNull<ModuleOptions>>
|
||||
) => Promise<ModuleInfo>;
|
||||
/** @deprecated Use `this.getModuleIds` instead */
|
||||
moduleIds: IterableIterator<string>;
|
||||
parse: (input: string, options?: any) => AcornNode;
|
||||
resolve: (
|
||||
source: string,
|
||||
importer?: string,
|
||||
options?: { custom?: CustomPluginOptions; isEntry?: boolean; skipSelf?: boolean }
|
||||
) => Promise<ResolvedId | null>;
|
||||
/** @deprecated Use `this.resolve` instead */
|
||||
resolveId: (source: string, importer?: string) => Promise<string | null>;
|
||||
setAssetSource: (assetReferenceId: string, source: string | Uint8Array) => void;
|
||||
warn: (warning: RollupWarning | string, pos?: number | { column: number; line: number }) => void;
|
||||
}
|
||||
|
||||
export interface PluginContextMeta {
|
||||
rollupVersion: string;
|
||||
watchMode: boolean;
|
||||
}
|
||||
|
||||
export interface ResolvedId extends ModuleOptions {
|
||||
external: boolean | 'absolute';
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ResolvedIdMap {
|
||||
[key: string]: ResolvedId;
|
||||
}
|
||||
|
||||
interface PartialResolvedId extends Partial<PartialNull<ModuleOptions>> {
|
||||
external?: boolean | 'absolute' | 'relative';
|
||||
id: string;
|
||||
}
|
||||
|
||||
export type ResolveIdResult = string | false | null | void | PartialResolvedId;
|
||||
|
||||
export type ResolveIdHook = (
|
||||
this: PluginContext,
|
||||
source: string,
|
||||
importer: string | undefined,
|
||||
options: { custom?: CustomPluginOptions; isEntry: boolean }
|
||||
) => ResolveIdResult;
|
||||
|
||||
export type ShouldTransformCachedModuleHook = (
|
||||
this: PluginContext,
|
||||
options: {
|
||||
ast: AcornNode;
|
||||
code: string;
|
||||
id: string;
|
||||
meta: CustomPluginOptions;
|
||||
moduleSideEffects: boolean | 'no-treeshake';
|
||||
resolvedSources: ResolvedIdMap;
|
||||
syntheticNamedExports: boolean | string;
|
||||
}
|
||||
) => boolean;
|
||||
|
||||
export type IsExternal = (
|
||||
source: string,
|
||||
importer: string | undefined,
|
||||
isResolved: boolean
|
||||
) => boolean;
|
||||
|
||||
export type IsPureModule = (id: string) => boolean | null | void;
|
||||
|
||||
export type HasModuleSideEffects = (id: string, external: boolean) => boolean;
|
||||
|
||||
export type LoadResult = SourceDescription | string | null | void;
|
||||
|
||||
export type LoadHook = (this: PluginContext, id: string) => LoadResult;
|
||||
|
||||
export interface TransformPluginContext extends PluginContext {
|
||||
getCombinedSourcemap: () => SourceMap;
|
||||
}
|
||||
|
||||
export type TransformResult = string | null | void | Partial<SourceDescription>;
|
||||
|
||||
export type TransformHook = (
|
||||
this: TransformPluginContext,
|
||||
code: string,
|
||||
id: string
|
||||
) => TransformResult;
|
||||
|
||||
export type ModuleParsedHook = (this: PluginContext, info: ModuleInfo) => void;
|
||||
|
||||
export type RenderChunkHook = (
|
||||
this: PluginContext,
|
||||
code: string,
|
||||
chunk: RenderedChunk,
|
||||
options: NormalizedOutputOptions
|
||||
) => { code: string; map?: SourceMapInput } | string | null | undefined;
|
||||
|
||||
export type ResolveDynamicImportHook = (
|
||||
this: PluginContext,
|
||||
specifier: string | AcornNode,
|
||||
importer: string
|
||||
) => ResolveIdResult;
|
||||
|
||||
export type ResolveImportMetaHook = (
|
||||
this: PluginContext,
|
||||
prop: string | null,
|
||||
options: { chunkId: string; format: InternalModuleFormat; moduleId: string }
|
||||
) => string | null | void;
|
||||
|
||||
export type ResolveAssetUrlHook = (
|
||||
this: PluginContext,
|
||||
options: {
|
||||
assetFileName: string;
|
||||
chunkId: string;
|
||||
format: InternalModuleFormat;
|
||||
moduleId: string;
|
||||
relativeAssetPath: string;
|
||||
}
|
||||
) => string | null | void;
|
||||
|
||||
export type ResolveFileUrlHook = (
|
||||
this: PluginContext,
|
||||
options: {
|
||||
assetReferenceId: string | null;
|
||||
chunkId: string;
|
||||
chunkReferenceId: string | null;
|
||||
fileName: string;
|
||||
format: InternalModuleFormat;
|
||||
moduleId: string;
|
||||
referenceId: string;
|
||||
relativePath: string;
|
||||
}
|
||||
) => string | null | void;
|
||||
|
||||
export type AddonHookFunction = (this: PluginContext) => string | Promise<string>;
|
||||
export type AddonHook = string | AddonHookFunction;
|
||||
|
||||
export type ChangeEvent = 'create' | 'update' | 'delete';
|
||||
export type WatchChangeHook = (
|
||||
this: PluginContext,
|
||||
id: string,
|
||||
change: { event: ChangeEvent }
|
||||
) => void;
|
||||
|
||||
/**
|
||||
* use this type for plugin annotation
|
||||
* @example
|
||||
* ```ts
|
||||
* interface Options {
|
||||
* ...
|
||||
* }
|
||||
* const myPlugin: PluginImpl<Options> = (options = {}) => { ... }
|
||||
* ```
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
export type PluginImpl<O extends object = object> = (options?: O) => Plugin;
|
||||
|
||||
export interface OutputBundle {
|
||||
[fileName: string]: OutputAsset | OutputChunk;
|
||||
}
|
||||
|
||||
export interface FunctionPluginHooks {
|
||||
augmentChunkHash: (this: PluginContext, chunk: PreRenderedChunk) => string | void;
|
||||
buildEnd: (this: PluginContext, err?: Error) => void;
|
||||
buildStart: (this: PluginContext, options: NormalizedInputOptions) => void;
|
||||
closeBundle: (this: PluginContext) => void;
|
||||
closeWatcher: (this: PluginContext) => void;
|
||||
generateBundle: (
|
||||
this: PluginContext,
|
||||
options: NormalizedOutputOptions,
|
||||
bundle: OutputBundle,
|
||||
isWrite: boolean
|
||||
) => void;
|
||||
load: LoadHook;
|
||||
moduleParsed: ModuleParsedHook;
|
||||
options: (this: MinimalPluginContext, options: InputOptions) => InputOptions | null | void;
|
||||
outputOptions: (this: PluginContext, options: OutputOptions) => OutputOptions | null | void;
|
||||
renderChunk: RenderChunkHook;
|
||||
renderDynamicImport: (
|
||||
this: PluginContext,
|
||||
options: {
|
||||
customResolution: string | null;
|
||||
format: InternalModuleFormat;
|
||||
moduleId: string;
|
||||
targetModuleId: string | null;
|
||||
}
|
||||
) => { left: string; right: string } | null | void;
|
||||
renderError: (this: PluginContext, err?: Error) => void;
|
||||
renderStart: (
|
||||
this: PluginContext,
|
||||
outputOptions: NormalizedOutputOptions,
|
||||
inputOptions: NormalizedInputOptions
|
||||
) => void;
|
||||
/** @deprecated Use `resolveFileUrl` instead */
|
||||
resolveAssetUrl: ResolveAssetUrlHook;
|
||||
resolveDynamicImport: ResolveDynamicImportHook;
|
||||
resolveFileUrl: ResolveFileUrlHook;
|
||||
resolveId: ResolveIdHook;
|
||||
resolveImportMeta: ResolveImportMetaHook;
|
||||
shouldTransformCachedModule: ShouldTransformCachedModuleHook;
|
||||
transform: TransformHook;
|
||||
watchChange: WatchChangeHook;
|
||||
writeBundle: (
|
||||
this: PluginContext,
|
||||
options: NormalizedOutputOptions,
|
||||
bundle: OutputBundle
|
||||
) => void;
|
||||
}
|
||||
|
||||
export type OutputPluginHooks =
|
||||
| 'augmentChunkHash'
|
||||
| 'generateBundle'
|
||||
| 'outputOptions'
|
||||
| 'renderChunk'
|
||||
| 'renderDynamicImport'
|
||||
| 'renderError'
|
||||
| 'renderStart'
|
||||
| 'resolveAssetUrl'
|
||||
| 'resolveFileUrl'
|
||||
| 'resolveImportMeta'
|
||||
| 'writeBundle';
|
||||
|
||||
export type InputPluginHooks = Exclude<keyof FunctionPluginHooks, OutputPluginHooks>;
|
||||
|
||||
export type SyncPluginHooks =
|
||||
| 'augmentChunkHash'
|
||||
| 'outputOptions'
|
||||
| 'renderDynamicImport'
|
||||
| 'resolveAssetUrl'
|
||||
| 'resolveFileUrl'
|
||||
| 'resolveImportMeta';
|
||||
|
||||
export type AsyncPluginHooks = Exclude<keyof FunctionPluginHooks, SyncPluginHooks>;
|
||||
|
||||
export type FirstPluginHooks =
|
||||
| 'load'
|
||||
| 'renderDynamicImport'
|
||||
| 'resolveAssetUrl'
|
||||
| 'resolveDynamicImport'
|
||||
| 'resolveFileUrl'
|
||||
| 'resolveId'
|
||||
| 'resolveImportMeta'
|
||||
| 'shouldTransformCachedModule';
|
||||
|
||||
export type SequentialPluginHooks =
|
||||
| 'augmentChunkHash'
|
||||
| 'generateBundle'
|
||||
| 'options'
|
||||
| 'outputOptions'
|
||||
| 'renderChunk'
|
||||
| 'transform';
|
||||
|
||||
export type ParallelPluginHooks = Exclude<
|
||||
keyof FunctionPluginHooks | AddonHooks,
|
||||
FirstPluginHooks | SequentialPluginHooks
|
||||
>;
|
||||
|
||||
export type AddonHooks = 'banner' | 'footer' | 'intro' | 'outro';
|
||||
|
||||
type MakeAsync<Fn> = Fn extends (this: infer This, ...args: infer Args) => infer Return
|
||||
? (this: This, ...args: Args) => Return | Promise<Return>
|
||||
: never;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
type ObjectHook<T, O = {}> = T | ({ handler: T; order?: 'pre' | 'post' | null } & O);
|
||||
|
||||
export type PluginHooks = {
|
||||
[K in keyof FunctionPluginHooks]: ObjectHook<
|
||||
K extends AsyncPluginHooks ? MakeAsync<FunctionPluginHooks[K]> : FunctionPluginHooks[K],
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
K extends ParallelPluginHooks ? { sequential?: boolean } : {}
|
||||
>;
|
||||
};
|
||||
|
||||
export interface OutputPlugin
|
||||
extends Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>,
|
||||
Partial<{ [K in AddonHooks]: ObjectHook<AddonHook> }> {
|
||||
cacheKey?: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface Plugin extends OutputPlugin, Partial<PluginHooks> {
|
||||
// for inter-plugin communication
|
||||
api?: any;
|
||||
}
|
||||
|
||||
type TreeshakingPreset = 'smallest' | 'safest' | 'recommended';
|
||||
|
||||
export interface NormalizedTreeshakingOptions {
|
||||
annotations: boolean;
|
||||
correctVarValueBeforeDeclaration: boolean;
|
||||
moduleSideEffects: HasModuleSideEffects;
|
||||
propertyReadSideEffects: boolean | 'always';
|
||||
tryCatchDeoptimization: boolean;
|
||||
unknownGlobalSideEffects: boolean;
|
||||
}
|
||||
|
||||
export interface TreeshakingOptions
|
||||
extends Partial<Omit<NormalizedTreeshakingOptions, 'moduleSideEffects'>> {
|
||||
moduleSideEffects?: ModuleSideEffectsOption;
|
||||
preset?: TreeshakingPreset;
|
||||
/** @deprecated Use `moduleSideEffects` instead */
|
||||
pureExternalModules?: PureModulesOption;
|
||||
}
|
||||
|
||||
interface GetManualChunkApi {
|
||||
getModuleIds: () => IterableIterator<string>;
|
||||
getModuleInfo: GetModuleInfo;
|
||||
}
|
||||
export type GetManualChunk = (id: string, api: GetManualChunkApi) => string | null | void;
|
||||
|
||||
export type ExternalOption =
|
||||
| (string | RegExp)[]
|
||||
| string
|
||||
| RegExp
|
||||
| ((source: string, importer: string | undefined, isResolved: boolean) => boolean | null | void);
|
||||
export type PureModulesOption = boolean | string[] | IsPureModule;
|
||||
export type GlobalsOption = { [name: string]: string } | ((name: string) => string);
|
||||
export type InputOption = string | string[] | { [entryAlias: string]: string };
|
||||
export type ManualChunksOption = { [chunkAlias: string]: string[] } | GetManualChunk;
|
||||
export type ModuleSideEffectsOption = boolean | 'no-external' | string[] | HasModuleSideEffects;
|
||||
export type PreserveEntrySignaturesOption = false | 'strict' | 'allow-extension' | 'exports-only';
|
||||
export type SourcemapPathTransformOption = (
|
||||
relativeSourcePath: string,
|
||||
sourcemapPath: string
|
||||
) => string;
|
||||
|
||||
export interface InputOptions {
|
||||
acorn?: Record<string, unknown>;
|
||||
acornInjectPlugins?: (() => unknown)[] | (() => unknown);
|
||||
cache?: false | RollupCache;
|
||||
context?: string;
|
||||
experimentalCacheExpiry?: number;
|
||||
external?: ExternalOption;
|
||||
/** @deprecated Use the "inlineDynamicImports" output option instead. */
|
||||
inlineDynamicImports?: boolean;
|
||||
input?: InputOption;
|
||||
makeAbsoluteExternalsRelative?: boolean | 'ifRelativeSource';
|
||||
/** @deprecated Use the "manualChunks" output option instead. */
|
||||
manualChunks?: ManualChunksOption;
|
||||
maxParallelFileOps?: number;
|
||||
/** @deprecated Use the "maxParallelFileOps" option instead. */
|
||||
maxParallelFileReads?: number;
|
||||
moduleContext?: ((id: string) => string | null | void) | { [id: string]: string };
|
||||
onwarn?: WarningHandlerWithDefault;
|
||||
perf?: boolean;
|
||||
plugins?: (Plugin | null | false | undefined)[];
|
||||
preserveEntrySignatures?: PreserveEntrySignaturesOption;
|
||||
/** @deprecated Use the "preserveModules" output option instead. */
|
||||
preserveModules?: boolean;
|
||||
preserveSymlinks?: boolean;
|
||||
shimMissingExports?: boolean;
|
||||
strictDeprecations?: boolean;
|
||||
treeshake?: boolean | TreeshakingPreset | TreeshakingOptions;
|
||||
watch?: WatcherOptions | false;
|
||||
}
|
||||
|
||||
export interface NormalizedInputOptions {
|
||||
acorn: Record<string, unknown>;
|
||||
acornInjectPlugins: (() => unknown)[];
|
||||
cache: false | undefined | RollupCache;
|
||||
context: string;
|
||||
experimentalCacheExpiry: number;
|
||||
external: IsExternal;
|
||||
/** @deprecated Use the "inlineDynamicImports" output option instead. */
|
||||
inlineDynamicImports: boolean | undefined;
|
||||
input: string[] | { [entryAlias: string]: string };
|
||||
makeAbsoluteExternalsRelative: boolean | 'ifRelativeSource';
|
||||
/** @deprecated Use the "manualChunks" output option instead. */
|
||||
manualChunks: ManualChunksOption | undefined;
|
||||
maxParallelFileOps: number;
|
||||
/** @deprecated Use the "maxParallelFileOps" option instead. */
|
||||
maxParallelFileReads: number;
|
||||
moduleContext: (id: string) => string;
|
||||
onwarn: WarningHandler;
|
||||
perf: boolean;
|
||||
plugins: Plugin[];
|
||||
preserveEntrySignatures: PreserveEntrySignaturesOption;
|
||||
/** @deprecated Use the "preserveModules" output option instead. */
|
||||
preserveModules: boolean | undefined;
|
||||
preserveSymlinks: boolean;
|
||||
shimMissingExports: boolean;
|
||||
strictDeprecations: boolean;
|
||||
treeshake: false | NormalizedTreeshakingOptions;
|
||||
}
|
||||
|
||||
export type InternalModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd';
|
||||
|
||||
export type ModuleFormat = InternalModuleFormat | 'commonjs' | 'esm' | 'module' | 'systemjs';
|
||||
|
||||
type GeneratedCodePreset = 'es5' | 'es2015';
|
||||
|
||||
interface NormalizedGeneratedCodeOptions {
|
||||
arrowFunctions: boolean;
|
||||
constBindings: boolean;
|
||||
objectShorthand: boolean;
|
||||
reservedNamesAsProps: boolean;
|
||||
symbols: boolean;
|
||||
}
|
||||
|
||||
interface GeneratedCodeOptions extends Partial<NormalizedGeneratedCodeOptions> {
|
||||
preset?: GeneratedCodePreset;
|
||||
}
|
||||
|
||||
export type OptionsPaths = Record<string, string> | ((id: string) => string);
|
||||
|
||||
export type InteropType = boolean | 'auto' | 'esModule' | 'default' | 'defaultOnly';
|
||||
|
||||
export type GetInterop = (id: string | null) => InteropType;
|
||||
|
||||
export type AmdOptions = (
|
||||
| {
|
||||
autoId?: false;
|
||||
id: string;
|
||||
}
|
||||
| {
|
||||
autoId: true;
|
||||
basePath?: string;
|
||||
id?: undefined;
|
||||
}
|
||||
| {
|
||||
autoId?: false;
|
||||
id?: undefined;
|
||||
}
|
||||
) & {
|
||||
define?: string;
|
||||
forceJsExtensionForImports?: boolean;
|
||||
};
|
||||
|
||||
export type NormalizedAmdOptions = (
|
||||
| {
|
||||
autoId: false;
|
||||
id?: string;
|
||||
}
|
||||
| {
|
||||
autoId: true;
|
||||
basePath: string;
|
||||
}
|
||||
) & {
|
||||
define: string;
|
||||
forceJsExtensionForImports: boolean;
|
||||
};
|
||||
|
||||
export interface OutputOptions {
|
||||
amd?: AmdOptions;
|
||||
assetFileNames?: string | ((chunkInfo: PreRenderedAsset) => string);
|
||||
banner?: string | (() => string | Promise<string>);
|
||||
chunkFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
|
||||
compact?: boolean;
|
||||
// only required for bundle.write
|
||||
dir?: string;
|
||||
/** @deprecated Use the "renderDynamicImport" plugin hook instead. */
|
||||
dynamicImportFunction?: string;
|
||||
entryFileNames?: string | ((chunkInfo: PreRenderedChunk) => string);
|
||||
esModule?: boolean;
|
||||
exports?: 'default' | 'named' | 'none' | 'auto';
|
||||
extend?: boolean;
|
||||
externalLiveBindings?: boolean;
|
||||
// only required for bundle.write
|
||||
file?: string;
|
||||
footer?: string | (() => string | Promise<string>);
|
||||
format?: ModuleFormat;
|
||||
freeze?: boolean;
|
||||
generatedCode?: GeneratedCodePreset | GeneratedCodeOptions;
|
||||
globals?: GlobalsOption;
|
||||
hoistTransitiveImports?: boolean;
|
||||
indent?: string | boolean;
|
||||
inlineDynamicImports?: boolean;
|
||||
interop?: InteropType | GetInterop;
|
||||
intro?: string | (() => string | Promise<string>);
|
||||
manualChunks?: ManualChunksOption;
|
||||
minifyInternalExports?: boolean;
|
||||
name?: string;
|
||||
/** @deprecated Use "generatedCode.symbols" instead. */
|
||||
namespaceToStringTag?: boolean;
|
||||
noConflict?: boolean;
|
||||
outro?: string | (() => string | Promise<string>);
|
||||
paths?: OptionsPaths;
|
||||
plugins?: (OutputPlugin | null | false | undefined)[];
|
||||
/** @deprecated Use "generatedCode.constBindings" instead. */
|
||||
preferConst?: boolean;
|
||||
preserveModules?: boolean;
|
||||
preserveModulesRoot?: string;
|
||||
sanitizeFileName?: boolean | ((fileName: string) => string);
|
||||
sourcemap?: boolean | 'inline' | 'hidden';
|
||||
sourcemapBaseUrl?: string;
|
||||
sourcemapExcludeSources?: boolean;
|
||||
sourcemapFile?: string;
|
||||
sourcemapPathTransform?: SourcemapPathTransformOption;
|
||||
strict?: boolean;
|
||||
systemNullSetters?: boolean;
|
||||
validate?: boolean;
|
||||
}
|
||||
|
||||
export interface NormalizedOutputOptions {
|
||||
amd: NormalizedAmdOptions;
|
||||
assetFileNames: string | ((chunkInfo: PreRenderedAsset) => string);
|
||||
banner: () => string | Promise<string>;
|
||||
chunkFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
|
||||
compact: boolean;
|
||||
dir: string | undefined;
|
||||
/** @deprecated Use the "renderDynamicImport" plugin hook instead. */
|
||||
dynamicImportFunction: string | undefined;
|
||||
entryFileNames: string | ((chunkInfo: PreRenderedChunk) => string);
|
||||
esModule: boolean;
|
||||
exports: 'default' | 'named' | 'none' | 'auto';
|
||||
extend: boolean;
|
||||
externalLiveBindings: boolean;
|
||||
file: string | undefined;
|
||||
footer: () => string | Promise<string>;
|
||||
format: InternalModuleFormat;
|
||||
freeze: boolean;
|
||||
generatedCode: NormalizedGeneratedCodeOptions;
|
||||
globals: GlobalsOption;
|
||||
hoistTransitiveImports: boolean;
|
||||
indent: true | string;
|
||||
inlineDynamicImports: boolean;
|
||||
interop: GetInterop;
|
||||
intro: () => string | Promise<string>;
|
||||
manualChunks: ManualChunksOption;
|
||||
minifyInternalExports: boolean;
|
||||
name: string | undefined;
|
||||
namespaceToStringTag: boolean;
|
||||
noConflict: boolean;
|
||||
outro: () => string | Promise<string>;
|
||||
paths: OptionsPaths;
|
||||
plugins: OutputPlugin[];
|
||||
/** @deprecated Use the "renderDynamicImport" plugin hook instead. */
|
||||
preferConst: boolean;
|
||||
preserveModules: boolean;
|
||||
preserveModulesRoot: string | undefined;
|
||||
sanitizeFileName: (fileName: string) => string;
|
||||
sourcemap: boolean | 'inline' | 'hidden';
|
||||
sourcemapBaseUrl: string | undefined;
|
||||
sourcemapExcludeSources: boolean;
|
||||
sourcemapFile: string | undefined;
|
||||
sourcemapPathTransform: SourcemapPathTransformOption | undefined;
|
||||
strict: boolean;
|
||||
systemNullSetters: boolean;
|
||||
validate: boolean;
|
||||
}
|
||||
|
||||
export type WarningHandlerWithDefault = (
|
||||
warning: RollupWarning,
|
||||
defaultHandler: WarningHandler
|
||||
) => void;
|
||||
export type WarningHandler = (warning: RollupWarning) => void;
|
||||
|
||||
export interface SerializedTimings {
|
||||
[label: string]: [number, number, number];
|
||||
}
|
||||
|
||||
export interface PreRenderedAsset {
|
||||
name: string | undefined;
|
||||
source: string | Uint8Array;
|
||||
type: 'asset';
|
||||
}
|
||||
|
||||
export interface OutputAsset extends PreRenderedAsset {
|
||||
fileName: string;
|
||||
/** @deprecated Accessing "isAsset" on files in the bundle is deprecated, please use "type === \'asset\'" instead */
|
||||
isAsset: true;
|
||||
}
|
||||
|
||||
export interface RenderedModule {
|
||||
code: string | null;
|
||||
originalLength: number;
|
||||
removedExports: string[];
|
||||
renderedExports: string[];
|
||||
renderedLength: number;
|
||||
}
|
||||
|
||||
export interface PreRenderedChunk {
|
||||
exports: string[];
|
||||
facadeModuleId: string | null;
|
||||
isDynamicEntry: boolean;
|
||||
isEntry: boolean;
|
||||
isImplicitEntry: boolean;
|
||||
modules: {
|
||||
[id: string]: RenderedModule;
|
||||
};
|
||||
name: string;
|
||||
type: 'chunk';
|
||||
}
|
||||
|
||||
export interface RenderedChunk extends PreRenderedChunk {
|
||||
code?: string;
|
||||
dynamicImports: string[];
|
||||
fileName: string;
|
||||
implicitlyLoadedBefore: string[];
|
||||
importedBindings: {
|
||||
[imported: string]: string[];
|
||||
};
|
||||
imports: string[];
|
||||
map?: SourceMap;
|
||||
referencedFiles: string[];
|
||||
}
|
||||
|
||||
export interface OutputChunk extends RenderedChunk {
|
||||
code: string;
|
||||
}
|
||||
|
||||
export interface SerializablePluginCache {
|
||||
[key: string]: [number, any];
|
||||
}
|
||||
|
||||
export interface RollupCache {
|
||||
modules: ModuleJSON[];
|
||||
plugins?: Record<string, SerializablePluginCache>;
|
||||
}
|
||||
|
||||
export interface RollupOutput {
|
||||
output: [OutputChunk, ...(OutputChunk | OutputAsset)[]];
|
||||
}
|
||||
|
||||
export interface RollupBuild {
|
||||
cache: RollupCache | undefined;
|
||||
close: () => Promise<void>;
|
||||
closed: boolean;
|
||||
generate: (outputOptions: OutputOptions) => Promise<RollupOutput>;
|
||||
getTimings?: () => SerializedTimings;
|
||||
watchFiles: string[];
|
||||
write: (options: OutputOptions) => Promise<RollupOutput>;
|
||||
}
|
||||
|
||||
export interface RollupOptions extends InputOptions {
|
||||
// This is included for compatibility with config files but ignored by rollup.rollup
|
||||
output?: OutputOptions | OutputOptions[];
|
||||
}
|
||||
|
||||
export interface MergedRollupOptions extends InputOptions {
|
||||
output: OutputOptions[];
|
||||
}
|
||||
|
||||
export function rollup(options: RollupOptions): Promise<RollupBuild>;
|
||||
|
||||
export interface ChokidarOptions {
|
||||
alwaysStat?: boolean;
|
||||
atomic?: boolean | number;
|
||||
awaitWriteFinish?:
|
||||
| {
|
||||
pollInterval?: number;
|
||||
stabilityThreshold?: number;
|
||||
}
|
||||
| boolean;
|
||||
binaryInterval?: number;
|
||||
cwd?: string;
|
||||
depth?: number;
|
||||
disableGlobbing?: boolean;
|
||||
followSymlinks?: boolean;
|
||||
ignoreInitial?: boolean;
|
||||
ignorePermissionErrors?: boolean;
|
||||
ignored?: any;
|
||||
interval?: number;
|
||||
persistent?: boolean;
|
||||
useFsEvents?: boolean;
|
||||
usePolling?: boolean;
|
||||
}
|
||||
|
||||
export type RollupWatchHooks = 'onError' | 'onStart' | 'onBundleStart' | 'onBundleEnd' | 'onEnd';
|
||||
|
||||
export interface WatcherOptions {
|
||||
buildDelay?: number;
|
||||
chokidar?: ChokidarOptions;
|
||||
clearScreen?: boolean;
|
||||
exclude?: string | RegExp | (string | RegExp)[];
|
||||
include?: string | RegExp | (string | RegExp)[];
|
||||
skipWrite?: boolean;
|
||||
}
|
||||
|
||||
export interface RollupWatchOptions extends InputOptions {
|
||||
output?: OutputOptions | OutputOptions[];
|
||||
watch?: WatcherOptions | false;
|
||||
}
|
||||
|
||||
interface TypedEventEmitter<T extends { [event: string]: (...args: any) => any }> {
|
||||
addListener<K extends keyof T>(event: K, listener: T[K]): this;
|
||||
emit<K extends keyof T>(event: K, ...args: Parameters<T[K]>): boolean;
|
||||
eventNames(): Array<keyof T>;
|
||||
getMaxListeners(): number;
|
||||
listenerCount(type: keyof T): number;
|
||||
listeners<K extends keyof T>(event: K): Array<T[K]>;
|
||||
off<K extends keyof T>(event: K, listener: T[K]): this;
|
||||
on<K extends keyof T>(event: K, listener: T[K]): this;
|
||||
once<K extends keyof T>(event: K, listener: T[K]): this;
|
||||
prependListener<K extends keyof T>(event: K, listener: T[K]): this;
|
||||
prependOnceListener<K extends keyof T>(event: K, listener: T[K]): this;
|
||||
rawListeners<K extends keyof T>(event: K): Array<T[K]>;
|
||||
removeAllListeners<K extends keyof T>(event?: K): this;
|
||||
removeListener<K extends keyof T>(event: K, listener: T[K]): this;
|
||||
setMaxListeners(n: number): this;
|
||||
}
|
||||
|
||||
export interface RollupAwaitingEmitter<T extends { [event: string]: (...args: any) => any }>
|
||||
extends TypedEventEmitter<T> {
|
||||
close(): Promise<void>;
|
||||
emitAndAwait<K extends keyof T>(event: K, ...args: Parameters<T[K]>): Promise<ReturnType<T[K]>[]>;
|
||||
/**
|
||||
* Registers an event listener that will be awaited before Rollup continues
|
||||
* for events emitted via emitAndAwait. All listeners will be awaited in
|
||||
* parallel while rejections are tracked via Promise.all.
|
||||
* Listeners are removed automatically when removeAwaited is called, which
|
||||
* happens automatically after each run.
|
||||
*/
|
||||
onCurrentAwaited<K extends keyof T>(
|
||||
event: K,
|
||||
listener: (...args: Parameters<T[K]>) => Promise<ReturnType<T[K]>>
|
||||
): this;
|
||||
removeAwaited(): this;
|
||||
}
|
||||
|
||||
export type RollupWatcherEvent =
|
||||
| { code: 'START' }
|
||||
| { code: 'BUNDLE_START'; input?: InputOption; output: readonly string[] }
|
||||
| {
|
||||
code: 'BUNDLE_END';
|
||||
duration: number;
|
||||
input?: InputOption;
|
||||
output: readonly string[];
|
||||
result: RollupBuild;
|
||||
}
|
||||
| { code: 'END' }
|
||||
| { code: 'ERROR'; error: RollupError; result: RollupBuild | null };
|
||||
|
||||
export type RollupWatcher = RollupAwaitingEmitter<{
|
||||
change: (id: string, change: { event: ChangeEvent }) => void;
|
||||
close: () => void;
|
||||
event: (event: RollupWatcherEvent) => void;
|
||||
restart: () => void;
|
||||
}>;
|
||||
|
||||
export function watch(config: RollupWatchOptions | RollupWatchOptions[]): RollupWatcher;
|
||||
|
||||
interface AcornNode {
|
||||
end: number;
|
||||
start: number;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export function defineConfig(options: RollupOptions): RollupOptions;
|
||||
export function defineConfig(options: RollupOptions[]): RollupOptions[];
|
||||
28
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.js
generated
vendored
Normal file
28
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/rollup.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
@license
|
||||
Rollup.js v2.80.0
|
||||
Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
|
||||
const rollup = require('./shared/rollup.js');
|
||||
require('path');
|
||||
require('process');
|
||||
require('perf_hooks');
|
||||
require('crypto');
|
||||
require('fs');
|
||||
require('events');
|
||||
|
||||
|
||||
|
||||
exports.VERSION = rollup.version;
|
||||
exports.defineConfig = rollup.defineConfig;
|
||||
exports.rollup = rollup.rollup;
|
||||
exports.watch = rollup.watch;
|
||||
//# sourceMappingURL=rollup.js.map
|
||||
4568
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/index.js
generated
vendored
Normal file
4568
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
670
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/loadConfigFile.js
generated
vendored
Normal file
670
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/loadConfigFile.js
generated
vendored
Normal file
|
|
@ -0,0 +1,670 @@
|
|||
/*
|
||||
@license
|
||||
Rollup.js v2.80.0
|
||||
Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const require$$0 = require('path');
|
||||
const process$1 = require('process');
|
||||
const url = require('url');
|
||||
const tty = require('tty');
|
||||
const rollup = require('./rollup.js');
|
||||
const mergeOptions = require('./mergeOptions.js');
|
||||
|
||||
function _interopNamespaceDefault(e) {
|
||||
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
||||
if (e) {
|
||||
for (const k in e) {
|
||||
n[k] = e[k];
|
||||
}
|
||||
}
|
||||
n.default = e;
|
||||
return n;
|
||||
}
|
||||
|
||||
const tty__namespace = /*#__PURE__*/_interopNamespaceDefault(tty);
|
||||
|
||||
const {
|
||||
env = {},
|
||||
argv = [],
|
||||
platform = "",
|
||||
} = typeof process === "undefined" ? {} : process;
|
||||
|
||||
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
||||
const isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
||||
const isWindows = platform === "win32";
|
||||
const isDumbTerminal = env.TERM === "dumb";
|
||||
|
||||
const isCompatibleTerminal =
|
||||
tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal;
|
||||
|
||||
const isCI =
|
||||
"CI" in env &&
|
||||
("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
||||
|
||||
const isColorSupported =
|
||||
!isDisabled &&
|
||||
(isForced || (isWindows && !isDumbTerminal) || isCompatibleTerminal || isCI);
|
||||
|
||||
const replaceClose = (
|
||||
index,
|
||||
string,
|
||||
close,
|
||||
replace,
|
||||
head = string.substring(0, index) + replace,
|
||||
tail = string.substring(index + close.length),
|
||||
next = tail.indexOf(close)
|
||||
) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
||||
|
||||
const clearBleed = (index, string, open, close, replace) =>
|
||||
index < 0
|
||||
? open + string + close
|
||||
: open + replaceClose(index, string, close, replace) + close;
|
||||
|
||||
const filterEmpty =
|
||||
(open, close, replace = open, at = open.length + 1) =>
|
||||
(string) =>
|
||||
string || !(string === "" || string === undefined)
|
||||
? clearBleed(
|
||||
("" + string).indexOf(close, at),
|
||||
string,
|
||||
open,
|
||||
close,
|
||||
replace
|
||||
)
|
||||
: "";
|
||||
|
||||
const init = (open, close, replace) =>
|
||||
filterEmpty(`\x1b[${open}m`, `\x1b[${close}m`, replace);
|
||||
|
||||
const colors = {
|
||||
reset: init(0, 0),
|
||||
bold: init(1, 22, "\x1b[22m\x1b[1m"),
|
||||
dim: init(2, 22, "\x1b[22m\x1b[2m"),
|
||||
italic: init(3, 23),
|
||||
underline: init(4, 24),
|
||||
inverse: init(7, 27),
|
||||
hidden: init(8, 28),
|
||||
strikethrough: init(9, 29),
|
||||
black: init(30, 39),
|
||||
red: init(31, 39),
|
||||
green: init(32, 39),
|
||||
yellow: init(33, 39),
|
||||
blue: init(34, 39),
|
||||
magenta: init(35, 39),
|
||||
cyan: init(36, 39),
|
||||
white: init(37, 39),
|
||||
gray: init(90, 39),
|
||||
bgBlack: init(40, 49),
|
||||
bgRed: init(41, 49),
|
||||
bgGreen: init(42, 49),
|
||||
bgYellow: init(43, 49),
|
||||
bgBlue: init(44, 49),
|
||||
bgMagenta: init(45, 49),
|
||||
bgCyan: init(46, 49),
|
||||
bgWhite: init(47, 49),
|
||||
blackBright: init(90, 39),
|
||||
redBright: init(91, 39),
|
||||
greenBright: init(92, 39),
|
||||
yellowBright: init(93, 39),
|
||||
blueBright: init(94, 39),
|
||||
magentaBright: init(95, 39),
|
||||
cyanBright: init(96, 39),
|
||||
whiteBright: init(97, 39),
|
||||
bgBlackBright: init(100, 49),
|
||||
bgRedBright: init(101, 49),
|
||||
bgGreenBright: init(102, 49),
|
||||
bgYellowBright: init(103, 49),
|
||||
bgBlueBright: init(104, 49),
|
||||
bgMagentaBright: init(105, 49),
|
||||
bgCyanBright: init(106, 49),
|
||||
bgWhiteBright: init(107, 49),
|
||||
};
|
||||
|
||||
const createColors = ({ useColor = isColorSupported } = {}) =>
|
||||
useColor
|
||||
? colors
|
||||
: Object.keys(colors).reduce(
|
||||
(colors, key) => ({ ...colors, [key]: String }),
|
||||
{}
|
||||
);
|
||||
|
||||
createColors();
|
||||
|
||||
// @see https://no-color.org
|
||||
// @see https://www.npmjs.com/package/chalk
|
||||
const { bold, cyan, dim, gray, green, red, underline, yellow } = createColors({
|
||||
useColor: process$1.env.FORCE_COLOR !== '0' && !process$1.env.NO_COLOR
|
||||
});
|
||||
|
||||
// log to stderr to keep `rollup main.js > bundle.js` from breaking
|
||||
const stderr = (...args) => process$1.stderr.write(`${args.join('')}\n`);
|
||||
function handleError(err, recover = false) {
|
||||
let description = err.message || err;
|
||||
if (err.name)
|
||||
description = `${err.name}: ${description}`;
|
||||
const message = (err.plugin ? `(plugin ${err.plugin}) ${description}` : description) || err;
|
||||
stderr(bold(red(`[!] ${bold(message.toString())}`)));
|
||||
if (err.url) {
|
||||
stderr(cyan(err.url));
|
||||
}
|
||||
if (err.loc) {
|
||||
stderr(`${rollup.relativeId((err.loc.file || err.id))} (${err.loc.line}:${err.loc.column})`);
|
||||
}
|
||||
else if (err.id) {
|
||||
stderr(rollup.relativeId(err.id));
|
||||
}
|
||||
if (err.frame) {
|
||||
stderr(dim(err.frame));
|
||||
}
|
||||
if (err.stack) {
|
||||
stderr(dim(err.stack));
|
||||
}
|
||||
stderr('');
|
||||
if (!recover)
|
||||
process$1.exit(1);
|
||||
}
|
||||
|
||||
function batchWarnings() {
|
||||
let count = 0;
|
||||
const deferredWarnings = new Map();
|
||||
let warningOccurred = false;
|
||||
return {
|
||||
add(warning) {
|
||||
count += 1;
|
||||
warningOccurred = true;
|
||||
if (warning.code in deferredHandlers) {
|
||||
rollup.getOrCreate(deferredWarnings, warning.code, () => []).push(warning);
|
||||
}
|
||||
else if (warning.code in immediateHandlers) {
|
||||
immediateHandlers[warning.code](warning);
|
||||
}
|
||||
else {
|
||||
title(warning.message);
|
||||
if (warning.url)
|
||||
info(warning.url);
|
||||
const id = (warning.loc && warning.loc.file) || warning.id;
|
||||
if (id) {
|
||||
const loc = warning.loc
|
||||
? `${rollup.relativeId(id)} (${warning.loc.line}:${warning.loc.column})`
|
||||
: rollup.relativeId(id);
|
||||
stderr(bold(rollup.relativeId(loc)));
|
||||
}
|
||||
if (warning.frame)
|
||||
info(warning.frame);
|
||||
}
|
||||
},
|
||||
get count() {
|
||||
return count;
|
||||
},
|
||||
flush() {
|
||||
if (count === 0)
|
||||
return;
|
||||
const codes = Array.from(deferredWarnings.keys()).sort((a, b) => deferredWarnings.get(b).length - deferredWarnings.get(a).length);
|
||||
for (const code of codes) {
|
||||
deferredHandlers[code](deferredWarnings.get(code));
|
||||
}
|
||||
deferredWarnings.clear();
|
||||
count = 0;
|
||||
},
|
||||
get warningOccurred() {
|
||||
return warningOccurred;
|
||||
}
|
||||
};
|
||||
}
|
||||
const immediateHandlers = {
|
||||
MISSING_NODE_BUILTINS(warning) {
|
||||
title(`Missing shims for Node.js built-ins`);
|
||||
stderr(`Creating a browser bundle that depends on ${rollup.printQuotedStringList(warning.modules)}. You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`);
|
||||
},
|
||||
UNKNOWN_OPTION(warning) {
|
||||
title(`You have passed an unrecognized option`);
|
||||
stderr(warning.message);
|
||||
}
|
||||
};
|
||||
const deferredHandlers = {
|
||||
CIRCULAR_DEPENDENCY(warnings) {
|
||||
title(`Circular dependenc${warnings.length > 1 ? 'ies' : 'y'}`);
|
||||
const displayed = warnings.length > 5 ? warnings.slice(0, 3) : warnings;
|
||||
for (const warning of displayed) {
|
||||
stderr(warning.cycle.join(' -> '));
|
||||
}
|
||||
if (warnings.length > displayed.length) {
|
||||
stderr(`...and ${warnings.length - displayed.length} more`);
|
||||
}
|
||||
},
|
||||
EMPTY_BUNDLE(warnings) {
|
||||
title(`Generated${warnings.length === 1 ? ' an' : ''} empty ${warnings.length > 1 ? 'chunks' : 'chunk'}`);
|
||||
stderr(warnings.map(warning => warning.chunkName).join(', '));
|
||||
},
|
||||
EVAL(warnings) {
|
||||
title('Use of eval is strongly discouraged');
|
||||
info('https://rollupjs.org/guide/en/#avoiding-eval');
|
||||
showTruncatedWarnings(warnings);
|
||||
},
|
||||
MISSING_EXPORT(warnings) {
|
||||
title('Missing exports');
|
||||
info('https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module');
|
||||
for (const warning of warnings) {
|
||||
stderr(bold(warning.importer));
|
||||
stderr(`${warning.missing} is not exported by ${warning.exporter}`);
|
||||
stderr(gray(warning.frame));
|
||||
}
|
||||
},
|
||||
MISSING_GLOBAL_NAME(warnings) {
|
||||
title(`Missing global variable ${warnings.length > 1 ? 'names' : 'name'}`);
|
||||
stderr(`Use output.globals to specify browser global variable names corresponding to external modules`);
|
||||
for (const warning of warnings) {
|
||||
stderr(`${bold(warning.source)} (guessing '${warning.guess}')`);
|
||||
}
|
||||
},
|
||||
MIXED_EXPORTS(warnings) {
|
||||
title('Mixing named and default exports');
|
||||
info(`https://rollupjs.org/guide/en/#outputexports`);
|
||||
stderr(bold('The following entry modules are using named and default exports together:'));
|
||||
warnings.sort((a, b) => (a.id < b.id ? -1 : 1));
|
||||
const displayedWarnings = warnings.length > 5 ? warnings.slice(0, 3) : warnings;
|
||||
for (const warning of displayedWarnings) {
|
||||
stderr(rollup.relativeId(warning.id));
|
||||
}
|
||||
if (displayedWarnings.length < warnings.length) {
|
||||
stderr(`...and ${warnings.length - displayedWarnings.length} other entry modules`);
|
||||
}
|
||||
stderr(`\nConsumers of your bundle will have to use chunk['default'] to access their default export, which may not be what you want. Use \`output.exports: 'named'\` to disable this warning`);
|
||||
},
|
||||
NAMESPACE_CONFLICT(warnings) {
|
||||
title(`Conflicting re-exports`);
|
||||
for (const warning of warnings) {
|
||||
stderr(`"${bold(rollup.relativeId(warning.reexporter))}" re-exports "${warning.name}" from both "${rollup.relativeId(warning.sources[0])}" and "${rollup.relativeId(warning.sources[1])}" (will be ignored)`);
|
||||
}
|
||||
},
|
||||
NON_EXISTENT_EXPORT(warnings) {
|
||||
title(`Import of non-existent ${warnings.length > 1 ? 'exports' : 'export'}`);
|
||||
showTruncatedWarnings(warnings);
|
||||
},
|
||||
PLUGIN_WARNING(warnings) {
|
||||
var _a;
|
||||
const nestedByPlugin = nest(warnings, 'plugin');
|
||||
for (const { key: plugin, items } of nestedByPlugin) {
|
||||
const nestedByMessage = nest(items, 'message');
|
||||
let lastUrl = '';
|
||||
for (const { key: message, items } of nestedByMessage) {
|
||||
title(`Plugin ${plugin}: ${message}`);
|
||||
for (const warning of items) {
|
||||
if (warning.url && warning.url !== lastUrl)
|
||||
info((lastUrl = warning.url));
|
||||
const id = warning.id || ((_a = warning.loc) === null || _a === void 0 ? void 0 : _a.file);
|
||||
if (id) {
|
||||
let loc = rollup.relativeId(id);
|
||||
if (warning.loc) {
|
||||
loc += `: (${warning.loc.line}:${warning.loc.column})`;
|
||||
}
|
||||
stderr(bold(loc));
|
||||
}
|
||||
if (warning.frame)
|
||||
info(warning.frame);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
SOURCEMAP_BROKEN(warnings) {
|
||||
title(`Broken sourcemap`);
|
||||
info('https://rollupjs.org/guide/en/#warning-sourcemap-is-likely-to-be-incorrect');
|
||||
const plugins = [...new Set(warnings.map(({ plugin }) => plugin).filter(Boolean))];
|
||||
stderr(`Plugins that transform code (such as ${rollup.printQuotedStringList(plugins)}) should generate accompanying sourcemaps`);
|
||||
},
|
||||
THIS_IS_UNDEFINED(warnings) {
|
||||
title('`this` has been rewritten to `undefined`');
|
||||
info('https://rollupjs.org/guide/en/#error-this-is-undefined');
|
||||
showTruncatedWarnings(warnings);
|
||||
},
|
||||
UNRESOLVED_IMPORT(warnings) {
|
||||
title('Unresolved dependencies');
|
||||
info('https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency');
|
||||
const dependencies = new Map();
|
||||
for (const warning of warnings) {
|
||||
rollup.getOrCreate(dependencies, warning.source, () => []).push(warning.importer);
|
||||
}
|
||||
for (const [dependency, importers] of dependencies) {
|
||||
stderr(`${bold(dependency)} (imported by ${importers.join(', ')})`);
|
||||
}
|
||||
},
|
||||
UNUSED_EXTERNAL_IMPORT(warnings) {
|
||||
title('Unused external imports');
|
||||
for (const warning of warnings) {
|
||||
stderr(warning.names +
|
||||
' imported from external module "' +
|
||||
warning.source +
|
||||
'" but never used in ' +
|
||||
rollup.printQuotedStringList(warning.sources.map(id => rollup.relativeId(id))));
|
||||
}
|
||||
}
|
||||
};
|
||||
function title(str) {
|
||||
stderr(bold(yellow(`(!) ${str}`)));
|
||||
}
|
||||
function info(url) {
|
||||
stderr(gray(url));
|
||||
}
|
||||
function nest(array, prop) {
|
||||
const nested = [];
|
||||
const lookup = new Map();
|
||||
for (const item of array) {
|
||||
const key = item[prop];
|
||||
rollup.getOrCreate(lookup, key, () => {
|
||||
const items = {
|
||||
items: [],
|
||||
key
|
||||
};
|
||||
nested.push(items);
|
||||
return items;
|
||||
}).items.push(item);
|
||||
}
|
||||
return nested;
|
||||
}
|
||||
function showTruncatedWarnings(warnings) {
|
||||
const nestedByModule = nest(warnings, 'id');
|
||||
const displayedByModule = nestedByModule.length > 5 ? nestedByModule.slice(0, 3) : nestedByModule;
|
||||
for (const { key: id, items } of displayedByModule) {
|
||||
stderr(bold(rollup.relativeId(id)));
|
||||
stderr(gray(items[0].frame));
|
||||
if (items.length > 1) {
|
||||
stderr(`...and ${items.length - 1} other ${items.length > 2 ? 'occurrences' : 'occurrence'}`);
|
||||
}
|
||||
}
|
||||
if (nestedByModule.length > displayedByModule.length) {
|
||||
stderr(`\n...and ${nestedByModule.length - displayedByModule.length} other files`);
|
||||
}
|
||||
}
|
||||
|
||||
const stdinName = '-';
|
||||
let stdinResult = null;
|
||||
function stdinPlugin(arg) {
|
||||
const suffix = typeof arg == 'string' && arg.length ? '.' + arg : '';
|
||||
return {
|
||||
load(id) {
|
||||
if (id === stdinName || id.startsWith(stdinName + '.')) {
|
||||
return stdinResult || (stdinResult = readStdin());
|
||||
}
|
||||
},
|
||||
name: 'stdin',
|
||||
resolveId(id) {
|
||||
if (id === stdinName) {
|
||||
return id + suffix;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function readStdin() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const chunks = [];
|
||||
process$1.stdin.setEncoding('utf8');
|
||||
process$1.stdin
|
||||
.on('data', chunk => chunks.push(chunk))
|
||||
.on('end', () => {
|
||||
const result = chunks.join('');
|
||||
resolve(result);
|
||||
})
|
||||
.on('error', err => {
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function waitForInputPlugin() {
|
||||
return {
|
||||
async buildStart(options) {
|
||||
const inputSpecifiers = Array.isArray(options.input)
|
||||
? options.input
|
||||
: Object.keys(options.input);
|
||||
let lastAwaitedSpecifier = null;
|
||||
checkSpecifiers: while (true) {
|
||||
for (const specifier of inputSpecifiers) {
|
||||
if ((await this.resolve(specifier)) === null) {
|
||||
if (lastAwaitedSpecifier !== specifier) {
|
||||
stderr(`waiting for input ${bold(specifier)}...`);
|
||||
lastAwaitedSpecifier = specifier;
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, 500));
|
||||
continue checkSpecifiers;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
name: 'wait-for-input'
|
||||
};
|
||||
}
|
||||
|
||||
async function addCommandPluginsToInputOptions(inputOptions, command) {
|
||||
if (command.stdin !== false) {
|
||||
inputOptions.plugins.push(stdinPlugin(command.stdin));
|
||||
}
|
||||
if (command.waitForBundleInput === true) {
|
||||
inputOptions.plugins.push(waitForInputPlugin());
|
||||
}
|
||||
await addPluginsFromCommandOption(command.plugin, inputOptions);
|
||||
}
|
||||
async function addPluginsFromCommandOption(commandPlugin, inputOptions) {
|
||||
if (commandPlugin) {
|
||||
const plugins = Array.isArray(commandPlugin) ? commandPlugin : [commandPlugin];
|
||||
for (const plugin of plugins) {
|
||||
if (/[={}]/.test(plugin)) {
|
||||
// -p plugin=value
|
||||
// -p "{transform(c,i){...}}"
|
||||
await loadAndRegisterPlugin(inputOptions, plugin);
|
||||
}
|
||||
else {
|
||||
// split out plugins joined by commas
|
||||
// -p node-resolve,commonjs,buble
|
||||
for (const p of plugin.split(',')) {
|
||||
await loadAndRegisterPlugin(inputOptions, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
async function loadAndRegisterPlugin(inputOptions, pluginText) {
|
||||
let plugin = null;
|
||||
let pluginArg = undefined;
|
||||
if (pluginText[0] === '{') {
|
||||
// -p "{transform(c,i){...}}"
|
||||
plugin = new Function('return ' + pluginText);
|
||||
}
|
||||
else {
|
||||
const match = pluginText.match(/^([@.:/\\\w|^{}-]+)(=(.*))?$/);
|
||||
if (match) {
|
||||
// -p plugin
|
||||
// -p plugin=arg
|
||||
pluginText = match[1];
|
||||
pluginArg = new Function('return ' + match[3])();
|
||||
}
|
||||
else {
|
||||
throw new Error(`Invalid --plugin argument format: ${JSON.stringify(pluginText)}`);
|
||||
}
|
||||
if (!/^\.|^rollup-plugin-|[@/\\]/.test(pluginText)) {
|
||||
// Try using plugin prefix variations first if applicable.
|
||||
// Prefix order is significant - left has higher precedence.
|
||||
for (const prefix of ['@rollup/plugin-', 'rollup-plugin-']) {
|
||||
try {
|
||||
plugin = await requireOrImport(prefix + pluginText);
|
||||
break;
|
||||
}
|
||||
catch (_a) {
|
||||
// if this does not work, we try requiring the actual name below
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!plugin) {
|
||||
try {
|
||||
if (pluginText[0] == '.')
|
||||
pluginText = require$$0.resolve(pluginText);
|
||||
// Windows absolute paths must be specified as file:// protocol URL
|
||||
// Note that we do not have coverage for Windows-only code paths
|
||||
else if (pluginText.match(/^[A-Za-z]:\\/)) {
|
||||
pluginText = url.pathToFileURL(require$$0.resolve(pluginText)).href;
|
||||
}
|
||||
plugin = await requireOrImport(pluginText);
|
||||
}
|
||||
catch (err) {
|
||||
throw new Error(`Cannot load plugin "${pluginText}": ${err.message}.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
// some plugins do not use `module.exports` for their entry point,
|
||||
// in which case we try the named default export and the plugin name
|
||||
if (typeof plugin === 'object') {
|
||||
plugin = plugin.default || plugin[getCamelizedPluginBaseName(pluginText)];
|
||||
}
|
||||
if (!plugin) {
|
||||
throw new Error(`Cannot find entry for plugin "${pluginText}". The plugin needs to export a function either as "default" or "${getCamelizedPluginBaseName(pluginText)}" for Rollup to recognize it.`);
|
||||
}
|
||||
inputOptions.plugins.push(typeof plugin === 'function' ? plugin.call(plugin, pluginArg) : plugin);
|
||||
}
|
||||
function getCamelizedPluginBaseName(pluginText) {
|
||||
var _a;
|
||||
return (((_a = pluginText.match(/(@rollup\/plugin-|rollup-plugin-)(.+)$/)) === null || _a === void 0 ? void 0 : _a[2]) || pluginText)
|
||||
.split(/[\\/]/)
|
||||
.slice(-1)[0]
|
||||
.split('.')[0]
|
||||
.split('-')
|
||||
.map((part, index) => (index === 0 || !part ? part : part[0].toUpperCase() + part.slice(1)))
|
||||
.join('');
|
||||
}
|
||||
async function requireOrImport(pluginPath) {
|
||||
try {
|
||||
return require(pluginPath);
|
||||
}
|
||||
catch (_a) {
|
||||
return import(pluginPath);
|
||||
}
|
||||
}
|
||||
|
||||
function supportsNativeESM() {
|
||||
return Number(/^v(\d+)/.exec(process$1.version)[1]) >= 13;
|
||||
}
|
||||
async function loadAndParseConfigFile(fileName, commandOptions = {}) {
|
||||
const configs = await loadConfigFile(fileName, commandOptions);
|
||||
const warnings = batchWarnings();
|
||||
try {
|
||||
const normalizedConfigs = [];
|
||||
for (const config of configs) {
|
||||
const options = mergeOptions.mergeOptions(config, commandOptions, warnings.add);
|
||||
await addCommandPluginsToInputOptions(options, commandOptions);
|
||||
normalizedConfigs.push(options);
|
||||
}
|
||||
return { options: normalizedConfigs, warnings };
|
||||
}
|
||||
catch (err) {
|
||||
warnings.flush();
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
async function loadConfigFile(fileName, commandOptions) {
|
||||
const extension = require$$0.extname(fileName);
|
||||
const configFileExport = commandOptions.configPlugin ||
|
||||
!(extension === '.cjs' || (extension === '.mjs' && supportsNativeESM()))
|
||||
? await getDefaultFromTranspiledConfigFile(fileName, commandOptions)
|
||||
: extension === '.cjs'
|
||||
? getDefaultFromCjs(require(fileName))
|
||||
: (await import(url.pathToFileURL(fileName).href)).default;
|
||||
return getConfigList(configFileExport, commandOptions);
|
||||
}
|
||||
function getDefaultFromCjs(namespace) {
|
||||
return namespace.__esModule ? namespace.default : namespace;
|
||||
}
|
||||
async function getDefaultFromTranspiledConfigFile(fileName, commandOptions) {
|
||||
const warnings = batchWarnings();
|
||||
const inputOptions = {
|
||||
external: (id) => (id[0] !== '.' && !require$$0.isAbsolute(id)) || id.slice(-5, id.length) === '.json',
|
||||
input: fileName,
|
||||
onwarn: warnings.add,
|
||||
plugins: [],
|
||||
treeshake: false
|
||||
};
|
||||
await addPluginsFromCommandOption(commandOptions.configPlugin, inputOptions);
|
||||
const bundle = await rollup.rollup(inputOptions);
|
||||
if (!commandOptions.silent && warnings.count > 0) {
|
||||
stderr(bold(`loaded ${rollup.relativeId(fileName)} with warnings`));
|
||||
warnings.flush();
|
||||
}
|
||||
const { output: [{ code }] } = await bundle.generate({
|
||||
exports: 'named',
|
||||
format: 'cjs',
|
||||
plugins: [
|
||||
{
|
||||
name: 'transpile-import-meta',
|
||||
resolveImportMeta(property, { moduleId }) {
|
||||
if (property === 'url') {
|
||||
return `'${url.pathToFileURL(moduleId).href}'`;
|
||||
}
|
||||
if (property == null) {
|
||||
return `{url:'${url.pathToFileURL(moduleId).href}'}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
return loadConfigFromBundledFile(fileName, code);
|
||||
}
|
||||
function loadConfigFromBundledFile(fileName, bundledCode) {
|
||||
const resolvedFileName = require.resolve(fileName);
|
||||
const extension = require$$0.extname(resolvedFileName);
|
||||
const defaultLoader = require.extensions[extension];
|
||||
require.extensions[extension] = (module, requiredFileName) => {
|
||||
if (requiredFileName === resolvedFileName) {
|
||||
module._compile(bundledCode, requiredFileName);
|
||||
}
|
||||
else {
|
||||
if (defaultLoader) {
|
||||
defaultLoader(module, requiredFileName);
|
||||
}
|
||||
}
|
||||
};
|
||||
delete require.cache[resolvedFileName];
|
||||
try {
|
||||
const config = getDefaultFromCjs(require(fileName));
|
||||
require.extensions[extension] = defaultLoader;
|
||||
return config;
|
||||
}
|
||||
catch (err) {
|
||||
if (err.code === 'ERR_REQUIRE_ESM') {
|
||||
return rollup.error({
|
||||
code: 'TRANSPILED_ESM_CONFIG',
|
||||
message: `While loading the Rollup configuration from "${rollup.relativeId(fileName)}", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.`,
|
||||
url: 'https://rollupjs.org/guide/en/#using-untranspiled-config-files'
|
||||
});
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
async function getConfigList(configFileExport, commandOptions) {
|
||||
const config = await (typeof configFileExport === 'function'
|
||||
? configFileExport(commandOptions)
|
||||
: configFileExport);
|
||||
if (Object.keys(config).length === 0) {
|
||||
return rollup.error({
|
||||
code: 'MISSING_CONFIG',
|
||||
message: 'Config file must export an options object, or an array of options objects',
|
||||
url: 'https://rollupjs.org/guide/en/#configuration-files'
|
||||
});
|
||||
}
|
||||
return Array.isArray(config) ? config : [config];
|
||||
}
|
||||
|
||||
exports.addCommandPluginsToInputOptions = addCommandPluginsToInputOptions;
|
||||
exports.batchWarnings = batchWarnings;
|
||||
exports.bold = bold;
|
||||
exports.cyan = cyan;
|
||||
exports.green = green;
|
||||
exports.handleError = handleError;
|
||||
exports.loadAndParseConfigFile = loadAndParseConfigFile;
|
||||
exports.stderr = stderr;
|
||||
exports.stdinName = stdinName;
|
||||
exports.underline = underline;
|
||||
//# sourceMappingURL=loadConfigFile.js.map
|
||||
180
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/mergeOptions.js
generated
vendored
Normal file
180
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/mergeOptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
/*
|
||||
@license
|
||||
Rollup.js v2.80.0
|
||||
Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const rollup = require('./rollup.js');
|
||||
|
||||
const commandAliases = {
|
||||
c: 'config',
|
||||
d: 'dir',
|
||||
e: 'external',
|
||||
f: 'format',
|
||||
g: 'globals',
|
||||
h: 'help',
|
||||
i: 'input',
|
||||
m: 'sourcemap',
|
||||
n: 'name',
|
||||
o: 'file',
|
||||
p: 'plugin',
|
||||
v: 'version',
|
||||
w: 'watch'
|
||||
};
|
||||
function mergeOptions(config, rawCommandOptions = { external: [], globals: undefined }, defaultOnWarnHandler = rollup.defaultOnWarn) {
|
||||
const command = getCommandOptions(rawCommandOptions);
|
||||
const inputOptions = mergeInputOptions(config, command, defaultOnWarnHandler);
|
||||
const warn = inputOptions.onwarn;
|
||||
if (command.output) {
|
||||
Object.assign(command, command.output);
|
||||
}
|
||||
const outputOptionsArray = rollup.ensureArray(config.output);
|
||||
if (outputOptionsArray.length === 0)
|
||||
outputOptionsArray.push({});
|
||||
const outputOptions = outputOptionsArray.map(singleOutputOptions => mergeOutputOptions(singleOutputOptions, command, warn));
|
||||
rollup.warnUnknownOptions(command, Object.keys(inputOptions).concat(Object.keys(outputOptions[0]).filter(option => option !== 'sourcemapPathTransform'), Object.keys(commandAliases), 'config', 'environment', 'plugin', 'silent', 'failAfterWarnings', 'stdin', 'waitForBundleInput', 'configPlugin'), 'CLI flags', warn, /^_$|output$|config/);
|
||||
inputOptions.output = outputOptions;
|
||||
return inputOptions;
|
||||
}
|
||||
function getCommandOptions(rawCommandOptions) {
|
||||
const external = rawCommandOptions.external && typeof rawCommandOptions.external === 'string'
|
||||
? rawCommandOptions.external.split(',')
|
||||
: [];
|
||||
return {
|
||||
...rawCommandOptions,
|
||||
external,
|
||||
globals: typeof rawCommandOptions.globals === 'string'
|
||||
? rawCommandOptions.globals.split(',').reduce((globals, globalDefinition) => {
|
||||
const [id, variableName] = globalDefinition.split(':');
|
||||
globals[id] = variableName;
|
||||
if (!external.includes(id)) {
|
||||
external.push(id);
|
||||
}
|
||||
return globals;
|
||||
}, Object.create(null))
|
||||
: undefined
|
||||
};
|
||||
}
|
||||
function mergeInputOptions(config, overrides, defaultOnWarnHandler) {
|
||||
const getOption = (name) => { var _a; return (_a = overrides[name]) !== null && _a !== void 0 ? _a : config[name]; };
|
||||
const inputOptions = {
|
||||
acorn: getOption('acorn'),
|
||||
acornInjectPlugins: config.acornInjectPlugins,
|
||||
cache: config.cache,
|
||||
context: getOption('context'),
|
||||
experimentalCacheExpiry: getOption('experimentalCacheExpiry'),
|
||||
external: getExternal(config, overrides),
|
||||
inlineDynamicImports: getOption('inlineDynamicImports'),
|
||||
input: getOption('input') || [],
|
||||
makeAbsoluteExternalsRelative: getOption('makeAbsoluteExternalsRelative'),
|
||||
manualChunks: getOption('manualChunks'),
|
||||
maxParallelFileOps: getOption('maxParallelFileOps'),
|
||||
maxParallelFileReads: getOption('maxParallelFileReads'),
|
||||
moduleContext: getOption('moduleContext'),
|
||||
onwarn: getOnWarn(config, defaultOnWarnHandler),
|
||||
perf: getOption('perf'),
|
||||
plugins: rollup.ensureArray(config.plugins),
|
||||
preserveEntrySignatures: getOption('preserveEntrySignatures'),
|
||||
preserveModules: getOption('preserveModules'),
|
||||
preserveSymlinks: getOption('preserveSymlinks'),
|
||||
shimMissingExports: getOption('shimMissingExports'),
|
||||
strictDeprecations: getOption('strictDeprecations'),
|
||||
treeshake: getObjectOption(config, overrides, 'treeshake', rollup.objectifyOptionWithPresets(rollup.treeshakePresets, 'treeshake', 'false, true, ')),
|
||||
watch: getWatch(config, overrides)
|
||||
};
|
||||
rollup.warnUnknownOptions(config, Object.keys(inputOptions), 'input options', inputOptions.onwarn, /^output$/);
|
||||
return inputOptions;
|
||||
}
|
||||
const getExternal = (config, overrides) => {
|
||||
const configExternal = config.external;
|
||||
return typeof configExternal === 'function'
|
||||
? (source, importer, isResolved) => configExternal(source, importer, isResolved) || overrides.external.includes(source)
|
||||
: rollup.ensureArray(configExternal).concat(overrides.external);
|
||||
};
|
||||
const getOnWarn = (config, defaultOnWarnHandler) => config.onwarn
|
||||
? warning => config.onwarn(warning, defaultOnWarnHandler)
|
||||
: defaultOnWarnHandler;
|
||||
const getObjectOption = (config, overrides, name, objectifyValue = rollup.objectifyOption) => {
|
||||
const commandOption = normalizeObjectOptionValue(overrides[name], objectifyValue);
|
||||
const configOption = normalizeObjectOptionValue(config[name], objectifyValue);
|
||||
if (commandOption !== undefined) {
|
||||
return commandOption && { ...configOption, ...commandOption };
|
||||
}
|
||||
return configOption;
|
||||
};
|
||||
const getWatch = (config, overrides) => config.watch !== false && getObjectOption(config, overrides, 'watch');
|
||||
const isWatchEnabled = (optionValue) => {
|
||||
if (Array.isArray(optionValue)) {
|
||||
return optionValue.reduce((result, value) => (typeof value === 'boolean' ? value : result), false);
|
||||
}
|
||||
return optionValue === true;
|
||||
};
|
||||
const normalizeObjectOptionValue = (optionValue, objectifyValue) => {
|
||||
if (!optionValue) {
|
||||
return optionValue;
|
||||
}
|
||||
if (Array.isArray(optionValue)) {
|
||||
return optionValue.reduce((result, value) => value && result && { ...result, ...objectifyValue(value) }, {});
|
||||
}
|
||||
return objectifyValue(optionValue);
|
||||
};
|
||||
function mergeOutputOptions(config, overrides, warn) {
|
||||
const getOption = (name) => { var _a; return (_a = overrides[name]) !== null && _a !== void 0 ? _a : config[name]; };
|
||||
const outputOptions = {
|
||||
amd: getObjectOption(config, overrides, 'amd'),
|
||||
assetFileNames: getOption('assetFileNames'),
|
||||
banner: getOption('banner'),
|
||||
chunkFileNames: getOption('chunkFileNames'),
|
||||
compact: getOption('compact'),
|
||||
dir: getOption('dir'),
|
||||
dynamicImportFunction: getOption('dynamicImportFunction'),
|
||||
entryFileNames: getOption('entryFileNames'),
|
||||
esModule: getOption('esModule'),
|
||||
exports: getOption('exports'),
|
||||
extend: getOption('extend'),
|
||||
externalLiveBindings: getOption('externalLiveBindings'),
|
||||
file: getOption('file'),
|
||||
footer: getOption('footer'),
|
||||
format: getOption('format'),
|
||||
freeze: getOption('freeze'),
|
||||
generatedCode: getObjectOption(config, overrides, 'generatedCode', rollup.objectifyOptionWithPresets(rollup.generatedCodePresets, 'output.generatedCode', '')),
|
||||
globals: getOption('globals'),
|
||||
hoistTransitiveImports: getOption('hoistTransitiveImports'),
|
||||
indent: getOption('indent'),
|
||||
inlineDynamicImports: getOption('inlineDynamicImports'),
|
||||
interop: getOption('interop'),
|
||||
intro: getOption('intro'),
|
||||
manualChunks: getOption('manualChunks'),
|
||||
minifyInternalExports: getOption('minifyInternalExports'),
|
||||
name: getOption('name'),
|
||||
namespaceToStringTag: getOption('namespaceToStringTag'),
|
||||
noConflict: getOption('noConflict'),
|
||||
outro: getOption('outro'),
|
||||
paths: getOption('paths'),
|
||||
plugins: rollup.ensureArray(config.plugins),
|
||||
preferConst: getOption('preferConst'),
|
||||
preserveModules: getOption('preserveModules'),
|
||||
preserveModulesRoot: getOption('preserveModulesRoot'),
|
||||
sanitizeFileName: getOption('sanitizeFileName'),
|
||||
sourcemap: getOption('sourcemap'),
|
||||
sourcemapBaseUrl: getOption('sourcemapBaseUrl'),
|
||||
sourcemapExcludeSources: getOption('sourcemapExcludeSources'),
|
||||
sourcemapFile: getOption('sourcemapFile'),
|
||||
sourcemapPathTransform: getOption('sourcemapPathTransform'),
|
||||
strict: getOption('strict'),
|
||||
systemNullSetters: getOption('systemNullSetters'),
|
||||
validate: getOption('validate')
|
||||
};
|
||||
rollup.warnUnknownOptions(config, Object.keys(outputOptions), 'output options', warn);
|
||||
return outputOptions;
|
||||
}
|
||||
|
||||
exports.commandAliases = commandAliases;
|
||||
exports.isWatchEnabled = isWatchEnabled;
|
||||
exports.mergeOptions = mergeOptions;
|
||||
//# sourceMappingURL=mergeOptions.js.map
|
||||
24022
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/rollup.js
generated
vendored
Normal file
24022
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/rollup.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
511
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/watch-cli.js
generated
vendored
Normal file
511
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/watch-cli.js
generated
vendored
Normal file
|
|
@ -0,0 +1,511 @@
|
|||
/*
|
||||
@license
|
||||
Rollup.js v2.80.0
|
||||
Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
const require$$0$2 = require('fs');
|
||||
const process$2 = require('process');
|
||||
const index = require('./index.js');
|
||||
const cli = require('../bin/rollup');
|
||||
const rollup = require('./rollup.js');
|
||||
const require$$0 = require('assert');
|
||||
const require$$0$1 = require('events');
|
||||
const loadConfigFile_js = require('./loadConfigFile.js');
|
||||
const child_process = require('child_process');
|
||||
require('util');
|
||||
require('stream');
|
||||
require('path');
|
||||
require('os');
|
||||
require('./mergeOptions.js');
|
||||
require('perf_hooks');
|
||||
require('crypto');
|
||||
require('url');
|
||||
require('tty');
|
||||
|
||||
function timeZone(date = new Date()) {
|
||||
const offset = date.getTimezoneOffset();
|
||||
const absOffset = Math.abs(offset);
|
||||
const hours = Math.floor(absOffset / 60);
|
||||
const minutes = absOffset % 60;
|
||||
const minutesOut = minutes > 0 ? ':' + ('0' + minutes).slice(-2) : '';
|
||||
return (offset < 0 ? '+' : '-') + hours + minutesOut;
|
||||
}
|
||||
|
||||
function dateTime(options = {}) {
|
||||
let {
|
||||
date = new Date(),
|
||||
local = true,
|
||||
showTimeZone = false,
|
||||
showMilliseconds = false
|
||||
} = options;
|
||||
|
||||
if (local) {
|
||||
// Offset the date so it will return the correct value when getting the ISO string.
|
||||
date = new Date(date.getTime() - (date.getTimezoneOffset() * 60000));
|
||||
}
|
||||
|
||||
let end = '';
|
||||
|
||||
if (showTimeZone) {
|
||||
end = ' UTC' + (local ? timeZone(date) : '');
|
||||
}
|
||||
|
||||
if (showMilliseconds && date.getUTCMilliseconds() > 0) {
|
||||
end = ` ${date.getUTCMilliseconds()}ms${end}`;
|
||||
}
|
||||
|
||||
return date
|
||||
.toISOString()
|
||||
.replace(/T/, ' ')
|
||||
.replace(/\..+/, end);
|
||||
}
|
||||
|
||||
var signalExit = {exports: {}};
|
||||
|
||||
var signals$1 = {exports: {}};
|
||||
|
||||
var hasRequiredSignals;
|
||||
|
||||
function requireSignals () {
|
||||
if (hasRequiredSignals) return signals$1.exports;
|
||||
hasRequiredSignals = 1;
|
||||
(function (module) {
|
||||
// This is not the set of all possible signals.
|
||||
//
|
||||
// It IS, however, the set of all signals that trigger
|
||||
// an exit on either Linux or BSD systems. Linux is a
|
||||
// superset of the signal names supported on BSD, and
|
||||
// the unknown signals just fail to register, so we can
|
||||
// catch that easily enough.
|
||||
//
|
||||
// Don't bother with SIGKILL. It's uncatchable, which
|
||||
// means that we can't fire any callbacks anyway.
|
||||
//
|
||||
// If a user does happen to register a handler on a non-
|
||||
// fatal signal like SIGWINCH or something, and then
|
||||
// exit, it'll end up firing `process.emit('exit')`, so
|
||||
// the handler will be fired anyway.
|
||||
//
|
||||
// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
|
||||
// artificially, inherently leave the process in a
|
||||
// state from which it is not safe to try and enter JS
|
||||
// listeners.
|
||||
module.exports = [
|
||||
'SIGABRT',
|
||||
'SIGALRM',
|
||||
'SIGHUP',
|
||||
'SIGINT',
|
||||
'SIGTERM'
|
||||
];
|
||||
|
||||
if (process.platform !== 'win32') {
|
||||
module.exports.push(
|
||||
'SIGVTALRM',
|
||||
'SIGXCPU',
|
||||
'SIGXFSZ',
|
||||
'SIGUSR2',
|
||||
'SIGTRAP',
|
||||
'SIGSYS',
|
||||
'SIGQUIT',
|
||||
'SIGIOT'
|
||||
// should detect profiler and enable/disable accordingly.
|
||||
// see #21
|
||||
// 'SIGPROF'
|
||||
);
|
||||
}
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
module.exports.push(
|
||||
'SIGIO',
|
||||
'SIGPOLL',
|
||||
'SIGPWR',
|
||||
'SIGSTKFLT',
|
||||
'SIGUNUSED'
|
||||
);
|
||||
}
|
||||
} (signals$1));
|
||||
return signals$1.exports;
|
||||
}
|
||||
|
||||
// Note: since nyc uses this module to output coverage, any lines
|
||||
// that are in the direct sync flow of nyc's outputCoverage are
|
||||
// ignored, since we can never get coverage for them.
|
||||
// grab a reference to node's real process object right away
|
||||
var process$1 = rollup.commonjsGlobal.process;
|
||||
|
||||
const processOk = function (process) {
|
||||
return process &&
|
||||
typeof process === 'object' &&
|
||||
typeof process.removeListener === 'function' &&
|
||||
typeof process.emit === 'function' &&
|
||||
typeof process.reallyExit === 'function' &&
|
||||
typeof process.listeners === 'function' &&
|
||||
typeof process.kill === 'function' &&
|
||||
typeof process.pid === 'number' &&
|
||||
typeof process.on === 'function'
|
||||
};
|
||||
|
||||
// some kind of non-node environment, just no-op
|
||||
/* istanbul ignore if */
|
||||
if (!processOk(process$1)) {
|
||||
signalExit.exports = function () {
|
||||
return function () {}
|
||||
};
|
||||
} else {
|
||||
var assert = require$$0;
|
||||
var signals = requireSignals();
|
||||
var isWin = /^win/i.test(process$1.platform);
|
||||
|
||||
var EE = require$$0$1;
|
||||
/* istanbul ignore if */
|
||||
if (typeof EE !== 'function') {
|
||||
EE = EE.EventEmitter;
|
||||
}
|
||||
|
||||
var emitter;
|
||||
if (process$1.__signal_exit_emitter__) {
|
||||
emitter = process$1.__signal_exit_emitter__;
|
||||
} else {
|
||||
emitter = process$1.__signal_exit_emitter__ = new EE();
|
||||
emitter.count = 0;
|
||||
emitter.emitted = {};
|
||||
}
|
||||
|
||||
// Because this emitter is a global, we have to check to see if a
|
||||
// previous version of this library failed to enable infinite listeners.
|
||||
// I know what you're about to say. But literally everything about
|
||||
// signal-exit is a compromise with evil. Get used to it.
|
||||
if (!emitter.infinite) {
|
||||
emitter.setMaxListeners(Infinity);
|
||||
emitter.infinite = true;
|
||||
}
|
||||
|
||||
signalExit.exports = function (cb, opts) {
|
||||
/* istanbul ignore if */
|
||||
if (!processOk(rollup.commonjsGlobal.process)) {
|
||||
return function () {}
|
||||
}
|
||||
assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler');
|
||||
|
||||
if (loaded === false) {
|
||||
load();
|
||||
}
|
||||
|
||||
var ev = 'exit';
|
||||
if (opts && opts.alwaysLast) {
|
||||
ev = 'afterexit';
|
||||
}
|
||||
|
||||
var remove = function () {
|
||||
emitter.removeListener(ev, cb);
|
||||
if (emitter.listeners('exit').length === 0 &&
|
||||
emitter.listeners('afterexit').length === 0) {
|
||||
unload();
|
||||
}
|
||||
};
|
||||
emitter.on(ev, cb);
|
||||
|
||||
return remove
|
||||
};
|
||||
|
||||
var unload = function unload () {
|
||||
if (!loaded || !processOk(rollup.commonjsGlobal.process)) {
|
||||
return
|
||||
}
|
||||
loaded = false;
|
||||
|
||||
signals.forEach(function (sig) {
|
||||
try {
|
||||
process$1.removeListener(sig, sigListeners[sig]);
|
||||
} catch (er) {}
|
||||
});
|
||||
process$1.emit = originalProcessEmit;
|
||||
process$1.reallyExit = originalProcessReallyExit;
|
||||
emitter.count -= 1;
|
||||
};
|
||||
signalExit.exports.unload = unload;
|
||||
|
||||
var emit = function emit (event, code, signal) {
|
||||
/* istanbul ignore if */
|
||||
if (emitter.emitted[event]) {
|
||||
return
|
||||
}
|
||||
emitter.emitted[event] = true;
|
||||
emitter.emit(event, code, signal);
|
||||
};
|
||||
|
||||
// { <signal>: <listener fn>, ... }
|
||||
var sigListeners = {};
|
||||
signals.forEach(function (sig) {
|
||||
sigListeners[sig] = function listener () {
|
||||
/* istanbul ignore if */
|
||||
if (!processOk(rollup.commonjsGlobal.process)) {
|
||||
return
|
||||
}
|
||||
// If there are no other listeners, an exit is coming!
|
||||
// Simplest way: remove us and then re-send the signal.
|
||||
// We know that this will kill the process, so we can
|
||||
// safely emit now.
|
||||
var listeners = process$1.listeners(sig);
|
||||
if (listeners.length === emitter.count) {
|
||||
unload();
|
||||
emit('exit', null, sig);
|
||||
/* istanbul ignore next */
|
||||
emit('afterexit', null, sig);
|
||||
/* istanbul ignore next */
|
||||
if (isWin && sig === 'SIGHUP') {
|
||||
// "SIGHUP" throws an `ENOSYS` error on Windows,
|
||||
// so use a supported signal instead
|
||||
sig = 'SIGINT';
|
||||
}
|
||||
/* istanbul ignore next */
|
||||
process$1.kill(process$1.pid, sig);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
signalExit.exports.signals = function () {
|
||||
return signals
|
||||
};
|
||||
|
||||
var loaded = false;
|
||||
|
||||
var load = function load () {
|
||||
if (loaded || !processOk(rollup.commonjsGlobal.process)) {
|
||||
return
|
||||
}
|
||||
loaded = true;
|
||||
|
||||
// This is the number of onSignalExit's that are in play.
|
||||
// It's important so that we can count the correct number of
|
||||
// listeners on signals, and don't wait for the other one to
|
||||
// handle it instead of us.
|
||||
emitter.count += 1;
|
||||
|
||||
signals = signals.filter(function (sig) {
|
||||
try {
|
||||
process$1.on(sig, sigListeners[sig]);
|
||||
return true
|
||||
} catch (er) {
|
||||
return false
|
||||
}
|
||||
});
|
||||
|
||||
process$1.emit = processEmit;
|
||||
process$1.reallyExit = processReallyExit;
|
||||
};
|
||||
signalExit.exports.load = load;
|
||||
|
||||
var originalProcessReallyExit = process$1.reallyExit;
|
||||
var processReallyExit = function processReallyExit (code) {
|
||||
/* istanbul ignore if */
|
||||
if (!processOk(rollup.commonjsGlobal.process)) {
|
||||
return
|
||||
}
|
||||
process$1.exitCode = code || /* istanbul ignore next */ 0;
|
||||
emit('exit', process$1.exitCode, null);
|
||||
/* istanbul ignore next */
|
||||
emit('afterexit', process$1.exitCode, null);
|
||||
/* istanbul ignore next */
|
||||
originalProcessReallyExit.call(process$1, process$1.exitCode);
|
||||
};
|
||||
|
||||
var originalProcessEmit = process$1.emit;
|
||||
var processEmit = function processEmit (ev, arg) {
|
||||
if (ev === 'exit' && processOk(rollup.commonjsGlobal.process)) {
|
||||
/* istanbul ignore else */
|
||||
if (arg !== undefined) {
|
||||
process$1.exitCode = arg;
|
||||
}
|
||||
var ret = originalProcessEmit.apply(this, arguments);
|
||||
/* istanbul ignore next */
|
||||
emit('exit', process$1.exitCode, null);
|
||||
/* istanbul ignore next */
|
||||
emit('afterexit', process$1.exitCode, null);
|
||||
/* istanbul ignore next */
|
||||
return ret
|
||||
} else {
|
||||
return originalProcessEmit.apply(this, arguments)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const CLEAR_SCREEN = '\u001Bc';
|
||||
function getResetScreen(configs, allowClearScreen) {
|
||||
let clearScreen = allowClearScreen;
|
||||
for (const config of configs) {
|
||||
if (config.watch && config.watch.clearScreen === false) {
|
||||
clearScreen = false;
|
||||
}
|
||||
}
|
||||
if (clearScreen) {
|
||||
return (heading) => loadConfigFile_js.stderr(CLEAR_SCREEN + heading);
|
||||
}
|
||||
let firstRun = true;
|
||||
return (heading) => {
|
||||
if (firstRun) {
|
||||
loadConfigFile_js.stderr(heading);
|
||||
firstRun = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function extractWatchHooks(command) {
|
||||
if (!Array.isArray(command.watch))
|
||||
return {};
|
||||
return command.watch
|
||||
.filter(value => typeof value === 'object')
|
||||
.reduce((acc, keyValueOption) => ({ ...acc, ...keyValueOption }), {});
|
||||
}
|
||||
function createWatchHooks(command) {
|
||||
const watchHooks = extractWatchHooks(command);
|
||||
return function (hook) {
|
||||
if (watchHooks[hook]) {
|
||||
const cmd = watchHooks[hook];
|
||||
if (!command.silent) {
|
||||
loadConfigFile_js.stderr(loadConfigFile_js.cyan(`watch.${hook} ${loadConfigFile_js.bold(`$ ${cmd}`)}`));
|
||||
}
|
||||
try {
|
||||
// !! important - use stderr for all writes from execSync
|
||||
const stdio = [process.stdin, process.stderr, process.stderr];
|
||||
child_process.execSync(cmd, { stdio: command.silent ? 'ignore' : stdio });
|
||||
}
|
||||
catch (e) {
|
||||
loadConfigFile_js.stderr(e.message);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
async function watch(command) {
|
||||
process$2.env.ROLLUP_WATCH = 'true';
|
||||
const isTTY = process$2.stderr.isTTY;
|
||||
const silent = command.silent;
|
||||
let watcher;
|
||||
let configWatcher;
|
||||
let resetScreen;
|
||||
const configFile = command.config ? await cli.getConfigPath(command.config) : null;
|
||||
const runWatchHook = createWatchHooks(command);
|
||||
signalExit.exports(close);
|
||||
process$2.on('uncaughtException', close);
|
||||
if (!process$2.stdin.isTTY) {
|
||||
process$2.stdin.on('end', close);
|
||||
process$2.stdin.resume();
|
||||
}
|
||||
async function loadConfigFromFileAndTrack(configFile) {
|
||||
let configFileData = null;
|
||||
let configFileRevision = 0;
|
||||
configWatcher = index.chokidar.watch(configFile).on('change', reloadConfigFile);
|
||||
await reloadConfigFile();
|
||||
async function reloadConfigFile() {
|
||||
try {
|
||||
const newConfigFileData = await require$$0$2.promises.readFile(configFile, 'utf8');
|
||||
if (newConfigFileData === configFileData) {
|
||||
return;
|
||||
}
|
||||
configFileRevision++;
|
||||
const currentConfigFileRevision = configFileRevision;
|
||||
if (configFileData) {
|
||||
loadConfigFile_js.stderr(`\nReloading updated config...`);
|
||||
}
|
||||
configFileData = newConfigFileData;
|
||||
const { options, warnings } = await loadConfigFile_js.loadAndParseConfigFile(configFile, command);
|
||||
if (currentConfigFileRevision !== configFileRevision) {
|
||||
return;
|
||||
}
|
||||
if (watcher) {
|
||||
await watcher.close();
|
||||
}
|
||||
start(options, warnings);
|
||||
}
|
||||
catch (err) {
|
||||
loadConfigFile_js.handleError(err, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (configFile) {
|
||||
await loadConfigFromFileAndTrack(configFile);
|
||||
}
|
||||
else {
|
||||
const { options, warnings } = await cli.loadConfigFromCommand(command);
|
||||
start(options, warnings);
|
||||
}
|
||||
function start(configs, warnings) {
|
||||
try {
|
||||
watcher = rollup.watch(configs);
|
||||
}
|
||||
catch (err) {
|
||||
return loadConfigFile_js.handleError(err);
|
||||
}
|
||||
watcher.on('event', event => {
|
||||
switch (event.code) {
|
||||
case 'ERROR':
|
||||
warnings.flush();
|
||||
loadConfigFile_js.handleError(event.error, true);
|
||||
runWatchHook('onError');
|
||||
break;
|
||||
case 'START':
|
||||
if (!silent) {
|
||||
if (!resetScreen) {
|
||||
resetScreen = getResetScreen(configs, isTTY);
|
||||
}
|
||||
resetScreen(loadConfigFile_js.underline(`rollup v${rollup.version}`));
|
||||
}
|
||||
runWatchHook('onStart');
|
||||
break;
|
||||
case 'BUNDLE_START':
|
||||
if (!silent) {
|
||||
let input = event.input;
|
||||
if (typeof input !== 'string') {
|
||||
input = Array.isArray(input)
|
||||
? input.join(', ')
|
||||
: Object.values(input).join(', ');
|
||||
}
|
||||
loadConfigFile_js.stderr(loadConfigFile_js.cyan(`bundles ${loadConfigFile_js.bold(input)} → ${loadConfigFile_js.bold(event.output.map(rollup.relativeId).join(', '))}...`));
|
||||
}
|
||||
runWatchHook('onBundleStart');
|
||||
break;
|
||||
case 'BUNDLE_END':
|
||||
warnings.flush();
|
||||
if (!silent)
|
||||
loadConfigFile_js.stderr(loadConfigFile_js.green(`created ${loadConfigFile_js.bold(event.output.map(rollup.relativeId).join(', '))} in ${loadConfigFile_js.bold(cli.ms(event.duration))}`));
|
||||
runWatchHook('onBundleEnd');
|
||||
if (event.result && event.result.getTimings) {
|
||||
cli.printTimings(event.result.getTimings());
|
||||
}
|
||||
break;
|
||||
case 'END':
|
||||
runWatchHook('onEnd');
|
||||
if (!silent && isTTY) {
|
||||
loadConfigFile_js.stderr(`\n[${dateTime()}] waiting for changes...`);
|
||||
}
|
||||
}
|
||||
if ('result' in event && event.result) {
|
||||
event.result.close().catch(error => loadConfigFile_js.handleError(error, true));
|
||||
}
|
||||
});
|
||||
}
|
||||
async function close(code) {
|
||||
process$2.removeListener('uncaughtException', close);
|
||||
// removing a non-existent listener is a no-op
|
||||
process$2.stdin.removeListener('end', close);
|
||||
if (watcher)
|
||||
await watcher.close();
|
||||
if (configWatcher)
|
||||
configWatcher.close();
|
||||
if (code) {
|
||||
process$2.exit(code);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exports.watch = watch;
|
||||
//# sourceMappingURL=watch-cli.js.map
|
||||
307
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/watch.js
generated
vendored
Normal file
307
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/dist/shared/watch.js
generated
vendored
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
/*
|
||||
@license
|
||||
Rollup.js v2.80.0
|
||||
Sun, 22 Feb 2026 06:16:40 GMT - commit d17ae15336a45c3c59b2a4aacac2b14186035d28
|
||||
|
||||
https://github.com/rollup/rollup
|
||||
|
||||
Released under the MIT License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
const require$$0 = require('path');
|
||||
const process = require('process');
|
||||
const rollup = require('./rollup.js');
|
||||
const mergeOptions = require('./mergeOptions.js');
|
||||
const require$$2 = require('os');
|
||||
const index = require('./index.js');
|
||||
require('perf_hooks');
|
||||
require('crypto');
|
||||
require('fs');
|
||||
require('events');
|
||||
require('util');
|
||||
require('stream');
|
||||
|
||||
class FileWatcher {
|
||||
constructor(task, chokidarOptions) {
|
||||
this.transformWatchers = new Map();
|
||||
this.chokidarOptions = chokidarOptions;
|
||||
this.task = task;
|
||||
this.watcher = this.createWatcher(null);
|
||||
}
|
||||
close() {
|
||||
this.watcher.close();
|
||||
for (const watcher of this.transformWatchers.values()) {
|
||||
watcher.close();
|
||||
}
|
||||
}
|
||||
unwatch(id) {
|
||||
this.watcher.unwatch(id);
|
||||
const transformWatcher = this.transformWatchers.get(id);
|
||||
if (transformWatcher) {
|
||||
this.transformWatchers.delete(id);
|
||||
transformWatcher.close();
|
||||
}
|
||||
}
|
||||
watch(id, isTransformDependency) {
|
||||
var _a;
|
||||
if (isTransformDependency) {
|
||||
const watcher = (_a = this.transformWatchers.get(id)) !== null && _a !== void 0 ? _a : this.createWatcher(id);
|
||||
watcher.add(id);
|
||||
this.transformWatchers.set(id, watcher);
|
||||
}
|
||||
else {
|
||||
this.watcher.add(id);
|
||||
}
|
||||
}
|
||||
createWatcher(transformWatcherId) {
|
||||
const task = this.task;
|
||||
const isLinux = require$$2.platform() === 'linux';
|
||||
const isTransformDependency = transformWatcherId !== null;
|
||||
const handleChange = (id, event) => {
|
||||
const changedId = transformWatcherId || id;
|
||||
if (isLinux) {
|
||||
// unwatching and watching fixes an issue with chokidar where on certain systems,
|
||||
// a file that was unlinked and immediately recreated would create a change event
|
||||
// but then no longer any further events
|
||||
watcher.unwatch(changedId);
|
||||
watcher.add(changedId);
|
||||
}
|
||||
task.invalidate(changedId, { event, isTransformDependency });
|
||||
};
|
||||
const watcher = index.chokidar
|
||||
.watch([], this.chokidarOptions)
|
||||
.on('add', id => handleChange(id, 'create'))
|
||||
.on('change', id => handleChange(id, 'update'))
|
||||
.on('unlink', id => handleChange(id, 'delete'));
|
||||
return watcher;
|
||||
}
|
||||
}
|
||||
|
||||
const eventsRewrites = {
|
||||
create: {
|
||||
create: 'buggy',
|
||||
delete: null,
|
||||
update: 'create'
|
||||
},
|
||||
delete: {
|
||||
create: 'update',
|
||||
delete: 'buggy',
|
||||
update: 'buggy'
|
||||
},
|
||||
update: {
|
||||
create: 'buggy',
|
||||
delete: 'delete',
|
||||
update: 'update'
|
||||
}
|
||||
};
|
||||
class Watcher {
|
||||
constructor(configs, emitter) {
|
||||
this.buildDelay = 0;
|
||||
this.buildTimeout = null;
|
||||
this.invalidatedIds = new Map();
|
||||
this.rerun = false;
|
||||
this.running = true;
|
||||
this.emitter = emitter;
|
||||
emitter.close = this.close.bind(this);
|
||||
this.tasks = configs.map(config => new Task(this, config));
|
||||
this.buildDelay = configs.reduce((buildDelay, { watch }) => watch && typeof watch.buildDelay === 'number'
|
||||
? Math.max(buildDelay, watch.buildDelay)
|
||||
: buildDelay, this.buildDelay);
|
||||
process.nextTick(() => this.run());
|
||||
}
|
||||
async close() {
|
||||
if (this.buildTimeout)
|
||||
clearTimeout(this.buildTimeout);
|
||||
for (const task of this.tasks) {
|
||||
task.close();
|
||||
}
|
||||
await this.emitter.emitAndAwait('close');
|
||||
this.emitter.removeAllListeners();
|
||||
}
|
||||
invalidate(file) {
|
||||
if (file) {
|
||||
const prevEvent = this.invalidatedIds.get(file.id);
|
||||
const event = prevEvent ? eventsRewrites[prevEvent][file.event] : file.event;
|
||||
if (event === 'buggy') {
|
||||
//TODO: throws or warn? Currently just ignore, uses new event
|
||||
this.invalidatedIds.set(file.id, file.event);
|
||||
}
|
||||
else if (event === null) {
|
||||
this.invalidatedIds.delete(file.id);
|
||||
}
|
||||
else {
|
||||
this.invalidatedIds.set(file.id, event);
|
||||
}
|
||||
}
|
||||
if (this.running) {
|
||||
this.rerun = true;
|
||||
return;
|
||||
}
|
||||
if (this.buildTimeout)
|
||||
clearTimeout(this.buildTimeout);
|
||||
this.buildTimeout = setTimeout(async () => {
|
||||
this.buildTimeout = null;
|
||||
try {
|
||||
await Promise.all([...this.invalidatedIds].map(([id, event]) => this.emitter.emitAndAwait('change', id, { event })));
|
||||
this.invalidatedIds.clear();
|
||||
this.emitter.emit('restart');
|
||||
this.emitter.removeAwaited();
|
||||
this.run();
|
||||
}
|
||||
catch (error) {
|
||||
this.invalidatedIds.clear();
|
||||
this.emitter.emit('event', {
|
||||
code: 'ERROR',
|
||||
error,
|
||||
result: null
|
||||
});
|
||||
this.emitter.emit('event', {
|
||||
code: 'END'
|
||||
});
|
||||
}
|
||||
}, this.buildDelay);
|
||||
}
|
||||
async run() {
|
||||
this.running = true;
|
||||
this.emitter.emit('event', {
|
||||
code: 'START'
|
||||
});
|
||||
for (const task of this.tasks) {
|
||||
await task.run();
|
||||
}
|
||||
this.running = false;
|
||||
this.emitter.emit('event', {
|
||||
code: 'END'
|
||||
});
|
||||
if (this.rerun) {
|
||||
this.rerun = false;
|
||||
this.invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
class Task {
|
||||
constructor(watcher, config) {
|
||||
this.cache = { modules: [] };
|
||||
this.watchFiles = [];
|
||||
this.closed = false;
|
||||
this.invalidated = true;
|
||||
this.watched = new Set();
|
||||
this.watcher = watcher;
|
||||
this.skipWrite = Boolean(config.watch && config.watch.skipWrite);
|
||||
this.options = mergeOptions.mergeOptions(config);
|
||||
this.outputs = this.options.output;
|
||||
this.outputFiles = this.outputs.map(output => {
|
||||
if (output.file || output.dir)
|
||||
return require$$0.resolve(output.file || output.dir);
|
||||
return undefined;
|
||||
});
|
||||
const watchOptions = this.options.watch || {};
|
||||
this.filter = rollup.createFilter(watchOptions.include, watchOptions.exclude);
|
||||
this.fileWatcher = new FileWatcher(this, {
|
||||
...watchOptions.chokidar,
|
||||
disableGlobbing: true,
|
||||
ignoreInitial: true
|
||||
});
|
||||
}
|
||||
close() {
|
||||
this.closed = true;
|
||||
this.fileWatcher.close();
|
||||
}
|
||||
invalidate(id, details) {
|
||||
this.invalidated = true;
|
||||
if (details.isTransformDependency) {
|
||||
for (const module of this.cache.modules) {
|
||||
if (!module.transformDependencies.includes(id))
|
||||
continue;
|
||||
// effective invalidation
|
||||
module.originalCode = null;
|
||||
}
|
||||
}
|
||||
this.watcher.invalidate({ event: details.event, id });
|
||||
}
|
||||
async run() {
|
||||
if (!this.invalidated)
|
||||
return;
|
||||
this.invalidated = false;
|
||||
const options = {
|
||||
...this.options,
|
||||
cache: this.cache
|
||||
};
|
||||
const start = Date.now();
|
||||
this.watcher.emitter.emit('event', {
|
||||
code: 'BUNDLE_START',
|
||||
input: this.options.input,
|
||||
output: this.outputFiles
|
||||
});
|
||||
let result = null;
|
||||
try {
|
||||
result = await rollup.rollupInternal(options, this.watcher.emitter);
|
||||
if (this.closed) {
|
||||
return;
|
||||
}
|
||||
this.updateWatchedFiles(result);
|
||||
this.skipWrite || (await Promise.all(this.outputs.map(output => result.write(output))));
|
||||
this.watcher.emitter.emit('event', {
|
||||
code: 'BUNDLE_END',
|
||||
duration: Date.now() - start,
|
||||
input: this.options.input,
|
||||
output: this.outputFiles,
|
||||
result
|
||||
});
|
||||
}
|
||||
catch (error) {
|
||||
if (!this.closed) {
|
||||
if (Array.isArray(error.watchFiles)) {
|
||||
for (const id of error.watchFiles) {
|
||||
this.watchFile(id);
|
||||
}
|
||||
}
|
||||
if (error.id) {
|
||||
this.cache.modules = this.cache.modules.filter(module => module.id !== error.id);
|
||||
}
|
||||
}
|
||||
this.watcher.emitter.emit('event', {
|
||||
code: 'ERROR',
|
||||
error,
|
||||
result
|
||||
});
|
||||
}
|
||||
}
|
||||
updateWatchedFiles(result) {
|
||||
const previouslyWatched = this.watched;
|
||||
this.watched = new Set();
|
||||
this.watchFiles = result.watchFiles;
|
||||
this.cache = result.cache;
|
||||
for (const id of this.watchFiles) {
|
||||
this.watchFile(id);
|
||||
}
|
||||
for (const module of this.cache.modules) {
|
||||
for (const depId of module.transformDependencies) {
|
||||
this.watchFile(depId, true);
|
||||
}
|
||||
}
|
||||
for (const id of previouslyWatched) {
|
||||
if (!this.watched.has(id)) {
|
||||
this.fileWatcher.unwatch(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
watchFile(id, isTransformDependency = false) {
|
||||
if (!this.filter(id))
|
||||
return;
|
||||
this.watched.add(id);
|
||||
if (this.outputFiles.some(file => file === id)) {
|
||||
throw new Error('Cannot import the generated bundle');
|
||||
}
|
||||
// this is necessary to ensure that any 'renamed' files
|
||||
// continue to be watched following an error
|
||||
this.fileWatcher.watch(id, isTransformDependency);
|
||||
}
|
||||
}
|
||||
|
||||
exports.Task = Task;
|
||||
exports.Watcher = Watcher;
|
||||
//# sourceMappingURL=watch.js.map
|
||||
142
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/package.json
generated
vendored
Normal file
142
pwa/node_modules/@rollup/plugin-babel/node_modules/rollup/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
{
|
||||
"name": "rollup",
|
||||
"version": "2.80.0",
|
||||
"description": "Next-generation ES module bundler",
|
||||
"main": "dist/rollup.js",
|
||||
"module": "dist/es/rollup.js",
|
||||
"typings": "dist/rollup.d.ts",
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "shx rm -rf dist && node scripts/update-git-commit.js && rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
|
||||
"build:cjs": "shx rm -rf dist && rollup --config rollup.config.ts --configPlugin typescript --configTest && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
|
||||
"build:bootstrap": "node dist/bin/rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup && cp -r dist browser/",
|
||||
"ci:lint": "npm run lint:nofix",
|
||||
"ci:test": "npm run build:cjs && npm run build:bootstrap && npm run test:all",
|
||||
"ci:test:only": "npm run build:cjs && npm run build:bootstrap && npm run test:only",
|
||||
"ci:coverage": "npm run build:cjs && npm run build:bootstrap && nyc --reporter lcovonly mocha",
|
||||
"lint": "eslint . --fix --cache && prettier --write \"**/*.md\"",
|
||||
"lint:nofix": "eslint . --cache && prettier --check \"**/*.md\"",
|
||||
"lint:markdown": "prettier --write \"**/*.md\"",
|
||||
"perf": "npm run build:cjs && node --expose-gc scripts/perf.js",
|
||||
"perf:debug": "node --inspect-brk scripts/perf-debug.js",
|
||||
"perf:init": "node scripts/perf-init.js",
|
||||
"postpublish": "git push && git push --tags",
|
||||
"prepare": "husky install && npm run build",
|
||||
"security": "npm audit",
|
||||
"test": "npm run build && npm run test:all",
|
||||
"test:cjs": "npm run build:cjs && npm run test:only",
|
||||
"test:quick": "mocha -b test/test.js",
|
||||
"test:all": "npm run test:only && npm run test:browser && npm run test:typescript && npm run test:leak && npm run test:package",
|
||||
"test:coverage": "npm run build:cjs && shx rm -rf coverage/* && nyc --reporter html mocha test/test.js",
|
||||
"test:coverage:browser": "npm run build && shx rm -rf coverage/* && nyc mocha test/browser/index.js",
|
||||
"test:leak": "node --expose-gc test/leak/index.js",
|
||||
"test:package": "node scripts/test-package.js",
|
||||
"test:only": "mocha test/test.js",
|
||||
"test:typescript": "shx rm -rf test/typescript/dist && shx cp -r dist test/typescript/ && tsc --noEmit -p test/typescript && tsc --noEmit",
|
||||
"test:browser": "mocha test/browser/index.js",
|
||||
"watch": "rollup --config rollup.config.ts --configPlugin typescript --watch"
|
||||
},
|
||||
"repository": "rollup/rollup",
|
||||
"keywords": [
|
||||
"modules",
|
||||
"bundler",
|
||||
"bundling",
|
||||
"es6",
|
||||
"optimizer"
|
||||
],
|
||||
"author": "Rich Harris",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/rollup/rollup/issues"
|
||||
},
|
||||
"homepage": "https://rollupjs.org/",
|
||||
"optionalDependencies": {
|
||||
"fsevents": "~2.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-alias": "^3.1.9",
|
||||
"@rollup/plugin-buble": "^0.21.3",
|
||||
"@rollup/plugin-commonjs": "^22.0.1",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.3.0",
|
||||
"@rollup/plugin-replace": "^4.0.0",
|
||||
"@rollup/plugin-typescript": "^8.3.3",
|
||||
"@rollup/pluginutils": "^4.2.1",
|
||||
"@types/estree": "0.0.52",
|
||||
"@types/node": "^10.17.60",
|
||||
"@types/signal-exit": "^3.0.1",
|
||||
"@types/yargs-parser": "^20.2.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
||||
"@typescript-eslint/parser": "^5.30.7",
|
||||
"acorn": "^8.7.1",
|
||||
"acorn-jsx": "^5.3.2",
|
||||
"acorn-walk": "^8.2.0",
|
||||
"buble": "^0.20.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"colorette": "^2.0.19",
|
||||
"core-js": "^3.23.5",
|
||||
"date-time": "^4.0.0",
|
||||
"es5-shim": "^4.6.7",
|
||||
"es6-shim": "^0.35.6",
|
||||
"eslint": "^8.20.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"execa": "^5.1.1",
|
||||
"fixturify": "^2.1.1",
|
||||
"fs-extra": "^10.1.0",
|
||||
"hash.js": "^1.1.7",
|
||||
"husky": "^7.0.4",
|
||||
"is-reference": "^3.0.0",
|
||||
"lint-staged": "^10.5.4",
|
||||
"locate-character": "^2.0.5",
|
||||
"magic-string": "^0.26.2",
|
||||
"mocha": "^9.2.2",
|
||||
"nyc": "^15.1.0",
|
||||
"prettier": "^2.7.1",
|
||||
"pretty-bytes": "^5.6.0",
|
||||
"pretty-ms": "^7.0.1",
|
||||
"requirejs": "^2.3.6",
|
||||
"rollup": "^2.77.0",
|
||||
"rollup-plugin-license": "^2.8.1",
|
||||
"rollup-plugin-string": "^3.0.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-thatworks": "^1.0.4",
|
||||
"shx": "^0.3.4",
|
||||
"signal-exit": "^3.0.7",
|
||||
"source-map": "^0.7.4",
|
||||
"source-map-support": "^0.5.21",
|
||||
"sourcemap-codec": "^1.4.8",
|
||||
"systemjs": "^6.12.1",
|
||||
"terser": "^5.14.2",
|
||||
"tslib": "^2.4.0",
|
||||
"typescript": "^4.7.4",
|
||||
"weak-napi": "^2.0.2",
|
||||
"yargs-parser": "^20.2.9"
|
||||
},
|
||||
"files": [
|
||||
"dist/**/*.js",
|
||||
"dist/*.d.ts",
|
||||
"dist/bin/rollup",
|
||||
"dist/es/package.json",
|
||||
"dist/rollup.browser.js.map"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/rollup.d.ts",
|
||||
"node": {
|
||||
"require": "./dist/rollup.js",
|
||||
"import": "./dist/es/rollup.js"
|
||||
},
|
||||
"default": "./dist/es/rollup.browser.js"
|
||||
},
|
||||
"./loadConfigFile": "./dist/loadConfigFile.js",
|
||||
"./dist/loadConfigFile": "./dist/loadConfigFile.js",
|
||||
"./dist/*": "./dist/*"
|
||||
}
|
||||
}
|
||||
91
pwa/node_modules/@rollup/plugin-babel/package.json
generated
vendored
Normal file
91
pwa/node_modules/@rollup/plugin-babel/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"name": "@rollup/plugin-babel",
|
||||
"version": "5.3.1",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"description": "Seamless integration between Rollup and Babel.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"url": "rollup/plugins",
|
||||
"directory": "packages/babel"
|
||||
},
|
||||
"author": "Rich Harris",
|
||||
"homepage": "https://github.com/rollup/plugins/tree/master/packages/babel#readme",
|
||||
"bugs": "https://github.com/rollup/plugins/issues",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.es.js",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"ci:coverage": "nyc pnpm test && nyc report --reporter=text-lcov > coverage.lcov",
|
||||
"ci:lint": "pnpm build && pnpm lint",
|
||||
"ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}",
|
||||
"ci:test": "pnpm test -- --verbose",
|
||||
"prebuild": "del-cli dist",
|
||||
"prerelease": "pnpm build",
|
||||
"pretest": "pnpm build",
|
||||
"release": "pnpm plugin:release --workspace-root -- --pkg $npm_package_name",
|
||||
"test": "ava",
|
||||
"test:ts": "tsc types/index.d.ts test/types.ts --noEmit"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"types",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"keywords": [
|
||||
"rollup",
|
||||
"plugin",
|
||||
"rollup-plugin",
|
||||
"babel",
|
||||
"es2015",
|
||||
"es6"
|
||||
],
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0",
|
||||
"@types/babel__core": "^7.1.9",
|
||||
"rollup": "^1.20.0||^2.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/babel__core": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": "^7.10.4",
|
||||
"@rollup/pluginutils": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/plugin-external-helpers": "^7.10.4",
|
||||
"@babel/plugin-proposal-decorators": "^7.10.5",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||
"@babel/plugin-transform-runtime": "^7.10.5",
|
||||
"@babel/preset-env": "^7.10.4",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^10.0.0",
|
||||
"@types/babel__core": "^7.1.9",
|
||||
"rollup": "^2.67.3",
|
||||
"source-map": "^0.7.3"
|
||||
},
|
||||
"types": "types/index.d.ts",
|
||||
"ava": {
|
||||
"babel": {
|
||||
"compileEnhancements": false
|
||||
},
|
||||
"files": [
|
||||
"!**/fixtures/**",
|
||||
"!**/helpers/**",
|
||||
"!**/recipes/**",
|
||||
"!**/types.ts"
|
||||
]
|
||||
},
|
||||
"contributors": [
|
||||
"Bogdan Chadkin <trysound@yandex.ru>",
|
||||
"Mateusz Burzyński <mateuszburzynski@gmail.com> (https://github.com/Andarist)"
|
||||
]
|
||||
}
|
||||
133
pwa/node_modules/@rollup/plugin-babel/types/index.d.ts
generated
vendored
Normal file
133
pwa/node_modules/@rollup/plugin-babel/types/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
import { Plugin, PluginContext, TransformPluginContext } from 'rollup';
|
||||
import { FilterPattern, CreateFilter } from '@rollup/pluginutils';
|
||||
import * as babelCore from '@babel/core';
|
||||
|
||||
export interface RollupBabelInputPluginOptions
|
||||
extends Omit<babelCore.TransformOptions, 'include' | 'exclude'> {
|
||||
/**
|
||||
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on. When relying on Babel configuration files you cannot include files already excluded there.
|
||||
* @default undefined;
|
||||
*/
|
||||
include?: FilterPattern;
|
||||
/**
|
||||
* A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore. When relaying on Babel configuration files you can only exclude additional files with this option, you cannot override what you have configured for Babel itself.
|
||||
* @default undefined;
|
||||
*/
|
||||
exclude?: FilterPattern;
|
||||
/**
|
||||
* Custom filter function can be used to determine whether or not certain modules should be operated upon.
|
||||
* Example:
|
||||
* import { createFilter } from '@rollup/pluginutils';
|
||||
* const include = 'include/**.js';
|
||||
* const exclude = 'exclude/**.js';
|
||||
* const filter = createFilter(include, exclude, {});
|
||||
* @default undefined;
|
||||
*/
|
||||
filter?: ReturnType<CreateFilter>;
|
||||
/**
|
||||
* An array of file extensions that Babel should transpile. If you want to transpile TypeScript files with this plugin it's essential to include .ts and .tsx in this option.
|
||||
* @default ['.js', '.jsx', '.es6', '.es', '.mjs']
|
||||
*/
|
||||
extensions?: string[];
|
||||
/**
|
||||
* It is recommended to configure this option explicitly (even if with its default value) so an informed decision is taken on how those babel helpers are inserted into the code.
|
||||
* @default 'bundled'
|
||||
*/
|
||||
babelHelpers?: 'bundled' | 'runtime' | 'inline' | 'external';
|
||||
/**
|
||||
* Before transpiling your input files this plugin also transpile a short piece of code for each input file. This is used to validate some misconfiguration errors, but for sufficiently big projects it can slow your build times so if you are confident about your configuration then you might disable those checks with this option.
|
||||
* @default false
|
||||
*/
|
||||
skipPreflightCheck?: boolean;
|
||||
}
|
||||
|
||||
export interface RollupBabelOutputPluginOptions
|
||||
extends Omit<babelCore.TransformOptions, 'include' | 'exclude'> {
|
||||
/**
|
||||
* Use with other formats than UMD/IIFE.
|
||||
* @default false
|
||||
*/
|
||||
allowAllFormats?: boolean;
|
||||
}
|
||||
|
||||
export type RollupBabelCustomInputPluginOptions = (
|
||||
options: RollupBabelInputPluginOptions & Record<string, any>
|
||||
) => {
|
||||
customOptions: Record<string, any>;
|
||||
pluginOptions: RollupBabelInputPluginOptions;
|
||||
};
|
||||
export type RollupBabelCustomOutputPluginOptions = (
|
||||
options: RollupBabelOutputPluginOptions & Record<string, any>
|
||||
) => {
|
||||
customOptions: Record<string, any>;
|
||||
pluginOptions: RollupBabelOutputPluginOptions;
|
||||
};
|
||||
export interface RollupBabelCustomPluginConfigOptions {
|
||||
code: string;
|
||||
customOptions: Record<string, any>;
|
||||
}
|
||||
export interface RollupBabelCustomPluginResultOptions {
|
||||
code: string;
|
||||
customOptions: Record<string, any>;
|
||||
config: babelCore.PartialConfig;
|
||||
transformOptions: babelCore.TransformOptions;
|
||||
}
|
||||
export type RollupBabelCustomInputPluginConfig = (
|
||||
this: TransformPluginContext,
|
||||
cfg: babelCore.PartialConfig,
|
||||
options: RollupBabelCustomPluginConfigOptions
|
||||
) => babelCore.TransformOptions;
|
||||
export type RollupBabelCustomInputPluginResult = (
|
||||
this: TransformPluginContext,
|
||||
result: babelCore.BabelFileResult,
|
||||
options: RollupBabelCustomPluginResultOptions
|
||||
) => babelCore.BabelFileResult;
|
||||
export type RollupBabelCustomOutputPluginConfig = (
|
||||
this: PluginContext,
|
||||
cfg: babelCore.PartialConfig,
|
||||
options: RollupBabelCustomPluginConfigOptions
|
||||
) => babelCore.TransformOptions;
|
||||
export type RollupBabelCustomOutputPluginResult = (
|
||||
this: PluginContext,
|
||||
result: babelCore.BabelFileResult,
|
||||
options: RollupBabelCustomPluginResultOptions
|
||||
) => babelCore.BabelFileResult;
|
||||
export interface RollupBabelCustomInputPlugin {
|
||||
options?: RollupBabelCustomInputPluginOptions;
|
||||
config?: RollupBabelCustomInputPluginConfig;
|
||||
result?: RollupBabelCustomInputPluginResult;
|
||||
}
|
||||
export interface RollupBabelCustomOutputPlugin {
|
||||
options?: RollupBabelCustomOutputPluginOptions;
|
||||
config?: RollupBabelCustomOutputPluginConfig;
|
||||
result?: RollupBabelCustomOutputPluginResult;
|
||||
}
|
||||
export type RollupBabelCustomInputPluginBuilder = (
|
||||
babel: typeof babelCore
|
||||
) => RollupBabelCustomInputPlugin;
|
||||
export type RollupBabelCustomOutputPluginBuilder = (
|
||||
babel: typeof babelCore
|
||||
) => RollupBabelCustomOutputPlugin;
|
||||
|
||||
/**
|
||||
* A Rollup plugin for seamless integration between Rollup and Babel.
|
||||
* @param options - Plugin options.
|
||||
* @returns Plugin instance.
|
||||
*/
|
||||
export function getBabelInputPlugin(options?: RollupBabelInputPluginOptions): Plugin;
|
||||
export function getBabelOutputPlugin(options?: RollupBabelOutputPluginOptions): Plugin;
|
||||
|
||||
export function createBabelInputPluginFactory(
|
||||
customCallback?: RollupBabelCustomInputPluginBuilder
|
||||
): typeof getBabelInputPlugin;
|
||||
export function createBabelOutputPluginFactory(
|
||||
customCallback?: RollupBabelCustomOutputPluginBuilder
|
||||
): typeof getBabelOutputPlugin;
|
||||
|
||||
/**
|
||||
* A Rollup plugin for seamless integration between Rollup and Babel.
|
||||
* @param options - Plugin options.
|
||||
* @returns Plugin instance.
|
||||
*/
|
||||
export function babel(options?: RollupBabelInputPluginOptions): Plugin;
|
||||
export default babel;
|
||||
Loading…
Add table
Add a link
Reference in a new issue