mirror of
https://github.com/github/codeql-action.git
synced 2026-04-02 09:42:16 +00:00
Generate esbuild metadata file
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,3 +11,5 @@ build/
|
||||
eslint.sarif
|
||||
# for local incremental compilation
|
||||
tsconfig.tsbuildinfo
|
||||
# esbuild metadata file
|
||||
meta.json
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { copyFile, rm } from "node:fs/promises";
|
||||
import { copyFile, rm, writeFile } from "node:fs/promises";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
@@ -74,7 +74,10 @@ const context = await esbuild.context({
|
||||
define: {
|
||||
__CODEQL_ACTION_VERSION__: JSON.stringify(pkg.version),
|
||||
},
|
||||
metafile: true,
|
||||
});
|
||||
|
||||
await context.rebuild();
|
||||
const result = await context.rebuild();
|
||||
await writeFile("meta.json", JSON.stringify(result.metafile));
|
||||
|
||||
await context.dispose();
|
||||
|
||||
Reference in New Issue
Block a user