everything-dev 1.8.6 → 1.8.7

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/src/plugin.ts CHANGED
@@ -44,6 +44,7 @@ import {
44
44
  } from "./contract";
45
45
  import { devApp, startApp } from "./dev-session";
46
46
  import {
47
+ buildRegistryConfigUrl,
47
48
  buildRegistryConfigUrlForNetwork,
48
49
  fetchBosConfigFromFastKv,
49
50
  fetchPluginFromRegistry,
@@ -65,6 +66,7 @@ import {
65
66
  import { syncAndGenerateSharedUi } from "./shared";
66
67
  import type { BosConfig, RuntimeConfig, SourceMode } from "./types";
67
68
  import { run } from "./utils/run";
69
+ import { colors } from "./utils/theme";
68
70
 
69
71
  function ensureEnvFile(configDir: string): void {
70
72
  const envPath = join(configDir, ".env");
@@ -140,6 +142,15 @@ function resolveWorkspaceTarget(
140
142
  configDir: string,
141
143
  ): WorkspaceTarget | null {
142
144
  if (bosConfig?.app && key in bosConfig.app) {
145
+ const appEntry = (bosConfig.app as Record<string, { development?: string }>)[key];
146
+ const devPath = resolveLocalDevelopmentPath(appEntry?.development, configDir);
147
+ if (devPath) {
148
+ return {
149
+ key,
150
+ kind: "app",
151
+ path: devPath,
152
+ };
153
+ }
143
154
  return {
144
155
  key,
145
156
  kind: "app",
@@ -924,30 +935,13 @@ export default createPlugin({
924
935
 
925
936
  // ── Production Readiness Validation ──
926
937
  const productionEnv: Record<string, string> = {};
938
+ const warnings: string[] = [];
927
939
 
928
940
  // Default CORS_ORIGIN to the configured domain if not set
929
941
  if (!process.env.CORS_ORIGIN && config.domain) {
930
942
  const defaultOrigin = `https://${config.domain}`;
931
943
  productionEnv.CORS_ORIGIN = defaultOrigin;
932
- console.log(`[Start] CORS_ORIGIN not set, defaulting to ${defaultOrigin}`);
933
- }
934
-
935
- // Validate shared.plugins packages are resolvable
936
- const missingSharedDeps: string[] = [];
937
- if (config.shared?.plugins) {
938
- for (const depName of Object.keys(config.shared.plugins)) {
939
- try {
940
- require.resolve(depName);
941
- } catch {
942
- missingSharedDeps.push(depName);
943
- }
944
- }
945
- }
946
- if (missingSharedDeps.length > 0) {
947
- console.error(
948
- `[Start] Missing ${missingSharedDeps.length} shared plugin dependency(s): ${missingSharedDeps.join(", ")}`,
949
- );
950
- console.error(`[Start] Ensure these packages are installed in node_modules.`);
944
+ warnings.push(`CORS_ORIGIN defaulting to ${defaultOrigin}`);
951
945
  }
952
946
 
953
947
  // Validate required secrets
@@ -974,12 +968,7 @@ export default createPlugin({
974
968
  }
975
969
 
976
970
  if (missingSecrets.length > 0) {
977
- console.warn(
978
- `[Start] Missing ${missingSecrets.length} required secret(s): ${missingSecrets.join(", ")}`,
979
- );
980
- console.warn(
981
- `[Start] Auth endpoints and database connections may fail without these secrets.`,
982
- );
971
+ warnings.push(`Missing ${missingSecrets.length} secret(s): ${missingSecrets.join(", ")}`);
983
972
  }
984
973
 
985
974
  const services = buildServiceDescriptorMap(runtimeConfig);
@@ -994,6 +983,40 @@ export default createPlugin({
994
983
  ? { GATEWAY_DOMAIN: config.staging?.domain ?? config.domain ?? "" }
995
984
  : {};
996
985
 
986
+ const configSource = remoteConfig
987
+ ? `bos://${input.account}/${input.domain}`
988
+ : (findConfigPath() ?? "bos.config.json");
989
+
990
+ const configSourceHttp =
991
+ remoteConfig && input.account && input.domain
992
+ ? buildRegistryConfigUrl(input.account, input.domain)
993
+ : undefined;
994
+
995
+ console.log();
996
+ console.log(` ${colors.dim("Config Source:")} ${configSource}`);
997
+ if (configSourceHttp) {
998
+ console.log(` ${colors.dim(configSourceHttp)}`);
999
+ }
1000
+ console.log(` ${colors.dim("Account:")} ${config.account}`);
1001
+ console.log(` ${colors.dim("Domain:")} ${config.domain ?? "not configured"}`);
1002
+ console.log();
1003
+ console.log(` ${colors.dim("Modules:")}`);
1004
+ console.log(
1005
+ ` ${colors.dim("HOST")} → ${runtimeConfig.host.remoteUrl ?? runtimeConfig.host.url ?? "local"}`,
1006
+ );
1007
+ console.log(` ${colors.dim("UI")} → ${runtimeConfig.ui.url ?? "local"}`);
1008
+ console.log(` ${colors.dim("API")} → ${runtimeConfig.api.url ?? "local"}`);
1009
+ if (runtimeConfig.auth) {
1010
+ console.log(` ${colors.dim("AUTH")} → ${runtimeConfig.auth.url ?? "local"}`);
1011
+ }
1012
+ if (warnings.length > 0) {
1013
+ console.log();
1014
+ for (const w of warnings) {
1015
+ console.log(` ${colors.yellow(w)}`);
1016
+ }
1017
+ }
1018
+ console.log();
1019
+
997
1020
  const orchestrator: AppOrchestrator = {
998
1021
  packages: ["host"],
999
1022
  env: {
@@ -1,7 +0,0 @@
1
- import { createRequire } from "node:module";
2
-
3
- //#region \0rolldown/runtime.js
4
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
-
6
- //#endregion
7
- export { __require };