@backstage/create-app 0.7.1 → 0.7.2-next.1
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 +26 -0
- package/dist/createApp.cjs.js +2 -1
- package/dist/createApp.cjs.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/lib/tasks.cjs.js +2 -4
- package/dist/lib/tasks.cjs.js.map +1 -1
- package/dist/lib/versions.cjs.js +114 -106
- package/dist/lib/versions.cjs.js.map +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/dist/packages/app-defaults/package.json.cjs.js +1 -1
- package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
- package/dist/packages/catalog-client/package.json.cjs.js +1 -1
- package/dist/packages/cli/package.json.cjs.js +1 -1
- package/dist/packages/core-compat-api/package.json.cjs.js +6 -0
- package/dist/packages/core-compat-api/package.json.cjs.js.map +1 -0
- package/dist/packages/core-components/package.json.cjs.js +1 -1
- package/dist/packages/frontend-defaults/package.json.cjs.js +6 -0
- package/dist/packages/frontend-defaults/package.json.cjs.js.map +1 -0
- package/dist/packages/frontend-plugin-api/package.json.cjs.js +6 -0
- package/dist/packages/frontend-plugin-api/package.json.cjs.js.map +1 -0
- package/dist/packages/frontend-test-utils/package.json.cjs.js +6 -0
- package/dist/packages/frontend-test-utils/package.json.cjs.js.map +1 -0
- package/dist/packages/repo-tools/package.json.cjs.js +1 -1
- package/dist/packages/test-utils/package.json.cjs.js +1 -1
- package/dist/packages/theme/package.json.cjs.js +1 -1
- package/dist/packages/ui/package.json.cjs.js +1 -1
- package/dist/plugins/api-docs/package.json.cjs.js +1 -1
- package/dist/plugins/app-backend/package.json.cjs.js +1 -1
- package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
- package/dist/plugins/auth-backend-module-github-provider/package.json.cjs.js +1 -1
- package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
- package/dist/plugins/auth-node/package.json.cjs.js +1 -1
- package/dist/plugins/catalog/package.json.cjs.js +1 -1
- package/dist/plugins/catalog-backend/package.json.cjs.js +1 -1
- package/dist/plugins/catalog-backend-module-logs/package.json.cjs.js +1 -1
- package/dist/plugins/catalog-backend-module-scaffolder-entity-model/package.json.cjs.js +1 -1
- package/dist/plugins/catalog-graph/package.json.cjs.js +1 -1
- package/dist/plugins/catalog-import/package.json.cjs.js +1 -1
- package/dist/plugins/catalog-react/package.json.cjs.js +1 -1
- package/dist/plugins/kubernetes/package.json.cjs.js +1 -1
- package/dist/plugins/kubernetes-backend/package.json.cjs.js +1 -1
- package/dist/plugins/org/package.json.cjs.js +1 -1
- package/dist/plugins/permission-backend/package.json.cjs.js +1 -1
- package/dist/plugins/permission-backend-module-policy-allow-all/package.json.cjs.js +1 -1
- package/dist/plugins/permission-node/package.json.cjs.js +1 -1
- package/dist/plugins/proxy-backend/package.json.cjs.js +1 -1
- package/dist/plugins/scaffolder/package.json.cjs.js +1 -1
- package/dist/plugins/scaffolder-backend/package.json.cjs.js +1 -1
- package/dist/plugins/scaffolder-backend-module-github/package.json.cjs.js +1 -1
- package/dist/plugins/search/package.json.cjs.js +1 -1
- package/dist/plugins/search-backend/package.json.cjs.js +1 -1
- package/dist/plugins/search-backend-module-catalog/package.json.cjs.js +1 -1
- package/dist/plugins/search-backend-module-pg/package.json.cjs.js +1 -1
- package/dist/plugins/search-backend-module-techdocs/package.json.cjs.js +1 -1
- package/dist/plugins/search-backend-node/package.json.cjs.js +1 -1
- package/dist/plugins/search-react/package.json.cjs.js +1 -1
- package/dist/plugins/techdocs/package.json.cjs.js +1 -1
- package/dist/plugins/techdocs-backend/package.json.cjs.js +1 -1
- package/dist/plugins/techdocs-module-addons-contrib/package.json.cjs.js +1 -1
- package/dist/plugins/techdocs-react/package.json.cjs.js +1 -1
- package/dist/plugins/user-settings/package.json.cjs.js +1 -1
- package/package.json +4 -4
- package/templates/default-app/packages/backend/package.json.hbs +1 -1
- package/templates/next-app/.dockerignore +8 -0
- package/templates/next-app/.eslintignore +1 -0
- package/templates/next-app/.eslintrc.js.hbs +3 -0
- package/templates/next-app/.gitignore.hbs +56 -0
- package/templates/next-app/.prettierignore +4 -0
- package/templates/next-app/.yarn/releases/yarn-4.4.1.cjs +925 -0
- package/templates/next-app/.yarnrc.yml.hbs +3 -0
- package/templates/next-app/README.md +10 -0
- package/templates/next-app/app-config.production.yaml +55 -0
- package/templates/next-app/app-config.yaml.hbs +124 -0
- package/templates/next-app/backstage.json.hbs +3 -0
- package/templates/next-app/catalog-info.yaml.hbs +13 -0
- package/templates/next-app/examples/entities.yaml +41 -0
- package/templates/next-app/examples/org.yaml +17 -0
- package/templates/next-app/examples/template/content/catalog-info.yaml +8 -0
- package/templates/next-app/examples/template/content/index.js +1 -0
- package/templates/next-app/examples/template/content/package.json +5 -0
- package/templates/next-app/examples/template/template.yaml +76 -0
- package/templates/next-app/package.json.hbs +54 -0
- package/templates/next-app/packages/README.md +9 -0
- package/templates/next-app/packages/app/.eslintignore +1 -0
- package/templates/next-app/packages/app/.eslintrc.js.hbs +1 -0
- package/templates/next-app/packages/app/e2e-tests/app.test.ts +27 -0
- package/templates/next-app/packages/app/package.json.hbs +59 -0
- package/templates/next-app/packages/app/public/android-chrome-192x192.png +0 -0
- package/templates/next-app/packages/app/public/apple-touch-icon.png +0 -0
- package/templates/next-app/packages/app/public/favicon-16x16.png +0 -0
- package/templates/next-app/packages/app/public/favicon-32x32.png +0 -0
- package/templates/next-app/packages/app/public/favicon.ico +0 -0
- package/templates/next-app/packages/app/public/index.html +60 -0
- package/templates/next-app/packages/app/public/manifest.json +15 -0
- package/templates/next-app/packages/app/public/robots.txt +2 -0
- package/templates/next-app/packages/app/public/safari-pinned-tab.svg +1 -0
- package/templates/next-app/packages/app/src/App.test.tsx +28 -0
- package/templates/next-app/packages/app/src/App.tsx +7 -0
- package/templates/next-app/packages/app/src/index.tsx +6 -0
- package/templates/next-app/packages/app/src/modules/nav/LogoFull.tsx +28 -0
- package/templates/next-app/packages/app/src/modules/nav/LogoIcon.tsx +28 -0
- package/templates/next-app/packages/app/src/modules/nav/Sidebar.tsx +58 -0
- package/templates/next-app/packages/app/src/modules/nav/SidebarLogo.tsx +36 -0
- package/templates/next-app/packages/app/src/modules/nav/index.ts +7 -0
- package/templates/next-app/packages/app/src/setupTests.ts +1 -0
- package/templates/next-app/packages/backend/.eslintrc.js.hbs +1 -0
- package/templates/next-app/packages/backend/Dockerfile +70 -0
- package/templates/next-app/packages/backend/README.md +59 -0
- package/templates/next-app/packages/backend/package.json.hbs +54 -0
- package/templates/next-app/packages/backend/src/index.ts +55 -0
- package/templates/next-app/playwright.config.ts +60 -0
- package/templates/next-app/plugins/README.md +9 -0
- package/templates/next-app/tsconfig.json +17 -0
- package/templates/next-app/yarn.lock +12 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
app:
|
|
2
|
+
# Should be the same as backend.baseUrl when using the `app-backend` plugin.
|
|
3
|
+
baseUrl: http://localhost:7007
|
|
4
|
+
|
|
5
|
+
backend:
|
|
6
|
+
# Note that the baseUrl should be the URL that the browser and other clients
|
|
7
|
+
# should use when communicating with the backend, i.e. it needs to be
|
|
8
|
+
# reachable not just from within the backend host, but from all of your
|
|
9
|
+
# callers. When its value is "http://localhost:7007", it's strictly private
|
|
10
|
+
# and can't be reached by others.
|
|
11
|
+
baseUrl: http://localhost:7007
|
|
12
|
+
# The listener can also be expressed as a single <host>:<port> string. In this case we bind to
|
|
13
|
+
# all interfaces, the most permissive setting. The right value depends on your specific deployment.
|
|
14
|
+
listen: ':7007'
|
|
15
|
+
|
|
16
|
+
# config options: https://node-postgres.com/apis/client
|
|
17
|
+
database:
|
|
18
|
+
client: pg
|
|
19
|
+
connection:
|
|
20
|
+
host: ${POSTGRES_HOST}
|
|
21
|
+
port: ${POSTGRES_PORT}
|
|
22
|
+
user: ${POSTGRES_USER}
|
|
23
|
+
password: ${POSTGRES_PASSWORD}
|
|
24
|
+
# https://node-postgres.com/features/ssl
|
|
25
|
+
# you can set the sslmode configuration option via the `PGSSLMODE` environment variable
|
|
26
|
+
# see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
|
|
27
|
+
# ssl:
|
|
28
|
+
# ca: # if you have a CA file and want to verify it you can uncomment this section
|
|
29
|
+
# $file: <file-path>/ca/server.crt
|
|
30
|
+
|
|
31
|
+
auth:
|
|
32
|
+
providers:
|
|
33
|
+
guest: {}
|
|
34
|
+
|
|
35
|
+
catalog:
|
|
36
|
+
# Overrides the default list locations from app-config.yaml as these contain example data.
|
|
37
|
+
# See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details
|
|
38
|
+
# on how to get entities into the catalog.
|
|
39
|
+
locations:
|
|
40
|
+
# Local example data, replace this with your production config, these are intended for demo use only.
|
|
41
|
+
# File locations are relative to the backend process, typically in a deployed context, such as in a Docker container, this will be the root
|
|
42
|
+
- type: file
|
|
43
|
+
target: ./examples/entities.yaml
|
|
44
|
+
|
|
45
|
+
# Local example template
|
|
46
|
+
- type: file
|
|
47
|
+
target: ./examples/template/template.yaml
|
|
48
|
+
rules:
|
|
49
|
+
- allow: [Template]
|
|
50
|
+
|
|
51
|
+
# Local example organizational data
|
|
52
|
+
- type: file
|
|
53
|
+
target: ./examples/org.yaml
|
|
54
|
+
rules:
|
|
55
|
+
- allow: [User, Group]
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
app:
|
|
2
|
+
title: Scaffolded Backstage App
|
|
3
|
+
baseUrl: http://localhost:3000
|
|
4
|
+
|
|
5
|
+
experimental:
|
|
6
|
+
packages: all
|
|
7
|
+
|
|
8
|
+
extensions:
|
|
9
|
+
# Disable the nav items that we're manually rendering in packages/app/src/modules/nav/Sidebar.tsx
|
|
10
|
+
- nav-item:search: false
|
|
11
|
+
- nav-item:user-settings: false
|
|
12
|
+
- nav-item:catalog: false
|
|
13
|
+
- nav-item:scaffolder: false
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
organization:
|
|
17
|
+
name: My Company
|
|
18
|
+
|
|
19
|
+
backend:
|
|
20
|
+
# Used for enabling authentication, secret is shared by all backend plugins
|
|
21
|
+
# See https://backstage.io/docs/auth/service-to-service-auth for
|
|
22
|
+
# information on the format
|
|
23
|
+
# auth:
|
|
24
|
+
# keys:
|
|
25
|
+
# - secret: ${BACKEND_SECRET}
|
|
26
|
+
baseUrl: http://localhost:7007
|
|
27
|
+
listen:
|
|
28
|
+
port: 7007
|
|
29
|
+
# Uncomment the following host directive to bind to specific interfaces
|
|
30
|
+
# host: 127.0.0.1
|
|
31
|
+
csp:
|
|
32
|
+
connect-src: ["'self'", 'http:', 'https:']
|
|
33
|
+
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
|
|
34
|
+
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
|
|
35
|
+
cors:
|
|
36
|
+
origin: http://localhost:3000
|
|
37
|
+
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
|
|
38
|
+
credentials: true
|
|
39
|
+
# This is for local development only, it is not recommended to use this in production
|
|
40
|
+
# The production database configuration is stored in app-config.production.yaml
|
|
41
|
+
database:
|
|
42
|
+
client: better-sqlite3
|
|
43
|
+
connection: ':memory:'
|
|
44
|
+
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
|
|
45
|
+
|
|
46
|
+
integrations:
|
|
47
|
+
github:
|
|
48
|
+
- host: github.com
|
|
49
|
+
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
|
|
50
|
+
# about setting up the GitHub integration here: https://backstage.io/docs/integrations/github/locations#configuration
|
|
51
|
+
token: ${GITHUB_TOKEN}
|
|
52
|
+
### Example for how to add your GitHub Enterprise instance using the API:
|
|
53
|
+
# - host: ghe.example.net
|
|
54
|
+
# apiBaseUrl: https://ghe.example.net/api/v3
|
|
55
|
+
# token: ${GHE_TOKEN}
|
|
56
|
+
|
|
57
|
+
proxy:
|
|
58
|
+
### Example for how to add a proxy endpoint for the frontend.
|
|
59
|
+
### A typical reason to do this is to handle HTTPS and CORS for internal services.
|
|
60
|
+
# endpoints:
|
|
61
|
+
# '/test':
|
|
62
|
+
# target: 'https://example.com'
|
|
63
|
+
# changeOrigin: true
|
|
64
|
+
|
|
65
|
+
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
|
|
66
|
+
# Note: After experimenting with basic setup, use CI/CD to generate docs
|
|
67
|
+
# and an external cloud storage when deploying TechDocs for production use-case.
|
|
68
|
+
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
|
|
69
|
+
techdocs:
|
|
70
|
+
builder: 'local' # Alternatives - 'external'
|
|
71
|
+
generator:
|
|
72
|
+
runIn: 'docker' # Alternatives - 'local'
|
|
73
|
+
publisher:
|
|
74
|
+
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
|
|
75
|
+
|
|
76
|
+
auth:
|
|
77
|
+
# see https://backstage.io/docs/auth/ to learn about auth providers
|
|
78
|
+
providers:
|
|
79
|
+
# See https://backstage.io/docs/auth/guest/provider
|
|
80
|
+
guest: {}
|
|
81
|
+
|
|
82
|
+
scaffolder:
|
|
83
|
+
# see https://backstage.io/docs/features/software-templates/configuration for software template options
|
|
84
|
+
|
|
85
|
+
catalog:
|
|
86
|
+
import:
|
|
87
|
+
entityFilename: catalog-info.yaml
|
|
88
|
+
pullRequestBranchName: backstage-integration
|
|
89
|
+
rules:
|
|
90
|
+
- allow: [Component, System, API, Resource, Location]
|
|
91
|
+
locations:
|
|
92
|
+
# Local example data, file locations are relative to the backend process, typically `packages/backend`
|
|
93
|
+
- type: file
|
|
94
|
+
target: ../../examples/entities.yaml
|
|
95
|
+
|
|
96
|
+
# Local example template
|
|
97
|
+
- type: file
|
|
98
|
+
target: ../../examples/template/template.yaml
|
|
99
|
+
rules:
|
|
100
|
+
- allow: [Template]
|
|
101
|
+
|
|
102
|
+
# Local example organizational data
|
|
103
|
+
- type: file
|
|
104
|
+
target: ../../examples/org.yaml
|
|
105
|
+
rules:
|
|
106
|
+
- allow: [User, Group]
|
|
107
|
+
|
|
108
|
+
## Uncomment these lines to add more example data
|
|
109
|
+
# - type: url
|
|
110
|
+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
|
|
111
|
+
|
|
112
|
+
## Uncomment these lines to add an example org
|
|
113
|
+
# - type: url
|
|
114
|
+
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
|
|
115
|
+
# rules:
|
|
116
|
+
# - allow: [User, Group]
|
|
117
|
+
|
|
118
|
+
kubernetes:
|
|
119
|
+
# see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options
|
|
120
|
+
|
|
121
|
+
# see https://backstage.io/docs/permissions/getting-started for more on the permission framework
|
|
122
|
+
permission:
|
|
123
|
+
# setting this to `false` will disable permissions
|
|
124
|
+
enabled: true
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
apiVersion: backstage.io/v1alpha1
|
|
2
|
+
kind: Component
|
|
3
|
+
metadata:
|
|
4
|
+
name: {{name}}
|
|
5
|
+
description: An example of a Backstage application.
|
|
6
|
+
# Example for optional annotations
|
|
7
|
+
# annotations:
|
|
8
|
+
# github.com/project-slug: backstage/backstage
|
|
9
|
+
# backstage.io/techdocs-ref: dir:.
|
|
10
|
+
spec:
|
|
11
|
+
type: website
|
|
12
|
+
owner: john@example.com
|
|
13
|
+
lifecycle: experimental
|
|
@@ -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,76 @@
|
|
|
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
|
+
# If you or your organization prefer another default branch name over 'main'
|
|
52
|
+
# you can change that here.
|
|
53
|
+
- id: publish
|
|
54
|
+
name: Publish
|
|
55
|
+
action: publish:github
|
|
56
|
+
input:
|
|
57
|
+
description: This is ${{ parameters.name }}
|
|
58
|
+
repoUrl: ${{ parameters.repoUrl }}
|
|
59
|
+
defaultBranch: 'main'
|
|
60
|
+
|
|
61
|
+
# The final step is to register our new component in the catalog.
|
|
62
|
+
- id: register
|
|
63
|
+
name: Register
|
|
64
|
+
action: catalog:register
|
|
65
|
+
input:
|
|
66
|
+
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
|
|
67
|
+
catalogInfoPath: '/catalog-info.yaml'
|
|
68
|
+
|
|
69
|
+
# Outputs are displayed to the user after a successful execution of the template.
|
|
70
|
+
output:
|
|
71
|
+
links:
|
|
72
|
+
- title: Repository
|
|
73
|
+
url: ${{ steps['publish'].output.remoteUrl }}
|
|
74
|
+
- title: Open in catalog
|
|
75
|
+
icon: catalog
|
|
76
|
+
entityRef: ${{ steps['register'].output.entityRef }}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "root",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": "20 || 22"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "backstage-cli repo start",
|
|
10
|
+
"build:backend": "yarn workspace backend build",
|
|
11
|
+
"build:all": "backstage-cli repo build --all",
|
|
12
|
+
"build-image": "yarn workspace backend build-image",
|
|
13
|
+
"tsc": "tsc",
|
|
14
|
+
"tsc:full": "tsc --skipLibCheck false --incremental false",
|
|
15
|
+
"clean": "backstage-cli repo clean",
|
|
16
|
+
"test": "backstage-cli repo test",
|
|
17
|
+
"test:all": "backstage-cli repo test --coverage",
|
|
18
|
+
"test:e2e": "playwright test",
|
|
19
|
+
"fix": "backstage-cli repo fix",
|
|
20
|
+
"lint": "backstage-cli repo lint --since origin/{{defaultBranch}}",
|
|
21
|
+
"lint:all": "backstage-cli repo lint",
|
|
22
|
+
"prettier:check": "prettier --check .",
|
|
23
|
+
"new": "backstage-cli new"
|
|
24
|
+
},
|
|
25
|
+
"workspaces": {
|
|
26
|
+
"packages": [
|
|
27
|
+
"packages/*",
|
|
28
|
+
"plugins/*"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@backstage/cli": "^{{version '@backstage/cli'}}",
|
|
33
|
+
"@backstage/e2e-test-utils": "^{{version '@backstage/e2e-test-utils'}}",
|
|
34
|
+
"@playwright/test": "^1.32.3",
|
|
35
|
+
"node-gyp": "^10.0.0",
|
|
36
|
+
"prettier": "^2.3.2",
|
|
37
|
+
"typescript": "~5.8.0"
|
|
38
|
+
},
|
|
39
|
+
"resolutions": {
|
|
40
|
+
"@types/react": "^18",
|
|
41
|
+
"@types/react-dom": "^18"
|
|
42
|
+
},
|
|
43
|
+
"prettier": "@backstage/cli/config/prettier",
|
|
44
|
+
"lint-staged": {
|
|
45
|
+
"*.{js,jsx,ts,tsx,mjs,cjs}": [
|
|
46
|
+
"eslint --fix",
|
|
47
|
+
"prettier --write"
|
|
48
|
+
],
|
|
49
|
+
"*.{json,md}": [
|
|
50
|
+
"prettier --write"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"packageManager": "yarn@4.4.1"
|
|
54
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# The Packages Folder
|
|
2
|
+
|
|
3
|
+
This is where your own applications and centrally managed libraries live, each
|
|
4
|
+
in a separate folder of its own.
|
|
5
|
+
|
|
6
|
+
From the start there's an `app` folder (for the frontend) and a `backend` folder
|
|
7
|
+
(for the Node backend), but you can also add more modules in here that house
|
|
8
|
+
your core additions and adaptations, such as themes, common React component
|
|
9
|
+
libraries, utilities, and similar.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
public
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 The Backstage Authors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { test, expect } from '@playwright/test';
|
|
18
|
+
|
|
19
|
+
test('App should render the welcome page', async ({ page }) => {
|
|
20
|
+
await page.goto('/');
|
|
21
|
+
|
|
22
|
+
const enterButton = page.getByRole('button', { name: 'Enter' });
|
|
23
|
+
await expect(enterButton).toBeVisible();
|
|
24
|
+
await enterButton.click();
|
|
25
|
+
|
|
26
|
+
await expect(page.getByText('My Company Catalog')).toBeVisible();
|
|
27
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "app",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"bundled": true,
|
|
6
|
+
"backstage": {
|
|
7
|
+
"role": "frontend"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"start": "backstage-cli package start",
|
|
11
|
+
"build": "backstage-cli package build",
|
|
12
|
+
"clean": "backstage-cli package clean",
|
|
13
|
+
"test": "backstage-cli package test",
|
|
14
|
+
"lint": "backstage-cli package lint"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@backstage/core-compat-api": "^{{ version '@backstage/core-compat-api'}}",
|
|
18
|
+
"@backstage/frontend-defaults": "^{{ version '@backstage/frontend-defaults'}}",
|
|
19
|
+
"@backstage/frontend-plugin-api": "^{{ version '@backstage/frontend-plugin-api'}}",
|
|
20
|
+
"@backstage/plugin-catalog": "^{{ version '@backstage/plugin-catalog'}}",
|
|
21
|
+
"@backstage/plugin-org": "^{{ version '@backstage/plugin-org'}}",
|
|
22
|
+
"@backstage/plugin-scaffolder": "^{{ version '@backstage/plugin-scaffolder'}}",
|
|
23
|
+
"@backstage/plugin-search": "^{{ version '@backstage/plugin-search'}}",
|
|
24
|
+
"@backstage/plugin-user-settings": "^{{ version '@backstage/plugin-user-settings'}}",
|
|
25
|
+
"@backstage/core-components": "^{{ version '@backstage/core-components'}}",
|
|
26
|
+
"@backstage/ui": "^{{ version '@backstage/ui'}}",
|
|
27
|
+
"@material-ui/core": "^4.12.2",
|
|
28
|
+
"@material-ui/icons": "^4.9.1",
|
|
29
|
+
"react": "^18.0.2",
|
|
30
|
+
"react-dom": "^18.0.2",
|
|
31
|
+
"react-router": "^6.3.0",
|
|
32
|
+
"react-router-dom": "^6.3.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@backstage/frontend-test-utils": "^{{ version '@backstage/frontend-test-utils'}}",
|
|
36
|
+
"@playwright/test": "^1.32.3",
|
|
37
|
+
"@testing-library/dom": "^9.0.0",
|
|
38
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
39
|
+
"@testing-library/react": "^14.0.0",
|
|
40
|
+
"@testing-library/user-event": "^14.0.0",
|
|
41
|
+
"@types/react-dom": "*",
|
|
42
|
+
"cross-env": "^7.0.0"
|
|
43
|
+
},
|
|
44
|
+
"browserslist": {
|
|
45
|
+
"production": [
|
|
46
|
+
">0.2%",
|
|
47
|
+
"not dead",
|
|
48
|
+
"not op_mini all"
|
|
49
|
+
],
|
|
50
|
+
"development": [
|
|
51
|
+
"last 1 chrome version",
|
|
52
|
+
"last 1 firefox version",
|
|
53
|
+
"last 1 safari version"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"dist"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="theme-color" content="#000000" />
|
|
7
|
+
<meta
|
|
8
|
+
name="description"
|
|
9
|
+
content="Backstage is an open source framework for building developer portals"
|
|
10
|
+
/>
|
|
11
|
+
<!--
|
|
12
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
13
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
14
|
+
-->
|
|
15
|
+
<link
|
|
16
|
+
rel="manifest"
|
|
17
|
+
href="<%= publicPath %>/manifest.json"
|
|
18
|
+
crossorigin="use-credentials"
|
|
19
|
+
/>
|
|
20
|
+
<link rel="icon" href="<%= publicPath %>/favicon.ico" />
|
|
21
|
+
<link rel="shortcut icon" href="<%= publicPath %>/favicon.ico" />
|
|
22
|
+
<link
|
|
23
|
+
rel="apple-touch-icon"
|
|
24
|
+
sizes="180x180"
|
|
25
|
+
href="<%= publicPath %>/apple-touch-icon.png"
|
|
26
|
+
/>
|
|
27
|
+
<link
|
|
28
|
+
rel="icon"
|
|
29
|
+
type="image/png"
|
|
30
|
+
sizes="32x32"
|
|
31
|
+
href="<%= publicPath %>/favicon-32x32.png"
|
|
32
|
+
/>
|
|
33
|
+
<link
|
|
34
|
+
rel="icon"
|
|
35
|
+
type="image/png"
|
|
36
|
+
sizes="16x16"
|
|
37
|
+
href="<%= publicPath %>/favicon-16x16.png"
|
|
38
|
+
/>
|
|
39
|
+
<link
|
|
40
|
+
rel="mask-icon"
|
|
41
|
+
href="<%= publicPath %>/safari-pinned-tab.svg"
|
|
42
|
+
color="#5bbad5"
|
|
43
|
+
/>
|
|
44
|
+
<title><%= config.getOptionalString('app.title') ?? 'Backstage' %></title>
|
|
45
|
+
</head>
|
|
46
|
+
<body>
|
|
47
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
48
|
+
<div id="root"></div>
|
|
49
|
+
<!--
|
|
50
|
+
This HTML file is a template.
|
|
51
|
+
If you open it directly in the browser, you will see an empty page.
|
|
52
|
+
|
|
53
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
54
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
55
|
+
|
|
56
|
+
To begin the development, run `yarn start`.
|
|
57
|
+
To create a production bundle, use `yarn build`.
|
|
58
|
+
-->
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "Backstage",
|
|
3
|
+
"name": "Backstage",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "48x48",
|
|
8
|
+
"type": "image/png"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"start_url": "./index.html",
|
|
12
|
+
"display": "standalone",
|
|
13
|
+
"theme_color": "#000000",
|
|
14
|
+
"background_color": "#ffffff"
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="682.667" height="682.667" preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 512 512"><metadata>Created by potrace 1.11, written by Peter Selinger 2001-2013</metadata><g fill="#000" stroke="none"><path d="M492 4610 c-4 -3 -8 -882 -7 -1953 l0 -1948 850 2 c898 1 945 3 1118 49 505 134 823 531 829 1037 2 136 -9 212 -44 323 -40 125 -89 218 -163 310 -35 43 -126 128 -169 157 -22 15 -43 30 -46 33 -12 13 -131 70 -188 91 l-64 22 60 28 c171 77 317 224 403 404 64 136 92 266 91 425 -5 424 -245 770 -642 923 -79 30 -105 39 -155 50 -11 3 -38 10 -60 15 -22 6 -60 13 -85 17 -25 3 -58 9 -75 12 -36 8 -1643 11 -1653 3z m1497 -743 c236 -68 352 -254 305 -486 -26 -124 -110 -224 -232 -277 -92 -40 -151 -46 -439 -49 l-283 -3 -1 27 c-1 36 -1 760 0 790 l1 23 298 -5 c226 -4 310 -9 351 -20z m-82 -1538 c98 -3 174 -19 247 -52 169 -78 257 -212 258 -395 0 -116 -36 -221 -100 -293 -64 -72 -192 -135 -314 -155 -23 -3 -181 -7 -350 -8 l-308 -2 -1 26 c-6 210 1 874 9 879 9 5 366 6 559 0z" transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"/><path d="M4160 1789 c-275 -24 -499 -263 -503 -536 -1 -115 21 -212 66 -292 210 -369 697 -402 950 -65 77 103 110 199 111 329 0 50 -6 113 -13 140 -16 58 -62 155 -91 193 -33 43 -122 132 -132 132 -5 0 -26 11 -46 25 -85 56 -219 85 -342 74z" transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"/></g></svg>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { render, waitFor } from '@testing-library/react';
|
|
2
|
+
import App from './App';
|
|
3
|
+
|
|
4
|
+
describe('App', () => {
|
|
5
|
+
it('should render', async () => {
|
|
6
|
+
process.env = {
|
|
7
|
+
NODE_ENV: 'test',
|
|
8
|
+
APP_CONFIG: [
|
|
9
|
+
{
|
|
10
|
+
data: {
|
|
11
|
+
app: { title: 'Test' },
|
|
12
|
+
backend: { baseUrl: 'http://localhost:7007' },
|
|
13
|
+
techdocs: {
|
|
14
|
+
storageUrl: 'http://localhost:7007/api/techdocs/static/docs',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
context: 'test',
|
|
18
|
+
},
|
|
19
|
+
] as any,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const rendered = render(App.createRoot());
|
|
23
|
+
|
|
24
|
+
await waitFor(() => {
|
|
25
|
+
expect(rendered.baseElement).toBeInTheDocument();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
});
|