@backstage/backend-plugin-api 1.4.0-next.1 → 1.4.1-next.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 +53 -0
- package/dist/alpha/refs.cjs.js +18 -0
- package/dist/alpha/refs.cjs.js.map +1 -0
- package/dist/alpha.cjs.js +5 -5
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +96 -3
- package/dist/index.d.ts +59 -142
- package/dist/services/definitions/coreServices.cjs.js +0 -6
- package/dist/services/definitions/coreServices.cjs.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @backstage/backend-plugin-api
|
|
2
2
|
|
|
3
|
+
## 1.4.1-next.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/config@1.3.3-next.0
|
|
9
|
+
- @backstage/plugin-permission-common@0.9.1-next.0
|
|
10
|
+
- @backstage/plugin-permission-node@0.10.2-next.0
|
|
11
|
+
- @backstage/plugin-auth-node@0.6.5-next.0
|
|
12
|
+
|
|
13
|
+
## 1.4.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 664c07a: Added `actionsRegistry` and `actions` experimental services to `/alpha` to allow registration of distributed actions from plugins, and the ability to invoke these actions. You can use these services by including them like the following:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
actionsRegistryServiceRef,
|
|
22
|
+
actionsServiceRef,
|
|
23
|
+
} from '@backstage/backend-plugin-api/alpha';
|
|
24
|
+
|
|
25
|
+
createBackendPlugin({
|
|
26
|
+
pluginId: 'test-plugin',
|
|
27
|
+
register({ registerInit }) {
|
|
28
|
+
registerInit({
|
|
29
|
+
deps: {
|
|
30
|
+
actions: actionsServiceRef,
|
|
31
|
+
actionsRegistry: actionsRegistryServiceRef,
|
|
32
|
+
},
|
|
33
|
+
async init({ actions, actionsRegistry }) {
|
|
34
|
+
actionsRegistry.register({
|
|
35
|
+
...,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
await actions.invoke(...);
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies
|
|
48
|
+
- @backstage/plugin-auth-node@0.6.4
|
|
49
|
+
- @backstage/cli-common@0.1.15
|
|
50
|
+
- @backstage/config@1.3.2
|
|
51
|
+
- @backstage/errors@1.2.7
|
|
52
|
+
- @backstage/types@1.2.1
|
|
53
|
+
- @backstage/plugin-permission-common@0.9.0
|
|
54
|
+
- @backstage/plugin-permission-node@0.10.1
|
|
55
|
+
|
|
3
56
|
## 1.4.0-next.1
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
4
|
+
|
|
5
|
+
const instanceMetadataServiceRef = backendPluginApi.createServiceRef({
|
|
6
|
+
id: "core.instanceMetadata"
|
|
7
|
+
});
|
|
8
|
+
const actionsServiceRef = backendPluginApi.createServiceRef({
|
|
9
|
+
id: "alpha.core.actions"
|
|
10
|
+
});
|
|
11
|
+
const actionsRegistryServiceRef = backendPluginApi.createServiceRef({
|
|
12
|
+
id: "alpha.core.actionsRegistry"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
exports.actionsRegistryServiceRef = actionsRegistryServiceRef;
|
|
16
|
+
exports.actionsServiceRef = actionsServiceRef;
|
|
17
|
+
exports.instanceMetadataServiceRef = instanceMetadataServiceRef;
|
|
18
|
+
//# sourceMappingURL=refs.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refs.cjs.js","sources":["../../src/alpha/refs.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createServiceRef } from '@backstage/backend-plugin-api';\n\n/**\n * @alpha\n */\nexport const instanceMetadataServiceRef = createServiceRef<\n import('./InstanceMetadataService').InstanceMetadataService\n>({\n id: 'core.instanceMetadata',\n});\n\n/**\n * Service for calling distributed actions\n *\n * See {@link ActionsService}\n * and {@link https://backstage.io/docs/backend-system/core-services/actions | the service docs}\n * for more information.\n *\n * @alpha\n */\nexport const actionsServiceRef = createServiceRef<\n import('./ActionsService').ActionsService\n>({\n id: 'alpha.core.actions',\n});\n\n/**\n * Service for registering and managing distributed actions.\n *\n * See {@link ActionsRegistryService}\n * and {@link https://backstage.io/docs/backend-system/core-services/actions-registry | the service docs}\n * for more information.\n *\n * @alpha\n */\nexport const actionsRegistryServiceRef = createServiceRef<\n import('./ActionsRegistryService').ActionsRegistryService\n>({\n id: 'alpha.core.actionsRegistry',\n});\n"],"names":["createServiceRef"],"mappings":";;;;AAqBO,MAAM,6BAA6BA,iCAExC,CAAA;AAAA,EACA,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,oBAAoBA,iCAE/B,CAAA;AAAA,EACA,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,4BAA4BA,iCAEvC,CAAA;AAAA,EACA,EAAI,EAAA;AACN,CAAC;;;;;;"}
|
package/dist/alpha.cjs.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var refs = require('./alpha/refs.cjs.js');
|
|
4
4
|
|
|
5
|
-
const instanceMetadataServiceRef = backendPluginApi.createServiceRef({
|
|
6
|
-
id: "core.instanceMetadata"
|
|
7
|
-
});
|
|
8
5
|
|
|
9
|
-
|
|
6
|
+
|
|
7
|
+
exports.actionsRegistryServiceRef = refs.actionsRegistryServiceRef;
|
|
8
|
+
exports.actionsServiceRef = refs.actionsServiceRef;
|
|
9
|
+
exports.instanceMetadataServiceRef = refs.instanceMetadataServiceRef;
|
|
10
10
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":[
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { AnyZodObject, z } from 'zod';
|
|
1
2
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
3
|
+
import { LoggerService, BackstageCredentials } from '@backstage/backend-plugin-api';
|
|
4
|
+
import { JsonObject, JsonValue } from '@backstage/types';
|
|
5
|
+
import { JSONSchema7 } from 'json-schema';
|
|
2
6
|
|
|
3
7
|
/** @alpha */
|
|
4
8
|
type BackendFeatureMeta = {
|
|
@@ -15,10 +19,99 @@ interface InstanceMetadataService {
|
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
/**
|
|
18
|
-
*
|
|
19
|
-
|
|
22
|
+
* @alpha
|
|
23
|
+
*/
|
|
24
|
+
type ActionsRegistryActionContext<TInputSchema extends AnyZodObject> = {
|
|
25
|
+
input: z.infer<TInputSchema>;
|
|
26
|
+
logger: LoggerService;
|
|
27
|
+
credentials: BackstageCredentials;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @alpha
|
|
31
|
+
*/
|
|
32
|
+
type ActionsRegistryActionOptions<TInputSchema extends AnyZodObject, TOutputSchema extends AnyZodObject> = {
|
|
33
|
+
name: string;
|
|
34
|
+
title: string;
|
|
35
|
+
description: string;
|
|
36
|
+
schema: {
|
|
37
|
+
input: (zod: typeof z) => TInputSchema;
|
|
38
|
+
output: (zod: typeof z) => TOutputSchema;
|
|
39
|
+
};
|
|
40
|
+
attributes?: {
|
|
41
|
+
destructive?: boolean;
|
|
42
|
+
idempotent?: boolean;
|
|
43
|
+
readOnly?: boolean;
|
|
44
|
+
};
|
|
45
|
+
action: (context: ActionsRegistryActionContext<TInputSchema>) => Promise<z.infer<TOutputSchema> extends void ? void : {
|
|
46
|
+
output: z.infer<TOutputSchema>;
|
|
47
|
+
}>;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* @alpha
|
|
51
|
+
*/
|
|
52
|
+
interface ActionsRegistryService {
|
|
53
|
+
register<TInputSchema extends AnyZodObject, TOutputSchema extends AnyZodObject>(options: ActionsRegistryActionOptions<TInputSchema, TOutputSchema>): void;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @alpha
|
|
58
|
+
*/
|
|
59
|
+
type ActionsServiceAction = {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
title: string;
|
|
63
|
+
description: string;
|
|
64
|
+
schema: {
|
|
65
|
+
input: JSONSchema7;
|
|
66
|
+
output: JSONSchema7;
|
|
67
|
+
};
|
|
68
|
+
attributes: {
|
|
69
|
+
readOnly: boolean;
|
|
70
|
+
destructive: boolean;
|
|
71
|
+
idempotent: boolean;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* @alpha
|
|
76
|
+
*/
|
|
77
|
+
interface ActionsService {
|
|
78
|
+
list: (opts: {
|
|
79
|
+
credentials: BackstageCredentials;
|
|
80
|
+
}) => Promise<{
|
|
81
|
+
actions: ActionsServiceAction[];
|
|
82
|
+
}>;
|
|
83
|
+
invoke(opts: {
|
|
84
|
+
id: string;
|
|
85
|
+
input?: JsonObject;
|
|
86
|
+
credentials: BackstageCredentials;
|
|
87
|
+
}): Promise<{
|
|
88
|
+
output: JsonValue;
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
20
93
|
* @alpha
|
|
21
94
|
*/
|
|
22
95
|
declare const instanceMetadataServiceRef: _backstage_backend_plugin_api.ServiceRef<InstanceMetadataService, "plugin", "singleton">;
|
|
96
|
+
/**
|
|
97
|
+
* Service for calling distributed actions
|
|
98
|
+
*
|
|
99
|
+
* See {@link ActionsService}
|
|
100
|
+
* and {@link https://backstage.io/docs/backend-system/core-services/actions | the service docs}
|
|
101
|
+
* for more information.
|
|
102
|
+
*
|
|
103
|
+
* @alpha
|
|
104
|
+
*/
|
|
105
|
+
declare const actionsServiceRef: _backstage_backend_plugin_api.ServiceRef<ActionsService, "plugin", "singleton">;
|
|
106
|
+
/**
|
|
107
|
+
* Service for registering and managing distributed actions.
|
|
108
|
+
*
|
|
109
|
+
* See {@link ActionsRegistryService}
|
|
110
|
+
* and {@link https://backstage.io/docs/backend-system/core-services/actions-registry | the service docs}
|
|
111
|
+
* for more information.
|
|
112
|
+
*
|
|
113
|
+
* @alpha
|
|
114
|
+
*/
|
|
115
|
+
declare const actionsRegistryServiceRef: _backstage_backend_plugin_api.ServiceRef<ActionsRegistryService, "plugin", "singleton">;
|
|
23
116
|
|
|
24
|
-
export { type BackendFeatureMeta, type InstanceMetadataService, instanceMetadataServiceRef };
|
|
117
|
+
export { type ActionsRegistryActionContext, type ActionsRegistryActionOptions, type ActionsRegistryService, type ActionsService, type ActionsServiceAction, type BackendFeatureMeta, type InstanceMetadataService, actionsRegistryServiceRef, actionsServiceRef, instanceMetadataServiceRef };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { JsonObject, JsonValue, HumanDuration } from '@backstage/types';
|
|
3
|
-
import { PermissionAttributes, EvaluatorRequestOptions, PermissionEvaluator, AuthorizePermissionRequest, AuthorizePermissionResponse, QueryPermissionRequest, QueryPermissionResponse, Permission } from '@backstage/plugin-permission-common';
|
|
4
|
-
import { JSONSchema7 } from 'json-schema';
|
|
1
|
+
import { JsonObject, HumanDuration, JsonValue } from '@backstage/types';
|
|
5
2
|
import { Request, Response, Handler } from 'express';
|
|
3
|
+
import { PermissionAttributes, EvaluatorRequestOptions, PermissionEvaluator, AuthorizePermissionRequest, AuthorizePermissionResponse, QueryPermissionRequest, QueryPermissionResponse, Permission } from '@backstage/plugin-permission-common';
|
|
6
4
|
import { Knex } from 'knex';
|
|
7
5
|
import { PermissionResourceRef, PermissionRule, PermissionRuleset } from '@backstage/plugin-permission-node';
|
|
8
6
|
import { Config } from '@backstage/config';
|
|
@@ -11,18 +9,51 @@ import { Readable } from 'stream';
|
|
|
11
9
|
export { isChildPath } from '@backstage/cli-common';
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
|
-
*
|
|
12
|
+
* low (default): normal usage
|
|
13
|
+
* medium: accessing write endpoints
|
|
14
|
+
* high: non-root permission changes
|
|
15
|
+
* critical: root permission changes
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
type AuditorServiceEventSeverityLevel = 'low' | 'medium' | 'high' | 'critical';
|
|
19
|
+
/** @public */
|
|
20
|
+
type AuditorServiceCreateEventOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* Use kebab-case to name audit events (e.g., "user-login", "file-download", "fetch"). Represents a logical group of similar events or operations. For example, "fetch" could be used as an eventId encompassing various fetch methods like "by-id" or "by-location".
|
|
23
|
+
*
|
|
24
|
+
* The `pluginId` already provides plugin/module context, so avoid redundant prefixes in the `eventId`.
|
|
25
|
+
*/
|
|
26
|
+
eventId: string;
|
|
27
|
+
/** (Optional) The severity level for the audit event. */
|
|
28
|
+
severityLevel?: AuditorServiceEventSeverityLevel;
|
|
29
|
+
/** (Optional) The associated HTTP request, if applicable. */
|
|
30
|
+
request?: Request<any, any, any, any, any>;
|
|
31
|
+
/**
|
|
32
|
+
* (Optional) Additional metadata relevant to the event, structured as a JSON object.
|
|
33
|
+
* This could include a `queryType` field, using kebab-case, for variations within the main event (e.g., "by-id", "by-user").
|
|
34
|
+
* For example, if the `eventId` is "fetch", the `queryType` in `meta` could be "by-id" or "by-location".
|
|
35
|
+
*/
|
|
36
|
+
meta?: JsonObject;
|
|
37
|
+
};
|
|
38
|
+
/** @public */
|
|
39
|
+
type AuditorServiceEvent = {
|
|
40
|
+
success(options?: {
|
|
41
|
+
meta?: JsonObject;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
fail(options: {
|
|
44
|
+
meta?: JsonObject;
|
|
45
|
+
error: Error;
|
|
46
|
+
}): Promise<void>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* A service that provides an auditor facility.
|
|
15
50
|
*
|
|
16
|
-
* See the {@link https://backstage.io/docs/backend-system/core-services/
|
|
51
|
+
* See the {@link https://backstage.io/docs/backend-system/core-services/auditor | service documentation} for more details.
|
|
17
52
|
*
|
|
18
53
|
* @public
|
|
19
54
|
*/
|
|
20
|
-
interface
|
|
21
|
-
|
|
22
|
-
warn(message: string, meta?: Error | JsonObject): void;
|
|
23
|
-
info(message: string, meta?: Error | JsonObject): void;
|
|
24
|
-
debug(message: string, meta?: Error | JsonObject): void;
|
|
25
|
-
child(meta: JsonObject): LoggerService;
|
|
55
|
+
interface AuditorService {
|
|
56
|
+
createEvent(options: AuditorServiceCreateEventOptions): Promise<AuditorServiceEvent>;
|
|
26
57
|
}
|
|
27
58
|
|
|
28
59
|
/**
|
|
@@ -248,115 +279,6 @@ interface AuthService {
|
|
|
248
279
|
}>;
|
|
249
280
|
}
|
|
250
281
|
|
|
251
|
-
/**
|
|
252
|
-
* @public
|
|
253
|
-
*/
|
|
254
|
-
type ActionsRegistryActionContext<TInputSchema extends ZodType> = {
|
|
255
|
-
input: z.infer<TInputSchema>;
|
|
256
|
-
logger: LoggerService;
|
|
257
|
-
credentials: BackstageCredentials;
|
|
258
|
-
};
|
|
259
|
-
/**
|
|
260
|
-
* @public
|
|
261
|
-
*/
|
|
262
|
-
type ActionsRegistryActionOptions<TInputSchema extends ZodType, TOutputSchema extends ZodType> = {
|
|
263
|
-
name: string;
|
|
264
|
-
title: string;
|
|
265
|
-
description: string;
|
|
266
|
-
schema: {
|
|
267
|
-
input: (zod: typeof z) => TInputSchema;
|
|
268
|
-
output: (zod: typeof z) => TOutputSchema;
|
|
269
|
-
};
|
|
270
|
-
action: (context: ActionsRegistryActionContext<TInputSchema>) => Promise<z.infer<TOutputSchema> extends void ? void : {
|
|
271
|
-
output: z.infer<TOutputSchema>;
|
|
272
|
-
}>;
|
|
273
|
-
};
|
|
274
|
-
/**
|
|
275
|
-
* @public
|
|
276
|
-
*/
|
|
277
|
-
interface ActionsRegistryService {
|
|
278
|
-
register<TInputSchema extends ZodType, TOutputSchema extends ZodType>(options: ActionsRegistryActionOptions<TInputSchema, TOutputSchema>): void;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* @public
|
|
283
|
-
*/
|
|
284
|
-
type ActionsServiceAction = {
|
|
285
|
-
id: string;
|
|
286
|
-
name: string;
|
|
287
|
-
title: string;
|
|
288
|
-
description: string;
|
|
289
|
-
schema: {
|
|
290
|
-
input: JSONSchema7;
|
|
291
|
-
output: JSONSchema7;
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
/**
|
|
295
|
-
* @public
|
|
296
|
-
*/
|
|
297
|
-
interface ActionsService {
|
|
298
|
-
list: (opts: {
|
|
299
|
-
credentials: BackstageCredentials;
|
|
300
|
-
}) => Promise<{
|
|
301
|
-
actions: ActionsServiceAction[];
|
|
302
|
-
}>;
|
|
303
|
-
invoke(opts: {
|
|
304
|
-
id: string;
|
|
305
|
-
input?: JsonObject;
|
|
306
|
-
credentials: BackstageCredentials;
|
|
307
|
-
}): Promise<{
|
|
308
|
-
output: JsonValue;
|
|
309
|
-
}>;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* low (default): normal usage
|
|
314
|
-
* medium: accessing write endpoints
|
|
315
|
-
* high: non-root permission changes
|
|
316
|
-
* critical: root permission changes
|
|
317
|
-
* @public
|
|
318
|
-
*/
|
|
319
|
-
type AuditorServiceEventSeverityLevel = 'low' | 'medium' | 'high' | 'critical';
|
|
320
|
-
/** @public */
|
|
321
|
-
type AuditorServiceCreateEventOptions = {
|
|
322
|
-
/**
|
|
323
|
-
* Use kebab-case to name audit events (e.g., "user-login", "file-download", "fetch"). Represents a logical group of similar events or operations. For example, "fetch" could be used as an eventId encompassing various fetch methods like "by-id" or "by-location".
|
|
324
|
-
*
|
|
325
|
-
* The `pluginId` already provides plugin/module context, so avoid redundant prefixes in the `eventId`.
|
|
326
|
-
*/
|
|
327
|
-
eventId: string;
|
|
328
|
-
/** (Optional) The severity level for the audit event. */
|
|
329
|
-
severityLevel?: AuditorServiceEventSeverityLevel;
|
|
330
|
-
/** (Optional) The associated HTTP request, if applicable. */
|
|
331
|
-
request?: Request<any, any, any, any, any>;
|
|
332
|
-
/**
|
|
333
|
-
* (Optional) Additional metadata relevant to the event, structured as a JSON object.
|
|
334
|
-
* This could include a `queryType` field, using kebab-case, for variations within the main event (e.g., "by-id", "by-user").
|
|
335
|
-
* For example, if the `eventId` is "fetch", the `queryType` in `meta` could be "by-id" or "by-location".
|
|
336
|
-
*/
|
|
337
|
-
meta?: JsonObject;
|
|
338
|
-
};
|
|
339
|
-
/** @public */
|
|
340
|
-
type AuditorServiceEvent = {
|
|
341
|
-
success(options?: {
|
|
342
|
-
meta?: JsonObject;
|
|
343
|
-
}): Promise<void>;
|
|
344
|
-
fail(options: {
|
|
345
|
-
meta?: JsonObject;
|
|
346
|
-
error: Error;
|
|
347
|
-
}): Promise<void>;
|
|
348
|
-
};
|
|
349
|
-
/**
|
|
350
|
-
* A service that provides an auditor facility.
|
|
351
|
-
*
|
|
352
|
-
* See the {@link https://backstage.io/docs/backend-system/core-services/auditor | service documentation} for more details.
|
|
353
|
-
*
|
|
354
|
-
* @public
|
|
355
|
-
*/
|
|
356
|
-
interface AuditorService {
|
|
357
|
-
createEvent(options: AuditorServiceCreateEventOptions): Promise<AuditorServiceEvent>;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
282
|
/**
|
|
361
283
|
* Options passed to {@link CacheService.set}.
|
|
362
284
|
*
|
|
@@ -624,6 +546,21 @@ interface HttpRouterService {
|
|
|
624
546
|
addAuthPolicy(policy: HttpRouterServiceAuthPolicy): void;
|
|
625
547
|
}
|
|
626
548
|
|
|
549
|
+
/**
|
|
550
|
+
* A service that provides a logging facility.
|
|
551
|
+
*
|
|
552
|
+
* See the {@link https://backstage.io/docs/backend-system/core-services/logger | service documentation} for more details.
|
|
553
|
+
*
|
|
554
|
+
* @public
|
|
555
|
+
*/
|
|
556
|
+
interface LoggerService {
|
|
557
|
+
error(message: string, meta?: Error | JsonObject): void;
|
|
558
|
+
warn(message: string, meta?: Error | JsonObject): void;
|
|
559
|
+
info(message: string, meta?: Error | JsonObject): void;
|
|
560
|
+
debug(message: string, meta?: Error | JsonObject): void;
|
|
561
|
+
child(meta: JsonObject): LoggerService;
|
|
562
|
+
}
|
|
563
|
+
|
|
627
564
|
/**
|
|
628
565
|
* @public
|
|
629
566
|
*/
|
|
@@ -1718,26 +1655,6 @@ declare namespace coreServices {
|
|
|
1718
1655
|
* @public
|
|
1719
1656
|
*/
|
|
1720
1657
|
const auth: ServiceRef<AuthService, "plugin", "singleton">;
|
|
1721
|
-
/**
|
|
1722
|
-
* Service for calling distributed actions
|
|
1723
|
-
*
|
|
1724
|
-
* See {@link ActionsService}
|
|
1725
|
-
* and {@link https://backstage.io/docs/backend-system/core-services/actions | the service docs}
|
|
1726
|
-
* for more information.
|
|
1727
|
-
*
|
|
1728
|
-
* @public
|
|
1729
|
-
*/
|
|
1730
|
-
const actions: ServiceRef<ActionsService, "plugin", "singleton">;
|
|
1731
|
-
/**
|
|
1732
|
-
* Service for registering and managing distributed actions.
|
|
1733
|
-
*
|
|
1734
|
-
* See {@link ActionsRegistryService}
|
|
1735
|
-
* and {@link https://backstage.io/docs/backend-system/core-services/actions-registry | the service docs}
|
|
1736
|
-
* for more information.
|
|
1737
|
-
*
|
|
1738
|
-
* @public
|
|
1739
|
-
*/
|
|
1740
|
-
const actionsRegistry: ServiceRef<ActionsRegistryService, "plugin", "singleton">;
|
|
1741
1658
|
/**
|
|
1742
1659
|
* Authenticated user information retrieval.
|
|
1743
1660
|
*
|
|
@@ -2110,4 +2027,4 @@ declare function createBackendFeatureLoader<TDeps extends {
|
|
|
2110
2027
|
[name in string]: unknown;
|
|
2111
2028
|
}>(options: CreateBackendFeatureLoaderOptions<TDeps>): BackendFeature;
|
|
2112
2029
|
|
|
2113
|
-
export { type
|
|
2030
|
+
export { type AuditorService, type AuditorServiceCreateEventOptions, type AuditorServiceEvent, type AuditorServiceEventSeverityLevel, type AuthService, type BackendFeature, type BackendModuleRegistrationPoints, type BackendPluginRegistrationPoints, type BackstageCredentials, type BackstageNonePrincipal, type BackstagePrincipalAccessRestrictions, type BackstagePrincipalTypes, type BackstageServicePrincipal, type BackstageUserInfo, type BackstageUserPrincipal, type CacheService, type CacheServiceOptions, type CacheServiceSetOptions, type CreateBackendFeatureLoaderOptions, type CreateBackendModuleOptions, type CreateBackendPluginOptions, type CreateExtensionPointOptions, type DatabaseService, type DiscoveryService, type ExtensionPoint, type HttpAuthService, type HttpRouterService, type HttpRouterServiceAuthPolicy, type LifecycleService, type LifecycleServiceShutdownHook, type LifecycleServiceShutdownOptions, type LifecycleServiceStartupHook, type LifecycleServiceStartupOptions, type LoggerService, type PermissionsRegistryService, type PermissionsRegistryServiceAddResourceTypeOptions, type PermissionsService, type PermissionsServiceRequestOptions, type PluginMetadataService, type PluginServiceFactoryOptions, type RootConfigService, type RootHealthService, type RootHttpRouterService, type RootLifecycleService, type RootLoggerService, type RootServiceFactoryOptions, type SchedulerService, type SchedulerServiceTaskDescriptor, type SchedulerServiceTaskFunction, type SchedulerServiceTaskInvocationDefinition, type SchedulerServiceTaskRunner, type SchedulerServiceTaskScheduleDefinition, type SchedulerServiceTaskScheduleDefinitionConfig, type ServiceFactory, type ServiceRef, type ServiceRefOptions, type UrlReaderService, type UrlReaderServiceReadTreeOptions, type UrlReaderServiceReadTreeResponse, type UrlReaderServiceReadTreeResponseDirOptions, type UrlReaderServiceReadTreeResponseFile, type UrlReaderServiceReadUrlOptions, type UrlReaderServiceReadUrlResponse, type UrlReaderServiceSearchOptions, type UrlReaderServiceSearchResponse, type UrlReaderServiceSearchResponseFile, type UserInfoService, coreServices, createBackendFeatureLoader, createBackendModule, createBackendPlugin, createExtensionPoint, createServiceFactory, createServiceRef, isDatabaseConflictError, readSchedulerServiceTaskScheduleDefinitionFromConfig, resolvePackagePath, resolveSafeChildPath };
|
|
@@ -7,12 +7,6 @@ exports.coreServices = void 0;
|
|
|
7
7
|
coreServices2.auth = types.createServiceRef({
|
|
8
8
|
id: "core.auth"
|
|
9
9
|
});
|
|
10
|
-
coreServices2.actions = types.createServiceRef({
|
|
11
|
-
id: "core.actions"
|
|
12
|
-
});
|
|
13
|
-
coreServices2.actionsRegistry = types.createServiceRef({
|
|
14
|
-
id: "core.actionsRegistry"
|
|
15
|
-
});
|
|
16
10
|
coreServices2.userInfo = types.createServiceRef({
|
|
17
11
|
id: "core.userInfo"
|
|
18
12
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coreServices.cjs.js","sources":["../../../src/services/definitions/coreServices.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createServiceRef } from '../system';\n\n/**\n * All core services references\n *\n * @public\n */\nexport namespace coreServices {\n /**\n * Handles token authentication and credentials management.\n *\n * See {@link AuthService}\n * and {@link https://backstage.io/docs/backend-system/core-services/auth | the service docs}\n * for more information.\n *\n * @public\n */\n export const auth = createServiceRef<import('./AuthService').AuthService>({\n id: 'core.auth',\n });\n\n /**\n * Service for calling distributed actions\n *\n * See {@link ActionsService}\n * and {@link https://backstage.io/docs/backend-system/core-services/actions | the service docs}\n * for more information.\n *\n * @public\n */\n export const actions = createServiceRef<\n import('./ActionsService').ActionsService\n >({\n id: 'core.actions',\n });\n\n /**\n * Service for registering and managing distributed actions.\n *\n * See {@link ActionsRegistryService}\n * and {@link https://backstage.io/docs/backend-system/core-services/actions-registry | the service docs}\n * for more information.\n *\n * @public\n */\n export const actionsRegistry = createServiceRef<\n import('./ActionsRegistryService').ActionsRegistryService\n >({\n id: 'core.actionsRegistry',\n });\n\n /**\n * Authenticated user information retrieval.\n *\n * See {@link UserInfoService}\n * and {@link https://backstage.io/docs/backend-system/core-services/user-info | the service docs}\n * for more information.\n *\n * @public\n */\n export const userInfo = createServiceRef<\n import('./UserInfoService').UserInfoService\n >({\n id: 'core.userInfo',\n });\n\n /**\n * Key-value store for caching data.\n *\n * See {@link CacheService}\n * and {@link https://backstage.io/docs/backend-system/core-services/cache | the service docs}\n * for more information.\n *\n * @public\n */\n export const cache = createServiceRef<import('./CacheService').CacheService>({\n id: 'core.cache',\n });\n\n /**\n * Access to static configuration.\n *\n * See {@link RootConfigService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-config | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootConfig = createServiceRef<\n import('./RootConfigService').RootConfigService\n >({ id: 'core.rootConfig', scope: 'root' });\n\n /**\n * Database access and management via `knex`.\n *\n * See {@link DatabaseService}\n * and {@link https://backstage.io/docs/backend-system/core-services/database | the service docs}\n * for more information.\n *\n * @public\n */\n export const database = createServiceRef<\n import('./DatabaseService').DatabaseService\n >({ id: 'core.database' });\n\n /**\n * Service discovery for inter-plugin communication.\n *\n * See {@link DiscoveryService}\n * and {@link https://backstage.io/docs/backend-system/core-services/discovery | the service docs}\n * for more information.\n *\n * @public\n */\n export const discovery = createServiceRef<\n import('./DiscoveryService').DiscoveryService\n >({ id: 'core.discovery' });\n\n /**\n * The service reference for the plugin scoped {@link RootHealthService}.\n */\n export const rootHealth = createServiceRef<\n import('./RootHealthService').RootHealthService\n >({ id: 'core.rootHealth', scope: 'root' });\n\n /**\n * Authentication of HTTP requests.\n *\n * See {@link HttpAuthService}\n * and {@link https://backstage.io/docs/backend-system/core-services/http-auth | the service docs}\n * for more information.\n *\n * @public\n */\n export const httpAuth = createServiceRef<\n import('./HttpAuthService').HttpAuthService\n >({ id: 'core.httpAuth' });\n\n /**\n * HTTP route registration for plugins.\n *\n * See {@link HttpRouterService}\n * and {@link https://backstage.io/docs/backend-system/core-services/http-router | the service docs}\n * for more information.\n *\n * @public\n */\n export const httpRouter = createServiceRef<\n import('./HttpRouterService').HttpRouterService\n >({ id: 'core.httpRouter' });\n\n /**\n * Registration of plugin startup and shutdown lifecycle hooks.\n *\n * See {@link LifecycleService}\n * and {@link https://backstage.io/docs/backend-system/core-services/lifecycle | the service docs}\n * for more information.\n *\n * @public\n */\n export const lifecycle = createServiceRef<\n import('./LifecycleService').LifecycleService\n >({ id: 'core.lifecycle' });\n\n /**\n * Plugin-level logging.\n *\n * See {@link LoggerService}\n * and {@link https://backstage.io/docs/backend-system/core-services/logger | the service docs}\n * for more information.\n *\n * @public\n */\n export const logger = createServiceRef<\n import('./LoggerService').LoggerService\n >({ id: 'core.logger' });\n\n /**\n * Plugin-level auditing.\n *\n * See {@link AuditorService}\n * and {@link https://backstage.io/docs/backend-system/core-services/auditor | the service docs}\n * for more information.\n *\n * @public\n */\n export const auditor = createServiceRef<\n import('./AuditorService').AuditorService\n >({ id: 'core.auditor' });\n\n /**\n * Permission system integration for authorization of user actions.\n *\n * See {@link PermissionsService}\n * and {@link https://backstage.io/docs/backend-system/core-services/permissions | the service docs}\n * for more information.\n *\n * @public\n */\n export const permissions = createServiceRef<\n import('./PermissionsService').PermissionsService\n >({ id: 'core.permissions' });\n\n /**\n * Permission system integration for registering resources and permissions.\n *\n * See {@link PermissionsRegistryService}\n * and {@link https://backstage.io/docs/backend-system/core-services/permission-integrations | the service docs}\n * for more information.\n *\n * @public\n */\n export const permissionsRegistry = createServiceRef<\n import('./PermissionsRegistryService').PermissionsRegistryService\n >({ id: 'core.permissionsRegistry' });\n\n /**\n * Built-in service for accessing metadata about the current plugin.\n *\n * See {@link PluginMetadataService}\n * and {@link https://backstage.io/docs/backend-system/core-services/plugin-metadata | the service docs}\n * for more information.\n *\n * @public\n */\n export const pluginMetadata = createServiceRef<\n import('./PluginMetadataService').PluginMetadataService\n >({ id: 'core.pluginMetadata' });\n\n /**\n * HTTP route registration for root services.\n *\n * See {@link RootHttpRouterService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-http-router | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootHttpRouter = createServiceRef<\n import('./RootHttpRouterService').RootHttpRouterService\n >({ id: 'core.rootHttpRouter', scope: 'root' });\n\n /**\n * Registration of backend startup and shutdown lifecycle hooks.\n *\n * See {@link RootLifecycleService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-lifecycle | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootLifecycle = createServiceRef<\n import('./RootLifecycleService').RootLifecycleService\n >({ id: 'core.rootLifecycle', scope: 'root' });\n\n /**\n * Root-level logging.\n *\n * See {@link RootLoggerService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-logger | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootLogger = createServiceRef<\n import('./RootLoggerService').RootLoggerService\n >({ id: 'core.rootLogger', scope: 'root' });\n\n /**\n * Scheduling of distributed background tasks.\n *\n * See {@link SchedulerService}\n * and {@link https://backstage.io/docs/backend-system/core-services/scheduler | the service docs}\n * for more information.\n *\n * @public\n */\n export const scheduler = createServiceRef<\n import('./SchedulerService').SchedulerService\n >({ id: 'core.scheduler' });\n\n /**\n * Reading content from external systems.\n *\n * See {@link UrlReaderService}\n * and {@link https://backstage.io/docs/backend-system/core-services/url-reader | the service docs}\n * for more information.\n *\n * @public\n */\n export const urlReader = createServiceRef<\n import('./UrlReaderService').UrlReaderService\n >({ id: 'core.urlReader' });\n}\n"],"names":["coreServices","createServiceRef"],"mappings":";;;;AAuBiBA;AAAA,CAAV,CAAUA,aAAV,KAAA;AAUE,EAAMA,aAAAA,CAAA,OAAOC,sBAAsD,CAAA;AAAA,IACxE,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,UAAUC,sBAErB,CAAA;AAAA,IACA,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,kBAAkBC,sBAE7B,CAAA;AAAA,IACA,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,WAAWC,sBAEtB,CAAA;AAAA,IACA,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,QAAQC,sBAAwD,CAAA;AAAA,IAC3E,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,aAAaC,sBAExB,CAAA,EAAE,IAAI,iBAAmB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWnC,EAAMD,cAAA,QAAW,GAAAC,sBAAA,CAEtB,EAAE,EAAA,EAAI,iBAAiB,CAAA;AAWlB,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAKnB,EAAMD,aAAAA,CAAA,aAAaC,sBAExB,CAAA,EAAE,IAAI,iBAAmB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWnC,EAAMD,cAAA,QAAW,GAAAC,sBAAA,CAEtB,EAAE,EAAA,EAAI,iBAAiB,CAAA;AAWlB,EAAMD,cAAA,UAAa,GAAAC,sBAAA,CAExB,EAAE,EAAA,EAAI,mBAAmB,CAAA;AAWpB,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAWnB,EAAMD,cAAA,MAAS,GAAAC,sBAAA,CAEpB,EAAE,EAAA,EAAI,eAAe,CAAA;AAWhB,EAAMD,cAAA,OAAU,GAAAC,sBAAA,CAErB,EAAE,EAAA,EAAI,gBAAgB,CAAA;AAWjB,EAAMD,cAAA,WAAc,GAAAC,sBAAA,CAEzB,EAAE,EAAA,EAAI,oBAAoB,CAAA;AAWrB,EAAMD,cAAA,mBAAsB,GAAAC,sBAAA,CAEjC,EAAE,EAAA,EAAI,4BAA4B,CAAA;AAW7B,EAAMD,cAAA,cAAiB,GAAAC,sBAAA,CAE5B,EAAE,EAAA,EAAI,uBAAuB,CAAA;AAWxB,EAAMD,aAAAA,CAAA,iBAAiBC,sBAE5B,CAAA,EAAE,IAAI,qBAAuB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWvC,EAAMD,aAAAA,CAAA,gBAAgBC,sBAE3B,CAAA,EAAE,IAAI,oBAAsB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWtC,EAAMD,aAAAA,CAAA,aAAaC,sBAExB,CAAA,EAAE,IAAI,iBAAmB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWnC,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAWnB,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAAA,CA7RX,EAAAD,oBAAA,KAAAA,oBAAA,GAAA,EAAA,CAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"coreServices.cjs.js","sources":["../../../src/services/definitions/coreServices.ts"],"sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createServiceRef } from '../system';\n\n/**\n * All core services references\n *\n * @public\n */\nexport namespace coreServices {\n /**\n * Handles token authentication and credentials management.\n *\n * See {@link AuthService}\n * and {@link https://backstage.io/docs/backend-system/core-services/auth | the service docs}\n * for more information.\n *\n * @public\n */\n export const auth = createServiceRef<import('./AuthService').AuthService>({\n id: 'core.auth',\n });\n\n /**\n * Authenticated user information retrieval.\n *\n * See {@link UserInfoService}\n * and {@link https://backstage.io/docs/backend-system/core-services/user-info | the service docs}\n * for more information.\n *\n * @public\n */\n export const userInfo = createServiceRef<\n import('./UserInfoService').UserInfoService\n >({\n id: 'core.userInfo',\n });\n\n /**\n * Key-value store for caching data.\n *\n * See {@link CacheService}\n * and {@link https://backstage.io/docs/backend-system/core-services/cache | the service docs}\n * for more information.\n *\n * @public\n */\n export const cache = createServiceRef<import('./CacheService').CacheService>({\n id: 'core.cache',\n });\n\n /**\n * Access to static configuration.\n *\n * See {@link RootConfigService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-config | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootConfig = createServiceRef<\n import('./RootConfigService').RootConfigService\n >({ id: 'core.rootConfig', scope: 'root' });\n\n /**\n * Database access and management via `knex`.\n *\n * See {@link DatabaseService}\n * and {@link https://backstage.io/docs/backend-system/core-services/database | the service docs}\n * for more information.\n *\n * @public\n */\n export const database = createServiceRef<\n import('./DatabaseService').DatabaseService\n >({ id: 'core.database' });\n\n /**\n * Service discovery for inter-plugin communication.\n *\n * See {@link DiscoveryService}\n * and {@link https://backstage.io/docs/backend-system/core-services/discovery | the service docs}\n * for more information.\n *\n * @public\n */\n export const discovery = createServiceRef<\n import('./DiscoveryService').DiscoveryService\n >({ id: 'core.discovery' });\n\n /**\n * The service reference for the plugin scoped {@link RootHealthService}.\n */\n export const rootHealth = createServiceRef<\n import('./RootHealthService').RootHealthService\n >({ id: 'core.rootHealth', scope: 'root' });\n\n /**\n * Authentication of HTTP requests.\n *\n * See {@link HttpAuthService}\n * and {@link https://backstage.io/docs/backend-system/core-services/http-auth | the service docs}\n * for more information.\n *\n * @public\n */\n export const httpAuth = createServiceRef<\n import('./HttpAuthService').HttpAuthService\n >({ id: 'core.httpAuth' });\n\n /**\n * HTTP route registration for plugins.\n *\n * See {@link HttpRouterService}\n * and {@link https://backstage.io/docs/backend-system/core-services/http-router | the service docs}\n * for more information.\n *\n * @public\n */\n export const httpRouter = createServiceRef<\n import('./HttpRouterService').HttpRouterService\n >({ id: 'core.httpRouter' });\n\n /**\n * Registration of plugin startup and shutdown lifecycle hooks.\n *\n * See {@link LifecycleService}\n * and {@link https://backstage.io/docs/backend-system/core-services/lifecycle | the service docs}\n * for more information.\n *\n * @public\n */\n export const lifecycle = createServiceRef<\n import('./LifecycleService').LifecycleService\n >({ id: 'core.lifecycle' });\n\n /**\n * Plugin-level logging.\n *\n * See {@link LoggerService}\n * and {@link https://backstage.io/docs/backend-system/core-services/logger | the service docs}\n * for more information.\n *\n * @public\n */\n export const logger = createServiceRef<\n import('./LoggerService').LoggerService\n >({ id: 'core.logger' });\n\n /**\n * Plugin-level auditing.\n *\n * See {@link AuditorService}\n * and {@link https://backstage.io/docs/backend-system/core-services/auditor | the service docs}\n * for more information.\n *\n * @public\n */\n export const auditor = createServiceRef<\n import('./AuditorService').AuditorService\n >({ id: 'core.auditor' });\n\n /**\n * Permission system integration for authorization of user actions.\n *\n * See {@link PermissionsService}\n * and {@link https://backstage.io/docs/backend-system/core-services/permissions | the service docs}\n * for more information.\n *\n * @public\n */\n export const permissions = createServiceRef<\n import('./PermissionsService').PermissionsService\n >({ id: 'core.permissions' });\n\n /**\n * Permission system integration for registering resources and permissions.\n *\n * See {@link PermissionsRegistryService}\n * and {@link https://backstage.io/docs/backend-system/core-services/permission-integrations | the service docs}\n * for more information.\n *\n * @public\n */\n export const permissionsRegistry = createServiceRef<\n import('./PermissionsRegistryService').PermissionsRegistryService\n >({ id: 'core.permissionsRegistry' });\n\n /**\n * Built-in service for accessing metadata about the current plugin.\n *\n * See {@link PluginMetadataService}\n * and {@link https://backstage.io/docs/backend-system/core-services/plugin-metadata | the service docs}\n * for more information.\n *\n * @public\n */\n export const pluginMetadata = createServiceRef<\n import('./PluginMetadataService').PluginMetadataService\n >({ id: 'core.pluginMetadata' });\n\n /**\n * HTTP route registration for root services.\n *\n * See {@link RootHttpRouterService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-http-router | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootHttpRouter = createServiceRef<\n import('./RootHttpRouterService').RootHttpRouterService\n >({ id: 'core.rootHttpRouter', scope: 'root' });\n\n /**\n * Registration of backend startup and shutdown lifecycle hooks.\n *\n * See {@link RootLifecycleService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-lifecycle | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootLifecycle = createServiceRef<\n import('./RootLifecycleService').RootLifecycleService\n >({ id: 'core.rootLifecycle', scope: 'root' });\n\n /**\n * Root-level logging.\n *\n * See {@link RootLoggerService}\n * and {@link https://backstage.io/docs/backend-system/core-services/root-logger | the service docs}\n * for more information.\n *\n * @public\n */\n export const rootLogger = createServiceRef<\n import('./RootLoggerService').RootLoggerService\n >({ id: 'core.rootLogger', scope: 'root' });\n\n /**\n * Scheduling of distributed background tasks.\n *\n * See {@link SchedulerService}\n * and {@link https://backstage.io/docs/backend-system/core-services/scheduler | the service docs}\n * for more information.\n *\n * @public\n */\n export const scheduler = createServiceRef<\n import('./SchedulerService').SchedulerService\n >({ id: 'core.scheduler' });\n\n /**\n * Reading content from external systems.\n *\n * See {@link UrlReaderService}\n * and {@link https://backstage.io/docs/backend-system/core-services/url-reader | the service docs}\n * for more information.\n *\n * @public\n */\n export const urlReader = createServiceRef<\n import('./UrlReaderService').UrlReaderService\n >({ id: 'core.urlReader' });\n}\n"],"names":["coreServices","createServiceRef"],"mappings":";;;;AAuBiBA;AAAA,CAAV,CAAUA,aAAV,KAAA;AAUE,EAAMA,aAAAA,CAAA,OAAOC,sBAAsD,CAAA;AAAA,IACxE,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,WAAWC,sBAEtB,CAAA;AAAA,IACA,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,QAAQC,sBAAwD,CAAA;AAAA,IAC3E,EAAI,EAAA;AAAA,GACL,CAAA;AAWM,EAAMD,aAAAA,CAAA,aAAaC,sBAExB,CAAA,EAAE,IAAI,iBAAmB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWnC,EAAMD,cAAA,QAAW,GAAAC,sBAAA,CAEtB,EAAE,EAAA,EAAI,iBAAiB,CAAA;AAWlB,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAKnB,EAAMD,aAAAA,CAAA,aAAaC,sBAExB,CAAA,EAAE,IAAI,iBAAmB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWnC,EAAMD,cAAA,QAAW,GAAAC,sBAAA,CAEtB,EAAE,EAAA,EAAI,iBAAiB,CAAA;AAWlB,EAAMD,cAAA,UAAa,GAAAC,sBAAA,CAExB,EAAE,EAAA,EAAI,mBAAmB,CAAA;AAWpB,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAWnB,EAAMD,cAAA,MAAS,GAAAC,sBAAA,CAEpB,EAAE,EAAA,EAAI,eAAe,CAAA;AAWhB,EAAMD,cAAA,OAAU,GAAAC,sBAAA,CAErB,EAAE,EAAA,EAAI,gBAAgB,CAAA;AAWjB,EAAMD,cAAA,WAAc,GAAAC,sBAAA,CAEzB,EAAE,EAAA,EAAI,oBAAoB,CAAA;AAWrB,EAAMD,cAAA,mBAAsB,GAAAC,sBAAA,CAEjC,EAAE,EAAA,EAAI,4BAA4B,CAAA;AAW7B,EAAMD,cAAA,cAAiB,GAAAC,sBAAA,CAE5B,EAAE,EAAA,EAAI,uBAAuB,CAAA;AAWxB,EAAMD,aAAAA,CAAA,iBAAiBC,sBAE5B,CAAA,EAAE,IAAI,qBAAuB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWvC,EAAMD,aAAAA,CAAA,gBAAgBC,sBAE3B,CAAA,EAAE,IAAI,oBAAsB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWtC,EAAMD,aAAAA,CAAA,aAAaC,sBAExB,CAAA,EAAE,IAAI,iBAAmB,EAAA,KAAA,EAAO,QAAQ,CAAA;AAWnC,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAWnB,EAAMD,cAAA,SAAY,GAAAC,sBAAA,CAEvB,EAAE,EAAA,EAAI,kBAAkB,CAAA;AAAA,CA/PX,EAAAD,oBAAA,KAAAA,oBAAA,GAAA,EAAA,CAAA,CAAA;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-plugin-api",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1-next.0",
|
|
4
4
|
"description": "Core API used by Backstage backend plugins",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library"
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@backstage/cli-common": "0.1.15",
|
|
69
|
-
"@backstage/config": "1.3.
|
|
69
|
+
"@backstage/config": "1.3.3-next.0",
|
|
70
70
|
"@backstage/errors": "1.2.7",
|
|
71
|
-
"@backstage/plugin-auth-node": "0.6.
|
|
72
|
-
"@backstage/plugin-permission-common": "0.9.0",
|
|
73
|
-
"@backstage/plugin-permission-node": "0.10.
|
|
71
|
+
"@backstage/plugin-auth-node": "0.6.5-next.0",
|
|
72
|
+
"@backstage/plugin-permission-common": "0.9.1-next.0",
|
|
73
|
+
"@backstage/plugin-permission-node": "0.10.2-next.0",
|
|
74
74
|
"@backstage/types": "1.2.1",
|
|
75
75
|
"@types/express": "^4.17.6",
|
|
76
76
|
"@types/json-schema": "^7.0.6",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"zod": "^3.22.4"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@backstage/backend-test-utils": "1.
|
|
85
|
-
"@backstage/cli": "0.
|
|
84
|
+
"@backstage/backend-test-utils": "1.7.0-next.1",
|
|
85
|
+
"@backstage/cli": "0.33.1-next.1"
|
|
86
86
|
},
|
|
87
87
|
"configSchema": "config.d.ts"
|
|
88
88
|
}
|