@hasna/todos 0.11.32 → 0.11.33

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/dist/cli/index.js CHANGED
@@ -25736,8 +25736,7 @@ var init_cloud = __esm(() => {
25736
25736
  });
25737
25737
 
25738
25738
  // src/lib/logger.ts
25739
- import { LogsClient } from "@hasna/logs";
25740
- function getLogger() {
25739
+ async function getLogger() {
25741
25740
  if (client)
25742
25741
  return client;
25743
25742
  const url = process.env.LOGS_URL;
@@ -25745,14 +25744,15 @@ function getLogger() {
25745
25744
  const apiKey = process.env.LOGS_API_KEY;
25746
25745
  if (!projectId)
25747
25746
  return null;
25747
+ const { LogsClient } = await import("@hasna/logs");
25748
25748
  client = new LogsClient({ url, projectId, apiKey });
25749
25749
  return client;
25750
25750
  }
25751
25751
  async function logError(message, opts) {
25752
- const logger = getLogger();
25753
- if (!logger)
25754
- return;
25755
25752
  try {
25753
+ const logger = await getLogger();
25754
+ if (!logger)
25755
+ return;
25756
25756
  await logger.push({
25757
25757
  level: "error",
25758
25758
  message,
@@ -25765,7 +25765,6 @@ async function logError(message, opts) {
25765
25765
  } catch {}
25766
25766
  }
25767
25767
  var client = null;
25768
- var init_logger = () => {};
25769
25768
 
25770
25769
  // src/db/dispatches.ts
25771
25770
  var exports_dispatches = {};
@@ -30148,7 +30147,6 @@ var init_mcp = __esm(() => {
30148
30147
  init_cloud();
30149
30148
  init_agents();
30150
30149
  init_database();
30151
- init_logger();
30152
30150
  init_types();
30153
30151
  init_dispatch2();
30154
30152
  init_task_crud2();
@@ -1,5 +1,5 @@
1
- import { LogsClient } from "@hasna/logs";
2
- export declare function getLogger(): LogsClient | null;
1
+ import type { LogsClient } from "@hasna/logs";
2
+ export declare function getLogger(): Promise<LogsClient | null>;
3
3
  export declare function logError(message: string, opts?: {
4
4
  service?: string;
5
5
  stack?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib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AAC,CAAA;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,GACA,OAAO,CAAC,IAAI,CAAC,CAgBf;AAED,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAC9D,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,OAAO,CAC3B,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAC9D,OAAO,CAAC,IAAI,CAAC,CAcf"}
package/dist/mcp/index.js CHANGED
@@ -20675,9 +20675,8 @@ init_agents();
20675
20675
  init_database();
20676
20676
 
20677
20677
  // src/lib/logger.ts
20678
- import { LogsClient } from "@hasna/logs";
20679
20678
  var client = null;
20680
- function getLogger() {
20679
+ async function getLogger() {
20681
20680
  if (client)
20682
20681
  return client;
20683
20682
  const url = process.env.LOGS_URL;
@@ -20685,14 +20684,15 @@ function getLogger() {
20685
20684
  const apiKey = process.env.LOGS_API_KEY;
20686
20685
  if (!projectId)
20687
20686
  return null;
20687
+ const { LogsClient } = await import("@hasna/logs");
20688
20688
  client = new LogsClient({ url, projectId, apiKey });
20689
20689
  return client;
20690
20690
  }
20691
20691
  async function logError(message, opts) {
20692
- const logger = getLogger();
20693
- if (!logger)
20694
- return;
20695
20692
  try {
20693
+ const logger = await getLogger();
20694
+ if (!logger)
20695
+ return;
20696
20696
  await logger.push({
20697
20697
  level: "error",
20698
20698
  message,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/todos",
3
- "version": "0.11.32",
3
+ "version": "0.11.33",
4
4
  "description": "Universal task management for AI coding agents - CLI + MCP server + interactive TUI",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",