@nocobase/plugin-auth 0.18.0-alpha.9 → 0.19.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.
@@ -1,18 +1,18 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.18.0-alpha.9",
2
+ "@nocobase/client": "0.19.0-alpha.1",
3
3
  "react": "18.2.0",
4
4
  "react-router-dom": "6.21.0",
5
- "@nocobase/utils": "0.18.0-alpha.9",
6
- "@nocobase/auth": "0.18.0-alpha.9",
7
- "@nocobase/database": "0.18.0-alpha.9",
8
- "@nocobase/server": "0.18.0-alpha.9",
9
- "@nocobase/cache": "0.18.0-alpha.9",
10
- "@nocobase/test": "0.18.0-alpha.9",
11
- "antd": "5.12.2",
5
+ "@nocobase/utils": "0.19.0-alpha.1",
6
+ "@nocobase/auth": "0.19.0-alpha.1",
7
+ "@nocobase/database": "0.19.0-alpha.1",
8
+ "@nocobase/server": "0.19.0-alpha.1",
9
+ "@nocobase/cache": "0.19.0-alpha.1",
10
+ "@nocobase/test": "0.19.0-alpha.1",
11
+ "antd": "5.12.8",
12
12
  "@formily/react": "2.3.0",
13
13
  "@formily/shared": "2.3.0",
14
14
  "react-i18next": "11.18.6",
15
15
  "@emotion/css": "11.11.2",
16
16
  "@ant-design/icons": "5.2.6",
17
- "@nocobase/actions": "0.18.0-alpha.9"
17
+ "@nocobase/actions": "0.19.0-alpha.1"
18
18
  };
