refactor(client): unify web and desktop release workflow
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { resolveApiBaseUrl } from "./apiBaseUrl";
|
||||
import { getAppMetadata } from "./appMetadata";
|
||||
import { isTauriRuntime } from "./platform";
|
||||
|
||||
export interface RuntimeCapabilities {
|
||||
serverConfiguration: boolean;
|
||||
nativeFiles: boolean;
|
||||
systemNotifications: boolean;
|
||||
secureSessionStorage: boolean;
|
||||
automaticUpdates: boolean;
|
||||
}
|
||||
|
||||
export interface ClientRuntime {
|
||||
apiBaseUrl(): string;
|
||||
metadata: typeof getAppMetadata;
|
||||
capabilities(): RuntimeCapabilities;
|
||||
}
|
||||
|
||||
export const clientRuntime: ClientRuntime = {
|
||||
apiBaseUrl: resolveApiBaseUrl,
|
||||
metadata: getAppMetadata,
|
||||
capabilities: () => ({
|
||||
serverConfiguration: isTauriRuntime(),
|
||||
nativeFiles: false,
|
||||
systemNotifications: false,
|
||||
secureSessionStorage: false,
|
||||
automaticUpdates: false,
|
||||
}),
|
||||
};
|
||||
Reference in New Issue
Block a user