@backstage/backend-plugin-api 0.0.0-nightly-20250114022708 → 0.0.0-nightly-20250117022919
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,16 +1,30 @@
|
|
|
1
1
|
# @backstage/backend-plugin-api
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20250117022919
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
+
- 9ddfd94: Added new `PermissionsRegistryService` that is used by plugins to register permissions, resource types, and rules into the permission system. This replaces the existing `createPermissionIntegrationRouter` from `@backstage/plugin-permission-node`.
|
|
7
8
|
- Updated dependencies
|
|
8
|
-
- @backstage/
|
|
9
|
-
- @backstage/plugin-auth-node@0.0.0-nightly-20250114022708
|
|
9
|
+
- @backstage/plugin-permission-node@0.0.0-nightly-20250117022919
|
|
10
10
|
- @backstage/cli-common@0.1.15
|
|
11
|
-
- @backstage/config@
|
|
12
|
-
- @backstage/errors@
|
|
13
|
-
- @backstage/
|
|
11
|
+
- @backstage/config@1.3.2
|
|
12
|
+
- @backstage/errors@1.2.7
|
|
13
|
+
- @backstage/types@1.2.1
|
|
14
|
+
- @backstage/plugin-auth-node@0.0.0-nightly-20250117022919
|
|
15
|
+
- @backstage/plugin-permission-common@0.8.4
|
|
16
|
+
|
|
17
|
+
## 1.1.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/types@1.2.1
|
|
23
|
+
- @backstage/plugin-auth-node@0.5.6
|
|
24
|
+
- @backstage/cli-common@0.1.15
|
|
25
|
+
- @backstage/config@1.3.2
|
|
26
|
+
- @backstage/errors@1.2.7
|
|
27
|
+
- @backstage/plugin-permission-common@0.8.4
|
|
14
28
|
|
|
15
29
|
## 1.1.1-next.1
|
|
16
30
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { Config } from '@backstage/config';
|
|
|
4
4
|
import { JsonObject, HumanDuration, JsonValue } from '@backstage/types';
|
|
5
5
|
import { Duration } from 'luxon';
|
|
6
6
|
import { Handler, Request, Response } from 'express';
|
|
7
|
-
import { PermissionAttributes, EvaluatorRequestOptions, PermissionEvaluator, AuthorizePermissionRequest, AuthorizePermissionResponse, QueryPermissionRequest, QueryPermissionResponse } from '@backstage/plugin-permission-common';
|
|
7
|
+
import { Permission, PermissionAttributes, EvaluatorRequestOptions, PermissionEvaluator, AuthorizePermissionRequest, AuthorizePermissionResponse, QueryPermissionRequest, QueryPermissionResponse } from '@backstage/plugin-permission-common';
|
|
8
|
+
import { PermissionRule } from '@backstage/plugin-permission-node';
|
|
8
9
|
import { Knex } from 'knex';
|
|
9
10
|
export { isChildPath } from '@backstage/cli-common';
|
|
10
11
|
|
|
@@ -758,6 +759,104 @@ interface PluginMetadataService {
|
|
|
758
759
|
getId(): string;
|
|
759
760
|
}
|
|
760
761
|
|
|
762
|
+
/**
|
|
763
|
+
* Prevent use of type parameter from contributing to type inference.
|
|
764
|
+
*
|
|
765
|
+
* https://github.com/Microsoft/TypeScript/issues/14829#issuecomment-980401795
|
|
766
|
+
* @ignore
|
|
767
|
+
*/
|
|
768
|
+
type NoInfer<T> = T extends infer S ? S : never;
|
|
769
|
+
/**
|
|
770
|
+
* Options for adding a resource type to the permission system.
|
|
771
|
+
*
|
|
772
|
+
* @public
|
|
773
|
+
*/
|
|
774
|
+
type PermissionsRegistryServiceAddResourceTypeOptions<TResourceType extends string, TResource> = {
|
|
775
|
+
/**
|
|
776
|
+
* The identifier for the resource type.
|
|
777
|
+
*/
|
|
778
|
+
resourceType: TResourceType;
|
|
779
|
+
/**
|
|
780
|
+
* Permissions that are available for this resource type.
|
|
781
|
+
*/
|
|
782
|
+
permissions?: Array<Permission>;
|
|
783
|
+
/**
|
|
784
|
+
* Permission rules that are available for this resource type.
|
|
785
|
+
*/
|
|
786
|
+
rules: PermissionRule<TResource, any, NoInfer<TResourceType>>[];
|
|
787
|
+
/**
|
|
788
|
+
* The function used to load associated resources based in the provided
|
|
789
|
+
* references.
|
|
790
|
+
*
|
|
791
|
+
* @remarks
|
|
792
|
+
*
|
|
793
|
+
* If this function is not provided the permission system will not be able to
|
|
794
|
+
* resolve conditional decisions except when requesting resources directly
|
|
795
|
+
* from the plugin.
|
|
796
|
+
*/
|
|
797
|
+
getResources?(resourceRefs: string[]): Promise<Array<TResource | undefined>>;
|
|
798
|
+
};
|
|
799
|
+
/**
|
|
800
|
+
* Permission system integration for registering resources and permissions.
|
|
801
|
+
*
|
|
802
|
+
* See the {@link https://backstage.io/docs/permissions/overview | permissions documentation}
|
|
803
|
+
* and the {@link https://backstage.io/docs/backend-system/core-services/permission-integrations | service documentation}
|
|
804
|
+
* for more details.
|
|
805
|
+
*
|
|
806
|
+
* @public
|
|
807
|
+
*/
|
|
808
|
+
interface PermissionsRegistryService {
|
|
809
|
+
/**
|
|
810
|
+
* Add permissions for this plugin to the permission system.
|
|
811
|
+
*/
|
|
812
|
+
addPermissions(permissions: Permission[]): void;
|
|
813
|
+
/**
|
|
814
|
+
* Adds a set of permission rules to the permission system for a resource type
|
|
815
|
+
* that is owned by this plugin.
|
|
816
|
+
*
|
|
817
|
+
* @remarks
|
|
818
|
+
*
|
|
819
|
+
* Rules should be created using corresponding `create*PermissionRule`
|
|
820
|
+
* functions exported by plugins, who in turn are created with
|
|
821
|
+
* `makeCreatePermissionRule`.
|
|
822
|
+
*
|
|
823
|
+
* Rules can be added either directly by the plugin itself or through a plugin
|
|
824
|
+
* module.
|
|
825
|
+
*/
|
|
826
|
+
addPermissionRules(rules: PermissionRule<any, any, string>[]): void;
|
|
827
|
+
/**
|
|
828
|
+
* Add a new resource type that is owned by this plugin to the permission
|
|
829
|
+
* system.
|
|
830
|
+
*
|
|
831
|
+
* @remarks
|
|
832
|
+
*
|
|
833
|
+
* To make this concrete, we can use the Backstage software catalog as an
|
|
834
|
+
* example. The catalog has conditional rules around access to specific
|
|
835
|
+
* _entities_ in the catalog. The _type_ of resource is captured here as
|
|
836
|
+
* `resourceType`, a string identifier (`catalog-entity` in this example) that
|
|
837
|
+
* can be provided with permission definitions. This is merely a _type_ to
|
|
838
|
+
* verify that conditions in an authorization policy are constructed
|
|
839
|
+
* correctly, not a reference to a specific resource.
|
|
840
|
+
*
|
|
841
|
+
* The `rules` parameter is an array of
|
|
842
|
+
* {@link @backstage/plugin-permission-node#PermissionRule}s that introduce
|
|
843
|
+
* conditional filtering logic for resources; for the catalog, these are
|
|
844
|
+
* things like `isEntityOwner` or `hasAnnotation`. Rules describe how to
|
|
845
|
+
* filter a list of resources, and the `conditions` returned allow these rules
|
|
846
|
+
* to be applied with specific parameters (such as 'group:default/team-a', or
|
|
847
|
+
* 'backstage.io/edit-url').
|
|
848
|
+
*
|
|
849
|
+
* The `getResources` argument should load resources based on a reference
|
|
850
|
+
* identifier. For the catalog, this is an
|
|
851
|
+
* [entity reference](https://backstage.io/docs/features/software-catalog/references#string-references).
|
|
852
|
+
* For other plugins, this can be any serialized format. This is used to add a
|
|
853
|
+
* permissions registry API via the HTTP router service. This API will be
|
|
854
|
+
* called by the `permission-backend` when authorization conditions relating
|
|
855
|
+
* to this plugin need to be evaluated.
|
|
856
|
+
*/
|
|
857
|
+
addResourceType<const TResourceType extends string, TResource>(options: PermissionsRegistryServiceAddResourceTypeOptions<TResourceType, TResource>): void;
|
|
858
|
+
}
|
|
859
|
+
|
|
761
860
|
/**
|
|
762
861
|
* Represents a user principal (for example when a user Backstage token issued
|
|
763
862
|
* by the auth backend was given to a request).
|
|
@@ -1597,6 +1696,16 @@ declare namespace coreServices {
|
|
|
1597
1696
|
* @public
|
|
1598
1697
|
*/
|
|
1599
1698
|
const permissions: ServiceRef<PermissionsService, "plugin", "singleton">;
|
|
1699
|
+
/**
|
|
1700
|
+
* Permission system integration for registering resources and permissions.
|
|
1701
|
+
*
|
|
1702
|
+
* See {@link PermissionsRegistryService}
|
|
1703
|
+
* and {@link https://backstage.io/docs/backend-system/core-services/permission-integrations | the service docs}
|
|
1704
|
+
* for more information.
|
|
1705
|
+
*
|
|
1706
|
+
* @public
|
|
1707
|
+
*/
|
|
1708
|
+
const permissionsRegistry: ServiceRef<PermissionsRegistryService, "plugin", "singleton">;
|
|
1600
1709
|
/**
|
|
1601
1710
|
* Built-in service for accessing metadata about the current plugin.
|
|
1602
1711
|
*
|
|
@@ -1845,4 +1954,4 @@ declare function createBackendFeatureLoader<TDeps extends {
|
|
|
1845
1954
|
[name in string]: unknown;
|
|
1846
1955
|
}>(options: CreateBackendFeatureLoaderOptions<TDeps>): BackendFeature;
|
|
1847
1956
|
|
|
1848
|
-
export { 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 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 };
|
|
1957
|
+
export { 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 };
|
|
@@ -22,6 +22,7 @@ exports.coreServices = void 0;
|
|
|
22
22
|
coreServices2.lifecycle = types.createServiceRef({ id: "core.lifecycle" });
|
|
23
23
|
coreServices2.logger = types.createServiceRef({ id: "core.logger" });
|
|
24
24
|
coreServices2.permissions = types.createServiceRef({ id: "core.permissions" });
|
|
25
|
+
coreServices2.permissionsRegistry = types.createServiceRef({ id: "core.permissionsRegistry" });
|
|
25
26
|
coreServices2.pluginMetadata = types.createServiceRef({ id: "core.pluginMetadata" });
|
|
26
27
|
coreServices2.rootHttpRouter = types.createServiceRef({ id: "core.rootHttpRouter", scope: "root" });
|
|
27
28
|
coreServices2.rootLifecycle = types.createServiceRef({ id: "core.rootLifecycle", scope: "root" });
|
|
@@ -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 * 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 * 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 * 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,WAAc,GAAAC,sBAAA,CAEzB,EAAE,EAAA,EAAI,oBAAoB,CAAA;AAWrB,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,
|
|
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 * 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,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,CAlPX,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": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20250117022919",
|
|
4
4
|
"description": "Core API used by Backstage backend plugins",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library"
|
|
@@ -66,19 +66,20 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@backstage/cli-common": "0.1.15",
|
|
69
|
-
"@backstage/config": "
|
|
70
|
-
"@backstage/errors": "
|
|
71
|
-
"@backstage/plugin-auth-node": "0.0.0-nightly-
|
|
72
|
-
"@backstage/plugin-permission-common": "0.
|
|
73
|
-
"@backstage/
|
|
69
|
+
"@backstage/config": "1.3.2",
|
|
70
|
+
"@backstage/errors": "1.2.7",
|
|
71
|
+
"@backstage/plugin-auth-node": "0.0.0-nightly-20250117022919",
|
|
72
|
+
"@backstage/plugin-permission-common": "0.8.4",
|
|
73
|
+
"@backstage/plugin-permission-node": "0.0.0-nightly-20250117022919",
|
|
74
|
+
"@backstage/types": "1.2.1",
|
|
74
75
|
"@types/express": "^4.17.6",
|
|
75
76
|
"@types/luxon": "^3.0.0",
|
|
76
77
|
"knex": "^3.0.0",
|
|
77
78
|
"luxon": "^3.0.0"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
|
-
"@backstage/backend-test-utils": "0.0.0-nightly-
|
|
81
|
-
"@backstage/cli": "0.0.0-nightly-
|
|
81
|
+
"@backstage/backend-test-utils": "0.0.0-nightly-20250117022919",
|
|
82
|
+
"@backstage/cli": "0.0.0-nightly-20250117022919"
|
|
82
83
|
},
|
|
83
84
|
"configSchema": "config.d.ts"
|
|
84
85
|
}
|