@verdaccio/web 7.0.0-next-7.20 → 7.0.0-next-8.21
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/CHANGELOG.md +19 -0
- package/build/middleware.js +2 -1
- package/build/middleware.js.map +1 -1
- package/package.json +15 -15
- package/src/middleware.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @verdaccio/web
|
|
2
2
|
|
|
3
|
+
## 7.0.0-next-8.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7c9f3cf: chore: improve startup logging
|
|
8
|
+
- Updated dependencies [8c10a3e]
|
|
9
|
+
- Updated dependencies [a05a7d8]
|
|
10
|
+
- Updated dependencies [7c9f3cf]
|
|
11
|
+
- @verdaccio/config@7.0.0-next-8.21
|
|
12
|
+
- @verdaccio/core@7.0.0-next-8.21
|
|
13
|
+
- @verdaccio/loaders@7.0.0-next-8.21
|
|
14
|
+
- @verdaccio/store@7.0.0-next-8.21
|
|
15
|
+
- @verdaccio/auth@7.0.0-next-8.21
|
|
16
|
+
- @verdaccio/middleware@7.0.0-next-8.21
|
|
17
|
+
- @verdaccio/tarball@12.0.0-next-8.21
|
|
18
|
+
- @verdaccio/url@12.0.0-next-8.21
|
|
19
|
+
- @verdaccio/utils@7.0.0-next-8.21
|
|
20
|
+
- @verdaccio/logger@7.0.0-next-8.21
|
|
21
|
+
|
|
3
22
|
## 7.0.0-next-7.20
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/build/middleware.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
exports.loadTheme = loadTheme;
|
|
8
8
|
var _express = _interopRequireDefault(require("express"));
|
|
9
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
|
+
var _core = require("@verdaccio/core");
|
|
10
11
|
var _loaders = require("@verdaccio/loaders");
|
|
11
12
|
var _logger = require("@verdaccio/logger");
|
|
12
13
|
var _middleware = require("@verdaccio/middleware");
|
|
@@ -28,7 +29,7 @@ async function loadTheme(config) {
|
|
|
28
29
|
- `manifestFiles`: A object with one property `js` and the array (order matters) of the manifest id to be loaded in the template dynamically.
|
|
29
30
|
*/
|
|
30
31
|
return plugin.staticPath && plugin.manifest && plugin.manifestFiles;
|
|
31
|
-
}, (_config$serverSetting = config === null || config === void 0 || (_config$serverSetting2 = config.serverSettings) === null || _config$serverSetting2 === void 0 ? void 0 : _config$serverSetting2.pluginPrefix) !== null && _config$serverSetting !== void 0 ? _config$serverSetting : 'verdaccio-theme');
|
|
32
|
+
}, (_config$serverSetting = config === null || config === void 0 || (_config$serverSetting2 = config.serverSettings) === null || _config$serverSetting2 === void 0 ? void 0 : _config$serverSetting2.pluginPrefix) !== null && _config$serverSetting !== void 0 ? _config$serverSetting : 'verdaccio-theme', _core.PLUGIN_CATEGORY.THEME);
|
|
32
33
|
if (plugin.length > 1) {
|
|
33
34
|
_logger.logger.warn('multiple ui themes are not supported , only the first plugin is used used');
|
|
34
35
|
}
|
package/build/middleware.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","names":["_express","_interopRequireDefault","require","_lodash","_loaders","_logger","_middleware","_api","e","__esModule","default","loadTheme","config","_","isNil","theme","_config$serverSetting","_config$serverSetting2","plugin","asyncLoadPlugin","logger","staticPath","manifest","manifestFiles","serverSettings","pluginPrefix","length","warn","head","_default","auth","storage","pluginOptions","web","router","express","Router","use","webMiddleware","tokenMiddleware","webUIJWTmiddleware","webEndpointsApi","exports"],"sources":["../src/middleware.ts"],"sourcesContent":["import express from 'express';\nimport _ from 'lodash';\n\nimport { asyncLoadPlugin } from '@verdaccio/loaders';\nimport { logger } from '@verdaccio/logger';\nimport { webMiddleware } from '@verdaccio/middleware';\n\nimport webEndpointsApi from './api';\n\nexport async function loadTheme(config: any) {\n if (_.isNil(config.theme) === false) {\n const plugin = await asyncLoadPlugin(\n config.theme,\n { config, logger },\n // TODO: add types { staticPath: string; manifest: unknown; manifestFiles: unknown }\n function (plugin: any) {\n /**\n * \n - `staticPath`: is the same data returned in Verdaccio 5.\n - `manifest`: A webpack manifest object.\n - `manifestFiles`: A object with one property `js` and the array (order matters) of the manifest id to be loaded in the template dynamically.\n */\n return plugin.staticPath && plugin.manifest && plugin.manifestFiles;\n },\n config?.serverSettings?.pluginPrefix ?? 'verdaccio-theme'\n );\n if (plugin.length > 1) {\n logger.warn('multiple ui themes are not supported , only the first plugin is used used');\n }\n\n return _.head(plugin);\n }\n}\n\nexport default async (config, auth, storage) => {\n const pluginOptions = (await loadTheme(config)) || require('@verdaccio/ui-theme')(config.web);\n\n // eslint-disable-next-line new-cap\n const router = express.Router();\n // load application\n router.use(\n webMiddleware(\n config,\n {\n tokenMiddleware: auth.webUIJWTmiddleware(),\n webEndpointsApi: webEndpointsApi(auth, storage, config),\n },\n pluginOptions\n )\n );\n return router;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,
|
|
1
|
+
{"version":3,"file":"middleware.js","names":["_express","_interopRequireDefault","require","_lodash","_core","_loaders","_logger","_middleware","_api","e","__esModule","default","loadTheme","config","_","isNil","theme","_config$serverSetting","_config$serverSetting2","plugin","asyncLoadPlugin","logger","staticPath","manifest","manifestFiles","serverSettings","pluginPrefix","PLUGIN_CATEGORY","THEME","length","warn","head","_default","auth","storage","pluginOptions","web","router","express","Router","use","webMiddleware","tokenMiddleware","webUIJWTmiddleware","webEndpointsApi","exports"],"sources":["../src/middleware.ts"],"sourcesContent":["import express from 'express';\nimport _ from 'lodash';\n\nimport { PLUGIN_CATEGORY } from '@verdaccio/core';\nimport { asyncLoadPlugin } from '@verdaccio/loaders';\nimport { logger } from '@verdaccio/logger';\nimport { webMiddleware } from '@verdaccio/middleware';\n\nimport webEndpointsApi from './api';\n\nexport async function loadTheme(config: any) {\n if (_.isNil(config.theme) === false) {\n const plugin = await asyncLoadPlugin(\n config.theme,\n { config, logger },\n // TODO: add types { staticPath: string; manifest: unknown; manifestFiles: unknown }\n function (plugin: any) {\n /**\n * \n - `staticPath`: is the same data returned in Verdaccio 5.\n - `manifest`: A webpack manifest object.\n - `manifestFiles`: A object with one property `js` and the array (order matters) of the manifest id to be loaded in the template dynamically.\n */\n return plugin.staticPath && plugin.manifest && plugin.manifestFiles;\n },\n config?.serverSettings?.pluginPrefix ?? 'verdaccio-theme',\n PLUGIN_CATEGORY.THEME\n );\n if (plugin.length > 1) {\n logger.warn('multiple ui themes are not supported , only the first plugin is used used');\n }\n\n return _.head(plugin);\n }\n}\n\nexport default async (config, auth, storage) => {\n const pluginOptions = (await loadTheme(config)) || require('@verdaccio/ui-theme')(config.web);\n\n // eslint-disable-next-line new-cap\n const router = express.Router();\n // load application\n router.use(\n webMiddleware(\n config,\n {\n tokenMiddleware: auth.webUIJWTmiddleware(),\n webEndpointsApi: webEndpointsApi(auth, storage, config),\n },\n pluginOptions\n )\n );\n return router;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAEA,IAAAM,IAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAoC,SAAAD,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE7B,eAAeG,SAASA,CAACC,MAAW,EAAE;EAC3C,IAAIC,eAAC,CAACC,KAAK,CAACF,MAAM,CAACG,KAAK,CAAC,KAAK,KAAK,EAAE;IAAA,IAAAC,qBAAA,EA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A","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/web",
|
|
3
|
-
"version": "7.0.0-next-
|
|
3
|
+
"version": "7.0.0-next-8.21",
|
|
4
4
|
"description": "web ui middleware",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -24,30 +24,30 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@verdaccio/auth": "7.0.0-next-
|
|
28
|
-
"@verdaccio/config": "7.0.0-next-
|
|
29
|
-
"@verdaccio/core": "7.0.0-next-
|
|
30
|
-
"@verdaccio/loaders": "7.0.0-next-
|
|
31
|
-
"@verdaccio/logger": "7.0.0-next-
|
|
32
|
-
"@verdaccio/middleware": "7.0.0-next-
|
|
33
|
-
"@verdaccio/store": "7.0.0-next-
|
|
34
|
-
"@verdaccio/tarball": "12.0.0-next-
|
|
35
|
-
"@verdaccio/url": "12.0.0-next-
|
|
36
|
-
"@verdaccio/utils": "7.0.0-next-
|
|
37
|
-
"debug": "4.3.
|
|
27
|
+
"@verdaccio/auth": "7.0.0-next-8.21",
|
|
28
|
+
"@verdaccio/config": "7.0.0-next-8.21",
|
|
29
|
+
"@verdaccio/core": "7.0.0-next-8.21",
|
|
30
|
+
"@verdaccio/loaders": "7.0.0-next-8.21",
|
|
31
|
+
"@verdaccio/logger": "7.0.0-next-8.21",
|
|
32
|
+
"@verdaccio/middleware": "7.0.0-next-8.21",
|
|
33
|
+
"@verdaccio/store": "7.0.0-next-8.21",
|
|
34
|
+
"@verdaccio/tarball": "12.0.0-next-8.21",
|
|
35
|
+
"@verdaccio/url": "12.0.0-next-8.21",
|
|
36
|
+
"@verdaccio/utils": "7.0.0-next-8.21",
|
|
37
|
+
"debug": "4.3.6",
|
|
38
38
|
"express": "4.19.2",
|
|
39
39
|
"lodash": "4.17.21"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@verdaccio/api": "7.0.0-next-
|
|
42
|
+
"@verdaccio/api": "7.0.0-next-8.21",
|
|
43
43
|
"@verdaccio/test-helper": "3.0.0-next-7.2",
|
|
44
44
|
"@verdaccio/types": "12.0.0-next-7.5",
|
|
45
45
|
"jsdom": "20.0.3",
|
|
46
46
|
"nock": "13.5.1",
|
|
47
47
|
"node-html-parser": "4.1.5",
|
|
48
48
|
"supertest": "7.0.0",
|
|
49
|
-
"verdaccio-auth-memory": "12.0.0-next-
|
|
50
|
-
"verdaccio-memory": "12.0.0-next-
|
|
49
|
+
"verdaccio-auth-memory": "12.0.0-next-8.21",
|
|
50
|
+
"verdaccio-memory": "12.0.0-next-8.21"
|
|
51
51
|
},
|
|
52
52
|
"funding": {
|
|
53
53
|
"type": "opencollective",
|
package/src/middleware.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import _ from 'lodash';
|
|
3
3
|
|
|
4
|
+
import { PLUGIN_CATEGORY } from '@verdaccio/core';
|
|
4
5
|
import { asyncLoadPlugin } from '@verdaccio/loaders';
|
|
5
6
|
import { logger } from '@verdaccio/logger';
|
|
6
7
|
import { webMiddleware } from '@verdaccio/middleware';
|
|
@@ -22,7 +23,8 @@ export async function loadTheme(config: any) {
|
|
|
22
23
|
*/
|
|
23
24
|
return plugin.staticPath && plugin.manifest && plugin.manifestFiles;
|
|
24
25
|
},
|
|
25
|
-
config?.serverSettings?.pluginPrefix ?? 'verdaccio-theme'
|
|
26
|
+
config?.serverSettings?.pluginPrefix ?? 'verdaccio-theme',
|
|
27
|
+
PLUGIN_CATEGORY.THEME
|
|
26
28
|
);
|
|
27
29
|
if (plugin.length > 1) {
|
|
28
30
|
logger.warn('multiple ui themes are not supported , only the first plugin is used used');
|