@treeseed/core 0.8.11 → 0.8.13

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.
Files changed (2) hide show
  1. package/dist/dev.js +30 -1
  2. package/package.json +2 -2
package/dist/dev.js CHANGED
@@ -453,6 +453,7 @@ function createAgentCommand(id, tenantRoot, agentPackageRoot, sharedEnv, apiHost
453
453
  };
454
454
  const config = configs[id];
455
455
  const entrypoint = resolveNodeEntrypoint(agentPackageRoot, config.source, config.dist);
456
+ const explicitAgentPersistTo = sharedEnv.TREESEED_AGENT_D1_PERSIST_TO?.trim();
456
457
  return {
457
458
  id,
458
459
  label: config.label,
@@ -463,7 +464,7 @@ function createAgentCommand(id, tenantRoot, agentPackageRoot, sharedEnv, apiHost
463
464
  ...sharedEnv,
464
465
  TREESEED_AGENT_REPO_ROOT: tenantRoot,
465
466
  TREESEED_AGENT_D1_DATABASE: sharedEnv.TREESEED_API_D1_DATABASE_NAME ?? "SITE_DATA_DB",
466
- TREESEED_AGENT_D1_PERSIST_TO: sharedEnv.TREESEED_API_D1_LOCAL_PERSIST_TO,
467
+ ...explicitAgentPersistTo ? { TREESEED_AGENT_D1_PERSIST_TO: explicitAgentPersistTo } : {},
467
468
  TREESEED_ENVIRONMENT: sharedEnv.TREESEED_ENVIRONMENT ?? "local",
468
469
  ...config.extraEnv
469
470
  },
@@ -519,6 +520,8 @@ function createTreeseedIntegratedDevPlan(options = {}) {
519
520
  const sharedEnv = {
520
521
  ...mergedEnv,
521
522
  TREESEED_LOCAL_DEV_MODE: mergedEnv.TREESEED_LOCAL_DEV_MODE ?? "cloudflare",
523
+ TREESEED_SITE_URL: mergedEnv.TREESEED_SITE_URL ?? webUrl,
524
+ BETTER_AUTH_URL: mergedEnv.BETTER_AUTH_URL ?? webUrl,
522
525
  TREESEED_API_BASE_URL: apiBaseUrl,
523
526
  TREESEED_MARKET_API_BASE_URL: mergedEnv.TREESEED_MARKET_API_BASE_URL ?? apiBaseUrl,
524
527
  TREESEED_PROJECT_ID: projectId ?? mergedEnv.TREESEED_PROJECT_ID,
@@ -949,6 +952,25 @@ function writePlan(plan, options, write) {
949
952
  }
950
953
  }
951
954
  function attachPrefixedLogReader(child, surface, options, write) {
955
+ const filterState = {
956
+ stdout: { suppressWorkerdBrokenPipeBlock: false },
957
+ stderr: { suppressWorkerdBrokenPipeBlock: false }
958
+ };
959
+ function shouldSuppressLogLine(line, name) {
960
+ const state = filterState[name];
961
+ if (state.suppressWorkerdBrokenPipeBlock) {
962
+ const trimmed = line.trim();
963
+ if (!trimmed || trimmed.startsWith("stack:") || line.includes("/workerd@")) {
964
+ return true;
965
+ }
966
+ state.suppressWorkerdBrokenPipeBlock = false;
967
+ }
968
+ if (line.includes("kj::getCaughtExceptionAsKj() = kj/async-io-unix.c++:186: disconnected: ::write")) {
969
+ state.suppressWorkerdBrokenPipeBlock = true;
970
+ return true;
971
+ }
972
+ return false;
973
+ }
952
974
  function attach(stream, name) {
953
975
  if (!stream || typeof stream.on !== "function") {
954
976
  return;
@@ -963,6 +985,9 @@ function attachPrefixedLogReader(child, surface, options, write) {
963
985
  }
964
986
  const line = buffer.slice(0, newlineIndex);
965
987
  buffer = buffer.slice(newlineIndex + 1);
988
+ if (shouldSuppressLogLine(line, name)) {
989
+ continue;
990
+ }
966
991
  if (options.json) {
967
992
  emitEvent(options, write, { type: "log", surface, message: line, detail: { stream: name } }, name);
968
993
  } else {
@@ -973,6 +998,10 @@ function attachPrefixedLogReader(child, surface, options, write) {
973
998
  });
974
999
  stream.on("end", () => {
975
1000
  if (buffer.length > 0) {
1001
+ if (shouldSuppressLogLine(buffer, name)) {
1002
+ buffer = "";
1003
+ return;
1004
+ }
976
1005
  if (options.json) {
977
1006
  emitEvent(options, write, { type: "log", surface, message: buffer, detail: { stream: name } }, name);
978
1007
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@treeseed/core",
3
- "version": "0.8.11",
3
+ "version": "0.8.13",
4
4
  "description": "Treeseed web framework package for Astro/Starlight site runtimes.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -70,7 +70,7 @@
70
70
  "@astrojs/sitemap": "3.7.0",
71
71
  "@astrojs/starlight": "0.37.6",
72
72
  "@tailwindcss/vite": "^4.1.4",
73
- "@treeseed/sdk": "0.8.11",
73
+ "@treeseed/sdk": "0.8.13",
74
74
  "astro": "^5.6.1",
75
75
  "esbuild": "^0.28.0",
76
76
  "katex": "^0.16.22",