@backstage/create-app 0.4.27-next.1 → 0.4.27-next.2
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 +93 -0
- package/dist/index.cjs.js +41 -41
- package/package.json +3 -3
- package/templates/default-app/.dockerignore +2 -2
- package/templates/default-app/app-config.yaml.hbs +21 -29
- package/templates/default-app/examples/entities.yaml +41 -0
- package/templates/default-app/examples/org.yaml +17 -0
- package/templates/default-app/examples/template/content/catalog-info.yaml +8 -0
- package/templates/default-app/examples/template/content/index.js +1 -0
- package/templates/default-app/examples/template/content/package.json +5 -0
- package/templates/default-app/examples/template/template.yaml +74 -0
- package/templates/default-app/packages/app/src/components/search/SearchPage.tsx +4 -1
- package/templates/default-app/packages/backend/package.json.hbs +0 -1
- package/templates/default-app/packages/backend/src/plugins/search.ts.hbs +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,98 @@
|
|
|
1
1
|
# @backstage/create-app
|
|
2
2
|
|
|
3
|
+
## 0.4.27-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 73480846dd: Simplified the search collator scheduling by removing the need for the `luxon` dependency.
|
|
8
|
+
|
|
9
|
+
For existing installations the scheduling can be simplified by removing the `luxon` dependency and using the human friendly duration object instead.
|
|
10
|
+
Please note that this only applies if luxon is not used elsewhere in your installation.
|
|
11
|
+
|
|
12
|
+
`packages/backend/package.json`
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
"express": "^4.17.1",
|
|
16
|
+
"express-promise-router": "^4.1.0",
|
|
17
|
+
- "luxon": "^2.0.2",
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`packages/backend/src/plugins/search.ts`
|
|
21
|
+
|
|
22
|
+
```diff
|
|
23
|
+
import { Router } from 'express';
|
|
24
|
+
-import { Duration } from 'luxon';
|
|
25
|
+
|
|
26
|
+
// omitted other code
|
|
27
|
+
|
|
28
|
+
const schedule = env.scheduler.createScheduledTaskRunner({
|
|
29
|
+
- frequency: Duration.fromObject({ minutes: 10 }),
|
|
30
|
+
- timeout: Duration.fromObject({ minutes: 15 }),
|
|
31
|
+
+ frequency: { minutes: 10 },
|
|
32
|
+
+ timeout: { minutes: 15 },
|
|
33
|
+
// A 3 second delay gives the backend server a chance to initialize before
|
|
34
|
+
// any collators are executed, which may attempt requests against the API.
|
|
35
|
+
- initialDelay: Duration.fromObject({ seconds: 3 }),
|
|
36
|
+
+ initialDelay: { seconds: 3 },
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- 7cda923c16: Tweaked the `.dockerignore` file so that it's easier to add additional backend packages if desired.
|
|
41
|
+
|
|
42
|
+
To apply this change to an existing app, make the following change to `.dockerignore`:
|
|
43
|
+
|
|
44
|
+
```diff
|
|
45
|
+
cypress
|
|
46
|
+
microsite
|
|
47
|
+
node_modules
|
|
48
|
+
-packages
|
|
49
|
+
-!packages/backend/dist
|
|
50
|
+
+packages/*/src
|
|
51
|
+
+packages/*/node_modules
|
|
52
|
+
plugins
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- f55414f895: Added sample catalog data to the template under a top-level `examples` directory. This includes some simple entities, org data, and a template. You can find the sample data at https://github.com/backstage/backstage/tree/master/packages/create-app/templates/default-app/examples.
|
|
56
|
+
- 3a74e203a8: Implement highlighting matching terms in search results. To enable this for an existing app, make the following changes:
|
|
57
|
+
|
|
58
|
+
```diff
|
|
59
|
+
// packages/app/src/components/search/SearchPage.tsx
|
|
60
|
+
...
|
|
61
|
+
- {results.map(({ type, document }) => {
|
|
62
|
+
+ {results.map(({ type, document, highlight }) => {
|
|
63
|
+
switch (type) {
|
|
64
|
+
case 'software-catalog':
|
|
65
|
+
return (
|
|
66
|
+
<CatalogSearchResultListItem
|
|
67
|
+
key={document.location}
|
|
68
|
+
result={document}
|
|
69
|
+
+ highlight={highlight}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
case 'techdocs':
|
|
73
|
+
return (
|
|
74
|
+
<TechDocsSearchResultListItem
|
|
75
|
+
key={document.location}
|
|
76
|
+
result={document}
|
|
77
|
+
+ highlight={highlight}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
default:
|
|
81
|
+
return (
|
|
82
|
+
<DefaultResultListItem
|
|
83
|
+
key={document.location}
|
|
84
|
+
result={document}
|
|
85
|
+
+ highlight={highlight}
|
|
86
|
+
/>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
})}
|
|
90
|
+
...
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- Updated dependencies
|
|
94
|
+
- @backstage/cli-common@0.1.9-next.0
|
|
95
|
+
|
|
3
96
|
## 0.4.27-next.1
|
|
4
97
|
|
|
5
98
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -57,95 +57,95 @@ ${chalk__default["default"].red(`${error}`)}
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
var version$J = "0.4.27-next.
|
|
60
|
+
var version$J = "0.4.27-next.2";
|
|
61
61
|
|
|
62
|
-
var version$I = "1.2.0-next.
|
|
62
|
+
var version$I = "1.2.0-next.2";
|
|
63
63
|
|
|
64
64
|
var version$H = "1.0.2-next.0";
|
|
65
65
|
|
|
66
|
-
var version$G = "0.13.3-next.
|
|
66
|
+
var version$G = "0.13.3-next.2";
|
|
67
67
|
|
|
68
|
-
var version$F = "0.3.1-next.
|
|
68
|
+
var version$F = "0.3.1-next.1";
|
|
69
69
|
|
|
70
|
-
var version$E = "1.0.
|
|
70
|
+
var version$E = "1.0.2-next.0";
|
|
71
71
|
|
|
72
|
-
var version$D = "1.0.
|
|
72
|
+
var version$D = "1.0.2-next.0";
|
|
73
73
|
|
|
74
|
-
var version$C = "0.17.1-next.
|
|
74
|
+
var version$C = "0.17.1-next.2";
|
|
75
75
|
|
|
76
|
-
var version$B = "1.0.0";
|
|
76
|
+
var version$B = "1.0.1-next.0";
|
|
77
77
|
|
|
78
|
-
var version$A = "1.0.2-next.
|
|
78
|
+
var version$A = "1.0.2-next.1";
|
|
79
79
|
|
|
80
|
-
var version$z = "0.9.4-next.
|
|
80
|
+
var version$z = "0.9.4-next.1";
|
|
81
81
|
|
|
82
|
-
var version$y = "1.0.2-next.
|
|
82
|
+
var version$y = "1.0.2-next.1";
|
|
83
83
|
|
|
84
84
|
var version$x = "1.0.0";
|
|
85
85
|
|
|
86
|
-
var version$w = "1.1.0-next.
|
|
86
|
+
var version$w = "1.1.0-next.2";
|
|
87
87
|
|
|
88
|
-
var version$v = "1.1.0-next.
|
|
88
|
+
var version$v = "1.1.0-next.2";
|
|
89
89
|
|
|
90
90
|
var version$u = "0.2.15";
|
|
91
91
|
|
|
92
|
-
var version$t = "0.8.5-next.
|
|
92
|
+
var version$t = "0.8.5-next.2";
|
|
93
93
|
|
|
94
|
-
var version$s = "0.3.32-next.
|
|
94
|
+
var version$s = "0.3.32-next.1";
|
|
95
95
|
|
|
96
|
-
var version$r = "0.13.1-next.
|
|
96
|
+
var version$r = "0.13.1-next.2";
|
|
97
97
|
|
|
98
|
-
var version$q = "1.2.0-next.
|
|
98
|
+
var version$q = "1.2.0-next.2";
|
|
99
99
|
|
|
100
|
-
var version$p = "1.0.
|
|
100
|
+
var version$p = "1.0.2-next.0";
|
|
101
101
|
|
|
102
|
-
var version$o = "1.1.0-next.
|
|
102
|
+
var version$o = "1.1.0-next.2";
|
|
103
103
|
|
|
104
|
-
var version$n = "1.1.2-next.
|
|
104
|
+
var version$n = "1.1.2-next.2";
|
|
105
105
|
|
|
106
|
-
var version$m = "0.2.17-next.
|
|
106
|
+
var version$m = "0.2.17-next.2";
|
|
107
107
|
|
|
108
|
-
var version$l = "0.8.8-next.
|
|
108
|
+
var version$l = "0.8.8-next.2";
|
|
109
109
|
|
|
110
|
-
var version$k = "0.3.5-next.
|
|
110
|
+
var version$k = "0.3.5-next.2";
|
|
111
111
|
|
|
112
|
-
var version$j = "0.3.36-next.
|
|
112
|
+
var version$j = "0.3.36-next.2";
|
|
113
113
|
|
|
114
|
-
var version$i = "0.5.5-next.
|
|
114
|
+
var version$i = "0.5.5-next.2";
|
|
115
115
|
|
|
116
|
-
var version$h = "0.3.5-next.
|
|
116
|
+
var version$h = "0.3.5-next.2";
|
|
117
117
|
|
|
118
|
-
var version$g = "0.5.5-next.
|
|
118
|
+
var version$g = "0.5.5-next.2";
|
|
119
119
|
|
|
120
|
-
var version$f = "0.6.0";
|
|
120
|
+
var version$f = "0.6.1-next.0";
|
|
121
121
|
|
|
122
|
-
var version$e = "0.4.1-next.
|
|
122
|
+
var version$e = "0.4.1-next.1";
|
|
123
123
|
|
|
124
|
-
var version$d = "0.6.1-next.
|
|
124
|
+
var version$d = "0.6.1-next.1";
|
|
125
125
|
|
|
126
|
-
var version$c = "0.2.26-next.
|
|
126
|
+
var version$c = "0.2.26-next.1";
|
|
127
127
|
|
|
128
|
-
var version$b = "0.1.29-next.
|
|
128
|
+
var version$b = "0.1.29-next.2";
|
|
129
129
|
|
|
130
|
-
var version$a = "1.2.0-next.
|
|
130
|
+
var version$a = "1.2.0-next.2";
|
|
131
131
|
|
|
132
|
-
var version$9 = "1.2.0-next.
|
|
132
|
+
var version$9 = "1.2.0-next.1";
|
|
133
133
|
|
|
134
|
-
var version$8 = "0.8.1-next.
|
|
134
|
+
var version$8 = "0.8.1-next.2";
|
|
135
135
|
|
|
136
|
-
var version$7 = "0.2.0-next.
|
|
136
|
+
var version$7 = "0.2.0-next.2";
|
|
137
137
|
|
|
138
|
-
var version$6 = "0.5.2-next.
|
|
138
|
+
var version$6 = "0.5.2-next.1";
|
|
139
139
|
|
|
140
|
-
var version$5 = "0.3.3-next.
|
|
140
|
+
var version$5 = "0.3.3-next.1";
|
|
141
141
|
|
|
142
|
-
var version$4 = "0.6.1-next.
|
|
142
|
+
var version$4 = "0.6.1-next.1";
|
|
143
143
|
|
|
144
144
|
var version$3 = "0.5.12-next.0";
|
|
145
145
|
|
|
146
|
-
var version$2 = "1.1.1-next.
|
|
146
|
+
var version$2 = "1.1.1-next.2";
|
|
147
147
|
|
|
148
|
-
var version$1 = "1.1.1-next.
|
|
148
|
+
var version$1 = "1.1.1-next.1";
|
|
149
149
|
|
|
150
150
|
var version = "0.4.4-next.0";
|
|
151
151
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/create-app",
|
|
3
3
|
"description": "A CLI that helps you create your own Backstage app",
|
|
4
|
-
"version": "0.4.27-next.
|
|
4
|
+
"version": "0.4.27-next.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"start": "nodemon --"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/cli-common": "^0.1.
|
|
36
|
+
"@backstage/cli-common": "^0.1.9-next.0",
|
|
37
37
|
"chalk": "^4.0.0",
|
|
38
38
|
"commander": "^9.1.0",
|
|
39
39
|
"fs-extra": "10.1.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"dist",
|
|
61
61
|
"templates"
|
|
62
62
|
],
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "cfbf5762d7d91eee18999306b21d63840400ee29"
|
|
64
64
|
}
|
|
@@ -76,36 +76,28 @@ catalog:
|
|
|
76
76
|
rules:
|
|
77
77
|
- allow: [Component, System, API, Resource, Location]
|
|
78
78
|
locations:
|
|
79
|
-
#
|
|
80
|
-
- type:
|
|
81
|
-
target:
|
|
79
|
+
# Local example data, file locations are relative to the backend process, typically `packages/backend`
|
|
80
|
+
- type: file
|
|
81
|
+
target: ../../examples/entities.yaml
|
|
82
82
|
|
|
83
|
-
#
|
|
84
|
-
- type:
|
|
85
|
-
target:
|
|
86
|
-
|
|
87
|
-
# Backstage example APIs
|
|
88
|
-
- type: url
|
|
89
|
-
target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml
|
|
90
|
-
|
|
91
|
-
# Backstage example resources
|
|
92
|
-
- type: url
|
|
93
|
-
target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-resources.yaml
|
|
94
|
-
|
|
95
|
-
# Backstage example organization groups
|
|
96
|
-
- type: url
|
|
97
|
-
target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/org.yaml
|
|
98
|
-
|
|
99
|
-
# Backstage example templates
|
|
100
|
-
- type: url
|
|
101
|
-
target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml
|
|
102
|
-
rules:
|
|
103
|
-
- allow: [Template]
|
|
104
|
-
- type: url
|
|
105
|
-
target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/springboot-grpc-template/template.yaml
|
|
83
|
+
# Local example template
|
|
84
|
+
- type: file
|
|
85
|
+
target: ../../examples/template/template.yaml
|
|
106
86
|
rules:
|
|
107
87
|
- allow: [Template]
|
|
108
|
-
|
|
109
|
-
|
|
88
|
+
|
|
89
|
+
# Local example organizational data
|
|
90
|
+
- type: file
|
|
91
|
+
target: ../../examples/org.yaml
|
|
110
92
|
rules:
|
|
111
|
-
- allow: [
|
|
93
|
+
- allow: [User, Group]
|
|
94
|
+
|
|
95
|
+
## Uncomment these lines to add more example data
|
|
96
|
+
# - type: url
|
|
97
|
+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
|
|
98
|
+
|
|
99
|
+
## Uncomment these lines to add an example org
|
|
100
|
+
# - type: url
|
|
101
|
+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
|
|
102
|
+
# rules:
|
|
103
|
+
# - allow: [User, Group]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system
|
|
3
|
+
apiVersion: backstage.io/v1alpha1
|
|
4
|
+
kind: System
|
|
5
|
+
metadata:
|
|
6
|
+
name: examples
|
|
7
|
+
spec:
|
|
8
|
+
owner: guests
|
|
9
|
+
---
|
|
10
|
+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component
|
|
11
|
+
apiVersion: backstage.io/v1alpha1
|
|
12
|
+
kind: Component
|
|
13
|
+
metadata:
|
|
14
|
+
name: example-website
|
|
15
|
+
spec:
|
|
16
|
+
type: website
|
|
17
|
+
lifecycle: experimental
|
|
18
|
+
owner: guests
|
|
19
|
+
system: examples
|
|
20
|
+
providesApis: [example-grpc-api]
|
|
21
|
+
---
|
|
22
|
+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api
|
|
23
|
+
apiVersion: backstage.io/v1alpha1
|
|
24
|
+
kind: API
|
|
25
|
+
metadata:
|
|
26
|
+
name: example-grpc-api
|
|
27
|
+
spec:
|
|
28
|
+
type: grpc
|
|
29
|
+
lifecycle: experimental
|
|
30
|
+
owner: guests
|
|
31
|
+
system: examples
|
|
32
|
+
definition: |
|
|
33
|
+
syntax = "proto3";
|
|
34
|
+
|
|
35
|
+
service Exampler {
|
|
36
|
+
rpc Example (ExampleMessage) returns (ExampleMessage) {};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message ExampleMessage {
|
|
40
|
+
string example = 1;
|
|
41
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-user
|
|
3
|
+
apiVersion: backstage.io/v1alpha1
|
|
4
|
+
kind: User
|
|
5
|
+
metadata:
|
|
6
|
+
name: guest
|
|
7
|
+
spec:
|
|
8
|
+
memberOf: [guests]
|
|
9
|
+
---
|
|
10
|
+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-group
|
|
11
|
+
apiVersion: backstage.io/v1alpha1
|
|
12
|
+
kind: Group
|
|
13
|
+
metadata:
|
|
14
|
+
name: guests
|
|
15
|
+
spec:
|
|
16
|
+
type: team
|
|
17
|
+
children: []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('Hello from ${{ values.name }}!');
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
apiVersion: scaffolder.backstage.io/v1beta3
|
|
2
|
+
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-template
|
|
3
|
+
kind: Template
|
|
4
|
+
metadata:
|
|
5
|
+
name: example-nodejs-template
|
|
6
|
+
title: Example Node.js Template
|
|
7
|
+
description: An example template for the scaffolder that creates a simple Node.js service
|
|
8
|
+
spec:
|
|
9
|
+
owner: user:guest
|
|
10
|
+
type: service
|
|
11
|
+
|
|
12
|
+
# These parameters are used to generate the input form in the frontend, and are
|
|
13
|
+
# used to gather input data for the execution of the template.
|
|
14
|
+
parameters:
|
|
15
|
+
- title: Fill in some steps
|
|
16
|
+
required:
|
|
17
|
+
- name
|
|
18
|
+
properties:
|
|
19
|
+
name:
|
|
20
|
+
title: Name
|
|
21
|
+
type: string
|
|
22
|
+
description: Unique name of the component
|
|
23
|
+
ui:autofocus: true
|
|
24
|
+
ui:options:
|
|
25
|
+
rows: 5
|
|
26
|
+
- title: Choose a location
|
|
27
|
+
required:
|
|
28
|
+
- repoUrl
|
|
29
|
+
properties:
|
|
30
|
+
repoUrl:
|
|
31
|
+
title: Repository Location
|
|
32
|
+
type: string
|
|
33
|
+
ui:field: RepoUrlPicker
|
|
34
|
+
ui:options:
|
|
35
|
+
allowedHosts:
|
|
36
|
+
- github.com
|
|
37
|
+
|
|
38
|
+
# These steps are executed in the scaffolder backend, using data that we gathered
|
|
39
|
+
# via the parameters above.
|
|
40
|
+
steps:
|
|
41
|
+
# Each step executes an action, in this case one templates files into the working directory.
|
|
42
|
+
- id: fetch-base
|
|
43
|
+
name: Fetch Base
|
|
44
|
+
action: fetch:template
|
|
45
|
+
input:
|
|
46
|
+
url: ./content
|
|
47
|
+
values:
|
|
48
|
+
name: ${{ parameters.name }}
|
|
49
|
+
|
|
50
|
+
# This step publishes the contents of the working directory to GitHub.
|
|
51
|
+
- id: publish
|
|
52
|
+
name: Publish
|
|
53
|
+
action: publish:github
|
|
54
|
+
input:
|
|
55
|
+
allowedHosts: ['github.com']
|
|
56
|
+
description: This is ${{ parameters.name }}
|
|
57
|
+
repoUrl: ${{ parameters.repoUrl }}
|
|
58
|
+
|
|
59
|
+
# The final step is to register our new component in the catalog.
|
|
60
|
+
- id: register
|
|
61
|
+
name: Register
|
|
62
|
+
action: catalog:register
|
|
63
|
+
input:
|
|
64
|
+
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
|
|
65
|
+
catalogInfoPath: '/catalog-info.yaml'
|
|
66
|
+
|
|
67
|
+
# Outputs are displayed to the user after a successful execution of the template.
|
|
68
|
+
output:
|
|
69
|
+
links:
|
|
70
|
+
- title: Repository
|
|
71
|
+
url: ${{ steps.publish.output.remoteUrl }}
|
|
72
|
+
- title: Open in catalog
|
|
73
|
+
icon: catalog
|
|
74
|
+
entityRef: ${{ steps.register.output.entityRef }}
|
|
@@ -112,13 +112,14 @@ const SearchPage = () => {
|
|
|
112
112
|
<SearchResult>
|
|
113
113
|
{({ results }) => (
|
|
114
114
|
<List>
|
|
115
|
-
{results.map(({ type, document }) => {
|
|
115
|
+
{results.map(({ type, document, highlight }) => {
|
|
116
116
|
switch (type) {
|
|
117
117
|
case 'software-catalog':
|
|
118
118
|
return (
|
|
119
119
|
<CatalogSearchResultListItem
|
|
120
120
|
key={document.location}
|
|
121
121
|
result={document}
|
|
122
|
+
highlight={highlight}
|
|
122
123
|
/>
|
|
123
124
|
);
|
|
124
125
|
case 'techdocs':
|
|
@@ -126,6 +127,7 @@ const SearchPage = () => {
|
|
|
126
127
|
<TechDocsSearchResultListItem
|
|
127
128
|
key={document.location}
|
|
128
129
|
result={document}
|
|
130
|
+
highlight={highlight}
|
|
129
131
|
/>
|
|
130
132
|
);
|
|
131
133
|
default:
|
|
@@ -133,6 +135,7 @@ const SearchPage = () => {
|
|
|
133
135
|
<DefaultResultListItem
|
|
134
136
|
key={document.location}
|
|
135
137
|
result={document}
|
|
138
|
+
highlight={highlight}
|
|
136
139
|
/>
|
|
137
140
|
);
|
|
138
141
|
}
|
|
@@ -8,7 +8,6 @@ import { PluginEnvironment } from '../types';
|
|
|
8
8
|
import { DefaultCatalogCollatorFactory } from '@backstage/plugin-catalog-backend';
|
|
9
9
|
import { DefaultTechDocsCollatorFactory } from '@backstage/plugin-techdocs-backend';
|
|
10
10
|
import { Router } from 'express';
|
|
11
|
-
import { Duration } from 'luxon';
|
|
12
11
|
|
|
13
12
|
export default async function createPlugin(
|
|
14
13
|
env: PluginEnvironment,
|
|
@@ -23,11 +22,11 @@ export default async function createPlugin(
|
|
|
23
22
|
});
|
|
24
23
|
|
|
25
24
|
const schedule = env.scheduler.createScheduledTaskRunner({
|
|
26
|
-
frequency:
|
|
27
|
-
timeout:
|
|
25
|
+
frequency: { minutes: 10 },
|
|
26
|
+
timeout: { minutes: 15 },
|
|
28
27
|
// A 3 second delay gives the backend server a chance to initialize before
|
|
29
28
|
// any collators are executed, which may attempt requests against the API.
|
|
30
|
-
initialDelay:
|
|
29
|
+
initialDelay: { seconds: 3 },
|
|
31
30
|
});
|
|
32
31
|
|
|
33
32
|
// Collators are responsible for gathering documents known to plugins. This
|