@@ -1 +1 @@
1
- {"name":"cron","description":"Cron jobs for your node","version":"2.4.4","author":"Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)","bugs":{"url":"https://github.com/kelektiv/node-cron/issues"},"repository":{"type":"git","url":"https://github.com/kelektiv/node-cron.git"},"main":"lib/cron","scripts":{"lint":"eslint {lib,tests}/*.js","test":"jest --coverage","test:watch":"jest --watch --coverage","test:types":"tsd","prepare":"husky install","release":"semantic-release"},"types":"types/index.d.ts","dependencies":{"@types/luxon":"~3.3.0","luxon":"~3.3.0"},"devDependencies":{"@commitlint/cli":"~17.6.6","@insurgentlab/commitlint-config":"^18.1.0","@insurgentlab/conventional-changelog-preset":"~6.0.3","@semantic-release/changelog":"~6.0.x","@semantic-release/commit-analyzer":"~9.0.x","@semantic-release/git":"~10.0.x","@semantic-release/github":"~8.1.x","@semantic-release/npm":"~10.0.x","@semantic-release/release-notes-generator":"~11.0.x","chai":"~4.2.x","eslint":"~8.36.x","eslint-config-prettier":"^8.7.x","eslint-config-standard":"~17.0.x","eslint-plugin-import":"~2.27.x","eslint-plugin-jest":"~27.2.x","eslint-plugin-n":"~15.6.x","eslint-plugin-prettier":"~4.2.x","eslint-plugin-promise":"~6.1.x","husky":"^8.0.3","jest":"~29.5.x","prettier":"~2.8.x","semantic-release":"~21.0.x","sinon":"^15.0.x","tsd":"^0.28.1"},"keywords":["cron","node cron","node-cron","schedule","scheduler","cronjob","cron job"],"license":"MIT","contributors":["Brandon der Blätter <https://interlucid.com/contact/> (https://github.com/intcreator)","Romain Beauxis <toots@rastageeks.org> (https://github.com/toots)","James Padolsey <> (https://github.com/jamespadolsey)","Finn Herpich <fh@three-heads.de> (https://github.com/ErrorProne)","Clifton Cunningham <clifton.cunningham@gmail.com> (https://github.com/cliftonc)","Eric Abouaf <eric.abouaf@gmail.com> (https://github.com/neyric)","humanchimp <morphcham@gmail.com> (https://github.com/humanchimp)","Craig Condon <craig@spiceapps.com> (https://github.com/spiceapps)","Dan Bear <daniel@hulu.com> (https://github.com/danhbear)","Vadim Baryshev <vadimbaryshev@gmail.com> (https://github.com/baryshev)","Leandro Ferrari <lfthomaz@gmail.com> (https://github.com/lfthomaz)","Gregg Zigler <greggzigler@gmail.com> (https://github.com/greggzigler)","Jordan Abderrachid <jabderrachid@gmail.com> (https://github.com/jordanabderrachid)","Masakazu Matsushita <matsukaz@gmail.com> (matsukaz)","Christopher Lunt <me@kirisu.co.uk> (https://github.com/kirisu)"],"jest":{"collectCoverage":true,"collectCoverageFrom":["lib/*.js"],"coverageThreshold":{"global":{"statements":80,"branches":80,"functions":70,"lines":80}}},"files":["lib","types","CHANGELOG.md","LICENSE","README.md"],"_lastModified":"2024-01-03T02:07:34.328Z"}
1
+ {"name":"cron","description":"Cron jobs for your node","version":"2.4.4","author":"Nick Campbell <nicholas.j.campbell@gmail.com> (https://github.com/ncb000gt)","bugs":{"url":"https://github.com/kelektiv/node-cron/issues"},"repository":{"type":"git","url":"https://github.com/kelektiv/node-cron.git"},"main":"lib/cron","scripts":{"lint":"eslint {lib,tests}/*.js","test":"jest --coverage","test:watch":"jest --watch --coverage","test:types":"tsd","prepare":"husky install","release":"semantic-release"},"types":"types/index.d.ts","dependencies":{"@types/luxon":"~3.3.0","luxon":"~3.3.0"},"devDependencies":{"@commitlint/cli":"~17.6.6","@insurgentlab/commitlint-config":"^18.1.0","@insurgentlab/conventional-changelog-preset":"~6.0.3","@semantic-release/changelog":"~6.0.x","@semantic-release/commit-analyzer":"~9.0.x","@semantic-release/git":"~10.0.x","@semantic-release/github":"~8.1.x","@semantic-release/npm":"~10.0.x","@semantic-release/release-notes-generator":"~11.0.x","chai":"~4.2.x","eslint":"~8.36.x","eslint-config-prettier":"^8.7.x","eslint-config-standard":"~17.0.x","eslint-plugin-import":"~2.27.x","eslint-plugin-jest":"~27.2.x","eslint-plugin-n":"~15.6.x","eslint-plugin-prettier":"~4.2.x","eslint-plugin-promise":"~6.1.x","husky":"^8.0.3","jest":"~29.5.x","prettier":"~2.8.x","semantic-release":"~21.0.x","sinon":"^15.0.x","tsd":"^0.28.1"},"keywords":["cron","node cron","node-cron","schedule","scheduler","cronjob","cron job"],"license":"MIT","contributors":["Brandon der Blätter <https://interlucid.com/contact/> (https://github.com/intcreator)","Romain Beauxis <toots@rastageeks.org> (https://github.com/toots)","James Padolsey <> (https://github.com/jamespadolsey)","Finn Herpich <fh@three-heads.de> (https://github.com/ErrorProne)","Clifton Cunningham <clifton.cunningham@gmail.com> (https://github.com/cliftonc)","Eric Abouaf <eric.abouaf@gmail.com> (https://github.com/neyric)","humanchimp <morphcham@gmail.com> (https://github.com/humanchimp)","Craig Condon <craig@spiceapps.com> (https://github.com/spiceapps)","Dan Bear <daniel@hulu.com> (https://github.com/danhbear)","Vadim Baryshev <vadimbaryshev@gmail.com> (https://github.com/baryshev)","Leandro Ferrari <lfthomaz@gmail.com> (https://github.com/lfthomaz)","Gregg Zigler <greggzigler@gmail.com> (https://github.com/greggzigler)","Jordan Abderrachid <jabderrachid@gmail.com> (https://github.com/jordanabderrachid)","Masakazu Matsushita <matsukaz@gmail.com> (matsukaz)","Christopher Lunt <me@kirisu.co.uk> (https://github.com/kirisu)"],"jest":{"collectCoverage":true,"collectCoverageFrom":["lib/*.js"],"coverageThreshold":{"global":{"statements":80,"branches":80,"functions":70,"lines":80}}},"files":["lib","types","CHANGELOG.md","LICENSE","README.md"],"_lastModified":"2024-01-08T11:40:02.718Z"}
@@ -1,6 +1,5 @@
1
- import { CollectionOptions } from '@nocobase/database';
2
1
  /**
3
2
  * Collection for extended authentication methods,
4
3
  */
