@verdaccio/types 14.0.0-next-9.4 → 14.0.0-next-9.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "14.0.0-next-9.4",
3
+ "version": "14.0.0-next-9.6",
4
4
  "description": "Verdaccio Type Definitions",
5
5
  "keywords": [
6
6
  "private",
@@ -89,14 +89,6 @@ export type RateLimit = {
89
89
  * All flags are optional and default to `false` when not specified.
90
90
  */
91
91
  export type FlagsConfig = {
92
- /**
93
- * Enables searching for packages in remote registries.
94
- * If `false`, only the local registry will be queried.
95
- *
96
- * @default false
97
- */
98
- searchRemote?: boolean;
99
-
100
92
  /**
101
93
  * Enables user password change functionality.
102
94
  *
@@ -342,8 +334,6 @@ export interface Config extends Omit<ConfigYaml, 'packages' | 'security' | 'conf
342
334
  secret: string;
343
335
  // save the configuration file path, it's fails without thi configPath
344
336
  configPath: string;
345
- // @deprecated use configPath
346
- self_path?: string;
347
337
  // packages from yaml file looks different from packages inside the config file
348
338
  packages: PackageList;
349
339
  // security object defaults is added by the config file but optional in the yaml file
package/src/search.ts CHANGED
@@ -21,8 +21,65 @@ export type SearchPackageBody = {
21
21
  maintainers?: PublisherMaintainer[];
22
22
  };
23
23
 
24
- export type SearchResultWeb = {
24
+ /**
25
+ * Flat response shape, e.g. from the local registry packument-style search:
26
+ *
27
+ * ```json
28
+ * { "name": "...", "version": "...", "description": "...", "dist": { ... } }
29
+ * ```
30
+ */
31
+ export type SearchResultWebFlat = {
25
32
  name: string;
26
33
  version: string;
27
- description: string;
34
+ description?: string;
35
+ main?: string;
36
+ readmeFilename?: string;
37
+ dependencies?: Record<string, string>;
38
+ dist?: {
39
+ shasum?: string;
40
+ tarball?: string;
41
+ };
42
+ contributors?: unknown[];
28
43
  };
44
+
45
+ /**
46
+ * npm-style "search objects" response where each entry is wrapped in a
47
+ * `package` envelope and carries verdaccio-specific metadata flags.
48
+ */
49
+ export type SearchResultWebWrapped = {
50
+ package: {
51
+ name: string;
52
+ version: string;
53
+ description?: string;
54
+ scope?: string;
55
+ keywords?: string[];
56
+ date?: string;
57
+ author?: PublisherMaintainer | { name?: string; email?: string };
58
+ publisher?: any;
59
+ maintainers?: Array<{ name?: string; email?: string }>;
60
+ links?: {
61
+ npm?: string;
62
+ homepage?: string;
63
+ repository?: any;
64
+ bugs?: any;
65
+ };
66
+ };
67
+ score?: {
68
+ final?: number;
69
+ detail?: {
70
+ maintenance?: number;
71
+ popularity?: number;
72
+ quality?: number;
73
+ };
74
+ };
75
+ searchScore?: number;
76
+ verdaccioPkgCached?: boolean;
77
+ verdaccioPrivate?: boolean;
78
+ };
79
+
80
+ /**
81
+ * Union of the two search response shapes the web UI can consume.
82
+ * The Search component auto-detects the shape at render time — no feature
83
+ * flag is required to switch between them.
84
+ */
85
+ export type SearchResultWeb = SearchResultWebFlat | SearchResultWebWrapped;