@nocobase/plugin-users 0.13.0-alpha.9 → 0.14.0-alpha.1

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.
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ "@nocobase/client": "0.14.0-alpha.1",
3
+ "jsonwebtoken": "8.5.1",
4
+ "@nocobase/database": "0.14.0-alpha.1",
5
+ "@nocobase/resourcer": "0.14.0-alpha.1",
6
+ "@nocobase/server": "0.14.0-alpha.1",
7
+ "@nocobase/utils": "0.14.0-alpha.1",
8
+ "@nocobase/actions": "0.14.0-alpha.1"
9
+ };
@@ -54,7 +54,7 @@ var users_default = {
54
54
  }
55
55
  },
56
56
  {
57
- interface: "username",
57
+ interface: "input",
58
58
  type: "string",
59
59
  name: "username",
60
60
  unique: true,
@@ -0,0 +1,5 @@
1
+ import { Migration } from '@nocobase/server';
2
+ export default class UpdateUserNameInterfaceMigration extends Migration {
3
+ up(): Promise<void>;
4
+ down(): Promise<void>;
5
+ }
@@ -0,0 +1,45 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var update_username_interface_exports = {};
19
+ __export(update_username_interface_exports, {
20
+ default: () => UpdateUserNameInterfaceMigration
21
+ });
22
+ module.exports = __toCommonJS(update_username_interface_exports);
23
+ var import_server = require("@nocobase/server");
24
+ class UpdateUserNameInterfaceMigration extends import_server.Migration {
25
+ async up() {
26
+ const match = await this.app.version.satisfies("<=0.13.0-alpha.8");
27
+ if (!match) {
28
+ return;
29
+ }
30
+ const Field = this.context.db.getRepository("fields");
31
+ const field = await Field.findOne({
32
+ filter: {
33
+ name: "username",
34
+ collectionName: "users",
35
+ interface: "username"
36
+ }
37
+ });
38
+ if (!field) {
39
+ return;
40
+ }
41
+ await field.update({ interface: "input" });
42
+ }
43
+ async down() {
44
+ }
45
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-users",
3
- "displayName": "users",
3
+ "displayName": "Users",
4
4
  "displayName.zh-CN": "用户",
5
- "description": "Provide a basic user model and a password-based user authentication type, and extended the createdBy and updatedBy field types",
5
+ "description": "Provides a basic user model and a password-based user authentication type, and extended the createdBy and updatedBy field types",
6
6
  "description.zh-CN": "提供了基础的用户模型和基于密码的用户认证方式,并拓展了创建人和最后更新人字段类型",
7
- "version": "0.13.0-alpha.9",
7
+ "version": "0.14.0-alpha.1",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "devDependencies": {
@@ -22,5 +22,5 @@
22
22
  "@nocobase/test": "0.x",
23
23
  "@nocobase/utils": "0.x"
24
24
  },
25
- "gitHead": "ee5825377d8bec05f968a8365a0cdcd49878ada6"
25
+ "gitHead": "25841167f720207933dd49fde3b4e426048ce258"
26
26
  }