@backstage/create-app 0.4.30 → 0.4.31-next.0

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,5 +1,99 @@
1
1
  # @backstage/create-app
2
2
 
3
+ ## 0.4.31-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - e83de28e36: Fix typo in the documentation
8
+ - 208d6780c9: The `packages/backend/Dockerfile` received a couple of updates, it now looks as follows:
9
+
10
+ ```Dockerfile
11
+ FROM node:16-bullseye-slim
12
+
13
+ # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
14
+ # in which case you should also move better-sqlite3 to "devDependencies" in package.json.
15
+ RUN apt-get update && \
16
+ apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential && \
17
+ rm -rf /var/lib/apt/lists/* && \
18
+ yarn config set python /usr/bin/python3
19
+
20
+ # From here on we use the least-privileged `node` user to run the backend.
21
+ USER node
22
+ WORKDIR /app
23
+
24
+ # This switches many Node.js dependencies to production mode.
25
+ ENV NODE_ENV production
26
+
27
+ # Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
28
+ # The skeleton contains the package.json of each package in the monorepo,
29
+ # and along with yarn.lock and the root package.json, that's enough to run yarn install.
30
+ COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
31
+ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
32
+
33
+ RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
34
+
35
+ # Then copy the rest of the backend bundle, along with any other files we might want.
36
+ COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./
37
+ RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
38
+
39
+ CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"]
40
+ ```
41
+
42
+ The two notable changes are that a `USER node` instruction has been added and the ordering of instructions has been changed accordingly. This means that the app will now be running using the least-privileged `node` user. In order for this to work we now need to make sure that all app files are owned by the `node` user, which we do by adding the `--chown=node:node` option to the `COPY` instructions.
43
+
44
+ The second change is the addition of `ENV NODE_ENV production`, which ensured that all Node.js modules run in production mode. If you apply this change to an existing app, note that one of the more significant changes is that this switches the log formatting to use the default production format, JSON. Rather than your log lines looking like this:
45
+
46
+ ```log
47
+ 2022-08-10T11:36:05.478Z catalog info Performing database migration type=plugin
48
+ ```
49
+
50
+ They will now look like this:
51
+
52
+ ```log
53
+ {"level":"info","message":"Performing database migration","plugin":"catalog","service":"backstage","type":"plugin"}
54
+ ```
55
+
56
+ If you wish to keep the existing format, you can override this change by applying the following change to `packages/backend/src/index.ts`:
57
+
58
+ ```diff
59
+ getRootLogger,
60
+ + setRootLogger,
61
+ + createRootLogger,
62
+ + coloredFormat,
63
+ useHotMemoize,
64
+ ...
65
+ ServerTokenManager,
66
+ } from '@backstage/backend-common';
67
+
68
+ ...
69
+
70
+ async function main() {
71
+ + setRootLogger(createRootLogger({ format: coloredFormat }));
72
+ +
73
+ const config = await loadBackendConfig({
74
+ ```
75
+
76
+ - c0a08fd08c: Added `EntityLinksCard` to the system `EntityPage`.
77
+
78
+ For an existing installation where you want to display the links card for entity pages of kind `system` you should make the following adjustment to `packages/app/src/components/catalog/EntityPage.tsx`
79
+
80
+ ```diff
81
+ const systemPage = (
82
+ ...
83
+ <Grid item md={6} xs={12}>
84
+ <EntityCatalogGraphCard variant="gridItem" height={400} />
85
+ </Grid>
86
+ + <Grid item md={4} xs={12}>
87
+ + <EntityLinksCard />
88
+ + </Grid>
89
+ - <Grid item md={6}>
90
+ + <Grid item md={8}>
91
+ <EntityHasComponentsCard variant="gridItem" />
92
+ </Grid>
93
+ ...
94
+ );
95
+ ```
96
+
3
97
  ## 0.4.30
4
98
 
