@backstage/plugin-scaffolder-backend 1.8.1-next.0 → 1.9.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
@@ -580,7 +580,7 @@ branchName: string;
580
580
  sourcePath?: string | undefined;
581
581
  targetPath?: string | undefined;
582
582
  token?: string | undefined;
583
- commitAction?: "update" | "create" | "delete" | undefined;
583
+ commitAction?: "update" | "delete" | "create" | undefined;
584
584
  /** @deprecated projectID passed as query parameters in the repoUrl */
585
585
  projectid?: string | undefined;
586
586
  removeSourceBranch?: boolean | undefined;
@@ -611,6 +611,19 @@ export declare type CreateWorkerOptions = {
611
611
  workingDirectory: string;
612
612
  logger: Logger;
613
613
  additionalTemplateFilters?: Record<string, TemplateFilter>;
614
+ /**
615
+ * The number of tasks that can be executed at the same time by the worker
616
+ * @defaultValue 10
617
+ * @example
618
+ * ```
619
+ * {
620
+ * concurrentTasksLimit: 1,
621
+ * // OR
622
+ * concurrentTasksLimit: Infinity
623
+ * }
624
+ * ```
625
+ */
626
+ concurrentTasksLimit?: number;
614
627
  additionalTemplateGlobals?: Record<string, TemplateGlobal>;
615
628
  };
616
629
 
@@ -732,7 +745,16 @@ export declare interface RouterOptions {
732
745
  catalogClient: CatalogApi;
733
746
  scheduler?: PluginTaskScheduler;
734
747
  actions?: TemplateAction<any>[];
748
+ /**
749
+ * @deprecated taskWorkers is deprecated in favor of concurrentTasksLimit option with a single TaskWorker
750
+ * @defaultValue 1
751
+ */
735
752
  taskWorkers?: number;
753
+ /**
754
+ * Sets the number of concurrent tasks that can be run at any given time on the TaskWorker
755
+ * @defaultValue 10
756
+ */
757
+ concurrentTasksLimit?: number;
736
758
  taskBroker?: TaskBroker;
737
759
  additionalTemplateFilters?: Record<string, TemplateFilter>;
738
760
  additionalTemplateGlobals?: Record<string, TemplateGlobal>;
@@ -997,8 +1019,10 @@ export declare type TaskStoreShutDownTaskOptions = {
997
1019
  export declare class TaskWorker {
998
1020
  private readonly options;
999
1021
  private constructor();
1022
+ private taskQueue;
1000
1023
  static create(options: CreateWorkerOptions): Promise<TaskWorker>;
1001
1024
  start(): void;
1025
+ protected onReadyToClaimTask(): Promise<void>;
1002
1026
  runOneTask(task: TaskContext): Promise<void>;
1003
1027
  }
1004
1028
 
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.8.1-next.0",
4
+ "version": "1.9.0-next.2",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -34,19 +34,19 @@
34
34
  "build:assets": "node scripts/build-nunjucks.js"
35
35
  },
36
36
  "dependencies": {
37
- "@backstage/backend-common": "^0.16.1-next.0",
38
- "@backstage/backend-plugin-api": "^0.1.5-next.0",
39
- "@backstage/backend-tasks": "^0.3.8-next.0",
40
- "@backstage/catalog-client": "^1.2.0-next.0",
41
- "@backstage/catalog-model": "^1.1.4-next.0",
42
- "@backstage/config": "^1.0.5-next.0",
43
- "@backstage/errors": "^1.1.4-next.0",
44
- "@backstage/integration": "^1.4.1-next.0",
45
- "@backstage/plugin-auth-node": "^0.2.8-next.0",
46
- "@backstage/plugin-catalog-backend": "^1.6.0-next.0",
47
- "@backstage/plugin-catalog-node": "^1.2.2-next.0",
48
- "@backstage/plugin-scaffolder-common": "^1.2.3-next.0",
49
- "@backstage/types": "^1.0.2-next.0",
37
+ "@backstage/backend-common": "^0.17.0-next.2",
38
+ "@backstage/backend-plugin-api": "^0.2.0-next.2",
39
+ "@backstage/backend-tasks": "^0.4.0-next.2",
40
+ "@backstage/catalog-client": "^1.2.0-next.1",
41
+ "@backstage/catalog-model": "^1.1.4-next.1",
42
+ "@backstage/config": "^1.0.5-next.1",
43
+ "@backstage/errors": "^1.1.4-next.1",
44
+ "@backstage/integration": "^1.4.1-next.1",
45
+ "@backstage/plugin-auth-node": "^0.2.8-next.2",
46
+ "@backstage/plugin-catalog-backend": "^1.6.0-next.2",
47
+ "@backstage/plugin-catalog-node": "^1.3.0-next.2",
48
+ "@backstage/plugin-scaffolder-common": "^1.2.3-next.1",
49
+ "@backstage/types": "^1.0.2-next.1",
50
50
  "@gitbeaker/core": "^35.6.0",
51
51
  "@gitbeaker/node": "^35.1.0",
52
52
  "@octokit/webhooks": "^10.0.0",
@@ -72,17 +72,18 @@
72
72
  "octokit": "^2.0.0",
73
73
  "octokit-plugin-create-pull-request": "^3.10.0",
74
74
  "p-limit": "^3.1.0",
75
+ "p-queue": "^6.6.2",
75
76
  "prom-client": "^14.0.1",
76
77
  "uuid": "^8.2.0",
77
78
  "vm2": "^3.9.11",
78
79
  "winston": "^3.2.1",
79
80
  "yaml": "^2.0.0",
80
- "zen-observable": "^0.9.0",
81
+ "zen-observable": "^0.10.0",
81
82
  "zod": "^3.11.6"
82
83
  },
83
84
  "devDependencies": {
84
- "@backstage/backend-test-utils": "^0.1.31-next.0",
85
- "@backstage/cli": "^0.21.2-next.0",
85
+ "@backstage/backend-test-utils": "^0.1.31-next.2",
86
+ "@backstage/cli": "^0.21.2-next.2",
86
87
  "@types/command-exists": "^1.2.0",
87
88
  "@types/fs-extra": "^9.0.1",
88
89
  "@types/git-url-parse": "^9.0.0",