@backstage/plugin-scaffolder-node 0.9.1-next.1 → 0.10.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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # @backstage/plugin-scaffolder-node
2
2
 
3
+ ## 0.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c1ce316: BREAKING `/alpha`: Converted `scaffolder.task.read` and `scaffolder.task.cancel` into Resource Permissions.
8
+
9
+ BREAKING `/alpha`: Added a new scaffolder rule `isTaskOwner` for `scaffolder.task.read` and `scaffolder.task.cancel` to allow for conditional permission policies such as restricting access to tasks and task events based on task creators.
10
+
11
+ BREAKING `/alpha`: Retrying a task now requires both `scaffolder.task.read` and `scaffolder.task.create` permissions, replacing the previous requirement of `scaffolder.task.read` and `scaffolder.task.cancel`.
12
+
13
+ ### Patch Changes
14
+
15
+ - dbde180: An internal refactor which adds additional types to experimental checkpoints
16
+ - Updated dependencies
17
+ - @backstage/plugin-permission-common@0.9.1
18
+ - @backstage/catalog-model@1.7.5
19
+ - @backstage/integration@1.17.1
20
+ - @backstage/plugin-scaffolder-common@1.6.0
21
+ - @backstage/backend-plugin-api@1.4.1
22
+
23
+ ## 0.10.0-next.2
24
+
25
+ ### Minor Changes
26
+
27
+ - c1ce316: BREAKING `/alpha`: Converted `scaffolder.task.read` and `scaffolder.task.cancel` into Resource Permissions.
28
+
29
+ BREAKING `/alpha`: Added a new scaffolder rule `isTaskOwner` for `scaffolder.task.read` and `scaffolder.task.cancel` to allow for conditional permission policies such as restricting access to tasks and task events based on task creators.
30
+
31
+ BREAKING `/alpha`: Retrying a task now requires both `scaffolder.task.read` and `scaffolder.task.create` permissions, replacing the previous requirement of `scaffolder.task.read` and `scaffolder.task.cancel`.
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies
36
+ - @backstage/plugin-scaffolder-common@1.6.0-next.1
37
+
3
38
  ## 0.9.1-next.1
4
39
 
5
40
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { JsonObject, Observable, JsonValue, Expand } from '@backstage/types';
2
2
  import { BackstageCredentials, LoggerService, UrlReaderService } from '@backstage/backend-plugin-api';
3
+ import { PermissionCriteria } from '@backstage/plugin-permission-common';
3
4
  import { TaskSpec, TemplateInfo } from '@backstage/plugin-scaffolder-common';
4
5
  import { UpdateTaskCheckpointOptions, CheckpointContext } from '@backstage/plugin-scaffolder-node/alpha';
5
6
  import { UserEntity } from '@backstage/catalog-model';
@@ -83,6 +84,25 @@ type TaskBrokerDispatchOptions = {
83
84
  secrets?: TaskSecrets;
84
85
  createdBy?: string;
85
86
  };
87
+ /**
88
+ * TaskFilter
89
+ * @public
90
+ */
91
+ type TaskFilter = {
92
+ key: string;
93
+ values?: string[];
94
+ };
95
+ /**
96
+ * TaskFilters
97
+ * @public
98
+ */
99
+ type TaskFilters = {
100
+ anyOf: TaskFilter[];
101
+ } | {
102
+ allOf: TaskFilter[];
103
+ } | {
104
+ not: TaskFilter;
105
+ } | TaskFilter;
86
106
  /**
87
107
  * Task
88
108
  *
@@ -150,6 +170,7 @@ interface TaskBroker {
150
170
  order: 'asc' | 'desc';
151
171
  field: string;
152
172
  }[];
173
+ permissionFilters?: PermissionCriteria<TaskFilters>;
153
174
  }): Promise<{
154
175
  tasks: SerializedTask[];
155
176
  totalTasks?: number;
@@ -519,4 +540,4 @@ declare function serializeDirectoryContents(sourcePath: string, options?: {
519
540
  */
520
541
  declare function deserializeDirectoryContents(targetPath: string, files: SerializedFile[]): Promise<void>;
521
542
 
522
- export { type ActionContext, type ExecuteShellCommandOptions, type SerializedFile, type SerializedTask, type SerializedTaskEvent, type TaskBroker, type TaskBrokerDispatchOptions, type TaskBrokerDispatchResult, type TaskCompletionState, type TaskContext, type TaskEventType, type TaskSecrets, type TaskStatus, type TemplateAction, type TemplateActionOptions, type TemplateExample, addFiles, cloneRepo, commitAndPushBranch, commitAndPushRepo, createBranch, createTemplateAction, deserializeDirectoryContents, executeShellCommand, fetchContents, fetchFile, getRepoSourceDirectory, initRepoAndPush, isNotGitDirectoryOrContents, parseRepoUrl, serializeDirectoryContents };
543
+ export { type ActionContext, type ExecuteShellCommandOptions, type SerializedFile, type SerializedTask, type SerializedTaskEvent, type TaskBroker, type TaskBrokerDispatchOptions, type TaskBrokerDispatchResult, type TaskCompletionState, type TaskContext, type TaskEventType, type TaskFilter, type TaskFilters, type TaskSecrets, type TaskStatus, type TemplateAction, type TemplateActionOptions, type TemplateExample, addFiles, cloneRepo, commitAndPushBranch, commitAndPushRepo, createBranch, createTemplateAction, deserializeDirectoryContents, executeShellCommand, fetchContents, fetchFile, getRepoSourceDirectory, initRepoAndPush, isNotGitDirectoryOrContents, parseRepoUrl, serializeDirectoryContents };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-node",
3
- "version": "0.9.1-next.1",
3
+ "version": "0.10.0",
4
4
  "description": "The plugin-scaffolder-node module for @backstage/plugin-scaffolder-backend",
5
5
  "backstage": {
6
6
  "role": "node-library",
@@ -62,12 +62,13 @@
62
62
  "test": "backstage-cli package test"
63
63
  },
64
64
  "dependencies": {
65
- "@backstage/backend-plugin-api": "1.4.1-next.0",
66
- "@backstage/catalog-model": "1.7.5-next.0",
67
- "@backstage/errors": "1.2.7",
68
- "@backstage/integration": "1.17.1-next.1",
69
- "@backstage/plugin-scaffolder-common": "1.5.12-next.0",
70
- "@backstage/types": "1.2.1",
65
+ "@backstage/backend-plugin-api": "^1.4.1",
66
+ "@backstage/catalog-model": "^1.7.5",
67
+ "@backstage/errors": "^1.2.7",
68
+ "@backstage/integration": "^1.17.1",
69
+ "@backstage/plugin-permission-common": "^0.9.1",
70
+ "@backstage/plugin-scaffolder-common": "^1.6.0",
71
+ "@backstage/types": "^1.2.1",
71
72
  "@isomorphic-git/pgp-plugin": "^0.0.7",
72
73
  "concat-stream": "^2.0.0",
73
74
  "fs-extra": "^11.2.0",
@@ -83,9 +84,9 @@
83
84
  "zod-to-json-schema": "^3.20.4"
84
85
  },
85
86
  "devDependencies": {
86
- "@backstage/backend-test-utils": "1.7.0-next.1",
87
- "@backstage/cli": "0.33.1-next.1",
88
- "@backstage/config": "1.3.3-next.0",
87
+ "@backstage/backend-test-utils": "^1.7.0",
88
+ "@backstage/cli": "^0.33.1",
89
+ "@backstage/config": "^1.3.3",
89
90
  "@types/lodash": "^4.14.151"
90
91
  }
91
92
  }