5
99
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -57,99 +57,99 @@ ${chalk__default["default"].red(`${error}`)}
57
57
  }
58
58
  }
59
59
 
60
- var version$K = "1.5.0";
60
+ var version$K = "1.6.0-next.0";
61
61
 
62
- var version$J = "1.0.5";
62
+ var version$J = "1.0.6-next.0";
63
63
 
64
- var version$I = "0.15.0";
64
+ var version$I = "0.15.1-next.0";
65
65
 
66
- var version$H = "0.3.4";
66
+ var version$H = "0.3.5-next.0";
67
67
 
68
- var version$G = "1.0.4";
68
+ var version$G = "1.0.5-next.0";
69
69
 
70
70
  var version$F = "1.1.0";
71
71
 
72
- var version$E = "0.18.1";
72
+ var version$E = "0.18.2-next.0";
73
73
 
74
74
  var version$D = "1.0.1";
75
75
 
76
- var version$C = "1.0.5";
76
+ var version$C = "1.0.6-next.0";
77
77
 
78
- var version$B = "0.11.0";
78
+ var version$B = "0.11.1-next.0";
79
79
 
80
- var version$A = "1.0.5";
80
+ var version$A = "1.0.6-next.0";
81
81
 
82
82
  var version$z = "1.1.0";
83
83
 
84
- var version$y = "1.1.3";
84
+ var version$y = "1.1.4-next.0";
85
85
 
86
- var version$x = "1.1.3";
86
+ var version$x = "1.1.4-next.0";
87
87
 
88
88
  var version$w = "0.2.16";
89
89
 
90
- var version$v = "0.8.8";
90
+ var version$v = "0.8.9-next.0";
91
91
 
92
- var version$u = "0.3.35";
92
+ var version$u = "0.3.36-next.0";
93
93
 
94
- var version$t = "0.15.1";
94
+ var version$t = "0.15.2-next.0";
95
95
 
96
- var version$s = "1.5.0";
96
+ var version$s = "1.5.1-next.0";
97
97
 
98
- var version$r = "1.0.5";
98
+ var version$r = "1.0.6-next.0";
99
99
 
100
- var version$q = "1.1.3";
100
+ var version$q = "1.1.4-next.0";
101
101
 
102
- var version$p = "1.3.1";
102
+ var version$p = "1.3.2-next.0";
103
103
 
104
- var version$o = "0.2.20";
104
+ var version$o = "0.2.21-next.0";
105
105
 
106
- var version$n = "0.8.11";
106
+ var version$n = "0.8.12-next.0";
107
107
 
108
- var version$m = "0.3.8";
108
+ var version$m = "0.3.9-next.0";
109
109
 
110
- var version$l = "0.3.39";
110
+ var version$l = "0.3.40-next.0";
111
111
 
112
- var version$k = "0.5.8";
112
+ var version$k = "0.5.9-next.0";
113
113
 
114
- var version$j = "0.3.8";
114
+ var version$j = "0.3.9-next.0";
115
115
 
116
- var version$i = "0.5.8";
116
+ var version$i = "0.5.9-next.0";
117
117
 
118
- var version$h = "0.6.3";
118
+ var version$h = "0.6.4-next.0";
119
119
 
120
- var version$g = "0.4.4";
120
+ var version$g = "0.4.5-next.0";
121
121
 
122
- var version$f = "0.6.4";
122
+ var version$f = "0.6.5-next.0";
123
123
 
124
- var version$e = "0.2.29";
124
+ var version$e = "0.2.30-next.0";
125
125
 
126
- var version$d = "0.1.32";
126
+ var version$d = "0.1.33-next.0";
127
127
 
128
- var version$c = "1.5.0";
128
+ var version$c = "1.6.0-next.0";
129
129
 
130
- var version$b = "1.5.0";
130
+ var version$b = "1.6.0-next.0";
131
131
 
132
- var version$a = "1.0.1";
132
+ var version$a = "1.0.2-next.0";
133
133
 
