@backstage/cli-module-new 0.1.1 → 0.1.2

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +33 -2
  2. package/dist/lib/execution/executePortableTemplate.cjs.js +4 -4
  3. package/dist/lib/execution/executePortableTemplate.cjs.js.map +1 -1
  4. package/dist/lib/preparation/loadPortableTemplate.cjs.js +8 -8
  5. package/dist/lib/preparation/loadPortableTemplate.cjs.js.map +1 -1
  6. package/dist/lib/preparation/loadPortableTemplateConfig.cjs.js +19 -19
  7. package/dist/lib/preparation/loadPortableTemplateConfig.cjs.js.map +1 -1
  8. package/dist/lib/version.cjs.js +38 -36
  9. package/dist/lib/version.cjs.js.map +1 -1
  10. package/dist/packages/backend-defaults/package.json.cjs.js +1 -1
  11. package/dist/packages/backend-plugin-api/package.json.cjs.js +1 -1
  12. package/dist/packages/backend-test-utils/package.json.cjs.js +1 -1
  13. package/dist/packages/catalog-client/package.json.cjs.js +1 -1
  14. package/dist/packages/cli/package.json.cjs.js +1 -1
  15. package/dist/packages/cli-module-new/package.json.cjs.js +1 -1
  16. package/dist/packages/config/package.json.cjs.js +1 -1
  17. package/dist/packages/core-app-api/package.json.cjs.js +1 -1
  18. package/dist/packages/core-components/package.json.cjs.js +1 -1
  19. package/dist/packages/core-plugin-api/package.json.cjs.js +1 -1
  20. package/dist/packages/dev-utils/package.json.cjs.js +1 -1
  21. package/dist/packages/errors/package.json.cjs.js +1 -1
  22. package/dist/packages/frontend-defaults/package.json.cjs.js +1 -1
  23. package/dist/packages/frontend-dev-utils/package.json.cjs.js +1 -1
  24. package/dist/packages/frontend-plugin-api/package.json.cjs.js +1 -1
  25. package/dist/packages/frontend-test-utils/package.json.cjs.js +1 -1
  26. package/dist/packages/test-utils/package.json.cjs.js +1 -1
  27. package/dist/packages/theme/package.json.cjs.js +1 -1
  28. package/dist/packages/ui/package.json.cjs.js +6 -0
  29. package/dist/packages/ui/package.json.cjs.js.map +1 -0
  30. package/dist/plugins/auth-backend/package.json.cjs.js +1 -1
  31. package/dist/plugins/auth-backend-module-guest-provider/package.json.cjs.js +1 -1
  32. package/dist/plugins/catalog-node/package.json.cjs.js +1 -1
  33. package/dist/plugins/scaffolder-node/package.json.cjs.js +1 -1
  34. package/dist/plugins/scaffolder-node-test-utils/package.json.cjs.js +1 -1
  35. package/package.json +8 -8
  36. package/templates/frontend-plugin/README.md.hbs +1 -1
  37. package/templates/frontend-plugin/package.json.hbs +1 -3
  38. package/templates/frontend-plugin/src/components/TodoList/TodoList.test.tsx +18 -0
  39. package/templates/frontend-plugin/src/components/TodoList/TodoList.tsx +42 -0
  40. package/templates/frontend-plugin/src/components/TodoList/index.ts +2 -0
  41. package/templates/frontend-plugin/src/components/TodoPage/TodoPage.test.tsx.hbs +43 -0
  42. package/templates/frontend-plugin/src/components/TodoPage/TodoPage.tsx.hbs +52 -0
  43. package/templates/frontend-plugin/src/components/TodoPage/index.ts +1 -0
  44. package/templates/frontend-plugin/src/plugin.tsx.hbs +3 -3
  45. package/templates/frontend-plugin-module/src/index.ts.hbs +1 -1
  46. package/templates/legacy-frontend-plugin/portable-template.yaml +1 -1
  47. package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.test.tsx.hbs +0 -28
  48. package/templates/frontend-plugin/src/components/ExampleComponent/ExampleComponent.tsx.hbs +0 -37
  49. package/templates/frontend-plugin/src/components/ExampleComponent/index.ts +0 -1
  50. package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.test.tsx.hbs +0 -19
  51. package/templates/frontend-plugin/src/components/ExampleFetchComponent/ExampleFetchComponent.tsx.hbs +0 -308
  52. package/templates/frontend-plugin/src/components/ExampleFetchComponent/index.ts +0 -1
