@tachybase/module-auth 0.23.22 → 0.23.40
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
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(p,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("@tachybase/client"),require("@tachybase/utils/client"),require("react/jsx-runtime"),require("react"),require("react-router-dom"),require("@tachybase/schema"),require("react-i18next"),require("antd"),require("@ant-design/icons")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","@tachybase/utils/client","react/jsx-runtime","react","react-router-dom","@tachybase/schema","react-i18next","antd","@ant-design/icons"],e):(p=typeof globalThis!="undefined"?globalThis:p||self,e(p["@tachybase/module-auth"]={},p["@tachybase/client"],p["@tachybase/utils"],p.jsxRuntime,p.react,p["react-router-dom"],p["@tachybase/schema"],p["react-i18next"],p.antd,p["@ant-design/icons"]))})(this,function(p,e,l,a,u,y,x,h,d,b){"use strict";var me=Object.defineProperty,de=Object.defineProperties;var ye=Object.getOwnPropertyDescriptors;var U=Object.getOwnPropertySymbols;var xe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable;var I=(p,e,l)=>e in p?me(p,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):p[e]=l,v=(p,e)=>{for(var l in e||(e={}))xe.call(e,l)&&I(p,l,e[l]);if(U)for(var l of U(e))he.call(e,l)&&I(p,l,e[l]);return p},S=(p,e)=>de(p,ye(e));var D=(p,e,l)=>I(p,typeof e!="symbol"?e+"":e,l);var T=(p,e,l)=>new Promise((a,u)=>{var y=d=>{try{h(l.next(d))}catch(b){u(b)}},x=d=>{try{h(l.throw(d))}catch(b){u(b)}},h=d=>d.done?a(d.value):Promise.resolve(d.value).then(y,x);h((l=l.apply(p,e)).next())});const $="Email/Password",E=t=>{const n=y.useLocation(),o=e.useAPIClient();return u.useEffect(()=>{const s=new URLSearchParams(n.search),r=s.get("authenticator"),i=s.get("token");i&&(o.auth.setToken(i),o.auth.setAuthenticator(r))}),a.jsx(a.Fragment,{children:t.children})},f="auth";function C(){return h.useTranslation([f,"core"],{nsMode:"fallback"})}const A=u.createContext([]);A.displayName="AuthenticatorsContext";const F=t=>u.useContext(A).find(o=>o.name===t);function N(t){var i;const{data:n}=e.useSystemSettings(),o=e.useAPIClient(),{data:s=[],error:r}=e.useRequest(()=>o.resource("authenticators").publicList().then(c=>{var m;return((m=c==null?void 0:c.data)==null?void 0:m.data)||[]}));if(r)throw r;return a.jsxs("div",{style:{maxWidth:320,margin:"0 auto",paddingTop:"20vh"},children:[a.jsx("h1",{children:(i=n==null?void 0:n.data)==null?void 0:i.title}),a.jsx(A.Provider,{value:s,children:a.jsx(y.Outlet,{})}),a.jsx("div",{className:e.css`
|
|
2
2
|
position: absolute;
|
|
3
3
|
bottom: 24px;
|
|
4
4
|
width: 100%;
|
|
5
5
|
left: 0;
|
|
6
6
|
text-align: center;
|
|
7
|
-
`,children:a.jsx(e.PoweredBy,{})})]})}const
|
|
7
|
+
`,children:a.jsx(e.PoweredBy,{})})]})}const q=()=>{var s;const n=e.usePlugin(g).authTypes.getEntities(),o={};for(const[r,i]of n)(s=i.components)!=null&&s.SignInForm&&(o[r]=i.components.SignInForm);return o},L=(t=[])=>{var i;const o=e.usePlugin(g).authTypes.getEntities(),s={};for(const[c,m]of o)(i=m.components)!=null&&i.SignInButton&&(s[c]=m.components.SignInButton);const r=Object.keys(s);return t.filter(c=>r.includes(c.authType)).map((c,m)=>u.createElement(s[c.authType],{key:m,authenticator:c}))},O=()=>{const{t}=C();e.useCurrentDocumentTitle("Signin"),e.useViewport();const n=q(),o=u.useContext(A),s=L(o);if(!o.length)return a.jsx("div",{style:{color:"#ccc"},children:t("No authentication methods available.")});const r=o.map(i=>{const c=n[i.authType];if(!c)return;const m=`${t("Sign-in")} (${t(i.authTypeTitle||i.authType)})`;return v({component:u.createElement(c,{authenticator:i}),tabTitle:i.title||m},i)}).filter(i=>i);return a.jsxs(d.Space,{direction:"vertical",className:e.css`
|
|
8
8
|
display: flex;
|
|
9
9
|
`,children:[r.length>1?a.jsx(d.Tabs,{items:r.map(i=>({label:i.tabTitle,key:i.name,children:i.component}))}):r.length?a.jsx("div",{children:r[0].component}):a.jsx(a.Fragment,{}),a.jsx(d.Space,{direction:"vertical",className:e.css`
|
|
10
10
|
display: flex;
|
|
11
|
-
`,children:s})]})},j=u.createContext({});j.displayName="SignupPageContext";const k=()=>{var s;const n=e.usePlugin(g).authTypes.getEntities(),o={};for(const[r,i]of n)(s=i.components)!=null&&s.SignUpForm&&(o[r]=i.components.SignUpForm);return o},M=()=>{e.useViewport(),e.useCurrentDocumentTitle("Signup");const t=k(),[n]=y.useSearchParams(),o=n.get("name"),s=F(o),{authType:r}=s||{};return t[r]?u.createElement(t[r],{authenticatorName:o}):a.jsx(y.Navigate,{to:"/not-found",replace:!0})};function _(t="/admin"){const n=y.useNavigate(),[o]=y.useSearchParams();return u.useCallback(()=>{n(o.get("redirect")||"/admin",{replace:!0})},[n,o])}const
|
|
11
|
+
`,children:s})]})},j=u.createContext({});j.displayName="SignupPageContext";const k=()=>{var s;const n=e.usePlugin(g).authTypes.getEntities(),o={};for(const[r,i]of n)(s=i.components)!=null&&s.SignUpForm&&(o[r]=i.components.SignUpForm);return o},M=()=>{e.useViewport(),e.useCurrentDocumentTitle("Signup");const t=k(),[n]=y.useSearchParams(),o=n.get("name"),s=F(o),{authType:r}=s||{};return t[r]?u.createElement(t[r],{authenticatorName:o}):a.jsx(y.Navigate,{to:"/not-found",replace:!0})};function _(t="/admin"){const n=y.useNavigate(),[o]=y.useSearchParams();return u.useCallback(()=>{n(o.get("redirect")||"/admin",{replace:!0})},[n,o])}const V=t=>{const n=x.useForm(),o=e.useAPIClient(),s=_(),{refreshAsync:r}=e.useCurrentUserContext();return{run(){return T(this,null,function*(){yield n.submit(),yield o.auth.signIn(n.values,t),yield r(),s()})}}},z={type:"object",name:"passwordForm","x-component":"FormV2",properties:{account:{type:"string","x-component":"Input","x-validator":`{{(value) => {
|
|
12
12
|
if (!value) {
|
|
13
13
|
return t("Please enter your username or email");
|
|
14
14
|
}
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
} else {
|
|
20
20
|
return /^[^@.<>"'/]{2,16}$/.test(value) || t("Please enter a valid username");
|
|
21
21
|
}
|
|
22
|
-
}}}`,"x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Username/Email")}}',style:{}}},password:{type:"string","x-component":"Password",required:!0,"x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Password")}}',style:{}}},actions:{type:"void","x-component":"div",properties:{submit:{title:'{{t("Sign in")}}',type:"void","x-component":"Action","x-component-props":{htmlType:"submit",block:!0,type:"primary",useAction:"{{ useBasicSignIn }}",style:{width:"100%"}}}}},signUp:{type:"void","x-component":"Link","x-component-props":{to:"{{ signUpLink }}"},"x-content":'{{t("Create an account")}}',"x-visible":"{{ allowSignUp }}"}}},K=t=>{const{t:n}=v(),o=t.authenticator,{authType:s,name:r,options:i}=o,m=!!k()[s]&&(i==null?void 0:i.allowSignUp),ue=`/signup?name=${r}`,le=()=>U(r);return a.jsx(e.SchemaComponent,{schema:z,scope:{useBasicSignIn:le,allowSignUp:m,signUpLink:ue,t:n}})},Z=t=>{const n=y.useNavigate(),o=x.useForm(),s=e.useAPIClient(),{t:r}=h.useTranslation();return{run(){return b(this,null,function*(){var p;yield o.submit(),yield s.auth.signUp(o.values,t==null?void 0:t.authenticator),d.message.success(((p=t==null?void 0:t.message)==null?void 0:p.success)||r("Sign up successfully, and automatically jump to the sign in page")),setTimeout(()=>{n("/signin")},2e3)})}}},W={type:"object",name:x.uid(),"x-component":"FormV2",properties:{username:{type:"string",required:!0,"x-component":"Input","x-validator":{username:!0},"x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Username")}}',style:{}}},password:{type:"string",required:!0,"x-component":"Password","x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Password")}}',checkStrength:!0,style:{}},"x-reactions":[{dependencies:[".confirm_password"],fulfill:{state:{selfErrors:'{{$deps[0] && $self.value && $self.value !== $deps[0] ? t("Password mismatch") : ""}}'}}}]},confirm_password:{type:"string",required:!0,"x-component":"Password","x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Confirm password")}}',style:{}},"x-reactions":[{dependencies:[".password"],fulfill:{state:{selfErrors:'{{$deps[0] && $self.value && $self.value !== $deps[0] ? t("Password mismatch") : ""}}'}}}]},actions:{type:"void","x-component":"div",properties:{submit:{title:'{{t("Sign up")}}',type:"void","x-component":"Action","x-component-props":{block:!0,type:"primary",htmlType:"submit",useAction:"{{ useBasicSignUp }}",style:{width:"100%"}}}}},link:{type:"void","x-component":"div",properties:{link:{type:"void","x-component":"Link","x-component-props":{to:"/signin"},"x-content":'{{t("Log in with an existing account")}}'}}}}},G=({authenticatorName:t})=>{const{t:n}=v(),o=()=>Z({authenticator:t}),s=F(t),{options:r}=s;return r!=null&&r.allowSignUp?a.jsx(e.SchemaComponent,{schema:W,scope:{useBasicSignUp:o,t:n}}):a.jsx(y.Navigate,{to:"/not-found",replace:!0})},H=()=>{const{t}=v();return a.jsx(e.SchemaComponent,{scope:{t},components:{Alert:d.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.")}}'}}}}})},J=()=>{var s;const n=e.usePlugin(g).authTypes.getEntities(),o={};for(const[r,i]of n)(s=i.components)!=null&&s.BindForm&&(o[r]=i.components.BindForm);return o},Q=()=>{const t=e.useRecord(),o=J()[t.authType];return u.createElement(o,{authenticator:t})},X={type:"void",name:"authenticatorBind","x-decorator":"TableBlockProvider","x-decorator-props":{collection:{name:"authenticators",sortable:!1,fields:[{interface:"input",type:"string",name:"authType"},{interface:"input",type:"string",name:"title",uiSchema:{type:"string",title:'{{t("Title")}}',"x-component":"Input"}},{interface:"textarea",type:"string",name:"description",uiSchema:{type:"string",title:'{{t("Description")}}',"x-component":"Input"}},{type:"boolean",name:"bind",uiSchema:{type:"boolean",title:'{{t("Bind")}}',"x-component":"Checkbox"}},{type:"string",name:"nickname",uiSchema:{type:"string",title:'{{t("Nickname")}}',"x-component":"Input"}}]},resource:"authenticators",action:"bindTypes",params:{sort:["sort"]},rowKey:"name",showIndex:!0},"x-component":"div",properties:{table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"name"},properties:{authType:{title:'{{t("Auth Type")}}',type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{authType:{type:"string","x-component":"Select","x-read-pretty":!0}}},title:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},description:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{description:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},bind:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{bind:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},nickname:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{nickname:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{unbind:{"x-visible":'{{ $self.query(".bind").value() }}',type:"void",title:'{{ t("Unbind") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Unbind')}}",content:"{{t('Are you sure to unbind this authenticator?')}}"},useAction:"{{ useUnbindAction }}"}},bind:{"x-visible":'{{ !$self.query(".bind").value() }}',type:"void",title:"{{ t('Bind') }}","x-component":"Action.Link",properties:{modal:{type:"void","x-decorator":"Form",title:"{{ t('Bind') }}","x-component":"Action.Modal","x-component-props":{width:800},properties:{form:{type:"void","x-component":"BindForm"}}}}}}}}}}}}},Y=()=>{const{refreshCM:t}=e.useCollectionManager_deprecated(),n=e.useAPIClient(),o=e.useRecord();return{run(){return b(this,null,function*(){yield n.resource("authenticators").unbind({authenticator:o.name}),t()})}}},R=()=>{const{t}=v();return a.jsx(d.Card,{bordered:!1,children:a.jsx(e.SchemaComponent,{schema:X,components:{BindForm:Q},scope:{t,useUnbindAction:Y}})})},w=u.createContext({type:""});w.displayName="AuthTypeContext";const P=u.createContext({types:[]});P.displayName="AuthTypesContext";const ee=()=>{const{types:t}=u.useContext(P);return t},te=t=>{const n=e.useRecord(),o=e.useRequest(()=>Promise.resolve({data:f({},n.options)}),S(f({},t),{manual:!0})),{run:s}=o,r=e.useActionContext();return u.useEffect(()=>{r.visible&&s()},[r.visible,s]),o},oe=t=>{var s;const o=e.usePlugin(g).authTypes.get(t);return(s=o==null?void 0:o.components)==null?void 0:s.AdminSettingsForm},ne=x.observer(()=>{const t=x.useForm(),n=e.useRecord(),o=oe(t.values.authType||n.authType);return o?a.jsx(o,{}):null},{displayName:"Options"}),D={name:"authenticators",sortable:!0,fields:[{name:"id",type:"string",interface:"id"},{interface:"input",type:"string",name:"name",uiSchema:{type:"string",title:'{{t("Auth UID")}}',"x-component":"Input","x-validator":t=>/^[a-zA-Z0-9_-]+$/.test(t)?"":e.i18n.t("a-z, A-Z, 0-9, _, -"),required:!0}},{interface:"input",type:"string",name:"authType",uiSchema:{type:"string",title:'{{t("Auth Type")}}',"x-component":"Select",dataSource:"{{ types }}",required:!0}},{interface:"input",type:"string",name:"title",uiSchema:{type:"string",title:'{{t("Title")}}',"x-component":"Input"}},{interface:"textarea",type:"string",name:"description",uiSchema:{type:"string",title:'{{t("Description")}}',"x-component":"Input"}},{type:"boolean",name:"enabled",uiSchema:{type:"boolean",title:'{{t("Enabled")}}',"x-component":"Checkbox"}}]},re={type:"object",properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues(t){const n=e.useActionContext(),{type:o}=u.useContext(w);return e.useRequest(()=>Promise.resolve({data:{name:`s_${x.uid()}`,authType:o}}),S(f({},t),{refreshDeps:[n.visible]}))}},title:'{{t("Add new")}}',properties:{name:{"x-component":"CollectionField","x-decorator":"FormItem"},authType:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{options:"{{ types }}"}},title:{"x-component":"CollectionField","x-decorator":"FormItem"},description:{"x-component":"CollectionField","x-decorator":"FormItem"},enabled:{"x-component":"CollectionField","x-decorator":"FormItem"},options:{type:"object","x-component":"Options"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useCreateAction }}"}}}}}}}},se={type:"void",name:"authenticators","x-decorator":"ResourceActionProvider","x-decorator-props":{collection:D,resourceName:"authenticators",dragSort:!0,request:{resource:"authenticators",action:"list",params:{pageSize:50,sort:"sort",appends:[]}}},"x-component":"CollectionProvider_deprecated","x-component-props":{collection:D},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{delete:{type:"void",title:'{{t("Delete")}}',"x-component":"Action","x-component-props":{icon:"DeleteOutlined",useAction:"{{ cm.useBulkDestroyAction }}",confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-component":"AddNew","x-component-props":{type:"primary"}}}},table:{type:"void","x-uid":"input","x-component":"Table.Void","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"},useDataSource:"{{ cm.useDataSourceFromRAC }}",useAction(){const t=e.useAPIClient(),{t:n}=h.useTranslation();return{move(s,r){return b(this,null,function*(){yield t.resource("authenticators").move({sourceId:s.id,targetId:r.id}),d.message.success(n("Saved successfully"),.2)})}}}},properties:{id:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{id:{type:"number","x-component":"CollectionField","x-read-pretty":!0}}},name:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{name:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},authType:{title:'{{t("Auth Type")}}',type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{authType:{type:"string","x-component":"Select","x-read-pretty":!0,enum:"{{ types }}"}}},title:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},description:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{description:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},enabled:{type:"void","x-decorator":"Table.Column.Decorator","x-component":"Table.Column",properties:{enabled:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"Table.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{update:{type:"void",title:'{{t("Configure")}}',"x-component":"Action.Link","x-component-props":{type:"primary"},properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues:"{{ cm.useValuesFromRecord }}"},title:'{{t("Configure")}}',properties:{name:{"x-component":"CollectionField","x-decorator":"FormItem"},authType:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{options:"{{ types }}"}},title:{"x-component":"CollectionField","x-decorator":"FormItem"},description:{"x-component":"CollectionField","x-decorator":"FormItem"},enabled:{"x-component":"CollectionField","x-decorator":"FormItem"},options:{type:"object","x-component":"Options"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{t("Cancel")}}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},submit:{title:'{{t("Submit")}}',"x-component":"Action","x-component-props":{type:"primary",useAction:"{{ cm.useUpdateAction }}"}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"},useAction:"{{cm.useDestroyAction}}"},"x-disabled":"{{ useCanNotDelete() }}"}}}}}}}}},ie=()=>{const{setVisible:t}=e.useActionContext();return{run(){return b(this,null,function*(){t(!1)})}}},ae=()=>{const{t}=h.useTranslation(),[n,o]=u.useState(!1),[s,r]=u.useState(""),i=ee(),p=i.map(m=>S(f({},m),{onClick:()=>{o(!0),r(m.value)}}));return a.jsx(e.ActionContextProvider,{value:{visible:n,setVisible:o},children:a.jsxs(w.Provider,{value:{type:s},children:[a.jsx(d.Dropdown,{menu:{items:p},children:a.jsxs(d.Button,{icon:a.jsx(C.PlusOutlined,{}),type:"primary",children:[t("Add new")," ",a.jsx(C.DownOutlined,{})]})}),a.jsx(e.SchemaComponent,{scope:{useCloseAction:ie,types:i,setType:r},schema:re})]})})},ce=()=>(e.useAsyncData(),!1),pe=()=>{const{t}=v(),[n,o]=u.useState([]),s=e.useAPIClient();return e.useRequest(()=>s.resource("authenticators").listTypes().then(r=>{var p;return(((p=r==null?void 0:r.data)==null?void 0:p.data)||[]).map(m=>({key:m.name,label:t(m.title||m.name),value:m.name}))}),{onSuccess:r=>{o(r)}}),a.jsx(d.Card,{bordered:!1,children:a.jsx(P.Provider,{value:{types:n},children:a.jsx(e.SchemaComponent,{schema:se,components:{AddNew:ae,Options:ne},scope:{types:n,useValuesFromOptions:te,useCanNotDelete:ce,t}})})})};class g extends e.Plugin{constructor(){super(...arguments);V(this,"authTypes",new l.Registry)}registerType(o,s){this.authTypes.register(o,s)}load(){return b(this,null,function*(){this.app.systemSettingsManager.add("system-services."+T,{icon:"LoginOutlined",title:`{{t("Authentication", { ns: "${T}" })}}`,Component:pe,aclSnippet:"pm.auth.authenticators"}),this.app.userSettingsManager.add(T,{icon:"LoginOutlined",title:`{{t("Authentication login bind", { ns: "${T}" })}}`,Component:R,aclSnippet:"pm.auth.authenticators"}),this.router.add("auth",{Component:"AuthLayout"}),this.router.add("auth.signin",{path:"/signin",Component:"SignInPage"}),this.router.add("auth.signup",{path:"/signup",Component:"SignUpPage"}),this.app.addComponents({AuthLayout:N,SignInPage:O,SignUpPage:M}),this.app.providers.unshift([q,{}]),this.registerType($,{components:{SignInForm:K,SignUpForm:G,AdminSettingsForm:H}})})}}c.AuthenticatorsContext=A,c.PluginAuthClient=g,c.default=g,c.useAuthenticator=F,c.useSignIn=U,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
22
|
+
}}}`,"x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Username/Email")}}',style:{}}},password:{type:"string","x-component":"Password",required:!0,"x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Password")}}',style:{}}},actions:{type:"void","x-component":"div",properties:{submit:{title:'{{t("Sign in")}}',type:"void","x-component":"Action","x-component-props":{htmlType:"submit",block:!0,type:"primary",useAction:"{{ useBasicSignIn }}",style:{width:"100%"}}}}},signUp:{type:"void","x-component":"Link","x-component-props":{to:"{{ signUpLink }}"},"x-content":'{{t("Create an account")}}',"x-visible":"{{ allowSignUp }}"}}},K=t=>{const{t:n}=C(),o=t.authenticator,{authType:s,name:r,options:i}=o,m=!!k()[s]&&(i==null?void 0:i.allowSignUp),ue=`/signup?name=${r}`,le=()=>V(r);return a.jsx(e.SchemaComponent,{schema:z,scope:{useBasicSignIn:le,allowSignUp:m,signUpLink:ue,t:n}})},Z=t=>{const n=y.useNavigate(),o=x.useForm(),s=e.useAPIClient(),{t:r}=h.useTranslation();return{run(){return T(this,null,function*(){var c;yield o.submit(),yield s.auth.signUp(o.values,t==null?void 0:t.authenticator),d.message.success(((c=t==null?void 0:t.message)==null?void 0:c.success)||r("Sign up successfully, and automatically jump to the sign in page")),setTimeout(()=>{n("/signin")},2e3)})}}},W={type:"object",name:x.uid(),"x-component":"FormV2",properties:{username:{type:"string",required:!0,"x-component":"Input","x-validator":{username:!0},"x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Username")}}',style:{}}},password:{type:"string",required:!0,"x-component":"Password","x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Password")}}',checkStrength:!0,style:{}},"x-reactions":[{dependencies:[".confirm_password"],fulfill:{state:{selfErrors:'{{$deps[0] && $self.value && $self.value !== $deps[0] ? t("Password mismatch") : ""}}'}}}]},confirm_password:{type:"string",required:!0,"x-component":"Password","x-decorator":"FormItem","x-component-props":{placeholder:'{{t("Confirm password")}}',style:{}},"x-reactions":[{dependencies:[".password"],fulfill:{state:{selfErrors:'{{$deps[0] && $self.value && $self.value !== $deps[0] ? t("Password mismatch") : ""}}'}}}]},actions:{type:"void","x-component":"div",properties:{submit:{title:'{{t("Sign up")}}',type:"void","x-component":"Action","x-component-props":{block:!0,type:"primary",htmlType:"submit",useAction:"{{ useBasicSignUp }}",style:{width:"100%"}}}}},link:{type:"void","x-component":"div",properties:{link:{type:"void","x-component":"Link","x-component-props":{to:"/signin"},"x-content":'{{t("Log in with an existing account")}}'}}}}},G=({authenticatorName:t})=>{const{t:n}=C(),o=()=>Z({authenticator:t}),s=F(t),{options:r}=s;return r!=null&&r.allowSignUp?a.jsx(e.SchemaComponent,{schema:W,scope:{useBasicSignUp:o,t:n}}):a.jsx(y.Navigate,{to:"/not-found",replace:!0})},H=()=>{const{t}=C();return a.jsx(e.SchemaComponent,{scope:{t},components:{Alert:d.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.")}}'}}}}})},J=()=>{var s;const n=e.usePlugin(g).authTypes.getEntities(),o={};for(const[r,i]of n)(s=i.components)!=null&&s.BindForm&&(o[r]=i.components.BindForm);return o},Q=()=>{const t=e.useRecord(),o=J()[t.authType];return u.createElement(o,{authenticator:t})},X={type:"void",name:"authenticatorBind","x-decorator":"TableBlockProvider","x-decorator-props":{collection:{name:"authenticators",sortable:!1,fields:[{interface:"input",type:"string",name:"authType"},{interface:"input",type:"string",name:"title",uiSchema:{type:"string",title:'{{t("Title")}}',"x-component":"Input"}},{interface:"textarea",type:"string",name:"description",uiSchema:{type:"string",title:'{{t("Description")}}',"x-component":"Input"}},{type:"boolean",name:"bind",uiSchema:{type:"boolean",title:'{{t("Bind")}}',"x-component":"Checkbox"}},{type:"string",name:"nickname",uiSchema:{type:"string",title:'{{t("Nickname")}}',"x-component":"Input"}}]},resource:"authenticators",action:"bindTypes",params:{sort:["sort"]},rowKey:"name",showIndex:!0},"x-component":"div",properties:{table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"name"},properties:{authType:{title:'{{t("Auth Type")}}',type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{authType:{type:"string","x-component":"Select","x-read-pretty":!0}}},title:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},description:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{description:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},bind:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{bind:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},nickname:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{nickname:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{unbind:{"x-visible":'{{ $self.query(".bind").value() }}',type:"void",title:'{{ t("Unbind") }}',"x-component":"Action.Link","x-component-props":{confirm:{title:"{{t('Unbind')}}",content:"{{t('Are you sure to unbind this authenticator?')}}"},useAction:"{{ useUnbindAction }}"}},bind:{"x-visible":'{{ !$self.query(".bind").value() }}',type:"void",title:"{{ t('Bind') }}","x-component":"Action.Link",properties:{modal:{type:"void","x-decorator":"Form",title:"{{ t('Bind') }}","x-component":"Action.Modal","x-component-props":{width:800},properties:{form:{type:"void","x-component":"BindForm"}}}}}}}}}}}}},Y=()=>{const{refreshCM:t}=e.useCollectionManager_deprecated(),n=e.useAPIClient(),o=e.useRecord();return{run(){return T(this,null,function*(){yield n.resource("authenticators").unbind({authenticator:o.name}),t()})}}},R=()=>{const{t}=C();return a.jsx(d.Card,{bordered:!1,children:a.jsx(e.SchemaComponent,{schema:X,components:{BindForm:Q},scope:{t,useUnbindAction:Y}})})},w=u.createContext({type:""});w.displayName="AuthTypeContext";const P=u.createContext({types:[]});P.displayName="AuthTypesContext";const ee=()=>{const{types:t}=u.useContext(P);return t},te=t=>{const n=e.useRecord(),o=e.useRequest(()=>Promise.resolve({data:v({},n.options)}),S(v({},t),{manual:!0})),{run:s}=o,r=e.useActionContext();return u.useEffect(()=>{r.visible&&s()},[r.visible,s]),o},oe=t=>{var s;const o=e.usePlugin(g).authTypes.get(t);return(s=o==null?void 0:o.components)==null?void 0:s.AdminSettingsForm},ne=x.observer(()=>{const t=x.useForm(),n=e.useRecord(),o=oe(t.values.authType||n.authType);return o?a.jsx(o,{}):null},{displayName:"Options"}),B={name:"authenticators",sortable:!0,fields:[{name:"id",type:"string",interface:"id"},{interface:"input",type:"string",name:"name",uiSchema:{type:"string",title:'{{t("Auth UID")}}',"x-component":"Input","x-validator":t=>/^[a-zA-Z0-9_-]+$/.test(t)?"":e.i18n.t("a-z, A-Z, 0-9, _, -"),required:!0}},{interface:"input",type:"string",name:"authType",uiSchema:{type:"string",title:'{{t("Auth Type")}}',"x-component":"Select",dataSource:"{{ types }}",required:!0}},{interface:"input",type:"string",name:"title",uiSchema:{type:"string",title:'{{t("Title")}}',"x-component":"Input"}},{interface:"textarea",type:"string",name:"description",uiSchema:{type:"string",title:'{{t("Description")}}',"x-component":"Input"}},{type:"boolean",name:"enabled",uiSchema:{type:"boolean",title:'{{t("Enabled")}}',"x-component":"Checkbox"}}]},re={type:"object",properties:{drawer:{type:"void","x-component":"Action.Drawer","x-decorator":"Form","x-decorator-props":{useValues(t){const n=e.useActionContext(),{type:o}=u.useContext(w);return e.useRequest(()=>Promise.resolve({data:{name:`s_${x.uid()}`,authType:o}}),S(v({},t),{refreshDeps:[n.visible]}))}},title:'{{t("Add new")}}',properties:{name:{"x-component":"CollectionField","x-decorator":"FormItem"},authType:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{options:"{{ types }}"}},title:{"x-component":"CollectionField","x-decorator":"FormItem"},description:{"x-component":"CollectionField","x-decorator":"FormItem"},enabled:{"x-component":"CollectionField","x-decorator":"FormItem"},options:{type:"object","x-component":"Options"},footer:{type:"void","x-component":"Action.Drawer.Footer",properties:{cancel:{title:'{{ t("Cancel") }}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},create:{title:'{{ t("Submit") }}',"x-action":"submit","x-component":"Action","x-use-component-props":"useCreateDatabaseConnectionAction","x-component-props":{type:"primary"}}}}}}}},se={type:"void",name:"authenticators","x-decorator":"TableBlockProvider","x-decorator-props":{collection:B,dragSort:!0,action:"list",params:{pageSize:50,sort:"sort",appends:[]}},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:16}},properties:{delete:{type:"void",title:'{{t("Delete")}}',"x-action":"destroy","x-decorator":"ACLActionProvider","x-component":"Action","x-use-component-props":"useBulkDestroyActionProps","x-component-props":{icon:"DeleteOutlined",confirm:{title:"{{t('Delete')}}",content:"{{t('Are you sure you want to delete it?')}}"}}},create:{type:"void",title:'{{t("Add new")}}',"x-component":"AddNew","x-component-props":{type:"primary"}}}},table:{type:"array","x-uid":"input","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"}},properties:{id:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{id:{type:"number","x-component":"CollectionField","x-read-pretty":!0}}},name:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{name:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},authType:{title:'{{t("Auth Type")}}',type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{authType:{type:"string","x-component":"Select","x-read-pretty":!0,enum:"{{ types }}"}}},title:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{title:{type:"string","x-component":"CollectionField","x-read-pretty":!0}}},description:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{description:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},enabled:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{enabled:{type:"boolean","x-component":"CollectionField","x-read-pretty":!0}}},actions:{type:"void",title:'{{t("Actions")}}',"x-component":"TableV2.Column",properties:{actions:{type:"void","x-component":"Space","x-component-props":{split:"|"},properties:{updateAuthenticator:{type:"void",title:'{{ t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:"drawer",icon:"EditOutlined"},"x-decorator":"ACLActionProvider",properties:{drawer:{type:"void",title:'{{ t("Edit record") }}',"x-component":"Action.Container","x-component-props":{className:"tb-action-popup"},properties:{card:{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":"authenticators:update","x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:"main",collection:B},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:{actionBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:24}},properties:{cancel:{title:'{{ t("Cancel") }}',"x-component":"Action","x-use-component-props":"useCancelActionProps"},submit:{title:'{{ t("Submit") }}',"x-component":"Action","x-use-component-props":"useUpdateActionProps","x-component-props":{type:"primary"}}}},name:{"x-component":"CollectionField","x-decorator":"FormItem"},authType:{"x-component":"CollectionField","x-decorator":"FormItem","x-component-props":{options:"{{ types }}"}},title:{"x-component":"CollectionField","x-decorator":"FormItem"},description:{"x-component":"CollectionField","x-decorator":"FormItem"},enabled:{"x-component":"CollectionField","x-decorator":"FormItem"},options:{type:"object","x-component":"Options"}}}}}}}}},delete:{type:"void",title:'{{ t("Delete") }}',"x-action":"destroy","x-component":"Action.Link","x-use-component-props":"useDestroyActionProps","x-component-props":{confirm:{title:"{{t('Delete record')}}",content:"{{t('Are you sure you want to delete it?')}}"}},"x-disabled":"{{ useCanNotDelete() }}"}}}}}}}}},ie=()=>{const{setVisible:t}=e.useActionContext();return{run(){return T(this,null,function*(){t(!1)})}}},ae=()=>{const{t}=h.useTranslation(),[n,o]=u.useState(!1),[s,r]=u.useState(""),i=ee(),c=i.map(m=>S(v({},m),{onClick:()=>{o(!0),r(m.value)}}));return a.jsx(e.ActionContextProvider,{value:{visible:n,setVisible:o},children:a.jsxs(w.Provider,{value:{type:s},children:[a.jsx(d.Dropdown,{menu:{items:c},children:a.jsxs(d.Button,{icon:a.jsx(b.PlusOutlined,{}),type:"primary",children:[t("Add new")," ",a.jsx(b.DownOutlined,{})]})}),a.jsx(e.SchemaComponent,{scope:{useCloseAction:ie,types:i,setType:r},schema:re})]})})},pe=()=>(e.useAsyncData(),!1),ce=()=>{const{t}=C(),[n,o]=u.useState([]),s=e.useAPIClient();return e.useRequest(()=>s.resource("authenticators").listTypes().then(r=>{var c;return(((c=r==null?void 0:r.data)==null?void 0:c.data)||[]).map(m=>({key:m.name,label:t(m.title||m.name),value:m.name}))}),{onSuccess:r=>{o(r)}}),a.jsx(d.Card,{bordered:!1,children:a.jsx(P.Provider,{value:{types:n},children:a.jsx(e.SchemaComponent,{schema:se,components:{AddNew:ae,Options:ne},scope:{types:n,useValuesFromOptions:te,useCanNotDelete:pe,t}})})})};class g extends e.Plugin{constructor(){super(...arguments);D(this,"authTypes",new l.Registry)}registerType(o,s){this.authTypes.register(o,s)}load(){return T(this,null,function*(){this.app.systemSettingsManager.add("system-services."+f,{icon:"LoginOutlined",title:`{{t("Authentication", { ns: "${f}" })}}`,Component:ce,aclSnippet:"pm.auth.authenticators"}),this.app.userSettingsManager.add(f,{icon:"LoginOutlined",title:`{{t("Authentication login bind", { ns: "${f}" })}}`,Component:R,aclSnippet:"pm.auth.authenticators"}),this.router.add("auth",{Component:"AuthLayout"}),this.router.add("auth.signin",{path:"/signin",Component:"SignInPage"}),this.router.add("auth.signup",{path:"/signup",Component:"SignUpPage"}),this.app.addComponents({AuthLayout:N,SignInPage:O,SignUpPage:M}),this.app.providers.unshift([E,{}]),this.registerType($,{components:{SignInForm:K,SignUpForm:G,AdminSettingsForm:H}})})}}p.AuthenticatorsContext=A,p.PluginAuthClient=g,p.default=g,p.useAuthenticator=F,p.useSignIn=V,Object.defineProperties(p,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "0.23.
|
|
3
|
+
"@tachybase/client": "0.23.40",
|
|
4
4
|
"react-router-dom": "6.28.1",
|
|
5
|
-
"@tachybase/utils": "0.23.
|
|
6
|
-
"@tachybase/auth": "0.23.
|
|
7
|
-
"@tachybase/database": "0.23.
|
|
8
|
-
"@tachybase/cache": "0.23.
|
|
9
|
-
"@tachybase/server": "0.23.
|
|
10
|
-
"@tachybase/test": "0.23.
|
|
5
|
+
"@tachybase/utils": "0.23.40",
|
|
6
|
+
"@tachybase/auth": "0.23.40",
|
|
7
|
+
"@tachybase/database": "0.23.40",
|
|
8
|
+
"@tachybase/cache": "0.23.40",
|
|
9
|
+
"@tachybase/server": "0.23.40",
|
|
10
|
+
"@tachybase/test": "0.23.40",
|
|
11
11
|
"antd": "5.22.5",
|
|
12
|
-
"@tachybase/schema": "0.23.
|
|
12
|
+
"@tachybase/schema": "0.23.40",
|
|
13
13
|
"react-i18next": "15.2.0",
|
|
14
14
|
"@ant-design/icons": "5.3.7",
|
|
15
|
-
"@tachybase/actions": "0.23.
|
|
15
|
+
"@tachybase/actions": "0.23.40"
|
|
16
16
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"cron","description":"Cron jobs for your node","version":"3.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":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -b tsconfig.build.json","lint:eslint":"eslint src/ tests/","lint:prettier":"prettier ./**/*.{json,md,yml} --check","lint":"npm run lint:eslint && npm run lint:prettier","lint:fix":"npm run lint:eslint -- --fix && npm run lint:prettier -- --write","test":"jest --coverage","test:watch":"jest --watch --coverage","test:fuzz":"jest --testMatch='**/*.fuzz.ts' --coverage=false --testTimeout=120000","prepare":"husky"},"dependencies":{"@types/luxon":"~3.4.0","luxon":"~3.5.0"},"devDependencies":{"@commitlint/cli":"19.6.0","@eslint/js":"^9.14.0","@fast-check/jest":"2.0.3","@insurgent/commitlint-config":"20.0.0","@insurgent/conventional-changelog-preset":"10.0.0","@semantic-release/changelog":"6.0.3","@semantic-release/commit-analyzer":"13.0.0","@semantic-release/git":"10.0.1","@semantic-release/github":"11.0.1","@semantic-release/npm":"12.0.1","@semantic-release/release-notes-generator":"14.0.1","@types/jest":"29.5.14","@types/node":"20.17.9","@types/sinon":"17.0.3","chai":"4.5.0","eslint":"8.57.1","eslint-config-prettier":"9.1.0","eslint-plugin-jest":"27.9.0","eslint-plugin-prettier":"5.2.1","husky":"9.1.7","jest":"29.7.0","lint-staged":"15.2.10","prettier":"3.3.3","semantic-release":"24.2.0","sinon":"17.0.2","ts-jest":"29.2.5","typescript":"5.7.2","typescript-eslint":"^7.2.0"},"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)","Pierre Cavin <me@sherlox.io> (https://github.com/sheerlox)","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)"],"files":["dist/**/*.js","dist/**/*.d.ts","CHANGELOG.md","LICENSE","README.md"],"lint-staged":{"*.ts":"eslint src/ tests/ --fix","*.{json,md,yml}":"prettier ./**/*.{json,md,yml} --check --write"},"_lastModified":"
|
|
1
|
+
{"name":"cron","description":"Cron jobs for your node","version":"3.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":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc -b tsconfig.build.json","lint:eslint":"eslint src/ tests/","lint:prettier":"prettier ./**/*.{json,md,yml} --check","lint":"npm run lint:eslint && npm run lint:prettier","lint:fix":"npm run lint:eslint -- --fix && npm run lint:prettier -- --write","test":"jest --coverage","test:watch":"jest --watch --coverage","test:fuzz":"jest --testMatch='**/*.fuzz.ts' --coverage=false --testTimeout=120000","prepare":"husky"},"dependencies":{"@types/luxon":"~3.4.0","luxon":"~3.5.0"},"devDependencies":{"@commitlint/cli":"19.6.0","@eslint/js":"^9.14.0","@fast-check/jest":"2.0.3","@insurgent/commitlint-config":"20.0.0","@insurgent/conventional-changelog-preset":"10.0.0","@semantic-release/changelog":"6.0.3","@semantic-release/commit-analyzer":"13.0.0","@semantic-release/git":"10.0.1","@semantic-release/github":"11.0.1","@semantic-release/npm":"12.0.1","@semantic-release/release-notes-generator":"14.0.1","@types/jest":"29.5.14","@types/node":"20.17.9","@types/sinon":"17.0.3","chai":"4.5.0","eslint":"8.57.1","eslint-config-prettier":"9.1.0","eslint-plugin-jest":"27.9.0","eslint-plugin-prettier":"5.2.1","husky":"9.1.7","jest":"29.7.0","lint-staged":"15.2.10","prettier":"3.3.3","semantic-release":"24.2.0","sinon":"17.0.2","ts-jest":"29.2.5","typescript":"5.7.2","typescript-eslint":"^7.2.0"},"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)","Pierre Cavin <me@sherlox.io> (https://github.com/sheerlox)","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)"],"files":["dist/**/*.js","dist/**/*.d.ts","CHANGELOG.md","LICENSE","README.md"],"lint-staged":{"*.ts":"eslint src/ tests/ --fix","*.{json,md,yml}":"prettier ./**/*.{json,md,yml} --check --write"},"_lastModified":"2025-01-18T18:47:13.685Z"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/module-auth",
|
|
3
3
|
"displayName": "Authentication",
|
|
4
|
-
"version": "0.23.
|
|
4
|
+
"version": "0.23.40",
|
|
5
5
|
"description": "User authentication management, including password, SMS, and support for Single Sign-On (SSO) protocols, with extensibility.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Authentication"
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
"react": "^18.3.1",
|
|
16
16
|
"react-i18next": "^15.2.0",
|
|
17
17
|
"react-router-dom": "6.28.1",
|
|
18
|
-
"@tachybase/schema": "0.23.
|
|
18
|
+
"@tachybase/schema": "0.23.40"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@tachybase/actions": "0.23.
|
|
22
|
-
"@tachybase/
|
|
23
|
-
"@tachybase/
|
|
24
|
-
"@tachybase/
|
|
25
|
-
"@tachybase/
|
|
26
|
-
"@tachybase/
|
|
27
|
-
"@tachybase/
|
|
28
|
-
"@tachybase/
|
|
21
|
+
"@tachybase/actions": "0.23.40",
|
|
22
|
+
"@tachybase/cache": "0.23.40",
|
|
23
|
+
"@tachybase/auth": "0.23.40",
|
|
24
|
+
"@tachybase/client": "0.23.40",
|
|
25
|
+
"@tachybase/database": "0.23.40",
|
|
26
|
+
"@tachybase/test": "0.23.40",
|
|
27
|
+
"@tachybase/server": "0.23.40",
|
|
28
|
+
"@tachybase/utils": "0.23.40"
|
|
29
29
|
},
|
|
30
30
|
"description.zh-CN": "用户认证管理,包括基础的密码认证、短信认证、SSO 协议的认证等,可扩展。",
|
|
31
31
|
"displayName.zh-CN": "用户认证",
|