@dyrected/core 2.7.1 → 2.8.1
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/app-config-7G-3tF_I.d.cts +2259 -0
- package/dist/app-config-7G-3tF_I.d.ts +2259 -0
- package/dist/app-config-B3ByBjCN.d.cts +2222 -0
- package/dist/app-config-B3ByBjCN.d.ts +2222 -0
- package/dist/app-config-B5tYsZaH.d.cts +2404 -0
- package/dist/app-config-B5tYsZaH.d.ts +2404 -0
- package/dist/app-config-BEuyPktb.d.cts +2556 -0
- package/dist/app-config-BEuyPktb.d.ts +2556 -0
- package/dist/app-config-BIkjQWzU.d.cts +2218 -0
- package/dist/app-config-BIkjQWzU.d.ts +2218 -0
- package/dist/app-config-BfpeE3bF.d.cts +2100 -0
- package/dist/app-config-BfpeE3bF.d.ts +2100 -0
- package/dist/app-config-CCe-yq9q.d.cts +2222 -0
- package/dist/app-config-CCe-yq9q.d.ts +2222 -0
- package/dist/app-config-CPOs7THF.d.cts +2217 -0
- package/dist/app-config-CPOs7THF.d.ts +2217 -0
- package/dist/app-config-Ctp454zB.d.cts +2214 -0
- package/dist/app-config-Ctp454zB.d.ts +2214 -0
- package/dist/app-config-DJmNYgYh.d.cts +2305 -0
- package/dist/app-config-DJmNYgYh.d.ts +2305 -0
- package/dist/app-config-DO3laV58.d.cts +2397 -0
- package/dist/app-config-DO3laV58.d.ts +2397 -0
- package/dist/app-config-DZf_mmi9.d.cts +2211 -0
- package/dist/app-config-DZf_mmi9.d.ts +2211 -0
- package/dist/app-config-SkUoN5JU.d.cts +2192 -0
- package/dist/app-config-SkUoN5JU.d.ts +2192 -0
- package/dist/app-config-WzqpuZMr.d.cts +2566 -0
- package/dist/app-config-WzqpuZMr.d.ts +2566 -0
- package/dist/app-config-fEjRm1o9.d.cts +2402 -0
- package/dist/app-config-fEjRm1o9.d.ts +2402 -0
- package/dist/app-config-oz8H_MOX.d.cts +2224 -0
- package/dist/app-config-oz8H_MOX.d.ts +2224 -0
- package/dist/chunk-3TRRTN6U.js +3441 -0
- package/dist/chunk-5ZIA5COH.js +3414 -0
- package/dist/chunk-6TWQ6GTD.js +3480 -0
- package/dist/chunk-AQO4HI2Y.js +3204 -0
- package/dist/chunk-DFBLNYUH.js +3402 -0
- package/dist/chunk-GFFGDHST.js +3543 -0
- package/dist/chunk-KEKOEAX6.js +3139 -0
- package/dist/chunk-PRQ2RF5C.js +3485 -0
- package/dist/chunk-PZMDK3MH.js +3203 -0
- package/dist/chunk-SM32ND5M.js +3472 -0
- package/dist/chunk-XX7N64NL.js +3550 -0
- package/dist/chunk-ZISFMAEL.js +3550 -0
- package/dist/index.cjs +439 -9
- package/dist/index.d.cts +166 -3
- package/dist/index.d.ts +166 -3
- package/dist/index.js +53 -1
- package/dist/server.cjs +623 -367
- package/dist/server.d.cts +26 -7
- package/dist/server.d.ts +26 -7
- package/dist/server.js +420 -359
- package/package.json +1 -1
package/dist/server.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import * as hono_types from 'hono/types';
|
|
|
2
2
|
import * as hono from 'hono';
|
|
3
3
|
import { Context, Hono } from 'hono';
|
|
4
4
|
import { Logger } from 'pino';
|
|
5
|
-
import { D as DyrectedConfig,
|
|
5
|
+
import { D as DyrectedConfig, aY as DyrectedObservabilityConfig, C as CollectionConfig, G as GlobalConfig } from './app-config-WzqpuZMr.cjs';
|
|
6
6
|
import { JWTPayload } from 'jose';
|
|
7
7
|
import { Tracer, Counter, Attributes, Histogram, Span } from '@opentelemetry/api';
|
|
8
8
|
import { PrometheusExporter } from '@opentelemetry/exporter-prometheus';
|
|
@@ -154,8 +154,9 @@ interface DyrectedContext {
|
|
|
154
154
|
/**
|
|
155
155
|
* Create the main Dyrected Hono application.
|
|
156
156
|
*/
|
|
157
|
-
declare function createDyrectedApp(rawConfig: DyrectedConfig): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
157
|
+
declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
158
158
|
|
|
159
|
+
declare function serializeDetailForApi(detail?: any): any;
|
|
159
160
|
/**
|
|
160
161
|
* Register dynamic routes based on the provided configuration.
|
|
161
162
|
*/
|
|
@@ -306,6 +307,7 @@ declare class CollectionController {
|
|
|
306
307
|
constructor(collection: CollectionConfig);
|
|
307
308
|
private getDelegatedProvider;
|
|
308
309
|
private toHookRequestContext;
|
|
310
|
+
private sanitizeDoc;
|
|
309
311
|
private evaluateAccess;
|
|
310
312
|
find(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
311
313
|
message: string;
|
|
@@ -373,8 +375,6 @@ declare class CollectionController {
|
|
|
373
375
|
[x: string]: hono_utils_types.JSONValue;
|
|
374
376
|
}, 201, "json">)>;
|
|
375
377
|
update(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
376
|
-
[x: string]: hono_utils_types.JSONValue;
|
|
377
|
-
}, hono_utils_http_status.ContentfulStatusCode, "json">) | (Response & hono.TypedResponse<{
|
|
378
378
|
message: string;
|
|
379
379
|
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
380
380
|
message: string;
|
|
@@ -391,7 +391,9 @@ declare class CollectionController {
|
|
|
391
391
|
}, 404, "json">) | (Response & hono.TypedResponse<{
|
|
392
392
|
error: true;
|
|
393
393
|
message: string;
|
|
394
|
-
}, 403, "json">)
|
|
394
|
+
}, 403, "json">) | (Response & hono.TypedResponse<{
|
|
395
|
+
[x: string]: hono_utils_types.JSONValue;
|
|
396
|
+
}, hono_utils_http_status.ContentfulStatusCode, "json">)>;
|
|
395
397
|
transition(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
396
398
|
message: string;
|
|
397
399
|
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
@@ -466,12 +468,29 @@ declare class CollectionController {
|
|
|
466
468
|
seed(c: Context<DyrectedContext>): Promise<Response & hono.TypedResponse<{
|
|
467
469
|
message: string;
|
|
468
470
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
471
|
+
aggregate(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
472
|
+
message: string;
|
|
473
|
+
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
474
|
+
error: true;
|
|
475
|
+
message: string;
|
|
476
|
+
}, 403, "json">) | (Response & hono.TypedResponse<{
|
|
477
|
+
message: string;
|
|
478
|
+
}, 400, "json">) | (Response & hono.TypedResponse<{
|
|
479
|
+
[x: string]: number | null;
|
|
480
|
+
}, hono_utils_http_status.ContentfulStatusCode, "json">)>;
|
|
469
481
|
}
|
|
470
482
|
|
|
471
483
|
declare class GlobalController {
|
|
472
484
|
private global;
|
|
473
485
|
constructor(global: GlobalConfig);
|
|
474
|
-
get(c: Context<DyrectedContext>): Promise<Response & hono.TypedResponse<
|
|
486
|
+
get(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
487
|
+
[x: string]: hono_utils_types.JSONValue;
|
|
488
|
+
}, hono_utils_http_status.ContentfulStatusCode, "json">) | (Response & hono.TypedResponse<{
|
|
489
|
+
message: string;
|
|
490
|
+
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
491
|
+
error: true;
|
|
492
|
+
message: string;
|
|
493
|
+
}, 403, "json">)>;
|
|
475
494
|
update(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
476
495
|
[x: string]: hono_utils_types.JSONValue;
|
|
477
496
|
}, hono_utils_http_status.ContentfulStatusCode, "json">) | (Response & hono.TypedResponse<{
|
|
@@ -557,4 +576,4 @@ declare class PreviewController {
|
|
|
557
576
|
}, 401, "json">)>;
|
|
558
577
|
}
|
|
559
578
|
|
|
560
|
-
export { AuthController, CollectionController, type DyrectedContext, type DyrectedObservabilityRuntime, GlobalController, MediaController, PreviewController, type RequestBodyCapture, type RequestTraceContext, type ResolvedObservabilityConfig, attachRequestMetrics, bindObservabilityRuntime, buildRequestLogger, captureRequestBody, createDyrectedApp, createObservabilityRuntime, createRequestSpan, endRequestSpan, getConfigLogger, getObservabilityRuntime, getRequestLogger, redactBody, redactHeaders, registerRoutes, renderPrometheusMetrics, resolveObservabilityConfig, shouldSampleRequest };
|
|
579
|
+
export { AuthController, CollectionController, type DyrectedContext, type DyrectedObservabilityRuntime, GlobalController, MediaController, PreviewController, type RequestBodyCapture, type RequestTraceContext, type ResolvedObservabilityConfig, attachRequestMetrics, bindObservabilityRuntime, buildRequestLogger, captureRequestBody, createDyrectedApp, createObservabilityRuntime, createRequestSpan, endRequestSpan, getConfigLogger, getObservabilityRuntime, getRequestLogger, redactBody, redactHeaders, registerRoutes, renderPrometheusMetrics, resolveObservabilityConfig, serializeDetailForApi, shouldSampleRequest };
|
package/dist/server.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as hono_types from 'hono/types';
|
|
|
2
2
|
import * as hono from 'hono';
|
|
3
3
|
import { Context, Hono } from 'hono';
|
|
4
4
|
import { Logger } from 'pino';
|
|
5
|
-
import { D as DyrectedConfig,
|
|
5
|
+
import { D as DyrectedConfig, aY as DyrectedObservabilityConfig, C as CollectionConfig, G as GlobalConfig } from './app-config-WzqpuZMr.js';
|
|
6
6
|
import { JWTPayload } from 'jose';
|
|
7
7
|
import { Tracer, Counter, Attributes, Histogram, Span } from '@opentelemetry/api';
|
|
8
8
|
import { PrometheusExporter } from '@opentelemetry/exporter-prometheus';
|
|
@@ -154,8 +154,9 @@ interface DyrectedContext {
|
|
|
154
154
|
/**
|
|
155
155
|
* Create the main Dyrected Hono application.
|
|
156
156
|
*/
|
|
157
|
-
declare function createDyrectedApp(rawConfig: DyrectedConfig): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
157
|
+
declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
158
158
|
|
|
159
|
+
declare function serializeDetailForApi(detail?: any): any;
|
|
159
160
|
/**
|
|
160
161
|
* Register dynamic routes based on the provided configuration.
|
|
161
162
|
*/
|
|
@@ -306,6 +307,7 @@ declare class CollectionController {
|
|
|
306
307
|
constructor(collection: CollectionConfig);
|
|
307
308
|
private getDelegatedProvider;
|
|
308
309
|
private toHookRequestContext;
|
|
310
|
+
private sanitizeDoc;
|
|
309
311
|
private evaluateAccess;
|
|
310
312
|
find(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
311
313
|
message: string;
|
|
@@ -373,8 +375,6 @@ declare class CollectionController {
|
|
|
373
375
|
[x: string]: hono_utils_types.JSONValue;
|
|
374
376
|
}, 201, "json">)>;
|
|
375
377
|
update(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
376
|
-
[x: string]: hono_utils_types.JSONValue;
|
|
377
|
-
}, hono_utils_http_status.ContentfulStatusCode, "json">) | (Response & hono.TypedResponse<{
|
|
378
378
|
message: string;
|
|
379
379
|
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
380
380
|
message: string;
|
|
@@ -391,7 +391,9 @@ declare class CollectionController {
|
|
|
391
391
|
}, 404, "json">) | (Response & hono.TypedResponse<{
|
|
392
392
|
error: true;
|
|
393
393
|
message: string;
|
|
394
|
-
}, 403, "json">)
|
|
394
|
+
}, 403, "json">) | (Response & hono.TypedResponse<{
|
|
395
|
+
[x: string]: hono_utils_types.JSONValue;
|
|
396
|
+
}, hono_utils_http_status.ContentfulStatusCode, "json">)>;
|
|
395
397
|
transition(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
396
398
|
message: string;
|
|
397
399
|
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
@@ -466,12 +468,29 @@ declare class CollectionController {
|
|
|
466
468
|
seed(c: Context<DyrectedContext>): Promise<Response & hono.TypedResponse<{
|
|
467
469
|
message: string;
|
|
468
470
|
}, hono_utils_http_status.ContentfulStatusCode, "json">>;
|
|
471
|
+
aggregate(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
472
|
+
message: string;
|
|
473
|
+
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
474
|
+
error: true;
|
|
475
|
+
message: string;
|
|
476
|
+
}, 403, "json">) | (Response & hono.TypedResponse<{
|
|
477
|
+
message: string;
|
|
478
|
+
}, 400, "json">) | (Response & hono.TypedResponse<{
|
|
479
|
+
[x: string]: number | null;
|
|
480
|
+
}, hono_utils_http_status.ContentfulStatusCode, "json">)>;
|
|
469
481
|
}
|
|
470
482
|
|
|
471
483
|
declare class GlobalController {
|
|
472
484
|
private global;
|
|
473
485
|
constructor(global: GlobalConfig);
|
|
474
|
-
get(c: Context<DyrectedContext>): Promise<Response & hono.TypedResponse<
|
|
486
|
+
get(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
487
|
+
[x: string]: hono_utils_types.JSONValue;
|
|
488
|
+
}, hono_utils_http_status.ContentfulStatusCode, "json">) | (Response & hono.TypedResponse<{
|
|
489
|
+
message: string;
|
|
490
|
+
}, 500, "json">) | (Response & hono.TypedResponse<{
|
|
491
|
+
error: true;
|
|
492
|
+
message: string;
|
|
493
|
+
}, 403, "json">)>;
|
|
475
494
|
update(c: Context<DyrectedContext>): Promise<(Response & hono.TypedResponse<{
|
|
476
495
|
[x: string]: hono_utils_types.JSONValue;
|
|
477
496
|
}, hono_utils_http_status.ContentfulStatusCode, "json">) | (Response & hono.TypedResponse<{
|
|
@@ -557,4 +576,4 @@ declare class PreviewController {
|
|
|
557
576
|
}, 401, "json">)>;
|
|
558
577
|
}
|
|
559
578
|
|
|
560
|
-
export { AuthController, CollectionController, type DyrectedContext, type DyrectedObservabilityRuntime, GlobalController, MediaController, PreviewController, type RequestBodyCapture, type RequestTraceContext, type ResolvedObservabilityConfig, attachRequestMetrics, bindObservabilityRuntime, buildRequestLogger, captureRequestBody, createDyrectedApp, createObservabilityRuntime, createRequestSpan, endRequestSpan, getConfigLogger, getObservabilityRuntime, getRequestLogger, redactBody, redactHeaders, registerRoutes, renderPrometheusMetrics, resolveObservabilityConfig, shouldSampleRequest };
|
|
579
|
+
export { AuthController, CollectionController, type DyrectedContext, type DyrectedObservabilityRuntime, GlobalController, MediaController, PreviewController, type RequestBodyCapture, type RequestTraceContext, type ResolvedObservabilityConfig, attachRequestMetrics, bindObservabilityRuntime, buildRequestLogger, captureRequestBody, createDyrectedApp, createObservabilityRuntime, createRequestSpan, endRequestSpan, getConfigLogger, getObservabilityRuntime, getRequestLogger, redactBody, redactHeaders, registerRoutes, renderPrometheusMetrics, resolveObservabilityConfig, serializeDetailForApi, shouldSampleRequest };
|