@backstage/create-app 0.0.0-nightly-20220505023756 → 0.0.0-nightly-20220506023454

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-20220505023756
3
+ ## 0.0.0-nightly-20220506023454
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -94,6 +94,7 @@
94
94
 
95
95
  - 7b253072c6: Tweaked template to provide an example and guidance for how to configure sign-in in `packages/backend/src/plugins/auth.ts`. There is no need to add this to existing apps, but for more information about sign-in configuration, see https://backstage.io/docs/auth/identity-resolver.
96
96
  - cfc0f19699: Updated dependency `fs-extra` to `10.1.0`.
97
+ - 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.
97
98
  - 344ea56acc: Bump `commander` to version 9.1.0
98
99
  - 00fa0dada0: Removed the database choice from the `create-app` command.
99
100
 
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-20220505023756",
4
+ "version": "0.0.0-nightly-20220506023454",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -76,36 +76,28 @@ catalog:
76
76
  rules:
77
77
  - allow: [Component, System, API, Resource, Location]
78
78
  locations:
79
- # Backstage example components
80
- - type: url
81
- target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-components.yaml
79
+ # Local example data, file locations are relative to the backend process, typically `packages/backend`
80
+ - type: file
81
+ target: ../../examples/entities.yaml
82
82
 
83
- # Backstage example systems
84
- - type: url
85
- target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-systems.yaml
86
-
87
- # Backstage example APIs
88
- - type: url
89
- target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml
90
-
91
- # Backstage example resources
92
- - type: url
93
- target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-resources.yaml
94
-
95
- # Backstage example organization groups
96
- - type: url
97
- target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/org.yaml
98
-
99
- # Backstage example templates
100
- - type: url
101
- target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml
102
- rules:
103
- - allow: [Template]
104
- - type: url
105
- target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/springboot-grpc-template/template.yaml
83
+ # Local example template
84
+ - type: file
85
+ target: ../../examples/template/template.yaml
106
86
  rules:
107
87
  - allow: [Template]
108
- - type: url
109
- target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/docs-template/template.yaml
88
+
89
+ # Local example organizational data
90
+ - type: file
91
+ target: ../../examples/org.yaml
110
92
  rules:
111
- - allow: [Template]
93
+ - allow: [User, Group]
94
+
95
+ ## Uncomment these lines to add more example data
96
+ # - type: url
97
+ # target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
98
+
99
+ ## Uncomment these lines to add an example org
100
+ # - type: url
101
+ # target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
102
+ # rules:
103
+ # - allow: [User, Group]
@@ -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,8 @@
1
+ apiVersion: backstage.io/v1alpha1
2
+ kind: Component
3
+ metadata:
4
+ name: ${{ values.name | dump }}
5
+ spec:
6
+ type: service
7
+ owner: user:guest
8
+ lifecycle: experimental
@@ -0,0 +1 @@
1
+ console.log('Hello from ${{ values.name }}!');
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "${{ values.name }}",
3
+ "private": true,
4
+ "dependencies": {}
5
+ }
@@ -0,0 +1,74 @@
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
+ - id: publish
52
+ name: Publish
53
+ action: publish:github
54
+ input:
55
+ allowedHosts: ['github.com']
56
+ description: This is ${{ parameters.name }}
57
+ repoUrl: ${{ parameters.repoUrl }}
58
+
59
+ # The final step is to register our new component in the catalog.
60
+ - id: register
61
+ name: Register
62
+ action: catalog:register
63
+ input:
64
+ repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
65
+ catalogInfoPath: '/catalog-info.yaml'
66
+
67
+ # Outputs are displayed to the user after a successful execution of the template.
68
+ output:
69
+ links:
70
+ - title: Repository
71
+ url: ${{ steps.publish.output.remoteUrl }}
72
+ - title: Open in catalog
73
+ icon: catalog
74
+ entityRef: ${{ steps.register.output.entityRef }}