everything-dev 0.0.13 → 0.0.15

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.13",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
package/src/cli.ts CHANGED
@@ -683,9 +683,8 @@ Zephyr Configuration:
683
683
  console.log(` ${icons.ok} ${gradients.cyber("SYNCED")}`);
684
684
  console.log(colors.cyan(frames.bottom(52)));
685
685
  console.log();
686
- console.log(` ${colors.dim("Source:")} ${colors.cyan(`${result.account}/${result.gateway}`)}`);
687
- console.log(` ${colors.dim("CLI Version:")} ${colors.cyan(result.cliVersion)}`);
688
- console.log(` ${colors.dim("Host URL:")} ${colors.cyan(result.hostUrl)}`);
686
+ console.log(` ${colors.dim("Source:")} ${colors.cyan(`${result.account}/${result.gateway}`)}`);
687
+ console.log(` ${colors.dim("Host URL:")} ${colors.cyan(result.hostUrl)}`);
689
688
  console.log();
690
689
 
691
690
  if (result.catalogUpdated) {
package/src/contract.ts CHANGED
@@ -222,7 +222,6 @@ const SyncResultSchema = z.object({
222
222
  status: z.enum(["synced", "error"]),
223
223
  account: z.string(),
224
224
  gateway: z.string(),
225
- cliVersion: z.string(),
226
225
  hostUrl: z.string(),
227
226
  catalogUpdated: z.boolean(),
228
227
  packagesUpdated: z.array(z.string()),
@@ -12,6 +12,21 @@ import {
12
12
  import { renderStreamingView, type StreamingViewHandle } from "../components/streaming-view";
13
13
  import { getProcessConfig, makeDevProcess, type ProcessCallbacks, type ProcessHandle } from "./process";
14
14
 
15
+ const LOG_NOISE_PATTERNS = [
16
+ /\[ Federation Runtime \] Version .* from host of shared singleton module/,
17
+ /Executing an Effect versioned \d+\.\d+\.\d+ with a Runtime of version/,
18
+ /you may want to dedupe the effect dependencies/,
19
+ ];
20
+
21
+ const isDebugMode = (): boolean => {
22
+ return process.env.DEBUG === "true" || process.env.DEBUG === "1";
23
+ };
24
+
25
+ const shouldDisplayLog = (line: string): boolean => {
26
+ if (isDebugMode()) return true;
27
+ return !LOG_NOISE_PATTERNS.some(pattern => pattern.test(line));
28
+ };
29
+
15
30
  export interface AppOrchestrator {
16
31
  packages: string[];
17
32
  env: Record<string, string>;
@@ -153,7 +168,10 @@ export const runDevServers = (orchestrator: AppOrchestrator) =>
153
168
  isError,
154
169
  };
155
170
  allLogs.push(entry);
156
- view?.addLog(name, line, isError);
171
+
172
+ if (shouldDisplayLog(line)) {
173
+ view?.addLog(name, line, isError);
174
+ }
157
175
 
158
176
  if (logFile) {
159
177
  const logLine = formatLogLine(entry) + "\n";
package/src/plugin.ts CHANGED
@@ -401,19 +401,7 @@ export default createPlugin({
401
401
  const bosEnv = yield* loadBosEnv;
402
402
  const privateKey = nearPrivateKey || bosEnv.NEAR_PRIVATE_KEY;
403
403
 
404
- const cliVersion = bosConfig.cli?.version;
405
- if (!cliVersion) {
406
- return yield* Effect.fail(new Error("bos.config.json is missing 'cli.version'. Add it before publishing."));
407
- }
408
-
409
- const configToPublish = {
410
- ...bosConfig,
411
- cli: {
412
- version: cliVersion,
413
- },
414
- };
415
-
416
- const socialArgs = buildSocialSetArgs(bosConfig.account, gatewayDomain, configToPublish);
404
+ const socialArgs = buildSocialSetArgs(bosConfig.account, gatewayDomain, bosConfig);
417
405
  const argsBase64 = Buffer.from(JSON.stringify(socialArgs)).toString("base64");
418
406
 
419
407
  if (publishInput.dryRun) {
@@ -1240,7 +1228,6 @@ export default createPlugin({
1240
1228
  status: "error" as const,
1241
1229
  account,
1242
1230
  gateway,
1243
- cliVersion: "",
1244
1231
  hostUrl: "",
1245
1232
  catalogUpdated: false,
1246
1233
  packagesUpdated: [],
@@ -1276,7 +1263,6 @@ export default createPlugin({
1276
1263
  status: "error" as const,
1277
1264
  account,
1278
1265
  gateway,
1279
- cliVersion: "",
1280
1266
  hostUrl: "",
1281
1267
  catalogUpdated: false,
1282
1268
  packagesUpdated: [],
@@ -1284,27 +1270,12 @@ export default createPlugin({
1284
1270
  };
1285
1271
  }
1286
1272
 
1287
- const cliVersion = remoteConfig.cli?.version;
1288
- if (!cliVersion) {
1289
- return {
1290
- status: "error" as const,
1291
- account,
1292
- gateway,
1293
- cliVersion: "",
1294
- hostUrl: "",
1295
- catalogUpdated: false,
1296
- packagesUpdated: [],
1297
- error: `Published config is missing 'cli.version'. Republish with updated bos.config.json.`,
1298
- };
1299
- }
1300
-
1301
1273
  const hostUrl = remoteConfig.app?.host?.production;
1302
1274
  if (!hostUrl) {
1303
1275
  return {
1304
1276
  status: "error" as const,
1305
1277
  account,
1306
1278
  gateway,
1307
- cliVersion,
1308
1279
  hostUrl: "",
1309
1280
  catalogUpdated: false,
1310
1281
  packagesUpdated: [],
@@ -1312,33 +1283,24 @@ export default createPlugin({
1312
1283
  };
1313
1284
  }
1314
1285
 
1315
- const npmUrl = `https://registry.npmjs.org/everything-dev/${cliVersion}`;
1316
- const npmResponse = await fetch(npmUrl);
1317
- if (!npmResponse.ok) {
1318
- return {
1319
- status: "error" as const,
1320
- account,
1321
- gateway,
1322
- cliVersion,
1323
- hostUrl,
1324
- catalogUpdated: false,
1325
- packagesUpdated: [],
1326
- error: `Failed to fetch everything-dev@${cliVersion} from NPM (${npmResponse.status}). Ensure the version is published.`,
1327
- };
1328
- }
1329
1286
 
1330
- const npmPkg = await npmResponse.json() as { catalog?: Record<string, string> };
1331
- const cliCatalog = npmPkg.catalog ?? {};
1332
1287
 
1333
1288
  const bosConfigPath = `${configDir}/bos.config.json`;
1334
1289
  const updatedBosConfig = {
1335
1290
  ...bosConfig,
1336
- cli: {
1337
- version: cliVersion,
1338
- },
1339
1291
  };
1340
1292
  await Bun.write(bosConfigPath, JSON.stringify(updatedBosConfig, null, 2));
1341
1293
 
1294
+ const sharedUiDeps: Record<string, string> = {};
1295
+ const sharedUi = updatedBosConfig.shared?.ui as Record<string, { requiredVersion?: string }> | undefined;
1296
+ if (sharedUi) {
1297
+ for (const [name, config] of Object.entries(sharedUi)) {
1298
+ if (config.requiredVersion) {
1299
+ sharedUiDeps[name] = config.requiredVersion;
1300
+ }
1301
+ }
1302
+ }
1303
+
1342
1304
  const rootPkgPath = `${configDir}/package.json`;
1343
1305
  const rootPkg = await Bun.file(rootPkgPath).json() as {
1344
1306
  workspaces: { packages: string[]; catalog: Record<string, string> };
@@ -1346,8 +1308,8 @@ export default createPlugin({
1346
1308
  };
1347
1309
 
1348
1310
  rootPkg.workspaces.catalog = {
1349
- ...cliCatalog,
1350
- "everything-dev": cliVersion,
1311
+ ...rootPkg.workspaces.catalog,
1312
+ ...sharedUiDeps,
1351
1313
  };
1352
1314
  await Bun.write(rootPkgPath, JSON.stringify(rootPkg, null, 2));
1353
1315
 
@@ -1373,7 +1335,7 @@ export default createPlugin({
1373
1335
  if (!deps) continue;
1374
1336
 
1375
1337
  for (const [name, version] of Object.entries(deps)) {
1376
- if (name in cliCatalog && version !== "catalog:") {
1338
+ if (name in rootPkg.workspaces.catalog && version !== "catalog:") {
1377
1339
  deps[name] = "catalog:";
1378
1340
  updated = true;
1379
1341
  }
@@ -1390,7 +1352,6 @@ export default createPlugin({
1390
1352
  status: "synced" as const,
1391
1353
  account,
1392
1354
  gateway,
1393
- cliVersion,
1394
1355
  hostUrl,
1395
1356
  catalogUpdated: true,
1396
1357
  packagesUpdated,
@@ -1400,7 +1361,6 @@ export default createPlugin({
1400
1361
  status: "error" as const,
1401
1362
  account,
1402
1363
  gateway,
1403
- cliVersion: "",
1404
1364
  hostUrl: "",
1405
1365
  catalogUpdated: false,
1406
1366
  packagesUpdated: [],