fix(api): импорты settings-repo и repos через @cfdm/db
Build, Test, and Push CFDM Docker Image / test (push) Successful in 3m14s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 1m50s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 7s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
Build, Test, and Push CFDM Docker Image / test (push) Successful in 3m14s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 1m50s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 7s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped
Subpath @cfdm/db/settings-repo и @cfdm/db/repos не объявлены в package exports — в Docker/vitest падали 5 test suites. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Vendored
+5
-9
@@ -302,7 +302,7 @@ var error_handler_default = fp5(errorHandlerPlugin, { name: "error-handler" });
|
||||
|
||||
// src/routes/health.ts
|
||||
import { z } from "zod";
|
||||
import { getAppSwitcher } from "@cfdm/db/settings-repo";
|
||||
import { getAppSwitcher } from "@cfdm/db";
|
||||
|
||||
// src/services/auth.ts
|
||||
import { verify } from "@node-rs/argon2";
|
||||
@@ -974,11 +974,7 @@ async function importZoneRecords(db, cf, domainId) {
|
||||
}
|
||||
|
||||
// src/services/vps-tracker-sync.ts
|
||||
import * as repos6 from "@cfdm/db/repos";
|
||||
import {
|
||||
getAppSettingsSecrets,
|
||||
touchVpsTrackerSync
|
||||
} from "@cfdm/db/settings-repo";
|
||||
import { repos as repos6, getAppSettingsSecrets, touchVpsTrackerSync } from "@cfdm/db";
|
||||
function fqdnToDisplay(hostname, zoneName) {
|
||||
if (hostname === "@" || !hostname.trim()) return zoneName;
|
||||
return `${hostname}.${zoneName}`;
|
||||
@@ -2861,7 +2857,7 @@ import { appSettingsPatchSchema } from "@cfdm/shared";
|
||||
import {
|
||||
getAppSettings,
|
||||
updateAppSettings
|
||||
} from "@cfdm/db/settings-repo";
|
||||
} from "@cfdm/db";
|
||||
async function settingsRoutes(app2) {
|
||||
app2.get("/settings", async (request) => {
|
||||
return getAppSettings(request.server.db);
|
||||
@@ -2878,10 +2874,10 @@ async function settingsRoutes(app2) {
|
||||
// src/routes/integrations-vps-tracker.ts
|
||||
import { timingSafeEqual } from "crypto";
|
||||
import { vpsTrackerEventSchema } from "@cfdm/shared";
|
||||
import { getAppSettingsSecrets as getAppSettingsSecrets2 } from "@cfdm/db/settings-repo";
|
||||
import { getAppSettingsSecrets as getAppSettingsSecrets2 } from "@cfdm/db";
|
||||
|
||||
// src/services/vps-tracker-events.ts
|
||||
import * as repos12 from "@cfdm/db/repos";
|
||||
import { repos as repos12 } from "@cfdm/db";
|
||||
function collectIps(event) {
|
||||
const ips = /* @__PURE__ */ new Set();
|
||||
for (const v of event.vps) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import { z } from "zod";
|
||||
import { healthCheck } from "../plugins/db.js";
|
||||
import { getAppSwitcher } from "@cfdm/db/settings-repo";
|
||||
import { getAppSwitcher } from "@cfdm/db";
|
||||
import * as authService from "../services/auth.js";
|
||||
|
||||
export async function healthRoutes(app: FastifyInstance) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { timingSafeEqual } from "node:crypto";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import { vpsTrackerEventSchema } from "@cfdm/shared";
|
||||
import { getAppSettingsSecrets } from "@cfdm/db/settings-repo";
|
||||
import { getAppSettingsSecrets } from "@cfdm/db";
|
||||
import * as vpsTrackerEvents from "../services/vps-tracker-events.js";
|
||||
|
||||
function verifyBearer(authHeader: string | undefined, expected: string): boolean {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { appSettingsPatchSchema } from "@cfdm/shared";
|
||||
import {
|
||||
getAppSettings,
|
||||
updateAppSettings,
|
||||
} from "@cfdm/db/settings-repo";
|
||||
} from "@cfdm/db";
|
||||
import { pingVpsTracker } from "../services/vps-tracker-sync.js";
|
||||
|
||||
export async function settingsRoutes(app: FastifyInstance) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Db } from "@cfdm/db";
|
||||
import { repos } from "@cfdm/db";
|
||||
import type { CloudflareClient } from "../lib/cf-client.js";
|
||||
import type { VpsTrackerEvent } from "@cfdm/shared";
|
||||
import * as repos from "@cfdm/db/repos";
|
||||
import { reconcileDnsForTarget } from "./service-config-service.js";
|
||||
|
||||
function collectIps(event: VpsTrackerEvent): Set<string> {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import type { CfdmBindingSyncItem } from "@cfdm/shared";
|
||||
import type { Db } from "@cfdm/db";
|
||||
import * as repos from "@cfdm/db/repos";
|
||||
import {
|
||||
getAppSettingsSecrets,
|
||||
touchVpsTrackerSync,
|
||||
} from "@cfdm/db/settings-repo";
|
||||
import { repos, getAppSettingsSecrets, touchVpsTrackerSync } from "@cfdm/db";
|
||||
|
||||
function fqdnToDisplay(hostname: string, zoneName: string): string {
|
||||
if (hostname === "@" || !hostname.trim()) return zoneName;
|
||||
|
||||
Reference in New Issue
Block a user