@backstage/plugin-scaffolder-backend 0.15.21 → 0.15.23
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 +41 -0
- package/dist/index.cjs.js +178 -62
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +28 -19
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { TaskSpec, TaskSpecV1beta2, TaskSpecV1beta3, TemplateMetadata } from '@b
|
|
|
11
11
|
import { UrlReader, ContainerRunner, PluginDatabaseManager } from '@backstage/backend-common';
|
|
12
12
|
import { Config } from '@backstage/config';
|
|
13
13
|
import { createPullRequest } from 'octokit-plugin-create-pull-request';
|
|
14
|
-
import { Octokit } from '
|
|
14
|
+
import { Octokit } from 'octokit';
|
|
15
15
|
export { createFetchCookiecutterAction } from '@backstage/plugin-scaffolder-backend-module-cookiecutter';
|
|
16
16
|
import { SpawnOptionsWithoutStdio } from 'child_process';
|
|
17
17
|
import { Knex } from 'knex';
|
|
@@ -26,12 +26,31 @@ declare function createCatalogRegisterAction(options: {
|
|
|
26
26
|
|
|
27
27
|
declare function createCatalogWriteAction(): TemplateAction<any>;
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* A catalog client tailored for reading out entity data from the catalog.
|
|
31
|
+
*/
|
|
32
|
+
declare class CatalogEntityClient {
|
|
33
|
+
private readonly catalogClient;
|
|
34
|
+
constructor(catalogClient: CatalogApi);
|
|
35
|
+
/**
|
|
36
|
+
* Looks up a single template using a template name.
|
|
37
|
+
*
|
|
38
|
+
* Throws a NotFoundError or ConflictError if 0 or multiple templates are found.
|
|
39
|
+
*/
|
|
40
|
+
findTemplate(templateName: string, options?: {
|
|
41
|
+
token?: string;
|
|
42
|
+
}): Promise<TemplateEntityV1beta2>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare type TemplateFilter = (...args: JsonValue[]) => JsonValue | undefined;
|
|
46
|
+
|
|
29
47
|
declare const createBuiltinActions: (options: {
|
|
30
48
|
reader: UrlReader;
|
|
31
49
|
integrations: ScmIntegrations;
|
|
32
50
|
catalogClient: CatalogApi;
|
|
33
51
|
containerRunner?: ContainerRunner;
|
|
34
52
|
config: Config;
|
|
53
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
35
54
|
}) => TemplateAction<any>[];
|
|
36
55
|
|
|
37
56
|
/**
|
|
@@ -48,6 +67,7 @@ declare function createFetchPlainAction(options: {
|
|
|
48
67
|
declare function createFetchTemplateAction(options: {
|
|
49
68
|
reader: UrlReader;
|
|
50
69
|
integrations: ScmIntegrations;
|
|
70
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
51
71
|
}): TemplateAction<any>;
|
|
52
72
|
|
|
53
73
|
declare function fetchContents({ reader, integrations, baseUrl, fetchUrl, outputPath, }: {
|
|
@@ -101,6 +121,7 @@ declare type ClientFactoryInput = {
|
|
|
101
121
|
host: string;
|
|
102
122
|
owner: string;
|
|
103
123
|
repo: string;
|
|
124
|
+
token?: string;
|
|
104
125
|
};
|
|
105
126
|
interface CreateGithubPullRequestActionOptions {
|
|
106
127
|
integrations: ScmIntegrationRegistry;
|
|
@@ -148,7 +169,9 @@ declare class OctokitProvider {
|
|
|
148
169
|
*
|
|
149
170
|
* @param repoUrl - Repository URL
|
|
150
171
|
*/
|
|
151
|
-
getOctokit(repoUrl: string
|
|
172
|
+
getOctokit(repoUrl: string, options?: {
|
|
173
|
+
token?: string;
|
|
174
|
+
}): Promise<OctokitIntegration>;
|
|
152
175
|
}
|
|
153
176
|
|
|
154
177
|
declare type RunCommandOptions = {
|
|
@@ -441,6 +464,7 @@ declare type CreateWorkerOptions = {
|
|
|
441
464
|
integrations: ScmIntegrations;
|
|
442
465
|
workingDirectory: string;
|
|
443
466
|
logger: Logger;
|
|
467
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
444
468
|
};
|
|
445
469
|
/**
|
|
446
470
|
* TaskWorker
|
|
@@ -470,25 +494,10 @@ interface RouterOptions {
|
|
|
470
494
|
taskWorkers?: number;
|
|
471
495
|
containerRunner?: ContainerRunner;
|
|
472
496
|
taskBroker?: TaskBroker;
|
|
497
|
+
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
473
498
|
}
|
|
474
499
|
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
475
500
|
|
|
476
|
-
/**
|
|
477
|
-
* A catalog client tailored for reading out entity data from the catalog.
|
|
478
|
-
*/
|
|
479
|
-
declare class CatalogEntityClient {
|
|
480
|
-
private readonly catalogClient;
|
|
481
|
-
constructor(catalogClient: CatalogApi);
|
|
482
|
-
/**
|
|
483
|
-
* Looks up a single template using a template name.
|
|
484
|
-
*
|
|
485
|
-
* Throws a NotFoundError or ConflictError if 0 or multiple templates are found.
|
|
486
|
-
*/
|
|
487
|
-
findTemplate(templateName: string, options?: {
|
|
488
|
-
token?: string;
|
|
489
|
-
}): Promise<TemplateEntityV1beta2>;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
501
|
/** @public */
|
|
493
502
|
declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
|
494
503
|
private readonly validators;
|
|
@@ -496,4 +505,4 @@ declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
|
|
496
505
|
postProcessEntity(entity: Entity, _location: LocationSpec, emit: CatalogProcessorEmit): Promise<Entity>;
|
|
497
506
|
}
|
|
498
507
|
|
|
499
|
-
export { ActionContext, CatalogEntityClient, CompletedTaskState, CreateWorkerOptions, DatabaseTaskStore, DispatchResult, OctokitProvider, RouterOptions, ScaffolderEntitiesProcessor, SerializedTask, SerializedTaskEvent, Status, TaskBroker, TaskContext, TaskEventType, TaskManager, TaskSecrets, TaskState, TaskStore, TaskStoreEmitOptions, TaskStoreListEventsOptions, TaskWorker, TemplateAction, TemplateActionRegistry, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchPlainAction, createFetchTemplateAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createGithubWebhookAction, createPublishAzureAction, createPublishBitbucketAction, createPublishFileAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createPublishGitlabMergeRequestAction, createRouter, createTemplateAction, fetchContents, runCommand };
|
|
508
|
+
export { ActionContext, CatalogEntityClient, CompletedTaskState, CreateWorkerOptions, DatabaseTaskStore, DispatchResult, OctokitProvider, RouterOptions, ScaffolderEntitiesProcessor, SerializedTask, SerializedTaskEvent, Status, TaskBroker, TaskContext, TaskEventType, TaskManager, TaskSecrets, TaskState, TaskStore, TaskStoreEmitOptions, TaskStoreListEventsOptions, TaskWorker, TemplateAction, TemplateActionRegistry, TemplateFilter, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchPlainAction, createFetchTemplateAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createGithubWebhookAction, createPublishAzureAction, createPublishBitbucketAction, createPublishFileAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createPublishGitlabMergeRequestAction, 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.
|
|
4
|
+
"version": "0.15.23",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -31,19 +31,18 @@
|
|
|
31
31
|
"build:assets": "node scripts/build-nunjucks.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@backstage/backend-common": "^0.10.
|
|
34
|
+
"@backstage/backend-common": "^0.10.6",
|
|
35
35
|
"@backstage/catalog-client": "^0.5.5",
|
|
36
36
|
"@backstage/catalog-model": "^0.9.10",
|
|
37
37
|
"@backstage/config": "^0.1.13",
|
|
38
38
|
"@backstage/errors": "^0.2.0",
|
|
39
39
|
"@backstage/integration": "^0.7.2",
|
|
40
|
-
"@backstage/plugin-catalog-backend": "^0.21.
|
|
41
|
-
"@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.
|
|
40
|
+
"@backstage/plugin-catalog-backend": "^0.21.2",
|
|
41
|
+
"@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.10",
|
|
42
42
|
"@backstage/plugin-scaffolder-common": "^0.1.3",
|
|
43
43
|
"@backstage/types": "^0.1.1",
|
|
44
44
|
"@gitbeaker/core": "^34.6.0",
|
|
45
|
-
"@gitbeaker/node": "^
|
|
46
|
-
"@octokit/rest": "^18.5.3",
|
|
45
|
+
"@gitbeaker/node": "^35.1.0",
|
|
47
46
|
"@octokit/webhooks": "^9.14.1",
|
|
48
47
|
"@types/express": "^4.17.6",
|
|
49
48
|
"azure-devops-node-api": "^11.0.1",
|
|
@@ -66,6 +65,7 @@
|
|
|
66
65
|
"morgan": "^1.10.0",
|
|
67
66
|
"node-fetch": "^2.6.1",
|
|
68
67
|
"nunjucks": "^3.2.3",
|
|
68
|
+
"octokit": "^1.7.1",
|
|
69
69
|
"octokit-plugin-create-pull-request": "^3.10.0",
|
|
70
70
|
"uuid": "^8.2.0",
|
|
71
71
|
"vm2": "^3.9.5",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"yaml": "^1.10.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@backstage/cli": "^0.
|
|
77
|
-
"@backstage/test-utils": "^0.2.
|
|
76
|
+
"@backstage/cli": "^0.13.1",
|
|
77
|
+
"@backstage/test-utils": "^0.2.4",
|
|
78
78
|
"@types/command-exists": "^1.2.0",
|
|
79
79
|
"@types/fs-extra": "^9.0.1",
|
|
80
80
|
"@types/git-url-parse": "^9.0.0",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"assets"
|
|
96
96
|
],
|
|
97
97
|
"configSchema": "config.d.ts",
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "f944a625c4a8ec7f6a6237502691da9209ce6b14"
|
|
99
99
|
}
|