wip update monaco

This commit is contained in:
Rizky 2024-03-24 09:56:54 +07:00
parent 5fc77771ff
commit f8840f0da1
233 changed files with 918 additions and 867 deletions

23
app/srv/api/code_build.ts Normal file
View File

@ -0,0 +1,23 @@
import { transform } from "esbuild";
import { apiContext } from "service-srv";
export const _ = {
url: "/code_build",
async api(arg: Record<string, string>) {
// const { req, res } = apiContext(this);
const result = {} as Record<string, string>;
await Promise.all(
Object.entries(arg).map(async ([key, src]) => {
const res = await transform(`return ${src}`, {
jsx: "transform",
format: "cjs",
loader: "tsx",
});
result[key] = res.code.substring(6);
})
);
return result;
},
};

Some files were not shown because too many files have changed in this diff Show More