Projektstart
This commit is contained in:
9
backend/node_modules/fast-copy/.release-it.beta.json
generated
vendored
Normal file
9
backend/node_modules/fast-copy/.release-it.beta.json
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"github": {
|
||||
"release": true
|
||||
},
|
||||
"npm": {
|
||||
"tag": "next"
|
||||
},
|
||||
"preReleaseId": "beta"
|
||||
}
|
||||
6
backend/node_modules/fast-copy/.release-it.json
generated
vendored
Normal file
6
backend/node_modules/fast-copy/.release-it.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"github": {
|
||||
"release": true,
|
||||
"tagName": "v${version}"
|
||||
}
|
||||
}
|
||||
135
backend/node_modules/fast-copy/CHANGELOG.md
generated
vendored
Normal file
135
backend/node_modules/fast-copy/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
# fast-copy CHANGELOG
|
||||
|
||||
## 3.0.1
|
||||
|
||||
- [#78](https://github.com/planttheidea/fast-copy/pull/78) - Work when running Node process with `--disable-proto=throw` (thanks [@castarco](https://github.com/castarco))
|
||||
|
||||
## 3.0.0
|
||||
|
||||
**Breaking changes**
|
||||
|
||||
- Exports are now always named, so the `.default` suffix is required when accessing
|
||||
- CommonJS in Node => `const copy = require('fast-copy').default;`
|
||||
- UMD global via CDN => `const copy = globalThis['fast-copy'].default;`
|
||||
- `copy.strict` is no longer available; it is now available as the explicit `copyStrict` named import
|
||||
- Options have been removed
|
||||
- `isStrict` option has been replaced with importing the separate `copyStrict` method
|
||||
- `realm` has been removed entirely, as `instanceof` is no longer used internally
|
||||
- The `FastCopy` namespace in typings has been removed in favor of explicit import of available types
|
||||
|
||||
**Enhancements**
|
||||
|
||||
- Support `exports` option, to have bettern handling for different environments (ESM vs CJS vs UMD) and improve tree-shaking when supported
|
||||
- Can now create a custom copier (either standard or strict), allowing maximum performance for specific use-cases
|
||||
- Small speed improvements when handling certain object types
|
||||
|
||||
**Bug fixes**
|
||||
|
||||
- Correctly handle primitive wrappers, e.g. `new String('foo')`
|
||||
|
||||
## 2.1.7
|
||||
|
||||
- Republish of [`2.1.6`](#216), as the release process failed mid-publish
|
||||
|
||||
## 2.1.6
|
||||
|
||||
- Revert [#69](https://github.com/planttheidea/fast-copy/pull/69) and [#71](https://github.com/planttheidea/fast-copy/pull/71), as they broke the package for NodeJS consumption (will be reintroduced in v3, as breaking changes are required)
|
||||
|
||||
## 2.1.5 - DO NOT USE
|
||||
|
||||
- Ensure `"type": "module"` is set to allow ESM in NodeJS to work [#71](https://github.com/planttheidea/fast-copy/pull/71)
|
||||
|
||||
## 2.1.4 - DO NOT USE
|
||||
|
||||
- Provide `"exports"` definition in `package.json` [#69](https://github.com/planttheidea/fast-copy/pull/69) (thanks [@liteoood](https://github.com/ilteoood))
|
||||
|
||||
## 2.1.3
|
||||
|
||||
- Fix source maps not referencing source code [#65](https://github.com/planttheidea/fast-copy/pull/65)
|
||||
|
||||
## 2.1.2
|
||||
|
||||
- Support `constructor` property override on object [#60](https://github.com/planttheidea/fast-copy/pull/60)
|
||||
- Provide better support for `constructor` override on non-plain object types [#61](https://github.com/planttheidea/fast-copy/pull/61)
|
||||
- Remove `tslint` in favor of `@typescript-eslint` [#62](https://github.com/planttheidea/fast-copy/pull/62)
|
||||
|
||||
## 2.1.1
|
||||
|
||||
- Fix ESM-to-CommonJS issue when using TSC to consume [#37](https://github.com/planttheidea/fast-copy/issues/37)
|
||||
- Modify `Blob` cloning to use `blob.slice()` instead of `new Blob()` for speed
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- Support cloning `Blob` [#31](https://github.com/planttheidea/fast-copy/pull/31) (thanks [@fratzigner](https://github.com/fratzinger))
|
||||
- Fix cloning descriptors that only are getters / setters in strict mode
|
||||
- Handle errors when defining properties in strict mode
|
||||
|
||||
## 2.0.5
|
||||
|
||||
- Fix issue copying objects referenced multiple times in source [#28](https://github.com/planttheidea/fast-copy/pull/28) (thanks [@darkowic](https://github.com/darkowic))
|
||||
|
||||
## 2.0.4
|
||||
|
||||
- Cache length of arrays for faster iteration [#22](https://github.com/planttheidea/fast-copy/pull/22)
|
||||
- Update dev dependencies and types
|
||||
|
||||
## 2.0.3
|
||||
|
||||
- Add safety to constructing native objects (fixes #19)
|
||||
|
||||
## 2.0.2
|
||||
|
||||
- Manually coalesce options instead of use destructuring (performance)
|
||||
|
||||
## 2.0.1
|
||||
|
||||
- Fix typings declarations - [#17](https://github.com/planttheidea/fast-copy/pull/17)
|
||||
|
||||
## 2.0.0
|
||||
|
||||
- Rewrite in TypeScript
|
||||
- Add strict mode (for more accurate and thorough copying, at the expense of less performance)
|
||||
|
||||
#### BREAKING CHANGES
|
||||
|
||||
- Second parameter is now an object of [options](README.md#options)
|
||||
|
||||
## 1.2.4
|
||||
|
||||
- Ensure `Date` copy uses realm-specific constructor
|
||||
|
||||
## 1.2.3
|
||||
|
||||
- Support custom prototype applied to plain object via `Object.create()`
|
||||
|
||||
## 1.2.2
|
||||
|
||||
- Support copy of extensions of native `Array` with alternative `push()` method
|
||||
|
||||
## 1.2.1
|
||||
|
||||
- Under-the-hood optimizations per recommendations from #7
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- Add support for multiple realms
|
||||
|
||||
## 1.1.2
|
||||
|
||||
- Optimize order of operations for common use cases
|
||||
|
||||
## 1.1.1
|
||||
|
||||
- Fix cache using `WeakSet` when there was support for `WeakMap`s instead of `WeakSet`s (in case one was polyfilled but not the other)
|
||||
|
||||
## 1.1.0
|
||||
|
||||
- Add TypeScript and FlowType bindings
|
||||
|
||||
## 1.0.1
|
||||
|
||||
- Activate tree-shaking
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Initial release
|
||||
21
backend/node_modules/fast-copy/LICENSE
generated
vendored
Normal file
21
backend/node_modules/fast-copy/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Tony Quetano
|
||||
|
||||
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.
|
||||
395
backend/node_modules/fast-copy/README.md
generated
vendored
Normal file
395
backend/node_modules/fast-copy/README.md
generated
vendored
Normal file
@@ -0,0 +1,395 @@
|
||||
# fast-copy
|
||||
|
||||
<img src="https://img.shields.io/badge/build-passing-brightgreen.svg"/>
|
||||
<img src="https://img.shields.io/badge/coverage-100%25-brightgreen.svg"/>
|
||||
<img src="https://img.shields.io/badge/license-MIT-blue.svg"/>
|
||||
|
||||
A [blazing fast](#benchmarks) deep object copier
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [fast-copy](#fast-copy)
|
||||
- [Table of contents](#table-of-contents)
|
||||
- [Usage](#usage)
|
||||
- [API](#api)
|
||||
- [`copy`](#copy)
|
||||
- [`copyStrict`](#copystrict)
|
||||
- [`createCopier`](#createcopier)
|
||||
- [Copier methods](#copier-methods)
|
||||
- [Copier state](#copier-state)
|
||||
- [`cache`](#cache)
|
||||
- [`copier`](#copier)
|
||||
- [`Constructor` / `prototype`](#constructor--prototype)
|
||||
- [`createStrictCopier`](#createstrictcopier)
|
||||
- [Types supported](#types-supported)
|
||||
- [Aspects of default copiers](#aspects-of-default-copiers)
|
||||
- [Error references are copied directly, instead of creating a new `*Error` object](#error-references-are-copied-directly-instead-of-creating-a-new-error-object)
|
||||
- [The constructor of the original object is used, instead of using known globals](#the-constructor-of-the-original-object-is-used-instead-of-using-known-globals)
|
||||
- [Generator objects are copied, but still reference the original generator's state](#generator-objects-are-copied-but-still-reference-the-original-generators-state)
|
||||
- [Benchmarks](#benchmarks)
|
||||
- [Simple objects](#simple-objects)
|
||||
- [Complex objects](#complex-objects)
|
||||
- [Big data](#big-data)
|
||||
- [Circular objects](#circular-objects)
|
||||
- [Special objects](#special-objects)
|
||||
- [Development](#development)
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import copy from 'fast-copy';
|
||||
import { deepEqual } from 'fast-equals';
|
||||
|
||||
const object = {
|
||||
array: [123, { deep: 'value' }],
|
||||
map: new Map([
|
||||
['foo', {}],
|
||||
[{ bar: 'baz' }, 'quz'],
|
||||
]),
|
||||
};
|
||||
|
||||
const copiedObject = copy(object);
|
||||
|
||||
console.log(copiedObject === object); // false
|
||||
console.log(deepEqual(copiedObject, object)); // true
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `copy`
|
||||
|
||||
Deeply copy the object passed.
|
||||
|
||||
```js
|
||||
import copy from 'fast-copy';
|
||||
|
||||
const copied = copy({ foo: 'bar' });
|
||||
```
|
||||
|
||||
### `copyStrict`
|
||||
|
||||
Deeply copy the object passed, but with additional strictness when replicating the original object:
|
||||
|
||||
- Properties retain their original property descriptor
|
||||
- Non-enumerable keys are copied
|
||||
- Non-standard properties (e.g., keys on arrays / maps / sets) are copied
|
||||
|
||||
```js
|
||||
import { copyStrict } from 'fast-copy';
|
||||
|
||||
const object = { foo: 'bar' };
|
||||
object.nonEnumerable = Object.defineProperty(object, 'bar', {
|
||||
enumerable: false,
|
||||
value: 'baz',
|
||||
});
|
||||
|
||||
const copied = copy(object);
|
||||
```
|
||||
|
||||
**NOTE**: This method is significantly slower than [`copy`](#copy), so it is recommended to only use this when you have specific use-cases that require it.
|
||||
|
||||
### `createCopier`
|
||||
|
||||
Create a custom copier based on the type-specific methods passed. This is useful if you want to squeeze out maximum performance, or perform something other than a standard deep copy.
|
||||
|
||||
```js
|
||||
import { createCopier } from 'fast-copy';
|
||||
|
||||
const copyShallow = createCopier({
|
||||
array: (array) => [...array],
|
||||
map: (map) => new Map(map.entries()),
|
||||
object: (object) => ({ ...object }),
|
||||
set: (set) => new Set(set.values()),
|
||||
});
|
||||
```
|
||||
|
||||
Each internal copier method has the following contract:
|
||||
|
||||
```js
|
||||
type InternalCopier<Value> = (value: Value, state: State) => Value;
|
||||
|
||||
interface State {
|
||||
Constructor: any;
|
||||
cache: WeakMap;
|
||||
copier: InternalCopier<any>;
|
||||
prototype: any;
|
||||
}
|
||||
```
|
||||
|
||||
Any method overriding the defaults must maintain this contract.
|
||||
|
||||
#### Copier methods
|
||||
|
||||
- `array` => `Array`
|
||||
- `arrayBuffer`=> `ArrayBuffer`, `Float32Array`, `Float64Array`, `Int8Array`, `Int16Array`, `Int32Array`, `Uint8Array`, `Uint8ClampedArray`, `Uint16Array`, `Uint32Array`, `Uint64Array`
|
||||
- `blob` => `Blob`
|
||||
- `dataView` => `DataView`
|
||||
- `date` => `Date`
|
||||
- `error` => `Error`, `AggregateError`, `EvalError`, `RangeError`, `ReferenceError`, `SyntaxError`, `TypeError`, `URIError`
|
||||
- `map` => `Map`
|
||||
- `object` => `Object`, or any custom constructor
|
||||
- `regExp` => `RegExp`
|
||||
- `set` => `Set`
|
||||
|
||||
#### Copier state
|
||||
|
||||
##### `cache`
|
||||
|
||||
If you want to maintain circular reference handling, then you'll need the methods to handle cache population for future lookups:
|
||||
|
||||
```js
|
||||
function shallowlyCloneArray<Value extends any[]>(
|
||||
value: Value,
|
||||
state: State
|
||||
): Value {
|
||||
const clone = [...value];
|
||||
|
||||
state.cache.set(value, clone);
|
||||
|
||||
return clone;
|
||||
}
|
||||
```
|
||||
|
||||
##### `copier`
|
||||
|
||||
`copier` is provided for recursive calls with deeply-nested objects.
|
||||
|
||||
```js
|
||||
function deeplyCloneArray<Value extends any[]>(
|
||||
value: Value,
|
||||
state: State
|
||||
): Value {
|
||||
const clone = [];
|
||||
|
||||
state.cache.set(value, clone);
|
||||
|
||||
value.forEach((item) => state.copier(item, state));
|
||||
|
||||
return clone;
|
||||
}
|
||||
```
|
||||
|
||||
Note above I am using `forEach` instead of a simple `map`. This is because it is highly recommended to store the clone in [`cache`](#cache) eagerly when deeply copying, so that nested circular references are handled correctly.
|
||||
|
||||
##### `Constructor` / `prototype`
|
||||
|
||||
Both `Constructor` and `prototype` properties are only populated with complex objects that are not standard objects or arrays. This is mainly useful for custom subclasses of these globals, or maintaining custom prototypes of objects.
|
||||
|
||||
```js
|
||||
function deeplyCloneSubclassArray<Value extends CustomArray>(
|
||||
value: Value,
|
||||
state: State
|
||||
): Value {
|
||||
const clone = new state.Constructor();
|
||||
|
||||
state.cache.set(value, clone);
|
||||
|
||||
value.forEach((item) => clone.push(item));
|
||||
|
||||
return clone;
|
||||
}
|
||||
|
||||
function deeplyCloneCustomObject<Value extends CustomObject>(
|
||||
value: Value,
|
||||
state: State
|
||||
): Value {
|
||||
const clone = Object.create(state.prototype);
|
||||
|
||||
state.cache.set(value, clone);
|
||||
|
||||
Object.entries(value).forEach(([k, v]) => (clone[k] = v));
|
||||
|
||||
return clone;
|
||||
}
|
||||
```
|
||||
|
||||
### `createStrictCopier`
|
||||
|
||||
Create a custom copier based on the type-specific methods passed, but defaulting to the same functions normally used for `copyStrict`. This is useful if you want to squeeze out better performance while maintaining strict requirements, or perform something other than a strict deep copy.
|
||||
|
||||
```js
|
||||
const createStrictClone = (value, clone) =>
|
||||
Object.getOwnPropertyNames(value).reduce(
|
||||
(clone, property) =>
|
||||
Object.defineProperty(
|
||||
clone,
|
||||
property,
|
||||
Object.getOwnPropertyDescriptor(value, property) || {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: clone[property],
|
||||
writable: true,
|
||||
}
|
||||
),
|
||||
clone
|
||||
);
|
||||
|
||||
const copyStrictShallow = createStrictCopier({
|
||||
array: (array) => createStrictClone(array, []),
|
||||
map: (map) => createStrictClone(map, new Map(map.entries())),
|
||||
object: (object) => createStrictClone(object, {}),
|
||||
set: (set) => createStrictClone(set, new Set(set.values())),
|
||||
});
|
||||
```
|
||||
|
||||
**NOTE**: This method creates a copier that is significantly slower than [`copy`](#copy), as well as likely a copier created by [`createCopier`](#createcopier), so it is recommended to only use this when you have specific use-cases that require it.
|
||||
|
||||
## Types supported
|
||||
|
||||
The following object types are deeply cloned when they are either properties on the object passed, or the object itself:
|
||||
|
||||
- `Array`
|
||||
- `ArrayBuffer`
|
||||
- `Boolean` primitive wrappers (e.g., `new Boolean(true)`)
|
||||
- `Blob`
|
||||
- `Buffer`
|
||||
- `DataView`
|
||||
- `Date`
|
||||
- `Float32Array`
|
||||
- `Float64Array`
|
||||
- `Int8Array`
|
||||
- `Int16Array`
|
||||
- `Int32Array`
|
||||
- `Map`
|
||||
- `Number` primitive wrappers (e.g., `new Number(123)`)
|
||||
- `Object`
|
||||
- `RegExp`
|
||||
- `Set`
|
||||
- `String` primitive wrappers (e.g., `new String('foo')`)
|
||||
- `Uint8Array`
|
||||
- `Uint8ClampedArray`
|
||||
- `Uint16Array`
|
||||
- `Uint32Array`
|
||||
- `React` components
|
||||
- Custom constructors
|
||||
|
||||
The following object types are copied directly, as they are either primitives, cannot be cloned, or the common use-case implementation does not expect cloning:
|
||||
|
||||
- `AsyncFunction`
|
||||
- `Boolean` primitives
|
||||
- `Error`
|
||||
- `Function`
|
||||
- `GeneratorFunction`
|
||||
- `Number` primitives
|
||||
- `Null`
|
||||
- `Promise`
|
||||
- `String` primitives
|
||||
- `Symbol`
|
||||
- `Undefined`
|
||||
- `WeakMap`
|
||||
- `WeakSet`
|
||||
|
||||
Circular objects are supported out of the box. By default, a cache based on `WeakSet` is used, but if `WeakSet` is not available then a fallback is used. The benchmarks quoted below are based on use of `WeakSet`.
|
||||
|
||||
## Aspects of default copiers
|
||||
|
||||
Inherently, what is considered a valid copy is subjective because of different requirements and use-cases. For this library, some decisions were explicitly made for the default copiers of specific object types, and those decisions are detailed below. If your use-cases require different handling, you can always create your own custom copier with [`createCopier`](#createcopier) or [`createStrictCopier`](#createstrictcopier).
|
||||
|
||||
### Error references are copied directly, instead of creating a new `*Error` object
|
||||
|
||||
While it would be relatively trivial to copy over the message and stack to a new object of the same `Error` subclass, it is a common practice to "override" the message or stack, and copies would not retain this mutation. As such, the original reference is copied.
|
||||
|
||||
### The constructor of the original object is used, instead of using known globals
|
||||
|
||||
Starting in ES2015, native globals can be subclassed like any custom class. When copying, we explicitly reuse the constructor of the original object. However, the expectation is that these subclasses would have the same constructur signature as their native base class. This is a common community practice, but there is the possibility of inaccuracy if the contract differs.
|
||||
|
||||
### Generator objects are copied, but still reference the original generator's state
|
||||
|
||||
[Generator objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator) are specific types of iterators, but appear like standard objects that just have a few methods (`next`, `throw`, `return`). These methods are bound to the internal state of the generator, which cannot be copied effectively. Normally this would be treated like other "uncopiable" objects and simply pass the reference through, however the "validation" of whether it is a generator object or a standard object is not guaranteed (duck-typing) and there is a runtime cost associated with. Therefore, the simplest path of treating it like a standard object (copying methods to a new object) was taken.
|
||||
|
||||
## Benchmarks
|
||||
|
||||
#### Simple objects
|
||||
|
||||
_Small number of properties, all values are primitives_
|
||||
|
||||
| | Operations / second |
|
||||
| ------------------ | ------------------- |
|
||||
| **fast-copy** | **5,880,312** |
|
||||
| lodash.cloneDeep | 2,706,261 |
|
||||
| clone | 2,207,231 |
|
||||
| deepclone | 1,274,810 |
|
||||
| fast-clone | 1,239,952 |
|
||||
| ramda | 1,146,152 |
|
||||
| fast-copy (strict) | 852,382 |
|
||||
|
||||
#### Complex objects
|
||||
|
||||
_Large number of properties, values are a combination of primitives and complex objects_
|
||||
|
||||
| | Operations / second |
|
||||
| ------------------ | ------------------- |
|
||||
| **fast-copy** | **162,858** |
|
||||
| ramda | 142,104 |
|
||||
| deepclone | 133,607 |
|
||||
| fast-clone | 101,143 |
|
||||
| clone | 70,872 |
|
||||
| fast-copy (strict) | 62,961 |
|
||||
| lodash.cloneDeep | 62,060 |
|
||||
|
||||
#### Big data
|
||||
|
||||
_Very large number of properties with high amount of nesting, mainly objects and arrays_
|
||||
|
||||
| | Operations / second |
|
||||
| ------------------ | ------------------- |
|
||||
| **fast-copy** | **303** |
|
||||
| fast-clone | 245 |
|
||||
| deepclone | 151 |
|
||||
| lodash.cloneDeep | 150 |
|
||||
| clone | 93 |
|
||||
| fast-copy (strict) | 90 |
|
||||
| ramda | 42 |
|
||||
|
||||
#### Circular objects
|
||||
|
||||
_Objects that deeply reference themselves_
|
||||
|
||||
| | Operations / second |
|
||||
| ------------------ | ------------------- |
|
||||
| **fast-copy** | **2,420,466** |
|
||||
| deepclone | 1,386,896 |
|
||||
| ramda | 1,024,108 |
|
||||
| lodash.cloneDeep | 989,796 |
|
||||
| clone | 987,721 |
|
||||
| fast-copy (strict) | 617,602 |
|
||||
| fast-clone | 0 (not supported) |
|
||||
|
||||
#### Special objects
|
||||
|
||||
_Custom constructors, React components, etc_
|
||||
|
||||
| | Operations / second |
|
||||
| ------------------ | ------------------- |
|
||||
| **fast-copy** | **152,792** |
|
||||
| clone | 74,347 |
|
||||
| fast-clone | 66,576 |
|
||||
| lodash.cloneDeep | 64,760 |
|
||||
| ramda | 53,542 |
|
||||
| deepclone | 28,823 |
|
||||
| fast-copy (strict) | 21,362 |
|
||||
|
||||
## Development
|
||||
|
||||
Standard practice, clone the repo and `yarn` (or `npm i`) to get the dependencies. The following npm scripts are available:
|
||||
|
||||
- benchmark => run benchmark tests against other equality libraries
|
||||
- build => run `build:esm`, `build:cjs`, `build:umd`, and `build:min` scripts
|
||||
- build:cjs => build CJS files and types
|
||||
- build:esm => build ESM files and types
|
||||
- build:min => build minified files and types
|
||||
- build:umd => build UMD files and types
|
||||
- clean => run `rimraf` on the `dist` folder
|
||||
- dev => start webpack playground App
|
||||
- dist => run `clean` and `build` scripts
|
||||
- lint => run ESLint on all files in `src` folder (also runs on `dev` script)
|
||||
- lint:fix => run `lint` script, but with auto-fixer
|
||||
- prepublishOnly => run `lint`, `test:coverage`, and `dist` scripts
|
||||
- release => run `prepublishOnly` and release with new version
|
||||
- release:beta => run `prepublishOnly` and release with new beta version
|
||||
- release:dry => run `prepublishOnly` and simulate a new release
|
||||
- start => run `dev`
|
||||
- test => run AVA with NODE_ENV=test on all files in `test` folder
|
||||
- test:coverage => run same script as `test` with code coverage calculation via `nyc`
|
||||
- test:watch => run same script as `test` but keep persistent watcher
|
||||
- typecheck => run `tsc` on the codebase
|
||||
406
backend/node_modules/fast-copy/dist/cjs/index.cjs
generated
vendored
Normal file
406
backend/node_modules/fast-copy/dist/cjs/index.cjs
generated
vendored
Normal file
@@ -0,0 +1,406 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var toStringFunction = Function.prototype.toString;
|
||||
var create = Object.create;
|
||||
var toStringObject = Object.prototype.toString;
|
||||
/**
|
||||
* @classdesc Fallback cache for when WeakMap is not natively supported
|
||||
*/
|
||||
var LegacyCache = /** @class */ (function () {
|
||||
function LegacyCache() {
|
||||
this._keys = [];
|
||||
this._values = [];
|
||||
}
|
||||
LegacyCache.prototype.has = function (key) {
|
||||
return !!~this._keys.indexOf(key);
|
||||
};
|
||||
LegacyCache.prototype.get = function (key) {
|
||||
return this._values[this._keys.indexOf(key)];
|
||||
};
|
||||
LegacyCache.prototype.set = function (key, value) {
|
||||
this._keys.push(key);
|
||||
this._values.push(value);
|
||||
};
|
||||
return LegacyCache;
|
||||
}());
|
||||
function createCacheLegacy() {
|
||||
return new LegacyCache();
|
||||
}
|
||||
function createCacheModern() {
|
||||
return new WeakMap();
|
||||
}
|
||||
/**
|
||||
* Get a new cache object to prevent circular references.
|
||||
*/
|
||||
var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
|
||||
/**
|
||||
* Get an empty version of the object with the same prototype it has.
|
||||
*/
|
||||
function getCleanClone(prototype) {
|
||||
if (!prototype) {
|
||||
return create(null);
|
||||
}
|
||||
var Constructor = prototype.constructor;
|
||||
if (Constructor === Object) {
|
||||
return prototype === Object.prototype ? {} : create(prototype);
|
||||
}
|
||||
if (Constructor &&
|
||||
~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
||||
try {
|
||||
return new Constructor();
|
||||
}
|
||||
catch (_a) { }
|
||||
}
|
||||
return create(prototype);
|
||||
}
|
||||
function getRegExpFlagsLegacy(regExp) {
|
||||
var flags = '';
|
||||
if (regExp.global) {
|
||||
flags += 'g';
|
||||
}
|
||||
if (regExp.ignoreCase) {
|
||||
flags += 'i';
|
||||
}
|
||||
if (regExp.multiline) {
|
||||
flags += 'm';
|
||||
}
|
||||
if (regExp.unicode) {
|
||||
flags += 'u';
|
||||
}
|
||||
if (regExp.sticky) {
|
||||
flags += 'y';
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
function getRegExpFlagsModern(regExp) {
|
||||
return regExp.flags;
|
||||
}
|
||||
/**
|
||||
* Get the flags to apply to the copied regexp.
|
||||
*/
|
||||
var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
|
||||
function getTagLegacy(value) {
|
||||
var type = toStringObject.call(value);
|
||||
return type.substring(8, type.length - 1);
|
||||
}
|
||||
function getTagModern(value) {
|
||||
return value[Symbol.toStringTag] || getTagLegacy(value);
|
||||
}
|
||||
/**
|
||||
* Get the tag of the value passed, so that the correct copier can be used.
|
||||
*/
|
||||
var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
|
||||
|
||||
var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
|
||||
var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
|
||||
function getStrictPropertiesModern(object) {
|
||||
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
|
||||
}
|
||||
/**
|
||||
* Get the properites used when copying objects strictly. This includes both keys and symbols.
|
||||
*/
|
||||
var getStrictProperties = SUPPORTS_SYMBOL
|
||||
? getStrictPropertiesModern
|
||||
: getOwnPropertyNames;
|
||||
/**
|
||||
* Striclty copy all properties contained on the object.
|
||||
*/
|
||||
function copyOwnPropertiesStrict(value, clone, state) {
|
||||
var properties = getStrictProperties(value);
|
||||
for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
|
||||
property = properties[index];
|
||||
if (property === 'callee' || property === 'caller') {
|
||||
continue;
|
||||
}
|
||||
descriptor = getOwnPropertyDescriptor(value, property);
|
||||
if (!descriptor) {
|
||||
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
||||
// the loose assignment.
|
||||
clone[property] = state.copier(value[property], state);
|
||||
continue;
|
||||
}
|
||||
// Only clone the value if actually a value, not a getter / setter.
|
||||
if (!descriptor.get && !descriptor.set) {
|
||||
descriptor.value = state.copier(descriptor.value, state);
|
||||
}
|
||||
try {
|
||||
defineProperty(clone, property, descriptor);
|
||||
}
|
||||
catch (error) {
|
||||
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
||||
clone[property] = descriptor.value;
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array.
|
||||
*/
|
||||
function copyArrayLoose(array, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(array, clone);
|
||||
for (var index = 0, length_2 = array.length; index < length_2; ++index) {
|
||||
clone[index] = state.copier(array[index], state);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array, as well as any custom properties.
|
||||
*/
|
||||
function copyArrayStrict(array, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(array, clone);
|
||||
return copyOwnPropertiesStrict(array, clone, state);
|
||||
}
|
||||
/**
|
||||
* Copy the contents of the ArrayBuffer.
|
||||
*/
|
||||
function copyArrayBuffer(arrayBuffer, _state) {
|
||||
return arrayBuffer.slice(0);
|
||||
}
|
||||
/**
|
||||
* Create a new Blob with the contents of the original.
|
||||
*/
|
||||
function copyBlob(blob, _state) {
|
||||
return blob.slice(0, blob.size, blob.type);
|
||||
}
|
||||
/**
|
||||
* Create a new DataView with the contents of the original.
|
||||
*/
|
||||
function copyDataView(dataView, state) {
|
||||
return new state.Constructor(copyArrayBuffer(dataView.buffer));
|
||||
}
|
||||
/**
|
||||
* Create a new Date based on the time of the original.
|
||||
*/
|
||||
function copyDate(date, state) {
|
||||
return new state.Constructor(date.getTime());
|
||||
}
|
||||
/**
|
||||
* Deeply copy the keys and values of the original.
|
||||
*/
|
||||
function copyMapLoose(map, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(map, clone);
|
||||
map.forEach(function (value, key) {
|
||||
clone.set(key, state.copier(value, state));
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the keys and values of the original, as well as any custom properties.
|
||||
*/
|
||||
function copyMapStrict(map, state) {
|
||||
return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
|
||||
}
|
||||
function copyObjectLooseLegacy(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
for (var key in object) {
|
||||
if (hasOwnProperty.call(object, key)) {
|
||||
clone[key] = state.copier(object[key], state);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
function copyObjectLooseModern(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
for (var key in object) {
|
||||
if (hasOwnProperty.call(object, key)) {
|
||||
clone[key] = state.copier(object[key], state);
|
||||
}
|
||||
}
|
||||
var symbols = getOwnPropertySymbols(object);
|
||||
for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
|
||||
symbol = symbols[index];
|
||||
if (propertyIsEnumerable.call(object, symbol)) {
|
||||
clone[symbol] = state.copier(object[symbol], state);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original.
|
||||
*/
|
||||
var copyObjectLoose = SUPPORTS_SYMBOL
|
||||
? copyObjectLooseModern
|
||||
: copyObjectLooseLegacy;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
||||
* as any hidden or non-enumerable properties.
|
||||
*/
|
||||
function copyObjectStrict(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
return copyOwnPropertiesStrict(object, clone, state);
|
||||
}
|
||||
/**
|
||||
* Create a new primitive wrapper from the value of the original.
|
||||
*/
|
||||
function copyPrimitiveWrapper(primitiveObject, state) {
|
||||
return new state.Constructor(primitiveObject.valueOf());
|
||||
}
|
||||
/**
|
||||
* Create a new RegExp based on the value and flags of the original.
|
||||
*/
|
||||
function copyRegExp(regExp, state) {
|
||||
var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
|
||||
clone.lastIndex = regExp.lastIndex;
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Return the original value (an identity function).
|
||||
*
|
||||
* @note
|
||||
* THis is used for objects that cannot be copied, such as WeakMap.
|
||||
*/
|
||||
function copySelf(value, _state) {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the values of the original.
|
||||
*/
|
||||
function copySetLoose(set, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(set, clone);
|
||||
set.forEach(function (value) {
|
||||
clone.add(state.copier(value, state));
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the values of the original, as well as any custom properties.
|
||||
*/
|
||||
function copySetStrict(set, state) {
|
||||
return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
|
||||
}
|
||||
|
||||
var isArray = Array.isArray;
|
||||
var assign = Object.assign;
|
||||
var getPrototypeOf = Object.getPrototypeOf || (function (obj) { return obj.__proto__; });
|
||||
var DEFAULT_LOOSE_OPTIONS = {
|
||||
array: copyArrayLoose,
|
||||
arrayBuffer: copyArrayBuffer,
|
||||
blob: copyBlob,
|
||||
dataView: copyDataView,
|
||||
date: copyDate,
|
||||
error: copySelf,
|
||||
map: copyMapLoose,
|
||||
object: copyObjectLoose,
|
||||
regExp: copyRegExp,
|
||||
set: copySetLoose,
|
||||
};
|
||||
var DEFAULT_STRICT_OPTIONS = assign({}, DEFAULT_LOOSE_OPTIONS, {
|
||||
array: copyArrayStrict,
|
||||
map: copyMapStrict,
|
||||
object: copyObjectStrict,
|
||||
set: copySetStrict,
|
||||
});
|
||||
/**
|
||||
* Get the copiers used for each specific object tag.
|
||||
*/
|
||||
function getTagSpecificCopiers(options) {
|
||||
return {
|
||||
Arguments: options.object,
|
||||
Array: options.array,
|
||||
ArrayBuffer: options.arrayBuffer,
|
||||
Blob: options.blob,
|
||||
Boolean: copyPrimitiveWrapper,
|
||||
DataView: options.dataView,
|
||||
Date: options.date,
|
||||
Error: options.error,
|
||||
Float32Array: options.arrayBuffer,
|
||||
Float64Array: options.arrayBuffer,
|
||||
Int8Array: options.arrayBuffer,
|
||||
Int16Array: options.arrayBuffer,
|
||||
Int32Array: options.arrayBuffer,
|
||||
Map: options.map,
|
||||
Number: copyPrimitiveWrapper,
|
||||
Object: options.object,
|
||||
Promise: copySelf,
|
||||
RegExp: options.regExp,
|
||||
Set: options.set,
|
||||
String: copyPrimitiveWrapper,
|
||||
WeakMap: copySelf,
|
||||
WeakSet: copySelf,
|
||||
Uint8Array: options.arrayBuffer,
|
||||
Uint8ClampedArray: options.arrayBuffer,
|
||||
Uint16Array: options.arrayBuffer,
|
||||
Uint32Array: options.arrayBuffer,
|
||||
Uint64Array: options.arrayBuffer,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
function createCopier(options) {
|
||||
var normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);
|
||||
var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
|
||||
var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
|
||||
function copier(value, state) {
|
||||
state.prototype = state.Constructor = undefined;
|
||||
if (!value || typeof value !== 'object') {
|
||||
return value;
|
||||
}
|
||||
if (state.cache.has(value)) {
|
||||
return state.cache.get(value);
|
||||
}
|
||||
state.prototype = getPrototypeOf(value);
|
||||
state.Constructor = state.prototype && state.prototype.constructor;
|
||||
// plain objects
|
||||
if (!state.Constructor || state.Constructor === Object) {
|
||||
return object(value, state);
|
||||
}
|
||||
// arrays
|
||||
if (isArray(value)) {
|
||||
return array(value, state);
|
||||
}
|
||||
var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
|
||||
if (tagSpecificCopier) {
|
||||
return tagSpecificCopier(value, state);
|
||||
}
|
||||
return typeof value.then === 'function' ? value : object(value, state);
|
||||
}
|
||||
return function copy(value) {
|
||||
return copier(value, {
|
||||
Constructor: undefined,
|
||||
cache: createCache(),
|
||||
copier: copier,
|
||||
prototype: undefined,
|
||||
});
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
function createStrictCopier(options) {
|
||||
return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
|
||||
}
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
var copyStrict = createStrictCopier({});
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
var index = createCopier({});
|
||||
|
||||
exports.copyStrict = copyStrict;
|
||||
exports.createCopier = createCopier;
|
||||
exports.createStrictCopier = createStrictCopier;
|
||||
exports.default = index;
|
||||
//# sourceMappingURL=index.cjs.map
|
||||
1
backend/node_modules/fast-copy/dist/cjs/index.cjs.map
generated
vendored
Normal file
1
backend/node_modules/fast-copy/dist/cjs/index.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
74
backend/node_modules/fast-copy/dist/cjs/types/copier.d.ts
generated
vendored
Normal file
74
backend/node_modules/fast-copy/dist/cjs/types/copier.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import type { Cache } from './utils';
|
||||
export type InternalCopier<Value> = (value: Value, state: State) => Value;
|
||||
export interface State {
|
||||
Constructor: any;
|
||||
cache: Cache;
|
||||
copier: InternalCopier<any>;
|
||||
prototype: any;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array.
|
||||
*/
|
||||
export declare function copyArrayLoose(array: any[], state: State): any;
|
||||
/**
|
||||
* Deeply copy the indexed values in the array, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyArrayStrict<Value extends any[]>(array: Value, state: State): Value;
|
||||
/**
|
||||
* Copy the contents of the ArrayBuffer.
|
||||
*/
|
||||
export declare function copyArrayBuffer<Value extends ArrayBuffer>(arrayBuffer: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new Blob with the contents of the original.
|
||||
*/
|
||||
export declare function copyBlob<Value extends Blob>(blob: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new DataView with the contents of the original.
|
||||
*/
|
||||
export declare function copyDataView<Value extends DataView>(dataView: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new Date based on the time of the original.
|
||||
*/
|
||||
export declare function copyDate<Value extends Date>(date: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original.
|
||||
*/
|
||||
export declare function copyMapLoose<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyMapStrict<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
declare function copyObjectLooseModern<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original.
|
||||
*/
|
||||
export declare const copyObjectLoose: typeof copyObjectLooseModern;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
||||
* as any hidden or non-enumerable properties.
|
||||
*/
|
||||
export declare function copyObjectStrict<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new primitive wrapper from the value of the original.
|
||||
*/
|
||||
export declare function copyPrimitiveWrapper<Value extends Boolean | Number | String>(primitiveObject: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new RegExp based on the value and flags of the original.
|
||||
*/
|
||||
export declare function copyRegExp<Value extends RegExp>(regExp: Value, state: State): Value;
|
||||
/**
|
||||
* Return the original value (an identity function).
|
||||
*
|
||||
* @note
|
||||
* THis is used for objects that cannot be copied, such as WeakMap.
|
||||
*/
|
||||
export declare function copySelf<Value>(value: Value, _state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original.
|
||||
*/
|
||||
export declare function copySetLoose<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copySetStrict<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
export {};
|
||||
34
backend/node_modules/fast-copy/dist/cjs/types/index.d.ts
generated
vendored
Normal file
34
backend/node_modules/fast-copy/dist/cjs/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { InternalCopier } from './copier';
|
||||
export type { State } from './copier';
|
||||
export interface CreateCopierOptions {
|
||||
array?: InternalCopier<any[]>;
|
||||
arrayBuffer?: InternalCopier<ArrayBuffer>;
|
||||
blob?: InternalCopier<Blob>;
|
||||
dataView?: InternalCopier<DataView>;
|
||||
date?: InternalCopier<Date>;
|
||||
error?: InternalCopier<any>;
|
||||
map?: InternalCopier<Map<any, any>>;
|
||||
object?: InternalCopier<Record<string, any>>;
|
||||
regExp?: InternalCopier<RegExp>;
|
||||
set?: InternalCopier<Set<any>>;
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
export declare function createCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
export declare function createStrictCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
export declare const copyStrict: <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
declare const _default: <Value>(value: Value) => Value;
|
||||
export default _default;
|
||||
25
backend/node_modules/fast-copy/dist/cjs/types/utils.d.ts
generated
vendored
Normal file
25
backend/node_modules/fast-copy/dist/cjs/types/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface Cache {
|
||||
has: (value: any) => boolean;
|
||||
set: (key: any, value: any) => void;
|
||||
get: (key: any) => any;
|
||||
}
|
||||
declare function createCacheModern(): Cache;
|
||||
/**
|
||||
* Get a new cache object to prevent circular references.
|
||||
*/
|
||||
export declare const createCache: typeof createCacheModern;
|
||||
/**
|
||||
* Get an empty version of the object with the same prototype it has.
|
||||
*/
|
||||
export declare function getCleanClone(prototype: any): any;
|
||||
declare function getRegExpFlagsModern(regExp: RegExp): string;
|
||||
/**
|
||||
* Get the flags to apply to the copied regexp.
|
||||
*/
|
||||
export declare const getRegExpFlags: typeof getRegExpFlagsModern;
|
||||
declare function getTagLegacy(value: any): string;
|
||||
/**
|
||||
* Get the tag of the value passed, so that the correct copier can be used.
|
||||
*/
|
||||
export declare const getTag: typeof getTagLegacy;
|
||||
export {};
|
||||
399
backend/node_modules/fast-copy/dist/esm/index.mjs
generated
vendored
Normal file
399
backend/node_modules/fast-copy/dist/esm/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,399 @@
|
||||
var toStringFunction = Function.prototype.toString;
|
||||
var create = Object.create;
|
||||
var toStringObject = Object.prototype.toString;
|
||||
/**
|
||||
* @classdesc Fallback cache for when WeakMap is not natively supported
|
||||
*/
|
||||
var LegacyCache = /** @class */ (function () {
|
||||
function LegacyCache() {
|
||||
this._keys = [];
|
||||
this._values = [];
|
||||
}
|
||||
LegacyCache.prototype.has = function (key) {
|
||||
return !!~this._keys.indexOf(key);
|
||||
};
|
||||
LegacyCache.prototype.get = function (key) {
|
||||
return this._values[this._keys.indexOf(key)];
|
||||
};
|
||||
LegacyCache.prototype.set = function (key, value) {
|
||||
this._keys.push(key);
|
||||
this._values.push(value);
|
||||
};
|
||||
return LegacyCache;
|
||||
}());
|
||||
function createCacheLegacy() {
|
||||
return new LegacyCache();
|
||||
}
|
||||
function createCacheModern() {
|
||||
return new WeakMap();
|
||||
}
|
||||
/**
|
||||
* Get a new cache object to prevent circular references.
|
||||
*/
|
||||
var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
|
||||
/**
|
||||
* Get an empty version of the object with the same prototype it has.
|
||||
*/
|
||||
function getCleanClone(prototype) {
|
||||
if (!prototype) {
|
||||
return create(null);
|
||||
}
|
||||
var Constructor = prototype.constructor;
|
||||
if (Constructor === Object) {
|
||||
return prototype === Object.prototype ? {} : create(prototype);
|
||||
}
|
||||
if (Constructor &&
|
||||
~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
||||
try {
|
||||
return new Constructor();
|
||||
}
|
||||
catch (_a) { }
|
||||
}
|
||||
return create(prototype);
|
||||
}
|
||||
function getRegExpFlagsLegacy(regExp) {
|
||||
var flags = '';
|
||||
if (regExp.global) {
|
||||
flags += 'g';
|
||||
}
|
||||
if (regExp.ignoreCase) {
|
||||
flags += 'i';
|
||||
}
|
||||
if (regExp.multiline) {
|
||||
flags += 'm';
|
||||
}
|
||||
if (regExp.unicode) {
|
||||
flags += 'u';
|
||||
}
|
||||
if (regExp.sticky) {
|
||||
flags += 'y';
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
function getRegExpFlagsModern(regExp) {
|
||||
return regExp.flags;
|
||||
}
|
||||
/**
|
||||
* Get the flags to apply to the copied regexp.
|
||||
*/
|
||||
var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
|
||||
function getTagLegacy(value) {
|
||||
var type = toStringObject.call(value);
|
||||
return type.substring(8, type.length - 1);
|
||||
}
|
||||
function getTagModern(value) {
|
||||
return value[Symbol.toStringTag] || getTagLegacy(value);
|
||||
}
|
||||
/**
|
||||
* Get the tag of the value passed, so that the correct copier can be used.
|
||||
*/
|
||||
var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
|
||||
|
||||
var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
|
||||
var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
|
||||
function getStrictPropertiesModern(object) {
|
||||
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
|
||||
}
|
||||
/**
|
||||
* Get the properites used when copying objects strictly. This includes both keys and symbols.
|
||||
*/
|
||||
var getStrictProperties = SUPPORTS_SYMBOL
|
||||
? getStrictPropertiesModern
|
||||
: getOwnPropertyNames;
|
||||
/**
|
||||
* Striclty copy all properties contained on the object.
|
||||
*/
|
||||
function copyOwnPropertiesStrict(value, clone, state) {
|
||||
var properties = getStrictProperties(value);
|
||||
for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
|
||||
property = properties[index];
|
||||
if (property === 'callee' || property === 'caller') {
|
||||
continue;
|
||||
}
|
||||
descriptor = getOwnPropertyDescriptor(value, property);
|
||||
if (!descriptor) {
|
||||
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
||||
// the loose assignment.
|
||||
clone[property] = state.copier(value[property], state);
|
||||
continue;
|
||||
}
|
||||
// Only clone the value if actually a value, not a getter / setter.
|
||||
if (!descriptor.get && !descriptor.set) {
|
||||
descriptor.value = state.copier(descriptor.value, state);
|
||||
}
|
||||
try {
|
||||
defineProperty(clone, property, descriptor);
|
||||
}
|
||||
catch (error) {
|
||||
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
||||
clone[property] = descriptor.value;
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array.
|
||||
*/
|
||||
function copyArrayLoose(array, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(array, clone);
|
||||
for (var index = 0, length_2 = array.length; index < length_2; ++index) {
|
||||
clone[index] = state.copier(array[index], state);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array, as well as any custom properties.
|
||||
*/
|
||||
function copyArrayStrict(array, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(array, clone);
|
||||
return copyOwnPropertiesStrict(array, clone, state);
|
||||
}
|
||||
/**
|
||||
* Copy the contents of the ArrayBuffer.
|
||||
*/
|
||||
function copyArrayBuffer(arrayBuffer, _state) {
|
||||
return arrayBuffer.slice(0);
|
||||
}
|
||||
/**
|
||||
* Create a new Blob with the contents of the original.
|
||||
*/
|
||||
function copyBlob(blob, _state) {
|
||||
return blob.slice(0, blob.size, blob.type);
|
||||
}
|
||||
/**
|
||||
* Create a new DataView with the contents of the original.
|
||||
*/
|
||||
function copyDataView(dataView, state) {
|
||||
return new state.Constructor(copyArrayBuffer(dataView.buffer));
|
||||
}
|
||||
/**
|
||||
* Create a new Date based on the time of the original.
|
||||
*/
|
||||
function copyDate(date, state) {
|
||||
return new state.Constructor(date.getTime());
|
||||
}
|
||||
/**
|
||||
* Deeply copy the keys and values of the original.
|
||||
*/
|
||||
function copyMapLoose(map, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(map, clone);
|
||||
map.forEach(function (value, key) {
|
||||
clone.set(key, state.copier(value, state));
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the keys and values of the original, as well as any custom properties.
|
||||
*/
|
||||
function copyMapStrict(map, state) {
|
||||
return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
|
||||
}
|
||||
function copyObjectLooseLegacy(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
for (var key in object) {
|
||||
if (hasOwnProperty.call(object, key)) {
|
||||
clone[key] = state.copier(object[key], state);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
function copyObjectLooseModern(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
for (var key in object) {
|
||||
if (hasOwnProperty.call(object, key)) {
|
||||
clone[key] = state.copier(object[key], state);
|
||||
}
|
||||
}
|
||||
var symbols = getOwnPropertySymbols(object);
|
||||
for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
|
||||
symbol = symbols[index];
|
||||
if (propertyIsEnumerable.call(object, symbol)) {
|
||||
clone[symbol] = state.copier(object[symbol], state);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original.
|
||||
*/
|
||||
var copyObjectLoose = SUPPORTS_SYMBOL
|
||||
? copyObjectLooseModern
|
||||
: copyObjectLooseLegacy;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
||||
* as any hidden or non-enumerable properties.
|
||||
*/
|
||||
function copyObjectStrict(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
return copyOwnPropertiesStrict(object, clone, state);
|
||||
}
|
||||
/**
|
||||
* Create a new primitive wrapper from the value of the original.
|
||||
*/
|
||||
function copyPrimitiveWrapper(primitiveObject, state) {
|
||||
return new state.Constructor(primitiveObject.valueOf());
|
||||
}
|
||||
/**
|
||||
* Create a new RegExp based on the value and flags of the original.
|
||||
*/
|
||||
function copyRegExp(regExp, state) {
|
||||
var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
|
||||
clone.lastIndex = regExp.lastIndex;
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Return the original value (an identity function).
|
||||
*
|
||||
* @note
|
||||
* THis is used for objects that cannot be copied, such as WeakMap.
|
||||
*/
|
||||
function copySelf(value, _state) {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the values of the original.
|
||||
*/
|
||||
function copySetLoose(set, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(set, clone);
|
||||
set.forEach(function (value) {
|
||||
clone.add(state.copier(value, state));
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the values of the original, as well as any custom properties.
|
||||
*/
|
||||
function copySetStrict(set, state) {
|
||||
return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
|
||||
}
|
||||
|
||||
var isArray = Array.isArray;
|
||||
var assign = Object.assign;
|
||||
var getPrototypeOf = Object.getPrototypeOf || (function (obj) { return obj.__proto__; });
|
||||
var DEFAULT_LOOSE_OPTIONS = {
|
||||
array: copyArrayLoose,
|
||||
arrayBuffer: copyArrayBuffer,
|
||||
blob: copyBlob,
|
||||
dataView: copyDataView,
|
||||
date: copyDate,
|
||||
error: copySelf,
|
||||
map: copyMapLoose,
|
||||
object: copyObjectLoose,
|
||||
regExp: copyRegExp,
|
||||
set: copySetLoose,
|
||||
};
|
||||
var DEFAULT_STRICT_OPTIONS = assign({}, DEFAULT_LOOSE_OPTIONS, {
|
||||
array: copyArrayStrict,
|
||||
map: copyMapStrict,
|
||||
object: copyObjectStrict,
|
||||
set: copySetStrict,
|
||||
});
|
||||
/**
|
||||
* Get the copiers used for each specific object tag.
|
||||
*/
|
||||
function getTagSpecificCopiers(options) {
|
||||
return {
|
||||
Arguments: options.object,
|
||||
Array: options.array,
|
||||
ArrayBuffer: options.arrayBuffer,
|
||||
Blob: options.blob,
|
||||
Boolean: copyPrimitiveWrapper,
|
||||
DataView: options.dataView,
|
||||
Date: options.date,
|
||||
Error: options.error,
|
||||
Float32Array: options.arrayBuffer,
|
||||
Float64Array: options.arrayBuffer,
|
||||
Int8Array: options.arrayBuffer,
|
||||
Int16Array: options.arrayBuffer,
|
||||
Int32Array: options.arrayBuffer,
|
||||
Map: options.map,
|
||||
Number: copyPrimitiveWrapper,
|
||||
Object: options.object,
|
||||
Promise: copySelf,
|
||||
RegExp: options.regExp,
|
||||
Set: options.set,
|
||||
String: copyPrimitiveWrapper,
|
||||
WeakMap: copySelf,
|
||||
WeakSet: copySelf,
|
||||
Uint8Array: options.arrayBuffer,
|
||||
Uint8ClampedArray: options.arrayBuffer,
|
||||
Uint16Array: options.arrayBuffer,
|
||||
Uint32Array: options.arrayBuffer,
|
||||
Uint64Array: options.arrayBuffer,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
function createCopier(options) {
|
||||
var normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);
|
||||
var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
|
||||
var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
|
||||
function copier(value, state) {
|
||||
state.prototype = state.Constructor = undefined;
|
||||
if (!value || typeof value !== 'object') {
|
||||
return value;
|
||||
}
|
||||
if (state.cache.has(value)) {
|
||||
return state.cache.get(value);
|
||||
}
|
||||
state.prototype = getPrototypeOf(value);
|
||||
state.Constructor = state.prototype && state.prototype.constructor;
|
||||
// plain objects
|
||||
if (!state.Constructor || state.Constructor === Object) {
|
||||
return object(value, state);
|
||||
}
|
||||
// arrays
|
||||
if (isArray(value)) {
|
||||
return array(value, state);
|
||||
}
|
||||
var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
|
||||
if (tagSpecificCopier) {
|
||||
return tagSpecificCopier(value, state);
|
||||
}
|
||||
return typeof value.then === 'function' ? value : object(value, state);
|
||||
}
|
||||
return function copy(value) {
|
||||
return copier(value, {
|
||||
Constructor: undefined,
|
||||
cache: createCache(),
|
||||
copier: copier,
|
||||
prototype: undefined,
|
||||
});
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
function createStrictCopier(options) {
|
||||
return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
|
||||
}
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
var copyStrict = createStrictCopier({});
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
var index = createCopier({});
|
||||
|
||||
export { copyStrict, createCopier, createStrictCopier, index as default };
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
backend/node_modules/fast-copy/dist/esm/index.mjs.map
generated
vendored
Normal file
1
backend/node_modules/fast-copy/dist/esm/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
74
backend/node_modules/fast-copy/dist/esm/types/copier.d.ts
generated
vendored
Normal file
74
backend/node_modules/fast-copy/dist/esm/types/copier.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import type { Cache } from './utils';
|
||||
export type InternalCopier<Value> = (value: Value, state: State) => Value;
|
||||
export interface State {
|
||||
Constructor: any;
|
||||
cache: Cache;
|
||||
copier: InternalCopier<any>;
|
||||
prototype: any;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array.
|
||||
*/
|
||||
export declare function copyArrayLoose(array: any[], state: State): any;
|
||||
/**
|
||||
* Deeply copy the indexed values in the array, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyArrayStrict<Value extends any[]>(array: Value, state: State): Value;
|
||||
/**
|
||||
* Copy the contents of the ArrayBuffer.
|
||||
*/
|
||||
export declare function copyArrayBuffer<Value extends ArrayBuffer>(arrayBuffer: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new Blob with the contents of the original.
|
||||
*/
|
||||
export declare function copyBlob<Value extends Blob>(blob: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new DataView with the contents of the original.
|
||||
*/
|
||||
export declare function copyDataView<Value extends DataView>(dataView: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new Date based on the time of the original.
|
||||
*/
|
||||
export declare function copyDate<Value extends Date>(date: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original.
|
||||
*/
|
||||
export declare function copyMapLoose<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyMapStrict<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
declare function copyObjectLooseModern<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original.
|
||||
*/
|
||||
export declare const copyObjectLoose: typeof copyObjectLooseModern;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
||||
* as any hidden or non-enumerable properties.
|
||||
*/
|
||||
export declare function copyObjectStrict<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new primitive wrapper from the value of the original.
|
||||
*/
|
||||
export declare function copyPrimitiveWrapper<Value extends Boolean | Number | String>(primitiveObject: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new RegExp based on the value and flags of the original.
|
||||
*/
|
||||
export declare function copyRegExp<Value extends RegExp>(regExp: Value, state: State): Value;
|
||||
/**
|
||||
* Return the original value (an identity function).
|
||||
*
|
||||
* @note
|
||||
* THis is used for objects that cannot be copied, such as WeakMap.
|
||||
*/
|
||||
export declare function copySelf<Value>(value: Value, _state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original.
|
||||
*/
|
||||
export declare function copySetLoose<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copySetStrict<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
export {};
|
||||
34
backend/node_modules/fast-copy/dist/esm/types/index.d.ts
generated
vendored
Normal file
34
backend/node_modules/fast-copy/dist/esm/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { InternalCopier } from './copier';
|
||||
export type { State } from './copier';
|
||||
export interface CreateCopierOptions {
|
||||
array?: InternalCopier<any[]>;
|
||||
arrayBuffer?: InternalCopier<ArrayBuffer>;
|
||||
blob?: InternalCopier<Blob>;
|
||||
dataView?: InternalCopier<DataView>;
|
||||
date?: InternalCopier<Date>;
|
||||
error?: InternalCopier<any>;
|
||||
map?: InternalCopier<Map<any, any>>;
|
||||
object?: InternalCopier<Record<string, any>>;
|
||||
regExp?: InternalCopier<RegExp>;
|
||||
set?: InternalCopier<Set<any>>;
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
export declare function createCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
export declare function createStrictCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
export declare const copyStrict: <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
declare const _default: <Value>(value: Value) => Value;
|
||||
export default _default;
|
||||
25
backend/node_modules/fast-copy/dist/esm/types/utils.d.ts
generated
vendored
Normal file
25
backend/node_modules/fast-copy/dist/esm/types/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface Cache {
|
||||
has: (value: any) => boolean;
|
||||
set: (key: any, value: any) => void;
|
||||
get: (key: any) => any;
|
||||
}
|
||||
declare function createCacheModern(): Cache;
|
||||
/**
|
||||
* Get a new cache object to prevent circular references.
|
||||
*/
|
||||
export declare const createCache: typeof createCacheModern;
|
||||
/**
|
||||
* Get an empty version of the object with the same prototype it has.
|
||||
*/
|
||||
export declare function getCleanClone(prototype: any): any;
|
||||
declare function getRegExpFlagsModern(regExp: RegExp): string;
|
||||
/**
|
||||
* Get the flags to apply to the copied regexp.
|
||||
*/
|
||||
export declare const getRegExpFlags: typeof getRegExpFlagsModern;
|
||||
declare function getTagLegacy(value: any): string;
|
||||
/**
|
||||
* Get the tag of the value passed, so that the correct copier can be used.
|
||||
*/
|
||||
export declare const getTag: typeof getTagLegacy;
|
||||
export {};
|
||||
2
backend/node_modules/fast-copy/dist/min/index.js
generated
vendored
Normal file
2
backend/node_modules/fast-copy/dist/min/index.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((r="undefined"!=typeof globalThis?globalThis:r||self)["fast-copy"]={})}(this,(function(r){"use strict";var t=Function.prototype.toString,e=Object.create,n=Object.prototype.toString,o=function(){function r(){this._keys=[],this._values=[]}return r.prototype.has=function(r){return!!~this._keys.indexOf(r)},r.prototype.get=function(r){return this._values[this._keys.indexOf(r)]},r.prototype.set=function(r,t){this._keys.push(r),this._values.push(t)},r}();var a="undefined"!=typeof WeakMap?function(){return new WeakMap}:function(){return new o};function c(r){if(!r)return e(null);var n=r.constructor;if(n===Object)return r===Object.prototype?{}:e(r);if(n&&~t.call(n).indexOf("[native code]"))try{return new n}catch(r){}return e(r)}var u="g"===/test/g.flags?function(r){return r.flags}:function(r){var t="";return r.global&&(t+="g"),r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.unicode&&(t+="u"),r.sticky&&(t+="y"),t};function i(r){var t=n.call(r);return t.substring(8,t.length-1)}var f="undefined"!=typeof Symbol?function(r){return r[Symbol.toStringTag]||i(r)}:i,s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,y=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,v=Object.prototype,d=v.hasOwnProperty,b=v.propertyIsEnumerable,h="function"==typeof l;var g=h?function(r){return y(r).concat(l(r))}:y;function O(r,t,e){for(var n=g(r),o=0,a=n.length,c=void 0,u=void 0;o<a;++o)if("callee"!==(c=n[o])&&"caller"!==c)if(u=p(r,c)){u.get||u.set||(u.value=e.copier(u.value,e));try{s(t,c,u)}catch(r){t[c]=u.value}}else t[c]=e.copier(r[c],e);return t}function j(r,t){return r.slice(0)}function w(r,t){var e=new t.Constructor;return t.cache.set(r,e),r.forEach((function(r,n){e.set(n,t.copier(r,t))})),e}var m=h?function(r,t){var e=c(t.prototype);for(var n in t.cache.set(r,e),r)d.call(r,n)&&(e[n]=t.copier(r[n],t));for(var o=l(r),a=0,u=o.length,i=void 0;a<u;++a)i=o[a],b.call(r,i)&&(e[i]=t.copier(r[i],t));return e}:function(r,t){var e=c(t.prototype);for(var n in t.cache.set(r,e),r)d.call(r,n)&&(e[n]=t.copier(r[n],t));return e};function C(r,t){return new t.Constructor(r.valueOf())}function A(r,t){return r}function B(r,t){var e=new t.Constructor;return t.cache.set(r,e),r.forEach((function(r){e.add(t.copier(r,t))})),e}var _=Array.isArray,x=Object.assign,S=Object.getPrototypeOf||function(r){return r.__proto__},k={array:function(r,t){var e=new t.Constructor;t.cache.set(r,e);for(var n=0,o=r.length;n<o;++n)e[n]=t.copier(r[n],t);return e},arrayBuffer:j,blob:function(r,t){return r.slice(0,r.size,r.type)},dataView:function(r,t){return new t.Constructor(j(r.buffer))},date:function(r,t){return new t.Constructor(r.getTime())},error:A,map:w,object:m,regExp:function(r,t){var e=new t.Constructor(r.source,u(r));return e.lastIndex=r.lastIndex,e},set:B},P=x({},k,{array:function(r,t){var e=new t.Constructor;return t.cache.set(r,e),O(r,e,t)},map:function(r,t){return O(r,w(r,t),t)},object:function(r,t){var e=c(t.prototype);return t.cache.set(r,e),O(r,e,t)},set:function(r,t){return O(r,B(r,t),t)}});function E(r){var t=function(r){return{Arguments:r.object,Array:r.array,ArrayBuffer:r.arrayBuffer,Blob:r.blob,Boolean:C,DataView:r.dataView,Date:r.date,Error:r.error,Float32Array:r.arrayBuffer,Float64Array:r.arrayBuffer,Int8Array:r.arrayBuffer,Int16Array:r.arrayBuffer,Int32Array:r.arrayBuffer,Map:r.map,Number:C,Object:r.object,Promise:A,RegExp:r.regExp,Set:r.set,String:C,WeakMap:A,WeakSet:A,Uint8Array:r.arrayBuffer,Uint8ClampedArray:r.arrayBuffer,Uint16Array:r.arrayBuffer,Uint32Array:r.arrayBuffer,Uint64Array:r.arrayBuffer}}(x({},k,r)),e=t.Array,n=t.Object;function o(r,o){if(o.prototype=o.Constructor=void 0,!r||"object"!=typeof r)return r;if(o.cache.has(r))return o.cache.get(r);if(o.prototype=S(r),o.Constructor=o.prototype&&o.prototype.constructor,!o.Constructor||o.Constructor===Object)return n(r,o);if(_(r))return e(r,o);var a=t[f(r)];return a?a(r,o):"function"==typeof r.then?r:n(r,o)}return function(r){return o(r,{Constructor:void 0,cache:a(),copier:o,prototype:void 0})}}function I(r){return E(x({},P,r))}var M=I({}),U=E({});r.copyStrict=M,r.createCopier=E,r.createStrictCopier=I,r.default=U,Object.defineProperty(r,"__esModule",{value:!0})}));
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/fast-copy/dist/min/index.js.map
generated
vendored
Normal file
1
backend/node_modules/fast-copy/dist/min/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
74
backend/node_modules/fast-copy/dist/min/types/copier.d.ts
generated
vendored
Normal file
74
backend/node_modules/fast-copy/dist/min/types/copier.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import type { Cache } from './utils';
|
||||
export type InternalCopier<Value> = (value: Value, state: State) => Value;
|
||||
export interface State {
|
||||
Constructor: any;
|
||||
cache: Cache;
|
||||
copier: InternalCopier<any>;
|
||||
prototype: any;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array.
|
||||
*/
|
||||
export declare function copyArrayLoose(array: any[], state: State): any;
|
||||
/**
|
||||
* Deeply copy the indexed values in the array, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyArrayStrict<Value extends any[]>(array: Value, state: State): Value;
|
||||
/**
|
||||
* Copy the contents of the ArrayBuffer.
|
||||
*/
|
||||
export declare function copyArrayBuffer<Value extends ArrayBuffer>(arrayBuffer: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new Blob with the contents of the original.
|
||||
*/
|
||||
export declare function copyBlob<Value extends Blob>(blob: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new DataView with the contents of the original.
|
||||
*/
|
||||
export declare function copyDataView<Value extends DataView>(dataView: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new Date based on the time of the original.
|
||||
*/
|
||||
export declare function copyDate<Value extends Date>(date: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original.
|
||||
*/
|
||||
export declare function copyMapLoose<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyMapStrict<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
declare function copyObjectLooseModern<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original.
|
||||
*/
|
||||
export declare const copyObjectLoose: typeof copyObjectLooseModern;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
||||
* as any hidden or non-enumerable properties.
|
||||
*/
|
||||
export declare function copyObjectStrict<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new primitive wrapper from the value of the original.
|
||||
*/
|
||||
export declare function copyPrimitiveWrapper<Value extends Boolean | Number | String>(primitiveObject: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new RegExp based on the value and flags of the original.
|
||||
*/
|
||||
export declare function copyRegExp<Value extends RegExp>(regExp: Value, state: State): Value;
|
||||
/**
|
||||
* Return the original value (an identity function).
|
||||
*
|
||||
* @note
|
||||
* THis is used for objects that cannot be copied, such as WeakMap.
|
||||
*/
|
||||
export declare function copySelf<Value>(value: Value, _state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original.
|
||||
*/
|
||||
export declare function copySetLoose<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copySetStrict<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
export {};
|
||||
34
backend/node_modules/fast-copy/dist/min/types/index.d.ts
generated
vendored
Normal file
34
backend/node_modules/fast-copy/dist/min/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { InternalCopier } from './copier';
|
||||
export type { State } from './copier';
|
||||
export interface CreateCopierOptions {
|
||||
array?: InternalCopier<any[]>;
|
||||
arrayBuffer?: InternalCopier<ArrayBuffer>;
|
||||
blob?: InternalCopier<Blob>;
|
||||
dataView?: InternalCopier<DataView>;
|
||||
date?: InternalCopier<Date>;
|
||||
error?: InternalCopier<any>;
|
||||
map?: InternalCopier<Map<any, any>>;
|
||||
object?: InternalCopier<Record<string, any>>;
|
||||
regExp?: InternalCopier<RegExp>;
|
||||
set?: InternalCopier<Set<any>>;
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
export declare function createCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
export declare function createStrictCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
export declare const copyStrict: <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
declare const _default: <Value>(value: Value) => Value;
|
||||
export default _default;
|
||||
25
backend/node_modules/fast-copy/dist/min/types/utils.d.ts
generated
vendored
Normal file
25
backend/node_modules/fast-copy/dist/min/types/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface Cache {
|
||||
has: (value: any) => boolean;
|
||||
set: (key: any, value: any) => void;
|
||||
get: (key: any) => any;
|
||||
}
|
||||
declare function createCacheModern(): Cache;
|
||||
/**
|
||||
* Get a new cache object to prevent circular references.
|
||||
*/
|
||||
export declare const createCache: typeof createCacheModern;
|
||||
/**
|
||||
* Get an empty version of the object with the same prototype it has.
|
||||
*/
|
||||
export declare function getCleanClone(prototype: any): any;
|
||||
declare function getRegExpFlagsModern(regExp: RegExp): string;
|
||||
/**
|
||||
* Get the flags to apply to the copied regexp.
|
||||
*/
|
||||
export declare const getRegExpFlags: typeof getRegExpFlagsModern;
|
||||
declare function getTagLegacy(value: any): string;
|
||||
/**
|
||||
* Get the tag of the value passed, so that the correct copier can be used.
|
||||
*/
|
||||
export declare const getTag: typeof getTagLegacy;
|
||||
export {};
|
||||
412
backend/node_modules/fast-copy/dist/umd/index.js
generated
vendored
Normal file
412
backend/node_modules/fast-copy/dist/umd/index.js
generated
vendored
Normal file
@@ -0,0 +1,412 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["fast-copy"] = {}));
|
||||
})(this, (function (exports) { 'use strict';
|
||||
|
||||
var toStringFunction = Function.prototype.toString;
|
||||
var create = Object.create;
|
||||
var toStringObject = Object.prototype.toString;
|
||||
/**
|
||||
* @classdesc Fallback cache for when WeakMap is not natively supported
|
||||
*/
|
||||
var LegacyCache = /** @class */ (function () {
|
||||
function LegacyCache() {
|
||||
this._keys = [];
|
||||
this._values = [];
|
||||
}
|
||||
LegacyCache.prototype.has = function (key) {
|
||||
return !!~this._keys.indexOf(key);
|
||||
};
|
||||
LegacyCache.prototype.get = function (key) {
|
||||
return this._values[this._keys.indexOf(key)];
|
||||
};
|
||||
LegacyCache.prototype.set = function (key, value) {
|
||||
this._keys.push(key);
|
||||
this._values.push(value);
|
||||
};
|
||||
return LegacyCache;
|
||||
}());
|
||||
function createCacheLegacy() {
|
||||
return new LegacyCache();
|
||||
}
|
||||
function createCacheModern() {
|
||||
return new WeakMap();
|
||||
}
|
||||
/**
|
||||
* Get a new cache object to prevent circular references.
|
||||
*/
|
||||
var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
|
||||
/**
|
||||
* Get an empty version of the object with the same prototype it has.
|
||||
*/
|
||||
function getCleanClone(prototype) {
|
||||
if (!prototype) {
|
||||
return create(null);
|
||||
}
|
||||
var Constructor = prototype.constructor;
|
||||
if (Constructor === Object) {
|
||||
return prototype === Object.prototype ? {} : create(prototype);
|
||||
}
|
||||
if (Constructor &&
|
||||
~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
||||
try {
|
||||
return new Constructor();
|
||||
}
|
||||
catch (_a) { }
|
||||
}
|
||||
return create(prototype);
|
||||
}
|
||||
function getRegExpFlagsLegacy(regExp) {
|
||||
var flags = '';
|
||||
if (regExp.global) {
|
||||
flags += 'g';
|
||||
}
|
||||
if (regExp.ignoreCase) {
|
||||
flags += 'i';
|
||||
}
|
||||
if (regExp.multiline) {
|
||||
flags += 'm';
|
||||
}
|
||||
if (regExp.unicode) {
|
||||
flags += 'u';
|
||||
}
|
||||
if (regExp.sticky) {
|
||||
flags += 'y';
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
function getRegExpFlagsModern(regExp) {
|
||||
return regExp.flags;
|
||||
}
|
||||
/**
|
||||
* Get the flags to apply to the copied regexp.
|
||||
*/
|
||||
var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
|
||||
function getTagLegacy(value) {
|
||||
var type = toStringObject.call(value);
|
||||
return type.substring(8, type.length - 1);
|
||||
}
|
||||
function getTagModern(value) {
|
||||
return value[Symbol.toStringTag] || getTagLegacy(value);
|
||||
}
|
||||
/**
|
||||
* Get the tag of the value passed, so that the correct copier can be used.
|
||||
*/
|
||||
var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
|
||||
|
||||
var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
|
||||
var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
|
||||
function getStrictPropertiesModern(object) {
|
||||
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
|
||||
}
|
||||
/**
|
||||
* Get the properites used when copying objects strictly. This includes both keys and symbols.
|
||||
*/
|
||||
var getStrictProperties = SUPPORTS_SYMBOL
|
||||
? getStrictPropertiesModern
|
||||
: getOwnPropertyNames;
|
||||
/**
|
||||
* Striclty copy all properties contained on the object.
|
||||
*/
|
||||
function copyOwnPropertiesStrict(value, clone, state) {
|
||||
var properties = getStrictProperties(value);
|
||||
for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
|
||||
property = properties[index];
|
||||
if (property === 'callee' || property === 'caller') {
|
||||
continue;
|
||||
}
|
||||
descriptor = getOwnPropertyDescriptor(value, property);
|
||||
if (!descriptor) {
|
||||
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
||||
// the loose assignment.
|
||||
clone[property] = state.copier(value[property], state);
|
||||
continue;
|
||||
}
|
||||
// Only clone the value if actually a value, not a getter / setter.
|
||||
if (!descriptor.get && !descriptor.set) {
|
||||
descriptor.value = state.copier(descriptor.value, state);
|
||||
}
|
||||
try {
|
||||
defineProperty(clone, property, descriptor);
|
||||
}
|
||||
catch (error) {
|
||||
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
||||
clone[property] = descriptor.value;
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array.
|
||||
*/
|
||||
function copyArrayLoose(array, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(array, clone);
|
||||
for (var index = 0, length_2 = array.length; index < length_2; ++index) {
|
||||
clone[index] = state.copier(array[index], state);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array, as well as any custom properties.
|
||||
*/
|
||||
function copyArrayStrict(array, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(array, clone);
|
||||
return copyOwnPropertiesStrict(array, clone, state);
|
||||
}
|
||||
/**
|
||||
* Copy the contents of the ArrayBuffer.
|
||||
*/
|
||||
function copyArrayBuffer(arrayBuffer, _state) {
|
||||
return arrayBuffer.slice(0);
|
||||
}
|
||||
/**
|
||||
* Create a new Blob with the contents of the original.
|
||||
*/
|
||||
function copyBlob(blob, _state) {
|
||||
return blob.slice(0, blob.size, blob.type);
|
||||
}
|
||||
/**
|
||||
* Create a new DataView with the contents of the original.
|
||||
*/
|
||||
function copyDataView(dataView, state) {
|
||||
return new state.Constructor(copyArrayBuffer(dataView.buffer));
|
||||
}
|
||||
/**
|
||||
* Create a new Date based on the time of the original.
|
||||
*/
|
||||
function copyDate(date, state) {
|
||||
return new state.Constructor(date.getTime());
|
||||
}
|
||||
/**
|
||||
* Deeply copy the keys and values of the original.
|
||||
*/
|
||||
function copyMapLoose(map, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(map, clone);
|
||||
map.forEach(function (value, key) {
|
||||
clone.set(key, state.copier(value, state));
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the keys and values of the original, as well as any custom properties.
|
||||
*/
|
||||
function copyMapStrict(map, state) {
|
||||
return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
|
||||
}
|
||||
function copyObjectLooseLegacy(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
for (var key in object) {
|
||||
if (hasOwnProperty.call(object, key)) {
|
||||
clone[key] = state.copier(object[key], state);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
function copyObjectLooseModern(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
for (var key in object) {
|
||||
if (hasOwnProperty.call(object, key)) {
|
||||
clone[key] = state.copier(object[key], state);
|
||||
}
|
||||
}
|
||||
var symbols = getOwnPropertySymbols(object);
|
||||
for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
|
||||
symbol = symbols[index];
|
||||
if (propertyIsEnumerable.call(object, symbol)) {
|
||||
clone[symbol] = state.copier(object[symbol], state);
|
||||
}
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original.
|
||||
*/
|
||||
var copyObjectLoose = SUPPORTS_SYMBOL
|
||||
? copyObjectLooseModern
|
||||
: copyObjectLooseLegacy;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
||||
* as any hidden or non-enumerable properties.
|
||||
*/
|
||||
function copyObjectStrict(object, state) {
|
||||
var clone = getCleanClone(state.prototype);
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(object, clone);
|
||||
return copyOwnPropertiesStrict(object, clone, state);
|
||||
}
|
||||
/**
|
||||
* Create a new primitive wrapper from the value of the original.
|
||||
*/
|
||||
function copyPrimitiveWrapper(primitiveObject, state) {
|
||||
return new state.Constructor(primitiveObject.valueOf());
|
||||
}
|
||||
/**
|
||||
* Create a new RegExp based on the value and flags of the original.
|
||||
*/
|
||||
function copyRegExp(regExp, state) {
|
||||
var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
|
||||
clone.lastIndex = regExp.lastIndex;
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Return the original value (an identity function).
|
||||
*
|
||||
* @note
|
||||
* THis is used for objects that cannot be copied, such as WeakMap.
|
||||
*/
|
||||
function copySelf(value, _state) {
|
||||
return value;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the values of the original.
|
||||
*/
|
||||
function copySetLoose(set, state) {
|
||||
var clone = new state.Constructor();
|
||||
// set in the cache immediately to be able to reuse the object recursively
|
||||
state.cache.set(set, clone);
|
||||
set.forEach(function (value) {
|
||||
clone.add(state.copier(value, state));
|
||||
});
|
||||
return clone;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the values of the original, as well as any custom properties.
|
||||
*/
|
||||
function copySetStrict(set, state) {
|
||||
return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
|
||||
}
|
||||
|
||||
var isArray = Array.isArray;
|
||||
var assign = Object.assign;
|
||||
var getPrototypeOf = Object.getPrototypeOf || (function (obj) { return obj.__proto__; });
|
||||
var DEFAULT_LOOSE_OPTIONS = {
|
||||
array: copyArrayLoose,
|
||||
arrayBuffer: copyArrayBuffer,
|
||||
blob: copyBlob,
|
||||
dataView: copyDataView,
|
||||
date: copyDate,
|
||||
error: copySelf,
|
||||
map: copyMapLoose,
|
||||
object: copyObjectLoose,
|
||||
regExp: copyRegExp,
|
||||
set: copySetLoose,
|
||||
};
|
||||
var DEFAULT_STRICT_OPTIONS = assign({}, DEFAULT_LOOSE_OPTIONS, {
|
||||
array: copyArrayStrict,
|
||||
map: copyMapStrict,
|
||||
object: copyObjectStrict,
|
||||
set: copySetStrict,
|
||||
});
|
||||
/**
|
||||
* Get the copiers used for each specific object tag.
|
||||
*/
|
||||
function getTagSpecificCopiers(options) {
|
||||
return {
|
||||
Arguments: options.object,
|
||||
Array: options.array,
|
||||
ArrayBuffer: options.arrayBuffer,
|
||||
Blob: options.blob,
|
||||
Boolean: copyPrimitiveWrapper,
|
||||
DataView: options.dataView,
|
||||
Date: options.date,
|
||||
Error: options.error,
|
||||
Float32Array: options.arrayBuffer,
|
||||
Float64Array: options.arrayBuffer,
|
||||
Int8Array: options.arrayBuffer,
|
||||
Int16Array: options.arrayBuffer,
|
||||
Int32Array: options.arrayBuffer,
|
||||
Map: options.map,
|
||||
Number: copyPrimitiveWrapper,
|
||||
Object: options.object,
|
||||
Promise: copySelf,
|
||||
RegExp: options.regExp,
|
||||
Set: options.set,
|
||||
String: copyPrimitiveWrapper,
|
||||
WeakMap: copySelf,
|
||||
WeakSet: copySelf,
|
||||
Uint8Array: options.arrayBuffer,
|
||||
Uint8ClampedArray: options.arrayBuffer,
|
||||
Uint16Array: options.arrayBuffer,
|
||||
Uint32Array: options.arrayBuffer,
|
||||
Uint64Array: options.arrayBuffer,
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
function createCopier(options) {
|
||||
var normalizedOptions = assign({}, DEFAULT_LOOSE_OPTIONS, options);
|
||||
var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
|
||||
var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
|
||||
function copier(value, state) {
|
||||
state.prototype = state.Constructor = undefined;
|
||||
if (!value || typeof value !== 'object') {
|
||||
return value;
|
||||
}
|
||||
if (state.cache.has(value)) {
|
||||
return state.cache.get(value);
|
||||
}
|
||||
state.prototype = getPrototypeOf(value);
|
||||
state.Constructor = state.prototype && state.prototype.constructor;
|
||||
// plain objects
|
||||
if (!state.Constructor || state.Constructor === Object) {
|
||||
return object(value, state);
|
||||
}
|
||||
// arrays
|
||||
if (isArray(value)) {
|
||||
return array(value, state);
|
||||
}
|
||||
var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
|
||||
if (tagSpecificCopier) {
|
||||
return tagSpecificCopier(value, state);
|
||||
}
|
||||
return typeof value.then === 'function' ? value : object(value, state);
|
||||
}
|
||||
return function copy(value) {
|
||||
return copier(value, {
|
||||
Constructor: undefined,
|
||||
cache: createCache(),
|
||||
copier: copier,
|
||||
prototype: undefined,
|
||||
});
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
function createStrictCopier(options) {
|
||||
return createCopier(assign({}, DEFAULT_STRICT_OPTIONS, options));
|
||||
}
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
var copyStrict = createStrictCopier({});
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
var index = createCopier({});
|
||||
|
||||
exports.copyStrict = copyStrict;
|
||||
exports.createCopier = createCopier;
|
||||
exports.createStrictCopier = createStrictCopier;
|
||||
exports.default = index;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
backend/node_modules/fast-copy/dist/umd/index.js.map
generated
vendored
Normal file
1
backend/node_modules/fast-copy/dist/umd/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
74
backend/node_modules/fast-copy/dist/umd/types/copier.d.ts
generated
vendored
Normal file
74
backend/node_modules/fast-copy/dist/umd/types/copier.d.ts
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import type { Cache } from './utils';
|
||||
export type InternalCopier<Value> = (value: Value, state: State) => Value;
|
||||
export interface State {
|
||||
Constructor: any;
|
||||
cache: Cache;
|
||||
copier: InternalCopier<any>;
|
||||
prototype: any;
|
||||
}
|
||||
/**
|
||||
* Deeply copy the indexed values in the array.
|
||||
*/
|
||||
export declare function copyArrayLoose(array: any[], state: State): any;
|
||||
/**
|
||||
* Deeply copy the indexed values in the array, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyArrayStrict<Value extends any[]>(array: Value, state: State): Value;
|
||||
/**
|
||||
* Copy the contents of the ArrayBuffer.
|
||||
*/
|
||||
export declare function copyArrayBuffer<Value extends ArrayBuffer>(arrayBuffer: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new Blob with the contents of the original.
|
||||
*/
|
||||
export declare function copyBlob<Value extends Blob>(blob: Value, _state: State): Value;
|
||||
/**
|
||||
* Create a new DataView with the contents of the original.
|
||||
*/
|
||||
export declare function copyDataView<Value extends DataView>(dataView: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new Date based on the time of the original.
|
||||
*/
|
||||
export declare function copyDate<Value extends Date>(date: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original.
|
||||
*/
|
||||
export declare function copyMapLoose<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the keys and values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copyMapStrict<Value extends Map<any, any>>(map: Value, state: State): Value;
|
||||
declare function copyObjectLooseModern<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original.
|
||||
*/
|
||||
export declare const copyObjectLoose: typeof copyObjectLooseModern;
|
||||
/**
|
||||
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
||||
* as any hidden or non-enumerable properties.
|
||||
*/
|
||||
export declare function copyObjectStrict<Value extends Record<string, any>>(object: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new primitive wrapper from the value of the original.
|
||||
*/
|
||||
export declare function copyPrimitiveWrapper<Value extends Boolean | Number | String>(primitiveObject: Value, state: State): Value;
|
||||
/**
|
||||
* Create a new RegExp based on the value and flags of the original.
|
||||
*/
|
||||
export declare function copyRegExp<Value extends RegExp>(regExp: Value, state: State): Value;
|
||||
/**
|
||||
* Return the original value (an identity function).
|
||||
*
|
||||
* @note
|
||||
* THis is used for objects that cannot be copied, such as WeakMap.
|
||||
*/
|
||||
export declare function copySelf<Value>(value: Value, _state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original.
|
||||
*/
|
||||
export declare function copySetLoose<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
/**
|
||||
* Deeply copy the values of the original, as well as any custom properties.
|
||||
*/
|
||||
export declare function copySetStrict<Value extends Set<any>>(set: Value, state: State): Value;
|
||||
export {};
|
||||
34
backend/node_modules/fast-copy/dist/umd/types/index.d.ts
generated
vendored
Normal file
34
backend/node_modules/fast-copy/dist/umd/types/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { InternalCopier } from './copier';
|
||||
export type { State } from './copier';
|
||||
export interface CreateCopierOptions {
|
||||
array?: InternalCopier<any[]>;
|
||||
arrayBuffer?: InternalCopier<ArrayBuffer>;
|
||||
blob?: InternalCopier<Blob>;
|
||||
dataView?: InternalCopier<DataView>;
|
||||
date?: InternalCopier<Date>;
|
||||
error?: InternalCopier<any>;
|
||||
map?: InternalCopier<Map<any, any>>;
|
||||
object?: InternalCopier<Record<string, any>>;
|
||||
regExp?: InternalCopier<RegExp>;
|
||||
set?: InternalCopier<Set<any>>;
|
||||
}
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
export declare function createCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
export declare function createStrictCopier(options: CreateCopierOptions): <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
export declare const copyStrict: <Value>(value: Value) => Value;
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
declare const _default: <Value>(value: Value) => Value;
|
||||
export default _default;
|
||||
25
backend/node_modules/fast-copy/dist/umd/types/utils.d.ts
generated
vendored
Normal file
25
backend/node_modules/fast-copy/dist/umd/types/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export interface Cache {
|
||||
has: (value: any) => boolean;
|
||||
set: (key: any, value: any) => void;
|
||||
get: (key: any) => any;
|
||||
}
|
||||
declare function createCacheModern(): Cache;
|
||||
/**
|
||||
* Get a new cache object to prevent circular references.
|
||||
*/
|
||||
export declare const createCache: typeof createCacheModern;
|
||||
/**
|
||||
* Get an empty version of the object with the same prototype it has.
|
||||
*/
|
||||
export declare function getCleanClone(prototype: any): any;
|
||||
declare function getRegExpFlagsModern(regExp: RegExp): string;
|
||||
/**
|
||||
* Get the flags to apply to the copied regexp.
|
||||
*/
|
||||
export declare const getRegExpFlags: typeof getRegExpFlagsModern;
|
||||
declare function getTagLegacy(value: any): string;
|
||||
/**
|
||||
* Get the tag of the value passed, so that the correct copier can be used.
|
||||
*/
|
||||
export declare const getTag: typeof getTagLegacy;
|
||||
export {};
|
||||
7
backend/node_modules/fast-copy/flow-typed/fast-copy.js
generated
vendored
Normal file
7
backend/node_modules/fast-copy/flow-typed/fast-copy.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
declare module "fast-copy" {
|
||||
declare export default {
|
||||
(object: T, options?: O): T,
|
||||
|
||||
strict<T>(object: T, options?: O): T
|
||||
};
|
||||
}
|
||||
55
backend/node_modules/fast-copy/index.d.ts
generated
vendored
Normal file
55
backend/node_modules/fast-copy/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
interface Cache {
|
||||
_keys?: any[];
|
||||
_values?: any[];
|
||||
has: (value: any) => boolean;
|
||||
set: (key: any, value: any) => void;
|
||||
get: (key: any) => any;
|
||||
}
|
||||
|
||||
export interface CreateCopierOptions {
|
||||
array?: InternalCopier<any[]>;
|
||||
arrayBuffer?: InternalCopier<ArrayBuffer>;
|
||||
blob?: InternalCopier<Blob>;
|
||||
dataView?: InternalCopier<DataView>;
|
||||
date?: InternalCopier<Date>;
|
||||
map?: InternalCopier<Map<any, any>>;
|
||||
object?: InternalCopier<Record<string, any>>;
|
||||
regExp?: InternalCopier<RegExp>;
|
||||
set?: InternalCopier<Set<any>>;
|
||||
}
|
||||
|
||||
type InternalCopier<Value> = (value: Value, state: State) => Value;
|
||||
|
||||
export interface State {
|
||||
Constructor: any;
|
||||
cache: Cache;
|
||||
copier: InternalCopier<any>;
|
||||
prototype: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy an value deeply as much as possible.
|
||||
*/
|
||||
export default function copy<Value>(value: Value): Value;
|
||||
|
||||
/**
|
||||
* Copy an value deeply as much as possible, where strict recreation of object properties
|
||||
* are maintained. All properties (including non-enumerable ones) are copied with their
|
||||
* original property descriptors on both objects and arrays.
|
||||
*/
|
||||
export function copyStrict<Value>(value: Value): Value;
|
||||
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed.
|
||||
*/
|
||||
export function createCopier(
|
||||
options: CreateCopierOptions
|
||||
): <Value>(value: Value) => Value;
|
||||
|
||||
/**
|
||||
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
||||
* same internals as `copyStrict`.
|
||||
*/
|
||||
export function createStrictCopier(
|
||||
options: CreateCopierOptions
|
||||
): <Value>(value: Value) => Value;
|
||||
103
backend/node_modules/fast-copy/package.json
generated
vendored
Normal file
103
backend/node_modules/fast-copy/package.json
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"author": "tony_quetano@planttheidea.com",
|
||||
"contributors": [
|
||||
"Dariusz Rzepka <rzepkadarek@gmail.com>"
|
||||
],
|
||||
"browser": "dist/umd/index.js",
|
||||
"bugs": {
|
||||
"url": "https://github.com/planttheidea/fast-copy/issues"
|
||||
},
|
||||
"description": "A blazing fast deep object copier",
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-typescript": "^11.0.0",
|
||||
"@types/eslint": "^8.21.1",
|
||||
"@types/jest": "^29.4.0",
|
||||
"@types/lodash": "^4.14.191",
|
||||
"@types/node": "^18.14.0",
|
||||
"@types/ramda": "^0.28.23",
|
||||
"@types/react": "^18.0.28",
|
||||
"@typescript-eslint/eslint-plugin": "^5.52.0",
|
||||
"@typescript-eslint/parser": "^5.52.0",
|
||||
"benchee": "^1.0.3",
|
||||
"cli-table3": "^0.6.3",
|
||||
"clone": "^2.1.2",
|
||||
"deepclone": "^1.0.2",
|
||||
"eslint": "^8.34.0",
|
||||
"eslint-webpack-plugin": "^4.0.0",
|
||||
"fast-clone": "^1.5.3",
|
||||
"html-webpack-plugin": "^5.5.0",
|
||||
"in-publish": "^2.0.1",
|
||||
"jest": "^29.4.3",
|
||||
"lodash": "^4.17.11",
|
||||
"nyc": "^15.1.0",
|
||||
"ramda": "^0.28.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"release-it": "15.6.0",
|
||||
"rollup": "^3.16.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"ts-jest": "^29.0.5",
|
||||
"ts-loader": "^9.4.2",
|
||||
"typescript": "^4.9.5",
|
||||
"webpack": "^5.75.0",
|
||||
"webpack-cli": "^5.0.1",
|
||||
"webpack-dev-server": "^4.11.1"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": {
|
||||
"types": "./dist/esm/types/index.d.ts",
|
||||
"default": "./dist/esm/index.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./dist/cjs/types/index.d.ts",
|
||||
"default": "./dist/cjs/index.cjs"
|
||||
},
|
||||
"default": {
|
||||
"types": "./dist/umd/types/index.d.ts",
|
||||
"default": "./dist/umd/index.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/planttheidea/fast-copy#readme",
|
||||
"keywords": [
|
||||
"clone",
|
||||
"deep",
|
||||
"copy",
|
||||
"fast"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/cjs/index.cjs",
|
||||
"module": "dist/esm/index.mjs",
|
||||
"name": "fast-copy",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/planttheidea/fast-copy.git"
|
||||
},
|
||||
"scripts": {
|
||||
"benchmark": "npm run clean && npm run build:cjs && node benchmark/index.cjs",
|
||||
"build": "npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:min",
|
||||
"build:cjs": "NODE_ENV=production rollup -c rollup/config.cjs.js && tsc -p ./tsconfig/cjs.json",
|
||||
"build:esm": "NODE_ENV=production rollup -c rollup/config.esm.js && tsc -p ./tsconfig/esm.json",
|
||||
"build:min": "NODE_ENV=production rollup -c rollup/config.min.js && tsc -p ./tsconfig/min.json",
|
||||
"build:umd": "NODE_ENV=production rollup -c rollup/config.umd.js && tsc -p ./tsconfig/umd.json",
|
||||
"clean": "rimraf dist",
|
||||
"dev": "NODE_ENV=development webpack-dev-server --config=webpack/webpack.config.js",
|
||||
"dist": "npm run clean && npm run build",
|
||||
"lint": "eslint 'src/*.ts' '__tests__/*.ts' 'DEV_ONLY/*.ts'",
|
||||
"lint:fix": "npm run lint -- --fix",
|
||||
"prepublishOnly": "npm run lint && npm run typecheck && npm run test && npm run dist",
|
||||
"release": "release-it",
|
||||
"release:beta": "release-it --config=.release-it.beta.json",
|
||||
"release:dry": "release-it --dry-run",
|
||||
"start": "npm run dev",
|
||||
"test": "NODE_PATH=. jest",
|
||||
"test:coverage": "npm run test -- --coverage",
|
||||
"test:watch": "npm run test -- --watch",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"type": "module",
|
||||
"types": "index.d.ts",
|
||||
"version": "3.0.2"
|
||||
}
|
||||
38
backend/node_modules/fast-copy/rollup/config.base.js
generated
vendored
Normal file
38
backend/node_modules/fast-copy/rollup/config.base.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import path from 'path';
|
||||
import tsc from 'typescript';
|
||||
import { fileURLToPath } from 'url';
|
||||
import pkg from './packageJson.js';
|
||||
|
||||
const ROOT = fileURLToPath(new URL('..', import.meta.url));
|
||||
|
||||
const external = [
|
||||
...Object.keys(pkg.dependencies || {}),
|
||||
...Object.keys(pkg.peerDependencies || {}),
|
||||
];
|
||||
const globals = external.reduce((globals, name) => {
|
||||
globals[name] = name;
|
||||
|
||||
return globals;
|
||||
}, {});
|
||||
|
||||
export default {
|
||||
external,
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
exports: 'named',
|
||||
globals,
|
||||
name: pkg.name,
|
||||
sourcemap: true,
|
||||
},
|
||||
plugins: [
|
||||
nodeResolve({
|
||||
mainFields: ['module', 'browser', 'main'],
|
||||
}),
|
||||
typescript({
|
||||
tsconfig: path.resolve(ROOT, 'tsconfig', 'base.json'),
|
||||
typescript: tsc,
|
||||
}),
|
||||
],
|
||||
};
|
||||
11
backend/node_modules/fast-copy/rollup/config.cjs.js
generated
vendored
Normal file
11
backend/node_modules/fast-copy/rollup/config.cjs.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import baseConfig from './config.base.js';
|
||||
import pkg from './packageJson.js';
|
||||
|
||||
export default {
|
||||
...baseConfig,
|
||||
output: {
|
||||
...baseConfig.output,
|
||||
file: pkg.main,
|
||||
format: 'cjs',
|
||||
},
|
||||
};
|
||||
11
backend/node_modules/fast-copy/rollup/config.esm.js
generated
vendored
Normal file
11
backend/node_modules/fast-copy/rollup/config.esm.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import baseConfig from './config.base.js';
|
||||
import pkg from './packageJson.js';
|
||||
|
||||
export default {
|
||||
...baseConfig,
|
||||
output: {
|
||||
...baseConfig.output,
|
||||
file: pkg.module,
|
||||
format: 'es',
|
||||
},
|
||||
};
|
||||
13
backend/node_modules/fast-copy/rollup/config.min.js
generated
vendored
Normal file
13
backend/node_modules/fast-copy/rollup/config.min.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import baseConfig from './config.base.js';
|
||||
import { terser } from 'rollup-plugin-terser';
|
||||
import pkg from './packageJson.js';
|
||||
|
||||
export default {
|
||||
...baseConfig,
|
||||
output: {
|
||||
...baseConfig.output,
|
||||
file: pkg.browser.replace('umd', 'min'),
|
||||
format: 'umd',
|
||||
},
|
||||
plugins: [...baseConfig.plugins, terser()],
|
||||
};
|
||||
11
backend/node_modules/fast-copy/rollup/config.umd.js
generated
vendored
Normal file
11
backend/node_modules/fast-copy/rollup/config.umd.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import baseConfig from './config.base.js';
|
||||
import pkg from './packageJson.js';
|
||||
|
||||
export default {
|
||||
...baseConfig,
|
||||
output: {
|
||||
...baseConfig.output,
|
||||
file: pkg.browser,
|
||||
format: 'umd',
|
||||
},
|
||||
};
|
||||
6
backend/node_modules/fast-copy/rollup/packageJson.js
generated
vendored
Normal file
6
backend/node_modules/fast-copy/rollup/packageJson.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
export default JSON.parse(
|
||||
readFileSync(join(process.cwd(), 'package.json'), { encoding: 'utf8' })
|
||||
);
|
||||
19
backend/node_modules/fast-copy/tsconfig/base.json
generated
vendored
Normal file
19
backend/node_modules/fast-copy/tsconfig/base.json
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "src",
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react",
|
||||
"lib": ["DOM", "ESNext"],
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"noImplicitAny": true,
|
||||
"outDir": "./dist",
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"target": "es5",
|
||||
"types": ["jest", "node", "react"]
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
"include": ["../src/*", "../__tests__/*"]
|
||||
}
|
||||
8
backend/node_modules/fast-copy/tsconfig/cjs.json
generated
vendored
Normal file
8
backend/node_modules/fast-copy/tsconfig/cjs.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./declarations.json",
|
||||
"compilerOptions": {
|
||||
"declarationDir": "../dist/cjs/types",
|
||||
"module": "CommonJS",
|
||||
"outDir": "../dist/cjs"
|
||||
}
|
||||
}
|
||||
8
backend/node_modules/fast-copy/tsconfig/declarations.json
generated
vendored
Normal file
8
backend/node_modules/fast-copy/tsconfig/declarations.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true
|
||||
},
|
||||
"include": ["../src/*"]
|
||||
}
|
||||
8
backend/node_modules/fast-copy/tsconfig/esm.json
generated
vendored
Normal file
8
backend/node_modules/fast-copy/tsconfig/esm.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./declarations.json",
|
||||
"compilerOptions": {
|
||||
"declarationDir": "../dist/esm/types",
|
||||
"module": "ESNext",
|
||||
"outDir": "../dist/esm"
|
||||
}
|
||||
}
|
||||
8
backend/node_modules/fast-copy/tsconfig/min.json
generated
vendored
Normal file
8
backend/node_modules/fast-copy/tsconfig/min.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./declarations.json",
|
||||
"compilerOptions": {
|
||||
"declarationDir": "../dist/min/types",
|
||||
"module": "UMD",
|
||||
"outDir": "../dist/min"
|
||||
}
|
||||
}
|
||||
8
backend/node_modules/fast-copy/tsconfig/umd.json
generated
vendored
Normal file
8
backend/node_modules/fast-copy/tsconfig/umd.json
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./declarations.json",
|
||||
"compilerOptions": {
|
||||
"declarationDir": "../dist/umd/types",
|
||||
"module": "UMD",
|
||||
"outDir": "../dist/umd"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user