appwrite-utils-cli 1.0.2 → 1.0.4
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
@@ -377,6 +377,8 @@ This updated CLI ensures that developers have robust tools at their fingertips t
|
|
377
377
|
|
378
378
|
### Changelog
|
379
379
|
|
380
|
+
- 1.0.4: Fixed `appwriteConfig.yaml` being the name for the converted config, instead of `config.yaml`
|
381
|
+
- 1.0.3: Fixed appwriteConfig detection for `--it` so it detects when you can migrate your config
|
380
382
|
- 1.0.2: Fixed migrations, sorry about that!
|
381
383
|
|
382
384
|
**Migration Note**: While fully backward compatible, we recommend migrating to YAML configuration for the best experience. Use `--setup` to generate new YAML configurations.
|
package/dist/interactiveCLI.js
CHANGED
@@ -1393,11 +1393,14 @@ export class InteractiveCLI {
|
|
1393
1393
|
}
|
1394
1394
|
// Then check for TypeScript config
|
1395
1395
|
const configPath = findAppwriteConfig(this.currentDir);
|
1396
|
-
if (configPath
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1396
|
+
if (configPath) {
|
1397
|
+
const tsConfigPath = join(configPath, 'appwriteConfig.ts');
|
1398
|
+
if (fs.existsSync(tsConfigPath)) {
|
1399
|
+
this.isUsingTypeScriptConfig = true;
|
1400
|
+
MessageFormatter.info("TypeScript configuration detected", { prefix: "Config" });
|
1401
|
+
MessageFormatter.info("Consider migrating to YAML for better organization", { prefix: "Config" });
|
1402
|
+
return;
|
1403
|
+
}
|
1401
1404
|
}
|
1402
1405
|
// No config found
|
1403
1406
|
this.isUsingTypeScriptConfig = false;
|
@@ -68,7 +68,7 @@ async function migrateConfigFile(configFilePath, workingDir) {
|
|
68
68
|
lineWidth: 120,
|
69
69
|
noRefs: true
|
70
70
|
});
|
71
|
-
await fs.writeFile(path.join(appwriteDir, '
|
71
|
+
await fs.writeFile(path.join(appwriteDir, 'config.yaml'), yamlContent);
|
72
72
|
// Copy all directories except collections and schemas (we handle collections separately, skip schemas entirely)
|
73
73
|
const entries = await fs.readdir(configDir, { withFileTypes: true });
|
74
74
|
for (const entry of entries) {
|
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.0.
|
4
|
+
"version": "1.0.4",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
package/src/interactiveCLI.ts
CHANGED
@@ -1914,11 +1914,14 @@ export class InteractiveCLI {
|
|
1914
1914
|
|
1915
1915
|
// Then check for TypeScript config
|
1916
1916
|
const configPath = findAppwriteConfig(this.currentDir);
|
1917
|
-
if (configPath
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1917
|
+
if (configPath) {
|
1918
|
+
const tsConfigPath = join(configPath, 'appwriteConfig.ts');
|
1919
|
+
if (fs.existsSync(tsConfigPath)) {
|
1920
|
+
this.isUsingTypeScriptConfig = true;
|
1921
|
+
MessageFormatter.info("TypeScript configuration detected", { prefix: "Config" });
|
1922
|
+
MessageFormatter.info("Consider migrating to YAML for better organization", { prefix: "Config" });
|
1923
|
+
return;
|
1924
|
+
}
|
1922
1925
|
}
|
1923
1926
|
|
1924
1927
|
// No config found
|
@@ -135,7 +135,7 @@ async function migrateConfigFile(configFilePath: string, workingDir: string): Pr
|
|
135
135
|
lineWidth: 120,
|
136
136
|
noRefs: true
|
137
137
|
});
|
138
|
-
await fs.writeFile(path.join(appwriteDir, '
|
138
|
+
await fs.writeFile(path.join(appwriteDir, 'config.yaml'), yamlContent);
|
139
139
|
|
140
140
|
// Copy all directories except collections and schemas (we handle collections separately, skip schemas entirely)
|
141
141
|
const entries = await fs.readdir(configDir, { withFileTypes: true });
|