@nocobase/plugin-auth 0.17.0-alpha.2 → 0.17.0-alpha.3
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/dist/client/index.js +1 -1
- package/dist/client/locale/index.d.ts +1 -1
- package/dist/externalVersion.js +5 -5
- package/dist/locale/en-US.json +23 -0
- package/dist/locale/zh-CN.json +23 -0
- package/dist/node_modules/cron/package.json +1 -1
- package/package.json +2 -2
- package/dist/locale/zh-CN.d.ts +0 -24
- package/dist/locale/zh-CN.js +0 -46
package/dist/client/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react-i18next"),require("antd"),require("react"),require("@formily/shared"),require("react-router-dom"),require("@ant-design/icons"),require("@formily/react")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react-i18next","antd","react","@formily/shared","react-router-dom","@ant-design/icons","@formily/react"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n["@nocobase/plugin-auth"]={},n["@nocobase/client"],n.jsxRuntime,n["react-i18next"],n.antd,n.react,n["@formily/shared"],n["react-router-dom"],n["@ant-design/icons"],n["@formily/react"]))})(this,function(n,e,t,x,l,c,A,y,a,d){"use strict";var J=Object.defineProperty,Q=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var D=(n,e,t)=>e in n?J(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,g=(n,e)=>{for(var t in e||(e={}))X.call(e,t)&&D(n,t,e[t]);if(I)for(var t of I(e))Y.call(e,t)&&D(n,t,e[t]);return n},C=(n,e)=>Q(n,W(e));var f=(n,e,t)=>new Promise((x,l)=>{var c=a=>{try{y(t.next(a))}catch(d){l(d)}},A=a=>{try{y(t.throw(a))}catch(d){l(d)}},y=a=>a.done?x(a.value):Promise.resolve(a.value).then(c,A);y((t=t.apply(n,e)).next())});const b="Email/Password",S="auth";function h(){return x.useTranslation(S)}const k=()=>{const{t:o}=h();return t.jsx(e.SchemaComponent,{scope:{t:o},components:{Alert:l.Alert},schema:{type:"object",properties:{public:{type:"object",properties:{allowSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Allow to sign up")}}',"x-component":"Checkbox","x-component-props":{defaultChecked:!0}}}},notice:{type:"void","x-component":"Alert","x-component-props":{showIcon:!0,message:'{{t("The authentication allows users to sign in via username or email.")}}'}}}}})},q={type:"object",name:"passwordForm","x-component":"FormV2",properties:{account:{type:"string","x-component":"Input","x-validator":`{{(value) => {
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react-i18next"),require("antd"),require("react"),require("@formily/shared"),require("react-router-dom"),require("@ant-design/icons"),require("@formily/react")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react-i18next","antd","react","@formily/shared","react-router-dom","@ant-design/icons","@formily/react"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n["@nocobase/plugin-auth"]={},n["@nocobase/client"],n.jsxRuntime,n["react-i18next"],n.antd,n.react,n["@formily/shared"],n["react-router-dom"],n["@ant-design/icons"],n["@formily/react"]))})(this,function(n,e,t,x,l,c,A,y,a,d){"use strict";var J=Object.defineProperty,Q=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var D=(n,e,t)=>e in n?J(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,g=(n,e)=>{for(var t in e||(e={}))X.call(e,t)&&D(n,t,e[t]);if(I)for(var t of I(e))Y.call(e,t)&&D(n,t,e[t]);return n},C=(n,e)=>Q(n,W(e));var f=(n,e,t)=>new Promise((x,l)=>{var c=a=>{try{y(t.next(a))}catch(d){l(d)}},A=a=>{try{y(t.throw(a))}catch(d){l(d)}},y=a=>a.done?x(a.value):Promise.resolve(a.value).then(c,A);y((t=t.apply(n,e)).next())});const b="Email/Password",S="auth";function h(){return x.useTranslation([S,"client"],{nsMode:"fallback"})}const k=()=>{const{t:o}=h();return t.jsx(e.SchemaComponent,{scope:{t:o},components:{Alert:l.Alert},schema:{type:"object",properties:{public:{type:"object",properties:{allowSignup:{"x-decorator":"FormItem",type:"boolean",title:'{{t("Allow to sign up")}}',"x-component":"Checkbox","x-component-props":{defaultChecked:!0}}}},notice:{type:"void","x-component":"Alert","x-component-props":{showIcon:!0,message:'{{t("The authentication allows users to sign in via username or email.")}}'}}}}})},q={type:"object",name:"passwordForm","x-component":"FormV2",properties:{account:{type:"string","x-component":"Input","x-validator":`{{(value) => {
|
|
2
2
|
if (!value) {
|
|
3
3
|
return t("Please enter your username or email");
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const NAMESPACE = "auth";
|
|
2
|
-
export declare function useAuthTranslation(): import("react-i18next").UseTranslationResponse<"auth", undefined>;
|
|
2
|
+
export declare function useAuthTranslation(): import("react-i18next").UseTranslationResponse<("auth" | "client")[], undefined>;
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@nocobase/client": "0.17.0-alpha.
|
|
2
|
+
"@nocobase/client": "0.17.0-alpha.3",
|
|
3
3
|
"react": "18.2.0",
|
|
4
4
|
"react-router-dom": "6.14.1",
|
|
5
|
-
"@nocobase/auth": "0.17.0-alpha.
|
|
6
|
-
"@nocobase/database": "0.17.0-alpha.
|
|
7
|
-
"@nocobase/server": "0.17.0-alpha.
|
|
5
|
+
"@nocobase/auth": "0.17.0-alpha.3",
|
|
6
|
+
"@nocobase/database": "0.17.0-alpha.3",
|
|
7
|
+
"@nocobase/server": "0.17.0-alpha.3",
|
|
8
8
|
"antd": "5.8.6",
|
|
9
9
|
"@formily/react": "2.2.27",
|
|
10
10
|
"@formily/shared": "2.2.27",
|
|
11
11
|
"react-i18next": "11.18.6",
|
|
12
12
|
"@ant-design/icons": "5.1.4",
|
|
13
|
-
"@nocobase/actions": "0.17.0-alpha.
|
|
13
|
+
"@nocobase/actions": "0.17.0-alpha.3"
|
|
14
14
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Auth Type": "Auth Type",
|
|
3
|
+
"Authenticators": "Authenticators",
|
|
4
|
+
"Authentication": "Authentication",
|
|
5
|
+
"Sign in via email": "Sign in via email",
|
|
6
|
+
"Sign in via password": "Sign in via password",
|
|
7
|
+
"Not allowed to sign up": "Not allowed to sign up",
|
|
8
|
+
"Allow to sign up": "Allow to sign up",
|
|
9
|
+
"The username or email is incorrect, please re-enter": "The username or email is incorrect, please re-enter",
|
|
10
|
+
"The password is incorrect, please re-enter": "The password is incorrect, please re-enter",
|
|
11
|
+
"Not a valid cellphone number, please re-enter": "Not a valid cellphone number, please re-enter",
|
|
12
|
+
"The phone number has been registered, please login directly": "The phone number has been registered, please login directly",
|
|
13
|
+
"The phone number is not registered, please register first": "The phone number is not registered, please register first",
|
|
14
|
+
"Please keep and enable at least one authenticator": "Please keep and enable at least one authenticator",
|
|
15
|
+
"Allow to sign in with": "Allow to sign in with",
|
|
16
|
+
"Please enter a valid username": "Please enter a valid username",
|
|
17
|
+
"Please enter a valid email": "Please enter a valid email",
|
|
18
|
+
"Please enter your username or email": "Please enter your username or email",
|
|
19
|
+
"SMS": "SMS",
|
|
20
|
+
"Username/Email": "Username/Email",
|
|
21
|
+
"Auth UID": "Auth UID",
|
|
22
|
+
"The authentication allows users to sign in via username or email.": "The authentication allows users to sign in via username or email."
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Auth Type": "认证类型",
|
|
3
|
+
"Authenticators": "认证器",
|
|
4
|
+
"Authentication": "用户认证",
|
|
5
|
+
"Sign in via email": "邮箱登录",
|
|
6
|
+
"Sign in via password": "密码登录",
|
|
7
|
+
"Not allowed to sign up": "禁止注册",
|
|
8
|
+
"Allow to sign up": "允许注册",
|
|
9
|
+
"The username or email is incorrect, please re-enter": "用户名或邮箱有误,请重新输入",
|
|
10
|
+
"The password is incorrect, please re-enter": "密码有误,请重新输入",
|
|
11
|
+
"Not a valid cellphone number, please re-enter": "不是有效的手机号,请重新输入",
|
|
12
|
+
"The phone number has been registered, please login directly": "手机号已注册,请直接登录",
|
|
13
|
+
"The phone number is not registered, please register first": "手机号未注册,请先注册",
|
|
14
|
+
"Please keep and enable at least one authenticator": "请至少保留并启用一个认证器",
|
|
15
|
+
"Allow to sign in with": "允许使用以下方式登录",
|
|
16
|
+
"Please enter a valid username": "请输入有效的用户名",
|
|
17
|
+
"Please enter a valid email": "请输入有效的邮箱",
|
|
18
|
+
"Please enter your username or email": "请输入用户名或邮箱",
|
|
19
|
+
"SMS": "短信",
|
|
20
|
+
"Username/Email": "用户名/邮箱",
|
|
21
|
+
"Auth UID": "认证标识",
|
|
22
|
+
"The authentication allows users to sign in via username or email.": "该认证方式支持用户通过用户名或邮箱登录。"
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron","description":"Cron jobs for your node","version":"2.3.1","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"},"dependencies":{"luxon":"^3.2.1"},"devDependencies":{"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","jest":"~29.5.x","prettier":"~2.8.x","sinon":"^15.0.x"},"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","CHANGELOG.md","LICENSE","README.md"],"_lastModified":"2023-12-
|
|
1
|
+
{"name":"cron","description":"Cron jobs for your node","version":"2.3.1","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"},"dependencies":{"luxon":"^3.2.1"},"devDependencies":{"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","jest":"~29.5.x","prettier":"~2.8.x","sinon":"^15.0.x"},"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","CHANGELOG.md","LICENSE","README.md"],"_lastModified":"2023-12-06T09:25:37.073Z"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-auth",
|
|
3
|
-
"version": "0.17.0-alpha.
|
|
3
|
+
"version": "0.17.0-alpha.3",
|
|
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": "
|
|
27
|
+
"gitHead": "8fb3aace819722ceb845ea63ec3009f324a897a9"
|
|
28
28
|
}
|
package/dist/locale/zh-CN.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare const locale: {
|
|
2
|
-
'Auth Type': string;
|
|
3
|
-
Authenticators: string;
|
|
4
|
-
Authentication: string;
|
|
5
|
-
'Sign in via email': string;
|
|
6
|
-
'Sign in via password': string;
|
|
7
|
-
'Not allowed to sign up': string;
|
|
8
|
-
'Allow to sign up': string;
|
|
9
|
-
'The username or email is incorrect, please re-enter': string;
|
|
10
|
-
'The password is incorrect, please re-enter': string;
|
|
11
|
-
'Not a valid cellphone number, please re-enter': string;
|
|
12
|
-
'The phone number has been registered, please login directly': string;
|
|
13
|
-
'The phone number is not registered, please register first': string;
|
|
14
|
-
'Please keep and enable at least one authenticator': string;
|
|
15
|
-
'Allow to sign in with': string;
|
|
16
|
-
'Please enter a valid username': string;
|
|
17
|
-
'Please enter a valid email': string;
|
|
18
|
-
'Please enter your username or email': string;
|
|
19
|
-
SMS: string;
|
|
20
|
-
'Username/Email': string;
|
|
21
|
-
'Auth UID': string;
|
|
22
|
-
'The authentication allows users to sign in via username or email.': string;
|
|
23
|
-
};
|
|
24
|
-
export default locale;
|
package/dist/locale/zh-CN.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
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 zh_CN_exports = {};
|
|
19
|
-
__export(zh_CN_exports, {
|
|
20
|
-
default: () => zh_CN_default
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(zh_CN_exports);
|
|
23
|
-
const locale = {
|
|
24
|
-
"Auth Type": "\u8BA4\u8BC1\u7C7B\u578B",
|
|
25
|
-
Authenticators: "\u8BA4\u8BC1\u5668",
|
|
26
|
-
Authentication: "\u7528\u6237\u8BA4\u8BC1",
|
|
27
|
-
"Sign in via email": "\u90AE\u7BB1\u767B\u5F55",
|
|
28
|
-
"Sign in via password": "\u5BC6\u7801\u767B\u5F55",
|
|
29
|
-
"Not allowed to sign up": "\u7981\u6B62\u6CE8\u518C",
|
|
30
|
-
"Allow to sign up": "\u5141\u8BB8\u6CE8\u518C",
|
|
31
|
-
"The username or email is incorrect, please re-enter": "\u7528\u6237\u540D\u6216\u90AE\u7BB1\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165",
|
|
32
|
-
"The password is incorrect, please re-enter": "\u5BC6\u7801\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165",
|
|
33
|
-
"Not a valid cellphone number, please re-enter": "\u4E0D\u662F\u6709\u6548\u7684\u624B\u673A\u53F7\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165",
|
|
34
|
-
"The phone number has been registered, please login directly": "\u624B\u673A\u53F7\u5DF2\u6CE8\u518C\uFF0C\u8BF7\u76F4\u63A5\u767B\u5F55",
|
|
35
|
-
"The phone number is not registered, please register first": "\u624B\u673A\u53F7\u672A\u6CE8\u518C\uFF0C\u8BF7\u5148\u6CE8\u518C",
|
|
36
|
-
"Please keep and enable at least one authenticator": "\u8BF7\u81F3\u5C11\u4FDD\u7559\u5E76\u542F\u7528\u4E00\u4E2A\u8BA4\u8BC1\u5668",
|
|
37
|
-
"Allow to sign in with": "\u5141\u8BB8\u4F7F\u7528\u4EE5\u4E0B\u65B9\u5F0F\u767B\u5F55",
|
|
38
|
-
"Please enter a valid username": "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u7528\u6237\u540D",
|
|
39
|
-
"Please enter a valid email": "\u8BF7\u8F93\u5165\u6709\u6548\u7684\u90AE\u7BB1",
|
|
40
|
-
"Please enter your username or email": "\u8BF7\u8F93\u5165\u7528\u6237\u540D\u6216\u90AE\u7BB1",
|
|
41
|
-
SMS: "\u77ED\u4FE1",
|
|
42
|
-
"Username/Email": "\u7528\u6237\u540D/\u90AE\u7BB1",
|
|
43
|
-
"Auth UID": "\u8BA4\u8BC1\u6807\u8BC6",
|
|
44
|
-
"The authentication allows users to sign in via username or email.": "\u8BE5\u8BA4\u8BC1\u65B9\u5F0F\u652F\u6301\u7528\u6237\u901A\u8FC7\u7528\u6237\u540D\u6216\u90AE\u7BB1\u767B\u5F55\u3002"
|
|
45
|
-
};
|
|
46
|
-
var zh_CN_default = locale;
|