appwrite-utils-cli 0.10.83 → 0.10.84
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.
@@ -95,7 +95,7 @@ async function wipeDocumentsFromCollection(database, databaseId, collectionId) {
|
|
95
95
|
? initialDocuments.documents[initialDocuments.documents.length - 1].$id
|
96
96
|
: undefined;
|
97
97
|
while (cursor) {
|
98
|
-
const docsResponse = await database.listDocuments(databaseId, collectionId, [Query.limit(1000)]);
|
98
|
+
const docsResponse = await database.listDocuments(databaseId, collectionId, [Query.limit(1000), ...(cursor ? [Query.cursorAfter(cursor)] : [])]);
|
99
99
|
documents.push(...docsResponse.documents);
|
100
100
|
totalDocuments = documents.length;
|
101
101
|
cursor =
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "appwrite-utils-cli",
|
3
3
|
"description": "Appwrite Utility Functions to help with database management, data conversion, data import, migrations, and much more. Meant to be used as a CLI tool, I do not recommend installing this in frontend environments.",
|
4
|
-
"version": "0.10.
|
4
|
+
"version": "0.10.84",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
@@ -157,7 +157,7 @@ async function wipeDocumentsFromCollection(
|
|
157
157
|
const docsResponse = await database.listDocuments(
|
158
158
|
databaseId,
|
159
159
|
collectionId,
|
160
|
-
[Query.limit(1000)]
|
160
|
+
[Query.limit(1000), ...(cursor ? [Query.cursorAfter(cursor)] : [])]
|
161
161
|
);
|
162
162
|
documents.push(...docsResponse.documents);
|
163
163
|
totalDocuments = documents.length;
|