@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.
- package/changelog.md +29 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.giteasourcefreeze.d.ts +99 -0
- package/dist_ts/classes.giteasourcefreeze.js +707 -0
- package/dist_ts/classes.giteasourceinventory.d.ts +27 -15
- package/dist_ts/classes.giteasourceinventory.js +461 -70
- package/dist_ts/forgeinventory.transport.d.ts +7 -2
- package/dist_ts/forgeinventory.transport.js +33 -15
- package/dist_ts/index.d.ts +1 -0
- package/dist_ts/index.js +2 -1
- package/package.json +4 -4
- package/readme.md +92 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.giteasourcefreeze.ts +763 -0
- package/ts/classes.giteasourceinventory.ts +498 -69
- package/ts/forgeinventory.transport.ts +32 -14
- package/ts/index.ts +1 -0
|
@@ -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,
|
|
94
|
-
* administrator package listing (`packages`, absent otherwise)
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
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
|
|
118
|
-
* no longer answers with (`repository-identity-changed`).
|
|
119
|
-
* read whole or
|
|
120
|
-
* index that is not what its file list
|
|
121
|
-
* and a result over
|
|
122
|
-
* (`unit-over-bound`) fail
|
|
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 {};
|