uikit/scripts/copy-provider-types.mjs
Mohamadzadeh 1099691b9a
All checks were successful
Build and Deploy Next.js + Nginx Docker Image / build-and-deploy (push) Successful in 50s
Build and Deploy Next.js + Nginx Docker Image / deploy (push) Successful in 7s
uikit-v1.4.0-watermark-complete
2026-11-01 12:52:28 +03:30

11 lines
632 B
JavaScript

import { mkdir, copyFile, writeFile } from "node:fs/promises";
const names = ["api", "keycloak", "permission", "query", "chakra", "next-pages-router", "next-app-router", "vite", "swr", "watermark", "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');