@backstage/plugin-scaffolder-backend 0.18.0 → 1.1.0-next.1
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 +49 -0
- package/dist/index.cjs.js +105 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +66 -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
|
/**
|
|
@@ -447,6 +479,7 @@ declare const createPublishGithubPullRequestAction: ({ integrations, githubCrede
|
|
|
447
479
|
branchName: string;
|
|
448
480
|
description: string;
|
|
449
481
|
repoUrl: string;
|
|
482
|
+
draft?: boolean | undefined;
|
|
450
483
|
targetPath?: string | undefined;
|
|
451
484
|
sourcePath?: string | undefined;
|
|
452
485
|
token?: string | undefined;
|
|
@@ -467,6 +500,9 @@ declare function createPublishGitlabAction(options: {
|
|
|
467
500
|
repoVisibility?: "internal" | "private" | "public" | undefined;
|
|
468
501
|
sourcePath?: string | undefined;
|
|
469
502
|
token?: string | undefined;
|
|
503
|
+
gitCommitMessage?: string | undefined;
|
|
504
|
+
gitAuthorName?: string | undefined;
|
|
505
|
+
gitAuthorEmail?: string | undefined;
|
|
470
506
|
}>;
|
|
471
507
|
|
|
472
508
|
/**
|
|
@@ -522,6 +558,20 @@ declare function createGithubWebhookAction(options: {
|
|
|
522
558
|
token?: string | undefined;
|
|
523
559
|
}>;
|
|
524
560
|
|
|
561
|
+
/**
|
|
562
|
+
* Adds labels to a pull request or issue on GitHub
|
|
563
|
+
* @public
|
|
564
|
+
*/
|
|
565
|
+
declare function createGithubIssuesLabelAction(options: {
|
|
566
|
+
integrations: ScmIntegrationRegistry;
|
|
567
|
+
githubCredentialsProvider?: GithubCredentialsProvider;
|
|
568
|
+
}): TemplateAction<{
|
|
569
|
+
repoUrl: string;
|
|
570
|
+
number: number;
|
|
571
|
+
labels: string[];
|
|
572
|
+
token?: string | undefined;
|
|
573
|
+
}>;
|
|
574
|
+
|
|
525
575
|
/** @public */
|
|
526
576
|
declare type RunCommandOptions = {
|
|
527
577
|
/** command to run */
|
|
@@ -625,8 +675,17 @@ declare class TaskManager implements TaskContext {
|
|
|
625
675
|
* @public
|
|
626
676
|
*/
|
|
627
677
|
interface CurrentClaimedTask {
|
|
678
|
+
/**
|
|
679
|
+
* The TaskSpec of the current claimed task.
|
|
680
|
+
*/
|
|
628
681
|
spec: TaskSpec;
|
|
682
|
+
/**
|
|
683
|
+
* The uuid of the current claimed task.
|
|
684
|
+
*/
|
|
629
685
|
taskId: string;
|
|
686
|
+
/**
|
|
687
|
+
* The secrets that are stored with the task.
|
|
688
|
+
*/
|
|
630
689
|
secrets?: TaskSecrets;
|
|
631
690
|
}
|
|
632
691
|
|
|
@@ -672,7 +731,10 @@ interface RouterOptions {
|
|
|
672
731
|
taskBroker?: TaskBroker;
|
|
673
732
|
additionalTemplateFilters?: Record<string, TemplateFilter>;
|
|
674
733
|
}
|
|
675
|
-
/**
|
|
734
|
+
/**
|
|
735
|
+
* A method to create a router for the scaffolder backend plugin.
|
|
736
|
+
* @public
|
|
737
|
+
*/
|
|
676
738
|
declare function createRouter(options: RouterOptions): Promise<express.Router>;
|
|
677
739
|
|
|
678
740
|
/** @public */
|
|
@@ -683,4 +745,4 @@ declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
|
|
683
745
|
postProcessEntity(entity: Entity, _location: LocationSpec, emit: CatalogProcessorEmit): Promise<Entity>;
|
|
684
746
|
}
|
|
685
747
|
|
|
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 };
|
|
748
|
+
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": "
|
|
4
|
+
"version": "1.1.0-next.1",
|
|
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": "^
|
|
43
|
-
"@backstage/plugin-catalog-backend": "^
|
|
44
|
-
"@backstage/plugin-scaffolder-common": "^0.
|
|
45
|
-
"@backstage/types": "^0.
|
|
37
|
+
"@backstage/backend-common": "^0.13.2-next.1",
|
|
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.1.0-next.1",
|
|
43
|
+
"@backstage/plugin-catalog-backend": "^1.1.0-next.1",
|
|
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.1",
|
|
78
|
+
"@backstage/cli": "^0.17.0-next.1",
|
|
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": "57d12dcc35aeb6c33b09e51d1efc3408c574f109"
|
|
101
101
|
}
|