MCPcopy Index your code
hub / github.com/coder/coder / getStaticBuildInfo

Function getStaticBuildInfo

site/src/utils/buildInfo.ts:6–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5// During the build process, we inject the build info into the HTML
6export const getStaticBuildInfo = () => {
7 if (CACHED_BUILD_INFO) {
8 return CACHED_BUILD_INFO;
9 }
10
11 const buildInfoJson = document
12 .querySelector("meta[property=build-info]")
13 ?.getAttribute("content");
14
15 if (buildInfoJson) {
16 try {
17 CACHED_BUILD_INFO = JSON.parse(buildInfoJson) as BuildInfoResponse;
18 } catch {
19 return undefined;
20 }
21 }
22
23 return CACHED_BUILD_INFO;
24};
25
26type PrereleaseFlag = "devel" | "rc" | undefined;
27

Callers 1

defaultDocsUrlFunction · 0.90

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected