uikit/scripts/mark-provider-client.mjs
Mohamadzadeh f11313909d
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
add new BiProvider and v1.1.0
2026-10-25 16:15:10 +03:30

13 lines
603 B
JavaScript

import { readFile, writeFile } from "node:fs/promises";
// Vite/Rollup can drop source-level module directives. Keep Next.js App Router
// boundaries on all new entries, without touching any legacy dist files.
const names = ["", "keycloak", "permission", "api", "query", "chakra", "next-pages-router", "next-app-router", "vite", "legacy", "update-checker"];
for (const name of names) {
const file = `dist/provider${name ? `-${name}` : ""}.js`;
const content = await readFile(file, "utf8");
if (!content.startsWith('"use client";')) {
await writeFile(file, `"use client";\n${content}`);
}
}