appwrite-utils-cli 1.5.1 → 1.5.2
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/interactiveCLI.js +7 -1
- package/package.json +1 -1
- package/src/interactiveCLI.ts +8 -5
package/dist/interactiveCLI.js
CHANGED
@@ -235,7 +235,13 @@ export class InteractiveCLI {
|
|
235
235
|
...configCollections.filter((c) => !remoteCollections.some((rc) => rc.name === c.name)),
|
236
236
|
];
|
237
237
|
if (shouldFilterByDatabase) {
|
238
|
-
|
238
|
+
// Keep local entries that don't have databaseId (common in config),
|
239
|
+
// but still filter remote collections by selected database.
|
240
|
+
allCollections = allCollections.filter((c) => {
|
241
|
+
if (!c.databaseId)
|
242
|
+
return true;
|
243
|
+
return c.databaseId === database.$id;
|
244
|
+
});
|
239
245
|
}
|
240
246
|
const hasLocalAndRemote = allCollections.some((coll) => configCollections.some((c) => c.name === coll.name)) &&
|
241
247
|
allCollections.some((coll) => !configCollections.some((c) => c.name === coll.name));
|
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.5.
|
4
|
+
"version": "1.5.2",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
package/src/interactiveCLI.ts
CHANGED
@@ -312,11 +312,14 @@ export class InteractiveCLI {
|
|
312
312
|
),
|
313
313
|
];
|
314
314
|
|
315
|
-
if (shouldFilterByDatabase) {
|
316
|
-
|
317
|
-
|
318
|
-
)
|
319
|
-
|
315
|
+
if (shouldFilterByDatabase) {
|
316
|
+
// Keep local entries that don't have databaseId (common in config),
|
317
|
+
// but still filter remote collections by selected database.
|
318
|
+
allCollections = allCollections.filter((c) => {
|
319
|
+
if (!c.databaseId) return true;
|
320
|
+
return c.databaseId === database.$id;
|
321
|
+
});
|
322
|
+
}
|
320
323
|
|
321
324
|
const hasLocalAndRemote =
|
322
325
|
allCollections.some((coll) =>
|