@backstage/backend-defaults 0.3.0-next.2 → 0.3.0-next.3
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 +21 -0
- package/cache/package.json +1 -1
- package/database/package.json +1 -1
- package/discovery/package.json +1 -1
- package/dist/database.cjs.js +34 -119
- package/dist/database.cjs.js.map +1 -1
- package/dist/scheduler.cjs.js +11 -39
- package/dist/scheduler.cjs.js.map +1 -1
- package/dist/scheduler.d.ts +14 -1
- package/dist/urlReader.cjs.js +2990 -2
- package/dist/urlReader.cjs.js.map +1 -1
- package/dist/urlReader.d.ts +415 -3
- package/lifecycle/package.json +1 -1
- package/package.json +32 -10
- package/permissions/package.json +1 -1
- package/rootConfig/package.json +1 -1
- package/rootLifecycle/package.json +1 -1
- package/scheduler/package.json +1 -1
- package/urlReader/package.json +1 -1
package/dist/urlReader.d.ts
CHANGED
|
@@ -1,7 +1,419 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
|
-
import
|
|
3
|
+
import { UrlReaderService, LoggerService, UrlReaderReadTreeResponse, UrlReaderReadUrlOptions, UrlReaderReadUrlResponse, UrlReaderReadTreeOptions, UrlReaderSearchOptions, UrlReaderSearchResponse } from '@backstage/backend-plugin-api';
|
|
4
|
+
import { AzureIntegration, AzureDevOpsCredentialsProvider, BitbucketCloudIntegration, BitbucketIntegration, BitbucketServerIntegration, GerritIntegration, GithubIntegration, GithubCredentialsProvider, GitLabIntegration, GiteaIntegration, HarnessIntegration, AwsS3Integration } from '@backstage/integration';
|
|
5
|
+
import { Readable } from 'stream';
|
|
6
|
+
import { Config } from '@backstage/config';
|
|
7
|
+
import { AwsCredentialsManager } from '@backstage/integration-aws-node';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A predicate that decides whether a specific {@link @backstage/backend-plugin-api#UrlReaderService} can handle a
|
|
11
|
+
* given URL.
|
|
12
|
+
*
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
type UrlReaderPredicateTuple = {
|
|
16
|
+
predicate: (url: URL) => boolean;
|
|
17
|
+
reader: UrlReaderService;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* A factory function that can read config to construct zero or more
|
|
21
|
+
* {@link @backstage/backend-plugin-api#UrlReaderService}s along with a predicate for when it should be used.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
type ReaderFactory = (options: {
|
|
26
|
+
config: Config;
|
|
27
|
+
logger: LoggerService;
|
|
28
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
29
|
+
}) => UrlReaderPredicateTuple[];
|
|
30
|
+
/**
|
|
31
|
+
* An options object for {@link ReadUrlResponseFactory} factory methods.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
type ReadUrlResponseFactoryFromStreamOptions = {
|
|
36
|
+
etag?: string;
|
|
37
|
+
lastModifiedAt?: Date;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Options that control execution of {@link ReadTreeResponseFactory} methods.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
type ReadTreeResponseFactoryOptions = {
|
|
45
|
+
stream: Readable;
|
|
46
|
+
subpath?: string;
|
|
47
|
+
etag: string;
|
|
48
|
+
filter?: (path: string, info?: {
|
|
49
|
+
size: number;
|
|
50
|
+
}) => boolean;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Options that control {@link ReadTreeResponseFactory.fromReadableArray}
|
|
54
|
+
* execution.
|
|
55
|
+
*
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
type FromReadableArrayOptions = Array<{
|
|
59
|
+
/**
|
|
60
|
+
* The raw data itself.
|
|
61
|
+
*/
|
|
62
|
+
data: Readable;
|
|
63
|
+
/**
|
|
64
|
+
* The filepath of the data.
|
|
65
|
+
*/
|
|
66
|
+
path: string;
|
|
67
|
+
/**
|
|
68
|
+
* Last modified date of the file contents.
|
|
69
|
+
*/
|
|
70
|
+
lastModifiedAt?: Date;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* A factory for response factories that handle the unpacking and inspection of
|
|
74
|
+
* complex responses such as archive data.
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
interface ReadTreeResponseFactory {
|
|
79
|
+
fromTarArchive(options: ReadTreeResponseFactoryOptions & {
|
|
80
|
+
/**
|
|
81
|
+
* Strip the first parent directory of a tar archive.
|
|
82
|
+
* Defaults to true.
|
|
83
|
+
*/
|
|
84
|
+
stripFirstDirectory?: boolean;
|
|
85
|
+
}): Promise<UrlReaderReadTreeResponse>;
|
|
86
|
+
fromZipArchive(options: ReadTreeResponseFactoryOptions): Promise<UrlReaderReadTreeResponse>;
|
|
87
|
+
fromReadableArray(options: FromReadableArrayOptions): Promise<UrlReaderReadTreeResponse>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for Azure repos.
|
|
92
|
+
*
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
declare class AzureUrlReader implements UrlReaderService {
|
|
96
|
+
private readonly integration;
|
|
97
|
+
private readonly deps;
|
|
98
|
+
static factory: ReaderFactory;
|
|
99
|
+
constructor(integration: AzureIntegration, deps: {
|
|
100
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
101
|
+
credentialsProvider: AzureDevOpsCredentialsProvider;
|
|
102
|
+
});
|
|
103
|
+
read(url: string): Promise<Buffer>;
|
|
104
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
105
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
106
|
+
search(url: string, options?: UrlReaderSearchOptions): Promise<UrlReaderSearchResponse>;
|
|
107
|
+
toString(): string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files from Bitbucket Cloud.
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
declare class BitbucketCloudUrlReader implements UrlReaderService {
|
|
116
|
+
private readonly integration;
|
|
117
|
+
private readonly deps;
|
|
118
|
+
static factory: ReaderFactory;
|
|
119
|
+
constructor(integration: BitbucketCloudIntegration, deps: {
|
|
120
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
121
|
+
});
|
|
122
|
+
read(url: string): Promise<Buffer>;
|
|
123
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
124
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
125
|
+
search(url: string, options?: UrlReaderSearchOptions): Promise<UrlReaderSearchResponse>;
|
|
126
|
+
toString(): string;
|
|
127
|
+
private getLastCommitShortHash;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files from Bitbucket v1 and v2 APIs, such
|
|
132
|
+
* as the one exposed by Bitbucket Cloud itself.
|
|
133
|
+
*
|
|
134
|
+
* @public
|
|
135
|
+
* @deprecated in favor of BitbucketCloudUrlReader and BitbucketServerUrlReader
|
|
136
|
+
*/
|
|
137
|
+
declare class BitbucketUrlReader implements UrlReaderService {
|
|
138
|
+
private readonly integration;
|
|
139
|
+
private readonly deps;
|
|
140
|
+
static factory: ReaderFactory;
|
|
141
|
+
constructor(integration: BitbucketIntegration, logger: LoggerService, deps: {
|
|
142
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
143
|
+
});
|
|
144
|
+
read(url: string): Promise<Buffer>;
|
|
145
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
146
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
147
|
+
search(url: string, options?: UrlReaderSearchOptions): Promise<UrlReaderSearchResponse>;
|
|
148
|
+
toString(): string;
|
|
149
|
+
private getLastCommitShortHash;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files from Bitbucket Server APIs.
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
declare class BitbucketServerUrlReader implements UrlReaderService {
|
|
158
|
+
private readonly integration;
|
|
159
|
+
private readonly deps;
|
|
160
|
+
static factory: ReaderFactory;
|
|
161
|
+
constructor(integration: BitbucketServerIntegration, deps: {
|
|
162
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
163
|
+
});
|
|
164
|
+
read(url: string): Promise<Buffer>;
|
|
165
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
166
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
167
|
+
search(url: string, options?: UrlReaderSearchOptions): Promise<UrlReaderSearchResponse>;
|
|
168
|
+
toString(): string;
|
|
169
|
+
private getLastCommitShortHash;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files in Gerrit.
|
|
174
|
+
*
|
|
175
|
+
* @remarks
|
|
176
|
+
* To be able to link to Git contents for Gerrit providers in a user friendly
|
|
177
|
+
* way we are depending on that there is a Gitiles installation somewhere
|
|
178
|
+
* that we can link to. It is perfectly possible to integrate Gerrit with
|
|
179
|
+
* Backstage without Gitiles since all API calls goes directly to Gerrit.
|
|
180
|
+
* However if Gitiles is configured, readTree will use it to fetch
|
|
181
|
+
* an archive instead of cloning the repository.
|
|
182
|
+
*
|
|
183
|
+
* The "host" variable in the config is the Gerrit host. The address where
|
|
184
|
+
* Gitiles is installed may be on the same host but it could be on a
|
|
185
|
+
* separate host. For example a Gerrit instance could be hosted on
|
|
186
|
+
* "gerrit-review.company.com" but the repos could be browsable on a separate
|
|
187
|
+
* host, e.g. "gerrit.company.com" and the human readable URL would then
|
|
188
|
+
* not point to the API host.
|
|
189
|
+
*
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
declare class GerritUrlReader implements UrlReaderService {
|
|
193
|
+
private readonly integration;
|
|
194
|
+
private readonly deps;
|
|
195
|
+
private readonly workDir;
|
|
196
|
+
static factory: ReaderFactory;
|
|
197
|
+
constructor(integration: GerritIntegration, deps: {
|
|
198
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
199
|
+
}, workDir: string);
|
|
200
|
+
read(url: string): Promise<Buffer>;
|
|
201
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
202
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
203
|
+
search(): Promise<UrlReaderSearchResponse>;
|
|
204
|
+
toString(): string;
|
|
205
|
+
private readTreeFromGitClone;
|
|
206
|
+
private readTreeFromGitiles;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files through the GitHub v3 APIs, such as
|
|
211
|
+
* the one exposed by GitHub itself.
|
|
212
|
+
*
|
|
213
|
+
* @public
|
|
214
|
+
*/
|
|
215
|
+
declare class GithubUrlReader implements UrlReaderService {
|
|
216
|
+
private readonly integration;
|
|
217
|
+
private readonly deps;
|
|
218
|
+
static factory: ReaderFactory;
|
|
219
|
+
constructor(integration: GithubIntegration, deps: {
|
|
220
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
221
|
+
credentialsProvider: GithubCredentialsProvider;
|
|
222
|
+
});
|
|
223
|
+
read(url: string): Promise<Buffer>;
|
|
224
|
+
private getCredentials;
|
|
225
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
226
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
227
|
+
search(url: string, options?: UrlReaderSearchOptions): Promise<UrlReaderSearchResponse>;
|
|
228
|
+
toString(): string;
|
|
229
|
+
private doReadTree;
|
|
230
|
+
private doSearch;
|
|
231
|
+
private getRepoDetails;
|
|
232
|
+
private getDefaultBranch;
|
|
233
|
+
private fetchResponse;
|
|
234
|
+
private fetchJson;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for files on GitLab.
|
|
239
|
+
*
|
|
240
|
+
* @public
|
|
241
|
+
*/
|
|
242
|
+
declare class GitlabUrlReader implements UrlReaderService {
|
|
243
|
+
private readonly integration;
|
|
244
|
+
private readonly deps;
|
|
245
|
+
static factory: ReaderFactory;
|
|
246
|
+
constructor(integration: GitLabIntegration, deps: {
|
|
247
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
248
|
+
});
|
|
249
|
+
read(url: string): Promise<Buffer>;
|
|
250
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
251
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
252
|
+
search(url: string, options?: UrlReaderSearchOptions): Promise<UrlReaderSearchResponse>;
|
|
253
|
+
/**
|
|
254
|
+
* This function splits the input globPattern string into segments using the path separator /. It then iterates over
|
|
255
|
+
* the segments from the end of the array towards the beginning, checking if the concatenated string up to that
|
|
256
|
+
* segment matches the original globPattern using the minimatch function. If a match is found, it continues iterating.
|
|
257
|
+
* If no match is found, it returns the concatenated string up to the current segment, which is the static part of the
|
|
258
|
+
* glob pattern.
|
|
259
|
+
*
|
|
260
|
+
* E.g. `catalog/foo/*.yaml` will return `catalog/foo`.
|
|
261
|
+
*
|
|
262
|
+
* @param globPattern the glob pattern
|
|
263
|
+
* @private
|
|
264
|
+
*/
|
|
265
|
+
private getStaticPart;
|
|
266
|
+
toString(): string;
|
|
267
|
+
private getGitlabFetchUrl;
|
|
268
|
+
private getGitlabArtifactFetchUrl;
|
|
269
|
+
private resolveProjectToId;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for the Gitea v1 api.
|
|
274
|
+
*
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
declare class GiteaUrlReader implements UrlReaderService {
|
|
278
|
+
private readonly integration;
|
|
279
|
+
private readonly deps;
|
|
280
|
+
static factory: ReaderFactory;
|
|
281
|
+
constructor(integration: GiteaIntegration, deps: {
|
|
282
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
283
|
+
});
|
|
284
|
+
read(url: string): Promise<Buffer>;
|
|
285
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
286
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
287
|
+
search(): Promise<UrlReaderSearchResponse>;
|
|
288
|
+
toString(): string;
|
|
289
|
+
private getLastCommitHash;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for the Harness code v1 api.
|
|
294
|
+
*
|
|
295
|
+
*
|
|
296
|
+
* @public
|
|
297
|
+
*/
|
|
298
|
+
declare class HarnessUrlReader implements UrlReaderService {
|
|
299
|
+
private readonly integration;
|
|
300
|
+
private readonly deps;
|
|
301
|
+
static factory: ReaderFactory;
|
|
302
|
+
constructor(integration: HarnessIntegration, deps: {
|
|
303
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
304
|
+
});
|
|
305
|
+
read(url: string): Promise<Buffer>;
|
|
306
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
307
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
308
|
+
search(): Promise<UrlReaderSearchResponse>;
|
|
309
|
+
toString(): string;
|
|
310
|
+
private getLastCommitHash;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Implements a {@link @backstage/backend-plugin-api#UrlReaderService} for AWS S3 buckets.
|
|
315
|
+
*
|
|
316
|
+
* @public
|
|
317
|
+
*/
|
|
318
|
+
declare class AwsS3UrlReader implements UrlReaderService {
|
|
319
|
+
private readonly credsManager;
|
|
320
|
+
private readonly integration;
|
|
321
|
+
private readonly deps;
|
|
322
|
+
static factory: ReaderFactory;
|
|
323
|
+
constructor(credsManager: AwsCredentialsManager, integration: AwsS3Integration, deps: {
|
|
324
|
+
treeResponseFactory: ReadTreeResponseFactory;
|
|
325
|
+
});
|
|
326
|
+
/**
|
|
327
|
+
* If accessKeyId and secretAccessKey are missing, the standard credentials provider chain will be used:
|
|
328
|
+
* https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html
|
|
329
|
+
*/
|
|
330
|
+
private static buildStaticCredentials;
|
|
331
|
+
private static buildCredentials;
|
|
332
|
+
private buildS3Client;
|
|
333
|
+
private retrieveS3ObjectData;
|
|
334
|
+
read(url: string): Promise<Buffer>;
|
|
335
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
336
|
+
readTree(url: string, options?: UrlReaderReadTreeOptions): Promise<UrlReaderReadTreeResponse>;
|
|
337
|
+
search(): Promise<UrlReaderSearchResponse>;
|
|
338
|
+
toString(): string;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* A {@link @backstage/backend-plugin-api#UrlReaderService} that does a plain fetch of the URL.
|
|
343
|
+
*
|
|
344
|
+
* @public
|
|
345
|
+
*/
|
|
346
|
+
declare class FetchUrlReader implements UrlReaderService {
|
|
347
|
+
/**
|
|
348
|
+
* The factory creates a single reader that will be used for reading any URL that's listed
|
|
349
|
+
* in configuration at `backend.reading.allow`. The allow list contains a list of objects describing
|
|
350
|
+
* targets to allow, containing the following fields:
|
|
351
|
+
*
|
|
352
|
+
* `host`:
|
|
353
|
+
* Either full hostnames to match, or subdomain wildcard matchers with a leading '*'.
|
|
354
|
+
* For example 'example.com' and '*.example.com' are valid values, 'prod.*.example.com' is not.
|
|
355
|
+
*
|
|
356
|
+
* `paths`:
|
|
357
|
+
* An optional list of paths which are allowed. If the list is omitted all paths are allowed.
|
|
358
|
+
*/
|
|
359
|
+
static factory: ReaderFactory;
|
|
360
|
+
read(url: string): Promise<Buffer>;
|
|
361
|
+
readUrl(url: string, options?: UrlReaderReadUrlOptions): Promise<UrlReaderReadUrlResponse>;
|
|
362
|
+
readTree(): Promise<UrlReaderReadTreeResponse>;
|
|
363
|
+
search(): Promise<UrlReaderSearchResponse>;
|
|
364
|
+
toString(): string;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* Utility class for UrlReader implementations to create valid ReadUrlResponse
|
|
369
|
+
* instances from common response primitives.
|
|
370
|
+
*
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
declare class ReadUrlResponseFactory {
|
|
374
|
+
/**
|
|
375
|
+
* Resolves a ReadUrlResponse from a Readable stream.
|
|
376
|
+
*/
|
|
377
|
+
static fromReadable(stream: Readable, options?: ReadUrlResponseFactoryFromStreamOptions): Promise<UrlReaderReadUrlResponse>;
|
|
378
|
+
/**
|
|
379
|
+
* Resolves a ReadUrlResponse from an old-style NodeJS.ReadableStream.
|
|
380
|
+
*/
|
|
381
|
+
static fromNodeJSReadable(oldStyleStream: NodeJS.ReadableStream, options?: ReadUrlResponseFactoryFromStreamOptions): Promise<UrlReaderReadUrlResponse>;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Creation options for {@link @backstage/backend-plugin-api#UrlReaderService}.
|
|
386
|
+
*
|
|
387
|
+
* @public
|
|
388
|
+
*/
|
|
389
|
+
type UrlReadersOptions = {
|
|
390
|
+
/** Root config object */
|
|
391
|
+
config: Config;
|
|
392
|
+
/** Logger used by all the readers */
|
|
393
|
+
logger: LoggerService;
|
|
394
|
+
/** A list of factories used to construct individual readers that match on URLs */
|
|
395
|
+
factories?: ReaderFactory[];
|
|
396
|
+
};
|
|
397
|
+
/**
|
|
398
|
+
* Helps construct {@link @backstage/backend-plugin-api#UrlReaderService}s.
|
|
399
|
+
*
|
|
400
|
+
* @public
|
|
401
|
+
*/
|
|
402
|
+
declare class UrlReaders {
|
|
403
|
+
/**
|
|
404
|
+
* Creates a custom {@link @backstage/backend-plugin-api#UrlReaderService} wrapper for your own set of factories.
|
|
405
|
+
*/
|
|
406
|
+
static create(options: UrlReadersOptions): UrlReaderService;
|
|
407
|
+
/**
|
|
408
|
+
* Creates a {@link @backstage/backend-plugin-api#UrlReaderService} wrapper that includes all the default factories
|
|
409
|
+
* from this package.
|
|
410
|
+
*
|
|
411
|
+
* Any additional factories passed will be loaded before the default ones.
|
|
412
|
+
*/
|
|
413
|
+
static default(options: UrlReadersOptions): UrlReaderService;
|
|
414
|
+
}
|
|
3
415
|
|
|
4
416
|
/** @public */
|
|
5
|
-
declare const urlReaderServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<
|
|
417
|
+
declare const urlReaderServiceFactory: () => _backstage_backend_plugin_api.ServiceFactory<_backstage_backend_plugin_api.UrlReaderService, "plugin">;
|
|
6
418
|
|
|
7
|
-
export { urlReaderServiceFactory };
|
|
419
|
+
export { AwsS3UrlReader, AzureUrlReader, BitbucketCloudUrlReader, BitbucketServerUrlReader, BitbucketUrlReader, FetchUrlReader, type FromReadableArrayOptions, GerritUrlReader, GiteaUrlReader, GithubUrlReader, GitlabUrlReader, HarnessUrlReader, type ReadTreeResponseFactory, type ReadTreeResponseFactoryOptions, ReadUrlResponseFactory, type ReadUrlResponseFactoryFromStreamOptions, type ReaderFactory, type UrlReaderPredicateTuple, UrlReaders, type UrlReadersOptions, urlReaderServiceFactory };
|
package/lifecycle/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-defaults",
|
|
3
|
-
"version": "0.3.0-next.
|
|
3
|
+
"version": "0.3.0-next.3",
|
|
4
4
|
"description": "Backend defaults used by Backstage backend apps",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library"
|
|
@@ -97,38 +97,60 @@
|
|
|
97
97
|
"test": "backstage-cli package test"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@
|
|
101
|
-
"@
|
|
100
|
+
"@aws-sdk/abort-controller": "^3.347.0",
|
|
101
|
+
"@aws-sdk/client-codecommit": "^3.350.0",
|
|
102
|
+
"@aws-sdk/client-s3": "^3.350.0",
|
|
103
|
+
"@aws-sdk/credential-providers": "^3.350.0",
|
|
104
|
+
"@aws-sdk/types": "^3.347.0",
|
|
105
|
+
"@backstage/backend-app-api": "^0.7.6-next.3",
|
|
106
|
+
"@backstage/backend-common": "^0.23.0-next.3",
|
|
102
107
|
"@backstage/backend-dev-utils": "^0.1.4",
|
|
103
|
-
"@backstage/backend-plugin-api": "^0.6.19-next.
|
|
108
|
+
"@backstage/backend-plugin-api": "^0.6.19-next.3",
|
|
104
109
|
"@backstage/config": "^1.2.0",
|
|
105
|
-
"@backstage/config-loader": "^1.8.0",
|
|
110
|
+
"@backstage/config-loader": "^1.8.1-next.0",
|
|
106
111
|
"@backstage/errors": "^1.2.4",
|
|
107
|
-
"@backstage/
|
|
108
|
-
"@backstage/
|
|
112
|
+
"@backstage/integration": "^1.12.0-next.1",
|
|
113
|
+
"@backstage/integration-aws-node": "^0.1.12",
|
|
114
|
+
"@backstage/plugin-events-node": "^0.3.5-next.2",
|
|
115
|
+
"@backstage/plugin-permission-node": "^0.7.30-next.3",
|
|
109
116
|
"@backstage/types": "^1.1.1",
|
|
117
|
+
"@google-cloud/storage": "^7.0.0",
|
|
110
118
|
"@keyv/memcache": "^1.3.5",
|
|
111
119
|
"@keyv/redis": "^2.5.3",
|
|
120
|
+
"@octokit/rest": "^19.0.3",
|
|
112
121
|
"@opentelemetry/api": "^1.3.0",
|
|
122
|
+
"archiver": "^6.0.0",
|
|
123
|
+
"base64-stream": "^1.0.0",
|
|
113
124
|
"better-sqlite3": "^9.0.0",
|
|
125
|
+
"concat-stream": "^2.0.0",
|
|
114
126
|
"cron": "^3.0.0",
|
|
115
127
|
"fs-extra": "^11.2.0",
|
|
128
|
+
"git-url-parse": "^14.0.0",
|
|
129
|
+
"isomorphic-git": "^1.23.0",
|
|
116
130
|
"keyv": "^4.5.2",
|
|
117
131
|
"knex": "^3.0.0",
|
|
118
132
|
"lodash": "^4.17.21",
|
|
119
133
|
"luxon": "^3.0.0",
|
|
134
|
+
"minimatch": "^9.0.0",
|
|
120
135
|
"mysql2": "^3.0.0",
|
|
136
|
+
"node-fetch": "^2.6.7",
|
|
121
137
|
"p-limit": "^3.1.0",
|
|
122
138
|
"pg": "^8.11.3",
|
|
123
139
|
"pg-connection-string": "^2.3.0",
|
|
140
|
+
"raw-body": "^2.4.1",
|
|
141
|
+
"tar": "^6.1.12",
|
|
124
142
|
"uuid": "^9.0.0",
|
|
143
|
+
"yauzl": "^3.0.0",
|
|
125
144
|
"yn": "^4.0.0",
|
|
126
145
|
"zod": "^3.22.4"
|
|
127
146
|
},
|
|
128
147
|
"devDependencies": {
|
|
129
|
-
"@
|
|
130
|
-
"@backstage/backend-
|
|
131
|
-
"@backstage/
|
|
148
|
+
"@aws-sdk/util-stream-node": "^3.350.0",
|
|
149
|
+
"@backstage/backend-plugin-api": "^0.6.19-next.3",
|
|
150
|
+
"@backstage/backend-test-utils": "^0.4.0-next.3",
|
|
151
|
+
"@backstage/cli": "^0.26.7-next.3",
|
|
152
|
+
"aws-sdk-client-mock": "^4.0.0",
|
|
153
|
+
"msw": "^1.0.0",
|
|
132
154
|
"wait-for-expect": "^3.0.2"
|
|
133
155
|
},
|
|
134
156
|
"configSchema": "config.d.ts"
|
package/permissions/package.json
CHANGED
package/rootConfig/package.json
CHANGED
package/scheduler/package.json
CHANGED