Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: nx updated #215

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Go to Twitch developer console
NUXT_PUBLIC_TWITCH_CLIENT_ID=""
NUXT_PRIVATE_TWITCH_SECRET_ID=""
NUXT_TWITCH_SECRET_ID=""

# Twitch streamer data
NUXT_PRIVATE_TWITCH_CHANNEL_NAME=""
NUXT_PRIVATE_TWITCH_CHANNEL_ID=""
NUXT_PRIVATE_TWITCH_OAUTH_CODE=""
NUXT_TWITCH_CHANNEL_NAME=""
NUXT_TWITCH_CHANNEL_ID=""
NUXT_TWITCH_OAUTH_CODE=""

# Will redirect to from Twitch
NUXT_PUBLIC_SIGN_IN_REDIRECT_URL=""
Expand All @@ -14,8 +14,8 @@ NUXT_PUBLIC_SIGN_IN_REDIRECT_URL=""
NUXT_PUBLIC_COOKIE_KEY=""

# Our secret...
NUXT_PRIVATE_JWT_SECRET_KEY=""
NUXT_PRIVATE_WEBSITE_BEARER=""
NUXT_JWT_SECRET_KEY=""
NUXT_WEBSITE_BEARER=""

# WebSocket server with event messages
PUBLIC_WEBSOCKET_URL=""
Expand Down
16 changes: 8 additions & 8 deletions apps/website/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ export default defineNuxtConfig({
plugins: [nxViteTsPaths()],
},
runtimeConfig: {
websiteBearer: '', // NUXT_PRIVATE_WEBSITE_BEARER
jwtSecretKey: '', // NUXT_PRIVATE_JWT_SECRET_KEY
twitchSecretId: '', // NUXT_PRIVATE_TWITCH_SECRET_ID
twitchChannelName: '', // NUXT_PRIVATE_TWITCH_CHANNEL_NAME
twitchChannelId: '', // NUXT_PRIVATE_TWITCH_CHANNEL_ID
twitchOauthCode: '', // NUXT_PRIVATE_TWITCH_OAUTH_CODE
yookassaShopId: '', // NUXT_PRIVATE_YOOKASSA_SHOP_ID
yookassaApiKey: '', // NUXT_PRIVATE_YOOKASSA_API_KEY
websiteBearer: '', // NUXT_WEBSITE_BEARER
jwtSecretKey: '', // NUXT_JWT_SECRET_KEY
twitchSecretId: '', // NUXT_TWITCH_SECRET_ID
twitchChannelName: '', // NUXT_TWITCH_CHANNEL_NAME
twitchChannelId: '', // NUXT_TWITCH_CHANNEL_ID
twitchOauthCode: '', // NUXT_TWITCH_OAUTH_CODE
yookassaShopId: '', // NUXT_YOOKASSA_SHOP_ID
yookassaApiKey: '', // NUXT_YOOKASSA_API_KEY
public: {
twitchClientId: '', // NUXT_PUBLIC_TWITCH_CLIENT_ID
signInRedirectUrl: '', // NUXT_PUBLIC_SIGN_IN_REDIRECT_URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ const randomCharUrl = `url(/units/${randomChar}/128.png)`
</script>

<template>
<div>
<ClientOnly>
<div v-if="$route.path === '/'" class="logo" :style="{ backgroundImage: randomCharUrl }" />
<NuxtLink v-else href="/">
<div class="logo shake" :style="{ backgroundImage: randomCharUrl }" />
</NuxtLink>
</div>
</ClientOnly>
</template>

<style scoped>
Expand Down
4 changes: 2 additions & 2 deletions apps/website/src/components/MenuProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ url.searchParams.set('client_id', publicEnv.twitchClientId)
url.searchParams.set('redirect_uri', publicEnv.signInRedirectUrl)
url.searchParams.set('response_type', 'code')

const { data: profile } = await useFetch('/api/auth/me')
const isSignedIn = !!profile?.id
const { data } = await useFetch('/api/auth/me')
const isSignedIn = !!data.value?.id
</script>

<template>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/server/utils/twitch/twitch.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TwitchController {
constructor() {
const { twitchChannelName, twitchChannelId } = useRuntimeConfig()
this.#channel = twitchChannelName
this.#userId = twitchChannelId
this.#userId = twitchChannelId.toString()

this.#service = new TwitchService()
this.#repository = new DBRepository()
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/server/utils/twitch/twitch.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TwitchProvider {
twitchSecretId,
twitchOauthCode,
} = useRuntimeConfig()
this.#userId = twitchChannelId
this.#userId = twitchChannelId.toString()
this.#clientSecret = twitchSecretId
this.#code = twitchOauthCode
this.#clientId = publicEnv.twitchClientId
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
"@nuxt/eslint-config": "~0.3.6",
"@nuxt/kit": "^3.10.0",
"@nuxt/ui-templates": "^1.3.1",
"@nx/devkit": "19.6.1",
"@nx/eslint": "19.6.1",
"@nx/eslint-plugin": "19.6.1",
"@nx/js": "19.6.1",
"@nx/nuxt": "19.6.1",
"@nx/playwright": "19.6.1",
"@nx/vite": "19.6.1",
"@nx/web": "19.6.1",
"@nx/workspace": "19.6.1",
"@nx/devkit": "19.6.2",
"@nx/eslint": "19.6.2",
"@nx/eslint-plugin": "19.6.2",
"@nx/js": "19.6.2",
"@nx/nuxt": "19.6.2",
"@nx/playwright": "19.6.2",
"@nx/vite": "19.6.2",
"@nx/web": "19.6.2",
"@nx/workspace": "19.6.2",
"@pinia/nuxt": "^0.5.3",
"@playwright/test": "^1.36.0",
"@swc-node/register": "~1.9.1",
Expand Down Expand Up @@ -88,7 +88,7 @@
"jsdom": "~22.1.0",
"lint-staged": "^15.2.7",
"nuxt": "^3.10.0",
"nx": "19.6.1",
"nx": "19.6.2",
"pinia": "^2.2.2",
"prettier": "^2.6.2",
"prisma": "^5.18.0",
Expand Down
Loading
Loading