Skip to content
Source
Sign inSign up

server.ts

26 lines1.2 KB

1import { createServerEnvironmentAtoms } from "@t3tools/client-runtime/state/server";
2import {
3 createOutdatedServerDescriptionCommand,
4 createOutdatedServerUpdateCommand,
5} from "@t3tools/client-runtime/state/outdatedServerUpdate";
6import { createEnvironmentServerConfigsAtom } from "@t3tools/client-runtime/state/shell";
7​
8import { environmentCatalog } from "../connection/catalog";
9import { connectionAtomRuntime } from "../connection/runtime";
10import { environmentSession } from "./session";
11​
12export const serverEnvironment = createServerEnvironmentAtoms(connectionAtomRuntime, {
13 initialConfigValueAtom: environmentSession.initialConfigValueAtom,
14 usageLimitSources: true,
15 usageLimitsCommand: true,
16 providerCatalogsOnDemand: true,
17 providerCatalogDigests: true,
18 providerStatusDeltas: true,
19 omitRefreshedProviders: true,
20});
21export const describeOutdatedServer = createOutdatedServerDescriptionCommand(connectionAtomRuntime);
22export const updateOutdatedServer = createOutdatedServerUpdateCommand(connectionAtomRuntime);
23export const environmentServerConfigsAtom = createEnvironmentServerConfigsAtom({
24 catalogValueAtom: environmentCatalog.catalogValueAtom,
25 serverConfigValueAtom: serverEnvironment.configValueAtom,
26});