appwrite-utils-cli 0.9.96 → 0.9.97

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.
@@ -80,8 +80,8 @@ export class ImportController {
80
80
  const collectionsToImport = specificCollections || (this.config.collections ? this.config.collections.map(c => c.name) : []);
81
81
  for (const collection of this.config.collections || []) {
82
82
  if (collectionsToImport.includes(collection.name)) {
83
- let isUsersCollection = dataLoader.getCollectionKey(this.config.usersCollectionName) ===
84
- dataLoader.getCollectionKey(collection.name);
83
+ let isUsersCollection = this.config.usersCollectionName && (dataLoader.getCollectionKey(this.config.usersCollectionName) ===
84
+ dataLoader.getCollectionKey(collection.name));
85
85
  const importOperationId = dataLoader.collectionImportOperations.get(dataLoader.getCollectionKey(collection.name));
86
86
  const createBatches = (finalData) => {
87
87
  let maxBatchLength = 50;
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": "0.9.96",
4
+ "version": "0.9.97",
5
5
  "main": "src/main.ts",
6
6
  "type": "module",
7
7
  "repository": {
@@ -147,9 +147,8 @@ export class ImportController {
147
147
 
148
148
  for (const collection of this.config.collections || []) {
149
149
  if (collectionsToImport.includes(collection.name)) {
150
- let isUsersCollection =
151
- dataLoader.getCollectionKey(this.config.usersCollectionName) ===
152
- dataLoader.getCollectionKey(collection.name);
150
+ let isUsersCollection = this.config.usersCollectionName && (dataLoader.getCollectionKey(this.config.usersCollectionName) ===
151
+ dataLoader.getCollectionKey(collection.name));
153
152
  const importOperationId = dataLoader.collectionImportOperations.get(
154
153
  dataLoader.getCollectionKey(collection.name)
155
154
  );