mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Remove one
This commit is contained in:
parent
1fdabaa63a
commit
f0a0b40b3e
6
front/.gitignore
vendored
6
front/.gitignore
vendored
@ -45,3 +45,9 @@ yarn-error.log*
|
||||
|
||||
|
||||
apps/web/next-env.d.ts
|
||||
|
||||
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
|
||||
# The following patterns were generated by expo-cli
|
||||
|
||||
expo-env.d.ts
|
||||
# @end expo-cli
|
@ -2,18 +2,6 @@ import type { ExpoConfig } from "expo/config";
|
||||
|
||||
const IS_DEV = process.env.APP_VARIANT === "development";
|
||||
|
||||
// Defined outside the config because dark splashscreen needs to be platform specific.
|
||||
const splash = {
|
||||
image: "./public/icon-256x256.png",
|
||||
resizeMode: "contain",
|
||||
backgroundColor: "#eff1f5",
|
||||
dark: {
|
||||
image: "./public/icon-256x256.png",
|
||||
resizeMode: "contain",
|
||||
backgroundColor: "#1e1e2e",
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const expo: ExpoConfig = {
|
||||
name: IS_DEV ? "Kyoo Development" : "Kyoo",
|
||||
slug: "kyoo",
|
||||
@ -24,8 +12,6 @@ export const expo: ExpoConfig = {
|
||||
orientation: "default",
|
||||
icon: "./public/icon-256x256.png",
|
||||
userInterfaceStyle: "automatic",
|
||||
splash,
|
||||
assetBundlePatterns: ["**/*"],
|
||||
ios: {
|
||||
supportsTablet: true,
|
||||
},
|
||||
@ -35,7 +21,6 @@ export const expo: ExpoConfig = {
|
||||
foregroundImage: "./public/icon-256x256.png",
|
||||
backgroundColor: "#eff1f5",
|
||||
},
|
||||
splash,
|
||||
},
|
||||
updates: {
|
||||
url: "https://u.expo.dev/55de6b52-c649-4a15-9a45-569ff5ed036c",
|
||||
@ -50,7 +35,7 @@ export const expo: ExpoConfig = {
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
"vxrn/expo-plugin",
|
||||
"expo-router",
|
||||
[
|
||||
"expo-build-properties",
|
||||
{
|
||||
@ -60,6 +45,19 @@ export const expo: ExpoConfig = {
|
||||
},
|
||||
],
|
||||
"expo-localization",
|
||||
[
|
||||
"expo-splash-screen",
|
||||
{
|
||||
image: "./public/icon-256x256.png",
|
||||
resizeMode: "contain",
|
||||
backgroundColor: "#eff1f5",
|
||||
dark: {
|
||||
image: "./public/icon-256x256.png",
|
||||
resizeMode: "contain",
|
||||
backgroundColor: "#1e1e2e",
|
||||
},
|
||||
},
|
||||
],
|
||||
// [
|
||||
// "react-native-video",
|
||||
// {
|
||||
@ -67,4 +65,7 @@ export const expo: ExpoConfig = {
|
||||
// },
|
||||
// ],
|
||||
],
|
||||
experiments: {
|
||||
typedRoutes: true,
|
||||
},
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Slot } from "one";
|
||||
import { Slot } from "expo-router";
|
||||
import { ErrorConsumer } from "~/providers/error-consumer";
|
||||
|
||||
export default function Layout() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { Slot, useServerHeadInsertion } from "one";
|
||||
import { Slot } from "expo-router";
|
||||
import { Platform } from "react-native";
|
||||
import { StyleRegistryProvider, createStyleRegistry } from "yoshiki/web";
|
||||
import { Providers } from "~/providers";
|
||||
|
||||
const GlobalCssTheme = () => {
|
||||
@ -59,32 +58,38 @@ const GlobalCssTheme = () => {
|
||||
};
|
||||
|
||||
export default function Layout() {
|
||||
const registry = createStyleRegistry();
|
||||
useServerHeadInsertion(() => registry.flushToComponent());
|
||||
// const registry = createStyleRegistry();
|
||||
// useServerHeadInsertion(() => registry.flushToComponent());
|
||||
|
||||
// TODO: change this lang attr
|
||||
return (
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>Kyoo</title>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="description" content="A portable and vast media library solution." />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/icon-16x16.png" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="/icon-64x64.png" />
|
||||
<link rel="icon" type="image/png" sizes="128x128" href="/icon-128x128.png" />
|
||||
<link rel="icon" type="image/png" sizes="256x256" href="/icon-256x256.png" />
|
||||
<GlobalCssTheme />
|
||||
</head>
|
||||
|
||||
<body className="hoverEnabled">
|
||||
<StyleRegistryProvider registry={registry}>
|
||||
<Providers>
|
||||
<Slot />
|
||||
{Platform.OS === "web" && <ReactQueryDevtools initialIsOpen={false} />}
|
||||
</Providers>
|
||||
</StyleRegistryProvider>
|
||||
</body>
|
||||
</html>
|
||||
<Providers>
|
||||
<Slot />
|
||||
{Platform.OS === "web" && <ReactQueryDevtools initialIsOpen={false} />}
|
||||
</Providers>
|
||||
);
|
||||
// return (
|
||||
// <html lang="en-US">
|
||||
// <head>
|
||||
// <title>Kyoo</title>
|
||||
// <meta charSet="utf-8" />
|
||||
// <meta name="description" content="A portable and vast media library solution." />
|
||||
// <link rel="icon" type="image/png" sizes="16x16" href="/icon-16x16.png" />
|
||||
// <link rel="icon" type="image/png" sizes="32x32" href="/icon-32x32.png" />
|
||||
// <link rel="icon" type="image/png" sizes="64x64" href="/icon-64x64.png" />
|
||||
// <link rel="icon" type="image/png" sizes="128x128" href="/icon-128x128.png" />
|
||||
// <link rel="icon" type="image/png" sizes="256x256" href="/icon-256x256.png" />
|
||||
// <GlobalCssTheme />
|
||||
// </head>
|
||||
//
|
||||
// <body className="hoverEnabled">
|
||||
// <StyleRegistryProvider registry={registry}>
|
||||
// <Providers>
|
||||
// <Slot />
|
||||
// {Platform.OS === "web" && <ReactQueryDevtools initialIsOpen={false} />}
|
||||
// </Providers>
|
||||
// </StyleRegistryProvider>
|
||||
// </body>
|
||||
// </html>
|
||||
// );
|
||||
}
|
||||
|
1237
front/bun.lock
1237
front/bun.lock
File diff suppressed because it is too large
Load Diff
@ -4,29 +4,30 @@
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "one dev",
|
||||
"build": "one build",
|
||||
"dev": "expo start",
|
||||
"apk": "eas build --profile preview --platform android --non-interactive --json",
|
||||
"apk:dev": "eas build --profile development --platform android --non-interactive",
|
||||
"serve": "one serve",
|
||||
"lint": "biome lint .",
|
||||
"lint:fix": "biome lint . --write",
|
||||
"format": "biome format .",
|
||||
"format:fix": "biome format . --write",
|
||||
"eas-build-post-install": "cd android && ./gradlew generateCodegenArtifactsFromSchema && react-native config | jq -r '.dependencies[].name' | xargs --replace=PROJECT -- sed -i -e '/implementation(\"com.facebook.react:react-android\")/a\\' -e 'implementation project(\":PROJECT\")' app/build.gradle"
|
||||
"format:fix": "biome format . --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"@expo/html-elements": "^0.12.5",
|
||||
"@material-symbols/svg-400": "^0.31.6",
|
||||
"@react-navigation/bottom-tabs": "^7.3.10",
|
||||
"@react-navigation/elements": "^2.3.8",
|
||||
"@react-navigation/native": "^7.1.6",
|
||||
"@tanstack/react-query": "^5.80.6",
|
||||
"caniuse-api": "^3.0.0",
|
||||
"expo": "~53.0.11",
|
||||
"expo": "~53.0.10",
|
||||
"expo-build-properties": "^0.14.6",
|
||||
"expo-localization": "^16.1.5",
|
||||
"expo-router": "^5.0.7",
|
||||
"expo-splash-screen": "^0.30.9",
|
||||
"expo-status-bar": "~2.2.3",
|
||||
"expo-updates": "~0.28.14",
|
||||
"i18next-http-backend": "^3.0.2",
|
||||
"jotai": "^2.12.5",
|
||||
"one": "1.1.486",
|
||||
"react": "19.0.0",
|
||||
"react-i18next": "^15.5.2",
|
||||
"react-native": "0.79.3",
|
||||
@ -45,14 +46,7 @@
|
||||
"@types/react": "~19.0.10",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"expo-dev-client": "^5.2.0",
|
||||
"typescript": "5.8.3",
|
||||
"vite": "^6.3.5",
|
||||
"vite-plugin-compile-time": "^0.4.6",
|
||||
"vite-plugin-svgr": "^4.3.0"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"yoshiki@1.2.14": "patches/yoshiki@1.2.14.patch",
|
||||
"one@1.1.445": "patches/one@1.1.445.patch"
|
||||
"typescript": "5.8.3"
|
||||
},
|
||||
"expo": {
|
||||
"doctor": {
|
||||
|
@ -1,76 +0,0 @@
|
||||
diff --git a/node_modules/one/.bun-tag-2de151ab6f27ae4d b/.bun-tag-2de151ab6f27ae4d
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
|
||||
diff --git a/dist/cjs/vite/one-server-only.cjs b/dist/cjs/vite/one-server-only.cjs
|
||||
index d15e8f68d97a261ffb203fe31a6733fd9ff7a38c..a70727b8491e5b6890e7e37d893ea89d602812da 100644
|
||||
--- a/dist/cjs/vite/one-server-only.cjs
|
||||
+++ b/dist/cjs/vite/one-server-only.cjs
|
||||
@@ -109,6 +109,5 @@ function setServerData(key2, value) {
|
||||
} else throw new Error(`Cannot setServerData in ${process.env.VITE_ENVIRONMENT} environment!`);
|
||||
}
|
||||
function getServerData(key2) {
|
||||
- if (process.env.VITE_ENVIRONMENT === "ssr") throw new Error("Cannot getServerData on the server");
|
||||
- if (process.env.VITE_ENVIRONMENT !== "ssr") return getServerContext()?.postRenderData?.[key2];
|
||||
+ return getServerContext()?.postRenderData?.[key2];
|
||||
}
|
||||
diff --git a/dist/cjs/vite/one-server-only.js b/dist/cjs/vite/one-server-only.js
|
||||
index 6fc1e3823184d2947823c0461edd2812adf01c98..b67b608a5a5960e4078093df861611a573a2d0d8 100644
|
||||
--- a/dist/cjs/vite/one-server-only.js
|
||||
+++ b/dist/cjs/vite/one-server-only.js
|
||||
@@ -100,9 +100,6 @@ function setServerData(key2, value) {
|
||||
throw new Error(`Cannot setServerData in ${process.env.VITE_ENVIRONMENT} environment!`);
|
||||
}
|
||||
function getServerData(key2) {
|
||||
- if (process.env.VITE_ENVIRONMENT === "ssr")
|
||||
- throw new Error("Cannot getServerData on the server");
|
||||
- if (process.env.VITE_ENVIRONMENT !== "ssr")
|
||||
- return getServerContext()?.postRenderData?.[key2];
|
||||
+ return getServerContext()?.postRenderData?.[key2];
|
||||
}
|
||||
//# sourceMappingURL=one-server-only.js.map
|
||||
diff --git a/dist/esm/vite/one-server-only.js b/dist/esm/vite/one-server-only.js
|
||||
index 5d52c4efe4dacb19dfa581d85d828d4a95f9edd4..c140a0bdb62a3c94dc74634ecded861a35a54f38 100644
|
||||
--- a/dist/esm/vite/one-server-only.js
|
||||
+++ b/dist/esm/vite/one-server-only.js
|
||||
@@ -72,10 +72,7 @@ function setServerData(key2, value) {
|
||||
throw new Error(`Cannot setServerData in ${process.env.VITE_ENVIRONMENT} environment!`);
|
||||
}
|
||||
function getServerData(key2) {
|
||||
- if (process.env.VITE_ENVIRONMENT === "ssr")
|
||||
- throw new Error("Cannot getServerData on the server");
|
||||
- if (process.env.VITE_ENVIRONMENT !== "ssr")
|
||||
- return getServerContext()?.postRenderData?.[key2];
|
||||
+ return getServerContext()?.postRenderData?.[key2];
|
||||
}
|
||||
export {
|
||||
asyncHeadersCache,
|
||||
diff --git a/dist/esm/vite/one-server-only.mjs b/dist/esm/vite/one-server-only.mjs
|
||||
index a24223c8f62a491407999783be8124941c36cd6e..8010cb4941b545ad171b8c4e8d29053f0d65684c 100644
|
||||
--- a/dist/esm/vite/one-server-only.mjs
|
||||
+++ b/dist/esm/vite/one-server-only.mjs
|
||||
@@ -74,8 +74,7 @@ function setServerData(key2, value) {
|
||||
} else throw new Error(`Cannot setServerData in ${process.env.VITE_ENVIRONMENT} environment!`);
|
||||
}
|
||||
function getServerData(key2) {
|
||||
- if (process.env.VITE_ENVIRONMENT === "ssr") throw new Error("Cannot getServerData on the server");
|
||||
- if (process.env.VITE_ENVIRONMENT !== "ssr") return getServerContext()?.postRenderData?.[key2];
|
||||
+ return getServerContext()?.postRenderData?.[key2];
|
||||
}
|
||||
export { asyncHeadersCache, ensureAsyncLocalID, getServerContext, getServerData, mergeHeaders, requestAsyncLocalStore, runWithAsyncLocalContext, setResponseHeaders, setServerContext, setServerData, useServerContext };
|
||||
//# sourceMappingURL=one-server-only.mjs.map
|
||||
diff --git a/src/vite/one-server-only.tsx b/src/vite/one-server-only.tsx
|
||||
index c54dcae3445da6681abd004f94897d86fc6c1b0e..3b0d3e9496597358c2c4b3d25559b3e775bfa38c 100644
|
||||
--- a/src/vite/one-server-only.tsx
|
||||
+++ b/src/vite/one-server-only.tsx
|
||||
@@ -142,10 +142,5 @@ export function setServerData<Key extends keyof One.ClientData>(
|
||||
* For getting data set by setServerData on the server.
|
||||
*/
|
||||
export function getServerData(key: keyof One.ClientData) {
|
||||
- if (process.env.VITE_ENVIRONMENT === 'ssr') {
|
||||
- throw new Error(`Cannot getServerData on the server`)
|
||||
- }
|
||||
- if (process.env.VITE_ENVIRONMENT !== 'ssr') {
|
||||
- return getServerContext()?.postRenderData?.[key]
|
||||
- }
|
||||
+ return getServerContext()?.postRenderData?.[key]
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
diff --git a/src/web/generator.ts b/src/web/generator.ts
|
||||
index 26db130f12f3edfe996a3cf08eef155b696a059a..b5b11ba46e8b773c4687ad77c5c5cc6c3fa5d4e0 100644
|
||||
--- a/src/web/generator.ts
|
||||
+++ b/src/web/generator.ts
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
import { useId, useInsertionEffect } from "react";
|
||||
-import { prefix } from "inline-style-prefixer";
|
||||
+import { prefix } from "inline-style-prefixer/lib";
|
||||
import { Properties as CssProperties } from "csstype";
|
||||
import { Theme, breakpoints, useTheme } from "../theme";
|
||||
import {
|
@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
// Setting up and overriding some react-native CLI commands.
|
||||
// Necessary for building native iOS and Android apps,
|
||||
// where Vite shall be used instead of Metro for JS bundling during the build precess.
|
||||
commands: [...require("vxrn/react-native-commands")],
|
||||
};
|
15
front/routes.d.ts
vendored
15
front/routes.d.ts
vendored
@ -1,15 +0,0 @@
|
||||
// deno-lint-ignore-file
|
||||
/* eslint-disable */
|
||||
// biome-ignore: needed import
|
||||
import type { OneRouter } from 'one'
|
||||
|
||||
declare module 'one' {
|
||||
export namespace OneRouter {
|
||||
export interface __routes<T extends string = string> extends Record<string, unknown> {
|
||||
StaticRoutes: `/` | `/(app)` | `/(app)/` | `/(public)/login` | `/_sitemap` | `/login`
|
||||
DynamicRoutes: never
|
||||
DynamicRouteTemplate: never
|
||||
IsTyped: true
|
||||
}
|
||||
}
|
||||
}
|
@ -28,7 +28,9 @@
|
||||
},
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx"
|
||||
"**/*.tsx",
|
||||
".expo/types/**/*.ts",
|
||||
"expo-env.d.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
@ -37,5 +39,6 @@
|
||||
"**/dist",
|
||||
"**/types",
|
||||
"**/tests"
|
||||
]
|
||||
],
|
||||
"extends": "expo/tsconfig.base"
|
||||
}
|
||||
|
@ -1,59 +0,0 @@
|
||||
import { resolvePath } from "@vxrn/resolve";
|
||||
import { one } from "one/vite";
|
||||
import type { UserConfig } from "vite";
|
||||
import compileTime from "vite-plugin-compile-time";
|
||||
import svgr from "vite-plugin-svgr";
|
||||
|
||||
export default {
|
||||
ssr: {
|
||||
noExternal: ["@tanstack/react-query", "@tanstack/react-query-devtools"],
|
||||
},
|
||||
esbuild: {
|
||||
include: [/.tsx?$/],
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@react-native/assets-registry/registry": resolvePath(
|
||||
"react-native-web/dist/modules/AssetRegistry/index.js",
|
||||
),
|
||||
"^inline-style-prefixer$": "inline-style-prefixer/lib",
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
one({
|
||||
web: {
|
||||
defaultRenderMode: "ssr",
|
||||
},
|
||||
deps: {
|
||||
"@expo/html-elements": {
|
||||
"**/*.js": ["jsx"],
|
||||
},
|
||||
"inline-style-prefixer/lib": "interop",
|
||||
"react-native-reanimated": {
|
||||
"**/*.js": ["jsx"],
|
||||
},
|
||||
yoshiki: {
|
||||
"**/*.tsx": ["jsx"],
|
||||
},
|
||||
},
|
||||
}),
|
||||
svgr({
|
||||
include: "**/*.svg",
|
||||
svgrOptions: {
|
||||
native: true,
|
||||
},
|
||||
}),
|
||||
compileTime(),
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: process.env.KYOO_URL ?? "http://back/api",
|
||||
changeOrigin: true,
|
||||
// without this we have two /api at the start
|
||||
rewrite: (path) => path.replace(/^\/api/, ""),
|
||||
},
|
||||
},
|
||||
allowedHosts: true,
|
||||
},
|
||||
} satisfies UserConfig;
|
Loading…
x
Reference in New Issue
Block a user