зеркало из https://github.com/mozilla/fxa.git
Merge pull request #17930 from mozilla/build-all-auth-scripts
fix(tsc): compile all ts in auth server's script dir
This commit is contained in:
Коммит
7c4d789df5
|
@ -43,7 +43,7 @@ import { PlaySubscriptions } from '../../lib/payments/iap/google-play/subscripti
|
|||
import { AppleIAP } from '../../lib/payments/iap/apple-app-store/apple-iap';
|
||||
import { AppStoreSubscriptions } from '../../lib/payments/iap/apple-app-store/subscriptions';
|
||||
|
||||
const setDateToUTC = (someDate) => {
|
||||
const setDateToUTC = (someDate: number) => {
|
||||
const utcDate = new Date(someDate);
|
||||
utcDate.setUTCHours(0, 0, 0, 0);
|
||||
return utcDate;
|
||||
|
@ -187,14 +187,16 @@ const init = async () => {
|
|||
const hasActiveSessionToken = async (accountRecord: Account) => {
|
||||
const sessionTokens = await fxaDb.sessions(accountRecord.uid);
|
||||
return sessionTokens.some(
|
||||
(token: SessionToken) => token.lastAccessTime >= activeByDateTimestamp
|
||||
(token: any) => token.lastAccessTime >= activeByDateTimestamp
|
||||
);
|
||||
};
|
||||
const hasActiveRefreshToken = async (accountRecord: Account) => {
|
||||
const refreshTokens = await oauthDb.getRefreshTokensByUid(
|
||||
accountRecord.uid
|
||||
);
|
||||
return refreshTokens.some((t) => t.lastUsedAt >= activeByDateTimestamp);
|
||||
return refreshTokens.some(
|
||||
(t: any) => t.lastUsedAt >= activeByDateTimestamp
|
||||
);
|
||||
};
|
||||
const hasAccessToken = async (accountRecord: Account) => {
|
||||
const accessTokens = await oauthDb.getAccessTokensByUid(accountRecord.uid);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"include": [
|
||||
"bin/*",
|
||||
"scripts/*.ts",
|
||||
"scripts/**/*.ts",
|
||||
"scripts/delete-account.js",
|
||||
"lib/senders/emails/templates/*/includes.ts"
|
||||
]
|
||||
|
|
Загрузка…
Ссылка в новой задаче