├── .nvmrc
├── examples
├── webpack
│ ├── entry-one.js
│ ├── entry-two.js
│ ├── .eslintignore
│ ├── .gitignore
│ ├── .eslintrc.json
│ ├── package.json
│ ├── webpack.config.js
│ └── package-lock.json
├── electron-forge-webpack
│ ├── .eslintignore
│ ├── .gitignore
│ ├── src
│ │ ├── preload.js
│ │ ├── renderer.css
│ │ ├── renderer.html
│ │ ├── renderer.js
│ │ └── main.js
│ ├── webpack.shared.plugins.js
│ ├── .eslintrc.json
│ ├── webpack.main.config.js
│ ├── webpack.preload.config.js
│ ├── webpack.renderer.config.js
│ ├── webpack.shared.rules.js
│ ├── forge.config.js
│ └── package.json
└── electron-forge-typescript-webpack
│ ├── .eslintignore
│ ├── .gitignore
│ ├── src
│ ├── preload.ts
│ ├── renderer.css
│ ├── renderer.html
│ ├── renderer.ts
│ └── main.ts
│ ├── webpack.shared.plugins.ts
│ ├── tsconfig.json
│ ├── webpack.main.config.ts
│ ├── webpack.preload.config.ts
│ ├── webpack.renderer.config.ts
│ ├── .eslintrc.json
│ ├── webpack.shared.rules.ts
│ ├── forge.config.ts
│ └── package.json
├── test
├── webpack
│ ├── fixtures
│ │ ├── first.js
│ │ ├── second.js
│ │ ├── third.js
│ │ └── dependency.js
│ ├── entry-as-function.test.ts
│ ├── entry-as-string.test.ts
│ ├── entry-dependency.test.ts
│ ├── entry-filename.test.ts
│ ├── plugin-keep-source.test.ts
│ ├── output-filename.test.ts
│ ├── output-leak.test.ts
│ ├── runner.test.ts
│ ├── entry-as-object.test.ts
│ ├── plugin-debug-lifecycle.test.ts
│ ├── plugin-include.test.ts
│ ├── plugin-prevent-source-maps.test.ts
│ ├── plugin-exclude.test.ts
│ ├── entry-as-array.test.ts
│ ├── plugin-compile-for-electron.test.ts
│ └── runner.ts
├── mocks
│ ├── bytenode.ts
│ └── platform.ts
├── loaders.test.ts
├── examples.test.ts
├── sources.test.ts
└── utils.test.ts
├── src
├── index.ts
├── sources.ts
├── types.ts
├── loaders.ts
├── utils.ts
└── plugin.ts
├── .eslintignore
├── .gitignore
├── tsconfig.test.json
├── tsconfig.project.json
├── .editorconfig
├── .releaserc.yml
├── jest.config.ts
├── tsconfig.json
├── .github
└── workflows
│ ├── release.yml
│ └── ci.yml
├── LICENSE
├── package.json
├── .eslintrc.js
├── CHANGELOG.md
└── README.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | v14
2 |
--------------------------------------------------------------------------------
/examples/webpack/entry-one.js:
--------------------------------------------------------------------------------
1 | console.log('one');
2 |
--------------------------------------------------------------------------------
/examples/webpack/entry-two.js:
--------------------------------------------------------------------------------
1 | console.log('two');
2 |
--------------------------------------------------------------------------------
/test/webpack/fixtures/first.js:
--------------------------------------------------------------------------------
1 | console.log('first')
2 |
--------------------------------------------------------------------------------
/test/webpack/fixtures/second.js:
--------------------------------------------------------------------------------
1 | console.log('second')
2 |
--------------------------------------------------------------------------------
/test/webpack/fixtures/third.js:
--------------------------------------------------------------------------------
1 | console.log('third')
2 |
--------------------------------------------------------------------------------
/examples/webpack/.eslintignore:
--------------------------------------------------------------------------------
1 | .webpack/
2 | node_modules/
3 | out/
4 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './plugin';
2 | export * from './types';
3 |
--------------------------------------------------------------------------------
/examples/webpack/.gitignore:
--------------------------------------------------------------------------------
1 | .webpack/
2 | dist/
3 | node_modules/
4 | out/
5 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/.eslintignore:
--------------------------------------------------------------------------------
1 | .webpack/
2 | node_modules/
3 | out/
4 |
--------------------------------------------------------------------------------
/test/webpack/fixtures/dependency.js:
--------------------------------------------------------------------------------
1 | import 'fs';
2 |
3 | console.log('dependency');
4 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/.gitignore:
--------------------------------------------------------------------------------
1 | .webpack/
2 | dist/
3 | node_modules/
4 | out/
5 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/.eslintignore:
--------------------------------------------------------------------------------
1 | .webpack/
2 | node_modules/
3 | out/
4 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/.gitignore:
--------------------------------------------------------------------------------
1 | .webpack/
2 | dist/
3 | node_modules/
4 | out/
5 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/src/preload.js:
--------------------------------------------------------------------------------
1 | console.log('🍕 This message is being logged by "src/preload.js", included via webpack.');
2 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/src/preload.ts:
--------------------------------------------------------------------------------
1 | console.log('🍕 This message is being logged by "src/preload.ts", included via webpack.');
2 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | .eslintrc.js
2 |
3 | **/.webpack/
4 | **/coverage/
5 | **/dist/
6 | **/lib/
7 | **/node_modules/
8 | **/out/
9 | **/output/
10 |
11 | **/examples/
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.debug
2 | *.eslintcache
3 | *.log
4 | *.tsbuildinfo
5 |
6 | .idea/
7 | .vscode/
8 |
9 | **/.webpack/
10 | **/coverage/
11 | **/dist/
12 | **/lib/
13 | **/node_modules/
14 | **/out/
15 | **/output/
16 |
--------------------------------------------------------------------------------
/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.project.json",
3 | "include": [
4 | "jest.config.ts",
5 | "src",
6 | "test"
7 | ],
8 | "exclude": [
9 | "examples",
10 | "lib"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/src/renderer.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
3 | margin: auto;
4 | max-width: 38rem;
5 | padding: 2rem;
6 | }
7 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/src/renderer.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
3 | margin: auto;
4 | max-width: 38rem;
5 | padding: 2rem;
6 | }
7 |
--------------------------------------------------------------------------------
/tsconfig.project.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "lib",
5 | "rootDir": "src"
6 | },
7 | "exclude": [
8 | "examples",
9 | "jest.config.ts",
10 | "lib",
11 | "test"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | end_of_line = lf
7 | indent_size = 2
8 | indent_style = space
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/webpack.shared.plugins.js:
--------------------------------------------------------------------------------
1 | const { BytenodeWebpackPlugin } = require('@herberttn/bytenode-webpack-plugin');
2 |
3 | const plugins = [
4 | new BytenodeWebpackPlugin({
5 | compileForElectron: true,
6 | }),
7 | ];
8 |
9 | module.exports = {
10 | plugins,
11 | };
12 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/src/renderer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | electron-forge-webpack-example
6 |
7 |
8 | electron-forge-webpack-example
9 | Welcome to your Electron application.
10 | 🍕
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/src/renderer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | electron-forge-typescript-webpack-example
6 |
7 |
8 | electron-forge-typescript-webpack-example
9 | Welcome to your Electron application.
10 | 🍕
11 |
12 |
13 |
--------------------------------------------------------------------------------
/test/webpack/entry-as-function.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('entry as a function', () => {
4 |
5 | test('should not be supported', async () => {
6 | const assets = runWebpack({
7 | entry: () => './fixtures/first.js',
8 | });
9 |
10 | await expect(assets).rejects.toThrow('webpack.options.entry cannot be a function');
11 | });
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/test/webpack/entry-as-string.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('entry as a string', () => {
4 |
5 | test('should be supported', async () => {
6 | const { names } = await runWebpack({
7 | entry: './fixtures/first.js',
8 | });
9 |
10 | expect(names).toStrictEqual([
11 | 'main.compiled.jsc',
12 | 'main.js',
13 | ]);
14 | });
15 |
16 | });
17 |
--------------------------------------------------------------------------------
/test/webpack/entry-dependency.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('entry dependency', () => {
4 |
5 | test('should just work', async () => {
6 | const { names } = await runWebpack({
7 | entry: './fixtures/dependency.js',
8 | });
9 |
10 | expect(names).toStrictEqual([
11 | 'main.compiled.jsc',
12 | 'main.js',
13 | ]);
14 | });
15 |
16 | });
17 |
--------------------------------------------------------------------------------
/examples/webpack/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": false,
4 | "es6": true,
5 | "node": true
6 | },
7 | "extends": [
8 | "eslint:recommended",
9 | "plugin:import/errors",
10 | "plugin:import/warnings"
11 | ],
12 | "plugins": [
13 | "import"
14 | ],
15 | "root": true,
16 | "rules": {
17 | "quotes": ["error", "single", {
18 | "allowTemplateLiterals": true
19 | }]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "es6": true,
5 | "node": true
6 | },
7 | "extends": [
8 | "eslint:recommended",
9 | "plugin:import/errors",
10 | "plugin:import/warnings"
11 | ],
12 | "plugins": [
13 | "import"
14 | ],
15 | "root": true,
16 | "rules": {
17 | "quotes": ["error", "single", {
18 | "allowTemplateLiterals": true
19 | }]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/test/mocks/bytenode.ts:
--------------------------------------------------------------------------------
1 | // eslint-disable-next-line @typescript-eslint/consistent-type-imports
2 | async function mockBytenode(mock: Partial): Promise {
3 | jest.doMock('bytenode', () => {
4 | const bytenode = jest.requireActual('bytenode');
5 |
6 | return { ...bytenode, ...mock };
7 | });
8 |
9 | const bytenode = await import('bytenode');
10 | expect(bytenode).toMatchObject(mock);
11 | }
12 |
13 | export {
14 | mockBytenode,
15 | };
16 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/webpack.shared.plugins.ts:
--------------------------------------------------------------------------------
1 | import { BytenodeWebpackPlugin } from '@herberttn/bytenode-webpack-plugin';
2 | import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin';
3 | import type { WebpackPluginInstance } from 'webpack';
4 |
5 | const plugins: WebpackPluginInstance[] = [
6 | new BytenodeWebpackPlugin({
7 | compileForElectron: true,
8 | }),
9 | new ForkTsCheckerWebpackPlugin(),
10 | ];
11 |
12 | export {
13 | plugins,
14 | };
15 |
--------------------------------------------------------------------------------
/test/webpack/entry-filename.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('entry filename', () => {
4 |
5 | test('should not support entry filename', async () => {
6 | const promise = runWebpack({
7 | entry: {
8 | named: {
9 | filename: 'other.js',
10 | import: './fixtures/first.js',
11 | },
12 | },
13 | });
14 |
15 | await expect(promise).rejects.toThrow('webpack.options.entry.filename is not supported');
16 | });
17 |
18 | });
19 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowJs": true,
4 | "module": "commonjs",
5 | "skipLibCheck": true,
6 | "esModuleInterop": true,
7 | "noImplicitAny": true,
8 | "sourceMap": true,
9 | "baseUrl": ".",
10 | "outDir": "dist",
11 | "moduleResolution": "node",
12 | "resolveJsonModule": true,
13 | "paths": {
14 | "*": ["node_modules/*"]
15 | }
16 | },
17 | "include": [
18 | "*.ts",
19 | "src/**/*",
20 | ]
21 | }
22 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/webpack.main.config.js:
--------------------------------------------------------------------------------
1 | const { rules } = require('./webpack.shared.rules');
2 | const { plugins } = require('./webpack.shared.plugins');
3 |
4 | const mainConfig = {
5 | entry: {
6 | index: './src/main.js',
7 | },
8 | module: {
9 | rules,
10 | },
11 | output: {
12 | devtoolModuleFilenameTemplate: '[absolute-resource-path]',
13 | filename: '[name].js',
14 | },
15 | plugins,
16 | target: 'electron-main',
17 | };
18 |
19 | module.exports = {
20 | mainConfig,
21 | };
22 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/webpack.preload.config.js:
--------------------------------------------------------------------------------
1 | const { rules } = require('./webpack.shared.rules');
2 | const { plugins } = require('./webpack.shared.plugins');
3 |
4 | const preloadConfig = {
5 | entry: {
6 | preload: './src/preload.js',
7 | },
8 | module: {
9 | rules,
10 | },
11 | output: {
12 | devtoolModuleFilenameTemplate: '[absolute-resource-path]',
13 | filename: '[name].js',
14 | },
15 | plugins,
16 | target: 'electron-preload',
17 | };
18 |
19 | module.exports = {
20 | preloadConfig,
21 | };
22 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/webpack.renderer.config.js:
--------------------------------------------------------------------------------
1 | const { rules } = require('./webpack.shared.rules');
2 | const { plugins } = require('./webpack.shared.plugins');
3 |
4 | const rendererConfig = {
5 | module: {
6 | rules: [
7 | ...rules,
8 | {
9 | test: /\.css$/,
10 | use: [
11 | { loader: 'style-loader' },
12 | { loader: 'css-loader' },
13 | ],
14 | },
15 | ],
16 | },
17 | output: {
18 | devtoolModuleFilenameTemplate: '[absolute-resource-path]',
19 | },
20 | plugins,
21 | target: 'electron-renderer',
22 | };
23 |
24 | module.exports = {
25 | rendererConfig,
26 | };
27 |
--------------------------------------------------------------------------------
/.releaserc.yml:
--------------------------------------------------------------------------------
1 | branches:
2 | - { name: main }
3 | - { name: beta, prerelease: beta }
4 | - { name: rc, prerelease: rc }
5 | plugins:
6 | - - '@semantic-release/commit-analyzer'
7 | - releaseRules:
8 | # rules that do not match will fallback to the defaults, which
9 | # already handles feat, fix, perf, breaking changes and reverts
10 | - { type: docs, release: patch }
11 | - { type: refactor, release: patch }
12 | - { type: test, release: patch }
13 | - '@semantic-release/release-notes-generator'
14 | - '@semantic-release/changelog'
15 | - '@semantic-release/npm'
16 | - '@semantic-release/git'
17 | - '@semantic-release/github'
18 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/webpack.main.config.ts:
--------------------------------------------------------------------------------
1 | import type { Configuration } from 'webpack';
2 |
3 | import { rules } from './webpack.shared.rules';
4 | import { plugins } from './webpack.shared.plugins';
5 |
6 | const mainConfig: Configuration = {
7 | entry: {
8 | index: './src/main.ts',
9 | },
10 | module: {
11 | rules,
12 | },
13 | output: {
14 | devtoolModuleFilenameTemplate: '[absolute-resource-path]',
15 | filename: '[name].js',
16 | },
17 | plugins,
18 | resolve: {
19 | extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
20 | },
21 | target: 'electron-main',
22 | };
23 |
24 | export {
25 | mainConfig,
26 | };
27 |
--------------------------------------------------------------------------------
/jest.config.ts:
--------------------------------------------------------------------------------
1 | import { resolve } from 'path';
2 |
3 | import type { Config } from 'jest';
4 |
5 | const ignorePatterns = [
6 | '/node_modules/',
7 | '/test/webpack/fixtures/',
8 | '/test/webpack/output/',
9 | ];
10 |
11 | export default function(): Config {
12 | return {
13 | collectCoverage: true,
14 | coveragePathIgnorePatterns: ignorePatterns,
15 | preset: 'ts-jest/presets/default',
16 | testEnvironment: 'node',
17 | transform: {
18 | '^.+\\.tsx?$': ['ts-jest', {
19 | tsconfig: resolve(__dirname, './tsconfig.test.json'),
20 | }],
21 | },
22 | watchPathIgnorePatterns: ignorePatterns,
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/webpack.preload.config.ts:
--------------------------------------------------------------------------------
1 | import type { Configuration } from 'webpack';
2 |
3 | import { rules } from './webpack.shared.rules';
4 | import { plugins } from './webpack.shared.plugins';
5 |
6 | const preloadConfig: Configuration = {
7 | entry: {
8 | preload: './src/preload.ts',
9 | },
10 | module: {
11 | rules,
12 | },
13 | output: {
14 | devtoolModuleFilenameTemplate: '[absolute-resource-path]',
15 | filename: '[name].js',
16 | },
17 | plugins,
18 | resolve: {
19 | extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
20 | },
21 | target: 'electron-preload',
22 | };
23 |
24 | export {
25 | preloadConfig,
26 | };
27 |
--------------------------------------------------------------------------------
/examples/webpack/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "webpack-example",
3 | "description": "Description of webpack-example",
4 | "version": "1.0.0",
5 | "license": "MIT",
6 | "author": {
7 | "name": "herberttn"
8 | },
9 | "scripts": {
10 | "clean": "rimraf .eslintcache .webpack out",
11 | "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --cache --max-warnings 0",
12 | "make": "npm run clean && webpack-cli"
13 | },
14 | "devDependencies": {
15 | "@herberttn/bytenode-webpack-plugin": "2.3.0",
16 | "eslint": "8.35.0",
17 | "eslint-plugin-import": "2.27.5",
18 | "rimraf": "4.1.2",
19 | "webpack": "5.x",
20 | "webpack-cli": "5.0.1"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/webpack/webpack.config.js:
--------------------------------------------------------------------------------
1 | const { resolve } = require('path');
2 |
3 | const { BytenodeWebpackPlugin } = require('@herberttn/bytenode-webpack-plugin');
4 |
5 | module.exports = {
6 | entry: {
7 | one: './entry-one.js',
8 | two: './entry-two.js',
9 | },
10 | // infrastructureLogging: {
11 | // debug: true,
12 | // level: 'verbose',
13 | // },
14 | mode: 'production',
15 | output: {
16 | filename: '[name]-[contenthash].js',
17 | path: resolve(__dirname, 'out'),
18 | },
19 | plugins: [
20 | new BytenodeWebpackPlugin(),
21 | ],
22 | // stats: {
23 | // logging: 'verbose',
24 | // loggingDebug: true,
25 | // },
26 | target: 'node14',
27 | };
28 |
--------------------------------------------------------------------------------
/test/mocks/platform.ts:
--------------------------------------------------------------------------------
1 | const UNIX_PLATFORMS: NodeJS.Platform[] = ['darwin', 'linux'];
2 | const ALL_PLATFORMS: NodeJS.Platform[] = [...UNIX_PLATFORMS, 'win32'];
3 |
4 | async function mockPlatform(platform: NodeJS.Platform): Promise {
5 | jest.doMock('os', () => {
6 | // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
7 | const os = jest.requireActual('os');
8 |
9 | // eslint-disable-next-line @typescript-eslint/no-unsafe-return
10 | return { ...os, platform: () => platform };
11 | });
12 |
13 | const os = await import('os');
14 | expect(os.platform()).toBe(platform);
15 | }
16 |
17 | export {
18 | ALL_PLATFORMS,
19 | mockPlatform,
20 | UNIX_PLATFORMS,
21 | };
22 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/webpack.shared.rules.js:
--------------------------------------------------------------------------------
1 | const rules = [
2 | // Add support for native node modules
3 | {
4 | // We're specifying native_modules in the test because the asset relocator loader generates a
5 | // "fake" .node file which is really a cjs file.
6 | test: /native_modules[/\\].+\.node$/,
7 | use: 'node-loader',
8 | },
9 | {
10 | test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
11 | parser: { amd: false },
12 | use: {
13 | loader: '@vercel/webpack-asset-relocator-loader',
14 | options: {
15 | outputAssetBase: 'native_modules',
16 | },
17 | },
18 | },
19 | // Put your webpack loader rules in this array.
20 | ];
21 |
22 | module.exports = {
23 | rules,
24 | };
25 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/webpack.renderer.config.ts:
--------------------------------------------------------------------------------
1 | import type { Configuration } from 'webpack';
2 |
3 | import { rules } from './webpack.shared.rules';
4 | import { plugins } from './webpack.shared.plugins';
5 |
6 | const rendererConfig: Configuration = {
7 | module: {
8 | rules: [
9 | ...rules,
10 | {
11 | test: /\.css$/,
12 | use: [
13 | { loader: 'style-loader' },
14 | { loader: 'css-loader' },
15 | ],
16 | },
17 | ],
18 | },
19 | output: {
20 | devtoolModuleFilenameTemplate: '[absolute-resource-path]',
21 | },
22 | plugins,
23 | resolve: {
24 | extensions: ['.js', '.ts', '.jsx', '.tsx', '.css']
25 | },
26 | target: 'electron-renderer',
27 | };
28 |
29 | export {
30 | rendererConfig,
31 | };
32 |
--------------------------------------------------------------------------------
/test/webpack/plugin-keep-source.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('plugin option: keepSource', () => {
4 |
5 | test('should keep source when true', async () => {
6 | const { names } = await runWebpack({
7 | entry: './fixtures/first.js',
8 | }, {
9 | keepSource: true,
10 | });
11 |
12 | expect(names).toStrictEqual([
13 | 'main.compiled.js',
14 | 'main.compiled.jsc',
15 | 'main.js',
16 | ]);
17 | });
18 |
19 | test('should delete source when false', async () => {
20 | const { names } = await runWebpack({
21 | entry: './fixtures/first.js',
22 | }, {
23 | keepSource: false,
24 | });
25 |
26 | expect(names).toStrictEqual([
27 | 'main.compiled.jsc',
28 | 'main.js',
29 | ]);
30 | });
31 |
32 | });
33 |
--------------------------------------------------------------------------------
/test/webpack/output-filename.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('output', () => {
4 |
5 | test('should not support static filename', async () => {
6 | const assets = runWebpack({
7 | entry: './fixtures/first.js',
8 | output: {
9 | filename: 'static.js',
10 | },
11 | });
12 |
13 | await expect(assets).rejects.toThrow('webpack.options.output.filename cannot be static, use a dynamic one like [name].js');
14 | });
15 |
16 | test('should support dynamic filename', async () => {
17 | const { names } = await runWebpack({
18 | entry: './fixtures/first.js',
19 | output: {
20 | filename: '[name].js',
21 | },
22 | });
23 |
24 | expect(names).toStrictEqual([
25 | 'main.compiled.jsc',
26 | 'main.js',
27 | ]);
28 | });
29 |
30 | });
31 |
--------------------------------------------------------------------------------
/test/webpack/output-leak.test.ts:
--------------------------------------------------------------------------------
1 | import { readFixtureContent, runWebpack } from './runner';
2 |
3 | describe('output', () => {
4 |
5 | const entry = './fixtures/first.js';
6 | const loader = 'main.js';
7 | const target = 'main.compiled.jsc';
8 |
9 | test('should not leak target code in the loader code', async () => {
10 | const { assets, names } = await runWebpack({ entry });
11 | expect(names).toStrictEqual([target, loader]);
12 |
13 | const entryContent = await readFixtureContent(entry);
14 | const loaderContent = assets[loader].content;
15 | expect(loaderContent).not.toContain(entryContent);
16 | });
17 |
18 | test('should import the targets compiled file', async () => {
19 | const { assets, names } = await runWebpack({ entry });
20 | expect(names).toStrictEqual([target, loader]);
21 |
22 | const loaderContent = assets[loader].content;
23 | expect(loaderContent).toContain(target);
24 | });
25 |
26 | });
27 |
--------------------------------------------------------------------------------
/test/webpack/runner.test.ts:
--------------------------------------------------------------------------------
1 | import { readFixtureContent, runWebpack } from './runner';
2 |
3 | describe('runner', () => {
4 |
5 | test('should be able to read and normalize fixture content', async () => {
6 | const content = await readFixtureContent('./fixtures/first.js');
7 |
8 | expect(content).toStrictEqual('console.log(\"first\")'); // eslint-disable-line no-useless-escape
9 | });
10 |
11 | test('should reject an invalid entry', async () => {
12 | const runner = runWebpack({
13 | entry: './fixtures/invalid.js',
14 | });
15 |
16 | await expect(runner).rejects.toContain('not found');
17 | });
18 |
19 | test('should throw on an invalid output path', async () => {
20 | const runner = runWebpack({
21 | entry: './fixtures/first.js',
22 | output: {
23 | // @ts-expect-error
24 | path: null,
25 | },
26 | });
27 |
28 | await expect(runner).rejects.toThrow();
29 | });
30 |
31 | });
32 |
--------------------------------------------------------------------------------
/test/webpack/entry-as-object.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('entry as an object', () => {
4 |
5 | test('should support one named entry', async () => {
6 | const { names } = await runWebpack({
7 | entry: {
8 | named: './fixtures/first.js',
9 | },
10 | });
11 |
12 | expect(names).toStrictEqual([
13 | 'named.compiled.jsc',
14 | 'named.js',
15 | ]);
16 | });
17 |
18 | test('should support more than one named entry', async () => {
19 | const { names } = await runWebpack({
20 | entry: {
21 | firstNamed: './fixtures/first.js',
22 | secondNamed: './fixtures/second.js',
23 | thirdNamed: './fixtures/third.js',
24 | },
25 | });
26 |
27 | expect(names).toStrictEqual([
28 | 'firstNamed.compiled.jsc',
29 | 'firstNamed.js',
30 | 'secondNamed.compiled.jsc',
31 | 'secondNamed.js',
32 | 'thirdNamed.compiled.jsc',
33 | 'thirdNamed.js',
34 | ]);
35 | });
36 |
37 | });
38 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowJs": false,
4 | "allowSyntheticDefaultImports": true,
5 | "alwaysStrict": true,
6 | "assumeChangesOnlyAffectDirectDependencies": false,
7 | "composite": true,
8 | "declaration": true,
9 | "declarationMap": true,
10 | "emitDecoratorMetadata": false,
11 | "esModuleInterop": true,
12 | "experimentalDecorators": false,
13 | "forceConsistentCasingInFileNames": true,
14 | "importsNotUsedAsValues": "error",
15 | "incremental": true,
16 | "module": "CommonJS",
17 | "moduleResolution": "node",
18 | "newLine": "LF",
19 | "noFallthroughCasesInSwitch": true,
20 | "noImplicitAny": true,
21 | "noImplicitReturns": true,
22 | "noPropertyAccessFromIndexSignature": true,
23 | "noUnusedLocals": true,
24 | "noUnusedParameters": true,
25 | "pretty": true,
26 | "removeComments": true,
27 | "skipLibCheck": true,
28 | "sourceMap": true,
29 | "strict": true,
30 | "target": "ES2020"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "es6": true,
5 | "node": true
6 | },
7 | "extends": [
8 | "eslint:recommended",
9 | "plugin:@typescript-eslint/eslint-recommended",
10 | "plugin:@typescript-eslint/recommended",
11 | "plugin:@typescript-eslint/recommended-requiring-type-checking",
12 | "plugin:import/errors",
13 | "plugin:import/typescript",
14 | "plugin:import/warnings"
15 | ],
16 | "parser": "@typescript-eslint/parser",
17 | "parserOptions": {
18 | "project": "tsconfig.json",
19 | "warnOnUnsupportedTypeScriptVersion": true
20 | },
21 | "plugins": [
22 | "@typescript-eslint",
23 | "import"
24 | ],
25 | "root": true,
26 | "rules": {
27 | "quotes": ["error", "single", {
28 | "allowTemplateLiterals": true
29 | }]
30 | },
31 | "settings": {
32 | "import/parsers": {
33 | "@typescript-eslint/parser": [
34 | ".js",
35 | ".ts"
36 | ]
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/webpack.shared.rules.ts:
--------------------------------------------------------------------------------
1 | import type { Configuration } from 'webpack';
2 |
3 | const rules: Required['module']['rules'] = [
4 | // Add support for native node modules
5 | {
6 | // We're specifying native_modules in the test because the asset relocator loader generates a
7 | // "fake" .node file which is really a cjs file.
8 | test: /native_modules[/\\].+\.node$/,
9 | use: 'node-loader',
10 | },
11 | {
12 | test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
13 | parser: { amd: false },
14 | use: {
15 | loader: '@vercel/webpack-asset-relocator-loader',
16 | options: {
17 | outputAssetBase: 'native_modules',
18 | },
19 | },
20 | },
21 | {
22 | test: /\.tsx?$/,
23 | exclude: /(node_modules|\.webpack)/,
24 | use: {
25 | loader: 'ts-loader',
26 | options: {
27 | transpileOnly: true,
28 | },
29 | },
30 | },
31 | // Put your webpack loader rules in this array.
32 | ];
33 |
34 | export {
35 | rules,
36 | };
37 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: release
2 |
3 | on:
4 | workflow_dispatch:
5 |
6 | env:
7 | node: 18
8 |
9 | jobs:
10 | task:
11 | runs-on: ubuntu-latest
12 | strategy:
13 | matrix:
14 | task:
15 | - build
16 | - lint
17 | - test
18 | steps:
19 | - uses: actions/checkout@v3
20 | - uses: actions/setup-node@v3
21 | with:
22 | cache: npm
23 | node-version: ${{ env.node }}
24 | - run: npm ci
25 | - run: npm run ${{ matrix.task }}
26 | release:
27 | needs: task
28 | runs-on: ubuntu-latest
29 | steps:
30 | - uses: actions/checkout@v3
31 | with:
32 | fetch-depth: 0
33 | token: ${{ github.token }}
34 | - uses: actions/setup-node@v3
35 | with:
36 | cache: npm
37 | node-version: ${{ env.node }}
38 | - run: npm ci
39 | - run: npm run build
40 | - run: npm run release
41 | env:
42 | GITHUB_TOKEN: ${{ github.token }}
43 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Herbert Treis Neto
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/sources.ts:
--------------------------------------------------------------------------------
1 | import Module from 'module';
2 | import v8 from 'v8';
3 |
4 | import { compileCode, compileElectronCode } from 'bytenode';
5 | import shebangRegex from 'shebang-regex';
6 | import { sources } from 'webpack';
7 |
8 | import type { Options, Source } from './types';
9 |
10 | v8.setFlagsFromString('--no-lazy');
11 |
12 | async function compileSource(source: Source, options: Pick): Promise {
13 | return await replaceSource(source, async raw => {
14 | // strips shebang or the compiled file may fail to run
15 | raw = raw.replace(shebangRegex, '');
16 |
17 | if (options.compileAsModule) {
18 | raw = Module.wrap(raw);
19 | }
20 |
21 | return options.compileForElectron
22 | ? await compileElectronCode(raw)
23 | : compileCode(raw);
24 | });
25 | }
26 |
27 | async function replaceSource(source: Source, replacer: (raw: string) => string | Buffer | Promise): Promise {
28 | return new sources.RawSource(await replacer(source.buffer().toString()));
29 | }
30 |
31 | export {
32 | compileSource,
33 | replaceSource,
34 | };
35 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/src/renderer.js:
--------------------------------------------------------------------------------
1 | /**
2 | * This file will automatically be loaded by webpack and run in the "renderer" context.
3 | * To learn more about the differences between the "main" and the "renderer" context in
4 | * Electron, visit:
5 | *
6 | * https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes
7 | *
8 | * By default, Node.js integration in this file is disabled. When enabling Node.js integration
9 | * in a renderer process, please be aware of potential security implications. You can read
10 | * more about security risks here:
11 | *
12 | * https://electronjs.org/docs/tutorial/security
13 | *
14 | * To enable Node.js integration in this file, open up `main.js` and enable the `nodeIntegration`
15 | * flag:
16 | *
17 | * ```
18 | * // Create the browser window.
19 | * mainWindow = new BrowserWindow({
20 | * width: 800,
21 | * height: 600,
22 | * webPreferences: {
23 | * nodeIntegration: true
24 | * }
25 | * });
26 | * ```
27 | */
28 |
29 | require('./renderer.css');
30 |
31 | console.log('🍕 This message is being logged by "src/renderer.js", included via webpack.');
32 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/src/renderer.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file will automatically be loaded by webpack and run in the "renderer" context.
3 | * To learn more about the differences between the "main" and the "renderer" context in
4 | * Electron, visit:
5 | *
6 | * https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes
7 | *
8 | * By default, Node.js integration in this file is disabled. When enabling Node.js integration
9 | * in a renderer process, please be aware of potential security implications. You can read
10 | * more about security risks here:
11 | *
12 | * https://electronjs.org/docs/tutorial/security
13 | *
14 | * To enable Node.js integration in this file, open up `main.js` and enable the `nodeIntegration`
15 | * flag:
16 | *
17 | * ```
18 | * // Create the browser window.
19 | * mainWindow = new BrowserWindow({
20 | * width: 800,
21 | * height: 600,
22 | * webPreferences: {
23 | * nodeIntegration: true
24 | * }
25 | * });
26 | * ```
27 | */
28 |
29 | import './renderer.css';
30 |
31 | console.log('🍕 This message is being logged by "src/renderer.ts", included via webpack');
32 |
--------------------------------------------------------------------------------
/src/types.ts:
--------------------------------------------------------------------------------
1 | import type { ValuesType } from 'utility-types';
2 | import type { EntryNormalized, sources } from 'webpack';
3 |
4 | type FileMatcher = (file: string) => boolean;
5 | type FileMatcherIntent = string | RegExp;
6 | type FileMatcherIntentMatcher = Pick;
7 |
8 | interface Options {
9 | compileAsModule: boolean;
10 | compileForElectron: boolean;
11 | debugLifecycle: boolean;
12 | exclude?: FileMatcherIntent[];
13 | include?: FileMatcherIntent[];
14 | keepSource: boolean;
15 | preventSourceMaps: boolean;
16 | }
17 |
18 | interface Prepared {
19 | entries: PreparedEntries;
20 | modules: Map;
21 | }
22 |
23 | interface PreparedEntries {
24 | ignored: PreparedEntry;
25 | loaders: PreparedEntry;
26 | targets: PreparedEntry;
27 | }
28 |
29 | interface PreparedEntryDescriptor extends ValuesType Promise>> {
30 | import: string[];
31 | }
32 |
33 | type PreparedEntry = Map;
34 | type Source = sources.Source;
35 |
36 | export type {
37 | FileMatcher,
38 | FileMatcherIntent,
39 | FileMatcherIntentMatcher,
40 | Options,
41 | Prepared,
42 | PreparedEntries,
43 | PreparedEntry,
44 | PreparedEntryDescriptor,
45 | Source,
46 | };
47 |
--------------------------------------------------------------------------------
/src/loaders.ts:
--------------------------------------------------------------------------------
1 | import { normalizeCodePath } from './utils';
2 |
3 | interface LoaderOptions {
4 | imports: string[];
5 | }
6 |
7 | function checkLoaderOptions(options: LoaderOptions): void {
8 | if (!options || typeof options !== 'object') {
9 | throw new Error('loader options should be an object');
10 | }
11 |
12 | if (!Array.isArray(options.imports)) {
13 | throw new Error('loader options.imports should be an array');
14 | }
15 |
16 | if (options.imports.length <= 0) {
17 | throw new Error('loader options.imports cannot be empty');
18 | }
19 |
20 | if (options.imports.some(file => typeof file !== 'string')) {
21 | throw new Error('loader options.imports can only have strings');
22 | }
23 | }
24 |
25 | function createLoaderCode(options: LoaderOptions): string {
26 | checkLoaderOptions(options);
27 |
28 | let { imports } = options;
29 |
30 | // normalize paths
31 | imports = imports.map(path => normalizeCodePath(path));
32 |
33 | // bytenode should be imported before any compiled file
34 | imports.unshift('bytenode');
35 |
36 | return imports
37 | .map(path => `require('${path}');`)
38 | .join('\n');
39 | }
40 |
41 | export {
42 | createLoaderCode,
43 | };
44 |
45 | export type {
46 | LoaderOptions,
47 | };
48 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/forge.config.js:
--------------------------------------------------------------------------------
1 | const { MakerDeb } = require('@electron-forge/maker-deb');
2 | const { MakerRpm } = require('@electron-forge/maker-rpm');
3 | const { MakerSquirrel } = require('@electron-forge/maker-squirrel');
4 | const { MakerZIP } = require('@electron-forge/maker-zip');
5 | const { WebpackPlugin } = require('@electron-forge/plugin-webpack');
6 |
7 | const { mainConfig } = require('./webpack.main.config');
8 | const { preloadConfig } = require('./webpack.preload.config');
9 | const { rendererConfig } = require('./webpack.renderer.config');
10 |
11 | const config = {
12 | makers: [
13 | new MakerDeb({}),
14 | new MakerRpm({}),
15 | new MakerSquirrel({}),
16 | new MakerZIP({}, ['darwin']),
17 | ],
18 | plugins: [
19 | new WebpackPlugin({
20 | mainConfig,
21 | renderer: {
22 | config: rendererConfig,
23 | entryPoints: [
24 | {
25 | html: './src/renderer.html',
26 | js: './src/renderer.js',
27 | name: 'main_window',
28 | preload: {
29 | config: preloadConfig,
30 | js: './src/preload.js',
31 | },
32 | },
33 | ],
34 | },
35 | }),
36 | ],
37 | };
38 |
39 | module.exports = config;
40 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/forge.config.ts:
--------------------------------------------------------------------------------
1 | import { MakerDeb } from '@electron-forge/maker-deb';
2 | import { MakerRpm } from '@electron-forge/maker-rpm';
3 | import { MakerSquirrel } from '@electron-forge/maker-squirrel';
4 | import { MakerZIP } from '@electron-forge/maker-zip';
5 | import { WebpackPlugin } from '@electron-forge/plugin-webpack';
6 | import type { ForgeConfig } from '@electron-forge/shared-types';
7 |
8 | import { mainConfig } from './webpack.main.config';
9 | import { preloadConfig } from './webpack.preload.config';
10 | import { rendererConfig } from './webpack.renderer.config';
11 |
12 | const config: ForgeConfig = {
13 | makers: [
14 | new MakerDeb({}),
15 | new MakerRpm({}),
16 | new MakerSquirrel({}),
17 | new MakerZIP({}, ['darwin']),
18 | ],
19 | plugins: [
20 | new WebpackPlugin({
21 | mainConfig,
22 | renderer: {
23 | config: rendererConfig,
24 | entryPoints: [
25 | {
26 | html: './src/renderer.html',
27 | js: './src/renderer.ts',
28 | name: 'main_window',
29 | preload: {
30 | config: preloadConfig,
31 | js: './src/preload.ts',
32 | },
33 | },
34 | ],
35 | },
36 | }),
37 | ],
38 | };
39 |
40 | export default config;
41 |
--------------------------------------------------------------------------------
/test/webpack/plugin-debug-lifecycle.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 | import type { Configuration } from './runner';
3 |
4 | console.debug = jest.fn();
5 | console.log = jest.fn();
6 | console.warn = jest.fn();
7 |
8 | const webpackOptions: Configuration = {
9 | entry: './fixtures/first.js',
10 | infrastructureLogging: {
11 | console,
12 | debug: true,
13 | level: 'verbose',
14 | },
15 | stats: {
16 | logging: 'verbose',
17 | loggingDebug: true,
18 | },
19 | };
20 |
21 | describe('plugin option: debugLifecycle', () => {
22 |
23 | beforeEach(() => {
24 | jest.resetAllMocks();
25 | });
26 |
27 | test('should not suppress logs when true', async () => {
28 | await runWebpack(webpackOptions, {
29 | debugLifecycle: true,
30 | });
31 |
32 | expect(console.log).toHaveBeenCalledTimes(1);
33 | expect(console.debug).toHaveBeenCalledWith(expect.stringContaining('[BytenodeWebpackPlugin/lifecycle]'));
34 | });
35 |
36 | test('should suppress logs when false', async () => {
37 | await runWebpack(webpackOptions, {
38 | debugLifecycle: false,
39 | });
40 |
41 | expect(console.log).toHaveBeenCalledTimes(1);
42 | expect(console.debug).not.toHaveBeenCalledWith(expect.stringContaining('[BytenodeWebpackPlugin/lifecycle]'));
43 | });
44 |
45 | });
46 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "electron-forge-webpack-example",
3 | "description": "Description of electron-forge-webpack-example",
4 | "version": "1.0.0",
5 | "license": "MIT",
6 | "author": {
7 | "name": "herberttn"
8 | },
9 | "main": ".webpack/main",
10 | "scripts": {
11 | "clean": "rimraf .eslintcache .webpack out",
12 | "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --cache --max-warnings 0",
13 | "make": "npm run clean && electron-forge make",
14 | "package": "electron-forge package",
15 | "publish": "electron-forge publish",
16 | "start": "npm run clean && electron-forge start"
17 | },
18 | "dependencies": {
19 | "electron-squirrel-startup": "1.0.0"
20 | },
21 | "devDependencies": {
22 | "@electron-forge/cli": "6.0.5",
23 | "@electron-forge/maker-deb": "6.0.5",
24 | "@electron-forge/maker-rpm": "6.0.5",
25 | "@electron-forge/maker-squirrel": "6.0.5",
26 | "@electron-forge/maker-zip": "6.0.5",
27 | "@electron-forge/plugin-webpack": "6.0.5",
28 | "@herberttn/bytenode-webpack-plugin": "2.3.0",
29 | "@vercel/webpack-asset-relocator-loader": "1.7.3",
30 | "css-loader": "6.7.3",
31 | "electron": "23.1.1",
32 | "eslint": "8.35.0",
33 | "eslint-plugin-import": "2.27.5",
34 | "load-json-file": "6.2.0",
35 | "node-loader": "2.0.0",
36 | "rimraf": "4.1.2",
37 | "style-loader": "3.3.1"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/test/webpack/plugin-include.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('plugin option: include', () => {
4 |
5 | const webpackOptions = {
6 | entry: {
7 | firstNamed: './fixtures/first.js',
8 | secondNamed: './fixtures/second.js',
9 | thirdNamed: './fixtures/third.js',
10 | },
11 | };
12 |
13 | test('empty means all', async () => {
14 | const { names } = await runWebpack(webpackOptions);
15 |
16 | expect(names).toStrictEqual([
17 | 'firstNamed.compiled.jsc',
18 | 'firstNamed.js',
19 | 'secondNamed.compiled.jsc',
20 | 'secondNamed.js',
21 | 'thirdNamed.compiled.jsc',
22 | 'thirdNamed.js',
23 | ]);
24 | });
25 |
26 | test('accepts regex', async () => {
27 | const { names } = await runWebpack(webpackOptions, {
28 | include: [
29 | /first/,
30 | ],
31 | });
32 |
33 | expect(names).toStrictEqual([
34 | 'firstNamed.compiled.jsc',
35 | 'firstNamed.js',
36 | 'secondNamed.compiled.js',
37 | 'secondNamed.js',
38 | 'thirdNamed.compiled.js',
39 | 'thirdNamed.js',
40 | ]);
41 | });
42 |
43 | test('accepts pattern', async () => {
44 | const { names } = await runWebpack(webpackOptions, {
45 | include: [
46 | 'first*',
47 | ],
48 | });
49 |
50 | expect(names).toStrictEqual([
51 | 'firstNamed.compiled.jsc',
52 | 'firstNamed.js',
53 | 'secondNamed.compiled.js',
54 | 'secondNamed.js',
55 | 'thirdNamed.compiled.js',
56 | 'thirdNamed.js',
57 | ]);
58 | });
59 |
60 | });
61 |
--------------------------------------------------------------------------------
/test/webpack/plugin-prevent-source-maps.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 | import type { Configuration } from './runner';
3 |
4 | console.debug = jest.fn();
5 | console.log = jest.fn();
6 | console.warn = jest.fn();
7 |
8 | const webpackOptions: Configuration = {
9 | devtool: 'source-map',
10 | entry: './fixtures/first.js',
11 | infrastructureLogging: {
12 | console,
13 | debug: true,
14 | level: 'verbose',
15 | },
16 | stats: {
17 | logging: 'verbose',
18 | loggingDebug: true,
19 | },
20 | };
21 |
22 | describe('plugin option: preventSourceMaps', () => {
23 |
24 | beforeEach(() => {
25 | jest.resetAllMocks();
26 | });
27 |
28 | test('should prevent source map generation when true', async () => {
29 | const { names } = await runWebpack(webpackOptions, {
30 | preventSourceMaps: true,
31 | });
32 |
33 | expect(console.log).toHaveBeenCalledTimes(1);
34 | expect(console.log).toHaveBeenCalledWith(expect.stringContaining('Preventing source maps from being generated by changing webpack.options.devtool to false.'));
35 |
36 | expect(names).toStrictEqual([
37 | 'main.compiled.jsc',
38 | 'main.js',
39 | ]);
40 | });
41 |
42 | // test('should not prevent source map generation when true', async () => {
43 | // const { names } = await runWebpack(webpackOptions, {
44 | // preventSourceMaps: false,
45 | // });
46 | //
47 | // expect(console.log).toHaveBeenCalledTimes(0);
48 | //
49 | // expect(names).toStrictEqual([
50 | // // some .map file
51 | // 'main.compiled.jsc',
52 | // 'main.js',
53 | // ]);
54 | // });
55 |
56 | });
57 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "electron-forge-typescript-webpack-example",
3 | "description": "Description of electron-forge-typescript-webpack-example",
4 | "version": "1.0.0",
5 | "license": "MIT",
6 | "author": {
7 | "name": "herberttn"
8 | },
9 | "main": ".webpack/main",
10 | "scripts": {
11 | "clean": "rimraf .eslintcache .webpack out",
12 | "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --cache --max-warnings 0",
13 | "make": "npm run clean && electron-forge make",
14 | "package": "electron-forge package",
15 | "publish": "electron-forge publish",
16 | "start": "npm run clean && electron-forge start"
17 | },
18 | "dependencies": {
19 | "electron-squirrel-startup": "1.0.0"
20 | },
21 | "devDependencies": {
22 | "@electron-forge/cli": "6.0.5",
23 | "@electron-forge/maker-deb": "6.0.5",
24 | "@electron-forge/maker-rpm": "6.0.5",
25 | "@electron-forge/maker-squirrel": "6.0.5",
26 | "@electron-forge/maker-zip": "6.0.5",
27 | "@electron-forge/plugin-webpack": "6.0.5",
28 | "@herberttn/bytenode-webpack-plugin": "2.3.0",
29 | "@typescript-eslint/eslint-plugin": "5.53.0",
30 | "@typescript-eslint/parser": "5.53.0",
31 | "@vercel/webpack-asset-relocator-loader": "1.7.3",
32 | "css-loader": "6.7.3",
33 | "electron": "23.1.1",
34 | "eslint": "8.35.0",
35 | "eslint-plugin-import": "2.27.5",
36 | "fork-ts-checker-webpack-plugin": "7.3.0",
37 | "load-json-file": "6.2.0",
38 | "node-loader": "2.0.0",
39 | "rimraf": "4.1.2",
40 | "style-loader": "3.3.1",
41 | "ts-loader": "9.4.2",
42 | "ts-node": "10.9.1",
43 | "typescript": "4.9.5"
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/test/loaders.test.ts:
--------------------------------------------------------------------------------
1 | import { createLoaderCode } from '../src/loaders';
2 | import type { LoaderOptions } from '../src/loaders';
3 |
4 | import { mockPlatform, UNIX_PLATFORMS } from './mocks/platform';
5 |
6 | describe('loaders', () => {
7 |
8 | for (const platform of UNIX_PLATFORMS) {
9 | describe(`${platform}`, () => {
10 |
11 | beforeAll(async () => {
12 | jest.resetModules();
13 | await mockPlatform(platform);
14 | });
15 |
16 | describe('createLoaderRequest', () => {
17 | test('with options and string imports', () => {
18 | expect(createLoaderCode({ imports: ['mock1', 'mock2'] }))
19 | .toBe([
20 | `require('bytenode');`,
21 | `require('mock1');`,
22 | `require('mock2');`,
23 | ].join('\n'));
24 | });
25 |
26 | testLoaderOptions(createLoaderCode);
27 | });
28 |
29 | });
30 | }
31 |
32 | });
33 |
34 | function testLoaderOptions(fn: (options: LoaderOptions) => any): void {
35 | const matrix: Array<[string, LoaderOptions, string]> = [
36 | // @ts-expect-error
37 | ['with empty options', {}, 'loader options.imports should be an array'],
38 |
39 | // @ts-expect-error
40 | ['with null options', null, 'loader options should be an object'],
41 |
42 | // @ts-expect-error
43 | ['with undefined options', undefined, 'loader options should be an object'],
44 |
45 | ['with options and empty imports', { imports: [] }, 'loader options.imports cannot be empty'],
46 |
47 | // @ts-expect-error
48 | ['with options and non-string imports', { imports: [2] }, 'loader options.imports can only have strings'],
49 | ];
50 |
51 | test.each(matrix)('%s', (_, options, error) => {
52 | expect(() => fn(options)).toThrow(error);
53 | });
54 | }
55 |
--------------------------------------------------------------------------------
/examples/electron-forge-webpack/src/main.js:
--------------------------------------------------------------------------------
1 | const { app, BrowserWindow } = require('electron');
2 |
3 | // Handle creating/removing shortcuts on Windows when installing/uninstalling.
4 | if (require('electron-squirrel-startup')) { // eslint-disable-line global-require
5 | app.quit();
6 | }
7 |
8 | const createWindow = () => {
9 | // Create the browser window.
10 | const mainWindow = new BrowserWindow({
11 | height: 600,
12 | width: 800,
13 | webPreferences: {
14 | contextIsolation: false,
15 | nodeIntegration: true,
16 | preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY, // eslint-disable-line no-undef
17 | },
18 | });
19 |
20 | // and load the index.html of the app.
21 | void mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY); // eslint-disable-line no-undef
22 |
23 | // Open the DevTools.
24 | mainWindow.webContents.openDevTools();
25 | };
26 |
27 | // This method will be called when Electron has finished
28 | // initialization and is ready to create browser windows.
29 | // Some APIs can only be used after this event occurs.
30 | app.on('ready', createWindow);
31 |
32 | // Quit when all windows are closed, except on macOS. There, it's common
33 | // for applications and their menu bar to stay active until the user quits
34 | // explicitly with Cmd + Q.
35 | app.on('window-all-closed', () => {
36 | if (process.platform !== 'darwin') {
37 | app.quit();
38 | }
39 | });
40 |
41 | app.on('activate', () => {
42 | // On OS X it's common to re-create a window in the app when the
43 | // dock icon is clicked and there are no other windows open.
44 | if (BrowserWindow.getAllWindows().length === 0) {
45 | createWindow();
46 | }
47 | });
48 |
49 | // In this file you can include the rest of your app's specific main process
50 | // code. You can also put them in separate files and import them here.
51 |
--------------------------------------------------------------------------------
/examples/electron-forge-typescript-webpack/src/main.ts:
--------------------------------------------------------------------------------
1 | import { app, BrowserWindow } from 'electron';
2 |
3 | declare const MAIN_WINDOW_WEBPACK_ENTRY: string;
4 | declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string;
5 |
6 | // Handle creating/removing shortcuts on Windows when installing/uninstalling.
7 | if (require('electron-squirrel-startup')) { // eslint-disable-line global-require
8 | app.quit();
9 | }
10 |
11 | const createWindow = (): void => {
12 | // Create the browser window.
13 | const mainWindow = new BrowserWindow({
14 | height: 600,
15 | width: 800,
16 | webPreferences: {
17 | contextIsolation: false,
18 | nodeIntegration: true,
19 | preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
20 | },
21 | });
22 |
23 | // and load the index.html of the app.
24 | void mainWindow.loadURL(MAIN_WINDOW_WEBPACK_ENTRY);
25 |
26 | // Open the DevTools.
27 | mainWindow.webContents.openDevTools();
28 | };
29 |
30 | // This method will be called when Electron has finished
31 | // initialization and is ready to create browser windows.
32 | // Some APIs can only be used after this event occurs.
33 | app.on('ready', createWindow);
34 |
35 | // Quit when all windows are closed, except on macOS. There, it's common
36 | // for applications and their menu bar to stay active until the user quits
37 | // explicitly with Cmd + Q.
38 | app.on('window-all-closed', () => {
39 | if (process.platform !== 'darwin') {
40 | app.quit();
41 | }
42 | });
43 |
44 | app.on('activate', () => {
45 | // On OS X it's common to re-create a window in the app when the
46 | // dock icon is clicked and there are no other windows open.
47 | if (BrowserWindow.getAllWindows().length === 0) {
48 | createWindow();
49 | }
50 | });
51 |
52 | // In this file you can include the rest of your app's specific main process
53 | // code. You can also put them in separate files and import them here.
54 |
--------------------------------------------------------------------------------
/test/webpack/plugin-exclude.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('plugin option: exclude', () => {
4 |
5 | const webpackOptions = {
6 | entry: {
7 | firstNamed: './fixtures/first.js',
8 | secondNamed: './fixtures/second.js',
9 | thirdNamed: './fixtures/third.js',
10 | },
11 | };
12 |
13 | test('empty means all', async () => {
14 | const { names } = await runWebpack(webpackOptions);
15 |
16 | expect(names).toStrictEqual([
17 | 'firstNamed.compiled.jsc',
18 | 'firstNamed.js',
19 | 'secondNamed.compiled.jsc',
20 | 'secondNamed.js',
21 | 'thirdNamed.compiled.jsc',
22 | 'thirdNamed.js',
23 | ]);
24 | });
25 |
26 | test('accepts regex', async () => {
27 | const { names } = await runWebpack(webpackOptions, {
28 | exclude: [
29 | /first/,
30 | ],
31 | });
32 |
33 | expect(names).toStrictEqual([
34 | 'firstNamed.compiled.js',
35 | 'firstNamed.js',
36 | 'secondNamed.compiled.jsc',
37 | 'secondNamed.js',
38 | 'thirdNamed.compiled.jsc',
39 | 'thirdNamed.js',
40 | ]);
41 | });
42 |
43 | test('accepts pattern', async () => {
44 | const { names } = await runWebpack(webpackOptions, {
45 | exclude: [
46 | 'first*',
47 | ],
48 | });
49 |
50 | expect(names).toStrictEqual([
51 | 'firstNamed.compiled.js',
52 | 'firstNamed.js',
53 | 'secondNamed.compiled.jsc',
54 | 'secondNamed.js',
55 | 'thirdNamed.compiled.jsc',
56 | 'thirdNamed.js',
57 | ]);
58 | });
59 |
60 | test('overrides include', async () => {
61 | const { names } = await runWebpack(webpackOptions, {
62 | exclude: [
63 | /first/,
64 | ],
65 | include: [
66 | /first/,
67 | /second/,
68 | ],
69 | });
70 |
71 | expect(names).toStrictEqual([
72 | 'firstNamed.compiled.js',
73 | 'firstNamed.js',
74 | 'secondNamed.compiled.jsc',
75 | 'secondNamed.js',
76 | 'thirdNamed.compiled.js',
77 | 'thirdNamed.js',
78 | ]);
79 | });
80 |
81 | });
82 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: ci
2 |
3 | on:
4 | pull_request:
5 | branches: [main, beta, rc]
6 | paths-ignore:
7 | - '**.md'
8 | push:
9 | branches: [main, beta, rc]
10 | paths-ignore:
11 | - '**.md'
12 |
13 | env:
14 | coveralls_branch: main
15 | coveralls_node: current
16 | coveralls_runner: ubuntu-latest
17 |
18 | jobs:
19 | build-lint-test:
20 | name: BLT
21 | runs-on: ${{ matrix.runner }}
22 | strategy:
23 | fail-fast: false
24 | matrix:
25 | node:
26 | - 14
27 | - 16
28 | - 18
29 | - lts/*
30 | - current
31 | runner:
32 | - ubuntu-latest
33 | - windows-latest
34 | steps:
35 | - uses: actions/checkout@v3
36 | - uses: actions/setup-node@v3
37 | with:
38 | cache: npm
39 | node-version: ${{ matrix.node }}
40 | - run: npm ci
41 | - run: npm run build
42 | - run: npm run lint
43 | - run: npm run test
44 | - if: ${{ env.coveralls_branch == github.ref_name && env.coveralls_node == matrix.node && env.coveralls_runner == matrix.runner }}
45 | uses: coverallsapp/github-action@master
46 | with:
47 | github-token: ${{ github.token }}
48 | examples:
49 | name: E
50 | needs: build-lint-test
51 | runs-on: ${{ matrix.runner }}
52 | strategy:
53 | fail-fast: false
54 | matrix:
55 | example:
56 | - examples/electron-forge-typescript-webpack
57 | - examples/electron-forge-webpack
58 | - examples/webpack
59 | node:
60 | - 14
61 | - 16
62 | - 18
63 | - lts/*
64 | - current
65 | runner:
66 | - ubuntu-latest
67 | - windows-latest
68 | defaults:
69 | run:
70 | working-directory: ${{ matrix.example }}
71 | steps:
72 | - uses: actions/checkout@v3
73 | - uses: actions/setup-node@v3
74 | with:
75 | cache: npm
76 | node-version: ${{ matrix.node }}
77 | - run: npm ci
78 | - run: npm run lint
79 | - run: npm run make
80 |
--------------------------------------------------------------------------------
/test/webpack/entry-as-array.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 |
3 | describe('entry as an array of strings', () => {
4 |
5 | test('should support 1 entry', async () => {
6 | const { names } = await runWebpack({
7 | entry: ['./fixtures/first.js'],
8 | });
9 |
10 | expect(names).toStrictEqual([
11 | 'main.compiled.jsc',
12 | 'main.js',
13 | ]);
14 | });
15 |
16 | test('should support N entries', async () => {
17 | const { names } = await runWebpack({
18 | entry: ['./fixtures/first.js', './fixtures/second.js', './fixtures/third.js'],
19 | });
20 |
21 | expect(names).toStrictEqual([
22 | 'main.compiled.jsc',
23 | 'main.js',
24 | ]);
25 | });
26 |
27 | });
28 |
29 | describe('entry as an object of arrays', () => {
30 |
31 | test('should support 1 array of 1 entry', async () => {
32 | const { names } = await runWebpack({
33 | entry: {
34 | first: ['./fixtures/first.js'],
35 | },
36 | });
37 |
38 | expect(names).toStrictEqual([
39 | 'first.compiled.jsc',
40 | 'first.js',
41 | ]);
42 | });
43 |
44 | test('should support 1 array of N entries', async () => {
45 | const { names } = await runWebpack({
46 | entry: {
47 | named: ['./fixtures/first.js', './fixtures/second.js', './fixtures/third.js'],
48 | },
49 | });
50 |
51 | expect(names).toStrictEqual([
52 | 'named.compiled.jsc',
53 | 'named.js',
54 | ]);
55 | });
56 |
57 | test('should support N arrays of 1 entry', async () => {
58 | const { names } = await runWebpack({
59 | entry: {
60 | firstNamed: ['./fixtures/first.js'],
61 | secondNamed: ['./fixtures/second.js'],
62 | thirdNamed: ['./fixtures/third.js'],
63 | },
64 | });
65 |
66 | expect(names).toStrictEqual([
67 | 'firstNamed.compiled.jsc',
68 | 'firstNamed.js',
69 | 'secondNamed.compiled.jsc',
70 | 'secondNamed.js',
71 | 'thirdNamed.compiled.jsc',
72 | 'thirdNamed.js',
73 | ]);
74 | });
75 |
76 | test('should support N arrays of N entries', async () => {
77 | const { names } = await runWebpack({
78 | entry: {
79 | firstNamed: ['./fixtures/first.js'],
80 | mixNamed: ['./fixtures/second.js', './fixtures/third.js'],
81 | },
82 | });
83 |
84 | expect(names).toStrictEqual([
85 | 'firstNamed.compiled.jsc',
86 | 'firstNamed.js',
87 | 'mixNamed.compiled.jsc',
88 | 'mixNamed.js',
89 | ]);
90 | });
91 |
92 | });
93 |
--------------------------------------------------------------------------------
/test/examples.test.ts:
--------------------------------------------------------------------------------
1 | import { existsSync, readFileSync } from 'fs';
2 | import { resolve } from 'path';
3 |
4 | import { isCI } from 'ci-info';
5 | import { $, cd, nothrow, sleep } from 'zx';
6 |
7 | import { normalizeCodePath } from '../src/utils';
8 |
9 | enum Environment {
10 | DEVELOPMENT = 'development',
11 | PRODUCTION = 'production',
12 | }
13 |
14 | const conditionalDescribe = isCI
15 | ? describe.skip
16 | : describe;
17 |
18 | const conditionalTest = isCI
19 | ? test.skip
20 | : test;
21 |
22 | const examples: string[] = [
23 | 'examples/electron-forge-typescript-webpack',
24 | 'examples/electron-forge-webpack',
25 | ];
26 |
27 | const timeout = 5 * 60_000;
28 |
29 | conditionalDescribe.each(examples)('%s', example => {
30 | conditionalTest.each(Object.values(Environment))('%s', async environment => {
31 | const location = resolve(__dirname, '..', example);
32 |
33 | cd(location);
34 |
35 | if (!existsSync(resolve(location, 'node_modules'))) {
36 | await $`npm ci`;
37 | }
38 |
39 | const produce = environment === Environment.PRODUCTION
40 | ? make
41 | : start;
42 |
43 | await produce();
44 |
45 | expectFile(location, { path: '.webpack/main/index.compiled.jsc' });
46 | expectFile(location, { path: '.webpack/renderer/main_window.compiled/index.jsc' });
47 | expectFile(location, { path: '.webpack/renderer/main_window/preload.compiled.jsc' });
48 |
49 | expectFile(location, {
50 | path: '.webpack/main/index.js',
51 | toContainRequireOf: './index.compiled.jsc',
52 | });
53 |
54 | expectFile(location, {
55 | path: '.webpack/renderer/main_window/index.js',
56 | toContainRequireOf: environment === Environment.PRODUCTION
57 | ? '../main_window.compiled/index.jsc'
58 | : resolve(location, '.webpack/renderer/main_window.compiled/index.jsc'),
59 | });
60 |
61 | expectFile(location, {
62 | path: '.webpack/renderer/main_window/preload.js',
63 | toContainRequireOf: './preload.compiled.jsc',
64 | });
65 | }, timeout);
66 | });
67 |
68 | function expectFile(base: string, options: { path: string; toContainRequireOf?: string }): void {
69 | const location = resolve(base, options.path);
70 |
71 | // so it shows the path if it fails
72 | const exists = existsSync(location) ? location : '';
73 | expect(exists).toBe(location);
74 |
75 | if (options.toContainRequireOf) {
76 | const content = readFileSync(location, 'utf8');
77 | const path = normalizeCodePath(options.toContainRequireOf);
78 |
79 | expect(content).toContain(`require("${path}")`);
80 | }
81 | }
82 |
83 | async function make(): Promise {
84 | await $`npm run make`;
85 | }
86 |
87 | async function start(): Promise {
88 | const process = $`npm run start`;
89 | await sleep(timeout / 0.8);
90 | await process.kill('SIGKILL');
91 | await nothrow(process);
92 | }
93 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@herberttn/bytenode-webpack-plugin",
3 | "description": "Compile JavaScript into bytecode using bytenode",
4 | "version": "2.3.1",
5 | "license": "MIT",
6 | "repository": {
7 | "type": "git",
8 | "url": "github:herberttn/bytenode-webpack-plugin"
9 | },
10 | "files": [
11 | "lib"
12 | ],
13 | "main": "lib/index.js",
14 | "types": "lib/index.d.ts",
15 | "scripts": {
16 | "all": "npm-run-all",
17 | "build": "tsc --build tsconfig.project.json",
18 | "build:watch": "npm run build -- --watch",
19 | "clean": "rimraf lib **/.eslintcache **/*.log **/*.tsbuildinfo",
20 | "examples:electron-forge-typescript-webpack": "npm run start --prefix examples/electron-forge-typescript-webpack",
21 | "examples:electron-forge-webpack": "npm run start --prefix examples/electron-forge-webpack",
22 | "examples:webpack": "npm run make --prefix examples/webpack",
23 | "lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --cache --max-warnings 0",
24 | "release": "semantic-release",
25 | "test": "jest --config jest.config.ts --detectOpenHandles",
26 | "test:watch": "npm run test -- --watch"
27 | },
28 | "dependencies": {
29 | "bytenode": "^1.3.7",
30 | "picomatch": "^2.3.1",
31 | "shebang-regex": "^3.0.0",
32 | "slash": "^3.0.0",
33 | "replace-string": "^3.1.0",
34 | "webpack-virtual-modules": "^0.5.0"
35 | },
36 | "peerDependencies": {
37 | "webpack": "5.x"
38 | },
39 | "devDependencies": {
40 | "@jest/types": "29.4.3",
41 | "@semantic-release/changelog": "6.0.2",
42 | "@semantic-release/git": "10.0.1",
43 | "@types/jest": "29.4.0",
44 | "@types/picomatch": "2.3.0",
45 | "@types/webpack": "5.x",
46 | "@typescript-eslint/eslint-plugin": "5.53.0",
47 | "@typescript-eslint/parser": "5.53.0",
48 | "ci-info": "3.8.0",
49 | "eslint": "8.35.0",
50 | "eslint-plugin-import": "2.27.5",
51 | "jest": "29.4.3",
52 | "memfs": "3.4.13",
53 | "npm-run-all": "4.1.5",
54 | "rimraf": "4.1.2",
55 | "semantic-release": "20.1.0",
56 | "ts-jest": "29.0.5",
57 | "ts-node": "10.9.1",
58 | "typescript": "4.9.5",
59 | "utility-types": "3.10.0",
60 | "webpack-cli": "5.0.1",
61 | "webpack-merge": "5.8.0",
62 | "zx": "4.3.0"
63 | },
64 | "engines": {
65 | "node": ">= 14"
66 | },
67 | "publishConfig": {
68 | "access": "public"
69 | },
70 | "author": {
71 | "name": "herberttn",
72 | "url": "https://github.com/herberttn"
73 | },
74 | "homepage": "https://github.com/herberttn/bytenode-webpack-plugin",
75 | "bugs": "https://github.com/herberttn/bytenode-webpack-plugin/issues",
76 | "keywords": [
77 | "bytecode",
78 | "bytenode",
79 | "compile",
80 | "javascript",
81 | "js",
82 | "node",
83 | "nodejs",
84 | "plugin",
85 | "ts",
86 | "typescript",
87 | "webpack"
88 | ]
89 | }
90 |
--------------------------------------------------------------------------------
/test/webpack/plugin-compile-for-electron.test.ts:
--------------------------------------------------------------------------------
1 | import { runWebpack } from './runner';
2 | import type { Configuration } from './runner';
3 |
4 | console.debug = jest.fn();
5 | console.log = jest.fn();
6 | console.warn = jest.fn();
7 |
8 | const webpackOptions: Configuration = {
9 | entry: './fixtures/first.js',
10 | infrastructureLogging: {
11 | console,
12 | debug: true,
13 | level: 'verbose',
14 | },
15 | stats: {
16 | logging: 'verbose',
17 | loggingDebug: true,
18 | },
19 | };
20 |
21 | describe('plugin option: compileForElectron', () => {
22 |
23 | beforeEach(() => {
24 | jest.resetAllMocks();
25 | });
26 |
27 | test('should fail to find electron', async () => {
28 | const promise = runWebpack(webpackOptions, {
29 | compileForElectron: true,
30 | });
31 |
32 | await expect(promise).rejects.toThrow(`Cannot find module 'electron' from 'node_modules/bytenode/lib/index.js'`);
33 | });
34 |
35 | test('should warn when using non-electron string target', async () => {
36 | try {
37 | await runWebpack({
38 | ...webpackOptions,
39 | target: 'node',
40 | }, {
41 | compileForElectron: true,
42 | });
43 | } catch {
44 | // ignore, we're only interested on the warning
45 | }
46 |
47 | expect(console.warn).toHaveBeenCalledTimes(1);
48 | expect(console.warn).toHaveBeenCalledWith(expect.stringContaining('Consider using an electron target instead of or in addition to [node] when compiling for electron.'));
49 | });
50 |
51 | test('should warn when using non-electron array of targets', async () => {
52 | try {
53 | await runWebpack({
54 | ...webpackOptions,
55 | target: ['node', 'async-node'],
56 | }, {
57 | compileForElectron: true,
58 | });
59 | } catch {
60 | // ignore, we're only interested on the warning
61 | }
62 |
63 | expect(console.warn).toHaveBeenCalledTimes(1);
64 | expect(console.warn).toHaveBeenCalledWith(expect.stringContaining('Consider using an electron target instead of or in addition to [node, async-node] when compiling for electron.'));
65 | });
66 |
67 | test('should not warn when using electron string target', async () => {
68 | try {
69 | await runWebpack({
70 | ...webpackOptions,
71 | target: 'electron-main',
72 | }, {
73 | compileForElectron: true,
74 | });
75 | } catch {
76 | // ignore, we're only interested on the warning
77 | }
78 |
79 | expect(console.warn).toHaveBeenCalledTimes(0);
80 | });
81 |
82 | test('should not warn when using electron in array of targets', async () => {
83 | try {
84 | await runWebpack({
85 | ...webpackOptions,
86 | target: ['node', 'electron-main'],
87 | }, {
88 | compileForElectron: true,
89 | });
90 | } catch {
91 | // ignore, we're only interested on the warning
92 | }
93 |
94 | expect(console.warn).toHaveBeenCalledTimes(0);
95 | });
96 |
97 | });
98 |
--------------------------------------------------------------------------------
/test/sources.test.ts:
--------------------------------------------------------------------------------
1 | import Module from 'module';
2 |
3 | import { sources } from 'webpack';
4 |
5 | import type { compileSource } from '../src/sources';
6 |
7 | import { mockBytenode } from './mocks/bytenode';
8 | import { ALL_PLATFORMS, mockPlatform } from './mocks/platform';
9 |
10 | describe('sources', () => {
11 |
12 | for (const platform of ALL_PLATFORMS) {
13 | describe(`${platform}`, () => {
14 |
15 | beforeEach(() => {
16 | jest.resetModules();
17 | });
18 |
19 | test('compileSource', async () => {
20 | const source = new sources.RawSource('mock');
21 |
22 | const {
23 | compileCode,
24 | compileElectronCode,
25 | } = await testCompileSourceWith(platform, source, {
26 | compileAsModule: false,
27 | compileForElectron: false,
28 | });
29 |
30 | expect(compileCode).toHaveBeenCalledTimes(1);
31 | expect(compileCode).toHaveBeenCalledWith(source.buffer().toString());
32 |
33 | expect(compileElectronCode).toHaveBeenCalledTimes(0);
34 | });
35 |
36 | test('compileSource for electron', async () => {
37 | const source = new sources.RawSource('mock');
38 |
39 | const {
40 | compileCode,
41 | compileElectronCode,
42 | } = await testCompileSourceWith(platform, source, {
43 | compileAsModule: false,
44 | compileForElectron: true,
45 | });
46 |
47 | expect(compileCode).toHaveBeenCalledTimes(0);
48 |
49 | expect(compileElectronCode).toHaveBeenCalledTimes(1);
50 | expect(compileElectronCode).toHaveBeenCalledWith(source.buffer().toString());
51 | });
52 |
53 | test('compileSource as module', async () => {
54 | const source = new sources.RawSource('mock');
55 |
56 | const {
57 | compileCode,
58 | compileElectronCode,
59 | } = await testCompileSourceWith(platform, source, {
60 | compileAsModule: true,
61 | compileForElectron: false,
62 | });
63 |
64 | expect(compileCode).toHaveBeenCalledTimes(1);
65 | expect(compileCode).toHaveBeenCalledWith(Module.wrap(source.buffer().toString()));
66 |
67 | expect(compileElectronCode).toHaveBeenCalledTimes(0);
68 | });
69 |
70 | test('replaceSource', async () => {
71 | await mockPlatform(platform);
72 |
73 | const { replaceSource } = await import('../src/sources');
74 |
75 | const mock = new sources.RawSource('mock');
76 | const muck = await replaceSource(mock, raw => {
77 | return raw.replace('o', 'u');
78 | });
79 |
80 | expect(muck.buffer().toString()).toBe('muck');
81 | });
82 |
83 | });
84 | }
85 |
86 | });
87 |
88 | interface CompileSourceTester {
89 | compileCode: jest.Mock;
90 | compileElectronCode: jest.Mock;
91 | }
92 |
93 | async function testCompileSourceWith(platform: NodeJS.Platform, ...args: Parameters): Promise {
94 | const compileCode = jest.fn().mockImplementation(value => value);
95 | const compileElectronCode = jest.fn().mockImplementation(value => value);
96 |
97 | await mockPlatform(platform);
98 | await mockBytenode({
99 | compileCode,
100 | compileElectronCode,
101 | });
102 |
103 | const { compileSource } = await import('../src/sources');
104 | await compileSource(...args);
105 |
106 | return {
107 | compileCode,
108 | compileElectronCode,
109 | };
110 | }
111 |
--------------------------------------------------------------------------------
/src/utils.ts:
--------------------------------------------------------------------------------
1 | import { platform } from 'os';
2 | import { basename, extname, win32 } from 'path';
3 |
4 | import picomatch from 'picomatch';
5 | import slash from 'slash';
6 |
7 | import type { FileMatcher, FileMatcherIntent, FileMatcherIntentMatcher } from './types';
8 |
9 | const COMPILED_EXTENSION = '.jsc';
10 | const COMPILED_EXTENSION_REGEX = new RegExp('\\' + COMPILED_EXTENSION +'$', 'i');
11 | const LOADER_EXTENSION = '.js';
12 | const LOADER_SUFFIX = '.loader';
13 | const TARGET_EXTENSION = '.js';
14 | const TARGET_EXTENSION_REGEX = new RegExp('\\' + TARGET_EXTENSION +'$', 'i');
15 |
16 | function createFileMatcher(includes: FileMatcherIntent[] = [], excludes: FileMatcherIntent[] = []): FileMatcher {
17 | if (includes.length <= 0 && excludes.length <= 0) {
18 | return function bypass(): boolean {
19 | return true;
20 | };
21 | }
22 |
23 | const includeMatchers = includes.map(createIntentMatcher);
24 | const excludeMatchers = excludes.map(createIntentMatcher);
25 |
26 | return function matches(file: string): boolean {
27 | file = slash(file);
28 |
29 | for (const matcher of excludeMatchers) {
30 | if (matcher.test(file)) {
31 | return false;
32 | }
33 | }
34 |
35 | for (const matcher of includeMatchers) {
36 | if (matcher.test(file)) {
37 | return true;
38 | }
39 | }
40 |
41 | return includeMatchers.length <= 0;
42 | };
43 |
44 | function createIntentMatcher(intent: FileMatcherIntent): FileMatcherIntentMatcher {
45 | if (intent instanceof RegExp) {
46 | return intent;
47 | }
48 |
49 | return {
50 | test(file: string): boolean {
51 | const pattern = slash(intent);
52 | const matches = picomatch(pattern, { dot: true });
53 |
54 | return matches(file);
55 | },
56 | };
57 | }
58 | }
59 |
60 | function fromCompiledToTargetExtension(file: string): string {
61 | return file.replace(COMPILED_EXTENSION_REGEX, TARGET_EXTENSION);
62 | }
63 |
64 | function fromTargetToCompiledExtension(file: string): string {
65 | return file.replace(TARGET_EXTENSION_REGEX, COMPILED_EXTENSION);
66 | }
67 |
68 | function isCompiledExtension(file: string): boolean {
69 | return COMPILED_EXTENSION_REGEX.test(file);
70 | }
71 |
72 | function isTargetExtension(file: string): boolean {
73 | return TARGET_EXTENSION_REGEX.test(file);
74 | }
75 |
76 | function normalizeCodePath(path: string): string {
77 | if (/win32/.test(platform()) && win32.isAbsolute(path)) {
78 | return normalizeCodePathForWindows(path);
79 | }
80 |
81 | return normalizeCodePathForUnix(path);
82 | }
83 |
84 | function normalizeCodePathForUnix(path: string): string {
85 | return slash(path);
86 | }
87 |
88 | function normalizeCodePathForWindows(path: string): string {
89 | path = win32.normalize(path);
90 | path = path.replace(/\\/g, '\\\\');
91 |
92 | return path;
93 | }
94 |
95 | function toLoaderFileName(file: string): string {
96 | const name = basename(file);
97 | const pure = basename(name, extname(file));
98 |
99 | return file.replace(name, pure + LOADER_SUFFIX + LOADER_EXTENSION);
100 | }
101 |
102 | function toSiblingRelativeFileLocation(file: string): string {
103 | return `./${basename(file)}`;
104 | }
105 |
106 | export {
107 | createFileMatcher,
108 | fromCompiledToTargetExtension,
109 | fromTargetToCompiledExtension,
110 | isCompiledExtension,
111 | isTargetExtension,
112 | normalizeCodePath,
113 | normalizeCodePathForUnix,
114 | normalizeCodePathForWindows,
115 | toLoaderFileName,
116 | toSiblingRelativeFileLocation,
117 | };
118 |
--------------------------------------------------------------------------------
/test/webpack/runner.ts:
--------------------------------------------------------------------------------
1 | import { readFile } from 'fs/promises';
2 | import { platform } from 'os';
3 | import { join, resolve } from 'path';
4 |
5 | import { createFsFromVolume, Volume } from 'memfs';
6 | import replaceString from 'replace-string';
7 | import slash from 'slash';
8 | import webpack from 'webpack';
9 | import type { Configuration, StatsAsset } from 'webpack';
10 | import { customizeObject, mergeWithCustomize } from 'webpack-merge';
11 |
12 | import { BytenodeWebpackPlugin } from '../../src';
13 | import type { Options } from '../../src/types';
14 |
15 | const merge = mergeWithCustomize({
16 | customizeObject: customizeObject({
17 | 'infrastructureLogging.console': 'replace',
18 | }),
19 | });
20 |
21 | const defaultWebpackOptions: Configuration = {
22 | cache: false,
23 | context: __dirname,
24 | infrastructureLogging: {
25 | debug: false,
26 | level: 'none',
27 | },
28 | mode: 'production',
29 | output: {
30 | path: resolve(__dirname, './output'),
31 | },
32 | plugins: [],
33 | stats: {
34 | logging: 'none',
35 | loggingDebug: false,
36 | loggingTrace: false,
37 | },
38 | target: 'node',
39 | };
40 |
41 | interface WebpackRunAsset extends StatsAsset {
42 | content: string | null;
43 | path: string;
44 | }
45 |
46 | interface WebpackRunResult {
47 | assets: Record;
48 | names: string[];
49 | }
50 |
51 | async function runWebpack(webpackOptions: Configuration, pluginOptions?: Partial): Promise {
52 | webpackOptions = merge(defaultWebpackOptions, webpackOptions, {
53 | plugins: [
54 | new BytenodeWebpackPlugin(pluginOptions),
55 | ],
56 | });
57 |
58 | if (typeof webpackOptions.output?.path !== 'string') {
59 | throw new Error('output.path should be defined');
60 | }
61 |
62 | return new Promise((resolve, reject) => {
63 | const compiler = webpack(webpackOptions);
64 | const volume = new Volume();
65 |
66 | compiler.outputFileSystem = createFsFromVolume(volume);
67 | compiler.run((error, stats) => {
68 | if (error || stats?.hasErrors()) {
69 | reject(error ?? stats?.toString());
70 | }
71 |
72 | if (stats) {
73 | const { assets } = stats.toJson();
74 |
75 | const files = volume.toJSON();
76 | const result: WebpackRunResult = {
77 | assets: {},
78 | names: [],
79 | };
80 |
81 | if (assets) {
82 | result.names.push(...assets.map(asset => asset.name).sort());
83 |
84 | for (const asset of assets as WebpackRunAsset[]) {
85 | let path = slash(join(compiler.outputPath, asset.name));
86 |
87 | if (platform() === 'win32') {
88 | path = path.substring(path.indexOf(':') + 1);
89 | }
90 |
91 | asset.content = files[path];
92 | asset.path = path;
93 |
94 | result.assets[asset.name] = asset;
95 | }
96 | }
97 |
98 | resolve(result);
99 | }
100 | });
101 | });
102 | }
103 |
104 | async function readFixtureContent(location: string): Promise {
105 | const buffer = await readFile(resolve(defaultWebpackOptions.context as string, location));
106 |
107 | let content = buffer.toString();
108 |
109 | content = replaceString(content, '\'', '\"'); // eslint-disable-line no-useless-escape
110 | content = replaceString(content, '\n', '');
111 | content = replaceString(content, '\r', '');
112 |
113 | return content;
114 | }
115 |
116 | export {
117 | readFixtureContent,
118 | runWebpack,
119 | };
120 |
121 | export type {
122 | Configuration,
123 | };
124 |
--------------------------------------------------------------------------------
/test/utils.test.ts:
--------------------------------------------------------------------------------
1 | import { ALL_PLATFORMS, mockPlatform } from './mocks/platform';
2 |
3 | describe('utils', () => {
4 |
5 | for (const platform of ALL_PLATFORMS) {
6 | describe(`${platform}`, () => {
7 |
8 | beforeEach(() => {
9 | jest.resetModules();
10 | });
11 |
12 | test('fromCompiledToTargetExtension', async () => {
13 | await mockPlatform(platform);
14 |
15 | const { fromCompiledToTargetExtension } = await import('../src/utils');
16 |
17 | expect(fromCompiledToTargetExtension('index.js')).toBe('index.js');
18 | expect(fromCompiledToTargetExtension('index.jsc')).toBe('index.js');
19 | expect(fromCompiledToTargetExtension('index.json')).toBe('index.json');
20 | });
21 |
22 | test('fromTargetToCompiledExtension', async () => {
23 | await mockPlatform(platform);
24 |
25 | const { fromTargetToCompiledExtension } = await import('../src/utils');
26 |
27 | expect(fromTargetToCompiledExtension('index.js')).toBe('index.jsc');
28 | expect(fromTargetToCompiledExtension('index.jsc')).toBe('index.jsc');
29 | expect(fromTargetToCompiledExtension('index.json')).toBe('index.json');
30 | });
31 |
32 | test('isCompiledExtension', async () => {
33 | await mockPlatform(platform);
34 |
35 | const { isCompiledExtension } = await import('../src/utils');
36 |
37 | expect(isCompiledExtension('index.js')).toBe(false);
38 | expect(isCompiledExtension('index.jsc')).toBe(true);
39 | expect(isCompiledExtension('index.json')).toBe(false);
40 | });
41 |
42 | test('isCompiledExtension', async () => {
43 | await mockPlatform(platform);
44 |
45 | const { isTargetExtension } = await import('../src/utils');
46 |
47 | expect(isTargetExtension('index.js')).toBe(true);
48 | expect(isTargetExtension('index.jsc')).toBe(false);
49 | expect(isTargetExtension('index.json')).toBe(false);
50 | });
51 |
52 | test('toLoaderFileName', async () => {
53 | await mockPlatform(platform);
54 |
55 | const { toLoaderFileName } = await import('../src/utils');
56 |
57 | expect(toLoaderFileName('index.js')).toBe('index.loader.js');
58 | expect(toLoaderFileName('index.jsc')).toBe('index.loader.js');
59 | expect(toLoaderFileName('index.json')).toBe('index.loader.js');
60 | });
61 |
62 | test('toSiblingRelativeFileLocation', async () => {
63 | await mockPlatform(platform);
64 |
65 | const { toSiblingRelativeFileLocation } = await import('../src/utils');
66 |
67 | expect(toSiblingRelativeFileLocation('index.js')).toBe('./index.js');
68 | expect(toSiblingRelativeFileLocation('./a/b/c/index.jsc')).toBe('./index.jsc');
69 | expect(toSiblingRelativeFileLocation('/a/b/c/index.json')).toBe('./index.json');
70 | });
71 |
72 | describe('normalizeCodePath', () => {
73 | const windowsMatrix: Array<[string, string, string]> = [
74 | ['absolute backwards', 'A:\\b\\c', 'A:\\\\b\\\\c'],
75 | ['absolute forwards', 'A:/b/c', 'A:\\\\b\\\\c'],
76 | ['relative backwards', '.\\a\\b\\c', './a/b/c'],
77 | ['relative forwards', './a/b/c', './a/b/c'],
78 | ];
79 |
80 | const unixMatrix: Array<[string, string, string]> = [
81 | ['absolute backwards', '\\a\\b\\c', '/a/b/c'],
82 | ['absolute forwards', '/a/b/c', '/a/b/c'],
83 | ['relative backwards', '.\\a\\b\\c', './a/b/c'],
84 | ['relative forwards', './a/b/c', './a/b/c'],
85 | ];
86 |
87 | const matrix = platform === 'win32'
88 | ? windowsMatrix
89 | : unixMatrix;
90 |
91 | test.each(matrix)('%s', async (_, from, to) => {
92 | const { normalizeCodePath } = await import('../src/utils');
93 | return expect(normalizeCodePath(from)).toBe(to);
94 | });
95 | });
96 |
97 | });
98 | }
99 |
100 | });
101 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | /* eslint-env node */
2 |
3 | module.exports = {
4 | env: {
5 | es6: true,
6 | node: true,
7 | },
8 | extends: [
9 | 'eslint:recommended',
10 | ],
11 | parser: '@typescript-eslint/parser',
12 | parserOptions: {
13 | project: [
14 | 'tsconfig.project.json',
15 | 'tsconfig.test.json',
16 | ],
17 | warnOnUnsupportedTypeScriptVersion: true,
18 | },
19 | plugins: [
20 | '@typescript-eslint',
21 | 'import',
22 | ],
23 | root: true,
24 | rules: commonRules(),
25 | overrides: [
26 | overrideForTypeScriptFiles(),
27 | ],
28 | settings: {
29 | 'import/parsers': {
30 | '@typescript-eslint/parser': [
31 | '.js',
32 | '.ts',
33 | ],
34 | },
35 | },
36 | };
37 |
38 | function commonRules() {
39 | return {
40 | 'array-bracket-spacing': ['error', 'never'],
41 | 'brace-style': ['error', '1tbs'],
42 | 'comma-dangle': ['error', 'always-multiline'],
43 | 'comma-spacing': 'error',
44 | 'comma-style': 'error',
45 | 'computed-property-spacing': ['error', 'never'],
46 | 'eol-last': ['error', 'always'],
47 | 'linebreak-style': 'off',
48 | 'import/extensions': ['error', {
49 | js: 'never',
50 | json: 'always',
51 | }],
52 | 'import/first': 'error',
53 | 'import/namespace': 'error',
54 | 'import/newline-after-import': 'error',
55 | 'import/no-absolute-path': 'error',
56 | 'import/no-deprecated': 'error',
57 | 'import/no-duplicates': 'error',
58 | 'import/no-mutable-exports': 'error',
59 | 'import/no-self-import': 'error',
60 | 'import/no-useless-path-segments': 'error',
61 | 'import/order': ['error', {
62 | alphabetize: {
63 | caseInsensitive: true,
64 | order: 'asc',
65 | },
66 | groups: [
67 | 'builtin',
68 | 'external',
69 | 'internal',
70 | 'parent',
71 | 'sibling',
72 | 'index',
73 | ],
74 | 'newlines-between': 'always',
75 | }],
76 | 'no-multiple-empty-lines': ['error', {
77 | max: 1,
78 | maxBOF: 0,
79 | maxEOF: 1,
80 | }],
81 | 'no-tabs': 'error',
82 | 'no-use-before-define': 'off', // enhanced by @typescript-eslint
83 | 'nonblock-statement-body-position': ['error', 'beside'],
84 | 'object-curly-spacing': ['error', 'always'],
85 | 'prefer-const': 'error',
86 | 'prefer-object-spread': 'error',
87 | 'prefer-rest-params': 'error',
88 | 'prefer-spread': 'error',
89 | 'quotes': ['error', 'single', {
90 | allowTemplateLiterals: true,
91 | }],
92 | 'require-await': 'off', // enhanced by @typescript-eslint
93 | 'rest-spread-spacing': ['error', 'never'],
94 | 'semi': 'off', // enhanced by @typescript-eslint
95 | 'semi-style': ['error', 'last'],
96 | 'sort-imports': ['error', {
97 | ignoreCase: true,
98 | ignoreDeclarationSort: true,
99 | ignoreMemberSort: false,
100 | }],
101 | 'sort-keys': 'off',
102 | 'sort-vars': ['error', {
103 | ignoreCase: true,
104 | }],
105 | };
106 | }
107 |
108 | function overrideForTypeScriptFiles() {
109 | return {
110 | files: '*.ts',
111 | excludedFiles: '*.js',
112 | extends: [
113 | 'plugin:@typescript-eslint/eslint-recommended',
114 | 'plugin:@typescript-eslint/recommended',
115 | 'plugin:@typescript-eslint/recommended-requiring-type-checking',
116 | 'plugin:import/typescript',
117 | ],
118 | rules: {
119 | '@typescript-eslint/ban-ts-comment': ['off', {
120 | minimumDescriptionLength: 20,
121 | 'ts-check': 'allow-with-description',
122 | 'ts-expect-error': 'allow-with-description',
123 | 'ts-ignore': false,
124 | 'ts-nocheck': 'allow-with-description',
125 | }],
126 | '@typescript-eslint/ban-types': 'error',
127 | '@typescript-eslint/consistent-type-imports': ['error', {
128 | disallowTypeAnnotations: true,
129 | prefer: 'type-imports',
130 | }],
131 | '@typescript-eslint/explicit-function-return-type': ['error', {
132 | allowConciseArrowFunctionExpressionsStartingWithVoid: false,
133 | allowDirectConstAssertionInArrowFunctions: true,
134 | allowExpressions: true,
135 | allowHigherOrderFunctions: true,
136 | allowTypedFunctionExpressions: true,
137 | }],
138 | '@typescript-eslint/explicit-member-accessibility': 'off',
139 |
140 | // switching this off because it doesn't really understand type guards
141 | // and it's less strict than @typescript-eslint/explicit-function-return-type anyway
142 | '@typescript-eslint/explicit-module-boundary-types': 'off',
143 |
144 | '@typescript-eslint/indent': ['error', 2],
145 | '@typescript-eslint/member-delimiter-style': 'error',
146 | '@typescript-eslint/no-explicit-any': 'off',
147 | '@typescript-eslint/no-extra-non-null-assertion': 'error',
148 | '@typescript-eslint/no-extra-semi': 'error',
149 | '@typescript-eslint/no-floating-promises': ['error', {
150 | ignoreIIFE: true,
151 | ignoreVoid: true,
152 | }],
153 | '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
154 | '@typescript-eslint/no-unsafe-argument': 'off',
155 | '@typescript-eslint/no-unsafe-assignment': 'off',
156 | '@typescript-eslint/no-unsafe-call': 'off',
157 | '@typescript-eslint/no-unsafe-member-access': 'off',
158 | '@typescript-eslint/no-unsafe-return': 'off',
159 | '@typescript-eslint/no-use-before-define': 'off',
160 | '@typescript-eslint/prefer-as-const': 'error',
161 | '@typescript-eslint/require-await': 'error',
162 | '@typescript-eslint/restrict-template-expressions': 'error',
163 | '@typescript-eslint/semi': ['error', 'always', {
164 | omitLastInOneLineBlock: false,
165 | }],
166 | },
167 | };
168 | }
169 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [2.3.1](https://github.com/herberttn/bytenode-webpack-plugin/compare/v2.3.0...v2.3.1) (2023-02-27)
2 |
3 |
4 | ### Bug Fixes
5 |
6 | * normalize import paths for code replacement ([930633a](https://github.com/herberttn/bytenode-webpack-plugin/commit/930633a1710853fa08e713b9da83935a8d0b734d))
7 |
8 | # [2.3.0](https://github.com/herberttn/bytenode-webpack-plugin/compare/v2.2.0...v2.3.0) (2022-12-14)
9 |
10 |
11 | ### Bug Fixes
12 |
13 | * ensure node v14 support ([647e184](https://github.com/herberttn/bytenode-webpack-plugin/commit/647e1848567aa0f1ab6e577d341e106432388425))
14 |
15 |
16 | ### Features
17 |
18 | * make sure code is not inlined into loader ([e3ba024](https://github.com/herberttn/bytenode-webpack-plugin/commit/e3ba024791595ca5484356d52b2072b806c7f979))
19 |
20 | # [2.3.0-rc.1](https://github.com/herberttn/bytenode-webpack-plugin/compare/v2.2.0...v2.3.0-rc.1) (2022-12-14)
21 |
22 |
23 | ### Bug Fixes
24 |
25 | * ensure node v14 support ([b806764](https://github.com/herberttn/bytenode-webpack-plugin/commit/b806764f8b917aa1493114c69c1932ea8b982e34))
26 |
27 |
28 | ### Features
29 |
30 | * make sure code is not inlined into loader ([50ca69d](https://github.com/herberttn/bytenode-webpack-plugin/commit/50ca69dcf7a9b11c70fe32a2fa8d1173104c1f8c))
31 |
32 | # [2.2.0](https://github.com/herberttn/bytenode-webpack-plugin/compare/v2.1.1...v2.2.0) (2022-11-03)
33 |
34 |
35 | ### Features
36 |
37 | * add include and exclude options ([5d0e213](https://github.com/herberttn/bytenode-webpack-plugin/commit/5d0e213e810f2eb60587bd6211120f590fa0c611))
38 | * warn when compiling to but not targeting electron ([cbf0536](https://github.com/herberttn/bytenode-webpack-plugin/commit/cbf05361d5a912522e206de5cdf5d9cd2b7015e3))
39 |
40 | ## [2.1.1](https://github.com/herberttn/bytenode-webpack-plugin/compare/v2.1.0...v2.1.1) (2022-10-24)
41 |
42 |
43 | ### Bug Fixes
44 |
45 | * strip-shebang should be a production dependency ([fd5a570](https://github.com/herberttn/bytenode-webpack-plugin/commit/fd5a5707006256cb4f1a6cef3fae0b1e518ab210))
46 |
47 | # [2.1.0](https://github.com/herberttn/bytenode-webpack-plugin/compare/v2.0.0...v2.1.0) (2022-10-24)
48 |
49 |
50 | ### Features
51 |
52 | * electron-forge v6 support ([8131cf7](https://github.com/herberttn/bytenode-webpack-plugin/commit/8131cf7860032dbb564e1bf865f0cdaa0f0ec1f8))
53 |
54 | # [2.0.0](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.2.5...v2.0.0) (2022-10-20)
55 |
56 |
57 | ### Features
58 |
59 | * **deps:** bump bytenode ([c1826d7](https://github.com/herberttn/bytenode-webpack-plugin/commit/c1826d7c129b18280881b3ed8e16d6f257121a0e))
60 | * **deps:** bump webpack-hot-middleware ([3766ba0](https://github.com/herberttn/bytenode-webpack-plugin/commit/3766ba0fcf4caefee1c3180ac64d8df36c310166))
61 | * **deps:** bump webpack-merge ([bcc6366](https://github.com/herberttn/bytenode-webpack-plugin/commit/bcc636682164b602129cffdb52accc1e1cfbf38b))
62 | * **deps:** bump webpack-virtual-modules ([e47de32](https://github.com/herberttn/bytenode-webpack-plugin/commit/e47de32664150f9481a60dcf1b7601d3b89ee5e8))
63 | * webpack v5 ([2fc5d72](https://github.com/herberttn/bytenode-webpack-plugin/commit/2fc5d72f48fa9d31974a5fa7a8d21ae79e745ed7))
64 |
65 |
66 | ### BREAKING CHANGES
67 |
68 | * This version adds support to `webpack` `v5` and
69 | drops `webpack` `v4`. Use a previous version if using `webpack` `v4`.
70 |
71 | DEPRECATED: This version drops the options `debugLogs` and `silent`,
72 | as it now uses webpack's built-in logging system. Logging should be
73 | enabled through webpack's own configuration. The option
74 | `debugLifecycle` is still present, but it also works in conjunction
75 | with webpack's logging system, so both need to be enabled for logs to
76 | be seen.
77 |
78 | ## [1.2.5](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.2.4...v1.2.5) (2021-04-24)
79 |
80 |
81 | ### Bug Fixes
82 |
83 | * webpack externals need to receive posix style paths ([ba012c5](https://github.com/herberttn/bytenode-webpack-plugin/commit/ba012c5e9cffb509640be73d070f1dcdbf114f90))
84 |
85 | ## [1.2.4](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.2.3...v1.2.4) (2021-04-23)
86 |
87 |
88 | ### Bug Fixes
89 |
90 | * misplaced dependency ([3e564b3](https://github.com/herberttn/bytenode-webpack-plugin/commit/3e564b34a72826871d9f47d71aba7235108c3b13))
91 |
92 | ## [1.2.3](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.2.2...v1.2.3) (2021-04-23)
93 |
94 |
95 | ### Bug Fixes
96 |
97 | * normalize loader import path to compiled file ([1bb918f](https://github.com/herberttn/bytenode-webpack-plugin/commit/1bb918f7320ba5a1a172c050e52d7e33066e6592))
98 |
99 | ## [1.2.2](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.2.1...v1.2.2) (2021-04-10)
100 |
101 |
102 | ### Bug Fixes
103 |
104 | * bump bytenode to fix bytenode/bytenode[#122](https://github.com/herberttn/bytenode-webpack-plugin/issues/122) ([e7de4eb](https://github.com/herberttn/bytenode-webpack-plugin/commit/e7de4eb2c3c84ae05992339cd98e0e90062a1352))
105 |
106 | ## [1.2.1](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.2.0...v1.2.1) (2021-04-04)
107 |
108 |
109 | ### Bug Fixes
110 |
111 | * dependency detection should ignore absolute and relative paths ([2bd5d7f](https://github.com/herberttn/bytenode-webpack-plugin/commit/2bd5d7fa6e7f7c4e8e7469c29f2a564fcba094d3))
112 |
113 | # [1.2.0](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.1.0...v1.2.0) (2021-04-03)
114 |
115 |
116 | ### Features
117 |
118 | * better entry middlewares support ([25218e5](https://github.com/herberttn/bytenode-webpack-plugin/commit/25218e5402013d54402f934f0b6ee231b6e508ae))
119 | * depend on webpack as peer only ([2724ee2](https://github.com/herberttn/bytenode-webpack-plugin/commit/2724ee23b46848141e49d8aacbbb7f61394473f1))
120 |
121 | # [1.2.0-rc.1](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.1.0...v1.2.0-rc.1) (2021-04-03)
122 |
123 |
124 | ### Features
125 |
126 | * better entry middlewares support ([25218e5](https://github.com/herberttn/bytenode-webpack-plugin/commit/25218e5402013d54402f934f0b6ee231b6e508ae))
127 | * depend on webpack as peer only ([2724ee2](https://github.com/herberttn/bytenode-webpack-plugin/commit/2724ee23b46848141e49d8aacbbb7f61394473f1))
128 |
129 | # [1.1.0](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.0.2...v1.1.0) (2021-04-01)
130 |
131 |
132 | ### Bug Fixes
133 |
134 | * add throw description for entry as function ([446219e](https://github.com/herberttn/bytenode-webpack-plugin/commit/446219ec3744d1a7465cc2736025a5ca09ba6b46))
135 | * debug logs should always use console.debug ([93979e2](https://github.com/herberttn/bytenode-webpack-plugin/commit/93979e29e8bfe92beb91ccbc10c849466783e4c0))
136 | * remove moot config checks ([e408ccb](https://github.com/herberttn/bytenode-webpack-plugin/commit/e408ccba0149193554537a0b3a384679a4333577))
137 |
138 | ## [1.0.2](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.0.1...v1.0.2) (2021-03-31)
139 |
140 | ## [1.0.1](https://github.com/herberttn/bytenode-webpack-plugin/compare/v1.0.0...v1.0.1) (2021-03-31)
141 |
142 |
143 | ### Bug Fixes
144 |
145 | * need to build before publishing obviously ([fead0bd](https://github.com/herberttn/bytenode-webpack-plugin/commit/fead0bd4b470f5e5b9d8a033e380c7c477a371b0))
146 |
147 | # 1.0.0 (2021-03-31)
148 |
149 |
150 | ### Features
151 |
152 | * add silent mode ([7e2768e](https://github.com/herberttn/bytenode-webpack-plugin/commit/7e2768e1b5a0231b83bd00f33ba42e2a9e5e4294))
153 | * bump bytenode to v1.2.1 ([2640985](https://github.com/herberttn/bytenode-webpack-plugin/commit/2640985c54dce93ca686c98c59fa64a26560a409))
154 | * migrate to ts ([1879a01](https://github.com/herberttn/bytenode-webpack-plugin/commit/1879a01c7d05b825a0f0c2d909256217be5aa045))
155 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | @herberttn/bytenode-webpack-plugin
2 | ---
3 |
4 | [![ci][badge-workflow-ci]][badge-workflow-ci-link]
5 | [![coveralls][badge-coveralls]][badge-coveralls-link]
6 | [![npm][badge-npm]][badge-npm-link]
7 | [![license][badge-license]][badge-license-link]
8 |
9 | [badge-coveralls]: https://img.shields.io/coveralls/github/herberttn/bytenode-webpack-plugin?logo=coveralls&style=flat-square
10 | [badge-coveralls-link]: https://coveralls.io/github/herberttn/bytenode-webpack-plugin
11 | [badge-license]: https://img.shields.io/github/license/herberttn/bytenode-webpack-plugin?style=flat-square
12 | [badge-license-link]: LICENSE
13 | [badge-npm]: https://img.shields.io/npm/v/@herberttn/bytenode-webpack-plugin?logo=npm&style=flat-square
14 | [badge-npm-link]: https://www.npmjs.com/package/@herberttn/bytenode-webpack-plugin
15 | [badge-workflow-ci]: https://img.shields.io/github/actions/workflow/status/herberttn/bytenode-webpack-plugin/ci.yml?branch=main&label=ci&logo=github&style=flat-square
16 | [badge-workflow-ci-link]: https://github.com/herberttn/bytenode-webpack-plugin/actions/workflows/ci.yml
17 |
18 | Compile JavaScript into bytecode using [`bytenode`][link-to-bytenode].
19 | Inspired by [`bytenode-webpack-plugin`][link-to-bytenode-webpack-plugin].
20 |
21 | [link-to-bytenode]: https://www.npmjs.com/package/bytenode
22 | [link-to-bytenode-webpack-plugin]: https://www.npmjs.com/package/bytenode-webpack-plugin
23 | [link-to-electron-forge]: https://www.npmjs.com/package/electron-forge
24 | [link-to-electron-forge-typescript-webpack-template]: https://www.electronforge.io/templates/typescript-+-webpack-template
25 | [link-to-electron-forge-webpack-template]: https://www.electronforge.io/templates/webpack-template
26 | [link-to-nodejs]: https://nodejs.org
27 | [link-to-webpack]: https://www.npmjs.com/package/webpack
28 |
29 | ### Install
30 | ```shell
31 | npm install --save @herberttn/bytenode-webpack-plugin
32 | ```
33 |
34 | ### Supported versions
35 | - [`node`][link-to-nodejs] `v14+` (this plugin is published in `ES2020` `CommonJS` syntax at the moment)
36 | - [`webpack`][link-to-webpack] `v5.x`
37 |
38 | ### Supported features
39 | - [`electron-forge`][link-to-electron-forge] with [caveats](#electron-forge-support)
40 | - :heavy_check_mark: Default template: [`typescript-webpack`][link-to-electron-forge-typescript-webpack-template]
41 | - :heavy_check_mark: Default template: [`webpack`][link-to-electron-forge-webpack-template]
42 | - [`webpack`][link-to-webpack]
43 | - :heavy_check_mark: `entry` as a `string` (e.g., `entry: 'src/index.js'`)
44 | - :heavy_check_mark: `entry` as an `array` (e.g., `entry: ['src/index.js']`)
45 | - :heavy_check_mark: `entry` as an `object` (e.g., `entry: { main: 'src/index.js' }`)
46 | - :heavy_check_mark: `entry` middlewares (e.g., `entry: ['src/index.js', 'webpack-hot-middleware/client']`)
47 | - :x: `entry.*.filename` (e.g., `entry: { main: { filename: 'index.js' } }`)
48 | - :heavy_check_mark: Dynamic `output.filename` (e.g., `output: { filename: '[name].js' }`)
49 | - :x: Static `output.filename` (e.g., `output: { filename: 'index.js' }`)
50 |
51 | ### Usage
52 | ```javascript
53 | import { BytenodeWebpackPlugin } from '@herberttn/bytenode-webpack-plugin';
54 |
55 | // webpack options
56 | module.exports = {
57 | // ...
58 |
59 | plugins: [
60 | // using all defaults
61 | new BytenodeWebpackPlugin(),
62 |
63 | // overriding an option
64 | new BytenodeWebpackPlugin({
65 | compileForElectron: true,
66 | }),
67 | ],
68 | };
69 | ```
70 |
71 | ### Options
72 | ```typescript
73 | type FileMatcherIntent = string | RegExp; // glob or regex
74 |
75 | interface Options {
76 | compileAsModule: boolean; // wraps the code in a node module
77 | compileForElectron: boolean; // compiles for electron instead of plain node
78 | debugLifecycle: boolean; // enables webpack hooks lifecycle logs
79 | exclude?: FileMatcherIntent[]; // prevents assets from being compiled, accepts glob and regex
80 | include?: FileMatcherIntent[]; // filter assets to compile, accepts glob and regex
81 | keepSource: boolean; // emits the original source files along with the compiled ones
82 | preventSourceMaps: boolean; // prevents source maps from being generated
83 | }
84 | ```
85 | > Globs are handled using [`picomatch`](https://www.npmjs.com/package/picomatch)
86 |
87 | #### Default options
88 | ```typescript
89 | new BytenodeWebpackPlugin({
90 | compileAsModule: true,
91 | compileForElectron: false,
92 | debugLifecycle: false,
93 | keepSource: false,
94 | preventSourceMaps: true,
95 | })
96 | ```
97 |
98 | ### Examples
99 | Sample projects can be found in the [examples](./examples) directory.
100 | - [examples/electron-forge-typescript-webpack](./examples/electron-forge-typescript-webpack): [`electron-forge`][link-to-electron-forge] with [`typescript-webpack`][link-to-electron-forge-typescript-webpack-template] template
101 | - [examples/electron-forge-webpack](./examples/electron-forge-webpack): [`electron-forge`][link-to-electron-forge] with [`webpack`][link-to-electron-forge-webpack-template] template
102 | - [examples/webpack](./examples/webpack): plain node/webpack project
103 |
104 | ### Caveats
105 |
106 | #### `electron-forge` support
107 | ##### main process
108 | You may need to change the default entry and output configurations. Probably something like this:
109 |
110 | ###### webpack.main.config.js
111 | ```diff
112 | - entry: './src/index.ts',
113 | + entry: {
114 | + index: './src/index.ts',
115 | + },
116 | + output: {
117 | + filename: '[name].js',
118 | + },
119 | + target: 'electron-main',
120 | ```
121 |
122 | ##### renderer process
123 | You will probably run into [missing node core modules](#missing-node-core-modules). Should probably be fixed by something like this:
124 |
125 | ###### webpack.renderer.config.js
126 | ```diff
127 | + target: 'electron-renderer',
128 | ```
129 |
130 | ##### preload process
131 | You may need to change the default entry and output configurations. Probably something like this:
132 |
133 | ###### webpack.preload.config.js
134 | ```diff
135 | - entry: './src/preload.ts',
136 | + entry: {
137 | + preload: './src/preload.ts',
138 | + },
139 | + output: {
140 | + filename: '[name].js',
141 | + },
142 | + target: 'electron-preload',
143 | ```
144 |
145 | ###### package.json
146 | ```diff
147 | "@electron-forge/plugin-webpack",
148 | {
149 | "mainConfig": "./webpack.main.config.js",
150 | "renderer": {
151 | "config": "./webpack.renderer.config.js",
152 | "entryPoints": [
153 | {
154 | "html": "./src/index.html",
155 | "js": "./src/renderer.ts",
156 | "name": "main_window",
157 | + "preload": {
158 | + "config": "webpack.preload.config.js"
159 | + }
160 | }
161 | ]
162 | }
163 | }
164 | ```
165 |
166 | #### Missing node core modules
167 | If you run into a webpack error similar to the one below, it's because `bytenode` requires some of node's code modules to properly do its job, and only you can decide the best way to provide them given your configuration.
168 |
169 | Three possible solutions:
170 | - Set webpack's target to `node`
171 | - Set webpack's target to an appropriate `electron-*` target, when compiling for electron
172 | - Provide polyfills for the necessary modules
173 | >Other solutions may exist.
174 |
175 | Error example:
176 | ```shell
177 | ERROR in ../../node_modules/bytenode/lib/index.js 3:11-24
178 | Module not found: Error: Can't resolve 'fs' in '../../node_modules/bytenode/lib'
179 | @ ./src/renderer.loader.js 1:0-19
180 |
181 | BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
182 | This is no longer the case. Verify if you need this module and configure a polyfill for it.
183 |
184 | If you want to include a polyfill, you need to:
185 | - add a fallback 'resolve.fallback: { "vm": require.resolve("vm-browserify") }'
186 | - install 'vm-browserify'
187 | If you don't want to include a polyfill, you can use an empty module like this:
188 | resolve.fallback: { "vm": false }
189 | @ ./src/renderer.loader.js 1:0-19
190 | ```
191 |
192 |
193 | ### Contributors
194 |
195 |
213 |
--------------------------------------------------------------------------------
/src/plugin.ts:
--------------------------------------------------------------------------------
1 | import { dirname, relative, resolve } from 'path';
2 |
3 | import replaceString from 'replace-string';
4 | import type { Hook } from 'tapable';
5 | import { Compilation, ExternalsPlugin } from 'webpack';
6 | import type { Compiler, WebpackPluginInstance } from 'webpack';
7 | import VirtualModulesPlugin from 'webpack-virtual-modules';
8 |
9 | import { createLoaderCode } from './loaders';
10 | import { compileSource, replaceSource } from './sources';
11 | import type { Options, Prepared, PreparedEntries, PreparedEntry, Source } from './types';
12 | import { createFileMatcher, fromTargetToCompiledExtension, isTargetExtension, normalizeCodePath, normalizeCodePathForUnix, normalizeCodePathForWindows, toLoaderFileName, toSiblingRelativeFileLocation } from './utils';
13 |
14 | class BytenodeWebpackPlugin implements WebpackPluginInstance {
15 |
16 | private readonly name = 'BytenodeWebpackPlugin';
17 | private readonly options: Options;
18 |
19 | constructor(options: Partial = {}) {
20 | this.options = {
21 | compileAsModule: true,
22 | compileForElectron: false,
23 | debugLifecycle: false,
24 | keepSource: false,
25 | preventSourceMaps: true,
26 | ...options,
27 | };
28 | }
29 |
30 | apply(compiler: Compiler): void {
31 | const logger = compiler.getInfrastructureLogger(this.name);
32 | setupLifecycleLogging(compiler, this.name, this.options);
33 |
34 | logger.debug('original webpack.options.entry', compiler.options.entry);
35 |
36 | const { entries: { ignored, loaders, targets }, modules } = prepare(compiler);
37 | logger.debug('prepared ignores', Object.fromEntries(ignored.entries()));
38 | logger.debug('prepared loaders', Object.fromEntries(loaders.entries()));
39 | logger.debug('prepared targets', Object.fromEntries(targets.entries()));
40 | logger.debug('prepared modules', Object.fromEntries(modules.entries()));
41 |
42 | compiler.options.entry = Object.fromEntries([
43 | ...ignored.entries(),
44 | ...loaders.entries(),
45 | ...targets.entries(),
46 | ]);
47 |
48 | if (this.options.preventSourceMaps) {
49 | logger.log('Preventing source maps from being generated by changing webpack.options.devtool to false.');
50 | compiler.options.devtool = false;
51 | }
52 |
53 | if (this.options.compileForElectron) {
54 | const target = compiler.options.target;
55 |
56 | if (target) {
57 | const targets = Array.isArray(target) ? target : [target];
58 |
59 | if (!targets.some(target => target.startsWith('electron-'))) {
60 | logger.warn(`Consider using an electron target instead of or in addition to [${targets.join(', ')}] when compiling for electron.`);
61 | }
62 | }
63 | }
64 |
65 | logger.debug('modified webpack.options.devtool', compiler.options.devtool);
66 | logger.debug('modified webpack.options.entry', compiler.options.entry);
67 |
68 | logger.debug('adding electron as external');
69 | new ExternalsPlugin('commonjs', ['electron'])
70 | .apply(compiler);
71 |
72 | logger.debug('adding target imports from loader code as external');
73 | new ExternalsPlugin('commonjs', ({ context, contextInfo, request }, callback) => {
74 | if (context && contextInfo && request) {
75 | const requestLocation = resolve(context, request);
76 |
77 | if (contextInfo.issuer === toLoaderFileName(requestLocation)) {
78 | for (const target of Array.from(targets.values()).flatMap(target => target.import)) {
79 | const targetLocation = resolve(compiler.context, target);
80 |
81 | if (target === request || targetLocation === requestLocation) {
82 | logger.debug('external: context', { context, contextInfo, request, requestLocation, target, targetLocation });
83 | logger.debug('external: resolved to', target);
84 |
85 | return callback(undefined, target);
86 | }
87 | }
88 | }
89 | }
90 |
91 | return callback();
92 | }).apply(compiler);
93 |
94 | new VirtualModulesPlugin(Object.fromEntries(modules.entries()))
95 | .apply(compiler);
96 |
97 | // ensure hooks run last by tapping after the other plugins
98 | compiler.hooks.afterPlugins.tap(this.name, () => {
99 | logger.debug('hook: after plugins');
100 | const matches = createFileMatcher(this.options.include, this.options.exclude);
101 |
102 | compiler.hooks.compilation.tap(this.name, compilation => {
103 | logger.debug('hook: compilation');
104 |
105 | const stats = compilation.getLogger(this.name);
106 | const loaderOutputFiles: string[] = [];
107 | const targetOutputFiles: string[] = [];
108 |
109 | compilation.hooks.processAssets.tap({ name: this.name, stage: Compilation.PROCESS_ASSETS_STAGE_PRE_PROCESS }, (): void => {
110 | logger.debug('hook: process assets');
111 | stats.time('collect asset names');
112 |
113 | loaderOutputFiles.push(...collectOutputFiles(compilation, loaders));
114 | logger.debug('collected: loader output files', loaderOutputFiles);
115 |
116 | targetOutputFiles.push(...collectOutputFiles(compilation, targets));
117 | logger.debug('collected: target output files', targetOutputFiles);
118 |
119 | stats.timeEnd('collect asset names');
120 | });
121 |
122 | compilation.hooks.processAssets.tapPromise({ name: this.name, stage: Compilation.PROCESS_ASSETS_STAGE_DERIVED }, async (assets): Promise => {
123 | logger.debug('hook: process assets promise');
124 | stats.time('process assets');
125 |
126 | for (const [name, asset] of Object.entries(assets)) {
127 | stats.group('asset', name);
128 | stats.time('took');
129 |
130 | if (loaderOutputFiles.includes(name)) {
131 | await updateLoaderToRequireCompiledAssets(compilation, name, asset);
132 | } else if (isTargetExtension(name) && matches(name)) {
133 | await updateTargetWithCompiledCode(compilation, name, asset, this.options);
134 | }
135 |
136 | stats.timeEnd('took');
137 | stats.groupEnd('asset', name);
138 | }
139 |
140 | stats.timeEnd('process assets');
141 | });
142 |
143 | async function updateLoaderToRequireCompiledAssets(compilation: Compilation, name: string, asset: Source): Promise {
144 | logger.debug('updating loader to require compiled assets', { name });
145 |
146 | const source = await replaceSource(asset, raw => {
147 | logger.debug('initializing external target replacer');
148 | logger.debug({ outputPath: compiler.outputPath });
149 |
150 | for (let index = 0; index < targets.size; index++) {
151 | const target = Array.from(targets.values())[index];
152 | const fromLocation = loaderOutputFiles[index];
153 | const toLocation = targetOutputFiles[index];
154 |
155 | logger.debug('replacer', { name, target: { name: Array.from(targets.keys())[index], ...target }, fromLocation, toLocation });
156 |
157 | let to = relative(dirname(fromLocation), toLocation);
158 |
159 | if (!to.startsWith('.')) {
160 | to = toSiblingRelativeFileLocation(to);
161 | }
162 |
163 | // Use absolute path to load the compiled file in dev mode due to how electron-forge handles
164 | // the renderer process code loading (by using a server and not directly from the file system).
165 | // This should be safe exactly because it will only be used in dev mode, so the app code will
166 | // never be relocated after compiling with webpack and before starting electron.
167 | if (compiler.options.mode === 'development' && compiler.options.target === 'electron-renderer') {
168 | to = resolve(compiler.outputPath, toLocation);
169 | }
170 |
171 | for (const from of target.import) {
172 | raw = replaceImportPath(raw, name, from, to, {
173 | permutations: [
174 | normalizeCodePath,
175 | ],
176 | });
177 | }
178 | }
179 |
180 | logger.debug('initializing compiled target replacer');
181 |
182 | for (const file of targetOutputFiles) {
183 | raw = replaceImportPath(raw, name, file, fromTargetToCompiledExtension(file), {
184 | permutations: [
185 | normalizeCodePathForUnix,
186 | normalizeCodePathForWindows,
187 | ],
188 | });
189 | }
190 |
191 | return raw;
192 | });
193 |
194 | compilation.updateAsset(name, source);
195 |
196 | function replaceImportPath(raw: string, name: string, from: string, to: string, options?: { permutations?: Array<(path: string) => string> }): string {
197 | const { permutations = [(identity: string): string => identity] } = options ?? {};
198 |
199 | for (const transform of permutations) {
200 | const fromTransformed = `${transform(from)}"`;
201 | const toTransformed = `${transform(to)}"`;
202 |
203 | logger.debug('replacing within', name);
204 | logger.debug(' from:', fromTransformed);
205 | logger.debug(' to:', toTransformed);
206 |
207 | raw = replaceString(raw, fromTransformed, toTransformed);
208 | }
209 |
210 | return raw;
211 | }
212 | }
213 |
214 | });
215 | });
216 |
217 | async function updateTargetWithCompiledCode(compilation: Compilation, name: string, asset: Source, options: Options): Promise {
218 | logger.debug('compiling asset source', { name });
219 | const source = await compileSource(asset, options);
220 |
221 | logger.debug('updating asset source with the compiled content');
222 | compilation.updateAsset(name, source);
223 |
224 | const to = fromTargetToCompiledExtension(name);
225 |
226 | logger.debug(`renaming asset to ${to}`);
227 | compilation.renameAsset(name, to);
228 |
229 | if (options.keepSource) {
230 | logger.debug('re-emitting decompiled asset due to plugin.options.keepSource being true');
231 | compilation.emitAsset(name, asset);
232 | } else {
233 | logger.debug('NOT re-emitting decompiled asset due to plugin.options.keepSource being false');
234 | }
235 | }
236 | }
237 | }
238 |
239 | function collectOutputFiles(compilation: Compilation, from: PreparedEntry): string[] {
240 | const files = [];
241 |
242 | for (const name of from.keys()) {
243 | const entrypoint = compilation.entrypoints.get(name);
244 |
245 | if (entrypoint) {
246 | files.push(...entrypoint.chunks.flatMap(chunk => Array.from(chunk.files.values())));
247 | }
248 | }
249 |
250 | return files;
251 | }
252 |
253 | function prepare(compiler: Compiler): Prepared {
254 | const { entry, output } = compiler.options;
255 |
256 | if (typeof entry === 'function') {
257 | throw new Error('webpack.options.entry cannot be a function, use strings or objects');
258 | }
259 |
260 | if (typeof output.filename === 'string' && !/.*[[\]]+.*/.test(output.filename)) {
261 | throw new Error('webpack.options.output.filename cannot be static, use a dynamic one like [name].js');
262 | }
263 |
264 | const entries: PreparedEntries = {
265 | ignored: new Map(),
266 | loaders: new Map(),
267 | targets: new Map(),
268 | };
269 |
270 | const modules = new Map();
271 |
272 | for (const [name, descriptor] of Object.entries(entry)) {
273 | if (descriptor.filename) {
274 | throw new Error('webpack.options.entry.filename is not supported, use webpack.options.output.filename');
275 | }
276 |
277 | const imports = descriptor.import as string[];
278 |
279 | // adds a new entry with a .compiled suffix, pointing to the original imports, which will be compiled
280 | entries.targets.set(name + '.compiled', { ...descriptor, import: imports });
281 |
282 | // changes the original entry to use loader files, which will load the decompiler and the new compiled entries
283 | entries.loaders.set(name, { import: imports.map(file => toLoaderFileName(file)) });
284 |
285 | // generates virtual modules with the code of the loader files
286 | for (const file of imports) {
287 | const code = createLoaderCode({ imports: [toSiblingRelativeFileLocation(file)] });
288 | const location = toLoaderFileName(file);
289 |
290 | modules.set(location, code);
291 | }
292 | }
293 |
294 | return {
295 | entries,
296 | modules,
297 | };
298 | }
299 |
300 | function setupLifecycleLogging(compiler: Compiler, name: string, options: Options): void {
301 | if (!options.debugLifecycle) {
302 | return;
303 | }
304 |
305 | const logger = compiler.getInfrastructureLogger(`${name}/lifecycle`);
306 | setupHooksLogging(name, 'compiler', compiler.hooks as unknown as Record>);
307 |
308 | compiler.hooks.compilation.tap(name, compilation => {
309 | setupHooksLogging(name, 'compilation', compilation.hooks as unknown as Record>);
310 | });
311 |
312 | compiler.hooks.normalModuleFactory.tap(name, normalModuleFactory => {
313 | setupHooksLogging(name, 'normalModuleFactory', normalModuleFactory.hooks as unknown as Record>);
314 | });
315 |
316 | function setupHooksLogging(pluginName: string, type: string, hooks: Record>): void {
317 | const deprecatedHooks = [
318 | 'additionalChunkAssets',
319 | 'afterOptimizeChunkAssets',
320 | 'normalModuleLoader',
321 | 'optimizeChunkAssets',
322 | ];
323 |
324 | // avoid maximum call stack size exceeded
325 | const recursiveHooks = ['infrastructureLog', 'log'];
326 |
327 | for (const [name, hook] of Object.entries(hooks)) {
328 | try {
329 | if (deprecatedHooks.includes(name) || recursiveHooks.includes(name)) {
330 | return;
331 | }
332 |
333 | hook.tap(pluginName, () => {
334 | // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
335 | logger.debug(`${type} hook ${name} (${arguments.length} arguments)`);
336 | });
337 | } catch (_) {
338 | // ignore when unable to tap
339 | }
340 | }
341 | }
342 | }
343 |
344 | export {
345 | BytenodeWebpackPlugin,
346 | };
347 |
--------------------------------------------------------------------------------
/examples/webpack/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "webpack-example",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@discoveryjs/json-ext": {
8 | "version": "0.5.7",
9 | "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz",
10 | "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==",
11 | "dev": true
12 | },
13 | "@eslint/eslintrc": {
14 | "version": "2.0.0",
15 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.0.tgz",
16 | "integrity": "sha512-fluIaaV+GyV24CCu/ggiHdV+j4RNh85yQnAYS/G2mZODZgGmmlrgCydjUcV3YvxCm9x8nMAfThsqTni4KiXT4A==",
17 | "dev": true,
18 | "requires": {
19 | "ajv": "^6.12.4",
20 | "debug": "^4.3.2",
21 | "espree": "^9.4.0",
22 | "globals": "^13.19.0",
23 | "ignore": "^5.2.0",
24 | "import-fresh": "^3.2.1",
25 | "js-yaml": "^4.1.0",
26 | "minimatch": "^3.1.2",
27 | "strip-json-comments": "^3.1.1"
28 | }
29 | },
30 | "@eslint/js": {
31 | "version": "8.35.0",
32 | "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.35.0.tgz",
33 | "integrity": "sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==",
34 | "dev": true
35 | },
36 | "@herberttn/bytenode-webpack-plugin": {
37 | "version": "2.3.0",
38 | "resolved": "https://registry.npmjs.org/@herberttn/bytenode-webpack-plugin/-/bytenode-webpack-plugin-2.3.0.tgz",
39 | "integrity": "sha512-Y5PmN1j1Qrg+cEFPlaLXzEUe0BcqWiff7Yxcfu8pbee4xhIyFmv1R7LdOfPsC++YMrbmTbwhRM0cLDWk+Mhfbg==",
40 | "dev": true,
41 | "requires": {
42 | "bytenode": "^1.3.7",
43 | "picomatch": "^2.3.1",
44 | "replace-string": "^3.1.0",
45 | "shebang-regex": "^3.0.0",
46 | "slash": "^3.0.0",
47 | "webpack-virtual-modules": "^0.5.0"
48 | }
49 | },
50 | "@humanwhocodes/config-array": {
51 | "version": "0.11.8",
52 | "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
53 | "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==",
54 | "dev": true,
55 | "requires": {
56 | "@humanwhocodes/object-schema": "^1.2.1",
57 | "debug": "^4.1.1",
58 | "minimatch": "^3.0.5"
59 | }
60 | },
61 | "@humanwhocodes/module-importer": {
62 | "version": "1.0.1",
63 | "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
64 | "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
65 | "dev": true
66 | },
67 | "@humanwhocodes/object-schema": {
68 | "version": "1.2.1",
69 | "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
70 | "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
71 | "dev": true
72 | },
73 | "@jridgewell/gen-mapping": {
74 | "version": "0.3.2",
75 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz",
76 | "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==",
77 | "dev": true,
78 | "requires": {
79 | "@jridgewell/set-array": "^1.0.1",
80 | "@jridgewell/sourcemap-codec": "^1.4.10",
81 | "@jridgewell/trace-mapping": "^0.3.9"
82 | }
83 | },
84 | "@jridgewell/resolve-uri": {
85 | "version": "3.1.0",
86 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
87 | "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
88 | "dev": true
89 | },
90 | "@jridgewell/set-array": {
91 | "version": "1.1.2",
92 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
93 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
94 | "dev": true
95 | },
96 | "@jridgewell/source-map": {
97 | "version": "0.3.2",
98 | "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz",
99 | "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==",
100 | "dev": true,
101 | "requires": {
102 | "@jridgewell/gen-mapping": "^0.3.0",
103 | "@jridgewell/trace-mapping": "^0.3.9"
104 | }
105 | },
106 | "@jridgewell/sourcemap-codec": {
107 | "version": "1.4.14",
108 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
109 | "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
110 | "dev": true
111 | },
112 | "@jridgewell/trace-mapping": {
113 | "version": "0.3.17",
114 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz",
115 | "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==",
116 | "dev": true,
117 | "requires": {
118 | "@jridgewell/resolve-uri": "3.1.0",
119 | "@jridgewell/sourcemap-codec": "1.4.14"
120 | }
121 | },
122 | "@nodelib/fs.scandir": {
123 | "version": "2.1.5",
124 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
125 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
126 | "dev": true,
127 | "requires": {
128 | "@nodelib/fs.stat": "2.0.5",
129 | "run-parallel": "^1.1.9"
130 | }
131 | },
132 | "@nodelib/fs.stat": {
133 | "version": "2.0.5",
134 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
135 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
136 | "dev": true
137 | },
138 | "@nodelib/fs.walk": {
139 | "version": "1.2.8",
140 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
141 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
142 | "dev": true,
143 | "requires": {
144 | "@nodelib/fs.scandir": "2.1.5",
145 | "fastq": "^1.6.0"
146 | }
147 | },
148 | "@types/eslint": {
149 | "version": "8.21.1",
150 | "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.21.1.tgz",
151 | "integrity": "sha512-rc9K8ZpVjNcLs8Fp0dkozd5Pt2Apk1glO4Vgz8ix1u6yFByxfqo5Yavpy65o+93TAe24jr7v+eSBtFLvOQtCRQ==",
152 | "dev": true,
153 | "requires": {
154 | "@types/estree": "*",
155 | "@types/json-schema": "*"
156 | }
157 | },
158 | "@types/eslint-scope": {
159 | "version": "3.7.4",
160 | "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz",
161 | "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==",
162 | "dev": true,
163 | "requires": {
164 | "@types/eslint": "*",
165 | "@types/estree": "*"
166 | }
167 | },
168 | "@types/estree": {
169 | "version": "0.0.51",
170 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
171 | "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==",
172 | "dev": true
173 | },
174 | "@types/json-schema": {
175 | "version": "7.0.11",
176 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
177 | "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
178 | "dev": true
179 | },
180 | "@types/json5": {
181 | "version": "0.0.29",
182 | "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
183 | "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
184 | "dev": true
185 | },
186 | "@types/node": {
187 | "version": "18.14.2",
188 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.14.2.tgz",
189 | "integrity": "sha512-1uEQxww3DaghA0RxqHx0O0ppVlo43pJhepY51OxuQIKHpjbnYLA7vcdwioNPzIqmC2u3I/dmylcqjlh0e7AyUA==",
190 | "dev": true
191 | },
192 | "@webassemblyjs/ast": {
193 | "version": "1.11.1",
194 | "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
195 | "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==",
196 | "dev": true,
197 | "requires": {
198 | "@webassemblyjs/helper-numbers": "1.11.1",
199 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1"
200 | }
201 | },
202 | "@webassemblyjs/floating-point-hex-parser": {
203 | "version": "1.11.1",
204 | "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz",
205 | "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==",
206 | "dev": true
207 | },
208 | "@webassemblyjs/helper-api-error": {
209 | "version": "1.11.1",
210 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz",
211 | "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==",
212 | "dev": true
213 | },
214 | "@webassemblyjs/helper-buffer": {
215 | "version": "1.11.1",
216 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz",
217 | "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==",
218 | "dev": true
219 | },
220 | "@webassemblyjs/helper-numbers": {
221 | "version": "1.11.1",
222 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz",
223 | "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==",
224 | "dev": true,
225 | "requires": {
226 | "@webassemblyjs/floating-point-hex-parser": "1.11.1",
227 | "@webassemblyjs/helper-api-error": "1.11.1",
228 | "@xtuc/long": "4.2.2"
229 | }
230 | },
231 | "@webassemblyjs/helper-wasm-bytecode": {
232 | "version": "1.11.1",
233 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz",
234 | "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==",
235 | "dev": true
236 | },
237 | "@webassemblyjs/helper-wasm-section": {
238 | "version": "1.11.1",
239 | "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz",
240 | "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==",
241 | "dev": true,
242 | "requires": {
243 | "@webassemblyjs/ast": "1.11.1",
244 | "@webassemblyjs/helper-buffer": "1.11.1",
245 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
246 | "@webassemblyjs/wasm-gen": "1.11.1"
247 | }
248 | },
249 | "@webassemblyjs/ieee754": {
250 | "version": "1.11.1",
251 | "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz",
252 | "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==",
253 | "dev": true,
254 | "requires": {
255 | "@xtuc/ieee754": "^1.2.0"
256 | }
257 | },
258 | "@webassemblyjs/leb128": {
259 | "version": "1.11.1",
260 | "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz",
261 | "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==",
262 | "dev": true,
263 | "requires": {
264 | "@xtuc/long": "4.2.2"
265 | }
266 | },
267 | "@webassemblyjs/utf8": {
268 | "version": "1.11.1",
269 | "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz",
270 | "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==",
271 | "dev": true
272 | },
273 | "@webassemblyjs/wasm-edit": {
274 | "version": "1.11.1",
275 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz",
276 | "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==",
277 | "dev": true,
278 | "requires": {
279 | "@webassemblyjs/ast": "1.11.1",
280 | "@webassemblyjs/helper-buffer": "1.11.1",
281 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
282 | "@webassemblyjs/helper-wasm-section": "1.11.1",
283 | "@webassemblyjs/wasm-gen": "1.11.1",
284 | "@webassemblyjs/wasm-opt": "1.11.1",
285 | "@webassemblyjs/wasm-parser": "1.11.1",
286 | "@webassemblyjs/wast-printer": "1.11.1"
287 | }
288 | },
289 | "@webassemblyjs/wasm-gen": {
290 | "version": "1.11.1",
291 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz",
292 | "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==",
293 | "dev": true,
294 | "requires": {
295 | "@webassemblyjs/ast": "1.11.1",
296 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
297 | "@webassemblyjs/ieee754": "1.11.1",
298 | "@webassemblyjs/leb128": "1.11.1",
299 | "@webassemblyjs/utf8": "1.11.1"
300 | }
301 | },
302 | "@webassemblyjs/wasm-opt": {
303 | "version": "1.11.1",
304 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz",
305 | "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==",
306 | "dev": true,
307 | "requires": {
308 | "@webassemblyjs/ast": "1.11.1",
309 | "@webassemblyjs/helper-buffer": "1.11.1",
310 | "@webassemblyjs/wasm-gen": "1.11.1",
311 | "@webassemblyjs/wasm-parser": "1.11.1"
312 | }
313 | },
314 | "@webassemblyjs/wasm-parser": {
315 | "version": "1.11.1",
316 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz",
317 | "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==",
318 | "dev": true,
319 | "requires": {
320 | "@webassemblyjs/ast": "1.11.1",
321 | "@webassemblyjs/helper-api-error": "1.11.1",
322 | "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
323 | "@webassemblyjs/ieee754": "1.11.1",
324 | "@webassemblyjs/leb128": "1.11.1",
325 | "@webassemblyjs/utf8": "1.11.1"
326 | }
327 | },
328 | "@webassemblyjs/wast-printer": {
329 | "version": "1.11.1",
330 | "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz",
331 | "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==",
332 | "dev": true,
333 | "requires": {
334 | "@webassemblyjs/ast": "1.11.1",
335 | "@xtuc/long": "4.2.2"
336 | }
337 | },
338 | "@webpack-cli/configtest": {
339 | "version": "2.0.1",
340 | "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz",
341 | "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==",
342 | "dev": true
343 | },
344 | "@webpack-cli/info": {
345 | "version": "2.0.1",
346 | "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz",
347 | "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==",
348 | "dev": true
349 | },
350 | "@webpack-cli/serve": {
351 | "version": "2.0.1",
352 | "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz",
353 | "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==",
354 | "dev": true
355 | },
356 | "@xtuc/ieee754": {
357 | "version": "1.2.0",
358 | "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
359 | "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
360 | "dev": true
361 | },
362 | "@xtuc/long": {
363 | "version": "4.2.2",
364 | "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
365 | "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
366 | "dev": true
367 | },
368 | "acorn": {
369 | "version": "8.8.2",
370 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz",
371 | "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==",
372 | "dev": true
373 | },
374 | "acorn-import-assertions": {
375 | "version": "1.8.0",
376 | "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
377 | "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
378 | "dev": true
379 | },
380 | "acorn-jsx": {
381 | "version": "5.3.2",
382 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
383 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
384 | "dev": true
385 | },
386 | "ajv": {
387 | "version": "6.12.6",
388 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
389 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
390 | "dev": true,
391 | "requires": {
392 | "fast-deep-equal": "^3.1.1",
393 | "fast-json-stable-stringify": "^2.0.0",
394 | "json-schema-traverse": "^0.4.1",
395 | "uri-js": "^4.2.2"
396 | }
397 | },
398 | "ajv-keywords": {
399 | "version": "3.5.2",
400 | "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
401 | "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
402 | "dev": true
403 | },
404 | "ansi-regex": {
405 | "version": "5.0.1",
406 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
407 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
408 | "dev": true
409 | },
410 | "ansi-styles": {
411 | "version": "4.3.0",
412 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
413 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
414 | "dev": true,
415 | "requires": {
416 | "color-convert": "^2.0.1"
417 | }
418 | },
419 | "argparse": {
420 | "version": "2.0.1",
421 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
422 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
423 | "dev": true
424 | },
425 | "array-includes": {
426 | "version": "3.1.6",
427 | "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz",
428 | "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==",
429 | "dev": true,
430 | "requires": {
431 | "call-bind": "^1.0.2",
432 | "define-properties": "^1.1.4",
433 | "es-abstract": "^1.20.4",
434 | "get-intrinsic": "^1.1.3",
435 | "is-string": "^1.0.7"
436 | }
437 | },
438 | "array.prototype.flat": {
439 | "version": "1.3.1",
440 | "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz",
441 | "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==",
442 | "dev": true,
443 | "requires": {
444 | "call-bind": "^1.0.2",
445 | "define-properties": "^1.1.4",
446 | "es-abstract": "^1.20.4",
447 | "es-shim-unscopables": "^1.0.0"
448 | }
449 | },
450 | "array.prototype.flatmap": {
451 | "version": "1.3.1",
452 | "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz",
453 | "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==",
454 | "dev": true,
455 | "requires": {
456 | "call-bind": "^1.0.2",
457 | "define-properties": "^1.1.4",
458 | "es-abstract": "^1.20.4",
459 | "es-shim-unscopables": "^1.0.0"
460 | }
461 | },
462 | "available-typed-arrays": {
463 | "version": "1.0.5",
464 | "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
465 | "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
466 | "dev": true
467 | },
468 | "balanced-match": {
469 | "version": "1.0.2",
470 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
471 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
472 | "dev": true
473 | },
474 | "brace-expansion": {
475 | "version": "1.1.11",
476 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
477 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
478 | "dev": true,
479 | "requires": {
480 | "balanced-match": "^1.0.0",
481 | "concat-map": "0.0.1"
482 | }
483 | },
484 | "browserslist": {
485 | "version": "4.21.5",
486 | "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz",
487 | "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==",
488 | "dev": true,
489 | "requires": {
490 | "caniuse-lite": "^1.0.30001449",
491 | "electron-to-chromium": "^1.4.284",
492 | "node-releases": "^2.0.8",
493 | "update-browserslist-db": "^1.0.10"
494 | }
495 | },
496 | "buffer-from": {
497 | "version": "1.1.2",
498 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
499 | "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
500 | "dev": true
501 | },
502 | "bytenode": {
503 | "version": "1.3.7",
504 | "resolved": "https://registry.npmjs.org/bytenode/-/bytenode-1.3.7.tgz",
505 | "integrity": "sha512-TKvemYL2VJQIBE095FIYudjTsLagVBLpKXIYj+MaDUgzhdNL74SM1bizcXgwQs51mnXyO38tlqusDZqY8/XdTQ==",
506 | "dev": true
507 | },
508 | "call-bind": {
509 | "version": "1.0.2",
510 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
511 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
512 | "dev": true,
513 | "requires": {
514 | "function-bind": "^1.1.1",
515 | "get-intrinsic": "^1.0.2"
516 | }
517 | },
518 | "callsites": {
519 | "version": "3.1.0",
520 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
521 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
522 | "dev": true
523 | },
524 | "caniuse-lite": {
525 | "version": "1.0.30001458",
526 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz",
527 | "integrity": "sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w==",
528 | "dev": true
529 | },
530 | "chalk": {
531 | "version": "4.1.2",
532 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
533 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
534 | "dev": true,
535 | "requires": {
536 | "ansi-styles": "^4.1.0",
537 | "supports-color": "^7.1.0"
538 | }
539 | },
540 | "chrome-trace-event": {
541 | "version": "1.0.3",
542 | "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
543 | "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
544 | "dev": true
545 | },
546 | "clone-deep": {
547 | "version": "4.0.1",
548 | "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
549 | "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
550 | "dev": true,
551 | "requires": {
552 | "is-plain-object": "^2.0.4",
553 | "kind-of": "^6.0.2",
554 | "shallow-clone": "^3.0.0"
555 | }
556 | },
557 | "color-convert": {
558 | "version": "2.0.1",
559 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
560 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
561 | "dev": true,
562 | "requires": {
563 | "color-name": "~1.1.4"
564 | }
565 | },
566 | "color-name": {
567 | "version": "1.1.4",
568 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
569 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
570 | "dev": true
571 | },
572 | "colorette": {
573 | "version": "2.0.19",
574 | "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz",
575 | "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==",
576 | "dev": true
577 | },
578 | "commander": {
579 | "version": "2.20.3",
580 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
581 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
582 | "dev": true
583 | },
584 | "concat-map": {
585 | "version": "0.0.1",
586 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
587 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
588 | "dev": true
589 | },
590 | "cross-spawn": {
591 | "version": "7.0.3",
592 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
593 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
594 | "dev": true,
595 | "requires": {
596 | "path-key": "^3.1.0",
597 | "shebang-command": "^2.0.0",
598 | "which": "^2.0.1"
599 | }
600 | },
601 | "debug": {
602 | "version": "4.3.4",
603 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
604 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
605 | "dev": true,
606 | "requires": {
607 | "ms": "2.1.2"
608 | }
609 | },
610 | "deep-is": {
611 | "version": "0.1.4",
612 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
613 | "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
614 | "dev": true
615 | },
616 | "define-properties": {
617 | "version": "1.2.0",
618 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz",
619 | "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==",
620 | "dev": true,
621 | "requires": {
622 | "has-property-descriptors": "^1.0.0",
623 | "object-keys": "^1.1.1"
624 | }
625 | },
626 | "doctrine": {
627 | "version": "3.0.0",
628 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
629 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
630 | "dev": true,
631 | "requires": {
632 | "esutils": "^2.0.2"
633 | }
634 | },
635 | "electron-to-chromium": {
636 | "version": "1.4.311",
637 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.311.tgz",
638 | "integrity": "sha512-RoDlZufvrtr2Nx3Yx5MB8jX3aHIxm8nRWPJm3yVvyHmyKaRvn90RjzB6hNnt0AkhS3IInJdyRfQb4mWhPvUjVw==",
639 | "dev": true
640 | },
641 | "enhanced-resolve": {
642 | "version": "5.12.0",
643 | "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz",
644 | "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==",
645 | "dev": true,
646 | "requires": {
647 | "graceful-fs": "^4.2.4",
648 | "tapable": "^2.2.0"
649 | }
650 | },
651 | "envinfo": {
652 | "version": "7.8.1",
653 | "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz",
654 | "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==",
655 | "dev": true
656 | },
657 | "es-abstract": {
658 | "version": "1.21.1",
659 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz",
660 | "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==",
661 | "dev": true,
662 | "requires": {
663 | "available-typed-arrays": "^1.0.5",
664 | "call-bind": "^1.0.2",
665 | "es-set-tostringtag": "^2.0.1",
666 | "es-to-primitive": "^1.2.1",
667 | "function-bind": "^1.1.1",
668 | "function.prototype.name": "^1.1.5",
669 | "get-intrinsic": "^1.1.3",
670 | "get-symbol-description": "^1.0.0",
671 | "globalthis": "^1.0.3",
672 | "gopd": "^1.0.1",
673 | "has": "^1.0.3",
674 | "has-property-descriptors": "^1.0.0",
675 | "has-proto": "^1.0.1",
676 | "has-symbols": "^1.0.3",
677 | "internal-slot": "^1.0.4",
678 | "is-array-buffer": "^3.0.1",
679 | "is-callable": "^1.2.7",
680 | "is-negative-zero": "^2.0.2",
681 | "is-regex": "^1.1.4",
682 | "is-shared-array-buffer": "^1.0.2",
683 | "is-string": "^1.0.7",
684 | "is-typed-array": "^1.1.10",
685 | "is-weakref": "^1.0.2",
686 | "object-inspect": "^1.12.2",
687 | "object-keys": "^1.1.1",
688 | "object.assign": "^4.1.4",
689 | "regexp.prototype.flags": "^1.4.3",
690 | "safe-regex-test": "^1.0.0",
691 | "string.prototype.trimend": "^1.0.6",
692 | "string.prototype.trimstart": "^1.0.6",
693 | "typed-array-length": "^1.0.4",
694 | "unbox-primitive": "^1.0.2",
695 | "which-typed-array": "^1.1.9"
696 | }
697 | },
698 | "es-module-lexer": {
699 | "version": "0.9.3",
700 | "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
701 | "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==",
702 | "dev": true
703 | },
704 | "es-set-tostringtag": {
705 | "version": "2.0.1",
706 | "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz",
707 | "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==",
708 | "dev": true,
709 | "requires": {
710 | "get-intrinsic": "^1.1.3",
711 | "has": "^1.0.3",
712 | "has-tostringtag": "^1.0.0"
713 | }
714 | },
715 | "es-shim-unscopables": {
716 | "version": "1.0.0",
717 | "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz",
718 | "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==",
719 | "dev": true,
720 | "requires": {
721 | "has": "^1.0.3"
722 | }
723 | },
724 | "es-to-primitive": {
725 | "version": "1.2.1",
726 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
727 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
728 | "dev": true,
729 | "requires": {
730 | "is-callable": "^1.1.4",
731 | "is-date-object": "^1.0.1",
732 | "is-symbol": "^1.0.2"
733 | }
734 | },
735 | "escalade": {
736 | "version": "3.1.1",
737 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
738 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
739 | "dev": true
740 | },
741 | "escape-string-regexp": {
742 | "version": "4.0.0",
743 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
744 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
745 | "dev": true
746 | },
747 | "eslint": {
748 | "version": "8.35.0",
749 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.35.0.tgz",
750 | "integrity": "sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==",
751 | "dev": true,
752 | "requires": {
753 | "@eslint/eslintrc": "^2.0.0",
754 | "@eslint/js": "8.35.0",
755 | "@humanwhocodes/config-array": "^0.11.8",
756 | "@humanwhocodes/module-importer": "^1.0.1",
757 | "@nodelib/fs.walk": "^1.2.8",
758 | "ajv": "^6.10.0",
759 | "chalk": "^4.0.0",
760 | "cross-spawn": "^7.0.2",
761 | "debug": "^4.3.2",
762 | "doctrine": "^3.0.0",
763 | "escape-string-regexp": "^4.0.0",
764 | "eslint-scope": "^7.1.1",
765 | "eslint-utils": "^3.0.0",
766 | "eslint-visitor-keys": "^3.3.0",
767 | "espree": "^9.4.0",
768 | "esquery": "^1.4.2",
769 | "esutils": "^2.0.2",
770 | "fast-deep-equal": "^3.1.3",
771 | "file-entry-cache": "^6.0.1",
772 | "find-up": "^5.0.0",
773 | "glob-parent": "^6.0.2",
774 | "globals": "^13.19.0",
775 | "grapheme-splitter": "^1.0.4",
776 | "ignore": "^5.2.0",
777 | "import-fresh": "^3.0.0",
778 | "imurmurhash": "^0.1.4",
779 | "is-glob": "^4.0.0",
780 | "is-path-inside": "^3.0.3",
781 | "js-sdsl": "^4.1.4",
782 | "js-yaml": "^4.1.0",
783 | "json-stable-stringify-without-jsonify": "^1.0.1",
784 | "levn": "^0.4.1",
785 | "lodash.merge": "^4.6.2",
786 | "minimatch": "^3.1.2",
787 | "natural-compare": "^1.4.0",
788 | "optionator": "^0.9.1",
789 | "regexpp": "^3.2.0",
790 | "strip-ansi": "^6.0.1",
791 | "strip-json-comments": "^3.1.0",
792 | "text-table": "^0.2.0"
793 | }
794 | },
795 | "eslint-import-resolver-node": {
796 | "version": "0.3.7",
797 | "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz",
798 | "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==",
799 | "dev": true,
800 | "requires": {
801 | "debug": "^3.2.7",
802 | "is-core-module": "^2.11.0",
803 | "resolve": "^1.22.1"
804 | },
805 | "dependencies": {
806 | "debug": {
807 | "version": "3.2.7",
808 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
809 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
810 | "dev": true,
811 | "requires": {
812 | "ms": "^2.1.1"
813 | }
814 | }
815 | }
816 | },
817 | "eslint-module-utils": {
818 | "version": "2.7.4",
819 | "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz",
820 | "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==",
821 | "dev": true,
822 | "requires": {
823 | "debug": "^3.2.7"
824 | },
825 | "dependencies": {
826 | "debug": {
827 | "version": "3.2.7",
828 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
829 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
830 | "dev": true,
831 | "requires": {
832 | "ms": "^2.1.1"
833 | }
834 | }
835 | }
836 | },
837 | "eslint-plugin-import": {
838 | "version": "2.27.5",
839 | "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz",
840 | "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==",
841 | "dev": true,
842 | "requires": {
843 | "array-includes": "^3.1.6",
844 | "array.prototype.flat": "^1.3.1",
845 | "array.prototype.flatmap": "^1.3.1",
846 | "debug": "^3.2.7",
847 | "doctrine": "^2.1.0",
848 | "eslint-import-resolver-node": "^0.3.7",
849 | "eslint-module-utils": "^2.7.4",
850 | "has": "^1.0.3",
851 | "is-core-module": "^2.11.0",
852 | "is-glob": "^4.0.3",
853 | "minimatch": "^3.1.2",
854 | "object.values": "^1.1.6",
855 | "resolve": "^1.22.1",
856 | "semver": "^6.3.0",
857 | "tsconfig-paths": "^3.14.1"
858 | },
859 | "dependencies": {
860 | "debug": {
861 | "version": "3.2.7",
862 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
863 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
864 | "dev": true,
865 | "requires": {
866 | "ms": "^2.1.1"
867 | }
868 | },
869 | "doctrine": {
870 | "version": "2.1.0",
871 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
872 | "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
873 | "dev": true,
874 | "requires": {
875 | "esutils": "^2.0.2"
876 | }
877 | }
878 | }
879 | },
880 | "eslint-scope": {
881 | "version": "7.1.1",
882 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
883 | "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
884 | "dev": true,
885 | "requires": {
886 | "esrecurse": "^4.3.0",
887 | "estraverse": "^5.2.0"
888 | }
889 | },
890 | "eslint-utils": {
891 | "version": "3.0.0",
892 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
893 | "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
894 | "dev": true,
895 | "requires": {
896 | "eslint-visitor-keys": "^2.0.0"
897 | },
898 | "dependencies": {
899 | "eslint-visitor-keys": {
900 | "version": "2.1.0",
901 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
902 | "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
903 | "dev": true
904 | }
905 | }
906 | },
907 | "eslint-visitor-keys": {
908 | "version": "3.3.0",
909 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
910 | "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
911 | "dev": true
912 | },
913 | "espree": {
914 | "version": "9.4.1",
915 | "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz",
916 | "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==",
917 | "dev": true,
918 | "requires": {
919 | "acorn": "^8.8.0",
920 | "acorn-jsx": "^5.3.2",
921 | "eslint-visitor-keys": "^3.3.0"
922 | }
923 | },
924 | "esquery": {
925 | "version": "1.4.2",
926 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.2.tgz",
927 | "integrity": "sha512-JVSoLdTlTDkmjFmab7H/9SL9qGSyjElT3myyKp7krqjVFQCDLmj1QFaCLRFBszBKI0XVZaiiXvuPIX3ZwHe1Ng==",
928 | "dev": true,
929 | "requires": {
930 | "estraverse": "^5.1.0"
931 | }
932 | },
933 | "esrecurse": {
934 | "version": "4.3.0",
935 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
936 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
937 | "dev": true,
938 | "requires": {
939 | "estraverse": "^5.2.0"
940 | }
941 | },
942 | "estraverse": {
943 | "version": "5.3.0",
944 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
945 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
946 | "dev": true
947 | },
948 | "esutils": {
949 | "version": "2.0.3",
950 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
951 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
952 | "dev": true
953 | },
954 | "events": {
955 | "version": "3.3.0",
956 | "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
957 | "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
958 | "dev": true
959 | },
960 | "fast-deep-equal": {
961 | "version": "3.1.3",
962 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
963 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
964 | "dev": true
965 | },
966 | "fast-json-stable-stringify": {
967 | "version": "2.1.0",
968 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
969 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
970 | "dev": true
971 | },
972 | "fast-levenshtein": {
973 | "version": "2.0.6",
974 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
975 | "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
976 | "dev": true
977 | },
978 | "fastest-levenshtein": {
979 | "version": "1.0.16",
980 | "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
981 | "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==",
982 | "dev": true
983 | },
984 | "fastq": {
985 | "version": "1.15.0",
986 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
987 | "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
988 | "dev": true,
989 | "requires": {
990 | "reusify": "^1.0.4"
991 | }
992 | },
993 | "file-entry-cache": {
994 | "version": "6.0.1",
995 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
996 | "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
997 | "dev": true,
998 | "requires": {
999 | "flat-cache": "^3.0.4"
1000 | }
1001 | },
1002 | "find-up": {
1003 | "version": "5.0.0",
1004 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
1005 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
1006 | "dev": true,
1007 | "requires": {
1008 | "locate-path": "^6.0.0",
1009 | "path-exists": "^4.0.0"
1010 | }
1011 | },
1012 | "flat-cache": {
1013 | "version": "3.0.4",
1014 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
1015 | "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
1016 | "dev": true,
1017 | "requires": {
1018 | "flatted": "^3.1.0",
1019 | "rimraf": "^3.0.2"
1020 | },
1021 | "dependencies": {
1022 | "rimraf": {
1023 | "version": "3.0.2",
1024 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
1025 | "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
1026 | "dev": true,
1027 | "requires": {
1028 | "glob": "^7.1.3"
1029 | }
1030 | }
1031 | }
1032 | },
1033 | "flatted": {
1034 | "version": "3.2.7",
1035 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz",
1036 | "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
1037 | "dev": true
1038 | },
1039 | "for-each": {
1040 | "version": "0.3.3",
1041 | "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
1042 | "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
1043 | "dev": true,
1044 | "requires": {
1045 | "is-callable": "^1.1.3"
1046 | }
1047 | },
1048 | "fs.realpath": {
1049 | "version": "1.0.0",
1050 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1051 | "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
1052 | "dev": true
1053 | },
1054 | "function-bind": {
1055 | "version": "1.1.1",
1056 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
1057 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
1058 | "dev": true
1059 | },
1060 | "function.prototype.name": {
1061 | "version": "1.1.5",
1062 | "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz",
1063 | "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==",
1064 | "dev": true,
1065 | "requires": {
1066 | "call-bind": "^1.0.2",
1067 | "define-properties": "^1.1.3",
1068 | "es-abstract": "^1.19.0",
1069 | "functions-have-names": "^1.2.2"
1070 | }
1071 | },
1072 | "functions-have-names": {
1073 | "version": "1.2.3",
1074 | "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
1075 | "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
1076 | "dev": true
1077 | },
1078 | "get-intrinsic": {
1079 | "version": "1.2.0",
1080 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
1081 | "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
1082 | "dev": true,
1083 | "requires": {
1084 | "function-bind": "^1.1.1",
1085 | "has": "^1.0.3",
1086 | "has-symbols": "^1.0.3"
1087 | }
1088 | },
1089 | "get-symbol-description": {
1090 | "version": "1.0.0",
1091 | "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
1092 | "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==",
1093 | "dev": true,
1094 | "requires": {
1095 | "call-bind": "^1.0.2",
1096 | "get-intrinsic": "^1.1.1"
1097 | }
1098 | },
1099 | "glob": {
1100 | "version": "7.2.3",
1101 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
1102 | "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
1103 | "dev": true,
1104 | "requires": {
1105 | "fs.realpath": "^1.0.0",
1106 | "inflight": "^1.0.4",
1107 | "inherits": "2",
1108 | "minimatch": "^3.1.1",
1109 | "once": "^1.3.0",
1110 | "path-is-absolute": "^1.0.0"
1111 | }
1112 | },
1113 | "glob-parent": {
1114 | "version": "6.0.2",
1115 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
1116 | "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
1117 | "dev": true,
1118 | "requires": {
1119 | "is-glob": "^4.0.3"
1120 | }
1121 | },
1122 | "glob-to-regexp": {
1123 | "version": "0.4.1",
1124 | "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
1125 | "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
1126 | "dev": true
1127 | },
1128 | "globals": {
1129 | "version": "13.20.0",
1130 | "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
1131 | "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
1132 | "dev": true,
1133 | "requires": {
1134 | "type-fest": "^0.20.2"
1135 | }
1136 | },
1137 | "globalthis": {
1138 | "version": "1.0.3",
1139 | "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
1140 | "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
1141 | "dev": true,
1142 | "requires": {
1143 | "define-properties": "^1.1.3"
1144 | }
1145 | },
1146 | "gopd": {
1147 | "version": "1.0.1",
1148 | "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
1149 | "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
1150 | "dev": true,
1151 | "requires": {
1152 | "get-intrinsic": "^1.1.3"
1153 | }
1154 | },
1155 | "graceful-fs": {
1156 | "version": "4.2.10",
1157 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
1158 | "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
1159 | "dev": true
1160 | },
1161 | "grapheme-splitter": {
1162 | "version": "1.0.4",
1163 | "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
1164 | "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
1165 | "dev": true
1166 | },
1167 | "has": {
1168 | "version": "1.0.3",
1169 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
1170 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
1171 | "dev": true,
1172 | "requires": {
1173 | "function-bind": "^1.1.1"
1174 | }
1175 | },
1176 | "has-bigints": {
1177 | "version": "1.0.2",
1178 | "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
1179 | "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
1180 | "dev": true
1181 | },
1182 | "has-flag": {
1183 | "version": "4.0.0",
1184 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
1185 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
1186 | "dev": true
1187 | },
1188 | "has-property-descriptors": {
1189 | "version": "1.0.0",
1190 | "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
1191 | "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
1192 | "dev": true,
1193 | "requires": {
1194 | "get-intrinsic": "^1.1.1"
1195 | }
1196 | },
1197 | "has-proto": {
1198 | "version": "1.0.1",
1199 | "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
1200 | "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
1201 | "dev": true
1202 | },
1203 | "has-symbols": {
1204 | "version": "1.0.3",
1205 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
1206 | "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
1207 | "dev": true
1208 | },
1209 | "has-tostringtag": {
1210 | "version": "1.0.0",
1211 | "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
1212 | "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
1213 | "dev": true,
1214 | "requires": {
1215 | "has-symbols": "^1.0.2"
1216 | }
1217 | },
1218 | "ignore": {
1219 | "version": "5.2.4",
1220 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
1221 | "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
1222 | "dev": true
1223 | },
1224 | "import-fresh": {
1225 | "version": "3.3.0",
1226 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
1227 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
1228 | "dev": true,
1229 | "requires": {
1230 | "parent-module": "^1.0.0",
1231 | "resolve-from": "^4.0.0"
1232 | }
1233 | },
1234 | "import-local": {
1235 | "version": "3.1.0",
1236 | "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
1237 | "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
1238 | "dev": true,
1239 | "requires": {
1240 | "pkg-dir": "^4.2.0",
1241 | "resolve-cwd": "^3.0.0"
1242 | }
1243 | },
1244 | "imurmurhash": {
1245 | "version": "0.1.4",
1246 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
1247 | "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
1248 | "dev": true
1249 | },
1250 | "inflight": {
1251 | "version": "1.0.6",
1252 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1253 | "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
1254 | "dev": true,
1255 | "requires": {
1256 | "once": "^1.3.0",
1257 | "wrappy": "1"
1258 | }
1259 | },
1260 | "inherits": {
1261 | "version": "2.0.4",
1262 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
1263 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
1264 | "dev": true
1265 | },
1266 | "internal-slot": {
1267 | "version": "1.0.5",
1268 | "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",
1269 | "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==",
1270 | "dev": true,
1271 | "requires": {
1272 | "get-intrinsic": "^1.2.0",
1273 | "has": "^1.0.3",
1274 | "side-channel": "^1.0.4"
1275 | }
1276 | },
1277 | "interpret": {
1278 | "version": "3.1.1",
1279 | "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz",
1280 | "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==",
1281 | "dev": true
1282 | },
1283 | "is-array-buffer": {
1284 | "version": "3.0.1",
1285 | "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz",
1286 | "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==",
1287 | "dev": true,
1288 | "requires": {
1289 | "call-bind": "^1.0.2",
1290 | "get-intrinsic": "^1.1.3",
1291 | "is-typed-array": "^1.1.10"
1292 | }
1293 | },
1294 | "is-bigint": {
1295 | "version": "1.0.4",
1296 | "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
1297 | "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
1298 | "dev": true,
1299 | "requires": {
1300 | "has-bigints": "^1.0.1"
1301 | }
1302 | },
1303 | "is-boolean-object": {
1304 | "version": "1.1.2",
1305 | "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
1306 | "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
1307 | "dev": true,
1308 | "requires": {
1309 | "call-bind": "^1.0.2",
1310 | "has-tostringtag": "^1.0.0"
1311 | }
1312 | },
1313 | "is-callable": {
1314 | "version": "1.2.7",
1315 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
1316 | "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
1317 | "dev": true
1318 | },
1319 | "is-core-module": {
1320 | "version": "2.11.0",
1321 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
1322 | "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
1323 | "dev": true,
1324 | "requires": {
1325 | "has": "^1.0.3"
1326 | }
1327 | },
1328 | "is-date-object": {
1329 | "version": "1.0.5",
1330 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
1331 | "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
1332 | "dev": true,
1333 | "requires": {
1334 | "has-tostringtag": "^1.0.0"
1335 | }
1336 | },
1337 | "is-extglob": {
1338 | "version": "2.1.1",
1339 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
1340 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
1341 | "dev": true
1342 | },
1343 | "is-glob": {
1344 | "version": "4.0.3",
1345 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
1346 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
1347 | "dev": true,
1348 | "requires": {
1349 | "is-extglob": "^2.1.1"
1350 | }
1351 | },
1352 | "is-negative-zero": {
1353 | "version": "2.0.2",
1354 | "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
1355 | "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==",
1356 | "dev": true
1357 | },
1358 | "is-number-object": {
1359 | "version": "1.0.7",
1360 | "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
1361 | "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
1362 | "dev": true,
1363 | "requires": {
1364 | "has-tostringtag": "^1.0.0"
1365 | }
1366 | },
1367 | "is-path-inside": {
1368 | "version": "3.0.3",
1369 | "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
1370 | "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
1371 | "dev": true
1372 | },
1373 | "is-plain-object": {
1374 | "version": "2.0.4",
1375 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
1376 | "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
1377 | "dev": true,
1378 | "requires": {
1379 | "isobject": "^3.0.1"
1380 | }
1381 | },
1382 | "is-regex": {
1383 | "version": "1.1.4",
1384 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
1385 | "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
1386 | "dev": true,
1387 | "requires": {
1388 | "call-bind": "^1.0.2",
1389 | "has-tostringtag": "^1.0.0"
1390 | }
1391 | },
1392 | "is-shared-array-buffer": {
1393 | "version": "1.0.2",
1394 | "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz",
1395 | "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==",
1396 | "dev": true,
1397 | "requires": {
1398 | "call-bind": "^1.0.2"
1399 | }
1400 | },
1401 | "is-string": {
1402 | "version": "1.0.7",
1403 | "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
1404 | "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
1405 | "dev": true,
1406 | "requires": {
1407 | "has-tostringtag": "^1.0.0"
1408 | }
1409 | },
1410 | "is-symbol": {
1411 | "version": "1.0.4",
1412 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
1413 | "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
1414 | "dev": true,
1415 | "requires": {
1416 | "has-symbols": "^1.0.2"
1417 | }
1418 | },
1419 | "is-typed-array": {
1420 | "version": "1.1.10",
1421 | "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz",
1422 | "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==",
1423 | "dev": true,
1424 | "requires": {
1425 | "available-typed-arrays": "^1.0.5",
1426 | "call-bind": "^1.0.2",
1427 | "for-each": "^0.3.3",
1428 | "gopd": "^1.0.1",
1429 | "has-tostringtag": "^1.0.0"
1430 | }
1431 | },
1432 | "is-weakref": {
1433 | "version": "1.0.2",
1434 | "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
1435 | "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
1436 | "dev": true,
1437 | "requires": {
1438 | "call-bind": "^1.0.2"
1439 | }
1440 | },
1441 | "isexe": {
1442 | "version": "2.0.0",
1443 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
1444 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
1445 | "dev": true
1446 | },
1447 | "isobject": {
1448 | "version": "3.0.1",
1449 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
1450 | "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",
1451 | "dev": true
1452 | },
1453 | "jest-worker": {
1454 | "version": "27.5.1",
1455 | "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
1456 | "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
1457 | "dev": true,
1458 | "requires": {
1459 | "@types/node": "*",
1460 | "merge-stream": "^2.0.0",
1461 | "supports-color": "^8.0.0"
1462 | },
1463 | "dependencies": {
1464 | "supports-color": {
1465 | "version": "8.1.1",
1466 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
1467 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
1468 | "dev": true,
1469 | "requires": {
1470 | "has-flag": "^4.0.0"
1471 | }
1472 | }
1473 | }
1474 | },
1475 | "js-sdsl": {
1476 | "version": "4.3.0",
1477 | "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz",
1478 | "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
1479 | "dev": true
1480 | },
1481 | "js-yaml": {
1482 | "version": "4.1.0",
1483 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
1484 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
1485 | "dev": true,
1486 | "requires": {
1487 | "argparse": "^2.0.1"
1488 | }
1489 | },
1490 | "json-parse-even-better-errors": {
1491 | "version": "2.3.1",
1492 | "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
1493 | "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
1494 | "dev": true
1495 | },
1496 | "json-schema-traverse": {
1497 | "version": "0.4.1",
1498 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
1499 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
1500 | "dev": true
1501 | },
1502 | "json-stable-stringify-without-jsonify": {
1503 | "version": "1.0.1",
1504 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
1505 | "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
1506 | "dev": true
1507 | },
1508 | "json5": {
1509 | "version": "1.0.2",
1510 | "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
1511 | "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
1512 | "dev": true,
1513 | "requires": {
1514 | "minimist": "^1.2.0"
1515 | }
1516 | },
1517 | "kind-of": {
1518 | "version": "6.0.3",
1519 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
1520 | "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
1521 | "dev": true
1522 | },
1523 | "levn": {
1524 | "version": "0.4.1",
1525 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
1526 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
1527 | "dev": true,
1528 | "requires": {
1529 | "prelude-ls": "^1.2.1",
1530 | "type-check": "~0.4.0"
1531 | }
1532 | },
1533 | "loader-runner": {
1534 | "version": "4.3.0",
1535 | "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",
1536 | "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
1537 | "dev": true
1538 | },
1539 | "locate-path": {
1540 | "version": "6.0.0",
1541 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
1542 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
1543 | "dev": true,
1544 | "requires": {
1545 | "p-locate": "^5.0.0"
1546 | }
1547 | },
1548 | "lodash.merge": {
1549 | "version": "4.6.2",
1550 | "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
1551 | "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
1552 | "dev": true
1553 | },
1554 | "merge-stream": {
1555 | "version": "2.0.0",
1556 | "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
1557 | "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
1558 | "dev": true
1559 | },
1560 | "mime-db": {
1561 | "version": "1.52.0",
1562 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
1563 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
1564 | "dev": true
1565 | },
1566 | "mime-types": {
1567 | "version": "2.1.35",
1568 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
1569 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
1570 | "dev": true,
1571 | "requires": {
1572 | "mime-db": "1.52.0"
1573 | }
1574 | },
1575 | "minimatch": {
1576 | "version": "3.1.2",
1577 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
1578 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
1579 | "dev": true,
1580 | "requires": {
1581 | "brace-expansion": "^1.1.7"
1582 | }
1583 | },
1584 | "minimist": {
1585 | "version": "1.2.8",
1586 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
1587 | "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
1588 | "dev": true
1589 | },
1590 | "ms": {
1591 | "version": "2.1.2",
1592 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
1593 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
1594 | "dev": true
1595 | },
1596 | "natural-compare": {
1597 | "version": "1.4.0",
1598 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
1599 | "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
1600 | "dev": true
1601 | },
1602 | "neo-async": {
1603 | "version": "2.6.2",
1604 | "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
1605 | "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
1606 | "dev": true
1607 | },
1608 | "node-releases": {
1609 | "version": "2.0.10",
1610 | "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz",
1611 | "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==",
1612 | "dev": true
1613 | },
1614 | "object-inspect": {
1615 | "version": "1.12.3",
1616 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
1617 | "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==",
1618 | "dev": true
1619 | },
1620 | "object-keys": {
1621 | "version": "1.1.1",
1622 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
1623 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
1624 | "dev": true
1625 | },
1626 | "object.assign": {
1627 | "version": "4.1.4",
1628 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz",
1629 | "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==",
1630 | "dev": true,
1631 | "requires": {
1632 | "call-bind": "^1.0.2",
1633 | "define-properties": "^1.1.4",
1634 | "has-symbols": "^1.0.3",
1635 | "object-keys": "^1.1.1"
1636 | }
1637 | },
1638 | "object.values": {
1639 | "version": "1.1.6",
1640 | "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz",
1641 | "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==",
1642 | "dev": true,
1643 | "requires": {
1644 | "call-bind": "^1.0.2",
1645 | "define-properties": "^1.1.4",
1646 | "es-abstract": "^1.20.4"
1647 | }
1648 | },
1649 | "once": {
1650 | "version": "1.4.0",
1651 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1652 | "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
1653 | "dev": true,
1654 | "requires": {
1655 | "wrappy": "1"
1656 | }
1657 | },
1658 | "optionator": {
1659 | "version": "0.9.1",
1660 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
1661 | "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
1662 | "dev": true,
1663 | "requires": {
1664 | "deep-is": "^0.1.3",
1665 | "fast-levenshtein": "^2.0.6",
1666 | "levn": "^0.4.1",
1667 | "prelude-ls": "^1.2.1",
1668 | "type-check": "^0.4.0",
1669 | "word-wrap": "^1.2.3"
1670 | }
1671 | },
1672 | "p-limit": {
1673 | "version": "3.1.0",
1674 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
1675 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
1676 | "dev": true,
1677 | "requires": {
1678 | "yocto-queue": "^0.1.0"
1679 | }
1680 | },
1681 | "p-locate": {
1682 | "version": "5.0.0",
1683 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
1684 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
1685 | "dev": true,
1686 | "requires": {
1687 | "p-limit": "^3.0.2"
1688 | }
1689 | },
1690 | "p-try": {
1691 | "version": "2.2.0",
1692 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
1693 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
1694 | "dev": true
1695 | },
1696 | "parent-module": {
1697 | "version": "1.0.1",
1698 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
1699 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
1700 | "dev": true,
1701 | "requires": {
1702 | "callsites": "^3.0.0"
1703 | }
1704 | },
1705 | "path-exists": {
1706 | "version": "4.0.0",
1707 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
1708 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
1709 | "dev": true
1710 | },
1711 | "path-is-absolute": {
1712 | "version": "1.0.1",
1713 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
1714 | "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
1715 | "dev": true
1716 | },
1717 | "path-key": {
1718 | "version": "3.1.1",
1719 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
1720 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
1721 | "dev": true
1722 | },
1723 | "path-parse": {
1724 | "version": "1.0.7",
1725 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
1726 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
1727 | "dev": true
1728 | },
1729 | "picocolors": {
1730 | "version": "1.0.0",
1731 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
1732 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
1733 | "dev": true
1734 | },
1735 | "picomatch": {
1736 | "version": "2.3.1",
1737 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
1738 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
1739 | "dev": true
1740 | },
1741 | "pkg-dir": {
1742 | "version": "4.2.0",
1743 | "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
1744 | "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
1745 | "dev": true,
1746 | "requires": {
1747 | "find-up": "^4.0.0"
1748 | },
1749 | "dependencies": {
1750 | "find-up": {
1751 | "version": "4.1.0",
1752 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
1753 | "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
1754 | "dev": true,
1755 | "requires": {
1756 | "locate-path": "^5.0.0",
1757 | "path-exists": "^4.0.0"
1758 | }
1759 | },
1760 | "locate-path": {
1761 | "version": "5.0.0",
1762 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
1763 | "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
1764 | "dev": true,
1765 | "requires": {
1766 | "p-locate": "^4.1.0"
1767 | }
1768 | },
1769 | "p-limit": {
1770 | "version": "2.3.0",
1771 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
1772 | "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
1773 | "dev": true,
1774 | "requires": {
1775 | "p-try": "^2.0.0"
1776 | }
1777 | },
1778 | "p-locate": {
1779 | "version": "4.1.0",
1780 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
1781 | "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
1782 | "dev": true,
1783 | "requires": {
1784 | "p-limit": "^2.2.0"
1785 | }
1786 | }
1787 | }
1788 | },
1789 | "prelude-ls": {
1790 | "version": "1.2.1",
1791 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
1792 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
1793 | "dev": true
1794 | },
1795 | "punycode": {
1796 | "version": "2.3.0",
1797 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
1798 | "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
1799 | "dev": true
1800 | },
1801 | "queue-microtask": {
1802 | "version": "1.2.3",
1803 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
1804 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
1805 | "dev": true
1806 | },
1807 | "randombytes": {
1808 | "version": "2.1.0",
1809 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
1810 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
1811 | "dev": true,
1812 | "requires": {
1813 | "safe-buffer": "^5.1.0"
1814 | }
1815 | },
1816 | "rechoir": {
1817 | "version": "0.8.0",
1818 | "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz",
1819 | "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==",
1820 | "dev": true,
1821 | "requires": {
1822 | "resolve": "^1.20.0"
1823 | }
1824 | },
1825 | "regexp.prototype.flags": {
1826 | "version": "1.4.3",
1827 | "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz",
1828 | "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==",
1829 | "dev": true,
1830 | "requires": {
1831 | "call-bind": "^1.0.2",
1832 | "define-properties": "^1.1.3",
1833 | "functions-have-names": "^1.2.2"
1834 | }
1835 | },
1836 | "regexpp": {
1837 | "version": "3.2.0",
1838 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
1839 | "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
1840 | "dev": true
1841 | },
1842 | "replace-string": {
1843 | "version": "3.1.0",
1844 | "resolved": "https://registry.npmjs.org/replace-string/-/replace-string-3.1.0.tgz",
1845 | "integrity": "sha512-yPpxc4ZR2makceA9hy/jHNqc7QVkd4Je/N0WRHm6bs3PtivPuPynxE5ejU/mp5EhnCv8+uZL7vhz8rkluSlx+Q==",
1846 | "dev": true
1847 | },
1848 | "resolve": {
1849 | "version": "1.22.1",
1850 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
1851 | "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
1852 | "dev": true,
1853 | "requires": {
1854 | "is-core-module": "^2.9.0",
1855 | "path-parse": "^1.0.7",
1856 | "supports-preserve-symlinks-flag": "^1.0.0"
1857 | }
1858 | },
1859 | "resolve-cwd": {
1860 | "version": "3.0.0",
1861 | "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
1862 | "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
1863 | "dev": true,
1864 | "requires": {
1865 | "resolve-from": "^5.0.0"
1866 | },
1867 | "dependencies": {
1868 | "resolve-from": {
1869 | "version": "5.0.0",
1870 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
1871 | "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
1872 | "dev": true
1873 | }
1874 | }
1875 | },
1876 | "resolve-from": {
1877 | "version": "4.0.0",
1878 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
1879 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
1880 | "dev": true
1881 | },
1882 | "reusify": {
1883 | "version": "1.0.4",
1884 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
1885 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
1886 | "dev": true
1887 | },
1888 | "rimraf": {
1889 | "version": "4.1.2",
1890 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz",
1891 | "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==",
1892 | "dev": true
1893 | },
1894 | "run-parallel": {
1895 | "version": "1.2.0",
1896 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
1897 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
1898 | "dev": true,
1899 | "requires": {
1900 | "queue-microtask": "^1.2.2"
1901 | }
1902 | },
1903 | "safe-buffer": {
1904 | "version": "5.2.1",
1905 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
1906 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
1907 | "dev": true
1908 | },
1909 | "safe-regex-test": {
1910 | "version": "1.0.0",
1911 | "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
1912 | "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==",
1913 | "dev": true,
1914 | "requires": {
1915 | "call-bind": "^1.0.2",
1916 | "get-intrinsic": "^1.1.3",
1917 | "is-regex": "^1.1.4"
1918 | }
1919 | },
1920 | "schema-utils": {
1921 | "version": "3.1.1",
1922 | "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
1923 | "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
1924 | "dev": true,
1925 | "requires": {
1926 | "@types/json-schema": "^7.0.8",
1927 | "ajv": "^6.12.5",
1928 | "ajv-keywords": "^3.5.2"
1929 | }
1930 | },
1931 | "semver": {
1932 | "version": "6.3.0",
1933 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
1934 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
1935 | "dev": true
1936 | },
1937 | "serialize-javascript": {
1938 | "version": "6.0.1",
1939 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
1940 | "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
1941 | "dev": true,
1942 | "requires": {
1943 | "randombytes": "^2.1.0"
1944 | }
1945 | },
1946 | "shallow-clone": {
1947 | "version": "3.0.1",
1948 | "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
1949 | "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
1950 | "dev": true,
1951 | "requires": {
1952 | "kind-of": "^6.0.2"
1953 | }
1954 | },
1955 | "shebang-command": {
1956 | "version": "2.0.0",
1957 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
1958 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
1959 | "dev": true,
1960 | "requires": {
1961 | "shebang-regex": "^3.0.0"
1962 | }
1963 | },
1964 | "shebang-regex": {
1965 | "version": "3.0.0",
1966 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
1967 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
1968 | "dev": true
1969 | },
1970 | "side-channel": {
1971 | "version": "1.0.4",
1972 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
1973 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
1974 | "dev": true,
1975 | "requires": {
1976 | "call-bind": "^1.0.0",
1977 | "get-intrinsic": "^1.0.2",
1978 | "object-inspect": "^1.9.0"
1979 | }
1980 | },
1981 | "slash": {
1982 | "version": "3.0.0",
1983 | "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
1984 | "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
1985 | "dev": true
1986 | },
1987 | "source-map": {
1988 | "version": "0.6.1",
1989 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
1990 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
1991 | "dev": true
1992 | },
1993 | "source-map-support": {
1994 | "version": "0.5.21",
1995 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
1996 | "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
1997 | "dev": true,
1998 | "requires": {
1999 | "buffer-from": "^1.0.0",
2000 | "source-map": "^0.6.0"
2001 | }
2002 | },
2003 | "string.prototype.trimend": {
2004 | "version": "1.0.6",
2005 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz",
2006 | "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==",
2007 | "dev": true,
2008 | "requires": {
2009 | "call-bind": "^1.0.2",
2010 | "define-properties": "^1.1.4",
2011 | "es-abstract": "^1.20.4"
2012 | }
2013 | },
2014 | "string.prototype.trimstart": {
2015 | "version": "1.0.6",
2016 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz",
2017 | "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==",
2018 | "dev": true,
2019 | "requires": {
2020 | "call-bind": "^1.0.2",
2021 | "define-properties": "^1.1.4",
2022 | "es-abstract": "^1.20.4"
2023 | }
2024 | },
2025 | "strip-ansi": {
2026 | "version": "6.0.1",
2027 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
2028 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
2029 | "dev": true,
2030 | "requires": {
2031 | "ansi-regex": "^5.0.1"
2032 | }
2033 | },
2034 | "strip-bom": {
2035 | "version": "3.0.0",
2036 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
2037 | "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
2038 | "dev": true
2039 | },
2040 | "strip-json-comments": {
2041 | "version": "3.1.1",
2042 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
2043 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
2044 | "dev": true
2045 | },
2046 | "supports-color": {
2047 | "version": "7.2.0",
2048 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
2049 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
2050 | "dev": true,
2051 | "requires": {
2052 | "has-flag": "^4.0.0"
2053 | }
2054 | },
2055 | "supports-preserve-symlinks-flag": {
2056 | "version": "1.0.0",
2057 | "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
2058 | "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
2059 | "dev": true
2060 | },
2061 | "tapable": {
2062 | "version": "2.2.1",
2063 | "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
2064 | "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
2065 | "dev": true
2066 | },
2067 | "terser": {
2068 | "version": "5.16.5",
2069 | "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.5.tgz",
2070 | "integrity": "sha512-qcwfg4+RZa3YvlFh0qjifnzBHjKGNbtDo9yivMqMFDy9Q6FSaQWSB/j1xKhsoUFJIqDOM3TsN6D5xbrMrFcHbg==",
2071 | "dev": true,
2072 | "requires": {
2073 | "@jridgewell/source-map": "^0.3.2",
2074 | "acorn": "^8.5.0",
2075 | "commander": "^2.20.0",
2076 | "source-map-support": "~0.5.20"
2077 | }
2078 | },
2079 | "terser-webpack-plugin": {
2080 | "version": "5.3.6",
2081 | "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz",
2082 | "integrity": "sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==",
2083 | "dev": true,
2084 | "requires": {
2085 | "@jridgewell/trace-mapping": "^0.3.14",
2086 | "jest-worker": "^27.4.5",
2087 | "schema-utils": "^3.1.1",
2088 | "serialize-javascript": "^6.0.0",
2089 | "terser": "^5.14.1"
2090 | }
2091 | },
2092 | "text-table": {
2093 | "version": "0.2.0",
2094 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
2095 | "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
2096 | "dev": true
2097 | },
2098 | "tsconfig-paths": {
2099 | "version": "3.14.2",
2100 | "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",
2101 | "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==",
2102 | "dev": true,
2103 | "requires": {
2104 | "@types/json5": "^0.0.29",
2105 | "json5": "^1.0.2",
2106 | "minimist": "^1.2.6",
2107 | "strip-bom": "^3.0.0"
2108 | }
2109 | },
2110 | "type-check": {
2111 | "version": "0.4.0",
2112 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
2113 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
2114 | "dev": true,
2115 | "requires": {
2116 | "prelude-ls": "^1.2.1"
2117 | }
2118 | },
2119 | "type-fest": {
2120 | "version": "0.20.2",
2121 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
2122 | "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
2123 | "dev": true
2124 | },
2125 | "typed-array-length": {
2126 | "version": "1.0.4",
2127 | "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz",
2128 | "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==",
2129 | "dev": true,
2130 | "requires": {
2131 | "call-bind": "^1.0.2",
2132 | "for-each": "^0.3.3",
2133 | "is-typed-array": "^1.1.9"
2134 | }
2135 | },
2136 | "unbox-primitive": {
2137 | "version": "1.0.2",
2138 | "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
2139 | "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
2140 | "dev": true,
2141 | "requires": {
2142 | "call-bind": "^1.0.2",
2143 | "has-bigints": "^1.0.2",
2144 | "has-symbols": "^1.0.3",
2145 | "which-boxed-primitive": "^1.0.2"
2146 | }
2147 | },
2148 | "update-browserslist-db": {
2149 | "version": "1.0.10",
2150 | "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz",
2151 | "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==",
2152 | "dev": true,
2153 | "requires": {
2154 | "escalade": "^3.1.1",
2155 | "picocolors": "^1.0.0"
2156 | }
2157 | },
2158 | "uri-js": {
2159 | "version": "4.4.1",
2160 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
2161 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
2162 | "dev": true,
2163 | "requires": {
2164 | "punycode": "^2.1.0"
2165 | }
2166 | },
2167 | "watchpack": {
2168 | "version": "2.4.0",
2169 | "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
2170 | "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==",
2171 | "dev": true,
2172 | "requires": {
2173 | "glob-to-regexp": "^0.4.1",
2174 | "graceful-fs": "^4.1.2"
2175 | }
2176 | },
2177 | "webpack": {
2178 | "version": "5.75.0",
2179 | "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.75.0.tgz",
2180 | "integrity": "sha512-piaIaoVJlqMsPtX/+3KTTO6jfvrSYgauFVdt8cr9LTHKmcq/AMd4mhzsiP7ZF/PGRNPGA8336jldh9l2Kt2ogQ==",
2181 | "dev": true,
2182 | "requires": {
2183 | "@types/eslint-scope": "^3.7.3",
2184 | "@types/estree": "^0.0.51",
2185 | "@webassemblyjs/ast": "1.11.1",
2186 | "@webassemblyjs/wasm-edit": "1.11.1",
2187 | "@webassemblyjs/wasm-parser": "1.11.1",
2188 | "acorn": "^8.7.1",
2189 | "acorn-import-assertions": "^1.7.6",
2190 | "browserslist": "^4.14.5",
2191 | "chrome-trace-event": "^1.0.2",
2192 | "enhanced-resolve": "^5.10.0",
2193 | "es-module-lexer": "^0.9.0",
2194 | "eslint-scope": "5.1.1",
2195 | "events": "^3.2.0",
2196 | "glob-to-regexp": "^0.4.1",
2197 | "graceful-fs": "^4.2.9",
2198 | "json-parse-even-better-errors": "^2.3.1",
2199 | "loader-runner": "^4.2.0",
2200 | "mime-types": "^2.1.27",
2201 | "neo-async": "^2.6.2",
2202 | "schema-utils": "^3.1.0",
2203 | "tapable": "^2.1.1",
2204 | "terser-webpack-plugin": "^5.1.3",
2205 | "watchpack": "^2.4.0",
2206 | "webpack-sources": "^3.2.3"
2207 | },
2208 | "dependencies": {
2209 | "eslint-scope": {
2210 | "version": "5.1.1",
2211 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
2212 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
2213 | "dev": true,
2214 | "requires": {
2215 | "esrecurse": "^4.3.0",
2216 | "estraverse": "^4.1.1"
2217 | }
2218 | },
2219 | "estraverse": {
2220 | "version": "4.3.0",
2221 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
2222 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
2223 | "dev": true
2224 | }
2225 | }
2226 | },
2227 | "webpack-cli": {
2228 | "version": "5.0.1",
2229 | "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz",
2230 | "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==",
2231 | "dev": true,
2232 | "requires": {
2233 | "@discoveryjs/json-ext": "^0.5.0",
2234 | "@webpack-cli/configtest": "^2.0.1",
2235 | "@webpack-cli/info": "^2.0.1",
2236 | "@webpack-cli/serve": "^2.0.1",
2237 | "colorette": "^2.0.14",
2238 | "commander": "^9.4.1",
2239 | "cross-spawn": "^7.0.3",
2240 | "envinfo": "^7.7.3",
2241 | "fastest-levenshtein": "^1.0.12",
2242 | "import-local": "^3.0.2",
2243 | "interpret": "^3.1.1",
2244 | "rechoir": "^0.8.0",
2245 | "webpack-merge": "^5.7.3"
2246 | },
2247 | "dependencies": {
2248 | "commander": {
2249 | "version": "9.5.0",
2250 | "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz",
2251 | "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==",
2252 | "dev": true
2253 | }
2254 | }
2255 | },
2256 | "webpack-merge": {
2257 | "version": "5.8.0",
2258 | "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz",
2259 | "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==",
2260 | "dev": true,
2261 | "requires": {
2262 | "clone-deep": "^4.0.1",
2263 | "wildcard": "^2.0.0"
2264 | }
2265 | },
2266 | "webpack-sources": {
2267 | "version": "3.2.3",
2268 | "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
2269 | "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
2270 | "dev": true
2271 | },
2272 | "webpack-virtual-modules": {
2273 | "version": "0.5.0",
2274 | "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz",
2275 | "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==",
2276 | "dev": true
2277 | },
2278 | "which": {
2279 | "version": "2.0.2",
2280 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
2281 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
2282 | "dev": true,
2283 | "requires": {
2284 | "isexe": "^2.0.0"
2285 | }
2286 | },
2287 | "which-boxed-primitive": {
2288 | "version": "1.0.2",
2289 | "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
2290 | "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
2291 | "dev": true,
2292 | "requires": {
2293 | "is-bigint": "^1.0.1",
2294 | "is-boolean-object": "^1.1.0",
2295 | "is-number-object": "^1.0.4",
2296 | "is-string": "^1.0.5",
2297 | "is-symbol": "^1.0.3"
2298 | }
2299 | },
2300 | "which-typed-array": {
2301 | "version": "1.1.9",
2302 | "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz",
2303 | "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==",
2304 | "dev": true,
2305 | "requires": {
2306 | "available-typed-arrays": "^1.0.5",
2307 | "call-bind": "^1.0.2",
2308 | "for-each": "^0.3.3",
2309 | "gopd": "^1.0.1",
2310 | "has-tostringtag": "^1.0.0",
2311 | "is-typed-array": "^1.1.10"
2312 | }
2313 | },
2314 | "wildcard": {
2315 | "version": "2.0.0",
2316 | "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",
2317 | "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
2318 | "dev": true
2319 | },
2320 | "word-wrap": {
2321 | "version": "1.2.3",
2322 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
2323 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
2324 | "dev": true
2325 | },
2326 | "wrappy": {
2327 | "version": "1.0.2",
2328 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
2329 | "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
2330 | "dev": true
2331 | },
2332 | "yocto-queue": {
2333 | "version": "0.1.0",
2334 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
2335 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
2336 | "dev": true
2337 | }
2338 | }
2339 | }
2340 |
--------------------------------------------------------------------------------