@event-driven-io/emmett-postgresql 0.34.0 → 0.35.0-alpha.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.
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
dumbo as dumbo4
|
|
4
4
|
} from "@event-driven-io/dumbo";
|
|
5
5
|
|
|
6
|
-
// ../emmett/dist/chunk-
|
|
6
|
+
// ../emmett/dist/chunk-BQYVGGNE.js
|
|
7
7
|
var isNumber = (val) => typeof val === "number" && val === val;
|
|
8
8
|
var isString = (val) => typeof val === "string";
|
|
9
9
|
var isErrorConstructor = (expect) => {
|
|
@@ -39,6 +39,7 @@ import { v4 as uuid2 } from "uuid";
|
|
|
39
39
|
import { v4 as uuid } from "uuid";
|
|
40
40
|
import { TransformStream as TransformStream2 } from "web-streams-polyfill";
|
|
41
41
|
import retry from "async-retry";
|
|
42
|
+
import { v7 as uuid4 } from "uuid";
|
|
42
43
|
import { ReadableStream } from "web-streams-polyfill";
|
|
43
44
|
import "web-streams-polyfill";
|
|
44
45
|
import { TransformStream as TransformStream3 } from "web-streams-polyfill";
|
|
@@ -623,7 +624,7 @@ import {
|
|
|
623
624
|
single,
|
|
624
625
|
sql as sql3
|
|
625
626
|
} from "@event-driven-io/dumbo";
|
|
626
|
-
import { v4 as
|
|
627
|
+
import { v4 as uuid5 } from "uuid";
|
|
627
628
|
var appendToStreamSQL = rawSql(
|
|
628
629
|
`CREATE OR REPLACE FUNCTION emt_append_to_stream(
|
|
629
630
|
v_message_ids text[],
|
|
@@ -725,7 +726,7 @@ var appendToStream = (pool, streamName, streamType, messages, options) => pool.w
|
|
|
725
726
|
kind: e.kind ?? "Event",
|
|
726
727
|
metadata: {
|
|
727
728
|
streamName,
|
|
728
|
-
messageId:
|
|
729
|
+
messageId: uuid5(),
|
|
729
730
|
streamPosition: BigInt(i),
|
|
730
731
|
..."metadata" in e ? e.metadata ?? {} : {}
|
|
731
732
|
}
|
|
@@ -1710,7 +1711,7 @@ var pongoSingleStreamProjection = (options) => {
|
|
|
1710
1711
|
import {
|
|
1711
1712
|
dumbo as dumbo3
|
|
1712
1713
|
} from "@event-driven-io/dumbo";
|
|
1713
|
-
import { v4 as
|
|
1714
|
+
import { v4 as uuid6 } from "uuid";
|
|
1714
1715
|
var PostgreSQLProjectionSpec = {
|
|
1715
1716
|
for: (options) => {
|
|
1716
1717
|
{
|
|
@@ -1730,8 +1731,8 @@ var PostgreSQLProjectionSpec = {
|
|
|
1730
1731
|
const metadata = {
|
|
1731
1732
|
globalPosition: ++globalPosition,
|
|
1732
1733
|
streamPosition: globalPosition,
|
|
1733
|
-
streamName: `test-${
|
|
1734
|
-
messageId:
|
|
1734
|
+
streamName: `test-${uuid6()}`,
|
|
1735
|
+
messageId: uuid6()
|
|
1735
1736
|
};
|
|
1736
1737
|
allEvents.push({
|
|
1737
1738
|
...event,
|