mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
code: nextjs,frontends,package (6 files)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export { deletePackageData } from './data/delete-package-data'
|
||||
1
frontends/nextjs/src/lib/db/packages/get-package-data.ts
Normal file
1
frontends/nextjs/src/lib/db/packages/get-package-data.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { getPackageData } from './data/get-package-data'
|
||||
1
frontends/nextjs/src/lib/db/packages/set-package-data.ts
Normal file
1
frontends/nextjs/src/lib/db/packages/set-package-data.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { setPackageData } from './data/set-package-data'
|
||||
@@ -0,0 +1 @@
|
||||
export { togglePackageEnabled } from './install/crud/toggle-package-enabled'
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user