@verdaccio/types 11.0.0-6-next.9 → 11.0.0-6-next.12

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 +84 -0
  2. package/index.d.ts +73 -13
  3. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,89 @@
1
1
  # Change Log
2
2
 
3
+ ## 11.0.0-6-next.12
4
+
5
+ ### Minor Changes
6
+
7
+ - d43894e8: feat: rework web header for mobile, add new settings and raw manifest button
8
+
9
+ ### New set of variables to hide features
10
+
11
+ Add set of new variables that allow hide different parts of the UI, buttons, footer or download tarballs. _All are
12
+ enabled by default_.
13
+
14
+ ```yaml
15
+ # login: true <-- already exist but worth the reminder
16
+ # showInfo: true
17
+ # showSettings: true
18
+ # In combination with darkMode you can force specific theme
19
+ # showThemeSwitch: true
20
+ # showFooter: true
21
+ # showSearch: true
22
+ # showDownloadTarball: true
23
+ ```
24
+
25
+ > If you disable `showThemeSwitch` and force `darkMode: true` the local storage settings would be
26
+ > ignored and force all themes to the one in the configuration file.
27
+
28
+ Future could be extended to
29
+
30
+ ### Raw button to display manifest package
31
+
32
+ A new experimental feature (enabled by default), button named RAW to be able navigate on the package manifest directly on the ui, kudos to [react-json-view](https://www.npmjs.com/package/react-json-view) that allows an easy integration, not configurable yet until get more feedback.
33
+
34
+ ```yaml
35
+ showRaw: true
36
+ ```
37
+
38
+ #### Rework header buttons
39
+
40
+ - The header has been rework, the mobile was not looking broken.
41
+ - Removed info button in the header and moved to a dialog
42
+ - Info dialog now contains more information about the project, license and the aid content for Ukrania now is inside of the info modal.
43
+ - Separate settings and info to avoid collapse too much info (for mobile still need some work)
44
+
45
+ ## 11.0.0-6-next.11
46
+
47
+ ### Major Changes
48
+
49
+ - 82cb0f2b: feat!: config.logs throw an error, logging config not longer accept array or logs property
50
+
51
+ ### 💥 Breaking change
52
+
53
+ This is valid
54
+
55
+ ```yaml
56
+ log: { type: stdout, format: pretty, level: http }
57
+ ```
58
+
59
+ This is invalid
60
+
61
+ ```yaml
62
+ logs: { type: stdout, format: pretty, level: http }
63
+ ```
64
+
65
+ or
66
+
67
+ ```yaml
68
+ logs:
69
+ - [{ type: stdout, format: pretty, level: http }]
70
+ ```
71
+
72
+ ### Minor Changes
73
+
74
+ - 5167bb52: feat: ui search support for remote, local and private packages
75
+
76
+ The command `npm search` search globally and return all matches, with this improvement the user interface
77
+ is powered with the same capabilities.
78
+
79
+ The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
80
+
81
+ ## 11.0.0-6-next.10
82
+
83
+ ### Major Changes
84
+
85
+ - 000d4374: feat: upgrade to material ui 5
86
+
3
87
  ## 11.0.0-6-next.9
4
88
 
5
89
  ### 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,21 @@ declare module '@verdaccio/types' {
40
40
  darkMode?: boolean;
41
41
  protocol?: string;
42
42
  host?: string;
43
+ // deprecated
44
+ basename?: string;
45
+ scope?: string;
46
+ showInfo?: boolean;
47
+ showSettings?: boolean;
48
+ showSearch?: boolean;
49
+ showFooter?: boolean;
50
+ showThemeSwitch?: boolean;
51
+ showDownloadTarball?: boolean;
52
+ showRaw?: boolean;
43
53
  base: string;
44
54
  primaryColor?: string;
45
55
  version?: string;
46
56
  logoURI?: string;
57
+ flags: FlagsConfig;
47
58
  } & CommonWebConf;
48
59
 
