@buda-ai/connector 0.1.22 → 0.1.23

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/cli.js +11 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -517,7 +517,7 @@ import path2 from "path";
517
517
  // package.json
518
518
  var package_default = {
519
519
  name: "@buda-ai/connector",
520
- version: "0.1.22",
520
+ version: "0.1.23",
521
521
  private: false,
522
522
  type: "module",
523
523
  publishConfig: {
@@ -2627,6 +2627,10 @@ var compareVersions = (left, right) => {
2627
2627
  return 0;
2628
2628
  };
2629
2629
  var shouldReplaceDaemonVersion = (runningVersion, candidateVersion) => compareVersions(candidateVersion, runningVersion) > 0;
2630
+ var shouldDisplayConnectorLogEntry = (createdAt, startedAt) => {
2631
+ const timestamp = Date.parse(createdAt);
2632
+ return Number.isNaN(timestamp) || timestamp >= startedAt;
2633
+ };
2630
2634
  var getErrorCode = (error) => typeof error === "object" && error !== null && "code" in error ? String(error.code) : "UNKNOWN";
2631
2635
  var waitForChildSpawn = (child) => new Promise((resolve, reject) => {
2632
2636
  const onError = (error) => {
@@ -2773,6 +2777,7 @@ var streamDaemonLogs = (options) => {
2773
2777
  for (const line of lines.slice(seenLines)) {
2774
2778
  try {
2775
2779
  const entry = JSON.parse(line);
2780
+ if (!shouldDisplayConnectorLogEntry(entry.createdAt, options.startedAt)) continue;
2776
2781
  const connectorId = entry.metadata?.connectorId;
2777
2782
  if (options.dashboardActive && typeof connectorId === "string") {
2778
2783
  const output2 = entry.metadata?.source === "daemon-console" ? entry.message : `[buda-connector] ${entry.message}`;
@@ -2883,6 +2888,7 @@ var waitForConnectorViewerExit = async (dashboardClosed) => {
2883
2888
  process.off("SIGTERM", finishSignal);
2884
2889
  };
2885
2890
  async function runConnectorDashboard(launchConfig, options = {}) {
2891
+ const startedAt = Date.now();
2886
2892
  let finishDashboard = () => void 0;
2887
2893
  const dashboardClosed = new Promise((resolve) => {
2888
2894
  finishDashboard = resolve;
@@ -2903,7 +2909,8 @@ async function runConnectorDashboard(launchConfig, options = {}) {
2903
2909
  connectorId: config.connectorId,
2904
2910
  dashboardActive: false,
2905
2911
  plain: Boolean(options.plain),
2906
- serverUrl: config.serverUrl
2912
+ serverUrl: config.serverUrl,
2913
+ startedAt
2907
2914
  });
2908
2915
  if (!process.stdin.isTTY) {
2909
2916
  stopLogs2();
@@ -2930,7 +2937,8 @@ async function runConnectorDashboard(launchConfig, options = {}) {
2930
2937
  const stopLogs = streamDaemonLogs({
2931
2938
  dashboardActive: true,
2932
2939
  plain: false,
2933
- serverUrl: getServerUrl(launchConfig)
2940
+ serverUrl: getServerUrl(launchConfig),
2941
+ startedAt
2934
2942
  });
2935
2943
  let refreshing = false;
2936
2944
  const refresh = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buda-ai/connector",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "publishConfig": {