alepha 0.12.1 → 0.13.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.
@@ -1,4 +1,4 @@
1
- import * as alepha3 from "alepha";
1
+ import * as alepha21 from "alepha";
2
2
  import { Alepha, Async, Descriptor, KIND, Static } from "alepha";
3
3
  import { ServiceAccountDescriptor, UserAccount, UserAccountToken } from "alepha/security";
4
4
  import * as alepha_server0 from "alepha/server";
@@ -72,23 +72,23 @@ declare module "alepha/server" {
72
72
  */
73
73
  //#endregion
74
74
  //#region src/server-links/schemas/apiLinksResponseSchema.d.ts
75
- declare const apiLinkSchema: alepha3.TObject<{
76
- name: alepha3.TString;
77
- group: alepha3.TOptional<alepha3.TString>;
78
- path: alepha3.TString;
79
- method: alepha3.TOptional<alepha3.TString>;
80
- requestBodyType: alepha3.TOptional<alepha3.TString>;
81
- service: alepha3.TOptional<alepha3.TString>;
75
+ declare const apiLinkSchema: alepha21.TObject<{
76
+ name: alepha21.TString;
77
+ group: alepha21.TOptional<alepha21.TString>;
78
+ path: alepha21.TString;
79
+ method: alepha21.TOptional<alepha21.TString>;
80
+ requestBodyType: alepha21.TOptional<alepha21.TString>;
81
+ service: alepha21.TOptional<alepha21.TString>;
82
82
  }>;
83
- declare const apiLinksResponseSchema: alepha3.TObject<{
84
- prefix: alepha3.TOptional<alepha3.TString>;
85
- links: alepha3.TArray<alepha3.TObject<{
86
- name: alepha3.TString;
87
- group: alepha3.TOptional<alepha3.TString>;
88
- path: alepha3.TString;
89
- method: alepha3.TOptional<alepha3.TString>;
90
- requestBodyType: alepha3.TOptional<alepha3.TString>;
91
- service: alepha3.TOptional<alepha3.TString>;
83
+ declare const apiLinksResponseSchema: alepha21.TObject<{
84
+ prefix: alepha21.TOptional<alepha21.TString>;
85
+ links: alepha21.TArray<alepha21.TObject<{
86
+ name: alepha21.TString;
87
+ group: alepha21.TOptional<alepha21.TString>;
88
+ path: alepha21.TString;
89
+ method: alepha21.TOptional<alepha21.TString>;
90
+ requestBodyType: alepha21.TOptional<alepha21.TString>;
91
+ service: alepha21.TOptional<alepha21.TString>;
92
92
  }>>;
93
93
  }>;
94
94
  type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
@@ -293,7 +293,7 @@ declare class ServerProxyProvider {
293
293
  protected readonly log: alepha_logger0.Logger;
294
294
  protected readonly routerProvider: ServerRouterProvider;
295
295
  protected readonly alepha: Alepha;
296
- protected readonly configure: alepha3.HookDescriptor<"configure">;
296
+ protected readonly configure: alepha21.HookDescriptor<"configure">;
297
297
  createProxy(options: ProxyDescriptorOptions): void;
298
298
  createProxyHandler(target: string, options: Omit<ProxyDescriptorOptions, "path">): ServerHandler;
299
299
  private getRawRequestBody;
@@ -372,8 +372,8 @@ declare class RemoteDescriptorProvider {
372
372
  protected readonly remotes: Array<ServerRemote>;
373
373
  protected readonly log: alepha_logger0.Logger;
374
374
  getRemotes(): ServerRemote[];
375
- readonly configure: alepha3.HookDescriptor<"configure">;
376
- readonly start: alepha3.HookDescriptor<"start">;
375
+ readonly configure: alepha21.HookDescriptor<"configure">;
376
+ readonly start: alepha21.HookDescriptor<"start">;
377
377
  registerRemote(value: RemoteDescriptor): Promise<void>;
378
378
  protected readonly fetchLinks: alepha_retry0.RetryDescriptorFn<(opts: FetchLinksOptions) => Promise<ApiLinksResponse>>;
379
379
  }
@@ -441,22 +441,22 @@ declare class ServerLinksProvider {
441
441
  protected readonly remoteProvider: RemoteDescriptorProvider;
442
442
  protected readonly serverTimingProvider: ServerTimingProvider;
443
443
  get prefix(): string;
444
- readonly onRoute: alepha3.HookDescriptor<"configure">;
444
+ readonly onRoute: alepha21.HookDescriptor<"configure">;
445
445
  /**
446
446
  * First API - Get all API links for the user.
447
447
  *
448
448
  * This is based on the user's permissions.
449
449
  */
450
450
  readonly links: alepha_server0.RouteDescriptor<{
451
- response: alepha3.TObject<{
452
- prefix: alepha3.TOptional<alepha3.TString>;
453
- links: alepha3.TArray<alepha3.TObject<{
454
- name: alepha3.TString;
455
- group: alepha3.TOptional<alepha3.TString>;
456
- path: alepha3.TString;
457
- method: alepha3.TOptional<alepha3.TString>;
458
- requestBodyType: alepha3.TOptional<alepha3.TString>;
459
- service: alepha3.TOptional<alepha3.TString>;
451
+ response: alepha21.TObject<{
452
+ prefix: alepha21.TOptional<alepha21.TString>;
453
+ links: alepha21.TArray<alepha21.TObject<{
454
+ name: alepha21.TString;
455
+ group: alepha21.TOptional<alepha21.TString>;
456
+ path: alepha21.TString;
457
+ method: alepha21.TOptional<alepha21.TString>;
458
+ requestBodyType: alepha21.TOptional<alepha21.TString>;
459
+ service: alepha21.TOptional<alepha21.TString>;
460
460
  }>>;
461
461
  }>;
462
462
  }>;
@@ -467,10 +467,10 @@ declare class ServerLinksProvider {
467
467
  * I mean for 150+ links, you got 50ms of serialization time.
468
468
  */
469
469
  readonly schema: alepha_server0.RouteDescriptor<{
470
- params: alepha3.TObject<{
471
- name: alepha3.TString;
470
+ params: alepha21.TObject<{
471
+ name: alepha21.TString;
472
472
  }>;
473
- response: alepha3.TRecord<string, alepha3.TAny>;
473
+ response: alepha21.TRecord<string, alepha21.TAny>;
474
474
  }>;
475
475
  getSchemaByName(name: string, options?: GetApiLinksOptions): Promise<RequestConfigSchema>;
476
476
  /**
@@ -507,7 +507,7 @@ declare module "alepha" {
507
507
  * @see {@link $client}
508
508
  * @module alepha.server.links
509
509
  */
510
- declare const AlephaServerLinks: alepha3.Service<alepha3.Module>;
510
+ declare const AlephaServerLinks: alepha21.Service<alepha21.Module>;
511
511
  //#endregion
512
512
  export { $client, $remote, AlephaServerLinks, ApiLink, ApiLinksResponse, ClientScope, FetchLinksOptions, GetApiLinksOptions, HttpClientLink, HttpVirtualClient, LinkProvider, RemoteDescriptor, RemoteDescriptorOptions, RemoteDescriptorProvider, ServerLinksProvider, ServerRemote, VirtualAction, apiLinkSchema, apiLinksResponseSchema };
513
513
  //# sourceMappingURL=index.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as alepha1 from "alepha";
1
+ import * as alepha23 from "alepha";
2
2
  import { Alepha, Async, Descriptor, KIND, Static } from "alepha";
3
3
  import { JwtProvider, SecurityProvider, ServiceAccountDescriptor, UserAccount, UserAccountToken } from "alepha/security";
4
4
  import * as alepha_server0 from "alepha/server";
@@ -72,23 +72,23 @@ declare module "alepha/server" {
72
72
  */
73
73
  //#endregion
74
74
  //#region src/server-links/schemas/apiLinksResponseSchema.d.ts
75
- declare const apiLinkSchema: alepha1.TObject<{
76
- name: alepha1.TString;
77
- group: alepha1.TOptional<alepha1.TString>;
78
- path: alepha1.TString;
79
- method: alepha1.TOptional<alepha1.TString>;
80
- requestBodyType: alepha1.TOptional<alepha1.TString>;
81
- service: alepha1.TOptional<alepha1.TString>;
75
+ declare const apiLinkSchema: alepha23.TObject<{
76
+ name: alepha23.TString;
77
+ group: alepha23.TOptional<alepha23.TString>;
78
+ path: alepha23.TString;
79
+ method: alepha23.TOptional<alepha23.TString>;
80
+ requestBodyType: alepha23.TOptional<alepha23.TString>;
81
+ service: alepha23.TOptional<alepha23.TString>;
82
82
  }>;
83
- declare const apiLinksResponseSchema: alepha1.TObject<{
84
- prefix: alepha1.TOptional<alepha1.TString>;
85
- links: alepha1.TArray<alepha1.TObject<{
86
- name: alepha1.TString;
87
- group: alepha1.TOptional<alepha1.TString>;
88
- path: alepha1.TString;
89
- method: alepha1.TOptional<alepha1.TString>;
90
- requestBodyType: alepha1.TOptional<alepha1.TString>;
91
- service: alepha1.TOptional<alepha1.TString>;
83
+ declare const apiLinksResponseSchema: alepha23.TObject<{
84
+ prefix: alepha23.TOptional<alepha23.TString>;
85
+ links: alepha23.TArray<alepha23.TObject<{
86
+ name: alepha23.TString;
87
+ group: alepha23.TOptional<alepha23.TString>;
88
+ path: alepha23.TString;
89
+ method: alepha23.TOptional<alepha23.TString>;
90
+ requestBodyType: alepha23.TOptional<alepha23.TString>;
91
+ service: alepha23.TOptional<alepha23.TString>;
92
92
  }>>;
93
93
  }>;
94
94
  type ApiLinksResponse = Static<typeof apiLinksResponseSchema>;
@@ -293,7 +293,7 @@ declare class ServerProxyProvider {
293
293
  protected readonly log: alepha_logger0.Logger;
294
294
  protected readonly routerProvider: ServerRouterProvider;
295
295
  protected readonly alepha: Alepha;
296
- protected readonly configure: alepha1.HookDescriptor<"configure">;
296
+ protected readonly configure: alepha23.HookDescriptor<"configure">;
297
297
  createProxy(options: ProxyDescriptorOptions): void;
298
298
  createProxyHandler(target: string, options: Omit<ProxyDescriptorOptions, "path">): ServerHandler;
299
299
  private getRawRequestBody;
@@ -372,8 +372,8 @@ declare class RemoteDescriptorProvider {
372
372
  protected readonly remotes: Array<ServerRemote>;
373
373
  protected readonly log: alepha_logger0.Logger;
374
374
  getRemotes(): ServerRemote[];
375
- readonly configure: alepha1.HookDescriptor<"configure">;
376
- readonly start: alepha1.HookDescriptor<"start">;
375
+ readonly configure: alepha23.HookDescriptor<"configure">;
376
+ readonly start: alepha23.HookDescriptor<"start">;
377
377
  registerRemote(value: RemoteDescriptor): Promise<void>;
378
378
  protected readonly fetchLinks: alepha_retry0.RetryDescriptorFn<(opts: FetchLinksOptions) => Promise<ApiLinksResponse>>;
379
379
  }
@@ -441,22 +441,22 @@ declare class ServerLinksProvider {
441
441
  protected readonly remoteProvider: RemoteDescriptorProvider;
442
442
  protected readonly serverTimingProvider: ServerTimingProvider;
443
443
  get prefix(): string;
444
- readonly onRoute: alepha1.HookDescriptor<"configure">;
444
+ readonly onRoute: alepha23.HookDescriptor<"configure">;
445
445
  /**
446
446
  * First API - Get all API links for the user.
447
447
  *
448
448
  * This is based on the user's permissions.
449
449
  */
450
450
  readonly links: alepha_server0.RouteDescriptor<{
451
- response: alepha1.TObject<{
452
- prefix: alepha1.TOptional<alepha1.TString>;
453
- links: alepha1.TArray<alepha1.TObject<{
454
- name: alepha1.TString;
455
- group: alepha1.TOptional<alepha1.TString>;
456
- path: alepha1.TString;
457
- method: alepha1.TOptional<alepha1.TString>;
458
- requestBodyType: alepha1.TOptional<alepha1.TString>;
459
- service: alepha1.TOptional<alepha1.TString>;
451
+ response: alepha23.TObject<{
452
+ prefix: alepha23.TOptional<alepha23.TString>;
453
+ links: alepha23.TArray<alepha23.TObject<{
454
+ name: alepha23.TString;
455
+ group: alepha23.TOptional<alepha23.TString>;
456
+ path: alepha23.TString;
457
+ method: alepha23.TOptional<alepha23.TString>;
458
+ requestBodyType: alepha23.TOptional<alepha23.TString>;
459
+ service: alepha23.TOptional<alepha23.TString>;
460
460
  }>>;
461
461
  }>;
462
462
  }>;
@@ -467,10 +467,10 @@ declare class ServerLinksProvider {
467
467
  * I mean for 150+ links, you got 50ms of serialization time.
468
468
  */
469
469
  readonly schema: alepha_server0.RouteDescriptor<{
470
- params: alepha1.TObject<{
471
- name: alepha1.TString;
470
+ params: alepha23.TObject<{
471
+ name: alepha23.TString;
472
472
  }>;
473
- response: alepha1.TRecord<string, alepha1.TAny>;
473
+ response: alepha23.TRecord<string, alepha23.TAny>;
474
474
  }>;
475
475
  getSchemaByName(name: string, options?: GetApiLinksOptions): Promise<RequestConfigSchema>;
476
476
  /**
@@ -507,7 +507,7 @@ declare module "alepha" {
507
507
  * @see {@link $client}
508
508
  * @module alepha.server.links
509
509
  */
510
- declare const AlephaServerLinks: alepha1.Service<alepha1.Module>;
510
+ declare const AlephaServerLinks: alepha23.Service<alepha23.Module>;
511
511
  //#endregion
512
512
  export { $client, $remote, AlephaServerLinks, ApiLink, ApiLinksResponse, ClientScope, FetchLinksOptions, GetApiLinksOptions, HttpClientLink, HttpVirtualClient, LinkProvider, RemoteDescriptor, RemoteDescriptorOptions, RemoteDescriptorProvider, ServerLinksProvider, ServerRemote, VirtualAction, apiLinkSchema, apiLinksResponseSchema };
513
513
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import * as alepha42 from "alepha";
2
2
  import { Alepha, Descriptor, KIND, Static, TObject, TString, TUnion } from "alepha";
3
- import * as alepha_logger2 from "alepha/logger";
3
+ import * as alepha_logger1 from "alepha/logger";
4
4
  import * as alepha_topic0 from "alepha/topic";
5
5
  import { IncomingMessage } from "node:http";
6
6
  import { WebSocket as WebSocket$1, WebSocketServer } from "ws";
@@ -452,7 +452,7 @@ declare class WebSocketValidationError extends WebSocketError {
452
452
  * and messages can be targeted to specific rooms.
453
453
  */
454
454
  declare class RoomManager {
455
- protected readonly log: alepha_logger2.Logger;
455
+ protected readonly log: alepha_logger1.Logger;
456
456
  /**
457
457
  * Maps roomId → Set<connectionId>
458
458
  */
@@ -533,7 +533,7 @@ declare class WebSocketChannelConnection<TClient extends TWSObject, TServer exte
533
533
  };
534
534
  protected readonly env: Static<typeof envSchema$1>;
535
535
  protected readonly alepha: Alepha;
536
- protected readonly log: alepha_logger2.Logger;
536
+ protected readonly log: alepha_logger1.Logger;
537
537
  protected ws?: WebSocket;
538
538
  protected reconnectAttempts: number;
539
539
  protected reconnectTimer?: number;
@@ -607,7 +607,7 @@ declare class WebSocketChannelConnection<TClient extends TWSObject, TServer exte
607
607
  * One connection per channel, multiple rooms per connection.
608
608
  */
609
609
  declare class WebSocketClient {
610
- protected readonly log: alepha_logger2.Logger;
610
+ protected readonly log: alepha_logger1.Logger;
611
611
  protected readonly alepha: Alepha;
612
612
  protected readonly env: {
613
613
  WEBSOCKET_URL: string;
@@ -694,7 +694,7 @@ declare const webSocketMessageSchema: {
694
694
  * - Horizontal scaling without losing messages
695
695
  */
696
696
  declare class WebSocketTopicService {
697
- protected readonly log: alepha_logger2.Logger;
697
+ protected readonly log: alepha_logger1.Logger;
698
698
  /**
699
699
  * Handler function to be called when a message is received from the topic
700
700
  * This is set by the WebSocket provider during initialization
@@ -756,7 +756,7 @@ declare class NodeWebSocketServerProvider extends WebSocketServerProvider {
756
756
  protected readonly alepha: Alepha;
757
757
  protected readonly roomManager: RoomManager;
758
758
  protected readonly topicService: WebSocketTopicService;
759
- protected readonly log: alepha_logger2.Logger;
759
+ protected readonly log: alepha_logger1.Logger;
760
760
  protected readonly env: {
761
761
  WEBSOCKET_PATH: string;
762
762
  };
@@ -796,7 +796,7 @@ declare class NodeWebSocketConnection implements WebSocketConnection {
796
796
  protected readonly ws: WebSocket$1;
797
797
  protected readonly provider: NodeWebSocketServerProvider;
798
798
  protected readonly endpoint: WebSocketDescriptorOptions<any, any>;
799
- protected readonly log: alepha_logger2.Logger;
799
+ protected readonly log: alepha_logger1.Logger;
800
800
  metadata?: Record<string, any>;
801
801
  constructor(id: string, userId: string | undefined, roomIds: string[], ws: WebSocket$1, provider: NodeWebSocketServerProvider, endpoint: WebSocketDescriptorOptions<any, any>);
802
802
  get readyState(): WebSocketState;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "alepha",
3
3
  "description": "Easy-to-use modern TypeScript framework for building many kind of applications.",
4
4
  "author": "Nicolas Foures",
5
- "version": "0.12.1",
5
+ "version": "0.13.0",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=22.0.0"