appwrite-utils-cli 0.9.2 → 0.9.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 +3 -1
- package/dist/interactiveCLI.d.ts +3 -2
- package/dist/interactiveCLI.js +28 -59
- package/dist/main.js +18 -3
- package/dist/migrations/setupDatabase.js +28 -6
- package/dist/setupCommands.d.ts +1 -0
- package/dist/setupCommands.js +1 -0
- package/dist/setupController.d.ts +6 -0
- package/dist/setupController.js +17 -0
- package/dist/utils/schemaStrings.js +37 -37
- package/dist/utils/setupFiles.d.ts +1 -1
- package/dist/utils/setupFiles.js +2 -2
- package/dist/utilsController.js +2 -0
- package/package.json +53 -53
- package/src/collections/attributes.ts +483 -483
- package/src/collections/indexes.ts +53 -53
- package/src/collections/methods.ts +331 -331
- package/src/interactiveCLI.ts +722 -767
- package/src/main.ts +20 -3
- package/src/migrations/helper.ts +40 -40
- package/src/migrations/setupDatabase.ts +54 -21
- package/src/migrations/transfer.ts +608 -608
- package/src/setupCommands.ts +0 -0
- package/src/setupController.ts +25 -0
- package/src/storage/methods.ts +371 -371
- package/src/storage/schemas.ts +205 -205
- package/src/utils/getClientFromConfig.ts +17 -17
- package/src/utils/retryFailedPromises.ts +27 -27
- package/src/utils/schemaStrings.ts +473 -473
- package/src/utils/setupFiles.ts +5 -2
- package/src/utilsController.ts +1 -0
package/src/utils/setupFiles.ts
CHANGED
@@ -158,8 +158,11 @@ export default ${collectionName};`;
|
|
158
158
|
writeFileSync(collectionFilePath, emptyCollection);
|
159
159
|
};
|
160
160
|
|
161
|
-
export const setupDirsFiles = async (
|
162
|
-
|
161
|
+
export const setupDirsFiles = async (
|
162
|
+
example: boolean = false,
|
163
|
+
currentDir?: string
|
164
|
+
) => {
|
165
|
+
const basePath = currentDir || process.cwd();
|
163
166
|
const srcPath = path.join(basePath);
|
164
167
|
|
165
168
|
// Check if src directory exists in the current working directory
|
package/src/utilsController.ts
CHANGED
@@ -161,6 +161,7 @@ export class UtilsController {
|
|
161
161
|
if (!this.database || !this.config)
|
162
162
|
throw new Error("Database or config not initialized");
|
163
163
|
for (const database of databases) {
|
164
|
+
if (database.$id === "migrations") continue;
|
164
165
|
await this.createOrUpdateCollections(database);
|
165
166
|
}
|
166
167
|
}
|