diff --git a/package-lock.json b/package-lock.json index e0d93a6a..c8962251 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25604,7 +25604,7 @@ } }, "packages/@apphosting/adapter-angular": { - "version": "17.2.9", + "version": "17.2.10", "license": "Apache-2.0", "dependencies": { "@apphosting/common": "*", @@ -25702,7 +25702,7 @@ } }, "packages/@apphosting/adapter-nextjs": { - "version": "14.0.8", + "version": "14.0.9", "license": "Apache-2.0", "dependencies": { "@apphosting/common": "*", @@ -25808,7 +25808,7 @@ } }, "packages/@apphosting/common": { - "version": "0.0.4", + "version": "0.0.5", "license": "Apache-2.0" }, "packages/@apphosting/create": { diff --git a/packages/@apphosting/adapter-angular/e2e/run-local.ts b/packages/@apphosting/adapter-angular/e2e/run-local.ts index 6bd3c964..c63d1e68 100644 --- a/packages/@apphosting/adapter-angular/e2e/run-local.ts +++ b/packages/@apphosting/adapter-angular/e2e/run-local.ts @@ -73,7 +73,7 @@ const tests = await Promise.all( const bundleYaml = parseYaml(readFileSync(join(cwd, ".apphosting/bundle.yaml")).toString()); - const runCommand = bundleYaml.serverConfig.runCommand; + const runCommand = bundleYaml.runConfig.runCommand; if (typeof runCommand !== "string") { throw new Error("runCommand must be a string"); diff --git a/packages/@apphosting/adapter-angular/package.json b/packages/@apphosting/adapter-angular/package.json index 9febda09..fe7905cc 100644 --- a/packages/@apphosting/adapter-angular/package.json +++ b/packages/@apphosting/adapter-angular/package.json @@ -1,6 +1,6 @@ { "name": "@apphosting/adapter-angular", - "version": "17.2.9", + "version": "17.2.10", "main": "dist/index.js", "description": "Experimental addon to the Firebase CLI to add web framework support", "repository": { diff --git a/packages/@apphosting/adapter-angular/src/bin/build.spec.ts b/packages/@apphosting/adapter-angular/src/bin/build.spec.ts index 0a4d9807..84e8a3a5 100644 --- a/packages/@apphosting/adapter-angular/src/bin/build.spec.ts +++ b/packages/@apphosting/adapter-angular/src/bin/build.spec.ts @@ -36,7 +36,7 @@ describe("build commands", () => { "dist/test/browser/browserfile": "", "dist/test/server/server.mjs": "", ".apphosting/bundle.yaml": `version: v1 -serverConfig: +runConfig: runCommand: node dist/test/server/server.mjs environmentVariables: [] metadata: diff --git a/packages/@apphosting/adapter-angular/src/utils.ts b/packages/@apphosting/adapter-angular/src/utils.ts index 0b760085..357b750b 100644 --- a/packages/@apphosting/adapter-angular/src/utils.ts +++ b/packages/@apphosting/adapter-angular/src/utils.ts @@ -193,7 +193,7 @@ async function generateBundleYaml( await mkdir(dirname(opts.bundleYamlPath)); const outputBundle: OutputBundleConfig = { version: "v1", - serverConfig: { + runConfig: { runCommand: `node ${normalize(relative(cwd, opts.serverFilePath))}`, environmentVariables: generateEnvVars(angularVersion), }, diff --git a/packages/@apphosting/adapter-nextjs/e2e/run-local.ts b/packages/@apphosting/adapter-nextjs/e2e/run-local.ts index cc4a53a1..b85dd41e 100644 --- a/packages/@apphosting/adapter-nextjs/e2e/run-local.ts +++ b/packages/@apphosting/adapter-nextjs/e2e/run-local.ts @@ -49,7 +49,7 @@ await promiseSpawn("node", [buildScript], { const bundleYaml = parseYaml(readFileSync(join(cwd, ".apphosting/bundle.yaml")).toString()); -const runCommand = bundleYaml.serverConfig.runCommand; +const runCommand = bundleYaml.runConfig.runCommand; if (typeof runCommand !== "string") { throw new Error("runCommand must be a string"); diff --git a/packages/@apphosting/adapter-nextjs/package.json b/packages/@apphosting/adapter-nextjs/package.json index b3e9771f..e57b5cc7 100644 --- a/packages/@apphosting/adapter-nextjs/package.json +++ b/packages/@apphosting/adapter-nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@apphosting/adapter-nextjs", - "version": "14.0.8", + "version": "14.0.9", "main": "dist/index.js", "description": "Experimental addon to the Firebase CLI to add web framework support", "repository": { diff --git a/packages/@apphosting/adapter-nextjs/src/bin/build.spec.ts b/packages/@apphosting/adapter-nextjs/src/bin/build.spec.ts index e2a68378..89f44ed8 100644 --- a/packages/@apphosting/adapter-nextjs/src/bin/build.spec.ts +++ b/packages/@apphosting/adapter-nextjs/src/bin/build.spec.ts @@ -49,7 +49,7 @@ describe("build commands", () => { ".next/standalone/.next/static/staticfile": "", ".next/standalone/server.js": "", ".apphosting/bundle.yaml": `version: v1 -serverConfig: +runConfig: runCommand: node .next/standalone/server.js metadata: adapterPackageName: "@apphosting/adapter-nextjs" @@ -105,7 +105,7 @@ metadata: }; const expectedPartialYaml = { version: "v1", - serverConfig: { runCommand: "node .next/standalone/apps/next-app/server.js" }, + runConfig: { runCommand: "node .next/standalone/apps/next-app/server.js" }, }; validateTestFiles(tmpDir, expectedFiles); validatePartialYamlContents(tmpDir, ".apphosting/bundle.yaml", expectedPartialYaml); diff --git a/packages/@apphosting/adapter-nextjs/src/utils.ts b/packages/@apphosting/adapter-nextjs/src/utils.ts index 8a65d931..08f8a946 100644 --- a/packages/@apphosting/adapter-nextjs/src/utils.ts +++ b/packages/@apphosting/adapter-nextjs/src/utils.ts @@ -137,7 +137,7 @@ async function generateBundleYaml( await mkdir(opts.outputDirectoryBasePath); const outputBundle: OutputBundleConfig = { version: "v1", - serverConfig: { + runConfig: { runCommand: `node ${normalize(relative(cwd, opts.serverFilePath))}`, }, metadata: createMetadata(nextVersion), diff --git a/packages/@apphosting/common/package.json b/packages/@apphosting/common/package.json index 44951768..25ae288e 100644 --- a/packages/@apphosting/common/package.json +++ b/packages/@apphosting/common/package.json @@ -1,6 +1,6 @@ { "name": "@apphosting/common", - "version": "0.0.4", + "version": "0.0.5", "description": "Shared library code for App Hosting framework adapters", "author": { "name": "Firebase", diff --git a/packages/@apphosting/common/src/index.ts b/packages/@apphosting/common/src/index.ts index 146930ea..27d141e3 100644 --- a/packages/@apphosting/common/src/index.ts +++ b/packages/@apphosting/common/src/index.ts @@ -3,12 +3,12 @@ import { spawn } from "child_process"; // Output bundle metadata specifications to be written to bundle.yaml export interface OutputBundleConfig { version: "v1"; - serverConfig: ServerConfig; + runConfig: RunConfig; metadata: Metadata; } // Fields needed to configure the App Hosting server -export interface ServerConfig { +export interface RunConfig { // Command to start the server (e.g. "node dist/index.js"). Assume this command is run from the root dir of the workspace runCommand: string; // Environment variables set when the app is run