134
- var version$9 = "1.0.1";
134
+ var version$9 = "1.0.2-next.0";
135
135
 
136
- var version$8 = "1.0.1";
136
+ var version$8 = "1.0.2-next.0";
137
137
 
138
- var version$7 = "0.3.6";
138
+ var version$7 = "0.4.0-next.0";
139
139
 
140
- var version$6 = "1.0.1";
140
+ var version$6 = "1.0.2-next.0";
141
141
 
142
- var version$5 = "0.5.15";
142
+ var version$5 = "0.5.16-next.0";
143
143
 
144
- var version$4 = "1.3.1";
144
+ var version$4 = "1.3.2-next.0";
145
145
 
146
- var version$3 = "1.0.3";
146
+ var version$3 = "1.0.4-next.0";
147
147
 
148
- var version$2 = "1.0.3";
148
+ var version$2 = "1.0.4-next.0";
149
149
 
150
- var version$1 = "1.2.1";
150
+ var version$1 = "1.2.2-next.0";
151
151
 
152
- var version = "0.4.7";
152
+ var version = "0.4.8-next.0";
153
153
 
154
154
  const packageVersions = {
155
155
  root: version$K,
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.30",
4
+ "version": "0.4.31-next.0",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -60,5 +60,5 @@
60
60
  "dist",
61
61
  "templates"
62
62
  ],
63
- "gitHead": "a12f6269e3bf224aa7f52475be9152bc52addeed"
63
+ "gitHead": "c6c0b1978a7ab4d29d813996c56beb7e6b48a268"
64
64
  }
@@ -324,7 +324,10 @@ const systemPage = (
324
324
  <Grid item md={6} xs={12}>
325
325
  <EntityCatalogGraphCard variant="gridItem" height={400} />
326
326
  </Grid>
327
- <Grid item md={6}>
327
+ <Grid item md={4} xs={12}>
328
+ <EntityLinksCard />
329
+ </Grid>
330
+ <Grid item md={8}>
328
331
  <EntityHasComponentsCard variant="gridItem" />
329
332
  </Grid>
330
333
  <Grid item md={6}>
@@ -11,8 +11,6 @@
11
11
 
12
12
  FROM node:16-bullseye-slim
13
13
 
14
- WORKDIR /app
15
-
16
14
  # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
17
15
  # in which case you should also move better-sqlite3 to "devDependencies" in package.json.
18
16
  RUN apt-get update && \
@@ -20,16 +18,23 @@ RUN apt-get update && \
20
18
  rm -rf /var/lib/apt/lists/* && \
21
19
  yarn config set python /usr/bin/python3
22
20
 
21
+ # From here on we use the least-privileged `node` user to run the backend.
22
+ USER node
23
+ WORKDIR /app
24
+
25
+ # This switches many Node.js dependencies to production mode.
26
+ ENV NODE_ENV production
27
+
23
28
  # Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
24
29
  # The skeleton contains the package.json of each package in the monorepo,
25
30
  # and along with yarn.lock and the root package.json, that's enough to run yarn install.
26
- COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
31
+ COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
27
32
  RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
28
33
 
29
34
  RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
30
35
 
31
36
  # Then copy the rest of the backend bundle, along with any other files we might want.
32
- COPY packages/backend/dist/bundle.tar.gz app-config*.yaml ./
37
+ COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./
33
38
  RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
34
39
 
35
40
  CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"]
@@ -25,7 +25,7 @@ export default async function createPlugin(
25
25
  // This particular resolver makes all users share a single "guest" identity.
26
26
  // It should only be used for testing and trying out Backstage.
27
27
  //
28
- // If you want to use a production ready resolver you can switch to the
28
+ // If you want to use a production ready resolver you can switch to
29
29
  // the one that is commented out below, it looks up a user entity in the
30
30
  // catalog using the GitHub username of the authenticated user.
31
31
  // That resolver requires you to have user entities populated in the catalog,