uikit/scripts/copy-provider-types.mjs
Mohamadzadeh 43b4a2a42b
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Has been skipped
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Has been skipped
refactor new BiProvider | v1.2.1
2026-10-26 13:58:14 +03:30

11 lines
612 B
JavaScript

import { mkdir, copyFile, writeFile } from "node:fs/promises";
const names = ["api", "keycloak", "permission", "query", "chakra", "next-pages-router", "next-app-router", "vite", "update-checker"];
await mkdir("dist", { recursive: true });
await copyFile("src/provider/index.d.ts", "dist/provider.d.ts");
for (const name of names) {
await copyFile(`src/${name}/index.d.ts`, `dist/${name}.d.ts`);
}
// Legacy path is an unchanged alias to the existing core BiProvider types.
await writeFile("dist/provider-legacy.d.ts", 'export { BiProvider } from "./core";\nexport type { BiProviderProps } from "./core";\n');