@backstage/backend-defaults 0.1.12 → 0.2.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 +23 -0
- package/dist/index.cjs.js +2 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @backstage/backend-defaults
|
|
2
2
|
|
|
3
|
+
## 0.2.0-next.1
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d008aefef808: **BREAKING**: Removing shared environments concept from the new experimental backend system.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 629cbd194a87: Use `coreServices.rootConfig` instead of `coreService.config`
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/backend-common@0.19.2-next.1
|
|
14
|
+
- @backstage/backend-app-api@0.5.0-next.1
|
|
15
|
+
- @backstage/backend-plugin-api@0.6.0-next.1
|
|
16
|
+
|
|
17
|
+
## 0.1.13-next.0
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
- @backstage/backend-app-api@0.4.6-next.0
|
|
23
|
+
- @backstage/backend-common@0.19.2-next.0
|
|
24
|
+
- @backstage/backend-plugin-api@0.5.5-next.0
|
|
25
|
+
|
|
3
26
|
## 0.1.12
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var backendAppApi = require('@backstage/backend-app-api');
|
|
|
7
7
|
|
|
8
8
|
const defaultServiceFactories = [
|
|
9
9
|
backendAppApi.cacheServiceFactory(),
|
|
10
|
-
backendAppApi.
|
|
10
|
+
backendAppApi.rootConfigServiceFactory(),
|
|
11
11
|
backendAppApi.databaseServiceFactory(),
|
|
12
12
|
backendAppApi.discoveryServiceFactory(),
|
|
13
13
|
backendAppApi.httpRouterServiceFactory(),
|
|
@@ -23,24 +23,12 @@ const defaultServiceFactories = [
|
|
|
23
23
|
backendAppApi.urlReaderServiceFactory()
|
|
24
24
|
];
|
|
25
25
|
function createBackend(options) {
|
|
26
|
-
var _a
|
|
26
|
+
var _a;
|
|
27
27
|
const services = new Array();
|
|
28
28
|
const providedServices = ((_a = options == null ? void 0 : options.services) != null ? _a : []).map(
|
|
29
29
|
(sf) => typeof sf === "function" ? sf() : sf
|
|
30
30
|
);
|
|
31
31
|
services.push(...providedServices);
|
|
32
|
-
if (options == null ? void 0 : options.env) {
|
|
33
|
-
const env = options.env;
|
|
34
|
-
if (env.version !== "v1") {
|
|
35
|
-
throw new Error(
|
|
36
|
-
`Shared environment version '${env.version}' is invalid or not supported`
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
const environmentServices = (_c = (_b = env.services) == null ? void 0 : _b.filter(
|
|
40
|
-
(sf) => !services.some(({ service }) => sf.service.id === service.id)
|
|
41
|
-
)) != null ? _c : [];
|
|
42
|
-
services.push(...environmentServices);
|
|
43
|
-
}
|
|
44
32
|
const defaultServices = defaultServiceFactories.filter(
|
|
45
33
|
(sf) => !services.some(({ service }) => service.id === sf.service.id)
|
|
46
34
|
);
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/CreateBackend.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 {\n Backend,\n cacheServiceFactory,\n
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/CreateBackend.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 {\n Backend,\n cacheServiceFactory,\n rootConfigServiceFactory,\n createSpecializedBackend,\n databaseServiceFactory,\n discoveryServiceFactory,\n httpRouterServiceFactory,\n rootHttpRouterServiceFactory,\n lifecycleServiceFactory,\n rootLifecycleServiceFactory,\n loggerServiceFactory,\n permissionsServiceFactory,\n rootLoggerServiceFactory,\n schedulerServiceFactory,\n tokenManagerServiceFactory,\n urlReaderServiceFactory,\n identityServiceFactory,\n} from '@backstage/backend-app-api';\nimport {\n ServiceFactory,\n ServiceFactoryOrFunction,\n} from '@backstage/backend-plugin-api';\n\nexport const defaultServiceFactories = [\n cacheServiceFactory(),\n rootConfigServiceFactory(),\n databaseServiceFactory(),\n discoveryServiceFactory(),\n httpRouterServiceFactory(),\n identityServiceFactory(),\n lifecycleServiceFactory(),\n loggerServiceFactory(),\n permissionsServiceFactory(),\n rootHttpRouterServiceFactory(),\n rootLifecycleServiceFactory(),\n rootLoggerServiceFactory(),\n schedulerServiceFactory(),\n tokenManagerServiceFactory(),\n urlReaderServiceFactory(),\n];\n\n/**\n * @public\n */\nexport interface CreateBackendOptions {\n services?: ServiceFactoryOrFunction[];\n}\n\n/**\n * @public\n */\nexport function createBackend(options?: CreateBackendOptions): Backend {\n const services = new Array<ServiceFactory>();\n\n // Highest priority: Services passed directly to createBackend\n const providedServices = (options?.services ?? []).map(sf =>\n typeof sf === 'function' ? sf() : sf,\n );\n services.push(...providedServices);\n\n // Lowest priority: Default services that are not already provided by environment or directly to createBackend\n const defaultServices = defaultServiceFactories.filter(\n sf => !services.some(({ service }) => service.id === sf.service.id),\n );\n services.push(...defaultServices);\n\n return createSpecializedBackend({ services });\n}\n"],"names":["cacheServiceFactory","rootConfigServiceFactory","databaseServiceFactory","discoveryServiceFactory","httpRouterServiceFactory","identityServiceFactory","lifecycleServiceFactory","loggerServiceFactory","permissionsServiceFactory","rootHttpRouterServiceFactory","rootLifecycleServiceFactory","rootLoggerServiceFactory","schedulerServiceFactory","tokenManagerServiceFactory","urlReaderServiceFactory","createSpecializedBackend"],"mappings":";;;;;;;AAwCO,MAAM,uBAA0B,GAAA;AAAA,EACrCA,iCAAoB,EAAA;AAAA,EACpBC,sCAAyB,EAAA;AAAA,EACzBC,oCAAuB,EAAA;AAAA,EACvBC,qCAAwB,EAAA;AAAA,EACxBC,sCAAyB,EAAA;AAAA,EACzBC,oCAAuB,EAAA;AAAA,EACvBC,qCAAwB,EAAA;AAAA,EACxBC,kCAAqB,EAAA;AAAA,EACrBC,uCAA0B,EAAA;AAAA,EAC1BC,0CAA6B,EAAA;AAAA,EAC7BC,yCAA4B,EAAA;AAAA,EAC5BC,sCAAyB,EAAA;AAAA,EACzBC,qCAAwB,EAAA;AAAA,EACxBC,wCAA2B,EAAA;AAAA,EAC3BC,qCAAwB,EAAA;AAC1B,CAAA,CAAA;AAYO,SAAS,cAAc,OAAyC,EAAA;AApEvE,EAAA,IAAA,EAAA,CAAA;AAqEE,EAAM,MAAA,QAAA,GAAW,IAAI,KAAsB,EAAA,CAAA;AAG3C,EAAA,MAAM,gBAAoB,GAAA,CAAA,CAAA,EAAA,GAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,CAAS,QAAT,KAAA,IAAA,GAAA,EAAA,GAAqB,EAAI,EAAA,GAAA;AAAA,IAAI,CACrD,EAAA,KAAA,OAAO,EAAO,KAAA,UAAA,GAAa,IAAO,GAAA,EAAA;AAAA,GACpC,CAAA;AACA,EAAS,QAAA,CAAA,IAAA,CAAK,GAAG,gBAAgB,CAAA,CAAA;AAGjC,EAAA,MAAM,kBAAkB,uBAAwB,CAAA,MAAA;AAAA,IAC9C,CAAM,EAAA,KAAA,CAAC,QAAS,CAAA,IAAA,CAAK,CAAC,EAAE,OAAQ,EAAA,KAAM,OAAQ,CAAA,EAAA,KAAO,EAAG,CAAA,OAAA,CAAQ,EAAE,CAAA;AAAA,GACpE,CAAA;AACA,EAAS,QAAA,CAAA,IAAA,CAAK,GAAG,eAAe,CAAA,CAAA;AAEhC,EAAO,OAAAC,sCAAA,CAAyB,EAAE,QAAA,EAAU,CAAA,CAAA;AAC9C;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ServiceFactoryOrFunction } from '@backstage/backend-plugin-api';
|
|
2
2
|
import { Backend } from '@backstage/backend-app-api';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
7
|
interface CreateBackendOptions {
|
|
8
|
-
env?: SharedBackendEnvironment;
|
|
9
8
|
services?: ServiceFactoryOrFunction[];
|
|
10
9
|
}
|
|
11
10
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/backend-defaults",
|
|
3
3
|
"description": "Backend defaults used by Backstage backend apps",
|
|
4
|
-
"version": "0.1
|
|
4
|
+
"version": "0.2.0-next.1",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"publishConfig": {
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"start": "backstage-cli package start"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@backstage/backend-app-api": "^0.
|
|
36
|
-
"@backstage/backend-common": "^0.19.1",
|
|
37
|
-
"@backstage/backend-plugin-api": "^0.
|
|
35
|
+
"@backstage/backend-app-api": "^0.5.0-next.1",
|
|
36
|
+
"@backstage/backend-common": "^0.19.2-next.1",
|
|
37
|
+
"@backstage/backend-plugin-api": "^0.6.0-next.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@backstage/backend-test-utils": "^0.1
|
|
41
|
-
"@backstage/cli": "^0.22.
|
|
40
|
+
"@backstage/backend-test-utils": "^0.2.0-next.1",
|
|
41
|
+
"@backstage/cli": "^0.22.10-next.1"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
44
44
|
"dist"
|