mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Merge remote-tracking branch 'origin/main' into nostr-git-support
This commit is contained in:
17 files changed
+151
-28
No files matched your search
@@ -49,6 +49,7 @@ describe('useAIProjectId', () => {
|
||||
previewDomain: 'local-shakespeare.dev',
|
||||
showcaseEnabled: true,
|
||||
showcaseModerator: 'npub1jvnpg4c6ljadf5t6ry0w9q0rnm4mksde87kglkrc993z46c39axsgq89sc',
|
||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||
},
|
||||
updateConfig: vi.fn(),
|
||||
});
|
||||
|
||||
@@ -41,6 +41,7 @@ function createWrapper(corsProxy: string) {
|
||||
previewDomain: 'local-test.dev',
|
||||
showcaseEnabled: true,
|
||||
showcaseModerator: 'npub1jvnpg4c6ljadf5t6ry0w9q0rnm4mksde87kglkrc993z46c39axsgq89sc',
|
||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||
};
|
||||
|
||||
return createElement(
|
||||
@@ -81,6 +82,7 @@ describe('useGit', () => {
|
||||
fs: mockFS,
|
||||
nostr: mockNostr,
|
||||
corsProxy: 'https://cors.isomorphic-git.org',
|
||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||
});
|
||||
expect(result.current).toEqual({ git: expect.any(Object) });
|
||||
});
|
||||
@@ -94,6 +96,7 @@ describe('useGit', () => {
|
||||
fs: mockFS,
|
||||
nostr: mockNostr,
|
||||
corsProxy: 'https://custom-cors.example.com',
|
||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||
});
|
||||
expect(result.current).toEqual({ git: expect.any(Object) });
|
||||
});
|
||||
@@ -107,6 +110,7 @@ describe('useGit', () => {
|
||||
fs: mockFS,
|
||||
nostr: mockNostr,
|
||||
corsProxy: 'https://cors.isomorphic-git.org',
|
||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||
});
|
||||
|
||||
// Rerender with a different wrapper (different CORS proxy)
|
||||
|
||||
+3
-3
@@ -12,11 +12,11 @@ export function useGit(): { git: Git } {
|
||||
const { fs } = useFS();
|
||||
const { nostr } = useNostr();
|
||||
const { config } = useAppContext();
|
||||
const { corsProxy } = config;
|
||||
const { corsProxy, ngitServers } = config;
|
||||
|
||||
const git = useMemo(() => {
|
||||
return new Git({ fs, nostr, corsProxy });
|
||||
}, [fs, nostr, corsProxy]);
|
||||
return new Git({ fs, nostr, corsProxy, ngitServers });
|
||||
}, [fs, nostr, corsProxy, ngitServers]);
|
||||
|
||||
return { git };
|
||||
}
|
||||
@@ -22,6 +22,7 @@ function Wrapper({ children }: { children: React.ReactNode }) {
|
||||
previewDomain: 'local-test.dev',
|
||||
showcaseEnabled: true,
|
||||
showcaseModerator: 'npub1jvnpg4c6ljadf5t6ry0w9q0rnm4mksde87kglkrc993z46c39axsgq89sc',
|
||||
ngitServers: ['git.shakespeare.diy', 'relay.ngit.dev'],
|
||||
};
|
||||
|
||||
return createElement(
|
||||
|
||||
Reference in new issue
Block a user