appwrite-utils-cli 1.2.22 → 1.2.23
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/utilsController.js
CHANGED
@@ -20,6 +20,8 @@ import { deployLocalFunction } from "./functions/deployments.js";
|
|
20
20
|
import fs from "node:fs";
|
21
21
|
import { configureLogging, updateLogger } from "./shared/logging.js";
|
22
22
|
import { MessageFormatter, Messages } from "./shared/messageFormatter.js";
|
23
|
+
import { SchemaGenerator } from "./shared/schemaGenerator.js";
|
24
|
+
import { findYamlConfig } from "./config/yamlConfig.js";
|
23
25
|
export class UtilsController {
|
24
26
|
appwriteFolderPath;
|
25
27
|
appwriteConfigPath;
|
@@ -398,6 +400,11 @@ export class UtilsController {
|
|
398
400
|
await appwriteToX.toSchemas(databases);
|
399
401
|
// Update the controller's config with the synchronized collections
|
400
402
|
this.config = appwriteToX.updatedConfig;
|
403
|
+
// Write the updated config back to disk
|
404
|
+
const generator = new SchemaGenerator(this.config, this.appwriteFolderPath);
|
405
|
+
const yamlConfigPath = findYamlConfig(this.appwriteFolderPath);
|
406
|
+
const isYamlProject = !!yamlConfigPath;
|
407
|
+
await generator.updateConfig(this.config, isYamlProject);
|
401
408
|
}
|
402
409
|
async syncDb(databases = [], collections = []) {
|
403
410
|
await this.init();
|
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": "1.2.
|
4
|
+
"version": "1.2.23",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
package/src/utilsController.ts
CHANGED
@@ -68,6 +68,8 @@ import { deployLocalFunction } from "./functions/deployments.js";
|
|
68
68
|
import fs from "node:fs";
|
69
69
|
import { configureLogging, updateLogger } from "./shared/logging.js";
|
70
70
|
import { MessageFormatter, Messages } from "./shared/messageFormatter.js";
|
71
|
+
import { SchemaGenerator } from "./shared/schemaGenerator.js";
|
72
|
+
import { findYamlConfig } from "./config/yamlConfig.js";
|
71
73
|
|
72
74
|
export interface SetupOptions {
|
73
75
|
databases?: Models.Database[];
|
@@ -569,6 +571,12 @@ export class UtilsController {
|
|
569
571
|
|
570
572
|
// Update the controller's config with the synchronized collections
|
571
573
|
this.config = appwriteToX.updatedConfig;
|
574
|
+
|
575
|
+
// Write the updated config back to disk
|
576
|
+
const generator = new SchemaGenerator(this.config, this.appwriteFolderPath);
|
577
|
+
const yamlConfigPath = findYamlConfig(this.appwriteFolderPath);
|
578
|
+
const isYamlProject = !!yamlConfigPath;
|
579
|
+
await generator.updateConfig(this.config, isYamlProject);
|
572
580
|
}
|
573
581
|
|
574
582
|
async syncDb(
|