@orieljs/framework 0.1.0-alpha.1 → 0.1.0-alpha.3

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.
@@ -334,7 +334,11 @@ type ActionMethods<C> = {
334
334
  }[keyof C] & string;
335
335
  type ControllerAction<C> = readonly [Class<C>, ActionMethods<C>];
336
336
  type RouteClosure = (...args: any[]) => unknown;
337
- type RouteAction = RouteClosure | ControllerAction<any>;
337
+ /** A class with __invoke(): Route.get('/counter', Counter) (single-action controllers, full-page Live components). */
338
+ type InvokableClass = Class<{
339
+ __invoke(...args: any[]): unknown;
340
+ }>;
341
+ type RouteAction = RouteClosure | ControllerAction<any> | InvokableClass;
338
342
  type MiddlewareReference = string | MiddlewareClass;
339
343
  interface Route {
340
344
  readonly methods: readonly string[];
@@ -369,16 +373,18 @@ interface CurrentRoute {
369
373
  }
370
374
  declare const CurrentRoute: Token<CurrentRoute>;
371
375
  interface Router {
372
- get<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
373
- post<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
374
- put<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
375
- patch<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
376
- delete<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
377
- options<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
378
- any<C>(uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
379
- match<C>(methods: string[], uri: string, action: ControllerAction<C> | RouteClosure | string): Route;
376
+ get<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
377
+ post<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
378
+ put<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
379
+ patch<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
380
+ delete<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
381
+ options<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
382
+ any<C>(uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
383
+ match<C>(methods: string[], uri: string, action: ControllerAction<C> | RouteClosure | InvokableClass | string): Route;
380
384
  redirect(from: string, to: string, status?: number): Route;
381
385
  view(uri: string, view: string, data?: Record<string, unknown>): Route;
386
+ /** Route.inertia('/about', 'About', props): a GET route that renders an Inertia page (Laravel's Route::inertia). */
387
+ inertia(uri: string, component: string, props?: Record<string, unknown>): Route;
382
388
  resource(name: string, controller: Class<unknown>, options?: ResourceOptions): void;
383
389
  apiResource(name: string, controller: Class<unknown>, options?: ResourceOptions): void;
384
390
  fallback(action: RouteAction): Route;
@@ -414,6 +420,15 @@ interface RouteModelResolver {
414
420
  resolveExplicit(model: Class<unknown>, value: string, field?: string): Promise<unknown>;
415
421
  }
416
422
  declare const RouteModelResolver: Token<RouteModelResolver>;
423
+ /**
424
+ * Route name → parameters, for the typed route() and redirect().route() helpers. Empty until `oriel route:types`
425
+ * augments it (types/routes.d.ts); while it is empty any string is accepted. The contracts themselves keep taking
426
+ * strings: the framework builds route names at run time.
427
+ */
428
+ interface RouteList {
429
+ }
430
+ /** A route name: the generated ones, or any string before `oriel route:types` has run. */
431
+ type RouteName = [keyof RouteList] extends [never] ? string : Extract<keyof RouteList, string>;
417
432
  interface UrlGenerator {
418
433
  to(path: string, query?: Record<string, unknown>, absolute?: boolean): string;
419
434
  route(name: string, parameters?: unknown, absolute?: boolean): string;
@@ -492,6 +507,8 @@ interface ViewFactory {
492
507
  exists(name: string): boolean;
493
508
  share(key: string | Record<string, unknown>, value?: unknown): void;
494
509
  composer(views: string | string[], composer: (view: View) => void | Promise<void>): void;
510
+ /** Renders TSX (an element, a string, an Htmlable, a View, promises of them) to HTML, like Blade::render(). */
511
+ renderToString(node: unknown): Promise<string>;
495
512
  }
496
513
  declare const ViewFactory: Token<ViewFactory>;
497
514
 
@@ -1124,38 +1141,99 @@ interface FilesystemManager extends Filesystem {
1124
1141
  }
1125
1142
  declare const FilesystemManager: Token<FilesystemManager>;
1126
1143
 
1127
- /** The Inertia page object (protocol v2). */
1144
+ /** Infinite-scroll metadata for one prop (page.scrollProps[path]). */
1145
+ interface InertiaScrollProp {
1146
+ pageName: string;
1147
+ previousPage: string | number | null;
1148
+ nextPage: string | number | null;
1149
+ currentPage: string | number | null;
1150
+ reset: boolean;
1151
+ }
1152
+ /** A once prop the client keeps between visits (page.onceProps[key]). `expiresAt` is epoch milliseconds. */
1153
+ interface InertiaOnceProp {
1154
+ prop: string;
1155
+ expiresAt: number | null;
1156
+ }
1157
+ /**
1158
+ * The Inertia page object (protocol v3, @inertiajs/core 3.x). Only component, props, url and version are always
1159
+ * present; the other fields are left out when empty or false.
1160
+ */
1128
1161
  interface InertiaPage {
1129
1162
  component: string;
1130
1163
  props: Record<string, unknown>;
1164
+ /** Path and query, never absolute: '/posts?page=2'. */
1131
1165
  url: string;
1132
- version: string | null;
1133
- encryptHistory?: boolean;
1134
- clearHistory?: boolean;
1166
+ /** '' when the app has no asset version. */
1167
+ version: string;
1168
+ sharedProps?: string[];
1135
1169
  mergeProps?: string[];
1170
+ prependProps?: string[];
1171
+ deepMergeProps?: string[];
1172
+ /** '<prop path>.<key field>', e.g. 'posts.data.id'. */
1173
+ matchPropsOn?: string[];
1174
+ /** Group name → prop paths loaded after the first render. */
1136
1175
  deferredProps?: Record<string, string[]>;
1176
+ rescuedProps?: string[];
1177
+ scrollProps?: Record<string, InertiaScrollProp>;
1178
+ onceProps?: Record<string, InertiaOnceProp>;
1179
+ clearHistory?: true;
1180
+ encryptHistory?: true;
1181
+ flash?: Record<string, unknown>;
1182
+ preserveFragment?: true;
1137
1183
  }
1138
1184
  interface InertiaResponse extends Responsable {
1139
1185
  with(key: string | Record<string, unknown>, value?: unknown): this;
1140
1186
  withViewData(key: string | Record<string, unknown>, value?: unknown): this;
1187
+ rootView(view: string): this;
1188
+ /** Flash data for the next page (page.flash), stored in the session. */
1189
+ flash(key: string | Record<string, unknown>, value?: unknown): this;
1141
1190
  }
1142
1191
  type PropCallback<T = unknown> = () => T | Promise<T>;
1192
+ /** The SSR result spliced into the root view: the `head` tags and the rendered `body`. */
1193
+ interface InertiaSsrResponse {
1194
+ head: string;
1195
+ body: string;
1196
+ }
1197
+ /** Sends a page to the SSR server. Resolves to undefined when SSR is off, unreachable or failing. */
1198
+ interface InertiaSsrGateway {
1199
+ dispatch(page: InertiaPage): Promise<InertiaSsrResponse | undefined>;
1200
+ }
1201
+ declare const InertiaSsrGateway: Token<InertiaSsrGateway>;
1143
1202
  interface InertiaFactory {
1144
1203
  render(component: string, props?: Record<string, unknown>): InertiaResponse;
1145
1204
  share(key: string | Record<string, unknown>, value?: unknown): void;
1205
+ /** A shared once prop: sent on the first visit, then kept by the client. */
1206
+ shareOnce(key: string, callback: PropCallback): void;
1146
1207
  getShared(key?: string): unknown;
1147
- version(version: string | (() => string | Promise<string>)): void;
1208
+ flushShared(): void;
1209
+ version(version: string | null | (() => string | null | Promise<string | null>)): void;
1210
+ getVersion(): Promise<string>;
1211
+ setRootView(view: string): void;
1148
1212
  /** Only evaluated on partial reloads that ask for it. */
1149
1213
  optional<T>(callback: PropCallback<T>): unknown;
1150
1214
  /** Loaded in a follow-up request after the first render. */
1151
1215
  defer<T>(callback: PropCallback<T>, group?: string): unknown;
1152
1216
  /** Always included, even in partial reloads. */
1153
1217
  always<T>(value: T | PropCallback<T>): unknown;
1154
- /** Merged with the existing client-side value instead of replacing it. */
1218
+ /** Appended to the existing client-side value instead of replacing it. */
1155
1219
  merge<T>(value: T | PropCallback<T>): unknown;
1156
- /** 409 + X-Inertia-Location for external redirects. */
1220
+ /** Deep-merged with the existing client-side value. */
1221
+ deepMerge<T>(value: T | PropCallback<T>): unknown;
1222
+ /** Resolved once, then remembered by the client. */
1223
+ once<T>(callback: PropCallback<T>): unknown;
1224
+ /** Infinite scroll over a paginator: merged page by page, with scroll metadata. */
1225
+ scroll<T>(value: T | PropCallback<T>, wrapper?: string): unknown;
1226
+ /** Flash data for the next page (page.flash), stored in the session. */
1227
+ flash(key: string | Record<string, unknown>, value?: unknown): this;
1228
+ encryptHistory(encrypt?: boolean): void;
1229
+ /** The next page tells the client to clear its encrypted history. */
1230
+ clearHistory(): void;
1231
+ /** The next page keeps the URL fragment of the request that redirected to it. */
1232
+ preserveFragment(): void;
1233
+ /** 409 + X-Inertia-Location for Inertia requests, a plain 302 otherwise. */
1157
1234
  location(url: string): Response;
1158
- setRootView(view: string): void;
1235
+ /** Redirect back (Inertia.flash('saved', true).back()). */
1236
+ back(fallback?: string, status?: number): RedirectResponse;
1159
1237
  }
1160
1238
  declare const InertiaFactory: Token<InertiaFactory>;
1161
1239
 
@@ -1175,11 +1253,18 @@ interface LiveSnapshot {
1175
1253
  }
1176
1254
  interface LiveEffects {
1177
1255
  html?: string;
1256
+ /** Browser events from this.dispatch(); `self` keeps one on this component, `to` sends it to one component name. */
1178
1257
  dispatches?: Array<{
1179
1258
  name: string;
1180
- params: unknown[];
1259
+ params: Record<string, unknown>;
1260
+ self?: true;
1261
+ to?: string;
1181
1262
  }>;
1263
+ /** Events this component listens to (@On, static listeners); sent with the first render. */
1264
+ listeners?: string[];
1182
1265
  redirect?: string;
1266
+ /** Follow `redirect` with o:navigate instead of a full page load. */
1267
+ redirectUsingNavigate?: true;
1183
1268
  returns?: unknown[];
1184
1269
  }
1185
1270
  interface LiveUpdateRequest {
@@ -1201,12 +1286,17 @@ interface LiveUpdateResponse {
1201
1286
  }
1202
1287
  interface LiveManager {
1203
1288
  register(component: Class<unknown>, name?: string): void;
1204
- /** Server-renders the first HTML (snapshot embedded). */
1205
- mount(component: string | Class<unknown>, params?: Record<string, unknown>): Promise<string>;
1289
+ /** Server-renders the first HTML (snapshot embedded). `key` identifies a child inside its parent (o:key). */
1290
+ mount(component: string | Class<unknown>, params?: Record<string, unknown>, key?: string): Promise<string>;
1206
1291
  /** Checks checksums and CSRF, then applies updates and calls, re-renders and returns new snapshots. */
1207
1292
  update(request: LiveUpdateRequest): Promise<LiveUpdateResponse>;
1293
+ /**
1294
+ * A full-page component (Route.get('/counter', Counter)): mounts `component` (a component instance) with the current route's parameters and
1295
+ * returns the response, its layout view or a redirect.
1296
+ */
1297
+ page(component: object): Promise<unknown>;
1208
1298
  isLiveRequest(request: HttpRequest): boolean;
1209
1299
  }
1210
1300
  declare const LiveManager: Token<LiveManager>;
1211
1301
 
1212
- export { type AbilityCallback, type Abstract, type ActionMethods, type Address, Application, type Arrayable, type Attachment, AuthFactory, type Authenticatable, type AuthenticationError, type Batch, BatchRepository, type BodyInit, BusDispatcher, CacheManager, type CacheRepository, type Class, ClassRegistry, type ClosureCommand, type Command, type CommandContext, type Concrete, type ConfigCallbacks, ConfigRepository, ConsoleKernel, Container, type Content, type ControllerAction, type Cookie, CookieJar, type Credentials, CurrentRoute, type DatabaseConnection, DatabaseManager, type DriverName, Encrypter, type Enumerable, type Envelope, type ErrorKind, EventDispatcher, ExceptionCallbacks, ExceptionHandler, type ExceptionsConfigurator, type Factory, type FailedJob, FailedJobProvider, type Filesystem, FilesystemManager, Gate, type Guard, Hasher, type HeadersInit, type Htmlable, HttpKernel, HttpRequest, InertiaFactory, type InertiaPage, type InertiaResponse, type Job, type Jsonable, type Listener, type ListenerClass, type LiveEffects, LiveManager, type LiveSnapshot, type LiveUpdateRequest, type LiveUpdateResponse, type Lock, type LogLevel, LogManager, type Logger, MailManager, type MailRecipient, type MailTransport, type Mailable, type Mailer, type MessageBag, type Middleware, MiddlewareCallbacks, type MiddlewareClass, type MiddlewareConfigurator, type MiddlewareReference, type ModelInstance, type ModelNotFoundError, type ModelStatic, type MustVerifyEmail, type Next, type Notifiable, type Notification, type NotificationChannel, NotificationDispatcher, type Operator, type OptionValue, type OrielError, type OutgoingMessage, PasswordBroker, type PasswordStatus, type PendingBatch, type PendingBatchOptions, type PendingChain, type PendingMail, type Pipe, type PipeClosure, type PipeNext, type Pipeline, PipelineFactory, type PropCallback, type PutOptions, type QueryBuilder, type Queue, type QueueJob, QueueManager, type QueuePayload, type RedirectResponse, Redirector, type ResourceOptions, type Responsable, ResponseFactory, type Route, type RouteAction, type RouteClosure, RouteModelResolver, type RouteRegistrar, Router, RoutingPaths, type Row, type RuleCallback, type Rules, Schedule, type ScheduledEvent, type SentMessage, type ServiceProvider, type ServiceProviderClass, Session, type SessionHandler, type ShouldQueue, type StatefulGuard, type Token, type UploadedFile, UrlGenerator, type UserProvider, type ValidationError, ValidationFactory, type ValidationRule, type Validator, type View, ViewFactory, token };
1302
+ export { type AbilityCallback, type Abstract, type ActionMethods, type Address, Application, type Arrayable, type Attachment, AuthFactory, type Authenticatable, type AuthenticationError, type Batch, BatchRepository, type BodyInit, BusDispatcher, CacheManager, type CacheRepository, type Class, ClassRegistry, type ClosureCommand, type Command, type CommandContext, type Concrete, type ConfigCallbacks, ConfigRepository, ConsoleKernel, Container, type Content, type ControllerAction, type Cookie, CookieJar, type Credentials, CurrentRoute, type DatabaseConnection, DatabaseManager, type DriverName, Encrypter, type Enumerable, type Envelope, type ErrorKind, EventDispatcher, ExceptionCallbacks, ExceptionHandler, type ExceptionsConfigurator, type Factory, type FailedJob, FailedJobProvider, type Filesystem, FilesystemManager, Gate, type Guard, Hasher, type HeadersInit, type Htmlable, HttpKernel, HttpRequest, InertiaFactory, type InertiaOnceProp, type InertiaPage, type InertiaResponse, type InertiaScrollProp, InertiaSsrGateway, type InertiaSsrResponse, type InvokableClass, type Job, type Jsonable, type Listener, type ListenerClass, type LiveEffects, LiveManager, type LiveSnapshot, type LiveUpdateRequest, type LiveUpdateResponse, type Lock, type LogLevel, LogManager, type Logger, MailManager, type MailRecipient, type MailTransport, type Mailable, type Mailer, type MessageBag, type Middleware, MiddlewareCallbacks, type MiddlewareClass, type MiddlewareConfigurator, type MiddlewareReference, type ModelInstance, type ModelNotFoundError, type ModelStatic, type MustVerifyEmail, type Next, type Notifiable, type Notification, type NotificationChannel, NotificationDispatcher, type Operator, type OptionValue, type OrielError, type OutgoingMessage, PasswordBroker, type PasswordStatus, type PendingBatch, type PendingBatchOptions, type PendingChain, type PendingMail, type Pipe, type PipeClosure, type PipeNext, type Pipeline, PipelineFactory, type PropCallback, type PutOptions, type QueryBuilder, type Queue, type QueueJob, QueueManager, type QueuePayload, type RedirectResponse, Redirector, type ResourceOptions, type Responsable, ResponseFactory, type Route, type RouteAction, type RouteClosure, type RouteList, RouteModelResolver, type RouteName, type RouteRegistrar, Router, RoutingPaths, type Row, type RuleCallback, type Rules, Schedule, type ScheduledEvent, type SentMessage, type ServiceProvider, type ServiceProviderClass, Session, type SessionHandler, type ShouldQueue, type StatefulGuard, type Token, type UploadedFile, UrlGenerator, type UserProvider, type ValidationError, ValidationFactory, type ValidationRule, type Validator, type View, ViewFactory, token };
package/dist/contracts.js CHANGED
@@ -22,6 +22,7 @@ import {
22
22
  HttpKernel,
23
23
  HttpRequest,
24
24
  InertiaFactory,
25
+ InertiaSsrGateway,
25
26
  LiveManager,
26
27
  LogManager,
27
28
  MailManager,
@@ -41,7 +42,7 @@ import {
41
42
  ValidationFactory,
42
43
  ViewFactory,
43
44
  token
44
- } from "./chunk-K6MAA3RM.js";
45
+ } from "./chunk-S7YC43IH.js";
45
46
  export {
46
47
  Application,
47
48
  AuthFactory,
@@ -66,6 +67,7 @@ export {
66
67
  HttpKernel,
67
68
  HttpRequest,
68
69
  InertiaFactory,
70
+ InertiaSsrGateway,
69
71
  LiveManager,
70
72
  LogManager,
71
73
  MailManager,
@@ -0,0 +1,99 @@
1
+ import { Token as Token$1 } from './contracts.js';
2
+
3
+ /** A typed, runtime-unique key for container bindings. */
4
+ interface Token<T> {
5
+ readonly id: symbol;
6
+ readonly description: string;
7
+ /** Phantom field: only carries T at the type level. Never set at runtime. */
8
+ readonly __type?: T;
9
+ }
10
+ type Class<T> = abstract new (...args: any[]) => T;
11
+ type Abstract<T> = Token<T> | Class<T>;
12
+ type Factory<T> = (container: Container) => T;
13
+ type Concrete<T> = Factory<T> | (new () => T);
14
+ interface Container {
15
+ /** New instance on every make(). A class with no concrete binds to itself (constructed with no args). Root only; throws on a scope. */
16
+ bind<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void;
17
+ /** One instance for the life of this container and its scopes. Root only; throws on a scope. */
18
+ singleton<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void;
19
+ /** One instance per scope (e.g. per HTTP request or queue job). Root only; throws on a scope. */
20
+ scoped<T>(abstract: Abstract<T>, concrete?: Concrete<T>): void;
21
+ /** Register an existing object as a shared instance. Returns it. On a scope it stays local to that scope. */
22
+ instance<T>(abstract: Abstract<T>, instance: T): T;
23
+ /** Resolve. Unbound classes are constructed with `new Class()`. Unbound tokens throw BindingResolutionError. */
24
+ make<T>(abstract: Abstract<T>): T;
25
+ bound(abstract: Abstract<unknown>): boolean;
26
+ resolved(abstract: Abstract<unknown>): boolean;
27
+ /** Decorate or replace an instance each time it's resolved (applied before resolving callbacks). Root only; throws on a scope. */
28
+ extend<T>(abstract: Abstract<T>, extender: (instance: T, container: Container) => T): void;
29
+ /** Called after each resolution of the abstract. Root only; throws on a scope. */
30
+ resolving<T>(abstract: Abstract<T>, callback: (instance: T, container: Container) => void): void;
31
+ forgetInstance(abstract: Abstract<unknown>): void;
32
+ /** A child container: shares bindings and singletons with its parent, and has its own scoped instances. Bindings can't be registered on it. */
33
+ createScope(): Container;
34
+ /** Run fn with this container as the "current" one for inject(), helpers and facades (AsyncLocalStorage). */
35
+ run<R>(fn: () => R): R;
36
+ }
37
+ declare const Container: Token<Container>;
38
+
39
+ interface ServiceProvider {
40
+ /** Bind things into the container. Synchronous. Don't resolve other services here. */
41
+ register?(): void;
42
+ /** Runs after every provider is registered. May be async (e.g. importing route files). */
43
+ boot?(): void | Promise<void>;
44
+ }
45
+ type ServiceProviderClass = new (app: Application) => ServiceProvider;
46
+ interface Application extends Container {
47
+ readonly version: string;
48
+ basePath(path?: string): string;
49
+ appPath(path?: string): string;
50
+ bootstrapPath(path?: string): string;
51
+ configPath(path?: string): string;
52
+ databasePath(path?: string): string;
53
+ publicPath(path?: string): string;
54
+ resourcePath(path?: string): string;
55
+ storagePath(path?: string): string;
56
+ /** With no args returns the environment name. With args returns whether it matches any of them. */
57
+ environment(): string;
58
+ environment(...environments: string[]): boolean;
59
+ isProduction(): boolean;
60
+ isLocal(): boolean;
61
+ runningInConsole(): boolean;
62
+ /** Mark the app as running in the console (the CLI entry point calls this). Defaults to true. */
63
+ setRunningInConsole(value?: boolean): void;
64
+ runningUnitTests(): boolean;
65
+ /** Registers the provider. If the app is already booted, the provider is booted immediately. */
66
+ register(provider: ServiceProvider | ServiceProviderClass): Promise<ServiceProvider>;
67
+ getProviders(): ServiceProvider[];
68
+ boot(): Promise<void>;
69
+ isBooted(): boolean;
70
+ booting(callback: (app: Application) => void | Promise<void>): void;
71
+ booted(callback: (app: Application) => void | Promise<void>): void;
72
+ /** Handle one HTTP request in a fresh request scope via the bound HttpKernel. */
73
+ handle(request: Request): Promise<Response>;
74
+ /** Register a callback that terminate() runs, in registration order. */
75
+ terminating(callback: () => void | Promise<void>): void;
76
+ terminate(): Promise<void>;
77
+ }
78
+ declare const Application: Token$1<Application>;
79
+
80
+ interface ConfigRepository {
81
+ has(key: string): boolean;
82
+ /** Dot notation: get('database.connections.sqlite.database'). */
83
+ get<T = unknown>(key: string, defaultValue?: T): T;
84
+ set(key: string, value: unknown): void;
85
+ set(values: Record<string, unknown>): void;
86
+ push(key: string, value: unknown): void;
87
+ all(): Record<string, unknown>;
88
+ }
89
+ declare const ConfigRepository: Token$1<ConfigRepository>;
90
+ interface ClassRegistry {
91
+ /** Registers under `name` (default: cls.name). Throws if the name is already taken by a different class. */
92
+ register(cls: Class<unknown>, name?: string): string;
93
+ nameOf(cls: Class<unknown>): string | undefined;
94
+ resolve<T = unknown>(name: string): Class<T>;
95
+ has(name: string): boolean;
96
+ }
97
+ declare const ClassRegistry: Token$1<ClassRegistry>;
98
+
99
+ export { Application as A, ClassRegistry as C, type ServiceProvider as S, type Class as a, type Abstract as b, ConfigRepository as c };