everything-dev 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everything-dev",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "bos": "./src/cli.ts"
package/src/config.ts CHANGED
@@ -28,6 +28,7 @@ export interface RemoteConfig {
28
28
  development: string;
29
29
  production: string;
30
30
  ssr?: string;
31
+ proxy?: string;
31
32
  exposes?: Record<string, string>;
32
33
  variables?: Record<string, string>;
33
34
  secrets?: string[];
@@ -274,7 +274,11 @@ export const spawnRemoteHost = (
274
274
 
275
275
  const configDir = getConfigDir();
276
276
  const configPath = resolve(configDir, "bos.config.json");
277
- const localUrl = `http://localhost:${config.port}`;
277
+
278
+ let hostUrl = `http://localhost:${config.port}`;
279
+ if (process.env.HOST_URL) {
280
+ hostUrl = process.env.HOST_URL;
281
+ }
278
282
 
279
283
  const hostSecrets = loadSecretsFor("host");
280
284
  const apiSecrets = loadSecretsFor("api");
@@ -287,7 +291,7 @@ export const spawnRemoteHost = (
287
291
  const bootstrap: BootstrapConfig = {
288
292
  configPath,
289
293
  secrets: allSecrets,
290
- host: { url: localUrl },
294
+ host: { url: hostUrl },
291
295
  ui: { source: uiSource },
292
296
  api: { source: apiSource, proxy: apiProxy },
293
297
  };
package/src/plugin.ts CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  getPortsFromConfig,
15
15
  getRemotes,
16
16
  loadConfig,
17
+ type RemoteConfig,
17
18
  setConfig,
18
19
  type SourceMode
19
20
  } from "./config";
@@ -133,7 +134,9 @@ function buildEnvVars(config: AppConfig): Record<string, string> {
133
134
  }
134
135
 
135
136
  if (config.proxy) {
136
- env.API_PROXY = "true";
137
+ const bosConfig = loadConfig();
138
+ const apiConfig = bosConfig?.app.api as RemoteConfig | undefined;
139
+ env.API_PROXY = apiConfig?.proxy || apiConfig?.production || "true";
137
140
  }
138
141
 
139
142
  return env;
@@ -277,6 +280,10 @@ export default createPlugin({
277
280
  API_REMOTE_URL: config.app.api.production,
278
281
  };
279
282
 
283
+ if (process.env.HOST_URL) {
284
+ env.HOST_URL = process.env.HOST_URL;
285
+ }
286
+
280
287
  const uiConfig = config.app.ui as { ssr?: string };
281
288
  if (uiConfig.ssr) {
282
289
  env.UI_SSR_URL = uiConfig.ssr;