@backstage/plugin-scaffolder-backend 0.15.12 → 0.15.13

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/dist/index.d.ts CHANGED
@@ -146,51 +146,6 @@ declare type RunCommandOptions = {
146
146
  };
147
147
  declare const runCommand: ({ command, args, logStream, }: RunCommandOptions) => Promise<void>;
148
148
 
149
- declare type PartialJsonObject = Partial<JsonObject>;
150
- declare type PartialJsonValue = PartialJsonObject | JsonValue | undefined;
151
- declare type InputBase = Partial<{
152
- [name: string]: PartialJsonValue;
153
- }>;
154
- declare type ActionContext<Input extends InputBase> = {
155
- /**
156
- * Base URL for the location of the task spec, typically the url of the source entity file.
157
- */
158
- baseUrl?: string;
159
- logger: Logger;
160
- logStream: Writable;
161
- /**
162
- * User token forwarded from initial request, for use in subsequent api requests
163
- */
164
- token?: string | undefined;
165
- workspacePath: string;
166
- input: Input;
167
- output(name: string, value: JsonValue): void;
168
- /**
169
- * Creates a temporary directory for use by the action, which is then cleaned up automatically.
170
- */
171
- createTemporaryDirectory(): Promise<string>;
172
- };
173
- declare type TemplateAction<Input extends InputBase> = {
174
- id: string;
175
- description?: string;
176
- schema?: {
177
- input?: Schema;
178
- output?: Schema;
179
- };
180
- handler: (ctx: ActionContext<Input>) => Promise<void>;
181
- };
182
-
183
- declare class TemplateActionRegistry {
184
- private readonly actions;
185
- register<Parameters extends InputBase>(action: TemplateAction<Parameters>): void;
186
- get(actionId: string): TemplateAction<any>;
187
- list(): TemplateAction<any>[];
188
- }
189
-
190
- declare const createTemplateAction: <Input extends Partial<{
191
- [name: string]: _backstage_types.JsonValue | Partial<_backstage_types.JsonObject> | undefined;
192
- }>>(templateAction: TemplateAction<Input>) => TemplateAction<any>;
193
-
194
149
  /**
195
150
  * Status
196
151
  *
@@ -234,6 +189,14 @@ declare type SerializedTaskEvent = {
234
189
  type: TaskEventType;
235
190
  createdAt: string;
236
191
  };
192
+ /**
193
+ * TemplateMetadata
194
+ *
195
+ * @public
196
+ */
197
+ declare type TemplateMetadata = {
198
+ name: string;
199
+ };
237
200
  /**
238
201
  * TaskSpecV1beta2
239
202
  *
@@ -253,6 +216,7 @@ interface TaskSpecV1beta2 {
253
216
  output: {
254
217
  [name: string]: string;
255
218
  };
219
+ metadata?: TemplateMetadata;
256
220
  }
257
221
  interface TaskStep {
258
222
  id: string;
@@ -274,6 +238,7 @@ interface TaskSpecV1beta3 {
274
238
  output: {
275
239
  [name: string]: JsonValue;
276
240
  };
241
+ metadata?: TemplateMetadata;
277
242
  }
278
243
  /**
279
244
  * TaskSpec
@@ -379,6 +344,52 @@ interface TaskStore {
379
344
  }>;
380
345
  }
381
346
 
347
+ declare type PartialJsonObject = Partial<JsonObject>;
348
+ declare type PartialJsonValue = PartialJsonObject | JsonValue | undefined;
349
+ declare type InputBase = Partial<{
350
+ [name: string]: PartialJsonValue;
351
+ }>;
352
+ declare type ActionContext<Input extends InputBase> = {
353
+ /**
354
+ * Base URL for the location of the task spec, typically the url of the source entity file.
355
+ */
356
+ baseUrl?: string;
357
+ logger: Logger;
358
+ logStream: Writable;
359
+ /**
360
+ * User token forwarded from initial request, for use in subsequent api requests
361
+ */
362
+ token?: string | undefined;
363
+ workspacePath: string;
364
+ input: Input;
365
+ output(name: string, value: JsonValue): void;
366
+ /**
367
+ * Creates a temporary directory for use by the action, which is then cleaned up automatically.
368
+ */
369
+ createTemporaryDirectory(): Promise<string>;
370
+ metadata?: TemplateMetadata;
371
+ };
372
+ declare type TemplateAction<Input extends InputBase> = {
373
+ id: string;
374
+ description?: string;
375
+ schema?: {
376
+ input?: Schema;
377
+ output?: Schema;
378
+ };
379
+ handler: (ctx: ActionContext<Input>) => Promise<void>;
380
+ };
381
+
382
+ declare class TemplateActionRegistry {
383
+ private readonly actions;
384
+ register<Parameters extends InputBase>(action: TemplateAction<Parameters>): void;
385
+ get(actionId: string): TemplateAction<any>;
386
+ list(): TemplateAction<any>[];
387
+ }
388
+
389
+ declare const createTemplateAction: <Input extends Partial<{
390
+ [name: string]: _backstage_types.JsonValue | Partial<_backstage_types.JsonObject> | undefined;
391
+ }>>(templateAction: TemplateAction<Input>) => TemplateAction<any>;
392
+
382
393
  /**
383
394
  * DatabaseTaskStore
384
395
  *
@@ -518,4 +529,4 @@ declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
518
529
  postProcessEntity(entity: Entity, _location: LocationSpec, emit: CatalogProcessorEmit): Promise<Entity>;
519
530
  }
520
531
 
521
- export { ActionContext, CatalogEntityClient, CompletedTaskState, CreateWorkerOptions, DatabaseTaskStore, DispatchResult, OctokitProvider, RouterOptions, ScaffolderEntitiesProcessor, SerializedTask, SerializedTaskEvent, Status, TaskBroker, TaskContext, TaskEventType, TaskManager, TaskSecrets, TaskSpec, TaskSpecV1beta2, TaskSpecV1beta3, TaskState, TaskStore, TaskStoreEmitOptions, TaskStoreListEventsOptions, TaskWorker, TemplateAction, TemplateActionRegistry, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchPlainAction, createFetchTemplateAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createGithubWebhookAction, createPublishAzureAction, createPublishBitbucketAction, createPublishFileAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createRouter, createTemplateAction, fetchContents, runCommand };
532
+ export { ActionContext, CatalogEntityClient, CompletedTaskState, CreateWorkerOptions, DatabaseTaskStore, DispatchResult, OctokitProvider, RouterOptions, ScaffolderEntitiesProcessor, SerializedTask, SerializedTaskEvent, Status, TaskBroker, TaskContext, TaskEventType, TaskManager, TaskSecrets, TaskSpec, TaskSpecV1beta2, TaskSpecV1beta3, TaskState, TaskStore, TaskStoreEmitOptions, TaskStoreListEventsOptions, TaskWorker, TemplateAction, TemplateActionRegistry, TemplateMetadata, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchPlainAction, createFetchTemplateAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createGithubWebhookAction, createPublishAzureAction, createPublishBitbucketAction, createPublishFileAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createRouter, createTemplateAction, fetchContents, runCommand };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend",
3
3
  "description": "The Backstage backend plugin that helps you create new things",
4
- "version": "0.15.12",
4
+ "version": "0.15.13",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -30,13 +30,13 @@
30
30
  "clean": "backstage-cli clean"
31
31
  },
32
32
  "dependencies": {
33
- "@backstage/backend-common": "^0.9.9",
34
- "@backstage/catalog-client": "^0.5.1",
35
- "@backstage/catalog-model": "^0.9.6",
33
+ "@backstage/backend-common": "^0.9.10",
34
+ "@backstage/catalog-client": "^0.5.2",
35
+ "@backstage/catalog-model": "^0.9.7",
36
36
  "@backstage/config": "^0.1.11",
37
37
  "@backstage/errors": "^0.1.4",
38
38
  "@backstage/integration": "^0.6.9",
39
- "@backstage/plugin-catalog-backend": "^0.17.3",
39
+ "@backstage/plugin-catalog-backend": "^0.17.4",
40
40
  "@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.4",
41
41
  "@backstage/plugin-scaffolder-common": "^0.1.1",
42
42
  "@backstage/types": "^0.1.1",
@@ -71,8 +71,8 @@
71
71
  "yaml": "^1.10.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@backstage/cli": "^0.8.2",
75
- "@backstage/test-utils": "^0.1.21",
74
+ "@backstage/cli": "^0.9.0",
75
+ "@backstage/test-utils": "^0.1.22",
76
76
  "@types/command-exists": "^1.2.0",
77
77
  "@types/fs-extra": "^9.0.1",
78
78
  "@types/git-url-parse": "^9.0.0",
@@ -91,5 +91,5 @@
91
91
  "config.d.ts"
92
92
  ],
93
93
  "configSchema": "config.d.ts",
94
- "gitHead": "5bdaccc40b4a814cf0b45d429f15a3afacc2f60b"
94
+ "gitHead": "ddfdcd2b44dc9848cf550cea5346d5f9916a36d9"
95
95
  }