refactor: remove schemas.ts re-export, use explicit imports in tests

- Remove src/schemas.ts file
- Update tests to import directly from src/schemas/index.js
This commit is contained in:
Joan Xie 2025-09-24 14:28:06 -07:00
commit 6c05338904
No known key found for this signature in database
4 changed files with 3 additions and 9 deletions

View file

@ -1,6 +0,0 @@
export {
LATEST_MANIFEST_VERSION,
McpbManifestSchema,
v0_1,
v0_2,
} from "./schemas/index.js";

View file

@ -2,7 +2,7 @@ import { execSync } from "node:child_process";
import fs from "node:fs"; import fs from "node:fs";
import { join } from "node:path"; import { join } from "node:path";
import { LATEST_MANIFEST_VERSION } from "../src/schemas.js"; import { LATEST_MANIFEST_VERSION } from "../src/schemas/index.js";
interface ExecSyncError extends Error { interface ExecSyncError extends Error {
stdout: Buffer; stdout: Buffer;

View file

@ -10,7 +10,7 @@ import {
getDefaultRepositoryUrl, getDefaultRepositoryUrl,
readPackageJson, readPackageJson,
} from "../src/cli/init.js"; } from "../src/cli/init.js";
import { LATEST_MANIFEST_VERSION } from "../src/schemas.js"; import { LATEST_MANIFEST_VERSION } from "../src/schemas/index.js";
// Mock the fs module // Mock the fs module
jest.mock("fs", () => ({ jest.mock("fs", () => ({

View file

@ -1,7 +1,7 @@
import { readFileSync } from "fs"; import { readFileSync } from "fs";
import { join } from "path"; import { join } from "path";
import { McpbManifestSchema } from "../src/schemas.js"; import { McpbManifestSchema } from "../src/schemas/index.js";
describe("McpbManifestSchema", () => { describe("McpbManifestSchema", () => {
it("should validate a valid manifest", () => { it("should validate a valid manifest", () => {