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,294 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* negotiator
|
|
3
|
-
* Copyright(c) 2012 Isaac Z. Schlueter
|
|
4
|
-
* Copyright(c) 2014 Federico Romero
|
|
5
|
-
* Copyright(c) 2014-2015 Douglas Christopher Wilson
|
|
6
|
-
* MIT Licensed
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
'use strict';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Module exports.
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
module.exports = preferredMediaTypes;
|
|
17
|
-
module.exports.preferredMediaTypes = preferredMediaTypes;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Module variables.
|
|
21
|
-
* @private
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
var simpleMediaTypeRegExp = /^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Parse the Accept header.
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
function parseAccept(accept) {
|
|
32
|
-
var accepts = splitMediaTypes(accept);
|
|
33
|
-
|
|
34
|
-
for (var i = 0, j = 0; i < accepts.length; i++) {
|
|
35
|
-
var mediaType = parseMediaType(accepts[i].trim(), i);
|
|
36
|
-
|
|
37
|
-
if (mediaType) {
|
|
38
|
-
accepts[j++] = mediaType;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// trim accepts
|
|
43
|
-
accepts.length = j;
|
|
44
|
-
|
|
45
|
-
return accepts;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Parse a media type from the Accept header.
|
|
50
|
-
* @private
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
function parseMediaType(str, i) {
|
|
54
|
-
var match = simpleMediaTypeRegExp.exec(str);
|
|
55
|
-
if (!match) return null;
|
|
56
|
-
|
|
57
|
-
var params = Object.create(null);
|
|
58
|
-
var q = 1;
|
|
59
|
-
var subtype = match[2];
|
|
60
|
-
var type = match[1];
|
|
61
|
-
|
|
62
|
-
if (match[3]) {
|
|
63
|
-
var kvps = splitParameters(match[3]).map(splitKeyValuePair);
|
|
64
|
-
|
|
65
|
-
for (var j = 0; j < kvps.length; j++) {
|
|
66
|
-
var pair = kvps[j];
|
|
67
|
-
var key = pair[0].toLowerCase();
|
|
68
|
-
var val = pair[1];
|
|
69
|
-
|
|
70
|
-
// get the value, unwrapping quotes
|
|
71
|
-
var value = val && val[0] === '"' && val[val.length - 1] === '"'
|
|
72
|
-
? val.substr(1, val.length - 2)
|
|
73
|
-
: val;
|
|
74
|
-
|
|
75
|
-
if (key === 'q') {
|
|
76
|
-
q = parseFloat(value);
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// store parameter
|
|
81
|
-
params[key] = value;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return {
|
|
86
|
-
type: type,
|
|
87
|
-
subtype: subtype,
|
|
88
|
-
params: params,
|
|
89
|
-
q: q,
|
|
90
|
-
i: i
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Get the priority of a media type.
|
|
96
|
-
* @private
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
function getMediaTypePriority(type, accepted, index) {
|
|
100
|
-
var priority = {o: -1, q: 0, s: 0};
|
|
101
|
-
|
|
102
|
-
for (var i = 0; i < accepted.length; i++) {
|
|
103
|
-
var spec = specify(type, accepted[i], index);
|
|
104
|
-
|
|
105
|
-
if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {
|
|
106
|
-
priority = spec;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return priority;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Get the specificity of the media type.
|
|
115
|
-
* @private
|
|
116
|
-
*/
|
|
117
|
-
|
|
118
|
-
function specify(type, spec, index) {
|
|
119
|
-
var p = parseMediaType(type);
|
|
120
|
-
var s = 0;
|
|
121
|
-
|
|
122
|
-
if (!p) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if(spec.type.toLowerCase() == p.type.toLowerCase()) {
|
|
127
|
-
s |= 4
|
|
128
|
-
} else if(spec.type != '*') {
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if(spec.subtype.toLowerCase() == p.subtype.toLowerCase()) {
|
|
133
|
-
s |= 2
|
|
134
|
-
} else if(spec.subtype != '*') {
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
var keys = Object.keys(spec.params);
|
|
139
|
-
if (keys.length > 0) {
|
|
140
|
-
if (keys.every(function (k) {
|
|
141
|
-
return spec.params[k] == '*' || (spec.params[k] || '').toLowerCase() == (p.params[k] || '').toLowerCase();
|
|
142
|
-
})) {
|
|
143
|
-
s |= 1
|
|
144
|
-
} else {
|
|
145
|
-
return null
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return {
|
|
150
|
-
i: index,
|
|
151
|
-
o: spec.i,
|
|
152
|
-
q: spec.q,
|
|
153
|
-
s: s,
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Get the preferred media types from an Accept header.
|
|
159
|
-
* @public
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
function preferredMediaTypes(accept, provided) {
|
|
163
|
-
// RFC 2616 sec 14.2: no header = */*
|
|
164
|
-
var accepts = parseAccept(accept === undefined ? '*/*' : accept || '');
|
|
165
|
-
|
|
166
|
-
if (!provided) {
|
|
167
|
-
// sorted list of all types
|
|
168
|
-
return accepts
|
|
169
|
-
.filter(isQuality)
|
|
170
|
-
.sort(compareSpecs)
|
|
171
|
-
.map(getFullType);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
var priorities = provided.map(function getPriority(type, index) {
|
|
175
|
-
return getMediaTypePriority(type, accepts, index);
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
// sorted list of accepted types
|
|
179
|
-
return priorities.filter(isQuality).sort(compareSpecs).map(function getType(priority) {
|
|
180
|
-
return provided[priorities.indexOf(priority)];
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Compare two specs.
|
|
186
|
-
* @private
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
function compareSpecs(a, b) {
|
|
190
|
-
return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Get full type string.
|
|
195
|
-
* @private
|
|
196
|
-
*/
|
|
197
|
-
|
|
198
|
-
function getFullType(spec) {
|
|
199
|
-
return spec.type + '/' + spec.subtype;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Check if a spec has any quality.
|
|
204
|
-
* @private
|
|
205
|
-
*/
|
|
206
|
-
|
|
207
|
-
function isQuality(spec) {
|
|
208
|
-
return spec.q > 0;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Count the number of quotes in a string.
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
|
|
216
|
-
function quoteCount(string) {
|
|
217
|
-
var count = 0;
|
|
218
|
-
var index = 0;
|
|
219
|
-
|
|
220
|
-
while ((index = string.indexOf('"', index)) !== -1) {
|
|
221
|
-
count++;
|
|
222
|
-
index++;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
return count;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Split a key value pair.
|
|
230
|
-
* @private
|
|
231
|
-
*/
|
|
232
|
-
|
|
233
|
-
function splitKeyValuePair(str) {
|
|
234
|
-
var index = str.indexOf('=');
|
|
235
|
-
var key;
|
|
236
|
-
var val;
|
|
237
|
-
|
|
238
|
-
if (index === -1) {
|
|
239
|
-
key = str;
|
|
240
|
-
} else {
|
|
241
|
-
key = str.substr(0, index);
|
|
242
|
-
val = str.substr(index + 1);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return [key, val];
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* Split an Accept header into media types.
|
|
250
|
-
* @private
|
|
251
|
-
*/
|
|
252
|
-
|
|
253
|
-
function splitMediaTypes(accept) {
|
|
254
|
-
var accepts = accept.split(',');
|
|
255
|
-
|
|
256
|
-
for (var i = 1, j = 0; i < accepts.length; i++) {
|
|
257
|
-
if (quoteCount(accepts[j]) % 2 == 0) {
|
|
258
|
-
accepts[++j] = accepts[i];
|
|
259
|
-
} else {
|
|
260
|
-
accepts[j] += ',' + accepts[i];
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// trim accepts
|
|
265
|
-
accepts.length = j + 1;
|
|
266
|
-
|
|
267
|
-
return accepts;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Split a string of parameters.
|
|
272
|
-
* @private
|
|
273
|
-
*/
|
|
274
|
-
|
|
275
|
-
function splitParameters(str) {
|
|
276
|
-
var parameters = str.split(';');
|
|
277
|
-
|
|
278
|
-
for (var i = 1, j = 0; i < parameters.length; i++) {
|
|
279
|
-
if (quoteCount(parameters[j]) % 2 == 0) {
|
|
280
|
-
parameters[++j] = parameters[i];
|
|
281
|
-
} else {
|
|
282
|
-
parameters[j] += ';' + parameters[i];
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
// trim parameters
|
|
287
|
-
parameters.length = j + 1;
|
|
288
|
-
|
|
289
|
-
for (var i = 0; i < parameters.length; i++) {
|
|
290
|
-
parameters[i] = parameters[i].trim();
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
return parameters;
|
|
294
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "negotiator",
|
|
3
|
-
"description": "HTTP content negotiation",
|
|
4
|
-
"version": "0.6.3",
|
|
5
|
-
"contributors": [
|
|
6
|
-
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
|
-
"Federico Romero <federico.romero@outboxlabs.com>",
|
|
8
|
-
"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
|
|
9
|
-
],
|
|
10
|
-
"license": "MIT",
|
|
11
|
-
"keywords": [
|
|
12
|
-
"http",
|
|
13
|
-
"content negotiation",
|
|
14
|
-
"accept",
|
|
15
|
-
"accept-language",
|
|
16
|
-
"accept-encoding",
|
|
17
|
-
"accept-charset"
|
|
18
|
-
],
|
|
19
|
-
"repository": "jshttp/negotiator",
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"eslint": "7.32.0",
|
|
22
|
-
"eslint-plugin-markdown": "2.2.1",
|
|
23
|
-
"mocha": "9.1.3",
|
|
24
|
-
"nyc": "15.1.0"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"lib/",
|
|
28
|
-
"HISTORY.md",
|
|
29
|
-
"LICENSE",
|
|
30
|
-
"index.js",
|
|
31
|
-
"README.md"
|
|
32
|
-
],
|
|
33
|
-
"engines": {
|
|
34
|
-
"node": ">= 0.6"
|
|
35
|
-
},
|
|
36
|
-
"scripts": {
|
|
37
|
-
"lint": "eslint .",
|
|
38
|
-
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
39
|
-
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
40
|
-
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
'use strict';
|
|
8
|
-
/* eslint-disable no-unused-vars */
|
|
9
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
10
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
11
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
12
|
-
|
|
13
|
-
function toObject(val) {
|
|
14
|
-
if (val === null || val === undefined) {
|
|
15
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return Object(val);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function shouldUseNative() {
|
|
22
|
-
try {
|
|
23
|
-
if (!Object.assign) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
28
|
-
|
|
29
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
30
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
31
|
-
test1[5] = 'de';
|
|
32
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
37
|
-
var test2 = {};
|
|
38
|
-
for (var i = 0; i < 10; i++) {
|
|
39
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
40
|
-
}
|
|
41
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
42
|
-
return test2[n];
|
|
43
|
-
});
|
|
44
|
-
if (order2.join('') !== '0123456789') {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
49
|
-
var test3 = {};
|
|
50
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
51
|
-
test3[letter] = letter;
|
|
52
|
-
});
|
|
53
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
54
|
-
'abcdefghijklmnopqrst') {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return true;
|
|
59
|
-
} catch (err) {
|
|
60
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
66
|
-
var from;
|
|
67
|
-
var to = toObject(target);
|
|
68
|
-
var symbols;
|
|
69
|
-
|
|
70
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
71
|
-
from = Object(arguments[s]);
|
|
72
|
-
|
|
73
|
-
for (var key in from) {
|
|
74
|
-
if (hasOwnProperty.call(from, key)) {
|
|
75
|
-
to[key] = from[key];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (getOwnPropertySymbols) {
|
|
80
|
-
symbols = getOwnPropertySymbols(from);
|
|
81
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
82
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
83
|
-
to[symbols[i]] = from[symbols[i]];
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return to;
|
|
90
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "object-assign",
|
|
3
|
-
"version": "4.1.1",
|
|
4
|
-
"description": "ES2015 `Object.assign()` ponyfill",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/object-assign",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=0.10.0"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "xo && ava",
|
|
17
|
-
"bench": "matcha bench.js"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"index.js"
|
|
21
|
-
],
|
|
22
|
-
"keywords": [
|
|
23
|
-
"object",
|
|
24
|
-
"assign",
|
|
25
|
-
"extend",
|
|
26
|
-
"properties",
|
|
27
|
-
"es2015",
|
|
28
|
-
"ecmascript",
|
|
29
|
-
"harmony",
|
|
30
|
-
"ponyfill",
|
|
31
|
-
"prollyfill",
|
|
32
|
-
"polyfill",
|
|
33
|
-
"shim",
|
|
34
|
-
"browser"
|
|
35
|
-
],
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"ava": "^0.16.0",
|
|
38
|
-
"lodash": "^4.16.4",
|
|
39
|
-
"matcha": "^0.7.0",
|
|
40
|
-
"xo": "^0.16.0"
|
|
41
|
-
}
|
|
42
|
-
}
|