- NodeDef `device`/`device_policy` become `worker`/`worker_policy`, the issue `ignored_device` becomes `ignored_worker`, and the SDK's `@node` takes `worker=` and `worker_policy=` - FlowStore._migrate renames the keys in published and draft documents once, bumping their version; a queued run's `needs` reads the old key - placement passes the label as `label`, client regenerated - docs: worker placement wording, MCP issuer without DOMAIN, device rows in the CLI data directory and the API table, device links in compose comments
36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import path from "node:path"
|
|
import { fileURLToPath } from "node:url"
|
|
import dotenv from "dotenv"
|
|
|
|
const __filename = fileURLToPath(import.meta.url)
|
|
const __dirname = path.dirname(__filename)
|
|
|
|
dotenv.config({ path: path.join(__dirname, "../../.env") })
|
|
|
|
function getEnvVar(name: string): string {
|
|
const value = process.env[name]
|
|
if (!value) {
|
|
throw new Error(`Environment variable ${name} is undefined`)
|
|
}
|
|
return value
|
|
}
|
|
|
|
export const firstSuperuser = getEnvVar("FIRST_SUPERUSER")
|
|
export const firstSuperuserPassword = getEnvVar("FIRST_SUPERUSER_PASSWORD")
|
|
|
|
/**
|
|
* The two origins a run talks to: the app in the browser, and the API for the
|
|
* setup and teardown around a spec.
|
|
*
|
|
* Deliberately *not* taken from `../../.env` above, which in a checkout
|
|
* configured for a deployment names the deployment. A suite reading it would
|
|
* drive a browser at the local stack while sending its `DELETE`s to the live
|
|
* instance. Both origins come from the same place instead: whatever the browser
|
|
* is pointed at is what teardown may write to.
|
|
*/
|
|
export const appUrl =
|
|
process.env.PLAYWRIGHT_BASE_URL || "http://app.test.localhost"
|
|
|
|
/** The API is a path on the origin that serves the dashboard. */
|
|
export const apiUrl = process.env.PLAYWRIGHT_API_URL || new URL(appUrl).origin
|