@verdaccio/types 11.0.0-6-next.8 → 11.0.0-6-next.11

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/index.d.ts +67 -14
  3. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # Change Log
2
2
 
3
+ ## 11.0.0-6-next.11
4
+
5
+ ### Major Changes
6
+
7
+ - 82cb0f2b: feat!: config.logs throw an error, logging config not longer accept array or logs property
8
+
9
+ ### 💥 Breaking change
10
+
11
+ This is valid
12
+
13
+ ```yaml
14
+ log: { type: stdout, format: pretty, level: http }
15
+ ```
16
+
17
+ This is invalid
18
+
19
+ ```yaml
20
+ logs: { type: stdout, format: pretty, level: http }
21
+ ```
22
+
23
+ or
24
+
25
+ ```yaml
26
+ logs:
27
+ - [{ type: stdout, format: pretty, level: http }]
28
+ ```
29
+
30
+ ### Minor Changes
31
+
32
+ - 5167bb52: feat: ui search support for remote, local and private packages
33
+
34
+ The command `npm search` search globally and return all matches, with this improvement the user interface
35
+ is powered with the same capabilities.
36
+
37
+ The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
38
+
39
+ ## 11.0.0-6-next.10
40
+
41
+ ### Major Changes
42
+
43
+ - 000d4374: feat: upgrade to material ui 5
44
+
45
+ ## 11.0.0-6-next.9
46
+
47
+ ### Major Changes
48
+
49
+ - 794af76c: Remove Node 12 support
50
+
51
+ - We need move to the new `undici` and does not support Node.js 12
52
+
53
+ ### Minor Changes
54
+
55
+ - 154b2ecd: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
56
+
3
57
  ## 11.0.0-6-next.8
4
58
 
5
59
  ### Major Changes
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
-
3
2
  import { PassThrough } from 'stream';
