Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 50a2f4d

Browse files
committed
Add plugin index
1 parent f0b4344 commit 50a2f4d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

packages/tre/src/plugins/index.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { ValueOf } from "../helpers";
2+
import { CACHE_PLUGIN, CACHE_PLUGIN_NAME } from "./cache";
3+
import { CORE_PLUGIN, CORE_PLUGIN_NAME } from "./core";
4+
import { DURABLE_OBJECTS_PLUGIN, DURABLE_OBJECTS_PLUGIN_NAME } from "./do";
5+
import { KV_PLUGIN, KV_PLUGIN_NAME } from "./kv";
6+
import { R2_PLUGIN, R2_PLUGIN_NAME } from "./r2";
7+
8+
export const PLUGINS = {
9+
[CORE_PLUGIN_NAME]: CORE_PLUGIN,
10+
[CACHE_PLUGIN_NAME]: CACHE_PLUGIN,
11+
[DURABLE_OBJECTS_PLUGIN_NAME]: DURABLE_OBJECTS_PLUGIN,
12+
[KV_PLUGIN_NAME]: KV_PLUGIN,
13+
[R2_PLUGIN_NAME]: R2_PLUGIN,
14+
} as const;
15+
export type Plugins = typeof PLUGINS;
16+
17+
export const PLUGIN_ENTRIES = Object.entries(PLUGINS) as [
18+
keyof Plugins,
19+
ValueOf<Plugins>
20+
][];
21+
22+
export * from "./shared";
23+
export { SERVICE_LOOPBACK, SERVICE_ENTRY, HEADER_PROBE } from "./core";
24+
25+
// TODO: be more liberal on exports?
26+
export * from "./cache";
27+
export * from "./do";
28+
export * from "./kv";
29+
export * from "./r2";

0 commit comments

Comments
 (0)