Skip to content

Commit

Permalink
yeet sudo providers in here
Browse files Browse the repository at this point in the history
  • Loading branch information
JorrinKievit committed Aug 14, 2024
1 parent 7c8b584 commit d5a136c
Show file tree
Hide file tree
Showing 129 changed files with 2,247 additions and 1,007 deletions.
2 changes: 2 additions & 0 deletions apps/expo/src/components/player/VideoPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ export const VideoPlayer = () => {
};
}, [player, meta, removeFromWatchHistory, autoPlay, setMeta, router]);

console.log("loading player", player);

return (
<GestureDetector gesture={composedGesture}>
<View
Expand Down
32 changes: 1 addition & 31 deletions packages/provider-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,9 @@
"prettier": "@movie-web/prettier-config",
"dependencies": {
"@movie-web/providers": "workspace:*",
"@nabla/vite-plugin-eslint": "^2.0.2",
"@types/cookie": "^0.6.0",
"@types/crypto-js": "^4.2.2",
"@types/node-fetch": "^2.6.11",
"@types/randombytes": "^2.0.3",
"@types/set-cookie-parser": "^2.4.7",
"@types/spinnies": "^0.5.3",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@vitest/coverage-v8": "^1.4.0",
"commander": "^12.0.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"enquirer": "^2.4.1",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"node-fetch": "^3.3.2",
"parse-hls": "^1.0.7",
"prettier": "^3.2.5",
"puppeteer": "^22.6.1",
"spinnies": "^0.5.1",
"srt-webvtt": "^2.0.0",
"tmdb-ts": "^1.6.1",
"tsc-alias": "^1.8.8",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vite-node": "^1.4.0",
"vite-plugin-dts": "^3.8.1",
"vitest": "^1.4.0"
"tmdb-ts": "^1.6.1"
}
}
31 changes: 21 additions & 10 deletions packages/providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,38 +40,49 @@
"@movie-web/eslint-config": "workspace:^0.2.0",
"@movie-web/prettier-config": "workspace:^0.1.0",
"@movie-web/tsconfig": "workspace:^0.1.0",
"@nabla/vite-plugin-eslint": "^2.0.4",
"@types/cookie": "^0.6.0",
"@types/crypto-js": "^4.2.2",
"@types/node-fetch": "^2.6.11",
"@types/randombytes": "^2.0.3",
"@types/set-cookie-parser": "^2.4.7",
"@types/set-cookie-parser": "^2.4.10",
"@types/spinnies": "^0.5.3",
"@vitest/coverage-v8": "^1.4.0",
"commander": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"@vitest/coverage-v8": "^1.6.0",
"commander": "^12.1.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"enquirer": "^2.4.1",
"eslint": "^8.57.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.2.1",
"node-fetch": "^3.3.2",
"prettier": "^3.2.5",
"puppeteer": "^22.6.1",
"puppeteer": "^22.15.0",
"spinnies": "^0.5.1",
"tsc-alias": "^1.8.8",
"tsc-alias": "^1.8.10",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vite-node": "^1.4.0",
"vite-plugin-dts": "^3.8.1",
"vitest": "^1.4.0"
"vite": "^5.3.5",
"vite-node": "^1.6.0",
"vite-plugin-dts": "^3.9.1",
"vitest": "^1.6.0"
},
"dependencies": {
"cheerio": "1.0.0-rc.12",
"cookie": "^0.6.0",
"crypto-js": "^4.2.0",
"form-data": "^4.0.0",
"hls-parser": "^0.13.3",
"iso-639-1": "^3.1.2",
"nanoid": "^3.3.7",
"node-fetch": "^3.3.2",
"set-cookie-parser": "^2.6.0",
"react-native": "0.74.5",
"set-cookie-parser": "^2.7.0",
"unpacker": "^1.0.1"
},
"eslintConfig": {
Expand Down
10 changes: 5 additions & 5 deletions packages/providers/src/__test__/providers/embedUtils.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { buildProviders } from '@/entrypoint/builder';
import type { ScrapeMedia } from '@/entrypoint/utils/media';
import { ScrapeMedia } from '@/entrypoint/utils/media';
import { targets } from '@/entrypoint/utils/targets';
import { makeStandardFetcher } from '@/fetchers/standardFetch';
import type { Embed, Sourcerer, SourcererEmbed } from '@/providers/base';
import type { TestTypes } from './providerUtils';
import { Embed, Sourcerer, SourcererEmbed } from '@/providers/base';
import { TestTypes } from './providerUtils';
import { describe, expect, it } from 'vitest';
import type { ProviderControls } from '@/entrypoint/controls';
import { ProviderControls } from '@/entrypoint/controls';
import { makeSimpleProxyFetcher } from '@/fetchers/simpleProxy';

export interface TestEmbedOptions {
Expand Down Expand Up @@ -80,7 +80,7 @@ export function testEmbed(ops: TestEmbedOptions) {
});
} catch (err) {
it(`${t} - embed ??`, () => {
throw new Error(`Failed to get streams: ${ err}`);
throw new Error('Failed to get streams: ' + err);
});
}
}
Expand Down
9 changes: 4 additions & 5 deletions packages/providers/src/__test__/providers/providerUtils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import type { ScrapeMedia } from '@/entrypoint/utils/media';
import type { Sourcerer} from '@/providers/base';
import { Embed, SourcererEmbed } from '@/providers/base';
import { ScrapeMedia } from '@/entrypoint/utils/media';
import { Embed, Sourcerer, SourcererEmbed } from '@/providers/base';
import { buildProviders } from '@/entrypoint/builder';
import { describe, expect, it } from 'vitest';
import { makeStandardFetcher } from '@/fetchers/standardFetch';
import type { ProviderControls } from '@/entrypoint/controls';
import { ProviderControls } from '@/entrypoint/controls';
import { NotFoundError } from '@/utils/errors';
import { targets } from '@/entrypoint/utils/targets';
import { getBuiltinEmbeds } from '@/entrypoint/providers';
Expand Down Expand Up @@ -42,7 +41,7 @@ export function testSource(ops: TestSourceOptions) {
let hasError = false;
let streamCount = 0;
let embedCount = 0;
const embeds = [];
let embeds = [];
try {
const result = await providers.runSourceScraper({
id: ops.source.id,
Expand Down
2 changes: 1 addition & 1 deletion packages/providers/src/__test__/providers/testMedia.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ScrapeMedia } from '@/entrypoint/utils/media';
import { ScrapeMedia } from '@/entrypoint/utils/media';

function makeMedia(media: ScrapeMedia): ScrapeMedia {
return media;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { makeSimpleProxyFetcher } from '@/fetchers/simpleProxy';
import type { DefaultedFetcherOptions} from '@/fetchers/types';
import { FetcherOptions } from '@/fetchers/types';
import { DefaultedFetcherOptions, FetcherOptions } from '@/fetchers/types';
import { Headers } from 'node-fetch';
import { afterEach, describe, expect, it, vi } from 'vitest';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { makeStandardFetcher } from '@/fetchers/standardFetch';
import type { DefaultedFetcherOptions } from '@/fetchers/types';
import { DefaultedFetcherOptions } from '@/fetchers/types';
import { Headers } from 'node-fetch';
import { afterEach, describe, expect, it, vi } from 'vitest';

Expand Down
4 changes: 2 additions & 2 deletions packages/providers/src/__test__/standard/providerTests.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { vi } from 'vitest';

import type { gatherAllEmbeds, gatherAllSources } from '@/providers/all';
import { gatherAllEmbeds, gatherAllSources } from '@/providers/all';
import { makeEmbed, makeSourcerer } from '@/providers/base';

export function makeProviderMocks() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mockEmbeds, mockSources } from '../providerTests';
import { getBuiltinEmbeds, getBuiltinSources } from '@/entrypoint/providers';
import type { FeatureMap } from '@/entrypoint/utils/targets';
import { FeatureMap } from '@/entrypoint/utils/targets';
import { getProviders } from '@/providers/get';
import { vi, describe, it, expect, afterEach } from 'vitest';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FeatureMap, Flags} from '@/entrypoint/utils/targets';
import { flags, flagsAllowedInFeatures } from '@/entrypoint/utils/targets';
import { FeatureMap, Flags, flags, flagsAllowedInFeatures } from '@/entrypoint/utils/targets';
import { describe, it, expect } from 'vitest';

describe('flagsAllowedInFeatures()', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/providers/src/dev-cli/browser/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions packages/providers/src/dev-cli/browser/index.html

This file was deleted.

20 changes: 0 additions & 20 deletions packages/providers/src/dev-cli/browser/index.ts

This file was deleted.

Loading

0 comments on commit d5a136c

Please sign in to comment.