address feedback

Signed-off-by: williamwu-mongodb <william.t.wu@mongodb.com>
This commit is contained in:
williamwu-mongodb
2025-12-09 12:05:21 -08:00
parent ef961b2299
commit c89d74b763
13 changed files with 173 additions and 88 deletions
+15
View File
@@ -25,8 +25,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)
```
-60
View File
@@ -4,7 +4,6 @@
```ts
import { BasicPermission } from '@backstage/plugin-permission-common';
import { JsonObject } from '@backstage/types';
import { JsonValue } from '@backstage/types';
// @public (undocumented)
@@ -45,12 +44,6 @@ export const devToolsInfoReadPermission: BasicPermission;
// @public
export const devToolsPermissions: BasicPermission[];
// @public (undocumented)
export const devToolsTaskSchedulerCreatePermission: BasicPermission;
// @public (undocumented)
export const devToolsTaskSchedulerReadPermission: BasicPermission;
// @public (undocumented)
export type Endpoint = {
name: string;
@@ -90,57 +83,4 @@ export type PackageDependency = {
name: string;
versions: string;
};
// @public (undocumented)
export type ScheduledTasks = {
scheduledTasks?: TaskApiTasksResponse[];
error?: string;
};
// @public
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;
}
// @public (undocumented)
export type TriggerScheduledTask = {
error?: string;
};
```
+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';
+2 -4
View File
@@ -49,7 +49,7 @@ export const devToolsExternalDependenciesReadPermission = createPermission({
});
/**
* @public
* @alpha
*/
export const devToolsTaskSchedulerReadPermission = createPermission({
name: 'devtools.task-scheduler',
@@ -57,7 +57,7 @@ export const devToolsTaskSchedulerReadPermission = createPermission({
});
/**
* @public
* @alpha
*/
export const devToolsTaskSchedulerCreatePermission = createPermission({
name: 'devtools.task-scheduler',
@@ -74,6 +74,4 @@ export const devToolsPermissions = [
devToolsInfoReadPermission,
devToolsConfigReadPermission,
devToolsExternalDependenciesReadPermission,
devToolsTaskSchedulerReadPermission,
devToolsTaskSchedulerCreatePermission,
];
+3 -3
View File
@@ -88,7 +88,7 @@ export type ConfigError = {
* This is a duplication of the below:
* @see https://github.com/backstage/backstage/blob/master/packages/backend-defaults/src/entrypoints/scheduler/lib/types.ts
*
* @public
* @alpha
*/
export interface TaskApiTasksResponse {
taskId: string;
@@ -123,13 +123,13 @@ export interface TaskApiTasksResponse {
| null;
}
/** @public */
/** @alpha */
export type ScheduledTasks = {
scheduledTasks?: TaskApiTasksResponse[];
error?: string;
};
/** @public */
/** @alpha */
export type TriggerScheduledTask = {
error?: string;
};