Files
copilotkit__copilotkit/packages/cli/validate-package.js
Tyler Slaton 96885b5959 refactor: consolidate V1/V2 packages into flat @copilotkit/* structure
Flatten all packages from packages/v1/* and packages/v2/* into packages/* —
every package now lives directly under the @copilotkit/ scope with no v1/v2
subdirectories.

- Move all v1 packages (react-core, react-ui, runtime, shared, etc.) from
  packages/v1/* to packages/*
- Absorb v2 react code into packages/react-core/src/v2/ (exported via /v2 subpath)
- Absorb v2 agent code into packages/runtime/src/agent/ (exported via /v2 subpath)
- Move v2 packages (core, angular, demo-agents, etc.) to packages/*
- Replace all @copilotkitnext/* imports with @copilotkit/* equivalents
- Keep @copilotkitnext/angular as the sole exception (angular remains on next)
- Update CI workflows, renovate config, release scripts for flat structure
- No public API surface changes — all exports fields are preserved

Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com>
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-28 16:45:10 -07:00

34 lines
1021 B
JavaScript

// validate-package.js
import { execSync } from "child_process";
import fs from "fs";
import path from "path";
console.log("1. Cleaning...");
execSync("pnpm run clean", { stdio: "inherit" });
console.log("\n2. Building...");
execSync("pnpm run build", { stdio: "inherit" });
console.log("\n3. Checking dist directory...");
const distPath = path.join(process.cwd(), "dist");
if (!fs.existsSync(distPath)) {
console.error("❌ dist directory does not exist!");
process.exit(1);
}
const distFiles = fs.readdirSync(distPath, { recursive: true });
console.log("dist directory contents:", distFiles);
console.log("\n4. Generating manifest...");
execSync("oclif manifest", { stdio: "inherit" });
console.log("\n5. Checking manifest...");
const manifestPath = path.join(process.cwd(), "oclif.manifest.json");
if (!fs.existsSync(manifestPath)) {
console.error("❌ oclif.manifest.json does not exist!");
process.exit(1);
}
console.log("\n6. Creating pack...");
execSync("npm pack --dry-run", { stdio: "inherit" });