Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jan 21, 2024
1 parent 1714d66 commit c7e7e22
Show file tree
Hide file tree
Showing 22 changed files with 45 additions and 44 deletions.
6 changes: 3 additions & 3 deletions apps/console-fb/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

## dynamic public
PUBLIC_BASE_URL=http://localhost:1521
# PUBLIC_BASE_URL=https://spectacular-console.vercel.app
# PUBLIC_BASE_URL=https://spectacular-console.vercel.app # in .env.production
PUBLIC_DEFAULT_ORGANIZATION=chinthagunta

AUTH_REDIRECT_PROXY_URL=https://spectacular-console.vercel.app/auth
# AUTH_REDIRECT_PROXY_URL=http://localhost:4173/auth in .env.local
# AUTH_REDIRECT_PROXY_URL=https://spectacular-console.vercel.app/auth # in .env.production
AUTH_REDIRECT_PROXY_URL=http://localhost:5173/auth

## dynamic private
# Microsoft Graph API
Expand Down
4 changes: 4 additions & 0 deletions apps/console-fb/.secrets.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
MICROSOFT_GRAPH_TENANT_ID=<fill-me-in>
MICROSOFT_GRAPH_CLIENT_ID=<fill-me-in>
MICROSOFT_GRAPH_CLIENT_SECRET=<fill-me-in>