5
- declare const _default: CollectionOptions;
4
+ declare const _default: import("@nocobase/database").CollectionOptions;
6
5
  export default _default;
@@ -20,12 +20,14 @@ __export(authenticators_exports, {
20
20
  default: () => authenticators_default
21
21
  });
22
22
  module.exports = __toCommonJS(authenticators_exports);
23
- var authenticators_default = {
24
- namespace: "auth.auth",
25
- duplicator: "optional",
23
+ var import_database = require("@nocobase/database");
24
+ var authenticators_default = (0, import_database.defineCollection)({
25
+ dumpRules: {
26
+ group: "third-party"
27
+ },
28
+ shared: true,
26
29
  name: "authenticators",
27
30
  sortable: true,
28
- title: '{{t("Authenticators")}}',
29
31
  model: "AuthModel",
30
32
  createdBy: true,
31
33
  updatedBy: true,
@@ -112,4 +114,4 @@ var authenticators_default = {
112
114
  through: "usersAuthenticators"
113
115
  }
114
116
  ]
115
- };
117
+ });
@@ -1,3 +1,2 @@
1
- import { CollectionOptions } from '@nocobase/client';
2
- declare const _default: CollectionOptions;
1
+ declare const _default: import("@nocobase/database").CollectionOptions;
3
2
  export default _default;
@@ -20,9 +20,12 @@ __export(token_blacklist_exports, {
20
20
  default: () => token_blacklist_default
21
21
  });
22
22
  module.exports = __toCommonJS(token_blacklist_exports);
23
- var token_blacklist_default = {
24
- namespace: "auth.token-black",
25
- duplicator: "optional",
23
+ var import_database = require("@nocobase/database");
24
+ var token_blacklist_default = (0, import_database.defineCollection)({
25
+ dumpRules: {
26
+ group: "log"
27
+ },
28
+ shared: true,
26
29
  name: "tokenBlacklist",
27
30
  model: "TokenBlacklistModel",
28
31
  fields: [
@@ -36,4 +39,4 @@ var token_blacklist_default = {
36
39
  name: "expiration"
37
40
  }
38
41
  ]
39
- };
42
+ });
@@ -1,7 +1,6 @@
1
- import { CollectionOptions } from '@nocobase/database';
2
1
  /**
3
2
  * Collection for user information of extended authentication methods,
4
3
  * such as saml, oicd, oauth, sms, etc.
5
4
  */
6
- declare const _default: CollectionOptions;
5
+ declare const _default: import("@nocobase/database").CollectionOptions;
7
6
  export default _default;
@@ -20,17 +20,13 @@ __export(users_authenticators_exports, {
20
20
  default: () => users_authenticators_default
21
21
  });
22
22
  module.exports = __toCommonJS(users_authenticators_exports);
23
- var users_authenticators_default = {
24
- namespace: "auth.auth",
25
- duplicator: {
26
- dumpable: "optional",
27
- /**
28
- * When dump this collection, the users collection is required to be dumped.
29
- */
30
- with: "users"
23
+ var import_database = require("@nocobase/database");
24
+ var users_authenticators_default = (0, import_database.defineCollection)({
25
+ dumpRules: {
26
+ group: "user"
31
27
  },
28
+ shared: true,
32
29
  name: "usersAuthenticators",
33
- title: '{{t("Users Authenticators")}}',
34
30
  model: "UserAuthModel",
35
31
  createdBy: true,
36
32
  updatedBy: true,
@@ -86,4 +82,4 @@ var users_authenticators_default = {
86
82
  defaultValue: {}
87
83
  }
88
84
  ]
89
- };
85
+ });
@@ -1,5 +1,6 @@
1
1
  import { Migration } from '@nocobase/server';
