@mastra/pg 0.10.2-alpha.2 → 0.10.2-alpha.3
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +6 -9
- package/dist/index.js +6 -9
- package/package.json +3 -3
- package/src/storage/index.ts +6 -9
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/pg@0.10.2-alpha.
|
|
2
|
+
> @mastra/pg@0.10.2-alpha.3 build /home/runner/work/mastra/mastra/stores/pg
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.5.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 10698ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/pg/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.3
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/pg/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 10174ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
20
|
[32mESM[39m [1mdist/index.js [22m[32m67.23 KB[39m
|
|
21
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 1908ms
|
|
22
22
|
[32mCJS[39m [1mdist/index.cjs [22m[32m67.79 KB[39m
|
|
23
|
-
[32mCJS[39m ⚡️ Build success in
|
|
23
|
+
[32mCJS[39m ⚡️ Build success in 1909ms
|
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1485,15 +1485,12 @@ var PostgresStore = class extends storage.MastraStorage {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
const finalQuery = unionQueries.join(" UNION ALL ") + ' ORDER BY "createdAt" ASC';
|
|
1487
1487
|
const includedRows = await this.db.manyOrNone(finalQuery, params);
|
|
1488
|
-
const
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
{}
|
|
1495
|
-
)
|
|
1496
|
-
);
|
|
1488
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1489
|
+
const dedupedRows = includedRows.filter((row) => {
|
|
1490
|
+
if (seen.has(row.id)) return false;
|
|
1491
|
+
seen.add(row.id);
|
|
1492
|
+
return true;
|
|
1493
|
+
});
|
|
1497
1494
|
rows = dedupedRows;
|
|
1498
1495
|
} else {
|
|
1499
1496
|
const limit = typeof selectBy?.last === `number` ? selectBy.last : 40;
|
package/dist/index.js
CHANGED
|
@@ -1477,15 +1477,12 @@ var PostgresStore = class extends MastraStorage {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
const finalQuery = unionQueries.join(" UNION ALL ") + ' ORDER BY "createdAt" ASC';
|
|
1479
1479
|
const includedRows = await this.db.manyOrNone(finalQuery, params);
|
|
1480
|
-
const
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
{}
|
|
1487
|
-
)
|
|
1488
|
-
);
|
|
1480
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1481
|
+
const dedupedRows = includedRows.filter((row) => {
|
|
1482
|
+
if (seen.has(row.id)) return false;
|
|
1483
|
+
seen.add(row.id);
|
|
1484
|
+
return true;
|
|
1485
|
+
});
|
|
1489
1486
|
rows = dedupedRows;
|
|
1490
1487
|
} else {
|
|
1491
1488
|
const limit = typeof selectBy?.last === `number` ? selectBy.last : 40;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/pg",
|
|
3
|
-
"version": "0.10.2-alpha.
|
|
3
|
+
"version": "0.10.2-alpha.3",
|
|
4
4
|
"description": "Postgres provider for Mastra - includes both vector and db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"typescript": "^5.8.2",
|
|
35
35
|
"vitest": "^3.2.2",
|
|
36
36
|
"@internal/lint": "0.0.10",
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
37
|
+
"@internal/storage-test-utils": "0.0.6",
|
|
38
|
+
"@mastra/core": "0.10.4-alpha.3"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@mastra/core": "^0.10.2-alpha.0"
|
package/src/storage/index.ts
CHANGED
|
@@ -761,15 +761,12 @@ export class PostgresStore extends MastraStorage {
|
|
|
761
761
|
}
|
|
762
762
|
const finalQuery = unionQueries.join(' UNION ALL ') + ' ORDER BY "createdAt" ASC';
|
|
763
763
|
const includedRows = await this.db.manyOrNone(finalQuery, params);
|
|
764
|
-
const
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
{} as Record<string, (typeof includedRows)[0]>,
|
|
771
|
-
),
|
|
772
|
-
);
|
|
764
|
+
const seen = new Set<string>();
|
|
765
|
+
const dedupedRows = includedRows.filter(row => {
|
|
766
|
+
if (seen.has(row.id)) return false;
|
|
767
|
+
seen.add(row.id);
|
|
768
|
+
return true;
|
|
769
|
+
});
|
|
773
770
|
rows = dedupedRows;
|
|
774
771
|
} else {
|
|
775
772
|
const limit = typeof selectBy?.last === `number` ? selectBy.last : 40;
|