@entifix/testing-unit 0.10.2 → 0.12.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.
Files changed (65) hide show
  1. package/dist/contracts/breaker.contract.d.ts +25 -0
  2. package/dist/contracts/breaker.contract.d.ts.map +1 -0
  3. package/dist/contracts/breaker.contract.js +159 -0
  4. package/dist/contracts/breaker.contract.js.map +1 -0
  5. package/dist/contracts/flow-engine.contract.d.ts +16 -0
  6. package/dist/contracts/flow-engine.contract.d.ts.map +1 -0
  7. package/dist/contracts/flow-engine.contract.js +199 -0
  8. package/dist/contracts/flow-engine.contract.js.map +1 -0
  9. package/dist/contracts/idempotency-store.contract.d.ts +17 -0
  10. package/dist/contracts/idempotency-store.contract.d.ts.map +1 -0
  11. package/dist/contracts/idempotency-store.contract.js +94 -0
  12. package/dist/contracts/idempotency-store.contract.js.map +1 -0
  13. package/dist/contracts/index.d.ts +5 -0
  14. package/dist/contracts/index.d.ts.map +1 -1
  15. package/dist/contracts/index.js +5 -0
  16. package/dist/contracts/index.js.map +1 -1
  17. package/dist/contracts/outbox.contract.d.ts +18 -0
  18. package/dist/contracts/outbox.contract.d.ts.map +1 -0
  19. package/dist/contracts/outbox.contract.js +117 -0
  20. package/dist/contracts/outbox.contract.js.map +1 -0
  21. package/dist/contracts/transaction-ports.contract.d.ts +1 -1
  22. package/dist/contracts/transaction-ports.contract.d.ts.map +1 -1
  23. package/dist/contracts/transaction-ports.contract.js +10 -1
  24. package/dist/contracts/transaction-ports.contract.js.map +1 -1
  25. package/dist/contracts/unit-of-work.contract.d.ts.map +1 -1
  26. package/dist/contracts/unit-of-work.contract.js +5 -0
  27. package/dist/contracts/unit-of-work.contract.js.map +1 -1
  28. package/dist/contracts/variants.contract.d.ts +15 -0
  29. package/dist/contracts/variants.contract.d.ts.map +1 -0
  30. package/dist/contracts/variants.contract.js +39 -0
  31. package/dist/contracts/variants.contract.js.map +1 -0
  32. package/dist/doubles/entity-repository.d.ts +3 -3
  33. package/dist/doubles/entity-repository.d.ts.map +1 -1
  34. package/dist/doubles/entity-repository.js +2 -4
  35. package/dist/doubles/entity-repository.js.map +1 -1
  36. package/dist/doubles/flow-engine.d.ts +22 -0
  37. package/dist/doubles/flow-engine.d.ts.map +1 -0
  38. package/dist/doubles/flow-engine.js +148 -0
  39. package/dist/doubles/flow-engine.js.map +1 -0
  40. package/dist/doubles/idempotency-store.d.ts +12 -0
  41. package/dist/doubles/idempotency-store.d.ts.map +1 -0
  42. package/dist/doubles/idempotency-store.js +40 -0
  43. package/dist/doubles/idempotency-store.js.map +1 -0
  44. package/dist/doubles/link-resolver.d.ts.map +1 -1
  45. package/dist/doubles/link-resolver.js +3 -4
  46. package/dist/doubles/link-resolver.js.map +1 -1
  47. package/dist/doubles/outbox.d.ts +15 -0
  48. package/dist/doubles/outbox.d.ts.map +1 -0
  49. package/dist/doubles/outbox.js +70 -0
  50. package/dist/doubles/outbox.js.map +1 -0
  51. package/dist/doubles/unit-of-work.d.ts +2 -3
  52. package/dist/doubles/unit-of-work.d.ts.map +1 -1
  53. package/dist/doubles/unit-of-work.js.map +1 -1
  54. package/dist/drivers/fake-amqp.d.ts +2 -0
  55. package/dist/drivers/fake-amqp.d.ts.map +1 -1
  56. package/dist/drivers/fake-amqp.js +8 -0
  57. package/dist/drivers/fake-amqp.js.map +1 -1
  58. package/dist/drivers/fake-sql.d.ts.map +1 -1
  59. package/dist/drivers/fake-sql.js +16 -1
  60. package/dist/drivers/fake-sql.js.map +1 -1
  61. package/dist/index.d.ts +3 -0
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +3 -0
  64. package/dist/index.js.map +1 -1
  65. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/drivers/fake-sql.ts"],"sourcesContent":["/**\n * A fake of the `@effect/sql` driver, not of the repository port.\n *\n * It sits one level *below* `makeSqlRepository`, so the adapter's own code — the\n * filter translation, the clause assembly, the upsert rule, the error mapping —\n * actually runs and is measured by coverage. A fake at the port level would skip\n * all of it. Same reasoning as {@link makeFakeMongoDb}.\n *\n * What it does **not** do is execute SQL: it hands back canned rows and records\n * the statement each call compiled to, so a spec asserts on the SQL and\n * parameters the adapter produced. Running the shared\n * `describeEntityRepositoryContract` needs a real engine and belongs against real\n * Postgres, the way the driver connection Layers are covered.\n */\n\nimport { Effect } from 'effect';\nimport { SqlError } from 'effect/sql';\nimport { Statement } from 'effect/sql';\n\n/** One statement the adapter executed, already compiled. */\nexport interface FakeSqlExecution {\n /** The compiled SQL text, parameters replaced by `$1`, `$2`, … */\n readonly sql: string;\n readonly params: ReadonlyArray<unknown>;\n}\n\n/** Rows to answer with when a statement's SQL contains `match`. */\nexport interface FakeSqlResponse {\n readonly match: string;\n readonly rows: ReadonlyArray<Record<string, unknown>>;\n}\n\nexport interface FakeSqlClient {\n /**\n * Answers `rows` for any statement whose compiled SQL contains `match`. Later\n * registrations win, so a spec can override a default set up by a helper.\n */\n respondTo(match: string, rows: ReadonlyArray<Record<string, unknown>>): void;\n /**\n * Makes every subsequent execution fail, so the adapter's `EntifixConnError`\n * mapping is reachable.\n */\n failWith(message: string): void;\n /**\n * Makes only the statements containing `match` fail, leaving the rest working\n * — the way a select that succeeds and a count that then fails reaches a\n * distinct error branch.\n */\n failOn(match: string, message: string): void;\n /** Every statement executed, in order, for assertions about what ran. */\n readonly executions: ReadonlyArray<FakeSqlExecution>;\n /** The most recently executed statement. */\n readonly lastExecution: FakeSqlExecution | undefined;\n /**\n * The object to hand to `makeSqlRepository` in place of a real `SqlClient`.\n *\n * Typed `unknown` on purpose — casting at the call site keeps this fake honest\n * that it implements only the constructor surface the adapters use, not the\n * whole `SqlClient` (no transactions, no reactivity, no streaming).\n */\n readonly client: unknown;\n}\n\nconst unsupported = (name: string): never => {\n throw new TypeError(`fake sql: ${name} is not implemented`);\n};\n\n/**\n * The Postgres compiler's configuration, mirrored from `@effect/sql-pg` so the\n * fake emits exactly the dialect production does — `$n` placeholders and\n * double-quoted identifiers — without this package depending on the `pg` driver.\n *\n * `sql.updateValues` and the `PgJson` custom segment are deliberate `TypeError`s\n * rather than approximations: no adapter uses either, and a compiler that\n * half-emitted them would let a spec pass on SQL that real Postgres rejects.\n */\nconst pgCompiler = Statement.makeCompiler({\n dialect: 'pg',\n placeholder: index => `$${index}`,\n onIdentifier: Statement.defaultEscape('\"'),\n onRecordUpdate: () => unsupported('updateValues'),\n onCustom: () => unsupported('custom segments'),\n});\n\n/** Builds an in-memory stand-in for an `@effect/sql` client. */\nexport const makeFakeSqlClient = (\n seed: ReadonlyArray<FakeSqlResponse> = [],\n): FakeSqlClient => {\n const responses: FakeSqlResponse[] = [...seed];\n const executions: FakeSqlExecution[] = [];\n const failuresByMatch: Array<{ match: string; message: string }> = [];\n let failure: string | undefined;\n\n const answer = (sql: string) => {\n // Last registration wins, so an override does not have to remove the\n // default it replaces.\n for (let index = responses.length - 1; index >= 0; index -= 1) {\n const response = responses[index];\n if (response !== undefined && sql.includes(response.match)) {\n return response.rows;\n }\n }\n return [];\n };\n\n const execute = (sql: string, params: ReadonlyArray<unknown>) => {\n executions.push({ sql, params });\n\n const scoped = failuresByMatch.find(entry => sql.includes(entry.match));\n const message = scoped?.message ?? failure;\n if (message !== undefined) {\n return Effect.fail(\n new SqlError.SqlError({\n reason: new SqlError.UnknownError({\n cause: new Error(message),\n message,\n }),\n }),\n );\n }\n return Effect.succeed(answer(sql));\n };\n\n const connection = {\n execute: (sql: string, params: ReadonlyArray<unknown>) =>\n execute(sql, params),\n executeUnprepared: (sql: string, params: ReadonlyArray<unknown>) =>\n execute(sql, params),\n executeRaw: (sql: string, params: ReadonlyArray<unknown>) =>\n execute(sql, params),\n executeValues: () => unsupported('executeValues'),\n executeStream: () => unsupported('executeStream'),\n };\n\n return {\n respondTo: (match, rows) => {\n responses.push({ match, rows });\n },\n failWith: message => {\n failure = message;\n },\n failOn: (match, message) => {\n failuresByMatch.push({ match, message });\n },\n get executions() {\n return executions;\n },\n get lastExecution() {\n return executions[executions.length - 1];\n },\n client: Statement.make(\n Effect.succeed(connection) as never,\n pgCompiler,\n [],\n undefined,\n ),\n };\n};\n"],"names":["Effect","SqlError","Statement","unsupported","name","TypeError","pgCompiler","makeCompiler","dialect","placeholder","index","onIdentifier","defaultEscape","onRecordUpdate","onCustom","makeFakeSqlClient","seed","responses","executions","failuresByMatch","failure","answer","sql","length","response","undefined","includes","match","rows","execute","params","push","scoped","find","entry","message","fail","reason","UnknownError","cause","Error","succeed","connection","executeUnprepared","executeRaw","executeValues","executeStream","respondTo","failWith","failOn","lastExecution","client","make"],"mappings":"AAAA;;;;;;;;;;;;;CAaC,GAED,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,SAAS,QAAQ,aAAa;AA8CvC,MAAMC,cAAc,CAACC;IACnB,MAAM,IAAIC,UAAU,CAAC,UAAU,EAAED,KAAK,mBAAmB,CAAC;AAC5D;AAEA;;;;;;;;CAQC,GACD,MAAME,aAAaJ,UAAUK,YAAY,CAAC;IACxCC,SAAS;IACTC,aAAaC,CAAAA,QAAS,CAAC,CAAC,EAAEA,OAAO;IACjCC,cAAcT,UAAUU,aAAa,CAAC;IACtCC,gBAAgB,IAAMV,YAAY;IAClCW,UAAU,IAAMX,YAAY;AAC9B;AAEA,8DAA8D,GAC9D,OAAO,MAAMY,oBAAoB,CAC/BC,OAAuC,EAAE;IAEzC,MAAMC,YAA+B;WAAID;KAAK;IAC9C,MAAME,aAAiC,EAAE;IACzC,MAAMC,kBAA6D,EAAE;IACrE,IAAIC;IAEJ,MAAMC,SAAS,CAACC;QACd,qEAAqE;QACrE,uBAAuB;QACvB,IAAK,IAAIZ,QAAQO,UAAUM,MAAM,GAAG,GAAGb,SAAS,GAAGA,SAAS,EAAG;YAC7D,MAAMc,WAAWP,SAAS,CAACP,MAAM;YACjC,IAAIc,aAAaC,aAAaH,IAAII,QAAQ,CAACF,SAASG,KAAK,GAAG;gBAC1D,OAAOH,S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* A fake of the `@effect/sql` driver, not of the repository port.\n *\n * It sits one level *below* `makeSqlRepository`, so the adapter's own code — the\n * filter translation, the clause assembly, the upsert rule, the error mapping —\n * actually runs and is measured by coverage. A fake at the port level would skip\n * all of it. Same reasoning as {@link makeFakeMongoDb}.\n *\n * What it does **not** do is execute SQL: it hands back canned rows and records\n * the statement each call compiled to, so a spec asserts on the SQL and\n * parameters the adapter produced. Running the shared\n * `describeEntityRepositoryContract` needs a real engine and belongs against real\n * Postgres, the way the driver connection Layers are covered.\n */\n\nimport { Effect } from 'effect';\nimport { SqlError } from 'effect/sql';\nimport { Statement } from 'effect/sql';\n\n/** One statement the adapter executed, already compiled. */\nexport interface FakeSqlExecution {\n /** The compiled SQL text, parameters replaced by `$1`, `$2`, … */\n readonly sql: string;\n readonly params: ReadonlyArray<unknown>;\n}\n\n/** Rows to answer with when a statement's SQL contains `match`. */\nexport interface FakeSqlResponse {\n readonly match: string;\n readonly rows: ReadonlyArray<Record<string, unknown>>;\n}\n\nexport interface FakeSqlClient {\n /**\n * Answers `rows` for any statement whose compiled SQL contains `match`. Later\n * registrations win, so a spec can override a default set up by a helper.\n */\n respondTo(match: string, rows: ReadonlyArray<Record<string, unknown>>): void;\n /**\n * Makes every subsequent execution fail, so the adapter's `EntifixConnError`\n * mapping is reachable.\n */\n failWith(message: string): void;\n /**\n * Makes only the statements containing `match` fail, leaving the rest working\n * — the way a select that succeeds and a count that then fails reaches a\n * distinct error branch.\n */\n failOn(match: string, message: string): void;\n /** Every statement executed, in order, for assertions about what ran. */\n readonly executions: ReadonlyArray<FakeSqlExecution>;\n /** The most recently executed statement. */\n readonly lastExecution: FakeSqlExecution | undefined;\n /**\n * The object to hand to `makeSqlRepository` in place of a real `SqlClient`.\n *\n * Typed `unknown` on purpose — casting at the call site keeps this fake honest\n * that it implements only the constructor surface the adapters use, not the\n * whole `SqlClient` (no transactions, no reactivity, no streaming).\n */\n readonly client: unknown;\n}\n\nconst unsupported = (name: string): never => {\n throw new TypeError(`fake sql: ${name} is not implemented`);\n};\n\n/**\n * The Postgres compiler's configuration, mirrored from `@effect/sql-pg` so the\n * fake emits exactly the dialect production does — `$n` placeholders and\n * double-quoted identifiers — without this package depending on the `pg` driver.\n *\n * `sql.updateValues` and the `PgJson` custom segment are deliberate `TypeError`s\n * rather than approximations: no adapter uses either, and a compiler that\n * half-emitted them would let a spec pass on SQL that real Postgres rejects.\n */\nconst pgCompiler = Statement.makeCompiler({\n dialect: 'pg',\n placeholder: index => `$${index}`,\n onIdentifier: Statement.defaultEscape('\"'),\n onRecordUpdate: () => unsupported('updateValues'),\n onCustom: () => unsupported('custom segments'),\n});\n\n/** Builds an in-memory stand-in for an `@effect/sql` client. */\nexport const makeFakeSqlClient = (\n seed: ReadonlyArray<FakeSqlResponse> = [],\n): FakeSqlClient => {\n const responses: FakeSqlResponse[] = [...seed];\n const executions: FakeSqlExecution[] = [];\n const failuresByMatch: Array<{ match: string; message: string }> = [];\n let failure: string | undefined;\n\n const answer = (sql: string) => {\n // Last registration wins, so an override does not have to remove the\n // default it replaces.\n for (let index = responses.length - 1; index >= 0; index -= 1) {\n const response = responses[index];\n if (response !== undefined && sql.includes(response.match)) {\n return response.rows;\n }\n }\n return [];\n };\n\n const execute = (sql: string, params: ReadonlyArray<unknown>) => {\n executions.push({ sql, params });\n\n const scoped = failuresByMatch.find(entry => sql.includes(entry.match));\n const message = scoped?.message ?? failure;\n if (message !== undefined) {\n return Effect.fail(\n new SqlError.SqlError({\n reason: new SqlError.UnknownError({\n cause: new Error(message),\n message,\n }),\n }),\n );\n }\n return Effect.succeed(answer(sql));\n };\n\n const connection = {\n execute: (sql: string, params: ReadonlyArray<unknown>) =>\n execute(sql, params),\n executeUnprepared: (sql: string, params: ReadonlyArray<unknown>) =>\n execute(sql, params),\n executeRaw: (sql: string, params: ReadonlyArray<unknown>) =>\n execute(sql, params),\n executeValues: () => unsupported('executeValues'),\n executeStream: () => unsupported('executeStream'),\n };\n\n return {\n respondTo: (match, rows) => {\n responses.push({ match, rows });\n },\n failWith: message => {\n failure = message;\n },\n failOn: (match, message) => {\n failuresByMatch.push({ match, message });\n },\n get executions() {\n return executions;\n },\n get lastExecution() {\n return executions[executions.length - 1];\n },\n client: Object.assign(\n Statement.make(\n Effect.succeed(connection) as never,\n pgCompiler,\n [],\n undefined,\n ),\n {\n /**\n * Runs `self` between a recorded `BEGIN` and `COMMIT`, or `ROLLBACK`\n * when it fails — enough for a spec to assert what a unit of work\n * committed and what it rolled back, though nothing is isolated.\n */\n withTransaction: <A, E, R>(self: Effect.Effect<A, E, R>) =>\n Effect.sync(() => executions.push({ sql: 'BEGIN', params: [] })).pipe(\n Effect.andThen(self),\n Effect.tapError(() =>\n Effect.sync(() =>\n executions.push({ sql: 'ROLLBACK', params: [] }),\n ),\n ),\n Effect.tap(() =>\n Effect.sync(() => executions.push({ sql: 'COMMIT', params: [] })),\n ),\n ),\n },\n ),\n };\n};\n"],"names":["Effect","SqlError","Statement","unsupported","name","TypeError","pgCompiler","makeCompiler","dialect","placeholder","index","onIdentifier","defaultEscape","onRecordUpdate","onCustom","makeFakeSqlClient","seed","responses","executions","failuresByMatch","failure","answer","sql","length","response","undefined","includes","match","rows","execute","params","push","scoped","find","entry","message","fail","reason","UnknownError","cause","Error","succeed","connection","executeUnprepared","executeRaw","executeValues","executeStream","respondTo","failWith","failOn","lastExecution","client","Object","assign","make","withTransaction","self","sync","pipe","andThen","tapError","tap"],"mappings":"AAAA;;;;;;;;;;;;;CAaC,GAED,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,SAAS,QAAQ,aAAa;AA8CvC,MAAMC,cAAc,CAACC;IACnB,MAAM,IAAIC,UAAU,CAAC,UAAU,EAAED,KAAK,mBAAmB,CAAC;AAC5D;AAEA;;;;;;;;CAQC,GACD,MAAME,aAAaJ,UAAUK,YAAY,CAAC;IACxCC,SAAS;IACTC,aAAaC,CAAAA,QAAS,CAAC,CAAC,EAAEA,OA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C2C,eAAe,IAAM3C,YAAY;IACnC;IAEA,OAAO;QACL4C,WAAW,CAACpB,OAAOC;YACjBX,UAAUc,IAAI,CAAC;gBAAEJ;gBAAOC;YAAK;QAC/B;QACAoB,UAAUb,CAAAA;YACRf,UAAUe;QACZ;QACAc,QAAQ,CAACtB,OAAOQ;YACdhB,gBAAgBY,IAAI,CAAC;gBAAEJ;gBAAOQ;YAAQ;QACxC;QACA,IAAIjB;YACF,OAAOA;QACT;QACA,IAAIgC;YACF,OAAOhC,UAAU,CAACA,WAAWK,MAAM,GAAG,EAAE;QAC1C;QACA4B,QAAQC,OAAOC,MAAM,CACnBnD,UAAUoD,IAAI,CACZtD,OAAOyC,OAAO,CAACC,aACfpC,YACA,EAAE,EACFmB,YAEF;YACE;;;;SAIC,GACD8B,iBAAiB,CAAUC,OACzBxD,OAAOyD,IAAI,CAAC,IAAMvC,WAAWa,IAAI,CAAC;wBAAET,KAAK;wBAASQ,QAAQ,EAAE;oBAAC,IAAI4B,IAAI,CACnE1D,OAAO2D,OAAO,CAACH,OACfxD,OAAO4D,QAAQ,CAAC,IACd5D,OAAOyD,IAAI,CAAC,IACVvC,WAAWa,IAAI,CAAC;4BAAET,KAAK;4BAAYQ,QAAQ,EAAE;wBAAC,MAGlD9B,OAAO6D,GAAG,CAAC,IACT7D,OAAOyD,IAAI,CAAC,IAAMvC,WAAWa,IAAI,CAAC;4BAAET,KAAK;4BAAUQ,QAAQ,EAAE;wBAAC;QAGtE;IAEJ;AACF,EAAE"}
package/dist/index.d.ts CHANGED
@@ -2,7 +2,10 @@ export * from './builders/entity-builder.js';
2
2
  export * from './doubles/configuration.js';
3
3
  export * from './doubles/entity-facet-counter.js';
4
4
  export * from './doubles/entity-repository.js';
5
+ export * from './doubles/flow-engine.js';
6
+ export * from './doubles/idempotency-store.js';
5
7
  export * from './doubles/link-resolver.js';
8
+ export * from './doubles/outbox.js';
6
9
  export * from './doubles/transaction-ports.js';
7
10
  export * from './doubles/unit-of-work.js';
8
11
  export * from './effect/run.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -2,7 +2,10 @@ export * from './builders/entity-builder.js';
2
2
  export * from './doubles/configuration.js';
3
3
  export * from './doubles/entity-facet-counter.js';
4
4
  export * from './doubles/entity-repository.js';
5
+ export * from './doubles/flow-engine.js';
6
+ export * from './doubles/idempotency-store.js';
5
7
  export * from './doubles/link-resolver.js';
8
+ export * from './doubles/outbox.js';
6
9
  export * from './doubles/transaction-ports.js';
7
10
  export * from './doubles/unit-of-work.js';
8
11
  export * from './effect/run.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './builders/entity-builder.js';\nexport * from './doubles/configuration.js';\nexport * from './doubles/entity-facet-counter.js';\nexport * from './doubles/entity-repository.js';\nexport * from './doubles/link-resolver.js';\nexport * from './doubles/transaction-ports.js';\nexport * from './doubles/unit-of-work.js';\nexport * from './effect/run.js';\n"],"names":[],"mappings":"AAAA,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,oCAAoC;AAClD,cAAc,iCAAiC;AAC/C,cAAc,6BAA6B;AAC3C,cAAc,iCAAiC;AAC/C,cAAc,4BAA4B;AAC1C,cAAc,kBAAkB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './builders/entity-builder.js';\nexport * from './doubles/configuration.js';\nexport * from './doubles/entity-facet-counter.js';\nexport * from './doubles/entity-repository.js';\nexport * from './doubles/flow-engine.js';\nexport * from './doubles/idempotency-store.js';\nexport * from './doubles/link-resolver.js';\nexport * from './doubles/outbox.js';\nexport * from './doubles/transaction-ports.js';\nexport * from './doubles/unit-of-work.js';\nexport * from './effect/run.js';\n"],"names":[],"mappings":"AAAA,cAAc,+BAA+B;AAC7C,cAAc,6BAA6B;AAC3C,cAAc,oCAAoC;AAClD,cAAc,iCAAiC;AAC/C,cAAc,2BAA2B;AACzC,cAAc,iCAAiC;AAC/C,cAAc,6BAA6B;AAC3C,cAAc,sBAAsB;AACpC,cAAc,iCAAiC;AAC/C,cAAc,4BAA4B;AAC1C,cAAc,kBAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entifix/testing-unit",
3
- "version": "0.10.2",
3
+ "version": "0.12.0",
4
4
  "description": "Test doubles for entifix: in-memory ports, driver fakes for Mongo, Redis, RabbitMQ and SQL, MSW handlers and port contract suites.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -72,9 +72,9 @@
72
72
  },
73
73
  "dependencies": {
74
74
  "@swc/helpers": "0.5.23",
75
- "@entifix/business": "0.10.2",
76
- "@entifix/transactions": "0.10.2",
77
- "@entifix/core": "0.10.2"
75
+ "@entifix/core": "0.12.0",
76
+ "@entifix/transactions": "0.12.0",
77
+ "@entifix/business": "0.12.0"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@testing-library/react": "*",
@@ -82,7 +82,7 @@
82
82
  "msw": ">=3",
83
83
  "react": "*",
84
84
  "vitest": "*",
85
- "@entifix/react-controls": "0.10.2"
85
+ "@entifix/react-controls": "0.12.0"
86
86
  },
87
87
  "peerDependenciesMeta": {
88
88
  "@entifix/react-controls": {