@backstage/create-app 0.0.0-nightly-20220509024521 → 0.0.0-nightly-20220512024113

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @backstage/create-app
2
2
 
3
- ## 0.0.0-nightly-20220509024521
3
+ ## 0.0.0-nightly-20220512024113
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -122,6 +122,43 @@
122
122
  ```
123
123
 
124
124
  - 806427545f: Added a link to the `${GITHUB_TOKEN}` to document how to generate a token
125
+ - 3a74e203a8: Implement highlighting matching terms in search results. To enable this for an existing app, make the following changes:
126
+
127
+ ```diff
128
+ // packages/app/src/components/search/SearchPage.tsx
129
+ ...
130
+ - {results.map(({ type, document }) => {
131
+ + {results.map(({ type, document, highlight }) => {
132
+ switch (type) {
133
+ case 'software-catalog':
134
+ return (
135
+ <CatalogSearchResultListItem
136
+ key={document.location}
137
+ result={document}
138
+ + highlight={highlight}
139
+ />
140
+ );
141
+ case 'techdocs':
142
+ return (
143
+ <TechDocsSearchResultListItem
144
+ key={document.location}
145
+ result={document}
146
+ + highlight={highlight}
147
+ />
148
+ );
149
+ default:
150
+ return (
151
+ <DefaultResultListItem
152
+ key={document.location}
153
+ result={document}
154
+ + highlight={highlight}
155
+ />
156
+ );
157
+ }
158
+ })}
159
+ ...
160
+ ```
161
+
125
162
  - d41f19ca2a: Bumped the `typescript` version in the template to `~4.6.4`.
126
163
 
127
164
  To apply this change to an existing app, make the following change to the root `package.json`:
@@ -135,7 +172,100 @@
135
172
  ```
136
173
 
137
174
  - Updated dependencies
138
- - @backstage/cli-common@0.0.0-nightly-20220509024521
175
+ - @backstage/cli-common@0.0.0-nightly-20220512024113
176
+
177
+ ## 0.4.27-next.2
178
+
179
+ ### Patch Changes
180
+
181
+ - 73480846dd: Simplified the search collator scheduling by removing the need for the `luxon` dependency.
182
+
183
+ For existing installations the scheduling can be simplified by removing the `luxon` dependency and using the human friendly duration object instead.
184
+ Please note that this only applies if luxon is not used elsewhere in your installation.
185
+
186
+ `packages/backend/package.json`
187
+
188
+ ```diff
189
+ "express": "^4.17.1",
190
+ "express-promise-router": "^4.1.0",
191
+ - "luxon": "^2.0.2",
192
+ ```
193
+
194
+ `packages/backend/src/plugins/search.ts`
195
+
196
+ ```diff
197
+ import { Router } from 'express';
198
+ -import { Duration } from 'luxon';
199
+
200
+ // omitted other code
201
+
202
+ const schedule = env.scheduler.createScheduledTaskRunner({
203
+ - frequency: Duration.fromObject({ minutes: 10 }),
204
+ - timeout: Duration.fromObject({ minutes: 15 }),
205
+ + frequency: { minutes: 10 },
206
+ + timeout: { minutes: 15 },
207
+ // A 3 second delay gives the backend server a chance to initialize before
208
+ // any collators are executed, which may attempt requests against the API.
209
+ - initialDelay: Duration.fromObject({ seconds: 3 }),
210
+ + initialDelay: { seconds: 3 },
211
+ });
212
+ ```
213
+
214
+ - 7cda923c16: Tweaked the `.dockerignore` file so that it's easier to add additional backend packages if desired.
215
+
216
+ To apply this change to an existing app, make the following change to `.dockerignore`:
217
+
218
+ ```diff
219
+ cypress
220
+ microsite
221
+ node_modules
222
+ -packages
223
+ -!packages/backend/dist
224
+ +packages/*/src
225
+ +packages/*/node_modules
226
+ plugins
227
+ ```
228
+
229
+ - 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.
230
+ - 3a74e203a8: Implement highlighting matching terms in search results. To enable this for an existing app, make the following changes:
231
+
232
+ ```diff
233
+ // packages/app/src/components/search/SearchPage.tsx
234
+ ...
235
+ - {results.map(({ type, document }) => {
236
+ + {results.map(({ type, document, highlight }) => {
237
+ switch (type) {
238
+ case 'software-catalog':
239
+ return (
240
+ <CatalogSearchResultListItem
241
+ key={document.location}
242
+ result={document}
243
+ + highlight={highlight}
244
+ />
245
+ );
246
+ case 'techdocs':
247
+ return (
248
+ <TechDocsSearchResultListItem
249
+ key={document.location}
250
+ result={document}
251
+ + highlight={highlight}
252
+ />
253
+ );
254
+ default:
255
+ return (
256
+ <DefaultResultListItem
257
+ key={document.location}
258
+ result={document}
259
+ + highlight={highlight}
260
+ />
261
+ );
262
+ }
263
+ })}
264
+ ...
265
+ ```
266
+
267
+ - Updated dependencies
268
+ - @backstage/cli-common@0.1.9-next.0
139
269
 
140
270
  ## 0.4.27-next.1
141
271
 
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.1";
60
+ var version$J = "0.4.27-next.2";
61
61
 
62
- var version$I = "1.2.0-next.1";
62
+ var version$I = "1.2.0-next.3";
63
63
 
64
64
  var version$H = "1.0.2-next.0";
65
65
 
66
- var version$G = "0.13.3-next.1";
66
+ var version$G = "0.13.3-next.2";
67
67
 
68
- var version$F = "0.3.1-next.0";
68
+ var version$F = "0.3.1-next.1";
69
69
 
70
- var version$E = "1.0.1";
70
+ var version$E = "1.0.2-next.0";
71
71
 
72
- var version$D = "1.0.1";
72
+ var version$D = "1.0.2-next.0";
73
73
 
74
- var version$C = "0.17.1-next.1";
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.0";
78
+ var version$A = "1.0.2-next.1";
79
79
 
80
- var version$z = "0.9.4-next.0";
80
+ var version$z = "0.9.4-next.2";
81
81
 
82
- var version$y = "1.0.2-next.0";
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.1";
86
+ var version$w = "1.1.0-next.2";
87
87
 
88
- var version$v = "1.1.0-next.1";
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.1";
92
+ var version$t = "0.8.5-next.2";
93
93
 
94
- var version$s = "0.3.32-next.0";
94
+ var version$s = "0.3.32-next.1";
95
95
 
96
- var version$r = "0.13.1-next.1";
96
+ var version$r = "0.13.1-next.2";
97
97
 
98
- var version$q = "1.2.0-next.1";
98
+ var version$q = "1.2.0-next.2";
99
99
 
100
- var version$p = "1.0.1";
100
+ var version$p = "1.0.2-next.0";
101
101
 
102
- var version$o = "1.1.0-next.1";
102
+ var version$o = "1.1.0-next.2";
103
103
 
104
- var version$n = "1.1.2-next.1";
104
+ var version$n = "1.1.2-next.2";
105
105
 
106
- var version$m = "0.2.17-next.1";
106
+ var version$m = "0.2.17-next.2";
107
107
 
108
- var version$l = "0.8.8-next.1";
108
+ var version$l = "0.8.8-next.2";
109
109
 
110
- var version$k = "0.3.5-next.1";
110
+ var version$k = "0.3.5-next.2";
111
111
 
112
- var version$j = "0.3.36-next.1";
112
+ var version$j = "0.3.36-next.2";
113
113
 
114
- var version$i = "0.5.5-next.1";
114
+ var version$i = "0.5.5-next.2";
115
115
 
116
- var version$h = "0.3.5-next.1";
116
+ var version$h = "0.3.5-next.2";
117
117
 
118
- var version$g = "0.5.5-next.1";
118
+ var version$g = "0.5.5-next.3";
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.0";
122
+ var version$e = "0.4.1-next.1";
123
123
 
124
- var version$d = "0.6.1-next.0";
124
+ var version$d = "0.6.1-next.1";
125
125
 
126
- var version$c = "0.2.26-next.0";
126
+ var version$c = "0.2.26-next.1";
127
127
 
128
- var version$b = "0.1.29-next.1";
128
+ var version$b = "0.1.29-next.2";
129
129
 
130
- var version$a = "1.2.0-next.1";
130
+ var version$a = "1.2.0-next.3";
131
131
 
132
- var version$9 = "1.2.0-next.0";
132
+ var version$9 = "1.2.0-next.1";
133
133
 
134
- var version$8 = "0.8.1-next.1";
134
+ var version$8 = "0.8.1-next.2";
135
135
 
136
- var version$7 = "0.2.0-next.1";
136
+ var version$7 = "0.2.0-next.2";
137
137
 
138
- var version$6 = "0.5.2-next.0";
138
+ var version$6 = "0.5.2-next.1";
139
139
 
140
- var version$5 = "0.3.3-next.0";
140
+ var version$5 = "0.3.3-next.1";
141
141
 
142
- var version$4 = "0.6.1-next.0";
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.1";
146
+ var version$2 = "1.1.1-next.3";
147
147
 
148
- var version$1 = "1.1.1-next.0";
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.0.0-nightly-20220509024521",
4
+ "version": "0.0.0-nightly-20220512024113",
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.0.0-nightly-20220509024521",
36
+ "@backstage/cli-common": "^0.0.0-nightly-20220512024113",
37
37
  "chalk": "^4.0.0",
38
38
  "commander": "^9.1.0",
39
39
  "fs-extra": "10.1.0",
@@ -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
  }