@verdaccio/middleware 8.0.0-next-8.12 → 8.0.0-next-8.14
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 +30 -24
- package/build/middlewares/allow.js +1 -1
- package/build/middlewares/allow.js.map +1 -1
- package/build/middlewares/json.js +1 -2
- package/build/middlewares/json.js.map +1 -1
- package/build/middlewares/web/utils/renderHTML.js +7 -1
- package/build/middlewares/web/utils/renderHTML.js.map +1 -1
- package/build/middlewares/web/utils/template.d.ts +1 -1
- package/build/middlewares/web/utils/template.js +3 -3
- package/build/middlewares/web/utils/template.js.map +1 -1
- package/package.json +12 -8
- package/.babelrc +0 -14
- package/CHANGELOG.md +0 -1324
- package/src/index.ts +0 -23
- package/src/middlewares/allow.ts +0 -66
- package/src/middlewares/antiLoop.ts +0 -41
- package/src/middlewares/api_urls.ts +0 -45
- package/src/middlewares/encode-pkg.ts +0 -39
- package/src/middlewares/error.ts +0 -79
- package/src/middlewares/final.ts +0 -71
- package/src/middlewares/json.ts +0 -15
- package/src/middlewares/log.ts +0 -105
- package/src/middlewares/make-url-relative.ts +0 -46
- package/src/middlewares/match.ts +0 -16
- package/src/middlewares/media.ts +0 -29
- package/src/middlewares/rate-limit.ts +0 -8
- package/src/middlewares/security-headers.ts +0 -21
- package/src/middlewares/user-agent.ts +0 -11
- package/src/middlewares/validation.ts +0 -31
- package/src/middlewares/web/index.ts +0 -4
- package/src/middlewares/web/render-web.ts +0 -107
- package/src/middlewares/web/security.ts +0 -13
- package/src/middlewares/web/utils/manifest.ts +0 -31
- package/src/middlewares/web/utils/renderHTML.ts +0 -157
- package/src/middlewares/web/utils/template.ts +0 -50
- package/src/middlewares/web/utils/web-utils.ts +0 -18
- package/src/middlewares/web/web-api.ts +0 -30
- package/src/middlewares/web/web-middleware.ts +0 -16
- package/src/middlewares/web/web-urls.ts +0 -25
- package/src/types.ts +0 -11
- package/test/__snapshots__/template.test.ts.snap +0 -131
- package/test/_helper.ts +0 -8
- package/test/allow.spec.ts +0 -110
- package/test/antiLoop.spec.ts +0 -90
- package/test/config/dark-logo.png +0 -0
- package/test/config/default-test.yaml +0 -28
- package/test/config/favicon.ico +0 -0
- package/test/config/file-logo.yaml +0 -26
- package/test/config/http-logo.yaml +0 -26
- package/test/config/login-disabled.yaml +0 -30
- package/test/config/no-logo.yaml +0 -25
- package/test/config/web.yaml +0 -24
- package/test/config/wrong-logo.yaml +0 -24
- package/test/encode.spec.ts +0 -131
- package/test/final.spec.ts +0 -62
- package/test/helper.ts +0 -14
- package/test/json.spec.ts +0 -33
- package/test/log.spec.ts +0 -29
- package/test/make-url-relative.spec.ts +0 -42
- package/test/manifest.test.ts +0 -25
- package/test/media.spec.ts +0 -56
- package/test/params.spec.ts +0 -38
- package/test/partials/htmlParser.ts +0 -1
- package/test/partials/manifest/manifest.json +0 -64
- package/test/render.spec.ts +0 -156
- package/test/security.spec.ts +0 -55
- package/test/static/main.js +0 -3
- package/test/static/runtime.js +0 -3
- package/test/static/vendors.js +0 -3
- package/test/template.test.ts +0 -71
- package/test/utils.spec.ts +0 -15
- package/test/validation.spec.ts +0 -93
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -26
- package/types/custom.d.ts +0 -20
package/README.md
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
# @verdaccio/middleware
|
|
1
|
+
# @verdaccio/middleware - Verdaccio Express Middleware
|
|
2
2
|
|
|
3
|
-
[](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)
|
|
3
|
+
[](https://verdaccio.org)
|
|
4
|
+
[](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
|
5
|
+
[](https://github.com/verdaccio/verdaccio)
|
|
6
|
+
[](https://npmjs.com/package/@verdaccio/middleware)
|
|
8
7
|
|
|
9
|
-
[](https://verdaccio.org/docs)
|
|
9
|
+
[](https://discord.com/channels/388674437219745793)
|
|
10
|
+
[](https://bsky.app/profile/verdaccio.org)
|
|
11
|
+
[](https://opencollective.com/verdaccio/contribute)
|
|
12
|
+
[](https://opencollective.com/verdaccio/contribute)
|
|
13
|
+
|
|
14
|
+
[](https://www.npmjs.com/package/verdaccio)
|
|
15
|
+
[](https://hub.docker.com/r/verdaccio/verdaccio)
|
|
16
|
+
[](https://github.com/verdaccio/verdaccio/stargazers)
|
|
10
17
|
|
|
11
18
|
## Donations
|
|
12
19
|
|
|
@@ -20,7 +27,7 @@ If you want to report a security vulnerability, please follow the steps which we
|
|
|
20
27
|
|
|
21
28
|
## Open Collective Sponsors
|
|
22
29
|
|
|
23
|
-
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/verdaccio
|
|
30
|
+
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/verdaccio/contribute)]
|
|
24
31
|
|
|
25
32
|
[](https://opencollective.com/verdaccio/sponsor/0/website)
|
|
26
33
|
[](https://opencollective.com/verdaccio/sponsor/1/website)
|
|
@@ -35,40 +42,39 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
|
|
|
35
42
|
|
|
36
43
|
## Open Collective Backers
|
|
37
44
|
|
|
38
|
-
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/verdaccio
|
|
45
|
+
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/verdaccio/contribute)]
|
|
39
46
|
|
|
40
|
-
[](https://opencollective.com/verdaccio
|
|
47
|
+
[](https://opencollective.com/verdaccio/contributes)
|
|
41
48
|
|
|
42
49
|
## Special Thanks
|
|
43
50
|
|
|
44
51
|
Thanks to the following companies to help us to achieve our goals providing free open source licenses.
|
|
45
52
|
|
|
46
|
-
[](https://crowdin.com/)
|
|
48
|
-
[](https://balsamiq.com/)
|
|
53
|
+
[](https://www.jetbrains.com/)
|
|
54
|
+
[](https://crowdin.com/)
|
|
49
55
|
|
|
50
56
|
## Contributors
|
|
51
57
|
|
|
52
|
-
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
|
58
|
+
This project exists thanks to all the people who contribute. [[Contribute](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md)].
|
|
53
59
|
|
|
54
|
-
[](
|
|
60
|
+
[](https://github.com/verdaccio/verdaccio/graphs/contributors)
|
|
55
61
|
|
|
56
|
-
|
|
62
|
+
## FAQ / Contact / Troubleshoot
|
|
57
63
|
|
|
58
|
-
If you have any issue you can try the following options
|
|
64
|
+
If you have any issue you can try the following options. Do not hesitate to ask or check our issues database. Perhaps someone has asked already what you are looking for.
|
|
59
65
|
|
|
60
66
|
- [Blog](https://verdaccio.org/blog/)
|
|
61
67
|
- [Donations](https://opencollective.com/verdaccio)
|
|
62
68
|
- [Reporting an issue](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#reporting-a-bug)
|
|
63
|
-
- [Running discussions](https://github.com/
|
|
64
|
-
- [Chat](
|
|
65
|
-
- [Logos](https://verdaccio.org/docs/
|
|
66
|
-
- [Docker Examples](https://github.com/verdaccio/docker-examples)
|
|
69
|
+
- [Running discussions](https://github.com/orgs/verdaccio/discussions)
|
|
70
|
+
- [Chat](https://discord.com/channels/388674437219745793)
|
|
71
|
+
- [Logos](https://verdaccio.org/docs/logo)
|
|
72
|
+
- [Docker Examples](https://github.com/verdaccio/verdaccio/tree/master/docker-examples)
|
|
67
73
|
- [FAQ](https://github.com/verdaccio/verdaccio/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3Aquestion%20)
|
|
68
74
|
|
|
69
|
-
|
|
75
|
+
## License
|
|
70
76
|
|
|
71
77
|
Verdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)
|
|
72
78
|
|
|
73
|
-
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch
|
|
74
|
-
[Creative Commons licensed](https://
|
|
79
|
+
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch files within the /assets folder) are
|
|
80
|
+
[Creative Commons licensed](https://creativecommons.org/licenses/by/4.0/).
|
|
@@ -21,7 +21,7 @@ function allow(auth, options = {
|
|
|
21
21
|
return function (action) {
|
|
22
22
|
return function (req, res, next) {
|
|
23
23
|
req.pause();
|
|
24
|
-
const packageName = req.params.scope ?
|
|
24
|
+
const packageName = req.params.scope ? `${req.params.scope}/${req.params.package}` : req.params.package;
|
|
25
25
|
const packageVersion = req.params.filename ? _core.tarballUtils.getVersionFromTarball(req.params.filename) : req.params.version ? req.params.version : undefined;
|
|
26
26
|
const remote_user = req.remote_user;
|
|
27
27
|
debug('check if user %o can %o package %o version %o', remote_user?.name, action, packageName, packageVersion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allow.js","names":["_debug","_interopRequireDefault","require","_core","e","__esModule","default","debug","buildDebug","allow","auth","options","beforeAll","_a","_b","afterAll","action","req","res","next","pause","packageName","params","scope","package","packageVersion","filename","tarballUtils","getVersionFromTarball","version","undefined","remote_user","name","user","error","allowed","resume","errorUtils","getInternalError","API_ERROR","PLUGIN_ERROR"],"sources":["../../src/middlewares/allow.ts"],"sourcesContent":["import buildDebug from 'debug';\n\nimport { API_ERROR, errorUtils, tarballUtils } from '@verdaccio/core';\n\nimport { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';\n\nconst debug = buildDebug('verdaccio:middleware:allow');\n\nexport function allow<T>(\n auth: T,\n options = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n beforeAll: (_a: any, _b: any) => {},\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n afterAll: (_a: any, _b: any) => {},\n }\n): Function {\n const { beforeAll, afterAll } = options;\n return function (action: string): Function {\n return function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {\n req.pause();\n const packageName = req.params.scope\n ?
|
|
1
|
+
{"version":3,"file":"allow.js","names":["_debug","_interopRequireDefault","require","_core","e","__esModule","default","debug","buildDebug","allow","auth","options","beforeAll","_a","_b","afterAll","action","req","res","next","pause","packageName","params","scope","package","packageVersion","filename","tarballUtils","getVersionFromTarball","version","undefined","remote_user","name","user","error","allowed","resume","errorUtils","getInternalError","API_ERROR","PLUGIN_ERROR"],"sources":["../../src/middlewares/allow.ts"],"sourcesContent":["import buildDebug from 'debug';\n\nimport { API_ERROR, errorUtils, tarballUtils } from '@verdaccio/core';\n\nimport { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';\n\nconst debug = buildDebug('verdaccio:middleware:allow');\n\nexport function allow<T>(\n auth: T,\n options = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n beforeAll: (_a: any, _b: any) => {},\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n afterAll: (_a: any, _b: any) => {},\n }\n): Function {\n const { beforeAll, afterAll } = options;\n return function (action: string): Function {\n return function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {\n req.pause();\n const packageName = req.params.scope\n ? `${req.params.scope}/${req.params.package}`\n : req.params.package;\n const packageVersion = req.params.filename\n ? tarballUtils.getVersionFromTarball(req.params.filename)\n : req.params.version\n ? req.params.version\n : undefined;\n const remote_user = req.remote_user;\n debug(\n 'check if user %o can %o package %o version %o',\n remote_user?.name,\n action,\n packageName,\n packageVersion\n );\n beforeAll?.(\n { action, user: remote_user?.name },\n `[middleware/allow][@{action}] allow for @{user}`\n );\n auth['allow_' + action](\n { packageName, packageVersion },\n remote_user,\n function (error, allowed): void {\n req.resume();\n if (error) {\n debug('user is NOT allowed to %o', action);\n next(error);\n } else if (allowed) {\n debug('user is allowed to %o', action);\n afterAll?.(\n { action, user: remote_user?.name },\n `[middleware/allow][@{action}] allowed for @{user}`\n );\n next();\n } else {\n // last plugin (that's our built-in one) returns either\n // cb(err) or cb(null, true), so this should never happen\n throw errorUtils.getInternalError(API_ERROR.PLUGIN_ERROR);\n }\n }\n );\n };\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAD,OAAA;AAAsE,S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CACrB;QAAEK,WAAW;QAAEI;MAAe,CAAC,EAC/BM,WAAW,EACX,UAAUG,KAAK,EAAEC,OAAO,EAAQ;QAC9BlB,GAAG,CAACmB,MAAM,CAAC,CAAC;QACZ,IAAIF,KAAK,EAAE;UACT3B,KAAK,CAAC,2BAA2B,EAAES,MAAM,CAAC;UAC1CG,IAAI,CAACe,KAAK,CAAC;QACb,CAAC,MAAM,IAAIC,OAAO,EAAE;UAClB5B,KAAK,CAAC,uBAAuB,EAAES,MAAM,CAAC;UACtCD,QAAQ,GACN;YAAEC,MAAM;YAAEiB,IAAI,EAAEF,WAAW,EAAEC;UAAK,CAAC,EACnC,mDACF,CAAC;UACDb,IAAI,CAAC,CAAC;QACR,CAAC,MAAM;UACL;UACA;UACA,MAAMkB,gBAAU,CAACC,gBAAgB,CAACC,eAAS,CAACC,YAAY,CAAC;QAC3D;MACF,CACF,CAAC;IACH,CAAC;EACH,CAAC;AACH","ignoreList":[]}
|
|
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.expectJson = expectJson;
|
|
7
7
|
var _core = require("@verdaccio/core");
|
|
8
|
-
var _utils = require("@verdaccio/utils");
|
|
9
8
|
function expectJson(req, res, next) {
|
|
10
|
-
if (!
|
|
9
|
+
if (!_core.validationUtils.isObject(req.body)) {
|
|
11
10
|
return next(_core.errorUtils.getBadRequest("can't parse incoming json"));
|
|
12
11
|
}
|
|
13
12
|
next();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","names":["_core","require","
|
|
1
|
+
{"version":3,"file":"json.js","names":["_core","require","expectJson","req","res","next","validationUtils","isObject","body","errorUtils","getBadRequest"],"sources":["../../src/middlewares/json.ts"],"sourcesContent":["import { errorUtils, validationUtils } from '@verdaccio/core';\n\nimport { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';\n\nexport function expectJson(\n req: $RequestExtend,\n res: $ResponseExtend,\n next: $NextFunctionVer\n): void {\n if (!validationUtils.isObject(req.body)) {\n return next(errorUtils.getBadRequest(\"can't parse incoming json\"));\n }\n next();\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIO,SAASC,UAAUA,CACxBC,GAAmB,EACnBC,GAAoB,EACpBC,IAAsB,EAChB;EACN,IAAI,CAACC,qBAAe,CAACC,QAAQ,CAACJ,GAAG,CAACK,IAAI,CAAC,EAAE;IACvC,OAAOH,IAAI,CAACI,gBAAU,CAACC,aAAa,CAAC,2BAA2B,CAAC,CAAC;EACpE;EACAL,IAAI,CAAC,CAAC;AACR","ignoreList":[]}
|
|
@@ -68,6 +68,7 @@ function renderHTML(config, manifest, manifestFiles, requestOptions, res) {
|
|
|
68
68
|
scriptsBodyAfter,
|
|
69
69
|
metaScripts,
|
|
70
70
|
scriptsbodyBefore,
|
|
71
|
+
// deprecated
|
|
71
72
|
showInfo,
|
|
72
73
|
showSettings,
|
|
73
74
|
showThemeSwitch,
|
|
@@ -81,6 +82,11 @@ function renderHTML(config, manifest, manifestFiles, requestOptions, res) {
|
|
|
81
82
|
bodyBefore: [],
|
|
82
83
|
metaScripts: []
|
|
83
84
|
}, config?.web);
|
|
85
|
+
// Fallback
|
|
86
|
+
let scriptsBodyBefore = config?.web?.scriptsBodyBefore;
|
|
87
|
+
if (scriptsbodyBefore && !scriptsBodyBefore) {
|
|
88
|
+
scriptsBodyBefore = scriptsbodyBefore;
|
|
89
|
+
}
|
|
84
90
|
const options = {
|
|
85
91
|
showInfo,
|
|
86
92
|
showSettings,
|
|
@@ -116,7 +122,7 @@ function renderHTML(config, manifest, manifestFiles, requestOptions, res) {
|
|
|
116
122
|
options,
|
|
117
123
|
scriptsBodyAfter,
|
|
118
124
|
metaScripts,
|
|
119
|
-
|
|
125
|
+
scriptsBodyBefore
|
|
120
126
|
}, manifest);
|
|
121
127
|
if (needHtmlCache) {
|
|
122
128
|
cache.set('template', webPage);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderHTML.js","names":["_debug","_interopRequireDefault","require","_lruCache","_path","_url","_config","_core","_url2","_template","_webUtils","e","__esModule","default","DEFAULT_LANGUAGE","cache","LRU","max","ttl","debug","buildDebug","defaultManifestFiles","js","ico","css","resolveLogo","logo","url_prefix","requestOptions","isLocalFile","isURLhasValidProtocol","getPublicUrl","path","basename","renderHTML","config","manifest","manifestFiles","res","base","URL","pathname","language","i18n","web","hideDeprecatedVersions","needHtmlCache","undefined","includes","html_cache","darkMode","title","WEB_TITLE","login","hasLogin","scope","favicon","logoDark","pkgManagers","version","locals","app_version","flags","experiments","primaryColor","validatePrimaryColor","primary_color","scriptsBodyAfter","metaScripts","scriptsbodyBefore","showInfo","showSettings","showThemeSwitch","showFooter","showSearch","showDownloadTarball","showRaw","showUplinks","Object","assign","bodyBefore","options","webPage","get","renderTemplate","set","error","Error","stack","setHeader","HEADERS","TEXT_HTML","send"],"sources":["../../../../src/middlewares/web/utils/renderHTML.ts"],"sourcesContent":["import buildDebug from 'debug';\nimport type { Response } from 'express';\nimport LRU from 'lru-cache';\nimport path from 'path';\nimport { URL } from 'url';\n\nimport { WEB_TITLE } from '@verdaccio/config';\nimport { HEADERS } from '@verdaccio/core';\nimport { ConfigYaml, TemplateUIOptions } from '@verdaccio/types';\nimport type { RequestOptions } from '@verdaccio/url';\nimport { getPublicUrl, isURLhasValidProtocol } from '@verdaccio/url';\n\nimport type { Manifest } from './manifest';\nimport renderTemplate from './template';\nimport type { WebpackManifest } from './template';\nimport { hasLogin, validatePrimaryColor } from './web-utils';\n\nconst DEFAULT_LANGUAGE = 'es-US';\nconst cache = new LRU({ max: 500, ttl: 1000 * 60 * 60 });\n\nconst debug = buildDebug('verdaccio:web:render');\n\nconst defaultManifestFiles: Manifest = {\n js: ['runtime.js', 'vendors.js', 'main.js'],\n ico: 'favicon.ico',\n css: [],\n};\n\nexport function resolveLogo(\n logo: string | undefined,\n url_prefix: string | undefined,\n requestOptions: RequestOptions\n) {\n if (typeof logo !== 'string') {\n return '';\n }\n const isLocalFile = logo && !isURLhasValidProtocol(logo);\n\n if (isLocalFile) {\n return `${getPublicUrl(url_prefix, requestOptions)}-/static/${path.basename(logo)}`;\n } else if (isURLhasValidProtocol(logo)) {\n return logo;\n } else {\n return '';\n }\n}\n\nexport default function renderHTML(\n config: ConfigYaml,\n manifest: WebpackManifest,\n manifestFiles: Manifest | null | undefined,\n requestOptions: RequestOptions,\n res: Response\n) {\n const { url_prefix } = config;\n const base = getPublicUrl(config?.url_prefix, requestOptions);\n const basename = new URL(base).pathname;\n const language = config?.i18n?.web ?? DEFAULT_LANGUAGE;\n const hideDeprecatedVersions = config?.web?.hideDeprecatedVersions ?? false;\n // @ts-ignore\n const needHtmlCache = [undefined, null].includes(config?.web?.html_cache)\n ? true\n : config?.web?.html_cache;\n const darkMode = config?.web?.darkMode ?? false;\n const title = config?.web?.title ?? WEB_TITLE;\n const login = hasLogin(config);\n const scope = config?.web?.scope ?? '';\n const favicon = resolveLogo(config?.web?.favicon, config?.url_prefix, requestOptions);\n const logo = resolveLogo(config?.web?.logo, config?.url_prefix, requestOptions);\n const logoDark = resolveLogo(config?.web?.logoDark, config?.url_prefix, requestOptions);\n const pkgManagers = config?.web?.pkgManagers ?? ['yarn', 'pnpm', 'npm'];\n const version = res.locals.app_version ?? '';\n const flags = {\n ...config.flags,\n // legacy from 5.x\n ...config.experiments,\n };\n const primaryColor =\n validatePrimaryColor(config?.web?.primary_color ?? config?.web?.primaryColor) ?? '#4b5e40';\n const {\n scriptsBodyAfter,\n metaScripts,\n scriptsbodyBefore
|
|
1
|
+
{"version":3,"file":"renderHTML.js","names":["_debug","_interopRequireDefault","require","_lruCache","_path","_url","_config","_core","_url2","_template","_webUtils","e","__esModule","default","DEFAULT_LANGUAGE","cache","LRU","max","ttl","debug","buildDebug","defaultManifestFiles","js","ico","css","resolveLogo","logo","url_prefix","requestOptions","isLocalFile","isURLhasValidProtocol","getPublicUrl","path","basename","renderHTML","config","manifest","manifestFiles","res","base","URL","pathname","language","i18n","web","hideDeprecatedVersions","needHtmlCache","undefined","includes","html_cache","darkMode","title","WEB_TITLE","login","hasLogin","scope","favicon","logoDark","pkgManagers","version","locals","app_version","flags","experiments","primaryColor","validatePrimaryColor","primary_color","scriptsBodyAfter","metaScripts","scriptsbodyBefore","showInfo","showSettings","showThemeSwitch","showFooter","showSearch","showDownloadTarball","showRaw","showUplinks","Object","assign","bodyBefore","scriptsBodyBefore","options","webPage","get","renderTemplate","set","error","Error","stack","setHeader","HEADERS","TEXT_HTML","send"],"sources":["../../../../src/middlewares/web/utils/renderHTML.ts"],"sourcesContent":["import buildDebug from 'debug';\nimport type { Response } from 'express';\nimport LRU from 'lru-cache';\nimport path from 'path';\nimport { URL } from 'url';\n\nimport { WEB_TITLE } from '@verdaccio/config';\nimport { HEADERS } from '@verdaccio/core';\nimport { ConfigYaml, TemplateUIOptions } from '@verdaccio/types';\nimport type { RequestOptions } from '@verdaccio/url';\nimport { getPublicUrl, isURLhasValidProtocol } from '@verdaccio/url';\n\nimport type { Manifest } from './manifest';\nimport renderTemplate from './template';\nimport type { WebpackManifest } from './template';\nimport { hasLogin, validatePrimaryColor } from './web-utils';\n\nconst DEFAULT_LANGUAGE = 'es-US';\nconst cache = new LRU({ max: 500, ttl: 1000 * 60 * 60 });\n\nconst debug = buildDebug('verdaccio:web:render');\n\nconst defaultManifestFiles: Manifest = {\n js: ['runtime.js', 'vendors.js', 'main.js'],\n ico: 'favicon.ico',\n css: [],\n};\n\nexport function resolveLogo(\n logo: string | undefined,\n url_prefix: string | undefined,\n requestOptions: RequestOptions\n) {\n if (typeof logo !== 'string') {\n return '';\n }\n const isLocalFile = logo && !isURLhasValidProtocol(logo);\n\n if (isLocalFile) {\n return `${getPublicUrl(url_prefix, requestOptions)}-/static/${path.basename(logo)}`;\n } else if (isURLhasValidProtocol(logo)) {\n return logo;\n } else {\n return '';\n }\n}\n\nexport default function renderHTML(\n config: ConfigYaml,\n manifest: WebpackManifest,\n manifestFiles: Manifest | null | undefined,\n requestOptions: RequestOptions,\n res: Response\n) {\n const { url_prefix } = config;\n const base = getPublicUrl(config?.url_prefix, requestOptions);\n const basename = new URL(base).pathname;\n const language = config?.i18n?.web ?? DEFAULT_LANGUAGE;\n const hideDeprecatedVersions = config?.web?.hideDeprecatedVersions ?? false;\n // @ts-ignore\n const needHtmlCache = [undefined, null].includes(config?.web?.html_cache)\n ? true\n : config?.web?.html_cache;\n const darkMode = config?.web?.darkMode ?? false;\n const title = config?.web?.title ?? WEB_TITLE;\n const login = hasLogin(config);\n const scope = config?.web?.scope ?? '';\n const favicon = resolveLogo(config?.web?.favicon, config?.url_prefix, requestOptions);\n const logo = resolveLogo(config?.web?.logo, config?.url_prefix, requestOptions);\n const logoDark = resolveLogo(config?.web?.logoDark, config?.url_prefix, requestOptions);\n const pkgManagers = config?.web?.pkgManagers ?? ['yarn', 'pnpm', 'npm'];\n const version = res.locals.app_version ?? '';\n const flags = {\n ...config.flags,\n // legacy from 5.x\n ...config.experiments,\n };\n const primaryColor =\n validatePrimaryColor(config?.web?.primary_color ?? config?.web?.primaryColor) ?? '#4b5e40';\n const {\n scriptsBodyAfter,\n metaScripts,\n scriptsbodyBefore, // deprecated\n showInfo,\n showSettings,\n showThemeSwitch,\n showFooter,\n showSearch,\n showDownloadTarball,\n showRaw,\n showUplinks,\n } = Object.assign(\n {},\n {\n scriptsBodyAfter: [],\n bodyBefore: [],\n metaScripts: [],\n },\n config?.web\n );\n // Fallback\n let scriptsBodyBefore = config?.web?.scriptsBodyBefore;\n if (scriptsbodyBefore && !scriptsBodyBefore) {\n scriptsBodyBefore = scriptsbodyBefore;\n }\n const options: TemplateUIOptions = {\n showInfo,\n showSettings,\n showThemeSwitch,\n showFooter,\n showSearch,\n showDownloadTarball,\n showRaw,\n showUplinks,\n darkMode,\n url_prefix,\n basename,\n base,\n primaryColor,\n version,\n logo,\n logoDark,\n favicon,\n flags,\n login,\n pkgManagers,\n title,\n scope,\n language,\n hideDeprecatedVersions,\n };\n\n let webPage;\n\n try {\n webPage = cache.get('template');\n if (!webPage) {\n webPage = renderTemplate(\n {\n manifest: manifestFiles ?? defaultManifestFiles,\n options,\n scriptsBodyAfter,\n metaScripts,\n scriptsBodyBefore,\n },\n manifest\n );\n\n if (needHtmlCache) {\n cache.set('template', webPage);\n debug('set template cache');\n }\n } else {\n debug('reuse template cache');\n }\n } catch (error: any) {\n throw new Error(`theme could not be load, stack ${error.stack}`);\n }\n res.setHeader('Content-Type', HEADERS.TEXT_HTML);\n res.send(webPage);\n debug('web rendered');\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,IAAA,GAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AAGA,IAAAM,KAAA,GAAAN,OAAA;AAGA,IAAAO,SAAA,GAAAR,sBAAA,CAAAC,OAAA;AAEA,IAAAQ,SAAA,GAAAR,OAAA;AAA6D,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7D,MAAMG,gBAAgB,GAAG,OAAO;AAChC,MAAMC,KAAK,GAAG,IAAIC,iBAAG,CAAC;EAAEC,GAAG,EAAE,GAAG;EAAEC,GAAG,EAAE,IAAI,GAAG,EAAE,GAAG;AAAG,CAAC,CAAC;AAExD,MAAMC,KAAK,GAAG,IAAAC,cAAU,EAAC,sBAAsB,CAAC;AAEhD,MAAMC,oBAA8B,GAAG;EACrCC,EAAE,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,SAAS,CAAC;EAC3CC,GAAG,EAAE,aAAa;EAClBC,GAAG,EAAE;AACP,CAAC;AAEM,SAASC,WAAWA,CACzBC,IAAwB,E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
|
|
@@ -21,15 +21,15 @@ function renderTemplate(template, manifest) {
|
|
|
21
21
|
<meta charset="utf-8">
|
|
22
22
|
<base href="${template?.options.base}">
|
|
23
23
|
<title>${template?.options?.title ?? ''}</title>
|
|
24
|
-
<link rel="icon" href="${template?.options.base}-/static/favicon.ico"
|
|
25
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"
|
|
24
|
+
<link rel="icon" href="${template?.options.base}-/static/favicon.ico">
|
|
25
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
26
26
|
<script>
|
|
27
27
|
window.__VERDACCIO_BASENAME_UI_OPTIONS=${JSON.stringify(template.options)}
|
|
28
28
|
</script>
|
|
29
29
|
${template?.metaScripts ? template.metaScripts.join('') : ''}
|
|
30
30
|
</head>
|
|
31
31
|
<body class="body">
|
|
32
|
-
${template?.
|
|
32
|
+
${template?.scriptsBodyBefore ? template.scriptsBodyBefore.join('') : ''}
|
|
33
33
|
<div id="root"></div>
|
|
34
34
|
${(0, _manifest.getManifestValue)(template.manifest.js, manifest, template?.options.base).map(item => `<script defer="defer" src="${item}"></script>`).join(`\n `)}
|
|
35
35
|
${template?.scriptsBodyAfter ? template.scriptsBodyAfter.join('') : ''}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","names":["_debug","_interopRequireDefault","require","_manifest","e","__esModule","default","debug","buildDebug","renderTemplate","template","manifest","options","base","title","JSON","stringify","metaScripts","join","
|
|
1
|
+
{"version":3,"file":"template.js","names":["_debug","_interopRequireDefault","require","_manifest","e","__esModule","default","debug","buildDebug","renderTemplate","template","manifest","options","base","title","JSON","stringify","metaScripts","join","scriptsBodyBefore","getManifestValue","js","map","item","scriptsBodyAfter"],"sources":["../../../../src/middlewares/web/utils/template.ts"],"sourcesContent":["import buildDebug from 'debug';\n\nimport { TemplateUIOptions } from '@verdaccio/types';\n\nimport { Manifest, getManifestValue } from './manifest';\n\nconst debug = buildDebug('verdaccio:web:render:template');\n\nexport type Template = {\n manifest: Manifest;\n options: TemplateUIOptions;\n metaScripts?: string[];\n scriptsBodyAfter?: string[];\n scriptsBodyBefore?: string[];\n};\n\n// the outcome of the Webpack Manifest Plugin\nexport interface WebpackManifest {\n [key: string]: string;\n}\n\nexport default function renderTemplate(template: Template, manifest: WebpackManifest) {\n debug('template %o', template);\n debug('manifest %o', manifest);\n\n return `\n <!DOCTYPE html>\n <html lang=\"en-us\">\n <head>\n <meta charset=\"utf-8\">\n <base href=\"${template?.options.base}\">\n <title>${template?.options?.title ?? ''}</title>\n <link rel=\"icon\" href=\"${template?.options.base}-/static/favicon.ico\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <script>\n window.__VERDACCIO_BASENAME_UI_OPTIONS=${JSON.stringify(template.options)}\n </script>\n ${template?.metaScripts ? template.metaScripts.join('') : ''}\n </head>\n <body class=\"body\">\n ${template?.scriptsBodyBefore ? template.scriptsBodyBefore.join('') : ''}\n <div id=\"root\"></div>\n ${getManifestValue(template.manifest.js, manifest, template?.options.base)\n .map((item) => `<script defer=\"defer\" src=\"${item}\"></script>`)\n .join(`\\n `)}\n ${template?.scriptsBodyAfter ? template.scriptsBodyAfter.join('') : ''}\n </body>\n </html>\n `;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,SAAA,GAAAD,OAAA;AAAwD,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAExD,MAAMG,KAAK,GAAG,IAAAC,cAAU,EAAC,+BAA+B,CAAC;;AAUzD;;AAKe,SAASC,cAAcA,CAACC,QAAkB,EAAEC,QAAyB,EAAE;EACpFJ,KAAK,CAAC,aAAa,EAAEG,QAAQ,CAAC;EAC9BH,KAAK,CAAC,aAAa,EAAEI,QAAQ,CAAC;EAE9B,OAAO;AACT;AACA;AACA;AACA;AACA,sBAAsBD,QAAQ,EAAEE,OAAO,CAACC,IAAI;AAC5C,iBAAiBH,QAAQ,EAAEE,OAAO,EAAEE,KAAK,IAAI,EAAE;AAC/C,iCAAiCJ,QAAQ,EAAEE,OAAO,CAACC,IAAI;AACvD;AACA;AACA,qDAAqDE,IAAI,CAACC,SAAS,CAACN,QAAQ,CAACE,OAAO,CAAC;AACrF;AACA,UAAUF,QAAQ,EAAEO,WAAW,GAAGP,QAAQ,CAACO,WAAW,CAACC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;AACpE;AACA;AACA,UAAUR,QAAQ,EAAES,iBAAiB,GAAGT,QAAQ,CAACS,iBAAiB,CAACD,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;AAChF;AACA,UAAU,IAAAE,0BAAgB,EAACV,QAAQ,CAACC,QAAQ,CAACU,EAAE,EAAEV,QAAQ,EAAED,QAAQ,EAAEE,OAAO,CAACC,IAAI,CAAC,CACvES,GAAG,CAAEC,IAAI,IAAK,8BAA8BA,IAAI,aAAa,CAAC,CAC9DL,IAAI,CAAC,YAAY,CAAC;AAC7B,UAAUR,QAAQ,EAAEc,gBAAgB,GAAGd,QAAQ,CAACc,gBAAgB,CAACN,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE;AAC9E;AACA;AACA,GAAG;AACH","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/middleware",
|
|
3
|
-
"version": "8.0.0-next-8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "8.0.0-next-8.14",
|
|
4
|
+
"description": "Verdaccio Express Middleware",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
7
7
|
"author": {
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "https",
|
|
13
|
-
"url": "https://github.com/verdaccio/verdaccio"
|
|
13
|
+
"url": "https://github.com/verdaccio/verdaccio",
|
|
14
|
+
"directory": "packages/middleware"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/verdaccio/verdaccio/issues"
|
|
14
18
|
},
|
|
15
19
|
"license": "MIT",
|
|
16
20
|
"homepage": "https://verdaccio.org",
|
|
@@ -29,10 +33,10 @@
|
|
|
29
33
|
"node": ">=18"
|
|
30
34
|
},
|
|
31
35
|
"dependencies": {
|
|
32
|
-
"@verdaccio/config": "8.0.0-next-8.
|
|
33
|
-
"@verdaccio/core": "8.0.0-next-8.
|
|
34
|
-
"@verdaccio/url": "13.0.0-next-8.
|
|
35
|
-
"@verdaccio/utils": "8.1.0-next-8.
|
|
36
|
+
"@verdaccio/config": "8.0.0-next-8.14",
|
|
37
|
+
"@verdaccio/core": "8.0.0-next-8.14",
|
|
38
|
+
"@verdaccio/url": "13.0.0-next-8.14",
|
|
39
|
+
"@verdaccio/utils": "8.1.0-next-8.14",
|
|
36
40
|
"debug": "4.4.0",
|
|
37
41
|
"express": "4.21.2",
|
|
38
42
|
"express-rate-limit": "5.5.1",
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
"url": "https://opencollective.com/verdaccio"
|
|
46
50
|
},
|
|
47
51
|
"devDependencies": {
|
|
48
|
-
"@verdaccio/logger": "8.0.0-next-8.
|
|
52
|
+
"@verdaccio/logger": "8.0.0-next-8.14",
|
|
49
53
|
"body-parser": "1.20.3",
|
|
50
54
|
"supertest": "7.0.0",
|
|
51
55
|
"jsdom": "25.0.1"
|