@mastra/cloudflare 0.10.2-alpha.0 → 0.10.2-alpha.1
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 +19 -1
- package/dist/index.js +19 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -86,7 +86,25 @@ var CloudflareStore = class extends storage.MastraStorage {
|
|
|
86
86
|
}))
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
let allNamespaces = [];
|
|
90
|
+
let currentPage = 1;
|
|
91
|
+
const perPage = 50;
|
|
92
|
+
let morePagesExist = true;
|
|
93
|
+
while (morePagesExist) {
|
|
94
|
+
const response = await this.client.kv.namespaces.list({
|
|
95
|
+
account_id: this.accountId,
|
|
96
|
+
page: currentPage,
|
|
97
|
+
per_page: perPage
|
|
98
|
+
});
|
|
99
|
+
if (response.result) {
|
|
100
|
+
allNamespaces = allNamespaces.concat(response.result);
|
|
101
|
+
}
|
|
102
|
+
morePagesExist = response.result ? response.result.length === perPage : false;
|
|
103
|
+
if (morePagesExist) {
|
|
104
|
+
currentPage++;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return { result: allNamespaces };
|
|
90
108
|
}
|
|
91
109
|
async getNamespaceValue(tableName, key) {
|
|
92
110
|
try {
|
package/dist/index.js
CHANGED
|
@@ -80,7 +80,25 @@ var CloudflareStore = class extends MastraStorage {
|
|
|
80
80
|
}))
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
let allNamespaces = [];
|
|
84
|
+
let currentPage = 1;
|
|
85
|
+
const perPage = 50;
|
|
86
|
+
let morePagesExist = true;
|
|
87
|
+
while (morePagesExist) {
|
|
88
|
+
const response = await this.client.kv.namespaces.list({
|
|
89
|
+
account_id: this.accountId,
|
|
90
|
+
page: currentPage,
|
|
91
|
+
per_page: perPage
|
|
92
|
+
});
|
|
93
|
+
if (response.result) {
|
|
94
|
+
allNamespaces = allNamespaces.concat(response.result);
|
|
95
|
+
}
|
|
96
|
+
morePagesExist = response.result ? response.result.length === perPage : false;
|
|
97
|
+
if (morePagesExist) {
|
|
98
|
+
currentPage++;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return { result: allNamespaces };
|
|
84
102
|
}
|
|
85
103
|
async getNamespaceValue(tableName, key) {
|
|
86
104
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/cloudflare",
|
|
3
|
-
"version": "0.10.2-alpha.
|
|
3
|
+
"version": "0.10.2-alpha.1",
|
|
4
4
|
"description": "Cloudflare provider for Mastra - includes db storage capabilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"typescript": "^5.8.2",
|
|
37
37
|
"vitest": "^3.1.2",
|
|
38
38
|
"@internal/lint": "0.0.7",
|
|
39
|
-
"@mastra/core": "0.10.2-alpha.
|
|
39
|
+
"@mastra/core": "0.10.2-alpha.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@mastra/core": "^0.10.0"
|