everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
24 lines (23 loc) • 946 B
JavaScript
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
//#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
exports.isRegistryStart = isRegistryStart;
exports.resolveStartConfigSource = resolveStartConfigSource;
//# sourceMappingURL=start-config-source.cjs.map