appwrite-utils-cli 0.0.245 → 0.0.246
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/migrations/users.js
CHANGED
@@ -51,15 +51,15 @@ export class UsersController {
|
|
51
51
|
}
|
52
52
|
return finalBatches;
|
53
53
|
};
|
54
|
-
const userPromises = [];
|
54
|
+
// const userPromises: Promise<string>[] = [];
|
55
55
|
for (const user of allUsers) {
|
56
|
-
|
57
|
-
}
|
58
|
-
const batchedUserPromises = createBatches(userPromises);
|
59
|
-
for (const batch of batchedUserPromises) {
|
60
|
-
console.log(`Deleting ${batch.length} users...`);
|
61
|
-
await Promise.all(batch);
|
56
|
+
await this.users.delete(user.$id);
|
62
57
|
}
|
58
|
+
// const batchedUserPromises = createBatches(userPromises);
|
59
|
+
// for (const batch of batchedUserPromises) {
|
60
|
+
// console.log(`Deleting ${batch.length} users...`);
|
61
|
+
// await Promise.all(batch);
|
62
|
+
// }
|
63
63
|
}
|
64
64
|
async getAllUsers() {
|
65
65
|
const allUsers = [];
|
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.0.
|
4
|
+
"version": "0.0.246",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
package/src/migrations/users.ts
CHANGED
@@ -59,15 +59,15 @@ export class UsersController {
|
|
59
59
|
}
|
60
60
|
return finalBatches;
|
61
61
|
};
|
62
|
-
const userPromises: Promise<string>[] = [];
|
62
|
+
// const userPromises: Promise<string>[] = [];
|
63
63
|
for (const user of allUsers) {
|
64
|
-
|
65
|
-
}
|
66
|
-
const batchedUserPromises = createBatches(userPromises);
|
67
|
-
for (const batch of batchedUserPromises) {
|
68
|
-
console.log(`Deleting ${batch.length} users...`);
|
69
|
-
await Promise.all(batch);
|
64
|
+
await this.users.delete(user.$id);
|
70
65
|
}
|
66
|
+
// const batchedUserPromises = createBatches(userPromises);
|
67
|
+
// for (const batch of batchedUserPromises) {
|
68
|
+
// console.log(`Deleting ${batch.length} users...`);
|
69
|
+
// await Promise.all(batch);
|
70
|
+
// }
|
71
71
|
}
|
72
72
|
|
73
73
|
async getAllUsers() {
|