@backstage/create-app 0.5.19-next.2 → 0.5.19
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 +17 -0
- package/dist/index.cjs.js +48 -57
- package/dist/index.cjs.js.map +1 -1
- package/package.json +3 -3
- package/templates/default-app/.gitignore.hbs +1 -1
- package/templates/default-app/.yarn/releases/yarn-4.4.1.cjs +925 -0
- package/templates/default-app/package.json.hbs +3 -4
- package/templates/default-app/packages/app/package.json.hbs +1 -1
- package/templates/default-app/packages/backend/Dockerfile +16 -5
- package/templates/default-app/lerna.json +0 -6
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"node": "18 || 20"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"dev": "
|
|
9
|
+
"dev": "yarn workspaces foreach -A --include backend --include app --parallel -v -i run start",
|
|
10
10
|
"start": "yarn workspace app start",
|
|
11
11
|
"start-backend": "yarn workspace backend start",
|
|
12
12
|
"build:backend": "yarn workspace backend build",
|
|
@@ -35,8 +35,6 @@
|
|
|
35
35
|
"@backstage/e2e-test-utils": "^{{version '@backstage/e2e-test-utils'}}",
|
|
36
36
|
"@playwright/test": "^1.32.3",
|
|
37
37
|
"@spotify/prettier-config": "^12.0.0",
|
|
38
|
-
"concurrently": "^8.0.0",
|
|
39
|
-
"lerna": "^7.3.0",
|
|
40
38
|
"node-gyp": "^10.0.0",
|
|
41
39
|
"prettier": "^2.3.2",
|
|
42
40
|
"typescript": "~5.4.0"
|
|
@@ -54,5 +52,6 @@
|
|
|
54
52
|
"*.{json,md}": [
|
|
55
53
|
"prettier --write"
|
|
56
54
|
]
|
|
57
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"packageManager": "yarn@4.4.1"
|
|
58
57
|
}
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@backstage/test-utils": "^{{version '@backstage/test-utils'}}",
|
|
52
52
|
"@playwright/test": "^1.32.3",
|
|
53
|
+
"@testing-library/dom": "^9.0.0",
|
|
53
54
|
"@testing-library/jest-dom": "^6.0.0",
|
|
54
55
|
"@testing-library/react": "^14.0.0",
|
|
55
56
|
"@testing-library/user-event": "^14.0.0",
|
|
56
|
-
"@testing-library/dom": "^9.0.0",
|
|
57
57
|
"@types/react-dom": "*",
|
|
58
58
|
"cross-env": "^7.0.0"
|
|
59
59
|
},
|
|
@@ -3,27 +3,31 @@
|
|
|
3
3
|
#
|
|
4
4
|
# Before building this image, be sure to have run the following commands in the repo root:
|
|
5
5
|
#
|
|
6
|
-
# yarn install
|
|
6
|
+
# yarn install --immutable
|
|
7
7
|
# yarn tsc
|
|
8
8
|
# yarn build:backend
|
|
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:20-bookworm-slim
|
|
13
|
+
|
|
14
|
+
# Set Python interpreter for `node-gyp` to use
|
|
15
|
+
ENV PYTHON=/usr/bin/python3
|
|
13
16
|
|
|
14
17
|
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
|
|
15
18
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
16
19
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
17
20
|
apt-get update && \
|
|
18
21
|
apt-get install -y --no-install-recommends python3 g++ build-essential && \
|
|
19
|
-
|
|
22
|
+
rm -rf /var/lib/apt/lists/*
|
|
20
23
|
|
|
21
24
|
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
|
|
22
25
|
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
|
|
23
26
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
24
27
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
25
28
|
apt-get update && \
|
|
26
|
-
apt-get install -y --no-install-recommends libsqlite3-dev
|
|
29
|
+
apt-get install -y --no-install-recommends libsqlite3-dev && \
|
|
30
|
+
rm -rf /var/lib/apt/lists/*
|
|
27
31
|
|
|
28
32
|
# From here on we use the least-privileged `node` user to run the backend.
|
|
29
33
|
USER node
|
|
@@ -33,9 +37,16 @@ USER node
|
|
|
33
37
|
# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`) so the app dir is correctly created as `node`.
|
|
34
38
|
WORKDIR /app
|
|
35
39
|
|
|
40
|
+
# Copy files needed by Yarn
|
|
41
|
+
COPY --chown=node:node .yarn ./.yarn
|
|
42
|
+
COPY --chown=node:node .yarnrc.yml ./
|
|
43
|
+
|
|
36
44
|
# This switches many Node.js dependencies to production mode.
|
|
37
45
|
ENV NODE_ENV=production
|
|
38
46
|
|
|
47
|
+
# This disables node snapshot for Node 20 to work with the Scaffolder
|
|
48
|
+
ENV NODE_OPTIONS "--no-node-snapshot"
|
|
49
|
+
|
|
39
50
|
# Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
|
|
40
51
|
# The skeleton contains the package.json of each package in the monorepo,
|
|
41
52
|
# and along with yarn.lock and the root package.json, that's enough to run yarn install.
|
|
@@ -43,7 +54,7 @@ COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar
|
|
|
43
54
|
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
|
|
44
55
|
|
|
45
56
|
RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \
|
|
46
|
-
yarn
|
|
57
|
+
yarn workspaces focus --all --production && rm -rf "$(yarn cache clean)"
|
|
47
58
|
|
|
48
59
|
# This will include the examples, if you don't need these simply remove this line
|
|
49
60
|
COPY --chown=node:node examples ./examples
|