@alepha/devtools 0.10.6 → 0.11.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/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -16
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
- package/src/DevCollectorProvider.ts +249 -245
- package/src/index.ts +3 -3
- package/src/schemas/DevActionMetadata.ts +16 -16
- package/src/schemas/DevBucketMetadata.ts +5 -5
- package/src/schemas/DevCacheMetadata.ts +4 -4
- package/src/schemas/DevLogEntry.ts +3 -3
- package/src/schemas/DevMetadata.ts +11 -11
- package/src/schemas/DevModuleMetadata.ts +2 -2
- package/src/schemas/DevPageMetadata.ts +15 -15
- package/src/schemas/DevProviderMetadata.ts +4 -4
- package/src/schemas/DevQueueMetadata.ts +4 -4
- package/src/schemas/DevRealmMetadata.ts +13 -13
- package/src/schemas/DevSchedulerMetadata.ts +5 -5
- package/src/schemas/DevTopicMetadata.ts +4 -4
|
@@ -23,249 +23,253 @@ import type { DevSchedulerMetadata } from "./schemas/DevSchedulerMetadata.ts";
|
|
|
23
23
|
import type { DevTopicMetadata } from "./schemas/DevTopicMetadata.ts";
|
|
24
24
|
|
|
25
25
|
export class DevCollectorProvider {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
26
|
+
protected readonly alepha = $inject(Alepha);
|
|
27
|
+
protected readonly logs: DevLogEntry[] = [];
|
|
28
|
+
protected readonly maxLogs = 10000;
|
|
29
|
+
|
|
30
|
+
protected readonly onLog = $hook({
|
|
31
|
+
on: "log",
|
|
32
|
+
handler: (ev: { message: string; entry: LogEntry }) => {
|
|
33
|
+
this.logs.push({
|
|
34
|
+
formatted: ev.message,
|
|
35
|
+
entry: ev.entry,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Keep only the last 10000 logs
|
|
39
|
+
if (this.logs.length > this.maxLogs) {
|
|
40
|
+
this.logs.shift();
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
protected readonly uiRoute = $route({
|
|
46
|
+
method: "GET",
|
|
47
|
+
path: "/devtools",
|
|
48
|
+
schema: {
|
|
49
|
+
response: t.text(),
|
|
50
|
+
},
|
|
51
|
+
handler: () => {
|
|
52
|
+
return ui;
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
protected readonly metadataRoute = $route({
|
|
57
|
+
method: "GET",
|
|
58
|
+
path: "/devtools/metadata",
|
|
59
|
+
schema: {
|
|
60
|
+
response: devMetadataSchema,
|
|
61
|
+
},
|
|
62
|
+
handler: () => {
|
|
63
|
+
return this.getMetadata();
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
protected readonly logsRoute = $route({
|
|
68
|
+
method: "GET",
|
|
69
|
+
path: "/devtools/logs",
|
|
70
|
+
schema: {
|
|
71
|
+
response: t.array(
|
|
72
|
+
t.object({
|
|
73
|
+
formatted: t.text(),
|
|
74
|
+
entry: t.any(),
|
|
75
|
+
}),
|
|
76
|
+
),
|
|
77
|
+
},
|
|
78
|
+
handler: () => {
|
|
79
|
+
return this.getLogs();
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
public getLogs(): DevLogEntry[] {
|
|
84
|
+
return this.logs;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
88
|
+
|
|
89
|
+
public getActions(): DevActionMetadata[] {
|
|
90
|
+
const actionDescriptors = this.alepha.descriptors($action);
|
|
91
|
+
|
|
92
|
+
return actionDescriptors.map((action) => {
|
|
93
|
+
const schema = action.schema;
|
|
94
|
+
const options = action.options as any; // Allow accessing augmented properties
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
name: action.name,
|
|
98
|
+
group: action.group,
|
|
99
|
+
method: action.method,
|
|
100
|
+
path: action.path,
|
|
101
|
+
prefix: action.prefix,
|
|
102
|
+
fullPath: action.route.path,
|
|
103
|
+
description: action.options.description,
|
|
104
|
+
summary: options.summary,
|
|
105
|
+
disabled: action.options.disabled,
|
|
106
|
+
secure: options.secure,
|
|
107
|
+
hide: options.hide,
|
|
108
|
+
body: schema?.body,
|
|
109
|
+
params: schema?.params,
|
|
110
|
+
query: schema?.query,
|
|
111
|
+
response: schema?.response,
|
|
112
|
+
bodyContentType: action.getBodyContentType(),
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
public getQueues(): DevQueueMetadata[] {
|
|
118
|
+
const queueDescriptors = this.alepha.descriptors($queue);
|
|
119
|
+
|
|
120
|
+
return queueDescriptors.map((queue) => ({
|
|
121
|
+
name: queue.name,
|
|
122
|
+
description: queue.options.description,
|
|
123
|
+
schema: queue.options.schema,
|
|
124
|
+
provider: this.getProviderName(queue.options.provider),
|
|
125
|
+
}));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
public getSchedulers(): DevSchedulerMetadata[] {
|
|
129
|
+
const schedulerDescriptors = this.alepha.descriptors($scheduler);
|
|
130
|
+
|
|
131
|
+
return schedulerDescriptors.map((scheduler) => ({
|
|
132
|
+
name: scheduler.name,
|
|
133
|
+
description: scheduler.options.description,
|
|
134
|
+
cron: scheduler.options.cron,
|
|
135
|
+
interval: scheduler.options.interval,
|
|
136
|
+
lock: scheduler.options.lock,
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
public getTopics(): DevTopicMetadata[] {
|
|
141
|
+
const topicDescriptors = this.alepha.descriptors($topic);
|
|
142
|
+
|
|
143
|
+
return topicDescriptors.map((topic) => ({
|
|
144
|
+
name: topic.name,
|
|
145
|
+
description: topic.options.description,
|
|
146
|
+
schema: topic.options.schema,
|
|
147
|
+
provider: this.getProviderName(topic.options.provider),
|
|
148
|
+
}));
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
public getBuckets(): DevBucketMetadata[] {
|
|
152
|
+
const bucketDescriptors = this.alepha.descriptors($bucket);
|
|
153
|
+
|
|
154
|
+
return bucketDescriptors.map((bucket) => ({
|
|
155
|
+
name: bucket.name,
|
|
156
|
+
description: bucket.options.description,
|
|
157
|
+
mimeTypes: bucket.options.mimeTypes,
|
|
158
|
+
maxSize: bucket.options.maxSize,
|
|
159
|
+
provider: this.getProviderName(bucket.options.provider),
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
public getRealms(): DevRealmMetadata[] {
|
|
164
|
+
const realmDescriptors = this.alepha.descriptors($realm);
|
|
165
|
+
|
|
166
|
+
return realmDescriptors.map((realm) => ({
|
|
167
|
+
name: realm.name,
|
|
168
|
+
description: realm.options.description,
|
|
169
|
+
roles: realm.options.roles,
|
|
170
|
+
type: "secret" in realm.options ? "internal" : "external",
|
|
171
|
+
settings: {
|
|
172
|
+
accessTokenExpiration: realm.options.settings?.accessToken?.expiration,
|
|
173
|
+
refreshTokenExpiration:
|
|
174
|
+
realm.options.settings?.refreshToken?.expiration,
|
|
175
|
+
hasOnCreateSession: !!realm.options.settings?.onCreateSession,
|
|
176
|
+
hasOnRefreshSession: !!realm.options.settings?.onRefreshSession,
|
|
177
|
+
hasOnDeleteSession: !!realm.options.settings?.onDeleteSession,
|
|
178
|
+
},
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
public getCaches(): DevCacheMetadata[] {
|
|
183
|
+
const cacheDescriptors = this.alepha.descriptors($cache);
|
|
184
|
+
|
|
185
|
+
return cacheDescriptors.map((cache) => ({
|
|
186
|
+
name: cache.container,
|
|
187
|
+
ttl: cache.options.ttl,
|
|
188
|
+
disabled: cache.options.disabled,
|
|
189
|
+
provider: this.getProviderName(cache.options.provider),
|
|
190
|
+
}));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
public getPages(): DevPageMetadata[] {
|
|
194
|
+
const pageDescriptors = this.alepha.descriptors($page);
|
|
195
|
+
|
|
196
|
+
return pageDescriptors.map((page) => ({
|
|
197
|
+
name: page.name,
|
|
198
|
+
description: page.options.description,
|
|
199
|
+
path: page.options.path,
|
|
200
|
+
params: page.options.schema?.params,
|
|
201
|
+
query: page.options.schema?.query,
|
|
202
|
+
hasComponent: !!page.options.component,
|
|
203
|
+
hasLazy: !!page.options.lazy,
|
|
204
|
+
hasResolve: !!page.options.resolve,
|
|
205
|
+
hasChildren: !!page.options.children,
|
|
206
|
+
hasParent: !!page.options.parent,
|
|
207
|
+
hasErrorHandler: !!page.options.errorHandler,
|
|
208
|
+
static:
|
|
209
|
+
typeof page.options.static === "boolean"
|
|
210
|
+
? page.options.static
|
|
211
|
+
: !!page.options.static,
|
|
212
|
+
cache: page.options.cache,
|
|
213
|
+
client: page.options.client,
|
|
214
|
+
animation: page.options.animation,
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
public getProviders(): DevProviderMetadata[] {
|
|
219
|
+
const graph = this.alepha.graph();
|
|
220
|
+
|
|
221
|
+
return Object.entries(graph).map(([name, info]) => ({
|
|
222
|
+
name,
|
|
223
|
+
module: info.module,
|
|
224
|
+
dependencies: info.from,
|
|
225
|
+
aliases: info.as,
|
|
226
|
+
}));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
public getModules(): DevModuleMetadata[] {
|
|
230
|
+
const graph = this.alepha.graph();
|
|
231
|
+
const moduleMap = new Map<string, Set<string>>();
|
|
232
|
+
|
|
233
|
+
// Group providers by module
|
|
234
|
+
for (const [providerName, info] of Object.entries(graph)) {
|
|
235
|
+
if (info.module) {
|
|
236
|
+
if (!moduleMap.has(info.module)) {
|
|
237
|
+
moduleMap.set(info.module, new Set());
|
|
238
|
+
}
|
|
239
|
+
moduleMap.get(info.module)!.add(providerName);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return Array.from(moduleMap.entries()).map(([name, providers]) => ({
|
|
244
|
+
name,
|
|
245
|
+
providers: Array.from(providers),
|
|
246
|
+
}));
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
public getMetadata(): DevMetadata {
|
|
250
|
+
return {
|
|
251
|
+
actions: this.getActions(),
|
|
252
|
+
queues: this.getQueues(),
|
|
253
|
+
schedulers: this.getSchedulers(),
|
|
254
|
+
topics: this.getTopics(),
|
|
255
|
+
buckets: this.getBuckets(),
|
|
256
|
+
realms: this.getRealms(),
|
|
257
|
+
caches: this.getCaches(),
|
|
258
|
+
pages: this.getPages(),
|
|
259
|
+
providers: this.getProviders(),
|
|
260
|
+
modules: this.getModules(),
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// -------------------------------------------------------------------------------------------------------------------
|
|
265
|
+
|
|
266
|
+
protected getProviderName(provider?: "memory" | any): string {
|
|
267
|
+
if (!provider) {
|
|
268
|
+
return "default";
|
|
269
|
+
}
|
|
270
|
+
if (provider === "memory") {
|
|
271
|
+
return "memory";
|
|
272
|
+
}
|
|
273
|
+
return provider.name || "custom";
|
|
274
|
+
}
|
|
271
275
|
}
|
package/src/index.ts
CHANGED
|
@@ -29,7 +29,7 @@ export * from "./schemas/DevTopicMetadata.ts";
|
|
|
29
29
|
* @module alepha.devtools
|
|
30
30
|
*/
|
|
31
31
|
export const AlephaDevtools = $module({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
name: "alepha.devtools",
|
|
33
|
+
descriptors: [],
|
|
34
|
+
services: [DevCollectorProvider],
|
|
35
35
|
});
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type Static, t } from "@alepha/core";
|
|
2
2
|
|
|
3
3
|
export const devActionMetadataSchema = t.object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
name: t.text(),
|
|
5
|
+
group: t.text(),
|
|
6
|
+
method: t.text(),
|
|
7
|
+
path: t.text(),
|
|
8
|
+
prefix: t.text(),
|
|
9
|
+
fullPath: t.text(),
|
|
10
|
+
description: t.optional(t.text()),
|
|
11
|
+
summary: t.optional(t.text()),
|
|
12
|
+
disabled: t.optional(t.boolean()),
|
|
13
|
+
secure: t.optional(t.boolean()),
|
|
14
|
+
hide: t.optional(t.boolean()),
|
|
15
|
+
body: t.optional(t.any()),
|
|
16
|
+
params: t.optional(t.any()),
|
|
17
|
+
query: t.optional(t.any()),
|
|
18
|
+
response: t.optional(t.any()),
|
|
19
|
+
bodyContentType: t.optional(t.text()),
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
export type DevActionMetadata = Static<typeof devActionMetadataSchema>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type Static, t } from "@alepha/core";
|
|
2
2
|
|
|
3
3
|
export const devBucketMetadataSchema = t.object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
name: t.text(),
|
|
5
|
+
description: t.optional(t.text()),
|
|
6
|
+
mimeTypes: t.optional(t.array(t.text())),
|
|
7
|
+
maxSize: t.optional(t.number()),
|
|
8
|
+
provider: t.text(),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
export type DevBucketMetadata = Static<typeof devBucketMetadataSchema>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type Static, t } from "@alepha/core";
|
|
2
2
|
|
|
3
3
|
export const devCacheMetadataSchema = t.object({
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
name: t.text(),
|
|
5
|
+
ttl: t.optional(t.any()),
|
|
6
|
+
disabled: t.optional(t.boolean()),
|
|
7
|
+
provider: t.text(),
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
export type DevCacheMetadata = Static<typeof devCacheMetadataSchema>;
|
|
@@ -2,10 +2,10 @@ import { type Static, t } from "@alepha/core";
|
|
|
2
2
|
import type { LogEntry } from "@alepha/logger";
|
|
3
3
|
|
|
4
4
|
export const devLogEntrySchema = t.object({
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
formatted: t.text(),
|
|
6
|
+
entry: t.any(), // Use any since LogEntry has Date instead of string for timestamp
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
export type DevLogEntry = Static<typeof devLogEntrySchema> & {
|
|
10
|
-
|
|
10
|
+
entry: LogEntry;
|
|
11
11
|
};
|
|
@@ -11,17 +11,17 @@ import { devSchedulerMetadataSchema } from "./DevSchedulerMetadata.ts";
|
|
|
11
11
|
import { devTopicMetadataSchema } from "./DevTopicMetadata.ts";
|
|
12
12
|
|
|
13
13
|
export const devMetadataSchema = t.object({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
actions: t.array(devActionMetadataSchema),
|
|
15
|
+
queues: t.array(devQueueMetadataSchema),
|
|
16
|
+
schedulers: t.array(devSchedulerMetadataSchema),
|
|
17
|
+
topics: t.array(devTopicMetadataSchema),
|
|
18
|
+
buckets: t.array(devBucketMetadataSchema),
|
|
19
|
+
realms: t.array(devRealmMetadataSchema),
|
|
20
|
+
caches: t.array(devCacheMetadataSchema),
|
|
21
|
+
pages: t.array(devPageMetadataSchema),
|
|
22
|
+
providers: t.array(devProviderMetadataSchema),
|
|
23
|
+
modules: t.array(devModuleMetadataSchema),
|
|
24
|
+
// More metadata will be added here later
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
export type DevMetadata = Static<typeof devMetadataSchema>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Static, t } from "@alepha/core";
|
|
2
2
|
|
|
3
3
|
export const devModuleMetadataSchema = t.object({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
name: t.text(),
|
|
5
|
+
providers: t.array(t.text()),
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
export type DevModuleMetadata = Static<typeof devModuleMetadataSchema>;
|