@nocobase/database 0.19.0-alpha.5 → 0.19.0-alpha.6

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.
@@ -74,7 +74,7 @@ const _PasswordField = class _PasswordField extends import_field.Field {
74
74
  const hash = await this.hash(value);
75
75
  model.set(name, hash);
76
76
  } else {
77
- model.set(name, null);
77
+ model.set(name, model.previous(name));
78
78
  }
79
79
  };
80
80
  }
@@ -38,7 +38,9 @@ const _UidField = class _UidField extends import_field.Field {
38
38
  } else if (re.test(value)) {
39
39
  instance.set(name, value);
40
40
  } else {
41
- throw new Error(`uid '${value}' is invalid`);
41
+ throw new Error(
42
+ `${this.collection.name}.${this.options.name} can only include A-Z, a-z, 0-9, _-*$, '${value}' is invalid`
43
+ );
42
44
  }
43
45
  };
44
46
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nocobase/database",
3
- "version": "0.19.0-alpha.5",
3
+ "version": "0.19.0-alpha.6",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
7
7
  "license": "Apache-2.0",
8
8
  "dependencies": {
9
- "@nocobase/logger": "0.19.0-alpha.5",
10
- "@nocobase/utils": "0.19.0-alpha.5",
9
+ "@nocobase/logger": "0.19.0-alpha.6",
10
+ "@nocobase/utils": "0.19.0-alpha.6",
11
11
  "async-mutex": "^0.3.2",
12
12
  "chalk": "^4.1.1",
13
13
  "cron-parser": "4.4.0",
@@ -35,5 +35,5 @@
35
35
  "url": "git+https://github.com/nocobase/nocobase.git",
36
36
  "directory": "packages/database"
37
37
  },
38
- "gitHead": "580eca25451ec731d17ddef285d0b8c52c48d501"
38
+ "gitHead": "2eb524db98c7f4136fe1a9a1b1259cd72cf6635f"
39
39
  }