Skip to content

Commit a353bf8

Browse files
committed
feat(build): add utils.deploy.env.add build plugin API
This changeset adds a new utility to build plugins: `utils.deploy.env.add()`. This utility function allows build plugins to register environment variables at build time that will be injected into a specific deploy. Userland build plugins cannot see or manipulate the deploy environment variables registered by core or other userland plugins. Deploy-specific environment variables are collected by the `build` supervisor process and processed by the deploy step, which sends them to Buildbot for processing. They are also returned by the programmatic `dev` interface; we'll use these returned variables in the CLI, where we'll e.g. set them on functions. While I was in here I also converted a few files to TypeScript/generally did my best to improve the types along the way.
1 parent 393ffee commit a353bf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/build/src/core/dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ export const startDev = async (devCommand, flags = {}) => {
4040
const { severity, message, stack } = await handleBuildError(error, errorParams)
4141
const { success, severityCode } = getSeverity(severity)
4242

43-
return { success, severityCode, logs, error: { message, stack } }
43+
return { success, severityCode, logs, error: { message, stack }, deployEnvVars: [] }
4444
}
4545
}

0 commit comments

Comments
 (0)