@@ -1,308 +0,0 @@
1
- import { makeStyles } from '@material-ui/core/styles';
2
- import {
3
- Table,
4
- TableColumn,
5
- Progress,
6
- ResponseErrorPanel,
7
- } from '@backstage/core-components';
8
- import useAsync from 'react-use/lib/useAsync';
9
-
10
- export const exampleUsers = {
11
- results: [
12
- {
13
- gender: 'female',
14
- name: {
15
- title: 'Miss',
16
- first: 'Carolyn',
17
- last: 'Moore',
18
- },
19
- email: 'carolyn.moore@example.com',
20
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Carolyn',
21
- nat: 'GB',
22
- },
23
- {
24
- gender: 'female',
25
- name: {
26
- title: 'Ms',
27
- first: 'Esma',
28
- last: 'Berberoğlu',
29
- },
30
- email: 'esma.berberoglu@example.com',
31
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Esma',
32
- nat: 'TR',
33
- },
34
- {
35
- gender: 'female',
36
- name: {
37
- title: 'Ms',
38
- first: 'Isabella',
39
- last: 'Rhodes',
40
- },
41
- email: 'isabella.rhodes@example.com',
42
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella',
43
- nat: 'GB',
44
- },
45
- {
46
- gender: 'male',
47
- name: {
48
- title: 'Mr',
49
- first: 'Derrick',
50
- last: 'Carter',
51
- },
52
- email: 'derrick.carter@example.com',
53
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Derrick',
54
- nat: 'IE',
55
- },
56
- {
57
- gender: 'female',
58
- name: {
59
- title: 'Miss',
60
- first: 'Mattie',
61
- last: 'Lambert',
62
- },
63
- email: 'mattie.lambert@example.com',
64
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mattie',
65
- nat: 'AU',
66
- },
67
- {
68
- gender: 'male',
69
- name: {
70
- title: 'Mr',
71
- first: 'Mijat',
72
- last: 'Rakić',
73
- },
74
- email: 'mijat.rakic@example.com',
75
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mijat',
76
- nat: 'RS',
77
- },
78
- {
79
- gender: 'male',
80
- name: {
81
- title: 'Mr',
82
- first: 'Javier',
83
- last: 'Reid',
84
- },
85
- email: 'javier.reid@example.com',
86
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Javier',
87
- nat: 'US',
88
- },
89
- {
90
- gender: 'female',
91
- name: {
92
- title: 'Ms',
93
- first: 'Isabella',
94
- last: 'Li',
95
- },
96
- email: 'isabella.li@example.com',
97
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Isabella',
98
- nat: 'CA',
99
- },
100
- {
101
- gender: 'female',
102
- name: {
103
- title: 'Mrs',
104
- first: 'Stephanie',
105
- last: 'Garrett',
106
- },
107
- email: 'stephanie.garrett@example.com',
108
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Stephanie',
109
- nat: 'AU',
110
- },
111
- {
112
- gender: 'female',
113
- name: {
114
- title: 'Ms',
115
- first: 'Antonia',
116
- last: 'Núñez',
117
- },
118
- email: 'antonia.nunez@example.com',
119
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Antonia',
120
- nat: 'ES',
121
- },
122
- {
123
- gender: 'male',
124
- name: {
125
- title: 'Mr',
126
- first: 'Donald',
127
- last: 'Young',
128
- },
129
- email: 'donald.young@example.com',
130
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Donald',
131
- nat: 'US',
132
- },
133
- {
134
- gender: 'male',
135
- name: {
136
- title: 'Mr',
137
- first: 'Iegor',
138
- last: 'Holodovskiy',
139
- },
140
- email: 'iegor.holodovskiy@example.com',
141
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Iegor',
142
- nat: 'UA',
143
- },
144
- {
145
- gender: 'female',
146
- name: {
147
- title: 'Madame',
148
- first: 'Jessica',
149
- last: 'David',
150
- },
151
- email: 'jessica.david@example.com',
152
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jessica',
153
- nat: 'CH',
154
- },
155
- {
156
- gender: 'female',
157
- name: {
158
- title: 'Ms',
159
- first: 'Eve',
160
- last: 'Martinez',
161
- },
162
- email: 'eve.martinez@example.com',
163
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Eve',
164
- nat: 'FR',
165
- },
166
- {
167
- gender: 'male',
168
- name: {
169
- title: 'Mr',
170
- first: 'Caleb',
171
- last: 'Silva',
172
- },
173
- email: 'caleb.silva@example.com',
174
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Caleb',
175
- nat: 'US',
176
- },
177
- {
178
- gender: 'female',
179
- name: {
180
- title: 'Miss',
181
- first: 'Marcia',
182
- last: 'Jenkins',
183
- },
184
- email: 'marcia.jenkins@example.com',
185
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Marcia',
186
- nat: 'US',
187
- },
188
- {
189
- gender: 'female',
190
- name: {
191
- title: 'Mrs',
192
- first: 'Mackenzie',
193
- last: 'Jones',
194
- },
195
- email: 'mackenzie.jones@example.com',
196
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Mackenzie',
197
- nat: 'NZ',
198
- },
199
- {
200
- gender: 'male',
201
- name: {
202
- title: 'Mr',
203
- first: 'Jeremiah',
204
- last: 'Gutierrez',
205
- },
206
- email: 'jeremiah.gutierrez@example.com',
207
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Jeremiah',
208
- nat: 'AU',
209
- },
210
- {
211
- gender: 'female',
212
- name: {
213
- title: 'Ms',
214
- first: 'Luciara',
215
- last: 'Souza',
216
- },
217
- email: 'luciara.souza@example.com',
218
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Luciara',
219
- nat: 'BR',
220
- },
221
- {
222
- gender: 'male',
223
- name: {
224
- title: 'Mr',
225
- first: 'Valgi',
226
- last: 'da Cunha',
227
- },
228
- email: 'valgi.dacunha@example.com',
229
- picture: 'https://api.dicebear.com/6.x/open-peeps/svg?seed=Valgi',
230
- nat: 'BR',
231
- },
232
- ],
233
- };
234
-
235
- const useStyles = makeStyles({
236
- avatar: {
237
- height: 32,
238
- width: 32,
239
- borderRadius: '50%',
240
- },
241
- });
242
-
243
- type User = {
244
- gender: string; // "male"
245
- name: {
246
- title: string; // "Mr",
247
- first: string; // "Duane",
248
- last: string; // "Reed"
249
- };
250
- email: string; // "duane.reed@example.com"
251
- picture: string; // "https://api.dicebear.com/6.x/open-peeps/svg?seed=Duane"
252
- nat: string; // "AU"
253
- };
254
-
255
- type DenseTableProps = {
256
- users: User[];
257
- };
258
-
259
- export const DenseTable = ({ users }: DenseTableProps) => {
260
- const classes = useStyles();
261
-
262
- const columns: TableColumn[] = [
263
- { title: 'Avatar', field: 'avatar' },
264
- { title: 'Name', field: 'name' },
265
- { title: 'Email', field: 'email' },
266
- { title: 'Nationality', field: 'nationality' },
267
- ];
268
-
269
- const data = users.map(user => {
270
- return {
271
- avatar: (
272
- <img
273
- src={user.picture}
274
- className={classes.avatar}
275
- alt={user.name.first}
276
- />
277
- ),
278
- name: `${user.name.first} ${user.name.last}`,
279
- email: user.email,
280
- nationality: user.nat,
281
- };
282
- });
283
-
284
- return (
285
- <Table
286
- title="Example User List"
287
- options=\{{ search: false, paging: false }}
288
- columns={columns}
289
- data={data}
290
- />
291
- );
292
- };
293
-
294
- export const ExampleFetchComponent = () => {
295
-
296
- const { value, loading, error } = useAsync(async (): Promise<User[]> => {
297
- // Would use fetch in a real world example
298
- return exampleUsers.results;
299
- }, []);
300
-
301
- if (loading) {
302
- return <Progress />;
303
- } else if (error) {
304
- return <ResponseErrorPanel error={error} />;
305
- }
306
-
307
- return <DenseTable users={value || []} />;
308
- };
@@ -1 +0,0 @@
1
- export { ExampleFetchComponent } from './ExampleFetchComponent';