appwrite-utils-cli 0.9.84 → 0.9.86

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.
@@ -111,6 +111,9 @@ export class SchemaGenerator {
111
111
  return;
112
112
  }
113
113
  this.config.collections.forEach((collection) => {
114
+ if (!collection.attributes) {
115
+ return;
116
+ }
114
117
  collection.attributes.forEach((attr) => {
115
118
  if (attr.type === "relationship" && attr.twoWay && attr.twoWayKey) {
116
119
  const relationshipAttr = attr;
@@ -43,6 +43,7 @@ export const loadConfig = async (configDir) => {
43
43
  for (const file of collectionFiles) {
44
44
  const filePath = path.join(collectionsDir, file);
45
45
  const fileUrl = pathToFileURL(filePath).href;
46
+ console.log(`Loading collection from: ${fileUrl}`);
46
47
  const collectionModule = (await import(fileUrl)).default;
47
48
  config.collections.push(collectionModule);
48
49
  }
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.84",
4
+ "version": "0.9.86",
5
5
  "main": "src/main.ts",
6
6
  "type": "module",
7
7
  "repository": {
@@ -145,6 +145,9 @@ export class SchemaGenerator {
145
145
  return;
146
146
  }
147
147
  this.config.collections.forEach((collection) => {
148
+ if (!collection.attributes) {
149
+ return;
150
+ }
148
151
  collection.attributes.forEach((attr) => {
149
152
  if (attr.type === "relationship" && attr.twoWay && attr.twoWayKey) {
150
153
  const relationshipAttr = attr as RelationshipAttribute;
@@ -51,6 +51,7 @@ export const loadConfig = async (
51
51
  for (const file of collectionFiles) {
52
52
  const filePath = path.join(collectionsDir, file);
53
53
  const fileUrl = pathToFileURL(filePath).href;
54
+ console.log(`Loading collection from: ${fileUrl}`);
54
55
  const collectionModule = (await import(fileUrl)).default as Collection;
55
56
  config.collections.push(collectionModule);
56
57
  }