appwrite-utils-cli 1.2.15 → 1.2.17
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 +2 -0
- package/dist/collections/indexes.js +6 -7
- package/dist/migrations/comprehensiveTransfer.js +196 -101
- package/dist/migrations/transfer.js +6 -0
- package/package.json +1 -1
- package/src/collections/indexes.ts +6 -7
- package/src/migrations/comprehensiveTransfer.ts +891 -364
- package/src/migrations/transfer.ts +12 -0
package/README.md
CHANGED
@@ -637,6 +637,8 @@ npx appwrite-utils-cli appwrite-migrate --generateConstants --constantsLanguages
|
|
637
637
|
|
638
638
|
### Changelog
|
639
639
|
|
640
|
+
- 1.2.17: Fixed users transfer not keeping validation of email / phone, temporarily disable bulk transfer to see if permissions aren't being updated by it
|
641
|
+
- 1.2.15: Fixed various transfer and sync functionalities
|
640
642
|
- 1.0.5: Fixed `.` directories being ignored. Normally a good thing
|
641
643
|
- 1.0.4: Fixed `appwriteConfig.yaml` being the name for the converted config, instead of `config.yaml`
|
642
644
|
- 1.0.3: Fixed appwriteConfig detection for `--it` so it detects when you can migrate your config
|
@@ -66,7 +66,7 @@ retryCount = 0, maxRetries = 5) => {
|
|
66
66
|
/**
|
67
67
|
* Enhanced index creation with proper status monitoring and retry logic
|
68
68
|
*/
|
69
|
-
export const createOrUpdateIndexWithStatusCheck = async (dbId, db, collectionId, collection, index, retryCount = 0, maxRetries =
|
69
|
+
export const createOrUpdateIndexWithStatusCheck = async (dbId, db, collectionId, collection, index, retryCount = 0, maxRetries = 3) => {
|
70
70
|
console.log(chalk.blue(`Creating/updating index '${index.key}' (attempt ${retryCount + 1}/${maxRetries + 1})`));
|
71
71
|
try {
|
72
72
|
// First, validate that all required attributes exist
|
@@ -101,10 +101,10 @@ export const createOrUpdateIndexWithStatusCheck = async (dbId, db, collectionId,
|
|
101
101
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
102
102
|
console.log(chalk.red(`Error creating index '${index.key}': ${errorMessage}`));
|
103
103
|
// Check if this is a permanent error that shouldn't be retried
|
104
|
-
if (errorMessage.includes('not found') ||
|
105
|
-
errorMessage.includes('missing') ||
|
106
|
-
errorMessage.includes('does not exist') ||
|
107
|
-
errorMessage.includes('attribute') && errorMessage.includes('not found')) {
|
104
|
+
if (errorMessage.toLowerCase().includes('not found') ||
|
105
|
+
errorMessage.toLowerCase().includes('missing') ||
|
106
|
+
errorMessage.toLowerCase().includes('does not exist') ||
|
107
|
+
errorMessage.toLowerCase().includes('attribute') && errorMessage.toLowerCase().includes('not found')) {
|
108
108
|
console.log(chalk.red(`❌ Index '${index.key}' has permanent error - not retrying`));
|
109
109
|
return false;
|
110
110
|
}
|
@@ -170,8 +170,7 @@ export const createOrUpdateIndex = async (dbId, db, collectionId, index) => {
|
|
170
170
|
if (existingIndex.total > 0 &&
|
171
171
|
!existingIndex.indexes.some((existingIndex) => (existingIndex.key === index.key &&
|
172
172
|
existingIndex.type === index.type &&
|
173
|
-
existingIndex.attributes === index.attributes)
|
174
|
-
JSON.stringify(existingIndex) === JSON.stringify(index))) {
|
173
|
+
existingIndex.attributes === index.attributes))) {
|
175
174
|
await db.deleteIndex(dbId, collectionId, existingIndex.indexes[0].key);
|
176
175
|
createIndex = true;
|
177
176
|
}
|