@effect-app/infra 0.20.0 → 0.20.2

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 (70) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/_cjs/api/codec.cjs +4 -5
  3. package/_cjs/api/codec.cjs.map +1 -1
  4. package/_cjs/api/express/schema/requestHandler.cjs +27 -27
  5. package/_cjs/api/express/schema/requestHandler.cjs.map +1 -1
  6. package/_cjs/api/express/schema/routing.cjs +7 -8
  7. package/_cjs/api/express/schema/routing.cjs.map +1 -1
  8. package/_cjs/api/routing.cjs +28 -28
  9. package/_cjs/api/routing.cjs.map +1 -1
  10. package/_cjs/errorReporter.cjs +1 -2
  11. package/_cjs/errorReporter.cjs.map +1 -1
  12. package/_cjs/services/Emailer/Sendgrid.cjs +6 -7
  13. package/_cjs/services/Emailer/Sendgrid.cjs.map +1 -1
  14. package/_cjs/services/Operations/live.cjs +25 -25
  15. package/_cjs/services/Operations/live.cjs.map +1 -1
  16. package/_cjs/services/QueueMaker/errors.cjs +6 -6
  17. package/_cjs/services/QueueMaker/errors.cjs.map +1 -1
  18. package/_cjs/services/QueueMaker/memQueue.cjs +19 -19
  19. package/_cjs/services/QueueMaker/memQueue.cjs.map +1 -1
  20. package/_cjs/services/QueueMaker/sbqueue.cjs +9 -10
  21. package/_cjs/services/QueueMaker/sbqueue.cjs.map +1 -1
  22. package/_cjs/services/Repository.cjs +15 -15
  23. package/_cjs/services/Repository.cjs.map +1 -1
  24. package/_cjs/services/Store/Cosmos.cjs +15 -15
  25. package/_cjs/services/Store/Cosmos.cjs.map +1 -1
  26. package/_cjs/services/Store/Disk.cjs +6 -7
  27. package/_cjs/services/Store/Disk.cjs.map +1 -1
  28. package/_cjs/services/Store/Memory.cjs +15 -16
  29. package/_cjs/services/Store/Memory.cjs.map +1 -1
  30. package/_cjs/services/Store/Redis.cjs +7 -8
  31. package/_cjs/services/Store/Redis.cjs.map +1 -1
  32. package/_cjs/services/Store/index.cjs +6 -6
  33. package/_cjs/services/Store/index.cjs.map +1 -1
  34. package/_cjs/services/simpledb/diskdb.cjs +1 -2
  35. package/_cjs/services/simpledb/diskdb.cjs.map +1 -1
  36. package/_cjs/services/simpledb/memdb.cjs +1 -1
  37. package/_cjs/services/simpledb/memdb.cjs.map +1 -1
  38. package/_cjs/services/simpledb/redisdb.cjs +1 -1
  39. package/_cjs/services/simpledb/redisdb.cjs.map +1 -1
  40. package/_cjs/services/simpledb/shared.cjs +3 -4
  41. package/_cjs/services/simpledb/shared.cjs.map +1 -1
  42. package/_cjs/services/simpledb/simpledb.cjs +1 -1
  43. package/_cjs/services/simpledb/simpledb.cjs.map +1 -1
  44. package/_src/api/routing.ts +2 -2
  45. package/_src/services/Repository.ts +2 -2
  46. package/_src/services/Store/Cosmos.ts +2 -2
  47. package/dist/api/codec.js +5 -6
  48. package/dist/api/express/schema/requestHandler.js +33 -33
  49. package/dist/api/express/schema/routing.js +8 -9
  50. package/dist/api/routing.js +29 -29
  51. package/dist/errorReporter.js +2 -3
  52. package/dist/services/Emailer/Sendgrid.js +7 -8
  53. package/dist/services/Operations/live.js +31 -31
  54. package/dist/services/QueueMaker/errors.js +7 -7
  55. package/dist/services/QueueMaker/memQueue.js +18 -18
  56. package/dist/services/QueueMaker/sbqueue.js +9 -10
  57. package/dist/services/Repository.d.ts +4 -4
  58. package/dist/services/Repository.d.ts.map +1 -1
  59. package/dist/services/Repository.js +16 -16
  60. package/dist/services/Store/Cosmos.js +12 -12
  61. package/dist/services/Store/Disk.js +7 -8
  62. package/dist/services/Store/Memory.js +17 -18
  63. package/dist/services/Store/Redis.js +8 -9
  64. package/dist/services/Store/index.js +7 -7
  65. package/dist/services/simpledb/diskdb.js +2 -3
  66. package/dist/services/simpledb/memdb.js +2 -2
  67. package/dist/services/simpledb/redisdb.js +2 -2
  68. package/dist/services/simpledb/shared.js +4 -5
  69. package/dist/services/simpledb/simpledb.js +2 -2
  70. package/package.json +6 -6
@@ -4,18 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Live = void 0;
7
- var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/core/Effect"));
7
+ var tsplus_module_1 = _interopRequireWildcard(require("@effect/io/Effect"));
8
8
  var tsplus_module_2 = _interopRequireWildcard(require("@effect-app/prelude/_ext/date"));
9
9
  var tsplus_module_3 = _interopRequireWildcard(require("@fp-ts/core/Option"));
10
10
  var tsplus_module_4 = _interopRequireWildcard(require("@effect-app/core/Array"));
11
- var tsplus_module_5 = _interopRequireWildcard(require("@effect/io/Effect"));
12
- var tsplus_module_6 = _interopRequireWildcard(require("@effect/io/Exit"));
13
- var tsplus_module_7 = _interopRequireWildcard(require("@effect/io/Cause"));
14
- var tsplus_module_8 = _interopRequireWildcard(require("@effect-app/prelude/schema"));
15
- var tsplus_module_9 = _interopRequireWildcard(require("@effect-app/core/Option"));
16
- var tsplus_module_10 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
17
- var tsplus_module_11 = _interopRequireWildcard(require("@effect-app/prelude/service"));
18
- var tsplus_module_12 = _interopRequireWildcard(require("@fp-ts/data/Duration"));
11
+ var tsplus_module_5 = _interopRequireWildcard(require("@effect/io/Exit"));
12
+ var tsplus_module_6 = _interopRequireWildcard(require("@effect/io/Cause"));
13
+ var tsplus_module_7 = _interopRequireWildcard(require("@effect-app/prelude/schema"));
14
+ var tsplus_module_8 = _interopRequireWildcard(require("@effect-app/core/Option"));
15
+ var tsplus_module_9 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
16
+ var tsplus_module_10 = _interopRequireWildcard(require("@effect-app/prelude/service"));
17
+ var tsplus_module_11 = _interopRequireWildcard(require("@fp-ts/data/Duration"));
18
+ var tsplus_module_12 = _interopRequireWildcard(require("@effect-app/core/Effect"));
19
19
  var tsplus_module_13 = _interopRequireWildcard(require("@effect/io/Layer"));
20
20
  var _reportError = require("@effect-app/infra/api/reportError");
21
21
  var _errorReporter = require("@effect-app/infra/errorReporter");
@@ -24,10 +24,10 @@ var _service2 = require("./service.cjs");
24
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
26
26
  const reportAppError = (0, _errorReporter.reportError)(cause => new _reportError.RequestException(cause));