3
+
4
4
  declare module '@verdaccio/types' {
5
5
  type StringValue = string | void | null;
6
6
 
@@ -40,10 +40,14 @@ declare module '@verdaccio/types' {
40
40
  darkMode?: boolean;
41
41
  protocol?: string;
42
42
  host?: string;
43
+ // deprecated
44
+ basename?: string;
45
+ scope?: string;
43
46
  base: string;
44
47
  primaryColor?: string;
45
48
  version?: string;
46
49
  logoURI?: string;
50
+ flags: FlagsConfig;
47
51
  } & CommonWebConf;
48
52
 
49
53
  /**
@@ -177,6 +181,9 @@ declare module '@verdaccio/types' {
177
181
  [key: string]: boolean;
178
182
  }
179
183
 
184
+ /**
185
+ * @deprecated use Manifest instead
186
+ */
180
187
  interface Package {
181
188
  _id?: string;
182
189
  name: string;
@@ -191,6 +198,20 @@ declare module '@verdaccio/types' {
191
198
  _rev: string;
192
199
  }
193
200
 
201
+ interface Manifest {
202
+ _id?: string;
203
+ name: string;
204
+ versions: Versions;
205
+ 'dist-tags': GenericBody;
206
+ time: GenericBody;
207
+ readme?: string;
208
+ users?: PackageUsers;
209
+ _distfiles: DistFiles;
210
+ _attachments: AttachMents;
211
+ _uplinks: UpLinks;
212
+ _rev: string;
213
+ }
214
+
194
215
  interface IUploadTarball extends PassThrough {
195
216
  abort(): void;
196
217
  done(): void;
@@ -314,10 +335,6 @@ declare module '@verdaccio/types' {
314
335
  sync(): void;
315
336
  }
316
337
 
317
- interface LoggerConf {
318
- [key: string]: LoggerConfItem;
319
- }
320
-
321
338
  interface ListenAddress {
322
339
  [key: string]: string;
323
340
  }
@@ -367,11 +384,11 @@ declare module '@verdaccio/types' {
367
384
  api: APITokenOptions;
368
385
  }
369
386
 
370
- interface ConfigFlags {
371
- token?: boolean;
372
- search?: boolean;
387
+ export type FlagsConfig = {
388
+ searchRemote?: boolean;
373
389
  changePassword?: boolean;
374
- }
390
+ };
391
+
375
392
  export type RateLimit = {
376
393
  windowMs: number;
377
394
  max: number;
@@ -399,9 +416,8 @@ declare module '@verdaccio/types' {
399
416
  storage?: string | void;
400
417
  packages: PackageList;
401
418
  uplinks: UpLinksConfList;
402
- // @deprecated in favor of log
403
- logs?: LoggerConf[];
404
- log?: LoggerConf[];
419
+ // FUTURE: log should be mandatory
420
+ log?: LoggerConfItem;
405
421
  web?: WebConf;
406
422
  auth?: AuthConf;
407
423
  security: Security;
@@ -420,7 +436,7 @@ declare module '@verdaccio/types' {
420
436
  filters?: any;
421
437
  url_prefix?: string;
422
438
  server?: ServerSettingsConf;
423
- flags?: ConfigFlags;
439
+ flags?: FlagsConfig;
424
440
  }
425
441
 
426
442
  interface ConfigRuntime extends ConfigYaml {
@@ -437,6 +453,29 @@ declare module '@verdaccio/types' {
437
453
  [key: string]: any;
438
454
  }
439
455
 
456
+ type PublisherMaintainer = {
457
+ username: string;
458
+ email: string;
459
+ };
460
+
461
+ type SearchPackageBody = {
462
+ name: string;
463
+ scope: string;
464
+ description: string;
465
+ author: string | PublisherMaintainer;
466
+ version: string;
467
+ keywords: string | string[] | undefined;
468
+ date: string;
469
+ links?: {
470
+ npm: string; // only include placeholder for URL eg: {url}/{packageName}
471
+ homepage?: string;
472
+ repository?: string;
473
+ bugs?: string;
474
+ };
475
+ publisher?: any;
476
+ maintainers?: PublisherMaintainer[];
477
+ };
478
+
440
479
  interface ConfigWithHttps extends Config {
441
480
  https: HttpsConf;
442
481
  }
@@ -476,6 +515,7 @@ declare module '@verdaccio/types' {
476
515
  createPackage(pkgName: string, value: Package, cb: CallbackAction): void;
477
516
  deletePackage(fileName: string): Promise<void>;
478
517
  removePackage(): Promise<void>;
518
+ // @deprecated
479
519
  updatePackage(
480
520
  pkgFileName: string,
481
521
  updateHandler: StorageUpdateCallback,
@@ -483,7 +523,14 @@ declare module '@verdaccio/types' {
483
523
  transformPackage: PackageTransformer,
484
524
  onEnd: Callback
485
525
  ): void;
526
+ // @deprecated
486
527
  savePackage(fileName: string, json: Package, callback: CallbackAction): void;
528
+ // next packages migration (this list is meant to replace the callback parent functions)
529
+ updatePackageNext(
530
+ packageName: string,
531
+ handleUpdate: (manifest: Package) => Promise<Package>
532
+ ): Promise<Package>;
533
+ savePackageNext(name: string, value: Package): Promise<void>;
487
534
  }
488
535
 
489
536
  interface TarballActions {
@@ -532,7 +579,7 @@ declare module '@verdaccio/types' {
532
579
 
533
580
  // FIXME: error should be export type `VerdaccioError = HttpError & { code: number };`
534
581
  // instead of AuthError
535
- // but this type is on @verdaccio/commons-api and cannot be used here yet (I don't know why)
582
+ // but this type is on @verdaccio/core and cannot be used here yet (I don't know why)
536
583
  interface HttpError extends Error {
537
584
  status: number;
538
585
  statusCode: number;
@@ -576,4 +623,10 @@ declare module '@verdaccio/types' {
576
623
  interface IPluginStorageFilter<T> extends IPlugin<T> {
577
624
  filter_metadata(packageInfo: Package): Promise<Package>;
578
625
  }
626
+
627
+ export type SearchResultWeb = {
628
+ name: string;
629
+ version: string;
630
+ description: string;
631
+ };
579
632
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "11.0.0-6-next.8",
3
+ "version": "11.0.0-6-next.11",
4
4
  "description": "verdaccio types definitions",
5
5
  "keywords": [
6
6
  "private",
@@ -17,7 +17,7 @@
17
17
  "license": "MIT",
18
18
  "homepage": "https://verdaccio.org",
19
19
  "engines": {
20
- "node": ">=10",
20
+ "node": ">=14",
21
21
  "npm": ">=6"
22
22
  },
23
23
  "repository": {
@@ -38,7 +38,8 @@
38
38
  "build": "exit 0"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/node": "14.6.0"
41
+ "@types/node": "16.11.21",
42
+ "tsd": "0.19.1"
42
43
  },
43
44
  "funding": {
44
45
  "type": "opencollective",