49
60
  /**
@@ -177,6 +188,9 @@ declare module '@verdaccio/types' {
177
188
  [key: string]: boolean;
178
189
  }
179
190
 
191
+ /**
192
+ * @deprecated use Manifest instead
193
+ */
180
194
  interface Package {
181
195
  _id?: string;
182
196
  name: string;
@@ -191,6 +205,20 @@ declare module '@verdaccio/types' {
191
205
  _rev: string;
192
206
  }
193
207
 
208
+ interface Manifest {
209
+ _id?: string;
210
+ name: string;
211
+ versions: Versions;
212
+ 'dist-tags': GenericBody;
213
+ time: GenericBody;
214
+ readme?: string;
215
+ users?: PackageUsers;
216
+ _distfiles: DistFiles;
217
+ _attachments: AttachMents;
218
+ _uplinks: UpLinks;
219
+ _rev: string;
220
+ }
221
+
194
222
  interface IUploadTarball extends PassThrough {
195
223
  abort(): void;
196
224
  done(): void;
@@ -314,10 +342,6 @@ declare module '@verdaccio/types' {
314
342
  sync(): void;
315
343
  }
316
344
 
317
- interface LoggerConf {
318
- [key: string]: LoggerConfItem;
319
- }
320
-
321
345
  interface ListenAddress {
322
346
  [key: string]: string;
323
347
  }
@@ -367,11 +391,11 @@ declare module '@verdaccio/types' {
367
391
  api: APITokenOptions;
368
392
  }
369
393
 
370
- interface ConfigFlags {
371
- token?: boolean;
372
- search?: boolean;
394
+ export type FlagsConfig = {
395
+ searchRemote?: boolean;
373
396
  changePassword?: boolean;
374
- }
397
+ };
398
+
375
399
  export type RateLimit = {
376
400
  windowMs: number;
377
401
  max: number;
@@ -399,9 +423,8 @@ declare module '@verdaccio/types' {
399
423
  storage?: string | void;
400
424
  packages: PackageList;
401
425
  uplinks: UpLinksConfList;
402
- // @deprecated in favor of log
403
- logs?: LoggerConf[];
404
- log?: LoggerConf[];
426
+ // FUTURE: log should be mandatory
427
+ log?: LoggerConfItem;
405
428
  web?: WebConf;
406
429
  auth?: AuthConf;
407
430
  security: Security;
@@ -420,7 +443,7 @@ declare module '@verdaccio/types' {
420
443
  filters?: any;
421
444
  url_prefix?: string;
422
445
  server?: ServerSettingsConf;
423
- flags?: ConfigFlags;
446
+ flags?: FlagsConfig;
424
447
  }
425
448
 
426
449
  interface ConfigRuntime extends ConfigYaml {
@@ -437,6 +460,29 @@ declare module '@verdaccio/types' {
437
460
  [key: string]: any;
438
461
  }
439
462
 
463
+ type PublisherMaintainer = {
464
+ username: string;
465
+ email: string;
466
+ };
467
+
468
+ type SearchPackageBody = {
469
+ name: string;
470
+ scope: string;
471
+ description: string;
472
+ author: string | PublisherMaintainer;
473
+ version: string;
474
+ keywords: string | string[] | undefined;
475
+ date: string;
476
+ links?: {
477
+ npm: string; // only include placeholder for URL eg: {url}/{packageName}
478
+ homepage?: string;
479
+ repository?: string;
480
+ bugs?: string;
481
+ };
482
+ publisher?: any;
483
+ maintainers?: PublisherMaintainer[];
484
+ };
485
+
440
486
  interface ConfigWithHttps extends Config {
441
487
  https: HttpsConf;
442
488
  }
@@ -476,6 +522,7 @@ declare module '@verdaccio/types' {
476
522
  createPackage(pkgName: string, value: Package, cb: CallbackAction): void;
477
523
  deletePackage(fileName: string): Promise<void>;
478
524
  removePackage(): Promise<void>;
525
+ // @deprecated
479
526
  updatePackage(
480
527
  pkgFileName: string,
481
528
  updateHandler: StorageUpdateCallback,
@@ -483,7 +530,14 @@ declare module '@verdaccio/types' {
483
530
  transformPackage: PackageTransformer,
484
531
  onEnd: Callback
485
532
  ): void;
533
+ // @deprecated
486
534
  savePackage(fileName: string, json: Package, callback: CallbackAction): void;
535
+ // next packages migration (this list is meant to replace the callback parent functions)
536
+ updatePackageNext(
537
+ packageName: string,
538
+ handleUpdate: (manifest: Package) => Promise<Package>
539
+ ): Promise<Package>;
540
+ savePackageNext(name: string, value: Package): Promise<void>;
487
541
  }
488
542
 
489
543
  interface TarballActions {
@@ -576,4 +630,10 @@ declare module '@verdaccio/types' {
576
630
  interface IPluginStorageFilter<T> extends IPlugin<T> {
577
631
  filter_metadata(packageInfo: Package): Promise<Package>;
578
632
  }
633
+
634
+ export type SearchResultWeb = {
635
+ name: string;
636
+ version: string;
637
+ description: string;
638
+ };
579
639
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "11.0.0-6-next.9",
3
+ "version": "11.0.0-6-next.12",
4
4
  "description": "verdaccio types definitions",
5
5
  "keywords": [
6
6
  "private",
@@ -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",