appwrite-utils-cli 0.9.70 → 0.9.71
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
CHANGED
@@ -124,6 +124,7 @@ This updated CLI ensures that developers have robust tools at their fingertips t
|
|
124
124
|
|
125
125
|
## Changelog
|
126
126
|
|
127
|
+
- 0.9.71: Reverted `node-appwrite` to 14, this seems to fix the xdefault error
|
127
128
|
- 0.9.70: I think I stopped it from deleting attributes, my bad on that
|
128
129
|
- 0.9.68: Temporarily disabled updating Attributes until `updateStringAttribute` is fixed -- it just deletes them now
|
129
130
|
- 0.9.65: Temporary fix for Appwrite's `updateStringAttribute` bug
|
@@ -97,7 +97,7 @@ export const createOrUpdateAttribute = async (db, dbId, collection, attribute) =
|
|
97
97
|
else {
|
98
98
|
await tryAwaitWithRetry(async () => await db.updateStringAttribute(dbId, collection.$id, finalAttribute.key, finalAttribute.required || false, finalAttribute.xdefault
|
99
99
|
? `${finalAttribute.xdefault}`
|
100
|
-
: undefined
|
100
|
+
: undefined));
|
101
101
|
}
|
102
102
|
break;
|
103
103
|
case "integer":
|
@@ -55,7 +55,7 @@ const attributesSame = (databaseAttribute, configAttribute) => {
|
|
55
55
|
export const createOrUpdateAttribute = async (db, dbId, collection, attribute) => {
|
56
56
|
let action = "create";
|
57
57
|
let foundAttribute;
|
58
|
-
const updateEnabled =
|
58
|
+
const updateEnabled = true;
|
59
59
|
let finalAttribute = attribute;
|
60
60
|
try {
|
61
61
|
const collectionAttr = collection.attributes.find(
|
@@ -127,7 +127,7 @@ export const createOrUpdateAttribute = async (db, dbId, collection, attribute) =
|
|
127
127
|
await tryAwaitWithRetry(async () => await db.createStringAttribute(dbId, collection.$id, finalAttribute.key, finalAttribute.size, finalAttribute.required || false, finalAttribute.xdefault || (finalAttribute.required ? undefined : null), finalAttribute.array || false, finalAttribute.encrypted));
|
128
128
|
}
|
129
129
|
else {
|
130
|
-
await tryAwaitWithRetry(async () => await db.updateStringAttribute(dbId, collection.$id, finalAttribute.key, finalAttribute.required || false, finalAttribute.xdefault || (finalAttribute.required ? undefined : "")
|
130
|
+
await tryAwaitWithRetry(async () => await db.updateStringAttribute(dbId, collection.$id, finalAttribute.key, finalAttribute.required || false, finalAttribute.xdefault || (finalAttribute.required ? undefined : "")));
|
131
131
|
}
|
132
132
|
break;
|
133
133
|
case "integer":
|
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.
|
4
|
+
"version": "0.9.71",
|
5
5
|
"main": "src/main.ts",
|
6
6
|
"type": "module",
|
7
7
|
"repository": {
|
@@ -38,7 +38,7 @@
|
|
38
38
|
"lodash": "^4.17.21",
|
39
39
|
"luxon": "^3.5.0",
|
40
40
|
"nanostores": "^0.10.3",
|
41
|
-
"node-appwrite": "
|
41
|
+
"node-appwrite": "14.0.0",
|
42
42
|
"tsx": "^4.17.0",
|
43
43
|
"ulidx": "^2.4.0",
|
44
44
|
"winston": "^3.14.2",
|
@@ -77,7 +77,7 @@ export const createOrUpdateAttribute = async (
|
|
77
77
|
): Promise<void> => {
|
78
78
|
let action = "create";
|
79
79
|
let foundAttribute: Attribute | undefined;
|
80
|
-
const updateEnabled =
|
80
|
+
const updateEnabled = true;
|
81
81
|
let finalAttribute: any = attribute;
|
82
82
|
try {
|
83
83
|
const collectionAttr = collection.attributes.find(
|
@@ -179,7 +179,6 @@ export const createOrUpdateAttribute = async (
|
|
179
179
|
finalAttribute.key,
|
180
180
|
finalAttribute.required || false,
|
181
181
|
finalAttribute.xdefault || (finalAttribute.required ? undefined : ""),
|
182
|
-
finalAttribute.size
|
183
182
|
)
|
184
183
|
);
|
185
184
|
}
|