Skip to content

Commit

Permalink
update indexer and add sidebar styling
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeardEth committed Nov 26, 2023
1 parent 8ed5c43 commit 19f64d1
Show file tree
Hide file tree
Showing 40 changed files with 370 additions and 248 deletions.
117 changes: 62 additions & 55 deletions apps/auth-proxy/.nitro/dev/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { mkdirSync } from 'node:fs';
import { parentPort, threadId } from 'node:worker_threads';
import { provider, isWindows } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/std-env/dist/index.mjs';
import { defineEventHandler, handleCacheHeaders, splitCookiesString, isEvent, createEvent, getRequestHeader, eventHandler, setHeaders, sendRedirect, proxyRequest, setResponseStatus, setResponseHeader, send, createApp, createRouter as createRouter$1, toNodeListener, fetchWithEvent, lazyEventHandler, toWebRequest } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/h3/dist/index.mjs';
import { createFetch as createFetch$1, Headers as Headers$1 } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/ofetch/dist/node.mjs';
import destr from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/destr/dist/index.mjs';
import { createCall, createFetch } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/unenv/runtime/fetch/index.mjs';
import { createHooks } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/hookable/dist/index.mjs';
import { snakeCase } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/scule/dist/index.mjs';
import { klona } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/klona/dist/index.mjs';
import defu, { defuFn } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/defu/dist/defu.mjs';
import { hash } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/ohash/dist/index.mjs';
import { parseURL, withoutBase, joinURL, getQuery, withQuery } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/ufo/dist/index.mjs';
import { createStorage, prefixStorage } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/unstorage/dist/index.mjs';
import unstorage_47drivers_47fs from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/unstorage/drivers/fs.mjs';
import { toRouteMatcher, createRouter } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/radix3/dist/index.mjs';
import { Auth } from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/@auth/core/index.js';
import Discord from 'file:///Users/red/Documents/GitHub/RealmsWorld/node_modules/@auth/core/providers/discord.js';
import { provider, isWindows } from 'file:///home/red/Repos/RealmsWorld/node_modules/std-env/dist/index.mjs';
import { defineEventHandler, handleCacheHeaders, splitCookiesString, isEvent, createEvent, getRequestHeader, eventHandler, setHeaders, sendRedirect, proxyRequest, setResponseStatus, setResponseHeader, send, createApp, createRouter as createRouter$1, toNodeListener, fetchWithEvent, lazyEventHandler, toWebRequest } from 'file:///home/red/Repos/RealmsWorld/node_modules/h3/dist/index.mjs';
import { createFetch as createFetch$1, Headers as Headers$1 } from 'file:///home/red/Repos/RealmsWorld/node_modules/ofetch/dist/node.mjs';
import destr from 'file:///home/red/Repos/RealmsWorld/node_modules/destr/dist/index.mjs';
import { createCall, createFetch } from 'file:///home/red/Repos/RealmsWorld/node_modules/unenv/runtime/fetch/index.mjs';
import { createHooks } from 'file:///home/red/Repos/RealmsWorld/node_modules/hookable/dist/index.mjs';
import { snakeCase } from 'file:///home/red/Repos/RealmsWorld/node_modules/scule/dist/index.mjs';
import { klona } from 'file:///home/red/Repos/RealmsWorld/node_modules/klona/dist/index.mjs';
import defu, { defuFn } from 'file:///home/red/Repos/RealmsWorld/node_modules/defu/dist/defu.mjs';
import { hash } from 'file:///home/red/Repos/RealmsWorld/node_modules/ohash/dist/index.mjs';
import { parseURL, withoutBase, joinURL, getQuery, withQuery } from 'file:///home/red/Repos/RealmsWorld/node_modules/ufo/dist/index.mjs';
import { createStorage, prefixStorage } from 'file:///home/red/Repos/RealmsWorld/node_modules/unstorage/dist/index.mjs';
import unstorage_47drivers_47fs from 'file:///home/red/Repos/RealmsWorld/node_modules/unstorage/drivers/fs.mjs';
import { toRouteMatcher, createRouter } from 'file:///home/red/Repos/RealmsWorld/node_modules/radix3/dist/index.mjs';
import { Auth } from 'file:///home/red/Repos/RealmsWorld/node_modules/@auth/core/index.js';
import Discord from 'file:///home/red/Repos/RealmsWorld/node_modules/@auth/core/providers/discord.js';

