@backstage/plugin-scaffolder-backend 1.11.1-next.0 → 1.12.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/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import * as _backstage_plugin_scaffolder_node from '@backstage/plugin-scaffolder
3
3
  import { TemplateAction as TemplateAction$1, TaskSecrets as TaskSecrets$1, ActionContext as ActionContext$1 } from '@backstage/plugin-scaffolder-node';
4
4
  import { ScmIntegrations, ScmIntegrationRegistry, GithubCredentialsProvider } from '@backstage/integration';
5
5
  import { CatalogApi } from '@backstage/catalog-client';
6
- import { Entity } from '@backstage/catalog-model';
7
6
  import { UrlReader, PluginDatabaseManager } from '@backstage/backend-common';
8
7
  import { Config } from '@backstage/config';
9
8
  import { JsonValue, JsonObject, Observable } from '@backstage/types';
@@ -18,7 +17,10 @@ import { Logger } from 'winston';
18
17
  import { PluginTaskScheduler } from '@backstage/backend-tasks';
19
18
  import express from 'express';
20
19
  import { IdentityApi } from '@backstage/plugin-auth-node';
20
+ import { Entity } from '@backstage/catalog-model';
21
21
  import { CatalogProcessor, LocationSpec, CatalogProcessorEmit } from '@backstage/plugin-catalog-backend';
22
+ import * as jsonschema from 'jsonschema';
23
+ import * as zod from 'zod';
22
24
 
23
25
  /**
24
26
  * Registers entities from a catalog descriptor file in the workspace into the software catalog.
@@ -42,7 +44,7 @@ declare function createCatalogRegisterAction(options: {
42
44
  */
43
45
  declare function createCatalogWriteAction(): _backstage_plugin_scaffolder_node.TemplateAction<{
44
46
  filePath?: string | undefined;
45
- entity: Entity;
47
+ entity: {};
46
48
  }>;
47
49
 
48
50
  /**
@@ -96,7 +98,7 @@ interface CreateBuiltInActionsOptions {
96
98
  * @public
97
99
  * @returns A list of actions that can be used in the scaffolder
98
100
  */
99
- declare const createBuiltinActions: (options: CreateBuiltInActionsOptions) => TemplateAction$1<JsonObject>[];
101
+ declare const createBuiltinActions: (options: CreateBuiltInActionsOptions) => TemplateAction$1[];
100
102
 
101
103
  /**
102
104
  * Writes a message into the log or lists all files in the workspace
@@ -407,7 +409,7 @@ interface CreateGithubPullRequestActionOptions {
407
409
  * Creates a Github Pull Request action.
408
410
  * @public
409
411
  */
