@verdaccio/middleware 8.0.0-next-8.32 → 9.0.0-next-9.1
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/build/middlewares/api_urls.d.ts +4 -4
- package/build/middlewares/api_urls.js +4 -4
- package/build/middlewares/api_urls.js.map +1 -1
- package/build/middlewares/log.js +8 -10
- package/build/middlewares/log.js.map +1 -1
- package/build/middlewares/media.js +1 -1
- package/build/middlewares/media.js.map +1 -1
- package/build/middlewares/web/render-web.js +4 -4
- package/build/middlewares/web/render-web.js.map +1 -1
- package/build/middlewares/web/web-urls.d.ts +4 -4
- package/build/middlewares/web/web-urls.js +4 -4
- package/build/middlewares/web/web-urls.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export declare enum USER_API_ENDPOINTS {
|
|
2
2
|
whoami = "/-/whoami",
|
|
3
3
|
get_user = "/-/user/:org_couchdb_user",
|
|
4
|
-
add_user = "/-/user/:org_couchdb_user/:_rev
|
|
5
|
-
user_token = "/-/user/token
|
|
4
|
+
add_user = "/-/user/:org_couchdb_user{/:_rev}{/:revision}",
|
|
5
|
+
user_token = "/-/user/token/{*subject}"
|
|
6
6
|
}
|
|
7
7
|
export declare enum STARS_API_ENDPOINTS {
|
|
8
8
|
get_user_starred_packages = "/-/_view/starredByUser"
|
|
9
9
|
}
|
|
10
10
|
export declare enum SEARCH_API_ENDPOINTS {
|
|
11
11
|
search = "/-/v1/search",
|
|
12
|
-
deprecated_search = "/-/all
|
|
12
|
+
deprecated_search = "/-/all{/:since}"
|
|
13
13
|
}
|
|
14
14
|
export declare enum PUBLISH_API_ENDPOINTS {
|
|
15
15
|
add_package = "/:package",
|
|
@@ -20,7 +20,7 @@ export declare enum PING_API_ENDPOINTS {
|
|
|
20
20
|
ping = "/-/ping"
|
|
21
21
|
}
|
|
22
22
|
export declare enum PACKAGE_API_ENDPOINTS {
|
|
23
|
-
get_package_by_version = "/:package/:version
|
|
23
|
+
get_package_by_version = "/:package{/:version}",
|
|
24
24
|
get_package_tarball = "/:package/-/:filename"
|
|
25
25
|
}
|
|
26
26
|
export declare enum DIST_TAGS_API_ENDPOINTS {
|
|
@@ -7,8 +7,8 @@ exports.USER_API_ENDPOINTS = exports.TOKEN_API_ENDPOINTS = exports.STARS_API_END
|
|
|
7
7
|
let USER_API_ENDPOINTS = exports.USER_API_ENDPOINTS = /*#__PURE__*/function (USER_API_ENDPOINTS) {
|
|
8
8
|
USER_API_ENDPOINTS["whoami"] = "/-/whoami";
|
|
9
9
|
USER_API_ENDPOINTS["get_user"] = "/-/user/:org_couchdb_user";
|
|
10
|
-
USER_API_ENDPOINTS["add_user"] = "/-/user/:org_couchdb_user/:_rev
|
|
11
|
-
USER_API_ENDPOINTS["user_token"] = "/-/user/token
|
|
10
|
+
USER_API_ENDPOINTS["add_user"] = "/-/user/:org_couchdb_user{/:_rev}{/:revision}";
|
|
11
|
+
USER_API_ENDPOINTS["user_token"] = "/-/user/token/{*subject}";
|
|
12
12
|
return USER_API_ENDPOINTS;
|
|
13
13
|
}({});
|
|
14
14
|
let STARS_API_ENDPOINTS = exports.STARS_API_ENDPOINTS = /*#__PURE__*/function (STARS_API_ENDPOINTS) {
|
|
@@ -17,7 +17,7 @@ let STARS_API_ENDPOINTS = exports.STARS_API_ENDPOINTS = /*#__PURE__*/function (S
|
|
|
17
17
|
}({});
|
|
18
18
|
let SEARCH_API_ENDPOINTS = exports.SEARCH_API_ENDPOINTS = /*#__PURE__*/function (SEARCH_API_ENDPOINTS) {
|
|
19
19
|
SEARCH_API_ENDPOINTS["search"] = "/-/v1/search";
|
|
20
|
-
SEARCH_API_ENDPOINTS["deprecated_search"] = "/-/all
|
|
20
|
+
SEARCH_API_ENDPOINTS["deprecated_search"] = "/-/all{/:since}";
|
|
21
21
|
return SEARCH_API_ENDPOINTS;
|
|
22
22
|
}({});
|
|
23
23
|
let PUBLISH_API_ENDPOINTS = exports.PUBLISH_API_ENDPOINTS = /*#__PURE__*/function (PUBLISH_API_ENDPOINTS) {
|
|
@@ -31,7 +31,7 @@ let PING_API_ENDPOINTS = exports.PING_API_ENDPOINTS = /*#__PURE__*/function (PIN
|
|
|
31
31
|
return PING_API_ENDPOINTS;
|
|
32
32
|
}({});
|
|
33
33
|
let PACKAGE_API_ENDPOINTS = exports.PACKAGE_API_ENDPOINTS = /*#__PURE__*/function (PACKAGE_API_ENDPOINTS) {
|
|
34
|
-
PACKAGE_API_ENDPOINTS["get_package_by_version"] = "/:package/:version
|
|
34
|
+
PACKAGE_API_ENDPOINTS["get_package_by_version"] = "/:package{/:version}";
|
|
35
35
|
PACKAGE_API_ENDPOINTS["get_package_tarball"] = "/:package/-/:filename";
|
|
36
36
|
return PACKAGE_API_ENDPOINTS;
|
|
37
37
|
}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api_urls.js","names":["USER_API_ENDPOINTS","exports","STARS_API_ENDPOINTS","SEARCH_API_ENDPOINTS","PUBLISH_API_ENDPOINTS","PING_API_ENDPOINTS","PACKAGE_API_ENDPOINTS","DIST_TAGS_API_ENDPOINTS","PROFILE_API_ENDPOINTS","TOKEN_API_ENDPOINTS","LOGIN_API_ENDPOINTS"],"sources":["../../src/middlewares/api_urls.ts"],"sourcesContent":["export enum USER_API_ENDPOINTS {\n whoami = '/-/whoami',\n get_user = '/-/user/:org_couchdb_user',\n add_user = '/-/user/:org_couchdb_user/:_rev
|
|
1
|
+
{"version":3,"file":"api_urls.js","names":["USER_API_ENDPOINTS","exports","STARS_API_ENDPOINTS","SEARCH_API_ENDPOINTS","PUBLISH_API_ENDPOINTS","PING_API_ENDPOINTS","PACKAGE_API_ENDPOINTS","DIST_TAGS_API_ENDPOINTS","PROFILE_API_ENDPOINTS","TOKEN_API_ENDPOINTS","LOGIN_API_ENDPOINTS"],"sources":["../../src/middlewares/api_urls.ts"],"sourcesContent":["export enum USER_API_ENDPOINTS {\n whoami = '/-/whoami',\n get_user = '/-/user/:org_couchdb_user',\n add_user = '/-/user/:org_couchdb_user{/:_rev}{/:revision}',\n user_token = '/-/user/token/{*subject}',\n}\n\nexport enum STARS_API_ENDPOINTS {\n get_user_starred_packages = '/-/_view/starredByUser',\n}\n\nexport enum SEARCH_API_ENDPOINTS {\n search = '/-/v1/search',\n deprecated_search = '/-/all{/:since}',\n}\n\nexport enum PUBLISH_API_ENDPOINTS {\n add_package = '/:package',\n publish_package = '/:package/-rev/:revision',\n remove_tarball = '/:package/-/:filename/-rev/:revision',\n}\n\nexport enum PING_API_ENDPOINTS {\n ping = '/-/ping',\n}\n\nexport enum PACKAGE_API_ENDPOINTS {\n get_package_by_version = '/:package{/:version}',\n get_package_tarball = '/:package/-/:filename',\n}\n\nexport enum DIST_TAGS_API_ENDPOINTS {\n tagging = '/:package/:tag',\n tagging_package = '/-/package/:package/dist-tags/:tag',\n get_dist_tags = '/-/package/:package/dist-tags',\n}\n\nexport enum PROFILE_API_ENDPOINTS {\n get_profile = '/-/npm/v1/user',\n}\n\nexport enum TOKEN_API_ENDPOINTS {\n get_tokens = '/-/npm/v1/tokens',\n delete_token = '/-/npm/v1/tokens/token/:tokenKey',\n}\n\nexport enum LOGIN_API_ENDPOINTS {\n login = '/-/v1/login',\n login_cli = '/-/v1/login_cli',\n login_cli_session = '/-/v1/login_cli/:sessionId',\n login_done = '/-/v1/done',\n login_done_session = '/-/v1/done/:sessionId',\n}\n"],"mappings":";;;;;;IAAYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAA,IAOlBE,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAInBC,oBAAoB,GAAAF,OAAA,CAAAE,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAAA,IAKpBC,qBAAqB,GAAAH,OAAA,CAAAG,qBAAA,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAAA,IAMrBC,kBAAkB,GAAAJ,OAAA,CAAAI,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAA,IAIlBC,qBAAqB,GAAAL,OAAA,CAAAK,qBAAA,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAAA,IAKrBC,uBAAuB,GAAAN,OAAA,CAAAM,uBAAA,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA;AAAA,IAMvBC,qBAAqB,GAAAP,OAAA,CAAAO,qBAAA,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAAA,IAIrBC,mBAAmB,GAAAR,OAAA,CAAAQ,mBAAA,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAA,IAKnBC,mBAAmB,GAAAT,OAAA,CAAAS,mBAAA,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA","ignoreList":[]}
|
package/build/middlewares/log.js
CHANGED
|
@@ -43,17 +43,15 @@ const log = logger => {
|
|
|
43
43
|
});
|
|
44
44
|
let bytesout = 0;
|
|
45
45
|
const _write = res.write;
|
|
46
|
-
// FIXME: res.write should return boolean
|
|
47
46
|
// @ts-ignore
|
|
48
|
-
res.write = function (
|
|
49
|
-
bytesout +=
|
|
50
|
-
/* eslint prefer-rest-params: "off" */
|
|
47
|
+
res.write = function (...args) {
|
|
48
|
+
bytesout += args[0]?.length || 0;
|
|
51
49
|
// @ts-ignore
|
|
52
|
-
_write.apply(res,
|
|
50
|
+
return _write.apply(res, args);
|
|
53
51
|
};
|
|
54
52
|
const log = function () {
|
|
55
53
|
const forwardedFor = req.get(_core.HEADERS.FORWARDED_FOR);
|
|
56
|
-
const remoteAddress = req.
|
|
54
|
+
const remoteAddress = req.socket.remoteAddress;
|
|
57
55
|
const remoteIP = forwardedFor ? `${forwardedFor} via ${remoteAddress}` : remoteAddress;
|
|
58
56
|
let message;
|
|
59
57
|
if (res.locals._verdaccio_error) {
|
|
@@ -83,12 +81,12 @@ const log = logger => {
|
|
|
83
81
|
});
|
|
84
82
|
const _end = res.end;
|
|
85
83
|
// @ts-ignore
|
|
86
|
-
res.end = function (
|
|
87
|
-
if (
|
|
88
|
-
bytesout +=
|
|
84
|
+
res.end = function (...args) {
|
|
85
|
+
if (args[0]) {
|
|
86
|
+
bytesout += args[0].length;
|
|
89
87
|
}
|
|
90
88
|
// @ts-ignore
|
|
91
|
-
_end.apply(res,
|
|
89
|
+
_end.apply(res, args);
|
|
92
90
|
log();
|
|
93
91
|
};
|
|
94
92
|
next();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","names":["_lodash","_interopRequireDefault","require","_core","e","__esModule","default","LOG_STATUS_MESSAGE","exports","LOG_VERDACCIO_ERROR","LOG_VERDACCIO_BYTES","log","logger","req","res","next","child","sub","_auth","headers","authorization","_","isNil","_cookie","get","cookie","url","originalUrl","info","ip","bytesin","on","chunk","length","bytesout","_write","write","
|
|
1
|
+
{"version":3,"file":"log.js","names":["_lodash","_interopRequireDefault","require","_core","e","__esModule","default","LOG_STATUS_MESSAGE","exports","LOG_VERDACCIO_ERROR","LOG_VERDACCIO_BYTES","log","logger","req","res","next","child","sub","_auth","headers","authorization","_","isNil","_cookie","get","cookie","url","originalUrl","info","ip","bytesin","on","chunk","length","bytesout","_write","write","args","apply","forwardedFor","HEADERS","FORWARDED_FOR","remoteAddress","socket","remoteIP","message","locals","_verdaccio_error","http","request","method","user","remote_user","name","status","statusCode","error","bytes","in","out","_end","end"],"sources":["../../src/middlewares/log.ts"],"sourcesContent":["import _ from 'lodash';\n\nimport { HEADERS } from '@verdaccio/core';\n\nimport type { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';\n\n// FIXME: deprecated, moved to @verdaccio/dev-commons\nexport const LOG_STATUS_MESSAGE =\n \"@{status}, user: @{user}(@{remoteIP}), req: '@{request.method} @{request.url}'\";\nexport const LOG_VERDACCIO_ERROR = `${LOG_STATUS_MESSAGE}, error: @{!error}`;\nexport const LOG_VERDACCIO_BYTES = `${LOG_STATUS_MESSAGE}, bytes: @{bytes.in}/@{bytes.out}`;\n\nexport const log = (logger) => {\n return function log(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {\n // logger\n req.log = logger.child({ sub: 'in' });\n\n const _auth = req.headers.authorization;\n if (_.isNil(_auth) === false) {\n req.headers.authorization = '<Classified>';\n }\n\n const _cookie = req.get('cookie');\n if (_.isNil(_cookie) === false) {\n req.headers.cookie = '<Classified>';\n }\n\n req.url = req.originalUrl;\n req.log.info({ req: req, ip: req.ip }, \"@{ip} requested '@{req.method} @{req.url}'\");\n req.originalUrl = req.url;\n\n if (_.isNil(_auth) === false) {\n req.headers.authorization = _auth;\n }\n\n if (_.isNil(_cookie) === false) {\n req.headers.cookie = _cookie;\n }\n\n let bytesin = 0;\n req.on('data', function (chunk): void {\n bytesin += chunk.length;\n });\n\n let bytesout = 0;\n const _write = res.write;\n // @ts-ignore\n res.write = function (...args): boolean {\n bytesout += args[0]?.length || 0;\n // @ts-ignore\n return _write.apply(res, args);\n };\n\n const log = function (): void {\n const forwardedFor = req.get(HEADERS.FORWARDED_FOR);\n const remoteAddress = req.socket.remoteAddress;\n const remoteIP = forwardedFor ? `${forwardedFor} via ${remoteAddress}` : remoteAddress;\n let message;\n if (res.locals._verdaccio_error) {\n message = LOG_VERDACCIO_ERROR;\n } else {\n message = LOG_VERDACCIO_BYTES;\n }\n\n req.url = req.originalUrl;\n req.log.http(\n {\n request: {\n method: req.method,\n url: req.url,\n },\n user: req.remote_user?.name || null,\n remoteIP,\n status: res.statusCode,\n error: res.locals._verdaccio_error,\n bytes: {\n in: bytesin,\n out: bytesout,\n },\n },\n message\n );\n req.originalUrl = req.url;\n };\n\n req.on('close', function (): void {\n log();\n });\n\n const _end = res.end;\n // @ts-ignore\n res.end = function (...args): void {\n if (args[0]) {\n bytesout += args[0].length;\n }\n // @ts-ignore\n _end.apply(res, args);\n log();\n };\n next();\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAA0C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAI1C;AACO,MAAMG,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAC7B,gFAAgF;AAC3E,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,GAAGF,kBAAkB,oBAAoB;AACrE,MAAMG,mBAAmB,GAAAF,OAAA,CAAAE,mBAAA,GAAG,GAAGH,kBAAkB,mCAAmC;AAEpF,MAAMI,GAAG,GAAIC,MAAM,IAAK;EAC7B,OAAO,SAASD,GAAGA,CAACE,GAAmB,EAAEC,GAAoB,EAAEC,IAAsB,EAAQ;IAC3F;IACAF,GAAG,CAACF,GAAG,GAAGC,MAAM,CAACI,KAAK,CAAC;MAAEC,GAAG,EAAE;IAAK,CAAC,CAAC;IAErC,MAAMC,KAAK,GAAGL,GAAG,CAACM,OAAO,CAACC,aAAa;IACvC,IAAIC,eAAC,CAACC,KAAK,CAACJ,KAAK,CAAC,KAAK,KAAK,EAAE;MAC5BL,GAAG,C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;MACA2B,IAAI,CAACtB,KAAK,CAACxB,GAAG,EAAEuB,IAAI,CAAC;MACrB1B,GAAG,CAAC,CAAC;IACP,CAAC;IACDI,IAAI,CAAC,CAAC;EACR,CAAC;AACH,CAAC;AAACP,OAAA,CAAAG,GAAA,GAAAA,GAAA","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@ function media(expect) {
|
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
if (typeof header !== 'string' || header.split(';')[0].trim() !== expect) {
|
|
16
|
-
next(_core.errorUtils.getCode(_core.HTTP_STATUS.UNSUPPORTED_MEDIA, 'wrong content-type, expect: ' + expect + ', got: ' + req.get
|
|
16
|
+
next(_core.errorUtils.getCode(_core.HTTP_STATUS.UNSUPPORTED_MEDIA, 'wrong content-type, expect: ' + expect + ', got: ' + req.get(_core.HEADER_TYPE.CONTENT_TYPE)));
|
|
17
17
|
} else {
|
|
18
18
|
next();
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","names":["_core","require","media","expect","req","res","next","header","headers","HEADER_TYPE","CONTENT_TYPE","errorUtils","getCode","HTTP_STATUS","UNSUPPORTED_MEDIA","split","trim","get"],"sources":["../../src/middlewares/media.ts"],"sourcesContent":["import { HEADER_TYPE, HTTP_STATUS, errorUtils } from '@verdaccio/core';\n\nimport type { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';\n\nexport function media(expect: string | null): any {\n return function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {\n const header = req.headers[HEADER_TYPE.CONTENT_TYPE];\n if (!header) {\n next(\n errorUtils.getCode(\n HTTP_STATUS.UNSUPPORTED_MEDIA,\n 'content-type is missing, expect: ' + expect\n )\n );\n return;\n }\n\n if (typeof header !== 'string' || header.split(';')[0].trim() !== expect) {\n next(\n errorUtils.getCode(\n HTTP_STATUS.UNSUPPORTED_MEDIA,\n 'wrong content-type, expect: ' + expect + ', got: ' + req.get
|
|
1
|
+
{"version":3,"file":"media.js","names":["_core","require","media","expect","req","res","next","header","headers","HEADER_TYPE","CONTENT_TYPE","errorUtils","getCode","HTTP_STATUS","UNSUPPORTED_MEDIA","split","trim","get"],"sources":["../../src/middlewares/media.ts"],"sourcesContent":["import { HEADER_TYPE, HTTP_STATUS, errorUtils } from '@verdaccio/core';\n\nimport type { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';\n\nexport function media(expect: string | null): any {\n return function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {\n const header = req.headers[HEADER_TYPE.CONTENT_TYPE];\n if (!header) {\n next(\n errorUtils.getCode(\n HTTP_STATUS.UNSUPPORTED_MEDIA,\n 'content-type is missing, expect: ' + expect\n )\n );\n return;\n }\n\n if (typeof header !== 'string' || header.split(';')[0].trim() !== expect) {\n next(\n errorUtils.getCode(\n HTTP_STATUS.UNSUPPORTED_MEDIA,\n 'wrong content-type, expect: ' + expect + ', got: ' + req.get(HEADER_TYPE.CONTENT_TYPE)\n )\n );\n } else {\n next();\n }\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIO,SAASC,KAAKA,CAACC,MAAqB,EAAO;EAChD,OAAO,UAAUC,GAAmB,EAAEC,GAAoB,EAAEC,IAAsB,EAAQ;IACxF,MAAMC,MAAM,GAAGH,GAAG,CAACI,OAAO,CAACC,iBAAW,CAACC,YAAY,CAAC;IACpD,IAAI,CAACH,MAAM,EAAE;MACXD,IAAI,CACFK,gBAAU,CAACC,OAAO,CAChBC,iBAAW,CAACC,iBAAiB,EAC7B,mCAAmC,GAAGX,MACxC,CACF,CAAC;MACD;IACF;IAEA,IAAI,OAAOI,MAAM,KAAK,QAAQ,IAAIA,MAAM,CAACQ,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC,KAAKb,MAAM,EAAE;MACxEG,IAAI,CACFK,gBAAU,CAACC,OAAO,CAChBC,iBAAW,CAACC,iBAAiB,EAC7B,8BAA8B,GAAGX,MAAM,GAAG,SAAS,GAAGC,GAAG,CAACa,GAAG,CAACR,iBAAW,CAACC,YAAY,CACxF,CACF,CAAC;IACH,CAAC,MAAM;MACLJ,IAAI,CAAC,CAAC;IACR;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -41,8 +41,8 @@ function renderWebMiddleware(config, tokenMiddleware, pluginOptions) {
|
|
|
41
41
|
router.use(_security.setSecurityWebHeaders);
|
|
42
42
|
|
|
43
43
|
// any match within the static is routed to the file system
|
|
44
|
-
router.get(_webUrls.WebUrlsNamespace.static
|
|
45
|
-
const filename = req.params
|
|
44
|
+
router.get(_webUrls.WebUrlsNamespace.static, function (req, res, next) {
|
|
45
|
+
const filename = req.params.all;
|
|
46
46
|
let file = `${staticPath}/${filename}`;
|
|
47
47
|
if (filename === 'favicon.ico' && config?.web?.favicon) {
|
|
48
48
|
file = config?.web?.favicon;
|
|
@@ -66,7 +66,7 @@ function renderWebMiddleware(config, tokenMiddleware, pluginOptions) {
|
|
|
66
66
|
if (_nodeFs.default.existsSync(absoluteLocalFile) && typeof _nodeFs.default.accessSync(absoluteLocalFile, _nodeFs.default.constants.R_OK) === 'undefined') {
|
|
67
67
|
// Note: `path.join` will break on Windows, because it transforms `/` to `\`
|
|
68
68
|
// Use POSIX version `path.posix.join` instead.
|
|
69
|
-
logo =
|
|
69
|
+
logo = `/-/static/${_nodePath.default.basename(logo)}`;
|
|
70
70
|
router.get(logo, function (_req, res, next) {
|
|
71
71
|
// @ts-ignore
|
|
72
72
|
debug('serve custom logo web:%s - local:%s', logo, absoluteLocalFile);
|
|
@@ -94,7 +94,7 @@ function renderWebMiddleware(config, tokenMiddleware, pluginOptions) {
|
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
// Handle all web routes including security routes
|
|
97
|
-
router.get(_webUrls.WebUrlsNamespace.web
|
|
97
|
+
router.get(_webUrls.WebUrlsNamespace.web, function (req, res) {
|
|
98
98
|
(0, _renderHTML.default)(config, manifest, manifestFiles, req, res);
|
|
99
99
|
debug('render html section');
|
|
100
100
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-web.js","names":["_debug","_interopRequireDefault","require","_express","_nodeFs","_nodePath","_core","_url","_security","_renderHTML","_webUrls","e","__esModule","default","debug","buildDebug","sendFileCallback","next","err","status","HTTP_STATUS","NOT_FOUND","renderWebMiddleware","config","tokenMiddleware","pluginOptions","staticPath","manifest","manifestFiles","router","express","Router","use","setSecurityWebHeaders","get","WebUrlsNamespace","static","req","res","filename","params","file","web","favicon","isURLhasValidProtocol","url","sendFile","renderLogo","logo","absoluteLocalFile","path","posix","resolve","fs","existsSync","accessSync","constants","R_OK","
|
|
1
|
+
{"version":3,"file":"render-web.js","names":["_debug","_interopRequireDefault","require","_express","_nodeFs","_nodePath","_core","_url","_security","_renderHTML","_webUrls","e","__esModule","default","debug","buildDebug","sendFileCallback","next","err","status","HTTP_STATUS","NOT_FOUND","renderWebMiddleware","config","tokenMiddleware","pluginOptions","staticPath","manifest","manifestFiles","router","express","Router","use","setSecurityWebHeaders","get","WebUrlsNamespace","static","req","res","filename","params","all","file","web","favicon","isURLhasValidProtocol","url","sendFile","renderLogo","logo","absoluteLocalFile","path","posix","resolve","fs","existsSync","accessSync","constants","R_OK","basename","_req","undefined","logoDark","renderHTML","root"],"sources":["../../../src/middlewares/web/render-web.ts"],"sourcesContent":["import buildDebug from 'debug';\nimport express from 'express';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nimport { HTTP_STATUS } from '@verdaccio/core';\nimport { isURLhasValidProtocol } from '@verdaccio/url';\n\nimport { setSecurityWebHeaders } from './security';\nimport renderHTML from './utils/renderHTML';\nimport { WebUrlsNamespace } from './web-urls';\n\nconst debug = buildDebug('verdaccio:web:render');\n\nconst sendFileCallback = (next) => (err) => {\n if (!err) {\n return;\n }\n if (err.status === HTTP_STATUS.NOT_FOUND) {\n next();\n } else {\n next(err);\n }\n};\n\nexport function renderWebMiddleware(config, tokenMiddleware, pluginOptions) {\n const { staticPath, manifest, manifestFiles } = pluginOptions;\n debug('static path %o', staticPath);\n\n /* eslint new-cap:off */\n const router = express.Router();\n if (typeof tokenMiddleware === 'function') {\n router.use(tokenMiddleware);\n }\n\n router.use(setSecurityWebHeaders);\n\n // any match within the static is routed to the file system\n router.get(WebUrlsNamespace.static, function (req: express.Request<{ all: string }>, res, next) {\n const filename = req.params.all;\n let file = `${staticPath}/${filename}`;\n if (filename === 'favicon.ico' && config?.web?.favicon) {\n file = config?.web?.favicon;\n if (isURLhasValidProtocol(file)) {\n debug('redirect to favicon %s', file);\n req.url = file;\n return next();\n }\n }\n debug('render static file %o', file);\n res.sendFile(file, sendFileCallback(next));\n });\n\n function renderLogo(logo: string | undefined): string | undefined {\n // check the origin of the logo\n if (logo && !isURLhasValidProtocol(logo)) {\n // URI related to a local file\n const absoluteLocalFile = path.posix.resolve(logo);\n debug('serve local logo %s', absoluteLocalFile);\n try {\n // TODO: replace existsSync by async alternative\n if (\n fs.existsSync(absoluteLocalFile) &&\n typeof fs.accessSync(absoluteLocalFile, fs.constants.R_OK) === 'undefined'\n ) {\n // Note: `path.join` will break on Windows, because it transforms `/` to `\\`\n // Use POSIX version `path.posix.join` instead.\n logo = `/-/static/${path.basename(logo)}`;\n router.get(logo, function (_req, res, next) {\n // @ts-ignore\n debug('serve custom logo web:%s - local:%s', logo, absoluteLocalFile);\n res.sendFile(absoluteLocalFile, sendFileCallback(next));\n });\n debug('enabled custom logo %s', logo);\n } else {\n logo = undefined;\n debug(`web logo is wrong, path ${absoluteLocalFile} does not exist or is not readable`);\n }\n } catch {\n logo = undefined;\n debug(`web logo is wrong, path ${absoluteLocalFile} does not exist or is not readable`);\n }\n }\n return logo;\n }\n\n const logo = renderLogo(config?.web?.logo);\n if (config?.web?.logo) {\n config.web.logo = logo;\n }\n const logoDark = renderLogo(config?.web?.logoDark);\n if (config?.web?.logoDark) {\n config.web.logoDark = logoDark;\n }\n\n // Handle all web routes including security routes\n router.get(WebUrlsNamespace.web, function (req, res) {\n renderHTML(config, manifest, manifestFiles, req, res);\n debug('render html section');\n });\n\n router.get(WebUrlsNamespace.root, function (req, res) {\n renderHTML(config, manifest, manifestFiles, req, res);\n debug('render root');\n });\n\n return router;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAEA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AAA8C,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C,MAAMG,KAAK,GAAG,IAAAC,cAAU,EAAC,sBAAsB,CAAC;AAEhD,MAAMC,gBAAgB,GAAIC,IAAI,IAAMC,GAAG,IAAK;EAC1C,IAAI,CAACA,GAAG,EAAE;IACR;EACF;EACA,IAAIA,GAAG,CAACC,MAAM,KAAKC,iBAAW,CAACC,SAAS,EAAE;IACxCJ,IAAI,CAAC,CAAC;EACR,CAAC,MAAM;IACLA,IAAI,CAACC,GAAG,CAAC;EACX;AACF,CAAC;AAEM,SAASI,mBAAmBA,CAACC,MAAM,EAAEC,eAAe,EAAEC,aAAa,EAAE;EAC1E,MAAM;IAAEC,UAAU;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAGH,aAAa;EAC7DX,KAAK,CAAC,gBAAgB,EAAEY,UAAU,CAAC;;EAEnC;EACA,MAAMG,MAAM,GAAGC,gBAAO,CAACC,MAAM,CAAC,CAAC;EAC/B,IAAI,OAAOP,eAA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ACrDxB,KAAK,CAAC,qBAAqB,CAAC;EAC9B,CAAC,CAAC;EAEFe,MAAM,CAACK,GAAG,CAACC,yBAAgB,CAAC6B,IAAI,EAAE,UAAU3B,GAAG,EAAEC,GAAG,EAAE;IACpD,IAAAyB,mBAAU,EAACxC,MAAM,EAAEI,QAAQ,EAAEC,aAAa,EAAES,GAAG,EAAEC,GAAG,CAAC;IACrDxB,KAAK,CAAC,aAAa,CAAC;EACtB,CAAC,CAAC;EAEF,OAAOe,MAAM;AACf","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
export declare enum WebUrls {
|
|
5
5
|
sidebar_scopped_package = "/sidebar/:scope/:package",
|
|
6
6
|
sidebar_package = "/sidebar/:package",
|
|
7
|
-
readme_package_scoped_version = "/package/readme/:scope/:package/:version
|
|
8
|
-
readme_package_version = "/package/readme/:package/:version
|
|
7
|
+
readme_package_scoped_version = "/package/readme/:scope/:package{/:version}",
|
|
8
|
+
readme_package_version = "/package/readme/:package{/:version}",
|
|
9
9
|
packages_all = "/packages",
|
|
10
10
|
user_login = "/login",
|
|
11
11
|
user_signup = "/signup",
|
|
@@ -17,9 +17,9 @@ export declare enum WebUrls {
|
|
|
17
17
|
*/
|
|
18
18
|
export declare enum WebUrlsNamespace {
|
|
19
19
|
root = "/",
|
|
20
|
-
static = "/-/static/",
|
|
20
|
+
static = "/-/static/{*all}",
|
|
21
21
|
endpoints = "/-/verdaccio/",
|
|
22
|
-
web = "/-/web/",
|
|
22
|
+
web = "/-/web/{*all}",
|
|
23
23
|
data = "/data/",
|
|
24
24
|
sec = "/sec/"
|
|
25
25
|
}
|
|
@@ -10,8 +10,8 @@ exports.WebUrlsNamespace = exports.WebUrls = void 0;
|
|
|
10
10
|
let WebUrls = exports.WebUrls = /*#__PURE__*/function (WebUrls) {
|
|
11
11
|
WebUrls["sidebar_scopped_package"] = "/sidebar/:scope/:package";
|
|
12
12
|
WebUrls["sidebar_package"] = "/sidebar/:package";
|
|
13
|
-
WebUrls["readme_package_scoped_version"] = "/package/readme/:scope/:package/:version
|
|
14
|
-
WebUrls["readme_package_version"] = "/package/readme/:package/:version
|
|
13
|
+
WebUrls["readme_package_scoped_version"] = "/package/readme/:scope/:package{/:version}";
|
|
14
|
+
WebUrls["readme_package_version"] = "/package/readme/:package{/:version}";
|
|
15
15
|
WebUrls["packages_all"] = "/packages";
|
|
16
16
|
WebUrls["user_login"] = "/login";
|
|
17
17
|
WebUrls["user_signup"] = "/signup";
|
|
@@ -24,9 +24,9 @@ let WebUrls = exports.WebUrls = /*#__PURE__*/function (WebUrls) {
|
|
|
24
24
|
*/
|
|
25
25
|
let WebUrlsNamespace = exports.WebUrlsNamespace = /*#__PURE__*/function (WebUrlsNamespace) {
|
|
26
26
|
WebUrlsNamespace["root"] = "/";
|
|
27
|
-
WebUrlsNamespace["static"] = "/-/static/";
|
|
27
|
+
WebUrlsNamespace["static"] = "/-/static/{*all}";
|
|
28
28
|
WebUrlsNamespace["endpoints"] = "/-/verdaccio/";
|
|
29
|
-
WebUrlsNamespace["web"] = "/-/web/";
|
|
29
|
+
WebUrlsNamespace["web"] = "/-/web/{*all}";
|
|
30
30
|
WebUrlsNamespace["data"] = "/data/";
|
|
31
31
|
WebUrlsNamespace["sec"] = "/sec/";
|
|
32
32
|
return WebUrlsNamespace;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-urls.js","names":["WebUrls","exports","WebUrlsNamespace"],"sources":["../../../src/middlewares/web/web-urls.ts"],"sourcesContent":["/**\n * Enum for web urls, used on the web middleware\n */\nexport enum WebUrls {\n sidebar_scopped_package = '/sidebar/:scope/:package',\n sidebar_package = '/sidebar/:package',\n readme_package_scoped_version = '/package/readme/:scope/:package/:version
|
|
1
|
+
{"version":3,"file":"web-urls.js","names":["WebUrls","exports","WebUrlsNamespace"],"sources":["../../../src/middlewares/web/web-urls.ts"],"sourcesContent":["/**\n * Enum for web urls, used on the web middleware\n */\nexport enum WebUrls {\n sidebar_scopped_package = '/sidebar/:scope/:package',\n sidebar_package = '/sidebar/:package',\n readme_package_scoped_version = '/package/readme/:scope/:package{/:version}',\n readme_package_version = '/package/readme/:package{/:version}',\n packages_all = '/packages',\n user_login = '/login',\n user_signup = '/signup',\n search = '/search/:anything',\n reset_password = '/reset_password',\n}\n\n/**\n * Enum for web urls namespace, used on the web middleware\n */\nexport enum WebUrlsNamespace {\n root = '/',\n static = '/-/static/{*all}',\n endpoints = '/-/verdaccio/',\n web = '/-/web/{*all}',\n data = '/data/',\n sec = '/sec/',\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAFA,IAGYA,OAAO,GAAAC,OAAA,CAAAD,OAAA,0BAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAPA,OAAO;EAAA,OAAPA,OAAO;AAAA;AAYnB;AACA;AACA;AAFA,IAGYE,gBAAgB,GAAAD,OAAA,CAAAC,gBAAA,0BAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAhBA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/middleware",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0-next-9.1",
|
|
4
4
|
"description": "Verdaccio Express Middleware",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"verdaccio"
|
|
31
31
|
],
|
|
32
32
|
"engines": {
|
|
33
|
-
"node": ">=
|
|
33
|
+
"node": ">=24"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@verdaccio/config": "
|
|
37
|
-
"@verdaccio/core": "
|
|
38
|
-
"@verdaccio/url": "
|
|
36
|
+
"@verdaccio/config": "9.0.0-next-9.1",
|
|
37
|
+
"@verdaccio/core": "9.0.0-next-9.1",
|
|
38
|
+
"@verdaccio/url": "14.0.0-next-9.1",
|
|
39
39
|
"debug": "4.4.3",
|
|
40
|
-
"express": "
|
|
40
|
+
"express": "5.2.1",
|
|
41
41
|
"express-rate-limit": "5.5.1",
|
|
42
42
|
"lodash": "4.17.23",
|
|
43
43
|
"lru-cache": "7.18.3"
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"url": "https://opencollective.com/verdaccio"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@verdaccio/logger": "
|
|
51
|
-
"@verdaccio/types": "
|
|
50
|
+
"@verdaccio/logger": "9.0.0-next-9.1",
|
|
51
|
+
"@verdaccio/types": "14.0.0-next-9.0",
|
|
52
52
|
"http-errors": "2.0.1",
|
|
53
53
|
"supertest": "7.1.4",
|
|
54
54
|
"jsdom": "26.1.0",
|