@verdaccio/node-api 6.0.0-6-next.29 → 6.0.0-6-next.32

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 CHANGED
@@ -1,5 +1,58 @@
1
1
  # @verdaccio/node-api
2
2
 
3
+ ## 6.0.0-6-next.32
4
+
5
+ ### Patch Changes
6
+
7
+ - @verdaccio/server@6.0.0-6-next.31
8
+
9
+ ## 6.0.0-6-next.31
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [d43894e8]
14
+ - Updated dependencies [d08fe29d]
15
+ - @verdaccio/config@6.0.0-6-next.14
16
+ - @verdaccio/server@6.0.0-6-next.30
17
+ - @verdaccio/core@6.0.0-6-next.5
18
+ - @verdaccio/logger@6.0.0-6-next.11
19
+
20
+ ## 6.0.0-6-next.30
21
+
22
+ ### Major Changes
23
+
24
+ - 82cb0f2b: feat!: config.logs throw an error, logging config not longer accept array or logs property
25
+
26
+ ### 💥 Breaking change
27
+
28
+ This is valid
29
+
30
+ ```yaml
31
+ log: { type: stdout, format: pretty, level: http }
32
+ ```
33
+
34
+ This is invalid
35
+
36
+ ```yaml
37
+ logs: { type: stdout, format: pretty, level: http }
38
+ ```
39
+
40
+ or
41
+
42
+ ```yaml
43
+ logs:
44
+ - [{ type: stdout, format: pretty, level: http }]
45
+ ```
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [82cb0f2b]
50
+ - Updated dependencies [5167bb52]
51
+ - @verdaccio/config@6.0.0-6-next.13
52
+ - @verdaccio/core@6.0.0-6-next.5
53
+ - @verdaccio/logger@6.0.0-6-next.11
54
+ - @verdaccio/server@6.0.0-6-next.29
55
+
3
56
  ## 6.0.0-6-next.29
4
57
 
5
58
  ### Patch Changes
