@scaffoldly/rowdy 0.0.2-1-beta.20251026125439.6f9a8c1 → 0.0.2-1-beta.20251028093219.1e9f7b2

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 +18 -4
  2. package/dist/index.js +24939 -457
  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,22 @@ 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 ERROR = "error";
355
+ static readonly HTTP = "http";
356
+ static readonly API = "api";
357
+ static readonly CRI = "cri";
358
+ static readonly HEALTH = "health";
359
+ static readonly PING = "ping";
360
+ static readonly ROUTES = "routes";
350
361
  readonly http: AxiosInstance;
351
362
  private _images;
352
363
  private _registry;
353
364
  private _proxy?;
354
- constructor(log: Logger);
365
+ private _cri;
366
+ constructor(log: Logger, signal: AbortSignal);
367
+ get Cri(): Router;
355
368
  get Images(): IImageApi;
356
369
  get Registry(): IRegistryApi;
357
370
  get proxy(): HttpProxy<Pipeline> | undefined;
@@ -381,9 +394,10 @@ declare class Rowdy {
381
394
  };
382
395
  withProxy(proxy: HttpProxy<Pipeline>): this;
383
396
  health(): Observable<ApiSchema<Health$1['res'], ApiResponseStatus>>;
384
- handle(): Observable<ApiSchema<unknown, ApiResponseStatus>>;
385
- private handler;
397
+ cri(proxy: HttpProxy<Pipeline>): Observable<Response$1>;
398
+ api(): Observable<ApiSchema<unknown, ApiResponseStatus>>;
386
399
  private notFound;
400
+ private badRequest;
387
401
  }
388
402
 
389
403
  declare const ABORT: AbortController;