@axis-backstage/plugin-readme-backend 0.16.4 → 0.16.6
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 +13 -0
- package/config.schema.json +57 -0
- package/dist/lib.cjs.js +1 -7
- package/dist/lib.cjs.js.map +1 -1
- package/package.json +17 -13
- package/config.d.ts +0 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @axis-backstage/plugin-readme-backend
|
|
2
2
|
|
|
3
|
+
## 0.16.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 824ed5b: Remove inefficient regular expression when checking for symlinks.
|
|
8
|
+
- 6a30651: Updated to Backstage 1.54.6
|
|
9
|
+
|
|
10
|
+
## 0.16.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- b7492ab: Updated to Backstage 1.53.1
|
|
15
|
+
|
|
3
16
|
## 0.16.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"readme": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"fileNames": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"description": "Optional list of file names to try. Specifies the file names to try when looking for a README file and which order to use."
|
|
14
|
+
},
|
|
15
|
+
"cacheTtl": {
|
|
16
|
+
"anyOf": [
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"years": {
|
|
21
|
+
"type": "number"
|
|
22
|
+
},
|
|
23
|
+
"months": {
|
|
24
|
+
"type": "number"
|
|
25
|
+
},
|
|
26
|
+
"weeks": {
|
|
27
|
+
"type": "number"
|
|
28
|
+
},
|
|
29
|
+
"days": {
|
|
30
|
+
"type": "number"
|
|
31
|
+
},
|
|
32
|
+
"hours": {
|
|
33
|
+
"type": "number"
|
|
34
|
+
},
|
|
35
|
+
"minutes": {
|
|
36
|
+
"type": "number"
|
|
37
|
+
},
|
|
38
|
+
"seconds": {
|
|
39
|
+
"type": "number"
|
|
40
|
+
},
|
|
41
|
+
"milliseconds": {
|
|
42
|
+
"type": "number"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"description": "Human friendly durations object."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "string"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"description": "Optional cache TTL, defaults to 1 hour."
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"description": "Configuration options for the Readme backend plugin"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
package/dist/lib.cjs.js
CHANGED
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const DETECT_SYMLINKS_REGEX = "^(w+|.|/|-)+$";
|
|
4
3
|
const isSymLink = (content) => {
|
|
5
|
-
|
|
6
|
-
if (lines.length > 1) return false;
|
|
7
|
-
const line = lines[0];
|
|
8
|
-
if (line.includes(" ")) return false;
|
|
9
|
-
const regex = RegExp(DETECT_SYMLINKS_REGEX);
|
|
10
|
-
return regex.test(content);
|
|
4
|
+
return content.length > 0 && !content.includes(" ") && !content.includes("\n") && !content.includes("\r") && !content.includes("\u2028") && !content.includes("\u2029");
|
|
11
5
|
};
|
|
12
6
|
|
|
13
7
|
exports.isSymLink = isSymLink;
|
package/dist/lib.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.cjs.js","sources":["../src/lib.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"lib.cjs.js","sources":["../src/lib.ts"],"sourcesContent":["export const isSymLink = (content: string): boolean => {\n return (\n content.length > 0 &&\n !content.includes(' ') &&\n !content.includes('\\n') &&\n !content.includes('\\r') &&\n !content.includes('\\u2028') &&\n !content.includes('\\u2029')\n );\n};\n"],"names":[],"mappings":";;AAAO,MAAM,SAAA,GAAY,CAAC,OAAA,KAA6B;AACrD,EAAA,OACE,OAAA,CAAQ,MAAA,GAAS,CAAA,IACjB,CAAC,OAAA,CAAQ,QAAA,CAAS,GAAG,CAAA,IACrB,CAAC,OAAA,CAAQ,QAAA,CAAS,IAAI,CAAA,IACtB,CAAC,OAAA,CAAQ,QAAA,CAAS,IAAI,CAAA,IACtB,CAAC,OAAA,CAAQ,QAAA,CAAS,QAAQ,CAAA,IAC1B,CAAC,OAAA,CAAQ,QAAA,CAAS,QAAQ,CAAA;AAE9B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axis-backstage/plugin-readme-backend",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.6",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"directory": "_release/package"
|
|
12
12
|
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/AxisCommunications/backstage-plugins",
|
|
16
|
+
"directory": "plugins/readme-backend"
|
|
17
|
+
},
|
|
13
18
|
"backstage": {
|
|
14
19
|
"role": "backend-plugin",
|
|
15
20
|
"pluginId": "readme",
|
|
@@ -31,31 +36,30 @@
|
|
|
31
36
|
"postpack": "backstage-cli package postpack"
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
34
|
-
"@backstage/backend-plugin-api": "^1.
|
|
35
|
-
"@backstage/catalog-
|
|
36
|
-
"@backstage/catalog-model": "^1.9.0",
|
|
39
|
+
"@backstage/backend-plugin-api": "^1.10.0",
|
|
40
|
+
"@backstage/catalog-model": "^1.10.0",
|
|
37
41
|
"@backstage/config": "^1.3.8",
|
|
38
42
|
"@backstage/errors": "^1.3.1",
|
|
39
|
-
"@backstage/integration": "^2.
|
|
40
|
-
"@backstage/plugin-catalog-node": "^2.2.
|
|
43
|
+
"@backstage/integration": "^2.1.1",
|
|
44
|
+
"@backstage/plugin-catalog-node": "^2.2.4",
|
|
41
45
|
"@backstage/types": "^1.2.2",
|
|
42
46
|
"@types/express": "*",
|
|
43
47
|
"express": "^4.17.1",
|
|
44
48
|
"express-promise-router": "^4.1.0"
|
|
45
49
|
},
|
|
46
50
|
"devDependencies": {
|
|
47
|
-
"@backstage/backend-defaults": "^0.17.
|
|
48
|
-
"@backstage/backend-test-utils": "^1.11.
|
|
49
|
-
"@backstage/cli": "^0.36.
|
|
50
|
-
"@types/supertest": "^
|
|
51
|
+
"@backstage/backend-defaults": "^0.17.8",
|
|
52
|
+
"@backstage/backend-test-utils": "^1.11.6",
|
|
53
|
+
"@backstage/cli": "^0.36.5",
|
|
54
|
+
"@types/supertest": "^7.0.0",
|
|
51
55
|
"msw": "^2.7.3",
|
|
52
|
-
"supertest": "^
|
|
56
|
+
"supertest": "^7.0.0"
|
|
53
57
|
},
|
|
54
58
|
"files": [
|
|
55
59
|
"dist",
|
|
56
|
-
"config.
|
|
60
|
+
"config.schema.json"
|
|
57
61
|
],
|
|
58
|
-
"configSchema": "config.
|
|
62
|
+
"configSchema": "config.schema.json",
|
|
59
63
|
"typesVersions": {
|
|
60
64
|
"*": {
|
|
61
65
|
"package.json": [
|
package/config.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
}
|