# I am using diffirent GitHub Oauth ClientID for Auth.JS login
AUTH_PROVIDER_GITHUB_CLIENT_ID = 'Iv1......'
AUTH_PROVIDER_GITHUB_CLIENT_SECRET = 'b-----4a'
5 changes: 1 addition & 4 deletions apps/console-fb/houdini.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const defaultMarshall = {
// @ts-ignore
unmarshal(val) {
return val;
},
// @ts-ignore

marshal(val) {
return val;
}
Expand All @@ -12,12 +11,10 @@ const defaultMarshall = {
/** @type {import('houdini').ConfigFile} */
const config = {
watchSchema: {
// @ts-ignore
url: (env) => env.PUBLIC_GRAPHQL_ENDPOINT,
interval: 0, // only pull the schema when you first run `turbo dev`
// HINT: we need to generate scheam for highest role level that app support.
headers: {
// @ts-ignore
'X-Hasura-Admin-Secret': (env) => env.HASURA_GRAPHQL_ADMIN_SECRET,
'x-hasura-allowed-roles': 'user manager',
'x-hasura-role': 'manager'
Expand Down
2 changes: 1 addition & 1 deletion apps/console-fb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dev:debug": "DEBUG=* vite dev",
"dev:sw": "SW_DEV=true vite dev",
"build": "dotenv-run -vf .env,.secrets -- vite build",
"preview": "NEXTAUTH_URL=http://localhost:4173 dotenv-run -vf .env,.secrets -- vite preview",
"preview": "NEXTAUTH_URL=http://localhost:4173 AUTH_REDIRECT_PROXY_URL=http://localhost:4173/auth dotenv-run -vf .env,.secrets -- vite preview",
"test": "pnpm run test:integration && pnpm run test:unit",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
Expand Down
2 changes: 1 addition & 1 deletion apps/console-fb/src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ declare global {
}
interface Locals {
// session: Session;
getSession(): Promise<Session | null>;
auth(): Promise<Session | null>;
}
export interface Toast {
message: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/console-fb/src/lib/components/form/DeleteForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
export const actions = {
delete: async (event) => {
const { request, locals } = event;
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, '/auth/signin?callbackUrl=/dashboard/rules');
}
Expand Down
2 changes: 1 addition & 1 deletion apps/console-fb/src/lib/server/middleware/authjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const authjs = SvelteKitAuth({
debug: dev,
trustHost: true,
secret: envPri.HASURA_GRAPHQL_JWT_SECRET_KEY,
redirectProxyUrl: envPri.AUTH_REDIRECT_PROXY_URL,
redirectProxyUrl: envPri.AUTH_REDIRECT_PROXY_URL,
// adapter: HasuraAdapter({
// endpoint: envPri.PUBLIC_GRAPHQL_ENDPOINT,
// adminSecret: envPri.HASURA_GRAPHQL_ADMIN_SECRET
Expand Down
2 changes: 1 addition & 1 deletion apps/console-fb/src/lib/server/middleware/guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const guard = (async ({ event, resolve }) => {
return await resolve(event);
}

const { user, roles, expires } = (await locals.getSession()) ?? {};
const { user, roles, expires } = (await locals.auth()) ?? {};
// log.debug('Session roles-->', roles);

if (!user) {
Expand Down
2 changes: 1 addition & 1 deletion apps/console-fb/src/lib/server/middleware/houdini.old.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const houdini = (async ({ event, resolve }) => {
if (building) return await resolve(event);

const { locals, cookies } = event;
const { token } = (await locals.getSession()) ?? {};
const { token } = (await locals.auth()) ?? {};

// FIXME: always return null with @auth/core/jwt's getToken
// const token = await getToken({req: { cookies: event.cookies, headers: event.request.headers },secret: dynPriEnv.HASURA_GRAPHQL_JWT_SECRET_KEY,raw: true});
Expand Down
2 changes: 1 addition & 1 deletion apps/console-fb/src/lib/server/middleware/houdini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const houdini = (async ({ event, resolve }) => {
if (building) return await resolve(event);

const { cookies, locals } = event;
const session = await locals.getSession();
const session = await locals.auth();
const roles = session?.roles;

// FIXME: always return null with @auth/core/jwt's getToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { loadFlash } from 'sveltekit-flash-message/server';

export const load = loadFlash(async (event) => {
return {
session: await event.locals.getSession()
session: await event.locals.auth()
};
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const actions = {
default: async (event) => {
const { params, request, locals } = event;
const id = uuidSchema.parse(params.id);
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, `/auth/signin?callbackUrl=/dashboard/devices/${id}`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const actions = {
default: async (event) => {
const { params, request, locals } = event;
const id = uuidSchema.parse(params.id);
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, `/auth/signin?callbackUrl=/dashboard/policies/${id}`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const createPolicyStore = new CreatePolicyStore();
export const actions = {
default: async (event) => {
const { request, locals } = event;
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, '/auth/signin?callbackUrl=/dashboard/policies/create');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const actions = {
default: async (event) => {
const { params, request, locals } = event;
const id = uuidSchema.parse(params.id);
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, `/auth/signin?callbackUrl=/dashboard/pools/${id}`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const createPoolStore: CreatePoolStore = new CreatePoolStore();
export const actions = {
default: async (event: RequestEvent) => {
const { request, locals } = event;
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, '/auth/signin?callbackUrl=/dashboard/pools/create');
}
Expand Down
34 changes: 17 additions & 17 deletions apps/console-fb/src/routes/(app)/dashboard/reports/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
data-drawer-target="drawer-navigation"
data-drawer-toggle="drawer-navigation"
aria-controls="drawer-navigation"
class="mr-2 cursor-pointer rounded-lg p-2 text-gray-600 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:ring-2 focus:ring-gray-100 md:hidden dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:bg-gray-700 dark:focus:ring-gray-700"
class="mr-2 cursor-pointer rounded-lg p-2 text-gray-600 hover:bg-gray-100 hover:text-gray-900 focus:bg-gray-100 focus:ring-2 focus:ring-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:bg-gray-700 dark:focus:ring-gray-700 md:hidden"
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -83,7 +83,7 @@
type="button"
data-drawer-toggle="drawer-navigation"
aria-controls="drawer-navigation"
class="mr-1 rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:ring-4 focus:ring-gray-300 md:hidden dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-600"
class="mr-1 rounded-lg p-2 text-gray-500 hover:bg-gray-100 hover:text-gray-900 focus:ring-4 focus:ring-gray-300 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-600 md:hidden"
>
<span class="sr-only">Toggle search</span>
<svg
Expand Down Expand Up @@ -557,7 +557,7 @@
</div>
<button
type="button"
class="mx-3 flex rounded-full bg-gray-800 text-sm focus:ring-4 focus:ring-gray-300 md:mr-0 dark:focus:ring-gray-600"
class="mx-3 flex rounded-full bg-gray-800 text-sm focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-600 md:mr-0"
id="user-menu-button"
aria-expanded="false"
data-dropdown-toggle="dropdown"
Expand Down Expand Up @@ -687,7 +687,7 @@
<!-- Sidebar -->

<aside
class="fixed left-0 top-0 z-40 h-screen w-64 -translate-x-full border-r border-gray-200 bg-white pt-14 transition-transform md:translate-x-0 dark:border-gray-700 dark:bg-gray-800"
class="fixed left-0 top-0 z-40 h-screen w-64 -translate-x-full border-r border-gray-200 bg-white pt-14 transition-transform dark:border-gray-700 dark:bg-gray-800 md:translate-x-0"
aria-label="Sidenav"
id="drawer-navigation"
>
Expand Down Expand Up @@ -1008,7 +1008,7 @@
</ul>
</div>
<div
class="absolute bottom-0 left-0 z-20 hidden w-full justify-center space-x-4 bg-white p-4 lg:flex dark:bg-gray-800"
class="absolute bottom-0 left-0 z-20 hidden w-full justify-center space-x-4 bg-white p-4 dark:bg-gray-800 lg:flex"
>
<a
href="#"
Expand Down Expand Up @@ -1250,46 +1250,46 @@
<main class="h-auto p-4 pt-20 md:ml-64">
<div class="mb-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
<div
class="h-32 rounded-lg border-2 border-dashed border-gray-300 md:h-64 dark:border-gray-600"
class="h-32 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-64"
/>
<div
class="h-32 rounded-lg border-2 border-dashed border-gray-300 md:h-64 dark:border-gray-600"
class="h-32 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-64"
/>
<div
class="h-32 rounded-lg border-2 border-dashed border-gray-300 md:h-64 dark:border-gray-600"
class="h-32 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-64"
/>
<div
class="h-32 rounded-lg border-2 border-dashed border-gray-300 md:h-64 dark:border-gray-600"
class="h-32 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-64"
/>
</div>
<div class="mb-4 h-96 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600" />
<div class="mb-4 grid grid-cols-2 gap-4">
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
</div>
<div class="mb-4 h-96 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600" />
<div class="grid grid-cols-2 gap-4">
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
<div
class="h-48 rounded-lg border-2 border-dashed border-gray-300 md:h-72 dark:border-gray-600"
class="h-48 rounded-lg border-2 border-dashed border-gray-300 dark:border-gray-600 md:h-72"
/>
</div>
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const actions = {
default: async (event) => {
const { params, request, locals } = event;
const id = uuidSchema.parse(params.id);
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, `/auth/signin?callbackUrl=/dashboard/rules/${id}`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const createRuleStore = new CreateRuleStore();
export const actions = {
default: async (event) => {
const { request, locals } = event;
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, '/auth/signin?callbackUrl=/dashboard/rules/create');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const deleteRuleStore = new DeleteRuleStore();
export const actions = {
delete: async (event) => {
const { request, locals } = event;
const session = await locals.getSession();
const session = await locals.auth();
if (session?.user == undefined) {
throw redirect(307, '/auth/signin?callbackUrl=/dashboard/rules');
}
Expand Down
4 changes: 2 additions & 2 deletions apps/console-fb/src/routes/(play)/play/hyperui/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@
</a>

<a
class="hidden rounded-md bg-gray-100 px-5 py-2.5 text-sm font-medium text-teal-600 transition hover:text-teal-600/75 sm:block dark:bg-gray-800 dark:text-white dark:hover:text-white/75"
class="hidden rounded-md bg-gray-100 px-5 py-2.5 text-sm font-medium text-teal-600 transition hover:text-teal-600/75 dark:bg-gray-800 dark:text-white dark:hover:text-white/75 sm:block"
href="/"
>
Register
</a>
</div>

<button
class="block rounded bg-gray-100 p-2.5 text-gray-600 transition hover:text-gray-600/75 md:hidden dark:bg-gray-800 dark:text-white dark:hover:text-white/75"
class="block rounded bg-gray-100 p-2.5 text-gray-600 transition hover:text-gray-600/75 dark:bg-gray-800 dark:text-white dark:hover:text-white/75 md:hidden"
>
<span class="sr-only">Toggle menu</span>
<svg
Expand Down
4 changes: 2 additions & 2 deletions nhost/nhost.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,13 @@ secure = false
method = 'LOGIN'

[storage]
version = '0.5.0'
version = '0.5.1'

[storage.antivirus]
server = 'tcp://run-clamav:3310'

[ai]
version = '0.3.1'
version = '0.3.2'
# Used to validate requests between postgres and the AI service.
# The AI service will also include the header X-Graphite-Webhook-Secret
# with this value set when calling external webhooks so the source of
Expand Down

0 comments on commit c7e7e22

Please sign in to comment.