Initial commit
This commit is contained in:
@ -1,6 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"next/core-web-vitals",
|
||||
"next/typescript"
|
||||
]
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "new-york",
|
||||
"rsc": true,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "",
|
||||
"css": "src/app/globals.css",
|
||||
"baseColor": "slate",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
},
|
||||
"aliases": {
|
||||
"components": "@/components",
|
||||
"utils": "@/lib/utils",
|
||||
"ui": "@/components/ui",
|
||||
"lib": "@/lib",
|
||||
"hooks": "@/hooks"
|
||||
},
|
||||
"iconLibrary": "lucide"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
26
frontend/webapp/app/globals.css
Normal file
26
frontend/webapp/app/globals.css
Normal file
@ -0,0 +1,26 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
:root {
|
||||
--background: #ffffff;
|
||||
--foreground: #171717;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--font-sans: var(--font-geist-sans);
|
||||
--font-mono: var(--font-geist-mono);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--background: #0a0a0a;
|
||||
--foreground: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--background);
|
||||
color: var(--foreground);
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
@ -16,7 +16,7 @@ export default function Home() {
|
||||
<li className="mb-2 tracking-[-.01em]">
|
||||
Get started by editing{" "}
|
||||
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold">
|
||||
src/app/page.tsx
|
||||
app/page.tsx
|
||||
</code>
|
||||
.
|
||||
</li>
|
||||
16
frontend/webapp/eslint.config.mjs
Normal file
16
frontend/webapp/eslint.config.mjs
Normal file
@ -0,0 +1,16 @@
|
||||
import { dirname } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = dirname(__filename);
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname,
|
||||
});
|
||||
|
||||
const eslintConfig = [
|
||||
...compat.extends("next/core-web-vitals", "next/typescript"),
|
||||
];
|
||||
|
||||
export default eslintConfig;
|
||||
1
frontend/webapp/node_modules/.bin/acorn
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/acorn
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../acorn/bin/acorn
|
||||
1
frontend/webapp/node_modules/.bin/eslint
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/eslint
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../eslint/bin/eslint.js
|
||||
1
frontend/webapp/node_modules/.bin/jiti
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/jiti
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../jiti/lib/jiti-cli.mjs
|
||||
1
frontend/webapp/node_modules/.bin/js-yaml
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/js-yaml
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../js-yaml/bin/js-yaml.js
|
||||
1
frontend/webapp/node_modules/.bin/json5
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/json5
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../json5/lib/cli.js
|
||||
1
frontend/webapp/node_modules/.bin/loose-envify
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/loose-envify
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../loose-envify/cli.js
|
||||
1
frontend/webapp/node_modules/.bin/nanoid
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/nanoid
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../nanoid/bin/nanoid.cjs
|
||||
1
frontend/webapp/node_modules/.bin/next
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/next
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../next/dist/bin/next
|
||||
1
frontend/webapp/node_modules/.bin/node-which
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/node-which
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../which/bin/node-which
|
||||
1
frontend/webapp/node_modules/.bin/resolve
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/resolve
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../resolve/bin/resolve
|
||||
1
frontend/webapp/node_modules/.bin/semver
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/semver
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../semver/bin/semver.js
|
||||
1
frontend/webapp/node_modules/.bin/tsc
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/tsc
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../typescript/bin/tsc
|
||||
1
frontend/webapp/node_modules/.bin/tsserver
generated
vendored
Symbolic link
1
frontend/webapp/node_modules/.bin/tsserver
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../typescript/bin/tsserver
|
||||
4712
frontend/webapp/node_modules/.package-lock.json
generated
vendored
Normal file
4712
frontend/webapp/node_modules/.package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
128
frontend/webapp/node_modules/@alloc/quick-lru/index.d.ts
generated
vendored
Normal file
128
frontend/webapp/node_modules/@alloc/quick-lru/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
declare namespace QuickLRU {
|
||||
interface Options<KeyType, ValueType> {
|
||||
/**
|
||||
The maximum number of milliseconds an item should remain in the cache.
|
||||
|
||||
@default Infinity
|
||||
|
||||
By default, `maxAge` will be `Infinity`, which means that items will never expire.
|
||||
Lazy expiration upon the next write or read call.
|
||||
|
||||
Individual expiration of an item can be specified by the `set(key, value, maxAge)` method.
|
||||
*/
|
||||
readonly maxAge?: number;
|
||||
|
||||
/**
|
||||
The maximum number of items before evicting the least recently used items.
|
||||
*/
|
||||
readonly maxSize: number;
|
||||
|
||||
/**
|
||||
Called right before an item is evicted from the cache.
|
||||
|
||||
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
|
||||
*/
|
||||
onEviction?: (key: KeyType, value: ValueType) => void;
|
||||
}
|
||||
}
|
||||
|
||||
declare class QuickLRU<KeyType, ValueType>
|
||||
implements Iterable<[KeyType, ValueType]> {
|
||||
/**
|
||||
The stored item count.
|
||||
*/
|
||||
readonly size: number;
|
||||
|
||||
/**
|
||||
Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29).
|
||||
|
||||
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
|
||||
|
||||
@example
|
||||
```
|
||||
import QuickLRU = require('quick-lru');
|
||||
|
||||
const lru = new QuickLRU({maxSize: 1000});
|
||||
|
||||
lru.set('🦄', '🌈');
|
||||
|
||||
lru.has('🦄');
|
||||
//=> true
|
||||
|
||||
lru.get('🦄');
|
||||
//=> '🌈'
|
||||
```
|
||||
*/
|
||||
constructor(options: QuickLRU.Options<KeyType, ValueType>);
|
||||
|
||||
[Symbol.iterator](): IterableIterator<[KeyType, ValueType]>;
|
||||
|
||||
/**
|
||||
Set an item. Returns the instance.
|
||||
|
||||
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified in the constructor, otherwise the item will never expire.
|
||||
|
||||
@returns The list instance.
|
||||
*/
|
||||
set(key: KeyType, value: ValueType, options?: {maxAge?: number}): this;
|
||||
|
||||
/**
|
||||
Get an item.
|
||||
|
||||
@returns The stored item or `undefined`.
|
||||
*/
|
||||
get(key: KeyType): ValueType | undefined;
|
||||
|
||||
/**
|
||||
Check if an item exists.
|
||||
*/
|
||||
has(key: KeyType): boolean;
|
||||
|
||||
/**
|
||||
Get an item without marking it as recently used.
|
||||
|
||||
@returns The stored item or `undefined`.
|
||||
*/
|
||||
peek(key: KeyType): ValueType | undefined;
|
||||
|
||||
/**
|
||||
Delete an item.
|
||||
|
||||
@returns `true` if the item is removed or `false` if the item doesn't exist.
|
||||
*/
|
||||
delete(key: KeyType): boolean;
|
||||
|
||||
/**
|
||||
Delete all items.
|
||||
*/
|
||||
clear(): void;
|
||||
|
||||
/**
|
||||
Update the `maxSize` in-place, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
|
||||
|
||||
Useful for on-the-fly tuning of cache sizes in live systems.
|
||||
*/
|
||||
resize(maxSize: number): void;
|
||||
|
||||
/**
|
||||
Iterable for all the keys.
|
||||
*/
|
||||
keys(): IterableIterator<KeyType>;
|
||||
|
||||
/**
|
||||
Iterable for all the values.
|
||||
*/
|
||||
values(): IterableIterator<ValueType>;
|
||||
|
||||
/**
|
||||
Iterable for all entries, starting with the oldest (ascending in recency).
|
||||
*/
|
||||
entriesAscending(): IterableIterator<[KeyType, ValueType]>;
|
||||
|
||||
/**
|
||||
Iterable for all entries, starting with the newest (descending in recency).
|
||||
*/
|
||||
entriesDescending(): IterableIterator<[KeyType, ValueType]>;
|
||||
}
|
||||
|
||||
export = QuickLRU;
|
||||
263
frontend/webapp/node_modules/@alloc/quick-lru/index.js
generated
vendored
Normal file
263
frontend/webapp/node_modules/@alloc/quick-lru/index.js
generated
vendored
Normal file
@ -0,0 +1,263 @@
|
||||
'use strict';
|
||||
|
||||
class QuickLRU {
|
||||
constructor(options = {}) {
|
||||
if (!(options.maxSize && options.maxSize > 0)) {
|
||||
throw new TypeError('`maxSize` must be a number greater than 0');
|
||||
}
|
||||
|
||||
if (typeof options.maxAge === 'number' && options.maxAge === 0) {
|
||||
throw new TypeError('`maxAge` must be a number greater than 0');
|
||||
}
|
||||
|
||||
this.maxSize = options.maxSize;
|
||||
this.maxAge = options.maxAge || Infinity;
|
||||
this.onEviction = options.onEviction;
|
||||
this.cache = new Map();
|
||||
this.oldCache = new Map();
|
||||
this._size = 0;
|
||||
}
|
||||
|
||||
_emitEvictions(cache) {
|
||||
if (typeof this.onEviction !== 'function') {
|
||||
return;
|
||||
}
|
||||
|
||||
for (const [key, item] of cache) {
|
||||
this.onEviction(key, item.value);
|
||||
}
|
||||
}
|
||||
|
||||
_deleteIfExpired(key, item) {
|
||||
if (typeof item.expiry === 'number' && item.expiry <= Date.now()) {
|
||||
if (typeof this.onEviction === 'function') {
|
||||
this.onEviction(key, item.value);
|
||||
}
|
||||
|
||||
return this.delete(key);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
_getOrDeleteIfExpired(key, item) {
|
||||
const deleted = this._deleteIfExpired(key, item);
|
||||
if (deleted === false) {
|
||||
return item.value;
|
||||
}
|
||||
}
|
||||
|
||||
_getItemValue(key, item) {
|
||||
return item.expiry ? this._getOrDeleteIfExpired(key, item) : item.value;
|
||||
}
|
||||
|
||||
_peek(key, cache) {
|
||||
const item = cache.get(key);
|
||||
|
||||
return this._getItemValue(key, item);
|
||||
}
|
||||
|
||||
_set(key, value) {
|
||||
this.cache.set(key, value);
|
||||
this._size++;
|
||||
|
||||
if (this._size >= this.maxSize) {
|
||||
this._size = 0;
|
||||
this._emitEvictions(this.oldCache);
|
||||
this.oldCache = this.cache;
|
||||
this.cache = new Map();
|
||||
}
|
||||
}
|
||||
|
||||
_moveToRecent(key, item) {
|
||||
this.oldCache.delete(key);
|
||||
this._set(key, item);
|
||||
}
|
||||
|
||||
* _entriesAscending() {
|
||||
for (const item of this.oldCache) {
|
||||
const [key, value] = item;
|
||||
if (!this.cache.has(key)) {
|
||||
const deleted = this._deleteIfExpired(key, value);
|
||||
if (deleted === false) {
|
||||
yield item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const item of this.cache) {
|
||||
const [key, value] = item;
|
||||
const deleted = this._deleteIfExpired(key, value);
|
||||
if (deleted === false) {
|
||||
yield item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
get(key) {
|
||||
if (this.cache.has(key)) {
|
||||
const item = this.cache.get(key);
|
||||
|
||||
return this._getItemValue(key, item);
|
||||
}
|
||||
|
||||
if (this.oldCache.has(key)) {
|
||||
const item = this.oldCache.get(key);
|
||||
if (this._deleteIfExpired(key, item) === false) {
|
||||
this._moveToRecent(key, item);
|
||||
return item.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
set(key, value, {maxAge = this.maxAge === Infinity ? undefined : Date.now() + this.maxAge} = {}) {
|
||||
if (this.cache.has(key)) {
|
||||
this.cache.set(key, {
|
||||
value,
|
||||
maxAge
|
||||
});
|
||||
} else {
|
||||
this._set(key, {value, expiry: maxAge});
|
||||
}
|
||||
}
|
||||
|
||||
has(key) {
|
||||
if (this.cache.has(key)) {
|
||||
return !this._deleteIfExpired(key, this.cache.get(key));
|
||||
}
|
||||
|
||||
if (this.oldCache.has(key)) {
|
||||
return !this._deleteIfExpired(key, this.oldCache.get(key));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
peek(key) {
|
||||
if (this.cache.has(key)) {
|
||||
return this._peek(key, this.cache);
|
||||
}
|
||||
|
||||
if (this.oldCache.has(key)) {
|
||||
return this._peek(key, this.oldCache);
|
||||
}
|
||||
}
|
||||
|
||||
delete(key) {
|
||||
const deleted = this.cache.delete(key);
|
||||
if (deleted) {
|
||||
this._size--;
|
||||
}
|
||||
|
||||
return this.oldCache.delete(key) || deleted;
|
||||
}
|
||||
|
||||
clear() {
|
||||
this.cache.clear();
|
||||
this.oldCache.clear();
|
||||
this._size = 0;
|
||||
}
|
||||
|
||||
resize(newSize) {
|
||||
if (!(newSize && newSize > 0)) {
|
||||
throw new TypeError('`maxSize` must be a number greater than 0');
|
||||
}
|
||||
|
||||
const items = [...this._entriesAscending()];
|
||||
const removeCount = items.length - newSize;
|
||||
if (removeCount < 0) {
|
||||
this.cache = new Map(items);
|
||||
this.oldCache = new Map();
|
||||
this._size = items.length;
|
||||
} else {
|
||||
if (removeCount > 0) {
|
||||
this._emitEvictions(items.slice(0, removeCount));
|
||||
}
|
||||
|
||||
this.oldCache = new Map(items.slice(removeCount));
|
||||
this.cache = new Map();
|
||||
this._size = 0;
|
||||
}
|
||||
|
||||
this.maxSize = newSize;
|
||||
}
|
||||
|
||||
* keys() {
|
||||
for (const [key] of this) {
|
||||
yield key;
|
||||
}
|
||||
}
|
||||
|
||||
* values() {
|
||||
for (const [, value] of this) {
|
||||
yield value;
|
||||
}
|
||||
}
|
||||
|
||||
* [Symbol.iterator]() {
|
||||
for (const item of this.cache) {
|
||||
const [key, value] = item;
|
||||
const deleted = this._deleteIfExpired(key, value);
|
||||
if (deleted === false) {
|
||||
yield [key, value.value];
|
||||
}
|
||||
}
|
||||
|
||||
for (const item of this.oldCache) {
|
||||
const [key, value] = item;
|
||||
if (!this.cache.has(key)) {
|
||||
const deleted = this._deleteIfExpired(key, value);
|
||||
if (deleted === false) {
|
||||
yield [key, value.value];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
* entriesDescending() {
|
||||
let items = [...this.cache];
|
||||
for (let i = items.length - 1; i >= 0; --i) {
|
||||
const item = items[i];
|
||||
const [key, value] = item;
|
||||
const deleted = this._deleteIfExpired(key, value);
|
||||
if (deleted === false) {
|
||||
yield [key, value.value];
|
||||
}
|
||||
}
|
||||
|
||||
items = [...this.oldCache];
|
||||
for (let i = items.length - 1; i >= 0; --i) {
|
||||
const item = items[i];
|
||||
const [key, value] = item;
|
||||
if (!this.cache.has(key)) {
|
||||
const deleted = this._deleteIfExpired(key, value);
|
||||
if (deleted === false) {
|
||||
yield [key, value.value];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
* entriesAscending() {
|
||||
for (const [key, value] of this._entriesAscending()) {
|
||||
yield [key, value.value];
|
||||
}
|
||||
}
|
||||
|
||||
get size() {
|
||||
if (!this._size) {
|
||||
return this.oldCache.size;
|
||||
}
|
||||
|
||||
let oldCacheSize = 0;
|
||||
for (const key of this.oldCache.keys()) {
|
||||
if (!this.cache.has(key)) {
|
||||
oldCacheSize++;
|
||||
}
|
||||
}
|
||||
|
||||
return Math.min(this._size + oldCacheSize, this.maxSize);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = QuickLRU;
|
||||
9
frontend/webapp/node_modules/@alloc/quick-lru/license
generated
vendored
Normal file
9
frontend/webapp/node_modules/@alloc/quick-lru/license
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
43
frontend/webapp/node_modules/@alloc/quick-lru/package.json
generated
vendored
Normal file
43
frontend/webapp/node_modules/@alloc/quick-lru/package.json
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "@alloc/quick-lru",
|
||||
"version": "5.2.0",
|
||||
"description": "Simple “Least Recently Used” (LRU) cache",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/quick-lru",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && nyc ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"lru",
|
||||
"quick",
|
||||
"cache",
|
||||
"caching",
|
||||
"least",
|
||||
"recently",
|
||||
"used",
|
||||
"fast",
|
||||
"map",
|
||||
"hash",
|
||||
"buffer"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^2.0.0",
|
||||
"coveralls": "^3.0.3",
|
||||
"nyc": "^15.0.0",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.26.0"
|
||||
}
|
||||
}
|
||||
139
frontend/webapp/node_modules/@alloc/quick-lru/readme.md
generated
vendored
Normal file
139
frontend/webapp/node_modules/@alloc/quick-lru/readme.md
generated
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
# quick-lru [](https://travis-ci.org/sindresorhus/quick-lru) [](https://coveralls.io/github/sindresorhus/quick-lru?branch=master)
|
||||
|
||||
> Simple [“Least Recently Used” (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29)
|
||||
|
||||
Useful when you need to cache something and limit memory usage.
|
||||
|
||||
Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install quick-lru
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const QuickLRU = require('quick-lru');
|
||||
|
||||
const lru = new QuickLRU({maxSize: 1000});
|
||||
|
||||
lru.set('🦄', '🌈');
|
||||
|
||||
lru.has('🦄');
|
||||
//=> true
|
||||
|
||||
lru.get('🦄');
|
||||
//=> '🌈'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### new QuickLRU(options?)
|
||||
|
||||
Returns a new instance.
|
||||
|
||||
### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
#### maxSize
|
||||
|
||||
*Required*\
|
||||
Type: `number`
|
||||
|
||||
The maximum number of items before evicting the least recently used items.
|
||||
|
||||
#### maxAge
|
||||
|
||||
Type: `number`\
|
||||
Default: `Infinity`
|
||||
|
||||
The maximum number of milliseconds an item should remain in cache.
|
||||
By default maxAge will be Infinity, which means that items will never expire.
|
||||
|
||||
Lazy expiration happens upon the next `write` or `read` call.
|
||||
|
||||
Individual expiration of an item can be specified by the `set(key, value, options)` method.
|
||||
|
||||
#### onEviction
|
||||
|
||||
*Optional*\
|
||||
Type: `(key, value) => void`
|
||||
|
||||
Called right before an item is evicted from the cache.
|
||||
|
||||
Useful for side effects or for items like object URLs that need explicit cleanup (`revokeObjectURL`).
|
||||
|
||||
### Instance
|
||||
|
||||
The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop.
|
||||
|
||||
Both `key` and `value` can be of any type.
|
||||
|
||||
#### .set(key, value, options?)
|
||||
|
||||
Set an item. Returns the instance.
|
||||
|
||||
Individual expiration of an item can be specified with the `maxAge` option. If not specified, the global `maxAge` value will be used in case it is specified on the constructor, otherwise the item will never expire.
|
||||
|
||||
#### .get(key)
|
||||
|
||||
Get an item.
|
||||
|
||||
#### .has(key)
|
||||
|
||||
Check if an item exists.
|
||||
|
||||
#### .peek(key)
|
||||
|
||||
Get an item without marking it as recently used.
|
||||
|
||||
#### .delete(key)
|
||||
|
||||
Delete an item.
|
||||
|
||||
Returns `true` if the item is removed or `false` if the item doesn't exist.
|
||||
|
||||
#### .clear()
|
||||
|
||||
Delete all items.
|
||||
|
||||
#### .resize(maxSize)
|
||||
|
||||
Update the `maxSize`, discarding items as necessary. Insertion order is mostly preserved, though this is not a strong guarantee.
|
||||
|
||||
Useful for on-the-fly tuning of cache sizes in live systems.
|
||||
|
||||
#### .keys()
|
||||
|
||||
Iterable for all the keys.
|
||||
|
||||
#### .values()
|
||||
|
||||
Iterable for all the values.
|
||||
|
||||
#### .entriesAscending()
|
||||
|
||||
Iterable for all entries, starting with the oldest (ascending in recency).
|
||||
|
||||
#### .entriesDescending()
|
||||
|
||||
Iterable for all entries, starting with the newest (descending in recency).
|
||||
|
||||
#### .size
|
||||
|
||||
The stored item count.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-quick-lru?utm_source=npm-quick-lru&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
21
frontend/webapp/node_modules/@emnapi/runtime/LICENSE
generated
vendored
Normal file
21
frontend/webapp/node_modules/@emnapi/runtime/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021-present Toyobayashi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
1
frontend/webapp/node_modules/@emnapi/runtime/README.md
generated
vendored
Normal file
1
frontend/webapp/node_modules/@emnapi/runtime/README.md
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
See [https://github.com/toyobayashi/emnapi](https://github.com/toyobayashi/emnapi)
|
||||
1347
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.cjs.js
generated
vendored
Normal file
1347
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
663
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.d.ts
generated
vendored
Normal file
663
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.d.ts
generated
vendored
Normal file
@ -0,0 +1,663 @@
|
||||
export declare type Ptr = number | bigint
|
||||
|
||||
export declare interface IBuffer extends Uint8Array {}
|
||||
export declare interface BufferCtor {
|
||||
readonly prototype: IBuffer
|
||||
/** @deprecated */
|
||||
new (...args: any[]): IBuffer
|
||||
from: {
|
||||
(buffer: ArrayBufferLike): IBuffer
|
||||
(buffer: ArrayBufferLike, byteOffset: number, length: number): IBuffer
|
||||
}
|
||||
alloc: (size: number) => IBuffer
|
||||
isBuffer: (obj: unknown) => obj is IBuffer
|
||||
}
|
||||
|
||||
export declare const enum GlobalHandle {
|
||||
UNDEFINED = 1,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
GLOBAL
|
||||
}
|
||||
|
||||
export declare const enum Version {
|
||||
NODE_API_SUPPORTED_VERSION_MIN = 1,
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION = 8,
|
||||
NODE_API_SUPPORTED_VERSION_MAX = 10,
|
||||
NAPI_VERSION_EXPERIMENTAL = 2147483647 // INT_MAX
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type Pointer<T> = number
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type PointerPointer<T> = number
|
||||
export declare type FunctionPointer<T extends (...args: any[]) => any> = Pointer<T>
|
||||
export declare type Const<T> = T
|
||||
|
||||
export declare type void_p = Pointer<void>
|
||||
export declare type void_pp = Pointer<void_p>
|
||||
export declare type bool = number
|
||||
export declare type char = number
|
||||
export declare type char_p = Pointer<char>
|
||||
export declare type unsigned_char = number
|
||||
export declare type const_char = Const<char>
|
||||
export declare type const_char_p = Pointer<const_char>
|
||||
export declare type char16_t_p = number
|
||||
export declare type const_char16_t_p = number
|
||||
|
||||
export declare type short = number
|
||||
export declare type unsigned_short = number
|
||||
export declare type int = number
|
||||
export declare type unsigned_int = number
|
||||
export declare type long = number
|
||||
export declare type unsigned_long = number
|
||||
export declare type long_long = bigint
|
||||
export declare type unsigned_long_long = bigint
|
||||
export declare type float = number
|
||||
export declare type double = number
|
||||
export declare type long_double = number
|
||||
export declare type size_t = number
|
||||
|
||||
export declare type int8_t = number
|
||||
export declare type uint8_t = number
|
||||
export declare type int16_t = number
|
||||
export declare type uint16_t = number
|
||||
export declare type int32_t = number
|
||||
export declare type uint32_t = number
|
||||
export declare type int64_t = bigint
|
||||
export declare type uint64_t = bigint
|
||||
export declare type napi_env = Pointer<unknown>
|
||||
|
||||
export declare type napi_value = Pointer<unknown>
|
||||
export declare type napi_ref = Pointer<unknown>
|
||||
export declare type napi_deferred = Pointer<unknown>
|
||||
export declare type napi_handle_scope = Pointer<unknown>
|
||||
export declare type napi_escapable_handle_scope = Pointer<unknown>
|
||||
|
||||
export declare type napi_addon_register_func = FunctionPointer<(env: napi_env, exports: napi_value) => napi_value>
|
||||
|
||||
export declare type napi_callback_info = Pointer<unknown>
|
||||
export declare type napi_callback = FunctionPointer<(env: napi_env, info: napi_callback_info) => napi_value>
|
||||
|
||||
export declare interface napi_extended_error_info {
|
||||
error_message: const_char_p
|
||||
engine_reserved: void_p
|
||||
engine_error_code: uint32_t
|
||||
error_code: napi_status
|
||||
}
|
||||
|
||||
export declare interface napi_property_descriptor {
|
||||
// One of utf8name or name should be NULL.
|
||||
utf8name: const_char_p
|
||||
name: napi_value
|
||||
|
||||
method: napi_callback
|
||||
getter: napi_callback
|
||||
setter: napi_callback
|
||||
value: napi_value
|
||||
/* napi_property_attributes */
|
||||
attributes: number
|
||||
data: void_p
|
||||
}
|
||||
|
||||
export declare type napi_finalize = FunctionPointer<(
|
||||
env: napi_env,
|
||||
finalize_data: void_p,
|
||||
finalize_hint: void_p
|
||||
) => void>
|
||||
|
||||
export declare interface node_module {
|
||||
nm_version: int32_t
|
||||
nm_flags: uint32_t
|
||||
nm_filename: Pointer<const_char>
|
||||
nm_register_func: napi_addon_register_func
|
||||
nm_modname: Pointer<const_char>
|
||||
nm_priv: Pointer<void>
|
||||
reserved: PointerPointer<void>
|
||||
}
|
||||
|
||||
export declare interface napi_node_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
release: const_char_p
|
||||
}
|
||||
|
||||
export declare interface emnapi_emscripten_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
}
|
||||
|
||||
export declare const enum napi_status {
|
||||
napi_ok,
|
||||
napi_invalid_arg,
|
||||
napi_object_expected,
|
||||
napi_string_expected,
|
||||
napi_name_expected,
|
||||
napi_function_expected,
|
||||
napi_number_expected,
|
||||
napi_boolean_expected,
|
||||
napi_array_expected,
|
||||
napi_generic_failure,
|
||||
napi_pending_exception,
|
||||
napi_cancelled,
|
||||
napi_escape_called_twice,
|
||||
napi_handle_scope_mismatch,
|
||||
napi_callback_scope_mismatch,
|
||||
napi_queue_full,
|
||||
napi_closing,
|
||||
napi_bigint_expected,
|
||||
napi_date_expected,
|
||||
napi_arraybuffer_expected,
|
||||
napi_detachable_arraybuffer_expected,
|
||||
napi_would_deadlock, // unused
|
||||
napi_no_external_buffers_allowed,
|
||||
napi_cannot_run_js
|
||||
}
|
||||
|
||||
export declare const enum napi_property_attributes {
|
||||
napi_default = 0,
|
||||
napi_writable = 1 << 0,
|
||||
napi_enumerable = 1 << 1,
|
||||
napi_configurable = 1 << 2,
|
||||
|
||||
// Used with napi_define_class to distinguish static properties
|
||||
// from instance properties. Ignored by napi_define_properties.
|
||||
napi_static = 1 << 10,
|
||||
|
||||
/// #ifdef NAPI_EXPERIMENTAL
|
||||
// Default for class methods.
|
||||
napi_default_method = napi_writable | napi_configurable,
|
||||
|
||||
// Default for object properties, like in JS obj[prop].
|
||||
napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable
|
||||
/// #endif // NAPI_EXPERIMENTAL
|
||||
}
|
||||
|
||||
export declare const enum napi_valuetype {
|
||||
napi_undefined,
|
||||
napi_null,
|
||||
napi_boolean,
|
||||
napi_number,
|
||||
napi_string,
|
||||
napi_symbol,
|
||||
napi_object,
|
||||
napi_function,
|
||||
napi_external,
|
||||
napi_bigint
|
||||
}
|
||||
|
||||
export declare const enum napi_typedarray_type {
|
||||
napi_int8_array,
|
||||
napi_uint8_array,
|
||||
napi_uint8_clamped_array,
|
||||
napi_int16_array,
|
||||
napi_uint16_array,
|
||||
napi_int32_array,
|
||||
napi_uint32_array,
|
||||
napi_float32_array,
|
||||
napi_float64_array,
|
||||
napi_bigint64_array,
|
||||
napi_biguint64_array
|
||||
}
|
||||
|
||||
export declare const enum napi_key_collection_mode {
|
||||
napi_key_include_prototypes,
|
||||
napi_key_own_only
|
||||
}
|
||||
|
||||
export declare const enum napi_key_filter {
|
||||
napi_key_all_properties = 0,
|
||||
napi_key_writable = 1,
|
||||
napi_key_enumerable = 1 << 1,
|
||||
napi_key_configurable = 1 << 2,
|
||||
napi_key_skip_strings = 1 << 3,
|
||||
napi_key_skip_symbols = 1 << 4
|
||||
}
|
||||
|
||||
export declare const enum napi_key_conversion {
|
||||
napi_key_keep_numbers,
|
||||
napi_key_numbers_to_strings
|
||||
}
|
||||
|
||||
export declare const enum emnapi_memory_view_type {
|
||||
emnapi_int8_array,
|
||||
emnapi_uint8_array,
|
||||
emnapi_uint8_clamped_array,
|
||||
emnapi_int16_array,
|
||||
emnapi_uint16_array,
|
||||
emnapi_int32_array,
|
||||
emnapi_uint32_array,
|
||||
emnapi_float32_array,
|
||||
emnapi_float64_array,
|
||||
emnapi_bigint64_array,
|
||||
emnapi_biguint64_array,
|
||||
emnapi_data_view = -1,
|
||||
emnapi_buffer = -2
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_call_mode {
|
||||
napi_tsfn_nonblocking,
|
||||
napi_tsfn_blocking
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_release_mode {
|
||||
napi_tsfn_release,
|
||||
napi_tsfn_abort
|
||||
}
|
||||
export declare type CleanupHookCallbackFunction = number | ((arg: number) => void);
|
||||
|
||||
export declare class ConstHandle<S extends undefined | null | boolean | typeof globalThis> extends Handle<S> {
|
||||
constructor(id: number, value: S);
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Context {
|
||||
private _isStopping;
|
||||
private _canCallIntoJs;
|
||||
private _suppressDestroy;
|
||||
envStore: Store<Env>;
|
||||
scopeStore: ScopeStore;
|
||||
refStore: Store<Reference>;
|
||||
deferredStore: Store<Deferred<any>>;
|
||||
handleStore: HandleStore;
|
||||
private readonly refCounter?;
|
||||
private readonly cleanupQueue;
|
||||
feature: {
|
||||
supportReflect: boolean;
|
||||
supportFinalizer: boolean;
|
||||
supportWeakSymbol: boolean;
|
||||
supportBigInt: boolean;
|
||||
supportNewFunction: boolean;
|
||||
canSetFunctionName: boolean;
|
||||
setImmediate: (callback: () => void) => void;
|
||||
Buffer: BufferCtor | undefined;
|
||||
MessageChannel: {
|
||||
new (): MessageChannel;
|
||||
prototype: MessageChannel;
|
||||
} | undefined;
|
||||
};
|
||||
constructor();
|
||||
/**
|
||||
* Suppress the destroy on `beforeExit` event in Node.js.
|
||||
* Call this method if you want to keep the context and
|
||||
* all associated {@link Env | Env} alive,
|
||||
* this also means that cleanup hooks will not be called.
|
||||
* After call this method, you should call
|
||||
* {@link Context.destroy | `Context.prototype.destroy`} method manually.
|
||||
*/
|
||||
suppressDestroy(): void;
|
||||
getRuntimeVersions(): {
|
||||
version: string;
|
||||
NODE_API_SUPPORTED_VERSION_MAX: Version;
|
||||
NAPI_VERSION_EXPERIMENTAL: Version;
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION: Version;
|
||||
};
|
||||
createNotSupportWeakRefError(api: string, message: string): NotSupportWeakRefError;
|
||||
createNotSupportBufferError(api: string, message: string): NotSupportBufferError;
|
||||
createReference(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership): Reference;
|
||||
createReferenceWithData(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): Reference;
|
||||
createReferenceWithFinalizer(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback?: napi_finalize, finalize_data?: void_p, finalize_hint?: void_p): Reference;
|
||||
createDeferred<T = any>(value: IDeferrdValue<T>): Deferred<T>;
|
||||
createEnv(filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any): Env;
|
||||
createTrackedFinalizer(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
getCurrentScope(): HandleScope | null;
|
||||
addToCurrentScope<V>(value: V): Handle<V>;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env, _scope?: HandleScope): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
addCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
removeCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
runCleanup(): void;
|
||||
increaseWaitingRequestCounter(): void;
|
||||
decreaseWaitingRequestCounter(): void;
|
||||
setCanCallIntoJs(value: boolean): void;
|
||||
setStopping(value: boolean): void;
|
||||
canCallIntoJs(): boolean;
|
||||
/**
|
||||
* Destroy the context and call cleanup hooks.
|
||||
* Associated {@link Env | Env} will be destroyed.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export declare function createContext(): Context;
|
||||
|
||||
export declare class Deferred<T = any> implements IStoreValue {
|
||||
static create<T = any>(ctx: Context, value: IDeferrdValue<T>): Deferred;
|
||||
id: number;
|
||||
ctx: Context;
|
||||
value: IDeferrdValue<T>;
|
||||
constructor(ctx: Context, value: IDeferrdValue<T>);
|
||||
resolve(value: T): void;
|
||||
reject(reason?: any): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class EmnapiError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
|
||||
export declare abstract class Env implements IStoreValue {
|
||||
readonly ctx: Context;
|
||||
moduleApiVersion: number;
|
||||
makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void;
|
||||
makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void;
|
||||
abort: (msg?: string) => never;
|
||||
id: number;
|
||||
openHandleScopes: number;
|
||||
instanceData: TrackedFinalizer | null;
|
||||
tryCatch: TryCatch;
|
||||
refs: number;
|
||||
reflist: RefTracker;
|
||||
finalizing_reflist: RefTracker;
|
||||
pendingFinalizers: RefTracker[];
|
||||
lastError: {
|
||||
errorCode: napi_status;
|
||||
engineErrorCode: number;
|
||||
engineReserved: Ptr;
|
||||
};
|
||||
inGcFinalizer: boolean;
|
||||
constructor(ctx: Context, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never);
|
||||
/** @virtual */
|
||||
canCallIntoJs(): boolean;
|
||||
terminatedOrTerminating(): boolean;
|
||||
ref(): void;
|
||||
unref(): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
ensureHandleId(value: any): napi_value;
|
||||
clearLastError(): napi_status;
|
||||
setLastError(error_code: napi_status, engine_error_code?: uint32_t, engine_reserved?: void_p): napi_status;
|
||||
getReturnStatus(): napi_status;
|
||||
callIntoModule<T>(fn: (env: Env) => T, handleException?: (envObject: Env, value: any) => void): T;
|
||||
/** @virtual */
|
||||
abstract callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
invokeFinalizerFromGC(finalizer: RefTracker): void;
|
||||
checkGCAccess(): void;
|
||||
/** @virtual */
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
dequeueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
deleteMe(): void;
|
||||
dispose(): void;
|
||||
private readonly _bindingMap;
|
||||
initObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
getObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
setInstanceData(data: number, finalize_cb: number, finalize_hint: number): void;
|
||||
getInstanceData(): number;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare interface External_2 extends Record<any, any> {
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare const External_2: {
|
||||
new (value: number | bigint): External_2;
|
||||
prototype: null;
|
||||
};
|
||||
export { External_2 as External }
|
||||
|
||||
export declare class Finalizer {
|
||||
envObject: Env;
|
||||
private _finalizeCallback;
|
||||
private _finalizeData;
|
||||
private _finalizeHint;
|
||||
private _makeDynCall_vppp;
|
||||
constructor(envObject: Env, _finalizeCallback?: napi_finalize, _finalizeData?: void_p, _finalizeHint?: void_p);
|
||||
callback(): napi_finalize;
|
||||
data(): void_p;
|
||||
hint(): void_p;
|
||||
resetEnv(): void;
|
||||
resetFinalizer(): void;
|
||||
callFinalizer(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare function getDefaultContext(): Context;
|
||||
|
||||
/** @public */
|
||||
export declare function getExternalValue(external: External_2): number | bigint;
|
||||
|
||||
export declare class Handle<S> {
|
||||
id: number;
|
||||
value: S;
|
||||
constructor(id: number, value: S);
|
||||
data(): void_p;
|
||||
isNumber(): boolean;
|
||||
isBigInt(): boolean;
|
||||
isString(): boolean;
|
||||
isFunction(): boolean;
|
||||
isExternal(): boolean;
|
||||
isObject(): boolean;
|
||||
isArray(): boolean;
|
||||
isArrayBuffer(): boolean;
|
||||
isTypedArray(): boolean;
|
||||
isBuffer(BufferConstructor?: BufferCtor): boolean;
|
||||
isDataView(): boolean;
|
||||
isDate(): boolean;
|
||||
isPromise(): boolean;
|
||||
isBoolean(): boolean;
|
||||
isUndefined(): boolean;
|
||||
isSymbol(): boolean;
|
||||
isNull(): boolean;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class HandleScope {
|
||||
handleStore: HandleStore;
|
||||
id: number;
|
||||
parent: HandleScope | null;
|
||||
child: HandleScope | null;
|
||||
start: number;
|
||||
end: number;
|
||||
private _escapeCalled;
|
||||
callbackInfo: ICallbackInfo;
|
||||
constructor(handleStore: HandleStore, id: number, parentScope: HandleScope | null, start: number, end?: number);
|
||||
add<V>(value: V): Handle<V>;
|
||||
addExternal(data: void_p): Handle<object>;
|
||||
dispose(): void;
|
||||
escape(handle: number): Handle<any> | null;
|
||||
escapeCalled(): boolean;
|
||||
}
|
||||
|
||||
export declare class HandleStore {
|
||||
static UNDEFINED: ConstHandle<undefined>;
|
||||
static NULL: ConstHandle<null>;
|
||||
static FALSE: ConstHandle<false>;
|
||||
static TRUE: ConstHandle<true>;
|
||||
static GLOBAL: ConstHandle<typeof globalThis>;
|
||||
static MIN_ID: 6;
|
||||
private readonly _values;
|
||||
private _next;
|
||||
push<S>(value: S): Handle<S>;
|
||||
erase(start: number, end: number): void;
|
||||
get(id: Ptr): Handle<any> | undefined;
|
||||
swap(a: number, b: number): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare interface ICallbackInfo {
|
||||
thiz: any;
|
||||
data: void_p;
|
||||
args: ArrayLike<any>;
|
||||
fn: Function;
|
||||
}
|
||||
|
||||
export declare interface IDeferrdValue<T = any> {
|
||||
resolve: (value: T) => void;
|
||||
reject: (reason?: any) => void;
|
||||
}
|
||||
|
||||
export declare interface IReferenceBinding {
|
||||
wrapped: number;
|
||||
tag: Uint32Array | null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare function isExternal(object: unknown): object is External_2;
|
||||
|
||||
export declare function isReferenceType(v: any): v is object;
|
||||
|
||||
export declare interface IStoreValue {
|
||||
id: number;
|
||||
dispose(): void;
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export declare const NAPI_VERSION_EXPERIMENTAL = Version.NAPI_VERSION_EXPERIMENTAL;
|
||||
|
||||
export declare const NODE_API_DEFAULT_MODULE_API_VERSION = Version.NODE_API_DEFAULT_MODULE_API_VERSION;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MAX = Version.NODE_API_SUPPORTED_VERSION_MAX;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MIN = Version.NODE_API_SUPPORTED_VERSION_MIN;
|
||||
|
||||
export declare class NodeEnv extends Env {
|
||||
filename: string;
|
||||
private readonly nodeBinding?;
|
||||
destructing: boolean;
|
||||
finalizationScheduled: boolean;
|
||||
constructor(ctx: Context, filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any);
|
||||
deleteMe(): void;
|
||||
canCallIntoJs(): boolean;
|
||||
triggerFatalException(err: any): void;
|
||||
callbackIntoModule<T>(enforceUncaughtExceptionPolicy: boolean, fn: (env: Env) => T): T;
|
||||
callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
callFinalizerInternal(forceUncaught: int, cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
drainFinalizerQueue(): void;
|
||||
}
|
||||
|
||||
export declare class NotSupportBufferError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class NotSupportWeakRefError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class Persistent<T> {
|
||||
private _ref;
|
||||
private _param;
|
||||
private _callback;
|
||||
private static readonly _registry;
|
||||
constructor(value: T);
|
||||
setWeak<P>(param: P, callback: (param: P) => void): void;
|
||||
clearWeak(): void;
|
||||
reset(): void;
|
||||
isEmpty(): boolean;
|
||||
deref(): T | undefined;
|
||||
}
|
||||
|
||||
export declare class Reference extends RefTracker implements IStoreValue {
|
||||
private static weakCallback;
|
||||
id: number;
|
||||
envObject: Env;
|
||||
private readonly canBeWeak;
|
||||
private _refcount;
|
||||
private readonly _ownership;
|
||||
persistent: Persistent<object>;
|
||||
static create(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, _unused1?: void_p, _unused2?: void_p, _unused3?: void_p): Reference;
|
||||
protected constructor(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership);
|
||||
ref(): number;
|
||||
unref(): number;
|
||||
get(envObject?: Env): napi_value;
|
||||
/** @virtual */
|
||||
resetFinalizer(): void;
|
||||
/** @virtual */
|
||||
data(): void_p;
|
||||
refcount(): number;
|
||||
ownership(): ReferenceOwnership;
|
||||
/** @virtual */
|
||||
protected callUserFinalizer(): void;
|
||||
/** @virtual */
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
private _setWeak;
|
||||
finalize(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare enum ReferenceOwnership {
|
||||
kRuntime = 0,
|
||||
kUserland = 1
|
||||
}
|
||||
|
||||
export declare class ReferenceWithData extends Reference {
|
||||
private readonly _data;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): ReferenceWithData;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
}
|
||||
|
||||
export declare class ReferenceWithFinalizer extends Reference {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): ReferenceWithFinalizer;
|
||||
private constructor();
|
||||
resetFinalizer(): void;
|
||||
data(): void_p;
|
||||
protected callUserFinalizer(): void;
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class RefTracker {
|
||||
/** @virtual */
|
||||
dispose(): void;
|
||||
/** @virtual */
|
||||
finalize(): void;
|
||||
private _next;
|
||||
private _prev;
|
||||
link(list: RefTracker): void;
|
||||
unlink(): void;
|
||||
static finalizeAll(list: RefTracker): void;
|
||||
}
|
||||
|
||||
export declare class ScopeStore {
|
||||
private readonly _rootScope;
|
||||
currentScope: HandleScope;
|
||||
private readonly _values;
|
||||
constructor();
|
||||
get(id: number): HandleScope | undefined;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Store<V extends IStoreValue> {
|
||||
protected _values: Array<V | undefined>;
|
||||
private _freeList;
|
||||
private _size;
|
||||
constructor();
|
||||
add(value: V): void;
|
||||
get(id: Ptr): V | undefined;
|
||||
has(id: Ptr): boolean;
|
||||
remove(id: Ptr): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class TrackedFinalizer extends RefTracker {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
dispose(): void;
|
||||
finalize(): void;
|
||||
}
|
||||
|
||||
export declare class TryCatch {
|
||||
private _exception;
|
||||
private _caught;
|
||||
isEmpty(): boolean;
|
||||
hasCaught(): boolean;
|
||||
exception(): any;
|
||||
setError(err: any): void;
|
||||
reset(): void;
|
||||
extractException(): any;
|
||||
}
|
||||
|
||||
export declare const version: string;
|
||||
|
||||
export { }
|
||||
1
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.js
generated
vendored
Normal file
1
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.cjs.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
663
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.d.mts
generated
vendored
Normal file
663
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.d.mts
generated
vendored
Normal file
@ -0,0 +1,663 @@
|
||||
export declare type Ptr = number | bigint
|
||||
|
||||
export declare interface IBuffer extends Uint8Array {}
|
||||
export declare interface BufferCtor {
|
||||
readonly prototype: IBuffer
|
||||
/** @deprecated */
|
||||
new (...args: any[]): IBuffer
|
||||
from: {
|
||||
(buffer: ArrayBufferLike): IBuffer
|
||||
(buffer: ArrayBufferLike, byteOffset: number, length: number): IBuffer
|
||||
}
|
||||
alloc: (size: number) => IBuffer
|
||||
isBuffer: (obj: unknown) => obj is IBuffer
|
||||
}
|
||||
|
||||
export declare const enum GlobalHandle {
|
||||
UNDEFINED = 1,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
GLOBAL
|
||||
}
|
||||
|
||||
export declare const enum Version {
|
||||
NODE_API_SUPPORTED_VERSION_MIN = 1,
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION = 8,
|
||||
NODE_API_SUPPORTED_VERSION_MAX = 10,
|
||||
NAPI_VERSION_EXPERIMENTAL = 2147483647 // INT_MAX
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type Pointer<T> = number
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type PointerPointer<T> = number
|
||||
export declare type FunctionPointer<T extends (...args: any[]) => any> = Pointer<T>
|
||||
export declare type Const<T> = T
|
||||
|
||||
export declare type void_p = Pointer<void>
|
||||
export declare type void_pp = Pointer<void_p>
|
||||
export declare type bool = number
|
||||
export declare type char = number
|
||||
export declare type char_p = Pointer<char>
|
||||
export declare type unsigned_char = number
|
||||
export declare type const_char = Const<char>
|
||||
export declare type const_char_p = Pointer<const_char>
|
||||
export declare type char16_t_p = number
|
||||
export declare type const_char16_t_p = number
|
||||
|
||||
export declare type short = number
|
||||
export declare type unsigned_short = number
|
||||
export declare type int = number
|
||||
export declare type unsigned_int = number
|
||||
export declare type long = number
|
||||
export declare type unsigned_long = number
|
||||
export declare type long_long = bigint
|
||||
export declare type unsigned_long_long = bigint
|
||||
export declare type float = number
|
||||
export declare type double = number
|
||||
export declare type long_double = number
|
||||
export declare type size_t = number
|
||||
|
||||
export declare type int8_t = number
|
||||
export declare type uint8_t = number
|
||||
export declare type int16_t = number
|
||||
export declare type uint16_t = number
|
||||
export declare type int32_t = number
|
||||
export declare type uint32_t = number
|
||||
export declare type int64_t = bigint
|
||||
export declare type uint64_t = bigint
|
||||
export declare type napi_env = Pointer<unknown>
|
||||
|
||||
export declare type napi_value = Pointer<unknown>
|
||||
export declare type napi_ref = Pointer<unknown>
|
||||
export declare type napi_deferred = Pointer<unknown>
|
||||
export declare type napi_handle_scope = Pointer<unknown>
|
||||
export declare type napi_escapable_handle_scope = Pointer<unknown>
|
||||
|
||||
export declare type napi_addon_register_func = FunctionPointer<(env: napi_env, exports: napi_value) => napi_value>
|
||||
|
||||
export declare type napi_callback_info = Pointer<unknown>
|
||||
export declare type napi_callback = FunctionPointer<(env: napi_env, info: napi_callback_info) => napi_value>
|
||||
|
||||
export declare interface napi_extended_error_info {
|
||||
error_message: const_char_p
|
||||
engine_reserved: void_p
|
||||
engine_error_code: uint32_t
|
||||
error_code: napi_status
|
||||
}
|
||||
|
||||
export declare interface napi_property_descriptor {
|
||||
// One of utf8name or name should be NULL.
|
||||
utf8name: const_char_p
|
||||
name: napi_value
|
||||
|
||||
method: napi_callback
|
||||
getter: napi_callback
|
||||
setter: napi_callback
|
||||
value: napi_value
|
||||
/* napi_property_attributes */
|
||||
attributes: number
|
||||
data: void_p
|
||||
}
|
||||
|
||||
export declare type napi_finalize = FunctionPointer<(
|
||||
env: napi_env,
|
||||
finalize_data: void_p,
|
||||
finalize_hint: void_p
|
||||
) => void>
|
||||
|
||||
export declare interface node_module {
|
||||
nm_version: int32_t
|
||||
nm_flags: uint32_t
|
||||
nm_filename: Pointer<const_char>
|
||||
nm_register_func: napi_addon_register_func
|
||||
nm_modname: Pointer<const_char>
|
||||
nm_priv: Pointer<void>
|
||||
reserved: PointerPointer<void>
|
||||
}
|
||||
|
||||
export declare interface napi_node_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
release: const_char_p
|
||||
}
|
||||
|
||||
export declare interface emnapi_emscripten_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
}
|
||||
|
||||
export declare const enum napi_status {
|
||||
napi_ok,
|
||||
napi_invalid_arg,
|
||||
napi_object_expected,
|
||||
napi_string_expected,
|
||||
napi_name_expected,
|
||||
napi_function_expected,
|
||||
napi_number_expected,
|
||||
napi_boolean_expected,
|
||||
napi_array_expected,
|
||||
napi_generic_failure,
|
||||
napi_pending_exception,
|
||||
napi_cancelled,
|
||||
napi_escape_called_twice,
|
||||
napi_handle_scope_mismatch,
|
||||
napi_callback_scope_mismatch,
|
||||
napi_queue_full,
|
||||
napi_closing,
|
||||
napi_bigint_expected,
|
||||
napi_date_expected,
|
||||
napi_arraybuffer_expected,
|
||||
napi_detachable_arraybuffer_expected,
|
||||
napi_would_deadlock, // unused
|
||||
napi_no_external_buffers_allowed,
|
||||
napi_cannot_run_js
|
||||
}
|
||||
|
||||
export declare const enum napi_property_attributes {
|
||||
napi_default = 0,
|
||||
napi_writable = 1 << 0,
|
||||
napi_enumerable = 1 << 1,
|
||||
napi_configurable = 1 << 2,
|
||||
|
||||
// Used with napi_define_class to distinguish static properties
|
||||
// from instance properties. Ignored by napi_define_properties.
|
||||
napi_static = 1 << 10,
|
||||
|
||||
/// #ifdef NAPI_EXPERIMENTAL
|
||||
// Default for class methods.
|
||||
napi_default_method = napi_writable | napi_configurable,
|
||||
|
||||
// Default for object properties, like in JS obj[prop].
|
||||
napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable
|
||||
/// #endif // NAPI_EXPERIMENTAL
|
||||
}
|
||||
|
||||
export declare const enum napi_valuetype {
|
||||
napi_undefined,
|
||||
napi_null,
|
||||
napi_boolean,
|
||||
napi_number,
|
||||
napi_string,
|
||||
napi_symbol,
|
||||
napi_object,
|
||||
napi_function,
|
||||
napi_external,
|
||||
napi_bigint
|
||||
}
|
||||
|
||||
export declare const enum napi_typedarray_type {
|
||||
napi_int8_array,
|
||||
napi_uint8_array,
|
||||
napi_uint8_clamped_array,
|
||||
napi_int16_array,
|
||||
napi_uint16_array,
|
||||
napi_int32_array,
|
||||
napi_uint32_array,
|
||||
napi_float32_array,
|
||||
napi_float64_array,
|
||||
napi_bigint64_array,
|
||||
napi_biguint64_array
|
||||
}
|
||||
|
||||
export declare const enum napi_key_collection_mode {
|
||||
napi_key_include_prototypes,
|
||||
napi_key_own_only
|
||||
}
|
||||
|
||||
export declare const enum napi_key_filter {
|
||||
napi_key_all_properties = 0,
|
||||
napi_key_writable = 1,
|
||||
napi_key_enumerable = 1 << 1,
|
||||
napi_key_configurable = 1 << 2,
|
||||
napi_key_skip_strings = 1 << 3,
|
||||
napi_key_skip_symbols = 1 << 4
|
||||
}
|
||||
|
||||
export declare const enum napi_key_conversion {
|
||||
napi_key_keep_numbers,
|
||||
napi_key_numbers_to_strings
|
||||
}
|
||||
|
||||
export declare const enum emnapi_memory_view_type {
|
||||
emnapi_int8_array,
|
||||
emnapi_uint8_array,
|
||||
emnapi_uint8_clamped_array,
|
||||
emnapi_int16_array,
|
||||
emnapi_uint16_array,
|
||||
emnapi_int32_array,
|
||||
emnapi_uint32_array,
|
||||
emnapi_float32_array,
|
||||
emnapi_float64_array,
|
||||
emnapi_bigint64_array,
|
||||
emnapi_biguint64_array,
|
||||
emnapi_data_view = -1,
|
||||
emnapi_buffer = -2
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_call_mode {
|
||||
napi_tsfn_nonblocking,
|
||||
napi_tsfn_blocking
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_release_mode {
|
||||
napi_tsfn_release,
|
||||
napi_tsfn_abort
|
||||
}
|
||||
export declare type CleanupHookCallbackFunction = number | ((arg: number) => void);
|
||||
|
||||
export declare class ConstHandle<S extends undefined | null | boolean | typeof globalThis> extends Handle<S> {
|
||||
constructor(id: number, value: S);
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Context {
|
||||
private _isStopping;
|
||||
private _canCallIntoJs;
|
||||
private _suppressDestroy;
|
||||
envStore: Store<Env>;
|
||||
scopeStore: ScopeStore;
|
||||
refStore: Store<Reference>;
|
||||
deferredStore: Store<Deferred<any>>;
|
||||
handleStore: HandleStore;
|
||||
private readonly refCounter?;
|
||||
private readonly cleanupQueue;
|
||||
feature: {
|
||||
supportReflect: boolean;
|
||||
supportFinalizer: boolean;
|
||||
supportWeakSymbol: boolean;
|
||||
supportBigInt: boolean;
|
||||
supportNewFunction: boolean;
|
||||
canSetFunctionName: boolean;
|
||||
setImmediate: (callback: () => void) => void;
|
||||
Buffer: BufferCtor | undefined;
|
||||
MessageChannel: {
|
||||
new (): MessageChannel;
|
||||
prototype: MessageChannel;
|
||||
} | undefined;
|
||||
};
|
||||
constructor();
|
||||
/**
|
||||
* Suppress the destroy on `beforeExit` event in Node.js.
|
||||
* Call this method if you want to keep the context and
|
||||
* all associated {@link Env | Env} alive,
|
||||
* this also means that cleanup hooks will not be called.
|
||||
* After call this method, you should call
|
||||
* {@link Context.destroy | `Context.prototype.destroy`} method manually.
|
||||
*/
|
||||
suppressDestroy(): void;
|
||||
getRuntimeVersions(): {
|
||||
version: string;
|
||||
NODE_API_SUPPORTED_VERSION_MAX: Version;
|
||||
NAPI_VERSION_EXPERIMENTAL: Version;
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION: Version;
|
||||
};
|
||||
createNotSupportWeakRefError(api: string, message: string): NotSupportWeakRefError;
|
||||
createNotSupportBufferError(api: string, message: string): NotSupportBufferError;
|
||||
createReference(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership): Reference;
|
||||
createReferenceWithData(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): Reference;
|
||||
createReferenceWithFinalizer(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback?: napi_finalize, finalize_data?: void_p, finalize_hint?: void_p): Reference;
|
||||
createDeferred<T = any>(value: IDeferrdValue<T>): Deferred<T>;
|
||||
createEnv(filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any): Env;
|
||||
createTrackedFinalizer(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
getCurrentScope(): HandleScope | null;
|
||||
addToCurrentScope<V>(value: V): Handle<V>;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env, _scope?: HandleScope): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
addCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
removeCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
runCleanup(): void;
|
||||
increaseWaitingRequestCounter(): void;
|
||||
decreaseWaitingRequestCounter(): void;
|
||||
setCanCallIntoJs(value: boolean): void;
|
||||
setStopping(value: boolean): void;
|
||||
canCallIntoJs(): boolean;
|
||||
/**
|
||||
* Destroy the context and call cleanup hooks.
|
||||
* Associated {@link Env | Env} will be destroyed.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export declare function createContext(): Context;
|
||||
|
||||
export declare class Deferred<T = any> implements IStoreValue {
|
||||
static create<T = any>(ctx: Context, value: IDeferrdValue<T>): Deferred;
|
||||
id: number;
|
||||
ctx: Context;
|
||||
value: IDeferrdValue<T>;
|
||||
constructor(ctx: Context, value: IDeferrdValue<T>);
|
||||
resolve(value: T): void;
|
||||
reject(reason?: any): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class EmnapiError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
|
||||
export declare abstract class Env implements IStoreValue {
|
||||
readonly ctx: Context;
|
||||
moduleApiVersion: number;
|
||||
makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void;
|
||||
makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void;
|
||||
abort: (msg?: string) => never;
|
||||
id: number;
|
||||
openHandleScopes: number;
|
||||
instanceData: TrackedFinalizer | null;
|
||||
tryCatch: TryCatch;
|
||||
refs: number;
|
||||
reflist: RefTracker;
|
||||
finalizing_reflist: RefTracker;
|
||||
pendingFinalizers: RefTracker[];
|
||||
lastError: {
|
||||
errorCode: napi_status;
|
||||
engineErrorCode: number;
|
||||
engineReserved: Ptr;
|
||||
};
|
||||
inGcFinalizer: boolean;
|
||||
constructor(ctx: Context, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never);
|
||||
/** @virtual */
|
||||
canCallIntoJs(): boolean;
|
||||
terminatedOrTerminating(): boolean;
|
||||
ref(): void;
|
||||
unref(): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
ensureHandleId(value: any): napi_value;
|
||||
clearLastError(): napi_status;
|
||||
setLastError(error_code: napi_status, engine_error_code?: uint32_t, engine_reserved?: void_p): napi_status;
|
||||
getReturnStatus(): napi_status;
|
||||
callIntoModule<T>(fn: (env: Env) => T, handleException?: (envObject: Env, value: any) => void): T;
|
||||
/** @virtual */
|
||||
abstract callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
invokeFinalizerFromGC(finalizer: RefTracker): void;
|
||||
checkGCAccess(): void;
|
||||
/** @virtual */
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
dequeueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
deleteMe(): void;
|
||||
dispose(): void;
|
||||
private readonly _bindingMap;
|
||||
initObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
getObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
setInstanceData(data: number, finalize_cb: number, finalize_hint: number): void;
|
||||
getInstanceData(): number;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare interface External_2 extends Record<any, any> {
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare const External_2: {
|
||||
new (value: number | bigint): External_2;
|
||||
prototype: null;
|
||||
};
|
||||
export { External_2 as External }
|
||||
|
||||
export declare class Finalizer {
|
||||
envObject: Env;
|
||||
private _finalizeCallback;
|
||||
private _finalizeData;
|
||||
private _finalizeHint;
|
||||
private _makeDynCall_vppp;
|
||||
constructor(envObject: Env, _finalizeCallback?: napi_finalize, _finalizeData?: void_p, _finalizeHint?: void_p);
|
||||
callback(): napi_finalize;
|
||||
data(): void_p;
|
||||
hint(): void_p;
|
||||
resetEnv(): void;
|
||||
resetFinalizer(): void;
|
||||
callFinalizer(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare function getDefaultContext(): Context;
|
||||
|
||||
/** @public */
|
||||
export declare function getExternalValue(external: External_2): number | bigint;
|
||||
|
||||
export declare class Handle<S> {
|
||||
id: number;
|
||||
value: S;
|
||||
constructor(id: number, value: S);
|
||||
data(): void_p;
|
||||
isNumber(): boolean;
|
||||
isBigInt(): boolean;
|
||||
isString(): boolean;
|
||||
isFunction(): boolean;
|
||||
isExternal(): boolean;
|
||||
isObject(): boolean;
|
||||
isArray(): boolean;
|
||||
isArrayBuffer(): boolean;
|
||||
isTypedArray(): boolean;
|
||||
isBuffer(BufferConstructor?: BufferCtor): boolean;
|
||||
isDataView(): boolean;
|
||||
isDate(): boolean;
|
||||
isPromise(): boolean;
|
||||
isBoolean(): boolean;
|
||||
isUndefined(): boolean;
|
||||
isSymbol(): boolean;
|
||||
isNull(): boolean;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class HandleScope {
|
||||
handleStore: HandleStore;
|
||||
id: number;
|
||||
parent: HandleScope | null;
|
||||
child: HandleScope | null;
|
||||
start: number;
|
||||
end: number;
|
||||
private _escapeCalled;
|
||||
callbackInfo: ICallbackInfo;
|
||||
constructor(handleStore: HandleStore, id: number, parentScope: HandleScope | null, start: number, end?: number);
|
||||
add<V>(value: V): Handle<V>;
|
||||
addExternal(data: void_p): Handle<object>;
|
||||
dispose(): void;
|
||||
escape(handle: number): Handle<any> | null;
|
||||
escapeCalled(): boolean;
|
||||
}
|
||||
|
||||
export declare class HandleStore {
|
||||
static UNDEFINED: ConstHandle<undefined>;
|
||||
static NULL: ConstHandle<null>;
|
||||
static FALSE: ConstHandle<false>;
|
||||
static TRUE: ConstHandle<true>;
|
||||
static GLOBAL: ConstHandle<typeof globalThis>;
|
||||
static MIN_ID: 6;
|
||||
private readonly _values;
|
||||
private _next;
|
||||
push<S>(value: S): Handle<S>;
|
||||
erase(start: number, end: number): void;
|
||||
get(id: Ptr): Handle<any> | undefined;
|
||||
swap(a: number, b: number): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare interface ICallbackInfo {
|
||||
thiz: any;
|
||||
data: void_p;
|
||||
args: ArrayLike<any>;
|
||||
fn: Function;
|
||||
}
|
||||
|
||||
export declare interface IDeferrdValue<T = any> {
|
||||
resolve: (value: T) => void;
|
||||
reject: (reason?: any) => void;
|
||||
}
|
||||
|
||||
export declare interface IReferenceBinding {
|
||||
wrapped: number;
|
||||
tag: Uint32Array | null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare function isExternal(object: unknown): object is External_2;
|
||||
|
||||
export declare function isReferenceType(v: any): v is object;
|
||||
|
||||
export declare interface IStoreValue {
|
||||
id: number;
|
||||
dispose(): void;
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export declare const NAPI_VERSION_EXPERIMENTAL = Version.NAPI_VERSION_EXPERIMENTAL;
|
||||
|
||||
export declare const NODE_API_DEFAULT_MODULE_API_VERSION = Version.NODE_API_DEFAULT_MODULE_API_VERSION;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MAX = Version.NODE_API_SUPPORTED_VERSION_MAX;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MIN = Version.NODE_API_SUPPORTED_VERSION_MIN;
|
||||
|
||||
export declare class NodeEnv extends Env {
|
||||
filename: string;
|
||||
private readonly nodeBinding?;
|
||||
destructing: boolean;
|
||||
finalizationScheduled: boolean;
|
||||
constructor(ctx: Context, filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any);
|
||||
deleteMe(): void;
|
||||
canCallIntoJs(): boolean;
|
||||
triggerFatalException(err: any): void;
|
||||
callbackIntoModule<T>(enforceUncaughtExceptionPolicy: boolean, fn: (env: Env) => T): T;
|
||||
callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
callFinalizerInternal(forceUncaught: int, cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
drainFinalizerQueue(): void;
|
||||
}
|
||||
|
||||
export declare class NotSupportBufferError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class NotSupportWeakRefError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class Persistent<T> {
|
||||
private _ref;
|
||||
private _param;
|
||||
private _callback;
|
||||
private static readonly _registry;
|
||||
constructor(value: T);
|
||||
setWeak<P>(param: P, callback: (param: P) => void): void;
|
||||
clearWeak(): void;
|
||||
reset(): void;
|
||||
isEmpty(): boolean;
|
||||
deref(): T | undefined;
|
||||
}
|
||||
|
||||
export declare class Reference extends RefTracker implements IStoreValue {
|
||||
private static weakCallback;
|
||||
id: number;
|
||||
envObject: Env;
|
||||
private readonly canBeWeak;
|
||||
private _refcount;
|
||||
private readonly _ownership;
|
||||
persistent: Persistent<object>;
|
||||
static create(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, _unused1?: void_p, _unused2?: void_p, _unused3?: void_p): Reference;
|
||||
protected constructor(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership);
|
||||
ref(): number;
|
||||
unref(): number;
|
||||
get(envObject?: Env): napi_value;
|
||||
/** @virtual */
|
||||
resetFinalizer(): void;
|
||||
/** @virtual */
|
||||
data(): void_p;
|
||||
refcount(): number;
|
||||
ownership(): ReferenceOwnership;
|
||||
/** @virtual */
|
||||
protected callUserFinalizer(): void;
|
||||
/** @virtual */
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
private _setWeak;
|
||||
finalize(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare enum ReferenceOwnership {
|
||||
kRuntime = 0,
|
||||
kUserland = 1
|
||||
}
|
||||
|
||||
export declare class ReferenceWithData extends Reference {
|
||||
private readonly _data;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): ReferenceWithData;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
}
|
||||
|
||||
export declare class ReferenceWithFinalizer extends Reference {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): ReferenceWithFinalizer;
|
||||
private constructor();
|
||||
resetFinalizer(): void;
|
||||
data(): void_p;
|
||||
protected callUserFinalizer(): void;
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class RefTracker {
|
||||
/** @virtual */
|
||||
dispose(): void;
|
||||
/** @virtual */
|
||||
finalize(): void;
|
||||
private _next;
|
||||
private _prev;
|
||||
link(list: RefTracker): void;
|
||||
unlink(): void;
|
||||
static finalizeAll(list: RefTracker): void;
|
||||
}
|
||||
|
||||
export declare class ScopeStore {
|
||||
private readonly _rootScope;
|
||||
currentScope: HandleScope;
|
||||
private readonly _values;
|
||||
constructor();
|
||||
get(id: number): HandleScope | undefined;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Store<V extends IStoreValue> {
|
||||
protected _values: Array<V | undefined>;
|
||||
private _freeList;
|
||||
private _size;
|
||||
constructor();
|
||||
add(value: V): void;
|
||||
get(id: Ptr): V | undefined;
|
||||
has(id: Ptr): boolean;
|
||||
remove(id: Ptr): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class TrackedFinalizer extends RefTracker {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
dispose(): void;
|
||||
finalize(): void;
|
||||
}
|
||||
|
||||
export declare class TryCatch {
|
||||
private _exception;
|
||||
private _caught;
|
||||
isEmpty(): boolean;
|
||||
hasCaught(): boolean;
|
||||
exception(): any;
|
||||
setError(err: any): void;
|
||||
reset(): void;
|
||||
extractException(): any;
|
||||
}
|
||||
|
||||
export declare const version: string;
|
||||
|
||||
export { }
|
||||
665
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.d.ts
generated
vendored
Normal file
665
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.d.ts
generated
vendored
Normal file
@ -0,0 +1,665 @@
|
||||
export declare type Ptr = number | bigint
|
||||
|
||||
export declare interface IBuffer extends Uint8Array {}
|
||||
export declare interface BufferCtor {
|
||||
readonly prototype: IBuffer
|
||||
/** @deprecated */
|
||||
new (...args: any[]): IBuffer
|
||||
from: {
|
||||
(buffer: ArrayBufferLike): IBuffer
|
||||
(buffer: ArrayBufferLike, byteOffset: number, length: number): IBuffer
|
||||
}
|
||||
alloc: (size: number) => IBuffer
|
||||
isBuffer: (obj: unknown) => obj is IBuffer
|
||||
}
|
||||
|
||||
export declare const enum GlobalHandle {
|
||||
UNDEFINED = 1,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
GLOBAL
|
||||
}
|
||||
|
||||
export declare const enum Version {
|
||||
NODE_API_SUPPORTED_VERSION_MIN = 1,
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION = 8,
|
||||
NODE_API_SUPPORTED_VERSION_MAX = 10,
|
||||
NAPI_VERSION_EXPERIMENTAL = 2147483647 // INT_MAX
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type Pointer<T> = number
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type PointerPointer<T> = number
|
||||
export declare type FunctionPointer<T extends (...args: any[]) => any> = Pointer<T>
|
||||
export declare type Const<T> = T
|
||||
|
||||
export declare type void_p = Pointer<void>
|
||||
export declare type void_pp = Pointer<void_p>
|
||||
export declare type bool = number
|
||||
export declare type char = number
|
||||
export declare type char_p = Pointer<char>
|
||||
export declare type unsigned_char = number
|
||||
export declare type const_char = Const<char>
|
||||
export declare type const_char_p = Pointer<const_char>
|
||||
export declare type char16_t_p = number
|
||||
export declare type const_char16_t_p = number
|
||||
|
||||
export declare type short = number
|
||||
export declare type unsigned_short = number
|
||||
export declare type int = number
|
||||
export declare type unsigned_int = number
|
||||
export declare type long = number
|
||||
export declare type unsigned_long = number
|
||||
export declare type long_long = bigint
|
||||
export declare type unsigned_long_long = bigint
|
||||
export declare type float = number
|
||||
export declare type double = number
|
||||
export declare type long_double = number
|
||||
export declare type size_t = number
|
||||
|
||||
export declare type int8_t = number
|
||||
export declare type uint8_t = number
|
||||
export declare type int16_t = number
|
||||
export declare type uint16_t = number
|
||||
export declare type int32_t = number
|
||||
export declare type uint32_t = number
|
||||
export declare type int64_t = bigint
|
||||
export declare type uint64_t = bigint
|
||||
export declare type napi_env = Pointer<unknown>
|
||||
|
||||
export declare type napi_value = Pointer<unknown>
|
||||
export declare type napi_ref = Pointer<unknown>
|
||||
export declare type napi_deferred = Pointer<unknown>
|
||||
export declare type napi_handle_scope = Pointer<unknown>
|
||||
export declare type napi_escapable_handle_scope = Pointer<unknown>
|
||||
|
||||
export declare type napi_addon_register_func = FunctionPointer<(env: napi_env, exports: napi_value) => napi_value>
|
||||
|
||||
export declare type napi_callback_info = Pointer<unknown>
|
||||
export declare type napi_callback = FunctionPointer<(env: napi_env, info: napi_callback_info) => napi_value>
|
||||
|
||||
export declare interface napi_extended_error_info {
|
||||
error_message: const_char_p
|
||||
engine_reserved: void_p
|
||||
engine_error_code: uint32_t
|
||||
error_code: napi_status
|
||||
}
|
||||
|
||||
export declare interface napi_property_descriptor {
|
||||
// One of utf8name or name should be NULL.
|
||||
utf8name: const_char_p
|
||||
name: napi_value
|
||||
|
||||
method: napi_callback
|
||||
getter: napi_callback
|
||||
setter: napi_callback
|
||||
value: napi_value
|
||||
/* napi_property_attributes */
|
||||
attributes: number
|
||||
data: void_p
|
||||
}
|
||||
|
||||
export declare type napi_finalize = FunctionPointer<(
|
||||
env: napi_env,
|
||||
finalize_data: void_p,
|
||||
finalize_hint: void_p
|
||||
) => void>
|
||||
|
||||
export declare interface node_module {
|
||||
nm_version: int32_t
|
||||
nm_flags: uint32_t
|
||||
nm_filename: Pointer<const_char>
|
||||
nm_register_func: napi_addon_register_func
|
||||
nm_modname: Pointer<const_char>
|
||||
nm_priv: Pointer<void>
|
||||
reserved: PointerPointer<void>
|
||||
}
|
||||
|
||||
export declare interface napi_node_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
release: const_char_p
|
||||
}
|
||||
|
||||
export declare interface emnapi_emscripten_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
}
|
||||
|
||||
export declare const enum napi_status {
|
||||
napi_ok,
|
||||
napi_invalid_arg,
|
||||
napi_object_expected,
|
||||
napi_string_expected,
|
||||
napi_name_expected,
|
||||
napi_function_expected,
|
||||
napi_number_expected,
|
||||
napi_boolean_expected,
|
||||
napi_array_expected,
|
||||
napi_generic_failure,
|
||||
napi_pending_exception,
|
||||
napi_cancelled,
|
||||
napi_escape_called_twice,
|
||||
napi_handle_scope_mismatch,
|
||||
napi_callback_scope_mismatch,
|
||||
napi_queue_full,
|
||||
napi_closing,
|
||||
napi_bigint_expected,
|
||||
napi_date_expected,
|
||||
napi_arraybuffer_expected,
|
||||
napi_detachable_arraybuffer_expected,
|
||||
napi_would_deadlock, // unused
|
||||
napi_no_external_buffers_allowed,
|
||||
napi_cannot_run_js
|
||||
}
|
||||
|
||||
export declare const enum napi_property_attributes {
|
||||
napi_default = 0,
|
||||
napi_writable = 1 << 0,
|
||||
napi_enumerable = 1 << 1,
|
||||
napi_configurable = 1 << 2,
|
||||
|
||||
// Used with napi_define_class to distinguish static properties
|
||||
// from instance properties. Ignored by napi_define_properties.
|
||||
napi_static = 1 << 10,
|
||||
|
||||
/// #ifdef NAPI_EXPERIMENTAL
|
||||
// Default for class methods.
|
||||
napi_default_method = napi_writable | napi_configurable,
|
||||
|
||||
// Default for object properties, like in JS obj[prop].
|
||||
napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable
|
||||
/// #endif // NAPI_EXPERIMENTAL
|
||||
}
|
||||
|
||||
export declare const enum napi_valuetype {
|
||||
napi_undefined,
|
||||
napi_null,
|
||||
napi_boolean,
|
||||
napi_number,
|
||||
napi_string,
|
||||
napi_symbol,
|
||||
napi_object,
|
||||
napi_function,
|
||||
napi_external,
|
||||
napi_bigint
|
||||
}
|
||||
|
||||
export declare const enum napi_typedarray_type {
|
||||
napi_int8_array,
|
||||
napi_uint8_array,
|
||||
napi_uint8_clamped_array,
|
||||
napi_int16_array,
|
||||
napi_uint16_array,
|
||||
napi_int32_array,
|
||||
napi_uint32_array,
|
||||
napi_float32_array,
|
||||
napi_float64_array,
|
||||
napi_bigint64_array,
|
||||
napi_biguint64_array
|
||||
}
|
||||
|
||||
export declare const enum napi_key_collection_mode {
|
||||
napi_key_include_prototypes,
|
||||
napi_key_own_only
|
||||
}
|
||||
|
||||
export declare const enum napi_key_filter {
|
||||
napi_key_all_properties = 0,
|
||||
napi_key_writable = 1,
|
||||
napi_key_enumerable = 1 << 1,
|
||||
napi_key_configurable = 1 << 2,
|
||||
napi_key_skip_strings = 1 << 3,
|
||||
napi_key_skip_symbols = 1 << 4
|
||||
}
|
||||
|
||||
export declare const enum napi_key_conversion {
|
||||
napi_key_keep_numbers,
|
||||
napi_key_numbers_to_strings
|
||||
}
|
||||
|
||||
export declare const enum emnapi_memory_view_type {
|
||||
emnapi_int8_array,
|
||||
emnapi_uint8_array,
|
||||
emnapi_uint8_clamped_array,
|
||||
emnapi_int16_array,
|
||||
emnapi_uint16_array,
|
||||
emnapi_int32_array,
|
||||
emnapi_uint32_array,
|
||||
emnapi_float32_array,
|
||||
emnapi_float64_array,
|
||||
emnapi_bigint64_array,
|
||||
emnapi_biguint64_array,
|
||||
emnapi_data_view = -1,
|
||||
emnapi_buffer = -2
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_call_mode {
|
||||
napi_tsfn_nonblocking,
|
||||
napi_tsfn_blocking
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_release_mode {
|
||||
napi_tsfn_release,
|
||||
napi_tsfn_abort
|
||||
}
|
||||
export declare type CleanupHookCallbackFunction = number | ((arg: number) => void);
|
||||
|
||||
export declare class ConstHandle<S extends undefined | null | boolean | typeof globalThis> extends Handle<S> {
|
||||
constructor(id: number, value: S);
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Context {
|
||||
private _isStopping;
|
||||
private _canCallIntoJs;
|
||||
private _suppressDestroy;
|
||||
envStore: Store<Env>;
|
||||
scopeStore: ScopeStore;
|
||||
refStore: Store<Reference>;
|
||||
deferredStore: Store<Deferred<any>>;
|
||||
handleStore: HandleStore;
|
||||
private readonly refCounter?;
|
||||
private readonly cleanupQueue;
|
||||
feature: {
|
||||
supportReflect: boolean;
|
||||
supportFinalizer: boolean;
|
||||
supportWeakSymbol: boolean;
|
||||
supportBigInt: boolean;
|
||||
supportNewFunction: boolean;
|
||||
canSetFunctionName: boolean;
|
||||
setImmediate: (callback: () => void) => void;
|
||||
Buffer: BufferCtor | undefined;
|
||||
MessageChannel: {
|
||||
new (): MessageChannel;
|
||||
prototype: MessageChannel;
|
||||
} | undefined;
|
||||
};
|
||||
constructor();
|
||||
/**
|
||||
* Suppress the destroy on `beforeExit` event in Node.js.
|
||||
* Call this method if you want to keep the context and
|
||||
* all associated {@link Env | Env} alive,
|
||||
* this also means that cleanup hooks will not be called.
|
||||
* After call this method, you should call
|
||||
* {@link Context.destroy | `Context.prototype.destroy`} method manually.
|
||||
*/
|
||||
suppressDestroy(): void;
|
||||
getRuntimeVersions(): {
|
||||
version: string;
|
||||
NODE_API_SUPPORTED_VERSION_MAX: Version;
|
||||
NAPI_VERSION_EXPERIMENTAL: Version;
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION: Version;
|
||||
};
|
||||
createNotSupportWeakRefError(api: string, message: string): NotSupportWeakRefError;
|
||||
createNotSupportBufferError(api: string, message: string): NotSupportBufferError;
|
||||
createReference(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership): Reference;
|
||||
createReferenceWithData(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): Reference;
|
||||
createReferenceWithFinalizer(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback?: napi_finalize, finalize_data?: void_p, finalize_hint?: void_p): Reference;
|
||||
createDeferred<T = any>(value: IDeferrdValue<T>): Deferred<T>;
|
||||
createEnv(filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any): Env;
|
||||
createTrackedFinalizer(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
getCurrentScope(): HandleScope | null;
|
||||
addToCurrentScope<V>(value: V): Handle<V>;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env, _scope?: HandleScope): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
addCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
removeCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
runCleanup(): void;
|
||||
increaseWaitingRequestCounter(): void;
|
||||
decreaseWaitingRequestCounter(): void;
|
||||
setCanCallIntoJs(value: boolean): void;
|
||||
setStopping(value: boolean): void;
|
||||
canCallIntoJs(): boolean;
|
||||
/**
|
||||
* Destroy the context and call cleanup hooks.
|
||||
* Associated {@link Env | Env} will be destroyed.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export declare function createContext(): Context;
|
||||
|
||||
export declare class Deferred<T = any> implements IStoreValue {
|
||||
static create<T = any>(ctx: Context, value: IDeferrdValue<T>): Deferred;
|
||||
id: number;
|
||||
ctx: Context;
|
||||
value: IDeferrdValue<T>;
|
||||
constructor(ctx: Context, value: IDeferrdValue<T>);
|
||||
resolve(value: T): void;
|
||||
reject(reason?: any): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class EmnapiError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
|
||||
export declare abstract class Env implements IStoreValue {
|
||||
readonly ctx: Context;
|
||||
moduleApiVersion: number;
|
||||
makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void;
|
||||
makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void;
|
||||
abort: (msg?: string) => never;
|
||||
id: number;
|
||||
openHandleScopes: number;
|
||||
instanceData: TrackedFinalizer | null;
|
||||
tryCatch: TryCatch;
|
||||
refs: number;
|
||||
reflist: RefTracker;
|
||||
finalizing_reflist: RefTracker;
|
||||
pendingFinalizers: RefTracker[];
|
||||
lastError: {
|
||||
errorCode: napi_status;
|
||||
engineErrorCode: number;
|
||||
engineReserved: Ptr;
|
||||
};
|
||||
inGcFinalizer: boolean;
|
||||
constructor(ctx: Context, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never);
|
||||
/** @virtual */
|
||||
canCallIntoJs(): boolean;
|
||||
terminatedOrTerminating(): boolean;
|
||||
ref(): void;
|
||||
unref(): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
ensureHandleId(value: any): napi_value;
|
||||
clearLastError(): napi_status;
|
||||
setLastError(error_code: napi_status, engine_error_code?: uint32_t, engine_reserved?: void_p): napi_status;
|
||||
getReturnStatus(): napi_status;
|
||||
callIntoModule<T>(fn: (env: Env) => T, handleException?: (envObject: Env, value: any) => void): T;
|
||||
/** @virtual */
|
||||
abstract callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
invokeFinalizerFromGC(finalizer: RefTracker): void;
|
||||
checkGCAccess(): void;
|
||||
/** @virtual */
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
dequeueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
deleteMe(): void;
|
||||
dispose(): void;
|
||||
private readonly _bindingMap;
|
||||
initObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
getObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
setInstanceData(data: number, finalize_cb: number, finalize_hint: number): void;
|
||||
getInstanceData(): number;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare interface External_2 extends Record<any, any> {
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare const External_2: {
|
||||
new (value: number | bigint): External_2;
|
||||
prototype: null;
|
||||
};
|
||||
export { External_2 as External }
|
||||
|
||||
export declare class Finalizer {
|
||||
envObject: Env;
|
||||
private _finalizeCallback;
|
||||
private _finalizeData;
|
||||
private _finalizeHint;
|
||||
private _makeDynCall_vppp;
|
||||
constructor(envObject: Env, _finalizeCallback?: napi_finalize, _finalizeData?: void_p, _finalizeHint?: void_p);
|
||||
callback(): napi_finalize;
|
||||
data(): void_p;
|
||||
hint(): void_p;
|
||||
resetEnv(): void;
|
||||
resetFinalizer(): void;
|
||||
callFinalizer(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare function getDefaultContext(): Context;
|
||||
|
||||
/** @public */
|
||||
export declare function getExternalValue(external: External_2): number | bigint;
|
||||
|
||||
export declare class Handle<S> {
|
||||
id: number;
|
||||
value: S;
|
||||
constructor(id: number, value: S);
|
||||
data(): void_p;
|
||||
isNumber(): boolean;
|
||||
isBigInt(): boolean;
|
||||
isString(): boolean;
|
||||
isFunction(): boolean;
|
||||
isExternal(): boolean;
|
||||
isObject(): boolean;
|
||||
isArray(): boolean;
|
||||
isArrayBuffer(): boolean;
|
||||
isTypedArray(): boolean;
|
||||
isBuffer(BufferConstructor?: BufferCtor): boolean;
|
||||
isDataView(): boolean;
|
||||
isDate(): boolean;
|
||||
isPromise(): boolean;
|
||||
isBoolean(): boolean;
|
||||
isUndefined(): boolean;
|
||||
isSymbol(): boolean;
|
||||
isNull(): boolean;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class HandleScope {
|
||||
handleStore: HandleStore;
|
||||
id: number;
|
||||
parent: HandleScope | null;
|
||||
child: HandleScope | null;
|
||||
start: number;
|
||||
end: number;
|
||||
private _escapeCalled;
|
||||
callbackInfo: ICallbackInfo;
|
||||
constructor(handleStore: HandleStore, id: number, parentScope: HandleScope | null, start: number, end?: number);
|
||||
add<V>(value: V): Handle<V>;
|
||||
addExternal(data: void_p): Handle<object>;
|
||||
dispose(): void;
|
||||
escape(handle: number): Handle<any> | null;
|
||||
escapeCalled(): boolean;
|
||||
}
|
||||
|
||||
export declare class HandleStore {
|
||||
static UNDEFINED: ConstHandle<undefined>;
|
||||
static NULL: ConstHandle<null>;
|
||||
static FALSE: ConstHandle<false>;
|
||||
static TRUE: ConstHandle<true>;
|
||||
static GLOBAL: ConstHandle<typeof globalThis>;
|
||||
static MIN_ID: 6;
|
||||
private readonly _values;
|
||||
private _next;
|
||||
push<S>(value: S): Handle<S>;
|
||||
erase(start: number, end: number): void;
|
||||
get(id: Ptr): Handle<any> | undefined;
|
||||
swap(a: number, b: number): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare interface ICallbackInfo {
|
||||
thiz: any;
|
||||
data: void_p;
|
||||
args: ArrayLike<any>;
|
||||
fn: Function;
|
||||
}
|
||||
|
||||
export declare interface IDeferrdValue<T = any> {
|
||||
resolve: (value: T) => void;
|
||||
reject: (reason?: any) => void;
|
||||
}
|
||||
|
||||
export declare interface IReferenceBinding {
|
||||
wrapped: number;
|
||||
tag: Uint32Array | null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare function isExternal(object: unknown): object is External_2;
|
||||
|
||||
export declare function isReferenceType(v: any): v is object;
|
||||
|
||||
export declare interface IStoreValue {
|
||||
id: number;
|
||||
dispose(): void;
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export declare const NAPI_VERSION_EXPERIMENTAL = Version.NAPI_VERSION_EXPERIMENTAL;
|
||||
|
||||
export declare const NODE_API_DEFAULT_MODULE_API_VERSION = Version.NODE_API_DEFAULT_MODULE_API_VERSION;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MAX = Version.NODE_API_SUPPORTED_VERSION_MAX;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MIN = Version.NODE_API_SUPPORTED_VERSION_MIN;
|
||||
|
||||
export declare class NodeEnv extends Env {
|
||||
filename: string;
|
||||
private readonly nodeBinding?;
|
||||
destructing: boolean;
|
||||
finalizationScheduled: boolean;
|
||||
constructor(ctx: Context, filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any);
|
||||
deleteMe(): void;
|
||||
canCallIntoJs(): boolean;
|
||||
triggerFatalException(err: any): void;
|
||||
callbackIntoModule<T>(enforceUncaughtExceptionPolicy: boolean, fn: (env: Env) => T): T;
|
||||
callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
callFinalizerInternal(forceUncaught: int, cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
drainFinalizerQueue(): void;
|
||||
}
|
||||
|
||||
export declare class NotSupportBufferError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class NotSupportWeakRefError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class Persistent<T> {
|
||||
private _ref;
|
||||
private _param;
|
||||
private _callback;
|
||||
private static readonly _registry;
|
||||
constructor(value: T);
|
||||
setWeak<P>(param: P, callback: (param: P) => void): void;
|
||||
clearWeak(): void;
|
||||
reset(): void;
|
||||
isEmpty(): boolean;
|
||||
deref(): T | undefined;
|
||||
}
|
||||
|
||||
export declare class Reference extends RefTracker implements IStoreValue {
|
||||
private static weakCallback;
|
||||
id: number;
|
||||
envObject: Env;
|
||||
private readonly canBeWeak;
|
||||
private _refcount;
|
||||
private readonly _ownership;
|
||||
persistent: Persistent<object>;
|
||||
static create(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, _unused1?: void_p, _unused2?: void_p, _unused3?: void_p): Reference;
|
||||
protected constructor(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership);
|
||||
ref(): number;
|
||||
unref(): number;
|
||||
get(envObject?: Env): napi_value;
|
||||
/** @virtual */
|
||||
resetFinalizer(): void;
|
||||
/** @virtual */
|
||||
data(): void_p;
|
||||
refcount(): number;
|
||||
ownership(): ReferenceOwnership;
|
||||
/** @virtual */
|
||||
protected callUserFinalizer(): void;
|
||||
/** @virtual */
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
private _setWeak;
|
||||
finalize(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare enum ReferenceOwnership {
|
||||
kRuntime = 0,
|
||||
kUserland = 1
|
||||
}
|
||||
|
||||
export declare class ReferenceWithData extends Reference {
|
||||
private readonly _data;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): ReferenceWithData;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
}
|
||||
|
||||
export declare class ReferenceWithFinalizer extends Reference {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): ReferenceWithFinalizer;
|
||||
private constructor();
|
||||
resetFinalizer(): void;
|
||||
data(): void_p;
|
||||
protected callUserFinalizer(): void;
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class RefTracker {
|
||||
/** @virtual */
|
||||
dispose(): void;
|
||||
/** @virtual */
|
||||
finalize(): void;
|
||||
private _next;
|
||||
private _prev;
|
||||
link(list: RefTracker): void;
|
||||
unlink(): void;
|
||||
static finalizeAll(list: RefTracker): void;
|
||||
}
|
||||
|
||||
export declare class ScopeStore {
|
||||
private readonly _rootScope;
|
||||
currentScope: HandleScope;
|
||||
private readonly _values;
|
||||
constructor();
|
||||
get(id: number): HandleScope | undefined;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Store<V extends IStoreValue> {
|
||||
protected _values: Array<V | undefined>;
|
||||
private _freeList;
|
||||
private _size;
|
||||
constructor();
|
||||
add(value: V): void;
|
||||
get(id: Ptr): V | undefined;
|
||||
has(id: Ptr): boolean;
|
||||
remove(id: Ptr): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class TrackedFinalizer extends RefTracker {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
dispose(): void;
|
||||
finalize(): void;
|
||||
}
|
||||
|
||||
export declare class TryCatch {
|
||||
private _exception;
|
||||
private _caught;
|
||||
isEmpty(): boolean;
|
||||
hasCaught(): boolean;
|
||||
exception(): any;
|
||||
setError(err: any): void;
|
||||
reset(): void;
|
||||
extractException(): any;
|
||||
}
|
||||
|
||||
export declare const version: string;
|
||||
|
||||
export { }
|
||||
|
||||
export as namespace emnapi;
|
||||
1403
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js
generated
vendored
Normal file
1403
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
420
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.iife.d.ts
generated
vendored
Normal file
420
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.iife.d.ts
generated
vendored
Normal file
@ -0,0 +1,420 @@
|
||||
declare namespace emnapi {
|
||||
|
||||
export type CleanupHookCallbackFunction = number | ((arg: number) => void);
|
||||
|
||||
export class ConstHandle<S extends undefined | null | boolean | typeof globalThis> extends Handle<S> {
|
||||
constructor(id: number, value: S);
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class Context {
|
||||
private _isStopping;
|
||||
private _canCallIntoJs;
|
||||
private _suppressDestroy;
|
||||
envStore: Store<Env>;
|
||||
scopeStore: ScopeStore;
|
||||
refStore: Store<Reference>;
|
||||
deferredStore: Store<Deferred<any>>;
|
||||
handleStore: HandleStore;
|
||||
private readonly refCounter?;
|
||||
private readonly cleanupQueue;
|
||||
feature: {
|
||||
supportReflect: boolean;
|
||||
supportFinalizer: boolean;
|
||||
supportWeakSymbol: boolean;
|
||||
supportBigInt: boolean;
|
||||
supportNewFunction: boolean;
|
||||
canSetFunctionName: boolean;
|
||||
setImmediate: (callback: () => void) => void;
|
||||
Buffer: BufferCtor | undefined;
|
||||
MessageChannel: {
|
||||
new (): MessageChannel;
|
||||
prototype: MessageChannel;
|
||||
} | undefined;
|
||||
};
|
||||
constructor();
|
||||
/**
|
||||
* Suppress the destroy on `beforeExit` event in Node.js.
|
||||
* Call this method if you want to keep the context and
|
||||
* all associated {@link Env | Env} alive,
|
||||
* this also means that cleanup hooks will not be called.
|
||||
* After call this method, you should call
|
||||
* {@link Context.destroy | `Context.prototype.destroy`} method manually.
|
||||
*/
|
||||
suppressDestroy(): void;
|
||||
getRuntimeVersions(): {
|
||||
version: string;
|
||||
NODE_API_SUPPORTED_VERSION_MAX: Version;
|
||||
NAPI_VERSION_EXPERIMENTAL: Version;
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION: Version;
|
||||
};
|
||||
createNotSupportWeakRefError(api: string, message: string): NotSupportWeakRefError;
|
||||
createNotSupportBufferError(api: string, message: string): NotSupportBufferError;
|
||||
createReference(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership): Reference;
|
||||
createReferenceWithData(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): Reference;
|
||||
createReferenceWithFinalizer(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback?: napi_finalize, finalize_data?: void_p, finalize_hint?: void_p): Reference;
|
||||
createDeferred<T = any>(value: IDeferrdValue<T>): Deferred<T>;
|
||||
createEnv(filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any): Env;
|
||||
createTrackedFinalizer(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
getCurrentScope(): HandleScope | null;
|
||||
addToCurrentScope<V>(value: V): Handle<V>;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env, _scope?: HandleScope): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
addCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
removeCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
runCleanup(): void;
|
||||
increaseWaitingRequestCounter(): void;
|
||||
decreaseWaitingRequestCounter(): void;
|
||||
setCanCallIntoJs(value: boolean): void;
|
||||
setStopping(value: boolean): void;
|
||||
canCallIntoJs(): boolean;
|
||||
/**
|
||||
* Destroy the context and call cleanup hooks.
|
||||
* Associated {@link Env | Env} will be destroyed.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export function createContext(): Context;
|
||||
|
||||
export class Deferred<T = any> implements IStoreValue {
|
||||
static create<T = any>(ctx: Context, value: IDeferrdValue<T>): Deferred;
|
||||
id: number;
|
||||
ctx: Context;
|
||||
value: IDeferrdValue<T>;
|
||||
constructor(ctx: Context, value: IDeferrdValue<T>);
|
||||
resolve(value: T): void;
|
||||
reject(reason?: any): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class EmnapiError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
|
||||
export abstract class Env implements IStoreValue {
|
||||
readonly ctx: Context;
|
||||
moduleApiVersion: number;
|
||||
makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void;
|
||||
makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void;
|
||||
abort: (msg?: string) => never;
|
||||
id: number;
|
||||
openHandleScopes: number;
|
||||
instanceData: TrackedFinalizer | null;
|
||||
tryCatch: TryCatch;
|
||||
refs: number;
|
||||
reflist: RefTracker;
|
||||
finalizing_reflist: RefTracker;
|
||||
pendingFinalizers: RefTracker[];
|
||||
lastError: {
|
||||
errorCode: napi_status;
|
||||
engineErrorCode: number;
|
||||
engineReserved: Ptr;
|
||||
};
|
||||
inGcFinalizer: boolean;
|
||||
constructor(ctx: Context, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never);
|
||||
/** @virtual */
|
||||
canCallIntoJs(): boolean;
|
||||
terminatedOrTerminating(): boolean;
|
||||
ref(): void;
|
||||
unref(): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
ensureHandleId(value: any): napi_value;
|
||||
clearLastError(): napi_status;
|
||||
setLastError(error_code: napi_status, engine_error_code?: uint32_t, engine_reserved?: void_p): napi_status;
|
||||
getReturnStatus(): napi_status;
|
||||
callIntoModule<T>(fn: (env: Env) => T, handleException?: (envObject: Env, value: any) => void): T;
|
||||
/** @virtual */
|
||||
abstract callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
invokeFinalizerFromGC(finalizer: RefTracker): void;
|
||||
checkGCAccess(): void;
|
||||
/** @virtual */
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
dequeueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
deleteMe(): void;
|
||||
dispose(): void;
|
||||
private readonly _bindingMap;
|
||||
initObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
getObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
setInstanceData(data: number, finalize_cb: number, finalize_hint: number): void;
|
||||
getInstanceData(): number;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
interface External_2 extends Record<any, any> {
|
||||
}
|
||||
|
||||
/** @public */
|
||||
const External_2: {
|
||||
new (value: number | bigint): External_2;
|
||||
prototype: null;
|
||||
};
|
||||
export { External_2 as External }
|
||||
|
||||
export class Finalizer {
|
||||
envObject: Env;
|
||||
private _finalizeCallback;
|
||||
private _finalizeData;
|
||||
private _finalizeHint;
|
||||
private _makeDynCall_vppp;
|
||||
constructor(envObject: Env, _finalizeCallback?: napi_finalize, _finalizeData?: void_p, _finalizeHint?: void_p);
|
||||
callback(): napi_finalize;
|
||||
data(): void_p;
|
||||
hint(): void_p;
|
||||
resetEnv(): void;
|
||||
resetFinalizer(): void;
|
||||
callFinalizer(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export function getDefaultContext(): Context;
|
||||
|
||||
/** @public */
|
||||
export function getExternalValue(external: External_2): number | bigint;
|
||||
|
||||
export class Handle<S> {
|
||||
id: number;
|
||||
value: S;
|
||||
constructor(id: number, value: S);
|
||||
data(): void_p;
|
||||
isNumber(): boolean;
|
||||
isBigInt(): boolean;
|
||||
isString(): boolean;
|
||||
isFunction(): boolean;
|
||||
isExternal(): boolean;
|
||||
isObject(): boolean;
|
||||
isArray(): boolean;
|
||||
isArrayBuffer(): boolean;
|
||||
isTypedArray(): boolean;
|
||||
isBuffer(BufferConstructor?: BufferCtor): boolean;
|
||||
isDataView(): boolean;
|
||||
isDate(): boolean;
|
||||
isPromise(): boolean;
|
||||
isBoolean(): boolean;
|
||||
isUndefined(): boolean;
|
||||
isSymbol(): boolean;
|
||||
isNull(): boolean;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class HandleScope {
|
||||
handleStore: HandleStore;
|
||||
id: number;
|
||||
parent: HandleScope | null;
|
||||
child: HandleScope | null;
|
||||
start: number;
|
||||
end: number;
|
||||
private _escapeCalled;
|
||||
callbackInfo: ICallbackInfo;
|
||||
constructor(handleStore: HandleStore, id: number, parentScope: HandleScope | null, start: number, end?: number);
|
||||
add<V>(value: V): Handle<V>;
|
||||
addExternal(data: void_p): Handle<object>;
|
||||
dispose(): void;
|
||||
escape(handle: number): Handle<any> | null;
|
||||
escapeCalled(): boolean;
|
||||
}
|
||||
|
||||
export class HandleStore {
|
||||
static UNDEFINED: ConstHandle<undefined>;
|
||||
static NULL: ConstHandle<null>;
|
||||
static FALSE: ConstHandle<false>;
|
||||
static TRUE: ConstHandle<true>;
|
||||
static GLOBAL: ConstHandle<typeof globalThis>;
|
||||
static MIN_ID: 6;
|
||||
private readonly _values;
|
||||
private _next;
|
||||
push<S>(value: S): Handle<S>;
|
||||
erase(start: number, end: number): void;
|
||||
get(id: Ptr): Handle<any> | undefined;
|
||||
swap(a: number, b: number): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface ICallbackInfo {
|
||||
thiz: any;
|
||||
data: void_p;
|
||||
args: ArrayLike<any>;
|
||||
fn: Function;
|
||||
}
|
||||
|
||||
export interface IDeferrdValue<T = any> {
|
||||
resolve: (value: T) => void;
|
||||
reject: (reason?: any) => void;
|
||||
}
|
||||
|
||||
export interface IReferenceBinding {
|
||||
wrapped: number;
|
||||
tag: Uint32Array | null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export function isExternal(object: unknown): object is External_2;
|
||||
|
||||
export function isReferenceType(v: any): v is object;
|
||||
|
||||
export interface IStoreValue {
|
||||
id: number;
|
||||
dispose(): void;
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export const NAPI_VERSION_EXPERIMENTAL = Version.NAPI_VERSION_EXPERIMENTAL;
|
||||
|
||||
export const NODE_API_DEFAULT_MODULE_API_VERSION = Version.NODE_API_DEFAULT_MODULE_API_VERSION;
|
||||
|
||||
export const NODE_API_SUPPORTED_VERSION_MAX = Version.NODE_API_SUPPORTED_VERSION_MAX;
|
||||
|
||||
export const NODE_API_SUPPORTED_VERSION_MIN = Version.NODE_API_SUPPORTED_VERSION_MIN;
|
||||
|
||||
export class NodeEnv extends Env {
|
||||
filename: string;
|
||||
private readonly nodeBinding?;
|
||||
destructing: boolean;
|
||||
finalizationScheduled: boolean;
|
||||
constructor(ctx: Context, filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any);
|
||||
deleteMe(): void;
|
||||
canCallIntoJs(): boolean;
|
||||
triggerFatalException(err: any): void;
|
||||
callbackIntoModule<T>(enforceUncaughtExceptionPolicy: boolean, fn: (env: Env) => T): T;
|
||||
callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
callFinalizerInternal(forceUncaught: int, cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
drainFinalizerQueue(): void;
|
||||
}
|
||||
|
||||
export class NotSupportBufferError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export class NotSupportWeakRefError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export class Persistent<T> {
|
||||
private _ref;
|
||||
private _param;
|
||||
private _callback;
|
||||
private static readonly _registry;
|
||||
constructor(value: T);
|
||||
setWeak<P>(param: P, callback: (param: P) => void): void;
|
||||
clearWeak(): void;
|
||||
reset(): void;
|
||||
isEmpty(): boolean;
|
||||
deref(): T | undefined;
|
||||
}
|
||||
|
||||
export class Reference extends RefTracker implements IStoreValue {
|
||||
private static weakCallback;
|
||||
id: number;
|
||||
envObject: Env;
|
||||
private readonly canBeWeak;
|
||||
private _refcount;
|
||||
private readonly _ownership;
|
||||
persistent: Persistent<object>;
|
||||
static create(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, _unused1?: void_p, _unused2?: void_p, _unused3?: void_p): Reference;
|
||||
protected constructor(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership);
|
||||
ref(): number;
|
||||
unref(): number;
|
||||
get(envObject?: Env): napi_value;
|
||||
/** @virtual */
|
||||
resetFinalizer(): void;
|
||||
/** @virtual */
|
||||
data(): void_p;
|
||||
refcount(): number;
|
||||
ownership(): ReferenceOwnership;
|
||||
/** @virtual */
|
||||
protected callUserFinalizer(): void;
|
||||
/** @virtual */
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
private _setWeak;
|
||||
finalize(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export enum ReferenceOwnership {
|
||||
kRuntime = 0,
|
||||
kUserland = 1
|
||||
}
|
||||
|
||||
export class ReferenceWithData extends Reference {
|
||||
private readonly _data;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): ReferenceWithData;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
}
|
||||
|
||||
export class ReferenceWithFinalizer extends Reference {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): ReferenceWithFinalizer;
|
||||
private constructor();
|
||||
resetFinalizer(): void;
|
||||
data(): void_p;
|
||||
protected callUserFinalizer(): void;
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class RefTracker {
|
||||
/** @virtual */
|
||||
dispose(): void;
|
||||
/** @virtual */
|
||||
finalize(): void;
|
||||
private _next;
|
||||
private _prev;
|
||||
link(list: RefTracker): void;
|
||||
unlink(): void;
|
||||
static finalizeAll(list: RefTracker): void;
|
||||
}
|
||||
|
||||
export class ScopeStore {
|
||||
private readonly _rootScope;
|
||||
currentScope: HandleScope;
|
||||
private readonly _values;
|
||||
constructor();
|
||||
get(id: number): HandleScope | undefined;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class Store<V extends IStoreValue> {
|
||||
protected _values: Array<V | undefined>;
|
||||
private _freeList;
|
||||
private _size;
|
||||
constructor();
|
||||
add(value: V): void;
|
||||
get(id: Ptr): V | undefined;
|
||||
has(id: Ptr): boolean;
|
||||
remove(id: Ptr): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class TrackedFinalizer extends RefTracker {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
dispose(): void;
|
||||
finalize(): void;
|
||||
}
|
||||
|
||||
export class TryCatch {
|
||||
private _exception;
|
||||
private _caught;
|
||||
isEmpty(): boolean;
|
||||
hasCaught(): boolean;
|
||||
exception(): any;
|
||||
setError(err: any): void;
|
||||
reset(): void;
|
||||
extractException(): any;
|
||||
}
|
||||
|
||||
export const version: string;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
1474
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.iife.js
generated
vendored
Normal file
1474
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.iife.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1475
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.js
generated
vendored
Normal file
1475
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
663
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.min.d.mts
generated
vendored
Normal file
663
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.min.d.mts
generated
vendored
Normal file
@ -0,0 +1,663 @@
|
||||
export declare type Ptr = number | bigint
|
||||
|
||||
export declare interface IBuffer extends Uint8Array {}
|
||||
export declare interface BufferCtor {
|
||||
readonly prototype: IBuffer
|
||||
/** @deprecated */
|
||||
new (...args: any[]): IBuffer
|
||||
from: {
|
||||
(buffer: ArrayBufferLike): IBuffer
|
||||
(buffer: ArrayBufferLike, byteOffset: number, length: number): IBuffer
|
||||
}
|
||||
alloc: (size: number) => IBuffer
|
||||
isBuffer: (obj: unknown) => obj is IBuffer
|
||||
}
|
||||
|
||||
export declare const enum GlobalHandle {
|
||||
UNDEFINED = 1,
|
||||
NULL,
|
||||
FALSE,
|
||||
TRUE,
|
||||
GLOBAL
|
||||
}
|
||||
|
||||
export declare const enum Version {
|
||||
NODE_API_SUPPORTED_VERSION_MIN = 1,
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION = 8,
|
||||
NODE_API_SUPPORTED_VERSION_MAX = 10,
|
||||
NAPI_VERSION_EXPERIMENTAL = 2147483647 // INT_MAX
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type Pointer<T> = number
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export declare type PointerPointer<T> = number
|
||||
export declare type FunctionPointer<T extends (...args: any[]) => any> = Pointer<T>
|
||||
export declare type Const<T> = T
|
||||
|
||||
export declare type void_p = Pointer<void>
|
||||
export declare type void_pp = Pointer<void_p>
|
||||
export declare type bool = number
|
||||
export declare type char = number
|
||||
export declare type char_p = Pointer<char>
|
||||
export declare type unsigned_char = number
|
||||
export declare type const_char = Const<char>
|
||||
export declare type const_char_p = Pointer<const_char>
|
||||
export declare type char16_t_p = number
|
||||
export declare type const_char16_t_p = number
|
||||
|
||||
export declare type short = number
|
||||
export declare type unsigned_short = number
|
||||
export declare type int = number
|
||||
export declare type unsigned_int = number
|
||||
export declare type long = number
|
||||
export declare type unsigned_long = number
|
||||
export declare type long_long = bigint
|
||||
export declare type unsigned_long_long = bigint
|
||||
export declare type float = number
|
||||
export declare type double = number
|
||||
export declare type long_double = number
|
||||
export declare type size_t = number
|
||||
|
||||
export declare type int8_t = number
|
||||
export declare type uint8_t = number
|
||||
export declare type int16_t = number
|
||||
export declare type uint16_t = number
|
||||
export declare type int32_t = number
|
||||
export declare type uint32_t = number
|
||||
export declare type int64_t = bigint
|
||||
export declare type uint64_t = bigint
|
||||
export declare type napi_env = Pointer<unknown>
|
||||
|
||||
export declare type napi_value = Pointer<unknown>
|
||||
export declare type napi_ref = Pointer<unknown>
|
||||
export declare type napi_deferred = Pointer<unknown>
|
||||
export declare type napi_handle_scope = Pointer<unknown>
|
||||
export declare type napi_escapable_handle_scope = Pointer<unknown>
|
||||
|
||||
export declare type napi_addon_register_func = FunctionPointer<(env: napi_env, exports: napi_value) => napi_value>
|
||||
|
||||
export declare type napi_callback_info = Pointer<unknown>
|
||||
export declare type napi_callback = FunctionPointer<(env: napi_env, info: napi_callback_info) => napi_value>
|
||||
|
||||
export declare interface napi_extended_error_info {
|
||||
error_message: const_char_p
|
||||
engine_reserved: void_p
|
||||
engine_error_code: uint32_t
|
||||
error_code: napi_status
|
||||
}
|
||||
|
||||
export declare interface napi_property_descriptor {
|
||||
// One of utf8name or name should be NULL.
|
||||
utf8name: const_char_p
|
||||
name: napi_value
|
||||
|
||||
method: napi_callback
|
||||
getter: napi_callback
|
||||
setter: napi_callback
|
||||
value: napi_value
|
||||
/* napi_property_attributes */
|
||||
attributes: number
|
||||
data: void_p
|
||||
}
|
||||
|
||||
export declare type napi_finalize = FunctionPointer<(
|
||||
env: napi_env,
|
||||
finalize_data: void_p,
|
||||
finalize_hint: void_p
|
||||
) => void>
|
||||
|
||||
export declare interface node_module {
|
||||
nm_version: int32_t
|
||||
nm_flags: uint32_t
|
||||
nm_filename: Pointer<const_char>
|
||||
nm_register_func: napi_addon_register_func
|
||||
nm_modname: Pointer<const_char>
|
||||
nm_priv: Pointer<void>
|
||||
reserved: PointerPointer<void>
|
||||
}
|
||||
|
||||
export declare interface napi_node_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
release: const_char_p
|
||||
}
|
||||
|
||||
export declare interface emnapi_emscripten_version {
|
||||
major: uint32_t
|
||||
minor: uint32_t
|
||||
patch: uint32_t
|
||||
}
|
||||
|
||||
export declare const enum napi_status {
|
||||
napi_ok,
|
||||
napi_invalid_arg,
|
||||
napi_object_expected,
|
||||
napi_string_expected,
|
||||
napi_name_expected,
|
||||
napi_function_expected,
|
||||
napi_number_expected,
|
||||
napi_boolean_expected,
|
||||
napi_array_expected,
|
||||
napi_generic_failure,
|
||||
napi_pending_exception,
|
||||
napi_cancelled,
|
||||
napi_escape_called_twice,
|
||||
napi_handle_scope_mismatch,
|
||||
napi_callback_scope_mismatch,
|
||||
napi_queue_full,
|
||||
napi_closing,
|
||||
napi_bigint_expected,
|
||||
napi_date_expected,
|
||||
napi_arraybuffer_expected,
|
||||
napi_detachable_arraybuffer_expected,
|
||||
napi_would_deadlock, // unused
|
||||
napi_no_external_buffers_allowed,
|
||||
napi_cannot_run_js
|
||||
}
|
||||
|
||||
export declare const enum napi_property_attributes {
|
||||
napi_default = 0,
|
||||
napi_writable = 1 << 0,
|
||||
napi_enumerable = 1 << 1,
|
||||
napi_configurable = 1 << 2,
|
||||
|
||||
// Used with napi_define_class to distinguish static properties
|
||||
// from instance properties. Ignored by napi_define_properties.
|
||||
napi_static = 1 << 10,
|
||||
|
||||
/// #ifdef NAPI_EXPERIMENTAL
|
||||
// Default for class methods.
|
||||
napi_default_method = napi_writable | napi_configurable,
|
||||
|
||||
// Default for object properties, like in JS obj[prop].
|
||||
napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable
|
||||
/// #endif // NAPI_EXPERIMENTAL
|
||||
}
|
||||
|
||||
export declare const enum napi_valuetype {
|
||||
napi_undefined,
|
||||
napi_null,
|
||||
napi_boolean,
|
||||
napi_number,
|
||||
napi_string,
|
||||
napi_symbol,
|
||||
napi_object,
|
||||
napi_function,
|
||||
napi_external,
|
||||
napi_bigint
|
||||
}
|
||||
|
||||
export declare const enum napi_typedarray_type {
|
||||
napi_int8_array,
|
||||
napi_uint8_array,
|
||||
napi_uint8_clamped_array,
|
||||
napi_int16_array,
|
||||
napi_uint16_array,
|
||||
napi_int32_array,
|
||||
napi_uint32_array,
|
||||
napi_float32_array,
|
||||
napi_float64_array,
|
||||
napi_bigint64_array,
|
||||
napi_biguint64_array
|
||||
}
|
||||
|
||||
export declare const enum napi_key_collection_mode {
|
||||
napi_key_include_prototypes,
|
||||
napi_key_own_only
|
||||
}
|
||||
|
||||
export declare const enum napi_key_filter {
|
||||
napi_key_all_properties = 0,
|
||||
napi_key_writable = 1,
|
||||
napi_key_enumerable = 1 << 1,
|
||||
napi_key_configurable = 1 << 2,
|
||||
napi_key_skip_strings = 1 << 3,
|
||||
napi_key_skip_symbols = 1 << 4
|
||||
}
|
||||
|
||||
export declare const enum napi_key_conversion {
|
||||
napi_key_keep_numbers,
|
||||
napi_key_numbers_to_strings
|
||||
}
|
||||
|
||||
export declare const enum emnapi_memory_view_type {
|
||||
emnapi_int8_array,
|
||||
emnapi_uint8_array,
|
||||
emnapi_uint8_clamped_array,
|
||||
emnapi_int16_array,
|
||||
emnapi_uint16_array,
|
||||
emnapi_int32_array,
|
||||
emnapi_uint32_array,
|
||||
emnapi_float32_array,
|
||||
emnapi_float64_array,
|
||||
emnapi_bigint64_array,
|
||||
emnapi_biguint64_array,
|
||||
emnapi_data_view = -1,
|
||||
emnapi_buffer = -2
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_call_mode {
|
||||
napi_tsfn_nonblocking,
|
||||
napi_tsfn_blocking
|
||||
}
|
||||
|
||||
export declare const enum napi_threadsafe_function_release_mode {
|
||||
napi_tsfn_release,
|
||||
napi_tsfn_abort
|
||||
}
|
||||
export declare type CleanupHookCallbackFunction = number | ((arg: number) => void);
|
||||
|
||||
export declare class ConstHandle<S extends undefined | null | boolean | typeof globalThis> extends Handle<S> {
|
||||
constructor(id: number, value: S);
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Context {
|
||||
private _isStopping;
|
||||
private _canCallIntoJs;
|
||||
private _suppressDestroy;
|
||||
envStore: Store<Env>;
|
||||
scopeStore: ScopeStore;
|
||||
refStore: Store<Reference>;
|
||||
deferredStore: Store<Deferred<any>>;
|
||||
handleStore: HandleStore;
|
||||
private readonly refCounter?;
|
||||
private readonly cleanupQueue;
|
||||
feature: {
|
||||
supportReflect: boolean;
|
||||
supportFinalizer: boolean;
|
||||
supportWeakSymbol: boolean;
|
||||
supportBigInt: boolean;
|
||||
supportNewFunction: boolean;
|
||||
canSetFunctionName: boolean;
|
||||
setImmediate: (callback: () => void) => void;
|
||||
Buffer: BufferCtor | undefined;
|
||||
MessageChannel: {
|
||||
new (): MessageChannel;
|
||||
prototype: MessageChannel;
|
||||
} | undefined;
|
||||
};
|
||||
constructor();
|
||||
/**
|
||||
* Suppress the destroy on `beforeExit` event in Node.js.
|
||||
* Call this method if you want to keep the context and
|
||||
* all associated {@link Env | Env} alive,
|
||||
* this also means that cleanup hooks will not be called.
|
||||
* After call this method, you should call
|
||||
* {@link Context.destroy | `Context.prototype.destroy`} method manually.
|
||||
*/
|
||||
suppressDestroy(): void;
|
||||
getRuntimeVersions(): {
|
||||
version: string;
|
||||
NODE_API_SUPPORTED_VERSION_MAX: Version;
|
||||
NAPI_VERSION_EXPERIMENTAL: Version;
|
||||
NODE_API_DEFAULT_MODULE_API_VERSION: Version;
|
||||
};
|
||||
createNotSupportWeakRefError(api: string, message: string): NotSupportWeakRefError;
|
||||
createNotSupportBufferError(api: string, message: string): NotSupportBufferError;
|
||||
createReference(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership): Reference;
|
||||
createReferenceWithData(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): Reference;
|
||||
createReferenceWithFinalizer(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback?: napi_finalize, finalize_data?: void_p, finalize_hint?: void_p): Reference;
|
||||
createDeferred<T = any>(value: IDeferrdValue<T>): Deferred<T>;
|
||||
createEnv(filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any): Env;
|
||||
createTrackedFinalizer(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
getCurrentScope(): HandleScope | null;
|
||||
addToCurrentScope<V>(value: V): Handle<V>;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env, _scope?: HandleScope): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
addCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
removeCleanupHook(envObject: Env, fn: CleanupHookCallbackFunction, arg: number): void;
|
||||
runCleanup(): void;
|
||||
increaseWaitingRequestCounter(): void;
|
||||
decreaseWaitingRequestCounter(): void;
|
||||
setCanCallIntoJs(value: boolean): void;
|
||||
setStopping(value: boolean): void;
|
||||
canCallIntoJs(): boolean;
|
||||
/**
|
||||
* Destroy the context and call cleanup hooks.
|
||||
* Associated {@link Env | Env} will be destroyed.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
export declare function createContext(): Context;
|
||||
|
||||
export declare class Deferred<T = any> implements IStoreValue {
|
||||
static create<T = any>(ctx: Context, value: IDeferrdValue<T>): Deferred;
|
||||
id: number;
|
||||
ctx: Context;
|
||||
value: IDeferrdValue<T>;
|
||||
constructor(ctx: Context, value: IDeferrdValue<T>);
|
||||
resolve(value: T): void;
|
||||
reject(reason?: any): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class EmnapiError extends Error {
|
||||
constructor(message?: string);
|
||||
}
|
||||
|
||||
export declare abstract class Env implements IStoreValue {
|
||||
readonly ctx: Context;
|
||||
moduleApiVersion: number;
|
||||
makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void;
|
||||
makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void;
|
||||
abort: (msg?: string) => never;
|
||||
id: number;
|
||||
openHandleScopes: number;
|
||||
instanceData: TrackedFinalizer | null;
|
||||
tryCatch: TryCatch;
|
||||
refs: number;
|
||||
reflist: RefTracker;
|
||||
finalizing_reflist: RefTracker;
|
||||
pendingFinalizers: RefTracker[];
|
||||
lastError: {
|
||||
errorCode: napi_status;
|
||||
engineErrorCode: number;
|
||||
engineReserved: Ptr;
|
||||
};
|
||||
inGcFinalizer: boolean;
|
||||
constructor(ctx: Context, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never);
|
||||
/** @virtual */
|
||||
canCallIntoJs(): boolean;
|
||||
terminatedOrTerminating(): boolean;
|
||||
ref(): void;
|
||||
unref(): void;
|
||||
ensureHandle<S>(value: S): Handle<S>;
|
||||
ensureHandleId(value: any): napi_value;
|
||||
clearLastError(): napi_status;
|
||||
setLastError(error_code: napi_status, engine_error_code?: uint32_t, engine_reserved?: void_p): napi_status;
|
||||
getReturnStatus(): napi_status;
|
||||
callIntoModule<T>(fn: (env: Env) => T, handleException?: (envObject: Env, value: any) => void): T;
|
||||
/** @virtual */
|
||||
abstract callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
invokeFinalizerFromGC(finalizer: RefTracker): void;
|
||||
checkGCAccess(): void;
|
||||
/** @virtual */
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
dequeueFinalizer(finalizer: RefTracker): void;
|
||||
/** @virtual */
|
||||
deleteMe(): void;
|
||||
dispose(): void;
|
||||
private readonly _bindingMap;
|
||||
initObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
getObjectBinding<S extends object>(value: S): IReferenceBinding;
|
||||
setInstanceData(data: number, finalize_cb: number, finalize_hint: number): void;
|
||||
getInstanceData(): number;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare interface External_2 extends Record<any, any> {
|
||||
}
|
||||
|
||||
/** @public */
|
||||
declare const External_2: {
|
||||
new (value: number | bigint): External_2;
|
||||
prototype: null;
|
||||
};
|
||||
export { External_2 as External }
|
||||
|
||||
export declare class Finalizer {
|
||||
envObject: Env;
|
||||
private _finalizeCallback;
|
||||
private _finalizeData;
|
||||
private _finalizeHint;
|
||||
private _makeDynCall_vppp;
|
||||
constructor(envObject: Env, _finalizeCallback?: napi_finalize, _finalizeData?: void_p, _finalizeHint?: void_p);
|
||||
callback(): napi_finalize;
|
||||
data(): void_p;
|
||||
hint(): void_p;
|
||||
resetEnv(): void;
|
||||
resetFinalizer(): void;
|
||||
callFinalizer(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare function getDefaultContext(): Context;
|
||||
|
||||
/** @public */
|
||||
export declare function getExternalValue(external: External_2): number | bigint;
|
||||
|
||||
export declare class Handle<S> {
|
||||
id: number;
|
||||
value: S;
|
||||
constructor(id: number, value: S);
|
||||
data(): void_p;
|
||||
isNumber(): boolean;
|
||||
isBigInt(): boolean;
|
||||
isString(): boolean;
|
||||
isFunction(): boolean;
|
||||
isExternal(): boolean;
|
||||
isObject(): boolean;
|
||||
isArray(): boolean;
|
||||
isArrayBuffer(): boolean;
|
||||
isTypedArray(): boolean;
|
||||
isBuffer(BufferConstructor?: BufferCtor): boolean;
|
||||
isDataView(): boolean;
|
||||
isDate(): boolean;
|
||||
isPromise(): boolean;
|
||||
isBoolean(): boolean;
|
||||
isUndefined(): boolean;
|
||||
isSymbol(): boolean;
|
||||
isNull(): boolean;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class HandleScope {
|
||||
handleStore: HandleStore;
|
||||
id: number;
|
||||
parent: HandleScope | null;
|
||||
child: HandleScope | null;
|
||||
start: number;
|
||||
end: number;
|
||||
private _escapeCalled;
|
||||
callbackInfo: ICallbackInfo;
|
||||
constructor(handleStore: HandleStore, id: number, parentScope: HandleScope | null, start: number, end?: number);
|
||||
add<V>(value: V): Handle<V>;
|
||||
addExternal(data: void_p): Handle<object>;
|
||||
dispose(): void;
|
||||
escape(handle: number): Handle<any> | null;
|
||||
escapeCalled(): boolean;
|
||||
}
|
||||
|
||||
export declare class HandleStore {
|
||||
static UNDEFINED: ConstHandle<undefined>;
|
||||
static NULL: ConstHandle<null>;
|
||||
static FALSE: ConstHandle<false>;
|
||||
static TRUE: ConstHandle<true>;
|
||||
static GLOBAL: ConstHandle<typeof globalThis>;
|
||||
static MIN_ID: 6;
|
||||
private readonly _values;
|
||||
private _next;
|
||||
push<S>(value: S): Handle<S>;
|
||||
erase(start: number, end: number): void;
|
||||
get(id: Ptr): Handle<any> | undefined;
|
||||
swap(a: number, b: number): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare interface ICallbackInfo {
|
||||
thiz: any;
|
||||
data: void_p;
|
||||
args: ArrayLike<any>;
|
||||
fn: Function;
|
||||
}
|
||||
|
||||
export declare interface IDeferrdValue<T = any> {
|
||||
resolve: (value: T) => void;
|
||||
reject: (reason?: any) => void;
|
||||
}
|
||||
|
||||
export declare interface IReferenceBinding {
|
||||
wrapped: number;
|
||||
tag: Uint32Array | null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export declare function isExternal(object: unknown): object is External_2;
|
||||
|
||||
export declare function isReferenceType(v: any): v is object;
|
||||
|
||||
export declare interface IStoreValue {
|
||||
id: number;
|
||||
dispose(): void;
|
||||
[x: string]: any;
|
||||
}
|
||||
|
||||
export declare const NAPI_VERSION_EXPERIMENTAL = Version.NAPI_VERSION_EXPERIMENTAL;
|
||||
|
||||
export declare const NODE_API_DEFAULT_MODULE_API_VERSION = Version.NODE_API_DEFAULT_MODULE_API_VERSION;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MAX = Version.NODE_API_SUPPORTED_VERSION_MAX;
|
||||
|
||||
export declare const NODE_API_SUPPORTED_VERSION_MIN = Version.NODE_API_SUPPORTED_VERSION_MIN;
|
||||
|
||||
export declare class NodeEnv extends Env {
|
||||
filename: string;
|
||||
private readonly nodeBinding?;
|
||||
destructing: boolean;
|
||||
finalizationScheduled: boolean;
|
||||
constructor(ctx: Context, filename: string, moduleApiVersion: number, makeDynCall_vppp: (cb: Ptr) => (a: Ptr, b: Ptr, c: Ptr) => void, makeDynCall_vp: (cb: Ptr) => (a: Ptr) => void, abort: (msg?: string) => never, nodeBinding?: any);
|
||||
deleteMe(): void;
|
||||
canCallIntoJs(): boolean;
|
||||
triggerFatalException(err: any): void;
|
||||
callbackIntoModule<T>(enforceUncaughtExceptionPolicy: boolean, fn: (env: Env) => T): T;
|
||||
callFinalizer(cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
callFinalizerInternal(forceUncaught: int, cb: napi_finalize, data: void_p, hint: void_p): void;
|
||||
enqueueFinalizer(finalizer: RefTracker): void;
|
||||
drainFinalizerQueue(): void;
|
||||
}
|
||||
|
||||
export declare class NotSupportBufferError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class NotSupportWeakRefError extends EmnapiError {
|
||||
constructor(api: string, message: string);
|
||||
}
|
||||
|
||||
export declare class Persistent<T> {
|
||||
private _ref;
|
||||
private _param;
|
||||
private _callback;
|
||||
private static readonly _registry;
|
||||
constructor(value: T);
|
||||
setWeak<P>(param: P, callback: (param: P) => void): void;
|
||||
clearWeak(): void;
|
||||
reset(): void;
|
||||
isEmpty(): boolean;
|
||||
deref(): T | undefined;
|
||||
}
|
||||
|
||||
export declare class Reference extends RefTracker implements IStoreValue {
|
||||
private static weakCallback;
|
||||
id: number;
|
||||
envObject: Env;
|
||||
private readonly canBeWeak;
|
||||
private _refcount;
|
||||
private readonly _ownership;
|
||||
persistent: Persistent<object>;
|
||||
static create(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, _unused1?: void_p, _unused2?: void_p, _unused3?: void_p): Reference;
|
||||
protected constructor(envObject: Env, handle_id: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership);
|
||||
ref(): number;
|
||||
unref(): number;
|
||||
get(envObject?: Env): napi_value;
|
||||
/** @virtual */
|
||||
resetFinalizer(): void;
|
||||
/** @virtual */
|
||||
data(): void_p;
|
||||
refcount(): number;
|
||||
ownership(): ReferenceOwnership;
|
||||
/** @virtual */
|
||||
protected callUserFinalizer(): void;
|
||||
/** @virtual */
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
private _setWeak;
|
||||
finalize(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare enum ReferenceOwnership {
|
||||
kRuntime = 0,
|
||||
kUserland = 1
|
||||
}
|
||||
|
||||
export declare class ReferenceWithData extends Reference {
|
||||
private readonly _data;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, data: void_p): ReferenceWithData;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
}
|
||||
|
||||
export declare class ReferenceWithFinalizer extends Reference {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, value: napi_value, initialRefcount: uint32_t, ownership: ReferenceOwnership, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): ReferenceWithFinalizer;
|
||||
private constructor();
|
||||
resetFinalizer(): void;
|
||||
data(): void_p;
|
||||
protected callUserFinalizer(): void;
|
||||
protected invokeFinalizerFromGC(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class RefTracker {
|
||||
/** @virtual */
|
||||
dispose(): void;
|
||||
/** @virtual */
|
||||
finalize(): void;
|
||||
private _next;
|
||||
private _prev;
|
||||
link(list: RefTracker): void;
|
||||
unlink(): void;
|
||||
static finalizeAll(list: RefTracker): void;
|
||||
}
|
||||
|
||||
export declare class ScopeStore {
|
||||
private readonly _rootScope;
|
||||
currentScope: HandleScope;
|
||||
private readonly _values;
|
||||
constructor();
|
||||
get(id: number): HandleScope | undefined;
|
||||
openScope(envObject: Env): HandleScope;
|
||||
closeScope(envObject: Env): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class Store<V extends IStoreValue> {
|
||||
protected _values: Array<V | undefined>;
|
||||
private _freeList;
|
||||
private _size;
|
||||
constructor();
|
||||
add(value: V): void;
|
||||
get(id: Ptr): V | undefined;
|
||||
has(id: Ptr): boolean;
|
||||
remove(id: Ptr): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export declare class TrackedFinalizer extends RefTracker {
|
||||
private _finalizer;
|
||||
static create(envObject: Env, finalize_callback: napi_finalize, finalize_data: void_p, finalize_hint: void_p): TrackedFinalizer;
|
||||
private constructor();
|
||||
data(): void_p;
|
||||
dispose(): void;
|
||||
finalize(): void;
|
||||
}
|
||||
|
||||
export declare class TryCatch {
|
||||
private _exception;
|
||||
private _caught;
|
||||
isEmpty(): boolean;
|
||||
hasCaught(): boolean;
|
||||
exception(): any;
|
||||
setError(err: any): void;
|
||||
reset(): void;
|
||||
extractException(): any;
|
||||
}
|
||||
|
||||
export declare const version: string;
|
||||
|
||||
export { }
|
||||
1
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.min.js
generated
vendored
Normal file
1
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.min.mjs
generated
vendored
Normal file
1
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.min.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1316
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.mjs
generated
vendored
Normal file
1316
frontend/webapp/node_modules/@emnapi/runtime/dist/emnapi.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5
frontend/webapp/node_modules/@emnapi/runtime/index.js
generated
vendored
Normal file
5
frontend/webapp/node_modules/@emnapi/runtime/index.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./dist/emnapi.cjs.min.js')
|
||||
} else {
|
||||
module.exports = require('./dist/emnapi.cjs.js')
|
||||
}
|
||||
48
frontend/webapp/node_modules/@emnapi/runtime/package.json
generated
vendored
Normal file
48
frontend/webapp/node_modules/@emnapi/runtime/package.json
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "@emnapi/runtime",
|
||||
"version": "1.4.0",
|
||||
"description": "emnapi runtime",
|
||||
"main": "index.js",
|
||||
"module": "./dist/emnapi.esm-bundler.js",
|
||||
"types": "./dist/emnapi.d.ts",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"types": {
|
||||
"module": "./dist/emnapi.d.ts",
|
||||
"import": "./dist/emnapi.d.mts",
|
||||
"default": "./dist/emnapi.d.ts"
|
||||
},
|
||||
"module": "./dist/emnapi.esm-bundler.js",
|
||||
"import": "./dist/emnapi.mjs",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./dist/emnapi.cjs.min": {
|
||||
"types": "./dist/emnapi.d.ts",
|
||||
"default": "./dist/emnapi.cjs.min.js"
|
||||
},
|
||||
"./dist/emnapi.min.mjs": {
|
||||
"types": "./dist/emnapi.d.mts",
|
||||
"default": "./dist/emnapi.min.mjs"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node ./script/build.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/toyobayashi/emnapi.git"
|
||||
},
|
||||
"author": "toyobayashi",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/toyobayashi/emnapi/issues"
|
||||
},
|
||||
"homepage": "https://github.com/toyobayashi/emnapi#readme",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
21
frontend/webapp/node_modules/@eslint-community/eslint-utils/LICENSE
generated
vendored
Normal file
21
frontend/webapp/node_modules/@eslint-community/eslint-utils/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Toru Nagashima
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
37
frontend/webapp/node_modules/@eslint-community/eslint-utils/README.md
generated
vendored
Normal file
37
frontend/webapp/node_modules/@eslint-community/eslint-utils/README.md
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# @eslint-community/eslint-utils
|
||||
|
||||
[](https://www.npmjs.com/package/@eslint-community/eslint-utils)
|
||||
[](http://www.npmtrends.com/@eslint-community/eslint-utils)
|
||||
[](https://github.com/eslint-community/eslint-utils/actions)
|
||||
[](https://codecov.io/gh/eslint-community/eslint-utils)
|
||||
|
||||
## 🏁 Goal
|
||||
|
||||
This package provides utility functions and classes for make ESLint custom rules.
|
||||
|
||||
For examples:
|
||||
|
||||
- [`getStaticValue`](https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST.
|
||||
- [`ReferenceTracker`](https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring.
|
||||
|
||||
## 📖 Usage
|
||||
|
||||
See [documentation](https://eslint-community.github.io/eslint-utils).
|
||||
|
||||
## 📰 Changelog
|
||||
|
||||
See [releases](https://github.com/eslint-community/eslint-utils/releases).
|
||||
|
||||
## ❤️ Contributing
|
||||
|
||||
Welcome contributing!
|
||||
|
||||
Please use GitHub's Issues/PRs.
|
||||
|
||||
### Development Tools
|
||||
|
||||
- `npm test` runs tests and measures coverage.
|
||||
- `npm run clean` removes the coverage result of `npm test` command.
|
||||
- `npm run coverage` shows the coverage result of the last `npm test` command.
|
||||
- `npm run lint` runs ESLint.
|
||||
- `npm run watch` runs tests on each file change.
|
||||
2079
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.js
generated
vendored
Normal file
2079
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2038
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.mjs
generated
vendored
Normal file
2038
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.mjs.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/@eslint-community/eslint-utils/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
201
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE
generated
vendored
Normal file
201
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/LICENSE
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
105
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md
generated
vendored
Normal file
105
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/README.md
generated
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
# eslint-visitor-keys
|
||||
|
||||
[](https://www.npmjs.com/package/eslint-visitor-keys)
|
||||
[](http://www.npmtrends.com/eslint-visitor-keys)
|
||||
[](https://github.com/eslint/eslint-visitor-keys/actions)
|
||||
|
||||
Constants and utilities about visitor keys to traverse AST.
|
||||
|
||||
## 💿 Installation
|
||||
|
||||
Use [npm] to install.
|
||||
|
||||
```bash
|
||||
$ npm install eslint-visitor-keys
|
||||
```
|
||||
|
||||
### Requirements
|
||||
|
||||
- [Node.js] `^12.22.0`, `^14.17.0`, or `>=16.0.0`
|
||||
|
||||
|
||||
## 📖 Usage
|
||||
|
||||
To use in an ESM file:
|
||||
|
||||
```js
|
||||
import * as evk from "eslint-visitor-keys"
|
||||
```
|
||||
|
||||
To use in a CommonJS file:
|
||||
|
||||
```js
|
||||
const evk = require("eslint-visitor-keys")
|
||||
```
|
||||
|
||||
### evk.KEYS
|
||||
|
||||
> type: `{ [type: string]: string[] | undefined }`
|
||||
|
||||
Visitor keys. This keys are frozen.
|
||||
|
||||
This is an object. Keys are the type of [ESTree] nodes. Their values are an array of property names which have child nodes.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"]
|
||||
```
|
||||
|
||||
### evk.getKeys(node)
|
||||
|
||||
> type: `(node: object) => string[]`
|
||||
|
||||
Get the visitor keys of a given AST node.
|
||||
|
||||
This is similar to `Object.keys(node)` of ES Standard, but some keys are excluded: `parent`, `leadingComments`, `trailingComments`, and names which start with `_`.
|
||||
|
||||
This will be used to traverse unknown nodes.
|
||||
|
||||
For example:
|
||||
|
||||
```js
|
||||
const node = {
|
||||
type: "AssignmentExpression",
|
||||
left: { type: "Identifier", name: "foo" },
|
||||
right: { type: "Literal", value: 0 }
|
||||
}
|
||||
console.log(evk.getKeys(node)) // → ["type", "left", "right"]
|
||||
```
|
||||
|
||||
### evk.unionWith(additionalKeys)
|
||||
|
||||
> type: `(additionalKeys: object) => { [type: string]: string[] | undefined }`
|
||||
|
||||
Make the union set with `evk.KEYS` and the given keys.
|
||||
|
||||
- The order of keys is, `additionalKeys` is at first, then `evk.KEYS` is concatenated after that.
|
||||
- It removes duplicated keys as keeping the first one.
|
||||
|
||||
For example:
|
||||
|
||||
```js
|
||||
console.log(evk.unionWith({
|
||||
MethodDefinition: ["decorators"]
|
||||
})) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... }
|
||||
```
|
||||
|
||||
## 📰 Change log
|
||||
|
||||
See [GitHub releases](https://github.com/eslint/eslint-visitor-keys/releases).
|
||||
|
||||
## 🍻 Contributing
|
||||
|
||||
Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer-guide/contributing/).
|
||||
|
||||
### Development commands
|
||||
|
||||
- `npm test` runs tests and measures code coverage.
|
||||
- `npm run lint` checks source codes with ESLint.
|
||||
- `npm run test:open-coverage` opens the code coverage report of the previous test with your default browser.
|
||||
|
||||
|
||||
[npm]: https://www.npmjs.com/
|
||||
[Node.js]: https://nodejs.org/
|
||||
[ESTree]: https://github.com/estree/estree
|
||||
384
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
generated
vendored
Normal file
384
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
generated
vendored
Normal file
@ -0,0 +1,384 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
/**
|
||||
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {VisitorKeys}
|
||||
*/
|
||||
const KEYS = {
|
||||
ArrayExpression: [
|
||||
"elements"
|
||||
],
|
||||
ArrayPattern: [
|
||||
"elements"
|
||||
],
|
||||
ArrowFunctionExpression: [
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
AssignmentExpression: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
AssignmentPattern: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
AwaitExpression: [
|
||||
"argument"
|
||||
],
|
||||
BinaryExpression: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
BlockStatement: [
|
||||
"body"
|
||||
],
|
||||
BreakStatement: [
|
||||
"label"
|
||||
],
|
||||
CallExpression: [
|
||||
"callee",
|
||||
"arguments"
|
||||
],
|
||||
CatchClause: [
|
||||
"param",
|
||||
"body"
|
||||
],
|
||||
ChainExpression: [
|
||||
"expression"
|
||||
],
|
||||
ClassBody: [
|
||||
"body"
|
||||
],
|
||||
ClassDeclaration: [
|
||||
"id",
|
||||
"superClass",
|
||||
"body"
|
||||
],
|
||||
ClassExpression: [
|
||||
"id",
|
||||
"superClass",
|
||||
"body"
|
||||
],
|
||||
ConditionalExpression: [
|
||||
"test",
|
||||
"consequent",
|
||||
"alternate"
|
||||
],
|
||||
ContinueStatement: [
|
||||
"label"
|
||||
],
|
||||
DebuggerStatement: [],
|
||||
DoWhileStatement: [
|
||||
"body",
|
||||
"test"
|
||||
],
|
||||
EmptyStatement: [],
|
||||
ExperimentalRestProperty: [
|
||||
"argument"
|
||||
],
|
||||
ExperimentalSpreadProperty: [
|
||||
"argument"
|
||||
],
|
||||
ExportAllDeclaration: [
|
||||
"exported",
|
||||
"source"
|
||||
],
|
||||
ExportDefaultDeclaration: [
|
||||
"declaration"
|
||||
],
|
||||
ExportNamedDeclaration: [
|
||||
"declaration",
|
||||
"specifiers",
|
||||
"source"
|
||||
],
|
||||
ExportSpecifier: [
|
||||
"exported",
|
||||
"local"
|
||||
],
|
||||
ExpressionStatement: [
|
||||
"expression"
|
||||
],
|
||||
ForInStatement: [
|
||||
"left",
|
||||
"right",
|
||||
"body"
|
||||
],
|
||||
ForOfStatement: [
|
||||
"left",
|
||||
"right",
|
||||
"body"
|
||||
],
|
||||
ForStatement: [
|
||||
"init",
|
||||
"test",
|
||||
"update",
|
||||
"body"
|
||||
],
|
||||
FunctionDeclaration: [
|
||||
"id",
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
FunctionExpression: [
|
||||
"id",
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
Identifier: [],
|
||||
IfStatement: [
|
||||
"test",
|
||||
"consequent",
|
||||
"alternate"
|
||||
],
|
||||
ImportDeclaration: [
|
||||
"specifiers",
|
||||
"source"
|
||||
],
|
||||
ImportDefaultSpecifier: [
|
||||
"local"
|
||||
],
|
||||
ImportExpression: [
|
||||
"source"
|
||||
],
|
||||
ImportNamespaceSpecifier: [
|
||||
"local"
|
||||
],
|
||||
ImportSpecifier: [
|
||||
"imported",
|
||||
"local"
|
||||
],
|
||||
JSXAttribute: [
|
||||
"name",
|
||||
"value"
|
||||
],
|
||||
JSXClosingElement: [
|
||||
"name"
|
||||
],
|
||||
JSXClosingFragment: [],
|
||||
JSXElement: [
|
||||
"openingElement",
|
||||
"children",
|
||||
"closingElement"
|
||||
],
|
||||
JSXEmptyExpression: [],
|
||||
JSXExpressionContainer: [
|
||||
"expression"
|
||||
],
|
||||
JSXFragment: [
|
||||
"openingFragment",
|
||||
"children",
|
||||
"closingFragment"
|
||||
],
|
||||
JSXIdentifier: [],
|
||||
JSXMemberExpression: [
|
||||
"object",
|
||||
"property"
|
||||
],
|
||||
JSXNamespacedName: [
|
||||
"namespace",
|
||||
"name"
|
||||
],
|
||||
JSXOpeningElement: [
|
||||
"name",
|
||||
"attributes"
|
||||
],
|
||||
JSXOpeningFragment: [],
|
||||
JSXSpreadAttribute: [
|
||||
"argument"
|
||||
],
|
||||
JSXSpreadChild: [
|
||||
"expression"
|
||||
],
|
||||
JSXText: [],
|
||||
LabeledStatement: [
|
||||
"label",
|
||||
"body"
|
||||
],
|
||||
Literal: [],
|
||||
LogicalExpression: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
MemberExpression: [
|
||||
"object",
|
||||
"property"
|
||||
],
|
||||
MetaProperty: [
|
||||
"meta",
|
||||
"property"
|
||||
],
|
||||
MethodDefinition: [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
NewExpression: [
|
||||
"callee",
|
||||
"arguments"
|
||||
],
|
||||
ObjectExpression: [
|
||||
"properties"
|
||||
],
|
||||
ObjectPattern: [
|
||||
"properties"
|
||||
],
|
||||
PrivateIdentifier: [],
|
||||
Program: [
|
||||
"body"
|
||||
],
|
||||
Property: [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
PropertyDefinition: [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
RestElement: [
|
||||
"argument"
|
||||
],
|
||||
ReturnStatement: [
|
||||
"argument"
|
||||
],
|
||||
SequenceExpression: [
|
||||
"expressions"
|
||||
],
|
||||
SpreadElement: [
|
||||
"argument"
|
||||
],
|
||||
StaticBlock: [
|
||||
"body"
|
||||
],
|
||||
Super: [],
|
||||
SwitchCase: [
|
||||
"test",
|
||||
"consequent"
|
||||
],
|
||||
SwitchStatement: [
|
||||
"discriminant",
|
||||
"cases"
|
||||
],
|
||||
TaggedTemplateExpression: [
|
||||
"tag",
|
||||
"quasi"
|
||||
],
|
||||
TemplateElement: [],
|
||||
TemplateLiteral: [
|
||||
"quasis",
|
||||
"expressions"
|
||||
],
|
||||
ThisExpression: [],
|
||||
ThrowStatement: [
|
||||
"argument"
|
||||
],
|
||||
TryStatement: [
|
||||
"block",
|
||||
"handler",
|
||||
"finalizer"
|
||||
],
|
||||
UnaryExpression: [
|
||||
"argument"
|
||||
],
|
||||
UpdateExpression: [
|
||||
"argument"
|
||||
],
|
||||
VariableDeclaration: [
|
||||
"declarations"
|
||||
],
|
||||
VariableDeclarator: [
|
||||
"id",
|
||||
"init"
|
||||
],
|
||||
WhileStatement: [
|
||||
"test",
|
||||
"body"
|
||||
],
|
||||
WithStatement: [
|
||||
"object",
|
||||
"body"
|
||||
],
|
||||
YieldExpression: [
|
||||
"argument"
|
||||
]
|
||||
};
|
||||
|
||||
// Types.
|
||||
const NODE_TYPES = Object.keys(KEYS);
|
||||
|
||||
// Freeze the keys.
|
||||
for (const type of NODE_TYPES) {
|
||||
Object.freeze(KEYS[type]);
|
||||
}
|
||||
Object.freeze(KEYS);
|
||||
|
||||
/**
|
||||
* @author Toru Nagashima <https://github.com/mysticatea>
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys
|
||||
*/
|
||||
|
||||
// List to ignore keys.
|
||||
const KEY_BLACKLIST = new Set([
|
||||
"parent",
|
||||
"leadingComments",
|
||||
"trailingComments"
|
||||
]);
|
||||
|
||||
/**
|
||||
* Check whether a given key should be used or not.
|
||||
* @param {string} key The key to check.
|
||||
* @returns {boolean} `true` if the key should be used.
|
||||
*/
|
||||
function filterKey(key) {
|
||||
return !KEY_BLACKLIST.has(key) && key[0] !== "_";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get visitor keys of a given node.
|
||||
* @param {object} node The AST node to get keys.
|
||||
* @returns {readonly string[]} Visitor keys of the node.
|
||||
*/
|
||||
function getKeys(node) {
|
||||
return Object.keys(node).filter(filterKey);
|
||||
}
|
||||
|
||||
// Disable valid-jsdoc rule because it reports syntax error on the type of @returns.
|
||||
// eslint-disable-next-line valid-jsdoc
|
||||
/**
|
||||
* Make the union set with `KEYS` and given keys.
|
||||
* @param {VisitorKeys} additionalKeys The additional keys.
|
||||
* @returns {VisitorKeys} The union set.
|
||||
*/
|
||||
function unionWith(additionalKeys) {
|
||||
const retv = /** @type {{
|
||||
[type: string]: ReadonlyArray<string>
|
||||
}} */ (Object.assign({}, KEYS));
|
||||
|
||||
for (const type of Object.keys(additionalKeys)) {
|
||||
if (Object.prototype.hasOwnProperty.call(retv, type)) {
|
||||
const keys = new Set(additionalKeys[type]);
|
||||
|
||||
for (const key of retv[type]) {
|
||||
keys.add(key);
|
||||
}
|
||||
|
||||
retv[type] = Object.freeze(Array.from(keys));
|
||||
} else {
|
||||
retv[type] = Object.freeze(Array.from(additionalKeys[type]));
|
||||
}
|
||||
}
|
||||
|
||||
return Object.freeze(retv);
|
||||
}
|
||||
|
||||
exports.KEYS = KEYS;
|
||||
exports.getKeys = getKeys;
|
||||
exports.unionWith = unionWith;
|
||||
27
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts
generated
vendored
Normal file
27
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
type VisitorKeys$1 = {
|
||||
readonly [type: string]: readonly string[];
|
||||
};
|
||||
/**
|
||||
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
|
||||
*/
|
||||
/**
|
||||
* @type {VisitorKeys}
|
||||
*/
|
||||
declare const KEYS: VisitorKeys$1;
|
||||
|
||||
/**
|
||||
* Get visitor keys of a given node.
|
||||
* @param {object} node The AST node to get keys.
|
||||
* @returns {readonly string[]} Visitor keys of the node.
|
||||
*/
|
||||
declare function getKeys(node: object): readonly string[];
|
||||
/**
|
||||
* Make the union set with `KEYS` and given keys.
|
||||
* @param {VisitorKeys} additionalKeys The additional keys.
|
||||
* @returns {VisitorKeys} The union set.
|
||||
*/
|
||||
declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys;
|
||||
|
||||
type VisitorKeys = VisitorKeys$1;
|
||||
|
||||
export { KEYS, VisitorKeys, getKeys, unionWith };
|
||||
16
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts
generated
vendored
Normal file
16
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Get visitor keys of a given node.
|
||||
* @param {object} node The AST node to get keys.
|
||||
* @returns {readonly string[]} Visitor keys of the node.
|
||||
*/
|
||||
export function getKeys(node: object): readonly string[];
|
||||
/**
|
||||
* Make the union set with `KEYS` and given keys.
|
||||
* @param {VisitorKeys} additionalKeys The additional keys.
|
||||
* @returns {VisitorKeys} The union set.
|
||||
*/
|
||||
export function unionWith(additionalKeys: VisitorKeys): VisitorKeys;
|
||||
export { KEYS };
|
||||
export type VisitorKeys = import('./visitor-keys.js').VisitorKeys;
|
||||
import KEYS from "./visitor-keys.js";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
12
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts
generated
vendored
Normal file
12
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
export default KEYS;
|
||||
export type VisitorKeys = {
|
||||
readonly [type: string]: readonly string[];
|
||||
};
|
||||
/**
|
||||
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
|
||||
*/
|
||||
/**
|
||||
* @type {VisitorKeys}
|
||||
*/
|
||||
declare const KEYS: VisitorKeys;
|
||||
//# sourceMappingURL=visitor-keys.d.ts.map
|
||||
65
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js
generated
vendored
Normal file
65
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* @author Toru Nagashima <https://github.com/mysticatea>
|
||||
* See LICENSE file in root directory for full license.
|
||||
*/
|
||||
import KEYS from "./visitor-keys.js";
|
||||
|
||||
/**
|
||||
* @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys
|
||||
*/
|
||||
|
||||
// List to ignore keys.
|
||||
const KEY_BLACKLIST = new Set([
|
||||
"parent",
|
||||
"leadingComments",
|
||||
"trailingComments"
|
||||
]);
|
||||
|
||||
/**
|
||||
* Check whether a given key should be used or not.
|
||||
* @param {string} key The key to check.
|
||||
* @returns {boolean} `true` if the key should be used.
|
||||
*/
|
||||
function filterKey(key) {
|
||||
return !KEY_BLACKLIST.has(key) && key[0] !== "_";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get visitor keys of a given node.
|
||||
* @param {object} node The AST node to get keys.
|
||||
* @returns {readonly string[]} Visitor keys of the node.
|
||||
*/
|
||||
export function getKeys(node) {
|
||||
return Object.keys(node).filter(filterKey);
|
||||
}
|
||||
|
||||
// Disable valid-jsdoc rule because it reports syntax error on the type of @returns.
|
||||
// eslint-disable-next-line valid-jsdoc
|
||||
/**
|
||||
* Make the union set with `KEYS` and given keys.
|
||||
* @param {VisitorKeys} additionalKeys The additional keys.
|
||||
* @returns {VisitorKeys} The union set.
|
||||
*/
|
||||
export function unionWith(additionalKeys) {
|
||||
const retv = /** @type {{
|
||||
[type: string]: ReadonlyArray<string>
|
||||
}} */ (Object.assign({}, KEYS));
|
||||
|
||||
for (const type of Object.keys(additionalKeys)) {
|
||||
if (Object.prototype.hasOwnProperty.call(retv, type)) {
|
||||
const keys = new Set(additionalKeys[type]);
|
||||
|
||||
for (const key of retv[type]) {
|
||||
keys.add(key);
|
||||
}
|
||||
|
||||
retv[type] = Object.freeze(Array.from(keys));
|
||||
} else {
|
||||
retv[type] = Object.freeze(Array.from(additionalKeys[type]));
|
||||
}
|
||||
}
|
||||
|
||||
return Object.freeze(retv);
|
||||
}
|
||||
|
||||
export { KEYS };
|
||||
315
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js
generated
vendored
Normal file
315
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.js
generated
vendored
Normal file
@ -0,0 +1,315 @@
|
||||
/**
|
||||
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {VisitorKeys}
|
||||
*/
|
||||
const KEYS = {
|
||||
ArrayExpression: [
|
||||
"elements"
|
||||
],
|
||||
ArrayPattern: [
|
||||
"elements"
|
||||
],
|
||||
ArrowFunctionExpression: [
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
AssignmentExpression: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
AssignmentPattern: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
AwaitExpression: [
|
||||
"argument"
|
||||
],
|
||||
BinaryExpression: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
BlockStatement: [
|
||||
"body"
|
||||
],
|
||||
BreakStatement: [
|
||||
"label"
|
||||
],
|
||||
CallExpression: [
|
||||
"callee",
|
||||
"arguments"
|
||||
],
|
||||
CatchClause: [
|
||||
"param",
|
||||
"body"
|
||||
],
|
||||
ChainExpression: [
|
||||
"expression"
|
||||
],
|
||||
ClassBody: [
|
||||
"body"
|
||||
],
|
||||
ClassDeclaration: [
|
||||
"id",
|
||||
"superClass",
|
||||
"body"
|
||||
],
|
||||
ClassExpression: [
|
||||
"id",
|
||||
"superClass",
|
||||
"body"
|
||||
],
|
||||
ConditionalExpression: [
|
||||
"test",
|
||||
"consequent",
|
||||
"alternate"
|
||||
],
|
||||
ContinueStatement: [
|
||||
"label"
|
||||
],
|
||||
DebuggerStatement: [],
|
||||
DoWhileStatement: [
|
||||
"body",
|
||||
"test"
|
||||
],
|
||||
EmptyStatement: [],
|
||||
ExperimentalRestProperty: [
|
||||
"argument"
|
||||
],
|
||||
ExperimentalSpreadProperty: [
|
||||
"argument"
|
||||
],
|
||||
ExportAllDeclaration: [
|
||||
"exported",
|
||||
"source"
|
||||
],
|
||||
ExportDefaultDeclaration: [
|
||||
"declaration"
|
||||
],
|
||||
ExportNamedDeclaration: [
|
||||
"declaration",
|
||||
"specifiers",
|
||||
"source"
|
||||
],
|
||||
ExportSpecifier: [
|
||||
"exported",
|
||||
"local"
|
||||
],
|
||||
ExpressionStatement: [
|
||||
"expression"
|
||||
],
|
||||
ForInStatement: [
|
||||
"left",
|
||||
"right",
|
||||
"body"
|
||||
],
|
||||
ForOfStatement: [
|
||||
"left",
|
||||
"right",
|
||||
"body"
|
||||
],
|
||||
ForStatement: [
|
||||
"init",
|
||||
"test",
|
||||
"update",
|
||||
"body"
|
||||
],
|
||||
FunctionDeclaration: [
|
||||
"id",
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
FunctionExpression: [
|
||||
"id",
|
||||
"params",
|
||||
"body"
|
||||
],
|
||||
Identifier: [],
|
||||
IfStatement: [
|
||||
"test",
|
||||
"consequent",
|
||||
"alternate"
|
||||
],
|
||||
ImportDeclaration: [
|
||||
"specifiers",
|
||||
"source"
|
||||
],
|
||||
ImportDefaultSpecifier: [
|
||||
"local"
|
||||
],
|
||||
ImportExpression: [
|
||||
"source"
|
||||
],
|
||||
ImportNamespaceSpecifier: [
|
||||
"local"
|
||||
],
|
||||
ImportSpecifier: [
|
||||
"imported",
|
||||
"local"
|
||||
],
|
||||
JSXAttribute: [
|
||||
"name",
|
||||
"value"
|
||||
],
|
||||
JSXClosingElement: [
|
||||
"name"
|
||||
],
|
||||
JSXClosingFragment: [],
|
||||
JSXElement: [
|
||||
"openingElement",
|
||||
"children",
|
||||
"closingElement"
|
||||
],
|
||||
JSXEmptyExpression: [],
|
||||
JSXExpressionContainer: [
|
||||
"expression"
|
||||
],
|
||||
JSXFragment: [
|
||||
"openingFragment",
|
||||
"children",
|
||||
"closingFragment"
|
||||
],
|
||||
JSXIdentifier: [],
|
||||
JSXMemberExpression: [
|
||||
"object",
|
||||
"property"
|
||||
],
|
||||
JSXNamespacedName: [
|
||||
"namespace",
|
||||
"name"
|
||||
],
|
||||
JSXOpeningElement: [
|
||||
"name",
|
||||
"attributes"
|
||||
],
|
||||
JSXOpeningFragment: [],
|
||||
JSXSpreadAttribute: [
|
||||
"argument"
|
||||
],
|
||||
JSXSpreadChild: [
|
||||
"expression"
|
||||
],
|
||||
JSXText: [],
|
||||
LabeledStatement: [
|
||||
"label",
|
||||
"body"
|
||||
],
|
||||
Literal: [],
|
||||
LogicalExpression: [
|
||||
"left",
|
||||
"right"
|
||||
],
|
||||
MemberExpression: [
|
||||
"object",
|
||||
"property"
|
||||
],
|
||||
MetaProperty: [
|
||||
"meta",
|
||||
"property"
|
||||
],
|
||||
MethodDefinition: [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
NewExpression: [
|
||||
"callee",
|
||||
"arguments"
|
||||
],
|
||||
ObjectExpression: [
|
||||
"properties"
|
||||
],
|
||||
ObjectPattern: [
|
||||
"properties"
|
||||
],
|
||||
PrivateIdentifier: [],
|
||||
Program: [
|
||||
"body"
|
||||
],
|
||||
Property: [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
PropertyDefinition: [
|
||||
"key",
|
||||
"value"
|
||||
],
|
||||
RestElement: [
|
||||
"argument"
|
||||
],
|
||||
ReturnStatement: [
|
||||
"argument"
|
||||
],
|
||||
SequenceExpression: [
|
||||
"expressions"
|
||||
],
|
||||
SpreadElement: [
|
||||
"argument"
|
||||
],
|
||||
StaticBlock: [
|
||||
"body"
|
||||
],
|
||||
Super: [],
|
||||
SwitchCase: [
|
||||
"test",
|
||||
"consequent"
|
||||
],
|
||||
SwitchStatement: [
|
||||
"discriminant",
|
||||
"cases"
|
||||
],
|
||||
TaggedTemplateExpression: [
|
||||
"tag",
|
||||
"quasi"
|
||||
],
|
||||
TemplateElement: [],
|
||||
TemplateLiteral: [
|
||||
"quasis",
|
||||
"expressions"
|
||||
],
|
||||
ThisExpression: [],
|
||||
ThrowStatement: [
|
||||
"argument"
|
||||
],
|
||||
TryStatement: [
|
||||
"block",
|
||||
"handler",
|
||||
"finalizer"
|
||||
],
|
||||
UnaryExpression: [
|
||||
"argument"
|
||||
],
|
||||
UpdateExpression: [
|
||||
"argument"
|
||||
],
|
||||
VariableDeclaration: [
|
||||
"declarations"
|
||||
],
|
||||
VariableDeclarator: [
|
||||
"id",
|
||||
"init"
|
||||
],
|
||||
WhileStatement: [
|
||||
"test",
|
||||
"body"
|
||||
],
|
||||
WithStatement: [
|
||||
"object",
|
||||
"body"
|
||||
],
|
||||
YieldExpression: [
|
||||
"argument"
|
||||
]
|
||||
};
|
||||
|
||||
// Types.
|
||||
const NODE_TYPES = Object.keys(KEYS);
|
||||
|
||||
// Freeze the keys.
|
||||
for (const type of NODE_TYPES) {
|
||||
Object.freeze(KEYS[type]);
|
||||
}
|
||||
Object.freeze(KEYS);
|
||||
|
||||
export default KEYS;
|
||||
74
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json
generated
vendored
Normal file
74
frontend/webapp/node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys/package.json
generated
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"name": "eslint-visitor-keys",
|
||||
"version": "3.4.3",
|
||||
"description": "Constants and utilities about visitor keys to traverse AST.",
|
||||
"type": "module",
|
||||
"main": "dist/eslint-visitor-keys.cjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"import": "./lib/index.js",
|
||||
"require": "./dist/eslint-visitor-keys.cjs"
|
||||
},
|
||||
"./dist/eslint-visitor-keys.cjs"
|
||||
],
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist/index.d.ts",
|
||||
"dist/visitor-keys.d.ts",
|
||||
"dist/eslint-visitor-keys.cjs",
|
||||
"dist/eslint-visitor-keys.d.cts",
|
||||
"lib"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/estree": "^0.0.51",
|
||||
"@types/estree-jsx": "^0.0.1",
|
||||
"@typescript-eslint/parser": "^5.14.0",
|
||||
"c8": "^7.11.0",
|
||||
"chai": "^4.3.6",
|
||||
"eslint": "^7.29.0",
|
||||
"eslint-config-eslint": "^7.0.0",
|
||||
"eslint-plugin-jsdoc": "^35.4.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-release": "^3.2.0",
|
||||
"esquery": "^1.4.0",
|
||||
"json-diff": "^0.7.3",
|
||||
"mocha": "^9.2.1",
|
||||
"opener": "^1.5.2",
|
||||
"rollup": "^2.70.0",
|
||||
"rollup-plugin-dts": "^4.2.3",
|
||||
"tsd": "^0.19.1",
|
||||
"typescript": "^4.6.2"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:cjs && npm run build:types",
|
||||
"build:cjs": "rollup -c",
|
||||
"build:debug": "npm run build:cjs -- -m && npm run build:types",
|
||||
"build:keys": "node tools/build-keys-from-ts",
|
||||
"build:types": "tsc",
|
||||
"lint": "eslint .",
|
||||
"prepare": "npm run build",
|
||||
"release:generate:latest": "eslint-generate-release",
|
||||
"release:generate:alpha": "eslint-generate-prerelease alpha",
|
||||
"release:generate:beta": "eslint-generate-prerelease beta",
|
||||
"release:generate:rc": "eslint-generate-prerelease rc",
|
||||
"release:publish": "eslint-publish-release",
|
||||
"test": "mocha tests/lib/**/*.cjs && c8 mocha tests/lib/**/*.js && npm run test:types",
|
||||
"test:open-coverage": "c8 report --reporter lcov && opener coverage/lcov-report/index.html",
|
||||
"test:types": "tsd"
|
||||
},
|
||||
"repository": "eslint/eslint-visitor-keys",
|
||||
"funding": "https://opencollective.com/eslint",
|
||||
"keywords": [],
|
||||
"author": "Toru Nagashima (https://github.com/mysticatea)",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/eslint/eslint-visitor-keys/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eslint/eslint-visitor-keys#readme"
|
||||
}
|
||||
80
frontend/webapp/node_modules/@eslint-community/eslint-utils/package.json
generated
vendored
Normal file
80
frontend/webapp/node_modules/@eslint-community/eslint-utils/package.json
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"name": "@eslint-community/eslint-utils",
|
||||
"version": "4.5.1",
|
||||
"description": "Utilities for ESLint plugins.",
|
||||
"keywords": [
|
||||
"eslint"
|
||||
],
|
||||
"homepage": "https://github.com/eslint-community/eslint-utils#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/eslint-community/eslint-utils/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eslint-community/eslint-utils"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Toru Nagashima",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.mjs",
|
||||
"require": "./index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "index",
|
||||
"module": "index.mjs",
|
||||
"files": [
|
||||
"index.*"
|
||||
],
|
||||
"scripts": {
|
||||
"prebuild": "npm run -s clean",
|
||||
"build": "rollup -c",
|
||||
"clean": "rimraf .nyc_output coverage index.*",
|
||||
"coverage": "opener ./coverage/lcov-report/index.html",
|
||||
"docs:build": "vitepress build docs",
|
||||
"docs:watch": "vitepress dev docs",
|
||||
"format": "npm run -s format:prettier -- --write",
|
||||
"format:prettier": "prettier .",
|
||||
"format:check": "npm run -s format:prettier -- --check",
|
||||
"lint:eslint": "eslint .",
|
||||
"lint:format": "npm run -s format:check",
|
||||
"lint:installed-check": "installed-check -v -i installed-check -i npm-run-all2 -i knip",
|
||||
"lint:knip": "knip",
|
||||
"lint": "run-p lint:*",
|
||||
"test": "c8 mocha --reporter dot \"test/*.mjs\"",
|
||||
"preversion": "npm test && npm run -s build",
|
||||
"postversion": "git push && git push --tags",
|
||||
"prewatch": "npm run -s clean",
|
||||
"watch": "warun \"{src,test}/**/*.mjs\" -- npm run -s test:mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": "^3.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint-community/eslint-plugin-mysticatea": "^15.6.1",
|
||||
"c8": "^8.0.1",
|
||||
"dot-prop": "^7.2.0",
|
||||
"eslint": "^8.57.1",
|
||||
"installed-check": "^8.0.1",
|
||||
"knip": "^5.33.3",
|
||||
"mocha": "^9.2.2",
|
||||
"npm-run-all2": "^6.2.3",
|
||||
"opener": "^1.5.2",
|
||||
"prettier": "2.8.8",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.79.2",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"semver": "^7.6.3",
|
||||
"vitepress": "^1.4.1",
|
||||
"warun": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
},
|
||||
"funding": "https://opencollective.com/eslint"
|
||||
}
|
||||
21
frontend/webapp/node_modules/@eslint-community/regexpp/LICENSE
generated
vendored
Normal file
21
frontend/webapp/node_modules/@eslint-community/regexpp/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Toru Nagashima
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
177
frontend/webapp/node_modules/@eslint-community/regexpp/README.md
generated
vendored
Normal file
177
frontend/webapp/node_modules/@eslint-community/regexpp/README.md
generated
vendored
Normal file
@ -0,0 +1,177 @@
|
||||
# @eslint-community/regexpp
|
||||
|
||||
[](https://www.npmjs.com/package/@eslint-community/regexpp)
|
||||
[](http://www.npmtrends.com/@eslint-community/regexpp)
|
||||
[](https://github.com/eslint-community/regexpp/actions)
|
||||
[](https://codecov.io/gh/eslint-community/regexpp)
|
||||
|
||||
A regular expression parser for ECMAScript.
|
||||
|
||||
## 💿 Installation
|
||||
|
||||
```bash
|
||||
$ npm install @eslint-community/regexpp
|
||||
```
|
||||
|
||||
- require Node@^12.0.0 || ^14.0.0 || >=16.0.0.
|
||||
|
||||
## 📖 Usage
|
||||
|
||||
```ts
|
||||
import {
|
||||
AST,
|
||||
RegExpParser,
|
||||
RegExpValidator,
|
||||
RegExpVisitor,
|
||||
parseRegExpLiteral,
|
||||
validateRegExpLiteral,
|
||||
visitRegExpAST
|
||||
} from "@eslint-community/regexpp"
|
||||
```
|
||||
|
||||
### parseRegExpLiteral(source, options?)
|
||||
|
||||
Parse a given regular expression literal then make AST object.
|
||||
|
||||
This is equivalent to `new RegExpParser(options).parseLiteral(source)`.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string | RegExp`) The source code to parse.
|
||||
- `options?` ([`RegExpParser.Options`]) The options to parse.
|
||||
- **Return:**
|
||||
- The AST of the regular expression.
|
||||
|
||||
### validateRegExpLiteral(source, options?)
|
||||
|
||||
Validate a given regular expression literal.
|
||||
|
||||
This is equivalent to `new RegExpValidator(options).validateLiteral(source)`.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string`) The source code to validate.
|
||||
- `options?` ([`RegExpValidator.Options`]) The options to validate.
|
||||
|
||||
### visitRegExpAST(ast, handlers)
|
||||
|
||||
Visit each node of a given AST.
|
||||
|
||||
This is equivalent to `new RegExpVisitor(handlers).visit(ast)`.
|
||||
|
||||
- **Parameters:**
|
||||
- `ast` ([`AST.Node`]) The AST to visit.
|
||||
- `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.
|
||||
|
||||
### RegExpParser
|
||||
|
||||
#### new RegExpParser(options?)
|
||||
|
||||
- **Parameters:**
|
||||
- `options?` ([`RegExpParser.Options`]) The options to parse.
|
||||
|
||||
#### parser.parseLiteral(source, start?, end?)
|
||||
|
||||
Parse a regular expression literal.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string`) The source code to parse. E.g. `"/abc/g"`.
|
||||
- `start?` (`number`) The start index in the source code. Default is `0`.
|
||||
- `end?` (`number`) The end index in the source code. Default is `source.length`.
|
||||
- **Return:**
|
||||
- The AST of the regular expression.
|
||||
|
||||
#### parser.parsePattern(source, start?, end?, flags?)
|
||||
|
||||
Parse a regular expression pattern.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string`) The source code to parse. E.g. `"abc"`.
|
||||
- `start?` (`number`) The start index in the source code. Default is `0`.
|
||||
- `end?` (`number`) The end index in the source code. Default is `source.length`.
|
||||
- `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode.
|
||||
- **Return:**
|
||||
- The AST of the regular expression pattern.
|
||||
|
||||
#### parser.parseFlags(source, start?, end?)
|
||||
|
||||
Parse a regular expression flags.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string`) The source code to parse. E.g. `"gim"`.
|
||||
- `start?` (`number`) The start index in the source code. Default is `0`.
|
||||
- `end?` (`number`) The end index in the source code. Default is `source.length`.
|
||||
- **Return:**
|
||||
- The AST of the regular expression flags.
|
||||
|
||||
### RegExpValidator
|
||||
|
||||
#### new RegExpValidator(options)
|
||||
|
||||
- **Parameters:**
|
||||
- `options` ([`RegExpValidator.Options`]) The options to validate.
|
||||
|
||||
#### validator.validateLiteral(source, start, end)
|
||||
|
||||
Validate a regular expression literal.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string`) The source code to validate.
|
||||
- `start?` (`number`) The start index in the source code. Default is `0`.
|
||||
- `end?` (`number`) The end index in the source code. Default is `source.length`.
|
||||
|
||||
#### validator.validatePattern(source, start, end, flags)
|
||||
|
||||
Validate a regular expression pattern.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string`) The source code to validate.
|
||||
- `start?` (`number`) The start index in the source code. Default is `0`.
|
||||
- `end?` (`number`) The end index in the source code. Default is `source.length`.
|
||||
- `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode.
|
||||
|
||||
#### validator.validateFlags(source, start, end)
|
||||
|
||||
Validate a regular expression flags.
|
||||
|
||||
- **Parameters:**
|
||||
- `source` (`string`) The source code to validate.
|
||||
- `start?` (`number`) The start index in the source code. Default is `0`.
|
||||
- `end?` (`number`) The end index in the source code. Default is `source.length`.
|
||||
|
||||
### RegExpVisitor
|
||||
|
||||
#### new RegExpVisitor(handlers)
|
||||
|
||||
- **Parameters:**
|
||||
- `handlers` ([`RegExpVisitor.Handlers`]) The callbacks.
|
||||
|
||||
#### visitor.visit(ast)
|
||||
|
||||
Validate a regular expression literal.
|
||||
|
||||
- **Parameters:**
|
||||
- `ast` ([`AST.Node`]) The AST to visit.
|
||||
|
||||
## 📰 Changelog
|
||||
|
||||
- [GitHub Releases](https://github.com/eslint-community/regexpp/releases)
|
||||
|
||||
## 🍻 Contributing
|
||||
|
||||
Welcome contributing!
|
||||
|
||||
Please use GitHub's Issues/PRs.
|
||||
|
||||
### Development Tools
|
||||
|
||||
- `npm test` runs tests and measures coverage.
|
||||
- `npm run build` compiles TypeScript source code to `index.js`, `index.js.map`, and `index.d.ts`.
|
||||
- `npm run clean` removes the temporary files which are created by `npm test` and `npm run build`.
|
||||
- `npm run lint` runs ESLint.
|
||||
- `npm run update:test` updates test fixtures.
|
||||
- `npm run update:ids` updates `src/unicode/ids.ts`.
|
||||
- `npm run watch` runs tests with `--watch` option.
|
||||
|
||||
[`AST.Node`]: src/ast.ts#L4
|
||||
[`RegExpParser.Options`]: src/parser.ts#L743
|
||||
[`RegExpValidator.Options`]: src/validator.ts#L220
|
||||
[`RegExpVisitor.Handlers`]: src/visitor.ts#L291
|
||||
1163
frontend/webapp/node_modules/@eslint-community/regexpp/index.d.ts
generated
vendored
Normal file
1163
frontend/webapp/node_modules/@eslint-community/regexpp/index.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3037
frontend/webapp/node_modules/@eslint-community/regexpp/index.js
generated
vendored
Normal file
3037
frontend/webapp/node_modules/@eslint-community/regexpp/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/webapp/node_modules/@eslint-community/regexpp/index.js.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/@eslint-community/regexpp/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3027
frontend/webapp/node_modules/@eslint-community/regexpp/index.mjs
generated
vendored
Normal file
3027
frontend/webapp/node_modules/@eslint-community/regexpp/index.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
frontend/webapp/node_modules/@eslint-community/regexpp/index.mjs.map
generated
vendored
Normal file
1
frontend/webapp/node_modules/@eslint-community/regexpp/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
91
frontend/webapp/node_modules/@eslint-community/regexpp/package.json
generated
vendored
Normal file
91
frontend/webapp/node_modules/@eslint-community/regexpp/package.json
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
{
|
||||
"name": "@eslint-community/regexpp",
|
||||
"version": "4.12.1",
|
||||
"description": "Regular expression parser for ECMAScript.",
|
||||
"keywords": [
|
||||
"regexp",
|
||||
"regular",
|
||||
"expression",
|
||||
"parser",
|
||||
"validator",
|
||||
"ast",
|
||||
"abstract",
|
||||
"syntax",
|
||||
"tree",
|
||||
"ecmascript",
|
||||
"es2015",
|
||||
"es2016",
|
||||
"es2017",
|
||||
"es2018",
|
||||
"es2019",
|
||||
"es2020",
|
||||
"es2021",
|
||||
"annexB"
|
||||
],
|
||||
"homepage": "https://github.com/eslint-community/regexpp#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/eslint-community/regexpp/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eslint-community/regexpp"
|
||||
},
|
||||
"license": "MIT",
|
||||
"author": "Toru Nagashima",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./index.d.ts",
|
||||
"import": "./index.mjs",
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"main": "index",
|
||||
"files": [
|
||||
"index.*"
|
||||
],
|
||||
"scripts": {
|
||||
"prebuild": "npm run -s clean",
|
||||
"build": "run-s build:*",
|
||||
"build:tsc": "tsc --module es2015",
|
||||
"build:rollup": "rollup -c",
|
||||
"build:dts": "npm run -s build:tsc -- --removeComments false && dts-bundle --name @eslint-community/regexpp --main .temp/index.d.ts --out ../index.d.ts && prettier --write index.d.ts",
|
||||
"clean": "rimraf .temp index.*",
|
||||
"lint": "eslint . --ext .ts",
|
||||
"test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000",
|
||||
"debug": "mocha --require ts-node/register/transpile-only \"test/*.ts\" --reporter dot --timeout 10000",
|
||||
"update:test": "ts-node scripts/update-fixtures.ts",
|
||||
"update:unicode": "run-s update:unicode:*",
|
||||
"update:unicode:ids": "ts-node scripts/update-unicode-ids.ts",
|
||||
"update:unicode:props": "ts-node scripts/update-unicode-properties.ts",
|
||||
"update:test262:extract": "ts-node -T scripts/extract-test262.ts",
|
||||
"preversion": "npm test && npm run -s build",
|
||||
"postversion": "git push && git push --tags",
|
||||
"prewatch": "npm run -s clean",
|
||||
"watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@eslint-community/eslint-plugin-mysticatea": "^15.5.1",
|
||||
"@rollup/plugin-node-resolve": "^14.1.0",
|
||||
"@types/eslint": "^8.44.3",
|
||||
"@types/jsdom": "^16.2.15",
|
||||
"@types/mocha": "^9.1.1",
|
||||
"@types/node": "^12.20.55",
|
||||
"dts-bundle": "^0.7.3",
|
||||
"eslint": "^8.50.0",
|
||||
"js-tokens": "^8.0.2",
|
||||
"jsdom": "^19.0.0",
|
||||
"mocha": "^9.2.2",
|
||||
"npm-run-all2": "^6.2.2",
|
||||
"nyc": "^14.1.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "~5.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
|
||||
}
|
||||
}
|
||||
201
frontend/webapp/node_modules/@eslint/config-array/LICENSE
generated
vendored
Normal file
201
frontend/webapp/node_modules/@eslint/config-array/LICENSE
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
358
frontend/webapp/node_modules/@eslint/config-array/README.md
generated
vendored
Normal file
358
frontend/webapp/node_modules/@eslint/config-array/README.md
generated
vendored
Normal file
@ -0,0 +1,358 @@
|
||||
# Config Array
|
||||
|
||||
## Description
|
||||
|
||||
A config array is a way of managing configurations that are based on glob pattern matching of filenames. Each config array contains the information needed to determine the correct configuration for any file based on the filename.
|
||||
|
||||
**Note:** This is a generic package that can be used outside of ESLint. It contains no ESLint-specific functionality.
|
||||
|
||||
## Installation
|
||||
|
||||
For Node.js and compatible runtimes:
|
||||
|
||||
```shell
|
||||
npm install @eslint/config-array
|
||||
# or
|
||||
yarn add @eslint/config-array
|
||||
# or
|
||||
pnpm install @eslint/config-array
|
||||
# or
|
||||
bun install @eslint/config-array
|
||||
```
|
||||
|
||||
For Deno:
|
||||
|
||||
```shell
|
||||
deno add @eslint/config-array
|
||||
```
|
||||
|
||||
## Background
|
||||
|
||||
The basic idea is that all configuration, including overrides, can be represented by a single array where each item in the array is a config object. Config objects appearing later in the array override config objects appearing earlier in the array. You can calculate a config for a given file by traversing all config objects in the array to find the ones that match the filename. Matching is done by specifying glob patterns in `files` and `ignores` properties on each config object. Here's an example:
|
||||
|
||||
```js
|
||||
export default [
|
||||
// match all JSON files
|
||||
{
|
||||
name: "JSON Handler",
|
||||
files: ["**/*.json"],
|
||||
handler: jsonHandler,
|
||||
},
|
||||
|
||||
// match only package.json
|
||||
{
|
||||
name: "package.json Handler",
|
||||
files: ["package.json"],
|
||||
handler: packageJsonHandler,
|
||||
},
|
||||
];
|
||||
```
|
||||
|
||||
In this example, there are two config objects: the first matches all JSON files in all directories and the second matches just `package.json` in the base path directory (all the globs are evaluated as relative to a base path that can be specified). When you retrieve a configuration for `foo.json`, only the first config object matches so `handler` is equal to `jsonHandler`; when you retrieve a configuration for `package.json`, `handler` is equal to `packageJsonHandler` (because both config objects match, the second one wins).
|
||||
|
||||
## Usage
|
||||
|
||||
First, import the `ConfigArray` constructor:
|
||||
|
||||
```js
|
||||
import { ConfigArray } from "@eslint/config-array";
|
||||
|
||||
// or using CommonJS
|
||||
|
||||
const { ConfigArray } = require("@eslint/config-array");
|
||||
```
|
||||
|
||||
When you create a new instance of `ConfigArray`, you must pass in two arguments: an array of configs and an options object. The array of configs is most likely read in from a configuration file, so here's a typical example:
|
||||
|
||||
```js
|
||||
const configFilename = path.resolve(process.cwd(), "my.config.js");
|
||||
const { default: rawConfigs } = await import(configFilename);
|
||||
const configs = new ConfigArray(rawConfigs, {
|
||||
// the path to match filenames from
|
||||
basePath: process.cwd(),
|
||||
|
||||
// additional items in each config
|
||||
schema: mySchema,
|
||||
});
|
||||
```
|
||||
|
||||
This example reads in an object or array from `my.config.js` and passes it into the `ConfigArray` constructor as the first argument. The second argument is an object specifying the `basePath` (the directory in which `my.config.js` is found) and a `schema` to define the additional properties of a config object beyond `files`, `ignores`, and `name`.
|
||||
|
||||
### Specifying a Schema
|
||||
|
||||
The `schema` option is required for you to use additional properties in config objects. The schema is an object that follows the format of an [`ObjectSchema`](https://npmjs.com/package/@eslint/object-schema). The schema specifies both validation and merge rules that the `ConfigArray` instance needs to combine configs when there are multiple matches. Here's an example:
|
||||
|
||||
```js
|
||||
const configFilename = path.resolve(process.cwd(), "my.config.js");
|
||||
const { default: rawConfigs } = await import(configFilename);
|
||||
|
||||
const mySchema = {
|
||||
|
||||
// define the handler key in configs
|
||||
handler: {
|
||||
required: true,
|
||||
merge(a, b) {
|
||||
if (!b) return a;
|
||||
if (!a) return b;
|
||||
},
|
||||
validate(value) {
|
||||
if (typeof value !== "function") {
|
||||
throw new TypeError("Function expected.");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const configs = new ConfigArray(rawConfigs, {
|
||||
|
||||
// the path to match filenames from
|
||||
basePath: process.cwd(),
|
||||
|
||||
// additional item schemas in each config
|
||||
schema: mySchema,
|
||||
|
||||
// additional config types supported (default: [])
|
||||
extraConfigTypes: ["array", "function"];
|
||||
});
|
||||
```
|
||||
|
||||
### Config Arrays
|
||||
|
||||
Config arrays can be multidimensional, so it's possible for a config array to contain another config array when `extraConfigTypes` contains `"array"`, such as:
|
||||
|
||||
```js
|
||||
export default [
|
||||
// JS config
|
||||
{
|
||||
files: ["**/*.js"],
|
||||
handler: jsHandler,
|
||||
},
|
||||
|
||||
// JSON configs
|
||||
[
|
||||
// match all JSON files
|
||||
{
|
||||
name: "JSON Handler",
|
||||
files: ["**/*.json"],
|
||||
handler: jsonHandler,
|
||||
},
|
||||
|
||||
// match only package.json
|
||||
{
|
||||
name: "package.json Handler",
|
||||
files: ["package.json"],
|
||||
handler: packageJsonHandler,
|
||||
},
|
||||
],
|
||||
|
||||
// filename must match function
|
||||
{
|
||||
files: [filePath => filePath.endsWith(".md")],
|
||||
handler: markdownHandler,
|
||||
},
|
||||
|
||||
// filename must match all patterns in subarray
|
||||
{
|
||||
files: [["*.test.*", "*.js"]],
|
||||
handler: jsTestHandler,
|
||||
},
|
||||
|
||||
// filename must not match patterns beginning with !
|
||||
{
|
||||
name: "Non-JS files",
|
||||
files: ["!*.js"],
|
||||
settings: {
|
||||
js: false,
|
||||
},
|
||||
},
|
||||
];
|
||||
```
|
||||
|
||||
In this example, the array contains both config objects and a config array. When a config array is normalized (see details below), it is flattened so only config objects remain. However, the order of evaluation remains the same.
|
||||
|
||||
If the `files` array contains a function, then that function is called with the path of the file as it was passed in. The function is expected to return `true` if there is a match and `false` if not. (The `ignores` array can also contain functions.)
|
||||
|
||||
If the `files` array contains an item that is an array of strings and functions, then all patterns must match in order for the config to match. In the preceding examples, both `*.test.*` and `*.js` must match in order for the config object to be used.
|
||||
|
||||
If a pattern in the files array begins with `!` then it excludes that pattern. In the preceding example, any filename that doesn't end with `.js` will automatically get a `settings.js` property set to `false`.
|
||||
|
||||
You can also specify an `ignores` key that will force files matching those patterns to not be included. If the `ignores` key is in a config object without any other keys, then those ignores will always be applied; otherwise those ignores act as exclusions. Here's an example:
|
||||
|
||||
```js
|
||||
export default [
|
||||
|
||||
// Always ignored
|
||||
{
|
||||
ignores: ["**/.git/**", "**/node_modules/**"]
|
||||
},
|
||||
|
||||
// .eslintrc.js file is ignored only when .js file matches
|
||||
{
|
||||
files: ["**/*.js"],
|
||||
ignores: [".eslintrc.js"]
|
||||
handler: jsHandler
|
||||
}
|
||||
];
|
||||
```
|
||||
|
||||
You can use negated patterns in `ignores` to exclude a file that was already ignored, such as:
|
||||
|
||||
```js
|
||||
export default [
|
||||
// Ignore all JSON files except tsconfig.json
|
||||
{
|
||||
files: ["**/*"],
|
||||
ignores: ["**/*.json", "!tsconfig.json"],
|
||||
},
|
||||
];
|
||||
```
|
||||
|
||||
### Config Functions
|
||||
|
||||
Config arrays can also include config functions when `extraConfigTypes` contains `"function"`. A config function accepts a single parameter, `context` (defined by you), and must return either a config object or a config array (it cannot return another function). Config functions allow end users to execute code in the creation of appropriate config objects. Here's an example:
|
||||
|
||||
```js
|
||||
export default [
|
||||
// JS config
|
||||
{
|
||||
files: ["**/*.js"],
|
||||
handler: jsHandler,
|
||||
},
|
||||
|
||||
// JSON configs
|
||||
function (context) {
|
||||
return [
|
||||
// match all JSON files
|
||||
{
|
||||
name: context.name + " JSON Handler",
|
||||
files: ["**/*.json"],
|
||||
handler: jsonHandler,
|
||||
},
|
||||
|
||||
// match only package.json
|
||||
{
|
||||
name: context.name + " package.json Handler",
|
||||
files: ["package.json"],
|
||||
handler: packageJsonHandler,
|
||||
},
|
||||
];
|
||||
},
|
||||
];
|
||||
```
|
||||
|
||||
When a config array is normalized, each function is executed and replaced in the config array with the return value.
|
||||
|
||||
**Note:** Config functions can also be async.
|
||||
|
||||
### Normalizing Config Arrays
|
||||
|
||||
Once a config array has been created and loaded with all of the raw config data, it must be normalized before it can be used. The normalization process goes through and flattens the config array as well as executing all config functions to get their final values.
|
||||
|
||||
To normalize a config array, call the `normalize()` method and pass in a context object:
|
||||
|
||||
```js
|
||||
await configs.normalize({
|
||||
name: "MyApp",
|
||||
});
|
||||
```
|
||||
|
||||
The `normalize()` method returns a promise, so be sure to use the `await` operator. The config array instance is normalized in-place, so you don't need to create a new variable.
|
||||
|
||||
If you want to disallow async config functions, you can call `normalizeSync()` instead. This method is completely synchronous and does not require using the `await` operator as it does not return a promise:
|
||||
|
||||
```js
|
||||
await configs.normalizeSync({
|
||||
name: "MyApp",
|
||||
});
|
||||
```
|
||||
|
||||
**Important:** Once a `ConfigArray` is normalized, it cannot be changed further. You can, however, create a new `ConfigArray` and pass in the normalized instance to create an unnormalized copy.
|
||||
|
||||
### Getting Config for a File
|
||||
|
||||
To get the config for a file, use the `getConfig()` method on a normalized config array and pass in the filename to get a config for:
|
||||
|
||||
```js
|
||||
// pass in filename
|
||||
const fileConfig = configs.getConfig(
|
||||
path.resolve(process.cwd(), "package.json"),
|
||||
);
|
||||
```
|
||||
|
||||
The config array always returns an object, even if there are no configs matching the given filename. You can then inspect the returned config object to determine how to proceed.
|
||||
|
||||
A few things to keep in mind:
|
||||
|
||||
- If a filename is not an absolute path, it will be resolved relative to the base path directory.
|
||||
- The returned config object never has `files`, `ignores`, or `name` properties; the only properties on the object will be the other configuration options specified.
|
||||
- The config array caches configs, so subsequent calls to `getConfig()` with the same filename will return in a fast lookup rather than another calculation.
|
||||
- A config will only be generated if the filename matches an entry in a `files` key. A config will not be generated without matching a `files` key (configs without a `files` key are only applied when another config with a `files` key is applied; configs without `files` are never applied on their own). Any config with a `files` key entry that is `*` or ends with `/**` or `/*` will only be applied if another entry in the same `files` key matches or another config matches.
|
||||
|
||||
## Determining Ignored Paths
|
||||
|
||||
You can determine if a file is ignored by using the `isFileIgnored()` method and passing in the path of any file, as in this example:
|
||||
|
||||
```js
|
||||
const ignored = configs.isFileIgnored("/foo/bar/baz.txt");
|
||||
```
|
||||
|
||||
A file is considered ignored if any of the following is true:
|
||||
|
||||
- **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/a.js` is considered ignored.
|
||||
- **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/baz/a.js` is considered ignored.
|
||||
- **It matches an ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
|
||||
- **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
|
||||
- **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
|
||||
|
||||
For directories, use the `isDirectoryIgnored()` method and pass in the path of any directory, as in this example:
|
||||
|
||||
```js
|
||||
const ignored = configs.isDirectoryIgnored("/foo/bar/");
|
||||
```
|
||||
|
||||
A directory is considered ignored if any of the following is true:
|
||||
|
||||
- **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/baz` is considered ignored.
|
||||
- **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/bar/baz/a.js` is considered ignored.
|
||||
- **It matches and ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
|
||||
- **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
|
||||
- **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
|
||||
|
||||
**Important:** A pattern such as `foo/**` means that `foo` and `foo/` are _not_ ignored whereas `foo/bar` is ignored. If you want to ignore `foo` and all of its subdirectories, use the pattern `foo` or `foo/` in `ignores`.
|
||||
|
||||
## Caching Mechanisms
|
||||
|
||||
Each `ConfigArray` aggressively caches configuration objects to avoid unnecessary work. This caching occurs in two ways:
|
||||
|
||||
1. **File-based Caching.** For each filename that is passed into a method, the resulting config is cached against that filename so you're always guaranteed to get the same object returned from `getConfig()` whenever you pass the same filename in.
|
||||
2. **Index-based Caching.** Whenever a config is calculated, the config elements that were used to create the config are also cached. So if a given filename matches elements 1, 5, and 7, the resulting config is cached with a key of `1,5,7`. That way, if another file is passed that matches the same config elements, the result is already known and doesn't have to be recalculated. That means two files that match all the same elements will return the same config from `getConfig()`.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
The design of this project was influenced by feedback on the ESLint RFC, and incorporates ideas from:
|
||||
|
||||
- Teddy Katz (@not-an-aardvark)
|
||||
- Toru Nagashima (@mysticatea)
|
||||
- Kai Cataldo (@kaicataldo)
|
||||
|
||||
## License
|
||||
|
||||
Apache 2.0
|
||||
|
||||
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
|
||||
<!--sponsorsstart-->
|
||||
|
||||
## Sponsors
|
||||
|
||||
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
|
||||
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
|
||||
|
||||
<h3>Platinum Sponsors</h3>
|
||||
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
|
||||
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
|
||||
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
|
||||
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
|
||||
<h3>Technology Sponsors</h3>
|
||||
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
|
||||
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
|
||||
<!--sponsorsend-->
|
||||
1389
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/index.cjs
generated
vendored
Normal file
1389
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/index.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
142
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/index.d.cts
generated
vendored
Normal file
142
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/index.d.cts
generated
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
export { ObjectSchema } from "@eslint/object-schema";
|
||||
export type PropertyDefinition = import("@eslint/object-schema").PropertyDefinition;
|
||||
export type ObjectDefinition = import("@eslint/object-schema").ObjectDefinition;
|
||||
export type ConfigObject = import("./types.cts").ConfigObject;
|
||||
export type IMinimatchStatic = import("minimatch").IMinimatchStatic;
|
||||
export type IMinimatch = import("minimatch").IMinimatch;
|
||||
export type PathImpl = typeof import("@jsr/std__path");
|
||||
export type ObjectSchemaInstance = import("@eslint/object-schema").ObjectSchema;
|
||||
/**
|
||||
* Represents an array of config objects and provides method for working with
|
||||
* those config objects.
|
||||
*/
|
||||
export class ConfigArray extends Array<any> {
|
||||
[x: symbol]: (config: any) => any;
|
||||
/**
|
||||
* Creates a new instance of ConfigArray.
|
||||
* @param {Iterable|Function|Object} configs An iterable yielding config
|
||||
* objects, or a config function, or a config object.
|
||||
* @param {Object} options The options for the ConfigArray.
|
||||
* @param {string} [options.basePath="/"] The absolute path of the config file directory.
|
||||
* Defaults to `"/"`.
|
||||
* @param {boolean} [options.normalized=false] Flag indicating if the
|
||||
* configs have already been normalized.
|
||||
* @param {Object} [options.schema] The additional schema
|
||||
* definitions to use for the ConfigArray schema.
|
||||
* @param {Array<string>} [options.extraConfigTypes] List of config types supported.
|
||||
*/
|
||||
constructor(configs: Iterable<any> | Function | any, { basePath, normalized, schema: customSchema, extraConfigTypes, }?: {
|
||||
basePath?: string;
|
||||
normalized?: boolean;
|
||||
schema?: any;
|
||||
extraConfigTypes?: Array<string>;
|
||||
});
|
||||
/**
|
||||
* The path of the config file that this array was loaded from.
|
||||
* This is used to calculate filename matches.
|
||||
* @property basePath
|
||||
* @type {string}
|
||||
*/
|
||||
basePath: string;
|
||||
/**
|
||||
* The supported config types.
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
extraConfigTypes: Array<string>;
|
||||
/**
|
||||
* Returns the `files` globs from every config object in the array.
|
||||
* This can be used to determine which files will be matched by a
|
||||
* config array or to use as a glob pattern when no patterns are provided
|
||||
* for a command line interface.
|
||||
* @returns {Array<string|Function>} An array of matchers.
|
||||
*/
|
||||
get files(): Array<string | Function>;
|
||||
/**
|
||||
* Returns ignore matchers that should always be ignored regardless of
|
||||
* the matching `files` fields in any configs. This is necessary to mimic
|
||||
* the behavior of things like .gitignore and .eslintignore, allowing a
|
||||
* globbing operation to be faster.
|
||||
* @returns {string[]} An array of string patterns and functions to be ignored.
|
||||
*/
|
||||
get ignores(): string[];
|
||||
/**
|
||||
* Indicates if the config array has been normalized.
|
||||
* @returns {boolean} True if the config array is normalized, false if not.
|
||||
*/
|
||||
isNormalized(): boolean;
|
||||
/**
|
||||
* Normalizes a config array by flattening embedded arrays and executing
|
||||
* config functions.
|
||||
* @param {Object} [context] The context object for config functions.
|
||||
* @returns {Promise<ConfigArray>} The current ConfigArray instance.
|
||||
*/
|
||||
normalize(context?: any): Promise<ConfigArray>;
|
||||
/**
|
||||
* Normalizes a config array by flattening embedded arrays and executing
|
||||
* config functions.
|
||||
* @param {Object} [context] The context object for config functions.
|
||||
* @returns {ConfigArray} The current ConfigArray instance.
|
||||
*/
|
||||
normalizeSync(context?: any): ConfigArray;
|
||||
/**
|
||||
* Returns the config object for a given file path and a status that can be used to determine why a file has no config.
|
||||
* @param {string} filePath The path of a file to get a config for.
|
||||
* @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }}
|
||||
* An object with an optional property `config` and property `status`.
|
||||
* `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig},
|
||||
* `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}.
|
||||
*/
|
||||
getConfigWithStatus(filePath: string): {
|
||||
config?: any;
|
||||
status: "ignored" | "external" | "unconfigured" | "matched";
|
||||
};
|
||||
/**
|
||||
* Returns the config object for a given file path.
|
||||
* @param {string} filePath The path of a file to get a config for.
|
||||
* @returns {Object|undefined} The config object for this file or `undefined`.
|
||||
*/
|
||||
getConfig(filePath: string): any | undefined;
|
||||
/**
|
||||
* Determines whether a file has a config or why it doesn't.
|
||||
* @param {string} filePath The path of the file to check.
|
||||
* @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values:
|
||||
* * `"ignored"`: the file is ignored
|
||||
* * `"external"`: the file is outside the base path
|
||||
* * `"unconfigured"`: the file is not matched by any config
|
||||
* * `"matched"`: the file has a matching config
|
||||
*/
|
||||
getConfigStatus(filePath: string): "ignored" | "external" | "unconfigured" | "matched";
|
||||
/**
|
||||
* Determines if the given filepath is ignored based on the configs.
|
||||
* @param {string} filePath The path of a file to check.
|
||||
* @returns {boolean} True if the path is ignored, false if not.
|
||||
* @deprecated Use `isFileIgnored` instead.
|
||||
*/
|
||||
isIgnored(filePath: string): boolean;
|
||||
/**
|
||||
* Determines if the given filepath is ignored based on the configs.
|
||||
* @param {string} filePath The path of a file to check.
|
||||
* @returns {boolean} True if the path is ignored, false if not.
|
||||
*/
|
||||
isFileIgnored(filePath: string): boolean;
|
||||
/**
|
||||
* Determines if the given directory is ignored based on the configs.
|
||||
* This checks only default `ignores` that don't have `files` in the
|
||||
* same config. A pattern such as `/foo` be considered to ignore the directory
|
||||
* while a pattern such as `/foo/**` is not considered to ignore the
|
||||
* directory because it is matching files.
|
||||
* @param {string} directoryPath The path of a directory to check.
|
||||
* @returns {boolean} True if the directory is ignored, false if not. Will
|
||||
* return true for any directory that is not inside of `basePath`.
|
||||
* @throws {Error} When the `ConfigArray` is not normalized.
|
||||
*/
|
||||
isDirectoryIgnored(directoryPath: string): boolean;
|
||||
#private;
|
||||
}
|
||||
export namespace ConfigArraySymbol {
|
||||
let isNormalized: symbol;
|
||||
let configCache: symbol;
|
||||
let schema: symbol;
|
||||
let finalizeConfig: symbol;
|
||||
let preprocessConfig: symbol;
|
||||
}
|
||||
1324
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs
generated
vendored
Normal file
1324
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/std__path/posix.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1670
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs
generated
vendored
Normal file
1670
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/std__path/windows.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
24
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/types.ts
generated
vendored
Normal file
24
frontend/webapp/node_modules/@eslint/config-array/dist/cjs/types.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @fileoverview Types for the config-array package.
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
export interface ConfigObject {
|
||||
/**
|
||||
* The files to include.
|
||||
*/
|
||||
files?: string[];
|
||||
|
||||
/**
|
||||
* The files to exclude.
|
||||
*/
|
||||
ignores?: string[];
|
||||
|
||||
/**
|
||||
* The name of the config object.
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
// may also have any number of other properties
|
||||
[key: string]: unknown;
|
||||
}
|
||||
142
frontend/webapp/node_modules/@eslint/config-array/dist/esm/index.d.ts
generated
vendored
Normal file
142
frontend/webapp/node_modules/@eslint/config-array/dist/esm/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
export { ObjectSchema } from "@eslint/object-schema";
|
||||
export type PropertyDefinition = import("@eslint/object-schema").PropertyDefinition;
|
||||
export type ObjectDefinition = import("@eslint/object-schema").ObjectDefinition;
|
||||
export type ConfigObject = import("./types.ts").ConfigObject;
|
||||
export type IMinimatchStatic = import("minimatch").IMinimatchStatic;
|
||||
export type IMinimatch = import("minimatch").IMinimatch;
|
||||
export type PathImpl = typeof import("@jsr/std__path");
|
||||
export type ObjectSchemaInstance = import("@eslint/object-schema").ObjectSchema;
|
||||
/**
|
||||
* Represents an array of config objects and provides method for working with
|
||||
* those config objects.
|
||||
*/
|
||||
export class ConfigArray extends Array<any> {
|
||||
[x: symbol]: (config: any) => any;
|
||||
/**
|
||||
* Creates a new instance of ConfigArray.
|
||||
* @param {Iterable|Function|Object} configs An iterable yielding config
|
||||
* objects, or a config function, or a config object.
|
||||
* @param {Object} options The options for the ConfigArray.
|
||||
* @param {string} [options.basePath="/"] The absolute path of the config file directory.
|
||||
* Defaults to `"/"`.
|
||||
* @param {boolean} [options.normalized=false] Flag indicating if the
|
||||
* configs have already been normalized.
|
||||
* @param {Object} [options.schema] The additional schema
|
||||
* definitions to use for the ConfigArray schema.
|
||||
* @param {Array<string>} [options.extraConfigTypes] List of config types supported.
|
||||
*/
|
||||
constructor(configs: Iterable<any> | Function | any, { basePath, normalized, schema: customSchema, extraConfigTypes, }?: {
|
||||
basePath?: string;
|
||||
normalized?: boolean;
|
||||
schema?: any;
|
||||
extraConfigTypes?: Array<string>;
|
||||
});
|
||||
/**
|
||||
* The path of the config file that this array was loaded from.
|
||||
* This is used to calculate filename matches.
|
||||
* @property basePath
|
||||
* @type {string}
|
||||
*/
|
||||
basePath: string;
|
||||
/**
|
||||
* The supported config types.
|
||||
* @type {Array<string>}
|
||||
*/
|
||||
extraConfigTypes: Array<string>;
|
||||
/**
|
||||
* Returns the `files` globs from every config object in the array.
|
||||
* This can be used to determine which files will be matched by a
|
||||
* config array or to use as a glob pattern when no patterns are provided
|
||||
* for a command line interface.
|
||||
* @returns {Array<string|Function>} An array of matchers.
|
||||
*/
|
||||
get files(): Array<string | Function>;
|
||||
/**
|
||||
* Returns ignore matchers that should always be ignored regardless of
|
||||
* the matching `files` fields in any configs. This is necessary to mimic
|
||||
* the behavior of things like .gitignore and .eslintignore, allowing a
|
||||
* globbing operation to be faster.
|
||||
* @returns {string[]} An array of string patterns and functions to be ignored.
|
||||
*/
|
||||
get ignores(): string[];
|
||||
/**
|
||||
* Indicates if the config array has been normalized.
|
||||
* @returns {boolean} True if the config array is normalized, false if not.
|
||||
*/
|
||||
isNormalized(): boolean;
|
||||
/**
|
||||
* Normalizes a config array by flattening embedded arrays and executing
|
||||
* config functions.
|
||||
* @param {Object} [context] The context object for config functions.
|
||||
* @returns {Promise<ConfigArray>} The current ConfigArray instance.
|
||||
*/
|
||||
normalize(context?: any): Promise<ConfigArray>;
|
||||
/**
|
||||
* Normalizes a config array by flattening embedded arrays and executing
|
||||
* config functions.
|
||||
* @param {Object} [context] The context object for config functions.
|
||||
* @returns {ConfigArray} The current ConfigArray instance.
|
||||
*/
|
||||
normalizeSync(context?: any): ConfigArray;
|
||||
/**
|
||||
* Returns the config object for a given file path and a status that can be used to determine why a file has no config.
|
||||
* @param {string} filePath The path of a file to get a config for.
|
||||
* @returns {{ config?: Object, status: "ignored"|"external"|"unconfigured"|"matched" }}
|
||||
* An object with an optional property `config` and property `status`.
|
||||
* `config` is the config object for the specified file as returned by {@linkcode ConfigArray.getConfig},
|
||||
* `status` a is one of the constants returned by {@linkcode ConfigArray.getConfigStatus}.
|
||||
*/
|
||||
getConfigWithStatus(filePath: string): {
|
||||
config?: any;
|
||||
status: "ignored" | "external" | "unconfigured" | "matched";
|
||||
};
|
||||
/**
|
||||
* Returns the config object for a given file path.
|
||||
* @param {string} filePath The path of a file to get a config for.
|
||||
* @returns {Object|undefined} The config object for this file or `undefined`.
|
||||
*/
|
||||
getConfig(filePath: string): any | undefined;
|
||||
/**
|
||||
* Determines whether a file has a config or why it doesn't.
|
||||
* @param {string} filePath The path of the file to check.
|
||||
* @returns {"ignored"|"external"|"unconfigured"|"matched"} One of the following values:
|
||||
* * `"ignored"`: the file is ignored
|
||||
* * `"external"`: the file is outside the base path
|
||||
* * `"unconfigured"`: the file is not matched by any config
|
||||
* * `"matched"`: the file has a matching config
|
||||
*/
|
||||
getConfigStatus(filePath: string): "ignored" | "external" | "unconfigured" | "matched";
|
||||
/**
|
||||
* Determines if the given filepath is ignored based on the configs.
|
||||
* @param {string} filePath The path of a file to check.
|
||||
* @returns {boolean} True if the path is ignored, false if not.
|
||||
* @deprecated Use `isFileIgnored` instead.
|
||||
*/
|
||||
isIgnored(filePath: string): boolean;
|
||||
/**
|
||||
* Determines if the given filepath is ignored based on the configs.
|
||||
* @param {string} filePath The path of a file to check.
|
||||
* @returns {boolean} True if the path is ignored, false if not.
|
||||
*/
|
||||
isFileIgnored(filePath: string): boolean;
|
||||
/**
|
||||
* Determines if the given directory is ignored based on the configs.
|
||||
* This checks only default `ignores` that don't have `files` in the
|
||||
* same config. A pattern such as `/foo` be considered to ignore the directory
|
||||
* while a pattern such as `/foo/**` is not considered to ignore the
|
||||
* directory because it is matching files.
|
||||
* @param {string} directoryPath The path of a directory to check.
|
||||
* @returns {boolean} True if the directory is ignored, false if not. Will
|
||||
* return true for any directory that is not inside of `basePath`.
|
||||
* @throws {Error} When the `ConfigArray` is not normalized.
|
||||
*/
|
||||
isDirectoryIgnored(directoryPath: string): boolean;
|
||||
#private;
|
||||
}
|
||||
export namespace ConfigArraySymbol {
|
||||
let isNormalized: symbol;
|
||||
let configCache: symbol;
|
||||
let schema: symbol;
|
||||
let finalizeConfig: symbol;
|
||||
let preprocessConfig: symbol;
|
||||
}
|
||||
1364
frontend/webapp/node_modules/@eslint/config-array/dist/esm/index.js
generated
vendored
Normal file
1364
frontend/webapp/node_modules/@eslint/config-array/dist/esm/index.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1302
frontend/webapp/node_modules/@eslint/config-array/dist/esm/std__path/posix.js
generated
vendored
Normal file
1302
frontend/webapp/node_modules/@eslint/config-array/dist/esm/std__path/posix.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1648
frontend/webapp/node_modules/@eslint/config-array/dist/esm/std__path/windows.js
generated
vendored
Normal file
1648
frontend/webapp/node_modules/@eslint/config-array/dist/esm/std__path/windows.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
19
frontend/webapp/node_modules/@eslint/config-array/dist/esm/types.d.ts
generated
vendored
Normal file
19
frontend/webapp/node_modules/@eslint/config-array/dist/esm/types.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @fileoverview Types for the config-array package.
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
export interface ConfigObject {
|
||||
/**
|
||||
* The files to include.
|
||||
*/
|
||||
files?: string[];
|
||||
/**
|
||||
* The files to exclude.
|
||||
*/
|
||||
ignores?: string[];
|
||||
/**
|
||||
* The name of the config object.
|
||||
*/
|
||||
name?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
24
frontend/webapp/node_modules/@eslint/config-array/dist/esm/types.ts
generated
vendored
Normal file
24
frontend/webapp/node_modules/@eslint/config-array/dist/esm/types.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @fileoverview Types for the config-array package.
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
export interface ConfigObject {
|
||||
/**
|
||||
* The files to include.
|
||||
*/
|
||||
files?: string[];
|
||||
|
||||
/**
|
||||
* The files to exclude.
|
||||
*/
|
||||
ignores?: string[];
|
||||
|
||||
/**
|
||||
* The name of the config object.
|
||||
*/
|
||||
name?: string;
|
||||
|
||||
// may also have any number of other properties
|
||||
[key: string]: unknown;
|
||||
}
|
||||
66
frontend/webapp/node_modules/@eslint/config-array/package.json
generated
vendored
Normal file
66
frontend/webapp/node_modules/@eslint/config-array/package.json
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
{
|
||||
"name": "@eslint/config-array",
|
||||
"version": "0.20.0",
|
||||
"description": "General purpose glob-based configuration matching.",
|
||||
"author": "Nicholas C. Zakas",
|
||||
"type": "module",
|
||||
"main": "dist/esm/index.js",
|
||||
"types": "dist/esm/index.d.ts",
|
||||
"exports": {
|
||||
"require": {
|
||||
"types": "./dist/cjs/index.d.cts",
|
||||
"default": "./dist/cjs/index.cjs"
|
||||
},
|
||||
"import": {
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"default": "./dist/esm/index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/eslint/rewrite.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eslint/rewrite/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eslint/rewrite#readme",
|
||||
"scripts": {
|
||||
"build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js",
|
||||
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
|
||||
"build:std__path": "rollup -c rollup.std__path-config.js && node fix-std__path-imports",
|
||||
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts && npm run build:std__path",
|
||||
"test:jsr": "npx jsr@latest publish --dry-run",
|
||||
"pretest": "npm run build",
|
||||
"test": "mocha tests/",
|
||||
"test:coverage": "c8 npm test"
|
||||
},
|
||||
"keywords": [
|
||||
"configuration",
|
||||
"configarray",
|
||||
"config file"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/object-schema": "^2.1.6",
|
||||
"debug": "^4.3.1",
|
||||
"minimatch": "^3.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jsr/std__path": "^1.0.4",
|
||||
"@types/minimatch": "^3.0.5",
|
||||
"c8": "^9.1.0",
|
||||
"mocha": "^10.4.0",
|
||||
"rollup": "^4.16.2",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
}
|
||||
201
frontend/webapp/node_modules/@eslint/config-helpers/LICENSE
generated
vendored
Normal file
201
frontend/webapp/node_modules/@eslint/config-helpers/LICENSE
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
97
frontend/webapp/node_modules/@eslint/config-helpers/README.md
generated
vendored
Normal file
97
frontend/webapp/node_modules/@eslint/config-helpers/README.md
generated
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
# @eslint/config-helpers
|
||||
|
||||
## Description
|
||||
|
||||
Helper utilities for creating ESLint configuration.
|
||||
|
||||
## Installation
|
||||
|
||||
For Node.js and compatible runtimes:
|
||||
|
||||
```shell
|
||||
npm install @eslint/config-helpers
|
||||
# or
|
||||
yarn add @eslint/config-helpers
|
||||
# or
|
||||
pnpm install @eslint/config-helpers
|
||||
# or
|
||||
bun install @eslint/config-helpers
|
||||
```
|
||||
|
||||
For Deno:
|
||||
|
||||
```shell
|
||||
deno add @eslint/config-helpers
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### `defineConfig()`
|
||||
|
||||
The `defineConfig()` function allows you to specify an ESLint configuration with full type checking and additional capabilities, such as `extends`. Here's an example:
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import { defineConfig } from "@eslint/config-helpers";
|
||||
import js from "@eslint/js";
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ["src/**/*.js"],
|
||||
plugins: { js },
|
||||
extends: ["js/recommended"],
|
||||
rules: {
|
||||
semi: "error",
|
||||
"prefer-const": "error",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["test/**/*.js"],
|
||||
rules: {
|
||||
"no-console": "off",
|
||||
},
|
||||
},
|
||||
]);
|
||||
```
|
||||
|
||||
### `globalIgnores()`
|
||||
|
||||
The `globalIgnores()` function allows you to specify patterns for files and directories that should be globally ignored by ESLint. This is useful for excluding files that you don't want to lint, such as build directories or third-party libraries. Here's an example:
|
||||
|
||||
```js
|
||||
// eslint.config.js
|
||||
import { defineConfig, globalIgnores } from "@eslint/config-helpers";
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ["src/**/*.js"],
|
||||
rules: {
|
||||
semi: "error",
|
||||
"prefer-const": "error",
|
||||
},
|
||||
},
|
||||
globalIgnores(["node_modules/", "dist/", "coverage/"]),
|
||||
]);
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Apache 2.0
|
||||
|
||||
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
|
||||
<!--sponsorsstart-->
|
||||
|
||||
## Sponsors
|
||||
|
||||
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
|
||||
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
|
||||
|
||||
<h3>Platinum Sponsors</h3>
|
||||
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
|
||||
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a></p><h3>Silver Sponsors</h3>
|
||||
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
|
||||
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
|
||||
<h3>Technology Sponsors</h3>
|
||||
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
|
||||
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
|
||||
<!--sponsorsend-->
|
||||
567
frontend/webapp/node_modules/@eslint/config-helpers/dist/cjs/index.cjs
generated
vendored
Normal file
567
frontend/webapp/node_modules/@eslint/config-helpers/dist/cjs/index.cjs
generated
vendored
Normal file
@ -0,0 +1,567 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @fileoverview defineConfig helper
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Type Definitions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** @typedef {import("eslint").Linter.Config} Config */
|
||||
/** @typedef {import("eslint").Linter.LegacyConfig} LegacyConfig */
|
||||
/** @typedef {import("eslint").ESLint.Plugin} Plugin */
|
||||
/** @typedef {import("eslint").Linter.RuleEntry} RuleEntry */
|
||||
/** @typedef {import("./types.ts").ExtendsElement} ExtendsElement */
|
||||
/** @typedef {import("./types.ts").SimpleExtendsElement} SimpleExtendsElement */
|
||||
/** @typedef {import("./types.ts").ConfigWithExtends} ConfigWithExtends */
|
||||
/** @typedef {import("./types.ts").InfiniteArray<Config>} InfiniteConfigArray */
|
||||
/** @typedef {import("./types.ts").ConfigWithExtendsArray} ConfigWithExtendsArray */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const eslintrcKeys = [
|
||||
"env",
|
||||
"extends",
|
||||
"globals",
|
||||
"ignorePatterns",
|
||||
"noInlineConfig",
|
||||
"overrides",
|
||||
"parser",
|
||||
"parserOptions",
|
||||
"reportUnusedDisableDirectives",
|
||||
"root",
|
||||
];
|
||||
|
||||
const allowedGlobalIgnoreKeys = new Set(["ignores", "name"]);
|
||||
|
||||
/**
|
||||
* Gets the name of a config object.
|
||||
* @param {Config} config The config object.
|
||||
* @param {string} indexPath The index path of the config object.
|
||||
* @return {string} The name of the config object.
|
||||
*/
|
||||
function getConfigName(config, indexPath) {
|
||||
if (config.name) {
|
||||
return config.name;
|
||||
}
|
||||
|
||||
return `UserConfig${indexPath}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of an extension.
|
||||
* @param {SimpleExtendsElement} extension The extension.
|
||||
* @param {string} indexPath The index of the extension.
|
||||
* @return {string} The name of the extension.
|
||||
*/
|
||||
function getExtensionName(extension, indexPath) {
|
||||
if (typeof extension === "string") {
|
||||
return extension;
|
||||
}
|
||||
|
||||
if (extension.name) {
|
||||
return extension.name;
|
||||
}
|
||||
|
||||
return `ExtendedConfig${indexPath}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a config object is a legacy config.
|
||||
* @param {Config|LegacyConfig} config The config object to check.
|
||||
* @return {config is LegacyConfig} `true` if the config object is a legacy config.
|
||||
*/
|
||||
function isLegacyConfig(config) {
|
||||
for (const key of eslintrcKeys) {
|
||||
if (key in config) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a config object is a global ignores config.
|
||||
* @param {Config} config The config object to check.
|
||||
* @return {boolean} `true` if the config object is a global ignores config.
|
||||
*/
|
||||
function isGlobalIgnores(config) {
|
||||
return Object.keys(config).every(key => allowedGlobalIgnoreKeys.has(key));
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a plugin member ID (rule, processor, etc.) and returns
|
||||
* the namespace and member name.
|
||||
* @param {string} id The ID to parse.
|
||||
* @returns {{namespace:string, name:string}} The namespace and member name.
|
||||
*/
|
||||
function getPluginMember(id) {
|
||||
const firstSlashIndex = id.indexOf("/");
|
||||
|
||||
if (firstSlashIndex === -1) {
|
||||
return { namespace: "", name: id };
|
||||
}
|
||||
|
||||
let namespace = id.slice(0, firstSlashIndex);
|
||||
|
||||
/*
|
||||
* Special cases:
|
||||
* 1. The namespace is `@`, that means it's referring to the
|
||||
* core plugin so `@` is the full namespace.
|
||||
* 2. The namespace starts with `@`, that means it's referring to
|
||||
* an npm scoped package. That means the namespace is the scope
|
||||
* and the package name (i.e., `@eslint/core`).
|
||||
*/
|
||||
if (namespace[0] === "@" && namespace !== "@") {
|
||||
const secondSlashIndex = id.indexOf("/", firstSlashIndex + 1);
|
||||
if (secondSlashIndex !== -1) {
|
||||
namespace = id.slice(0, secondSlashIndex);
|
||||
return { namespace, name: id.slice(secondSlashIndex + 1) };
|
||||
}
|
||||
}
|
||||
|
||||
const name = id.slice(firstSlashIndex + 1);
|
||||
|
||||
return { namespace, name };
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes the plugin config by replacing the namespace with the plugin namespace.
|
||||
* @param {string} userNamespace The namespace of the plugin.
|
||||
* @param {Plugin} plugin The plugin config object.
|
||||
* @param {Config} config The config object to normalize.
|
||||
* @return {Config} The normalized config object.
|
||||
*/
|
||||
function normalizePluginConfig(userNamespace, plugin, config) {
|
||||
// @ts-ignore -- ESLint types aren't updated yet
|
||||
const pluginNamespace = plugin.meta?.namespace;
|
||||
|
||||
// don't do anything if the plugin doesn't have a namespace or rules
|
||||
if (
|
||||
!pluginNamespace ||
|
||||
pluginNamespace === userNamespace ||
|
||||
(!config.rules && !config.processor && !config.language)
|
||||
) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const result = { ...config };
|
||||
|
||||
// update the rules
|
||||
if (result.rules) {
|
||||
const ruleIds = Object.keys(result.rules);
|
||||
|
||||
/** @type {Record<string,RuleEntry|undefined>} */
|
||||
const newRules = {};
|
||||
|
||||
for (let i = 0; i < ruleIds.length; i++) {
|
||||
const ruleId = ruleIds[i];
|
||||
const { namespace: ruleNamespace, name: ruleName } =
|
||||
getPluginMember(ruleId);
|
||||
|
||||
if (ruleNamespace === pluginNamespace) {
|
||||
newRules[`${userNamespace}/${ruleName}`] = result.rules[ruleId];
|
||||
} else {
|
||||
newRules[ruleId] = result.rules[ruleId];
|
||||
}
|
||||
}
|
||||
|
||||
result.rules = newRules;
|
||||
}
|
||||
|
||||
// update the processor
|
||||
|
||||
if (typeof result.processor === "string") {
|
||||
const { namespace: processorNamespace, name: processorName } =
|
||||
getPluginMember(result.processor);
|
||||
|
||||
if (processorNamespace) {
|
||||
if (processorNamespace === pluginNamespace) {
|
||||
result.processor = `${userNamespace}/${processorName}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update the language
|
||||
if (typeof result.language === "string") {
|
||||
const { namespace: languageNamespace, name: languageName } =
|
||||
getPluginMember(result.language);
|
||||
|
||||
if (languageNamespace === pluginNamespace) {
|
||||
result.language = `${userNamespace}/${languageName}`;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deeply normalizes a plugin config, traversing recursively into an arrays.
|
||||
* @param {string} userPluginNamespace The namespace of the plugin.
|
||||
* @param {Plugin} plugin The plugin object.
|
||||
* @param {Config|LegacyConfig|(Config|LegacyConfig)[]} pluginConfig The plugin config to normalize.
|
||||
* @param {string} pluginConfigName The name of the plugin config.
|
||||
* @return {InfiniteConfigArray} The normalized plugin config.
|
||||
*/
|
||||
function deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
pluginConfig,
|
||||
pluginConfigName,
|
||||
) {
|
||||
// if it's an array then it's definitely a new config
|
||||
if (Array.isArray(pluginConfig)) {
|
||||
return pluginConfig.map(pluginSubConfig =>
|
||||
deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
pluginSubConfig,
|
||||
pluginConfigName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// if it's a legacy config, throw an error
|
||||
if (isLegacyConfig(pluginConfig)) {
|
||||
throw new TypeError(
|
||||
`Plugin config "${pluginConfigName}" is an eslintrc config and cannot be used in this context.`,
|
||||
);
|
||||
}
|
||||
|
||||
return normalizePluginConfig(userPluginNamespace, plugin, pluginConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a plugin config by name in the given config.
|
||||
* @param {Config} config The config object.
|
||||
* @param {string} pluginConfigName The name of the plugin config.
|
||||
* @return {InfiniteConfigArray} The plugin config.
|
||||
*/
|
||||
function findPluginConfig(config, pluginConfigName) {
|
||||
const { namespace: userPluginNamespace, name: configName } =
|
||||
getPluginMember(pluginConfigName);
|
||||
const plugin = config.plugins?.[userPluginNamespace];
|
||||
|
||||
if (!plugin) {
|
||||
throw new TypeError(`Plugin "${userPluginNamespace}" not found.`);
|
||||
}
|
||||
|
||||
const directConfig = plugin.configs?.[configName];
|
||||
if (directConfig) {
|
||||
// Arrays are always flat configs, and non-legacy configs can be used directly
|
||||
if (Array.isArray(directConfig) || !isLegacyConfig(directConfig)) {
|
||||
return deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
directConfig,
|
||||
pluginConfigName,
|
||||
);
|
||||
}
|
||||
|
||||
// If it's a legacy config, look for the flat version
|
||||
const flatConfig = plugin.configs?.[`flat/${configName}`];
|
||||
|
||||
if (
|
||||
flatConfig &&
|
||||
(Array.isArray(flatConfig) || !isLegacyConfig(flatConfig))
|
||||
) {
|
||||
return deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
flatConfig,
|
||||
pluginConfigName,
|
||||
);
|
||||
}
|
||||
|
||||
throw new TypeError(
|
||||
`Plugin config "${configName}" in plugin "${userPluginNamespace}" is an eslintrc config and cannot be used in this context.`,
|
||||
);
|
||||
}
|
||||
|
||||
throw new TypeError(
|
||||
`Plugin config "${configName}" not found in plugin "${userPluginNamespace}".`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flattens an array while keeping track of the index path.
|
||||
* @param {any[]} configList The array to traverse.
|
||||
* @param {string} indexPath The index path of the value in a multidimensional array.
|
||||
* @return {IterableIterator<{indexPath:string, value:any}>} The flattened list of values.
|
||||
*/
|
||||
function* flatTraverse(configList, indexPath = "") {
|
||||
for (let i = 0; i < configList.length; i++) {
|
||||
const newIndexPath = indexPath ? `${indexPath}[${i}]` : `[${i}]`;
|
||||
|
||||
// if it's an array then traverse it as well
|
||||
if (Array.isArray(configList[i])) {
|
||||
yield* flatTraverse(configList[i], newIndexPath);
|
||||
continue;
|
||||
}
|
||||
|
||||
yield { indexPath: newIndexPath, value: configList[i] };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends a list of config files by creating every combination of base and extension files.
|
||||
* @param {(string|string[])[]} [baseFiles] The base files.
|
||||
* @param {(string|string[])[]} [extensionFiles] The extension files.
|
||||
* @return {(string|string[])[]} The extended files.
|
||||
*/
|
||||
function extendConfigFiles(baseFiles = [], extensionFiles = []) {
|
||||
if (!extensionFiles.length) {
|
||||
return baseFiles.concat();
|
||||
}
|
||||
|
||||
if (!baseFiles.length) {
|
||||
return extensionFiles.concat();
|
||||
}
|
||||
|
||||
/** @type {(string|string[])[]} */
|
||||
const result = [];
|
||||
|
||||
for (const baseFile of baseFiles) {
|
||||
for (const extensionFile of extensionFiles) {
|
||||
/*
|
||||
* Each entry can be a string or array of strings. The end result
|
||||
* needs to be an array of strings, so we need to be sure to include
|
||||
* all of the items when there's an array.
|
||||
*/
|
||||
|
||||
const entry = [];
|
||||
|
||||
if (Array.isArray(baseFile)) {
|
||||
entry.push(...baseFile);
|
||||
} else {
|
||||
entry.push(baseFile);
|
||||
}
|
||||
|
||||
if (Array.isArray(extensionFile)) {
|
||||
entry.push(...extensionFile);
|
||||
} else {
|
||||
entry.push(extensionFile);
|
||||
}
|
||||
|
||||
result.push(entry);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends a config object with another config object.
|
||||
* @param {Config} baseConfig The base config object.
|
||||
* @param {string} baseConfigName The name of the base config object.
|
||||
* @param {Config} extension The extension config object.
|
||||
* @param {string} extensionName The index of the extension config object.
|
||||
* @return {Config} The extended config object.
|
||||
*/
|
||||
function extendConfig(baseConfig, baseConfigName, extension, extensionName) {
|
||||
const result = { ...extension };
|
||||
|
||||
// for global ignores there is no further work to be done, we just keep everything
|
||||
if (!isGlobalIgnores(extension)) {
|
||||
// for files we need to create every combination of base and extension files
|
||||
if (baseConfig.files) {
|
||||
result.files = extendConfigFiles(baseConfig.files, extension.files);
|
||||
}
|
||||
|
||||
// for ignores we just concatenation the extension ignores onto the base ignores
|
||||
if (baseConfig.ignores) {
|
||||
result.ignores = baseConfig.ignores.concat(extension.ignores ?? []);
|
||||
}
|
||||
}
|
||||
|
||||
result.name = `${baseConfigName} > ${extensionName}`;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes a list of extends elements.
|
||||
* @param {ConfigWithExtends} config The config object.
|
||||
* @param {WeakMap<Config, string>} configNames The map of config objects to their names.
|
||||
* @return {Config[]} The flattened list of config objects.
|
||||
*/
|
||||
function processExtends(config, configNames) {
|
||||
if (!config.extends) {
|
||||
return [config];
|
||||
}
|
||||
|
||||
if (!Array.isArray(config.extends)) {
|
||||
throw new TypeError("The `extends` property must be an array.");
|
||||
}
|
||||
|
||||
const {
|
||||
/** @type {Config[]} */
|
||||
extends: extendsList,
|
||||
|
||||
/** @type {Config} */
|
||||
...configObject
|
||||
} = config;
|
||||
|
||||
const extensionNames = new WeakMap();
|
||||
|
||||
// replace strings with the actual configs
|
||||
const objectExtends = extendsList.map(extendsElement => {
|
||||
if (typeof extendsElement === "string") {
|
||||
const pluginConfig = findPluginConfig(config, extendsElement);
|
||||
|
||||
// assign names
|
||||
if (Array.isArray(pluginConfig)) {
|
||||
pluginConfig.forEach((pluginConfigElement, index) => {
|
||||
extensionNames.set(
|
||||
pluginConfigElement,
|
||||
`${extendsElement}[${index}]`,
|
||||
);
|
||||
});
|
||||
} else {
|
||||
extensionNames.set(pluginConfig, extendsElement);
|
||||
}
|
||||
|
||||
return pluginConfig;
|
||||
}
|
||||
|
||||
return /** @type {Config} */ (extendsElement);
|
||||
});
|
||||
|
||||
const result = [];
|
||||
|
||||
for (const { indexPath, value: extendsElement } of flatTraverse(
|
||||
objectExtends,
|
||||
)) {
|
||||
const extension = /** @type {Config} */ (extendsElement);
|
||||
|
||||
if ("extends" in extension) {
|
||||
throw new TypeError("Nested 'extends' is not allowed.");
|
||||
}
|
||||
|
||||
const baseConfigName = /** @type {string} */ (configNames.get(config));
|
||||
const extensionName =
|
||||
extensionNames.get(extendsElement) ??
|
||||
getExtensionName(extendsElement, indexPath);
|
||||
|
||||
result.push(
|
||||
extendConfig(
|
||||
configObject,
|
||||
baseConfigName,
|
||||
extension,
|
||||
extensionName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the base config object has only `ignores` and `extends`, then
|
||||
* removing `extends` turns it into a global ignores, which is not what
|
||||
* we want. So we need to check if the base config object is a global ignores
|
||||
* and if so, we don't add it to the array.
|
||||
*
|
||||
* (The other option would be to add a `files` entry, but that would result
|
||||
* in a config that didn't actually do anything because there are no
|
||||
* other keys in the config.)
|
||||
*/
|
||||
if (!isGlobalIgnores(configObject)) {
|
||||
result.push(configObject);
|
||||
}
|
||||
|
||||
return result.flat();
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes a list of config objects and arrays.
|
||||
* @param {ConfigWithExtends[]} configList The list of config objects and arrays.
|
||||
* @param {WeakMap<Config, string>} configNames The map of config objects to their names.
|
||||
* @return {Config[]} The flattened list of config objects.
|
||||
*/
|
||||
function processConfigList(configList, configNames) {
|
||||
return configList.flatMap(config => processExtends(config, configNames));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Exports
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Helper function to define a config array.
|
||||
* @param {ConfigWithExtendsArray} args The arguments to the function.
|
||||
* @returns {Config[]} The config array.
|
||||
*/
|
||||
function defineConfig(...args) {
|
||||
const configNames = new WeakMap();
|
||||
const configs = [];
|
||||
|
||||
if (args.length === 0) {
|
||||
throw new TypeError("Expected one or more arguments.");
|
||||
}
|
||||
|
||||
// first flatten the list of configs and get the names
|
||||
for (const { indexPath, value } of flatTraverse(args)) {
|
||||
if (typeof value !== "object" || value === null) {
|
||||
throw new TypeError(
|
||||
`Expected an object but received ${String(value)}.`,
|
||||
);
|
||||
}
|
||||
|
||||
const config = /** @type {ConfigWithExtends} */ (value);
|
||||
|
||||
// save config name for easy reference later
|
||||
configNames.set(config, getConfigName(config, indexPath));
|
||||
configs.push(config);
|
||||
}
|
||||
|
||||
return processConfigList(configs, configNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* @fileoverview Global ignores helper function.
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Type Definitions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
let globalIgnoreCount = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Exports
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Creates a global ignores config with the given patterns.
|
||||
* @param {string[]} ignorePatterns The ignore patterns.
|
||||
* @param {string} [name] The name of the global ignores config.
|
||||
* @returns {Config} The global ignores config.
|
||||
*/
|
||||
function globalIgnores(ignorePatterns, name) {
|
||||
if (!Array.isArray(ignorePatterns)) {
|
||||
throw new TypeError("ignorePatterns must be an array");
|
||||
}
|
||||
|
||||
if (ignorePatterns.length === 0) {
|
||||
throw new TypeError("ignorePatterns must contain at least one pattern");
|
||||
}
|
||||
|
||||
const id = globalIgnoreCount++;
|
||||
|
||||
return {
|
||||
name: name || `globalIgnores ${id}`,
|
||||
ignores: ignorePatterns,
|
||||
};
|
||||
}
|
||||
|
||||
exports.defineConfig = defineConfig;
|
||||
exports.globalIgnores = globalIgnores;
|
||||
22
frontend/webapp/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts
generated
vendored
Normal file
22
frontend/webapp/node_modules/@eslint/config-helpers/dist/cjs/index.d.cts
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
export type Config = import("eslint").Linter.Config;
|
||||
export type LegacyConfig = import("eslint").Linter.LegacyConfig;
|
||||
export type Plugin = import("eslint").ESLint.Plugin;
|
||||
export type RuleEntry = import("eslint").Linter.RuleEntry;
|
||||
export type ExtendsElement = import("./types.cts").ExtendsElement;
|
||||
export type SimpleExtendsElement = import("./types.cts").SimpleExtendsElement;
|
||||
export type ConfigWithExtends = import("./types.cts").ConfigWithExtends;
|
||||
export type InfiniteConfigArray = import("./types.cts").InfiniteArray<Config>;
|
||||
export type ConfigWithExtendsArray = import("./types.cts").ConfigWithExtendsArray;
|
||||
/**
|
||||
* Helper function to define a config array.
|
||||
* @param {ConfigWithExtendsArray} args The arguments to the function.
|
||||
* @returns {Config[]} The config array.
|
||||
*/
|
||||
export function defineConfig(...args: ConfigWithExtendsArray): Config[];
|
||||
/**
|
||||
* Creates a global ignores config with the given patterns.
|
||||
* @param {string[]} ignorePatterns The ignore patterns.
|
||||
* @param {string} [name] The name of the global ignores config.
|
||||
* @returns {Config} The global ignores config.
|
||||
*/
|
||||
export function globalIgnores(ignorePatterns: string[], name?: string): Config;
|
||||
31
frontend/webapp/node_modules/@eslint/config-helpers/dist/cjs/types.cts
generated
vendored
Normal file
31
frontend/webapp/node_modules/@eslint/config-helpers/dist/cjs/types.cts
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @fileoverview Types for this package.
|
||||
*/
|
||||
|
||||
import type { Linter } from "eslint";
|
||||
|
||||
/**
|
||||
* Infinite array type.
|
||||
*/
|
||||
export type InfiniteArray<T> = T | InfiniteArray<T>[];
|
||||
|
||||
/**
|
||||
* The type of array element in the `extends` property after flattening.
|
||||
*/
|
||||
export type SimpleExtendsElement = string | Linter.Config;
|
||||
|
||||
/**
|
||||
* The type of array element in the `extends` property before flattening.
|
||||
*/
|
||||
export type ExtendsElement =
|
||||
| SimpleExtendsElement
|
||||
| InfiniteArray<Linter.Config>;
|
||||
|
||||
/**
|
||||
* Config with extends. Valid only inside of `defineConfig()`.
|
||||
*/
|
||||
export interface ConfigWithExtends extends Linter.Config {
|
||||
extends?: ExtendsElement[];
|
||||
}
|
||||
|
||||
export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];
|
||||
22
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/index.d.ts
generated
vendored
Normal file
22
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
export type Config = import("eslint").Linter.Config;
|
||||
export type LegacyConfig = import("eslint").Linter.LegacyConfig;
|
||||
export type Plugin = import("eslint").ESLint.Plugin;
|
||||
export type RuleEntry = import("eslint").Linter.RuleEntry;
|
||||
export type ExtendsElement = import("./types.ts").ExtendsElement;
|
||||
export type SimpleExtendsElement = import("./types.ts").SimpleExtendsElement;
|
||||
export type ConfigWithExtends = import("./types.ts").ConfigWithExtends;
|
||||
export type InfiniteConfigArray = import("./types.ts").InfiniteArray<Config>;
|
||||
export type ConfigWithExtendsArray = import("./types.ts").ConfigWithExtendsArray;
|
||||
/**
|
||||
* Helper function to define a config array.
|
||||
* @param {ConfigWithExtendsArray} args The arguments to the function.
|
||||
* @returns {Config[]} The config array.
|
||||
*/
|
||||
export function defineConfig(...args: ConfigWithExtendsArray): Config[];
|
||||
/**
|
||||
* Creates a global ignores config with the given patterns.
|
||||
* @param {string[]} ignorePatterns The ignore patterns.
|
||||
* @param {string} [name] The name of the global ignores config.
|
||||
* @returns {Config} The global ignores config.
|
||||
*/
|
||||
export function globalIgnores(ignorePatterns: string[], name?: string): Config;
|
||||
565
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/index.js
generated
vendored
Normal file
565
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/index.js
generated
vendored
Normal file
@ -0,0 +1,565 @@
|
||||
// @ts-self-types="./index.d.ts"
|
||||
/**
|
||||
* @fileoverview defineConfig helper
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Type Definitions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** @typedef {import("eslint").Linter.Config} Config */
|
||||
/** @typedef {import("eslint").Linter.LegacyConfig} LegacyConfig */
|
||||
/** @typedef {import("eslint").ESLint.Plugin} Plugin */
|
||||
/** @typedef {import("eslint").Linter.RuleEntry} RuleEntry */
|
||||
/** @typedef {import("./types.ts").ExtendsElement} ExtendsElement */
|
||||
/** @typedef {import("./types.ts").SimpleExtendsElement} SimpleExtendsElement */
|
||||
/** @typedef {import("./types.ts").ConfigWithExtends} ConfigWithExtends */
|
||||
/** @typedef {import("./types.ts").InfiniteArray<Config>} InfiniteConfigArray */
|
||||
/** @typedef {import("./types.ts").ConfigWithExtendsArray} ConfigWithExtendsArray */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const eslintrcKeys = [
|
||||
"env",
|
||||
"extends",
|
||||
"globals",
|
||||
"ignorePatterns",
|
||||
"noInlineConfig",
|
||||
"overrides",
|
||||
"parser",
|
||||
"parserOptions",
|
||||
"reportUnusedDisableDirectives",
|
||||
"root",
|
||||
];
|
||||
|
||||
const allowedGlobalIgnoreKeys = new Set(["ignores", "name"]);
|
||||
|
||||
/**
|
||||
* Gets the name of a config object.
|
||||
* @param {Config} config The config object.
|
||||
* @param {string} indexPath The index path of the config object.
|
||||
* @return {string} The name of the config object.
|
||||
*/
|
||||
function getConfigName(config, indexPath) {
|
||||
if (config.name) {
|
||||
return config.name;
|
||||
}
|
||||
|
||||
return `UserConfig${indexPath}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of an extension.
|
||||
* @param {SimpleExtendsElement} extension The extension.
|
||||
* @param {string} indexPath The index of the extension.
|
||||
* @return {string} The name of the extension.
|
||||
*/
|
||||
function getExtensionName(extension, indexPath) {
|
||||
if (typeof extension === "string") {
|
||||
return extension;
|
||||
}
|
||||
|
||||
if (extension.name) {
|
||||
return extension.name;
|
||||
}
|
||||
|
||||
return `ExtendedConfig${indexPath}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a config object is a legacy config.
|
||||
* @param {Config|LegacyConfig} config The config object to check.
|
||||
* @return {config is LegacyConfig} `true` if the config object is a legacy config.
|
||||
*/
|
||||
function isLegacyConfig(config) {
|
||||
for (const key of eslintrcKeys) {
|
||||
if (key in config) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a config object is a global ignores config.
|
||||
* @param {Config} config The config object to check.
|
||||
* @return {boolean} `true` if the config object is a global ignores config.
|
||||
*/
|
||||
function isGlobalIgnores(config) {
|
||||
return Object.keys(config).every(key => allowedGlobalIgnoreKeys.has(key));
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a plugin member ID (rule, processor, etc.) and returns
|
||||
* the namespace and member name.
|
||||
* @param {string} id The ID to parse.
|
||||
* @returns {{namespace:string, name:string}} The namespace and member name.
|
||||
*/
|
||||
function getPluginMember(id) {
|
||||
const firstSlashIndex = id.indexOf("/");
|
||||
|
||||
if (firstSlashIndex === -1) {
|
||||
return { namespace: "", name: id };
|
||||
}
|
||||
|
||||
let namespace = id.slice(0, firstSlashIndex);
|
||||
|
||||
/*
|
||||
* Special cases:
|
||||
* 1. The namespace is `@`, that means it's referring to the
|
||||
* core plugin so `@` is the full namespace.
|
||||
* 2. The namespace starts with `@`, that means it's referring to
|
||||
* an npm scoped package. That means the namespace is the scope
|
||||
* and the package name (i.e., `@eslint/core`).
|
||||
*/
|
||||
if (namespace[0] === "@" && namespace !== "@") {
|
||||
const secondSlashIndex = id.indexOf("/", firstSlashIndex + 1);
|
||||
if (secondSlashIndex !== -1) {
|
||||
namespace = id.slice(0, secondSlashIndex);
|
||||
return { namespace, name: id.slice(secondSlashIndex + 1) };
|
||||
}
|
||||
}
|
||||
|
||||
const name = id.slice(firstSlashIndex + 1);
|
||||
|
||||
return { namespace, name };
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes the plugin config by replacing the namespace with the plugin namespace.
|
||||
* @param {string} userNamespace The namespace of the plugin.
|
||||
* @param {Plugin} plugin The plugin config object.
|
||||
* @param {Config} config The config object to normalize.
|
||||
* @return {Config} The normalized config object.
|
||||
*/
|
||||
function normalizePluginConfig(userNamespace, plugin, config) {
|
||||
// @ts-ignore -- ESLint types aren't updated yet
|
||||
const pluginNamespace = plugin.meta?.namespace;
|
||||
|
||||
// don't do anything if the plugin doesn't have a namespace or rules
|
||||
if (
|
||||
!pluginNamespace ||
|
||||
pluginNamespace === userNamespace ||
|
||||
(!config.rules && !config.processor && !config.language)
|
||||
) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const result = { ...config };
|
||||
|
||||
// update the rules
|
||||
if (result.rules) {
|
||||
const ruleIds = Object.keys(result.rules);
|
||||
|
||||
/** @type {Record<string,RuleEntry|undefined>} */
|
||||
const newRules = {};
|
||||
|
||||
for (let i = 0; i < ruleIds.length; i++) {
|
||||
const ruleId = ruleIds[i];
|
||||
const { namespace: ruleNamespace, name: ruleName } =
|
||||
getPluginMember(ruleId);
|
||||
|
||||
if (ruleNamespace === pluginNamespace) {
|
||||
newRules[`${userNamespace}/${ruleName}`] = result.rules[ruleId];
|
||||
} else {
|
||||
newRules[ruleId] = result.rules[ruleId];
|
||||
}
|
||||
}
|
||||
|
||||
result.rules = newRules;
|
||||
}
|
||||
|
||||
// update the processor
|
||||
|
||||
if (typeof result.processor === "string") {
|
||||
const { namespace: processorNamespace, name: processorName } =
|
||||
getPluginMember(result.processor);
|
||||
|
||||
if (processorNamespace) {
|
||||
if (processorNamespace === pluginNamespace) {
|
||||
result.processor = `${userNamespace}/${processorName}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update the language
|
||||
if (typeof result.language === "string") {
|
||||
const { namespace: languageNamespace, name: languageName } =
|
||||
getPluginMember(result.language);
|
||||
|
||||
if (languageNamespace === pluginNamespace) {
|
||||
result.language = `${userNamespace}/${languageName}`;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deeply normalizes a plugin config, traversing recursively into an arrays.
|
||||
* @param {string} userPluginNamespace The namespace of the plugin.
|
||||
* @param {Plugin} plugin The plugin object.
|
||||
* @param {Config|LegacyConfig|(Config|LegacyConfig)[]} pluginConfig The plugin config to normalize.
|
||||
* @param {string} pluginConfigName The name of the plugin config.
|
||||
* @return {InfiniteConfigArray} The normalized plugin config.
|
||||
*/
|
||||
function deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
pluginConfig,
|
||||
pluginConfigName,
|
||||
) {
|
||||
// if it's an array then it's definitely a new config
|
||||
if (Array.isArray(pluginConfig)) {
|
||||
return pluginConfig.map(pluginSubConfig =>
|
||||
deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
pluginSubConfig,
|
||||
pluginConfigName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// if it's a legacy config, throw an error
|
||||
if (isLegacyConfig(pluginConfig)) {
|
||||
throw new TypeError(
|
||||
`Plugin config "${pluginConfigName}" is an eslintrc config and cannot be used in this context.`,
|
||||
);
|
||||
}
|
||||
|
||||
return normalizePluginConfig(userPluginNamespace, plugin, pluginConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds a plugin config by name in the given config.
|
||||
* @param {Config} config The config object.
|
||||
* @param {string} pluginConfigName The name of the plugin config.
|
||||
* @return {InfiniteConfigArray} The plugin config.
|
||||
*/
|
||||
function findPluginConfig(config, pluginConfigName) {
|
||||
const { namespace: userPluginNamespace, name: configName } =
|
||||
getPluginMember(pluginConfigName);
|
||||
const plugin = config.plugins?.[userPluginNamespace];
|
||||
|
||||
if (!plugin) {
|
||||
throw new TypeError(`Plugin "${userPluginNamespace}" not found.`);
|
||||
}
|
||||
|
||||
const directConfig = plugin.configs?.[configName];
|
||||
if (directConfig) {
|
||||
// Arrays are always flat configs, and non-legacy configs can be used directly
|
||||
if (Array.isArray(directConfig) || !isLegacyConfig(directConfig)) {
|
||||
return deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
directConfig,
|
||||
pluginConfigName,
|
||||
);
|
||||
}
|
||||
|
||||
// If it's a legacy config, look for the flat version
|
||||
const flatConfig = plugin.configs?.[`flat/${configName}`];
|
||||
|
||||
if (
|
||||
flatConfig &&
|
||||
(Array.isArray(flatConfig) || !isLegacyConfig(flatConfig))
|
||||
) {
|
||||
return deepNormalizePluginConfig(
|
||||
userPluginNamespace,
|
||||
plugin,
|
||||
flatConfig,
|
||||
pluginConfigName,
|
||||
);
|
||||
}
|
||||
|
||||
throw new TypeError(
|
||||
`Plugin config "${configName}" in plugin "${userPluginNamespace}" is an eslintrc config and cannot be used in this context.`,
|
||||
);
|
||||
}
|
||||
|
||||
throw new TypeError(
|
||||
`Plugin config "${configName}" not found in plugin "${userPluginNamespace}".`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flattens an array while keeping track of the index path.
|
||||
* @param {any[]} configList The array to traverse.
|
||||
* @param {string} indexPath The index path of the value in a multidimensional array.
|
||||
* @return {IterableIterator<{indexPath:string, value:any}>} The flattened list of values.
|
||||
*/
|
||||
function* flatTraverse(configList, indexPath = "") {
|
||||
for (let i = 0; i < configList.length; i++) {
|
||||
const newIndexPath = indexPath ? `${indexPath}[${i}]` : `[${i}]`;
|
||||
|
||||
// if it's an array then traverse it as well
|
||||
if (Array.isArray(configList[i])) {
|
||||
yield* flatTraverse(configList[i], newIndexPath);
|
||||
continue;
|
||||
}
|
||||
|
||||
yield { indexPath: newIndexPath, value: configList[i] };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends a list of config files by creating every combination of base and extension files.
|
||||
* @param {(string|string[])[]} [baseFiles] The base files.
|
||||
* @param {(string|string[])[]} [extensionFiles] The extension files.
|
||||
* @return {(string|string[])[]} The extended files.
|
||||
*/
|
||||
function extendConfigFiles(baseFiles = [], extensionFiles = []) {
|
||||
if (!extensionFiles.length) {
|
||||
return baseFiles.concat();
|
||||
}
|
||||
|
||||
if (!baseFiles.length) {
|
||||
return extensionFiles.concat();
|
||||
}
|
||||
|
||||
/** @type {(string|string[])[]} */
|
||||
const result = [];
|
||||
|
||||
for (const baseFile of baseFiles) {
|
||||
for (const extensionFile of extensionFiles) {
|
||||
/*
|
||||
* Each entry can be a string or array of strings. The end result
|
||||
* needs to be an array of strings, so we need to be sure to include
|
||||
* all of the items when there's an array.
|
||||
*/
|
||||
|
||||
const entry = [];
|
||||
|
||||
if (Array.isArray(baseFile)) {
|
||||
entry.push(...baseFile);
|
||||
} else {
|
||||
entry.push(baseFile);
|
||||
}
|
||||
|
||||
if (Array.isArray(extensionFile)) {
|
||||
entry.push(...extensionFile);
|
||||
} else {
|
||||
entry.push(extensionFile);
|
||||
}
|
||||
|
||||
result.push(entry);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends a config object with another config object.
|
||||
* @param {Config} baseConfig The base config object.
|
||||
* @param {string} baseConfigName The name of the base config object.
|
||||
* @param {Config} extension The extension config object.
|
||||
* @param {string} extensionName The index of the extension config object.
|
||||
* @return {Config} The extended config object.
|
||||
*/
|
||||
function extendConfig(baseConfig, baseConfigName, extension, extensionName) {
|
||||
const result = { ...extension };
|
||||
|
||||
// for global ignores there is no further work to be done, we just keep everything
|
||||
if (!isGlobalIgnores(extension)) {
|
||||
// for files we need to create every combination of base and extension files
|
||||
if (baseConfig.files) {
|
||||
result.files = extendConfigFiles(baseConfig.files, extension.files);
|
||||
}
|
||||
|
||||
// for ignores we just concatenation the extension ignores onto the base ignores
|
||||
if (baseConfig.ignores) {
|
||||
result.ignores = baseConfig.ignores.concat(extension.ignores ?? []);
|
||||
}
|
||||
}
|
||||
|
||||
result.name = `${baseConfigName} > ${extensionName}`;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes a list of extends elements.
|
||||
* @param {ConfigWithExtends} config The config object.
|
||||
* @param {WeakMap<Config, string>} configNames The map of config objects to their names.
|
||||
* @return {Config[]} The flattened list of config objects.
|
||||
*/
|
||||
function processExtends(config, configNames) {
|
||||
if (!config.extends) {
|
||||
return [config];
|
||||
}
|
||||
|
||||
if (!Array.isArray(config.extends)) {
|
||||
throw new TypeError("The `extends` property must be an array.");
|
||||
}
|
||||
|
||||
const {
|
||||
/** @type {Config[]} */
|
||||
extends: extendsList,
|
||||
|
||||
/** @type {Config} */
|
||||
...configObject
|
||||
} = config;
|
||||
|
||||
const extensionNames = new WeakMap();
|
||||
|
||||
// replace strings with the actual configs
|
||||
const objectExtends = extendsList.map(extendsElement => {
|
||||
if (typeof extendsElement === "string") {
|
||||
const pluginConfig = findPluginConfig(config, extendsElement);
|
||||
|
||||
// assign names
|
||||
if (Array.isArray(pluginConfig)) {
|
||||
pluginConfig.forEach((pluginConfigElement, index) => {
|
||||
extensionNames.set(
|
||||
pluginConfigElement,
|
||||
`${extendsElement}[${index}]`,
|
||||
);
|
||||
});
|
||||
} else {
|
||||
extensionNames.set(pluginConfig, extendsElement);
|
||||
}
|
||||
|
||||
return pluginConfig;
|
||||
}
|
||||
|
||||
return /** @type {Config} */ (extendsElement);
|
||||
});
|
||||
|
||||
const result = [];
|
||||
|
||||
for (const { indexPath, value: extendsElement } of flatTraverse(
|
||||
objectExtends,
|
||||
)) {
|
||||
const extension = /** @type {Config} */ (extendsElement);
|
||||
|
||||
if ("extends" in extension) {
|
||||
throw new TypeError("Nested 'extends' is not allowed.");
|
||||
}
|
||||
|
||||
const baseConfigName = /** @type {string} */ (configNames.get(config));
|
||||
const extensionName =
|
||||
extensionNames.get(extendsElement) ??
|
||||
getExtensionName(extendsElement, indexPath);
|
||||
|
||||
result.push(
|
||||
extendConfig(
|
||||
configObject,
|
||||
baseConfigName,
|
||||
extension,
|
||||
extensionName,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the base config object has only `ignores` and `extends`, then
|
||||
* removing `extends` turns it into a global ignores, which is not what
|
||||
* we want. So we need to check if the base config object is a global ignores
|
||||
* and if so, we don't add it to the array.
|
||||
*
|
||||
* (The other option would be to add a `files` entry, but that would result
|
||||
* in a config that didn't actually do anything because there are no
|
||||
* other keys in the config.)
|
||||
*/
|
||||
if (!isGlobalIgnores(configObject)) {
|
||||
result.push(configObject);
|
||||
}
|
||||
|
||||
return result.flat();
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes a list of config objects and arrays.
|
||||
* @param {ConfigWithExtends[]} configList The list of config objects and arrays.
|
||||
* @param {WeakMap<Config, string>} configNames The map of config objects to their names.
|
||||
* @return {Config[]} The flattened list of config objects.
|
||||
*/
|
||||
function processConfigList(configList, configNames) {
|
||||
return configList.flatMap(config => processExtends(config, configNames));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Exports
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Helper function to define a config array.
|
||||
* @param {ConfigWithExtendsArray} args The arguments to the function.
|
||||
* @returns {Config[]} The config array.
|
||||
*/
|
||||
function defineConfig(...args) {
|
||||
const configNames = new WeakMap();
|
||||
const configs = [];
|
||||
|
||||
if (args.length === 0) {
|
||||
throw new TypeError("Expected one or more arguments.");
|
||||
}
|
||||
|
||||
// first flatten the list of configs and get the names
|
||||
for (const { indexPath, value } of flatTraverse(args)) {
|
||||
if (typeof value !== "object" || value === null) {
|
||||
throw new TypeError(
|
||||
`Expected an object but received ${String(value)}.`,
|
||||
);
|
||||
}
|
||||
|
||||
const config = /** @type {ConfigWithExtends} */ (value);
|
||||
|
||||
// save config name for easy reference later
|
||||
configNames.set(config, getConfigName(config, indexPath));
|
||||
configs.push(config);
|
||||
}
|
||||
|
||||
return processConfigList(configs, configNames);
|
||||
}
|
||||
|
||||
/**
|
||||
* @fileoverview Global ignores helper function.
|
||||
* @author Nicholas C. Zakas
|
||||
*/
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Type Definitions
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Helpers
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
let globalIgnoreCount = 0;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Exports
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Creates a global ignores config with the given patterns.
|
||||
* @param {string[]} ignorePatterns The ignore patterns.
|
||||
* @param {string} [name] The name of the global ignores config.
|
||||
* @returns {Config} The global ignores config.
|
||||
*/
|
||||
function globalIgnores(ignorePatterns, name) {
|
||||
if (!Array.isArray(ignorePatterns)) {
|
||||
throw new TypeError("ignorePatterns must be an array");
|
||||
}
|
||||
|
||||
if (ignorePatterns.length === 0) {
|
||||
throw new TypeError("ignorePatterns must contain at least one pattern");
|
||||
}
|
||||
|
||||
const id = globalIgnoreCount++;
|
||||
|
||||
return {
|
||||
name: name || `globalIgnores ${id}`,
|
||||
ignores: ignorePatterns,
|
||||
};
|
||||
}
|
||||
|
||||
export { defineConfig, globalIgnores };
|
||||
23
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/types.d.ts
generated
vendored
Normal file
23
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/types.d.ts
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @fileoverview Types for this package.
|
||||
*/
|
||||
import type { Linter } from "eslint";
|
||||
/**
|
||||
* Infinite array type.
|
||||
*/
|
||||
export type InfiniteArray<T> = T | InfiniteArray<T>[];
|
||||
/**
|
||||
* The type of array element in the `extends` property after flattening.
|
||||
*/
|
||||
export type SimpleExtendsElement = string | Linter.Config;
|
||||
/**
|
||||
* The type of array element in the `extends` property before flattening.
|
||||
*/
|
||||
export type ExtendsElement = SimpleExtendsElement | InfiniteArray<Linter.Config>;
|
||||
/**
|
||||
* Config with extends. Valid only inside of `defineConfig()`.
|
||||
*/
|
||||
export interface ConfigWithExtends extends Linter.Config {
|
||||
extends?: ExtendsElement[];
|
||||
}
|
||||
export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];
|
||||
31
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/types.ts
generated
vendored
Normal file
31
frontend/webapp/node_modules/@eslint/config-helpers/dist/esm/types.ts
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @fileoverview Types for this package.
|
||||
*/
|
||||
|
||||
import type { Linter } from "eslint";
|
||||
|
||||
/**
|
||||
* Infinite array type.
|
||||
*/
|
||||
export type InfiniteArray<T> = T | InfiniteArray<T>[];
|
||||
|
||||
/**
|
||||
* The type of array element in the `extends` property after flattening.
|
||||
*/
|
||||
export type SimpleExtendsElement = string | Linter.Config;
|
||||
|
||||
/**
|
||||
* The type of array element in the `extends` property before flattening.
|
||||
*/
|
||||
export type ExtendsElement =
|
||||
| SimpleExtendsElement
|
||||
| InfiniteArray<Linter.Config>;
|
||||
|
||||
/**
|
||||
* Config with extends. Valid only inside of `defineConfig()`.
|
||||
*/
|
||||
export interface ConfigWithExtends extends Linter.Config {
|
||||
extends?: ExtendsElement[];
|
||||
}
|
||||
|
||||
export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];
|
||||
60
frontend/webapp/node_modules/@eslint/config-helpers/package.json
generated
vendored
Normal file
60
frontend/webapp/node_modules/@eslint/config-helpers/package.json
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
{
|
||||
"name": "@eslint/config-helpers",
|
||||
"version": "0.2.1",
|
||||
"description": "Helper utilities for creating ESLint configuration",
|
||||
"type": "module",
|
||||
"main": "dist/esm/index.js",
|
||||
"types": "dist/esm/index.d.ts",
|
||||
"exports": {
|
||||
"require": {
|
||||
"types": "./dist/cjs/index.d.cts",
|
||||
"default": "./dist/cjs/index.cjs"
|
||||
},
|
||||
"import": {
|
||||
"types": "./dist/esm/index.d.ts",
|
||||
"default": "./dist/esm/index.js"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"scripts": {
|
||||
"build:dedupe-types": "node ../../tools/dedupe-types.js dist/cjs/index.cjs dist/esm/index.js",
|
||||
"build:cts": "node ../../tools/build-cts.js dist/esm/index.d.ts dist/cjs/index.d.cts",
|
||||
"build": "rollup -c && npm run build:dedupe-types && tsc -p tsconfig.esm.json && npm run build:cts",
|
||||
"test:jsr": "npx jsr@latest publish --dry-run",
|
||||
"test": "mocha tests/*.js",
|
||||
"test:coverage": "c8 npm test",
|
||||
"test:types": "tsc -p tests/types/tsconfig.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/eslint/rewrite.git"
|
||||
},
|
||||
"keywords": [
|
||||
"eslint"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/eslint/rewrite/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eslint/rewrite/tree/main/packages/config-helpers#readme",
|
||||
"devDependencies": {
|
||||
"@eslint/core": "^0.13.0",
|
||||
"c8": "^9.1.0",
|
||||
"eslint": "^9.19.0",
|
||||
"mocha": "^10.4.0",
|
||||
"rollup": "^4.16.2",
|
||||
"rollup-plugin-copy": "^3.5.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
}
|
||||
201
frontend/webapp/node_modules/@eslint/core/LICENSE
generated
vendored
Normal file
201
frontend/webapp/node_modules/@eslint/core/LICENSE
generated
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
29
frontend/webapp/node_modules/@eslint/core/README.md
generated
vendored
Normal file
29
frontend/webapp/node_modules/@eslint/core/README.md
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
# ESLint Core
|
||||
|
||||
## Overview
|
||||
|
||||
This package is the future home of the rewritten, runtime-agnostic ESLint core.
|
||||
|
||||
Right now, it exports the core types necessary to implement language plugins.
|
||||
|
||||
## License
|
||||
|
||||
Apache 2.0
|
||||
|
||||
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
|
||||
<!--sponsorsstart-->
|
||||
|
||||
## Sponsors
|
||||
|
||||
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
|
||||
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
|
||||
|
||||
<h3>Platinum Sponsors</h3>
|
||||
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
|
||||
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a></p><h3>Silver Sponsors</h3>
|
||||
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
|
||||
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
|
||||
<h3>Technology Sponsors</h3>
|
||||
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
|
||||
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
|
||||
<!--sponsorsend-->
|
||||
809
frontend/webapp/node_modules/@eslint/core/dist/cjs/types.d.cts
generated
vendored
Normal file
809
frontend/webapp/node_modules/@eslint/core/dist/cjs/types.d.cts
generated
vendored
Normal file
@ -0,0 +1,809 @@
|
||||
/**
|
||||
* @fileoverview Shared types for ESLint Core.
|
||||
*/
|
||||
import { JSONSchema4 } from "json-schema";
|
||||
/**
|
||||
* Represents an error inside of a file.
|
||||
*/
|
||||
export interface FileError {
|
||||
message: string;
|
||||
line: number;
|
||||
column: number;
|
||||
endLine?: number;
|
||||
endColumn?: number;
|
||||
}
|
||||
/**
|
||||
* Represents a problem found in a file.
|
||||
*/
|
||||
export interface FileProblem {
|
||||
ruleId: string | null;
|
||||
message: string;
|
||||
loc: SourceLocation;
|
||||
}
|
||||
/**
|
||||
* Represents the start and end coordinates of a node inside the source.
|
||||
*/
|
||||
export interface SourceLocation {
|
||||
start: Position;
|
||||
end: Position;
|
||||
}
|
||||
/**
|
||||
* Represents the start and end coordinates of a node inside the source with an offset.
|
||||
*/
|
||||
export interface SourceLocationWithOffset {
|
||||
start: PositionWithOffset;
|
||||
end: PositionWithOffset;
|
||||
}
|
||||
/**
|
||||
* Represents a location coordinate inside the source. ESLint-style formats
|
||||
* have just `line` and `column` while others may have `offset` as well.
|
||||
*/
|
||||
export interface Position {
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
/**
|
||||
* Represents a location coordinate inside the source with an offset.
|
||||
*/
|
||||
export interface PositionWithOffset extends Position {
|
||||
offset: number;
|
||||
}
|
||||
/**
|
||||
* Represents a range of characters in the source.
|
||||
*/
|
||||
export type SourceRange = [number, number];
|
||||
/**
|
||||
* What the rule is responsible for finding:
|
||||
* - `problem` means the rule has noticed a potential error.
|
||||
* - `suggestion` means the rule suggests an alternate or better approach.
|
||||
* - `layout` means the rule is looking at spacing, indentation, etc.
|
||||
*/
|
||||
export type RuleType = "problem" | "suggestion" | "layout";
|
||||
/**
|
||||
* The type of fix the rule can provide:
|
||||
* - `code` means the rule can fix syntax.
|
||||
* - `whitespace` means the rule can fix spacing and indentation.
|
||||
*/
|
||||
export type RuleFixType = "code" | "whitespace";
|
||||
/**
|
||||
* An object containing visitor information for a rule. Each method is either the
|
||||
* name of a node type or a selector, or is a method that will be called at specific
|
||||
* times during the traversal.
|
||||
*/
|
||||
export type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
|
||||
/**
|
||||
* Rule meta information used for documentation.
|
||||
*/
|
||||
export interface RulesMetaDocs {
|
||||
/**
|
||||
* A short description of the rule.
|
||||
*/
|
||||
description?: string | undefined;
|
||||
/**
|
||||
* The URL to the documentation for the rule.
|
||||
*/
|
||||
url?: string | undefined;
|
||||
/**
|
||||
* The category the rule falls under.
|
||||
* @deprecated No longer used.
|
||||
*/
|
||||
category?: string | undefined;
|
||||
/**
|
||||
* Indicates if the rule is generally recommended for all users.
|
||||
*/
|
||||
recommended?: boolean | undefined;
|
||||
/**
|
||||
* Indicates if the rule is frozen (no longer accepting feature requests).
|
||||
*/
|
||||
frozen?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* Meta information about a rule.
|
||||
*/
|
||||
export interface RulesMeta<MessageIds extends string = string, ExtRuleDocs = unknown> {
|
||||
/**
|
||||
* Properties that are used when documenting the rule.
|
||||
*/
|
||||
docs?: (RulesMetaDocs & ExtRuleDocs) | undefined;
|
||||
/**
|
||||
* The type of rule.
|
||||
*/
|
||||
type?: RuleType | undefined;
|
||||
/**
|
||||
* The schema for the rule options. Required if the rule has options.
|
||||
*/
|
||||
schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
|
||||
/** Any default options to be recursively merged on top of any user-provided options. */
|
||||
defaultOptions?: unknown[];
|
||||
/**
|
||||
* The messages that the rule can report.
|
||||
*/
|
||||
messages?: Record<MessageIds, string>;
|
||||
/**
|
||||
* Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated.
|
||||
*/
|
||||
deprecated?: boolean | DeprecatedInfo | undefined;
|
||||
/**
|
||||
* @deprecated Use deprecated.replacedBy instead.
|
||||
* The name of the rule(s) this rule was replaced by, if it was deprecated.
|
||||
*/
|
||||
replacedBy?: readonly string[] | undefined;
|
||||
/**
|
||||
* Indicates if the rule is fixable, and if so, what type of fix it provides.
|
||||
*/
|
||||
fixable?: RuleFixType | undefined;
|
||||
/**
|
||||
* Indicates if the rule may provide suggestions.
|
||||
*/
|
||||
hasSuggestions?: boolean | undefined;
|
||||
/**
|
||||
* The language the rule is intended to lint.
|
||||
*/
|
||||
language?: string;
|
||||
/**
|
||||
* The dialects of `language` that the rule is intended to lint.
|
||||
*/
|
||||
dialects?: string[];
|
||||
}
|
||||
/**
|
||||
* Provides additional metadata about a deprecation.
|
||||
*/
|
||||
export interface DeprecatedInfo {
|
||||
/**
|
||||
* General message presented to the user, e.g. for the key rule why the rule
|
||||
* is deprecated or for info how to replace the rule.
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
* URL to more information about this deprecation in general.
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* An empty array explicitly states that there is no replacement.
|
||||
*/
|
||||
replacedBy?: ReplacedByInfo[];
|
||||
/**
|
||||
* The package version since when the rule is deprecated (should use full
|
||||
* semver without a leading "v").
|
||||
*/
|
||||
deprecatedSince?: string;
|
||||
/**
|
||||
* The estimated version when the rule is removed (probably the next major
|
||||
* version). null means the rule is "frozen" (will be available but will not
|
||||
* be changed).
|
||||
*/
|
||||
availableUntil?: string | null;
|
||||
}
|
||||
/**
|
||||
* Provides metadata about a replacement
|
||||
*/
|
||||
export interface ReplacedByInfo {
|
||||
/**
|
||||
* General message presented to the user, e.g. how to replace the rule
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
* URL to more information about this replacement in general
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* Name should be "eslint" if the replacement is an ESLint core rule. Omit
|
||||
* the property if the replacement is in the same plugin.
|
||||
*/
|
||||
plugin?: ExternalSpecifier;
|
||||
/**
|
||||
* Name and documentation of the replacement rule
|
||||
*/
|
||||
rule?: ExternalSpecifier;
|
||||
}
|
||||
/**
|
||||
* Specifies the name and url of an external resource. At least one property
|
||||
* should be set.
|
||||
*/
|
||||
export interface ExternalSpecifier {
|
||||
/**
|
||||
* Name of the referenced plugin / rule.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* URL pointing to documentation for the plugin / rule.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* Generic type for `RuleContext`.
|
||||
*/
|
||||
export interface RuleContextTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RuleOptions: unknown[];
|
||||
Node: unknown;
|
||||
MessageIds: string;
|
||||
}
|
||||
/**
|
||||
* Represents the context object that is passed to a rule. This object contains
|
||||
* information about the current state of the linting process and is the rule's
|
||||
* view into the outside world.
|
||||
*/
|
||||
export interface RuleContext<Options extends RuleContextTypeOptions = RuleContextTypeOptions> {
|
||||
/**
|
||||
* The current working directory for the session.
|
||||
*/
|
||||
cwd: string;
|
||||
/**
|
||||
* Returns the current working directory for the session.
|
||||
* @deprecated Use `cwd` instead.
|
||||
*/
|
||||
getCwd(): string;
|
||||
/**
|
||||
* The filename of the file being linted.
|
||||
*/
|
||||
filename: string;
|
||||
/**
|
||||
* Returns the filename of the file being linted.
|
||||
* @deprecated Use `filename` instead.
|
||||
*/
|
||||
getFilename(): string;
|
||||
/**
|
||||
* The physical filename of the file being linted.
|
||||
*/
|
||||
physicalFilename: string;
|
||||
/**
|
||||
* Returns the physical filename of the file being linted.
|
||||
* @deprecated Use `physicalFilename` instead.
|
||||
*/
|
||||
getPhysicalFilename(): string;
|
||||
/**
|
||||
* The source code object that the rule is running on.
|
||||
*/
|
||||
sourceCode: Options["Code"];
|
||||
/**
|
||||
* Returns the source code object that the rule is running on.
|
||||
* @deprecated Use `sourceCode` instead.
|
||||
*/
|
||||
getSourceCode(): Options["Code"];
|
||||
/**
|
||||
* Shared settings for the configuration.
|
||||
*/
|
||||
settings: SettingsConfig;
|
||||
/**
|
||||
* Parser-specific options for the configuration.
|
||||
* @deprecated Use `languageOptions.parserOptions` instead.
|
||||
*/
|
||||
parserOptions: Record<string, unknown>;
|
||||
/**
|
||||
* The language options for the configuration.
|
||||
*/
|
||||
languageOptions: Options["LangOptions"];
|
||||
/**
|
||||
* The CommonJS path to the parser used while parsing this file.
|
||||
* @deprecated No longer used.
|
||||
*/
|
||||
parserPath: string | undefined;
|
||||
/**
|
||||
* The rule ID.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The rule's configured options.
|
||||
*/
|
||||
options: Options["RuleOptions"];
|
||||
/**
|
||||
* The report function that the rule should use to report problems.
|
||||
* @param violation The violation to report.
|
||||
*/
|
||||
report(violation: ViolationReport<Options["Node"], Options["MessageIds"]>): void;
|
||||
}
|
||||
/**
|
||||
* Manager of text edits for a rule fix.
|
||||
*/
|
||||
export interface RuleTextEditor<EditableSyntaxElement = unknown> {
|
||||
/**
|
||||
* Inserts text after the specified node or token.
|
||||
* @param syntaxElement The node or token to insert after.
|
||||
* @param text The edit to insert after the node or token.
|
||||
*/
|
||||
insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Inserts text after the specified range.
|
||||
* @param range The range to insert after.
|
||||
* @param text The edit to insert after the range.
|
||||
*/
|
||||
insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Inserts text before the specified node or token.
|
||||
* @param syntaxElement A syntax element with location information to insert before.
|
||||
* @param text The edit to insert before the node or token.
|
||||
*/
|
||||
insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Inserts text before the specified range.
|
||||
* @param range The range to insert before.
|
||||
* @param text The edit to insert before the range.
|
||||
*/
|
||||
insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Removes the specified node or token.
|
||||
* @param syntaxElement A syntax element with location information to remove.
|
||||
* @returns The edit to remove the node or token.
|
||||
*/
|
||||
remove(syntaxElement: EditableSyntaxElement): RuleTextEdit;
|
||||
/**
|
||||
* Removes the specified range.
|
||||
* @param range The range to remove.
|
||||
* @returns The edit to remove the range.
|
||||
*/
|
||||
removeRange(range: SourceRange): RuleTextEdit;
|
||||
/**
|
||||
* Replaces the specified node or token with the given text.
|
||||
* @param syntaxElement A syntax element with location information to replace.
|
||||
* @param text The text to replace the node or token with.
|
||||
* @returns The edit to replace the node or token.
|
||||
*/
|
||||
replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Replaces the specified range with the given text.
|
||||
* @param range The range to replace.
|
||||
* @param text The text to replace the range with.
|
||||
* @returns The edit to replace the range.
|
||||
*/
|
||||
replaceTextRange(range: SourceRange, text: string): RuleTextEdit;
|
||||
}
|
||||
/**
|
||||
* Represents a fix for a rule violation implemented as a text edit.
|
||||
*/
|
||||
export interface RuleTextEdit {
|
||||
/**
|
||||
* The range to replace.
|
||||
*/
|
||||
range: SourceRange;
|
||||
/**
|
||||
* The text to insert.
|
||||
*/
|
||||
text: string;
|
||||
}
|
||||
/**
|
||||
* Fixes a violation.
|
||||
* @param fixer The text editor to apply the fix.
|
||||
* @returns The fix(es) for the violation.
|
||||
*/
|
||||
type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
|
||||
interface ViolationReportBase {
|
||||
/**
|
||||
* The type of node that the violation is for.
|
||||
* @deprecated May be removed in the future.
|
||||
*/
|
||||
nodeType?: string | undefined;
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the violation.
|
||||
*/
|
||||
fix?: RuleFixer | null | undefined;
|
||||
/**
|
||||
* An array of suggested fixes for the problem. These fixes may change the
|
||||
* behavior of the code, so they are not applied automatically.
|
||||
*/
|
||||
suggest?: SuggestedEdit[] | null | undefined;
|
||||
}
|
||||
type ViolationMessage<MessageIds = string> = {
|
||||
message: string;
|
||||
} | {
|
||||
messageId: MessageIds;
|
||||
};
|
||||
type ViolationLocation<Node> = {
|
||||
loc: SourceLocation | Position;
|
||||
} | {
|
||||
node: Node;
|
||||
};
|
||||
export type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
|
||||
interface SuggestedEditBase {
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the suggestion.
|
||||
*/
|
||||
fix?: RuleFixer | null | undefined;
|
||||
}
|
||||
type SuggestionMessage = {
|
||||
desc: string;
|
||||
} | {
|
||||
messageId: string;
|
||||
};
|
||||
/**
|
||||
* A suggested edit for a rule violation.
|
||||
*/
|
||||
export type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
|
||||
/**
|
||||
* Generic options for the `RuleDefinition` type.
|
||||
*/
|
||||
export interface RuleDefinitionTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RuleOptions: unknown[];
|
||||
Visitor: RuleVisitor;
|
||||
Node: unknown;
|
||||
MessageIds: string;
|
||||
ExtRuleDocs: unknown;
|
||||
}
|
||||
/**
|
||||
* The definition of an ESLint rule.
|
||||
*/
|
||||
export interface RuleDefinition<Options extends RuleDefinitionTypeOptions = RuleDefinitionTypeOptions> {
|
||||
/**
|
||||
* The meta information for the rule.
|
||||
*/
|
||||
meta?: RulesMeta<Options["MessageIds"], Options["ExtRuleDocs"]>;
|
||||
/**
|
||||
* Creates the visitor that ESLint uses to apply the rule during traversal.
|
||||
* @param context The rule context.
|
||||
* @returns The rule visitor.
|
||||
*/
|
||||
create(context: RuleContext<{
|
||||
LangOptions: Options["LangOptions"];
|
||||
Code: Options["Code"];
|
||||
RuleOptions: Options["RuleOptions"];
|
||||
Node: Options["Node"];
|
||||
MessageIds: Options["MessageIds"];
|
||||
}>): Options["Visitor"];
|
||||
}
|
||||
/**
|
||||
* The human readable severity level used in a configuration.
|
||||
*/
|
||||
export type SeverityName = "off" | "warn" | "error";
|
||||
/**
|
||||
* The numeric severity level for a rule.
|
||||
*
|
||||
* - `0` means off.
|
||||
* - `1` means warn.
|
||||
* - `2` means error.
|
||||
*/
|
||||
export type SeverityLevel = 0 | 1 | 2;
|
||||
/**
|
||||
* The severity of a rule in a configuration.
|
||||
*/
|
||||
export type Severity = SeverityName | SeverityLevel;
|
||||
/**
|
||||
* Represents the configuration options for the core linter.
|
||||
*/
|
||||
export interface LinterOptionsConfig {
|
||||
/**
|
||||
* Indicates whether or not inline configuration is evaluated.
|
||||
*/
|
||||
noInlineConfig?: boolean;
|
||||
/**
|
||||
* Indicates what to do when an unused disable directive is found.
|
||||
*/
|
||||
reportUnusedDisableDirectives?: boolean | Severity;
|
||||
}
|
||||
/**
|
||||
* Shared settings that are accessible from within plugins.
|
||||
*/
|
||||
export type SettingsConfig = Record<string, unknown>;
|
||||
/**
|
||||
* The configuration for a rule.
|
||||
*/
|
||||
export type RuleConfig = Severity | [Severity, ...unknown[]];
|
||||
/**
|
||||
* A collection of rules and their configurations.
|
||||
*/
|
||||
export type RulesConfig = Record<string, RuleConfig>;
|
||||
/**
|
||||
* Generic options for the `Language` type.
|
||||
*/
|
||||
export interface LanguageTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RootNode: unknown;
|
||||
Node: unknown;
|
||||
}
|
||||
/**
|
||||
* Represents a plugin language.
|
||||
*/
|
||||
export interface Language<Options extends LanguageTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RootNode: unknown;
|
||||
Node: unknown;
|
||||
}> {
|
||||
/**
|
||||
* Indicates how ESLint should read the file.
|
||||
*/
|
||||
fileType: "text";
|
||||
/**
|
||||
* First line number returned from the parser (text mode only).
|
||||
*/
|
||||
lineStart: 0 | 1;
|
||||
/**
|
||||
* First column number returned from the parser (text mode only).
|
||||
*/
|
||||
columnStart: 0 | 1;
|
||||
/**
|
||||
* The property to read the node type from. Used in selector querying.
|
||||
*/
|
||||
nodeTypeKey: string;
|
||||
/**
|
||||
* The traversal path that tools should take when evaluating the AST
|
||||
*/
|
||||
visitorKeys?: Record<string, string[]>;
|
||||
/**
|
||||
* Default language options. User-defined options are merged with this object.
|
||||
*/
|
||||
defaultLanguageOptions?: LanguageOptions;
|
||||
/**
|
||||
* Validates languageOptions for this language.
|
||||
*/
|
||||
validateLanguageOptions(languageOptions: Options["LangOptions"]): void;
|
||||
/**
|
||||
* Normalizes languageOptions for this language.
|
||||
*/
|
||||
normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"];
|
||||
/**
|
||||
* Helper for esquery that allows languages to match nodes against
|
||||
* class. esquery currently has classes like `function` that will
|
||||
* match all the various function nodes. This method allows languages
|
||||
* to implement similar shorthands.
|
||||
*/
|
||||
matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean;
|
||||
/**
|
||||
* Parses the given file input into its component parts. This file should not
|
||||
* throws errors for parsing errors but rather should return any parsing
|
||||
* errors as parse of the ParseResult object.
|
||||
*/
|
||||
parse(file: File, context: LanguageContext<Options["LangOptions"]>): ParseResult<Options["RootNode"]>;
|
||||
/**
|
||||
* Creates SourceCode object that ESLint uses to work with a file.
|
||||
*/
|
||||
createSourceCode(file: File, input: OkParseResult<Options["RootNode"]>, context: LanguageContext<Options["LangOptions"]>): Options["Code"];
|
||||
}
|
||||
/**
|
||||
* Plugin-defined options for the language.
|
||||
*/
|
||||
export type LanguageOptions = Record<string, unknown>;
|
||||
/**
|
||||
* The context object that is passed to the language plugin methods.
|
||||
*/
|
||||
export interface LanguageContext<LangOptions = LanguageOptions> {
|
||||
languageOptions: LangOptions;
|
||||
}
|
||||
/**
|
||||
* Represents a file read by ESLint.
|
||||
*/
|
||||
export interface File {
|
||||
/**
|
||||
* The path that ESLint uses for this file. May be a virtual path
|
||||
* if it was returned by a processor.
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* The path to the file on disk. This always maps directly to a file
|
||||
* regardless of whether it was returned from a processor.
|
||||
*/
|
||||
physicalPath: string;
|
||||
/**
|
||||
* Indicates if the original source contained a byte-order marker.
|
||||
* ESLint strips the BOM from the `body`, but this info is needed
|
||||
* to correctly apply autofixing.
|
||||
*/
|
||||
bom: boolean;
|
||||
/**
|
||||
* The body of the file to parse.
|
||||
*/
|
||||
body: string | Uint8Array;
|
||||
}
|
||||
/**
|
||||
* Represents the successful result of parsing a file.
|
||||
*/
|
||||
export interface OkParseResult<RootNode = unknown> {
|
||||
/**
|
||||
* Indicates if the parse was successful. If true, the parse was successful
|
||||
* and ESLint should continue on to create a SourceCode object and run rules;
|
||||
* if false, ESLint should just report the error(s) without doing anything
|
||||
* else.
|
||||
*/
|
||||
ok: true;
|
||||
/**
|
||||
* The abstract syntax tree created by the parser. (only when ok: true)
|
||||
*/
|
||||
ast: RootNode;
|
||||
/**
|
||||
* Any additional data that the parser wants to provide.
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
/**
|
||||
* Represents the unsuccessful result of parsing a file.
|
||||
*/
|
||||
export interface NotOkParseResult {
|
||||
/**
|
||||
* Indicates if the parse was successful. If true, the parse was successful
|
||||
* and ESLint should continue on to create a SourceCode object and run rules;
|
||||
* if false, ESLint should just report the error(s) without doing anything
|
||||
* else.
|
||||
*/
|
||||
ok: false;
|
||||
/**
|
||||
* Any parsing errors, whether fatal or not. (only when ok: false)
|
||||
*/
|
||||
errors: FileError[];
|
||||
/**
|
||||
* Any additional data that the parser wants to provide.
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
export type ParseResult<RootNode = unknown> = OkParseResult<RootNode> | NotOkParseResult;
|
||||
/**
|
||||
* Represents inline configuration found in the source code.
|
||||
*/
|
||||
interface InlineConfigElement {
|
||||
/**
|
||||
* The location of the inline config element.
|
||||
*/
|
||||
loc: SourceLocation;
|
||||
/**
|
||||
* The interpreted configuration from the inline config element.
|
||||
*/
|
||||
config: {
|
||||
rules: RulesConfig;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Generic options for the `SourceCodeBase` type.
|
||||
*/
|
||||
interface SourceCodeBaseTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}
|
||||
/**
|
||||
* Represents the basic interface for a source code object.
|
||||
*/
|
||||
interface SourceCodeBase<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> {
|
||||
/**
|
||||
* Root of the AST.
|
||||
*/
|
||||
ast: Options["RootNode"];
|
||||
/**
|
||||
* The traversal path that tools should take when evaluating the AST.
|
||||
* When present, this overrides the `visitorKeys` on the language for
|
||||
* just this source code object.
|
||||
*/
|
||||
visitorKeys?: Record<string, string[]>;
|
||||
/**
|
||||
* Retrieves the equivalent of `loc` for a given node or token.
|
||||
* @param syntaxElement The node or token to get the location for.
|
||||
* @returns The location of the node or token.
|
||||
*/
|
||||
getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation;
|
||||
/**
|
||||
* Retrieves the equivalent of `range` for a given node or token.
|
||||
* @param syntaxElement The node or token to get the range for.
|
||||
* @returns The range of the node or token.
|
||||
*/
|
||||
getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange;
|
||||
/**
|
||||
* Traversal of AST.
|
||||
*/
|
||||
traverse(): Iterable<TraversalStep>;
|
||||
/**
|
||||
* Applies language options passed in from the ESLint core.
|
||||
*/
|
||||
applyLanguageOptions?(languageOptions: Options["LangOptions"]): void;
|
||||
/**
|
||||
* Return all of the inline areas where ESLint should be disabled/enabled
|
||||
* along with any problems found in evaluating the directives.
|
||||
*/
|
||||
getDisableDirectives?(): {
|
||||
directives: Directive[];
|
||||
problems: FileProblem[];
|
||||
};
|
||||
/**
|
||||
* Returns an array of all inline configuration nodes found in the
|
||||
* source code.
|
||||
*/
|
||||
getInlineConfigNodes?(): Options["ConfigNode"][];
|
||||
/**
|
||||
* Applies configuration found inside of the source code. This method is only
|
||||
* called when ESLint is running with inline configuration allowed.
|
||||
*/
|
||||
applyInlineConfig?(): {
|
||||
configs: InlineConfigElement[];
|
||||
problems: FileProblem[];
|
||||
};
|
||||
/**
|
||||
* Called by ESLint core to indicate that it has finished providing
|
||||
* information. We now add in all the missing variables and ensure that
|
||||
* state-changing methods cannot be called by rules.
|
||||
* @returns {void}
|
||||
*/
|
||||
finalize?(): void;
|
||||
}
|
||||
/**
|
||||
* Represents the source of a text file being linted.
|
||||
*/
|
||||
export interface TextSourceCode<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> extends SourceCodeBase<Options> {
|
||||
/**
|
||||
* The body of the file that you'd like rule developers to access.
|
||||
*/
|
||||
text: string;
|
||||
}
|
||||
/**
|
||||
* Represents the source of a binary file being linted.
|
||||
*/
|
||||
export interface BinarySourceCode<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> extends SourceCodeBase<Options> {
|
||||
/**
|
||||
* The body of the file that you'd like rule developers to access.
|
||||
*/
|
||||
body: Uint8Array;
|
||||
}
|
||||
export type SourceCode<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> = TextSourceCode<Options> | BinarySourceCode<Options>;
|
||||
/**
|
||||
* Represents a traversal step visiting the AST.
|
||||
*/
|
||||
export interface VisitTraversalStep {
|
||||
kind: 1;
|
||||
target: unknown;
|
||||
phase: 1 | 2;
|
||||
args: unknown[];
|
||||
}
|
||||
/**
|
||||
* Represents a traversal step calling a function.
|
||||
*/
|
||||
export interface CallTraversalStep {
|
||||
kind: 2;
|
||||
target: string;
|
||||
phase?: string;
|
||||
args: unknown[];
|
||||
}
|
||||
export type TraversalStep = VisitTraversalStep | CallTraversalStep;
|
||||
/**
|
||||
* The type of disable directive. This determines how ESLint will disable rules.
|
||||
*/
|
||||
export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
|
||||
/**
|
||||
* Represents a disable directive.
|
||||
*/
|
||||
export interface Directive {
|
||||
/**
|
||||
* The type of directive.
|
||||
*/
|
||||
type: DirectiveType;
|
||||
/**
|
||||
* The node of the directive. May be in the AST or a comment/token.
|
||||
*/
|
||||
node: unknown;
|
||||
/**
|
||||
* The value of the directive.
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The justification for the directive.
|
||||
*/
|
||||
justification?: string;
|
||||
}
|
||||
export {};
|
||||
809
frontend/webapp/node_modules/@eslint/core/dist/esm/types.d.ts
generated
vendored
Normal file
809
frontend/webapp/node_modules/@eslint/core/dist/esm/types.d.ts
generated
vendored
Normal file
@ -0,0 +1,809 @@
|
||||
/**
|
||||
* @fileoverview Shared types for ESLint Core.
|
||||
*/
|
||||
import { JSONSchema4 } from "json-schema";
|
||||
/**
|
||||
* Represents an error inside of a file.
|
||||
*/
|
||||
export interface FileError {
|
||||
message: string;
|
||||
line: number;
|
||||
column: number;
|
||||
endLine?: number;
|
||||
endColumn?: number;
|
||||
}
|
||||
/**
|
||||
* Represents a problem found in a file.
|
||||
*/
|
||||
export interface FileProblem {
|
||||
ruleId: string | null;
|
||||
message: string;
|
||||
loc: SourceLocation;
|
||||
}
|
||||
/**
|
||||
* Represents the start and end coordinates of a node inside the source.
|
||||
*/
|
||||
export interface SourceLocation {
|
||||
start: Position;
|
||||
end: Position;
|
||||
}
|
||||
/**
|
||||
* Represents the start and end coordinates of a node inside the source with an offset.
|
||||
*/
|
||||
export interface SourceLocationWithOffset {
|
||||
start: PositionWithOffset;
|
||||
end: PositionWithOffset;
|
||||
}
|
||||
/**
|
||||
* Represents a location coordinate inside the source. ESLint-style formats
|
||||
* have just `line` and `column` while others may have `offset` as well.
|
||||
*/
|
||||
export interface Position {
|
||||
line: number;
|
||||
column: number;
|
||||
}
|
||||
/**
|
||||
* Represents a location coordinate inside the source with an offset.
|
||||
*/
|
||||
export interface PositionWithOffset extends Position {
|
||||
offset: number;
|
||||
}
|
||||
/**
|
||||
* Represents a range of characters in the source.
|
||||
*/
|
||||
export type SourceRange = [number, number];
|
||||
/**
|
||||
* What the rule is responsible for finding:
|
||||
* - `problem` means the rule has noticed a potential error.
|
||||
* - `suggestion` means the rule suggests an alternate or better approach.
|
||||
* - `layout` means the rule is looking at spacing, indentation, etc.
|
||||
*/
|
||||
export type RuleType = "problem" | "suggestion" | "layout";
|
||||
/**
|
||||
* The type of fix the rule can provide:
|
||||
* - `code` means the rule can fix syntax.
|
||||
* - `whitespace` means the rule can fix spacing and indentation.
|
||||
*/
|
||||
export type RuleFixType = "code" | "whitespace";
|
||||
/**
|
||||
* An object containing visitor information for a rule. Each method is either the
|
||||
* name of a node type or a selector, or is a method that will be called at specific
|
||||
* times during the traversal.
|
||||
*/
|
||||
export type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
|
||||
/**
|
||||
* Rule meta information used for documentation.
|
||||
*/
|
||||
export interface RulesMetaDocs {
|
||||
/**
|
||||
* A short description of the rule.
|
||||
*/
|
||||
description?: string | undefined;
|
||||
/**
|
||||
* The URL to the documentation for the rule.
|
||||
*/
|
||||
url?: string | undefined;
|
||||
/**
|
||||
* The category the rule falls under.
|
||||
* @deprecated No longer used.
|
||||
*/
|
||||
category?: string | undefined;
|
||||
/**
|
||||
* Indicates if the rule is generally recommended for all users.
|
||||
*/
|
||||
recommended?: boolean | undefined;
|
||||
/**
|
||||
* Indicates if the rule is frozen (no longer accepting feature requests).
|
||||
*/
|
||||
frozen?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* Meta information about a rule.
|
||||
*/
|
||||
export interface RulesMeta<MessageIds extends string = string, ExtRuleDocs = unknown> {
|
||||
/**
|
||||
* Properties that are used when documenting the rule.
|
||||
*/
|
||||
docs?: (RulesMetaDocs & ExtRuleDocs) | undefined;
|
||||
/**
|
||||
* The type of rule.
|
||||
*/
|
||||
type?: RuleType | undefined;
|
||||
/**
|
||||
* The schema for the rule options. Required if the rule has options.
|
||||
*/
|
||||
schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
|
||||
/** Any default options to be recursively merged on top of any user-provided options. */
|
||||
defaultOptions?: unknown[];
|
||||
/**
|
||||
* The messages that the rule can report.
|
||||
*/
|
||||
messages?: Record<MessageIds, string>;
|
||||
/**
|
||||
* Indicates whether the rule has been deprecated or provides additional metadata about the deprecation. Omit if not deprecated.
|
||||
*/
|
||||
deprecated?: boolean | DeprecatedInfo | undefined;
|
||||
/**
|
||||
* @deprecated Use deprecated.replacedBy instead.
|
||||
* The name of the rule(s) this rule was replaced by, if it was deprecated.
|
||||
*/
|
||||
replacedBy?: readonly string[] | undefined;
|
||||
/**
|
||||
* Indicates if the rule is fixable, and if so, what type of fix it provides.
|
||||
*/
|
||||
fixable?: RuleFixType | undefined;
|
||||
/**
|
||||
* Indicates if the rule may provide suggestions.
|
||||
*/
|
||||
hasSuggestions?: boolean | undefined;
|
||||
/**
|
||||
* The language the rule is intended to lint.
|
||||
*/
|
||||
language?: string;
|
||||
/**
|
||||
* The dialects of `language` that the rule is intended to lint.
|
||||
*/
|
||||
dialects?: string[];
|
||||
}
|
||||
/**
|
||||
* Provides additional metadata about a deprecation.
|
||||
*/
|
||||
export interface DeprecatedInfo {
|
||||
/**
|
||||
* General message presented to the user, e.g. for the key rule why the rule
|
||||
* is deprecated or for info how to replace the rule.
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
* URL to more information about this deprecation in general.
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* An empty array explicitly states that there is no replacement.
|
||||
*/
|
||||
replacedBy?: ReplacedByInfo[];
|
||||
/**
|
||||
* The package version since when the rule is deprecated (should use full
|
||||
* semver without a leading "v").
|
||||
*/
|
||||
deprecatedSince?: string;
|
||||
/**
|
||||
* The estimated version when the rule is removed (probably the next major
|
||||
* version). null means the rule is "frozen" (will be available but will not
|
||||
* be changed).
|
||||
*/
|
||||
availableUntil?: string | null;
|
||||
}
|
||||
/**
|
||||
* Provides metadata about a replacement
|
||||
*/
|
||||
export interface ReplacedByInfo {
|
||||
/**
|
||||
* General message presented to the user, e.g. how to replace the rule
|
||||
*/
|
||||
message?: string;
|
||||
/**
|
||||
* URL to more information about this replacement in general
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* Name should be "eslint" if the replacement is an ESLint core rule. Omit
|
||||
* the property if the replacement is in the same plugin.
|
||||
*/
|
||||
plugin?: ExternalSpecifier;
|
||||
/**
|
||||
* Name and documentation of the replacement rule
|
||||
*/
|
||||
rule?: ExternalSpecifier;
|
||||
}
|
||||
/**
|
||||
* Specifies the name and url of an external resource. At least one property
|
||||
* should be set.
|
||||
*/
|
||||
export interface ExternalSpecifier {
|
||||
/**
|
||||
* Name of the referenced plugin / rule.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* URL pointing to documentation for the plugin / rule.
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
/**
|
||||
* Generic type for `RuleContext`.
|
||||
*/
|
||||
export interface RuleContextTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RuleOptions: unknown[];
|
||||
Node: unknown;
|
||||
MessageIds: string;
|
||||
}
|
||||
/**
|
||||
* Represents the context object that is passed to a rule. This object contains
|
||||
* information about the current state of the linting process and is the rule's
|
||||
* view into the outside world.
|
||||
*/
|
||||
export interface RuleContext<Options extends RuleContextTypeOptions = RuleContextTypeOptions> {
|
||||
/**
|
||||
* The current working directory for the session.
|
||||
*/
|
||||
cwd: string;
|
||||
/**
|
||||
* Returns the current working directory for the session.
|
||||
* @deprecated Use `cwd` instead.
|
||||
*/
|
||||
getCwd(): string;
|
||||
/**
|
||||
* The filename of the file being linted.
|
||||
*/
|
||||
filename: string;
|
||||
/**
|
||||
* Returns the filename of the file being linted.
|
||||
* @deprecated Use `filename` instead.
|
||||
*/
|
||||
getFilename(): string;
|
||||
/**
|
||||
* The physical filename of the file being linted.
|
||||
*/
|
||||
physicalFilename: string;
|
||||
/**
|
||||
* Returns the physical filename of the file being linted.
|
||||
* @deprecated Use `physicalFilename` instead.
|
||||
*/
|
||||
getPhysicalFilename(): string;
|
||||
/**
|
||||
* The source code object that the rule is running on.
|
||||
*/
|
||||
sourceCode: Options["Code"];
|
||||
/**
|
||||
* Returns the source code object that the rule is running on.
|
||||
* @deprecated Use `sourceCode` instead.
|
||||
*/
|
||||
getSourceCode(): Options["Code"];
|
||||
/**
|
||||
* Shared settings for the configuration.
|
||||
*/
|
||||
settings: SettingsConfig;
|
||||
/**
|
||||
* Parser-specific options for the configuration.
|
||||
* @deprecated Use `languageOptions.parserOptions` instead.
|
||||
*/
|
||||
parserOptions: Record<string, unknown>;
|
||||
/**
|
||||
* The language options for the configuration.
|
||||
*/
|
||||
languageOptions: Options["LangOptions"];
|
||||
/**
|
||||
* The CommonJS path to the parser used while parsing this file.
|
||||
* @deprecated No longer used.
|
||||
*/
|
||||
parserPath: string | undefined;
|
||||
/**
|
||||
* The rule ID.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The rule's configured options.
|
||||
*/
|
||||
options: Options["RuleOptions"];
|
||||
/**
|
||||
* The report function that the rule should use to report problems.
|
||||
* @param violation The violation to report.
|
||||
*/
|
||||
report(violation: ViolationReport<Options["Node"], Options["MessageIds"]>): void;
|
||||
}
|
||||
/**
|
||||
* Manager of text edits for a rule fix.
|
||||
*/
|
||||
export interface RuleTextEditor<EditableSyntaxElement = unknown> {
|
||||
/**
|
||||
* Inserts text after the specified node or token.
|
||||
* @param syntaxElement The node or token to insert after.
|
||||
* @param text The edit to insert after the node or token.
|
||||
*/
|
||||
insertTextAfter(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Inserts text after the specified range.
|
||||
* @param range The range to insert after.
|
||||
* @param text The edit to insert after the range.
|
||||
*/
|
||||
insertTextAfterRange(range: SourceRange, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Inserts text before the specified node or token.
|
||||
* @param syntaxElement A syntax element with location information to insert before.
|
||||
* @param text The edit to insert before the node or token.
|
||||
*/
|
||||
insertTextBefore(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Inserts text before the specified range.
|
||||
* @param range The range to insert before.
|
||||
* @param text The edit to insert before the range.
|
||||
*/
|
||||
insertTextBeforeRange(range: SourceRange, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Removes the specified node or token.
|
||||
* @param syntaxElement A syntax element with location information to remove.
|
||||
* @returns The edit to remove the node or token.
|
||||
*/
|
||||
remove(syntaxElement: EditableSyntaxElement): RuleTextEdit;
|
||||
/**
|
||||
* Removes the specified range.
|
||||
* @param range The range to remove.
|
||||
* @returns The edit to remove the range.
|
||||
*/
|
||||
removeRange(range: SourceRange): RuleTextEdit;
|
||||
/**
|
||||
* Replaces the specified node or token with the given text.
|
||||
* @param syntaxElement A syntax element with location information to replace.
|
||||
* @param text The text to replace the node or token with.
|
||||
* @returns The edit to replace the node or token.
|
||||
*/
|
||||
replaceText(syntaxElement: EditableSyntaxElement, text: string): RuleTextEdit;
|
||||
/**
|
||||
* Replaces the specified range with the given text.
|
||||
* @param range The range to replace.
|
||||
* @param text The text to replace the range with.
|
||||
* @returns The edit to replace the range.
|
||||
*/
|
||||
replaceTextRange(range: SourceRange, text: string): RuleTextEdit;
|
||||
}
|
||||
/**
|
||||
* Represents a fix for a rule violation implemented as a text edit.
|
||||
*/
|
||||
export interface RuleTextEdit {
|
||||
/**
|
||||
* The range to replace.
|
||||
*/
|
||||
range: SourceRange;
|
||||
/**
|
||||
* The text to insert.
|
||||
*/
|
||||
text: string;
|
||||
}
|
||||
/**
|
||||
* Fixes a violation.
|
||||
* @param fixer The text editor to apply the fix.
|
||||
* @returns The fix(es) for the violation.
|
||||
*/
|
||||
type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
|
||||
interface ViolationReportBase {
|
||||
/**
|
||||
* The type of node that the violation is for.
|
||||
* @deprecated May be removed in the future.
|
||||
*/
|
||||
nodeType?: string | undefined;
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the violation.
|
||||
*/
|
||||
fix?: RuleFixer | null | undefined;
|
||||
/**
|
||||
* An array of suggested fixes for the problem. These fixes may change the
|
||||
* behavior of the code, so they are not applied automatically.
|
||||
*/
|
||||
suggest?: SuggestedEdit[] | null | undefined;
|
||||
}
|
||||
type ViolationMessage<MessageIds = string> = {
|
||||
message: string;
|
||||
} | {
|
||||
messageId: MessageIds;
|
||||
};
|
||||
type ViolationLocation<Node> = {
|
||||
loc: SourceLocation | Position;
|
||||
} | {
|
||||
node: Node;
|
||||
};
|
||||
export type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
|
||||
interface SuggestedEditBase {
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the suggestion.
|
||||
*/
|
||||
fix?: RuleFixer | null | undefined;
|
||||
}
|
||||
type SuggestionMessage = {
|
||||
desc: string;
|
||||
} | {
|
||||
messageId: string;
|
||||
};
|
||||
/**
|
||||
* A suggested edit for a rule violation.
|
||||
*/
|
||||
export type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
|
||||
/**
|
||||
* Generic options for the `RuleDefinition` type.
|
||||
*/
|
||||
export interface RuleDefinitionTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RuleOptions: unknown[];
|
||||
Visitor: RuleVisitor;
|
||||
Node: unknown;
|
||||
MessageIds: string;
|
||||
ExtRuleDocs: unknown;
|
||||
}
|
||||
/**
|
||||
* The definition of an ESLint rule.
|
||||
*/
|
||||
export interface RuleDefinition<Options extends RuleDefinitionTypeOptions = RuleDefinitionTypeOptions> {
|
||||
/**
|
||||
* The meta information for the rule.
|
||||
*/
|
||||
meta?: RulesMeta<Options["MessageIds"], Options["ExtRuleDocs"]>;
|
||||
/**
|
||||
* Creates the visitor that ESLint uses to apply the rule during traversal.
|
||||
* @param context The rule context.
|
||||
* @returns The rule visitor.
|
||||
*/
|
||||
create(context: RuleContext<{
|
||||
LangOptions: Options["LangOptions"];
|
||||
Code: Options["Code"];
|
||||
RuleOptions: Options["RuleOptions"];
|
||||
Node: Options["Node"];
|
||||
MessageIds: Options["MessageIds"];
|
||||
}>): Options["Visitor"];
|
||||
}
|
||||
/**
|
||||
* The human readable severity level used in a configuration.
|
||||
*/
|
||||
export type SeverityName = "off" | "warn" | "error";
|
||||
/**
|
||||
* The numeric severity level for a rule.
|
||||
*
|
||||
* - `0` means off.
|
||||
* - `1` means warn.
|
||||
* - `2` means error.
|
||||
*/
|
||||
export type SeverityLevel = 0 | 1 | 2;
|
||||
/**
|
||||
* The severity of a rule in a configuration.
|
||||
*/
|
||||
export type Severity = SeverityName | SeverityLevel;
|
||||
/**
|
||||
* Represents the configuration options for the core linter.
|
||||
*/
|
||||
export interface LinterOptionsConfig {
|
||||
/**
|
||||
* Indicates whether or not inline configuration is evaluated.
|
||||
*/
|
||||
noInlineConfig?: boolean;
|
||||
/**
|
||||
* Indicates what to do when an unused disable directive is found.
|
||||
*/
|
||||
reportUnusedDisableDirectives?: boolean | Severity;
|
||||
}
|
||||
/**
|
||||
* Shared settings that are accessible from within plugins.
|
||||
*/
|
||||
export type SettingsConfig = Record<string, unknown>;
|
||||
/**
|
||||
* The configuration for a rule.
|
||||
*/
|
||||
export type RuleConfig = Severity | [Severity, ...unknown[]];
|
||||
/**
|
||||
* A collection of rules and their configurations.
|
||||
*/
|
||||
export type RulesConfig = Record<string, RuleConfig>;
|
||||
/**
|
||||
* Generic options for the `Language` type.
|
||||
*/
|
||||
export interface LanguageTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RootNode: unknown;
|
||||
Node: unknown;
|
||||
}
|
||||
/**
|
||||
* Represents a plugin language.
|
||||
*/
|
||||
export interface Language<Options extends LanguageTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
Code: SourceCode;
|
||||
RootNode: unknown;
|
||||
Node: unknown;
|
||||
}> {
|
||||
/**
|
||||
* Indicates how ESLint should read the file.
|
||||
*/
|
||||
fileType: "text";
|
||||
/**
|
||||
* First line number returned from the parser (text mode only).
|
||||
*/
|
||||
lineStart: 0 | 1;
|
||||
/**
|
||||
* First column number returned from the parser (text mode only).
|
||||
*/
|
||||
columnStart: 0 | 1;
|
||||
/**
|
||||
* The property to read the node type from. Used in selector querying.
|
||||
*/
|
||||
nodeTypeKey: string;
|
||||
/**
|
||||
* The traversal path that tools should take when evaluating the AST
|
||||
*/
|
||||
visitorKeys?: Record<string, string[]>;
|
||||
/**
|
||||
* Default language options. User-defined options are merged with this object.
|
||||
*/
|
||||
defaultLanguageOptions?: LanguageOptions;
|
||||
/**
|
||||
* Validates languageOptions for this language.
|
||||
*/
|
||||
validateLanguageOptions(languageOptions: Options["LangOptions"]): void;
|
||||
/**
|
||||
* Normalizes languageOptions for this language.
|
||||
*/
|
||||
normalizeLanguageOptions?(languageOptions: Options["LangOptions"]): Options["LangOptions"];
|
||||
/**
|
||||
* Helper for esquery that allows languages to match nodes against
|
||||
* class. esquery currently has classes like `function` that will
|
||||
* match all the various function nodes. This method allows languages
|
||||
* to implement similar shorthands.
|
||||
*/
|
||||
matchesSelectorClass?(className: string, node: Options["Node"], ancestry: Options["Node"][]): boolean;
|
||||
/**
|
||||
* Parses the given file input into its component parts. This file should not
|
||||
* throws errors for parsing errors but rather should return any parsing
|
||||
* errors as parse of the ParseResult object.
|
||||
*/
|
||||
parse(file: File, context: LanguageContext<Options["LangOptions"]>): ParseResult<Options["RootNode"]>;
|
||||
/**
|
||||
* Creates SourceCode object that ESLint uses to work with a file.
|
||||
*/
|
||||
createSourceCode(file: File, input: OkParseResult<Options["RootNode"]>, context: LanguageContext<Options["LangOptions"]>): Options["Code"];
|
||||
}
|
||||
/**
|
||||
* Plugin-defined options for the language.
|
||||
*/
|
||||
export type LanguageOptions = Record<string, unknown>;
|
||||
/**
|
||||
* The context object that is passed to the language plugin methods.
|
||||
*/
|
||||
export interface LanguageContext<LangOptions = LanguageOptions> {
|
||||
languageOptions: LangOptions;
|
||||
}
|
||||
/**
|
||||
* Represents a file read by ESLint.
|
||||
*/
|
||||
export interface File {
|
||||
/**
|
||||
* The path that ESLint uses for this file. May be a virtual path
|
||||
* if it was returned by a processor.
|
||||
*/
|
||||
path: string;
|
||||
/**
|
||||
* The path to the file on disk. This always maps directly to a file
|
||||
* regardless of whether it was returned from a processor.
|
||||
*/
|
||||
physicalPath: string;
|
||||
/**
|
||||
* Indicates if the original source contained a byte-order marker.
|
||||
* ESLint strips the BOM from the `body`, but this info is needed
|
||||
* to correctly apply autofixing.
|
||||
*/
|
||||
bom: boolean;
|
||||
/**
|
||||
* The body of the file to parse.
|
||||
*/
|
||||
body: string | Uint8Array;
|
||||
}
|
||||
/**
|
||||
* Represents the successful result of parsing a file.
|
||||
*/
|
||||
export interface OkParseResult<RootNode = unknown> {
|
||||
/**
|
||||
* Indicates if the parse was successful. If true, the parse was successful
|
||||
* and ESLint should continue on to create a SourceCode object and run rules;
|
||||
* if false, ESLint should just report the error(s) without doing anything
|
||||
* else.
|
||||
*/
|
||||
ok: true;
|
||||
/**
|
||||
* The abstract syntax tree created by the parser. (only when ok: true)
|
||||
*/
|
||||
ast: RootNode;
|
||||
/**
|
||||
* Any additional data that the parser wants to provide.
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
/**
|
||||
* Represents the unsuccessful result of parsing a file.
|
||||
*/
|
||||
export interface NotOkParseResult {
|
||||
/**
|
||||
* Indicates if the parse was successful. If true, the parse was successful
|
||||
* and ESLint should continue on to create a SourceCode object and run rules;
|
||||
* if false, ESLint should just report the error(s) without doing anything
|
||||
* else.
|
||||
*/
|
||||
ok: false;
|
||||
/**
|
||||
* Any parsing errors, whether fatal or not. (only when ok: false)
|
||||
*/
|
||||
errors: FileError[];
|
||||
/**
|
||||
* Any additional data that the parser wants to provide.
|
||||
*/
|
||||
[key: string]: any;
|
||||
}
|
||||
export type ParseResult<RootNode = unknown> = OkParseResult<RootNode> | NotOkParseResult;
|
||||
/**
|
||||
* Represents inline configuration found in the source code.
|
||||
*/
|
||||
interface InlineConfigElement {
|
||||
/**
|
||||
* The location of the inline config element.
|
||||
*/
|
||||
loc: SourceLocation;
|
||||
/**
|
||||
* The interpreted configuration from the inline config element.
|
||||
*/
|
||||
config: {
|
||||
rules: RulesConfig;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Generic options for the `SourceCodeBase` type.
|
||||
*/
|
||||
interface SourceCodeBaseTypeOptions {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}
|
||||
/**
|
||||
* Represents the basic interface for a source code object.
|
||||
*/
|
||||
interface SourceCodeBase<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> {
|
||||
/**
|
||||
* Root of the AST.
|
||||
*/
|
||||
ast: Options["RootNode"];
|
||||
/**
|
||||
* The traversal path that tools should take when evaluating the AST.
|
||||
* When present, this overrides the `visitorKeys` on the language for
|
||||
* just this source code object.
|
||||
*/
|
||||
visitorKeys?: Record<string, string[]>;
|
||||
/**
|
||||
* Retrieves the equivalent of `loc` for a given node or token.
|
||||
* @param syntaxElement The node or token to get the location for.
|
||||
* @returns The location of the node or token.
|
||||
*/
|
||||
getLoc(syntaxElement: Options["SyntaxElementWithLoc"]): SourceLocation;
|
||||
/**
|
||||
* Retrieves the equivalent of `range` for a given node or token.
|
||||
* @param syntaxElement The node or token to get the range for.
|
||||
* @returns The range of the node or token.
|
||||
*/
|
||||
getRange(syntaxElement: Options["SyntaxElementWithLoc"]): SourceRange;
|
||||
/**
|
||||
* Traversal of AST.
|
||||
*/
|
||||
traverse(): Iterable<TraversalStep>;
|
||||
/**
|
||||
* Applies language options passed in from the ESLint core.
|
||||
*/
|
||||
applyLanguageOptions?(languageOptions: Options["LangOptions"]): void;
|
||||
/**
|
||||
* Return all of the inline areas where ESLint should be disabled/enabled
|
||||
* along with any problems found in evaluating the directives.
|
||||
*/
|
||||
getDisableDirectives?(): {
|
||||
directives: Directive[];
|
||||
problems: FileProblem[];
|
||||
};
|
||||
/**
|
||||
* Returns an array of all inline configuration nodes found in the
|
||||
* source code.
|
||||
*/
|
||||
getInlineConfigNodes?(): Options["ConfigNode"][];
|
||||
/**
|
||||
* Applies configuration found inside of the source code. This method is only
|
||||
* called when ESLint is running with inline configuration allowed.
|
||||
*/
|
||||
applyInlineConfig?(): {
|
||||
configs: InlineConfigElement[];
|
||||
problems: FileProblem[];
|
||||
};
|
||||
/**
|
||||
* Called by ESLint core to indicate that it has finished providing
|
||||
* information. We now add in all the missing variables and ensure that
|
||||
* state-changing methods cannot be called by rules.
|
||||
* @returns {void}
|
||||
*/
|
||||
finalize?(): void;
|
||||
}
|
||||
/**
|
||||
* Represents the source of a text file being linted.
|
||||
*/
|
||||
export interface TextSourceCode<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> extends SourceCodeBase<Options> {
|
||||
/**
|
||||
* The body of the file that you'd like rule developers to access.
|
||||
*/
|
||||
text: string;
|
||||
}
|
||||
/**
|
||||
* Represents the source of a binary file being linted.
|
||||
*/
|
||||
export interface BinarySourceCode<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> extends SourceCodeBase<Options> {
|
||||
/**
|
||||
* The body of the file that you'd like rule developers to access.
|
||||
*/
|
||||
body: Uint8Array;
|
||||
}
|
||||
export type SourceCode<Options extends SourceCodeBaseTypeOptions = {
|
||||
LangOptions: LanguageOptions;
|
||||
RootNode: unknown;
|
||||
SyntaxElementWithLoc: unknown;
|
||||
ConfigNode: unknown;
|
||||
}> = TextSourceCode<Options> | BinarySourceCode<Options>;
|
||||
/**
|
||||
* Represents a traversal step visiting the AST.
|
||||
*/
|
||||
export interface VisitTraversalStep {
|
||||
kind: 1;
|
||||
target: unknown;
|
||||
phase: 1 | 2;
|
||||
args: unknown[];
|
||||
}
|
||||
/**
|
||||
* Represents a traversal step calling a function.
|
||||
*/
|
||||
export interface CallTraversalStep {
|
||||
kind: 2;
|
||||
target: string;
|
||||
phase?: string;
|
||||
args: unknown[];
|
||||
}
|
||||
export type TraversalStep = VisitTraversalStep | CallTraversalStep;
|
||||
/**
|
||||
* The type of disable directive. This determines how ESLint will disable rules.
|
||||
*/
|
||||
export type DirectiveType = "disable" | "enable" | "disable-line" | "disable-next-line";
|
||||
/**
|
||||
* Represents a disable directive.
|
||||
*/
|
||||
export interface Directive {
|
||||
/**
|
||||
* The type of directive.
|
||||
*/
|
||||
type: DirectiveType;
|
||||
/**
|
||||
* The node of the directive. May be in the AST or a comment/token.
|
||||
*/
|
||||
node: unknown;
|
||||
/**
|
||||
* The value of the directive.
|
||||
*/
|
||||
value: string;
|
||||
/**
|
||||
* The justification for the directive.
|
||||
*/
|
||||
justification?: string;
|
||||
}
|
||||
export {};
|
||||
49
frontend/webapp/node_modules/@eslint/core/package.json
generated
vendored
Normal file
49
frontend/webapp/node_modules/@eslint/core/package.json
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "@eslint/core",
|
||||
"version": "0.12.0",
|
||||
"description": "Runtime-agnostic core of ESLint",
|
||||
"type": "module",
|
||||
"types": "./dist/esm/types.d.ts",
|
||||
"exports": {
|
||||
"types": {
|
||||
"import": "./dist/esm/types.d.ts",
|
||||
"require": "./dist/cjs/types.d.cts"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"scripts": {
|
||||
"build:cts": "node -e \"fs.cpSync('dist/esm/types.d.ts', 'dist/cjs/types.d.cts')\"",
|
||||
"build": "tsc && npm run build:cts",
|
||||
"test:jsr": "npx jsr@latest publish --dry-run",
|
||||
"test:types": "tsc -p tests/types/tsconfig.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/eslint/rewrite.git"
|
||||
},
|
||||
"keywords": [
|
||||
"eslint",
|
||||
"core"
|
||||
],
|
||||
"author": "Nicholas C. Zakas",
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/eslint/rewrite/issues"
|
||||
},
|
||||
"homepage": "https://github.com/eslint/rewrite#readme",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"json-schema": "^0.4.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
}
|
||||
19
frontend/webapp/node_modules/@eslint/eslintrc/LICENSE
generated
vendored
Normal file
19
frontend/webapp/node_modules/@eslint/eslintrc/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright OpenJS Foundation and other contributors, <www.openjsf.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
128
frontend/webapp/node_modules/@eslint/eslintrc/README.md
generated
vendored
Normal file
128
frontend/webapp/node_modules/@eslint/eslintrc/README.md
generated
vendored
Normal file
@ -0,0 +1,128 @@
|
||||
# ESLintRC Library
|
||||
|
||||
This repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs.
|
||||
|
||||
**Note:** This package is frozen except for critical bug fixes as ESLint moves to a new config system.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install the package as follows:
|
||||
|
||||
```shell
|
||||
npm install @eslint/eslintrc -D
|
||||
# or
|
||||
yarn add @eslint/eslintrc -D
|
||||
# or
|
||||
pnpm install @eslint/eslintrc -D
|
||||
# or
|
||||
bun install @eslint/eslintrc -D
|
||||
```
|
||||
|
||||
## Usage (ESM)
|
||||
|
||||
The primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file:
|
||||
|
||||
```js
|
||||
import { FlatCompat } from "@eslint/eslintrc";
|
||||
import js from "@eslint/js";
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
// mimic CommonJS variables -- not needed if using CommonJS
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname, // optional; default: process.cwd()
|
||||
resolvePluginsRelativeTo: __dirname, // optional
|
||||
recommendedConfig: js.configs.recommended, // optional unless you're using "eslint:recommended"
|
||||
allConfig: js.configs.all, // optional unless you're using "eslint:all"
|
||||
});
|
||||
|
||||
export default [
|
||||
|
||||
// mimic ESLintRC-style extends
|
||||
...compat.extends("standard", "example", "plugin:react/recommended"),
|
||||
|
||||
// mimic environments
|
||||
...compat.env({
|
||||
es2020: true,
|
||||
node: true
|
||||
}),
|
||||
|
||||
// mimic plugins
|
||||
...compat.plugins("jsx-a11y", "react"),
|
||||
|
||||
// translate an entire config
|
||||
...compat.config({
|
||||
plugins: ["jsx-a11y", "react"],
|
||||
extends: "standard",
|
||||
env: {
|
||||
es2020: true,
|
||||
node: true
|
||||
},
|
||||
rules: {
|
||||
semi: "error"
|
||||
}
|
||||
})
|
||||
];
|
||||
```
|
||||
|
||||
## Usage (CommonJS)
|
||||
|
||||
Using `FlatCompat` in CommonJS files is similar to ESM, but you'll use `require()` and `module.exports` instead of `import` and `export`. Here's how you use it inside of your `eslint.config.js` CommonJS file:
|
||||
|
||||
```js
|
||||
const { FlatCompat } = require("@eslint/eslintrc");
|
||||
const js = require("@eslint/js");
|
||||
|
||||
const compat = new FlatCompat({
|
||||
baseDirectory: __dirname, // optional; default: process.cwd()
|
||||
resolvePluginsRelativeTo: __dirname, // optional
|
||||
recommendedConfig: js.configs.recommended, // optional unless using "eslint:recommended"
|
||||
allConfig: js.configs.all, // optional unless using "eslint:all"
|
||||
});
|
||||
|
||||
module.exports = [
|
||||
|
||||
// mimic ESLintRC-style extends
|
||||
...compat.extends("standard", "example", "plugin:react/recommended"),
|
||||
|
||||
// mimic environments
|
||||
...compat.env({
|
||||
es2020: true,
|
||||
node: true
|
||||
}),
|
||||
|
||||
// mimic plugins
|
||||
...compat.plugins("jsx-a11y", "react"),
|
||||
|
||||
// translate an entire config
|
||||
...compat.config({
|
||||
plugins: ["jsx-a11y", "react"],
|
||||
extends: "standard",
|
||||
env: {
|
||||
es2020: true,
|
||||
node: true
|
||||
},
|
||||
rules: {
|
||||
semi: "error"
|
||||
}
|
||||
})
|
||||
];
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**TypeError: Missing parameter 'recommendedConfig' in FlatCompat constructor**
|
||||
|
||||
The `recommendedConfig` option is required when any config uses `eslint:recommended`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:recommended` config.
|
||||
|
||||
**TypeError: Missing parameter 'allConfig' in FlatCompat constructor**
|
||||
|
||||
The `allConfig` option is required when any config uses `eslint:all`, including any config in an `extends` clause. To fix this, follow the example above using `@eslint/js` to provide the `eslint:all` config.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT License
|
||||
79
frontend/webapp/node_modules/@eslint/eslintrc/conf/config-schema.js
generated
vendored
Normal file
79
frontend/webapp/node_modules/@eslint/eslintrc/conf/config-schema.js
generated
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
/**
|
||||
* @fileoverview Defines a schema for configs.
|
||||
* @author Sylvan Mably
|
||||
*/
|
||||
|
||||
const baseConfigProperties = {
|
||||
$schema: { type: "string" },
|
||||
env: { type: "object" },
|
||||
extends: { $ref: "#/definitions/stringOrStrings" },
|
||||
globals: { type: "object" },
|
||||
overrides: {
|
||||
type: "array",
|
||||
items: { $ref: "#/definitions/overrideConfig" },
|
||||
additionalItems: false
|
||||
},
|
||||
parser: { type: ["string", "null"] },
|
||||
parserOptions: { type: "object" },
|
||||
plugins: { type: "array" },
|
||||
processor: { type: "string" },
|
||||
rules: { type: "object" },
|
||||
settings: { type: "object" },
|
||||
noInlineConfig: { type: "boolean" },
|
||||
reportUnusedDisableDirectives: { type: "boolean" },
|
||||
|
||||
ecmaFeatures: { type: "object" } // deprecated; logs a warning when used
|
||||
};
|
||||
|
||||
const configSchema = {
|
||||
definitions: {
|
||||
stringOrStrings: {
|
||||
oneOf: [
|
||||
{ type: "string" },
|
||||
{
|
||||
type: "array",
|
||||
items: { type: "string" },
|
||||
additionalItems: false
|
||||
}
|
||||
]
|
||||
},
|
||||
stringOrStringsRequired: {
|
||||
oneOf: [
|
||||
{ type: "string" },
|
||||
{
|
||||
type: "array",
|
||||
items: { type: "string" },
|
||||
additionalItems: false,
|
||||
minItems: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// Config at top-level.
|
||||
objectConfig: {
|
||||
type: "object",
|
||||
properties: {
|
||||
root: { type: "boolean" },
|
||||
ignorePatterns: { $ref: "#/definitions/stringOrStrings" },
|
||||
...baseConfigProperties
|
||||
},
|
||||
additionalProperties: false
|
||||
},
|
||||
|
||||
// Config in `overrides`.
|
||||
overrideConfig: {
|
||||
type: "object",
|
||||
properties: {
|
||||
excludedFiles: { $ref: "#/definitions/stringOrStrings" },
|
||||
files: { $ref: "#/definitions/stringOrStringsRequired" },
|
||||
...baseConfigProperties
|
||||
},
|
||||
required: ["files"],
|
||||
additionalProperties: false
|
||||
}
|
||||
},
|
||||
|
||||
$ref: "#/definitions/objectConfig"
|
||||
};
|
||||
|
||||
export default configSchema;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user