diff --git a/functions/achievements-background.ts b/functions/achievements-background.ts index 2f411a52..181e9bd6 100644 --- a/functions/achievements-background.ts +++ b/functions/achievements-background.ts @@ -1,9 +1,9 @@ import { Handler } from '@netlify/functions' import BikeTagClient from 'biketag' import { Achievement, Game, Player, Tag } from 'biketag/dist/common/schema' -import { getSupportedGames } from '../src/common/utils' +import { getSupportedGames } from '../src/common' +import { getBikeTagClientOpts } from './common' import { HttpStatusCode } from './common/constants' -import { getBikeTagClientOpts } from './common/methods' import { BackgroundProcessResults } from './common/types' export const assignAchievements = async (): Promise => { diff --git a/functions/achievements.ts b/functions/achievements.ts index e072a222..1452905f 100644 --- a/functions/achievements.ts +++ b/functions/achievements.ts @@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag' import { getAchievementsPayload } from 'biketag/dist/common/payloads' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const achievementsHandler: Handler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/ambassadors.ts b/functions/ambassadors.ts index 6e65def6..414f9f93 100644 --- a/functions/ambassadors.ts +++ b/functions/ambassadors.ts @@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag' import { getAmbassadorsPayload } from 'biketag/dist/common/payloads' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const ambassadorsHandler: Handler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/approve.ts b/functions/approve.ts index aaeb0889..ea764977 100644 --- a/functions/approve.ts +++ b/functions/approve.ts @@ -2,15 +2,15 @@ import { Handler } from '@netlify/functions' import { BikeTagClient } from 'biketag' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { HttpStatusCode } from './common/constants' import { - acceptCorsHeaders, - getActiveQueueForGame, - getBikeTagClientOpts, - getPayloadOpts, - getProfileAuthorization, - setNewBikeTagPost, -} from './common/methods' + acceptCorsHeaders, + getActiveQueueForGame, + getBikeTagClientOpts, + getPayloadOpts, + getProfileAuthorization, + setNewBikeTagPost, +} from './common' +import { HttpStatusCode } from './common/constants' const approveHandler: Handler = async (event) => { /// Bailout on OPTIONS requests diff --git a/functions/authorize.ts b/functions/authorize.ts index 55560eaa..ccd4458b 100644 --- a/functions/authorize.ts +++ b/functions/authorize.ts @@ -1,8 +1,8 @@ import { builder, Handler } from '@netlify/functions' import { BikeTagClient } from 'biketag' import request from 'request' +import { getBikeTagClientOpts, getBikeTagHash, getPayloadOpts } from './common' import { HttpStatusCode } from './common/constants' -import { getBikeTagClientOpts, getBikeTagHash, getPayloadOpts } from './common/methods' const authorizeHandler: Handler = async (event) => { const { diff --git a/functions/autopost-background.ts b/functions/autopost-background.ts index 35c59322..249c6b4e 100644 --- a/functions/autopost-background.ts +++ b/functions/autopost-background.ts @@ -2,13 +2,13 @@ import { Handler } from '@netlify/functions' import BikeTagClient from 'biketag' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { HttpStatusCode } from './common/constants' import { - getActiveQueueForGame, - getBikeTagClientOpts, - getWinningTagForCurrentRound, - setNewBikeTagPost, -} from './common/methods' + getActiveQueueForGame, + getBikeTagClientOpts, + getWinningTagForCurrentRound, + setNewBikeTagPost, +} from './common' +import { HttpStatusCode } from './common/constants' import { BackgroundProcessResults } from './common/types' export const autoPostNewBikeTags = async (): Promise => { diff --git a/functions/autopost-clear.ts b/functions/autopost-clear.ts index b644cd64..a1a49832 100644 --- a/functions/autopost-clear.ts +++ b/functions/autopost-clear.ts @@ -1,13 +1,13 @@ import { Handler } from '@netlify/functions' import BikeTagClient from 'biketag' import { Game } from 'biketag/dist/common/schema' -import { HttpStatusCode } from './common/constants' import { archiveAndClearQueue, getActiveQueueForGame, getBikeTagClientOpts, isRequestAllowed, -} from './common/methods' +} from './common' +import { HttpStatusCode } from './common/constants' import { BackgroundProcessResults } from './common/types' export const autoClearQueue = async (event): Promise => { diff --git a/functions/autopost-notify.ts b/functions/autopost-notify.ts index 3d0df549..e1416e1f 100644 --- a/functions/autopost-notify.ts +++ b/functions/autopost-notify.ts @@ -1,12 +1,12 @@ import { Handler } from '@netlify/functions' import BikeTagClient from 'biketag' import { Game } from 'biketag/dist/common/schema' -import { HttpStatusCode } from './common/constants' import { - getBikeTagClientOpts, - isRequestAllowed, - sendNewBikeTagNotifications, -} from './common/methods' + getBikeTagClientOpts, + isRequestAllowed, + sendNewBikeTagNotifications, +} from './common' +import { HttpStatusCode } from './common/constants' import { BackgroundProcessResults } from './common/types' export const autoNotifyNewBikeTagPosted = async (event): Promise => { diff --git a/functions/common/index.ts b/functions/common/index.ts new file mode 100644 index 00000000..3e00069d --- /dev/null +++ b/functions/common/index.ts @@ -0,0 +1,4 @@ +export * from './constants' +export * from './methods' +export * from './types' + diff --git a/functions/common/methods.ts b/functions/common/methods.ts index 525e890e..54d07998 100644 --- a/functions/common/methods.ts +++ b/functions/common/methods.ts @@ -14,13 +14,13 @@ import nodemailer from 'nodemailer' import { extname, join } from 'path' import qs from 'qs' import request from 'request' -import { BikeTagProfile } from '../../src/common/types' import { getDomainInfo, getImgurImageSized, getTagDate, isAuthenticationEnabled, -} from '../../src/common/utils' +} from '../../src/common' +import { BikeTagProfile } from '../../src/common/types' import { ErrorMessage, HttpStatusCode } from './constants' import { BackgroundProcessResults, activeQueue } from './types' diff --git a/functions/current.ts b/functions/current.ts index ef8a1973..d8f10fa6 100644 --- a/functions/current.ts +++ b/functions/current.ts @@ -3,9 +3,9 @@ import axios from 'axios' import { BikeTagClient } from 'biketag' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getDomainInfo, getImgurImageSized } from '../src/common/utils' +import { getDomainInfo, getImgurImageSized } from '../src/common' +import { getBikeTagClientOpts, getPayloadOpts } from './common' import { HttpStatusCode } from './common/constants' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' const currentTagHandler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/game.ts b/functions/game.ts index b8fd3f03..a0d992c9 100644 --- a/functions/game.ts +++ b/functions/game.ts @@ -2,7 +2,7 @@ import { builder, Handler } from '@netlify/functions' import { BikeTagClient } from 'biketag' import { getGamePayload } from 'biketag/dist/common/payloads' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const gameHandler: Handler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/players.ts b/functions/players.ts index dbdabe12..f69049eb 100644 --- a/functions/players.ts +++ b/functions/players.ts @@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag' import { getPlayersPayload } from 'biketag/dist/common/payloads' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const playersHandler: Handler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/profile.ts b/functions/profile.ts index 61e6c875..80984c63 100644 --- a/functions/profile.ts +++ b/functions/profile.ts @@ -1,13 +1,13 @@ import { Handler } from '@netlify/functions' -import { getDomainInfo } from '../src/common/utils' -import { ErrorMessage, HttpStatusCode } from './common/constants' +import { getDomainInfo } from '../src/common' import { acceptCorsHeaders, getBikeTagAuth0Profile, getBikeTagPlayerProfile, getProfileAuthorization, handleAuth0ProfileRequest, -} from './common/methods' +} from './common' +import { ErrorMessage, HttpStatusCode } from './common/constants' const profileHandler: Handler = async (event) => { /// Bailout on OPTIONS requests diff --git a/functions/queue.ts b/functions/queue.ts index f314bd0b..74dee327 100644 --- a/functions/queue.ts +++ b/functions/queue.ts @@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag' import { getQueuePayload } from 'biketag/dist/common/payloads' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const queueHandler: Handler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/recent.ts b/functions/recent.ts index b77db608..202bff24 100644 --- a/functions/recent.ts +++ b/functions/recent.ts @@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag' import { getTagsPayload } from 'biketag/dist/common/payloads' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const recentHandler: Handler = async (event) => { const response = { diff --git a/functions/settings.ts b/functions/settings.ts index 5c02f452..1678c982 100644 --- a/functions/settings.ts +++ b/functions/settings.ts @@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag' import { getSettingsPayload } from 'biketag/dist/common/payloads' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const setttingsHandler: Handler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/submission-created.ts b/functions/submission-created.ts index f7f2b08c..1a45b7b6 100644 --- a/functions/submission-created.ts +++ b/functions/submission-created.ts @@ -1,15 +1,15 @@ import { BikeTagClient } from 'biketag' import { Ambassador, Game, Tag } from 'biketag/dist/common/schema' import request from 'request' -import { stringifyNumber } from '../src/common/utils' -import { HttpStatusCode } from './common/constants' +import { stringifyNumber } from '../src/common' import { - defaultLogo, - getBikeTagClientOpts, - getEncodedExpiry, - getSanityImageUrl, - sendEmailsToAmbassadors, -} from './common/methods' + defaultLogo, + getBikeTagClientOpts, + getEncodedExpiry, + getSanityImageUrl, + sendEmailsToAmbassadors, +} from './common' +import { HttpStatusCode } from './common/constants' export const handler = async (event) => { const body = JSON.parse(event.body) diff --git a/functions/tags.ts b/functions/tags.ts index 443b85c9..9665c226 100644 --- a/functions/tags.ts +++ b/functions/tags.ts @@ -3,7 +3,7 @@ import { BikeTagClient } from 'biketag' import { getTagsPayload } from 'biketag/dist/common/payloads' import { Game } from 'biketag/dist/common/schema' import request from 'request' -import { getBikeTagClientOpts, getPayloadOpts } from './common/methods' +import { getBikeTagClientOpts, getPayloadOpts } from './common' const tagsHandler: Handler = async (event) => { const biketagOpts = getBikeTagClientOpts( diff --git a/functions/token.ts b/functions/token.ts index 4f6fbea5..edf801b3 100644 --- a/functions/token.ts +++ b/functions/token.ts @@ -1,8 +1,8 @@ import { Handler } from '@netlify/functions' import { BikeTagClient } from 'biketag' import request from 'request' +import { acceptCorsHeaders, getBikeTagClientOpts, getPayloadAuthorization } from './common' import { HttpStatusCode } from './common/constants' -import { acceptCorsHeaders, getBikeTagClientOpts, getPayloadAuthorization } from './common/methods' const tokenHandler: Handler = async (event) => { /// Bailout on OPTIONS requests diff --git a/src/App.vue b/src/App.vue index ff62418a..ccbb71bf 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,8 +10,8 @@
-
- +
+ @@ -23,12 +23,12 @@ diff --git a/src/components/ServiceWorker.vue b/src/components/ServiceWorker.vue index a203c739..85e0fab1 100644 --- a/src/components/ServiceWorker.vue +++ b/src/components/ServiceWorker.vue @@ -10,11 +10,10 @@ diff --git a/src/views/HowToPlay.vue b/src/views/HowToPlay.vue index 7c15bb10..f8387977 100644 --- a/src/views/HowToPlay.vue +++ b/src/views/HowToPlay.vue @@ -118,14 +118,14 @@ // import Swiper core and required components import { Autoplay, Navigation, Pagination } from 'swiper/modules' // Import Swiper styles -import 'swiper/css/bundle' -import { ref, computed } from 'vue' +import { debug } from '@/common' import { useBikeTagStore } from '@/store/index' -import { debug } from '@/common/utils' +import 'swiper/css/bundle' +import { computed, ref } from 'vue' // components -import { Swiper, SwiperSlide } from 'swiper/vue' import BikeTagMap from '@/components/BikeTagMap.vue' +import { Swiper, SwiperSlide } from 'swiper/vue' import { useI18n } from 'vue-i18n' // data diff --git a/src/views/Login.vue b/src/views/Login.vue index 331e27fc..7cd6f83a 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -1,10 +1,10 @@ diff --git a/src/views/Round.vue b/src/views/Round.vue index f2e46487..a7a13a8a 100644 --- a/src/views/Round.vue +++ b/src/views/Round.vue @@ -28,11 +28,11 @@