appwrite-utils-cli 0.0.73 → 0.0.74
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/README.md
CHANGED
@@ -132,6 +132,7 @@ This setup ensures that developers have robust tools at their fingertips to mana
|
|
132
132
|
|
133
133
|
### Changelog
|
134
134
|
|
135
|
+
- 0.0.74: Added `--backup` support, even if only one database
|
135
136
|
- 0.0.73: Fixed weird `workspace` issue
|
136
137
|
- 0.0.72: Remove `ulid` for `ulidx`, fixing compatibility issues
|
137
138
|
- 0.0.71: Slight change to file download logic after errors
|
@@ -131,6 +131,9 @@ export const startSetup = async (database, storage, config, setupOptions, appwri
|
|
131
131
|
console.log(`Starting setup for database: ${db.name}`);
|
132
132
|
console.log(`---------------------------------`);
|
133
133
|
let deletedCollections;
|
134
|
+
if (config.enableBackups && setupOptions.doBackup) {
|
135
|
+
await backupDatabase(database, db.$id, storage);
|
136
|
+
}
|
134
137
|
if (setupOptions.wipeDatabases && processDatabase) {
|
135
138
|
if (config.enableBackups && setupOptions.doBackup) {
|
136
139
|
await backupDatabase(database, db.$id, storage);
|
package/dist/utilsController.js
CHANGED
@@ -15,7 +15,7 @@ import { findAppwriteConfig } from "./utils/loadConfigs.js";
|
|
15
15
|
import { transferDocumentsBetweenDbsLocalToLocal, transferDocumentsBetweenDbsLocalToRemote, } from "./migrations/collections.js";
|
16
16
|
import { UsersController } from "./migrations/users.js";
|
17
17
|
import { transferDatabaseLocalToLocal, transferDatabaseLocalToRemote, } from "./migrations/databases.js";
|
18
|
-
import { transferStorageLocalToLocal, transferStorageLocalToRemote, } from "./migrations/storage.js";
|
18
|
+
import { backupDatabase, transferStorageLocalToLocal, transferStorageLocalToRemote, } from "./migrations/storage.js";
|
19
19
|
export class UtilsController {
|
20
20
|
appwriteFolderPath;
|
21
21
|
appwriteConfigPath;
|
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.74",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
@@ -211,6 +211,10 @@ export const startSetup = async (
|
|
211
211
|
| { collectionId: string; collectionName: string }[]
|
212
212
|
| undefined;
|
213
213
|
|
214
|
+
if (config.enableBackups && setupOptions.doBackup) {
|
215
|
+
await backupDatabase(database, db.$id, storage);
|
216
|
+
}
|
217
|
+
|
214
218
|
if (setupOptions.wipeDatabases && processDatabase) {
|
215
219
|
if (config.enableBackups && setupOptions.doBackup) {
|
216
220
|
await backupDatabase(database, db.$id, storage);
|