@verdaccio/config 9.0.0-next-9.2 → 9.0.0-next-9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/builder.d.ts +2 -1
- package/build/builder.js +4 -0
- package/build/builder.js.map +1 -1
- package/build/conf/default.yaml +6 -0
- package/build/conf/docker.yaml +6 -0
- package/package.json +3 -3
package/build/builder.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthConf, ConfigYaml, LoggerConfigItem, PackageAccessYaml, Security, UpLinkConf } from '@verdaccio/types';
|
|
1
|
+
import type { AuthConf, ConfigYaml, LoggerConfigItem, PackageAccessYaml, Security, ServerSettingsConf, UpLinkConf } from '@verdaccio/types';
|
|
2
2
|
/**
|
|
3
3
|
* Helper configuration builder constructor, used to build the configuration for testing or
|
|
4
4
|
* programatically creating a configuration.
|
|
@@ -12,6 +12,7 @@ export default class ConfigBuilder {
|
|
|
12
12
|
addSecurity(security: Partial<Security>): this;
|
|
13
13
|
addAuth(auth: Partial<AuthConf>): this;
|
|
14
14
|
addLogger(log: LoggerConfigItem): this;
|
|
15
|
+
addServer(server: Partial<ServerSettingsConf>): this;
|
|
15
16
|
addStorage(storage: string | object): this;
|
|
16
17
|
getConfig(): ConfigYaml;
|
|
17
18
|
getAsYaml(): string;
|
package/build/builder.js
CHANGED
|
@@ -42,6 +42,10 @@ class ConfigBuilder {
|
|
|
42
42
|
this.config.log = log;
|
|
43
43
|
return this;
|
|
44
44
|
}
|
|
45
|
+
addServer(server) {
|
|
46
|
+
this.config.server = (0, _lodash.merge)(this.config.server, server);
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
45
49
|
addStorage(storage) {
|
|
46
50
|
if (typeof storage === 'string') {
|
|
47
51
|
this.config.storage = storage;
|
package/build/builder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","names":["_lodash","require","_","ConfigBuilder","constructor","config","merge","uplinks","packages","security","build","addPackageAccess","pattern","pkgAccess","addUplink","id","uplink","addSecurity","addAuth","auth","addLogger","log","addStorage","storage","store","getConfig","getAsYaml","fromJStoYAML","exports","default"],"sources":["../src/builder.ts"],"sourcesContent":["import { merge } from 'lodash';\n\nimport type {\n AuthConf,\n ConfigYaml,\n LoggerConfigItem,\n PackageAccessYaml,\n Security,\n UpLinkConf,\n} from '@verdaccio/types';\n\nimport { fromJStoYAML } from '.';\n\n/**\n * Helper configuration builder constructor, used to build the configuration for testing or\n * programatically creating a configuration.\n */\nexport default class ConfigBuilder {\n private config: ConfigYaml;\n\n public constructor(config?: Partial<ConfigYaml>) {\n this.config = merge(config, { uplinks: {}, packages: {}, security: {} });\n }\n\n public static build(config?: Partial<ConfigYaml>): ConfigBuilder {\n return new ConfigBuilder(config);\n }\n\n public addPackageAccess(pattern: string, pkgAccess: PackageAccessYaml) {\n // @ts-ignore\n this.config.packages[pattern] = pkgAccess;\n return this;\n }\n\n public addUplink(id: string, uplink: UpLinkConf) {\n this.config.uplinks[id] = uplink;\n return this;\n }\n\n public addSecurity(security: Partial<Security>) {\n this.config.security = merge(this.config.security, security);\n return this;\n }\n\n public addAuth(auth: Partial<AuthConf>) {\n this.config.auth = merge(this.config.auth, auth);\n return this;\n }\n\n public addLogger(log: LoggerConfigItem) {\n this.config.log = log;\n return this;\n }\n\n public addStorage(storage: string | object) {\n if (typeof storage === 'string') {\n this.config.storage = storage;\n } else {\n this.config.store = storage;\n }\n return this;\n }\n\n public getConfig(): ConfigYaml {\n return this.config;\n }\n\n public getAsYaml(): string {\n return fromJStoYAML(this.config) as string;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"file":"builder.js","names":["_lodash","require","_","ConfigBuilder","constructor","config","merge","uplinks","packages","security","build","addPackageAccess","pattern","pkgAccess","addUplink","id","uplink","addSecurity","addAuth","auth","addLogger","log","addServer","server","addStorage","storage","store","getConfig","getAsYaml","fromJStoYAML","exports","default"],"sources":["../src/builder.ts"],"sourcesContent":["import { merge } from 'lodash';\n\nimport type {\n AuthConf,\n ConfigYaml,\n LoggerConfigItem,\n PackageAccessYaml,\n Security,\n ServerSettingsConf,\n UpLinkConf,\n} from '@verdaccio/types';\n\nimport { fromJStoYAML } from '.';\n\n/**\n * Helper configuration builder constructor, used to build the configuration for testing or\n * programatically creating a configuration.\n */\nexport default class ConfigBuilder {\n private config: ConfigYaml;\n\n public constructor(config?: Partial<ConfigYaml>) {\n this.config = merge(config, { uplinks: {}, packages: {}, security: {} });\n }\n\n public static build(config?: Partial<ConfigYaml>): ConfigBuilder {\n return new ConfigBuilder(config);\n }\n\n public addPackageAccess(pattern: string, pkgAccess: PackageAccessYaml) {\n // @ts-ignore\n this.config.packages[pattern] = pkgAccess;\n return this;\n }\n\n public addUplink(id: string, uplink: UpLinkConf) {\n this.config.uplinks[id] = uplink;\n return this;\n }\n\n public addSecurity(security: Partial<Security>) {\n this.config.security = merge(this.config.security, security);\n return this;\n }\n\n public addAuth(auth: Partial<AuthConf>) {\n this.config.auth = merge(this.config.auth, auth);\n return this;\n }\n\n public addLogger(log: LoggerConfigItem) {\n this.config.log = log;\n return this;\n }\n\n public addServer(server: Partial<ServerSettingsConf>) {\n this.config.server = merge(this.config.server, server);\n return this;\n }\n\n public addStorage(storage: string | object) {\n if (typeof storage === 'string') {\n this.config.storage = storage;\n } else {\n this.config.store = storage;\n }\n return this;\n }\n\n public getConfig(): ConfigYaml {\n return this.config;\n }\n\n public getAsYaml(): string {\n return fromJStoYAML(this.config) as string;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAYA,IAAAC,CAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACe,MAAME,aAAa,CAAC;EAG1BC,WAAWA,CAACC,MAA4B,EAAE;IAC/C,IAAI,CAACA,MAAM,GAAG,IAAAC,aAAK,EAACD,MAAM,EAAE;MAAEE,OAAO,EAAE,CAA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,MAAM;MACL,IAAI,CAACpB,MAAM,CAACqB,KAAK,GAAGD,OAAO;IAC7B;IACA,OAAO,IAAI;EACb;EAEOE,SAASA,CAAA,EAAe;IAC7B,OAAO,IAAI,CAACtB,MAAM;EACpB;EAEOuB,SAASA,CAAA,EAAW;IACzB,OAAO,IAAAC,cAAY,EAAC,IAAI,CAACxB,MAAM,CAAC;EAClC;AACF;AAACyB,OAAA,CAAAC,OAAA,GAAA5B,aAAA","ignoreList":[]}
|
package/build/conf/default.yaml
CHANGED
|
@@ -120,6 +120,12 @@ packages:
|
|
|
120
120
|
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
|
121
121
|
server:
|
|
122
122
|
keepAliveTimeout: 60
|
|
123
|
+
# Controls how requests with dotfile path segments (e.g. /.env, /.well-known/) are handled.
|
|
124
|
+
# 'deny' returns 403, 'ignore' returns 404 (default), 'allow' passes through.
|
|
125
|
+
dotfiles: ignore
|
|
126
|
+
# Hide static file requests (/-/static/*) from pino logs.
|
|
127
|
+
# They remain visible via DEBUG=verdaccio:middleware:log.
|
|
128
|
+
# hideStaticLogs: true
|
|
123
129
|
# The pluginPrefix replaces the default plugins prefix which is `verdaccio`. Please don't include `-`. If `something` is provided
|
|
124
130
|
# the resolved package will be `something-xxxx`.
|
|
125
131
|
# pluginPrefix: something
|
package/build/conf/docker.yaml
CHANGED
|
@@ -116,6 +116,12 @@ packages:
|
|
|
116
116
|
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
|
|
117
117
|
server:
|
|
118
118
|
keepAliveTimeout: 60
|
|
119
|
+
# Controls how requests with dotfile path segments (e.g. /.env, /.well-known/) are handled.
|
|
120
|
+
# 'deny' returns 403, 'ignore' returns 404 (default), 'allow' passes through.
|
|
121
|
+
dotfiles: ignore
|
|
122
|
+
# Hide static file requests (/-/static/*) from pino logs.
|
|
123
|
+
# They remain visible via DEBUG=verdaccio:middleware:log.
|
|
124
|
+
# hideStaticLogs: true
|
|
119
125
|
# The pluginPrefix replaces the default plugins prefix which is `verdaccio`. Please don't include `-`. If `something` is provided
|
|
120
126
|
# the resolved package will be `something-xxxx`.
|
|
121
127
|
# pluginPrefix: something
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/config",
|
|
3
|
-
"version": "9.0.0-next-9.
|
|
3
|
+
"version": "9.0.0-next-9.3",
|
|
4
4
|
"description": "Verdaccio Configuration",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"node": ">=24"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@verdaccio/core": "9.0.0-next-9.
|
|
36
|
+
"@verdaccio/core": "9.0.0-next-9.3",
|
|
37
37
|
"debug": "4.4.3",
|
|
38
38
|
"js-yaml": "4.1.1",
|
|
39
39
|
"lodash": "4.17.23"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@verdaccio/types": "14.0.0-next-9.
|
|
42
|
+
"@verdaccio/types": "14.0.0-next-9.1",
|
|
43
43
|
"vitest": "3.2.4"
|
|
44
44
|
},
|
|
45
45
|
"funding": {
|