Merge main

Signed-off-by: secustor <sebastian@poxhofer.at>
This commit is contained in:
secustor
2026-01-02 20:58:22 +01:00
783 changed files with 25498 additions and 8564 deletions
+6
View File
@@ -1,5 +1,11 @@
# @backstage/plugin-devtools-common
## 0.1.20
### Patch Changes
- 291bf9d: Added scheduled tasks UI feature for the DevTools plugin
## 0.1.19
### Patch Changes
+17 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-devtools-common",
"version": "0.1.19",
"version": "0.1.20",
"description": "Common functionalities for the devtools plugin",
"backstage": {
"role": "common-library",
@@ -13,10 +13,7 @@
]
},
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts"
"access": "public"
},
"homepage": "https://backstage.io",
"repository": {
@@ -26,8 +23,23 @@
},
"license": "Apache-2.0",
"sideEffects": false,
"exports": {
".": "./src/index.ts",
"./alpha": "./src/alpha.ts",
"./package.json": "./package.json"
},
"main": "src/index.ts",
"types": "src/index.ts",
"typesVersions": {
"*": {
"alpha": [
"src/alpha.ts"
],
"package.json": [
"package.json"
]
}
},
"files": [
"dist"
],
@@ -0,0 +1,69 @@
## API Report File for "@backstage/plugin-devtools-common"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { BasicPermission } from '@backstage/plugin-permission-common';
import { JsonObject } from '@backstage/types';
// @alpha (undocumented)
export const devToolsTaskSchedulerCreatePermission: BasicPermission;
// @alpha (undocumented)
export const devToolsTaskSchedulerReadPermission: BasicPermission;
// @alpha (undocumented)
export type ScheduledTasks = {
scheduledTasks?: TaskApiTasksResponse[];
error?: string;
};
// @alpha
export interface TaskApiTasksResponse {
// (undocumented)
pluginId: string;
// (undocumented)
scope: 'global' | 'local';
// (undocumented)
settings: {
version: number;
} & JsonObject;
// (undocumented)
taskId: string;
// (undocumented)
taskState:
| {
status: 'running';
startedAt: string;
timesOutAt?: string;
lastRunError?: string;
lastRunEndedAt?: string;
}
| {
status: 'idle';
startsAt?: string;
lastRunError?: string;
lastRunEndedAt?: string;
}
| null;
// (undocumented)
workerState:
| {
status: 'initial-wait';
}
| {
status: 'idle';
}
| {
status: 'running';
}
| null;
}
// @alpha (undocumented)
export type TriggerScheduledTask = {
error?: string;
};
// (No @packageDocumentation comment for this package)
```
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright 2025 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {
devToolsTaskSchedulerReadPermission,
devToolsTaskSchedulerCreatePermission,
} from './permissions';
export type {
ScheduledTasks,
TaskApiTasksResponse,
TriggerScheduledTask,
} from './types';
+16 -2
View File
@@ -20,5 +20,19 @@
* @packageDocumentation
*/
export * from './types';
export * from './permissions';
export type {
ConfigError,
ConfigInfo,
DevToolsInfo,
Endpoint,
ExternalDependency,
PackageDependency,
} from './types';
export { ExternalDependencyStatus } from './types';
export {
devToolsAdministerPermission,
devToolsConfigReadPermission,
devToolsExternalDependenciesReadPermission,
devToolsInfoReadPermission,
devToolsPermissions,
} from './permissions';
@@ -48,6 +48,22 @@ export const devToolsExternalDependenciesReadPermission = createPermission({
attributes: { action: 'read' },
});
/**
* @alpha
*/
export const devToolsTaskSchedulerReadPermission = createPermission({
name: 'devtools.scheduler.read',
attributes: { action: 'read' },
});
/**
* @alpha
*/
export const devToolsTaskSchedulerCreatePermission = createPermission({
name: 'devtools.scheduler.trigger',
attributes: { action: 'update' },
});
/**
* List of all Devtools permissions
*
+52 -1
View File
@@ -16,7 +16,7 @@
/* We want to maintain the same information as an enum, so we disable the redeclaration warning */
/* eslint-disable @typescript-eslint/no-redeclare */
import { JsonValue } from '@backstage/types';
import { JsonObject, JsonValue } from '@backstage/types';
/** @public */
export type Endpoint = {
@@ -82,3 +82,54 @@ export type ConfigError = {
messages?: string[];
stack?: string;
};
/**
* The shape of a task definition as returned by the service's REST API.
* This is a duplication of the below:
* @see https://github.com/backstage/backstage/blob/master/packages/backend-defaults/src/entrypoints/scheduler/lib/types.ts
*
* @alpha
*/
export interface TaskApiTasksResponse {
taskId: string;
pluginId: string;
scope: 'global' | 'local';
settings: { version: number } & JsonObject;
taskState:
| {
status: 'running';
startedAt: string;
timesOutAt?: string;
lastRunError?: string;
lastRunEndedAt?: string;
}
| {
status: 'idle';
startsAt?: string;
lastRunError?: string;
lastRunEndedAt?: string;
}
| null;
workerState:
| {
status: 'initial-wait';
}
| {
status: 'idle';
}
| {
status: 'running';
}
| null;
}
/** @alpha */
export type ScheduledTasks = {
scheduledTasks?: TaskApiTasksResponse[];
error?: string;
};
/** @alpha */
export type TriggerScheduledTask = {
error?: string;
};