@backstage/plugin-scaffolder 1.10.0-next.0 → 1.10.0-next.2
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 +89 -0
- package/alpha/package.json +1 -1
- package/dist/esm/{Router-416b874d.esm.js → Router-c499b201.esm.js} +39 -27
- package/dist/esm/Router-c499b201.esm.js.map +1 -0
- package/dist/esm/default-b0a9b946.esm.js +39 -0
- package/dist/esm/default-b0a9b946.esm.js.map +1 -0
- package/dist/esm/{index-7e25101d.esm.js → index-618869a2.esm.js} +319 -273
- package/dist/esm/index-618869a2.esm.js.map +1 -0
- package/dist/esm/index-6aee5f45.esm.js +251 -0
- package/dist/esm/index-6aee5f45.esm.js.map +1 -0
- package/dist/index.alpha.d.ts +118 -264
- package/dist/index.beta.d.ts +116 -231
- package/dist/index.d.ts +116 -231
- package/dist/index.esm.js +23 -16
- package/dist/index.esm.js.map +1 -1
- package/package.json +20 -21
- package/dist/esm/Router-416b874d.esm.js.map +0 -1
- package/dist/esm/index-78c07979.esm.js +0 -693
- package/dist/esm/index-78c07979.esm.js.map +0 -1
- package/dist/esm/index-7e25101d.esm.js.map +0 -1
- package/dist/esm/schema-bfff60e2.esm.js +0 -126
- package/dist/esm/schema-bfff60e2.esm.js.map +0 -1
package/dist/index.beta.d.ts
CHANGED
|
@@ -10,43 +10,55 @@ import { ApiHolder } from '@backstage/core-plugin-api';
|
|
|
10
10
|
import { ApiRef } from '@backstage/core-plugin-api';
|
|
11
11
|
import { BackstagePlugin } from '@backstage/core-plugin-api';
|
|
12
12
|
import { ComponentType } from 'react';
|
|
13
|
+
import { createScaffolderFieldExtension as createScaffolderFieldExtension_2 } from '@backstage/plugin-scaffolder-react';
|
|
14
|
+
import { CustomFieldExtensionSchema as CustomFieldExtensionSchema_2 } from '@backstage/plugin-scaffolder-react';
|
|
15
|
+
import { CustomFieldValidator as CustomFieldValidator_2 } from '@backstage/plugin-scaffolder-react';
|
|
13
16
|
import { DiscoveryApi } from '@backstage/core-plugin-api';
|
|
14
17
|
import { Entity } from '@backstage/catalog-model';
|
|
15
18
|
import { Extension } from '@backstage/core-plugin-api';
|
|
16
19
|
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
|
17
20
|
import { FetchApi } from '@backstage/core-plugin-api';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
21
|
+
import { FieldExtensionComponent as FieldExtensionComponent_2 } from '@backstage/plugin-scaffolder-react';
|
|
22
|
+
import { FieldExtensionComponentProps as FieldExtensionComponentProps_2 } from '@backstage/plugin-scaffolder-react';
|
|
23
|
+
import { FieldExtensionOptions as FieldExtensionOptions_2 } from '@backstage/plugin-scaffolder-react';
|
|
20
24
|
import { FieldValidation } from '@rjsf/core';
|
|
21
|
-
import { FieldValidation as FieldValidation_2 } from '@rjsf/utils';
|
|
22
25
|
import type { FormProps as FormProps_2 } from '@rjsf/core';
|
|
23
26
|
import type { FormProps as FormProps_3 } from '@rjsf/core-v5';
|
|
24
27
|
import { IdentityApi } from '@backstage/core-plugin-api';
|
|
25
28
|
import { JsonObject } from '@backstage/types';
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
29
|
+
import { ListActionsResponse as ListActionsResponse_2 } from '@backstage/plugin-scaffolder-react';
|
|
30
|
+
import { LogEvent as LogEvent_2 } from '@backstage/plugin-scaffolder-react';
|
|
28
31
|
import { Observable } from '@backstage/types';
|
|
29
32
|
import { PathParams } from '@backstage/core-plugin-api';
|
|
30
33
|
import { PropsWithChildren } from 'react';
|
|
31
34
|
import { default as React_2 } from 'react';
|
|
35
|
+
import { ReactNode } from 'react';
|
|
32
36
|
import { RouteRef } from '@backstage/core-plugin-api';
|
|
37
|
+
import { ScaffolderApi as ScaffolderApi_2 } from '@backstage/plugin-scaffolder-react';
|
|
38
|
+
import { ScaffolderDryRunOptions as ScaffolderDryRunOptions_2 } from '@backstage/plugin-scaffolder-react';
|
|
39
|
+
import { ScaffolderDryRunResponse as ScaffolderDryRunResponse_2 } from '@backstage/plugin-scaffolder-react';
|
|
40
|
+
import { ScaffolderGetIntegrationsListOptions as ScaffolderGetIntegrationsListOptions_2 } from '@backstage/plugin-scaffolder-react';
|
|
41
|
+
import { ScaffolderGetIntegrationsListResponse as ScaffolderGetIntegrationsListResponse_2 } from '@backstage/plugin-scaffolder-react';
|
|
42
|
+
import { ScaffolderOutputLink } from '@backstage/plugin-scaffolder-react';
|
|
43
|
+
import { ScaffolderScaffoldOptions as ScaffolderScaffoldOptions_2 } from '@backstage/plugin-scaffolder-react';
|
|
44
|
+
import { ScaffolderScaffoldResponse as ScaffolderScaffoldResponse_2 } from '@backstage/plugin-scaffolder-react';
|
|
45
|
+
import { ScaffolderStreamLogsOptions as ScaffolderStreamLogsOptions_2 } from '@backstage/plugin-scaffolder-react';
|
|
46
|
+
import { ScaffolderTask as ScaffolderTask_2 } from '@backstage/plugin-scaffolder-react';
|
|
47
|
+
import { ScaffolderTaskOutput as ScaffolderTaskOutput_2 } from '@backstage/plugin-scaffolder-react';
|
|
48
|
+
import { ScaffolderTaskStatus as ScaffolderTaskStatus_2 } from '@backstage/plugin-scaffolder-react';
|
|
49
|
+
import { ScaffolderUseTemplateSecrets as ScaffolderUseTemplateSecrets_2 } from '@backstage/plugin-scaffolder-react';
|
|
33
50
|
import { ScmIntegrationRegistry } from '@backstage/integration';
|
|
34
51
|
import { SubRouteRef } from '@backstage/core-plugin-api';
|
|
35
|
-
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
|
36
|
-
import { TaskStep } from '@backstage/plugin-scaffolder-common';
|
|
37
52
|
import { TemplateEntityV1beta3 } from '@backstage/plugin-scaffolder-common';
|
|
38
|
-
import {
|
|
53
|
+
import { TemplateParameterSchema as TemplateParameterSchema_2 } from '@backstage/plugin-scaffolder-react';
|
|
39
54
|
import { UiSchema } from '@rjsf/utils';
|
|
40
55
|
import { z } from 'zod';
|
|
41
56
|
|
|
42
|
-
/* Excluded from this release type: createNextScaffolderFieldExtension */
|
|
43
|
-
|
|
44
57
|
/**
|
|
45
|
-
* Method for creating field extensions that can be used in the scaffolder
|
|
46
|
-
* frontend form.
|
|
47
58
|
* @public
|
|
59
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#createScaffolderFieldExtension} instead as this has now been moved.
|
|
48
60
|
*/
|
|
49
|
-
export declare
|
|
61
|
+
export declare const createScaffolderFieldExtension: typeof createScaffolderFieldExtension_2;
|
|
50
62
|
|
|
51
63
|
/**
|
|
52
64
|
* Method for creating custom Layouts that can be used in the scaffolder frontend form
|
|
@@ -56,37 +68,30 @@ export declare function createScaffolderFieldExtension<TReturnValue = unknown, T
|
|
|
56
68
|
export declare function createScaffolderLayout<TInputProps = unknown>(options: LayoutOptions): Extension<LayoutComponent<TInputProps>>;
|
|
57
69
|
|
|
58
70
|
/**
|
|
59
|
-
* Type for the Custom Field Extension schema.
|
|
60
|
-
*
|
|
61
71
|
* @public
|
|
72
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#CustomFieldExtensionSchema} instead as this has now been moved.
|
|
62
73
|
*/
|
|
63
|
-
export declare type CustomFieldExtensionSchema =
|
|
64
|
-
returnValue: JSONSchema7;
|
|
65
|
-
uiOptions?: JSONSchema7;
|
|
66
|
-
};
|
|
74
|
+
export declare type CustomFieldExtensionSchema = CustomFieldExtensionSchema_2;
|
|
67
75
|
|
|
68
76
|
/**
|
|
69
|
-
* Field validation type for Custom Field Extensions.
|
|
70
|
-
*
|
|
71
77
|
* @public
|
|
78
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#CustomFieldValidator} instead as this has now been moved.
|
|
72
79
|
*/
|
|
73
|
-
export declare type CustomFieldValidator<
|
|
74
|
-
apiHolder: ApiHolder;
|
|
75
|
-
}) => void | Promise<void>;
|
|
80
|
+
export declare type CustomFieldValidator<TReturnFieldData> = CustomFieldValidator_2<TReturnFieldData>;
|
|
76
81
|
|
|
77
82
|
/**
|
|
78
83
|
* The field extension for selecting a name for a new Entity in the Catalog.
|
|
79
84
|
*
|
|
80
85
|
* @public
|
|
81
86
|
*/
|
|
82
|
-
export declare const EntityNamePickerFieldExtension:
|
|
87
|
+
export declare const EntityNamePickerFieldExtension: FieldExtensionComponent_2<string, {}>;
|
|
83
88
|
|
|
84
89
|
/**
|
|
85
90
|
* A field extension for selecting an Entity that exists in the Catalog.
|
|
86
91
|
*
|
|
87
92
|
* @public
|
|
88
93
|
*/
|
|
89
|
-
export declare const EntityPickerFieldExtension:
|
|
94
|
+
export declare const EntityPickerFieldExtension: FieldExtensionComponent_2<string, {
|
|
90
95
|
defaultKind?: string | undefined;
|
|
91
96
|
defaultNamespace?: string | false | undefined;
|
|
92
97
|
allowedKinds?: string[] | undefined;
|
|
@@ -117,7 +122,7 @@ export declare type EntityPickerUiOptions = typeof EntityPickerFieldSchema.uiOpt
|
|
|
117
122
|
* EntityTagsPickerFieldExtension
|
|
118
123
|
* @public
|
|
119
124
|
*/
|
|
120
|
-
export declare const EntityTagsPickerFieldExtension:
|
|
125
|
+
export declare const EntityTagsPickerFieldExtension: FieldExtensionComponent_2<string[], {
|
|
121
126
|
showCounts?: boolean | undefined;
|
|
122
127
|
kinds?: string[] | undefined;
|
|
123
128
|
helperText?: string | undefined;
|
|
@@ -141,36 +146,22 @@ helperText?: string | undefined;
|
|
|
141
146
|
export declare type EntityTagsPickerUiOptions = typeof EntityTagsPickerFieldSchema.uiOptionsType;
|
|
142
147
|
|
|
143
148
|
/**
|
|
144
|
-
* A type used to wrap up the FieldExtension to embed the ReturnValue and the InputProps
|
|
145
|
-
*
|
|
146
149
|
* @public
|
|
150
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#FieldExtensionComponent} instead as this has now been moved.
|
|
147
151
|
*/
|
|
148
|
-
export declare type FieldExtensionComponent<_TReturnValue, _TInputProps> =
|
|
152
|
+
export declare type FieldExtensionComponent<_TReturnValue, _TInputProps> = FieldExtensionComponent_2<_TReturnValue, _TInputProps>;
|
|
149
153
|
|
|
150
154
|
/**
|
|
151
|
-
* Type for field extensions and being able to type
|
|
152
|
-
* incoming props easier.
|
|
153
|
-
*
|
|
154
155
|
* @public
|
|
156
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#FieldExtensionComponentProps} instead as this has now been moved.
|
|
155
157
|
*/
|
|
156
|
-
export declare
|
|
157
|
-
uiSchema: FieldProps['uiSchema'] & {
|
|
158
|
-
'ui:options'?: TUiOptions;
|
|
159
|
-
};
|
|
160
|
-
}
|
|
158
|
+
export declare type FieldExtensionComponentProps<TFieldReturnValue, TUiOptions extends {} = {}> = FieldExtensionComponentProps_2<TFieldReturnValue, TUiOptions>;
|
|
161
159
|
|
|
162
160
|
/**
|
|
163
|
-
* Type for the Custom Field Extension with the
|
|
164
|
-
* name and components and validation function.
|
|
165
|
-
*
|
|
166
161
|
* @public
|
|
162
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#FieldExtensionOptions} instead as this has now been moved.
|
|
167
163
|
*/
|
|
168
|
-
export declare type FieldExtensionOptions
|
|
169
|
-
name: string;
|
|
170
|
-
component: (props: FieldExtensionComponentProps<TFieldReturnValue, TInputProps>) => JSX.Element | null;
|
|
171
|
-
validation?: CustomFieldValidator<TFieldReturnValue>;
|
|
172
|
-
schema?: CustomFieldExtensionSchema;
|
|
173
|
-
};
|
|
164
|
+
export declare type FieldExtensionOptions = FieldExtensionOptions_2;
|
|
174
165
|
|
|
175
166
|
/**
|
|
176
167
|
* @public
|
|
@@ -178,8 +169,8 @@ export declare type FieldExtensionOptions<TFieldReturnValue = unknown, TInputPro
|
|
|
178
169
|
* matching FieldExtensionComponentProps type for a field extension.
|
|
179
170
|
*/
|
|
180
171
|
export declare interface FieldSchema<TReturn, TUiOptions> {
|
|
181
|
-
readonly schema:
|
|
182
|
-
readonly type:
|
|
172
|
+
readonly schema: CustomFieldExtensionSchema_2;
|
|
173
|
+
readonly type: FieldExtensionComponentProps_2<TReturn, TUiOptions>;
|
|
183
174
|
readonly uiOptionsType: TUiOptions;
|
|
184
175
|
}
|
|
185
176
|
|
|
@@ -210,35 +201,16 @@ export declare interface LayoutOptions<P = any> {
|
|
|
210
201
|
export declare type LayoutTemplate<T = any> = FormProps_2<T>['ObjectFieldTemplate'];
|
|
211
202
|
|
|
212
203
|
/**
|
|
213
|
-
* The response shape for the `listActions` call to the `scaffolder-backend`
|
|
214
|
-
*
|
|
215
204
|
* @public
|
|
205
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ListActionsResponse} instead as this has now been moved.
|
|
216
206
|
*/
|
|
217
|
-
export declare type ListActionsResponse =
|
|
218
|
-
id: string;
|
|
219
|
-
description?: string;
|
|
220
|
-
schema?: {
|
|
221
|
-
input?: JSONSchema7;
|
|
222
|
-
output?: JSONSchema7;
|
|
223
|
-
};
|
|
224
|
-
}>;
|
|
207
|
+
export declare type ListActionsResponse = ListActionsResponse_2;
|
|
225
208
|
|
|
226
209
|
/**
|
|
227
|
-
* The shape of a `LogEvent` message from the `scaffolder-backend`
|
|
228
|
-
*
|
|
229
210
|
* @public
|
|
211
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#LogEvent} instead as this has now been moved.
|
|
230
212
|
*/
|
|
231
|
-
export declare type LogEvent =
|
|
232
|
-
type: 'log' | 'completion';
|
|
233
|
-
body: {
|
|
234
|
-
message: string;
|
|
235
|
-
stepId?: string;
|
|
236
|
-
status?: ScaffolderTaskStatus;
|
|
237
|
-
};
|
|
238
|
-
createdAt: string;
|
|
239
|
-
id: string;
|
|
240
|
-
taskId: string;
|
|
241
|
-
};
|
|
213
|
+
export declare type LogEvent = LogEvent_2;
|
|
242
214
|
|
|
243
215
|
/**
|
|
244
216
|
* @public
|
|
@@ -247,18 +219,14 @@ export declare type LogEvent = {
|
|
|
247
219
|
*/
|
|
248
220
|
export declare function makeFieldSchemaFromZod<TReturnSchema extends z.ZodType, TUiOptionsSchema extends z.ZodType = z.ZodType<any, any, {}>>(returnSchema: TReturnSchema, uiOptionsSchema?: TUiOptionsSchema): FieldSchema<TReturnSchema extends z.ZodType<any, any, infer IReturn> ? IReturn : never, TUiOptionsSchema extends z.ZodType<any, any, infer IUiOptions> ? IUiOptions : never>;
|
|
249
221
|
|
|
250
|
-
/* Excluded from this release type: NextCustomFieldValidator */
|
|
251
|
-
|
|
252
|
-
/* Excluded from this release type: NextFieldExtensionComponentProps */
|
|
253
|
-
|
|
254
|
-
/* Excluded from this release type: NextFieldExtensionOptions */
|
|
255
|
-
|
|
256
222
|
/* Excluded from this release type: nextRouteRef */
|
|
257
223
|
|
|
258
224
|
/* Excluded from this release type: NextRouterProps */
|
|
259
225
|
|
|
260
226
|
/* Excluded from this release type: NextScaffolderPage */
|
|
261
227
|
|
|
228
|
+
/* Excluded from this release type: nextScaffolderTaskRouteRef */
|
|
229
|
+
|
|
262
230
|
/* Excluded from this release type: nextSelectedTemplateRouteRef */
|
|
263
231
|
|
|
264
232
|
/**
|
|
@@ -266,7 +234,7 @@ export declare function makeFieldSchemaFromZod<TReturnSchema extends z.ZodType,
|
|
|
266
234
|
*
|
|
267
235
|
* @public
|
|
268
236
|
*/
|
|
269
|
-
export declare const OwnedEntityPickerFieldExtension:
|
|
237
|
+
export declare const OwnedEntityPickerFieldExtension: FieldExtensionComponent_2<string, {
|
|
270
238
|
defaultKind?: string | undefined;
|
|
271
239
|
defaultNamespace?: string | false | undefined;
|
|
272
240
|
allowedKinds?: string[] | undefined;
|
|
@@ -296,7 +264,7 @@ export declare type OwnedEntityPickerUiOptions = typeof OwnedEntityPickerFieldSc
|
|
|
296
264
|
*
|
|
297
265
|
* @public
|
|
298
266
|
*/
|
|
299
|
-
export declare const OwnerPickerFieldExtension:
|
|
267
|
+
export declare const OwnerPickerFieldExtension: FieldExtensionComponent_2<string, {
|
|
300
268
|
defaultNamespace?: string | false | undefined;
|
|
301
269
|
allowedKinds?: string[] | undefined;
|
|
302
270
|
allowArbitraryValues?: boolean | undefined;
|
|
@@ -338,12 +306,12 @@ export declare const repoPickerValidation: (value: string, validation: FieldVali
|
|
|
338
306
|
*
|
|
339
307
|
* @public
|
|
340
308
|
*/
|
|
341
|
-
export declare const RepoUrlPickerFieldExtension:
|
|
342
|
-
|
|
309
|
+
export declare const RepoUrlPickerFieldExtension: FieldExtensionComponent_2<string, {
|
|
310
|
+
allowedHosts?: string[] | undefined;
|
|
343
311
|
allowedOrganizations?: string[] | undefined;
|
|
312
|
+
allowedOwners?: string[] | undefined;
|
|
344
313
|
allowedProjects?: string[] | undefined;
|
|
345
314
|
allowedRepos?: string[] | undefined;
|
|
346
|
-
allowedHosts?: string[] | undefined;
|
|
347
315
|
requestUserCredentials?: {
|
|
348
316
|
additionalScopes?: {
|
|
349
317
|
azure?: string[] | undefined;
|
|
@@ -360,11 +328,11 @@ secretsKey: string;
|
|
|
360
328
|
* @public
|
|
361
329
|
*/
|
|
362
330
|
export declare const RepoUrlPickerFieldSchema: FieldSchema<string, {
|
|
363
|
-
|
|
331
|
+
allowedHosts?: string[] | undefined;
|
|
364
332
|
allowedOrganizations?: string[] | undefined;
|
|
333
|
+
allowedOwners?: string[] | undefined;
|
|
365
334
|
allowedProjects?: string[] | undefined;
|
|
366
335
|
allowedRepos?: string[] | undefined;
|
|
367
|
-
allowedHosts?: string[] | undefined;
|
|
368
336
|
requestUserCredentials?: {
|
|
369
337
|
additionalScopes?: {
|
|
370
338
|
azure?: string[] | undefined;
|
|
@@ -404,7 +372,10 @@ export declare type ReviewStepProps = {
|
|
|
404
372
|
}[];
|
|
405
373
|
};
|
|
406
374
|
|
|
407
|
-
/**
|
|
375
|
+
/**
|
|
376
|
+
* @public
|
|
377
|
+
* @deprecated use import from `{@link @backstage/plugin-scaffolder#scaffolderPlugin}.routes.root` instead.
|
|
378
|
+
*/
|
|
408
379
|
export declare const rootRouteRef: RouteRef<undefined>;
|
|
409
380
|
|
|
410
381
|
/**
|
|
@@ -441,47 +412,23 @@ export declare type RouterProps = {
|
|
|
441
412
|
};
|
|
442
413
|
|
|
443
414
|
/**
|
|
444
|
-
* An API to interact with the scaffolder backend.
|
|
445
|
-
*
|
|
446
415
|
* @public
|
|
416
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderApi} instead as this has now been moved.
|
|
447
417
|
*/
|
|
448
|
-
export declare
|
|
449
|
-
getTemplateParameterSchema(templateRef: string): Promise<TemplateParameterSchema>;
|
|
450
|
-
/**
|
|
451
|
-
* Executes the scaffolding of a component, given a template and its
|
|
452
|
-
* parameter values.
|
|
453
|
-
*
|
|
454
|
-
* @param options - The {@link ScaffolderScaffoldOptions} the scaffolding.
|
|
455
|
-
*/
|
|
456
|
-
scaffold(options: ScaffolderScaffoldOptions): Promise<ScaffolderScaffoldResponse>;
|
|
457
|
-
getTask(taskId: string): Promise<ScaffolderTask>;
|
|
458
|
-
listTasks?(options: {
|
|
459
|
-
filterByOwnership: 'owned' | 'all';
|
|
460
|
-
}): Promise<{
|
|
461
|
-
tasks: ScaffolderTask[];
|
|
462
|
-
}>;
|
|
463
|
-
getIntegrationsList(options: ScaffolderGetIntegrationsListOptions): Promise<ScaffolderGetIntegrationsListResponse>;
|
|
464
|
-
/**
|
|
465
|
-
* Returns a list of all installed actions.
|
|
466
|
-
*/
|
|
467
|
-
listActions(): Promise<ListActionsResponse>;
|
|
468
|
-
streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
|
|
469
|
-
dryRun?(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
|
|
470
|
-
}
|
|
418
|
+
export declare type ScaffolderApi = ScaffolderApi_2;
|
|
471
419
|
|
|
472
420
|
/**
|
|
473
|
-
* Utility API reference for the {@link ScaffolderApi}.
|
|
474
|
-
*
|
|
475
421
|
* @public
|
|
422
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#scaffolderApiRef} instead as this has now been moved.
|
|
476
423
|
*/
|
|
477
|
-
export declare const scaffolderApiRef: ApiRef<
|
|
424
|
+
export declare const scaffolderApiRef: ApiRef<ScaffolderApi_2>;
|
|
478
425
|
|
|
479
426
|
/**
|
|
480
427
|
* An API to interact with the scaffolder backend.
|
|
481
428
|
*
|
|
482
429
|
* @public
|
|
483
430
|
*/
|
|
484
|
-
export declare class ScaffolderClient implements
|
|
431
|
+
export declare class ScaffolderClient implements ScaffolderApi_2 {
|
|
485
432
|
private readonly discoveryApi;
|
|
486
433
|
private readonly scmIntegrationsApi;
|
|
487
434
|
private readonly fetchApi;
|
|
@@ -497,76 +444,50 @@ export declare class ScaffolderClient implements ScaffolderApi {
|
|
|
497
444
|
listTasks(options: {
|
|
498
445
|
filterByOwnership: 'owned' | 'all';
|
|
499
446
|
}): Promise<{
|
|
500
|
-
tasks:
|
|
447
|
+
tasks: ScaffolderTask_2[];
|
|
501
448
|
}>;
|
|
502
|
-
getIntegrationsList(options:
|
|
503
|
-
getTemplateParameterSchema(templateRef: string): Promise<
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
* @param options - The {@link ScaffolderScaffoldOptions} the scaffolding.
|
|
509
|
-
*/
|
|
510
|
-
scaffold(options: ScaffolderScaffoldOptions): Promise<ScaffolderScaffoldResponse>;
|
|
511
|
-
getTask(taskId: string): Promise<ScaffolderTask>;
|
|
512
|
-
streamLogs(options: ScaffolderStreamLogsOptions): Observable<LogEvent>;
|
|
513
|
-
dryRun(options: ScaffolderDryRunOptions): Promise<ScaffolderDryRunResponse>;
|
|
449
|
+
getIntegrationsList(options: ScaffolderGetIntegrationsListOptions_2): Promise<ScaffolderGetIntegrationsListResponse_2>;
|
|
450
|
+
getTemplateParameterSchema(templateRef: string): Promise<TemplateParameterSchema_2>;
|
|
451
|
+
scaffold(options: ScaffolderScaffoldOptions_2): Promise<ScaffolderScaffoldResponse_2>;
|
|
452
|
+
getTask(taskId: string): Promise<ScaffolderTask_2>;
|
|
453
|
+
streamLogs(options: ScaffolderStreamLogsOptions_2): Observable<LogEvent_2>;
|
|
454
|
+
dryRun(options: ScaffolderDryRunOptions_2): Promise<ScaffolderDryRunResponse_2>;
|
|
514
455
|
private streamLogsEventStream;
|
|
515
456
|
private streamLogsPolling;
|
|
516
|
-
listActions(): Promise<
|
|
457
|
+
listActions(): Promise<ListActionsResponse_2>;
|
|
517
458
|
}
|
|
518
459
|
|
|
519
|
-
/**
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
directoryContents: {
|
|
525
|
-
path: string;
|
|
526
|
-
base64Content: string;
|
|
527
|
-
}[];
|
|
528
|
-
}
|
|
460
|
+
/**
|
|
461
|
+
* @public
|
|
462
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderDryRunOptions} instead as this has now been moved.
|
|
463
|
+
*/
|
|
464
|
+
export declare type ScaffolderDryRunOptions = ScaffolderDryRunOptions_2;
|
|
529
465
|
|
|
530
|
-
/**
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
executable: boolean;
|
|
536
|
-
}>;
|
|
537
|
-
log: Array<Pick<LogEvent, 'body'>>;
|
|
538
|
-
steps: TaskStep[];
|
|
539
|
-
output: ScaffolderTaskOutput;
|
|
540
|
-
}
|
|
466
|
+
/**
|
|
467
|
+
* @public
|
|
468
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderDryRunResponse} instead as this has now been moved.
|
|
469
|
+
*/
|
|
470
|
+
export declare type ScaffolderDryRunResponse = ScaffolderDryRunResponse_2;
|
|
541
471
|
|
|
542
472
|
/**
|
|
543
|
-
* The Wrapping component for defining fields extensions inside
|
|
544
|
-
*
|
|
545
473
|
* @public
|
|
474
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderFieldExtensions} instead as this has now been moved.
|
|
546
475
|
*/
|
|
547
|
-
export declare const ScaffolderFieldExtensions:
|
|
476
|
+
export declare const ScaffolderFieldExtensions: ComponentType< {
|
|
477
|
+
children?: ReactNode;
|
|
478
|
+
}>;
|
|
548
479
|
|
|
549
480
|
/**
|
|
550
|
-
* The arguments for `getIntegrationsList`.
|
|
551
|
-
*
|
|
552
481
|
* @public
|
|
482
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderGetIntegrationsListOptions} instead as this has now been moved.
|
|
553
483
|
*/
|
|
554
|
-
export declare
|
|
555
|
-
allowedHosts: string[];
|
|
556
|
-
}
|
|
484
|
+
export declare type ScaffolderGetIntegrationsListOptions = ScaffolderGetIntegrationsListOptions_2;
|
|
557
485
|
|
|
558
486
|
/**
|
|
559
|
-
* The response shape for `getIntegrationsList`.
|
|
560
|
-
*
|
|
561
487
|
* @public
|
|
488
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderGetIntegrationsListResponse} instead as this has now been moved.
|
|
562
489
|
*/
|
|
563
|
-
export declare
|
|
564
|
-
integrations: {
|
|
565
|
-
type: string;
|
|
566
|
-
title: string;
|
|
567
|
-
host: string;
|
|
568
|
-
}[];
|
|
569
|
-
}
|
|
490
|
+
export declare type ScaffolderGetIntegrationsListResponse = ScaffolderGetIntegrationsListResponse_2;
|
|
570
491
|
|
|
571
492
|
/**
|
|
572
493
|
* The wrapping component for defining scaffolder layouts as children
|
|
@@ -575,13 +496,11 @@ export declare interface ScaffolderGetIntegrationsListResponse {
|
|
|
575
496
|
*/
|
|
576
497
|
export declare const ScaffolderLayouts: React.ComponentType;
|
|
577
498
|
|
|
578
|
-
/**
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
entityRef?: string;
|
|
584
|
-
};
|
|
499
|
+
/**
|
|
500
|
+
* @public
|
|
501
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderOutputlink} instead as this has now been moved.
|
|
502
|
+
*/
|
|
503
|
+
export declare type ScaffolderOutputlink = ScaffolderOutputLink;
|
|
585
504
|
|
|
586
505
|
/**
|
|
587
506
|
* The Router and main entrypoint to the Scaffolder plugin.
|
|
@@ -596,6 +515,8 @@ export declare const ScaffolderPage: (props: RouterProps) => JSX.Element;
|
|
|
596
515
|
*/
|
|
597
516
|
export declare const scaffolderPlugin: BackstagePlugin< {
|
|
598
517
|
root: RouteRef<undefined>;
|
|
518
|
+
selectedTemplate: SubRouteRef<PathParams<"/templates/:namespace/:templateName">>;
|
|
519
|
+
ongoingTask: SubRouteRef<PathParams<"/tasks/:taskId">>;
|
|
599
520
|
}, {
|
|
600
521
|
registerComponent: ExternalRouteRef<undefined, true>;
|
|
601
522
|
viewTechDoc: ExternalRouteRef< {
|
|
@@ -606,72 +527,46 @@ namespace: string;
|
|
|
606
527
|
}, {}>;
|
|
607
528
|
|
|
608
529
|
/**
|
|
609
|
-
* The input options to the `scaffold` method of the `ScaffolderClient`.
|
|
610
|
-
*
|
|
611
530
|
* @public
|
|
531
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderScaffoldOptions} instead as this has now been moved.
|
|
612
532
|
*/
|
|
613
|
-
export declare
|
|
614
|
-
templateRef: string;
|
|
615
|
-
values: Record<string, JsonValue>;
|
|
616
|
-
secrets?: Record<string, string>;
|
|
617
|
-
}
|
|
533
|
+
export declare type ScaffolderScaffoldOptions = ScaffolderScaffoldOptions_2;
|
|
618
534
|
|
|
619
535
|
/**
|
|
620
|
-
* The response shape of the `scaffold` method of the `ScaffolderClient`.
|
|
621
|
-
*
|
|
622
536
|
* @public
|
|
537
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderScaffoldResponse} instead as this has now been moved.
|
|
623
538
|
*/
|
|
624
|
-
export declare
|
|
625
|
-
taskId: string;
|
|
626
|
-
}
|
|
539
|
+
export declare type ScaffolderScaffoldResponse = ScaffolderScaffoldResponse_2;
|
|
627
540
|
|
|
628
541
|
/**
|
|
629
|
-
* The input options to the `streamLogs` method of the `ScaffolderClient`.
|
|
630
|
-
*
|
|
631
542
|
* @public
|
|
543
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderStreamLogsOptions} instead as this has now been moved.
|
|
632
544
|
*/
|
|
633
|
-
export declare
|
|
634
|
-
taskId: string;
|
|
635
|
-
after?: number;
|
|
636
|
-
}
|
|
545
|
+
export declare type ScaffolderStreamLogsOptions = ScaffolderStreamLogsOptions_2;
|
|
637
546
|
|
|
638
547
|
/**
|
|
639
|
-
* The shape of each task returned from the `scaffolder-backend`
|
|
640
|
-
*
|
|
641
548
|
* @public
|
|
549
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderTask} instead as this has now been moved.
|
|
642
550
|
*/
|
|
643
|
-
export declare type ScaffolderTask =
|
|
644
|
-
id: string;
|
|
645
|
-
spec: TaskSpec;
|
|
646
|
-
status: 'failed' | 'completed' | 'processing' | 'open' | 'cancelled';
|
|
647
|
-
lastHeartbeatAt: string;
|
|
648
|
-
createdAt: string;
|
|
649
|
-
};
|
|
650
|
-
|
|
651
|
-
/** @public */
|
|
652
|
-
export declare type ScaffolderTaskOutput = {
|
|
653
|
-
links?: ScaffolderOutputLink[];
|
|
654
|
-
} & {
|
|
655
|
-
[key: string]: unknown;
|
|
656
|
-
};
|
|
551
|
+
export declare type ScaffolderTask = ScaffolderTask_2;
|
|
657
552
|
|
|
658
553
|
/**
|
|
659
|
-
* The status of each task in a Scaffolder Job
|
|
660
|
-
*
|
|
661
554
|
* @public
|
|
555
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderTaskOutput} instead as this has now been moved.
|
|
662
556
|
*/
|
|
663
|
-
export declare type
|
|
557
|
+
export declare type ScaffolderTaskOutput = ScaffolderTaskOutput_2;
|
|
664
558
|
|
|
665
559
|
/**
|
|
666
|
-
* The return type from the useTemplateSecrets hook.
|
|
667
560
|
* @public
|
|
561
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderTaskStatus} instead as this has now been moved.
|
|
668
562
|
*/
|
|
669
|
-
export declare
|
|
670
|
-
setSecrets: (input: Record<string, string>) => void;
|
|
671
|
-
}
|
|
563
|
+
export declare type ScaffolderTaskStatus = ScaffolderTaskStatus_2;
|
|
672
564
|
|
|
673
|
-
/**
|
|
674
|
-
|
|
565
|
+
/**
|
|
566
|
+
* @public
|
|
567
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#ScaffolderUseTemplateSecrets} instead as this has now been moved.
|
|
568
|
+
*/
|
|
569
|
+
export declare type ScaffolderUseTemplateSecrets = ScaffolderUseTemplateSecrets_2;
|
|
675
570
|
|
|
676
571
|
/**
|
|
677
572
|
* TaskPage for showing the status of the taskId provided as a param
|
|
@@ -694,20 +589,10 @@ export declare type TaskPageProps = {
|
|
|
694
589
|
/* Excluded from this release type: TemplateGroupFilter */
|
|
695
590
|
|
|
696
591
|
/**
|
|
697
|
-
* The shape of each entry of parameters which gets rendered
|
|
698
|
-
* as a separate step in the wizard input
|
|
699
|
-
*
|
|
700
592
|
* @public
|
|
593
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#TemplateParameterSchema} instead as this has now been moved.
|
|
701
594
|
*/
|
|
702
|
-
export declare type TemplateParameterSchema =
|
|
703
|
-
title: string;
|
|
704
|
-
description?: string;
|
|
705
|
-
steps: Array<{
|
|
706
|
-
title: string;
|
|
707
|
-
description?: string;
|
|
708
|
-
schema: JsonObject;
|
|
709
|
-
}>;
|
|
710
|
-
};
|
|
595
|
+
export declare type TemplateParameterSchema = TemplateParameterSchema_2;
|
|
711
596
|
|
|
712
597
|
/**
|
|
713
598
|
* The component to select the `type` of `Template` that you will see in the table.
|
|
@@ -717,9 +602,9 @@ export declare type TemplateParameterSchema = {
|
|
|
717
602
|
export declare const TemplateTypePicker: () => JSX.Element | null;
|
|
718
603
|
|
|
719
604
|
/**
|
|
720
|
-
* Hook to access the secrets context.
|
|
721
605
|
* @public
|
|
606
|
+
* @deprecated use import from {@link @backstage/plugin-scaffolder-react#useTemplateSecrets} instead as this has now been moved.
|
|
722
607
|
*/
|
|
723
|
-
export declare const useTemplateSecrets: () =>
|
|
608
|
+
export declare const useTemplateSecrets: () => ScaffolderUseTemplateSecrets_2;
|
|
724
609
|
|
|
725
610
|
export { }
|