package/build/server.js CHANGED
@@ -133,7 +133,7 @@ async function initServer(config, port, version, pkgName) {
133
133
  return new Promise(async (resolve, reject) => {
134
134
  // FIXME: get only the first match, the multiple address will be removed
135
135
  const [addr] = (0, _cliUtils.getListListenAddresses)(port, config.listen);
136
- const logger = (0, _logger.setup)(config.logs);
136
+ const logger = (0, _logger.setup)(config === null || config === void 0 ? void 0 : config.log);
137
137
  (0, _experiments.displayExperimentsInfoBox)(config.flags);
138
138
  const app = await (0, _server.default)(config);
139
139
  const serverFactory = createServerFactory(config, addr, app);
@@ -201,7 +201,7 @@ async function runServer(config) {
201
201
  throw new Error(_core.API_ERROR.CONFIG_BAD_FORMAT);
202
202
  }
203
203
 
204
- (0, _logger.setup)(configurationParsed.logs);
204
+ (0, _logger.setup)(configurationParsed.log);
205
205
  (0, _experiments.displayExperimentsInfoBox)(configurationParsed.flags); // FIXME: get only the first match, the multiple address will be removed
206
206
 
207
207
  const [addr] = (0, _cliUtils.getListListenAddresses)(undefined, configurationParsed.listen);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.ts"],"names":["debug","unlinkAddressPath","addr","path","fs","existsSync","unlinkSync","createServerFactory","config","app","serverFactory","proto","httpsOptions","secureOptions","constants","SSL_OP_NO_SSLv2","SSL_OP_NO_SSLv3","keyCertConfig","https","pfxConfig","key","cert","pfx","Error","passphrase","readFileSync","ca","createServer","err","message","http","server","keepAliveTimeout","initServer","port","version","pkgName","Promise","resolve","reject","listen","logger","logs","flags","host","process","send","verdaccio_started","addressServer","url","format","protocol","pathname","hostname","info","on","exitCode","handleShutdownGracefully","fatal","close","exit","signal","once","runServer","configurationParsed","undefined","configPathLocation","_","isObject","API_ERROR","CONFIG_BAD_FORMAT"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AAGA;;AACA;;;;;;;;AAhBA;AAkBA,MAAMA,KAAK,GAAG,oBAAW,oBAAX,CAAd;;AAEA,SAASC,iBAAT,CAA2BC,IAA3B,EAAiC;AAC/B,MAAIA,IAAI,CAACC,IAAL,IAAaC,YAAGC,UAAH,CAAcH,IAAI,CAACC,IAAnB,CAAjB,EAA2C;AAC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ACe,IAAR,CAAa,CAAb;AACD,OAHD;AAID;;AAED,SAAK,MAAMC,MAAX,IAAqB,CAAC,QAAD,EAAW,SAAX,EAAsB,QAAtB,CAArB,EAAsD;AACpD;AACAhB,MAAAA,OAAO,CAACiB,IAAR,CAAaD,MAAb,EAAqBJ,wBAArB;AACD;AACF,GAjDM,CAAP;AAkDD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,eAAeM,SAAf,CAAyBvD,MAAzB,EAAwE;AAC7E,MAAIwD,mBAAJ;;AACA,MAAIxD,MAAM,KAAKyD,SAAX,IAAwB,OAAOzD,MAAP,KAAkB,QAA9C,EAAwD;AACtD,UAAM0D,kBAAkB,GAAG,4BAAe1D,MAAf,CAA3B;AACAwD,IAAAA,mBAAmB,GAAG,6BAAgBE,kBAAhB,CAAtB;AACD,GAHD,MAGO,IAAIC,gBAAEC,QAAF,CAAW5D,MAAX,CAAJ,EAAwB;AAC7BwD,IAAAA,mBAAmB,GAAGxD,MAAtB;AACD,GAFM,MAEA;AACL,UAAM,IAAIe,KAAJ,CAAU8C,gBAAUC,iBAApB,CAAN;AACD;;AAED,qBAAMN,mBAAmB,CAACtB,IAA1B;AACA,8CAA0BsB,mBAAmB,CAACrB,KAA9C,EAZ6E,CAa7E;;AACA,QAAM,CAACzC,IAAD,IAAS,sCAAuB+D,SAAvB,EAAkCD,mBAAmB,CAACxB,MAAtD,CAAf;AACA,QAAM/B,GAAG,GAAG,MAAM,qBAAOuD,mBAAP,CAAlB;AACA,SAAOzD,mBAAmB,CAACyD,mBAAD,EAAsB9D,IAAtB,EAA4BO,GAA5B,CAA1B;AACD","sourcesContent":["/* eslint-disable */\nimport constants from 'constants';\nimport buildDebug from 'debug';\nimport fs from 'fs';\nimport http from 'http';\nimport https from 'https';\nimport _, { assign, isFunction } from 'lodash';\nimport url from 'url';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { API_ERROR } from '@verdaccio/core';\nimport { logger, setup } from '@verdaccio/logger';\nimport server from '@verdaccio/server';\nimport { ConfigRuntime, HttpsConfKeyCert, HttpsConfPfx } from '@verdaccio/types';\n\nimport { getListListenAddresses } from './cli-utils';\nimport { displayExperimentsInfoBox } from './experiments';\n\nconst debug = buildDebug('verdaccio:node-api');\n\nfunction unlinkAddressPath(addr) {\n if (addr.path && fs.existsSync(addr.path)) {\n fs.unlinkSync(addr.path);\n }\n}\n\n/**\n * Return a native HTTP/HTTPS server instance\n * @param config\n * @param addr\n * @param app\n */\nexport function createServerFactory(config: ConfigRuntime, addr, app) {\n let serverFactory;\n if (addr.proto === 'https') {\n debug('https enabled');\n try {\n let httpsOptions = {\n // disable insecure SSLv2 and SSLv3\n secureOptions: constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3,\n };\n\n const keyCertConfig = config.https as HttpsConfKeyCert;\n const pfxConfig = config.https as HttpsConfPfx;\n\n // https must either have key and cert or a pfx and (optionally) a passphrase\n if (!((keyCertConfig.key && keyCertConfig.cert) || pfxConfig.pfx)) {\n // logHTTPSError(configPath);\n throw Error('bad format https configuration');\n }\n\n if (pfxConfig.pfx) {\n const { pfx, passphrase } = pfxConfig;\n httpsOptions = assign(httpsOptions, {\n pfx: fs.readFileSync(pfx),\n passphrase: passphrase || '',\n });\n } else {\n const { key, cert, ca } = keyCertConfig;\n httpsOptions = assign(httpsOptions, {\n key: fs.readFileSync(key),\n cert: fs.readFileSync(cert),\n ...(ca && {\n ca: fs.readFileSync(ca),\n }),\n });\n }\n // TODO: enable http2 as feature\n // if (config.server.http2) <-- check if force http2\n serverFactory = https.createServer(httpsOptions, app);\n } catch (err: any) {\n throw new Error(`cannot create https server: ${err.message}`);\n }\n } else {\n // http\n debug('http enabled');\n serverFactory = http.createServer(app);\n }\n\n if (\n config.server &&\n typeof config.server.keepAliveTimeout !== 'undefined' &&\n // @ts-ignore\n config.server.keepAliveTimeout !== 'null'\n ) {\n // library definition for node is not up to date (doesn't contain recent 8.0 changes)\n serverFactory.keepAliveTimeout = config.server.keepAliveTimeout * 1000;\n }\n // FIXE: I could not find the reason of this code.\n unlinkAddressPath(addr);\n\n return serverFactory;\n}\n\n/**\n * Start the server on the port defined\n * @param config\n * @param port\n * @param version\n * @param pkgName\n */\nexport async function initServer(\n config: ConfigRuntime,\n port: string | void,\n version: string,\n pkgName: string\n): Promise<void> {\n return new Promise(async (resolve, reject) => {\n // FIXME: get only the first match, the multiple address will be removed\n const [addr] = getListListenAddresses(port, config.listen);\n const logger = setup((config as ConfigRuntime).logs);\n displayExperimentsInfoBox(config.flags);\n const app = await server(config);\n const serverFactory = createServerFactory(config, addr, app);\n serverFactory\n .listen(addr.port || addr.path, addr.host, (): void => {\n // send a message for test\n if (isFunction(process.send)) {\n process.send({\n verdaccio_started: true,\n });\n }\n const addressServer = `${\n addr.path\n ? url.format({\n protocol: 'unix',\n pathname: addr.path,\n })\n : url.format({\n protocol: addr.proto,\n hostname: addr.host,\n port: addr.port,\n pathname: '/',\n })\n }`;\n logger.info(`http address ${addressServer}`);\n logger.info(`version: ${version}`);\n resolve();\n })\n .on('error', function (err): void {\n reject(err);\n process.exitCode = 1;\n });\n\n function handleShutdownGracefully() {\n logger.fatal('received shutdown signal - closing server gracefully...');\n serverFactory.close(() => {\n logger.info('server closed.');\n process.exit(0);\n });\n }\n\n for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {\n // Use once() so that receiving double signals exit the app.\n process.once(signal, handleShutdownGracefully);\n }\n });\n}\n\n/**\n * Exposes a server factory to be instantiated programmatically.\n *\n const app = await runServer(); // default configuration\n const app = await runServer('./config/config.yaml');\n const app = await runServer({ configuration });\n app.listen(4000, (event) => {\n // do something\n });\n * @param config\n */\nexport async function runServer(config?: string | ConfigRuntime): Promise<any> {\n let configurationParsed: ConfigRuntime;\n if (config === undefined || typeof config === 'string') {\n const configPathLocation = findConfigFile(config);\n configurationParsed = parseConfigFile(configPathLocation);\n } else if (_.isObject(config)) {\n configurationParsed = config;\n } else {\n throw new Error(API_ERROR.CONFIG_BAD_FORMAT);\n }\n\n setup(configurationParsed.logs);\n displayExperimentsInfoBox(configurationParsed.flags);\n // FIXME: get only the first match, the multiple address will be removed\n const [addr] = getListListenAddresses(undefined, configurationParsed.listen);\n const app = await server(configurationParsed);\n return createServerFactory(configurationParsed, addr, app);\n}\n"],"file":"server.js"}
1
+ {"version":3,"sources":["../src/server.ts"],"names":["debug","unlinkAddressPath","addr","path","fs","existsSync","unlinkSync","createServerFactory","config","app","serverFactory","proto","httpsOptions","secureOptions","constants","SSL_OP_NO_SSLv2","SSL_OP_NO_SSLv3","keyCertConfig","https","pfxConfig","key","cert","pfx","Error","passphrase","readFileSync","ca","createServer","err","message","http","server","keepAliveTimeout","initServer","port","version","pkgName","Promise","resolve","reject","listen","logger","log","flags","host","process","send","verdaccio_started","addressServer","url","format","protocol","pathname","hostname","info","on","exitCode","handleShutdownGracefully","fatal","close","exit","signal","once","runServer","configurationParsed","undefined","configPathLocation","_","isObject","API_ERROR","CONFIG_BAD_FORMAT"],"mappings":";;;;;;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AAGA;;AACA;;;;;;;;AAjBA;AAmBA,MAAMA,KAAK,GAAG,oBAAW,oBAAX,CAAd;;AAEA,SAASC,iBAAT,CAA2BC,IAA3B,EAAiC;AAC/B,MAAIA,IAAI,CAACC,IAAL,IAAaC,YAAGC,UAAH,CAAcH,IAAI,CAACC,IAAnB,CAAjB,EAA2C;AACzCC,gBAAGE,UAAH,CAAcJ,IAAI,CAACC,IAAnB;AACD;AACF;AAED;AACA;AACA;AACA;AACA;AACA;;;AACO,SAASI,mBAAT,CAA6BC,MAA7B,EAAoDN,IAApD,EAA0DO,GAA1D,EAA+D;AACpE,MAAIC,aAAJ;;AACA,MAAIR,IAAI,CAACS,KAAL,KAAe,OAAnB,EAA4B;AAC1BX,IAAAA,KAAK,CAAC,eAAD,CAAL;;AACA,QAAI;AACF,UAAI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A;AACA;;;AACO,eAAeM,SAAf,CAAyBvD,MAAzB,EAAwE;AAC7E,MAAIwD,mBAAJ;;AACA,MAAIxD,MAAM,KAAKyD,SAAX,IAAwB,OAAOzD,MAAP,KAAkB,QAA9C,EAAwD;AACtD,UAAM0D,kBAAkB,GAAG,4BAAe1D,MAAf,CAA3B;AACAwD,IAAAA,mBAAmB,GAAG,6BAAgBE,kBAAhB,CAAtB;AACD,GAHD,MAGO,IAAIC,gBAAEC,QAAF,CAAW5D,MAAX,CAAJ,EAAwB;AAC7BwD,IAAAA,mBAAmB,GAAGxD,MAAtB;AACD,GAFM,MAEA;AACL,UAAM,IAAIe,KAAJ,CAAU8C,gBAAUC,iBAApB,CAAN;AACD;;AAED,qBAAMN,mBAAmB,CAACtB,GAA1B;AACA,8CAA0BsB,mBAAmB,CAACrB,KAA9C,EAZ6E,CAa7E;;AACA,QAAM,CAACzC,IAAD,IAAS,sCAAuB+D,SAAvB,EAAkCD,mBAAmB,CAACxB,MAAtD,CAAf;AACA,QAAM/B,GAAG,GAAG,MAAM,qBAAOuD,mBAAP,CAAlB;AACA,SAAOzD,mBAAmB,CAACyD,mBAAD,EAAsB9D,IAAtB,EAA4BO,GAA5B,CAA1B;AACD","sourcesContent":["/* eslint-disable */\nimport constants from 'constants';\nimport buildDebug from 'debug';\nimport fs from 'fs';\nimport http from 'http';\nimport https from 'https';\nimport _, { assign, isFunction } from 'lodash';\nimport url from 'url';\n\nimport { findConfigFile, parseConfigFile } from '@verdaccio/config';\nimport { API_ERROR } from '@verdaccio/core';\nimport { setup } from '@verdaccio/logger';\nimport { LoggerConfigItem } from '@verdaccio/logger/src/logger';\nimport server from '@verdaccio/server';\nimport { ConfigRuntime, HttpsConfKeyCert, HttpsConfPfx } from '@verdaccio/types';\n\nimport { getListListenAddresses } from './cli-utils';\nimport { displayExperimentsInfoBox } from './experiments';\n\nconst debug = buildDebug('verdaccio:node-api');\n\nfunction unlinkAddressPath(addr) {\n if (addr.path && fs.existsSync(addr.path)) {\n fs.unlinkSync(addr.path);\n }\n}\n\n/**\n * Return a native HTTP/HTTPS server instance\n * @param config\n * @param addr\n * @param app\n */\nexport function createServerFactory(config: ConfigRuntime, addr, app) {\n let serverFactory;\n if (addr.proto === 'https') {\n debug('https enabled');\n try {\n let httpsOptions = {\n // disable insecure SSLv2 and SSLv3\n secureOptions: constants.SSL_OP_NO_SSLv2 | constants.SSL_OP_NO_SSLv3,\n };\n\n const keyCertConfig = config.https as HttpsConfKeyCert;\n const pfxConfig = config.https as HttpsConfPfx;\n\n // https must either have key and cert or a pfx and (optionally) a passphrase\n if (!((keyCertConfig.key && keyCertConfig.cert) || pfxConfig.pfx)) {\n // logHTTPSError(configPath);\n throw Error('bad format https configuration');\n }\n\n if (pfxConfig.pfx) {\n const { pfx, passphrase } = pfxConfig;\n httpsOptions = assign(httpsOptions, {\n pfx: fs.readFileSync(pfx),\n passphrase: passphrase || '',\n });\n } else {\n const { key, cert, ca } = keyCertConfig;\n httpsOptions = assign(httpsOptions, {\n key: fs.readFileSync(key),\n cert: fs.readFileSync(cert),\n ...(ca && {\n ca: fs.readFileSync(ca),\n }),\n });\n }\n // TODO: enable http2 as feature\n // if (config.server.http2) <-- check if force http2\n serverFactory = https.createServer(httpsOptions, app);\n } catch (err: any) {\n throw new Error(`cannot create https server: ${err.message}`);\n }\n } else {\n // http\n debug('http enabled');\n serverFactory = http.createServer(app);\n }\n\n if (\n config.server &&\n typeof config.server.keepAliveTimeout !== 'undefined' &&\n // @ts-ignore\n config.server.keepAliveTimeout !== 'null'\n ) {\n // library definition for node is not up to date (doesn't contain recent 8.0 changes)\n serverFactory.keepAliveTimeout = config.server.keepAliveTimeout * 1000;\n }\n // FIXE: I could not find the reason of this code.\n unlinkAddressPath(addr);\n\n return serverFactory;\n}\n\n/**\n * Start the server on the port defined\n * @param config\n * @param port\n * @param version\n * @param pkgName\n */\nexport async function initServer(\n config: ConfigRuntime,\n port: string | void,\n version: string,\n pkgName: string\n): Promise<void> {\n return new Promise(async (resolve, reject) => {\n // FIXME: get only the first match, the multiple address will be removed\n const [addr] = getListListenAddresses(port, config.listen);\n const logger = setup(config?.log as LoggerConfigItem);\n displayExperimentsInfoBox(config.flags);\n const app = await server(config);\n const serverFactory = createServerFactory(config, addr, app);\n serverFactory\n .listen(addr.port || addr.path, addr.host, (): void => {\n // send a message for test\n if (isFunction(process.send)) {\n process.send({\n verdaccio_started: true,\n });\n }\n const addressServer = `${\n addr.path\n ? url.format({\n protocol: 'unix',\n pathname: addr.path,\n })\n : url.format({\n protocol: addr.proto,\n hostname: addr.host,\n port: addr.port,\n pathname: '/',\n })\n }`;\n logger.info(`http address ${addressServer}`);\n logger.info(`version: ${version}`);\n resolve();\n })\n .on('error', function (err): void {\n reject(err);\n process.exitCode = 1;\n });\n\n function handleShutdownGracefully() {\n logger.fatal('received shutdown signal - closing server gracefully...');\n serverFactory.close(() => {\n logger.info('server closed.');\n process.exit(0);\n });\n }\n\n for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {\n // Use once() so that receiving double signals exit the app.\n process.once(signal, handleShutdownGracefully);\n }\n });\n}\n\n/**\n * Exposes a server factory to be instantiated programmatically.\n *\n const app = await runServer(); // default configuration\n const app = await runServer('./config/config.yaml');\n const app = await runServer({ configuration });\n app.listen(4000, (event) => {\n // do something\n });\n * @param config\n */\nexport async function runServer(config?: string | ConfigRuntime): Promise<any> {\n let configurationParsed: ConfigRuntime;\n if (config === undefined || typeof config === 'string') {\n const configPathLocation = findConfigFile(config);\n configurationParsed = parseConfigFile(configPathLocation) as ConfigRuntime;\n } else if (_.isObject(config)) {\n configurationParsed = config;\n } else {\n throw new Error(API_ERROR.CONFIG_BAD_FORMAT);\n }\n\n setup(configurationParsed.log as LoggerConfigItem);\n displayExperimentsInfoBox(configurationParsed.flags);\n // FIXME: get only the first match, the multiple address will be removed\n const [addr] = getListListenAddresses(undefined, configurationParsed.listen);\n const app = await server(configurationParsed);\n return createServerFactory(configurationParsed, addr, app);\n}\n"],"file":"server.js"}
package/package.json CHANGED
@@ -1,65 +1,66 @@
1
1
  {
2
- "name": "@verdaccio/node-api",
3
- "version": "6.0.0-6-next.29",
4
- "description": "node API",
5
- "main": "build/index.js",
6
- "types": "build/index.d.ts",
7
- "author": {
8
- "name": "Juan Picado",
9
- "email": "juanpicado19@gmail.com"
10
- },
11
- "repository": {
12
- "type": "https",
13
- "url": "https://github.com/verdaccio/verdaccio"
14
- },
15
- "homepage": "https://verdaccio.org",
16
- "keywords": [
17
- "private",
18
- "package",
19
- "repository",
20
- "registry",
21
- "enterprise",
22
- "modules",
23
- "proxy",
24
- "server",
25
- "verdaccio"
26
- ],
27
- "engines": {
28
- "node": ">=14",
29
- "npm": ">=6"
30
- },
31
- "license": "MIT",
32
- "dependencies": {
33
- "@verdaccio/core": "6.0.0-6-next.4",
34
- "@verdaccio/config": "6.0.0-6-next.12",
35
- "@verdaccio/logger": "6.0.0-6-next.10",
36
- "@verdaccio/server": "6.0.0-6-next.28",
37
- "core-js": "3.20.3",
38
- "debug": "4.3.3",
39
- "lodash": "4.17.21"
40
- },
41
- "devDependencies": {
42
- "@types/node": "16.11.21",
43
- "@verdaccio/mock": "6.0.0-6-next.13",
44
- "@verdaccio/types": "11.0.0-6-next.10",
45
- "jest-mock-process": "1.4.1",
46
- "selfsigned": "1.10.14",
47
- "supertest": "6.2.2"
48
- },
49
- "publishConfig": {
50
- "access": "public"
51
- },
52
- "funding": {
53
- "type": "opencollective",
54
- "url": "https://opencollective.com/verdaccio"
55
- },
56
- "scripts": {
57
- "clean": "rimraf ./build",
58
- "type-check": "tsc --noEmit -p tsconfig.build.json",
59
- "build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
60
- "build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
61
- "watch": "pnpm build:js -- --watch",
62
- "build": "pnpm run build:js && pnpm run build:types",
63
- "test": "cross-env NODE_ENV=test BABEL_ENV=test jest"
64
- }
65
- }
2
+ "name": "@verdaccio/node-api",
3
+ "version": "6.0.0-6-next.32",
4
+ "description": "node API",
5
+ "main": "build/index.js",
6
+ "types": "build/index.d.ts",
7
+ "author": {
8
+ "name": "Juan Picado",
9
+ "email": "juanpicado19@gmail.com"
10
+ },
11
+ "repository": {
12
+ "type": "https",
13
+ "url": "https://github.com/verdaccio/verdaccio"
14
+ },
15
+ "homepage": "https://verdaccio.org",
16
+ "keywords": [
17
+ "private",
18
+ "package",
19
+ "repository",
20
+ "registry",
21
+ "enterprise",
22
+ "modules",
23
+ "proxy",
24
+ "server",
25
+ "verdaccio"
26
+ ],
27
+ "engines": {
28
+ "node": ">=14",
29
+ "npm": ">=6"
30
+ },
31
+ "license": "MIT",
32
+ "dependencies": {
33
+ "@verdaccio/core": "6.0.0-6-next.5",
34
+ "@verdaccio/config": "6.0.0-6-next.14",
35
+ "@verdaccio/logger": "6.0.0-6-next.11",
36
+ "@verdaccio/server": "6.0.0-6-next.31",
37
+ "core-js": "3.20.3",
38
+ "debug": "4.3.3",
39
+ "lodash": "4.17.21"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "16.11.21",
43
+ "@verdaccio/mock": "6.0.0-6-next.15",
44
+ "@verdaccio/types": "11.0.0-6-next.12",
45
+ "jest-mock-process": "1.4.1",
46
+ "selfsigned": "1.10.14",
47
+ "supertest": "6.2.2"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "funding": {
53
+ "type": "opencollective",
54
+ "url": "https://opencollective.com/verdaccio"
55
+ },
56
+ "scripts": {
57
+ "clean": "rimraf ./build",
58
+ "type-check": "tsc --noEmit -p tsconfig.build.json",
59
+ "build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
60
+ "build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
61
+ "watch": "pnpm build:js -- --watch",
62
+ "build": "pnpm run build:js && pnpm run build:types",
63
+ "test": "cross-env NODE_ENV=test BABEL_ENV=test jest"
64
+ },
65
+ "readme": "# @verdaccio/node-api\n\n[![backers](https://opencollective.com/verdaccio/tiers/backer/badge.svg?label=Backer&color=brightgreen)](https://opencollective.com/verdaccio)\n[![stackshare](https://img.shields.io/badge/Follow%20on-StackShare-blue.svg?logo=stackshare&style=flat)](https://stackshare.io/verdaccio)\n[![MIT](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)\n[![Crowdin](https://d322cqt584bo4o.cloudfront.net/verdaccio/localized.svg)](https://crowdin.com/project/verdaccio)\n[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/verdaccio/verdaccio)](https://www.tickgit.com/browse?repo=github.com/verdaccio/verdaccio)\n\n[![Twitter followers](https://img.shields.io/twitter/follow/verdaccio_npm.svg?style=social&label=Follow)](https://twitter.com/verdaccio_npm)\n[![Github](https://img.shields.io/github/stars/verdaccio/verdaccio.svg?style=social&label=Stars)](https://github.com/verdaccio/verdaccio/stargazers)\n\n## Donations\n\nVerdaccio is run by **volunteers**; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - **your logo might end up in this readme.** 😉\n\n**[Donate](https://opencollective.com/verdaccio)** 💵👍🏻 starting from _\\$1/month_ or just one single contribution.\n\n## Report a vulnerability\n\nIf you want to report a security vulnerability, please follow the steps which we have defined for you in our [security policy](https://github.com/verdaccio/verdaccio/security/policy).\n\n## Open Collective Sponsors\n\nSupport 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#sponsor)]\n\n[![sponsor](https://opencollective.com/verdaccio/sponsor/0/avatar.svg)](https://opencollective.com/verdaccio/sponsor/0/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/1/avatar.svg)](https://opencollective.com/verdaccio/sponsor/1/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/2/avatar.svg)](https://opencollective.com/verdaccio/sponsor/2/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/3/avatar.svg)](https://opencollective.com/verdaccio/sponsor/3/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/4/avatar.svg)](https://opencollective.com/verdaccio/sponsor/4/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/5/avatar.svg)](https://opencollective.com/verdaccio/sponsor/5/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/6/avatar.svg)](https://opencollective.com/verdaccio/sponsor/6/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/7/avatar.svg)](https://opencollective.com/verdaccio/sponsor/7/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/8/avatar.svg)](https://opencollective.com/verdaccio/sponsor/8/website)\n[![sponsor](https://opencollective.com/verdaccio/sponsor/9/avatar.svg)](https://opencollective.com/verdaccio/sponsor/9/website)\n\n## Open Collective Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/verdaccio#backer)]\n\n[![backers](https://opencollective.com/verdaccio/backers.svg?width=890)](https://opencollective.com/verdaccio#backers)\n\n## Special Thanks\n\nThanks to the following companies to help us to achieve our goals providing free open source licenses.\n\n[![jetbrain](assets/thanks/jetbrains/logo.png)](https://www.jetbrains.com/)\n[![crowdin](assets/thanks/crowdin/logo.png)](https://crowdin.com/)\n[![balsamiq](assets/thanks/balsamiq/logo.jpg)](https://balsamiq.com/)\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n[![contributors](https://opencollective.com/verdaccio/contributors.svg?width=890&button=true)](../../graphs/contributors)\n\n### FAQ / Contact / Troubleshoot\n\nIf you have any issue you can try the following options, do no desist to ask or check our issues database, perhaps someone has asked already what you are looking for.\n\n- [Blog](https://verdaccio.org/blog/)\n- [Donations](https://opencollective.com/verdaccio)\n- [Reporting an issue](https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md#reporting-a-bug)\n- [Running discussions](https://github.com/verdaccio/verdaccio/issues?q=is%3Aissue+is%3Aopen+label%3Adiscuss)\n- [Chat](http://chat.verdaccio.org/)\n- [Logos](https://verdaccio.org/docs/en/logo)\n- [Docker Examples](https://github.com/verdaccio/docker-examples)\n- [FAQ](https://github.com/verdaccio/verdaccio/issues?utf8=%E2%9C%93&q=is%3Aissue%20label%3Aquestion%20)\n\n### License\n\nVerdaccio is [MIT licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE)\n\nThe Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch) files within the /assets folder) is\n[Creative Commons licensed](https://github.com/verdaccio/verdaccio/blob/master/LICENSE-docs).\n"
66
+ }
package/src/server.ts CHANGED
@@ -9,7 +9,8 @@ import url from 'url';
9
9
 
10
10
  import { findConfigFile, parseConfigFile } from '@verdaccio/config';
11
11
  import { API_ERROR } from '@verdaccio/core';
12
- import { logger, setup } from '@verdaccio/logger';
12
+ import { setup } from '@verdaccio/logger';
13
+ import { LoggerConfigItem } from '@verdaccio/logger/src/logger';
13
14
  import server from '@verdaccio/server';
14
15
  import { ConfigRuntime, HttpsConfKeyCert, HttpsConfPfx } from '@verdaccio/types';
15
16
 
@@ -108,7 +109,7 @@ export async function initServer(
108
109
  return new Promise(async (resolve, reject) => {
109
110
  // FIXME: get only the first match, the multiple address will be removed
110
111
  const [addr] = getListListenAddresses(port, config.listen);
111
- const logger = setup((config as ConfigRuntime).logs);
112
+ const logger = setup(config?.log as LoggerConfigItem);
112
113
  displayExperimentsInfoBox(config.flags);
113
114
  const app = await server(config);
114
115
  const serverFactory = createServerFactory(config, addr, app);
@@ -172,14 +173,14 @@ export async function runServer(config?: string | ConfigRuntime): Promise<any> {
172
173
  let configurationParsed: ConfigRuntime;
173
174
  if (config === undefined || typeof config === 'string') {
174
175
  const configPathLocation = findConfigFile(config);
175
- configurationParsed = parseConfigFile(configPathLocation);
176
+ configurationParsed = parseConfigFile(configPathLocation) as ConfigRuntime;
176
177
  } else if (_.isObject(config)) {
177
178
  configurationParsed = config;
178
179
  } else {
179
180
  throw new Error(API_ERROR.CONFIG_BAD_FORMAT);
180
181
  }
181
182
 
182
- setup(configurationParsed.logs);
183
+ setup(configurationParsed.log as LoggerConfigItem);
183
184
  displayExperimentsInfoBox(configurationParsed.flags);
184
185
  // FIXME: get only the first match, the multiple address will be removed
185
186
  const [addr] = getListListenAddresses(undefined, configurationParsed.listen);