@verdaccio/types 13.0.0-next-8.1 → 13.0.0-next-8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## 13.0.0-next-8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0588605: chore: `keep_readmes` docs
8
+ - ca91b9a: fix: config builder `addLogger`
9
+
10
+ ## 13.0.0-next-8.2
11
+
12
+ ### Patch Changes
13
+
14
+ - e308fbb: chore: move agent_options to config
15
+ - b6ea32c: chore: add `error` to log level enum
16
+ - 4adaa83: chore: fix typedocs warnings
17
+ - 5cbee6f: fix: unpublish a package on storage package
18
+ - 538bb8f: feat: keep_readmes option when publishing packages
19
+
3
20
  ## 13.0.0-next-8.1
4
21
 
5
22
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "13.0.0-next-8.1",
3
+ "version": "13.0.0-next-8.3",
4
4
  "description": "verdaccio types definitions",
5
5
  "keywords": [
6
6
  "private",
@@ -1,3 +1,6 @@
1
+ import { AgentOptions as HttpAgentOptions } from 'node:http';
2
+ import { AgentOptions as HttpsAgentOptions } from 'node:https';
3
+
1
4
  import { PackageAccess, PackageList } from '@verdaccio/types/src/manifest';
2
5
 
3
6
  export type TypeToken = 'Bearer' | 'Basic';
@@ -14,13 +17,13 @@ export interface Logger {
14
17
 
15
18
  export type LoggerType = 'stdout' | 'file';
16
19
  export type LoggerFormat = 'pretty' | 'pretty-timestamped' | 'json';
17
- export type LoggerLevel = 'http' | 'fatal' | 'warn' | 'info' | 'debug' | 'trace';
20
+ export type LoggerLevel = 'fatal' | 'error' | 'warn' | 'info' | 'http' | 'debug' | 'trace';
18
21
 
19
22
  export type LoggerConfigItem = {
20
23
  type?: LoggerType;
21
24
  format?: LoggerFormat;
22
25
  path?: string;
23
- level?: string;
26
+ level?: LoggerLevel;
24
27
  colors?: boolean;
25
28
  async?: boolean;
26
29
  };
@@ -37,16 +40,12 @@ export interface PackageAccessYaml {
37
40
  unpublish?: string;
38
41
  }
39
42
 
40
- export interface LoggerConfItem {
41
- type: LoggerType;
42
- format: LoggerFormat;
43
- level: LoggerLevel;
44
- }
45
-
46
43
  export interface Headers {
47
44
  [key: string]: string;
48
45
  }
49
46
 
47
+ export type AgentOptionsConf = HttpAgentOptions | HttpsAgentOptions;
48
+
50
49
  export interface UpLinkTokenConf {
51
50
  type: TypeToken;
52
51
  token?: string;
@@ -64,6 +63,7 @@ export interface UpLinkConf {
64
63
  headers?: Headers;
65
64
  auth?: UpLinkTokenConf;
66
65
  strict_ssl?: boolean | void;
66
+ agent_options?: AgentOptionsConf;
67
67
  _autogenerated?: boolean;
68
68
  }
69
69
 
@@ -196,8 +196,11 @@ export interface Security {
196
196
  api: APITokenOptions;
197
197
  }
198
198
 
199
+ export type ReadmeOptions = 'latest' | 'tagged' | 'all';
200
+
199
201
  export interface PublishOptions {
200
202
  allow_offline: boolean;
203
+ keep_readmes?: ReadmeOptions;
201
204
  check_owners: boolean;
202
205
  }
203
206
 
@@ -253,9 +256,9 @@ export interface ConfigYaml {
253
256
  storage?: string | void;
254
257
  packages: PackageList;
255
258
  uplinks: UpLinksConfList;
256
- log?: LoggerConfItem;
259
+ log?: LoggerConfigItem;
257
260
  // @deprecated deprecation path from 5.x
258
- logs?: LoggerConfItem;
261
+ logs?: LoggerConfigItem;
259
262
  web?: WebConf;
260
263
  auth?: AuthConf;
261
264
  security: Security;
package/src/manifest.ts CHANGED
@@ -255,6 +255,11 @@ export type AbbreviatedManifest = Pick<Manifest, 'name' | 'dist-tags' | 'time'>
255
255
  versions: AbbreviatedVersions;
256
256
  };
257
257
 
258
+ /**
259
+ *
260
+ */
261
+ export type UnPublishManifest = Omit<Manifest, '_attachments' | '_distfiles' | '_uplinks'>;
262
+
258
263
  export interface PublishManifest {
259
264
  /**
260
265
  * The `_attachments` object has different usages:
@@ -23,11 +23,11 @@ export interface ITokenActions {
23
23
  /**
24
24
  * This method expect return a Package object
25
25
  * eg:
26
- * {
26
+ * \{
27
27
  * name: string;
28
28
  * time: number;
29
29
  * ... and other props
30
- * }
30
+ * \}
31
31
  *
32
32
  * The `cb` callback object will be executed if:
33
33
  * - it might return object (truly)