Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext, useContext } from 'react';
import type { Feed } from '../../src/Feed';
import type { Feed } from '../../src/feed';

export const StreamFeedContext = createContext<Feed | undefined>(undefined);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createContext, useContext } from 'react';
import type { FeedsClient } from '../../src/FeedsClient';
import type { FeedsClient } from '../../src/feeds-client';

export const StreamFeedsContext = createContext<FeedsClient | undefined>(undefined);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FeedsClientState } from '../../../src/FeedsClient';
import type { FeedsClientState } from '../../../src/feeds-client';
import { useStateStore } from '../useStateStore';
import { useFeedsClient } from '../../contexts/StreamFeedsContext';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FeedsClientState } from '../../../src/FeedsClient';
import type { FeedsClientState } from '../../../src/feeds-client';
import { useStateStore } from '../useStateStore';
import { useFeedsClient } from '../../contexts/StreamFeedsContext';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import type {
CommentResponse,
} from '../../../src/gen/models';
import type { CommentParent } from '../../../src/types';
import { Feed, FeedState } from '../../../src/Feed';
import { Feed, FeedState } from '../../../src/feed';
import { useStateStore } from '../useStateStore';
import { useFeedContext } from '../../contexts/StreamFeedContext';
import { isCommentResponse } from '../../../src/utils';
import { checkHasAnotherPage } from '../../../src/utils';
import { checkHasAnotherPage, isCommentResponse } from '../../../src/utils';

type UseCommentsReturnType<T extends ActivityResponse | CommentResponse> = {
comments: NonNullable<
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useFeedContext } from '../../contexts/StreamFeedContext';
import { Feed, FeedState } from '../../../src/Feed';
import { Feed, FeedState } from '../../../src/feed';
import { useStateStore } from '../useStateStore';
import { useMemo } from 'react';
import { useStableCallback } from '../internal';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Feed, FeedState } from '../../../src/Feed';
import { Feed, FeedState } from '../../../src/feed';
import { useFeedContext } from '../../contexts/StreamFeedContext';
import { useStateStore } from '../useStateStore';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react';
import { Feed, FeedState } from '../../../src/Feed';
import { Feed, FeedState } from '../../../src/feed';
import { useStateStore } from '../useStateStore';
import { checkHasAnotherPage } from '../../../src/utils';
import { useFeedContext } from '../../contexts/StreamFeedContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react';
import { Feed, FeedState } from '../../../src/Feed';
import { Feed, FeedState } from '../../../src/feed';
import { checkHasAnotherPage } from '../../../src/utils';
import { useStateStore } from '../useStateStore';
import { useFeedContext } from '../../contexts/StreamFeedContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import { Feed, FeedState } from '../../../src/Feed';
import { Feed, FeedState } from '../../../src/feed';
import { FeedOwnCapability } from '../../../src/gen/models';
import { useStateStore } from '../useStateStore';
import { useFeedContext } from '../../contexts/StreamFeedContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Feed, FeedState } from '../../../src/Feed';
import { Feed, FeedState } from '../../../src/feed';
import { useFeedContext } from '../../contexts/StreamFeedContext';
import { useStateStore } from '../useStateStore';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';

import { FeedsClient } from '../../src/FeedsClient';
import { FeedsClient } from '../../src/feeds-client';
import type { UserRequest } from '../../src/gen/models';
import type { TokenOrProvider } from '../../src/types';
import type { FeedsClientOptions } from '../../src/common/types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useMemo } from 'react';
import { useFeedsClient } from '../../contexts/StreamFeedsContext';
import { CommentParent } from '../../../src/types';
import { isCommentResponse } from '../../../src/utils';
import { useStableCallback } from '../internal';
import { isCommentResponse } from '../../../src/utils';

