mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-08 10:44:20 -04:00
Patch dependencies
This commit is contained in:
parent
4b239db229
commit
071b365a9b
@ -1,6 +1,5 @@
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { Slot } from "one";
|
||||
import { useServerHeadInsertion } from "one";
|
||||
import { Slot, useServerHeadInsertion } from "one";
|
||||
import { StyleRegistryProvider, createStyleRegistry } from "yoshiki/web";
|
||||
import { Providers } from "~/providers";
|
||||
|
||||
|
@ -36,6 +36,8 @@
|
||||
},
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"one@1.1.426": "patches/one@1.1.426.patch",
|
||||
"react-native-svg@15.11.1": "patches/react-native-svg@15.11.1.patch",
|
||||
"yoshiki@1.2.14": "patches/yoshiki@1.2.14.patch",
|
||||
},
|
||||
"packages": {
|
||||
|
@ -44,6 +44,8 @@
|
||||
"vite-plugin-svgr": "^4.3.0"
|
||||
},
|
||||
"patchedDependencies": {
|
||||
"yoshiki@1.2.14": "patches/yoshiki@1.2.14.patch"
|
||||
"yoshiki@1.2.14": "patches/yoshiki@1.2.14.patch",
|
||||
"react-native-svg@15.11.1": "patches/react-native-svg@15.11.1.patch",
|
||||
"one@1.1.426": "patches/one@1.1.426.patch"
|
||||
}
|
||||
}
|
||||
|
76
front/patches/one@1.1.426.patch
Normal file
76
front/patches/one@1.1.426.patch
Normal file
@ -0,0 +1,76 @@
|
||||
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]
|
||||
}
|
46
front/patches/react-native-svg@15.11.1.patch
Normal file
46
front/patches/react-native-svg@15.11.1.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff --git a/node_modules/react-native-svg/.bun-tag-55c72d773cdb59fb b/.bun-tag-55c72d773cdb59fb
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
|
||||
diff --git a/lib/commonjs/utils/fetchData.js b/lib/commonjs/utils/fetchData.js
|
||||
index 207b2937d048ca9c22b58dd7be3641b5a7262274..385556e71e6bf0ea1c843c40065520131be59907 100644
|
||||
--- a/lib/commonjs/utils/fetchData.js
|
||||
+++ b/lib/commonjs/utils/fetchData.js
|
||||
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
||||
});
|
||||
exports.fetchText = fetchText;
|
||||
var _reactNative = require("react-native");
|
||||
-var _buffer = require("buffer");
|
||||
+
|
||||
async function fetchText(uri) {
|
||||
if (!uri) {
|
||||
return null;
|
||||
@@ -23,7 +23,7 @@ const decodeBase64Image = uri => {
|
||||
const splitContent = decoded.split(';')[1].split(',');
|
||||
const dataType = splitContent[0];
|
||||
const content = splitContent.slice(1).join(',');
|
||||
- return _buffer.Buffer.from(content, dataType).toString('utf-8');
|
||||
+ return Buffer.from(content, dataType).toString('utf-8');
|
||||
};
|
||||
function dataUriToXml(uri) {
|
||||
try {
|
||||
diff --git a/lib/module/utils/fetchData.js b/lib/module/utils/fetchData.js
|
||||
index 12b68966cbcfd9a18cae66824dfe7aec60d14a80..3d2698c3a982e90b795c35c05cf5efb2910e02c9 100644
|
||||
--- a/lib/module/utils/fetchData.js
|
||||
+++ b/lib/module/utils/fetchData.js
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Platform } from 'react-native';
|
||||
-import { Buffer } from 'buffer';
|
||||
+
|
||||
export async function fetchText(uri) {
|
||||
if (!uri) {
|
||||
return null;
|
||||
diff --git a/src/utils/fetchData.ts b/src/utils/fetchData.ts
|
||||
index d141be31c924bd1d3ec287ad4e291db018b4bb72..0dc3d95ca382151a45af41f8ed499d1403a1f65c 100644
|
||||
--- a/src/utils/fetchData.ts
|
||||
+++ b/src/utils/fetchData.ts
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Platform } from 'react-native';
|
||||
-import { Buffer } from 'buffer';
|
||||
|
||||
export async function fetchText(uri?: string): Promise<string | null> {
|
||||
if (!uri) {
|
@ -5,6 +5,8 @@ import { useYoshiki } from "yoshiki/native";
|
||||
import { Button, Icon, Link, P, ts } from "~/primitives";
|
||||
import { useAccount } from "~/providers/account-provider";
|
||||
|
||||
console.log(Register);
|
||||
|
||||
export const Unauthorized = ({ missing }: { missing: string[] }) => {
|
||||
const { t } = useTranslation();
|
||||
const { css } = useYoshiki();
|
||||
|
@ -6,16 +6,6 @@ export default {
|
||||
ssr: {
|
||||
noExternal: ["@tanstack/react-query", "@tanstack/react-query-devtools"],
|
||||
},
|
||||
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/, ""),
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
one({
|
||||
deps: {
|
||||
@ -35,4 +25,14 @@ export default {
|
||||
},
|
||||
}),
|
||||
],
|
||||
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/, ""),
|
||||
},
|
||||
},
|
||||
},
|
||||
} satisfies UserConfig;
|
||||
|
Loading…
x
Reference in New Issue
Block a user