openportal 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -0
- package/package.json +1 -1
- package/web/.next/static/{A7pW-dtFIbPCSkvE8uenX → Im7EdK1Q3oOmTznohTOr5}/_buildManifest.js +4 -9
- package/web/.next/static/chunks/{2e7bfb90c343ca96.js → 35cc9dbdc670c73c.js} +4 -4
- package/web/.next/static/chunks/4147ffc67a7b837c.css +1 -0
- package/web/.next/static/chunks/{21ab2574b84ad2d1.js → 52b90bc1740162c2.js} +2 -2
- package/web/.next/static/chunks/{9b265e2198b5525f.js → 8644d68bf325ff24.js} +3 -3
- package/web/.next/static/chunks/{03e1846335a31354.js → 9865709466b09f79.js} +3 -3
- package/web/.next/static/chunks/{c20ae04df8cc28be.js → 9ba9a5774c9421bd.js} +3 -3
- package/web/.next/static/chunks/{967a1e0002fe9ae6.js → b5caad256518cb33.js} +3 -3
- package/web/.next/static/chunks/{turbopack-27558c851386934e.js → turbopack-26af71e419c11487.js} +1 -1
- package/web/.next/static/chunks/{turbopack-f4c0881f9723f5a5.js → turbopack-4ad0df7330c00c8d.js} +1 -1
- package/web/.next/static/chunks/{turbopack-26688626142ac58f.js → turbopack-8e653f3ad3a8ed18.js} +1 -1
- package/web/.next/static/chunks/{turbopack-c40ec6674624f1d7.js → turbopack-d5098189d63fd7b8.js} +1 -1
- package/web/apps/web/.next/BUILD_ID +1 -1
- package/web/apps/web/.next/build-manifest.json +14 -24
- package/web/apps/web/.next/routes-manifest.json +0 -12
- package/web/apps/web/.next/server/chunks/[root-of-the-server]__f366ca98._.js +358 -0
- package/web/apps/web/.next/server/chunks/ssr/{[root-of-the-server]__dfeaf8cf._.js → [root-of-the-server]__1a54ba1e._.js} +3 -3
- package/web/apps/web/.next/server/middleware-build-manifest.js +12 -22
- package/web/apps/web/.next/server/next-font-manifest.js +1 -1
- package/web/apps/web/.next/server/next-font-manifest.json +0 -4
- package/web/apps/web/.next/server/pages/404.html +1 -1
- package/web/apps/web/.next/server/pages/500.html +1 -1
- package/web/apps/web/.next/server/pages/_app/build-manifest.json +3 -3
- package/web/apps/web/.next/server/pages/_app/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/api/[[...slugs]].js +1 -2
- package/web/apps/web/.next/server/pages/api/[[...slugs]].js.nft.json +1 -1
- package/web/apps/web/.next/server/pages/index/build-manifest.json +3 -3
- package/web/apps/web/.next/server/pages/index/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/index.html +1 -1
- package/web/apps/web/.next/server/pages/index.js.nft.json +1 -1
- package/web/apps/web/.next/server/pages/session/[id]/build-manifest.json +4 -4
- package/web/apps/web/.next/server/pages/session/[id]/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/session/[id].html +1 -1
- package/web/apps/web/.next/server/pages/session/[id].js.nft.json +1 -1
- package/web/apps/web/.next/server/pages/settings/build-manifest.json +3 -3
- package/web/apps/web/.next/server/pages/settings/client-build-manifest.json +1 -1
- package/web/apps/web/.next/server/pages/settings.html +1 -1
- package/web/apps/web/.next/server/pages/settings.js.nft.json +1 -1
- package/web/apps/web/.next/server/pages-manifest.json +0 -2
- package/web/apps/web/package.json +1 -9
- package/web/.next/static/chunks/04d4692d75696297.css +0 -1
- package/web/.next/static/chunks/553710f60e2f2b11.js +0 -1
- package/web/.next/static/chunks/58acbbb4090e3362.js +0 -3
- package/web/.next/static/chunks/6ce1e2f08f961db5.js +0 -2
- package/web/.next/static/chunks/d316d63225992c76.js +0 -10
- package/web/.next/static/chunks/e0c97552ba7a9e3d.js +0 -1
- package/web/.next/static/chunks/fc9c4f2dabfb4e0e.css +0 -1
- package/web/.next/static/chunks/turbopack-1837909a677d116b.js +0 -3
- package/web/apps/web/.next/server/chunks/[root-of-the-server]__0f75905d._.js +0 -3
- package/web/apps/web/.next/server/chunks/[root-of-the-server]__89e85365._.js +0 -358
- package/web/apps/web/.next/server/chunks/[root-of-the-server]__ae1361d0._.js +0 -3
- package/web/apps/web/.next/server/pages/api/terminal/ws/pages-manifest.json +0 -3
- package/web/apps/web/.next/server/pages/api/terminal/ws.js +0 -5
- package/web/apps/web/.next/server/pages/api/terminal/ws.js.map +0 -5
- package/web/apps/web/.next/server/pages/api/terminal/ws.js.nft.json +0 -1
- package/web/apps/web/.next/server/pages/terminal/build-manifest.json +0 -20
- package/web/apps/web/.next/server/pages/terminal/client-build-manifest.json +0 -5
- package/web/apps/web/.next/server/pages/terminal/next-font-manifest.json +0 -11
- package/web/apps/web/.next/server/pages/terminal/pages-manifest.json +0 -3
- package/web/apps/web/.next/server/pages/terminal/react-loadable-manifest.json +0 -1
- package/web/apps/web/.next/server/pages/terminal.html +0 -1
- package/web/apps/web/.next/server/pages/terminal.js.map +0 -5
- package/web/apps/web/.next/server/pages/terminal.js.nft.json +0 -1
- package/web/node_modules/.bun/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/lib/cjs/index.js +0 -176
- package/web/node_modules/.bun/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/lib/cjs/package.json +0 -4
- package/web/node_modules/.bun/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/package.json +0 -28
- package/web/node_modules/.bun/accepts@1.3.8/node_modules/accepts/index.js +0 -238
- package/web/node_modules/.bun/accepts@1.3.8/node_modules/accepts/package.json +0 -47
- package/web/node_modules/.bun/base64id@2.0.0/node_modules/base64id/lib/base64id.js +0 -103
- package/web/node_modules/.bun/base64id@2.0.0/node_modules/base64id/package.json +0 -13
- package/web/node_modules/.bun/cookie@0.7.2/node_modules/cookie/index.js +0 -335
- package/web/node_modules/.bun/cookie@0.7.2/node_modules/cookie/package.json +0 -44
- package/web/node_modules/.bun/cookie@1.1.1/node_modules/cookie/package.json +0 -47
- package/web/node_modules/.bun/cors@2.8.5/node_modules/cors/lib/index.js +0 -238
- package/web/node_modules/.bun/cors@2.8.5/node_modules/cors/package.json +0 -41
- package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/package.json +0 -60
- package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/browser.js +0 -271
- package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/common.js +0 -274
- package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/index.js +0 -10
- package/web/node_modules/.bun/debug@4.3.7/node_modules/debug/src/node.js +0 -263
- package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/commons.js +0 -19
- package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/decodePacket.js +0 -59
- package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/encodePacket.js +0 -38
- package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/index.js +0 -164
- package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/cjs/package.json +0 -8
- package/web/node_modules/.bun/engine.io-parser@5.2.3/node_modules/engine.io-parser/package.json +0 -46
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/engine.io.js +0 -54
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/parser-v3/index.js +0 -424
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/parser-v3/utf8.js +0 -187
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/server.js +0 -786
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/socket.js +0 -460
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transport.js +0 -117
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/index.js +0 -23
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/polling-jsonp.js +0 -41
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/polling.js +0 -332
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/websocket.js +0 -94
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports/webtransport.js +0 -63
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports-uws/index.js +0 -8
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports-uws/polling.js +0 -364
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/transports-uws/websocket.js +0 -73
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/build/userver.js +0 -279
- package/web/node_modules/.bun/engine.io@6.6.4/node_modules/engine.io/package.json +0 -70
- package/web/node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/index.js +0 -8
- package/web/node_modules/.bun/has-flag@4.0.0/node_modules/has-flag/package.json +0 -46
- package/web/node_modules/.bun/mime-db@1.52.0/node_modules/mime-db/db.json +0 -8519
- package/web/node_modules/.bun/mime-db@1.52.0/node_modules/mime-db/index.js +0 -12
- package/web/node_modules/.bun/mime-db@1.52.0/node_modules/mime-db/package.json +0 -60
- package/web/node_modules/.bun/mime-types@2.1.35/node_modules/mime-types/index.js +0 -188
- package/web/node_modules/.bun/mime-types@2.1.35/node_modules/mime-types/package.json +0 -44
- package/web/node_modules/.bun/ms@2.1.3/node_modules/ms/index.js +0 -162
- package/web/node_modules/.bun/ms@2.1.3/node_modules/ms/package.json +0 -38
- package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/index.js +0 -82
- package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/charset.js +0 -169
- package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/encoding.js +0 -184
- package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/language.js +0 -179
- package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/lib/mediaType.js +0 -294
- package/web/node_modules/.bun/negotiator@0.6.3/node_modules/negotiator/package.json +0 -42
- package/web/node_modules/.bun/object-assign@4.1.1/node_modules/object-assign/index.js +0 -90
- package/web/node_modules/.bun/object-assign@4.1.1/node_modules/object-assign/package.json +0 -42
- package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/cluster-adapter.js +0 -674
- package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/contrib/yeast.js +0 -55
- package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/in-memory-adapter.js +0 -394
- package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/dist/index.js +0 -10
- package/web/node_modules/.bun/socket.io-adapter@2.5.5/node_modules/socket.io-adapter/package.json +0 -39
- package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/binary.js +0 -88
- package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/index.js +0 -321
- package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/is-binary.js +0 -55
- package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/cjs/package.json +0 -3
- package/web/node_modules/.bun/socket.io-parser@4.2.4/node_modules/socket.io-parser/package.json +0 -58
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.esm.min.js +0 -7
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.js +0 -4908
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.min.js +0 -7
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/client-dist/socket.io.msgpack.min.js +0 -7
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/broadcast-operator.js +0 -436
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/client.js +0 -268
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/index.js +0 -804
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/namespace.js +0 -581
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/parent-namespace.js +0 -88
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/socket-types.js +0 -11
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/socket.js +0 -977
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/typed-events.js +0 -81
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/dist/uws.js +0 -136
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/package.json +0 -85
- package/web/node_modules/.bun/socket.io@4.8.1/node_modules/socket.io/wrapper.mjs +0 -3
- package/web/node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/index.js +0 -135
- package/web/node_modules/.bun/supports-color@7.2.0/node_modules/supports-color/package.json +0 -53
- package/web/node_modules/.bun/vary@1.1.2/node_modules/vary/index.js +0 -149
- package/web/node_modules/.bun/vary@1.1.2/node_modules/vary/package.json +0 -43
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/index.js +0 -13
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/buffer-util.js +0 -131
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/constants.js +0 -12
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/event-target.js +0 -292
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/extension.js +0 -203
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/limiter.js +0 -55
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/permessage-deflate.js +0 -514
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/receiver.js +0 -704
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/sender.js +0 -497
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/stream.js +0 -159
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/subprotocol.js +0 -62
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/validation.js +0 -130
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/websocket-server.js +0 -540
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/lib/websocket.js +0 -1338
- package/web/node_modules/.bun/ws@8.17.1/node_modules/ws/package.json +0 -69
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/buffer-util.js +0 -131
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/constants.js +0 -18
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/event-target.js +0 -292
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/extension.js +0 -203
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/limiter.js +0 -55
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js +0 -528
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/receiver.js +0 -706
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/sender.js +0 -602
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/stream.js +0 -161
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/subprotocol.js +0 -62
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/validation.js +0 -152
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/websocket-server.js +0 -550
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/lib/websocket.js +0 -1388
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/package.json +0 -69
- package/web/node_modules/.bun/ws@8.18.3/node_modules/ws/wrapper.mjs +0 -8
- /package/web/.next/static/{A7pW-dtFIbPCSkvE8uenX → Im7EdK1Q3oOmTznohTOr5}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{A7pW-dtFIbPCSkvE8uenX → Im7EdK1Q3oOmTznohTOr5}/_ssgManifest.js +0 -0
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Expose `Emitter`.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
exports.Emitter = Emitter;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Initialize a new `Emitter`.
|
|
10
|
-
*
|
|
11
|
-
* @api public
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
function Emitter(obj) {
|
|
15
|
-
if (obj) return mixin(obj);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Mixin the emitter properties.
|
|
20
|
-
*
|
|
21
|
-
* @param {Object} obj
|
|
22
|
-
* @return {Object}
|
|
23
|
-
* @api private
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
function mixin(obj) {
|
|
27
|
-
for (var key in Emitter.prototype) {
|
|
28
|
-
obj[key] = Emitter.prototype[key];
|
|
29
|
-
}
|
|
30
|
-
return obj;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Listen on the given `event` with `fn`.
|
|
35
|
-
*
|
|
36
|
-
* @param {String} event
|
|
37
|
-
* @param {Function} fn
|
|
38
|
-
* @return {Emitter}
|
|
39
|
-
* @api public
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
Emitter.prototype.on =
|
|
43
|
-
Emitter.prototype.addEventListener = function(event, fn){
|
|
44
|
-
this._callbacks = this._callbacks || {};
|
|
45
|
-
(this._callbacks['$' + event] = this._callbacks['$' + event] || [])
|
|
46
|
-
.push(fn);
|
|
47
|
-
return this;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Adds an `event` listener that will be invoked a single
|
|
52
|
-
* time then automatically removed.
|
|
53
|
-
*
|
|
54
|
-
* @param {String} event
|
|
55
|
-
* @param {Function} fn
|
|
56
|
-
* @return {Emitter}
|
|
57
|
-
* @api public
|
|
58
|
-
*/
|
|
59
|
-
|
|
60
|
-
Emitter.prototype.once = function(event, fn){
|
|
61
|
-
function on() {
|
|
62
|
-
this.off(event, on);
|
|
63
|
-
fn.apply(this, arguments);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
on.fn = fn;
|
|
67
|
-
this.on(event, on);
|
|
68
|
-
return this;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Remove the given callback for `event` or all
|
|
73
|
-
* registered callbacks.
|
|
74
|
-
*
|
|
75
|
-
* @param {String} event
|
|
76
|
-
* @param {Function} fn
|
|
77
|
-
* @return {Emitter}
|
|
78
|
-
* @api public
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
Emitter.prototype.off =
|
|
82
|
-
Emitter.prototype.removeListener =
|
|
83
|
-
Emitter.prototype.removeAllListeners =
|
|
84
|
-
Emitter.prototype.removeEventListener = function(event, fn){
|
|
85
|
-
this._callbacks = this._callbacks || {};
|
|
86
|
-
|
|
87
|
-
// all
|
|
88
|
-
if (0 == arguments.length) {
|
|
89
|
-
this._callbacks = {};
|
|
90
|
-
return this;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// specific event
|
|
94
|
-
var callbacks = this._callbacks['$' + event];
|
|
95
|
-
if (!callbacks) return this;
|
|
96
|
-
|
|
97
|
-
// remove all handlers
|
|
98
|
-
if (1 == arguments.length) {
|
|
99
|
-
delete this._callbacks['$' + event];
|
|
100
|
-
return this;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// remove specific handler
|
|
104
|
-
var cb;
|
|
105
|
-
for (var i = 0; i < callbacks.length; i++) {
|
|
106
|
-
cb = callbacks[i];
|
|
107
|
-
if (cb === fn || cb.fn === fn) {
|
|
108
|
-
callbacks.splice(i, 1);
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// Remove event specific arrays for event types that no
|
|
114
|
-
// one is subscribed for to avoid memory leak.
|
|
115
|
-
if (callbacks.length === 0) {
|
|
116
|
-
delete this._callbacks['$' + event];
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return this;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Emit `event` with the given args.
|
|
124
|
-
*
|
|
125
|
-
* @param {String} event
|
|
126
|
-
* @param {Mixed} ...
|
|
127
|
-
* @return {Emitter}
|
|
128
|
-
*/
|
|
129
|
-
|
|
130
|
-
Emitter.prototype.emit = function(event){
|
|
131
|
-
this._callbacks = this._callbacks || {};
|
|
132
|
-
|
|
133
|
-
var args = new Array(arguments.length - 1)
|
|
134
|
-
, callbacks = this._callbacks['$' + event];
|
|
135
|
-
|
|
136
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
137
|
-
args[i - 1] = arguments[i];
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
if (callbacks) {
|
|
141
|
-
callbacks = callbacks.slice(0);
|
|
142
|
-
for (var i = 0, len = callbacks.length; i < len; ++i) {
|
|
143
|
-
callbacks[i].apply(this, args);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return this;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// alias used for reserved events (protected method)
|
|
151
|
-
Emitter.prototype.emitReserved = Emitter.prototype.emit;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Return array of callbacks for `event`.
|
|
155
|
-
*
|
|
156
|
-
* @param {String} event
|
|
157
|
-
* @return {Array}
|
|
158
|
-
* @api public
|
|
159
|
-
*/
|
|
160
|
-
|
|
161
|
-
Emitter.prototype.listeners = function(event){
|
|
162
|
-
this._callbacks = this._callbacks || {};
|
|
163
|
-
return this._callbacks['$' + event] || [];
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Check if this emitter has `event` handlers.
|
|
168
|
-
*
|
|
169
|
-
* @param {String} event
|
|
170
|
-
* @return {Boolean}
|
|
171
|
-
* @api public
|
|
172
|
-
*/
|
|
173
|
-
|
|
174
|
-
Emitter.prototype.hasListeners = function(event){
|
|
175
|
-
return !! this.listeners(event).length;
|
|
176
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@socket.io/component-emitter",
|
|
3
|
-
"description": "Event emitter",
|
|
4
|
-
"version": "3.1.2",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"devDependencies": {
|
|
7
|
-
"mocha": "*",
|
|
8
|
-
"should": "*"
|
|
9
|
-
},
|
|
10
|
-
"component": {
|
|
11
|
-
"scripts": {
|
|
12
|
-
"emitter/index.js": "index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"main": "./lib/cjs/index.js",
|
|
16
|
-
"module": "./lib/esm/index.js",
|
|
17
|
-
"types": "./lib/cjs/index.d.ts",
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "https://github.com/socketio/emitter.git"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "make test"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"lib/"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* accepts
|
|
3
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
4
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
5
|
-
* MIT Licensed
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
'use strict'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Module dependencies.
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
var Negotiator = require('negotiator')
|
|
16
|
-
var mime = require('mime-types')
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Module exports.
|
|
20
|
-
* @public
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
module.exports = Accepts
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Create a new Accepts object for the given req.
|
|
27
|
-
*
|
|
28
|
-
* @param {object} req
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
function Accepts (req) {
|
|
33
|
-
if (!(this instanceof Accepts)) {
|
|
34
|
-
return new Accepts(req)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
this.headers = req.headers
|
|
38
|
-
this.negotiator = new Negotiator(req)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Check if the given `type(s)` is acceptable, returning
|
|
43
|
-
* the best match when true, otherwise `undefined`, in which
|
|
44
|
-
* case you should respond with 406 "Not Acceptable".
|
|
45
|
-
*
|
|
46
|
-
* The `type` value may be a single mime type string
|
|
47
|
-
* such as "application/json", the extension name
|
|
48
|
-
* such as "json" or an array `["json", "html", "text/plain"]`. When a list
|
|
49
|
-
* or array is given the _best_ match, if any is returned.
|
|
50
|
-
*
|
|
51
|
-
* Examples:
|
|
52
|
-
*
|
|
53
|
-
* // Accept: text/html
|
|
54
|
-
* this.types('html');
|
|
55
|
-
* // => "html"
|
|
56
|
-
*
|
|
57
|
-
* // Accept: text/*, application/json
|
|
58
|
-
* this.types('html');
|
|
59
|
-
* // => "html"
|
|
60
|
-
* this.types('text/html');
|
|
61
|
-
* // => "text/html"
|
|
62
|
-
* this.types('json', 'text');
|
|
63
|
-
* // => "json"
|
|
64
|
-
* this.types('application/json');
|
|
65
|
-
* // => "application/json"
|
|
66
|
-
*
|
|
67
|
-
* // Accept: text/*, application/json
|
|
68
|
-
* this.types('image/png');
|
|
69
|
-
* this.types('png');
|
|
70
|
-
* // => undefined
|
|
71
|
-
*
|
|
72
|
-
* // Accept: text/*;q=.5, application/json
|
|
73
|
-
* this.types(['html', 'json']);
|
|
74
|
-
* this.types('html', 'json');
|
|
75
|
-
* // => "json"
|
|
76
|
-
*
|
|
77
|
-
* @param {String|Array} types...
|
|
78
|
-
* @return {String|Array|Boolean}
|
|
79
|
-
* @public
|
|
80
|
-
*/
|
|
81
|
-
|
|
82
|
-
Accepts.prototype.type =
|
|
83
|
-
Accepts.prototype.types = function (types_) {
|
|
84
|
-
var types = types_
|
|
85
|
-
|
|
86
|
-
// support flattened arguments
|
|
87
|
-
if (types && !Array.isArray(types)) {
|
|
88
|
-
types = new Array(arguments.length)
|
|
89
|
-
for (var i = 0; i < types.length; i++) {
|
|
90
|
-
types[i] = arguments[i]
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// no types, return all requested types
|
|
95
|
-
if (!types || types.length === 0) {
|
|
96
|
-
return this.negotiator.mediaTypes()
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// no accept header, return first given type
|
|
100
|
-
if (!this.headers.accept) {
|
|
101
|
-
return types[0]
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
var mimes = types.map(extToMime)
|
|
105
|
-
var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
|
|
106
|
-
var first = accepts[0]
|
|
107
|
-
|
|
108
|
-
return first
|
|
109
|
-
? types[mimes.indexOf(first)]
|
|
110
|
-
: false
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Return accepted encodings or best fit based on `encodings`.
|
|
115
|
-
*
|
|
116
|
-
* Given `Accept-Encoding: gzip, deflate`
|
|
117
|
-
* an array sorted by quality is returned:
|
|
118
|
-
*
|
|
119
|
-
* ['gzip', 'deflate']
|
|
120
|
-
*
|
|
121
|
-
* @param {String|Array} encodings...
|
|
122
|
-
* @return {String|Array}
|
|
123
|
-
* @public
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
Accepts.prototype.encoding =
|
|
127
|
-
Accepts.prototype.encodings = function (encodings_) {
|
|
128
|
-
var encodings = encodings_
|
|
129
|
-
|
|
130
|
-
// support flattened arguments
|
|
131
|
-
if (encodings && !Array.isArray(encodings)) {
|
|
132
|
-
encodings = new Array(arguments.length)
|
|
133
|
-
for (var i = 0; i < encodings.length; i++) {
|
|
134
|
-
encodings[i] = arguments[i]
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// no encodings, return all requested encodings
|
|
139
|
-
if (!encodings || encodings.length === 0) {
|
|
140
|
-
return this.negotiator.encodings()
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
return this.negotiator.encodings(encodings)[0] || false
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Return accepted charsets or best fit based on `charsets`.
|
|
148
|
-
*
|
|
149
|
-
* Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
|
|
150
|
-
* an array sorted by quality is returned:
|
|
151
|
-
*
|
|
152
|
-
* ['utf-8', 'utf-7', 'iso-8859-1']
|
|
153
|
-
*
|
|
154
|
-
* @param {String|Array} charsets...
|
|
155
|
-
* @return {String|Array}
|
|
156
|
-
* @public
|
|
157
|
-
*/
|
|
158
|
-
|
|
159
|
-
Accepts.prototype.charset =
|
|
160
|
-
Accepts.prototype.charsets = function (charsets_) {
|
|
161
|
-
var charsets = charsets_
|
|
162
|
-
|
|
163
|
-
// support flattened arguments
|
|
164
|
-
if (charsets && !Array.isArray(charsets)) {
|
|
165
|
-
charsets = new Array(arguments.length)
|
|
166
|
-
for (var i = 0; i < charsets.length; i++) {
|
|
167
|
-
charsets[i] = arguments[i]
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// no charsets, return all requested charsets
|
|
172
|
-
if (!charsets || charsets.length === 0) {
|
|
173
|
-
return this.negotiator.charsets()
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return this.negotiator.charsets(charsets)[0] || false
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Return accepted languages or best fit based on `langs`.
|
|
181
|
-
*
|
|
182
|
-
* Given `Accept-Language: en;q=0.8, es, pt`
|
|
183
|
-
* an array sorted by quality is returned:
|
|
184
|
-
*
|
|
185
|
-
* ['es', 'pt', 'en']
|
|
186
|
-
*
|
|
187
|
-
* @param {String|Array} langs...
|
|
188
|
-
* @return {Array|String}
|
|
189
|
-
* @public
|
|
190
|
-
*/
|
|
191
|
-
|
|
192
|
-
Accepts.prototype.lang =
|
|
193
|
-
Accepts.prototype.langs =
|
|
194
|
-
Accepts.prototype.language =
|
|
195
|
-
Accepts.prototype.languages = function (languages_) {
|
|
196
|
-
var languages = languages_
|
|
197
|
-
|
|
198
|
-
// support flattened arguments
|
|
199
|
-
if (languages && !Array.isArray(languages)) {
|
|
200
|
-
languages = new Array(arguments.length)
|
|
201
|
-
for (var i = 0; i < languages.length; i++) {
|
|
202
|
-
languages[i] = arguments[i]
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// no languages, return all requested languages
|
|
207
|
-
if (!languages || languages.length === 0) {
|
|
208
|
-
return this.negotiator.languages()
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
return this.negotiator.languages(languages)[0] || false
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Convert extnames to mime.
|
|
216
|
-
*
|
|
217
|
-
* @param {String} type
|
|
218
|
-
* @return {String}
|
|
219
|
-
* @private
|
|
220
|
-
*/
|
|
221
|
-
|
|
222
|
-
function extToMime (type) {
|
|
223
|
-
return type.indexOf('/') === -1
|
|
224
|
-
? mime.lookup(type)
|
|
225
|
-
: type
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Check if mime is valid.
|
|
230
|
-
*
|
|
231
|
-
* @param {String} type
|
|
232
|
-
* @return {String}
|
|
233
|
-
* @private
|
|
234
|
-
*/
|
|
235
|
-
|
|
236
|
-
function validMime (type) {
|
|
237
|
-
return typeof type === 'string'
|
|
238
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "accepts",
|
|
3
|
-
"description": "Higher-level content negotiation",
|
|
4
|
-
"version": "1.3.8",
|
|
5
|
-
"contributors": [
|
|
6
|
-
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
|
-
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
8
|
-
],
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"repository": "jshttp/accepts",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"mime-types": "~2.1.34",
|
|
13
|
-
"negotiator": "0.6.3"
|
|
14
|
-
},
|
|
15
|
-
"devDependencies": {
|
|
16
|
-
"deep-equal": "1.0.1",
|
|
17
|
-
"eslint": "7.32.0",
|
|
18
|
-
"eslint-config-standard": "14.1.1",
|
|
19
|
-
"eslint-plugin-import": "2.25.4",
|
|
20
|
-
"eslint-plugin-markdown": "2.2.1",
|
|
21
|
-
"eslint-plugin-node": "11.1.0",
|
|
22
|
-
"eslint-plugin-promise": "4.3.1",
|
|
23
|
-
"eslint-plugin-standard": "4.1.0",
|
|
24
|
-
"mocha": "9.2.0",
|
|
25
|
-
"nyc": "15.1.0"
|
|
26
|
-
},
|
|
27
|
-
"files": [
|
|
28
|
-
"LICENSE",
|
|
29
|
-
"HISTORY.md",
|
|
30
|
-
"index.js"
|
|
31
|
-
],
|
|
32
|
-
"engines": {
|
|
33
|
-
"node": ">= 0.6"
|
|
34
|
-
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"lint": "eslint .",
|
|
37
|
-
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
38
|
-
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
39
|
-
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
40
|
-
},
|
|
41
|
-
"keywords": [
|
|
42
|
-
"content",
|
|
43
|
-
"negotiation",
|
|
44
|
-
"accept",
|
|
45
|
-
"accepts"
|
|
46
|
-
]
|
|
47
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* base64id v0.1.0
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Module dependencies
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
var crypto = require('crypto');
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Constructor
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
var Base64Id = function() { };
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Get random bytes
|
|
19
|
-
*
|
|
20
|
-
* Uses a buffer if available, falls back to crypto.randomBytes
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
Base64Id.prototype.getRandomBytes = function(bytes) {
|
|
24
|
-
|
|
25
|
-
var BUFFER_SIZE = 4096
|
|
26
|
-
var self = this;
|
|
27
|
-
|
|
28
|
-
bytes = bytes || 12;
|
|
29
|
-
|
|
30
|
-
if (bytes > BUFFER_SIZE) {
|
|
31
|
-
return crypto.randomBytes(bytes);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var bytesInBuffer = parseInt(BUFFER_SIZE/bytes);
|
|
35
|
-
var threshold = parseInt(bytesInBuffer*0.85);
|
|
36
|
-
|
|
37
|
-
if (!threshold) {
|
|
38
|
-
return crypto.randomBytes(bytes);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (this.bytesBufferIndex == null) {
|
|
42
|
-
this.bytesBufferIndex = -1;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (this.bytesBufferIndex == bytesInBuffer) {
|
|
46
|
-
this.bytesBuffer = null;
|
|
47
|
-
this.bytesBufferIndex = -1;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// No buffered bytes available or index above threshold
|
|
51
|
-
if (this.bytesBufferIndex == -1 || this.bytesBufferIndex > threshold) {
|
|
52
|
-
|
|
53
|
-
if (!this.isGeneratingBytes) {
|
|
54
|
-
this.isGeneratingBytes = true;
|
|
55
|
-
crypto.randomBytes(BUFFER_SIZE, function(err, bytes) {
|
|
56
|
-
self.bytesBuffer = bytes;
|
|
57
|
-
self.bytesBufferIndex = 0;
|
|
58
|
-
self.isGeneratingBytes = false;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Fall back to sync call when no buffered bytes are available
|
|
63
|
-
if (this.bytesBufferIndex == -1) {
|
|
64
|
-
return crypto.randomBytes(bytes);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var result = this.bytesBuffer.slice(bytes*this.bytesBufferIndex, bytes*(this.bytesBufferIndex+1));
|
|
69
|
-
this.bytesBufferIndex++;
|
|
70
|
-
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Generates a base64 id
|
|
76
|
-
*
|
|
77
|
-
* (Original version from socket.io <http://socket.io>)
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
Base64Id.prototype.generateId = function () {
|
|
81
|
-
var rand = Buffer.alloc(15); // multiple of 3 for base64
|
|
82
|
-
if (!rand.writeInt32BE) {
|
|
83
|
-
return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString()
|
|
84
|
-
+ Math.abs(Math.random() * Math.random() * Date.now() | 0).toString();
|
|
85
|
-
}
|
|
86
|
-
this.sequenceNumber = (this.sequenceNumber + 1) | 0;
|
|
87
|
-
rand.writeInt32BE(this.sequenceNumber, 11);
|
|
88
|
-
if (crypto.randomBytes) {
|
|
89
|
-
this.getRandomBytes(12).copy(rand);
|
|
90
|
-
} else {
|
|
91
|
-
// not secure for node 0.4
|
|
92
|
-
[0, 4, 8].forEach(function(i) {
|
|
93
|
-
rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-');
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Export
|
|
101
|
-
*/
|
|
102
|
-
|
|
103
|
-
exports = module.exports = new Base64Id();
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "base64id"
|
|
3
|
-
, "version": "2.0.0"
|
|
4
|
-
, "license": "MIT"
|
|
5
|
-
, "description": "Generates a base64 id"
|
|
6
|
-
, "author": "Kristian Faeldt <faeldt_kristian@cyberagent.co.jp>"
|
|
7
|
-
, "repository": {
|
|
8
|
-
"type": "git"
|
|
9
|
-
, "url": "https://github.com/faeldt/base64id.git"
|
|
10
|
-
}
|
|
11
|
-
, "main": "./lib/base64id.js"
|
|
12
|
-
, "engines": { "node": "^4.5.0 || >= 5.9" }
|
|
13
|
-
}
|