code: nextjs,frontends,package (6 files)

This commit is contained in:
2025-12-26 04:52:47 +00:00
parent 66652b9990
commit 61be04fc6a
6 changed files with 13 additions and 3 deletions

View File

@@ -6,15 +6,17 @@
#pragma once
#include <atomic>
#include <memory>
#include <string>
#include <thread>
#include "dbal/core/client.hpp"
namespace dbal {
namespace daemon {
class Server {
public:
Server(const std::string& bind_address, int port);
Server(const std::string& bind_address, int port, const dbal::ClientConfig& client_config);
~Server();
bool start();
@@ -25,12 +27,15 @@ public:
private:
void registerRoutes();
void runServer();
bool ensureClient();
std::string bind_address_;
int port_;
std::atomic<bool> running_;
bool routes_registered_;
std::thread server_thread_;
dbal::ClientConfig client_config_;
std::unique_ptr<dbal::Client> dbal_client_;
};
} // namespace daemon

View File

@@ -0,0 +1 @@
export { deletePackageData } from './data/delete-package-data'

View File

@@ -0,0 +1 @@
export { getPackageData } from './data/get-package-data'

View File

@@ -0,0 +1 @@
export { setPackageData } from './data/set-package-data'

View File

@@ -0,0 +1 @@
export { togglePackageEnabled } from './install/crud/toggle-package-enabled'

View File

@@ -1,7 +1,8 @@
import type { DBALClient } from '@/lib/dbal-stub'
import type { DBALClient as StubDBALClient } from '@/lib/dbal-stub'
import type { DBALClient as RealDBALClient } from '@/dbal/ts/src'
export const dbalState: {
client: DBALClient | null
client: StubDBALClient | RealDBALClient | null
initialized: boolean
} = {
client: null,