/**
* A utility hook that takes in an entity and a reaction type, and creates reaction actions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PropsWithChildren } from 'react';
import { StreamFeedContext } from '../contexts/StreamFeedContext';
import type { Feed } from '../../src/Feed';
import type { Feed } from '../../src/feed';

/**
* The props for the StreamFeed component. It accepts a `Feed` instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
getTestUser,
waitForEvent,
} from './utils';
import { FeedsClient } from '../src/FeedsClient';
import { FeedsClient } from '../src/feeds-client';
import {
ActivityAddedEvent,
ActivityUpdatedEvent,
ActivityDeletedEvent,
} from '../src/gen/models';
import { Feed } from '../src/Feed';
import { Feed } from '../src/feed';

describe('Activity state updates via WebSocket events', () => {
let client: FeedsClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getTestUser,
} from './utils';
import { sleep } from '../src/common/utils';
import { FeedsClient } from '../src/FeedsClient';
import { FeedsClient } from '../src/feeds-client';
import { UserRequest } from '../src/gen/models';

describe('API requests and error handling', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { UserRequest } from '../../src/gen/models';

describe('Activities page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { ActivityResponse, UserRequest } from '../../src/gen/models';

describe('Bookmarks page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import {
ActivityResponse,
CommentResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
getServerClient,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { UserRequest } from '../../src/gen/models';

describe('Feeds page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { UserRequest } from '../../src/gen/models';
import { isImageFile } from '../../src/utils';
import fs from 'fs';
import path from 'path';
import { isImageFile } from '../../src/utils';

describe('File uploads page', () => {
let client: FeedsClient;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { UserRequest } from '../../src/gen/models';

describe('Follows page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { ActivityResponse, UserRequest } from '../../src/gen/models';

describe('Pin and unpin page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
getTestUser,
waitForEvent,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { ActivityResponse, UserRequest } from '../../src/gen/models';

describe('Polls page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { UserRequest } from '../../src/gen/models';
import { randomId } from '../../../feeds-client/src/common/utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
getServerClient,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { UserRequest } from '../../src/gen/models';

describe('Quick start page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { ActivityResponse, UserRequest } from '../../src/gen/models';

describe('Reactions page', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
getTestUser,
waitForEvent,
} from '../utils';
import { FeedsClient } from '../../src/FeedsClient';
import { Feed } from '../../src/Feed';
import { FeedsClient } from '../../src/feeds-client';
import { Feed } from '../../src/feed';
import { UserRequest } from '../../src/gen/models';

describe('State layer page', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect, beforeAll, afterAll, beforeEach } from 'vitest';
import { FeedsClient } from '../src/FeedsClient';
import { FeedsClient } from '../src/feeds-client';
import {
createTestClient,
createTestTokenGenerator,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { FeedsClient } from '../src/FeedsClient';
import { FeedsClient } from '../src/feeds-client';
import {
createTestClient,
createTestTokenGenerator,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest';
import { FeedsClient } from '../src/FeedsClient';
import { FeedsClient } from '../src/feeds-client';
import {
createTestClient,
createTestTokenGenerator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
getTestUser,
waitForEvent,
} from './utils';
import { FeedsClient } from '../src/FeedsClient';
import { FeedsClient } from '../src/feeds-client';

describe('Feed state updates via WebSocket events', () => {
let client: FeedsClient;
Expand Down
4 changes: 2 additions & 2 deletions packages/feeds-client/__integration-tests__/feeds.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
createTestTokenGenerator,
getTestUser,
} from './utils';
import { FeedsClient } from '../src/FeedsClient';
import { Feed } from '../src/Feed';
import { FeedsClient } from '../src/feeds-client';
import { Feed } from '../src/feed';

describe('Feeds API basic test', () => {
let client: FeedsClient;
Expand Down
4 changes: 2 additions & 2 deletions packages/feeds-client/__integration-tests__/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FeedsClient } from '../src/FeedsClient';
import { Feed } from '../src/Feed';
import { FeedsClient } from '../src/feeds-client';
import { Feed } from '../src/feed';
import { UserRequest } from '../src/gen/models';
import { FeedsClientOptions } from '../src/common/types';
import { WSEvent } from '../src/gen/models';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
waitForEvent,
} from './utils';
import { ConnectedEvent } from '../src/common/real-time/event-models';
import { FeedsClient } from '../src/FeedsClient';
import { FeedsClient } from '../src/feeds-client';
describe('WebSocket connection', () => {
let client: FeedsClient;
const user: UserRequest = getTestUser();
Expand Down
4 changes: 2 additions & 2 deletions packages/feeds-client/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export * from './src/FeedsClient';
export * from './src/Feed';
export * from './src/feeds-client';
export * from './src/feed/feed';
export * from './src/gen/models';
export * from './src/types';
export * from './src/common/types';
Expand Down
1 change: 1 addition & 0 deletions packages/feeds-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"@types/react": "^19.1.8",
"@vitest/coverage-v8": "3.2.4",
"dotenv": "^16.4.5",
"human-id": "^4.1.1",
"react": "19.0.0",
"rimraf": "^6.0.1",
"rollup": "^4.24.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/feeds-client/src/common/ActivitySearchSource.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BaseSearchSource } from './BaseSearchSource';
import type { SearchSourceOptions } from './BaseSearchSource';

import { FeedsClient } from '../FeedsClient';
import { FeedsClient } from '../feeds-client';
import { ActivityResponse } from '../gen/models';

export class ActivitySearchSource extends BaseSearchSource<ActivityResponse> {
Expand Down
4 changes: 2 additions & 2 deletions packages/feeds-client/src/common/FeedSearchSource.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BaseSearchSource } from './BaseSearchSource';
import type { SearchSourceOptions } from './BaseSearchSource';

import { FeedsClient } from '../FeedsClient';
import { Feed } from '../Feed';
import { FeedsClient } from '../feeds-client';
import { Feed } from '../feed';

export type FeedSearchSourceOptions = SearchSourceOptions & {
groupId?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/feeds-client/src/common/Poll.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { StateStore } from './StateStore';
import type { FeedsClient } from '../FeedsClient';
import type { FeedsClient } from '../feeds-client';
import type {
PollVote,
QueryPollVotesRequest,
Expand Down
2 changes: 1 addition & 1 deletion packages/feeds-client/src/common/UserSearchSource.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BaseSearchSource } from './BaseSearchSource';
import type { SearchSourceOptions } from './BaseSearchSource';

import { FeedsClient } from '../FeedsClient';
import { FeedsClient } from '../feeds-client';
import { UserResponse } from '../gen/models';

export class UserSearchSource extends BaseSearchSource<UserResponse> {
Expand Down
Loading
Loading