@emeryld/rrroutes-openapi 2.5.7 → 2.5.12
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/README.md +6 -0
- package/dist/docs/LeafDocsPage.d.ts +17 -1
- package/dist/index.cjs +98 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -26
- package/dist/index.mjs +97 -48
- package/dist/index.mjs.map +1 -1
- package/dist/public/assets/docs.js +120 -115
- package/dist/web/app.d.ts +4 -1
- package/dist/web/v2/AppShell.d.ts +3 -1
- package/dist/web/v2/components/endpoints/EndpointPlayground.d.ts +1 -3
- package/dist/web/v2/components/endpoints/KeyValueEditor.d.ts +2 -1
- package/dist/web/v2/components/endpoints/PlaygroundEditor.d.ts +1 -2
- package/dist/web/v2/components/feeds/FeedPagination.d.ts +1 -2
- package/dist/web/v2/components/history/RequestDetailContent.d.ts +2 -18
- package/dist/web/v2/components/inputs/JsonInputWithTools.d.ts +3 -1
- package/dist/web/v2/components/json/JsonTree.d.ts +11 -0
- package/dist/web/v2/components/json/JsonTreeRow.d.ts +14 -0
- package/dist/web/v2/components/json/JsonViewer.d.ts +13 -1
- package/dist/web/v2/components/json/jsonViewerUtils.d.ts +3 -0
- package/dist/web/v2/components/{playgroundOverlay/PlaygroundOverlayLayout.d.ts → layout/OverlayLayout.d.ts} +3 -3
- package/dist/web/v2/components/logs/cache/common/CacheSummaryStat.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/common/CacheTraceDialog.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/common/CacheValueDialog.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/common/DetailField.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/common/MutedText.d.ts +4 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsights.d.ts +10 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsKeySection.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsKpiRow.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsOverview.d.ts +8 -0
- package/dist/web/v2/components/logs/cache/insights/CacheInsightsTagSection.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/insights/CacheProblemPanels.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/insights/CacheTagInsights.d.ts +20 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailActions.d.ts +12 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailLogsTab.d.ts +3 -0
- package/dist/web/v2/components/logs/cache/{CacheKeyDetailModal.d.ts → key-detail/CacheKeyDetailModal.d.ts} +7 -2
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailSummary.d.ts +17 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailTimelineTab.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/key-detail/CacheKeyDetailTracesTab.d.ts +3 -0
- package/dist/web/v2/components/logs/cache/logs/CacheDataCard.d.ts +30 -0
- package/dist/web/v2/components/logs/cache/logs/CacheFiltersCard.d.ts +15 -0
- package/dist/web/v2/components/logs/cache/logs/CacheLogsTable.d.ts +7 -0
- package/dist/web/v2/components/logs/cache/{CacheSummaryTable.d.ts → logs/CacheSummaryTable.d.ts} +1 -1
- package/dist/web/v2/components/logs/cache/modals/CacheTagDetailModal.d.ts +11 -0
- package/dist/web/v2/components/performance/PerformanceMonitor.d.ts +207 -0
- package/dist/web/v2/components/presets/PresetForm.d.ts +2 -1
- package/dist/web/v2/components/presets/PresetOperationsTabsEditor.d.ts +17 -0
- package/dist/web/v2/components/presets/PresetsCsvActions.d.ts +7 -0
- package/dist/web/v2/components/presets/presetOperationAdapters.d.ts +11 -0
- package/dist/web/v2/components/presets/presetOperationRun.d.ts +35 -0
- package/dist/web/v2/components/presets/presetOperationUtils.d.ts +2 -0
- package/dist/web/v2/components/primitives/HoverRow.d.ts +6 -0
- package/dist/web/v2/components/primitives/InlineActionButton.d.ts +7 -0
- package/dist/web/v2/components/primitives/SurfaceActionArea.d.ts +8 -0
- package/dist/web/v2/components/request/LastRunPanel.d.ts +17 -0
- package/dist/web/v2/components/request/RequestInputsEditor.d.ts +38 -0
- package/dist/web/v2/components/request/RequestUrlSelector.d.ts +15 -0
- package/dist/web/v2/components/requests/timeline/RequestTimeline.d.ts +13 -0
- package/dist/web/v2/components/requests/timeline/RequestTimelineEventMiniCard.d.ts +13 -0
- package/dist/web/v2/components/requests/timeline/RequestTimelineFilters.d.ts +20 -0
- package/dist/web/v2/components/requests/timeline/RequestTimelineRow.d.ts +15 -0
- package/dist/web/v2/components/requests/timeline/types.d.ts +19 -0
- package/dist/web/v2/components/tabs/StickyIconTabs.d.ts +17 -0
- package/dist/web/v2/components/tags/DurationChip.d.ts +16 -0
- package/dist/web/v2/components/tags/LogLevelChip.d.ts +1 -2
- package/dist/web/v2/hooks/useCacheTrace.d.ts +21 -0
- package/dist/web/v2/registries/logLevelRegistry.d.ts +27 -0
- package/dist/web/v2/stores/playgroundStore.d.ts +3 -9
- package/dist/web/v2/theme.d.ts +21 -0
- package/dist/web/v2/types/types.cacheLog.d.ts +271 -32
- package/dist/web/v2/types/types.d.ts +3 -1
- package/dist/web/v2/types/types.endpoint.d.ts +20 -0
- package/dist/web/v2/types/types.kvRow.d.ts +8 -0
- package/dist/web/v2/types/types.log.d.ts +25 -78
- package/dist/web/v2/types/types.requestLog.d.ts +40 -44
- package/dist/web/v2/types/types.scheduling.d.ts +423 -0
- package/dist/web/v2/utils/cache/cacheInsightsMappers.d.ts +6 -0
- package/dist/web/v2/utils/cache/cacheInsightsMetrics.d.ts +24 -0
- package/dist/web/v2/utils/cache/cacheTraceInsights.d.ts +35 -0
- package/dist/web/v2/utils/cacheFormat.d.ts +7 -0
- package/dist/web/v2/utils/cacheUtils.d.ts +2 -0
- package/dist/web/v2/utils/colorScale.d.ts +14 -0
- package/dist/web/v2/utils/downloadTextFile.d.ts +1 -0
- package/dist/web/v2/utils/kvRow.d.ts +4 -4
- package/dist/web/v2/utils/kvRowAdapters.d.ts +14 -0
- package/dist/web/v2/utils/presetCsv.d.ts +22 -0
- package/dist/web/v2/utils/presetsCsv.d.ts +6 -0
- package/dist/web/v2/utils/sizeFormat.d.ts +2 -0
- package/package.json +3 -3
- package/dist/web/v2/components/endpoints/PlaygroundRunPanel.d.ts +0 -12
- package/dist/web/v2/components/endpoints/PlaygroundTopTabs.d.ts +0 -11
- package/dist/web/v2/components/history/RequestTimeline.d.ts +0 -10
- package/dist/web/v2/components/logs/cache/CacheInsightsKeySection.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheInsightsOverview.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheInsightsTagSection.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheLogsTable.d.ts +0 -6
- package/dist/web/v2/components/logs/cache/CacheTagInsights.d.ts +0 -43
- package/dist/web/v2/components/logs/cache/CacheValueDialog.d.ts +0 -7
- package/dist/web/v2/components/presets/PresetOperationsEditor.d.ts +0 -7
- /package/dist/web/v2/components/{playgroundOverlay → layout}/useMeasuredElement.d.ts +0 -0
- /package/dist/web/v2/components/logs/cache/{CacheLogsSection.d.ts → logs/CacheLogsSection.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -74,6 +74,12 @@ The docs UI expects serialized leaves from `@emeryld/rrroutes-contract`. Each le
|
|
|
74
74
|
- `method`, `path`, and `cfg` (summary, description, tags, docsGroup, stability, deprecated, docsMeta, feed)
|
|
75
75
|
- Optional Zod schemas for params/query/body/output; these are introspected into a serializable AST for schema tables.
|
|
76
76
|
|
|
77
|
+
### Preset CSV format
|
|
78
|
+
|
|
79
|
+
Presets use `packages/openapi/src/web/v2/utils/presetCsv.ts` for import/export. That module expects the heading
|
|
80
|
+
`presetId,presetName,presetDescription,presetGroupId,presetTags,opStepNumber,opName,opDescription,opMethod,opPath,opEndpointId,opQueryJson,opExtraHeadersJson,opBodyJson`
|
|
81
|
+
and emits the same order when saving CSV, with tags stored as `;`-separated values and JSON cells kept compact.
|
|
82
|
+
|
|
77
83
|
## Build / develop
|
|
78
84
|
|
|
79
85
|
```sh
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
+
export type DocsThemeConfig = Partial<{
|
|
3
|
+
bg: string;
|
|
4
|
+
surface: string;
|
|
5
|
+
primary: string;
|
|
6
|
+
secondary: string;
|
|
7
|
+
success: string;
|
|
8
|
+
warning: string;
|
|
9
|
+
error: string;
|
|
10
|
+
textPrimary: string;
|
|
11
|
+
}>;
|
|
2
12
|
export interface RenderOptions {
|
|
3
13
|
/** CSP nonce applied to data + script tags. */
|
|
4
14
|
cspNonce?: string;
|
|
@@ -6,13 +16,19 @@ export interface RenderOptions {
|
|
|
6
16
|
assetBasePath?: string;
|
|
7
17
|
/** Root path where the docs are mounted (e.g. `/__rrroutes/docs`). Used for client routing. */
|
|
8
18
|
docsBasePath?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional theme seed overrides passed to the client.
|
|
21
|
+
* If omitted, the client uses its built-in default docs theme.
|
|
22
|
+
*/
|
|
23
|
+
theme?: DocsThemeConfig;
|
|
9
24
|
}
|
|
10
25
|
type DocsDocumentProps = {
|
|
11
26
|
assetBase: string;
|
|
12
27
|
docsBase: string;
|
|
13
28
|
cspNonce?: string;
|
|
29
|
+
theme?: DocsThemeConfig;
|
|
14
30
|
};
|
|
15
|
-
export declare const DocsDocument: ({ assetBase, docsBase, cspNonce, }: DocsDocumentProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const DocsDocument: ({ assetBase, docsBase, cspNonce, theme, }: DocsDocumentProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
32
|
export declare function createLeafDocsDocument(options?: RenderOptions): ReactElement;
|
|
17
33
|
export declare function renderLeafDocsHTML(options?: RenderOptions): string;
|
|
18
34
|
export type SerializableHistoryEntry = {
|
package/dist/index.cjs
CHANGED
|
@@ -252,13 +252,15 @@ function normalizeDocsBase(base) {
|
|
|
252
252
|
var DocsDocument = ({
|
|
253
253
|
assetBase,
|
|
254
254
|
docsBase,
|
|
255
|
-
cspNonce
|
|
255
|
+
cspNonce,
|
|
256
|
+
theme
|
|
256
257
|
}) => {
|
|
257
258
|
const cssHref = `${assetBase}/docs.css`;
|
|
258
259
|
const jsSrc = `${assetBase}/docs.js`;
|
|
259
260
|
const configJson = serializeConfig({
|
|
260
261
|
docsBasePath: docsBase,
|
|
261
|
-
cspNonce
|
|
262
|
+
cspNonce,
|
|
263
|
+
theme
|
|
262
264
|
});
|
|
263
265
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("html", { lang: "en", children: [
|
|
264
266
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("head", { children: [
|
|
@@ -293,7 +295,8 @@ function createLeafDocsDocument(options = {}) {
|
|
|
293
295
|
{
|
|
294
296
|
assetBase,
|
|
295
297
|
docsBase,
|
|
296
|
-
cspNonce: options.cspNonce
|
|
298
|
+
cspNonce: options.cspNonce,
|
|
299
|
+
theme: options.theme
|
|
297
300
|
}
|
|
298
301
|
);
|
|
299
302
|
}
|
|
@@ -456,7 +459,7 @@ function applyDocsSecurityHeaders(res) {
|
|
|
456
459
|
}
|
|
457
460
|
|
|
458
461
|
// src/web/v2/types/types.ts
|
|
459
|
-
var
|
|
462
|
+
var import_rrroutes_contract9 = require("@emeryld/rrroutes-contract");
|
|
460
463
|
|
|
461
464
|
// src/web/v2/types/types.cacheLog.ts
|
|
462
465
|
var import_rrroutes_contract2 = require("@emeryld/rrroutes-contract");
|
|
@@ -498,16 +501,23 @@ var feedMeta = import_zod.default.object({
|
|
|
498
501
|
// src/web/v2/types/types.cacheLog.ts
|
|
499
502
|
var CACHE_OPERATIONS = ["hit", "miss", "set", "delete"];
|
|
500
503
|
var operationEnum = import_zod2.default.enum(CACHE_OPERATIONS);
|
|
501
|
-
var
|
|
504
|
+
var cacheTraceSchema = import_zod2.default.object({
|
|
505
|
+
id: import_zod2.default.string(),
|
|
506
|
+
timestamp: import_zod2.default.number(),
|
|
502
507
|
operation: operationEnum,
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
508
|
+
key: import_zod2.default.string(),
|
|
509
|
+
size: import_zod2.default.number().optional(),
|
|
510
|
+
durationMs: import_zod2.default.number().optional(),
|
|
511
|
+
groupId: import_zod2.default.string().optional(),
|
|
512
|
+
type: import_zod2.default.string().optional()
|
|
513
|
+
// 'redis', 'dataloader', etc.
|
|
514
|
+
});
|
|
515
|
+
var cacheTraceQuerySchema = baseQuerySchema;
|
|
516
|
+
var cacheLogSchema = baseEntitySchema.extend({
|
|
507
517
|
value: import_zod2.default.any().nullable(),
|
|
508
518
|
size: import_zod2.default.number().optional(),
|
|
509
|
-
|
|
510
|
-
|
|
519
|
+
setAt: import_zod2.default.number().optional(),
|
|
520
|
+
ttlMs: import_zod2.default.number().optional()
|
|
511
521
|
});
|
|
512
522
|
var cacheLogQuerySchema = baseQuerySchema.extend({
|
|
513
523
|
operationsInclude: operationEnum.array().optional(),
|
|
@@ -603,6 +613,13 @@ var cacheLeaves = (0, import_rrroutes_contract2.resource)("cache").get({
|
|
|
603
613
|
outputMetaSchema: feedMeta,
|
|
604
614
|
queryExtensionSchema: paginationSchema
|
|
605
615
|
}).sub(
|
|
616
|
+
(0, import_rrroutes_contract2.resource)(":cacheKey", {}, import_zod2.default.string()).get({
|
|
617
|
+
feed: true,
|
|
618
|
+
outputSchema: cacheTraceSchema.array(),
|
|
619
|
+
queryExtensionSchema: paginationSchema,
|
|
620
|
+
querySchema: cacheTraceQuerySchema,
|
|
621
|
+
outputMetaSchema: feedMeta
|
|
622
|
+
}).done(),
|
|
606
623
|
(0, import_rrroutes_contract2.resource)("insights").get({
|
|
607
624
|
outputSchema: cacheInsightsSchema,
|
|
608
625
|
querySchema: cacheInsightsQuerySchema
|
|
@@ -624,14 +641,7 @@ var import_zod4 = __toESM(require("zod"), 1);
|
|
|
624
641
|
// src/web/v2/types/types.log.ts
|
|
625
642
|
var import_rrroutes_contract3 = require("@emeryld/rrroutes-contract");
|
|
626
643
|
var import_zod3 = __toESM(require("zod"), 1);
|
|
627
|
-
var
|
|
628
|
-
"info",
|
|
629
|
-
"warning",
|
|
630
|
-
"error",
|
|
631
|
-
"debug",
|
|
632
|
-
"trace"
|
|
633
|
-
];
|
|
634
|
-
var levelSchema = import_zod3.default.enum(LOG_LEVELS);
|
|
644
|
+
var levelSchema = import_zod3.default.string();
|
|
635
645
|
var logSchema = baseEntitySchema.extend({
|
|
636
646
|
level: levelSchema,
|
|
637
647
|
meta: import_zod3.default.any().optional()
|
|
@@ -644,7 +654,9 @@ var logLeaves = (0, import_rrroutes_contract3.resource)("logs").get({
|
|
|
644
654
|
feed: true,
|
|
645
655
|
outputSchema: logSchema.array(),
|
|
646
656
|
querySchema: logQuerySchema,
|
|
647
|
-
outputMetaSchema: feedMeta
|
|
657
|
+
outputMetaSchema: feedMeta.extend({
|
|
658
|
+
levels: levelSchema.array().optional()
|
|
659
|
+
}),
|
|
648
660
|
queryExtensionSchema: paginationSchema
|
|
649
661
|
}).done();
|
|
650
662
|
|
|
@@ -662,7 +674,9 @@ var requestSchema = baseEntitySchema.extend({
|
|
|
662
674
|
error: import_zod4.default.string().optional(),
|
|
663
675
|
durationMs: import_zod4.default.number(),
|
|
664
676
|
ip: import_zod4.default.string().optional(),
|
|
665
|
-
userAgent: import_zod4.default.string().optional()
|
|
677
|
+
userAgent: import_zod4.default.string().optional(),
|
|
678
|
+
requestSize: import_zod4.default.number().optional(),
|
|
679
|
+
responseSize: import_zod4.default.number().optional()
|
|
666
680
|
});
|
|
667
681
|
var requestQuerySchema = baseQuerySchema.extend({
|
|
668
682
|
methodsInclude: methodSchema.array().optional(),
|
|
@@ -685,7 +699,7 @@ var requestLogLeaves = (0, import_rrroutes_contract4.resource)("requests").get({
|
|
|
685
699
|
// Related by groupId
|
|
686
700
|
// Do I just use the existing feed endpoints with filter: groupId=?
|
|
687
701
|
logs: import_zod4.default.array(logSchema),
|
|
688
|
-
caches: import_zod4.default.array(
|
|
702
|
+
caches: import_zod4.default.array(cacheTraceSchema)
|
|
689
703
|
})
|
|
690
704
|
}).done()
|
|
691
705
|
).done();
|
|
@@ -820,10 +834,42 @@ var presetLeaves = (0, import_rrroutes_contract6.resource)("presets").get({
|
|
|
820
834
|
outputSchema: presetSchema
|
|
821
835
|
}).done();
|
|
822
836
|
|
|
823
|
-
// src/web/v2/types/types.
|
|
837
|
+
// src/web/v2/types/types.scheduling.ts
|
|
824
838
|
var import_rrroutes_contract7 = require("@emeryld/rrroutes-contract");
|
|
825
839
|
var import_zod7 = __toESM(require("zod"), 1);
|
|
826
|
-
var
|
|
840
|
+
var schedulingSchema = baseEntitySchema.extend({
|
|
841
|
+
scheduledAt: import_zod7.default.number().optional(),
|
|
842
|
+
startedAt: import_zod7.default.number().optional(),
|
|
843
|
+
completedAt: import_zod7.default.number().optional(),
|
|
844
|
+
status: import_zod7.default.string()
|
|
845
|
+
});
|
|
846
|
+
var schedulingQuerySchema = baseQuerySchema.extend({
|
|
847
|
+
status: import_zod7.default.string().array().optional()
|
|
848
|
+
});
|
|
849
|
+
var schedulableHandler = import_zod7.default.object({
|
|
850
|
+
name: import_zod7.default.string(),
|
|
851
|
+
payload: import_zod7.default.string()
|
|
852
|
+
});
|
|
853
|
+
var schedulingLeaves = (0, import_rrroutes_contract7.resource)("schedulings").get({
|
|
854
|
+
feed: true,
|
|
855
|
+
outputSchema: schedulingSchema.array(),
|
|
856
|
+
querySchema: schedulingQuerySchema,
|
|
857
|
+
outputMetaSchema: feedMeta,
|
|
858
|
+
queryExtensionSchema: paginationSchema
|
|
859
|
+
}).sub(
|
|
860
|
+
(0, import_rrroutes_contract7.resource)("handlers").get({
|
|
861
|
+
feed: true,
|
|
862
|
+
outputSchema: schedulableHandler.array(),
|
|
863
|
+
querySchema: import_zod7.default.object({ name: import_zod7.default.string().optional() }),
|
|
864
|
+
outputMetaSchema: feedMeta,
|
|
865
|
+
queryExtensionSchema: paginationSchema
|
|
866
|
+
}).done()
|
|
867
|
+
).done();
|
|
868
|
+
|
|
869
|
+
// src/web/v2/types/types.socket.ts
|
|
870
|
+
var import_rrroutes_contract8 = require("@emeryld/rrroutes-contract");
|
|
871
|
+
var import_zod8 = __toESM(require("zod"), 1);
|
|
872
|
+
var socketEventDirectionSchema = import_zod8.default.enum([
|
|
827
873
|
"incoming",
|
|
828
874
|
// client -> server
|
|
829
875
|
"outgoing",
|
|
@@ -833,37 +879,37 @@ var socketEventDirectionSchema = import_zod7.default.enum([
|
|
|
833
879
|
]);
|
|
834
880
|
var socketEventSchema = baseEntitySchema.extend({
|
|
835
881
|
// event name
|
|
836
|
-
name:
|
|
882
|
+
name: import_zod8.default.string(),
|
|
837
883
|
// arbitrary payload
|
|
838
|
-
message:
|
|
884
|
+
message: import_zod8.default.any().optional(),
|
|
839
885
|
// "server" or socket id
|
|
840
|
-
origin:
|
|
886
|
+
origin: import_zod8.default.union([import_zod8.default.literal("server"), import_zod8.default.string()]),
|
|
841
887
|
// "incoming" | "outgoing" | "broadcast"
|
|
842
|
-
direction:
|
|
888
|
+
direction: import_zod8.default.enum(["incoming", "outgoing", "broadcast"]),
|
|
843
889
|
// for incoming/outgoing direct events
|
|
844
|
-
socketId:
|
|
890
|
+
socketId: import_zod8.default.string().optional(),
|
|
845
891
|
// for broadcast events
|
|
846
|
-
rooms:
|
|
847
|
-
except:
|
|
892
|
+
rooms: import_zod8.default.array(import_zod8.default.string()).optional(),
|
|
893
|
+
except: import_zod8.default.array(import_zod8.default.string()).optional()
|
|
848
894
|
});
|
|
849
895
|
var socketEventQuerySchema = baseQuerySchema.extend({
|
|
850
896
|
// Exact event name match (single value for now)
|
|
851
|
-
eventName:
|
|
852
|
-
roomsInclude:
|
|
853
|
-
roomsExclude:
|
|
897
|
+
eventName: import_zod8.default.string().optional(),
|
|
898
|
+
roomsInclude: import_zod8.default.array(import_zod8.default.string()).optional(),
|
|
899
|
+
roomsExclude: import_zod8.default.array(import_zod8.default.string()).optional()
|
|
854
900
|
});
|
|
855
|
-
var socketEmitSchema =
|
|
856
|
-
eventName:
|
|
901
|
+
var socketEmitSchema = import_zod8.default.object({
|
|
902
|
+
eventName: import_zod8.default.string(),
|
|
857
903
|
// JSON payload for the event
|
|
858
|
-
message:
|
|
904
|
+
message: import_zod8.default.json().optional(),
|
|
859
905
|
// Target room IDs. Use null for broadcast.
|
|
860
|
-
toRoomId:
|
|
906
|
+
toRoomId: import_zod8.default.array(import_zod8.default.string()).nullable()
|
|
861
907
|
});
|
|
862
|
-
var socketEmitResultSchema =
|
|
863
|
-
success:
|
|
864
|
-
eventId:
|
|
908
|
+
var socketEmitResultSchema = import_zod8.default.object({
|
|
909
|
+
success: import_zod8.default.boolean(),
|
|
910
|
+
eventId: import_zod8.default.string().optional()
|
|
865
911
|
});
|
|
866
|
-
var socketLeaves = (0,
|
|
912
|
+
var socketLeaves = (0, import_rrroutes_contract8.resource)("sockets").get({
|
|
867
913
|
feed: true,
|
|
868
914
|
outputSchema: socketEventSchema.array(),
|
|
869
915
|
querySchema: socketEventQuerySchema,
|
|
@@ -875,17 +921,18 @@ var socketLeaves = (0, import_rrroutes_contract7.resource)("sockets").get({
|
|
|
875
921
|
}).done();
|
|
876
922
|
|
|
877
923
|
// src/web/v2/types/types.ts
|
|
878
|
-
var allLeaves = (0,
|
|
879
|
-
(0,
|
|
924
|
+
var allLeaves = (0, import_rrroutes_contract9.resource)().sub(
|
|
925
|
+
(0, import_rrroutes_contract9.resource)("/__rrroutes").sub(
|
|
880
926
|
endpointLeaves,
|
|
881
927
|
requestLogLeaves,
|
|
882
928
|
logLeaves,
|
|
883
929
|
cacheLeaves,
|
|
884
930
|
presetLeaves,
|
|
885
|
-
socketLeaves
|
|
931
|
+
socketLeaves,
|
|
932
|
+
schedulingLeaves
|
|
886
933
|
).done()
|
|
887
934
|
).done();
|
|
888
|
-
var leaves = (0,
|
|
935
|
+
var leaves = (0, import_rrroutes_contract9.finalize)(allLeaves);
|
|
889
936
|
|
|
890
937
|
// src/index.ts
|
|
891
938
|
function resolvePublicDir() {
|
|
@@ -898,7 +945,8 @@ function resolvePublicDir() {
|
|
|
898
945
|
}
|
|
899
946
|
function mountRRRoutesDocs({
|
|
900
947
|
router,
|
|
901
|
-
auth = {}
|
|
948
|
+
auth = {},
|
|
949
|
+
theme
|
|
902
950
|
}) {
|
|
903
951
|
const docsPath = "/__rrroutes/docs";
|
|
904
952
|
const publicDir = resolvePublicDir();
|
|
@@ -926,8 +974,9 @@ function mountRRRoutesDocs({
|
|
|
926
974
|
const nonce = cspEnabled ? (0, import_crypto.randomBytes)(16).toString("base64") : void 0;
|
|
927
975
|
const html = renderLeafDocsHTML2({
|
|
928
976
|
cspNonce: nonce,
|
|
929
|
-
assetBasePath: `${
|
|
930
|
-
docsBasePath: `${docsPath}
|
|
977
|
+
assetBasePath: `${docsPath}/assets`,
|
|
978
|
+
docsBasePath: `${docsPath}`,
|
|
979
|
+
theme
|
|
931
980
|
});
|
|
932
981
|
applyDocsSecurityHeaders(res);
|
|
933
982
|
if (cspEnabled && nonce) {
|