node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

21
server/node_modules/tiny-invariant/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Alexander Reardon
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.

88
server/node_modules/tiny-invariant/README.md generated vendored Normal file
View File

@@ -0,0 +1,88 @@
# `tiny-invariant` 🔬💥
[![Build Status](https://travis-ci.org/alexreardon/tiny-invariant.svg?branch=master)](https://travis-ci.org/alexreardon/tiny-invariant)
[![npm](https://img.shields.io/npm/v/tiny-invariant.svg)](https://www.npmjs.com/package/tiny-invariant) [![dependencies](https://david-dm.org/alexreardon/tiny-invariant.svg)](https://david-dm.org/alexreardon/tiny-invariant)
[![min](https://img.shields.io/bundlephobia/min/tiny-invariant.svg)](https://www.npmjs.com/package/tiny-invariant)
[![minzip](https://img.shields.io/bundlephobia/minzip/tiny-invariant.svg)](https://www.npmjs.com/package/tiny-invariant)
A tiny [`invariant`](https://www.npmjs.com/package/invariant) alternative.
## What is `invariant`?
An `invariant` function takes a value, and if the value is [falsy](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy) then the `invariant` function will throw. If the value is [truthy](https://github.com/getify/You-Dont-Know-JS/blob/bdbe570600d4e1107d0b131787903ca1c9ec8140/up%20%26%20going/ch2.md#truthy--falsy), then the function will not throw.
```js
import invariant from 'tiny-invariant';
invariant(truthyValue, 'This should not throw!');
invariant(falsyValue, 'This will throw!');
// Error('Invariant violation: This will throw!');
```
## Why `tiny-invariant`?
The [`library: invariant`](https://www.npmjs.com/package/invariant) supports passing in arguments to the `invariant` function in a sprintf style `(condition, format, a, b, c, d, e, f)`. It has internal logic to execute the sprintf substitutions. The sprintf logic is not removed in production builds. `tiny-invariant` has dropped all of the sprintf logic. `tiny-invariant` allows you to pass a single string message. With [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) there is really no need for a custom message formatter to be built into the library. If you need a multi part message you can just do this: `invariant(condition, 'Hello, ${name} - how are you today?')`
## API: `(condition: mixed, message?: string) => void`
- `condition` is required and can be anything
- `message` is an optional string
## Installation
```bash
# yarn
yarn add tiny-invariant
# bash
npm add tiny-invariant --save
```
## Dropping your `message` for kb savings!
We recommend using [`babel-plugin-dev-expression`](https://www.npmjs.com/package/babel-plugin-dev-expression) to remove the `message` argument from your `invariant` calls in production builds to save kbs!
What it does it turn your code that looks like this:
```js
invariant(condition, 'My cool message that takes up a lot of kbs');
```
Into this
```js
if (!condition) {
if ('production' !== process.env.NODE_ENV) {
invariant(false, 'My cool message that takes up a lot of kbs');
} else {
invariant(false);
}
}
```
Your bundler can then drop the code in the `"production" !== process.env.NODE_ENV` block for your production builds
Final result:
```js
if (!condition) {
invariant(false);
}
```
> For `rollup` use [rollup-plugin-replace](https://github.com/rollup/rollup-plugin-replace) and set `NODE_ENV` to `production` and then `rollup` will treeshake out the unused code
>
> [`Webpack` instructions](https://webpack.js.org/guides/production/#specify-the-mode)
## Builds
- We have a `es` (EcmaScript module) build (because you _know_ you want to deduplicate this super heavy library)
- We have a `cjs` (CommonJS) build
- We have a `umd` (Universal module definition) build in case you needed it
We expect `process.env.NODE_ENV` to be available at module compilation. We cache this value
## That's it!
🤘

View File

@@ -0,0 +1,17 @@
'use strict';
var isProduction = process.env.NODE_ENV === 'production';
var prefix = 'Invariant failed';
function invariant(condition, message) {
if (condition) {
return;
}
if (isProduction) {
throw new Error(prefix);
} else {
throw new Error(prefix + ": " + (message || ''));
}
}
module.exports = invariant;

View File

@@ -0,0 +1,3 @@
// @flow
export * from '../src';

View File

@@ -0,0 +1,15 @@
var isProduction = process.env.NODE_ENV === 'production';
var prefix = 'Invariant failed';
function invariant(condition, message) {
if (condition) {
return;
}
if (isProduction) {
throw new Error(prefix);
} else {
throw new Error(prefix + ": " + (message || ''));
}
}
export default invariant;

View File

@@ -0,0 +1,20 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.invariant = factory());
}(this, function () { 'use strict';
var prefix = 'Invariant failed';
function invariant(condition, message) {
if (condition) {
return;
}
{
throw new Error(prefix + ": " + (message || ''));
}
}
return invariant;
}));

View File

@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).invariant=n()}(this,function(){"use strict";return function(e,n){if(!e)throw new Error("Invariant failed")}});

53
server/node_modules/tiny-invariant/package.json generated vendored Normal file
View File

@@ -0,0 +1,53 @@
{
"name": "tiny-invariant",
"version": "1.0.6",
"keywords": [
"invariant",
"error"
],
"description": "A tiny invariant function",
"main": "dist/tiny-invariant.cjs.js",
"module": "dist/tiny-invariant.esm.js",
"types": "src/index.d.ts",
"sideEffects": false,
"files": [
"/dist",
"/src"
],
"author": "Alex Reardon <alexreardon@gmail.com>",
"repository": {
"type": "git",
"url": "https://github.com/alexreardon/tiny-invariant.git"
},
"bugs": {
"url": "https://github.com/alexreardon/tiny-invariant/issues"
},
"license": "MIT",
"scripts": {
"test": "yarn jest",
"lint": "yarn prettier --debug-check src/** test/**",
"typecheck": "yarn flow",
"validate": "yarn lint && yarn flow",
"build:clean": "rimraf dist",
"build:flow": "echo \"// @flow\n\nexport * from '../src';\" > dist/tiny-invariant.cjs.js.flow",
"build:dist": "yarn rollup --config rollup.config.js",
"build": "yarn build:clean && yarn build:dist && yarn build:flow",
"prepublishOnly": "yarn build"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/preset-env": "^7.5.0",
"@babel/preset-flow": "^7.0.0",
"@babel/runtime-corejs2": "^7.5.1",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^24.8.0",
"flow-bin": "^0.102.0",
"jest": "^24.8.0",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"rollup": "^1.16.6",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-uglify": "^6.0.2"
}
}

1
server/node_modules/tiny-invariant/src/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function invariant(condition: any, message?: string): void

22
server/node_modules/tiny-invariant/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,22 @@
// @flow
const isProduction: boolean = process.env.NODE_ENV === 'production';
const prefix: string = 'Invariant failed';
// Throw an error if the condition fails
// Strip out error messages for production
// > Not providing an inline default argument for message as the result is smaller
export default function invariant(condition: mixed, message?: string) {
if (condition) {
return;
}
// Condition not passed
if (isProduction) {
// In production we strip the message but still throw
throw new Error(prefix);
} else {
// When not in production we allow the message to pass through
// *This block will be removed in production builds*
throw new Error(`${prefix}: ${message || ''}`);
}
}