This commit is contained in:
Akko
2025-08-04 18:57:35 +02:00
parent 8cf6e78a79
commit 9495868c2e
5030 changed files with 518594 additions and 17609 deletions

22
node_modules/node-libs-browser/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2012 Tobias Koppers
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.

63
node_modules/node-libs-browser/README.md generated vendored Normal file
View File

@@ -0,0 +1,63 @@
# node-libs-browser
The node core libs for in-browser usage.
NOTE: This library is deprecated and won't accept Pull Requests that include Breaking Changes or new Features. Only bugfixes are accepted.
[![dependencies status](http://david-dm.org/webpack/node-libs-browser.png)](http://david-dm.org/webpack/node-libs-browser)
Exports a hash [object] of absolute paths to each lib, keyed by lib names. Modules without browser replacements are `null`.
Some modules have mocks in the `mock` directory. These are replacements with minimal functionality.
| lib name | browser implementation | mock implementation |
|:--------:|:----------------------:|:-------------------:|
| assert | [defunctzombie/commonjs-assert](https://github.com/defunctzombie/commonjs-assert) | --- |
| buffer | [feross/buffer](https://github.com/feross/buffer) | [buffer.js](https://github.com/webpack/node-libs-browser/blob/master/mock/buffer.js) |
| child_process | --- | --- |
| cluster | --- | --- |
| console | [Raynos/console-browserify](https://github.com/Raynos/console-browserify) | [console.js](https://github.com/webpack/node-libs-browser/blob/master/mock/console.js) |
| constants | [juliangruber/constants-browserify](https://github.com/juliangruber/constants-browserify) | --- |
| crypto | [crypto-browserify/crypto-browserify](https://github.com/crypto-browserify/crypto-browserify) | --- |
| dgram | --- | --- |
| dns | --- | [dns.js](https://github.com/webpack/node-libs-browser/blob/master/mock/dns.js) |
| domain | [bevry/domain-browser](https://github.com/bevry/domain-browser) | --- |
| events | [Gozala/events](https://github.com/Gozala/events) | --- |
| fs | --- | --- |
| http | [jhiesey/stream-http](https://github.com/jhiesey/stream-http) | --- |
| https | [substack/https-browserify](https://github.com/substack/https-browserify) | --- |
| module | --- | --- |
| net | --- | [net.js](https://github.com/webpack/node-libs-browser/blob/master/mock/net.js) |
| os | [CoderPuppy/os-browserify](https://github.com/CoderPuppy/os-browserify) | --- |
| path | [substack/path-browserify](https://github.com/substack/path-browserify) | --- |
| process | [shtylman/node-process](https://github.com/shtylman/node-process) | [process.js](https://github.com/webpack/node-libs-browser/blob/master/mock/process.js) |
| punycode | [bestiejs/punycode.js](https://github.com/bestiejs/punycode.js) | --- |
| querystring | [mike-spainhower/querystring](https://github.com/mike-spainhower/querystring) | --- |
| readline | --- | --- |
| repl | --- | --- |
| stream | [substack/stream-browserify](https://github.com/substack/stream-browserify) | --- |
| string_decoder | [rvagg/string_decoder](https://github.com/rvagg/string_decoder) | --- |
| sys | [defunctzombie/node-util](https://github.com/defunctzombie/node-util) | --- |
| timers | [jryans/timers-browserify](https://github.com/jryans/timers-browserify) | --- |
| tls | --- | [tls.js](https://github.com/webpack/node-libs-browser/blob/master/mock/tls.js) |
| tty | [substack/tty-browserify](https://github.com/substack/tty-browserify) | [tty.js](https://github.com/webpack/node-libs-browser/blob/master/mock/tty.js) |
| url | [defunctzombie/node-url](https://github.com/defunctzombie/node-url) | --- |
| util | [defunctzombie/node-util](https://github.com/defunctzombie/node-util) | --- |
| vm | [substack/vm-browserify](https://github.com/substack/vm-browserify) | --- |
| zlib | [devongovett/browserify-zlib](https://github.com/devongovett/browserify-zlib) | --- |
## Outdated versions
### `buffer`
The current `buffer` implementation uses feross/buffer@4.x because feross/buffer@5.x relies on [typed arrays](https://github.com/feross/buffer/commit/5daca86b7cd5d2b8ccb167534d47421029f639e9#commitcomment-19698936).
This will be dropped as soon as IE9 is not a typical browser target anymore.
### `punycode`
The current `punycode` implementation uses bestiejs/punycode.js@1.x because bestiejs/punycode.js@2.x requires modern JS engines that understand `const` and `let`.
It will be removed someday since it has already been [deprecated from the node API](https://nodejs.org/api/punycode.html).
## License
MIT

38
node_modules/node-libs-browser/index.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
exports.assert = require.resolve('assert/');
exports.buffer = require.resolve('buffer/');
exports.child_process = null;
exports.cluster = null;
exports.console = require.resolve('console-browserify');
exports.constants = require.resolve('constants-browserify');
exports.crypto = require.resolve('crypto-browserify');
exports.dgram = null;
exports.dns = null;
exports.domain = require.resolve('domain-browser');
exports.events = require.resolve('events/');
exports.fs = null;
exports.http = require.resolve('stream-http');
exports.https = require.resolve('https-browserify');
exports.module = null;
exports.net = null;
exports.os = require.resolve('os-browserify/browser.js');
exports.path = require.resolve('path-browserify');
exports.punycode = require.resolve('punycode/');
exports.process = require.resolve('process/browser.js');
exports.querystring = require.resolve('querystring-es3/');
exports.readline = null;
exports.repl = null;
exports.stream = require.resolve('stream-browserify');
exports._stream_duplex = require.resolve('readable-stream/duplex.js');
exports._stream_passthrough = require.resolve('readable-stream/passthrough.js');
exports._stream_readable = require.resolve('readable-stream/readable.js');
exports._stream_transform = require.resolve('readable-stream/transform.js');
exports._stream_writable = require.resolve('readable-stream/writable.js');
exports.string_decoder = require.resolve('string_decoder/');
exports.sys = require.resolve('util/util.js');
exports.timers = require.resolve('timers-browserify');
exports.tls = null;
exports.tty = require.resolve('tty-browserify');
exports.url = require.resolve('url/');
exports.util = require.resolve('util/util.js');
exports.vm = require.resolve('vm-browserify');
exports.zlib = require.resolve('browserify-zlib');

10
node_modules/node-libs-browser/mock/buffer.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
function Buffer() {
throw new Error("Buffer is not included.");
}
Buffer.isBuffer = function() {
return false;
};
exports.INSPECT_MAX_BYTES = 50;
exports.SlowBuffer = Buffer;
exports.Buffer = Buffer;

12
node_modules/node-libs-browser/mock/console.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
var console;
if (typeof global !== "undefined" && global.console) {
console = global.console
} else if (typeof window !== "undefined" && window.console) {
console = window.console
} else {
console = window.console = {}
}
module.exports = console;
for(var name in {log:1, info:1, error:1, warn:1, dir:1, trace:1, assert:1, time:1, timeEnd: 1})
if(!console[name])
console[name] = function() {};

15
node_modules/node-libs-browser/mock/dns.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
exports.lookup = exports.resolve4 =
exports.resolve6 = exports.resolveCname =
exports.resolveMx = exports.resolveNs =
exports.resolveTxt = exports.resolveSrv =
exports.resolveNaptr = exports.reverse =
exports.resolve =
function () {
if (!arguments.length) return;
var callback = arguments[arguments.length - 1];
if (callback && typeof callback === 'function') {
callback(null, '0.0.0.0')
}
}

0
node_modules/node-libs-browser/mock/empty.js generated vendored Normal file
View File

10
node_modules/node-libs-browser/mock/net.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
exports.createServer =
exports.createConnection =
exports.connect =
function () {};
exports.isIP =
exports.isIPv4 =
exports.isIPv6 =
function () { return true };

34
node_modules/node-libs-browser/mock/process.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
exports.nextTick = function nextTick(fn) {
var args = Array.prototype.slice.call(arguments);
args.shift();
setTimeout(function () {
fn.apply(null, args);
}, 0);
};
exports.platform = exports.arch =
exports.execPath = exports.title = 'browser';
exports.pid = 1;
exports.browser = true;
exports.env = {};
exports.argv = [];
exports.binding = function (name) {
throw new Error('No such module. (Possibly not yet loaded)')
};
(function () {
var cwd = '/';
var path;
exports.cwd = function () { return cwd };
exports.chdir = function (dir) {
if (!path) path = require('path');
cwd = path.resolve(dir, cwd);
};
})();
exports.exit = exports.kill =
exports.umask = exports.dlopen =
exports.uptime = exports.memoryUsage =
exports.uvCounters = function() {};
exports.features = {};

6
node_modules/node-libs-browser/mock/punycode.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
exports.ucs2 = {};
exports.encode = exports.decode =
exports.ucs2.encode = exports.ucs2.decode =
exports.toUnicode = exports.toASCII =
function (s) { return s };
exports.version = "0.0.0";

1
node_modules/node-libs-browser/mock/tls.js generated vendored Normal file
View File

@@ -0,0 +1 @@
// todo

2
node_modules/node-libs-browser/mock/tty.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
exports.isatty = function () {};
exports.setRawMode = function () {};

48
node_modules/node-libs-browser/package.json generated vendored Normal file
View File

@@ -0,0 +1,48 @@
{
"name": "node-libs-browser",
"version": "2.2.1",
"author": "Tobias Koppers @sokra",
"description": "The node core libs for in browser usage.",
"repository": {
"type": "git",
"url": "git+https://github.com/webpack/node-libs-browser.git"
},
"dependencies": {
"assert": "^1.1.1",
"browserify-zlib": "^0.2.0",
"buffer": "^4.3.0",
"console-browserify": "^1.1.0",
"constants-browserify": "^1.0.0",
"crypto-browserify": "^3.11.0",
"domain-browser": "^1.1.1",
"events": "^3.0.0",
"https-browserify": "^1.0.0",
"os-browserify": "^0.3.0",
"path-browserify": "0.0.1",
"process": "^0.11.10",
"punycode": "^1.2.4",
"querystring-es3": "^0.2.0",
"readable-stream": "^2.3.3",
"stream-browserify": "^2.0.1",
"stream-http": "^2.7.2",
"string_decoder": "^1.0.0",
"timers-browserify": "^2.0.4",
"tty-browserify": "0.0.0",
"url": "^0.11.0",
"util": "^0.11.0",
"vm-browserify": "^1.0.1"
},
"homepage": "http://github.com/webpack/node-libs-browser",
"main": "index.js",
"files": [
"index.js",
"mock/"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/webpack/node-libs-browser/issues"
}
}