@backstage/plugin-scaffolder-backend 1.5.1 → 1.6.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 +71 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +29 -22
- package/dist/index.beta.d.ts +15 -21
- package/dist/index.cjs.js +262 -117
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +15 -21
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
+
## 1.6.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d1f7ba58e3: Added `repositoryId` output when create a repository in Azure
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- eadf56bbbf: Bump `git-url-parse` version to `^13.0.0`
|
|
12
|
+
- 096631e571: Added support for handling broken symlinks within the scaffolder backend. This is intended for templates that may hold a symlink that is invalid at build time but valid within the destination repo.
|
|
13
|
+
- 667d917488: Updated dependency `msw` to `^0.47.0`.
|
|
14
|
+
- 87ec2ba4d6: Updated dependency `msw` to `^0.46.0`.
|
|
15
|
+
- 6b9f6c0a4d: Added alpha `scaffolderPlugin` to be used with experimental backend system.
|
|
16
|
+
- 83c037cd46: Disable octokit throttling in publish:github:pull-request
|
|
17
|
+
- 2cbd533426: Uptake the `IdentityApi` change to use `getIdentity` instead of `authenticate` for retrieving the logged in users identity.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- @backstage/backend-plugin-api@0.1.2-next.1
|
|
20
|
+
- @backstage/plugin-catalog-node@1.0.2-next.1
|
|
21
|
+
- @backstage/backend-common@0.15.1-next.2
|
|
22
|
+
- @backstage/integration@1.3.1-next.1
|
|
23
|
+
- @backstage/plugin-catalog-backend@1.4.0-next.2
|
|
24
|
+
- @backstage/plugin-auth-node@0.2.5-next.2
|
|
25
|
+
- @backstage/catalog-client@1.0.5-next.1
|
|
26
|
+
|
|
27
|
+
## 1.6.0-next.1
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- 7db9613671: Added `projectId` for gitlab projects to be displayed in the `gitlab:publish` output
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- 0d8d650e32: Applied the fix from version 1.5.1 of this package, which is part of the v1.5.1 release of Backstage.
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
- @backstage/backend-common@0.15.1-next.1
|
|
38
|
+
- @backstage/plugin-catalog-backend@1.4.0-next.1
|
|
39
|
+
|
|
40
|
+
## 1.6.0-next.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- ea2eee9e6a: Add the option for a homepage when using the `github:publish` action
|
|
45
|
+
- 8872cc735d: Fixed a bug in plugin-scaffolder-backend where it ignores the skip migration database options.
|
|
46
|
+
|
|
47
|
+
To use this new implementation you need to create the instance of `DatabaseTaskStore` using the `PluginDatabaseManager` instead of `Knex`;
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
import { DatabaseManager, getRootLogger, loadBackendConfig } from '@backstage/backend-common';
|
|
51
|
+
import { DatabaseTaskStore } from '@backstage/plugin-scaffolder-backend';
|
|
52
|
+
|
|
53
|
+
const config = await loadBackendConfig({ argv: process.argv, logger: getRootLogger() });
|
|
54
|
+
const databaseManager = DatabaseManager.fromConfig(config, { migrations: { skip: true } });
|
|
55
|
+
const databaseTaskStore = await DatabaseTaskStore.create(databaseManager);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- 1ff817b3f0: add entity metadata to the template info type
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- bf5e9030eb: Updated dependency `msw` to `^0.45.0`.
|
|
63
|
+
- 2df9955f4a: Removed the depreacated `publish:file` action, use the template editor to test templates instead.
|
|
64
|
+
- ef9ab322de: Minor API signatures cleanup
|
|
65
|
+
- Updated dependencies
|
|
66
|
+
- @backstage/backend-common@0.15.1-next.0
|
|
67
|
+
- @backstage/plugin-catalog-backend@1.3.2-next.0
|
|
68
|
+
- @backstage/backend-plugin-api@0.1.2-next.0
|
|
69
|
+
- @backstage/catalog-client@1.0.5-next.0
|
|
70
|
+
- @backstage/integration@1.3.1-next.0
|
|
71
|
+
- @backstage/plugin-scaffolder-common@1.2.0-next.0
|
|
72
|
+
- @backstage/plugin-catalog-node@1.0.2-next.0
|
|
73
|
+
|
|
3
74
|
## 1.5.1
|
|
4
75
|
|
|
5
76
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { createPullRequest } from 'octokit-plugin-create-pull-request';
|
|
|
15
15
|
import { Entity } from '@backstage/catalog-model';
|
|
16
16
|
import express from 'express';
|
|
17
17
|
import { GithubCredentialsProvider } from '@backstage/integration';
|
|
18
|
+
import { IdentityApi } from '@backstage/plugin-auth-node';
|
|
18
19
|
import { JsonObject } from '@backstage/types';
|
|
19
20
|
import { JsonValue } from '@backstage/types';
|
|
20
21
|
import { Knex } from 'knex';
|
|
@@ -264,6 +265,7 @@ export declare function createGithubRepoCreateAction(options: {
|
|
|
264
265
|
}): TemplateAction< {
|
|
265
266
|
repoUrl: string;
|
|
266
267
|
description?: string | undefined;
|
|
268
|
+
homepage?: string | undefined;
|
|
267
269
|
access?: string | undefined;
|
|
268
270
|
deleteBranchOnMerge?: boolean | undefined;
|
|
269
271
|
gitAuthorName?: string | undefined;
|
|
@@ -409,22 +411,6 @@ enableLFS?: boolean | undefined;
|
|
|
409
411
|
token?: string | undefined;
|
|
410
412
|
}>;
|
|
411
413
|
|
|
412
|
-
/**
|
|
413
|
-
* This task is useful for local development and testing of both the scaffolder
|
|
414
|
-
* and scaffolder templates.
|
|
415
|
-
*
|
|
416
|
-
* @remarks
|
|
417
|
-
*
|
|
418
|
-
* This action is not installed by default and should not be installed in
|
|
419
|
-
* production, as it writes the files to the local filesystem of the scaffolder.
|
|
420
|
-
*
|
|
421
|
-
* @public
|
|
422
|
-
* @deprecated This action will be removed, prefer testing templates using the template editor instead.
|
|
423
|
-
*/
|
|
424
|
-
export declare function createPublishFileAction(): TemplateAction< {
|
|
425
|
-
path: string;
|
|
426
|
-
}>;
|
|
427
|
-
|
|
428
414
|
/**
|
|
429
415
|
* Creates a new action that initializes a git repository of the content in the workspace
|
|
430
416
|
* and publishes it to a Gerrit instance.
|
|
@@ -472,6 +458,7 @@ export declare function createPublishGithubAction(options: {
|
|
|
472
458
|
}): TemplateAction< {
|
|
473
459
|
repoUrl: string;
|
|
474
460
|
description?: string | undefined;
|
|
461
|
+
homepage?: string | undefined;
|
|
475
462
|
access?: string | undefined;
|
|
476
463
|
defaultBranch?: string | undefined;
|
|
477
464
|
protectDefaultBranch?: boolean | undefined;
|
|
@@ -619,6 +606,8 @@ export declare interface CurrentClaimedTask {
|
|
|
619
606
|
export declare class DatabaseTaskStore implements TaskStore {
|
|
620
607
|
private readonly db;
|
|
621
608
|
static create(options: DatabaseTaskStoreOptions): Promise<DatabaseTaskStore>;
|
|
609
|
+
private static getClient;
|
|
610
|
+
private static runMigrations;
|
|
622
611
|
private constructor();
|
|
623
612
|
list(options: {
|
|
624
613
|
createdBy?: string;
|
|
@@ -629,14 +618,14 @@ export declare class DatabaseTaskStore implements TaskStore {
|
|
|
629
618
|
createTask(options: TaskStoreCreateTaskOptions): Promise<TaskStoreCreateTaskResult>;
|
|
630
619
|
claimTask(): Promise<SerializedTask | undefined>;
|
|
631
620
|
heartbeatTask(taskId: string): Promise<void>;
|
|
632
|
-
listStaleTasks(
|
|
621
|
+
listStaleTasks(options: {
|
|
633
622
|
timeoutS: number;
|
|
634
623
|
}): Promise<{
|
|
635
624
|
tasks: {
|
|
636
625
|
taskId: string;
|
|
637
626
|
}[];
|
|
638
627
|
}>;
|
|
639
|
-
completeTask(
|
|
628
|
+
completeTask(options: {
|
|
640
629
|
taskId: string;
|
|
641
630
|
status: TaskStatus;
|
|
642
631
|
eventBody: JsonObject;
|
|
@@ -644,7 +633,7 @@ export declare class DatabaseTaskStore implements TaskStore {
|
|
|
644
633
|
emitLogEvent(options: TaskStoreEmitOptions<{
|
|
645
634
|
message: string;
|
|
646
635
|
} & JsonObject>): Promise<void>;
|
|
647
|
-
listEvents(
|
|
636
|
+
listEvents(options: TaskStoreListEventsOptions): Promise<{
|
|
648
637
|
events: SerializedTaskEvent[];
|
|
649
638
|
}>;
|
|
650
639
|
}
|
|
@@ -655,7 +644,7 @@ export declare class DatabaseTaskStore implements TaskStore {
|
|
|
655
644
|
* @public
|
|
656
645
|
*/
|
|
657
646
|
export declare type DatabaseTaskStoreOptions = {
|
|
658
|
-
database: Knex;
|
|
647
|
+
database: PluginDatabaseManager | Knex;
|
|
659
648
|
};
|
|
660
649
|
|
|
661
650
|
/**
|
|
@@ -671,7 +660,7 @@ export declare const executeShellCommand: (options: RunCommandOptions) => Promis
|
|
|
671
660
|
*
|
|
672
661
|
* @public
|
|
673
662
|
*/
|
|
674
|
-
export declare function fetchContents(
|
|
663
|
+
export declare function fetchContents(options: {
|
|
675
664
|
reader: UrlReader;
|
|
676
665
|
integrations: ScmIntegrations;
|
|
677
666
|
baseUrl?: string;
|
|
@@ -704,6 +693,7 @@ export declare interface RouterOptions {
|
|
|
704
693
|
taskWorkers?: number;
|
|
705
694
|
taskBroker?: TaskBroker;
|
|
706
695
|
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
696
|
+
identity?: IdentityApi;
|
|
707
697
|
}
|
|
708
698
|
|
|
709
699
|
/** @public */
|
|
@@ -722,7 +712,7 @@ export declare type RunCommandOptions = {
|
|
|
722
712
|
* @alpha
|
|
723
713
|
* Registers the ScaffolderEntitiesProcessor with the catalog processing extension point.
|
|
724
714
|
*/
|
|
725
|
-
export declare const scaffolderCatalogModule: (options?:
|
|
715
|
+
export declare const scaffolderCatalogModule: (options?: undefined) => BackendFeature;
|
|
726
716
|
|
|
727
717
|
/** @public */
|
|
728
718
|
export declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
|
@@ -732,6 +722,23 @@ export declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
|
|
732
722
|
postProcessEntity(entity: Entity, _location: LocationSpec, emit: CatalogProcessorEmit): Promise<Entity>;
|
|
733
723
|
}
|
|
734
724
|
|
|
725
|
+
/**
|
|
726
|
+
* Catalog plugin
|
|
727
|
+
* @alpha
|
|
728
|
+
*/
|
|
729
|
+
export declare const scaffolderPlugin: (options: ScaffolderPluginOptions) => BackendFeature;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Catalog plugin options
|
|
733
|
+
* @alpha
|
|
734
|
+
*/
|
|
735
|
+
export declare type ScaffolderPluginOptions = {
|
|
736
|
+
actions?: TemplateAction<any>[];
|
|
737
|
+
taskWorkers?: number;
|
|
738
|
+
taskBroker?: TaskBroker;
|
|
739
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
740
|
+
};
|
|
741
|
+
|
|
735
742
|
/**
|
|
736
743
|
* SerializedTask
|
|
737
744
|
*
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { createPullRequest } from 'octokit-plugin-create-pull-request';
|
|
|
15
15
|
import { Entity } from '@backstage/catalog-model';
|
|
16
16
|
import express from 'express';
|
|
17
17
|
import { GithubCredentialsProvider } from '@backstage/integration';
|
|
18
|
+
import { IdentityApi } from '@backstage/plugin-auth-node';
|
|
18
19
|
import { JsonObject } from '@backstage/types';
|
|
19
20
|
import { JsonValue } from '@backstage/types';
|
|
20
21
|
import { Knex } from 'knex';
|
|
@@ -264,6 +265,7 @@ export declare function createGithubRepoCreateAction(options: {
|
|
|
264
265
|
}): TemplateAction< {
|
|
265
266
|
repoUrl: string;
|
|
266
267
|
description?: string | undefined;
|
|
268
|
+
homepage?: string | undefined;
|
|
267
269
|
access?: string | undefined;
|
|
268
270
|
deleteBranchOnMerge?: boolean | undefined;
|
|
269
271
|
gitAuthorName?: string | undefined;
|
|
@@ -409,22 +411,6 @@ enableLFS?: boolean | undefined;
|
|
|
409
411
|
token?: string | undefined;
|
|
410
412
|
}>;
|
|
411
413
|
|
|
412
|
-
/**
|
|
413
|
-
* This task is useful for local development and testing of both the scaffolder
|
|
414
|
-
* and scaffolder templates.
|
|
415
|
-
*
|
|
416
|
-
* @remarks
|
|
417
|
-
*
|
|
418
|
-
* This action is not installed by default and should not be installed in
|
|
419
|
-
* production, as it writes the files to the local filesystem of the scaffolder.
|
|
420
|
-
*
|
|
421
|
-
* @public
|
|
422
|
-
* @deprecated This action will be removed, prefer testing templates using the template editor instead.
|
|
423
|
-
*/
|
|
424
|
-
export declare function createPublishFileAction(): TemplateAction< {
|
|
425
|
-
path: string;
|
|
426
|
-
}>;
|
|
427
|
-
|
|
428
414
|
/**
|
|
429
415
|
* Creates a new action that initializes a git repository of the content in the workspace
|
|
430
416
|
* and publishes it to a Gerrit instance.
|
|
@@ -472,6 +458,7 @@ export declare function createPublishGithubAction(options: {
|
|
|
472
458
|
}): TemplateAction< {
|
|
473
459
|
repoUrl: string;
|
|
474
460
|
description?: string | undefined;
|
|
461
|
+
homepage?: string | undefined;
|
|
475
462
|
access?: string | undefined;
|
|
476
463
|
defaultBranch?: string | undefined;
|
|
477
464
|
protectDefaultBranch?: boolean | undefined;
|
|
@@ -619,6 +606,8 @@ export declare interface CurrentClaimedTask {
|
|
|
619
606
|
export declare class DatabaseTaskStore implements TaskStore {
|
|
620
607
|
private readonly db;
|
|
621
608
|
static create(options: DatabaseTaskStoreOptions): Promise<DatabaseTaskStore>;
|
|
609
|
+
private static getClient;
|
|
610
|
+
private static runMigrations;
|
|
622
611
|
private constructor();
|
|
623
612
|
list(options: {
|
|
624
613
|
createdBy?: string;
|
|
@@ -629,14 +618,14 @@ export declare class DatabaseTaskStore implements TaskStore {
|
|
|
629
618
|
createTask(options: TaskStoreCreateTaskOptions): Promise<TaskStoreCreateTaskResult>;
|
|
630
619
|
claimTask(): Promise<SerializedTask | undefined>;
|
|
631
620
|
heartbeatTask(taskId: string): Promise<void>;
|
|
632
|
-
listStaleTasks(
|
|
621
|
+
listStaleTasks(options: {
|
|
633
622
|
timeoutS: number;
|
|
634
623
|
}): Promise<{
|
|
635
624
|
tasks: {
|
|
636
625
|
taskId: string;
|
|
637
626
|
}[];
|
|
638
627
|
}>;
|
|
639
|
-
completeTask(
|
|
628
|
+
completeTask(options: {
|
|
640
629
|
taskId: string;
|
|
641
630
|
status: TaskStatus;
|
|
642
631
|
eventBody: JsonObject;
|
|
@@ -644,7 +633,7 @@ export declare class DatabaseTaskStore implements TaskStore {
|
|
|
644
633
|
emitLogEvent(options: TaskStoreEmitOptions<{
|
|
645
634
|
message: string;
|
|
646
635
|
} & JsonObject>): Promise<void>;
|
|
647
|
-
listEvents(
|
|
636
|
+
listEvents(options: TaskStoreListEventsOptions): Promise<{
|
|
648
637
|
events: SerializedTaskEvent[];
|
|
649
638
|
}>;
|
|
650
639
|
}
|
|
@@ -655,7 +644,7 @@ export declare class DatabaseTaskStore implements TaskStore {
|
|
|
655
644
|
* @public
|
|
656
645
|
*/
|
|
657
646
|
export declare type DatabaseTaskStoreOptions = {
|
|
658
|
-
database: Knex;
|
|
647
|
+
database: PluginDatabaseManager | Knex;
|
|
659
648
|
};
|
|
660
649
|
|
|
661
650
|
/**
|
|
@@ -671,7 +660,7 @@ export declare const executeShellCommand: (options: RunCommandOptions) => Promis
|
|
|
671
660
|
*
|
|
672
661
|
* @public
|
|
673
662
|
*/
|
|
674
|
-
export declare function fetchContents(
|
|
663
|
+
export declare function fetchContents(options: {
|
|
675
664
|
reader: UrlReader;
|
|
676
665
|
integrations: ScmIntegrations;
|
|
677
666
|
baseUrl?: string;
|
|
@@ -704,6 +693,7 @@ export declare interface RouterOptions {
|
|
|
704
693
|
taskWorkers?: number;
|
|
705
694
|
taskBroker?: TaskBroker;
|
|
706
695
|
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
696
|
+
identity?: IdentityApi;
|
|
707
697
|
}
|
|
708
698
|
|
|
709
699
|
/** @public */
|
|
@@ -728,6 +718,10 @@ export declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
|
|
728
718
|
postProcessEntity(entity: Entity, _location: LocationSpec, emit: CatalogProcessorEmit): Promise<Entity>;
|
|
729
719
|
}
|
|
730
720
|
|
|
721
|
+
/* Excluded from this release type: scaffolderPlugin */
|
|
722
|
+
|
|
723
|
+
/* Excluded from this release type: ScaffolderPluginOptions */
|
|
724
|
+
|
|
731
725
|
/**
|
|
732
726
|
* SerializedTask
|
|
733
727
|
*
|