@springmicro/auth 0.7.0 → 0.7.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.
- package/.eslintrc.cjs +18 -18
- package/README.md +60 -60
- package/dist/Index-64ac63ff-ChMmeIY7.js +0 -0
- package/dist/Index-6c094240-hn_S7Xeg.js +0 -0
- package/dist/Web3Auth-CGD96zai.js +0 -0
- package/dist/alphawallet-B7eovdf-.js +0 -0
- package/dist/apexwallet-ysP20G9D.js +0 -0
- package/dist/atoken-BBnNTzcz.js +0 -0
- package/dist/bifrostwallet-CNNBO92h.js +0 -0
- package/dist/binance-DvPgAzCw.js +0 -0
- package/dist/bitget-DZOUrwgy.js +0 -0
- package/dist/bitpie-C_uxmEzw.js +0 -0
- package/dist/bitski-DpzkHNkv.js +0 -0
- package/dist/blockwallet-BL69cqkA.js +0 -0
- package/dist/brave-DnRzMQYW.js +0 -0
- package/dist/ccip-c78d2f16-DLcRlwod.js +0 -0
- package/dist/coin98wallet-CkFdOvXt.js +0 -0
- package/dist/coinbase-CaGNx5if.js +0 -0
- package/dist/core-9rK8tWud.js +0 -0
- package/dist/defiwallet-0AsgJBSy.js +0 -0
- package/dist/detected-CX_JZaUk.js +0 -0
- package/dist/echooo-CmaetT_Z.js +0 -0
- package/dist/enkrypt-BibtwvK7.js +0 -0
- package/dist/exodus-BxzkDWWP.js +0 -0
- package/dist/fordefi-CvKyVwhI.js +0 -0
- package/dist/foxwallet-D7c_LDTf.js +0 -0
- package/dist/frame-CDfNmjUy.js +0 -0
- package/dist/frontier-DqKNSj2z.js +0 -0
- package/dist/hashMessage-Bdgmx0rg.js +0 -0
- package/dist/huobiwallet-CxSwqa5L.js +0 -0
- package/dist/hyperpay-nmHE3WqM.js +0 -0
- package/dist/icon-2Zqy7pqQ.js +0 -0
- package/dist/icon-CGWI1Ies.js +0 -0
- package/dist/icon-C_O4nprO.js +0 -0
- package/dist/icon-DbgmZCnU.js +0 -0
- package/dist/icon-Dbjb6jc5.js +0 -0
- package/dist/icon-cAd7RhSC.js +0 -0
- package/dist/imtoken-yENtOTS3.js +0 -0
- package/dist/index-021f6a62-Zz543EDB.js +0 -0
- package/dist/index-40a497ea-Bn2mC0r7.js +0 -0
- package/dist/index-62liFLUM.js +0 -0
- package/dist/index-BBx_mvyX.js +0 -0
- package/dist/index-C6leUA25.js +0 -0
- package/dist/index-CAVvArYp.js +0 -0
- package/dist/index-Ct7cFdFm.js +0 -0
- package/dist/index-DA32_Pfh.js +0 -0
- package/dist/index-Dna0rycp.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/dist/index.umd.cjs +0 -0
- package/dist/infinitywallet-C8J4FUYw.js +0 -0
- package/dist/kayros-AIrUK1za.js +0 -0
- package/dist/keplr-CyLTca9B.js +0 -0
- package/dist/lif3wallet-C5D6r8pg.js +0 -0
- package/dist/liquality-nbCtErVq.js +0 -0
- package/dist/mathwallet-CWkivCXo.js +0 -0
- package/dist/meetone-kKmvI8md.js +0 -0
- package/dist/metamask-BN7yiDV1.js +0 -0
- package/dist/mykey-CQZ6UcLH.js +0 -0
- package/dist/native-FDN9oNjc.js +0 -0
- package/dist/number-C-98SESp.js +0 -0
- package/dist/okxwallet-CJLVogh2.js +0 -0
- package/dist/oneInch-CciyZ4Pz.js +0 -0
- package/dist/onekey-Dal8kYjU.js +0 -0
- package/dist/opera-DnKg-TJU.js +0 -0
- package/dist/ownbit-BshJUVuW.js +0 -0
- package/dist/phantom-CJ8dIcov.js +0 -0
- package/dist/rabby-D4thTcd6.js +0 -0
- package/dist/rainbow-mXld6yWV.js +0 -0
- package/dist/roninwallet-ZyYrd-D1.js +0 -0
- package/dist/safeheron-Eg1Jb29V.js +0 -0
- package/dist/safepal-DVIKy94N.js +0 -0
- package/dist/sequence-BS2IbtDg.js +0 -0
- package/dist/stablewallet-jyB079Wb.js +0 -0
- package/dist/status-FrAvQjfn.js +0 -0
- package/dist/subwallet-DMvFqKyY.js +0 -0
- package/dist/talisman-Bp8zUXqB.js +0 -0
- package/dist/tallywallet-B4OS9nIr.js +0 -0
- package/dist/tokenary-C7jjcbQa.js +0 -0
- package/dist/tokenpocket-9ZRPmAFA.js +0 -0
- package/dist/tp-V2em5bdl.js +0 -0
- package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +0 -0
- package/dist/trust-SgHubMq7.js +0 -0
- package/dist/xdefi-COVIyGz4.js +0 -0
- package/dist/zeal-DxHbDqm0.js +0 -0
- package/dist/zerion-BfW0UElc.js +0 -0
- package/dist/zodiacpilot-CrId6F4w.js +0 -0
- package/index.html +13 -13
- package/package.json +2 -2
- package/springmicro-auth-0.6.1.tgz +0 -0
- package/src/auth/config.ts +0 -0
- package/src/components/SignUp.tsx +0 -0
- package/src/components/forms/AgreementModal.tsx +88 -88
- package/src/components/forms/CaptchaController.tsx +94 -94
- package/src/components/forms/CaptchaModal.jsx +171 -171
- package/src/components/forms/CaptchaWidget.jsx +146 -146
- package/src/components/forms/PasswordChecker.ts +88 -88
- package/src/components/forms/SendCodeInput.tsx +0 -0
- package/src/components/forms/SignUpFormItem.tsx +0 -0
- package/src/components/forms/util/application-api.ts +0 -0
- package/src/components/forms/util/auth-api.ts +198 -198
- package/src/components/forms/util/auth-util.tsx +346 -346
- package/src/components/forms/util/core.ts +493 -493
- package/src/components/forms/util/invitation-api.ts +132 -132
- package/src/components/forms/util/provider.tsx +603 -603
- package/src/components/forms/util/user-api.ts +0 -0
- package/src/components/provider/AdfsLoginButton.jsx +38 -38
- package/src/components/provider/AlipayLoginButton.jsx +38 -38
- package/src/components/provider/AppleLoginButton.jsx +38 -38
- package/src/components/provider/AzureADB2CLoginButton.jsx +38 -38
- package/src/components/provider/AzureADLoginButton.jsx +38 -38
- package/src/components/provider/BaiduLoginButton.jsx +38 -38
- package/src/components/provider/BilibiliLoginButton.jsx +37 -37
- package/src/components/provider/CasdoorLoginButton.jsx +38 -38
- package/src/components/provider/DingTalkLoginButton.jsx +37 -37
- package/src/components/provider/DouyinLoginButton.jsx +38 -38
- package/src/components/provider/FacebookLoginButton.jsx +37 -37
- package/src/components/provider/GitHubLoginButton.jsx +37 -37
- package/src/components/provider/GitLabLoginButton.jsx +38 -38
- package/src/components/provider/GiteeLoginButton.jsx +34 -34
- package/src/components/provider/GoogleLoginButton.jsx +68 -68
- package/src/components/provider/InfoflowLoginButton.jsx +38 -38
- package/src/components/provider/LarkLoginButton.jsx +38 -38
- package/src/components/provider/LinkedInLoginButton.jsx +37 -37
- package/src/components/provider/LoginButton.jsx +33 -33
- package/src/components/provider/OktaLoginButton.jsx +38 -38
- package/src/components/provider/Provider.jsx +3 -3
- package/src/components/provider/ProviderButton.jsx +327 -327
- package/src/components/provider/QqLoginButton.jsx +31 -31
- package/src/components/provider/SelfLoginButton.jsx +47 -47
- package/src/components/provider/SlackLoginButton.jsx +38 -38
- package/src/components/provider/SteamLoginButton.jsx +38 -38
- package/src/components/provider/WeComLoginButton.jsx +34 -34
- package/src/components/provider/Web3Auth.jsx +365 -365
- package/src/components/provider/WechatLoginButton.jsx +37 -37
- package/src/components/provider/WeiboLoginButton.jsx +34 -34
- package/src/components/util.tsx +0 -0
- package/src/i18n/en/signup.json +48 -48
- package/src/i18n/index.ts +17 -17
- package/src/index.tsx +0 -0
- package/src/vite-env.d.ts +1 -1
- package/tsconfig.json +23 -23
- package/tsconfig.node.json +10 -10
- package/vite.config.ts +33 -33
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
// Copyright 2021 The Casdoor Authors. All Rights Reserved.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
import { createButton } from "react-social-login-buttons";
|
|
16
|
-
import { StaticBaseUrl } from "../forms/util/core";
|
|
17
|
-
|
|
18
|
-
function Icon({ width = 24, height = 24, color }) {
|
|
19
|
-
return (
|
|
20
|
-
<img
|
|
21
|
-
src={`${StaticBaseUrl}/buttons/wechat.svg`}
|
|
22
|
-
alt="Sign in with Wechat"
|
|
23
|
-
/>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const config = {
|
|
28
|
-
text: "Sign in with Wechat",
|
|
29
|
-
icon: Icon,
|
|
30
|
-
iconFormat: (name) => `fa fa-${name}`,
|
|
31
|
-
style: { background: "rgb(0,194,80)" },
|
|
32
|
-
activeStyle: { background: "rgb(0,158,64)" },
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const WechatLoginButton = createButton(config);
|
|
36
|
-
|
|
37
|
-
export default WechatLoginButton;
|
|
1
|
+
// Copyright 2021 The Casdoor Authors. All Rights Reserved.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
import { createButton } from "react-social-login-buttons";
|
|
16
|
+
import { StaticBaseUrl } from "../forms/util/core";
|
|
17
|
+
|
|
18
|
+
function Icon({ width = 24, height = 24, color }) {
|
|
19
|
+
return (
|
|
20
|
+
<img
|
|
21
|
+
src={`${StaticBaseUrl}/buttons/wechat.svg`}
|
|
22
|
+
alt="Sign in with Wechat"
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const config = {
|
|
28
|
+
text: "Sign in with Wechat",
|
|
29
|
+
icon: Icon,
|
|
30
|
+
iconFormat: (name) => `fa fa-${name}`,
|
|
31
|
+
style: { background: "rgb(0,194,80)" },
|
|
32
|
+
activeStyle: { background: "rgb(0,158,64)" },
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const WechatLoginButton = createButton(config);
|
|
36
|
+
|
|
37
|
+
export default WechatLoginButton;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
// Copyright 2021 The Casdoor Authors. All Rights Reserved.
|
|
2
|
-
//
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
//
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
//
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
import { createButton } from "react-social-login-buttons";
|
|
16
|
-
import { StaticBaseUrl } from "../forms/util/core";
|
|
17
|
-
|
|
18
|
-
function Icon({ width = 24, height = 24, color }) {
|
|
19
|
-
return (
|
|
20
|
-
<img src={`${StaticBaseUrl}/buttons/weibo.svg`} alt="Sign in with Weibo" />
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const config = {
|
|
25
|
-
text: "Sign in with Weibo",
|
|
26
|
-
icon: Icon,
|
|
27
|
-
iconFormat: (name) => `fa fa-${name}`,
|
|
28
|
-
style: { background: "#e62329" },
|
|
29
|
-
activeStyle: { background: "#e54329" },
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const WeiboLoginButton = createButton(config);
|
|
33
|
-
|
|
34
|
-
export default WeiboLoginButton;
|
|
1
|
+
// Copyright 2021 The Casdoor Authors. All Rights Reserved.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
import { createButton } from "react-social-login-buttons";
|
|
16
|
+
import { StaticBaseUrl } from "../forms/util/core";
|
|
17
|
+
|
|
18
|
+
function Icon({ width = 24, height = 24, color }) {
|
|
19
|
+
return (
|
|
20
|
+
<img src={`${StaticBaseUrl}/buttons/weibo.svg`} alt="Sign in with Weibo" />
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const config = {
|
|
25
|
+
text: "Sign in with Weibo",
|
|
26
|
+
icon: Icon,
|
|
27
|
+
iconFormat: (name) => `fa fa-${name}`,
|
|
28
|
+
style: { background: "#e62329" },
|
|
29
|
+
activeStyle: { background: "#e54329" },
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const WeiboLoginButton = createButton(config);
|
|
33
|
+
|
|
34
|
+
export default WeiboLoginButton;
|
package/src/components/util.tsx
CHANGED
|
File without changes
|
package/src/i18n/en/signup.json
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
{
|
|
2
|
-
"translation": {
|
|
3
|
-
"signup": {
|
|
4
|
-
"username": "Username",
|
|
5
|
-
"confirm": "Confirm password",
|
|
6
|
-
"signInNow": "Sign In Now",
|
|
7
|
-
"signUp": "Sign Up",
|
|
8
|
-
"haveAccount": "Have account?"
|
|
9
|
-
},
|
|
10
|
-
"forget": {
|
|
11
|
-
"username": "Please input your username.",
|
|
12
|
-
"firstName": "Please input your first name.",
|
|
13
|
-
"lastName": "Please input your last name.",
|
|
14
|
-
"realName": "Please input your real name.",
|
|
15
|
-
"displayName": "Please input your display name.",
|
|
16
|
-
"affliation": "Please input your affliation.",
|
|
17
|
-
"idCard": "Please input your ID card number.",
|
|
18
|
-
"code": "Please input your verification code.",
|
|
19
|
-
"email": "Please input your email.",
|
|
20
|
-
"confirm": "Please confirm your password and ensure it matches.",
|
|
21
|
-
"invitationCode": "Please input your invitation code."
|
|
22
|
-
},
|
|
23
|
-
"format": {
|
|
24
|
-
"idCard": "The ID card number format is incorrect."
|
|
25
|
-
},
|
|
26
|
-
"general": {
|
|
27
|
-
"firstName": "First name",
|
|
28
|
-
"lastName": "Last name",
|
|
29
|
-
"displayName": "Display name",
|
|
30
|
-
"realName": "Real name",
|
|
31
|
-
"email": "Email",
|
|
32
|
-
"password": "Password",
|
|
33
|
-
"captcha": "Captcha"
|
|
34
|
-
},
|
|
35
|
-
"user": {
|
|
36
|
-
"affliation": "Affliation",
|
|
37
|
-
"idCard": "ID card"
|
|
38
|
-
},
|
|
39
|
-
"code": {
|
|
40
|
-
"email": "Email code",
|
|
41
|
-
"sending": "Sending",
|
|
42
|
-
"sendCode": "Send code"
|
|
43
|
-
},
|
|
44
|
-
"application": {
|
|
45
|
-
"invitationCode": "Invitation code"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"translation": {
|
|
3
|
+
"signup": {
|
|
4
|
+
"username": "Username",
|
|
5
|
+
"confirm": "Confirm password",
|
|
6
|
+
"signInNow": "Sign In Now",
|
|
7
|
+
"signUp": "Sign Up",
|
|
8
|
+
"haveAccount": "Have account?"
|
|
9
|
+
},
|
|
10
|
+
"forget": {
|
|
11
|
+
"username": "Please input your username.",
|
|
12
|
+
"firstName": "Please input your first name.",
|
|
13
|
+
"lastName": "Please input your last name.",
|
|
14
|
+
"realName": "Please input your real name.",
|
|
15
|
+
"displayName": "Please input your display name.",
|
|
16
|
+
"affliation": "Please input your affliation.",
|
|
17
|
+
"idCard": "Please input your ID card number.",
|
|
18
|
+
"code": "Please input your verification code.",
|
|
19
|
+
"email": "Please input your email.",
|
|
20
|
+
"confirm": "Please confirm your password and ensure it matches.",
|
|
21
|
+
"invitationCode": "Please input your invitation code."
|
|
22
|
+
},
|
|
23
|
+
"format": {
|
|
24
|
+
"idCard": "The ID card number format is incorrect."
|
|
25
|
+
},
|
|
26
|
+
"general": {
|
|
27
|
+
"firstName": "First name",
|
|
28
|
+
"lastName": "Last name",
|
|
29
|
+
"displayName": "Display name",
|
|
30
|
+
"realName": "Real name",
|
|
31
|
+
"email": "Email",
|
|
32
|
+
"password": "Password",
|
|
33
|
+
"captcha": "Captcha"
|
|
34
|
+
},
|
|
35
|
+
"user": {
|
|
36
|
+
"affliation": "Affliation",
|
|
37
|
+
"idCard": "ID card"
|
|
38
|
+
},
|
|
39
|
+
"code": {
|
|
40
|
+
"email": "Email code",
|
|
41
|
+
"sending": "Sending",
|
|
42
|
+
"sendCode": "Send code"
|
|
43
|
+
},
|
|
44
|
+
"application": {
|
|
45
|
+
"invitationCode": "Invitation code"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
package/src/i18n/index.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import i18n from "i18next";
|
|
2
|
-
// import detector from "i18next-browser-languagedetector";
|
|
3
|
-
import { initReactI18next } from "react-i18next";
|
|
4
|
-
import en from "./en/signup.json";
|
|
5
|
-
|
|
6
|
-
i18n
|
|
7
|
-
// .use(detector)
|
|
8
|
-
.use(initReactI18next) // passes i18n down to react-i18next
|
|
9
|
-
.init({
|
|
10
|
-
lng: "en",
|
|
11
|
-
fallbackLng: "en", // use en if detected lng is not available
|
|
12
|
-
resources: {
|
|
13
|
-
en,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export default i18n;
|
|
1
|
+
import i18n from "i18next";
|
|
2
|
+
// import detector from "i18next-browser-languagedetector";
|
|
3
|
+
import { initReactI18next } from "react-i18next";
|
|
4
|
+
import en from "./en/signup.json";
|
|
5
|
+
|
|
6
|
+
i18n
|
|
7
|
+
// .use(detector)
|
|
8
|
+
.use(initReactI18next) // passes i18n down to react-i18next
|
|
9
|
+
.init({
|
|
10
|
+
lng: "en",
|
|
11
|
+
fallbackLng: "en", // use en if detected lng is not available
|
|
12
|
+
resources: {
|
|
13
|
+
en,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export default i18n;
|
package/src/index.tsx
CHANGED
|
File without changes
|
package/src/vite-env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
1
|
+
/// <reference types="vite/client" />
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
|
|
9
|
-
/* Bundler mode */
|
|
10
|
-
"moduleResolution": "bundler",
|
|
11
|
-
"allowImportingTsExtensions": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"noEmit": true,
|
|
15
|
-
"jsx": "react-jsx",
|
|
16
|
-
|
|
17
|
-
/* Linting */
|
|
18
|
-
"strict": false,
|
|
19
|
-
"noFallthroughCasesInSwitch": true
|
|
20
|
-
},
|
|
21
|
-
"include": ["src"],
|
|
22
|
-
"references": [{ "path": "./tsconfig.node.json" }]
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": false,
|
|
19
|
+
"noFallthroughCasesInSwitch": true
|
|
20
|
+
},
|
|
21
|
+
"include": ["src"],
|
|
22
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
23
|
+
}
|
package/tsconfig.node.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"composite": true,
|
|
4
|
-
"skipLibCheck": true,
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"allowSyntheticDefaultImports": true
|
|
8
|
-
},
|
|
9
|
-
"include": ["vite.config.ts"]
|
|
10
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"composite": true,
|
|
4
|
+
"skipLibCheck": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowSyntheticDefaultImports": true
|
|
8
|
+
},
|
|
9
|
+
"include": ["vite.config.ts"]
|
|
10
|
+
}
|
package/vite.config.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import react from "@vitejs/plugin-react";
|
|
2
|
-
import { resolve } from "path";
|
|
3
|
-
import { defineConfig } from "vite";
|
|
4
|
-
import dts from "vite-plugin-dts";
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [react(), dts({ rollupTypes: true })],
|
|
8
|
-
build: {
|
|
9
|
-
lib: {
|
|
10
|
-
entry: resolve(__dirname, "src/index.tsx"),
|
|
11
|
-
name: "@springmicro/auth",
|
|
12
|
-
fileName: "index",
|
|
13
|
-
},
|
|
14
|
-
rollupOptions: {
|
|
15
|
-
external: [
|
|
16
|
-
"react",
|
|
17
|
-
"react-dom",
|
|
18
|
-
"auth-astro",
|
|
19
|
-
"i18next",
|
|
20
|
-
"react-i18next",
|
|
21
|
-
],
|
|
22
|
-
output: {
|
|
23
|
-
globals: {
|
|
24
|
-
react: "React",
|
|
25
|
-
"react-dom": "ReactDom",
|
|
26
|
-
"auth-astro": "AuthAstro",
|
|
27
|
-
i18next: "I18Next",
|
|
28
|
-
"react-i18next": "React-i18next",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
});
|
|
1
|
+
import react from "@vitejs/plugin-react";
|
|
2
|
+
import { resolve } from "path";
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
import dts from "vite-plugin-dts";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [react(), dts({ rollupTypes: true })],
|
|
8
|
+
build: {
|
|
9
|
+
lib: {
|
|
10
|
+
entry: resolve(__dirname, "src/index.tsx"),
|
|
11
|
+
name: "@springmicro/auth",
|
|
12
|
+
fileName: "index",
|
|
13
|
+
},
|
|
14
|
+
rollupOptions: {
|
|
15
|
+
external: [
|
|
16
|
+
"react",
|
|
17
|
+
"react-dom",
|
|
18
|
+
"auth-astro",
|
|
19
|
+
"i18next",
|
|
20
|
+
"react-i18next",
|
|
21
|
+
],
|
|
22
|
+
output: {
|
|
23
|
+
globals: {
|
|
24
|
+
react: "React",
|
|
25
|
+
"react-dom": "ReactDom",
|
|
26
|
+
"auth-astro": "AuthAstro",
|
|
27
|
+
i18next: "I18Next",
|
|
28
|
+
"react-i18next": "React-i18next",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|