@backstage/plugin-scaffolder-backend 1.23.1-next.1 → 1.23.1-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/CHANGELOG.md +32 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +1 -1
- package/dist/cjs/{router-CyBkG5zq.cjs.js → router-aU_OCgqT.cjs.js} +14 -3
- package/dist/cjs/router-aU_OCgqT.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +2 -0
- package/package.json +24 -24
- package/dist/cjs/router-CyBkG5zq.cjs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
+
## 1.23.1-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c544f81: Add support for status filtering in scaffolder tasks endpoint
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @backstage/backend-plugin-api@0.8.0-next.2
|
|
10
|
+
- @backstage/plugin-scaffolder-node@0.4.9-next.2
|
|
11
|
+
- @backstage/plugin-permission-common@0.8.1-next.1
|
|
12
|
+
- @backstage/plugin-scaffolder-backend-module-bitbucket-server@0.1.13-next.2
|
|
13
|
+
- @backstage/plugin-scaffolder-backend-module-bitbucket-cloud@0.1.13-next.2
|
|
14
|
+
- @backstage/plugin-scaffolder-backend-module-bitbucket@0.2.13-next.2
|
|
15
|
+
- @backstage/plugin-scaffolder-backend-module-gerrit@0.1.15-next.2
|
|
16
|
+
- @backstage/plugin-scaffolder-backend-module-gitea@0.1.13-next.2
|
|
17
|
+
- @backstage/backend-common@0.23.4-next.2
|
|
18
|
+
- @backstage/plugin-auth-node@0.5.0-next.2
|
|
19
|
+
- @backstage/plugin-permission-node@0.8.1-next.2
|
|
20
|
+
- @backstage/backend-tasks@0.5.28-next.2
|
|
21
|
+
- @backstage/plugin-catalog-node@1.12.5-next.2
|
|
22
|
+
- @backstage/plugin-bitbucket-cloud-common@0.2.22-next.1
|
|
23
|
+
- @backstage/plugin-catalog-backend-module-scaffolder-entity-model@0.1.21-next.2
|
|
24
|
+
- @backstage/plugin-scaffolder-backend-module-azure@0.1.15-next.2
|
|
25
|
+
- @backstage/plugin-scaffolder-backend-module-github@0.4.1-next.2
|
|
26
|
+
- @backstage/plugin-scaffolder-backend-module-gitlab@0.4.5-next.2
|
|
27
|
+
- @backstage/plugin-scaffolder-common@1.5.5-next.1
|
|
28
|
+
- @backstage/integration@1.14.0-next.0
|
|
29
|
+
- @backstage/catalog-client@1.6.5
|
|
30
|
+
- @backstage/catalog-model@1.5.0
|
|
31
|
+
- @backstage/config@1.2.0
|
|
32
|
+
- @backstage/errors@1.2.4
|
|
33
|
+
- @backstage/types@1.1.1
|
|
34
|
+
|
|
3
35
|
## 1.23.1-next.1
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var alpha = require('@backstage/plugin-scaffolder-common/alpha');
|
|
6
6
|
var pluginPermissionNode = require('@backstage/plugin-permission-node');
|
|
7
|
-
var router = require('./cjs/router-
|
|
7
|
+
var router = require('./cjs/router-aU_OCgqT.cjs.js');
|
|
8
8
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
9
9
|
var backendCommon = require('@backstage/backend-common');
|
|
10
10
|
var integration = require('@backstage/integration');
|
|
@@ -1582,6 +1582,9 @@ class DatabaseTaskStore {
|
|
|
1582
1582
|
created_by: options.createdBy
|
|
1583
1583
|
});
|
|
1584
1584
|
}
|
|
1585
|
+
if (options.status) {
|
|
1586
|
+
queryBuilder.where({ status: options.status });
|
|
1587
|
+
}
|
|
1585
1588
|
const results = await queryBuilder.orderBy("created_at", "desc").select();
|
|
1586
1589
|
const tasks = results.map((result) => ({
|
|
1587
1590
|
id: result.id,
|
|
@@ -2104,7 +2107,10 @@ class StorageTaskBroker {
|
|
|
2104
2107
|
"TaskStore does not implement the list method. Please implement the list method to be able to list tasks"
|
|
2105
2108
|
);
|
|
2106
2109
|
}
|
|
2107
|
-
return await this.storage.list({
|
|
2110
|
+
return await this.storage.list({
|
|
2111
|
+
createdBy: options?.createdBy,
|
|
2112
|
+
status: options?.status
|
|
2113
|
+
});
|
|
2108
2114
|
}
|
|
2109
2115
|
deferredDispatch = defer();
|
|
2110
2116
|
async registerCancellable(taskId, abortController) {
|
|
@@ -3531,8 +3537,13 @@ async function createRouter(options) {
|
|
|
3531
3537
|
"TaskBroker does not support listing tasks, please implement the list method on the TaskBroker."
|
|
3532
3538
|
);
|
|
3533
3539
|
}
|
|
3540
|
+
const [statusQuery] = [req.query.status].flat();
|
|
3541
|
+
if (typeof statusQuery !== "string" && typeof statusQuery !== "undefined") {
|
|
3542
|
+
throw new errors.InputError("status query parameter must be a string");
|
|
3543
|
+
}
|
|
3534
3544
|
const tasks = await taskBroker.list({
|
|
3535
|
-
createdBy: userEntityRef
|
|
3545
|
+
createdBy: userEntityRef,
|
|
3546
|
+
status: statusQuery ? statusQuery : void 0
|
|
3536
3547
|
});
|
|
3537
3548
|
res.status(200).json(tasks);
|
|
3538
3549
|
}).get("/v2/tasks/:taskId", async (req, res) => {
|
|
@@ -3774,4 +3785,4 @@ exports.createRouter = createRouter;
|
|
|
3774
3785
|
exports.createWaitAction = createWaitAction;
|
|
3775
3786
|
exports.scaffolderActionRules = scaffolderActionRules;
|
|
3776
3787
|
exports.scaffolderTemplateRules = scaffolderTemplateRules;
|
|
3777
|
-
//# sourceMappingURL=router-
|
|
3788
|
+
//# sourceMappingURL=router-aU_OCgqT.cjs.js.map
|