@verdaccio/types
Advanced tools
Comparing version 11.0.0-6-next.16 to 11.0.0-6-next.17
@@ -183,2 +183,10 @@ import { PackageAccess, PackageList } from './manifest'; | ||
keepAliveTimeout?: number; | ||
/** | ||
* Plugins should be prefixed verdaccio-XXXXXX by default. | ||
* To override the default prefix, use this property without `-` | ||
* If you set pluginPrefix: acme, the packages to resolve will be | ||
* acme-XXXXXX | ||
*/ | ||
pluginPrefix?: string; | ||
passwordValidationRegex?: RegExp; | ||
}; | ||
@@ -202,3 +210,3 @@ /** | ||
http_proxy?: string; | ||
plugins?: string | void; | ||
plugins?: string | void | null; | ||
https_proxy?: string; | ||
@@ -218,3 +226,3 @@ no_proxy?: string; | ||
/** | ||
* Configuration object with additonal methods for configuration, includes yaml and internal medatada. | ||
* Configuration object with additional methods for configuration, includes yaml and internal medatada. | ||
* @interface Config | ||
@@ -221,0 +229,0 @@ * @extends {ConfigYaml} |
import { Config, Logger } from '../configuration'; | ||
export declare class Plugin<T> { | ||
constructor(config: T, options: PluginOptions<T>); | ||
constructor(config: T, options: PluginOptions); | ||
} | ||
@@ -8,5 +8,5 @@ export interface IPlugin<T> { | ||
} | ||
export interface PluginOptions<T> { | ||
config: T & Config; | ||
export interface PluginOptions { | ||
config: Config; | ||
logger: Logger; | ||
} |
import { Manifest } from '../manifest'; | ||
import { IPlugin } from './commons'; | ||
export interface IPluginStorageFilter<T> extends IPlugin<T> { | ||
filter_metadata(packageInfo: Manifest): Promise<Manifest>; | ||
filterMetadata(packageInfo: Manifest): Promise<Manifest>; | ||
} |
/// <reference types="node" /> | ||
import { Readable, Writable } from 'stream'; | ||
import { Callback, CallbackAction } from '../commons'; | ||
import { Config, Logger } from '../configuration'; | ||
import { Logger } from '../configuration'; | ||
import { Manifest, Token } from '../manifest'; | ||
@@ -71,3 +71,3 @@ import { IPlugin } from './commons'; | ||
logger: Logger; | ||
config: T & Config; | ||
config: T; | ||
add(name: string): Promise<void>; | ||
@@ -74,0 +74,0 @@ remove(name: string): Promise<void>; |
# Change Log | ||
## 11.0.0-6-next.17 | ||
### Major Changes | ||
- 9fc2e796: feat(plugins): improve plugin loader | ||
### Changes | ||
- Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227 | ||
- Avoid config collisions https://github.com/verdaccio/verdaccio/issues/928 | ||
- https://github.com/verdaccio/verdaccio/issues/1394 | ||
- `config.plugins` plugin path validations | ||
- Updated algorithm for plugin loader. | ||
- improved documentation (included dev) | ||
## Features | ||
- Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227 | ||
- Custom prefix: | ||
``` | ||
// config.yaml | ||
server: | ||
pluginPrefix: mycompany | ||
middleware: | ||
audit: | ||
foo: 1 | ||
``` | ||
This configuration will look up for `mycompany-audit` instead `Verdaccio-audit`. | ||
## Breaking Changes | ||
### sinopia plugins | ||
- `sinopia` fallback support is removed, but can be restored using `pluginPrefix` | ||
### plugin filter | ||
- method rename `filter_metadata`->`filterMetadata` | ||
### Plugin constructor does not merge configs anymore https://github.com/verdaccio/verdaccio/issues/928 | ||
The plugin receives as first argument `config`, which represents the config of the plugin. Example: | ||
``` | ||
// config.yaml | ||
auth: | ||
plugin: | ||
foo: 1 | ||
bar: 2 | ||
export class Plugin<T> { | ||
public constructor(config: T, options: PluginOptions) { | ||
console.log(config); | ||
// {foo:1, bar: 2} | ||
} | ||
} | ||
``` | ||
### Minor Changes | ||
- 62c24b63: feat: add passwordValidationRegex property | ||
## 11.0.0-6-next.16 | ||
@@ -4,0 +68,0 @@ |
{ | ||
"name": "@verdaccio/types", | ||
"version": "11.0.0-6-next.16", | ||
"version": "11.0.0-6-next.17", | ||
"description": "verdaccio types definitions", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/node": "16.11.56", | ||
"@types/node": "16.11.60", | ||
"typedoc": "beta", | ||
@@ -40,0 +40,0 @@ "typedoc-plugin-missing-exports": "1.0.0" |
@@ -229,2 +229,10 @@ import { PackageAccess, PackageList } from './manifest'; | ||
keepAliveTimeout?: number; | ||
/** | ||
* Plugins should be prefixed verdaccio-XXXXXX by default. | ||
* To override the default prefix, use this property without `-` | ||
* If you set pluginPrefix: acme, the packages to resolve will be | ||
* acme-XXXXXX | ||
*/ | ||
pluginPrefix?: string; | ||
passwordValidationRegex?: RegExp; | ||
}; | ||
@@ -249,3 +257,3 @@ | ||
http_proxy?: string; | ||
plugins?: string | void; | ||
plugins?: string | void | null; | ||
https_proxy?: string; | ||
@@ -269,3 +277,3 @@ no_proxy?: string; | ||
/** | ||
* Configuration object with additonal methods for configuration, includes yaml and internal medatada. | ||
* Configuration object with additional methods for configuration, includes yaml and internal medatada. | ||
* @interface Config | ||
@@ -272,0 +280,0 @@ * @extends {ConfigYaml} |
import { Config, Logger } from '../configuration'; | ||
export class Plugin<T> { | ||
public constructor(config: T, options: PluginOptions<T>) {} | ||
public constructor(config: T, options: PluginOptions) {} | ||
} | ||
@@ -12,5 +12,5 @@ | ||
export interface PluginOptions<T> { | ||
config: T & Config; | ||
export interface PluginOptions { | ||
config: Config; | ||
logger: Logger; | ||
} |
@@ -5,3 +5,3 @@ import { Manifest } from '../manifest'; | ||
export interface IPluginStorageFilter<T> extends IPlugin<T> { | ||
filter_metadata(packageInfo: Manifest): Promise<Manifest>; | ||
filterMetadata(packageInfo: Manifest): Promise<Manifest>; | ||
} |
@@ -87,3 +87,3 @@ import { PassThrough, PipelinePromise, Readable, Stream, Writable } from 'stream'; | ||
logger: Logger; | ||
config: T & Config; | ||
config: T; | ||
add(name: string): Promise<void>; | ||
@@ -90,0 +90,0 @@ remove(name: string): Promise<void>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78949
1425