mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Generate esbuild metadata file
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -11,3 +11,5 @@ build/
|
|||||||
eslint.sarif
|
eslint.sarif
|
||||||
# for local incremental compilation
|
# for local incremental compilation
|
||||||
tsconfig.tsbuildinfo
|
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 { dirname, join } from "node:path";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
|
||||||
@@ -74,7 +74,10 @@ const context = await esbuild.context({
|
|||||||
define: {
|
define: {
|
||||||
__CODEQL_ACTION_VERSION__: JSON.stringify(pkg.version),
|
__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();
|
await context.dispose();
|
||||||
|
|||||||
Reference in New Issue
Block a user