@jamesaphoenix/tx-test-utils 0.4.3 → 0.5.0
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/chaos/chaos-utilities.d.ts.map +1 -1
- package/dist/chaos/chaos-utilities.js +2 -4
- package/dist/chaos/chaos-utilities.js.map +1 -1
- package/dist/chaos/chaos.test.js +4 -4
- package/dist/chaos/chaos.test.js.map +1 -1
- package/dist/database/test-database.d.ts +7 -7
- package/dist/database/test-database.d.ts.map +1 -1
- package/dist/database/test-database.js +41 -115
- package/dist/database/test-database.js.map +1 -1
- package/dist/factories/factories.test.d.ts +8 -0
- package/dist/factories/factories.test.d.ts.map +1 -0
- package/dist/factories/factories.test.js +419 -0
- package/dist/factories/factories.test.js.map +1 -0
- package/dist/factories/index.d.ts +3 -0
- package/dist/factories/index.d.ts.map +1 -1
- package/dist/factories/index.js +6 -0
- package/dist/factories/index.js.map +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/shared-test-layer.d.ts +7 -12
- package/dist/helpers/shared-test-layer.d.ts.map +1 -1
- package/dist/helpers/shared-test-layer.js +9 -6
- package/dist/helpers/shared-test-layer.js.map +1 -1
- package/dist/helpers/sqlite-factory.d.ts +6 -31
- package/dist/helpers/sqlite-factory.d.ts.map +1 -1
- package/dist/helpers/sqlite-factory.js +9 -47
- package/dist/helpers/sqlite-factory.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -2
|
@@ -1,49 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SQLite database factory for tests.
|
|
3
3
|
*
|
|
4
|
-
* Creates
|
|
5
|
-
*
|
|
6
|
-
* from "bun:sqlite".
|
|
7
|
-
*
|
|
8
|
-
* Uses the SqliteDatabase interface from @tx/core, which is what SqliteClient
|
|
9
|
-
* provides via Effect layers. This means databases created here can be used
|
|
10
|
-
* directly with Layer.succeed(SqliteClient, db) — no `as any` needed.
|
|
4
|
+
* Creates database instances for use in tests. Since we run tests with
|
|
5
|
+
* `bunx --bun vitest run`, bun:sqlite is always available.
|
|
11
6
|
*
|
|
12
7
|
* @module @tx/test-utils/helpers/sqlite-factory
|
|
13
8
|
*/
|
|
14
|
-
import type { SqliteDatabase } from "@jamesaphoenix/tx-core";
|
|
15
9
|
/**
|
|
16
|
-
* Create
|
|
17
|
-
*
|
|
18
|
-
* - Under Vitest: uses better-sqlite3, wrapped via the adapter
|
|
19
|
-
* - Under Bun test: uses bun:sqlite
|
|
20
|
-
*
|
|
21
|
-
* PRAGMAs (journal_mode, foreign_keys, busy_timeout) are set automatically.
|
|
10
|
+
* Create an in-memory SQLite database with PRAGMAs set.
|
|
22
11
|
* Migrations are NOT applied — call applyMigrations(db) yourself if needed.
|
|
23
12
|
*
|
|
24
13
|
* @param path - Database file path, or ":memory:" (default)
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```typescript
|
|
28
|
-
* import { createSqliteDatabase } from "@jamesaphoenix/tx-test-utils"
|
|
29
|
-
* import { applyMigrations, SqliteClient } from "@jamesaphoenix/tx-core"
|
|
30
|
-
* import { Layer } from "effect"
|
|
31
|
-
*
|
|
32
|
-
* // Raw database for migration tests
|
|
33
|
-
* const db = await createSqliteDatabase()
|
|
34
|
-
* applyMigrations(db)
|
|
35
|
-
*
|
|
36
|
-
* // Use with Effect layers
|
|
37
|
-
* const infra = Layer.succeed(SqliteClient, db)
|
|
38
|
-
* ```
|
|
39
14
|
*/
|
|
40
|
-
export declare const createSqliteDatabase: (path?: string) => Promise<
|
|
15
|
+
export declare const createSqliteDatabase: (path?: string) => Promise<import("bun:sqlite").Database>;
|
|
41
16
|
/**
|
|
42
|
-
* Create a
|
|
17
|
+
* Create a SQLite database with all migrations applied.
|
|
43
18
|
*
|
|
44
19
|
* Convenience wrapper around createSqliteDatabase + applyMigrations.
|
|
45
20
|
*
|
|
46
21
|
* @param path - Database file path, or ":memory:" (default)
|
|
47
22
|
*/
|
|
48
|
-
export declare const createMigratedSqliteDatabase: (path?: string) => Promise<
|
|
23
|
+
export declare const createMigratedSqliteDatabase: (path?: string) => Promise<import("bun:sqlite").Database>;
|
|
49
24
|
//# sourceMappingURL=sqlite-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-factory.d.ts","sourceRoot":"","sources":["../../src/helpers/sqlite-factory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sqlite-factory.d.ts","sourceRoot":"","sources":["../../src/helpers/sqlite-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAU,aAAiB,2CAS3D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,GAAU,aAAiB,2CAKnE,CAAA"}
|
|
@@ -1,65 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* SQLite database factory for tests.
|
|
3
3
|
*
|
|
4
|
-
* Creates
|
|
5
|
-
*
|
|
6
|
-
* from "bun:sqlite".
|
|
7
|
-
*
|
|
8
|
-
* Uses the SqliteDatabase interface from @tx/core, which is what SqliteClient
|
|
9
|
-
* provides via Effect layers. This means databases created here can be used
|
|
10
|
-
* directly with Layer.succeed(SqliteClient, db) — no `as any` needed.
|
|
4
|
+
* Creates database instances for use in tests. Since we run tests with
|
|
5
|
+
* `bunx --bun vitest run`, bun:sqlite is always available.
|
|
11
6
|
*
|
|
12
7
|
* @module @tx/test-utils/helpers/sqlite-factory
|
|
13
8
|
*/
|
|
14
9
|
/**
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
const isVitest = () => typeof process !== "undefined" && process.env.VITEST === "true";
|
|
18
|
-
/**
|
|
19
|
-
* Create a SqliteDatabase instance.
|
|
20
|
-
*
|
|
21
|
-
* - Under Vitest: uses better-sqlite3, wrapped via the adapter
|
|
22
|
-
* - Under Bun test: uses bun:sqlite
|
|
23
|
-
*
|
|
24
|
-
* PRAGMAs (journal_mode, foreign_keys, busy_timeout) are set automatically.
|
|
10
|
+
* Create an in-memory SQLite database with PRAGMAs set.
|
|
25
11
|
* Migrations are NOT applied — call applyMigrations(db) yourself if needed.
|
|
26
12
|
*
|
|
27
13
|
* @param path - Database file path, or ":memory:" (default)
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```typescript
|
|
31
|
-
* import { createSqliteDatabase } from "@jamesaphoenix/tx-test-utils"
|
|
32
|
-
* import { applyMigrations, SqliteClient } from "@jamesaphoenix/tx-core"
|
|
33
|
-
* import { Layer } from "effect"
|
|
34
|
-
*
|
|
35
|
-
* // Raw database for migration tests
|
|
36
|
-
* const db = await createSqliteDatabase()
|
|
37
|
-
* applyMigrations(db)
|
|
38
|
-
*
|
|
39
|
-
* // Use with Effect layers
|
|
40
|
-
* const infra = Layer.succeed(SqliteClient, db)
|
|
41
|
-
* ```
|
|
42
14
|
*/
|
|
43
15
|
export const createSqliteDatabase = async (path = ":memory:") => {
|
|
44
|
-
if (isVitest()) {
|
|
45
|
-
const { wrapBetterSqlite3 } = await import("../adapters/better-sqlite3-adapter.js");
|
|
46
|
-
const Database = (await import("better-sqlite3")).default;
|
|
47
|
-
const raw = new Database(path);
|
|
48
|
-
raw.pragma("journal_mode = WAL");
|
|
49
|
-
raw.pragma("foreign_keys = ON");
|
|
50
|
-
raw.pragma("busy_timeout = " + (process.env.TX_DB_BUSY_TIMEOUT || "5000"));
|
|
51
|
-
return wrapBetterSqlite3(raw);
|
|
52
|
-
}
|
|
53
|
-
// Bun test
|
|
54
16
|
const { Database } = await import("bun:sqlite");
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return
|
|
17
|
+
const db = new Database(path);
|
|
18
|
+
db.run("PRAGMA journal_mode = WAL");
|
|
19
|
+
db.run("PRAGMA foreign_keys = ON");
|
|
20
|
+
db.run("PRAGMA busy_timeout = " + (process.env.TX_DB_BUSY_TIMEOUT || "5000"));
|
|
21
|
+
return db;
|
|
60
22
|
};
|
|
61
23
|
/**
|
|
62
|
-
* Create a
|
|
24
|
+
* Create a SQLite database with all migrations applied.
|
|
63
25
|
*
|
|
64
26
|
* Convenience wrapper around createSqliteDatabase + applyMigrations.
|
|
65
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-factory.js","sourceRoot":"","sources":["../../src/helpers/sqlite-factory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sqlite-factory.js","sourceRoot":"","sources":["../../src/helpers/sqlite-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,IAAI,GAAG,UAAU,EAAE,EAAE;IAC9D,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAA;IAC/C,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAA;IAC7B,EAAE,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAA;IACnC,EAAE,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;IAClC,EAAE,CAAC,GAAG,CACJ,wBAAwB,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,MAAM,CAAC,CACtE,CAAA;IACD,OAAO,EAAE,CAAA;AACX,CAAC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,KAAK,EAAE,IAAI,GAAG,UAAU,EAAE,EAAE;IACtE,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAC3C,eAAe,CAAC,EAAE,CAAC,CAAA;IACnB,OAAO,EAAE,CAAA;AACX,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
export { fixtureId, namespacedFixtureId, sequentialFixtureIds, contentFixtureId } from "./fixtures/index.js";
|
|
19
19
|
export { createTestDatabase, TestDatabaseService, TestDatabaseLive, createTestDatabaseLayer, wrapDbAsTestDatabase } from "./database/index.js";
|
|
20
20
|
export type { TestDatabase } from "./database/index.js";
|
|
21
|
-
export { TaskFactory, createTestTask, createTestTasks, type CreateTaskOptions, LearningFactory, createTestLearning, createTestLearnings, type CreateLearningOptions, } from "./factories/index.js";
|
|
21
|
+
export { TaskFactory, createTestTask, createTestTasks, type CreateTaskOptions, LearningFactory, createTestLearning, createTestLearnings, type CreateLearningOptions, EdgeFactory, createTestEdge, createEdgeBetweenLearnings, type CreateEdgeOptions, AnchorFactory, createTestAnchor, type CreateAnchorOptions, CandidateFactory, createTestCandidate, type CreateCandidateOptions, type LearningCandidate, type CandidateConfidence, type CandidateStatus } from "./factories/index.js";
|
|
22
22
|
export { hashInput, cachedLLMCall, withLLMCache, configureLLMCache, getCacheConfig, resetCacheConfig, getCacheStats, clearCache, formatCacheStats, getCacheEntry, listCacheEntries } from "./llm-cache/index.js";
|
|
23
23
|
export type { CacheEntry, CachedLLMCallOptions, WithLLMCacheOptions, CacheStats, ClearCacheOptions } from "./llm-cache/index.js";
|
|
24
24
|
export { runEffect, runEffectFail, runEffectEither, expectEffectSuccess, expectEffectFailure, mergeLayers, createTestContext, type RunEffectOptions, type EffectResult } from "./helpers/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGvD,OAAO,EAEL,WAAW,EACX,cAAc,EACd,eAAe,EACf,KAAK,iBAAiB,EAEtB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGvD,OAAO,EAEL,WAAW,EACX,cAAc,EACd,eAAe,EACf,KAAK,iBAAiB,EAEtB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,qBAAqB,EAE1B,WAAW,EACX,cAAc,EACd,0BAA0B,EAC1B,KAAK,iBAAiB,EAEtB,aAAa,EACb,gBAAgB,EAChB,KAAK,mBAAmB,EAExB,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACrB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAEL,SAAS,EACT,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAEhB,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EACV,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EAClB,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC3B,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,mBAAmB,EACpB,MAAM,gBAAgB,CAAA;AAOvB,OAAO,EACL,mBAAmB,EACnB,gCAAgC,EAChC,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,gBAAgB,EAChB,6BAA6B,EAC7B,gCAAgC,EAChC,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAA;AASzB,OAAO,EAEL,KAAK,EAEL,UAAU,EACV,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAErB,aAAa,EACb,yBAAyB,EACzB,KAAK,oBAAoB,EAEzB,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EAEtB,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,cAAc,EAEnB,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAElB,cAAc,EACd,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAEzB,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAEvB,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EAEvB,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,13 @@ export {
|
|
|
24
24
|
// Task
|
|
25
25
|
TaskFactory, createTestTask, createTestTasks,
|
|
26
26
|
// Learning
|
|
27
|
-
LearningFactory, createTestLearning, createTestLearnings,
|
|
27
|
+
LearningFactory, createTestLearning, createTestLearnings,
|
|
28
|
+
// Edge
|
|
29
|
+
EdgeFactory, createTestEdge, createEdgeBetweenLearnings,
|
|
30
|
+
// Anchor
|
|
31
|
+
AnchorFactory, createTestAnchor,
|
|
32
|
+
// Candidate
|
|
33
|
+
CandidateFactory, createTestCandidate } from "./factories/index.js";
|
|
28
34
|
// LLM Cache - SHA256-based response caching
|
|
29
35
|
export {
|
|
30
36
|
// Core functions
|
|
@@ -35,7 +41,7 @@ getCacheStats, clearCache, formatCacheStats, getCacheEntry, listCacheEntries } f
|
|
|
35
41
|
export { runEffect, runEffectFail, runEffectEither, expectEffectSuccess, expectEffectFailure, mergeLayers, createTestContext } from "./helpers/index.js";
|
|
36
42
|
// Shared Test Layer - memory-efficient integration testing
|
|
37
43
|
export { createSharedTestLayer } from "./helpers/index.js";
|
|
38
|
-
// SQLite database factory
|
|
44
|
+
// SQLite database factory for tests
|
|
39
45
|
export { createSqliteDatabase, createMigratedSqliteDatabase } from "./helpers/index.js";
|
|
40
46
|
// Singleton Test Database - ONE DB for entire test suite
|
|
41
47
|
export { getSharedTestLayer, resetTestDb, closeTestDb, isTestDbInitialized } from "./singleton.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4CAA4C;AAC5C,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAE5B,mBAAmB;AACnB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAG5B,YAAY;AACZ,OAAO;AACL,OAAO;AACP,WAAW,EACX,cAAc,EACd,eAAe;AAEf,WAAW;AACX,eAAe,EACf,kBAAkB,EAClB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4CAA4C;AAC5C,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAE5B,mBAAmB;AACnB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAG5B,YAAY;AACZ,OAAO;AACL,OAAO;AACP,WAAW,EACX,cAAc,EACd,eAAe;AAEf,WAAW;AACX,eAAe,EACf,kBAAkB,EAClB,mBAAmB;AAEnB,OAAO;AACP,WAAW,EACX,cAAc,EACd,0BAA0B;AAE1B,SAAS;AACT,aAAa,EACb,gBAAgB;AAEhB,YAAY;AACZ,gBAAgB,EAChB,mBAAmB,EAKpB,MAAM,sBAAsB,CAAA;AAE7B,4CAA4C;AAC5C,OAAO;AACL,iBAAiB;AACjB,SAAS,EACT,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB;AAChB,gBAAgB;AAChB,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EACjB,MAAM,sBAAsB,CAAA;AAS7B,iBAAiB;AACjB,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EAGlB,MAAM,oBAAoB,CAAA;AAE3B,2DAA2D;AAC3D,OAAO,EACL,qBAAqB,EAGtB,MAAM,oBAAoB,CAAA;AAE3B,oCAAoC;AACpC,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,oBAAoB,CAAA;AAE3B,yDAAyD;AACzD,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,mBAAmB,EACpB,MAAM,gBAAgB,CAAA;AAEvB,iCAAiC;AACjC,qGAAqG;AACrG,oDAAoD;AAEpD,QAAQ;AACR,OAAO,EACL,mBAAmB,EACnB,gCAAgC,EAMhC,gBAAgB,EAChB,6BAA6B,EAC7B,gCAAgC,EAMjC,MAAM,kBAAkB,CAAA;AACzB,gDAAgD;AAChD,wDAAwD;AACxD,oDAAoD;AAEpD,4BAA4B;AAC5B,4DAA4D;AAE5D,8BAA8B;AAC9B,OAAO;AACL,mBAAmB;AACnB,KAAK;AACL,6BAA6B;AAC7B,UAAU,EACV,oBAAoB;AAGpB,gCAAgC;AAChC,aAAa,EACb,yBAAyB;AAEzB,yBAAyB;AACzB,WAAW;AAGX,mBAAmB;AACnB,YAAY;AAGZ,eAAe;AACf,WAAW;AAIX,4BAA4B;AAC5B,cAAc;AAGd,2BAA2B;AAC3B,YAAY;AAGZ,wBAAwB;AACxB,YAAY;AAGZ,iBAAiB;AACjB,UAAU,EAGX,MAAM,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,44 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jamesaphoenix/tx-test-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Test utilities, factories, fixtures, and helpers for tx monorepo",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
+
"bun": "./src/index.ts",
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
11
12
|
"import": "./dist/index.js"
|
|
12
13
|
},
|
|
13
14
|
"./database": {
|
|
15
|
+
"bun": "./src/database/index.ts",
|
|
14
16
|
"types": "./dist/database/index.d.ts",
|
|
15
17
|
"import": "./dist/database/index.js"
|
|
16
18
|
},
|
|
17
19
|
"./factories": {
|
|
20
|
+
"bun": "./src/factories/index.ts",
|
|
18
21
|
"types": "./dist/factories/index.d.ts",
|
|
19
22
|
"import": "./dist/factories/index.js"
|
|
20
23
|
},
|
|
21
24
|
"./fixtures": {
|
|
25
|
+
"bun": "./src/fixtures/index.ts",
|
|
22
26
|
"types": "./dist/fixtures/index.d.ts",
|
|
23
27
|
"import": "./dist/fixtures/index.js"
|
|
24
28
|
},
|
|
25
29
|
"./llm-cache": {
|
|
30
|
+
"bun": "./src/llm-cache/index.ts",
|
|
26
31
|
"types": "./dist/llm-cache/index.d.ts",
|
|
27
32
|
"import": "./dist/llm-cache/index.js"
|
|
28
33
|
},
|
|
29
34
|
"./mocks": {
|
|
35
|
+
"bun": "./src/mocks/index.ts",
|
|
30
36
|
"types": "./dist/mocks/index.d.ts",
|
|
31
37
|
"import": "./dist/mocks/index.js"
|
|
32
38
|
},
|
|
33
39
|
"./helpers": {
|
|
40
|
+
"bun": "./src/helpers/index.ts",
|
|
34
41
|
"types": "./dist/helpers/index.d.ts",
|
|
35
42
|
"import": "./dist/helpers/index.js"
|
|
36
43
|
},
|
|
37
44
|
"./setup": {
|
|
45
|
+
"bun": "./src/setup/index.ts",
|
|
38
46
|
"types": "./dist/setup/index.d.ts",
|
|
39
47
|
"import": "./dist/setup/index.js"
|
|
40
48
|
},
|
|
41
49
|
"./chaos": {
|
|
50
|
+
"bun": "./src/chaos/index.ts",
|
|
42
51
|
"types": "./dist/chaos/index.d.ts",
|
|
43
52
|
"import": "./dist/chaos/index.js"
|
|
44
53
|
}
|
|
@@ -51,7 +60,7 @@
|
|
|
51
60
|
"build": "tsc -b",
|
|
52
61
|
"typecheck": "tsc --noEmit",
|
|
53
62
|
"lint": "eslint src/",
|
|
54
|
-
"test": "bun
|
|
63
|
+
"test": "bunx --bun vitest run"
|
|
55
64
|
},
|
|
56
65
|
"dependencies": {
|
|
57
66
|
"@jamesaphoenix/tx-core": "*",
|