feat: 自动更新
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
|
||||
|
||||
import { configDiffViewFromPreview } from "./ServerDetailPage";
|
||||
import serverDetailPageSource from "./ServerDetailPage.tsx?raw";
|
||||
import artifactTransferSource from "../utils/artifactTransfer.ts?raw";
|
||||
import type { ServerConfigDiffPreviewResponse } from "../api/types";
|
||||
|
||||
const preview: ServerConfigDiffPreviewResponse = {
|
||||
@@ -104,9 +105,10 @@ describe("ServerDetailPage config write approval", () => {
|
||||
it("keeps plugin lifecycle and bridge-visible output on platform-owned logical references", () => {
|
||||
expect(serverDetailPageSource).toContain("parsePluginArtifactReference(result)");
|
||||
expect(serverDetailPageSource).toContain("platformApiClient.openArtifactDownload(artifact.id)");
|
||||
expect(serverDetailPageSource).toContain("platformApiClient.readArtifactContent(reference.artifactId");
|
||||
expect(serverDetailPageSource).toContain("replace(/Bearer\\s+[^\\s]+/gi, \"[token]\")");
|
||||
expect(serverDetailPageSource).toContain("replace(/sk-[A-Za-z0-9_-]+/g, \"[secret]\")");
|
||||
expect(serverDetailPageSource).toContain("downloadArtifactReference(reference");
|
||||
expect(artifactTransferSource).toContain("readContent(reference.artifactId");
|
||||
expect(artifactTransferSource).toContain("replace(/Bearer\\s+[^\\s]+/gi, \"[token]\")");
|
||||
expect(artifactTransferSource).toContain("replace(/sk-[A-Za-z0-9_-]+/g, \"[secret]\")");
|
||||
expect(serverDetailPageSource).not.toContain("storage://bucket");
|
||||
expect(serverDetailPageSource).not.toContain("runSocket");
|
||||
expect(serverDetailPageSource).not.toContain("rawApiKey");
|
||||
|
||||
Reference in New Issue
Block a user