@axis-backstage/plugin-readme-backend 0.12.0 → 0.13.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 +21 -0
- package/README.md +28 -0
- package/config.d.ts +18 -0
- package/dist/service/config.cjs.js +12 -0
- package/dist/service/config.cjs.js.map +1 -0
- package/dist/service/constants.cjs.js +16 -5
- package/dist/service/constants.cjs.js.map +1 -1
- package/dist/service/router.cjs.js +26 -15
- package/dist/service/router.cjs.js.map +1 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @axis-backstage/plugin-readme-backend
|
|
2
2
|
|
|
3
|
+
## 0.13.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 733b2db: Added config to set the cache ttl.
|
|
8
|
+
|
|
9
|
+
## 0.13.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 84e60e6: A configuration has been added to the readme backend that makes it possible to
|
|
14
|
+
configure which files to look for and the exact order. Example:
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
readme:
|
|
18
|
+
-fileNames:
|
|
19
|
+
- README.txt
|
|
20
|
+
- README.text
|
|
21
|
+
- README.markdown
|
|
22
|
+
```
|
|
23
|
+
|
|
3
24
|
## 0.12.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -32,6 +32,34 @@ const backend = createBackend();
|
|
|
32
32
|
backend.start();
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
+
### Configuration
|
|
36
|
+
|
|
37
|
+
This plugin does not require any configuration. It has a default configuration
|
|
38
|
+
with a set of README file names that it will look for in the entity source location. This actual file to use and the order to look for them can be
|
|
39
|
+
configured in the `app-config.yaml` file using the "readme.fileNames" configuration key. This is a simple list of file names to look for in the entity source location.
|
|
40
|
+
|
|
41
|
+
```yaml
|
|
42
|
+
readme:
|
|
43
|
+
-fileNames:
|
|
44
|
+
- README.txt
|
|
45
|
+
- README.text
|
|
46
|
+
- README.markdown
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
To override the default TTL of the internal cache a duration can be set using the `cacheTtl` key. This can be either a string
|
|
50
|
+
or an object. The following examples should be equal.
|
|
51
|
+
|
|
52
|
+
```yaml
|
|
53
|
+
readme:
|
|
54
|
+
cacheTtl:
|
|
55
|
+
hours: 2
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
readme:
|
|
60
|
+
cacheTtl: '2h'
|
|
61
|
+
```
|
|
62
|
+
|
|
35
63
|
### Troubleshooting
|
|
36
64
|
|
|
37
65
|
If the backend fails to provide README content for an entity, it could be due to several reasons.
|
package/config.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HumanDuration } from '@backstage/types';
|
|
2
|
+
|
|
3
|
+
export interface Config {
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for the Readme backend plugin
|
|
6
|
+
*/
|
|
7
|
+
readme?: {
|
|
8
|
+
/**
|
|
9
|
+
* Optional list of file names to try. Specifies the file names to try
|
|
10
|
+
* when looking for a README file and which order to use.
|
|
11
|
+
*/
|
|
12
|
+
fileNames?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Optional cache TTL, defaults to 1 hour.
|
|
15
|
+
*/
|
|
16
|
+
cacheTtl?: HumanDuration | string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var config = require('@backstage/config');
|
|
4
|
+
var types = require('@backstage/types');
|
|
5
|
+
|
|
6
|
+
const CACHE_CONFIG_KEY = "readme.cacheTtl";
|
|
7
|
+
const getCacheTtl = (config$1) => config$1.has(CACHE_CONFIG_KEY) ? types.durationToMilliseconds(
|
|
8
|
+
config.readDurationFromConfig(config$1, { key: CACHE_CONFIG_KEY })
|
|
9
|
+
) : 36e5;
|
|
10
|
+
|
|
11
|
+
exports.getCacheTtl = getCacheTtl;
|
|
12
|
+
//# sourceMappingURL=config.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.cjs.js","sources":["../../src/service/config.ts"],"sourcesContent":["import { Config, readDurationFromConfig } from '@backstage/config';\nimport { durationToMilliseconds } from '@backstage/types';\n\nconst CACHE_CONFIG_KEY = 'readme.cacheTtl';\n\nexport const getCacheTtl = (config: Config): number =>\n config.has(CACHE_CONFIG_KEY)\n ? durationToMilliseconds(\n readDurationFromConfig(config, { key: CACHE_CONFIG_KEY }),\n )\n : 3_600_000;\n"],"names":["config","durationToMilliseconds","readDurationFromConfig"],"mappings":";;;;;AAGA,MAAM,gBAAmB,GAAA,iBAAA;AAElB,MAAM,cAAc,CAACA,QAAA,KAC1BA,QAAO,CAAA,GAAA,CAAI,gBAAgB,CACvB,GAAAC,4BAAA;AAAA,EACEC,6BAAuB,CAAAF,QAAA,EAAQ,EAAE,GAAA,EAAK,kBAAkB;AAC1D,CACA,GAAA;;;;"}
|
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const CONFIG_PATH = "readme.fileNames";
|
|
3
4
|
const NOT_FOUND_PLACEHOLDER = "NOT_FOUND";
|
|
4
|
-
const
|
|
5
|
-
{ name: "README", type: "text/plain" },
|
|
5
|
+
const DEFAULT_README_TYPES = [
|
|
6
6
|
{ name: "README.md", type: "text/markdown" },
|
|
7
|
+
{ name: "README.MD", type: "text/markdown" },
|
|
8
|
+
{ name: "README", type: "text/plain" },
|
|
7
9
|
{ name: "README.rst", type: "text/plain" },
|
|
8
|
-
{ name: "README.txt", type: "text/plain" }
|
|
9
|
-
{ name: "README.MD", type: "text/markdown" }
|
|
10
|
+
{ name: "README.txt", type: "text/plain" }
|
|
10
11
|
];
|
|
12
|
+
function getReadmeTypes(config) {
|
|
13
|
+
const readmeTypes = config.getOptionalStringArray(CONFIG_PATH);
|
|
14
|
+
if (!readmeTypes) {
|
|
15
|
+
return DEFAULT_README_TYPES;
|
|
16
|
+
}
|
|
17
|
+
return readmeTypes.map((name) => {
|
|
18
|
+
const type = name.endsWith(".md") || name.endsWith(".MD") ? "text/markdown" : "text/plain";
|
|
19
|
+
return { name, type };
|
|
20
|
+
});
|
|
21
|
+
}
|
|
11
22
|
|
|
12
23
|
exports.NOT_FOUND_PLACEHOLDER = NOT_FOUND_PLACEHOLDER;
|
|
13
|
-
exports.
|
|
24
|
+
exports.getReadmeTypes = getReadmeTypes;
|
|
14
25
|
//# sourceMappingURL=constants.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs.js","sources":["../../src/service/constants.ts"],"sourcesContent":["import { FileType } from './types';\n\n// Cache placeholder for entities where no readme\nexport const NOT_FOUND_PLACEHOLDER = 'NOT_FOUND';\n\
|
|
1
|
+
{"version":3,"file":"constants.cjs.js","sources":["../../src/service/constants.ts"],"sourcesContent":["import { RootConfigService } from '@backstage/backend-plugin-api';\nimport { FileType } from './types';\n\nconst CONFIG_PATH = 'readme.fileNames';\n\n// Cache placeholder for entities where no readme\nexport const NOT_FOUND_PLACEHOLDER = 'NOT_FOUND';\n\nconst DEFAULT_README_TYPES: FileType[] = [\n { name: 'README.md', type: 'text/markdown' },\n { name: 'README.MD', type: 'text/markdown' },\n { name: 'README', type: 'text/plain' },\n { name: 'README.rst', type: 'text/plain' },\n { name: 'README.txt', type: 'text/plain' },\n];\n\nexport function getReadmeTypes(config: RootConfigService): FileType[] {\n const readmeTypes = config.getOptionalStringArray(CONFIG_PATH);\n if (!readmeTypes) {\n return DEFAULT_README_TYPES;\n }\n return readmeTypes.map(name => {\n const type =\n name.endsWith('.md') || name.endsWith('.MD')\n ? 'text/markdown'\n : 'text/plain';\n return { name, type };\n });\n}\n"],"names":[],"mappings":";;AAGA,MAAM,WAAc,GAAA,kBAAA;AAGb,MAAM,qBAAwB,GAAA;AAErC,MAAM,oBAAmC,GAAA;AAAA,EACvC,EAAE,IAAA,EAAM,WAAa,EAAA,IAAA,EAAM,eAAgB,EAAA;AAAA,EAC3C,EAAE,IAAA,EAAM,WAAa,EAAA,IAAA,EAAM,eAAgB,EAAA;AAAA,EAC3C,EAAE,IAAA,EAAM,QAAU,EAAA,IAAA,EAAM,YAAa,EAAA;AAAA,EACrC,EAAE,IAAA,EAAM,YAAc,EAAA,IAAA,EAAM,YAAa,EAAA;AAAA,EACzC,EAAE,IAAA,EAAM,YAAc,EAAA,IAAA,EAAM,YAAa;AAC3C,CAAA;AAEO,SAAS,eAAe,MAAuC,EAAA;AACpE,EAAM,MAAA,WAAA,GAAc,MAAO,CAAA,sBAAA,CAAuB,WAAW,CAAA;AAC7D,EAAA,IAAI,CAAC,WAAa,EAAA;AAChB,IAAO,OAAA,oBAAA;AAAA;AAET,EAAO,OAAA,WAAA,CAAY,IAAI,CAAQ,IAAA,KAAA;AAC7B,IAAM,MAAA,IAAA,GACJ,KAAK,QAAS,CAAA,KAAK,KAAK,IAAK,CAAA,QAAA,CAAS,KAAK,CAAA,GACvC,eACA,GAAA,YAAA;AACN,IAAO,OAAA,EAAE,MAAM,IAAK,EAAA;AAAA,GACrB,CAAA;AACH;;;;;"}
|
|
@@ -8,6 +8,7 @@ var errors = require('@backstage/errors');
|
|
|
8
8
|
var express = require('express');
|
|
9
9
|
var Router = require('express-promise-router');
|
|
10
10
|
var lib = require('../lib.cjs.js');
|
|
11
|
+
var config = require('./config.cjs.js');
|
|
11
12
|
var constants = require('./constants.cjs.js');
|
|
12
13
|
|
|
13
14
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -16,10 +17,11 @@ var express__default = /*#__PURE__*/_interopDefaultCompat(express);
|
|
|
16
17
|
var Router__default = /*#__PURE__*/_interopDefaultCompat(Router);
|
|
17
18
|
|
|
18
19
|
async function createRouter(options) {
|
|
19
|
-
const { auth, logger, config, reader, discovery, cache } = options;
|
|
20
|
+
const { auth, logger, config: config$1, reader, discovery, cache } = options;
|
|
20
21
|
const catalogClient$1 = new catalogClient.CatalogClient({ discoveryApi: discovery });
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const cacheTtl = config.getCacheTtl(config$1);
|
|
23
|
+
logger.info(`Initializing readme backend. Cache TTL: ${cacheTtl}ms`);
|
|
24
|
+
const integrations = integration.ScmIntegrations.fromConfig(config$1);
|
|
23
25
|
const router = Router__default.default();
|
|
24
26
|
router.use(express__default.default.json());
|
|
25
27
|
router.get("/health", (_, response) => {
|
|
@@ -60,7 +62,8 @@ async function createRouter(options) {
|
|
|
60
62
|
response.status(500).json({ error: `No integration found for ${source.target}` });
|
|
61
63
|
return;
|
|
62
64
|
}
|
|
63
|
-
|
|
65
|
+
const readmeTypes = constants.getReadmeTypes(config$1);
|
|
66
|
+
for (const fileType of readmeTypes) {
|
|
64
67
|
const url = integration.resolveUrl({
|
|
65
68
|
url: fileType.name,
|
|
66
69
|
base: source.target
|
|
@@ -79,11 +82,15 @@ async function createRouter(options) {
|
|
|
79
82
|
const symLinkUrlResponse = await reader.readUrl(symLinkUrl);
|
|
80
83
|
content = (await symLinkUrlResponse.buffer()).toString("utf-8");
|
|
81
84
|
}
|
|
82
|
-
cache.set(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
cache.set(
|
|
86
|
+
entityRef,
|
|
87
|
+
{
|
|
88
|
+
name: fileType.name,
|
|
89
|
+
type: fileType.type,
|
|
90
|
+
content
|
|
91
|
+
},
|
|
92
|
+
{ ttl: cacheTtl }
|
|
93
|
+
);
|
|
87
94
|
logger.info(
|
|
88
95
|
`Found README for ${entityRef}: ${url} type ${fileType.type}`
|
|
89
96
|
);
|
|
@@ -101,14 +108,18 @@ async function createRouter(options) {
|
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
110
|
logger.info(`Readme not found for ${entityRef}`);
|
|
104
|
-
cache.set(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
cache.set(
|
|
112
|
+
entityRef,
|
|
113
|
+
{
|
|
114
|
+
name: constants.NOT_FOUND_PLACEHOLDER,
|
|
115
|
+
type: "",
|
|
116
|
+
content: ""
|
|
117
|
+
},
|
|
118
|
+
{ ttl: cacheTtl }
|
|
119
|
+
);
|
|
109
120
|
throw new errors.NotFoundError("Readme could not be found");
|
|
110
121
|
});
|
|
111
|
-
const middleware = rootHttpRouter.MiddlewareFactory.create({ logger, config });
|
|
122
|
+
const middleware = rootHttpRouter.MiddlewareFactory.create({ logger, config: config$1 });
|
|
112
123
|
router.use(middleware.error());
|
|
113
124
|
return router;
|
|
114
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.cjs.js","sources":["../../src/service/router.ts"],"sourcesContent":["import { MiddlewareFactory } from '@backstage/backend-defaults/rootHttpRouter';\nimport {\n AuthService,\n CacheService,\n DiscoveryService,\n LoggerService,\n RootConfigService,\n UrlReaderService,\n} from '@backstage/backend-plugin-api';\nimport { ScmIntegrations } from '@backstage/integration';\nimport {\n getEntitySourceLocation,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { CatalogClient } from '@backstage/catalog-client';\nimport { isError, NotFoundError } from '@backstage/errors';\nimport express from 'express';\nimport Router from 'express-promise-router';\nimport { isSymLink } from '../lib';\nimport { NOT_FOUND_PLACEHOLDER,
|
|
1
|
+
{"version":3,"file":"router.cjs.js","sources":["../../src/service/router.ts"],"sourcesContent":["import { MiddlewareFactory } from '@backstage/backend-defaults/rootHttpRouter';\nimport {\n AuthService,\n CacheService,\n DiscoveryService,\n LoggerService,\n RootConfigService,\n UrlReaderService,\n} from '@backstage/backend-plugin-api';\nimport { ScmIntegrations } from '@backstage/integration';\nimport {\n getEntitySourceLocation,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { CatalogClient } from '@backstage/catalog-client';\nimport { isError, NotFoundError } from '@backstage/errors';\nimport express from 'express';\nimport Router from 'express-promise-router';\nimport { isSymLink } from '../lib';\nimport { getCacheTtl } from './config';\nimport { NOT_FOUND_PLACEHOLDER, getReadmeTypes } from './constants';\nimport { ReadmeFile } from './types';\n\n/**\n * Constructs a readme router.\n *\n */\ninterface RouterOptions {\n auth: AuthService;\n config: RootConfigService;\n discovery: DiscoveryService;\n logger: LoggerService;\n reader: UrlReaderService;\n cache: CacheService;\n}\n\n/**\n * Constructs a readme router.\n *\n */\nexport async function createRouter(\n options: RouterOptions,\n): Promise<express.Router> {\n const { auth, logger, config, reader, discovery, cache } = options;\n const catalogClient = new CatalogClient({ discoveryApi: discovery });\n const cacheTtl = getCacheTtl(config);\n\n logger.info(`Initializing readme backend. Cache TTL: ${cacheTtl}ms`);\n const integrations = ScmIntegrations.fromConfig(config);\n const router = Router();\n router.use(express.json());\n\n router.get('/health', (_, response) => {\n response.json({ status: 'ok' });\n });\n\n router.get('/:kind/:namespace/:name', async (request, response) => {\n const { kind, namespace, name } = request.params;\n const entityRef = stringifyEntityRef({ kind, namespace, name });\n const cacheDoc = (await cache.get(entityRef)) as ReadmeFile | undefined;\n\n if (cacheDoc && cacheDoc.name === NOT_FOUND_PLACEHOLDER) {\n throw new NotFoundError('Readme could not be found');\n }\n if (cacheDoc) {\n logger.info(`Loading README for ${entityRef} from cache.`);\n response.type(cacheDoc.type);\n response.send(cacheDoc.content);\n return;\n }\n const { token } = await auth.getPluginRequestToken({\n onBehalfOf: await auth.getOwnServiceCredentials(),\n targetPluginId: 'catalog',\n });\n const entity = await catalogClient.getEntityByRef(entityRef, { token });\n if (!entity) {\n logger.info(`No integration found for ${entityRef}`);\n response\n .status(500)\n .json({ error: `No integration found for ${entityRef}` });\n return;\n }\n const source = getEntitySourceLocation(entity);\n\n if (!source || source.type !== 'url') {\n const errorMessage = `Not valid location for ${source.target}`;\n logger.info(errorMessage);\n throw new NotFoundError(errorMessage);\n }\n const integration = integrations.byUrl(source.target);\n\n if (!integration) {\n logger.info(`No integration found for ${source.target}`);\n response\n .status(500)\n .json({ error: `No integration found for ${source.target}` });\n return;\n }\n\n const readmeTypes = getReadmeTypes(config);\n\n for (const fileType of readmeTypes) {\n const url = integration.resolveUrl({\n url: fileType.name,\n base: source.target,\n });\n\n let content;\n\n try {\n logger.debug(`Trying README location: ${url} for ${entityRef} `);\n response.type(fileType.type);\n\n const urlResponse = await reader.readUrl(url);\n content = (await urlResponse.buffer()).toString('utf-8');\n\n if (isSymLink(content)) {\n const symLinkUrl = integration.resolveUrl({\n url: content,\n base: source.target,\n });\n const symLinkUrlResponse = await reader.readUrl(symLinkUrl);\n content = (await symLinkUrlResponse.buffer()).toString('utf-8');\n }\n\n cache.set(\n entityRef,\n {\n name: fileType.name,\n type: fileType.type,\n content: content,\n },\n { ttl: cacheTtl },\n );\n logger.info(\n `Found README for ${entityRef}: ${url} type ${fileType.type}`,\n );\n response.send(content);\n return;\n } catch (error: unknown) {\n if (isError(error) && error.name === 'NotFoundError') {\n continue;\n } else {\n response.status(500).json({\n error: `Readme failure: ${error}`,\n });\n return;\n }\n }\n }\n logger.info(`Readme not found for ${entityRef}`);\n cache.set(\n entityRef,\n {\n name: NOT_FOUND_PLACEHOLDER,\n type: '',\n content: '',\n },\n { ttl: cacheTtl },\n );\n throw new NotFoundError('Readme could not be found');\n });\n\n const middleware = MiddlewareFactory.create({ logger, config });\n router.use(middleware.error());\n return router;\n}\n"],"names":["config","catalogClient","CatalogClient","getCacheTtl","ScmIntegrations","Router","express","stringifyEntityRef","NOT_FOUND_PLACEHOLDER","NotFoundError","getEntitySourceLocation","getReadmeTypes","isSymLink","isError","MiddlewareFactory"],"mappings":";;;;;;;;;;;;;;;;;;AAwCA,eAAsB,aACpB,OACyB,EAAA;AACzB,EAAA,MAAM,EAAE,IAAM,EAAA,MAAA,UAAQA,UAAQ,MAAQ,EAAA,SAAA,EAAW,OAAU,GAAA,OAAA;AAC3D,EAAA,MAAMC,kBAAgB,IAAIC,2BAAA,CAA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AAAA,eACO,KAAgB,EAAA;AACvB,QAAA,IAAIC,cAAQ,CAAA,KAAK,CAAK,IAAA,KAAA,CAAM,SAAS,eAAiB,EAAA;AACpD,UAAA;AAAA,SACK,MAAA;AACL,UAAS,QAAA,CAAA,MAAA,CAAO,GAAG,CAAA,CAAE,IAAK,CAAA;AAAA,YACxB,KAAA,EAAO,mBAAmB,KAAK,CAAA;AAAA,WAChC,CAAA;AACD,UAAA;AAAA;AACF;AACF;AAEF,IAAO,MAAA,CAAA,IAAA,CAAK,CAAwB,qBAAA,EAAA,SAAS,CAAE,CAAA,CAAA;AAC/C,IAAM,KAAA,CAAA,GAAA;AAAA,MACJ,SAAA;AAAA,MACA;AAAA,QACE,IAAM,EAAAL,+BAAA;AAAA,QACN,IAAM,EAAA,EAAA;AAAA,QACN,OAAS,EAAA;AAAA,OACX;AAAA,MACA,EAAE,KAAK,QAAS;AAAA,KAClB;AACA,IAAM,MAAA,IAAIC,qBAAc,2BAA2B,CAAA;AAAA,GACpD,CAAA;AAED,EAAA,MAAM,aAAaK,gCAAkB,CAAA,MAAA,CAAO,EAAE,MAAA,UAAQd,UAAQ,CAAA;AAC9D,EAAO,MAAA,CAAA,GAAA,CAAI,UAAW,CAAA,KAAA,EAAO,CAAA;AAC7B,EAAO,OAAA,MAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axis-backstage/plugin-readme-backend",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
"@backstage/backend-plugin-api": "^1.2.0",
|
|
36
36
|
"@backstage/catalog-client": "^1.9.1",
|
|
37
37
|
"@backstage/catalog-model": "^1.7.3",
|
|
38
|
+
"@backstage/config": "^1.3.2",
|
|
38
39
|
"@backstage/errors": "^1.2.7",
|
|
39
40
|
"@backstage/integration": "^1.16.1",
|
|
41
|
+
"@backstage/types": "^1.2.1",
|
|
40
42
|
"@types/express": "*",
|
|
41
43
|
"express": "^4.17.1",
|
|
42
44
|
"express-promise-router": "^4.1.0"
|
|
@@ -45,12 +47,14 @@
|
|
|
45
47
|
"@backstage/backend-test-utils": "^1.3.0",
|
|
46
48
|
"@backstage/cli": "^0.30.0",
|
|
47
49
|
"@types/supertest": "^2.0.12",
|
|
48
|
-
"msw": "^
|
|
50
|
+
"msw": "^2.7.3",
|
|
49
51
|
"supertest": "^6.2.4"
|
|
50
52
|
},
|
|
51
53
|
"files": [
|
|
52
|
-
"dist"
|
|
54
|
+
"dist",
|
|
55
|
+
"config.d.ts"
|
|
53
56
|
],
|
|
57
|
+
"configSchema": "config.d.ts",
|
|
54
58
|
"typesVersions": {
|
|
55
59
|
"*": {
|
|
56
60
|
"index": [
|