@verdaccio/types 11.0.0-6-next.10 → 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 +36 -0
  2. package/index.d.ts +58 -12
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
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
+
3
39
  ## 11.0.0-6-next.10
4
40
 
5
41
  ### Major Changes
package/index.d.ts CHANGED
@@ -40,11 +40,14 @@ declare module '@verdaccio/types' {
40
40
  darkMode?: boolean;
41
41
  protocol?: string;
42
42
  host?: string;
43
+ // deprecated
44
+ basename?: string;
43
45
  scope?: string;
44
46
  base: string;
45
47
  primaryColor?: string;
46
48
  version?: string;
47
49
  logoURI?: string;
50
+ flags: FlagsConfig;
48
51
  } & CommonWebConf;
49
52
 
50
53
  /**
@@ -178,6 +181,9 @@ declare module '@verdaccio/types' {
178
181
  [key: string]: boolean;
179
182
  }
180
183
 
184
+ /**
185
+ * @deprecated use Manifest instead
186
+ */
181
187
  interface Package {
182
188
  _id?: string;
183
189
  name: string;
@@ -192,6 +198,20 @@ declare module '@verdaccio/types' {
192
198
  _rev: string;
193
199
  }
194
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
+
195
215
  interface IUploadTarball extends PassThrough {
196
216
  abort(): void;
197
217
  done(): void;
@@ -315,10 +335,6 @@ declare module '@verdaccio/types' {
315
335
  sync(): void;
316
336
  }
317
337
 
318
- interface LoggerConf {
319
- [key: string]: LoggerConfItem;
320
- }
321
-
322
338
  interface ListenAddress {
323
339
  [key: string]: string;
324
340
  }
@@ -368,11 +384,11 @@ declare module '@verdaccio/types' {
368
384
  api: APITokenOptions;
369
385
  }
370
386
 
371
- interface ConfigFlags {
372
- token?: boolean;
373
- search?: boolean;
387
+ export type FlagsConfig = {
388
+ searchRemote?: boolean;
374
389
  changePassword?: boolean;
375
- }
390
+ };
391
+
376
392
  export type RateLimit = {
377
393
  windowMs: number;
378
394
  max: number;
@@ -400,9 +416,8 @@ declare module '@verdaccio/types' {
400
416
  storage?: string | void;
401
417
  packages: PackageList;
402
418
  uplinks: UpLinksConfList;
403
- // @deprecated in favor of log
404
- logs?: LoggerConf[];
405
- log?: LoggerConf[];
419
+ // FUTURE: log should be mandatory
420
+ log?: LoggerConfItem;
406
421
  web?: WebConf;
407
422
  auth?: AuthConf;
408
423
  security: Security;
@@ -421,7 +436,7 @@ declare module '@verdaccio/types' {
421
436
  filters?: any;
422
437
  url_prefix?: string;
423
438
  server?: ServerSettingsConf;
424
- flags?: ConfigFlags;
439
+ flags?: FlagsConfig;
425
440
  }
426
441
 
427
442
  interface ConfigRuntime extends ConfigYaml {
@@ -438,6 +453,29 @@ declare module '@verdaccio/types' {
438
453
  [key: string]: any;
439
454
  }
440
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
+
441
479
  interface ConfigWithHttps extends Config {
442
480
  https: HttpsConf;
443
481
  }
@@ -477,6 +515,7 @@ declare module '@verdaccio/types' {
477
515
  createPackage(pkgName: string, value: Package, cb: CallbackAction): void;
478
516
  deletePackage(fileName: string): Promise<void>;
479
517
  removePackage(): Promise<void>;
518
+ // @deprecated
480
519
  updatePackage(
481
520
  pkgFileName: string,
482
521
  updateHandler: StorageUpdateCallback,
@@ -484,7 +523,14 @@ declare module '@verdaccio/types' {
484
523
  transformPackage: PackageTransformer,
485
524
  onEnd: Callback
486
525
  ): void;
526
+ // @deprecated
487
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>;
488
534
  }
489
535
 
490
536
  interface TarballActions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "11.0.0-6-next.10",
3
+ "version": "11.0.0-6-next.11",
4
4
  "description": "verdaccio types definitions",
5
5
  "keywords": [
6
6
  "private",
@@ -38,8 +38,8 @@
38
38
  "build": "exit 0"
39
39
  },
40
40
  "devDependencies": {
41
- "@types/node": "14.6.0",
42
- "tsd": "0.18.0"
41
+ "@types/node": "16.11.21",
42
+ "tsd": "0.19.1"
43
43
  },
44
44
  "funding": {
45
45
  "type": "opencollective",