feat:node-modules

This commit is contained in:
houjunxiang
2025-11-24 10:26:18 +08:00
parent 753766893b
commit 8a3e48d856
8825 changed files with 567399 additions and 1 deletions

9
node_modules/side-channel/.editorconfig generated vendored Normal file
View File

@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true

12
node_modules/side-channel/.eslintrc generated vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": 0,
"max-lines-per-function": 0,
"multiline-comment-style": 1,
"new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
},
}

12
node_modules/side-channel/.github/FUNDING.yml generated vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/side-channel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

13
node_modules/side-channel/.nycrc generated vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"all": true,
"check-coverage": false,
"reporter": ["text-summary", "text", "html", "json"],
"lines": 86,
"statements": 85.93,
"functions": 82.43,
"branches": 76.06,
"exclude": [
"coverage",
"test"
]
}

110
node_modules/side-channel/CHANGELOG.md generated vendored Normal file

File diff suppressed because it is too large Load Diff

21
node_modules/side-channel/LICENSE generated vendored Normal file
View File

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

61
node_modules/side-channel/README.md generated vendored Normal file
View File

@@ -0,0 +1,61 @@
# side-channel <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Store information about any JS value in a side channel. Uses WeakMap if available.
Warning: in an environment that lacks `WeakMap`, this implementation will leak memory until you `delete` the `key`.
## Getting started
```sh
npm install --save side-channel
```
## Usage/Examples
```js
const assert = require('assert');
const getSideChannel = require('side-channel');
const channel = getSideChannel();
const key = {};
assert.equal(channel.has(key), false);
assert.throws(() => channel.assert(key), TypeError);
channel.set(key, 42);
channel.assert(key); // does not throw
assert.equal(channel.has(key), true);
assert.equal(channel.get(key), 42);
channel.delete(key);
assert.equal(channel.has(key), false);
assert.throws(() => channel.assert(key), TypeError);
```
## Tests
Clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/side-channel
[npm-version-svg]: https://versionbadg.es/ljharb/side-channel.svg
[deps-svg]: https://david-dm.org/ljharb/side-channel.svg
[deps-url]: https://david-dm.org/ljharb/side-channel
[dev-deps-svg]: https://david-dm.org/ljharb/side-channel/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/side-channel#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/side-channel.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/side-channel.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/side-channel.svg
[downloads-url]: https://npm-stat.com/charts.html?package=side-channel
[codecov-image]: https://codecov.io/gh/ljharb/side-channel/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/side-channel/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/side-channel
[actions-url]: https://github.com/ljharb/side-channel/actions

14
node_modules/side-channel/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import getSideChannelList from 'side-channel-list';
import getSideChannelMap from 'side-channel-map';
import getSideChannelWeakMap from 'side-channel-weakmap';
declare namespace getSideChannel {
type Channel<K, V> =
| getSideChannelList.Channel<K, V>
| ReturnType<Exclude<typeof getSideChannelMap<K, V>, false>>
| ReturnType<Exclude<typeof getSideChannelWeakMap<K, V>, false>>;
}
declare function getSideChannel<K, V>(): getSideChannel.Channel<K, V>;
export = getSideChannel;

43
node_modules/side-channel/index.js generated vendored Normal file
View File

@@ -0,0 +1,43 @@
'use strict';
var $TypeError = require('es-errors/type');
var inspect = require('object-inspect');
var getSideChannelList = require('side-channel-list');
var getSideChannelMap = require('side-channel-map');
var getSideChannelWeakMap = require('side-channel-weakmap');
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
/** @type {import('.')} */
module.exports = function getSideChannel() {
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
/** @type {Channel | undefined} */ var $channelData;
/** @type {Channel} */
var channel = {
assert: function (key) {
if (!channel.has(key)) {
throw new $TypeError('Side channel does not contain ' + inspect(key));
}
},
'delete': function (key) {
return !!$channelData && $channelData['delete'](key);
},
get: function (key) {
return $channelData && $channelData.get(key);
},
has: function (key) {
return !!$channelData && $channelData.has(key);
},
set: function (key, value) {
if (!$channelData) {
$channelData = makeChannel();
}
$channelData.set(key, value);
}
};
// @ts-expect-error TODO: figure out why this is erroring
return channel;
};

85
node_modules/side-channel/package.json generated vendored Normal file
View File

@@ -0,0 +1,85 @@
{
"name": "side-channel",
"version": "1.1.0",
"description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"types": "./index.d.ts",
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p . && attw -P",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/side-channel.git"
},
"keywords": [
"weakmap",
"map",
"side",
"channel",
"metadata"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/side-channel/issues"
},
"homepage": "https://github.com/ljharb/side-channel#readme",
"dependencies": {
"es-errors": "^1.3.0",
"object-inspect": "^1.13.3",
"side-channel-list": "^1.0.0",
"side-channel-map": "^1.0.1",
"side-channel-weakmap": "^1.0.2"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/object-inspect": "^1.13.0",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"eclint": "^2.8.1",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}

Some files were not shown because too many files have changed in this diff Show More