@scaffoldly/rowdy 0.0.2-1-beta.20251026125439.6f9a8c1 → 0.0.2-1-beta.20251028030356.16a84be

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 (3) hide show
  1. package/dist/index.d.ts +21 -4
  2. package/dist/index.js +24936 -456
  3. package/package.json +4 -1
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import * as path_to_regexp from 'path-to-regexp';
5
5
  import { PassThrough, Readable, Writable } from 'stream';
6
6
  import { Agent } from 'https';
7
7
  import { APIGatewayProxyEventV2 } from 'aws-lambda';
8
+ import { Router, Response as Response$1 } from '@scaffoldly/rowdy-grpc';
8
9
 
9
10
  interface ILoggable {
10
11
  repr(): string;
@@ -143,7 +144,7 @@ interface IRegistryApi {
143
144
  getRegistry(req?: Registry['Req']): Observable<ApiSchema<Registry['Req'], Registry['Res']>>;
144
145
  }
145
146
  type ApiVersion = 'rowdy.run/v1alpha1';
146
- type ApiKind = 'Routes' | 'NotFound' | Health$1['kind'] | Image['kind'] | Registry['kind'];
147
+ type ApiKind = 'Routes' | 'NotFound' | 'BadRequest' | Health$1['kind'] | Image['kind'] | Registry['kind'];
147
148
  type ApiSchema<Spec, Status> = {
148
149
  apiVersion: ApiVersion;
149
150
  kind: ApiKind;
@@ -313,10 +314,12 @@ declare class HttpHeaders implements ILoggable {
313
314
  get(header: string): string | string[] | undefined;
314
315
  proxy(): HttpHeaders;
315
316
  static from(obj: Record<string, string | string[]>): HttpHeaders;
317
+ static fromHeaders(headers: Headers): HttpHeaders;
316
318
  static fromAxios(axiosHeaders: Partial<AxiosHeaders | AxiosResponseHeaders>): HttpHeaders;
317
319
  static fromLambda(headers: Partial<APIGatewayProxyEventV2['headers']>): HttpHeaders;
318
320
  intoAxios(): AxiosHeaders;
319
321
  intoJSON(): Record<string, unknown>;
322
+ intoHeaders(): Headers;
320
323
  override(key: string, value?: string | string[]): this;
321
324
  repr(): string;
322
325
  }
@@ -346,12 +349,25 @@ declare abstract class HttpResponse implements ILoggable {
346
349
 
347
350
  declare class Rowdy {
348
351
  readonly log: Logger;
352
+ readonly signal: AbortSignal;
349
353
  static readonly SLUG = "@rowdy";
354
+ static readonly SCHEME = "rowdy:";
355
+ static readonly SERVICES: {
356
+ ERROR: string;
357
+ HTTP: string;
358
+ API: string;
359
+ CRI: string;
360
+ HEALTH: string;
361
+ PING: string;
362
+ ROUTES: string;
363
+ };
350
364
  readonly http: AxiosInstance;
351
365
  private _images;
352
366
  private _registry;
353
367
  private _proxy?;
354
- constructor(log: Logger);
368
+ private _cri;
369
+ constructor(log: Logger, signal: AbortSignal);
370
+ get Cri(): Router;
355
371
  get Images(): IImageApi;
356
372
  get Registry(): IRegistryApi;
357
373
  get proxy(): HttpProxy<Pipeline> | undefined;
@@ -381,9 +397,10 @@ declare class Rowdy {
381
397
  };
382
398
  withProxy(proxy: HttpProxy<Pipeline>): this;
383
399
  health(): Observable<ApiSchema<Health$1['res'], ApiResponseStatus>>;
384
- handle(): Observable<ApiSchema<unknown, ApiResponseStatus>>;
385
- private handler;
400
+ cri(proxy: HttpProxy<Pipeline>): Observable<Response$1>;
401
+ api(): Observable<ApiSchema<unknown, ApiResponseStatus>>;
386
402
  private notFound;
403
+ private badRequest;
387
404
  }
388
405
 
389
406
  declare const ABORT: AbortController;