@backstage/plugin-scaffolder-backend 0.15.2 → 0.15.6
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 +48 -0
- package/dist/index.cjs.js +150 -51
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +29 -1
- package/package.json +14 -12
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { Config, JsonValue, JsonObject } from '@backstage/config';
|
|
|
8
8
|
import { Schema } from 'jsonschema';
|
|
9
9
|
import { UrlReader, ContainerRunner, PluginDatabaseManager } from '@backstage/backend-common';
|
|
10
10
|
import { createPullRequest } from 'octokit-plugin-create-pull-request';
|
|
11
|
+
import { Octokit } from '@octokit/rest';
|
|
11
12
|
export { createFetchCookiecutterAction } from '@backstage/plugin-scaffolder-backend-module-cookiecutter';
|
|
12
13
|
import express from 'express';
|
|
13
14
|
import { TemplateEntityV1beta2 } from '@backstage/catalog-model';
|
|
@@ -108,6 +109,33 @@ declare function createGithubActionsDispatchAction(options: {
|
|
|
108
109
|
integrations: ScmIntegrationRegistry;
|
|
109
110
|
}): TemplateAction<any>;
|
|
110
111
|
|
|
112
|
+
declare function createGithubWebhookAction(options: {
|
|
113
|
+
integrations: ScmIntegrationRegistry;
|
|
114
|
+
defaultWebhookSecret?: string;
|
|
115
|
+
}): TemplateAction<any>;
|
|
116
|
+
|
|
117
|
+
declare type OctokitIntegration = {
|
|
118
|
+
client: Octokit;
|
|
119
|
+
token: string;
|
|
120
|
+
owner: string;
|
|
121
|
+
repo: string;
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* OctokitProvider provides Octokit client based on ScmIntegrationsRegistry configuration.
|
|
125
|
+
* OctokitProvider supports GitHub credentials caching out of the box.
|
|
126
|
+
*/
|
|
127
|
+
declare class OctokitProvider {
|
|
128
|
+
private readonly integrations;
|
|
129
|
+
private readonly credentialsProviders;
|
|
130
|
+
constructor(integrations: ScmIntegrationRegistry);
|
|
131
|
+
/**
|
|
132
|
+
* gets standard Octokit client based on repository URL.
|
|
133
|
+
*
|
|
134
|
+
* @param repoUrl Repository URL
|
|
135
|
+
*/
|
|
136
|
+
getOctokit(repoUrl: string): Promise<OctokitIntegration>;
|
|
137
|
+
}
|
|
138
|
+
|
|
111
139
|
declare type RunCommandOptions = {
|
|
112
140
|
command: string;
|
|
113
141
|
args: string[];
|
|
@@ -188,4 +216,4 @@ declare class CatalogEntityClient {
|
|
|
188
216
|
}): Promise<TemplateEntityV1beta2>;
|
|
189
217
|
}
|
|
190
218
|
|
|
191
|
-
export { ActionContext, CatalogEntityClient, RouterOptions, TemplateAction, TemplateActionRegistry, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchPlainAction, createFetchTemplateAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createPublishAzureAction, createPublishBitbucketAction, createPublishFileAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createRouter, createTemplateAction, fetchContents, runCommand };
|
|
219
|
+
export { ActionContext, CatalogEntityClient, OctokitProvider, RouterOptions, TemplateAction, TemplateActionRegistry, 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,6 +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.6",
|
|
4
5
|
"main": "dist/index.cjs.js",
|
|
5
6
|
"types": "dist/index.d.ts",
|
|
6
7
|
"license": "Apache-2.0",
|
|
@@ -29,18 +30,19 @@
|
|
|
29
30
|
"clean": "backstage-cli clean"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@backstage/backend-common": "^0.9.
|
|
33
|
-
"@backstage/catalog-client": "^0.
|
|
34
|
-
"@backstage/catalog-model": "^0.9.
|
|
35
|
-
"@backstage/config": "^0.1.
|
|
36
|
-
"@backstage/errors": "^0.1.
|
|
37
|
-
"@backstage/integration": "^0.6.
|
|
33
|
+
"@backstage/backend-common": "^0.9.4",
|
|
34
|
+
"@backstage/catalog-client": "^0.4.0",
|
|
35
|
+
"@backstage/catalog-model": "^0.9.3",
|
|
36
|
+
"@backstage/config": "^0.1.10",
|
|
37
|
+
"@backstage/errors": "^0.1.2",
|
|
38
|
+
"@backstage/integration": "^0.6.5",
|
|
38
39
|
"@backstage/plugin-scaffolder-backend-module-cookiecutter": "^0.1.2",
|
|
39
40
|
"@gitbeaker/core": "^30.2.0",
|
|
40
41
|
"@gitbeaker/node": "^30.2.0",
|
|
41
42
|
"@octokit/rest": "^18.5.3",
|
|
43
|
+
"@octokit/webhooks": "^9.14.1",
|
|
42
44
|
"@types/express": "^4.17.6",
|
|
43
|
-
"azure-devops-node-api": "^
|
|
45
|
+
"azure-devops-node-api": "^11.0.1",
|
|
44
46
|
"command-exists": "^1.2.9",
|
|
45
47
|
"compression": "^1.7.4",
|
|
46
48
|
"cors": "^2.8.5",
|
|
@@ -48,7 +50,7 @@
|
|
|
48
50
|
"express": "^4.17.1",
|
|
49
51
|
"express-promise-router": "^4.1.0",
|
|
50
52
|
"fs-extra": "10.0.0",
|
|
51
|
-
"git-url-parse": "
|
|
53
|
+
"git-url-parse": "^11.6.0",
|
|
52
54
|
"globby": "^11.0.0",
|
|
53
55
|
"handlebars": "^4.7.6",
|
|
54
56
|
"helmet": "^4.0.0",
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
"yaml": "^1.10.0"
|
|
67
69
|
},
|
|
68
70
|
"devDependencies": {
|
|
69
|
-
"@backstage/cli": "^0.7.
|
|
71
|
+
"@backstage/cli": "^0.7.13",
|
|
70
72
|
"@backstage/test-utils": "^0.1.17",
|
|
71
73
|
"@types/command-exists": "^1.2.0",
|
|
72
74
|
"@types/fs-extra": "^9.0.1",
|
|
@@ -75,7 +77,7 @@
|
|
|
75
77
|
"@types/nunjucks": "^3.1.4",
|
|
76
78
|
"@types/supertest": "^2.0.8",
|
|
77
79
|
"jest-when": "^3.1.0",
|
|
78
|
-
"mock-fs": "^
|
|
80
|
+
"mock-fs": "^5.1.0",
|
|
79
81
|
"msw": "^0.29.0",
|
|
80
82
|
"supertest": "^6.1.3",
|
|
81
83
|
"yaml": "^1.10.0"
|
|
@@ -86,5 +88,5 @@
|
|
|
86
88
|
"config.d.ts"
|
|
87
89
|
],
|
|
88
90
|
"configSchema": "config.d.ts",
|
|
89
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "2fd2dbc5d2fad9da5f623126920958970aea469b"
|
|
90
92
|
}
|