@backstage/plugin-scaffolder-backend 0.18.0-next.0 → 1.0.1-next.0
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 +76 -0
- package/dist/index.cjs.js +75 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +62 -4
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -239,10 +239,26 @@ declare type TemplateAction<Input extends JsonObject> = {
|
|
|
239
239
|
* @public
|
|
240
240
|
*/
|
|
241
241
|
interface CreateBuiltInActionsOptions {
|
|
242
|
+
/**
|
|
243
|
+
* The {@link @backstage/backend-common#UrlReader} interface that will be used in the default actions.
|
|
244
|
+
*/
|
|
242
245
|
reader: UrlReader;
|
|
246
|
+
/**
|
|
247
|
+
* The {@link @backstage/integrations#ScmIntegrations} that will be used in the default actions.
|
|
248
|
+
*/
|
|
243
249
|
integrations: ScmIntegrations;
|
|
250
|
+
/**
|
|
251
|
+
* The {@link @backstage/catalog-client#CatalogApi} that will be used in the default actions.
|
|
252
|
+
*/
|
|
244
253
|
catalogClient: CatalogApi;
|
|
254
|
+
/**
|
|
255
|
+
* The {@link @backstage/config#Config} that will be used in the default actions.
|
|
256
|
+
*/
|
|
245
257
|
config: Config;
|
|
258
|
+
/**
|
|
259
|
+
* Additional custom filters that will be passed to the nunjucks template engine for use in
|
|
260
|
+
* Template Manifests and also template skeleton files when using `fetch:template`.
|
|
261
|
+
*/
|
|
246
262
|
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
247
263
|
}
|
|
248
264
|
/**
|
|
@@ -420,10 +436,14 @@ interface OctokitWithPullRequestPluginClient {
|
|
|
420
436
|
createPullRequest(options: createPullRequest.Options): Promise<{
|
|
421
437
|
data: {
|
|
422
438
|
html_url: string;
|
|
439
|
+
number: number;
|
|
423
440
|
};
|
|
424
441
|
} | null>;
|
|
425
442
|
}
|
|
426
|
-
/**
|
|
443
|
+
/**
|
|
444
|
+
* The options passed to the client factory function.
|
|
445
|
+
* @public
|
|
446
|
+
*/
|
|
427
447
|
declare type CreateGithubPullRequestClientFactoryInput = {
|
|
428
448
|
integrations: ScmIntegrationRegistry;
|
|
429
449
|
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
@@ -432,10 +452,22 @@ declare type CreateGithubPullRequestClientFactoryInput = {
|
|
|
432
452
|
repo: string;
|
|
433
453
|
token?: string;
|
|
434
454
|
};
|
|
435
|
-
/**
|
|
455
|
+
/**
|
|
456
|
+
* The options passed to {@link createPublishGithubPullRequestAction} method
|
|
457
|
+
* @public
|
|
458
|
+
*/
|
|
436
459
|
interface CreateGithubPullRequestActionOptions {
|
|
460
|
+
/**
|
|
461
|
+
* An instance of {@link @backstage/integration#ScmIntegrationRegistry} that will be used in the action.
|
|
462
|
+
*/
|
|
437
463
|
integrations: ScmIntegrationRegistry;
|
|
464
|
+
/**
|
|
465
|
+
* An instance of {@link @backstage/integration#GithubCredentialsProvider} that will be used to get credentials for the action.
|
|
466
|
+
*/
|
|
438
467
|
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
468
|
+
/**
|
|
469
|
+
* A method to return the Octokit client with the Pull Request Plugin.
|
|
470
|
+
*/
|
|
439
471
|
clientFactory?: (input: CreateGithubPullRequestClientFactoryInput) => Promise<OctokitWithPullRequestPluginClient>;
|
|
440
472
|
}
|
|
441
473
|
/**
|
|
@@ -522,6 +554,20 @@ declare function createGithubWebhookAction(options: {
|
|
|
522
554
|
token?: string | undefined;
|
|
523
555
|
}>;
|
|
524
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Adds labels to a pull request or issue on GitHub
|
|
559
|
+
* @public
|
|
560
|
+
*/
|
|
561
|
+
declare function createGithubIssuesLabelAction(options: {
|
|
562
|
+
integrations: ScmIntegrationRegistry;
|
|
563
|
+
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
564
|
+
}): TemplateAction<{
|
|
565
|
+
repoUrl: string;
|
|
566
|
+
number: number;
|
|
567
|
+
labels: string[];
|
|
568
|
+
token?: string | undefined;
|
|
569
|
+
}>;
|
|
570
|
+
|
|
525
571
|
/** @public */
|
|
526
572
|
declare type RunCommandOptions = {
|
|
527
573
|
/** command to run */
|
|
@@ -625,8 +671,17 @@ declare class TaskManager implements TaskContext {
|
|
|
625
671
|
* @public
|
|
626
672
|
*/
|
|
627
673
|
interface CurrentClaimedTask {
|
|
674
|
+
/**
|
|
675
|
+
* The TaskSpec of the current claimed task.
|
|
676
|
+
*/
|
|
628
677
|
spec: TaskSpec;
|
|
678
|
+
/**
|
|
679
|
+
* The uuid of the current claimed task.
|
|
680
|
+
*/
|
|
629
681
|
taskId: string;
|
|
682
|
+
/**
|
|
683
|
+
* The secrets that are stored with the task.
|
|
684
|
+
*/
|
|
630
685
|
secrets?: TaskSecrets;
|
|
631
686
|
}
|
|
632
687
|
|
|
@@ -672,7 +727,10 @@ interface RouterOptions {
|
|
|
672
727
|
taskBroker?: TaskBroker;
|
|
673
728
|
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
674
729
|
}
|
|
675
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* A method to create a router for the scaffolder backend plugin.
|
|
732
|
+
* @public
|
|
733
|
+
*/
|
|
676
734
|
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
677
735
|
|
|
678
736
|
/** @public */
|
|
@@ -683,4 +741,4 @@ declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
|
|
683
741
|
postProcessEntity(entity: Entity, _location: LocationSpec, emit: CatalogProcessorEmit): Promise<Entity>;
|
|
684
742
|
}
|
|
685
743
|
|
|
686
|
-
export { ActionContext, CreateBuiltInActionsOptions, CreateGithubPullRequestActionOptions, CreateGithubPullRequestClientFactoryInput, CreateWorkerOptions, CurrentClaimedTask, DatabaseTaskStore, DatabaseTaskStoreOptions, OctokitWithPullRequestPluginClient, RouterOptions, RunCommandOptions, ScaffolderEntitiesProcessor, SerializedTask, SerializedTaskEvent, TaskBroker, TaskBrokerDispatchOptions, TaskBrokerDispatchResult, TaskCompletionState, TaskContext, TaskEventType, TaskManager, TaskSecrets, TaskStatus, TaskStore, TaskStoreCreateTaskOptions, TaskStoreCreateTaskResult, 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, executeShellCommand, fetchContents };
|
|
744
|
+
export { ActionContext, CreateBuiltInActionsOptions, CreateGithubPullRequestActionOptions, CreateGithubPullRequestClientFactoryInput, CreateWorkerOptions, CurrentClaimedTask, DatabaseTaskStore, DatabaseTaskStoreOptions, OctokitWithPullRequestPluginClient, RouterOptions, RunCommandOptions, ScaffolderEntitiesProcessor, SerializedTask, SerializedTaskEvent, TaskBroker, TaskBrokerDispatchOptions, TaskBrokerDispatchResult, TaskCompletionState, TaskContext, TaskEventType, TaskManager, TaskSecrets, TaskStatus, TaskStore, TaskStoreCreateTaskOptions, TaskStoreCreateTaskResult, TaskStoreEmitOptions, TaskStoreListEventsOptions, TaskWorker, TemplateAction, TemplateActionRegistry, TemplateFilter, createBuiltinActions, createCatalogRegisterAction, createCatalogWriteAction, createDebugLogAction, createFetchPlainAction, createFetchTemplateAction, createFilesystemDeleteAction, createFilesystemRenameAction, createGithubActionsDispatchAction, createGithubIssuesLabelAction, createGithubWebhookAction, createPublishAzureAction, createPublishBitbucketAction, createPublishFileAction, createPublishGithubAction, createPublishGithubPullRequestAction, createPublishGitlabAction, createPublishGitlabMergeRequestAction, createRouter, createTemplateAction, executeShellCommand, fetchContents };
|
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.
|
|
4
|
+
"version": "1.0.1-next.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"build:assets": "node scripts/build-nunjucks.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@backstage/backend-common": "^0.13.
|
|
38
|
-
"@backstage/catalog-client": "^0.
|
|
39
|
-
"@backstage/catalog-model": "^0.
|
|
40
|
-
"@backstage/config": "^0.
|
|
41
|
-
"@backstage/errors": "^0.
|
|
42
|
-
"@backstage/integration": "^0.
|
|
43
|
-
"@backstage/plugin-catalog-backend": "^0.
|
|
44
|
-
"@backstage/plugin-scaffolder-common": "^0.
|
|
45
|
-
"@backstage/types": "^0.
|
|
37
|
+
"@backstage/backend-common": "^0.13.2-next.0",
|
|
38
|
+
"@backstage/catalog-client": "^1.0.1-next.0",
|
|
39
|
+
"@backstage/catalog-model": "^1.0.1-next.0",
|
|
40
|
+
"@backstage/config": "^1.0.0",
|
|
41
|
+
"@backstage/errors": "^1.0.0",
|
|
42
|
+
"@backstage/integration": "^1.0.1-next.0",
|
|
43
|
+
"@backstage/plugin-catalog-backend": "^1.0.1-next.0",
|
|
44
|
+
"@backstage/plugin-scaffolder-common": "^1.0.1-next.0",
|
|
45
|
+
"@backstage/types": "^1.0.0",
|
|
46
46
|
"@gitbeaker/core": "^34.6.0",
|
|
47
47
|
"@gitbeaker/node": "^35.1.0",
|
|
48
48
|
"@octokit/webhooks": "^9.14.1",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"zen-observable": "^0.8.15"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@backstage/backend-test-utils": "^0.1.
|
|
78
|
-
"@backstage/cli": "^0.
|
|
77
|
+
"@backstage/backend-test-utils": "^0.1.23-next.0",
|
|
78
|
+
"@backstage/cli": "^0.16.1-next.0",
|
|
79
79
|
"@types/command-exists": "^1.2.0",
|
|
80
80
|
"@types/fs-extra": "^9.0.1",
|
|
81
81
|
"@types/git-url-parse": "^9.0.0",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"assets"
|
|
98
98
|
],
|
|
99
99
|
"configSchema": "config.d.ts",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "6bc4253672337538ce7ea5aadb3e9f60daeb3f80"
|
|
101
101
|
}
|