2
2
  export default class AddBasicAuthMigration extends Migration {
3
+ appVersion: string;
3
4
  up(): Promise<void>;
4
5
  down(): Promise<void>;
5
6
  }
@@ -23,25 +23,8 @@ module.exports = __toCommonJS(basic_authenticator_exports);
23
23
  var import_server = require("@nocobase/server");
24
24
  var import_preset = require("../../preset");
25
25
  class AddBasicAuthMigration extends import_server.Migration {
26
+ appVersion = "<0.14.0-alpha.1";
26
27
  async up() {
27
- await this.db.getCollection("authenticators").sync({
28
- force: false,
29
- alter: {
30
- drop: false
31
- }
32
- });
33
- await this.db.getCollection("tokenBlacklist").sync({
34
- force: false,
35
- alter: {
36
- drop: false
37
- }
38
- });
39
- await this.db.getCollection("usersAuthenticators").sync({
40
- force: false,
41
- alter: {
42
- drop: false
43
- }
44
- });
45
28
  const repo = this.context.db.getRepository("authenticators");
46
29
  const existed = await repo.count();
47
30
  if (existed) {
@@ -1,5 +1,6 @@
1
1
  import { Migration } from '@nocobase/server';
2
2
  export default class UpdateBasicAuthMigration extends Migration {
3
+ appVersion: string;
3
4
  up(): Promise<void>;
4
5
  down(): Promise<void>;
5
6
  }
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(update_basic_exports);
23
23
  var import_server = require("@nocobase/server");
24
24
  var import_preset = require("../../preset");
25
25
  class UpdateBasicAuthMigration extends import_server.Migration {
26
+ appVersion = "<0.14.0-alpha.1";
26
27
  async up() {
27
28
  const SystemSetting = this.context.db.getRepository("systemSettings");
28
29
  const setting = await SystemSetting.findOne();
@@ -1,5 +1,6 @@
1
1
  import { Migration } from '@nocobase/server';
2
2
  export default class FixAllowSignUpMigration extends Migration {
3
+ appVersion: string;
3
4
  up(): Promise<void>;
4
5
  down(): Promise<void>;
5
6
  }
@@ -23,6 +23,7 @@ module.exports = __toCommonJS(fix_allow_signup_exports);
23
23
  var import_server = require("@nocobase/server");
24
24
  var import_preset = require("../../preset");
25
25
  class FixAllowSignUpMigration extends import_server.Migration {
26
+ appVersion = "<0.18.0-alpha.1";
26
27
  async up() {
27
28
  var _a;
28
29
  const repo = this.context.db.getRepository("authenticators");
@@ -51,9 +51,7 @@ class AuthPlugin extends import_server.Plugin {
51
51
  this.app.db.registerModels({ AuthModel: import_authenticator.AuthModel });
52
52
  }
53
53
  async load() {
54
- await this.db.import({
55
- directory: (0, import_path.resolve)(__dirname, "collections")
56
- });
54
+ await this.importCollections((0, import_path.resolve)(__dirname, "collections"));
57
55
  this.db.addMigrations({
58
56
  namespace: "auth",
59
57
  directory: (0, import_path.resolve)(__dirname, "migrations"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-auth",
3
- "version": "0.18.0-alpha.9",
3
+ "version": "0.19.0-alpha.1",
4
4
  "main": "./dist/server/index.js",
5
5
  "devDependencies": {
6
6
  "@ant-design/icons": "5.x",
@@ -24,5 +24,5 @@
24
24
  "displayName.zh-CN": "用户认证",
25
25
  "description": "Basic authentication and authenticator management",
26
26
  "description.zh-CN": "提供基础认证功能和扩展认证器管理功能",
27
- "gitHead": "34ca0df4eede2e83fc86297b0fe19eba970e2b1b"
27
+ "gitHead": "64601944412fc4d2e2bd05f4b982118dd28247dc"
28
28
  }