@backstage/backend-plugin-api 1.0.3-next.0 → 1.1.0-next.1
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 +16 -0
- package/dist/alpha.cjs.js +4 -0
- package/dist/alpha.cjs.js.map +1 -1
- package/dist/alpha.d.ts +21 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @backstage/backend-plugin-api
|
|
2
2
|
|
|
3
|
+
## 1.1.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 12eac85: **EXPERIMENTAL**: Adds a new `instanceMetadataService` to hold information about a specific backend instance.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @backstage/plugin-auth-node@0.5.5-next.1
|
|
13
|
+
- @backstage/cli-common@0.1.15
|
|
14
|
+
- @backstage/config@1.3.0
|
|
15
|
+
- @backstage/errors@1.2.5
|
|
16
|
+
- @backstage/types@1.2.0
|
|
17
|
+
- @backstage/plugin-permission-common@0.8.2
|
|
18
|
+
|
|
3
19
|
## 1.0.3-next.0
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/alpha.cjs.js
CHANGED
|
@@ -6,6 +6,10 @@ const featureDiscoveryServiceRef = backendPluginApi.createServiceRef({
|
|
|
6
6
|
id: "core.featureDiscovery",
|
|
7
7
|
scope: "root"
|
|
8
8
|
});
|
|
9
|
+
const instanceMetadataServiceRef = backendPluginApi.createServiceRef({
|
|
10
|
+
id: "core.instanceMetadata"
|
|
11
|
+
});
|
|
9
12
|
|
|
10
13
|
exports.featureDiscoveryServiceRef = featureDiscoveryServiceRef;
|
|
14
|
+
exports.instanceMetadataServiceRef = instanceMetadataServiceRef;
|
|
11
15
|
//# sourceMappingURL=alpha.cjs.js.map
|
package/dist/alpha.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2023 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 {\n BackendFeature,\n createServiceRef,\n} from '@backstage/backend-plugin-api';\n\n/** @alpha */\nexport interface FeatureDiscoveryService {\n getBackendFeatures(): Promise<{ features: Array<BackendFeature> }>;\n}\n\n/**\n * An optional service that can be used to dynamically load in additional BackendFeatures at runtime.\n * @alpha\n * @deprecated The `featureDiscoveryServiceRef` is deprecated in favor of using {@link @backstage/backend-defaults#discoveryFeatureLoader} instead.\n */\nexport const featureDiscoveryServiceRef =\n createServiceRef<FeatureDiscoveryService>({\n id: 'core.featureDiscovery',\n scope: 'root',\n });\n"],"names":["createServiceRef"],"mappings":";;;;AA+BO,MAAM,6BACXA,iCAA0C,CAAA;AAAA,EACxC,EAAI,EAAA,uBAAA;AAAA,EACJ,KAAO,EAAA;AACT,CAAC
|
|
1
|
+
{"version":3,"file":"alpha.cjs.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2023 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 {\n BackendFeature,\n createServiceRef,\n} from '@backstage/backend-plugin-api';\n\n/** @alpha */\nexport interface FeatureDiscoveryService {\n getBackendFeatures(): Promise<{ features: Array<BackendFeature> }>;\n}\n\n/**\n * An optional service that can be used to dynamically load in additional BackendFeatures at runtime.\n * @alpha\n * @deprecated The `featureDiscoveryServiceRef` is deprecated in favor of using {@link @backstage/backend-defaults#discoveryFeatureLoader} instead.\n */\nexport const featureDiscoveryServiceRef =\n createServiceRef<FeatureDiscoveryService>({\n id: 'core.featureDiscovery',\n scope: 'root',\n });\n\n/**\n * EXPERIMENTAL: Instance metadata service.\n *\n * @alpha\n */\nexport const instanceMetadataServiceRef = createServiceRef<\n import('./services/definitions/InstanceMetadataService').InstanceMetadataService\n>({\n id: 'core.instanceMetadata',\n});\n\nexport type {\n BackendFeatureMeta,\n InstanceMetadataService,\n} from './services/definitions/InstanceMetadataService';\n"],"names":["createServiceRef"],"mappings":";;;;AA+BO,MAAM,6BACXA,iCAA0C,CAAA;AAAA,EACxC,EAAI,EAAA,uBAAA;AAAA,EACJ,KAAO,EAAA;AACT,CAAC;AAOI,MAAM,6BAA6BA,iCAExC,CAAA;AAAA,EACA,EAAI,EAAA;AACN,CAAC;;;;;"}
|
package/dist/alpha.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import * as _backstage_backend_plugin_api from '@backstage/backend-plugin-api';
|
|
2
2
|
import { BackendFeature } from '@backstage/backend-plugin-api';
|
|
3
3
|
|
|
4
|
+
/** @alpha */
|
|
5
|
+
type BackendFeatureMeta = {
|
|
6
|
+
type: 'plugin';
|
|
7
|
+
pluginId: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'module';
|
|
10
|
+
pluginId: string;
|
|
11
|
+
moduleId: string;
|
|
12
|
+
};
|
|
13
|
+
/** @alpha */
|
|
14
|
+
interface InstanceMetadataService {
|
|
15
|
+
getInstalledFeatures: () => BackendFeatureMeta[];
|
|
16
|
+
}
|
|
17
|
+
|
|
4
18
|
/** @alpha */
|
|
5
19
|
interface FeatureDiscoveryService {
|
|
6
20
|
getBackendFeatures(): Promise<{
|
|
@@ -13,5 +27,11 @@ interface FeatureDiscoveryService {
|
|
|
13
27
|
* @deprecated The `featureDiscoveryServiceRef` is deprecated in favor of using {@link @backstage/backend-defaults#discoveryFeatureLoader} instead.
|
|
14
28
|
*/
|
|
15
29
|
declare const featureDiscoveryServiceRef: _backstage_backend_plugin_api.ServiceRef<FeatureDiscoveryService, "root", "singleton">;
|
|
30
|
+
/**
|
|
31
|
+
* EXPERIMENTAL: Instance metadata service.
|
|
32
|
+
*
|
|
33
|
+
* @alpha
|
|
34
|
+
*/
|
|
35
|
+
declare const instanceMetadataServiceRef: _backstage_backend_plugin_api.ServiceRef<InstanceMetadataService, "plugin", "singleton">;
|
|
16
36
|
|
|
17
|
-
export { type FeatureDiscoveryService, featureDiscoveryServiceRef };
|
|
37
|
+
export { type BackendFeatureMeta, type FeatureDiscoveryService, type InstanceMetadataService, featureDiscoveryServiceRef, instanceMetadataServiceRef };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-plugin-api",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0-next.1",
|
|
4
4
|
"description": "Core API used by Backstage backend plugins",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "node-library"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@backstage/cli-common": "0.1.15",
|
|
69
69
|
"@backstage/config": "1.3.0",
|
|
70
70
|
"@backstage/errors": "1.2.5",
|
|
71
|
-
"@backstage/plugin-auth-node": "0.5.5-next.
|
|
71
|
+
"@backstage/plugin-auth-node": "0.5.5-next.1",
|
|
72
72
|
"@backstage/plugin-permission-common": "0.8.2",
|
|
73
73
|
"@backstage/types": "1.2.0",
|
|
74
74
|
"@types/express": "^4.17.6",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"luxon": "^3.0.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@backstage/backend-test-utils": "1.2.0-next.
|
|
81
|
-
"@backstage/cli": "0.29.3-next.
|
|
80
|
+
"@backstage/backend-test-utils": "1.2.0-next.1",
|
|
81
|
+
"@backstage/cli": "0.29.3-next.1"
|
|
82
82
|
},
|
|
83
83
|
"configSchema": "config.d.ts"
|
|
84
84
|
}
|