27
- const make = tsplus_module_5.sync(() => {
27
+ const make = tsplus_module_1.sync(() => {
28
28
  const ops = new Map();
29
- const makeOp = tsplus_module_1.effectSync(() => _Operations.OperationId.make());
30
- const cleanup = tsplus_module_5.sync(() => {
29
+ const makeOp = tsplus_module_1.sync(() => _Operations.OperationId.make());
30
+ const cleanup = tsplus_module_1.sync(() => {
31
31
  const before = tsplus_module_2.DateSubHours(new Date(), 1);
32
32
  tsplus_module_4.ext_itToChunk(ops.entries()).forEach(([id, op]) => {
33
33
  const lastChanged = tsplus_module_3.getOrElse(() => op.createdAt)(tsplus_module_3.fromNullable(op.updatedAt));
@@ -37,31 +37,31 @@ const make = tsplus_module_5.sync(() => {
37
37
  });
38
38
  });
39
39
  function addOp(id) {
40
- return tsplus_module_5.sync(() => {
40
+ return tsplus_module_1.sync(() => {
41
41
  ops.set(id, new _Operations.Operation({
42
42
  id
43
43
  }));
44
44
  });
45
45
  }
46
46
  function findOp(id) {
47
- return tsplus_module_1.effectSync(() => tsplus_module_3.fromNullable(ops.get(id)));
47
+ return tsplus_module_1.sync(() => tsplus_module_3.fromNullable(ops.get(id)));
48
48
  }
49
49
  function finishOp(id, exit) {
50
- return tsplus_module_5.flatMap(findOp(id), _ => tsplus_module_5.sync(() => {
50
+ return tsplus_module_1.flatMap(findOp(id), _ => tsplus_module_1.sync(() => {
51
51
  if (tsplus_module_3.isNone(_)) {
52
52
  throw new Error("Not found");
53
53
  }
54
54
  ops.set(id, {
55
55
  ..._.value,
56
56
  updatedAt: new Date(),
57
- result: tsplus_module_6.isSuccess(exit) ? new _Operations.Success({}) : new _Operations.Failure({
58
- message: tsplus_module_7.isInterrupted(exit.cause) ? tsplus_module_8.LongString("Interrupted") : tsplus_module_7.isDie(exit.cause) ? tsplus_module_8.LongString("Unknown error") : tsplus_module_9.getOrUndefined(tsplus_module_3.flatMap(_ => typeof _ === "object" && _ !== null && "message" in _ && tsplus_module_8.LongString.Guard(_.message) ? tsplus_module_3.some(_.message) : tsplus_module_9.none)(tsplus_module_7.failureOption(exit.cause))) ?? null
57
+ result: tsplus_module_5.isSuccess(exit) ? new _Operations.Success({}) : new _Operations.Failure({
58
+ message: tsplus_module_6.isInterrupted(exit.cause) ? tsplus_module_7.LongString("Interrupted") : tsplus_module_6.isDie(exit.cause) ? tsplus_module_7.LongString("Unknown error") : tsplus_module_8.getOrUndefined(tsplus_module_3.flatMap(_ => typeof _ === "object" && _ !== null && "message" in _ && tsplus_module_7.LongString.Guard(_.message) ? tsplus_module_3.some(_.message) : tsplus_module_8.none)(tsplus_module_6.failureOption(exit.cause))) ?? null
59
59
  })
60
60
  });
61
61
  }));
62
62
  }
63
63
  function update(id, progress) {
64
- return tsplus_module_5.flatMap(findOp(id), _ => tsplus_module_5.sync(() => {
64
+ return tsplus_module_1.flatMap(findOp(id), _ => tsplus_module_1.sync(() => {
65
65
  if (tsplus_module_3.isNone(_)) {
66
66
  throw new Error("Not found");
67
67
  }
@@ -72,23 +72,23 @@ const make = tsplus_module_5.sync(() => {
72
72
  });
73
73
  }));
74
74
  }
75
- return tsplus_module_11.make(_service2.Operations, {
75
+ return tsplus_module_10.make(_service2.Operations, {
76
76
  cleanup,
77
- register: tsplus_module_5.tap(makeOp, id => tsplus_module_5.zipRight(tsplus_module_5.acquireRelease(addOp(id), (_, exit) => finishOp(id, exit)))(tsplus_module_10.logAnnotateScoped("operationId", id))),
77
+ register: tsplus_module_1.tap(makeOp, id => tsplus_module_1.zipRight(tsplus_module_1.acquireRelease(addOp(id), (_, exit) => finishOp(id, exit)))(tsplus_module_9.logAnnotateScoped("operationId", id))),
78
78
  find: findOp,
79
79
  update
80
80
  });
81
81
  });
82
- const cleanupLoop = tsplus_module_5.forkScoped(tsplus_module_5.forever(tsplus_module_5.delay(tsplus_module_5.flatMap(tsplus_module_5.exit(tsplus_module_5.serviceWithEffect(_service2.Operations, _ => _.cleanup)), _ => {
83
- if (tsplus_module_6.isSuccess(_)) {
84
- return tsplus_module_1.unit;
82
+ const cleanupLoop = tsplus_module_1.forkScoped(tsplus_module_1.forever(tsplus_module_1.delay(tsplus_module_1.flatMap(tsplus_module_1.exit(tsplus_module_1.serviceWithEffect(_service2.Operations, _ => _.cleanup)), _ => {
83
+ if (tsplus_module_5.isSuccess(_)) {
84
+ return tsplus_module_12.unit;
85
85
  } else {
86
86
  return reportAppError(_.cause);
87
87
  }
88
- }), tsplus_module_12.minutes(1))));
88
+ }), tsplus_module_11.minutes(1))));
89
89
  /**
90
90
  * @tsplus static Operations.Ops Live
91
91
  */
92
- const Live = tsplus_module_13.provideMerge(tsplus_module_1.toScopedDiscardLayer(cleanupLoop))(tsplus_module_5.toLayer(make, _service2.Operations));
92
+ const Live = tsplus_module_13.provideMerge(tsplus_module_12.toScopedDiscardLayer(cleanupLoop))(tsplus_module_1.toLayer(make, _service2.Operations));
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AAE,CAAC,EACT,CAACc,CAAC,EAAED,IAAI,KAAKD,QAAQ,CAACZ,EAAE,EAAEa,IAAI,CAAC,CAChC,EAHHiB,mCAAyB,aAAa,EAAE9B,EAAE,CAAC,CAGxC,CACJ;IAEH+B,IAAI,EAAErB,MAAM;IACZgB;GACD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAMM,WAAW,sDAAG7C,yHAAU,EAAkB2B,CAAC,IAAIA,CAAC,CAACrB,OAAO,CAAC,GAEpDqB,CAAC,IAAG;EACX,IAAII,2BAAC,CAAY,EAAE;IACjB;GACD,MAAM;IACL,OAAOnC,cAAc,CAAC+B,CAAC,CAAC9B,KAAK,CAAC;;AAElC,CAAC,CAAC,EACKiD,yBAAiB,CAAC,CAAC,CAAC,EAEhB;AAEb;;;AAGO,MAAMC,IAAI,sEACbF,WAAW,GADK7C,4BAAI,EAASgD,oBAAU,CAAC,CAEnB;AAAA","names":["reportAppError","cause","RequestException","make","tsplus_module_5","ops","Map","makeOp","tsplus_module_1","OperationId","cleanup","before","tsplus_module_2","Date","tsplus_module_4","entries","forEach","id","op","lastChanged","tsplus_module_3","createdAt","updatedAt","delete","addOp","set","Operation","findOp","get","finishOp","exit","_","Error","value","result","tsplus_module_6","Success","Failure","message","tsplus_module_7","tsplus_module_8","tsplus_module_9","Guard","update","progress","tsplus_module_11","register","tsplus_module_10","find","cleanupLoop","tsplus_module_12","Live","Operations"],"sourceRoot":"","sources":["../../../_src/services/Operations/live.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"live.cjs","mappings":";;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AACA;AAAyC;AAAA;AAEzC,MAAMA,cAAc,GAAG,8BAAW,EAACC,KAAK,IAAI,IAAIC,6BAAgB,CAACD,KAAK,CAAC,CAAC;AAExE,MAAME,IAAI,GAAGC,qBAAY,MAAK;EAC5B,MAAMC,GAAG,GAAG,IAAIC,GAAG,EAA0B;EAC7C,MAAMC,MAAM,GAAGH,2BAAOI,uB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AM;IACL,OAAOlC,cAAc,CAAC8B,CAAC,CAAC7B,KAAK,CAAC;;AAElC,CAAC,CAAC,EACKgD,yBAAiB,CAAC,CAAC,CAAC,EAEhB;AAEb;;;AAGO,MAAMC,IAAI,uEACbF,WAAW,GADK5C,4BAAI,EAAS+C,oBAAU,CAAC,CAEnB;AAAA","names":["reportAppError","cause","RequestException","make","tsplus_module_1","ops","Map","makeOp","OperationId","cleanup","before","tsplus_module_2","Date","tsplus_module_4","entries","forEach","id","op","lastChanged","tsplus_module_3","createdAt","updatedAt","delete","addOp","set","Operation","findOp","get","finishOp","exit","_","Error","value","result","tsplus_module_5","Success","Failure","message","tsplus_module_6","tsplus_module_7","tsplus_module_8","Guard","update","progress","tsplus_module_10","register","tsplus_module_9","find","cleanupLoop","tsplus_module_11","Live","Operations"],"sourceRoot":"","sources":["../../../_src/services/Operations/live.ts"],"sourcesContent":[null]}
@@ -7,9 +7,9 @@ exports.MessageException = exports.FatalQueueException = void 0;
7
7
  exports.forkDaemonReportQueue = forkDaemonReportQueue;
8
8
  exports.reportFailure = reportFailure;
9
9
  exports.reportQueueError = exports.reportFatalQueueError = void 0;
10
- var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/core/Effect"));
10
+ var tsplus_module_1 = _interopRequireWildcard(require("@effect/io/Effect"));
11
11
  var tsplus_module_2 = _interopRequireWildcard(require("@effect-app/infra/RequestContext"));
12
- var tsplus_module_3 = _interopRequireWildcard(require("@effect/io/Effect"));
12
+ var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/core/Effect"));
13
13
  var _errorReporter = require("@effect-app/infra/errorReporter");
14
14
  var _errors = require("@effect-app/infra/errors");
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -27,7 +27,7 @@ class FatalQueueException extends _errors.CauseException {
27
27
  }
28
28
  exports.FatalQueueException = FatalQueueException;
29
29
  const reportQueueError_ = (0, _errorReporter.reportError)(cause => new MessageException(cause));
30
- const reportQueueError = (cause, context) => tsplus_module_3.serviceWithEffect(tsplus_module_2.tag, requestContext => tsplus_module_1.effectSync(() => reportQueueError_(cause, {
30
+ const reportQueueError = (cause, context) => tsplus_module_1.serviceWithEffect(tsplus_module_2.tag, requestContext => tsplus_module_1.sync(() => reportQueueError_(cause, {
31
31
  requestContext,
32
32
  ...context
33
33
  })));
@@ -42,13 +42,13 @@ const reportQueueError = (cause, context) => tsplus_module_3.serviceWithEffect(t
42
42
  */
43
43
  exports.reportQueueError = reportQueueError;
44
44
  function forkDaemonReportQueue(self) {
45
- return tsplus_module_3.daemonChildren(tsplus_module_3.fork(tsplus_module_3.tapErrorCause(self, reportQueueError)));
45
+ return tsplus_module_1.daemonChildren(tsplus_module_1.fork(tsplus_module_1.tapErrorCause(self, reportQueueError)));
46
46
  }
47
47
  const reportFatalQueueError = (0, _errorReporter.reportError)(cause => new FatalQueueException(cause));
48
48
  exports.reportFatalQueueError = reportFatalQueueError;
49
49
  function reportFailure(name) {
50
- return self => tsplus_module_3.tap(tsplus_module_3.exit(self), exit => exit._tag === "Failure" ? reportFatalQueueError(exit.cause, {
50
+ return self => tsplus_module_1.tap(tsplus_module_1.exit(self), exit => exit._tag === "Failure" ? reportFatalQueueError(exit.cause, {
51
51
  name
52
- }) : tsplus_module_1.unit);
52
+ }) : tsplus_module_3.unit);
53
53
  }
54
54
  //# sourceMappingURL=errors.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.cjs","mappings":";;;;;;;;;;;;AAAA;AACA;AAAyD;AAAA;AAGnD,MAAOA,gBAAoB,SAAQC,sBAAiB;EACxDC,YAAYC,KAAe;IACzB,KAAK,CAACA,KAAK,EAAE,SAAS,CAAC;EACzB;;AACD;AAEK,MAAOC,mBAAuB,SAAQH,sBAAiB;EAC3DC,YAAYC,KAAe;IACzB,KAAK,CAACA,KAAK,EAAE,SAAS,CAAC;EACzB;;AACD;AAED,MAAME,iBAAiB,GAAG,8BAAW,EAACF,KAAK,IAAI,IAAIH,gBAAgB,CAACG,KAAK,CAAC,CAAC;AAEpE,MAAMG,gBAAgB,GAAG,CAACH,KAAqB,EAAEI,OAA6C,KACnGC,uDAAoCC,cAAc,IAChDC,iCAAOL,iBAAiB,CAACF,KAAK,EAAE;EAAEM,cAAc;EAAE,GAAGF;AAAO,CAAE,CAAC,CAAC,CACjE;AAEH;;;;;;;;;AAAA;AASM,SAAUI,qBAAqB,CAAUC,IAAqB;EAClE,2DAAOJ,kCAAI,EAAeF,gBAAgB,CAAC;AAC7C;AAEO,MAAMO,qBAAqB,GAAG,8BAAW,EAC9CV,KAAK,IAAI,IAAIC,mBAAmB,CAACD,KAAK,CAAC,CACxC;AAAA;AAEK,SAAUW,aAAa,CAACC,IAAY;EACxC,OAAiBH,IAAqB,IACpCJ,6CAAI,GAAUQ,IAAI,IAChBA,IAAI,CAACC,IAAI,KAAK,SAAS,GACnBJ,qBAAqB,CAACG,IAAI,CAACb,KAAK,EAAE;IAAEY;EAAI,CAAE,CAAC,GAC5CL,oBAAY,CAChB;AACL","names":["MessageException","CauseException","constructor","cause","FatalQueueException","reportQueueError_","reportQueueError","context","tsplus_module_3","requestContext","tsplus_module_1","forkDaemonReportQueue","self","reportFatalQueueError","reportFailure","name","exit","_tag"],"sourceRoot":"","sources":["../../../_src/services/QueueMaker/errors.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"errors.cjs","mappings":";;;;;;;;;;;;AAAA;AACA;AAAyD;AAAA;AAGnD,MAAOA,gBAAoB,SAAQC,sBAAiB;EACxDC,YAAYC,KAAe;IACzB,KAAK,CAACA,KAAK,EAAE,SAAS,CAAC;EACzB;;AACD;AAEK,MAAOC,mBAAuB,SAAQH,sBAAiB;EAC3DC,YAAYC,KAAe;IACzB,KAAK,CAACA,KAAK,EAAE,SAAS,CAAC;EACzB;;AACD;AAED,MAAME,iBAAiB,GAAG,8BAAW,EAACF,KAAK,IAAI,IAAIH,gBAAgB,CAACG,KAAK,CAAC,CAAC;AAEpE,MAAMG,gBAAgB,GAAG,CAACH,KAAqB,EAAEI,OAA6C,KACnGC,uDAAoCC,cAAc,IAChDD,2BAAOH,iBAAiB,CAACF,KAAK,EAAE;EAAEM,cAAc;EAAE,GAAGF;AAAO,CAAE,CAAC,CAAC,CACjE;AAEH;;;;;;;;;AAAA;AASM,SAAUG,qBAAqB,CAAUC,IAAqB;EAClE,2DAAOH,kCAAI,EAAeF,gBAAgB,CAAC;AAC7C;AAEO,MAAMM,qBAAqB,GAAG,8BAAW,EAC9CT,KAAK,IAAI,IAAIC,mBAAmB,CAACD,KAAK,CAAC,CACxC;AAAA;AAEK,SAAUU,aAAa,CAACC,IAAY;EACxC,OAAiBH,IAAqB,IACpCH,6CAAI,GAAUO,IAAI,IAChBA,IAAI,CAACC,IAAI,KAAK,SAAS,GACnBJ,qBAAqB,CAACG,IAAI,CAACZ,KAAK,EAAE;IAAEW;EAAI,CAAE,CAAC,GAC5CG,oBAAY,CAChB;AACL","names":["MessageException","CauseException","constructor","cause","FatalQueueException","reportQueueError_","reportQueueError","context","tsplus_module_1","requestContext","forkDaemonReportQueue","self","reportFatalQueueError","reportFailure","name","exit","_tag","tsplus_module_3"],"sourceRoot":"","sources":["../../../_src/services/QueueMaker/errors.ts"],"sourcesContent":[null]}
@@ -7,14 +7,14 @@ exports.makeMemQueue = makeMemQueue;
7
7
  exports.silence = silence;
8
8
  var tsplus_module_1 = _interopRequireWildcard(require("@effect/io/Effect"));
9
9
  var tsplus_module_2 = _interopRequireWildcard(require("@effect-app/infra/RequestContext"));
10
- var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/core/Effect"));
11
- var tsplus_module_4 = _interopRequireWildcard(require("@effect-app/core/_ext/Iterable"));
12
- var tsplus_module_5 = _interopRequireWildcard(require("@effect-app/infra/services/QueueMaker/errors"));
13
- var tsplus_module_6 = _interopRequireWildcard(require("@effect-app/prelude/utils"));
14
- var tsplus_module_7 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
15
- var tsplus_module_8 = _interopRequireWildcard(require("@effect-app/prelude/schema"));
16
- var tsplus_module_9 = _interopRequireWildcard(require("@effect-app/infra/api/setupRequest"));
17
- var tsplus_module_10 = _interopRequireWildcard(require("@effect/io/Cause"));
10
+ var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/core/_ext/Iterable"));
11
+ var tsplus_module_4 = _interopRequireWildcard(require("@effect-app/infra/services/QueueMaker/errors"));
12
+ var tsplus_module_5 = _interopRequireWildcard(require("@effect-app/prelude/utils"));
13
+ var tsplus_module_6 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
14
+ var tsplus_module_7 = _interopRequireWildcard(require("@effect-app/prelude/schema"));
15
+ var tsplus_module_8 = _interopRequireWildcard(require("@effect-app/infra/api/setupRequest"));
16
+ var tsplus_module_9 = _interopRequireWildcard(require("@effect/io/Cause"));
17
+ var tsplus_module_10 = _interopRequireWildcard(require("@effect-app/core/Effect"));
18
18
  var tsplus_module_11 = _interopRequireWildcard(require("@effect/io/Exit"));
19
19
  var _memQueue = require("@effect-app/infra-adapters/memQueue");
20
20
  var _errors2 = require("./errors.cjs");
@@ -31,9 +31,9 @@ function makeMemQueue(queueName, queueDrainName, encoder, makeHandleEvent, provi
31
31
  return {
32
32
  publish: (...messages) => tsplus_module_1.gen(function* ($) {
33
33
  const requestContext = yield* $(tsplus_module_1.service(tsplus_module_2.tag));
34
- return yield* $(tsplus_module_5.forkDaemonReportQueue(tsplus_module_4.ext_forEach(messages, m => tsplus_module_1.asUnit(
34
+ return yield* $(tsplus_module_4.forkDaemonReportQueue(tsplus_module_3.ext_forEach(messages, m => tsplus_module_1.asUnit(
35
35
  // we JSON encode, because that is what the wire also does, and it reveals holes in e.g unknown encoders (Date->String)
36
- tsplus_module_1.flatMap(tsplus_module_3.effectSync(() => JSON.stringify(encoder({
36
+ tsplus_module_1.flatMap(tsplus_module_1.sync(() => JSON.stringify(encoder({
37
37
  body: m,
38
38
  meta: requestContext
39
39
  })))
@@ -44,18 +44,18 @@ function makeMemQueue(queueName, queueDrainName, encoder, makeHandleEvent, provi
44
44
  const handleEvent = yield* $(makeHandleEvent);
45
45
  const processMessage = msg =>
46
46
  // we JSON parse, because that is what the wire also does, and it reveals holes in e.g unknown encoders (Date->String)
47
- tsplus_module_1.flatMap(tsplus_module_1.orDie(tsplus_module_1.flatMap(tsplus_module_3.effectSync(() => JSON.parse(msg)), parseDrain)), ({
47
+ tsplus_module_1.flatMap(tsplus_module_1.orDie(tsplus_module_1.flatMap(tsplus_module_1.sync(() => JSON.parse(msg)), parseDrain)), ({
48
48
  body,
49
49
  meta
50
50
  }) => provideContext(tsplus_module_2.RequestContext.inherit(meta, {
51
51
  id: body.id,
52
52
  locale: "en",
53
- name: tsplus_module_8.ReasonableString(body._tag)
54
- }))(tsplus_module_1.zipRight(tsplus_module_7.logAnnotates({
55
- body: tsplus_module_6.RecordPretty(tsplus_module_6.object$(body)),
56
- meta: tsplus_module_6.RecordPretty(tsplus_module_6.object$(meta))
53
+ name: tsplus_module_7.ReasonableString(body._tag)
54
+ }))(tsplus_module_1.zipRight(tsplus_module_6.logAnnotates({
55
+ body: tsplus_module_5.RecordPretty(tsplus_module_5.object$(body)),
56
+ meta: tsplus_module_5.RecordPretty(tsplus_module_5.object$(meta))
57
57
  })(tsplus_module_1.logDebug(`$$ [${queueDrainName}] Processing incoming message`)), silence(handleEvent(body)))));
58
- return yield* $(tsplus_module_1.forkScoped(tsplus_module_9.setupReq3((0, _errors2.reportFailure)("drain")(tsplus_module_1.forever(tsplus_module_1.flatMap(qReply.take(), x => tsplus_module_1.uninterruptible(processMessage(x))))), "Queue.ReceiveMessage")));
58
+ return yield* $(tsplus_module_1.forkScoped(tsplus_module_8.setupReq3((0, _errors2.reportFailure)("drain")(tsplus_module_1.forever(tsplus_module_1.flatMap(qReply.take(), x => tsplus_module_1.uninterruptible(processMessage(x))))), "Queue.ReceiveMessage")));
59
59
  })
60
60
  };
61
61
  });
@@ -66,14 +66,14 @@ function silence(inp) {
66
66
  return tsplus_module_1.flatMap(tsplus_module_1.exit(inp), result => tsplus_module_1.gen(function* ($) {
67
67
  const requestContext = yield* $(tsplus_module_1.service(tsplus_module_2.tag));
68
68
  return yield* $(tsplus_module_11.match(result, cause => {
69
- if (tsplus_module_10.isInterrupted(cause)) {
69
+ if (tsplus_module_9.isInterrupted(cause)) {
70
70
  return tsplus_module_1.failCause(cause);
71
71
  }
72
72
  (0, _errors2.reportQueueError)(cause, {
73
73
  requestContext
74
74
  });
75
- return tsplus_module_3.unit;
76
- }, () => tsplus_module_3.unit));
75
+ return tsplus_module_10.unit;
76
+ }, () => tsplus_module_10.unit));
77
77
  }));
78
78
  }
79
79
  //# sourceMappingURL=memQueue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"memQueue.cjs","mappings":";;;;;;;;;;;;;;;;;;AAAA;AAGA;AAA6D;AAAA;AAG7D;;;AAGM,SAAUA,YAAY,CAC1BC,SAAiB,EACjBC,cAAsB,EACtBC,OAAyD,EACzDC,eAAwF,EACxFC,cAEuC,EACvCC,UAGmF;EAEnF,OAAOC,oBAAW,WAAUC,CAAC;IAC3B,MAAMC,GAAG,GAAG,OAAOD,CAAC,yBAACE,kBAAQ,EAAQ;IACrC,MAAMC,CAAC,GAAG,OAAOH,CAAC,CAACC,GAAG,CAACG,gBAAgB,CAACX,SAAS,CAAC,CAAC;IACnD,MAAMY,MAAM,GAAG,OAAOL,CAAC,CAACC,GAAG,CAACG,gBAAgB,CAACV,cAAc,CAAC,CAAC;IAE7D,OAAO;MACLY,OAAO,EAAE,CAAC,GAAGC,QAAQ,KACnBR,oBAAW,WAAUC,CAAC;QACpB,MAAMQ,cAAc,GAAG,OAAOR,CAAC,8CAA2B;QAC1D,OAAO,OAAOA,CAAC,uCACbS,oCAAQ,EAAeC,CAAC,IAAGX;QACzB;QACAA,yD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,WAAUC,CAAC;IACpB,MAAMQ,cAAc,GAAG,OAAOR,CAAC,8CAA2B;IAC1D,OAAO,OAAOA,CAAC,CACboC,6BAAM,EACJC,KAAK,IAAG;MACN,IAAIC,oCAAK,CAAgB,EAAE;QACzB,iCAAQD,KAAsB;;MAEhC,6BAAgB,EAACA,KAAK,EAAE;QAAE7B;MAAc,CAAE,CAAC;MAC3C;IACF,CAAC,EACD,MAAK+B,oBAAY,CAClB,CACF;EACH,CAAC,CAAC,CACH;AACH","names":["makeMemQueue","queueName","queueDrainName","encoder","makeHandleEvent","provideContext","parseDrain","tsplus_module_1","$","mem","MemQueue","q","getOrCreateQueue","qReply","publish","messages","requestContext","tsplus_module_4","m","JSON","stringify","body","meta","_","offer","drain","handleEvent","processMessage","msg","parse","RequestContext","inherit","id","locale","name","tsplus_module_8","_tag","tsplus_module_7","silence","tsplus_module_9","take","x","inp","result","tsplus_module_11","cause","tsplus_module_10","tsplus_module_3"],"sourceRoot":"","sources":["../../../_src/services/QueueMaker/memQueue.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"memQueue.cjs","mappings":";;;;;;;;;;;;;;;;;;AAAA;AAGA;AAA6D;AAAA;AAG7D;;;AAGM,SAAUA,YAAY,CAC1BC,SAAiB,EACjBC,cAAsB,EACtBC,OAAyD,EACzDC,eAAwF,EACxFC,cAEuC,EACvCC,UAGmF;EAEnF,OAAOC,oBAAW,WAAUC,CAAC;IAC3B,MAAMC,GAAG,GAAG,OAAOD,CAAC,yBAACE,kBAAQ,EAAQ;IACrC,MAAMC,CAAC,GAAG,OAAOH,CAAC,CAACC,GAAG,CAACG,gBAAgB,CAACX,SAAS,CAAC,CAAC;IACnD,MAAMY,MAAM,GAAG,OAAOL,CAAC,CAACC,GAAG,CAACG,gBAAgB,CAACV,cAAc,CAAC,CAAC;IAE7D,OAAO;MACLY,OAAO,EAAE,CAAC,GAAGC,QAAQ,KACnBR,oBAAW,WAAUC,CAAC;QACpB,MAAMQ,cAAc,GAAG,O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;AAEA;AACA;AACM,SAAUH,OAAO,CAAUI,GAAoB;EACnD,OAAOnC,gDAAG,GAAcoC,MAAM,IAC5BpC,oBAAW,WAAUC,CAAC;IACpB,MAAMQ,cAAc,GAAG,OAAOR,CAAC,8CAA2B;IAC1D,OAAO,OAAOA,CAAC,CACboC,6BAAM,EACJC,KAAK,IAAG;MACN,IAAIC,mCAAK,CAAgB,EAAE;QACzB,iCAAQD,KAAsB;;MAEhC,6BAAgB,EAACA,KAAK,EAAE;QAAE7B;MAAc,CAAE,CAAC;MAC3C;IACF,CAAC,EACD,MAAK+B,qBAAY,CAClB,CACF;EACH,CAAC,CAAC,CACH;AACH","names":["makeMemQueue","queueName","queueDrainName","encoder","makeHandleEvent","provideContext","parseDrain","tsplus_module_1","$","mem","MemQueue","q","getOrCreateQueue","qReply","publish","messages","requestContext","tsplus_module_3","m","JSON","stringify","body","meta","_","offer","drain","handleEvent","processMessage","msg","parse","RequestContext","inherit","id","locale","name","tsplus_module_7","_tag","tsplus_module_6","silence","tsplus_module_8","take","x","inp","result","tsplus_module_11","cause","tsplus_module_9","tsplus_module_10"],"sourceRoot":"","sources":["../../../_src/services/QueueMaker/memQueue.ts"],"sourcesContent":[null]}
@@ -11,10 +11,9 @@ var tsplus_module_3 = _interopRequireWildcard(require("@effect-app/prelude/utils
11
11
  var tsplus_module_4 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
12
12
  var tsplus_module_5 = _interopRequireWildcard(require("@effect-app/prelude/schema"));
13
13
  var tsplus_module_6 = _interopRequireWildcard(require("@effect-app/infra/api/setupRequest"));
14
- var tsplus_module_7 = _interopRequireWildcard(require("@effect-app/core/Effect"));
15
- var tsplus_module_8 = _interopRequireWildcard(require("@effect-app/infra/RequestContext"));
16
- var tsplus_module_9 = _interopRequireWildcard(require("@effect-app/infra/services/QueueMaker/errors"));
17
- var tsplus_module_10 = _interopRequireWildcard(require("@effect/io/Layer"));
14
+ var tsplus_module_7 = _interopRequireWildcard(require("@effect-app/infra/RequestContext"));
15
+ var tsplus_module_8 = _interopRequireWildcard(require("@effect-app/infra/services/QueueMaker/errors"));
16
+ var tsplus_module_9 = _interopRequireWildcard(require("@effect/io/Layer"));
18
17
  var _ServiceBus = require("@effect-app/infra-adapters/ServiceBus");
19
18
  var _errorReporter = require("@effect-app/infra/errorReporter");
20
19
  var _errors2 = require("./errors.cjs");
@@ -36,7 +35,7 @@ function makeServiceBusQueue(_queueName, queueDrainName, encoder, makeHandleEven
36
35
  return tsplus_module_1.asUnit(tsplus_module_1.orDie(tsplus_module_6.setupReq3(tsplus_module_1.flatMap(tsplus_module_1.tapErrorCause(tsplus_module_1.orDie(tsplus_module_1.flatMap(tsplus_module_1.sync(() => JSON.parse(messageBody)), x => parseDrain(x))), report), ({
37
36
  body,
38
37
  meta
39
- }) => provideContext(tsplus_module_8.RequestContext.inherit(meta, {
38
+ }) => provideContext(tsplus_module_7.RequestContext.inherit(meta, {
40
39
  id: body.id,
41
40
  locale: "en",
42
41
  name: tsplus_module_5.ReasonableString(body._tag)
@@ -47,12 +46,12 @@ function makeServiceBusQueue(_queueName, queueDrainName, encoder, makeHandleEven
47
46
  }
48
47
  return yield* $(tsplus_module_1.provideSomeLayer((0, _ServiceBus.subscribe)({
49
48
  processMessage: x => tsplus_module_1.uninterruptible(processMessage(x.body)),
50
- processError: err => tsplus_module_7.effectSync(() => (0, _errorReporter.captureException)(err.error))
49
+ processError: err => tsplus_module_1.sync(() => (0, _errorReporter.captureException)(err.error))
51
50
  }), receiverLayer));
52
51
  }),
53
52
  publish: (...messages) => tsplus_module_1.gen(function* ($) {
54
- const requestContext = yield* $(tsplus_module_1.service(tsplus_module_8.tag));
55
- return yield* $(tsplus_module_9.forkDaemonReportQueue(tsplus_module_1.promise(() => s.sendMessages(messages.map(x => ({
53
+ const requestContext = yield* $(tsplus_module_1.service(tsplus_module_7.tag));
54
+ return yield* $(tsplus_module_8.forkDaemonReportQueue(tsplus_module_1.promise(() => s.sendMessages(messages.map(x => ({
56
55
  body: JSON.stringify(encoder({
57
56
  body: x,
58
57
  meta: requestContext
@@ -68,11 +67,11 @@ function makeServiceBusQueue(_queueName, queueDrainName, encoder, makeHandleEven
68
67
  * @tsplus static QueueMaker.Ops makeServiceBusLayers
69
68
  */
70
69
  function makeServiceBusLayers(url, queueName, queueDrainName) {
71
- return tsplus_module_10.provide(tsplus_module_10.merge((0, _ServiceBus.LiveSender)(queueName))((0, _ServiceBus.LiveReceiver)(queueDrainName)))((0, _ServiceBus.LiveServiceBusClient)(url));
70
+ return tsplus_module_9.provide(tsplus_module_9.merge((0, _ServiceBus.LiveSender)(queueName))((0, _ServiceBus.LiveReceiver)(queueDrainName)))((0, _ServiceBus.LiveServiceBusClient)(url));
72
71
  }
73
72
  function report(cause) {
74
73
  return tsplus_module_1.gen(function* ($) {
75
- const requestContext = yield* $(tsplus_module_1.service(tsplus_module_8.tag));
74
+ const requestContext = yield* $(tsplus_module_1.service(tsplus_module_7.tag));
76
75
  return (0, _errors2.reportQueueError)(cause, {
77
76
  requestContext
78
77
  });
@@ -1 +1 @@
1
- {"version":3,"file":"sbqueue.cjs","mappings":";;;;;;;;;;;;;;;;;AAAA;AASA;AAGA;AAA8C;AAAA;AAG9C;;;AAGM,SAAUA,mBAAmB,CAQjCC,UAAkB,EAClBC,cAAsB,EACtBC,OAAyD,EACzDC,eAAwF,EACxFC,cAEuC,EACvCC,UAGmF;EAEnF,OAAOC,oBAAW,WAAUC,CAAC;IAC3B,MAAMC,CAAC,GAAG,OAAOD,CAAC,yBAACE,kBAAM,EAAQ;IACjC,MAAMC,QAAQ,GAAG,OAAOH,CAAC,yBAACI,oBAAQ,EAAQ;IAC1C,MAAMC,aAAa,GAAGC,8CAAQ,EAAWH,QAAQ,CAAC;IAElD,OAAO;MACLI,KAAK,EAAER,oBAAW,WAAUC,CAAC;QAC3B,MAAMQ,WAAW,GAAG,OAAOR,CAAC,CAACJ,eAAe,CAAC;QAC7C;QACA,SAASa,cAAc,CAACC,WAAgB;UAC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CAAE,CAAC,CAC3C;UACDI,SAAS,EAAEtB,CAAC,CAACM,EAAE;UACfiB,WAAW,EAAE;SACd,CAAC,CAAC,CACJ,CACF,EAEF;MACH,CAAC;KAC6B;EACpC,CAAC,CAAC;AACJ;AAEA;;;AAGM,SAAUC,oBAAoB,CAACC,GAAW,EAAEC,SAAiB,EAAE9C,cAAsB;EACzF,gCACK+C,uBAAgC,0BAAU,EAACD,SAAS,CAAC,EAApD,4BAAY,EAAC9C,cAAc,CAAC,EAAyB,CADpD,oCAAoB,EAAC6C,GAAG,CAAC;AAElC;AAEA,SAASxB,MAAM,CAAI2B,KAAe;EAChC,OAAO3C,oBAAW,WAAUC,CAAC;IAC3B,MAAMgC,cAAc,GAAG,OAAOhC,CAAC,8CAA2B;IAC1D,OAAO,6BAAgB,EAAC0C,KAAK,EAAE;MAAEV;IAAc,CAAE,CAAC;EACpD,CAAC,CAAC;AACJ","names":["makeServiceBusQueue","_queueName","queueDrainName","encoder","makeHandleEvent","provideContext","parseDrain","tsplus_module_1","$","s","Sender","receiver","Receiver","receiverLayer","tsplus_module_2","drain","handleEvent","processMessage","messageBody","tsplus_module_6","JSON","parse","x","report","body","meta","RequestContext","inherit","id","locale","name","tsplus_module_5","_tag","tsplus_module_4","processError","err","tsplus_module_7","error","publish","messages","requestContext","sendMessages","map","stringify","messageId","contentType","makeServiceBusLayers","url","queueName","tsplus_module_10","cause"],"sourceRoot":"","sources":["../../../_src/services/QueueMaker/sbqueue.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"sbqueue.cjs","mappings":";;;;;;;;;;;;;;;;AAAA;AASA;AAGA;AAA8C;AAAA;AAG9C;;;AAGM,SAAUA,mBAAmB,CAQjCC,UAAkB,EAClBC,cAAsB,EACtBC,OAAyD,EACzDC,eAAwF,EACxFC,cAEuC,EACvCC,UAGmF;EAEnF,OAAOC,oBAAW,WAAUC,CAAC;IAC3B,MAAMC,CAAC,GAAG,OAAOD,CAAC,yBAACE,kBAAM,EAAQ;IAC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,MAAM+B,cAAc,GAAG,OAAO/B,CAAC,8CAA2B;QAC1D,OAAO,OAAOA,CAAC,uCACbD,wBAAe,MACbE,CAAC,CAAC+B,YAAY,CACZF,QAAQ,CAACG,GAAG,CAACnB,CAAC,KAAK;UACjBE,IAAI,EAAEJ,IAAI,CAACsB,SAAS,CAClBvC,OAAO,CAAC;YAAEqB,IAAI,EAAEF,CAAC;YAAEG,IAAI,EAAEc;UAAc,CAAE,CAAC,CAC3C;UACDI,SAAS,EAAErB,CAAC,CAACM,EAAE;UACfgB,WAAW,EAAE;SACd,CAAC,CAAC,CACJ,CACF,EAEF;MACH,CAAC;KAC6B;EACpC,CAAC,CAAC;AACJ;AAEA;;;AAGM,SAAUC,oBAAoB,CAACC,GAAW,EAAEC,SAAiB,EAAE7C,cAAsB;EACzF,+BACK8C,sBAAgC,0BAAU,EAACD,SAAS,CAAC,EAApD,4BAAY,EAAC7C,cAAc,CAAC,EAAyB,CADpD,oCAAoB,EAAC4C,GAAG,CAAC;AAElC;AAEA,SAASvB,MAAM,CAAI0B,KAAe;EAChC,OAAO1C,oBAAW,WAAUC,CAAC;IAC3B,MAAM+B,cAAc,GAAG,OAAO/B,CAAC,8CAA2B;IAC1D,OAAO,6BAAgB,EAACyC,KAAK,EAAE;MAAEV;IAAc,CAAE,CAAC;EACpD,CAAC,CAAC;AACJ","names":["makeServiceBusQueue","_queueName","queueDrainName","encoder","makeHandleEvent","provideContext","parseDrain","tsplus_module_1","$","s","Sender","receiver","Receiver","receiverLayer","tsplus_module_2","drain","handleEvent","processMessage","messageBody","tsplus_module_6","JSON","parse","x","report","body","meta","RequestContext","inherit","id","locale","name","tsplus_module_5","_tag","tsplus_module_4","processError","err","error","publish","messages","requestContext","sendMessages","map","stringify","messageId","contentType","makeServiceBusLayers","url","queueName","tsplus_module_9","cause"],"sourceRoot":"","sources":["../../../_src/services/QueueMaker/sbqueue.ts"],"sourcesContent":[null]}
@@ -34,9 +34,9 @@ var tsplus_module_1 = _interopRequireWildcard(require("@effect-app/prelude/Pure"
34
34
  var tsplus_module_2 = _interopRequireWildcard(require("@effect-app/prelude/_ext/misc"));
35
35
  var tsplus_module_3 = _interopRequireWildcard(require("@effect/io/Effect"));
36
36
  var tsplus_module_4 = _interopRequireWildcard(require("@fp-ts/data/Chunk"));
37
- var tsplus_module_5 = _interopRequireWildcard(require("@effect-app/core/Effect"));
38
- var tsplus_module_6 = _interopRequireWildcard(require("@effect-app/core/Array"));
39
- var tsplus_module_7 = _interopRequireWildcard(require("@effect/io/Debug"));
37
+ var tsplus_module_5 = _interopRequireWildcard(require("@effect-app/core/Array"));
38
+ var tsplus_module_6 = _interopRequireWildcard(require("@effect/io/Debug"));
39
+ var tsplus_module_7 = _interopRequireWildcard(require("@effect-app/core/Effect"));
40
40
  var _errors = require("../errors.cjs");
41
41
  var _Store = require("../services/Store.cjs");
42
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -109,7 +109,7 @@ function projectEffect_1(self, map) {
109
109
  * @tsplus fluent Repository project
110
110
  */
111
111
  function project(self, map) {
112
- return projectEffect_1(self, tsplus_module_5.effectSync(() => map));
112
+ return projectEffect_1(self, tsplus_module_3.sync(() => map));
113
113
  }
114
114
  /**
115
115
  * @tsplus fluent Repository queryEffect
@@ -134,7 +134,7 @@ map) {
134
134
  limit: 1
135
135
  }) : self.utils.all, items => tsplus_module_3.map(tsplus_module_3.service(_Store.ContextMap), ({
136
136
  set
137
- }) => items.map(_ => self.utils.mapReverse(_, set)))), _ => _.map(_ => self.utils.parse(_))), _ => tsplus_module_3.map(tsplus_module_2.encaseMaybeInEffect_(tsplus_module_6.ChunkToNonEmptyReadonlyArray(tsplus_module_4.filterMap(_, f.collect)), () => new _errors.NotFoundError(self.itemType, JSON.stringify(f.filter))), _ => _[0])));
137
+ }) => items.map(_ => self.utils.mapReverse(_, set)))), _ => _.map(_ => self.utils.parse(_))), _ => tsplus_module_3.map(tsplus_module_2.encaseMaybeInEffect_(tsplus_module_5.ChunkToNonEmptyReadonlyArray(tsplus_module_4.filterMap(_, f.collect)), () => new _errors.NotFoundError(self.itemType, JSON.stringify(f.filter))), _ => _[0])));
138
138
  }
139
139
  /**
140
140
  * @tsplus fluent Repository query
@@ -142,7 +142,7 @@ map) {
142
142
  function query(self,
143
143
  // TODO: think about collectPM, collectE, and collect(Parsed)
144
144
  map) {
145
- return queryEffect_1(self, tsplus_module_5.effectSync(() => map));
145
+ return queryEffect_1(self, tsplus_module_3.sync(() => map));
146
146
  }
147
147
  /**
148
148
  * @tsplus fluent Repository queryOne
@@ -150,7 +150,7 @@ map) {
150
150
  function queryOne(self,
151
151
  // TODO: think about collectPM, collectE, and collect(Parsed)
152
152
  map) {
153
- return queryOneEffect_1(self, tsplus_module_5.effectSync(() => map));
153
+ return queryOneEffect_1(self, tsplus_module_3.sync(() => map));
154
154
  }
155
155
  /**
156
156
  * @tsplus fluent Repository queryAndSavePureEffect
@@ -158,7 +158,7 @@ map) {
158
158
  function queryAndSavePureEffect_1(self,
159
159
  // TODO: think about collectPM, collectE, and collect(Parsed)
160
160
  map) {
161
- return pure => tsplus_module_7.untraced(restore => tsplus_module_3.flatMap(queryEffect_1(self, map), restore(_ => saveManyWithPure_1(self, _, pure))));
161
+ return pure => tsplus_module_6.untraced(restore => tsplus_module_3.flatMap(queryEffect_1(self, map), restore(_ => saveManyWithPure_1(self, _, pure))));
162
162
  }
163
163
  /**
164
164
  * @tsplus fluent Repository queryAndSavePure
@@ -166,7 +166,7 @@ map) {
166
166
  function queryAndSavePure(self,
167
167
  // TODO: think about collectPM, collectE, and collect(Parsed)
168
168
  map) {
169
- return queryAndSavePureEffect_1(self, tsplus_module_5.effectSync(() => map));
169
+ return queryAndSavePureEffect_1(self, tsplus_module_3.sync(() => map));
170
170
  }
171
171
  /**
172
172
  * @tsplus getter Repository saveManyWithPure
@@ -191,7 +191,7 @@ function handleByIdAndSaveWithPure(self) {
191
191
  * @tsplus fluent Repository saveManyWithPure_
192
192
  */
193
193
  function saveManyWithPure_1(self, items, pure) {
194
- return saveAllWithEffectInt(self, tsplus_module_1.runTerm(pure, tsplus_module_6.ext_itToChunk(items)));
194
+ return saveAllWithEffectInt(self, tsplus_module_1.runTerm(pure, tsplus_module_5.ext_itToChunk(items)));
195
195
  }
196
196
  /**
197
197
  * @tsplus fluent Repository saveWithPure_
@@ -200,7 +200,7 @@ function saveWithPure_1(self, item, pure) {
200
200
  return saveAllWithEffectInt(self, tsplus_module_3.map(tsplus_module_1.runTerm(pure, item), ([item, events, a]) => [[item], events, a]));
201
201
  }
202
202
  function saveAllWithEffectInt(self, gen) {
203
- return tsplus_module_7.untraced(restore => tsplus_module_3.flatMap(gen, ([items, events, a]) => tsplus_module_3.map(restore(() => self.saveAndPublish(items, events))(), () => a)));
203
+ return tsplus_module_6.untraced(restore => tsplus_module_3.flatMap(gen, ([items, events, a]) => tsplus_module_3.map(restore(() => self.saveAndPublish(items, events))(), () => a)));
204
204
  }
205
205
  const anyDSL = makeDSL();
206
206
  function makeAllDSL() {
@@ -211,13 +211,13 @@ function makeAllDSL() {
211
211
  * @tsplus fluent DSLExt updateWith
212
212
  */
213
213
  function updateWithOne(self, upd) {
214
- return self.update(_ => tsplus_module_5.effectSync(() => upd(_)));
214
+ return self.update(_ => tsplus_module_3.sync(() => upd(_)));
215
215
  }
216
216
  /**
217
217
  * @tsplus fluent DSLExt updateWith
218
218
  */
219
219
  function updateWith(self, upd) {
220
- return self.update(_ => tsplus_module_5.effectSync(() => upd(_)));
220
+ return self.update(_ => tsplus_module_3.sync(() => upd(_)));
221
221
  }
222
222
  function makeOneDSL() {
223
223
  return anyDSL;
@@ -239,13 +239,13 @@ function makeDSL() {
239
239
  });
240
240
  }
241
241
  function ifAny(fn) {
242
- return items => tsplus_module_5.flatMapOption(tsplus_module_5.effectSync(() => tsplus_module_6.CollectionToNonEmptyReadonlyArray(items)), fn);
242
+ return items => tsplus_module_7.flatMapOption(tsplus_module_3.sync(() => tsplus_module_5.CollectionToNonEmptyReadonlyArray(items)), fn);
243
243
  }
244
244
  /**
245
245
  * @tsplus fluent Iterable ifAny
246
246
  */
247
247
  function ifAny_(items, fn) {
248
- return tsplus_module_5.flatMapOption(tsplus_module_5.effectSync(() => tsplus_module_6.CollectionToNonEmptyReadonlyArray(items)), fn);
248
+ return tsplus_module_7.flatMapOption(tsplus_module_3.sync(() => tsplus_module_5.CollectionToNonEmptyReadonlyArray(items)), fn);
249
249
  }
250
250
  /**
251
251
  * @tsplus getter Repository save
@@ -1 +1 @@
1
- {"version":3,"file":"Repository.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;AAEA;AAAiD;AAAA;MA8CjCA,GAAG;AAAA;MAuEHC,aAAa;AAAA;MAyCbC,WAAW;AAAA;MA8BXC,cAAc;AAAA;MAsEdC,sBAAsB;AAAA;MAwDtBC,mBAAmB;AAAA;MA+BnBC,iBAAiB;AAAA;MAyBjBC,aAAa;AAAA;AA7UtB,MAAMC,UAAU,GAA2B;EAChDR,GAAG,EAAES,qBAAU;EACfC,GAAG,qBAAU;EACbC,GAAG,EAAE,CAAC,GAAGC,GAAU,KAAKH,wBAAaG,GAAG;CACzC;AAED;;;AAAA;AAGA,eAOEC,IAA0C,EAC1CC,EAAM;EAEN,OAAOC,4BAAI,CAACC,IAAI,CAACF,EAAE,CAAC,EAASG,CAAC,IAAIC,sCAAC,EAAgB,MAAM,IAAIC,qBAAa,CAACN,IAAI,CAACO,QAAQ,EAAEN,EAAE,CAAC,CAAC,CAAC;AACjG;AAEA;;;AAGM,SAAUO,MAAM,CAMpBR,IAA0C,EAAEQ,MAAoB;EAChE,OAAON,wBAAI,CAACO,GAAG,EAAKL,CAAC,IAAIM,wBAAC,EAAQF,MAAM,CAAC,CAAC;AAC5C;AAEA;;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,MAAM,CAKb3B,IAGoB;IAEpB,OAAO7B,2BAAG,CAACf,GAAG,EAASkC,KAAK,IAAIU,IAAI,CAACV,KAAK,EAAE+B,GAAG,CAAC,CAAQ;EAC1D;EAEA,SAASG,MAAM,CAIbxB,IAGqB;IAErB,OAAO7B,2BAAG,CAACf,GAAG,EAASkC,KAAK,IAAInB,wBAAI,CAACmB,KAAK,EAAE+B,GAAG,CAACtD,GAAG,CAAC,EAAKsD,GAAG,CAACvD,GAAG,CAAC,CAAQ;EAC3E;EAEA,SAAS8D,OAAO,CAKd5B,IAAoD;IAEpD,OAAOA,IAAI,CAACpC,UAAU,CAAQ;EAChC;EAEA,OAAOiE,MAAM,CAACC,MAAM,CAClBF,OAAO,EACP;IACED,MAAM;IACNH;GACD,CACF;AACH;AAIM,SAAUO,KAAK,CAAaC,EAAwD;EACxF,OAAQ1C,KAAkB,IAAKD,iHAAOC,KAAK,EAAiB,EAAY0C,EAAE,CAAC;AAC7E;AAEA;;;AAGM,SAAUC,MAAM,CAAa3C,KAAkB,EAAE0C,EAAwD;EAC7G,OAAO3C,iHAAOC,KAAK,EAAiB,EAAY0C,EAAE,CAAC;AACrD;AAEA;;;AAGM,SAAUE,IAAI,CAOlBjE,IAA0C;EAE1C,OAAO,CAAC,GAAGqB,KAAuB,KAAKrB,IAAI,CAACgD,cAAc,CAAC3B,KAAK,CAAC;AACnE;AAEA;;;AAGM,SAAU6C,cAAc,CAO5BlE,IAA0C;EAE1C,OAAQ6C,MAAqB,IAAK,CAAC,GAAGxB,KAAuB,KAAKrB,IAAI,CAACgD,cAAc,CAAC3B,KAAK,EAAEwB,MAAM,CAAC;AACtG","names":["get","projectEffect","queryEffect","queryOneEffect","queryAndSavePureEffect","byIdAndSaveWithPure","saveManyWithPure_","saveWithPure_","AnyPureDSL","tsplus_module_1","set","log","evt","self","id","tsplus_module_3","find","_","tsplus_module_2","NotFoundError","itemType","filter","all","tsplus_module_4","filterAll","map","collect","f","utils","limit","skip","project","projectEffect_1","tsplus_module_5","items","ContextMap","mapReverse","parse","JSON","stringify","query","queryEffect_1","queryOne","queryOneEffect_1","pure","tsplus_module_7","restore","saveManyWithPure_1","queryAndSavePure","queryAndSavePureEffect_1","saveManyWithPure","item","saveWithPure_1","handleByIdAndSaveWithPure","req","ctx","byIdAndSaveWithPure_1","saveAllWithEffectInt","events","a","gen","saveAndPublish","anyDSL","makeDSL","makeAllDSL","dsl","updateWithOne","upd","update","updateWith","makeOneDSL","modify","withDSL","Object","assign","ifAny","fn","ifAny_","save","saveWithEvents"],"sourceRoot":"","sources":["../../_src/services/Repository.ts"],"sourcesContent":[null]}
1
+ {"version":3,"file":"Repository.cjs","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;AAEA;AAAiD;AAAA;MA8CjCA,GAAG;AAAA;MAuEHC,aAAa;AAAA;MAyCbC,WAAW;AAAA;MA8BXC,cAAc;AAAA;MAsEdC,sBAAsB;AAAA;MAwDtBC,mBAAmB;AAAA;MA+BnBC,iBAAiB;AAAA;MAyBjBC,aAAa;AAAA;AA7UtB,MAAMC,UAAU,GAA2B;EAChDR,GAAG,EAAES,qBAAU;EACfC,GAAG,qBAAU;EACbC,GAAG,EAAE,CAAC,GAAGC,GAAU,KAAKH,wBAAaG,GAAG;CACzC;AAED;;;AAAA;AAGA,eAOEC,IAA0C,EAC1CC,EAAM;EAEN,OAAOC,4BAAI,CAACC,IAAI,CAACF,EAAE,CAAC,EAASG,CAAC,IAAIC,sCAAC,EAAgB,MAAM,IAAIC,qBAAa,CAACN,IAAI,CAACO,QAAQ,EAAEN,EAAE,CAAC,CAAC,CAAC;AACjG;AAEA;;;AAGM,SAAUO,MAAM,CAMpBR,IAA0C,EAAEQ,MAAoB;EAChE,OAAON,wBAAI,CAACO,GAAG,EAAKL,CAAC,IAAIM,wBAAC,EAAQF,MAAM,CAAC,CAAC;AAC5C;AAEA;;;AAGM,SAAUG,SAAS,CAOvBX,IAA0C,EAAEY,GAAkC;EAC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KAAK,IAAIU,IAAI,CAACV,KAAK,EAAE+B,GAAG,CAAC,CAAQ;EAC1D;EAEA,SAASG,MAAM,CAIbxB,IAGqB;IAErB,OAAO5B,2BAAG,CAACf,GAAG,EAASiC,KAAK,IAAIlB,wBAAI,CAACkB,KAAK,EAAE+B,GAAG,CAACrD,GAAG,CAAC,EAAKqD,GAAG,CAACtD,GAAG,CAAC,CAAQ;EAC3E;EAEA,SAAS6D,OAAO,CAKd5B,IAAoD;IAEpD,OAAOA,IAAI,CAACnC,UAAU,CAAQ;EAChC;EAEA,OAAOgE,MAAM,CAACC,MAAM,CAClBF,OAAO,EACP;IACED,MAAM;IACNH;GACD,CACF;AACH;AAIM,SAAUO,KAAK,CAAaC,EAAwD;EACxF,OAAQ1C,KAAkB,IAAK2C,2GAAO3C,KAAK,EAAiB,EAAY0C,EAAE,CAAC;AAC7E;AAEA;;;AAGM,SAAUE,MAAM,CAAa5C,KAAkB,EAAE0C,EAAwD;EAC7G,OAAOC,2GAAO3C,KAAK,EAAiB,EAAY0C,EAAE,CAAC;AACrD;AAEA;;;AAGM,SAAUG,IAAI,CAOlBjE,IAA0C;EAE1C,OAAO,CAAC,GAAGoB,KAAuB,KAAKpB,IAAI,CAAC+C,cAAc,CAAC3B,KAAK,CAAC;AACnE;AAEA;;;AAGM,SAAU8C,cAAc,CAO5BlE,IAA0C;EAE1C,OAAQ4C,MAAqB,IAAK,CAAC,GAAGxB,KAAuB,KAAKpB,IAAI,CAAC+C,cAAc,CAAC3B,KAAK,EAAEwB,MAAM,CAAC;AACtG","names":["get","projectEffect","queryEffect","queryOneEffect","queryAndSavePureEffect","byIdAndSaveWithPure","saveManyWithPure_","saveWithPure_","AnyPureDSL","tsplus_module_1","set","log","evt","self","id","tsplus_module_3","find","_","tsplus_module_2","NotFoundError","itemType","filter","all","tsplus_module_4","filterAll","map","collect","f","utils","limit","skip","project","projectEffect_1","items","ContextMap","mapReverse","parse","JSON","stringify","query","queryEffect_1","queryOne","queryOneEffect_1","pure","tsplus_module_6","restore","saveManyWithPure_1","queryAndSavePure","queryAndSavePureEffect_1","saveManyWithPure","item","saveWithPure_1","handleByIdAndSaveWithPure","req","ctx","byIdAndSaveWithPure_1","saveAllWithEffectInt","events","a","gen","saveAndPublish","anyDSL","makeDSL","makeAllDSL","dsl","updateWithOne","upd","update","updateWith","makeOneDSL","modify","withDSL","Object","assign","ifAny","fn","tsplus_module_7","ifAny_","save","saveWithEvents"],"sourceRoot":"","sources":["../../_src/services/Repository.ts"],"sourcesContent":[null]}