everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
22 lines (21 loc) • 823 B
JavaScript
//#region src/start-config-source.ts
function resolveStartConfigSource(input, env) {
if (input.configPath) return { configPath: input.configPath };
const account = input.account ?? env.BOS_ACCOUNT;
const domain = input.domain ?? env.BOS_GATEWAY;
if (account && domain) return { registry: {
account,
domain
} };
return {};
}
/** A registry-fetched start is a real deployment — a localhost origin there is
* a stray dev leftover. Local starts (explicit --config-path, bare `bos start`)
* keep the operator's environment: their localhost origin IS the reachable
* deployment context the in-process host's auth seam reads. */
function isRegistryStart(source) {
return source.registry !== void 0;
}
//#endregion
export { isRegistryStart, resolveStartConfigSource };
//# sourceMappingURL=start-config-source.mjs.map