const inlineAppConfig = {};

Expand Down Expand Up @@ -99,7 +99,7 @@ new Proxy(/* @__PURE__ */ Object.create(null), {
}
});

const serverAssets = [{"baseName":"server","dir":"/Users/red/Documents/GitHub/RealmsWorld/apps/auth-proxy/assets"}];
const serverAssets = [{"baseName":"server","dir":"/home/red/Repos/RealmsWorld/apps/auth-proxy/assets"}];

const assets = createStorage();

Expand All @@ -111,11 +111,11 @@ const storage = createStorage({});

storage.mount('/assets', assets);

storage.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"/Users/red/Documents/GitHub/RealmsWorld/apps/auth-proxy","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('src', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"/Users/red/Documents/GitHub/RealmsWorld/apps/auth-proxy","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('build', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"/Users/red/Documents/GitHub/RealmsWorld/apps/auth-proxy/.nitro","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('cache', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"/Users/red/Documents/GitHub/RealmsWorld/apps/auth-proxy/.nitro/cache","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('data', unstorage_47drivers_47fs({"driver":"fs","base":"/Users/red/Documents/GitHub/RealmsWorld/apps/auth-proxy/.data/kv","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('root', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"/home/red/Repos/RealmsWorld/apps/auth-proxy","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('src', unstorage_47drivers_47fs({"driver":"fs","readOnly":true,"base":"/home/red/Repos/RealmsWorld/apps/auth-proxy","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('build', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"/home/red/Repos/RealmsWorld/apps/auth-proxy/.nitro","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('cache', unstorage_47drivers_47fs({"driver":"fs","readOnly":false,"base":"/home/red/Repos/RealmsWorld/apps/auth-proxy/.nitro/cache","ignore":["**/node_modules/**","**/.git/**"]}));
storage.mount('data', unstorage_47drivers_47fs({"driver":"fs","base":"/home/red/Repos/RealmsWorld/apps/auth-proxy/.data/kv","ignore":["**/node_modules/**","**/.git/**"]}));

function useStorage(base = "") {
return base ? prefixStorage(storage, base) : storage;
Expand Down Expand Up @@ -413,6 +413,9 @@ function hasReqHeader(event, name, includes) {
return value && typeof value === "string" && value.toLowerCase().includes(includes);
}
function isJsonRequest(event) {
if (hasReqHeader(event, "accept", "text/html")) {
return false;
}
return hasReqHeader(event, "accept", "application/json") || hasReqHeader(event, "user-agent", "curl/") || hasReqHeader(event, "user-agent", "httpie/") || hasReqHeader(event, "sec-fetch-mode", "cors") || event.path.startsWith("/api/") || event.path.endsWith(".json");
}
function normalizeError(error) {
Expand Down Expand Up @@ -532,38 +535,42 @@ const plugins = [

];

const isDev = "development" === "development";
const errorHandler = (function(error, event) {
const { stack, statusCode, statusMessage, message } = normalizeError(error);
const showDetails = isDev && statusCode !== 404;
const errorObject = {
url: event.path || "",
statusCode,
statusMessage,
message,
stack: showDetails ? stack.map((i) => i.text) : void 0
};
if (error.unhandled || error.fatal) {
const tags = [
"[nitro]",
"[request error]",
error.unhandled && "[unhandled]",
error.fatal && "[fatal]"
].filter(Boolean).join(" ");
console.error(
tags,
error.message + "\n" + stack.map((l) => " " + l.text).join(" \n")
);
}
setResponseStatus(event, statusCode, statusMessage);
if (isJsonRequest(event)) {
setResponseHeader(event, "Content-Type", "application/json");
return send(event, JSON.stringify(errorObject));
} else {
setResponseHeader(event, "Content-Type", "text/html");
return send(event, renderHTMLError(errorObject));
function defineNitroErrorHandler(handler) {
return handler;
}
const errorHandler = defineNitroErrorHandler(
function defaultNitroErrorHandler(error, event) {
const { stack, statusCode, statusMessage, message } = normalizeError(error);
const showDetails = statusCode !== 404;
const errorObject = {
url: event.path || "",
statusCode,
statusMessage,
message,
stack: showDetails ? stack.map((i) => i.text) : void 0
};
if (error.unhandled || error.fatal) {
const tags = [
"[nitro]",
"[request error]",
error.unhandled && "[unhandled]",
error.fatal && "[fatal]"
].filter(Boolean).join(" ");
console.error(
tags,
error.message + "\n" + stack.map((l) => " " + l.text).join(" \n")
);
}
setResponseStatus(event, statusCode, statusMessage);
if (isJsonRequest(event)) {
setResponseHeader(event, "Content-Type", "application/json");
return send(event, JSON.stringify(errorObject));
} else {
setResponseHeader(event, "Content-Type", "text/html");
return send(event, renderHTMLError(errorObject));
}
}
});
);
function renderHTMLError(error) {
const statusCode = error.statusCode || 500;
const statusMessage = error.statusMessage || "Request Error";
Expand Down Expand Up @@ -597,10 +604,10 @@ function renderHTMLError(error) {
`;
}

const _lazy_u0ICUT = () => Promise.resolve().then(function () { return ____auth_$1; });
const _lazy_qvyt2b = () => Promise.resolve().then(function () { return ____auth_$1; });

const handlers = [
{ route: '/**:auth', handler: _lazy_u0ICUT, lazy: true, middleware: false, method: undefined }
{ route: '/**:auth', handler: _lazy_qvyt2b, lazy: true, middleware: false, method: undefined }
];

function createNitroApp() {
Expand Down
2 changes: 1 addition & 1 deletion apps/auth-proxy/.nitro/dev/index.mjs.map

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions apps/auth-proxy/.nitro/nitro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"date": "2023-11-26T11:06:17.696Z",
"preset": "nitro-dev",
"framework": {
"name": "nitro",
"version": "2.8.0"
},
"versions": {
"nitro": "2.8.0"
},
"dev": {
"pid": 188359,
"workerAddress": {
"socketPath": "/tmp/nitro/worker-188359-1.sock"
}
}
}
7 changes: 5 additions & 2 deletions apps/auth-proxy/.nitro/types/nitro-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ declare global {
const defineCachedFunction: typeof import('../../../../node_modules/nitropack/dist/runtime')['defineCachedFunction']
const defineEventHandler: typeof import('../../../../node_modules/h3')['defineEventHandler']
const defineLazyEventHandler: typeof import('../../../../node_modules/h3')['defineLazyEventHandler']
const defineNitroErrorHandler: typeof import('../../../../node_modules/nitropack/dist/runtime')['defineNitroErrorHandler']
const defineNitroPlugin: typeof import('../../../../node_modules/nitropack/dist/runtime')['defineNitroPlugin']
const defineNodeListener: typeof import('../../../../node_modules/h3')['defineNodeListener']
const defineNodeMiddleware: typeof import('../../../../node_modules/h3')['defineNodeMiddleware']
Expand All @@ -40,6 +41,7 @@ declare global {
const getMethod: typeof import('../../../../node_modules/h3')['getMethod']
const getProxyRequestHeaders: typeof import('../../../../node_modules/h3')['getProxyRequestHeaders']
const getQuery: typeof import('../../../../node_modules/h3')['getQuery']
const getRequestFingerprint: typeof import('../../../../node_modules/h3')['getRequestFingerprint']
const getRequestHeader: typeof import('../../../../node_modules/h3')['getRequestHeader']
const getRequestHeaders: typeof import('../../../../node_modules/h3')['getRequestHeaders']
const getRequestHost: typeof import('../../../../node_modules/h3')['getRequestHost']
Expand All @@ -57,6 +59,7 @@ declare global {
const getRouterParams: typeof import('../../../../node_modules/h3')['getRouterParams']
const getSession: typeof import('../../../../node_modules/h3')['getSession']
const getValidatedQuery: typeof import('../../../../node_modules/h3')['getValidatedQuery']
const getValidatedRouterParams: typeof import('../../../../node_modules/h3')['getValidatedRouterParams']
const handleCacheHeaders: typeof import('../../../../node_modules/h3')['handleCacheHeaders']
const handleCors: typeof import('../../../../node_modules/h3')['handleCors']
const isCorsOriginAllowed: typeof import('../../../../node_modules/h3')['isCorsOriginAllowed']
Expand Down Expand Up @@ -112,5 +115,5 @@ declare global {
const useStorage: typeof import('../../../../node_modules/nitropack/dist/runtime')['useStorage']
const writeEarlyHints: typeof import('../../../../node_modules/h3')['writeEarlyHints']
}
export { defineCachedFunction, defineCachedEventHandler, cachedFunction, cachedEventHandler, useRuntimeConfig, useStorage, useNitroApp, defineNitroPlugin, nitroPlugin, defineRenderHandler, getRouteRules, useAppConfig, useEvent } from '../../../../node_modules/nitropack/dist/runtime';
export { appendCorsHeaders, appendCorsPreflightHeaders, appendHeader, appendHeaders, appendResponseHeader, appendResponseHeaders, assertMethod, callNodeListener, clearResponseHeaders, clearSession, createApp, createAppEventHandler, createError, createEvent, createRouter, defaultContentType, defineEventHandler, defineLazyEventHandler, defineNodeListener, defineNodeMiddleware, defineRequestMiddleware, defineResponseMiddleware, deleteCookie, dynamicEventHandler, eventHandler, fetchWithEvent, fromNodeMiddleware, fromPlainHandler, fromWebHandler, getCookie, getHeader, getHeaders, getMethod, getProxyRequestHeaders, getQuery, getRequestHeader, getRequestHeaders, getRequestHost, getRequestIP, getRequestPath, getRequestProtocol, getRequestURL, getRequestWebStream, getResponseHeader, getResponseHeaders, getResponseStatus, getResponseStatusText, getRouterParam, getRouterParams, getSession, getValidatedQuery, handleCacheHeaders, handleCors, isCorsOriginAllowed, isError, isEvent, isEventHandler, isMethod, isPreflightRequest, isStream, isWebResponse, lazyEventHandler, parseCookies, promisifyNodeListener, proxyRequest, readBody, readFormData, readMultipartFormData, readRawBody, readValidatedBody, removeResponseHeader, sanitizeStatusCode, sanitizeStatusMessage, sealSession, send, sendError, sendNoContent, sendProxy, sendRedirect, sendStream, sendWebResponse, serveStatic, setCookie, setHeader, setHeaders, setResponseHeader, setResponseHeaders, setResponseStatus, splitCookiesString, toEventHandler, toNodeListener, toPlainHandler, toWebHandler, toWebRequest, unsealSession, updateSession, useBase, useSession, writeEarlyHints } from 'h3';
export { defineCachedFunction, defineCachedEventHandler, cachedFunction, cachedEventHandler, useRuntimeConfig, useStorage, useNitroApp, defineNitroPlugin, nitroPlugin, defineRenderHandler, getRouteRules, useAppConfig, useEvent, defineNitroErrorHandler } from '../../../../node_modules/nitropack/dist/runtime';
export { appendCorsHeaders, appendCorsPreflightHeaders, appendHeader, appendHeaders, appendResponseHeader, appendResponseHeaders, assertMethod, callNodeListener, clearResponseHeaders, clearSession, createApp, createAppEventHandler, createError, createEvent, createRouter, defaultContentType, defineEventHandler, defineLazyEventHandler, defineNodeListener, defineNodeMiddleware, defineRequestMiddleware, defineResponseMiddleware, deleteCookie, dynamicEventHandler, eventHandler, fetchWithEvent, fromNodeMiddleware, fromPlainHandler, fromWebHandler, getCookie, getHeader, getHeaders, getMethod, getProxyRequestHeaders, getQuery, getRequestFingerprint, getRequestHeader, getRequestHeaders, getRequestHost, getRequestIP, getRequestPath, getRequestProtocol, getRequestURL, getRequestWebStream, getResponseHeader, getResponseHeaders, getResponseStatus, getResponseStatusText, getRouterParam, getRouterParams, getSession, getValidatedQuery, getValidatedRouterParams, handleCacheHeaders, handleCors, isCorsOriginAllowed, isError, isEvent, isEventHandler, isMethod, isPreflightRequest, isStream, isWebResponse, lazyEventHandler, parseCookies, promisifyNodeListener, proxyRequest, readBody, readFormData, readMultipartFormData, readRawBody, readValidatedBody, removeResponseHeader, sanitizeStatusCode, sanitizeStatusMessage, sealSession, send, sendError, sendNoContent, sendProxy, sendRedirect, sendStream, sendWebResponse, serveStatic, setCookie, setHeader, setHeaders, setResponseHeader, setResponseHeaders, setResponseStatus, splitCookiesString, toEventHandler, toNodeListener, toPlainHandler, toWebHandler, toWebRequest, unsealSession, updateSession, useBase, useSession, writeEarlyHints } from 'h3';
10 changes: 5 additions & 5 deletions apps/auth-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@auth/core": "^0.18.1"
"@auth/core": "^0.18.3"
},
"devDependencies": {
"@realms-world/eslint-config": "workspace:*",
"@realms-world/prettier-config": "workspace:*",
"@realms-world/tailwind-config": "workspace:*",
"@realms-world/tsconfig": "workspace:*",
"eslint": "^8.53.0",
"nitropack": "^2.7.2",
"prettier": "^3.0.3",
"typescript": "^5.2.2"
"eslint": "^8.54.0",
"nitropack": "^2.8.0",
"prettier": "^3.1.0",
"typescript": "^5.3.2"
},
"eslintConfig": {
"root": true,
Expand Down
22 changes: 11 additions & 11 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"@expo/metro-config": "^0.10.7",
"@shopify/flash-list": "1.6.1",
"@tanstack/react-query": "4.35.7",
"@trpc/client": "^10.43.3",
"@trpc/react-query": "^10.43.3",
"@trpc/server": "^10.43.3",
"@trpc/client": "^10.44.1",
"@trpc/react-query": "^10.44.1",
"@trpc/server": "^10.44.1",
"expo": "^49.0.13",
"expo-constants": "~14.4.2",
"expo-linking": "~6.0.0",
Expand All @@ -41,16 +41,16 @@
"@realms-world/prettier-config": "workspace:*",
"@realms-world/tailwind-config": "workspace:*",
"@realms-world/tsconfig": "workspace:*",
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/runtime": "^7.23.2",
"@babel/core": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/runtime": "^7.23.4",
"@expo/config-plugins": "^7.2.5",
"@types/babel__core": "^7.20.3",
"@types/react": "^18.2.37",
"eslint": "^8.53.0",
"prettier": "^3.0.3",
"@types/babel__core": "^7.20.5",
"@types/react": "^18.2.38",
"eslint": "^8.54.0",
"prettier": "^3.1.0",
"tailwindcss": "3.3.5",
"typescript": "^5.2.2"
"typescript": "^5.3.2"
},
"eslintConfig": {
"root": true,
Expand Down
Loading

0 comments on commit 19f64d1

Please sign in to comment.