Skip to content

Commit 6e36915

Browse files
committed
lint
1 parent 7ef4922 commit 6e36915

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

src/apphosting/localbuilds.ts

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
11
import { localBuild as localApphostingBuild } from "@apphosting/build";
22
import { OutputBundleConfig } from "@apphosting/common";
3-
import { BuildConfig, Env, Availability } from "../gcp/apphosting";
4-
import { readFileSync } from "fs";
5-
import { join } from "path";
6-
import { fileExistsSync } from "../fsutils";
7-
import { load } from "js-yaml";
8-
import { FirebaseError } from "../error";
9-
3+
import { BuildConfig, Env } from "../gcp/apphosting";
104

115
export async function localBuild(
12-
projectRoot: string, framework: string): Promise<{annotations: Record<string, string>, buildConfig: BuildConfig}> {
13-
14-
const apphostingBuildOutput: OutputBundleConfig = await localApphostingBuild(projectRoot, framework);
15-
16-
const annotations: Record<string, string> = {};
17-
Object.entries(apphostingBuildOutput.metadata).forEach(([key, value]) => {
18-
annotations[key] = String(value);
19-
});
6+
projectRoot: string,
7+
framework: string,
8+
): Promise<{ annotations: Record<string, string>; buildConfig: BuildConfig }> {
9+
const apphostingBuildOutput: OutputBundleConfig = await localApphostingBuild(
10+
projectRoot,
11+
framework,
12+
);
2013

21-
const env: Env[] | undefined = apphostingBuildOutput.runConfig.environmentVariables?.map(
22-
( {variable, value, availability} : Env) => {
23-
return {
24-
variable,
25-
value,
26-
availability,
27-
};
28-
});
14+
const annotations: Record<string, string> = {};
15+
Object.entries(apphostingBuildOutput.metadata).forEach(([key, value]) => {
16+
annotations[key] = String(value);
17+
});
2918

30-
return {
31-
annotations,
32-
buildConfig: {
33-
runCommand: apphostingBuildOutput.runConfig.runCommand,
34-
env,
35-
},
36-
}
19+
const env: Env[] | undefined = apphostingBuildOutput.runConfig.environmentVariables?.map(
20+
({ variable, value, availability }: Env) => {
21+
return {
22+
variable,
23+
value,
24+
availability,
25+
};
26+
},
27+
);
3728

29+
return {
30+
annotations,
31+
buildConfig: {
32+
runCommand: apphostingBuildOutput.runConfig.runCommand,
33+
env,
34+
},
35+
};
3836
}

0 commit comments

Comments
 (0)