feat(cli,registry): expose install options; paginate user listings
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 2s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 7s

This commit is contained in:
faumaray committed 2026-12-04 07:36:06 +03:00
1 parent c7d2662cf2
commit eabcb92d0b
8 files changed
+154 -15

No files matched your search

+2
View File
@@ -259,6 +259,8 @@ Stage: VERIFIED — Plans 01–19 + Plan 20 Slices 1–2C + Track A + Track B (B
- **Wave 83 (Token Revocation & Daemon `deps --update`)**: added `Package::revoke_token` and `vbs tokens revoke --registry --token-id`, with a CLI E2E that revokes a second token and observes it as revoked in the listing. A swarm worker added an `update` boolean to the daemon `deps` request (allow compatible upgrades) with validation and plumbing tests (5/5 substantive tasks; build task stopped and re-run).
- **Wave 84 (Daemon Install CLI Options & Registry Users Pagination)**: `vbs daemon install` now exposes `--component`, `--no-cmake-export`, and `--no-native-export` (matching the daemon protocol). A swarm worker paginated the admin `GET /api/v1/users` route (limit/offset envelope, 400 validation) with RegistryTests coverage (4/4 substantive tasks; build task stopped and re-run).
## Remaining future scope
- **Post-v1 Expansion Roadmap ([21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md) & [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md))**: Track C (macOS/Windows ports + dual-profile cross-compilation) and dedicated external editor plugins remain planned; Track D3 signing (SBOM, Ed25519 primitives, trusted-key enforcement/distribution, binary-variant signing/distribution) and Track E3 daemon capabilities are implemented, and Track E4 now uses `Void::Net` for the registry client/server and remote cache plus `Void::Sqlite` for the StateStore when available.
+1
View File
@@ -87,4 +87,5 @@ Base HEAD: `fe0d1a6`
| Wave 81 (Registry stats + daemon doctor) | admin `GET /api/v1/stats` with ETag; swarm added daemon `doctor` diagnostics | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Registry 9/9, Daemon suite passes, full CTest 8/8) | `registry/service/RegistryService.cpp`, `src/Daemon/Daemon.cpp`, `tests/{RegistryTests,DaemonTests}.cpp`, docs |
| Wave 82 (Tokens list + target_list) | `fetch_tokens`/`vbs tokens list`; swarm added daemon `target_list` | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Registry 9/9, Daemon suite passes, full CTest 8/8) | `include/Void/Build/Package/RegistryClient.hpp`, `src/Package/RegistryClient.cpp`, `src/Daemon/Daemon.cpp`, `src/Main.cpp`, `tests/{RegistryTests,DaemonTests}.cpp`, `tests/CliContracts.cmake`, docs |
| Wave 83 (Tokens revoke + deps update) | `revoke_token`/`vbs tokens revoke`; swarm added daemon `deps` `update` flag | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Registry 9/9, Daemon suite passes, full CTest 8/8) | `include/Void/Build/Package/RegistryClient.hpp`, `src/Package/RegistryClient.cpp`, `src/Daemon/Daemon.cpp`, `src/Main.cpp`, `tests/{RegistryTests,DaemonTests}.cpp`, `tests/CliContracts.cmake`, docs |
| Wave 84 (Install CLI options + users pagination) | `daemon install --component/--no-cmake-export/--no-native-export`; swarm paginated `/api/v1/users` | COMPLETE & VERIFIED (GCC 16.2, pin `0002e74`; Registry 9/9, full CTest 8/8) | `src/Main.cpp`, `registry/service/RegistryService.cpp`, `tests/{RegistryTests,CliContracts}.cmake/cpp`, docs |
| Future (Plan 20 Slice 3 / Tracks C, E3 editor extensions) |"}] Live `conan` CLI verification; macOS/Windows/cross-compile; binary-variant signing and key distribution; daemon-side dependency materialization and editor plugins; `Void::Net`/`Void::Sqlite` alignment | PLANNED (unimplemented) | [21-expansion-roadmap.md](../roadmap/21-expansion-roadmap.md), [20-future-translation-platforms.md](../roadmap/20-future-translation-platforms.md) |
+9
View File
@@ -1252,6 +1252,15 @@ dev cpp-gcc -c build/pinned/bin/vbs_v1_tests --suite Daemon --no-color
`build_materializes_path_dependency` passes (4.68 s).
- Registry suite: **9 / 9 passed** (11.47 s); full CTest: **8 / 8 passed** in 268.05 s.
## Daemon Install CLI Options & Registry Users Pagination (GCC 16.2, pin `0002e74`)
- `vbs daemon install` exposes `--component`, `--no-cmake-export`, `--no-native-export` (help
contract).
- Swarm `swarm_mx8h93tf_nh0y` (one worker) paginated the admin `/api/v1/users` route with a
total envelope and 400 validation, plus tests (4/4 substantive tasks; build task stopped and
re-run by the orchestrator).
- Registry suite: **9 / 9 passed** (11.23 s); full CTest: **8 / 8 passed** in 265.14 s.
## Limits and Unrun Checks
1. **HTTPS git fetch**: the host shell is proxy-restricted, but the Docker container could clone `https://git.faumaray.com/Void/VoidLibrary.git`; the pinned commit `3e254055e081a104f08df68dde39711bc7813518` was fetched directly for the verification above. A separate configure against the local `/home/faumaray/Projects/Library` checkout via `VBS_VOID_SOURCE_DIR` also succeeded (development-only override, checkout unmodified).
+1 -1
View File
@@ -73,7 +73,7 @@ flowchart LR
| --- | --- | --- |
| **E1 — Everyday CLI Ergonomics (Implemented in Wave 8)** | `vbs init` project scaffolding, `vbs clean`, `vbs doctor` environment diagnostics, `vbs graph --format dot|json`, and `vbs build --native-foreign`. | End-to-end CLI & integration tests passing in `vbs_cli_contract` and `vbs_v1_tests`. |
| **E2 — Multi-Package Workspaces (`workspace.cpp`)** *(verified in Docker GCC 16)* | Shared root `vbs.lock` and `build/.vbs` CAS, `workspace_dependency()` cross-member native linking, and affected-member selection (`vbs build/test --member <pkg>` / `--changed-since <ref>`). | 3-package workspace fixture (shared library + app + tests) builds/tests with one root lockfile; member selection and `--changed-since` verified in `FullV1Tests.workspace_members_shared_build_and_member_selection`. |
| **E3 — IDE Config/Query & Background Daemon** | `build.cpp`/`build.profiles.cpp`/`build-support/` SDK entries in `compile_commands.json` + `vbs ide generate` (`.clangd`, `.vscode/`, `.zed/`, `.idea/customTargets.xml`) & `vbs ide query` (**Implemented & Verified in Wave 10**); Unix-socket daemon core holding a warm `StateStore` + project `DirectoryWatcher` with `vbs daemon run\|status\|stop\|gc\|recover\|describe` (**Implemented & Verified in Wave 14; bounded `describe` added in the post-v1 daemon follow-up**). `describe` returns a bounded graph summary (`target_names` ≤ 128 entries × 200 bytes, `profile` ≤ 128 bytes, 10 s evaluation timeout); `vbs daemon build` executes the lowered graph in-process against the warm state store with bounded `profile`/`targets`/`jobs`, including daemon-side dependency resolution/materialization and provider import via `Package::resolve_and_materialize_dependencies`; `vbs daemon ide query` publishes/selects the profile compilation database and serves the IDE workspace/target metadata JSON over the socket, `vbs daemon compdb export` returns the published compilation-database path and entry count, `vbs daemon ide generate` writes the editor presets over the socket, `vbs daemon ide poll` exposes a bounded editor-extension watch protocol (changed paths, sequence, overflow state), `vbs daemon ide wait` adds a bounded long-poll variant, `vbs daemon ide status` reports the active editor selection and compdb state, watch requests can be filtered by path prefix, registry endpoints answer OPTIONS with an Allow header and expose admin stats, the daemon serves structured `doctor` diagnostics, `vbs daemon compdb use` switches the active editor profile under the selection lock, `vbs daemon graph` exports the target dependency graph (DOT/JSON), `vbs daemon test` builds and runs declared test targets, `vbs tokens list|revoke` manages registry token metadata, `vbs daemon clean` removes generated outputs while preserving the shared cache, `vbs daemon target info` reports per-target sources/outputs, `vbs daemon actions` lists bounded lowered actions, `vbs daemon pack` creates a confined deterministic source archive, `vbs daemon install` stages an install prefix (and `uninstall` removes only manifest-owned files), `vbs daemon gen-tests` generates the native test registration unit, `vbs daemon init` scaffolds confined projects, `vbs daemon compdb entries` serves bounded per-file compile arguments to editor extensions, `vbs daemon workspace members` lists workspace members cheaply, `vbs daemon ide configs` reports which editor configuration files exist, `vbs daemon compdb generations` lists editor generation history with the active selection, `vbs daemon info` exposes the daemon environment, `vbs daemon deps` resolves/materializes dependencies over the socket, registry package search and audit queries support bounded pagination/filters, releases expose a version-specific detail endpoint, package ownership and mutable metadata are managed through audited APIs, and `RegistryClient::fetch_package_owners` reads owners. Daemon workspace support describes members, builds all members in order (or a selected member) with the shared root lock, and serves member-scoped IDE query/generate/compdb requests via `--member`. Dedicated editor extensions remain planned. | `vbs ide` & `build.cpp` syntax-check verified in `FullV1Tests.cpp`; daemon lifecycle/status/gc/shutdown/describe verified in `DaemonTests.cpp` (6/6 under `dev cpp-gcc`); the live `vbs daemon describe` CLI round-trip is verified in `vbs_cli_contract`. |
| **E3 — IDE Config/Query & Background Daemon** | `build.cpp`/`build.profiles.cpp`/`build-support/` SDK entries in `compile_commands.json` + `vbs ide generate` (`.clangd`, `.vscode/`, `.zed/`, `.idea/customTargets.xml`) & `vbs ide query` (**Implemented & Verified in Wave 10**); Unix-socket daemon core holding a warm `StateStore` + project `DirectoryWatcher` with `vbs daemon run\|status\|stop\|gc\|recover\|describe` (**Implemented & Verified in Wave 14; bounded `describe` added in the post-v1 daemon follow-up**). `describe` returns a bounded graph summary (`target_names` ≤ 128 entries × 200 bytes, `profile` ≤ 128 bytes, 10 s evaluation timeout); `vbs daemon build` executes the lowered graph in-process against the warm state store with bounded `profile`/`targets`/`jobs`, including daemon-side dependency resolution/materialization and provider import via `Package::resolve_and_materialize_dependencies`; `vbs daemon ide query` publishes/selects the profile compilation database and serves the IDE workspace/target metadata JSON over the socket, `vbs daemon compdb export` returns the published compilation-database path and entry count, `vbs daemon ide generate` writes the editor presets over the socket, `vbs daemon ide poll` exposes a bounded editor-extension watch protocol (changed paths, sequence, overflow state), `vbs daemon ide wait` adds a bounded long-poll variant, `vbs daemon ide status` reports the active editor selection and compdb state, watch requests can be filtered by path prefix, registry endpoints answer OPTIONS with an Allow header and expose admin stats, the daemon serves structured `doctor` diagnostics, `vbs daemon compdb use` switches the active editor profile under the selection lock, `vbs daemon graph` exports the target dependency graph (DOT/JSON), `vbs daemon test` builds and runs declared test targets, `vbs tokens list|revoke` manages registry token metadata, `vbs daemon clean` removes generated outputs while preserving the shared cache, `vbs daemon target info` reports per-target sources/outputs, `vbs daemon actions` lists bounded lowered actions, `vbs daemon pack` creates a confined deterministic source archive, `vbs daemon install` stages an install prefix (and `uninstall` removes only manifest-owned files), `vbs daemon gen-tests` generates the native test registration unit, `vbs daemon init` scaffolds confined projects, `vbs daemon compdb entries` serves bounded per-file compile arguments to editor extensions, `vbs daemon workspace members` lists workspace members cheaply, `vbs daemon ide configs` reports which editor configuration files exist, `vbs daemon compdb generations` lists editor generation history with the active selection, `vbs daemon info` exposes the daemon environment, `vbs daemon deps` resolves/materializes dependencies over the socket, registry package search, user listings, and audit queries support bounded pagination/filters, releases expose a version-specific detail endpoint, package ownership and mutable metadata are managed through audited APIs, and `RegistryClient::fetch_package_owners` reads owners. Daemon workspace support describes members, builds all members in order (or a selected member) with the shared root lock, and serves member-scoped IDE query/generate/compdb requests via `--member`. Dedicated editor extensions remain planned. | `vbs ide` & `build.cpp` syntax-check verified in `FullV1Tests.cpp`; daemon lifecycle/status/gc/shutdown/describe verified in `DaemonTests.cpp` (6/6 under `dev cpp-gcc`); the live `vbs daemon describe` CLI round-trip is verified in `vbs_cli_contract`. |
| **E4 — Transport & Storage Upstream Alignment** *(Sqlite and Net client adopted)* | Adopt `Void::Net` (`VL-004`/`VL-005`) and `Void::Sqlite` (`VL-011b`) when lightweight/bundled builds become available in minimal Nix toolchains, reducing VBS transport code further. `Void::Sqlite` backs the `StateStore` when SQLite3 is present, `Void::Net` backs the `RegistryClient`, remote-cache, and registry-server HTTP transports (TLS-verifying `HttpClient`/`HttpServer`) when `Net` is enabled (`-p openssl -p boost`), keeping the pure-POSIX fallbacks. | All `vbs_registry_tests` and `vbs_core_tests` pass on both minimal and full toolchains (verified: registry 7/7 on the Net transport; default and SQLite builds 8/8). |
---
+40 -7
View File
@@ -1774,8 +1774,8 @@ HttpResponse RegistryService::handle_request(const HttpRequest &req) {
}
// Admin endpoints: users, audit, storage.
if (req.path == "/api/v1/users" || req.path == "/api/v1/audit" ||
req.path == "/api/v1/stats" || req.path == "/api/v1/admin/storage") {
if (req.path == "/api/v1/users" || req.path == "/api/v1/audit" || req.path == "/api/v1/stats" ||
req.path == "/api/v1/admin/storage") {
if (!principal) {
return HttpResponse::error_json(401, "unauthorized", "authentication required");
}
@@ -1783,15 +1783,48 @@ HttpResponse RegistryService::handle_request(const HttpRequest &req) {
return HttpResponse::error_json(403, "forbidden", "admin role required");
}
if (req.path == "/api/v1/users" && req.method == "GET") {
std::size_t limit = 100;
std::size_t offset = 0;
const auto parse_size = [](const std::string &text, std::size_t max, std::size_t &out) {
std::size_t value = 0;
const auto [ptr, ec] =
std::from_chars(text.data(), text.data() + text.size(), value);
if (ec != std::errc{} || ptr != text.data() + text.size() || value > max) {
return false;
}
out = value;
return true;
};
if (const auto it = req.query.find("limit");
it != req.query.end() && !parse_size(it->second, 500, limit)) {
return HttpResponse::error_json(400, "invalid_limit",
"limit must be an integer in [0, 500]");
}
if (const auto it = req.query.find("offset");
it != req.query.end() && !parse_size(it->second, 1000000, offset)) {
return HttpResponse::error_json(400, "invalid_offset",
"offset must be a non-negative integer");
}
std::vector<const UserRecord *> ulist;
for (const auto &[k, v] : users_)
ulist.push_back(&v);
const std::size_t total = ulist.size();
std::vector<const UserRecord *> page;
for (std::size_t i = offset; i < total && page.size() < limit; ++i) {
page.push_back(ulist[i]);
}
return HttpResponse::json(
200, "{\"users\":" + json_array(ulist, [](const UserRecord *u) {
return "{\"username\":" + json_quote(u->username) +
",\"role\":" + json_quote(role_name(u->role)) +
",\"active\":" + std::string{u->active ? "true" : "false"} + '}';
}) + "}\n");
200, "{\"users\":" +
json_array(page,
[](const UserRecord *u) {
return "{\"username\":" + json_quote(u->username) +
",\"role\":" + json_quote(role_name(u->role)) +
",\"active\":" +
std::string{u->active ? "true" : "false"} + '}';
}) +
",\"total\":" + std::to_string(total) + ",\"limit\":" +
std::to_string(limit) + ",\"offset\":" + std::to_string(offset) + "}\n");
}
if (req.path == "/api/v1/users" && req.method == "POST") {
if (!check_csrf_locked(req, *principal)) {
+16 -4
View File
@@ -1607,6 +1607,9 @@ struct DaemonCmdOptions {
std::optional<std::string> action_kind_arg;
std::optional<std::string> pack_output_arg;
std::optional<std::string> prefix_arg;
std::optional<std::string> component_arg;
bool no_cmake_export{false};
bool no_native_export{false};
std::optional<std::string> input_arg;
std::optional<std::string> output_dir_arg;
std::string init_dir_arg{"."};
@@ -1765,9 +1768,13 @@ int execute_daemon_command(std::string_view sub, const DaemonCmdOptions &opts) {
std::cerr << "vbs daemon install: --prefix is required\n";
return 2;
}
request_json = std::format(R"({{"op":"install","prefix":{},"package_version":{}}})",
Util::json_quote(*opts.prefix_arg),
Util::json_quote(opts.package_version_arg));
request_json = std::format(
R"({{"op":"install","prefix":{},"package_version":{}{},"export_cmake":{},"export_native":{}}})",
Util::json_quote(*opts.prefix_arg), Util::json_quote(opts.package_version_arg),
opts.component_arg
? std::format(",\"component\":{}", Util::json_quote(*opts.component_arg))
: std::string{},
opts.no_cmake_export ? "false" : "true", opts.no_native_export ? "false" : "true");
} else if (sub == "editor_status") {
request_json = R"({"op":"editor_status"})";
} else if (sub == "workspace_members") {
@@ -2848,7 +2855,12 @@ int main(int argc, char **argv) {
configure_daemon_common(daemon_install_cmd);
daemon_install_cmd.option("--prefix", "", "Install prefix (required)", daemon_opts.prefix_arg)
.option_default("--package-version", "", "Exported package version",
daemon_opts.package_version_arg, "0.1.0");
daemon_opts.package_version_arg, "0.1.0")
.option("--component", "", "Install only a specific component", daemon_opts.component_arg)
.flag("--no-cmake-export", "", "Disable CMake Config.cmake export",
daemon_opts.no_cmake_export)
.flag("--no-native-export", "", "Disable native VBS package metadata export",
daemon_opts.no_native_export);
auto &daemon_init_cmd =
daemon_cmd.subcommand("init", "Scaffold a new VBS project inside the project root");
configure_daemon_common(daemon_init_cmd);
+1 -1
View File
@@ -84,7 +84,7 @@ check_process(0 "Usage: vbs daemon target info .*--name" "" daemon target info -
check_process(0 "Usage: vbs daemon target flags .*--name.*--file" "" daemon target flags --help)
check_process(0 "Usage: vbs daemon pack .*--output" "" daemon pack --help)
check_process(0 "Usage: vbs daemon actions .*--limit" "" daemon actions --help)
check_process(0 "Usage: vbs daemon install .*--prefix" "" daemon install --help)
check_process(0 "Usage: vbs daemon install .*--prefix.*--component.*--no-cmake-export.*--no-native-export" "" daemon install --help)
check_process(0 "Usage: vbs daemon uninstall .*--prefix" "" daemon uninstall --help)
check_process(0 "Usage: vbs daemon gen-tests .*--input.*--output-dir" "" daemon gen-tests --help)
check_process(0 "Usage: vbs daemon init .*--dir" "" daemon init --help)
+84 -2
View File
@@ -533,6 +533,86 @@ VOID_TEST(RegistryTests, registry_rbac_immutability_csrf_xss_web_and_backup_rest
auto bad_limit = send_loopback_http(port, "GET", "/api/v1/packages?limit=501");
Void::Testing::expect(bad_limit.has_value() && bad_limit->status == 400);
// Admin user listing: bounded page plus total/limit/offset envelope.
auto users_default = send_loopback_http(port, "GET", "/api/v1/users", {{"Cookie", cookie}});
Void::Testing::expect(users_default.has_value() && users_default->status == 200);
if (users_default) {
Void::Testing::expect_eq(envelope_value(users_default->body, "total"), std::string{"3"});
Void::Testing::expect_eq(envelope_value(users_default->body, "limit"), std::string{"100"});
Void::Testing::expect_eq(envelope_value(users_default->body, "offset"), std::string{"0"});
Void::Testing::expect(count_occurrences(users_default->body, "\"username\":") == 3);
}
const auto first_username = [](const std::string &body) {
const std::string key = "\"username\":\"";
const auto start = body.find(key);
if (start == std::string::npos) {
return std::string{};
}
const auto value_start = start + key.size();
const auto end = body.find('"', value_start);
return end == std::string::npos ? std::string{}
: body.substr(value_start, end - value_start);
};
auto users_first =
send_loopback_http(port, "GET", "/api/v1/users?limit=2", {{"Cookie", cookie}});
auto users_second =
send_loopback_http(port, "GET", "/api/v1/users?limit=2&offset=2", {{"Cookie", cookie}});
Void::Testing::expect(users_first.has_value() && users_first->status == 200);
Void::Testing::expect(users_second.has_value() && users_second->status == 200);
if (users_first && users_second) {
Void::Testing::expect(count_occurrences(users_first->body, "\"username\":") == 2);
Void::Testing::expect_eq(envelope_value(users_first->body, "total"), std::string{"3"});
Void::Testing::expect_eq(envelope_value(users_first->body, "limit"), std::string{"2"});
Void::Testing::expect_eq(envelope_value(users_first->body, "offset"), std::string{"0"});
Void::Testing::expect(count_occurrences(users_second->body, "\"username\":") == 1);
Void::Testing::expect_eq(envelope_value(users_second->body, "total"), std::string{"3"});
Void::Testing::expect_eq(envelope_value(users_second->body, "offset"), std::string{"2"});
Void::Testing::expect(!first_username(users_first->body).empty());
Void::Testing::expect(first_username(users_first->body) !=
first_username(users_second->body));
}
auto users_empty_limit =
send_loopback_http(port, "GET", "/api/v1/users?limit=0", {{"Cookie", cookie}});
Void::Testing::expect(users_empty_limit.has_value() && users_empty_limit->status == 200);
if (users_empty_limit) {
Void::Testing::expect(users_empty_limit->body.find("\"users\":[]") != std::string::npos);
Void::Testing::expect_eq(envelope_value(users_empty_limit->body, "total"),
std::string{"3"});
}
auto users_far_page =
send_loopback_http(port, "GET", "/api/v1/users?offset=99", {{"Cookie", cookie}});
Void::Testing::expect(users_far_page.has_value() && users_far_page->status == 200);
if (users_far_page) {
Void::Testing::expect(users_far_page->body.find("\"users\":[]") != std::string::npos);
Void::Testing::expect_eq(envelope_value(users_far_page->body, "total"), std::string{"3"});
Void::Testing::expect_eq(envelope_value(users_far_page->body, "offset"), std::string{"99"});
}
for (const std::string bad_users_limit_url :
{"/api/v1/users?limit=abc", "/api/v1/users?limit=501"}) {
auto bad_users_limit =
send_loopback_http(port, "GET", bad_users_limit_url, {{"Cookie", cookie}});
Void::Testing::expect(bad_users_limit.has_value() && bad_users_limit->status == 400);
if (bad_users_limit) {
Void::Testing::expect(bad_users_limit->body.find("invalid_limit") != std::string::npos);
}
}
for (const std::string bad_users_offset_url :
{"/api/v1/users?offset=abc", "/api/v1/users?offset=-1"}) {
auto bad_users_offset =
send_loopback_http(port, "GET", bad_users_offset_url, {{"Cookie", cookie}});
Void::Testing::expect(bad_users_offset.has_value() && bad_users_offset->status == 400);
if (bad_users_offset) {
Void::Testing::expect(bad_users_offset->body.find("invalid_offset") !=
std::string::npos);
}
}
auto users_unauthenticated = send_loopback_http(port, "GET", "/api/v1/users");
Void::Testing::expect(users_unauthenticated.has_value() &&
users_unauthenticated->status == 401);
auto users_non_admin = send_loopback_http(port, "GET", "/api/v1/users",
{{"Authorization", "Bearer " + *alice_tok}});
Void::Testing::expect(users_non_admin.has_value() && users_non_admin->status == 403);
// 4. Consistent backup & restore into a brand-new registry instance preserves releases &
// download!
const auto backup_dir = tmp / "backup";
@@ -1343,7 +1423,8 @@ target_include_directories(hello_pkg PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include
const std::string &out = second_list->stdout_data;
while (pos < out.size()) {
const auto nl = out.find('\n', pos);
const std::string line = out.substr(pos, nl == std::string::npos ? std::string::npos : nl - pos);
const std::string line =
out.substr(pos, nl == std::string::npos ? std::string::npos : nl - pos);
if (line.find(" extra ") != std::string::npos) {
extra_id = line.substr(0, line.find(' '));
}
@@ -1366,7 +1447,8 @@ target_include_directories(hello_pkg PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include
const std::string &out = final_list->stdout_data;
while (pos < out.size()) {
const auto nl = out.find('\n', pos);
const std::string line = out.substr(pos, nl == std::string::npos ? std::string::npos : nl - pos);
const std::string line =
out.substr(pos, nl == std::string::npos ? std::string::npos : nl - pos);
if (line.starts_with(extra_id) && line.find("revoked") != std::string::npos) {
saw_revoked = true;
}