@kaban-board/core 0.2.11 → 0.2.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.
package/dist/index.js CHANGED
@@ -27,6 +27,118 @@ var __export = (target, all) => {
27
27
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
28
28
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
29
29
 
30
+ // src/types.ts
31
+ var DEFAULT_CONFIG, KabanError, ExitCode;
32
+ var init_types = __esm(() => {
33
+ DEFAULT_CONFIG = {
34
+ board: {
35
+ name: "Kaban Board"
36
+ },
37
+ columns: [
38
+ { id: "backlog", name: "Backlog" },
39
+ { id: "todo", name: "Todo" },
40
+ { id: "in_progress", name: "In Progress", wipLimit: 3 },
41
+ { id: "review", name: "Review", wipLimit: 2 },
42
+ { id: "done", name: "Done", isTerminal: true }
43
+ ],
44
+ defaults: {
45
+ column: "todo",
46
+ agent: "user"
47
+ }
48
+ };
49
+ KabanError = class KabanError extends Error {
50
+ code;
51
+ constructor(message, code) {
52
+ super(message);
53
+ this.code = code;
54
+ this.name = "KabanError";
55
+ }
56
+ };
57
+ ExitCode = {
58
+ SUCCESS: 0,
59
+ GENERAL_ERROR: 1,
60
+ NOT_FOUND: 2,
61
+ CONFLICT: 3,
62
+ VALIDATION: 4
63
+ };
64
+ });
65
+
66
+ // src/db/utils.ts
67
+ import { existsSync, mkdirSync } from "node:fs";
68
+ import { dirname } from "node:path";
69
+ import { fileURLToPath } from "node:url";
70
+ function fileUrlToPath(urlOrPath) {
71
+ if (!urlOrPath.startsWith("file:"))
72
+ return urlOrPath;
73
+ if (urlOrPath.startsWith("file:///") || urlOrPath.startsWith("file://localhost/")) {
74
+ return fileURLToPath(urlOrPath);
75
+ }
76
+ return urlOrPath.replace(/^file:/, "");
77
+ }
78
+ function ensureDbDir(filePath) {
79
+ if (filePath === ":memory:" || filePath.trim() === "")
80
+ return;
81
+ const dir = dirname(filePath);
82
+ if (!existsSync(dir)) {
83
+ mkdirSync(dir, { recursive: true });
84
+ }
85
+ }
86
+ var init_utils = () => {};
87
+
88
+ // src/db/schema.ts
89
+ var exports_schema = {};
90
+ __export(exports_schema, {
91
+ undoLog: () => undoLog,
92
+ tasks: () => tasks,
93
+ columns: () => columns,
94
+ boards: () => boards
95
+ });
96
+ import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
97
+ var boards, columns, tasks, undoLog;
98
+ var init_schema = __esm(() => {
99
+ boards = sqliteTable("boards", {
100
+ id: text("id").primaryKey(),
101
+ name: text("name").notNull(),
102
+ createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
103
+ updatedAt: integer("updated_at", { mode: "timestamp" }).notNull()
104
+ });
105
+ columns = sqliteTable("columns", {
106
+ id: text("id").primaryKey(),
107
+ boardId: text("board_id").notNull().references(() => boards.id),
108
+ name: text("name").notNull(),
109
+ position: integer("position").notNull(),
110
+ wipLimit: integer("wip_limit"),
111
+ isTerminal: integer("is_terminal", { mode: "boolean" }).notNull().default(false)
112
+ });
113
+ tasks = sqliteTable("tasks", {
114
+ id: text("id").primaryKey(),
115
+ title: text("title").notNull(),
116
+ description: text("description"),
117
+ columnId: text("column_id").notNull().references(() => columns.id),
118
+ position: integer("position").notNull(),
119
+ createdBy: text("created_by").notNull(),
120
+ assignedTo: text("assigned_to"),
121
+ parentId: text("parent_id").references(() => tasks.id),
122
+ dependsOn: text("depends_on", { mode: "json" }).$type().notNull().default([]),
123
+ files: text("files", { mode: "json" }).$type().notNull().default([]),
124
+ labels: text("labels", { mode: "json" }).$type().notNull().default([]),
125
+ blockedReason: text("blocked_reason"),
126
+ version: integer("version").notNull().default(1),
127
+ createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
128
+ updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(),
129
+ startedAt: integer("started_at", { mode: "timestamp" }),
130
+ completedAt: integer("completed_at", { mode: "timestamp" }),
131
+ archived: integer("archived", { mode: "boolean" }).notNull().default(false),
132
+ archivedAt: integer("archived_at", { mode: "timestamp" })
133
+ });
134
+ undoLog = sqliteTable("undo_log", {
135
+ id: integer("id").primaryKey({ autoIncrement: true }),
136
+ operation: text("operation").notNull(),
137
+ data: text("data", { mode: "json" }).notNull(),
138
+ createdAt: integer("created_at", { mode: "timestamp" }).notNull()
139
+ });
140
+ });
141
+
30
142
  // drizzle/meta/_journal.json
31
143
  var _journal_default;
32
144
  var init__journal = __esm(() => {
@@ -120,8 +232,8 @@ __export(exports_migrator, {
120
232
  runMigrations: () => runMigrations
121
233
  });
122
234
  import { readFileSync } from "node:fs";
123
- import { dirname, isAbsolute, join } from "node:path";
124
- import { fileURLToPath } from "node:url";
235
+ import { dirname as dirname2, isAbsolute, join } from "node:path";
236
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
125
237
  function resolveSqlContent(sqlOrPath) {
126
238
  if (sqlOrPath.includes("CREATE") || sqlOrPath.includes("INSERT") || sqlOrPath.includes("--")) {
127
239
  return sqlOrPath;
@@ -235,141 +347,32 @@ var init_migrator = __esm(() => {
235
347
  "0001_add_archived": _0001_add_archived_default,
236
348
  "0002_add_fts5": _0002_add_fts5_default
237
349
  };
238
- __dirname2 = dirname(fileURLToPath(import.meta.url));
350
+ __dirname2 = dirname2(fileURLToPath2(import.meta.url));
239
351
  drizzleDir = join(__dirname2, "..", "..", "drizzle");
240
352
  });
241
353
 
242
- // src/db/index.ts
243
- import { existsSync, mkdirSync } from "node:fs";
244
- import { dirname as dirname2 } from "node:path";
245
- import { fileURLToPath as fileURLToPath2 } from "node:url";
246
-
247
- // src/types.ts
248
- var DEFAULT_CONFIG = {
249
- board: {
250
- name: "Kaban Board"
251
- },
252
- columns: [
253
- { id: "backlog", name: "Backlog" },
254
- { id: "todo", name: "Todo" },
255
- { id: "in_progress", name: "In Progress", wipLimit: 3 },
256
- { id: "review", name: "Review", wipLimit: 2 },
257
- { id: "done", name: "Done", isTerminal: true }
258
- ],
259
- defaults: {
260
- column: "todo",
261
- agent: "user"
262
- }
263
- };
264
-
265
- class KabanError extends Error {
266
- code;
267
- constructor(message, code) {
268
- super(message);
269
- this.code = code;
270
- this.name = "KabanError";
271
- }
272
- }
273
- var ExitCode = {
274
- SUCCESS: 0,
275
- GENERAL_ERROR: 1,
276
- NOT_FOUND: 2,
277
- CONFLICT: 3,
278
- VALIDATION: 4
279
- };
280
-
281
- // src/db/schema.ts
282
- var exports_schema = {};
283
- __export(exports_schema, {
284
- undoLog: () => undoLog,
285
- tasks: () => tasks,
286
- columns: () => columns,
287
- boards: () => boards
288
- });
289
- import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
290
- var boards = sqliteTable("boards", {
291
- id: text("id").primaryKey(),
292
- name: text("name").notNull(),
293
- createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
294
- updatedAt: integer("updated_at", { mode: "timestamp" }).notNull()
295
- });
296
- var columns = sqliteTable("columns", {
297
- id: text("id").primaryKey(),
298
- boardId: text("board_id").notNull().references(() => boards.id),
299
- name: text("name").notNull(),
300
- position: integer("position").notNull(),
301
- wipLimit: integer("wip_limit"),
302
- isTerminal: integer("is_terminal", { mode: "boolean" }).notNull().default(false)
303
- });
304
- var tasks = sqliteTable("tasks", {
305
- id: text("id").primaryKey(),
306
- title: text("title").notNull(),
307
- description: text("description"),
308
- columnId: text("column_id").notNull().references(() => columns.id),
309
- position: integer("position").notNull(),
310
- createdBy: text("created_by").notNull(),
311
- assignedTo: text("assigned_to"),
312
- parentId: text("parent_id").references(() => tasks.id),
313
- dependsOn: text("depends_on", { mode: "json" }).$type().notNull().default([]),
314
- files: text("files", { mode: "json" }).$type().notNull().default([]),
315
- labels: text("labels", { mode: "json" }).$type().notNull().default([]),
316
- blockedReason: text("blocked_reason"),
317
- version: integer("version").notNull().default(1),
318
- createdAt: integer("created_at", { mode: "timestamp" }).notNull(),
319
- updatedAt: integer("updated_at", { mode: "timestamp" }).notNull(),
320
- startedAt: integer("started_at", { mode: "timestamp" }),
321
- completedAt: integer("completed_at", { mode: "timestamp" }),
322
- archived: integer("archived", { mode: "boolean" }).notNull().default(false),
323
- archivedAt: integer("archived_at", { mode: "timestamp" })
324
- });
325
- var undoLog = sqliteTable("undo_log", {
326
- id: integer("id").primaryKey({ autoIncrement: true }),
327
- operation: text("operation").notNull(),
328
- data: text("data", { mode: "json" }).notNull(),
329
- createdAt: integer("created_at", { mode: "timestamp" }).notNull()
354
+ // src/db/libsql-adapter.ts
355
+ var exports_libsql_adapter = {};
356
+ __export(exports_libsql_adapter, {
357
+ createLibsqlDb: () => createLibsqlDb
330
358
  });
331
-
332
- // src/db/index.ts
333
- init_migrator();
334
- var isBun = typeof globalThis.Bun !== "undefined" && typeof globalThis.Bun.version === "string";
335
- function fileUrlToPath(urlOrPath) {
336
- if (!urlOrPath.startsWith("file:"))
337
- return urlOrPath;
338
- if (urlOrPath.startsWith("file:///") || urlOrPath.startsWith("file://localhost/")) {
339
- return fileURLToPath2(urlOrPath);
340
- }
341
- return urlOrPath.replace(/^file:/, "");
342
- }
343
- function ensureDbDir(filePath) {
344
- if (filePath === ":memory:" || filePath.trim() === "")
345
- return;
346
- const dir = dirname2(filePath);
347
- if (!existsSync(dir)) {
348
- mkdirSync(dir, { recursive: true });
349
- }
350
- }
351
- async function createBunDb(filePath) {
352
- let sqlite;
359
+ async function createLibsqlDb(config) {
360
+ let client;
353
361
  try {
354
- const { Database } = await import("bun:sqlite");
355
- const { drizzle } = await import("drizzle-orm/bun-sqlite");
356
- ensureDbDir(filePath);
357
- sqlite = new Database(filePath);
358
- const db = drizzle({ client: sqlite, schema: exports_schema });
362
+ const { createClient } = await import("@libsql/client");
363
+ const { drizzle } = await import("drizzle-orm/libsql");
364
+ if (config.url.startsWith("file:")) {
365
+ ensureDbDir(fileUrlToPath(config.url));
366
+ }
367
+ client = createClient(config);
368
+ const db = drizzle(client, { schema: exports_schema });
359
369
  let closed = false;
360
- const sqliteRef = sqlite;
370
+ const clientRef = client;
361
371
  return Object.assign(db, {
362
- $client: sqliteRef,
372
+ $client: clientRef,
363
373
  $runRaw: async (sql) => {
364
374
  try {
365
- if (typeof sqliteRef.exec === "function") {
366
- sqliteRef.exec(sql);
367
- return;
368
- }
369
- const statements = sql.split(";").filter((s) => s.trim());
370
- for (const stmt of statements) {
371
- sqliteRef.run(stmt);
372
- }
375
+ await clientRef.executeMultiple(sql);
373
376
  } catch (error) {
374
377
  throw new KabanError(`SQL execution failed: ${error instanceof Error ? error.message : String(error)}`, ExitCode.GENERAL_ERROR);
375
378
  }
@@ -379,36 +382,52 @@ async function createBunDb(filePath) {
379
382
  return;
380
383
  closed = true;
381
384
  try {
382
- sqliteRef.close();
385
+ clientRef.close();
383
386
  } catch {}
384
387
  }
385
388
  });
386
389
  } catch (error) {
387
390
  try {
388
- sqlite?.close?.();
391
+ client?.close?.();
389
392
  } catch {}
390
393
  if (error instanceof KabanError)
391
394
  throw error;
392
- throw new KabanError(`Failed to create Bun database: ${error instanceof Error ? error.message : String(error)}`, ExitCode.GENERAL_ERROR);
395
+ throw new KabanError(`Failed to create libsql database: ${error instanceof Error ? error.message : String(error)}`, ExitCode.GENERAL_ERROR);
393
396
  }
394
397
  }
395
- async function createLibsqlDb(config) {
396
- let client;
398
+ var init_libsql_adapter = __esm(() => {
399
+ init_types();
400
+ init_schema();
401
+ init_utils();
402
+ });
403
+
404
+ // src/db/bun-adapter.ts
405
+ var exports_bun_adapter = {};
406
+ __export(exports_bun_adapter, {
407
+ createBunDb: () => createBunDb
408
+ });
409
+ async function createBunDb(filePath) {
410
+ let sqlite;
397
411
  try {
398
- const { createClient } = await import("@libsql/client");
399
- const { drizzle } = await import("drizzle-orm/libsql");
400
- if (config.url.startsWith("file:")) {
401
- ensureDbDir(fileUrlToPath(config.url));
402
- }
403
- client = createClient(config);
404
- const db = drizzle(client, { schema: exports_schema });
412
+ const { Database } = await import("bun:sqlite");
413
+ const { drizzle } = await import("drizzle-orm/bun-sqlite");
414
+ ensureDbDir(filePath);
415
+ sqlite = new Database(filePath);
416
+ const db = drizzle({ client: sqlite, schema: exports_schema });
405
417
  let closed = false;
406
- const clientRef = client;
418
+ const sqliteRef = sqlite;
407
419
  return Object.assign(db, {
408
- $client: clientRef,
420
+ $client: sqliteRef,
409
421
  $runRaw: async (sql) => {
410
422
  try {
411
- await clientRef.executeMultiple(sql);
423
+ if (typeof sqliteRef.exec === "function") {
424
+ sqliteRef.exec(sql);
425
+ return;
426
+ }
427
+ const statements = sql.split(";").filter((s) => s.trim());
428
+ for (const stmt of statements) {
429
+ sqliteRef.run(stmt);
430
+ }
412
431
  } catch (error) {
413
432
  throw new KabanError(`SQL execution failed: ${error instanceof Error ? error.message : String(error)}`, ExitCode.GENERAL_ERROR);
414
433
  }
@@ -418,40 +437,76 @@ async function createLibsqlDb(config) {
418
437
  return;
419
438
  closed = true;
420
439
  try {
421
- clientRef.close();
440
+ sqliteRef.close();
422
441
  } catch {}
423
442
  }
424
443
  });
425
444
  } catch (error) {
426
445
  try {
427
- client?.close?.();
446
+ sqlite?.close?.();
428
447
  } catch {}
429
448
  if (error instanceof KabanError)
430
449
  throw error;
431
- throw new KabanError(`Failed to create libsql database: ${error instanceof Error ? error.message : String(error)}`, ExitCode.GENERAL_ERROR);
450
+ throw new KabanError(`Failed to create Bun database: ${error instanceof Error ? error.message : String(error)}`, ExitCode.GENERAL_ERROR);
432
451
  }
433
452
  }
453
+ var init_bun_adapter = __esm(() => {
454
+ init_types();
455
+ init_schema();
456
+ init_utils();
457
+ });
458
+
459
+ // src/db/index.ts
460
+ init_types();
461
+ init_utils();
462
+ init_migrator();
463
+ init_schema();
464
+ var isBun = typeof globalThis.Bun !== "undefined" && typeof globalThis.Bun.version === "string";
434
465
  async function createDb(config, options = {}) {
435
466
  const { migrate = true } = options;
436
467
  try {
437
468
  let db;
438
469
  const driver = process.env.KABAN_DB_DRIVER;
470
+ const noLibsql = process.env.KABAN_NO_LIBSQL === "true";
439
471
  const preferBun = isBun && driver !== "libsql";
440
472
  const forceLibsql = driver === "libsql";
473
+ if (noLibsql && forceLibsql) {
474
+ throw new KabanError("LibSQL is disabled (KABAN_NO_LIBSQL=true) but was explicitly requested", ExitCode.GENERAL_ERROR);
475
+ }
441
476
  if (typeof config === "string") {
442
477
  if (forceLibsql) {
443
- db = await createLibsqlDb({ url: `file:${config}` });
478
+ if (noLibsql) {
479
+ throw new KabanError("LibSQL is disabled (KABAN_NO_LIBSQL=true) but was explicitly requested", ExitCode.GENERAL_ERROR);
480
+ } else {
481
+ const { createLibsqlDb: createLibsqlDb2 } = await Promise.resolve().then(() => (init_libsql_adapter(), exports_libsql_adapter));
482
+ db = await createLibsqlDb2({ url: `file:${config}` });
483
+ }
444
484
  } else if (preferBun) {
445
- db = await createBunDb(config);
485
+ const { createBunDb: createBunDb2 } = await Promise.resolve().then(() => (init_bun_adapter(), exports_bun_adapter));
486
+ db = await createBunDb2(config);
487
+ } else if (noLibsql) {
488
+ const { createBunDb: createBunDb2 } = await Promise.resolve().then(() => (init_bun_adapter(), exports_bun_adapter));
489
+ db = await createBunDb2(config);
446
490
  } else {
447
- db = await createLibsqlDb({ url: `file:${config}` });
491
+ const { createLibsqlDb: createLibsqlDb2 } = await Promise.resolve().then(() => (init_libsql_adapter(), exports_libsql_adapter));
492
+ db = await createLibsqlDb2({ url: `file:${config}` });
448
493
  }
449
494
  } else if (forceLibsql) {
450
- db = await createLibsqlDb(config);
495
+ if (noLibsql) {
496
+ throw new KabanError("LibSQL is disabled (KABAN_NO_LIBSQL=true) but was explicitly requested", ExitCode.GENERAL_ERROR);
497
+ } else {
498
+ const { createLibsqlDb: createLibsqlDb2 } = await Promise.resolve().then(() => (init_libsql_adapter(), exports_libsql_adapter));
499
+ db = await createLibsqlDb2(config);
500
+ }
451
501
  } else if (preferBun && config.url.startsWith("file:")) {
452
- db = await createBunDb(fileUrlToPath(config.url));
502
+ const { createBunDb: createBunDb2 } = await Promise.resolve().then(() => (init_bun_adapter(), exports_bun_adapter));
503
+ db = await createBunDb2(fileUrlToPath(config.url));
504
+ } else if (noLibsql) {
505
+ const { createBunDb: createBunDb2 } = await Promise.resolve().then(() => (init_bun_adapter(), exports_bun_adapter));
506
+ db = await createBunDb2(fileUrlToPath(config.url));
453
507
  } else {
454
- db = await createLibsqlDb(config);
508
+ const { createLibsqlDb: createLibsqlDb2 } = await Promise.resolve().then(() => (init_libsql_adapter(), exports_libsql_adapter));
509
+ db = await createLibsqlDb2(config);
455
510
  }
456
511
  if (migrate) {
457
512
  const { runMigrations: runMigrations2 } = await Promise.resolve().then(() => (init_migrator(), exports_migrator));
@@ -699,8 +754,10 @@ function getJsonSchema(name) {
699
754
  return jsonSchemas[name];
700
755
  }
701
756
  // src/services/board.ts
757
+ init_schema();
702
758
  import { eq } from "drizzle-orm";
703
759
  import { ulid } from "ulid";
760
+
704
761
  class BoardService {
705
762
  db;
706
763
  constructor(db) {
@@ -753,6 +810,8 @@ class BoardService {
753
810
  }
754
811
  }
755
812
  // src/services/task.ts
813
+ init_schema();
814
+ init_types();
756
815
  import { and, eq as eq2, inArray, lt, sql } from "drizzle-orm";
757
816
  import { ulid as ulid2 } from "ulid";
758
817
 
@@ -774,6 +833,7 @@ function jaccardSimilarity(text1, text2) {
774
833
 
775
834
  // src/validation.ts
776
835
  import { ZodError } from "zod";
836
+ init_types();
777
837
  function wrapZodError(fn, fieldName) {
778
838
  try {
779
839
  return fn();
@@ -1184,6 +1244,9 @@ class TaskService {
1184
1244
  };
1185
1245
  }
1186
1246
  }
1247
+
1248
+ // src/index.ts
1249
+ init_types();
1187
1250
  export {
1188
1251
  validateTitle,
1189
1252
  validateTaskId,
@@ -1,4 +1,4 @@
1
- import { type DB } from "../db/index.js";
1
+ import type { DB } from "../db/types.js";
2
2
  import type { Board, Column, Config } from "../types.js";
3
3
  export declare class BoardService {
4
4
  private db;
@@ -1 +1 @@
1
- {"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/services/board.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,KAAK,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEzD,qBAAa,YAAY;IACX,OAAO,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAEpB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IA+B/C,QAAQ,IAAI,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAKjC,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI/B,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAK7C,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAK3C,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAO9C"}
1
+ {"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/services/board.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEzD,qBAAa,YAAY;IACX,OAAO,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAEpB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IA+B/C,QAAQ,IAAI,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IAKjC,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI/B,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAK7C,iBAAiB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAK3C,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;CAO9C"}
@@ -1,4 +1,4 @@
1
- import { type DB } from "../db/index.js";
1
+ import type { DB } from "../db/types.js";
2
2
  import type { AddTaskInput as AddTaskInputSchema, ListTasksFilter as ListTasksFilterSchema, UpdateTaskInput as UpdateTaskInputSchema } from "../schemas.js";
3
3
  import type { Task } from "../types.js";
4
4
  import type { BoardService } from "./board.js";
@@ -1 +1 @@
1
- {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../src/services/task.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAS,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,eAAe,IAAI,qBAAqB,EACxC,eAAe,IAAI,qBAAqB,EACzC,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAC9C,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EA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oCnE,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA2G1F,YAAY,CAAC,QAAQ,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAuB1E,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAYvC,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BjE,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBpE,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC;IA8BzE,gBAAgB,CACpB,KAAK,EAAE,MAAM,EACb,SAAS,SAAM,GACd,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAa/C,cAAc,CAClB,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAC5B,OAAO,CAAC,oBAAoB,CAAC;IA8B1B,eAAe,IAAI,OAAO,CAAC;QAC/B,aAAa,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC;KAC/B,CAAC;CAmBH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaban-board/core",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "Core database and services for Kaban - Terminal Kanban for AI Agents",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -9,6 +9,10 @@
9
9
  ".": {
10
10
  "import": "./dist/index.js",
11
11
  "types": "./dist/index.d.ts"
12
+ },
13
+ "./bun": {
14
+ "import": "./dist/index-bun.js",
15
+ "types": "./dist/index-bun.d.ts"
12
16
  }
13
17
  },
14
18
  "files": [