@foss.global/codefeed 5.4.0 → 5.6.0

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.
@@ -43,13 +43,16 @@ export interface IGiteaSourceInventoryOptions {
43
43
  packageTransferTimeoutMs?: number;
44
44
  }
45
45
  /** A class of source data a run measures only when its discovery selects it. */
46
- export type TGiteaSourceInventoryClass = 'packages';
46
+ export type TGiteaSourceInventoryClass = 'packages' | 'collaboration';
47
47
  export interface IGiteaSourceDiscoveryOptions {
48
48
  /**
49
49
  * Classes beside the instance, owners and repositories to list for
50
50
  * measurement. `packages` lists every package, so `units` measures one unit
51
51
  * per package; without it, discovery carries no `packages` and the package
52
- * class is unread.
52
+ * class is unread. `collaboration` sets discovery's `collaboration: true`,
53
+ * so `units` measures one collaboration unit per repository, and the
54
+ * composed inventory carries the records and every organization's
55
+ * `labelRecords`; without it, collaboration records are unread.
53
56
  */
54
57
  classes?: readonly TGiteaSourceInventoryClass[];
55
58
  }
@@ -90,17 +93,21 @@ export declare class GiteaSourceInventory {
90
93
  get metrics(): IForgeRequestMetrics;
91
94
  /**
92
95
  * Identifies the source and its reader and lists every owner and repository
93
- * with its id, and with `classes: ['packages']` every package from the
94
- * administrator package listing (`packages`, absent otherwise). Rejects
95
- * unless the token belongs to a site administrator, and rejects an unknown
96
- * class with `invalid-options`; a listing that does not finish, or that
97
- * lists a repository id twice, is reported in `incompleteReasons`.
96
+ * with its id, with `classes: ['packages']` every package from the
97
+ * administrator package listing (`packages`, absent otherwise), and with
98
+ * `classes: ['collaboration']` sets `collaboration: true`. Rejects unless
99
+ * the token belongs to a site administrator, and rejects an unknown class
100
+ * with `invalid-options`; a listing that does not finish, or that lists a
101
+ * repository id twice, is reported in `incompleteReasons`.
98
102
  */
99
103
  discover(signalArg?: AbortSignal, optionsArg?: IGiteaSourceDiscoveryOptions): Promise<IDiscovery>;
100
104
  /**
101
105
  * Every unit a run over this discovery measures: the instance, then owners,
102
106
  * then repositories, then the packages discovery lists when it selected
103
- * them.
107
+ * them, then, when it selected collaboration, one collaboration unit per
108
+ * repository, keyed by the repository's id. A discovery that selects
109
+ * collaboration while a repository has no id rejects with
110
+ * `repository-id-missing`; it never falls back to keying by name.
104
111
  */
105
112
  units(discoveryArg: IDiscovery): TUnit[];
106
113
  /**
@@ -114,12 +121,13 @@ export declare class GiteaSourceInventory {
114
121
  lookupRepository(idArg: string, signalArg?: AbortSignal): Promise<TGiteaSourceRepositoryLookup>;
115
122
  /**
116
123
  * Measures one unit. Never rejects: a unit whose primary record cannot be
117
- * read is `failed`, and so is a repository unit carrying an id that its name
118
- * no longer answers with (`repository-identity-changed`). A package unit is
119
- * read whole or fails, never partly: a listing that does not finish, an
120
- * index that is not what its file list promises (`unexpected-manifest-shape`)
121
- * and a result over `forgeSourceInventoryUnitMaxBytes` of UTF-8 JSON
122
- * (`unit-over-bound`) fail it, and its record is never truncated.
124
+ * read is `failed`, and so is a repository or collaboration unit carrying an
125
+ * id that its name no longer answers with (`repository-identity-changed`).
126
+ * Package and collaboration units are read whole or fail, never partly: a
127
+ * listing that does not finish, an index that is not what its file list
128
+ * promises (`unexpected-manifest-shape`) and a result over
129
+ * `forgeSourceInventoryUnitMaxBytes` of UTF-8 JSON (`unit-over-bound`) fail
130
+ * it, and its records are never truncated.
123
131
  */
124
132
  measureUnit(unitArg: TUnit, signalArg?: AbortSignal): Promise<TUnitResult>;
125
133
  /**
@@ -139,7 +147,11 @@ export declare class GiteaSourceInventory {
139
147
  * `packages` and `totals.packageContent` (`composeGiteaPackageContent`) are
140
148
  * present exactly when discovery lists packages, an empty list included; a
141
149
  * package without a record is left out, never truncated, and makes its
142
- * content measures partial.
150
+ * content measures partial. `collaboration` and every organization's
151
+ * `labelRecords` are present exactly when discovery selects collaboration: a
152
+ * repository without a collaboration result for its discovered id is left
153
+ * out and named in the reasons, and a record list that is not measured is a
154
+ * reason by its path, such as `collaboration.issues`.
143
155
  */
144
156
  export declare const composeGiteaSourceInventory: (discoveryArg: IDiscovery, resultsArg: TUnitResult[], generatorsArg: plugins.fossInterfaces.data.IForgeSourceInventoryGenerator[]) => IInventory;
145
157
  export {};