410
- declare const createPublishGithubPullRequestAction: ({ integrations, githubCredentialsProvider, clientFactory, }: CreateGithubPullRequestActionOptions) => _backstage_plugin_scaffolder_node.TemplateAction<{
412
+ declare const createPublishGithubPullRequestAction: (options: CreateGithubPullRequestActionOptions) => _backstage_plugin_scaffolder_node.TemplateAction<{
411
413
  title: string;
412
414
  branchName: string;
413
415
  description: string;
@@ -635,9 +637,9 @@ declare const executeShellCommand: (options: RunCommandOptions) => Promise<void>
635
637
  */
636
638
  declare class TemplateActionRegistry {
637
639
  private readonly actions;
638
- register<TInput extends JsonObject>(action: TemplateAction$1<TInput>): void;
639
- get(actionId: string): TemplateAction$1<JsonObject>;
640
- list(): TemplateAction$1<JsonObject>[];
640
+ register(action: TemplateAction$1): void;
641
+ get(actionId: string): TemplateAction$1;
642
+ list(): TemplateAction$1[];
641
643
  }
642
644
 
643
645
  /**
@@ -811,11 +813,11 @@ interface TaskStore {
811
813
  }): Promise<{
812
814
  tasks: SerializedTask[];
813
815
  }>;
814
- emitLogEvent({ taskId, body }: TaskStoreEmitOptions): Promise<void>;
815
- listEvents({ taskId, after, }: TaskStoreListEventsOptions): Promise<{
816
+ emitLogEvent(options: TaskStoreEmitOptions): Promise<void>;
817
+ listEvents(options: TaskStoreListEventsOptions): Promise<{
816
818
  events: SerializedTaskEvent[];
817
819
  }>;
818
- shutdownTask?({ taskId }: TaskStoreShutDownTaskOptions): Promise<void>;
820
+ shutdownTask?(options: TaskStoreShutDownTaskOptions): Promise<void>;
819
821
  }
820
822
 
821
823
  /**
@@ -864,7 +866,7 @@ declare class DatabaseTaskStore implements TaskStore {
864
866
  listEvents(options: TaskStoreListEventsOptions): Promise<{
865
867
  events: SerializedTaskEvent[];
866
868
  }>;
867
- shutdownTask({ taskId }: TaskStoreShutDownTaskOptions): Promise<void>;
869
+ shutdownTask(options: TaskStoreShutDownTaskOptions): Promise<void>;
868
870
  }
869
871
 
870
872
  /**
@@ -1006,7 +1008,7 @@ declare type ActionContext<TInput extends JsonObject> = ActionContext$1<TInput>;
1006
1008
  * @public
1007
1009
  * @deprecated Use `createTemplateAction` from `@backstage/plugin-scaffolder-node` instead
1008
1010
  */
1009
- declare const createTemplateAction: <TInput extends JsonObject>(templateAction: TemplateAction$1<TInput>) => TemplateAction$1<TInput>;
1011
+ declare const createTemplateAction: <TParams, TInputSchema extends zod.ZodType<any, zod.ZodTypeDef, any> | jsonschema.Schema = {}, TOutputSchema extends zod.ZodType<any, zod.ZodTypeDef, any> | jsonschema.Schema = {}, TActionInput = TInputSchema extends zod.ZodType<any, any, infer IReturn> ? IReturn : TParams>(action: _backstage_plugin_scaffolder_node.TemplateActionOptions<TActionInput, TInputSchema, TOutputSchema>) => TemplateAction$1<TActionInput>;
1010
1012
  /**
1011
1013
  * @public
1012
1014
  * @deprecated Use `TaskSecrets` from `@backstage/plugin-scaffolder-node` instead
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": "1.11.1-next.0",
4
+ "version": "1.12.0-next.2",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -44,19 +44,19 @@
44
44
  "build:assets": "node scripts/build-nunjucks.js"
45
45
  },
46
46
  "dependencies": {
47
- "@backstage/backend-common": "^0.18.3-next.0",
48
- "@backstage/backend-plugin-api": "^0.4.1-next.0",
49
- "@backstage/backend-tasks": "^0.4.4-next.0",
50
- "@backstage/catalog-client": "^1.4.0-next.0",
51
- "@backstage/catalog-model": "^1.2.1-next.0",
52
- "@backstage/config": "^1.0.6",
53
- "@backstage/errors": "^1.1.4",
54
- "@backstage/integration": "^1.4.2",
55
- "@backstage/plugin-auth-node": "^0.2.12-next.0",
56
- "@backstage/plugin-catalog-backend": "^1.8.0-next.0",
57
- "@backstage/plugin-catalog-node": "^1.3.4-next.0",
58
- "@backstage/plugin-scaffolder-common": "^1.2.6-next.0",
59
- "@backstage/plugin-scaffolder-node": "^0.1.1-next.0",
47
+ "@backstage/backend-common": "^0.18.3-next.2",
48
+ "@backstage/backend-plugin-api": "^0.4.1-next.2",
49
+ "@backstage/backend-tasks": "^0.5.0-next.2",
50
+ "@backstage/catalog-client": "^1.4.0-next.1",
51
+ "@backstage/catalog-model": "^1.2.1-next.1",
52
+ "@backstage/config": "^1.0.7-next.0",
53
+ "@backstage/errors": "^1.1.5-next.0",
54
+ "@backstage/integration": "^1.4.3-next.0",
55
+ "@backstage/plugin-auth-node": "^0.2.12-next.2",
56
+ "@backstage/plugin-catalog-backend": "^1.8.0-next.2",
57
+ "@backstage/plugin-catalog-node": "^1.3.4-next.2",
58
+ "@backstage/plugin-scaffolder-common": "^1.2.6-next.1",
59
+ "@backstage/plugin-scaffolder-node": "^0.1.1-next.2",
60
60
  "@backstage/types": "^1.0.2",
61
61
  "@gitbeaker/core": "^35.6.0",
62
62
  "@gitbeaker/node": "^35.1.0",
@@ -93,8 +93,8 @@
93
93
  "zod": "~3.18.0"
94
94
  },
95
95
  "devDependencies": {
96
- "@backstage/backend-test-utils": "^0.1.35-next.0",
97
- "@backstage/cli": "^0.22.4-next.0",
96
+ "@backstage/backend-test-utils": "^0.1.35-next.2",
97
+ "@backstage/cli": "^0.22.4-next.1",
98
98
  "@types/command-exists": "^1.2.0",
99
99
  "@types/fs-extra": "^9.0.1",
100
100
  "@types/git-url-parse": "^9.0.0",
@@ -105,7 +105,7 @@
105
105
  "esbuild": "^0.17.0",
106
106
  "jest-when": "^3.1.0",
107
107
  "mock-fs": "^5.1.0",
108
- "msw": "^0.49.0",
108
+ "msw": "^1.0.0",
109
109
  "supertest": "^6.1.3",
110
110
  "yaml": "^2.0.0"
111
111
  },