@backstage/create-app 0.4.19-next.0 → 0.4.21
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 +155 -1
- package/dist/index.cjs.js +43 -43
- package/package.json +10 -7
- package/templates/default-app/packages/app/src/components/Root/Root.tsx +2 -7
- package/templates/default-app/packages/app/src/components/search/SearchPage.tsx +2 -2
- package/templates/default-app/packages/backend/Dockerfile +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,152 @@
|
|
|
1
1
|
# @backstage/create-app
|
|
2
2
|
|
|
3
|
+
## 0.4.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a686702dbe: Update the template to reflect the renaming of `CatalogResultListItem` to `CatalogSearchResultListItem` from `@backstage/plugin-catalog`.
|
|
8
|
+
|
|
9
|
+
To apply this change to an existing app, make the following change to `packages/app/src/components/search/SearchPage.tsx`:
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
-import { CatalogResultListItem } from '@backstage/plugin-catalog';
|
|
13
|
+
+import { CatalogSearchResultListItem } from '@backstage/plugin-catalog';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```diff
|
|
17
|
+
case 'software-catalog':
|
|
18
|
+
return (
|
|
19
|
+
- <CatalogResultListItem
|
|
20
|
+
+ <CatalogSearchResultListItem
|
|
21
|
+
key={document.location}
|
|
22
|
+
result={document}
|
|
23
|
+
/>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- f39c1e6036: To reflect the updated `knex` and `@vscode/sqlite3` dependencies introduced with [v0.4.19](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md#0419), we update our example `Dockerfile`, adding `@vscode/sqlite3` build dependencies to the image. Further on, we updated it to the `node:16-bullseye-slim` base image.
|
|
27
|
+
|
|
28
|
+
To apply this update to an existing app, make the following change to `packages/backend/Dockerfile`:
|
|
29
|
+
|
|
30
|
+
```diff
|
|
31
|
+
-FROM node:14-buster-slim
|
|
32
|
+
+FROM node:16-bullseye-slim
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
and, _only if you are using sqlite3 in your app_:
|
|
36
|
+
|
|
37
|
+
```diff
|
|
38
|
+
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
|
|
39
|
+
+
|
|
40
|
+
+# install sqlite3 dependencies
|
|
41
|
+
+RUN apt-get update && \
|
|
42
|
+
+ apt-get install -y libsqlite3-dev python3 cmake g++ && \
|
|
43
|
+
+ rm -rf /var/lib/apt/lists/* && \
|
|
44
|
+
+ yarn config set python /usr/bin/python3
|
|
45
|
+
|
|
46
|
+
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If you are using a multi-stage Docker build for your app, please refer to the [updated examples](https://github.com/backstage/backstage/blob/master/docs/deployment/docker.md#multi-stage-build) in the documentation.
|
|
50
|
+
|
|
51
|
+
## 0.4.20
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- e725bb812f: Remove SearchContextProvider from `<Root />`
|
|
56
|
+
|
|
57
|
+
The `SidebarSearchModal` exported from `plugin-search` internally renders `SearchContextProvider`, so it can be removed from `Root.tsx`:
|
|
58
|
+
|
|
59
|
+
```diff
|
|
60
|
+
-import {
|
|
61
|
+
- SidebarSearchModal,
|
|
62
|
+
- SearchContextProvider,
|
|
63
|
+
-} from '@backstage/plugin-search';
|
|
64
|
+
+import { SidebarSearchModal } from '@backstage/plugin-search';
|
|
65
|
+
|
|
66
|
+
... omitted ...
|
|
67
|
+
|
|
68
|
+
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
|
|
69
|
+
- <SearchContextProvider>
|
|
70
|
+
- <SidebarSearchModal />
|
|
71
|
+
- </SearchContextProvider>
|
|
72
|
+
+ <SidebarSearchModal />
|
|
73
|
+
</SidebarGroup>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
- c77c5c7eb6: Added `backstage.role` to `package.json`
|
|
77
|
+
- Updated dependencies
|
|
78
|
+
- @backstage/cli-common@0.1.7
|
|
79
|
+
|
|
80
|
+
## 0.4.19
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- 22f4ecb0e6: Switched the `file:` dependency for a `link:` dependency in the `backend` package. This makes sure that the `app` package is linked in rather than copied.
|
|
85
|
+
|
|
86
|
+
To apply this update to an existing app, make the following change to `packages/backend/package.json`:
|
|
87
|
+
|
|
88
|
+
```diff
|
|
89
|
+
"dependencies": {
|
|
90
|
+
- "app": "file:../app",
|
|
91
|
+
+ "app": "link:../app",
|
|
92
|
+
"@backstage/backend-common": "^{{version '@backstage/backend-common'}}",
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- 1dd5a02e91: **BREAKING:** Updated `knex` to major version 1, which also implies changing out
|
|
96
|
+
the underlying `sqlite` implementation.
|
|
97
|
+
|
|
98
|
+
The old `sqlite3` NPM library has been abandoned by its maintainers, which has
|
|
99
|
+
led to unhandled security reports and other issues. Therefore, in the `knex` 1.x
|
|
100
|
+
release line they have instead switched over to the [`@vscode/sqlite3`
|
|
101
|
+
library](https://github.com/microsoft/vscode-node-sqlite3) by default, which is
|
|
102
|
+
actively maintained by Microsoft.
|
|
103
|
+
|
|
104
|
+
This means that as you update to this version of Backstage, there are two
|
|
105
|
+
breaking changes that you will have to address in your own repository:
|
|
106
|
+
|
|
107
|
+
## Bumping `knex` itself
|
|
108
|
+
|
|
109
|
+
All `package.json` files of your repo that used to depend on a 0.x version of
|
|
110
|
+
`knex`, should now be updated to depend on the 1.x release line. This applies in
|
|
111
|
+
particular to `packages/backend`, but may also occur in backend plugins or
|
|
112
|
+
libraries.
|
|
113
|
+
|
|
114
|
+
```diff
|
|
115
|
+
- "knex": "^0.95.1",
|
|
116
|
+
+ "knex": "^1.0.2",
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Almost all existing database code will continue to function without modification
|
|
120
|
+
after this bump. The only significant difference that we discovered in the main
|
|
121
|
+
repo, is that the `alter()` function had a slightly different signature in
|
|
122
|
+
migration files. It now accepts an object with `alterType` and `alterNullable`
|
|
123
|
+
fields that clarify a previous grey area such that the intent of the alteration
|
|
124
|
+
is made explicit. This is caught by `tsc` and your editor if you are using the
|
|
125
|
+
`@ts-check` and `@param` syntax in your migration files
|
|
126
|
+
([example](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/migrations/20220116144621_remove_legacy.js#L17)),
|
|
127
|
+
which we strongly recommend.
|
|
128
|
+
|
|
129
|
+
See the [`knex` documentation](https://knexjs.org/#Schema-alter) for more
|
|
130
|
+
information about the `alter` syntax.
|
|
131
|
+
|
|
132
|
+
Also see the [`knex` changelog](https://knexjs.org/#changelog) for information
|
|
133
|
+
about breaking changes in the 1.x line; if you are using `RETURNING` you may
|
|
134
|
+
want to make some additional modifications in your code.
|
|
135
|
+
|
|
136
|
+
## Switching out `sqlite3`
|
|
137
|
+
|
|
138
|
+
All `package.json` files of your repo that used to depend on `sqlite3`, should
|
|
139
|
+
now be updated to depend on `@vscode/sqlite3`. This applies in particular to
|
|
140
|
+
`packages/backend`, but may also occur in backend plugins or libraries.
|
|
141
|
+
|
|
142
|
+
```diff
|
|
143
|
+
- "sqlite3": "^5.0.1",
|
|
144
|
+
+ "@vscode/sqlite3": "^5.0.7",
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
These should be functionally equivalent, except that the new library will have
|
|
148
|
+
addressed some long standing problems with old transitive dependencies etc.
|
|
149
|
+
|
|
3
150
|
## 0.4.19-next.0
|
|
4
151
|
|
|
5
152
|
### Patch Changes
|
|
@@ -271,11 +418,18 @@
|
|
|
271
418
|
}
|
|
272
419
|
```
|
|
273
420
|
|
|
421
|
+
The `.fromConfig` of the `DefaultCatalogCollator` also now takes a `tokenManager` as a parameter.
|
|
422
|
+
|
|
423
|
+
```diff
|
|
424
|
+
- collator: DefaultCatalogCollator.fromConfig(config, { discovery }),
|
|
425
|
+
+ collator: DefaultCatalogCollator.fromConfig(config, { discovery, tokenManager }),
|
|
426
|
+
```
|
|
427
|
+
|
|
274
428
|
- a0d446c8ec: Replaced EntitySystemDiagramCard with EntityCatalogGraphCard
|
|
275
429
|
|
|
276
430
|
To make this change to an existing app:
|
|
277
431
|
|
|
278
|
-
Add `@backstage/plugin-catalog-graph` as a `dependency` in `packages/app/package.json`
|
|
432
|
+
Add `@backstage/plugin-catalog-graph` as a `dependency` in `packages/app/package.json` or `cd packages/app && yarn add @backstage/plugin-catalog-graph`.
|
|
279
433
|
|
|
280
434
|
Apply the following changes to the `packages/app/src/components/catalog/EntityPage.tsx` file:
|
|
281
435
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -55,91 +55,91 @@ ${chalk__default["default"].red(`${error}`)}
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
var version$G = "0.4.
|
|
58
|
+
var version$G = "0.4.21";
|
|
59
59
|
|
|
60
|
-
var version$F = "0.1.
|
|
60
|
+
var version$F = "0.1.9";
|
|
61
61
|
|
|
62
|
-
var version$E = "0.
|
|
62
|
+
var version$E = "0.11.0";
|
|
63
63
|
|
|
64
|
-
var version$D = "0.1.
|
|
64
|
+
var version$D = "0.1.9";
|
|
65
65
|
|
|
66
|
-
var version$C = "0.
|
|
66
|
+
var version$C = "0.7.2";
|
|
67
67
|
|
|
68
|
-
var version$B = "0.
|
|
68
|
+
var version$B = "0.11.0";
|
|
69
69
|
|
|
70
|
-
var version$A = "0.
|
|
70
|
+
var version$A = "0.14.1";
|
|
71
71
|
|
|
72
|
-
var version$z = "0.1.
|
|
72
|
+
var version$z = "0.1.15";
|
|
73
73
|
|
|
74
|
-
var version$y = "0.5.
|
|
74
|
+
var version$y = "0.5.4";
|
|
75
75
|
|
|
76
|
-
var version$x = "0.8.
|
|
76
|
+
var version$x = "0.8.10";
|
|
77
77
|
|
|
78
|
-
var version$w = "0.
|
|
78
|
+
var version$w = "0.7.0";
|
|
79
79
|
|
|
80
|
-
var version$v = "0.2.
|
|
80
|
+
var version$v = "0.2.2";
|
|
81
81
|
|
|
82
|
-
var version$u = "0.1.
|
|
82
|
+
var version$u = "0.1.23";
|
|
83
83
|
|
|
84
|
-
var version$t = "0.2.
|
|
84
|
+
var version$t = "0.2.6";
|
|
85
85
|
|
|
86
|
-
var version$s = "0.2.
|
|
86
|
+
var version$s = "0.2.15";
|
|
87
87
|
|
|
88
|
-
var version$r = "0.
|
|
88
|
+
var version$r = "0.8.0";
|
|
89
89
|
|
|
90
|
-
var version$q = "0.3.
|
|
90
|
+
var version$q = "0.3.27";
|
|
91
91
|
|
|
92
|
-
var version$p = "0.
|
|
92
|
+
var version$p = "0.11.0";
|
|
93
93
|
|
|
94
|
-
var version$o = "0.
|
|
94
|
+
var version$o = "0.9.0";
|
|
95
95
|
|
|
96
|
-
var version$n = "0.1.
|
|
96
|
+
var version$n = "0.1.4";
|
|
97
97
|
|
|
98
|
-
var version$m = "0.
|
|
98
|
+
var version$m = "0.7.0";
|
|
99
99
|
|
|
100
|
-
var version$l = "0.
|
|
100
|
+
var version$l = "0.22.0";
|
|
101
101
|
|
|
102
|
-
var version$k = "0.2.
|
|
102
|
+
var version$k = "0.2.12";
|
|
103
103
|
|
|
104
|
-
var version$j = "0.8.
|
|
104
|
+
var version$j = "0.8.3";
|
|
105
105
|
|
|
106
|
-
var version$i = "0.
|
|
106
|
+
var version$i = "0.3.0";
|
|
107
107
|
|
|
108
|
-
var version$h = "0.3.
|
|
108
|
+
var version$h = "0.3.31";
|
|
109
109
|
|
|
110
|
-
var version$g = "0.
|
|
110
|
+
var version$g = "0.5.0";
|
|
111
111
|
|
|
112
|
-
var version$f = "0.
|
|
112
|
+
var version$f = "0.3.0";
|
|
113
113
|
|
|
114
|
-
var version$e = "0.
|
|
114
|
+
var version$e = "0.5.0";
|
|
115
115
|
|
|
116
|
-
var version$d = "0.
|
|
116
|
+
var version$d = "0.5.1";
|
|
117
117
|
|
|
118
|
-
var version$c = "0.3.
|
|
118
|
+
var version$c = "0.3.2";
|
|
119
119
|
|
|
120
|
-
var version$b = "0.
|
|
120
|
+
var version$b = "0.5.2";
|
|
121
121
|
|
|
122
|
-
var version$a = "0.2.
|
|
122
|
+
var version$a = "0.2.21";
|
|
123
123
|
|
|
124
|
-
var version$9 = "0.1.
|
|
124
|
+
var version$9 = "0.1.24";
|
|
125
125
|
|
|
126
|
-
var version$8 = "0.
|
|
126
|
+
var version$8 = "0.13.0";
|
|
127
127
|
|
|
128
|
-
var version$7 = "0.
|
|
128
|
+
var version$7 = "0.17.0";
|
|
129
129
|
|
|
130
|
-
var version$6 = "0.
|
|
130
|
+
var version$6 = "0.7.1";
|
|
131
131
|
|
|
132
|
-
var version$5 = "0.4.
|
|
132
|
+
var version$5 = "0.4.5";
|
|
133
133
|
|
|
134
|
-
var version$4 = "0.4.
|
|
134
|
+
var version$4 = "0.4.7";
|
|
135
135
|
|
|
136
|
-
var version$3 = "0.5.
|
|
136
|
+
var version$3 = "0.5.7";
|
|
137
137
|
|
|
138
|
-
var version$2 = "0.
|
|
138
|
+
var version$2 = "0.14.0";
|
|
139
139
|
|
|
140
|
-
var version$1 = "0.
|
|
140
|
+
var version$1 = "0.14.0";
|
|
141
141
|
|
|
142
|
-
var version = "0.3.
|
|
142
|
+
var version = "0.3.21";
|
|
143
143
|
|
|
144
144
|
const packageVersions = {
|
|
145
145
|
"@backstage/app-defaults": version$F,
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
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.
|
|
4
|
+
"version": "0.4.21",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
+
"backstage": {
|
|
10
|
+
"role": "cli"
|
|
11
|
+
},
|
|
9
12
|
"homepage": "https://backstage.io",
|
|
10
13
|
"repository": {
|
|
11
14
|
"type": "git",
|
|
@@ -21,16 +24,16 @@
|
|
|
21
24
|
"backstage-create-app": "bin/backstage-create-app"
|
|
22
25
|
},
|
|
23
26
|
"scripts": {
|
|
24
|
-
"build": "backstage-cli build
|
|
25
|
-
"lint": "backstage-cli lint",
|
|
26
|
-
"test": "backstage-cli test",
|
|
27
|
-
"clean": "backstage-cli clean",
|
|
27
|
+
"build": "backstage-cli package build",
|
|
28
|
+
"lint": "backstage-cli package lint",
|
|
29
|
+
"test": "backstage-cli package test",
|
|
30
|
+
"clean": "backstage-cli package clean",
|
|
28
31
|
"prepack": "node scripts/prepack.js",
|
|
29
32
|
"postpack": "node scripts/postpack.js",
|
|
30
33
|
"start": "nodemon --"
|
|
31
34
|
},
|
|
32
35
|
"dependencies": {
|
|
33
|
-
"@backstage/cli-common": "^0.1.
|
|
36
|
+
"@backstage/cli-common": "^0.1.8",
|
|
34
37
|
"chalk": "^4.0.0",
|
|
35
38
|
"commander": "^6.1.0",
|
|
36
39
|
"fs-extra": "9.1.0",
|
|
@@ -57,5 +60,5 @@
|
|
|
57
60
|
"dist",
|
|
58
61
|
"templates"
|
|
59
62
|
],
|
|
60
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "a15da6ea1e3e8adc37be98be064071c8b5279b4a"
|
|
61
64
|
}
|
|
@@ -28,10 +28,7 @@ import {
|
|
|
28
28
|
Settings as SidebarSettings,
|
|
29
29
|
UserSettingsSignInAvatar,
|
|
30
30
|
} from '@backstage/plugin-user-settings';
|
|
31
|
-
import {
|
|
32
|
-
SidebarSearchModal,
|
|
33
|
-
SearchContextProvider,
|
|
34
|
-
} from '@backstage/plugin-search';
|
|
31
|
+
import { SidebarSearchModal } from '@backstage/plugin-search';
|
|
35
32
|
import {
|
|
36
33
|
Sidebar,
|
|
37
34
|
sidebarConfig,
|
|
@@ -84,9 +81,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
|
|
|
84
81
|
<Sidebar>
|
|
85
82
|
<SidebarLogo />
|
|
86
83
|
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
|
|
87
|
-
<
|
|
88
|
-
<SidebarSearchModal />
|
|
89
|
-
</SearchContextProvider>{' '}
|
|
84
|
+
<SidebarSearchModal />
|
|
90
85
|
</SidebarGroup>
|
|
91
86
|
<SidebarDivider />
|
|
92
87
|
<SidebarGroup label="Menu" icon={<MenuIcon />}>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { makeStyles, Theme, Grid, List, Paper } from '@material-ui/core';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { CatalogSearchResultListItem } from '@backstage/plugin-catalog';
|
|
5
5
|
import {
|
|
6
6
|
catalogApiRef,
|
|
7
7
|
CATALOG_FILTER_EXISTS,
|
|
@@ -116,7 +116,7 @@ const SearchPage = () => {
|
|
|
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
122
|
/>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
#
|
|
10
10
|
# Once the commands have been run, you can build the image using `yarn build-image`
|
|
11
11
|
|
|
12
|
-
FROM node:
|
|
12
|
+
FROM node:16-bullseye-slim
|
|
13
13
|
|
|
14
14
|
WORKDIR /app
|
|
15
15
|
|
|
@@ -19,6 +19,12 @@ WORKDIR /app
|
|
|
19
19
|
COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
|
|
20
20
|
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
|
|
21
21
|
|
|
22
|
+
# install sqlite3 dependencies
|
|
23
|
+
RUN apt-get update && \
|
|
24
|
+
apt-get install -y libsqlite3-dev python3 cmake g++ && \
|
|
25
|
+
rm -rf /var/lib/apt/lists/* && \
|
|
26
|
+
yarn config set python /usr/bin/python3
|
|
27
|
+
|
|
22
28
|
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
|
|
23
29
|
|
|
24
30
|
# Then copy the rest of the backend bundle, along with any other files we might want.
|