@fubar-it-co/tmdb-client 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +1 -0
- package/CHANGELOG.md +256 -0
- package/LICENSE +21 -0
- package/README.md +122 -0
- package/eslint.config.js +15 -0
- package/openapi-ts.config.ts +43 -0
- package/package.json +46 -0
- package/publish-local.sh +86 -0
- package/publish.sh +114 -0
- package/scripts/add-ts-nocheck.js +85 -0
- package/src/client/@tanstack/react-query.gen.ts +4398 -0
- package/src/client/client/client.gen.ts +289 -0
- package/src/client/client/index.ts +26 -0
- package/src/client/client/types.gen.ts +214 -0
- package/src/client/client/utils.gen.ts +317 -0
- package/src/client/client.gen.ts +19 -0
- package/src/client/core/auth.gen.ts +42 -0
- package/src/client/core/bodySerializer.gen.ts +85 -0
- package/src/client/core/params.gen.ts +170 -0
- package/src/client/core/pathSerializer.gen.ts +172 -0
- package/src/client/core/queryKeySerializer.gen.ts +118 -0
- package/src/client/core/serverSentEvents.gen.ts +244 -0
- package/src/client/core/types.gen.ts +105 -0
- package/src/client/core/utils.gen.ts +141 -0
- package/src/client/index.ts +6 -0
- package/src/client/sdk.gen.ts +1682 -0
- package/src/client/types.gen.ts +9574 -0
- package/src/index.ts +28 -0
- package/src/tmdb-config.ts +47 -0
- package/src/types/errors.ts +32 -0
- package/src/vite-env.d.ts +9 -0
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +17 -0
package/.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
src/client
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
## <small>0.0.5 (2026-03-11)</small>
|
|
2
|
+
|
|
3
|
+
* docs: add accessibility (a11y) testing guide to README ([62608c9](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/62608c9))
|
|
4
|
+
* docs: add acknowledgment for Nsttt (DTS plugin) ([87ff972](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/87ff972))
|
|
5
|
+
* docs: add build:packages and storybook commands to README ([32dd588](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/32dd588))
|
|
6
|
+
* docs: add live demo link to README ([8f62301](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8f62301))
|
|
7
|
+
* docs: add Project Purpose section to README ([146112e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/146112e))
|
|
8
|
+
* docs: add Storybook live URL to README ([7449502](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/7449502))
|
|
9
|
+
* docs: removed cascade rules ([40647aa](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/40647aa))
|
|
10
|
+
* docs: update README with reset scenario and project structure ([549dd6a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/549dd6a))
|
|
11
|
+
* docs: update README with Tailwind CSS v4 and HMR sync ([3b46283](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/3b46283))
|
|
12
|
+
* docs(claude): enforce explicit approval requirement for git push and risky actions ([f6d927f](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/f6d927f))
|
|
13
|
+
* docs(claude): migrate rules to .claude/ and add slash command skills ([8e45ec3](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8e45ec3))
|
|
14
|
+
* docs(claude): remove auto-loaded rules, add model selection and on-demand loading rule ([973cf36](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/973cf36))
|
|
15
|
+
* docs(claude): update session notes — Phase 4.8 done, Phase 4.6 next ([7c08fbe](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/7c08fbe))
|
|
16
|
+
* docs(http-client): update changelog for version bump ([dfdf0f8](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/dfdf0f8))
|
|
17
|
+
* docs(http-client): update changelog for version bump ([4f85338](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4f85338))
|
|
18
|
+
* docs(http-client): update changelog for version bump ([2f2307c](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/2f2307c))
|
|
19
|
+
* docs(http-client): update changelog for version bump ([dd5003d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/dd5003d))
|
|
20
|
+
* docs(http-client): update changelog for version bump ([1a7a80e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1a7a80e))
|
|
21
|
+
* docs(license): add MIT license ([d55012a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/d55012a))
|
|
22
|
+
* docs(readme): add readme file ([1053ffb](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1053ffb))
|
|
23
|
+
* docs(rules): add comprehensive Windsurf Cascade rules ([5b5b80a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5b5b80a))
|
|
24
|
+
* docs(rules): document officially supported TMDB image sizes ([5c03094](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5c03094))
|
|
25
|
+
* docs(ui): add JSDoc comments to Rating subcomponent props ([9234971](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/9234971))
|
|
26
|
+
* docs(ui): add JSDoc documentation to Carousel components ([101dc1e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/101dc1e))
|
|
27
|
+
* build: add cors headers and spa redirects to root netlify config ([94c5fff](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/94c5fff))
|
|
28
|
+
* build: commit generated mf-types for CI compatibility ([57457e1](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/57457e1))
|
|
29
|
+
* build: commit remote.css files for CI compatibility ([862932f](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/862932f))
|
|
30
|
+
* build: exclude test files from tsc build in all apps ([305f113](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/305f113))
|
|
31
|
+
* build: migrate http-client to @fubar-it-co/tmdb-client npm package ([e23e020](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e23e020))
|
|
32
|
+
* build: remove default build command from root netlify config ([fca311e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/fca311e))
|
|
33
|
+
* build: skip rebuild when app-specific files are unchanged ([5158da0](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5158da0))
|
|
34
|
+
* build(http-client): configure package for npm publication with verdaccio support ([b19e8b9](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/b19e8b9))
|
|
35
|
+
* build(scripts): separate prod and prod:server commands for ci and local dev ([4103406](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4103406))
|
|
36
|
+
* build(scripts): separate prod and prod:server commands for ci and local dev ([0eca34b](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/0eca34b))
|
|
37
|
+
* feat: add navigation to movie detail page ([467740b](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/467740b))
|
|
38
|
+
* feat: add Netlify deployment configuration ([8a0936a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8a0936a))
|
|
39
|
+
* feat: add netlify.toml at root ([60782d7](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/60782d7))
|
|
40
|
+
* feat: added close button to photo carrousel ([6ba6e51](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/6ba6e51))
|
|
41
|
+
* feat: configure module federation dts and rename package scope ([4b9740a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4b9740a))
|
|
42
|
+
* feat: integrate Tailwind CSS v4 with shared theme configuration ([74b3cd9](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/74b3cd9))
|
|
43
|
+
* feat: svg export automation, logot icon, and a11y pass ([88ee2b6](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/88ee2b6))
|
|
44
|
+
* feat: sync module federation shared versions with pnpm catalog ([e41e9a4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e41e9a4))
|
|
45
|
+
* feat(api): add secret api key for tmdb ([90ebe04](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/90ebe04))
|
|
46
|
+
* feat(commitlint): add commitlint for conventional commits ([5743844](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5743844))
|
|
47
|
+
* feat(css): fixed styles injected from remote into host ([b5952f4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/b5952f4))
|
|
48
|
+
* feat(detail): add error boundary for invalid movie IDs ([c302152](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/c302152))
|
|
49
|
+
* feat(fonts): add Press Start 2P fancy font for FOUC testing ([cbdc72d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/cbdc72d))
|
|
50
|
+
* feat(fonts): add Roboto, Roboto Condensed, and Inter fonts via fontsource ([29c670e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/29c670e))
|
|
51
|
+
* feat(home): add CarouselLoading and error handling to TrendingSection ([e81958e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e81958e))
|
|
52
|
+
* feat(home): add FreeToWatchSection component ([1d5e2d8](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1d5e2d8))
|
|
53
|
+
* feat(home): add HeroSection with now playing movies ([e3b4810](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e3b4810))
|
|
54
|
+
* feat(home): add hooks for movie detail page ([117b53e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/117b53e))
|
|
55
|
+
* feat(home): add TanStack Query hooks with heyAPI integration ([43e3f8f](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/43e3f8f))
|
|
56
|
+
* feat(home): add TrendingSection component with tests and Storybook ([dd971a2](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/dd971a2))
|
|
57
|
+
* feat(home): apply Typography component to all sections ([57d9fd2](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/57d9fd2))
|
|
58
|
+
* feat(home): refactor layout and CSS architecture with prefixing ([9829937](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/9829937))
|
|
59
|
+
* feat(host): add health check for remote modules ([06fddf7](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/06fddf7))
|
|
60
|
+
* feat(http-client): add TMDB API client with heyAPI ([5753782](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5753782))
|
|
61
|
+
* feat(husky): add husky for precommit hook ([b9e22fb](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/b9e22fb))
|
|
62
|
+
* feat(layouts): add layouts package with core components ([05c58a6](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/05c58a6))
|
|
63
|
+
* feat(layouts): integrate RootLayout in host and remotes routing ([aa76519](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/aa76519))
|
|
64
|
+
* feat(lint): add eslint 9 and prettier ([92a2bf4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/92a2bf4))
|
|
65
|
+
* feat(list): migrate CSS to Tailwind v4 ([51b78ae](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/51b78ae))
|
|
66
|
+
* feat(media): add Cast section with top 10 actors ([a37641c](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a37641c))
|
|
67
|
+
* feat(media): add empty state messages to recommendation carousels ([36ff16d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/36ff16d))
|
|
68
|
+
* feat(media): add RecommendedMoviesCarousel and RecommendedTVCarousel with tests ([16d3a16](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/16d3a16))
|
|
69
|
+
* feat(media): add RecommendedSection with tabs and media-type-aware default ([91cc3c2](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/91cc3c2))
|
|
70
|
+
* feat(media): add SimilarSection with switchable movie/tv carousels ([19815a1](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/19815a1))
|
|
71
|
+
* feat(media): add Synopsis component with embedded queries ([e3de327](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e3de327))
|
|
72
|
+
* feat(media): add Trailers & Clips section with YouTube modal player ([f356d21](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/f356d21))
|
|
73
|
+
* feat(media): add useTVSeriesRecommendations hook and export recommendations hooks ([e5c3b30](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e5c3b30))
|
|
74
|
+
* feat(media): improve Crew component and add alternating section backgrounds ([2aa78a5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/2aa78a5))
|
|
75
|
+
* feat(media): integrate RecommendedSection into Media page ([4f0dbed](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4f0dbed))
|
|
76
|
+
* feat(monorepo): implement micro frontend architecture with module federation ([33c6c7e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/33c6c7e))
|
|
77
|
+
* feat(movie): add alternating container backgrounds to sections ([289e064](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/289e064))
|
|
78
|
+
* feat(movie): add Movie/TV Series compatibility and unified navigation ([4a55a2a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4a55a2a))
|
|
79
|
+
* feat(movie): add MovieHero component with responsive layout ([c08e684](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/c08e684))
|
|
80
|
+
* feat(movie): refactor Movie page with embedded queries pattern ([2ae1a90](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/2ae1a90))
|
|
81
|
+
* feat(photos): add Photos component with PhotosModal and PhotosErrorBoundary ([bb45696](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/bb45696))
|
|
82
|
+
* feat(photos): add Photos section with ID-based lightbox navigation ([861b4a2](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/861b4a2))
|
|
83
|
+
* feat(photos): add useMovieImages hook ([716147a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/716147a))
|
|
84
|
+
* feat(photos): init remote app on port 3003 with Photos placeholder ([e023601](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e023601))
|
|
85
|
+
* feat(react-query): implementation of react query for micro front end ([288ace6](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/288ace6))
|
|
86
|
+
* feat(scripts): add script to stop all running servers ([85fc92d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/85fc92d))
|
|
87
|
+
* feat(servers): add configuration and scripts to launch the app in dev mode ([c642af0](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/c642af0))
|
|
88
|
+
* feat(shared): add HMR sync plugin for Module Federation ([995db03](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/995db03))
|
|
89
|
+
* feat(shared): add mock data and MSW handlers for movie and tv recommendations ([39a58de](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/39a58de))
|
|
90
|
+
* feat(shared): add movieImages mock data and MSW handlers ([026bfc1](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/026bfc1))
|
|
91
|
+
* feat(shared): implement font preload injection vite plugin ([0042945](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/0042945))
|
|
92
|
+
* feat(storybook): add RecommendedSection stories ([dde15d5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/dde15d5))
|
|
93
|
+
* feat(storybook): add Storybook package with Button and Card stories ([6843baa](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/6843baa))
|
|
94
|
+
* feat(tailwind): add tailwindRemoteCss plugin to avoid preflight duplication ([02f4df4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/02f4df4))
|
|
95
|
+
* feat(tokens): add Style Dictionary design tokens package ([6fb4fb7](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/6fb4fb7))
|
|
96
|
+
* feat(ui): add Avatar 2xl size (96px) and rename former 2xl to 3xl (128px) ([bdd6a95](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/bdd6a95))
|
|
97
|
+
* feat(ui): add Badge component with Calendar icon and textClassName prop ([a68c2b6](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a68c2b6))
|
|
98
|
+
* feat(ui): add Carousel component with responsive pagination and compound subcomponents ([24438a1](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/24438a1))
|
|
99
|
+
* feat(ui): add Carousel lightbox variant with CarouselCounter and initialIndex ([59b86b4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/59b86b4))
|
|
100
|
+
* feat(ui): add design system package with Button and Card components ([9fa9052](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/9fa9052))
|
|
101
|
+
* feat(ui): add Icon component with @heroicons/react ([80a73a9](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/80a73a9))
|
|
102
|
+
* feat(ui): add IconButton and Avatar components with cursor-pointer ([a3e661a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a3e661a))
|
|
103
|
+
* feat(ui): add Modal component ([60c935e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/60c935e))
|
|
104
|
+
* feat(ui): add MovieCard component and refactor Card with CVA-style variants ([bcb5545](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/bcb5545))
|
|
105
|
+
* feat(ui): add MovieCard navigation with discriminated union types ([49d46bd](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/49d46bd))
|
|
106
|
+
* feat(ui): add Rating component with circle and stars variants ([5949f52](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5949f52))
|
|
107
|
+
* feat(ui): add Skeleton component with shimmer animation ([a500648](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a500648))
|
|
108
|
+
* feat(ui): add Typography component with 15 variants ([80d1c45](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/80d1c45))
|
|
109
|
+
* feat(ui): image component with canvas-based blur placeholder ([bffd225](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/bffd225))
|
|
110
|
+
* feat(ui): make Button polymorphic with as='link' | as='button' ([f3f2e11](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/f3f2e11))
|
|
111
|
+
* feat(home,ui): add CarouselLoading and fix TMDBError typing ([9f33898](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/9f33898))
|
|
112
|
+
* Feat/any feature (#4) ([62e8cf5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/62e8cf5)), closes [#4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/issues/4)
|
|
113
|
+
* fix(home,media,photos): revert lazy-loading, configure aggressive esbuild minification ([c4ae10d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/c4ae10d))
|
|
114
|
+
* fix(home,media): add Suspense fallbacks with skeleton placeholders to prevent CLS ([694efc4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/694efc4))
|
|
115
|
+
* fix(home,media): correct Suspense fallback heights to measured values ([dc9f3d5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/dc9f3d5))
|
|
116
|
+
* refactor(list, detail): use generated tmdb-client instead of manual API calls ([64e6798](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/64e6798))
|
|
117
|
+
* fix: fix on svg export script ([bd8d80a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/bd8d80a))
|
|
118
|
+
* fix: ignore all generated api.d.ts files ([a880ef2](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a880ef2))
|
|
119
|
+
* fix: paddings and alignments for home hero and media hero sections ([da2bbed](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/da2bbed))
|
|
120
|
+
* fix: resolve ESLint errors for pre-commit hook ([009e3f6](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/009e3f6))
|
|
121
|
+
* fix: wrong command in build.yml ([909bf8b](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/909bf8b))
|
|
122
|
+
* fix: wrong type in useTVSeriesSimilar ([3ed57f4](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/3ed57f4))
|
|
123
|
+
* fix(build): use esbuild minifier instead of terser ([99e5260](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/99e5260))
|
|
124
|
+
* fix(ci): add GITHUB_TOKEN and pin sonarqube-scan-action version ([a2b1d87](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a2b1d87))
|
|
125
|
+
* fix(ci): add pnpm build:packages step to setup action ([5946f1a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5946f1a))
|
|
126
|
+
* fix(ci): correct SonarQube project key ([f5b3050](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/f5b3050))
|
|
127
|
+
* fix(ci): implement comprehensive coverage reporting for all packages and apps ([485a6dd](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/485a6dd))
|
|
128
|
+
* fix(ci): improve SonarQube configuration... ([1a48613](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1a48613))
|
|
129
|
+
* fix(ci): migrate to official sonarqube-scan-action ([98f8d2f](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/98f8d2f))
|
|
130
|
+
* fix(ci): pass branch name to SonarQube scan ([8cc39db](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8cc39db))
|
|
131
|
+
* fix(ci): resolve SonarQube workflow issues (v5→v6, reusability, race) ([a7e41e6](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a7e41e6))
|
|
132
|
+
* fix(detail): fixed missing id in query key ([f969487](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/f969487))
|
|
133
|
+
* fix(fonts): resolve @fontsource path issues in Module Federation ([193357e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/193357e))
|
|
134
|
+
* fix(home): apply MovieHero gradient and positioning to HeroSection ([4d31ca0](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4d31ca0))
|
|
135
|
+
* fix(host): add health endpoints to remotes and restore prod health checks ([18f048c](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/18f048c))
|
|
136
|
+
* fix(host): use no-cors mode in health check to bypass CORS restrictions ([9244398](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/9244398))
|
|
137
|
+
* fix(host): use remoteEntry.js for health checks instead of /health endpoint ([44ccb06](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/44ccb06))
|
|
138
|
+
* fix(images): prioritize hero images, defer carousel posters ([77222ca](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/77222ca))
|
|
139
|
+
* fix(media): remove unnecessary String() conversion in useTVSeriesSimilar hook ([894cbf7](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/894cbf7))
|
|
140
|
+
* fix(media): use correct types for RecommendedSection carousels ([afb5000](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/afb5000))
|
|
141
|
+
* fix(mf): upgrade to v1.11.0 and migrate to createInstance API ([ee8092e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/ee8092e))
|
|
142
|
+
* fix(netlify): escape regex dots in Image CDN remote_images config ([8411534](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8411534))
|
|
143
|
+
* fix(shared): replace recommendations mock data with real TMDB data ([2e55b6e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/2e55b6e))
|
|
144
|
+
* fix(shared): route Netlify Image CDN via environment variable ([a36509e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a36509e))
|
|
145
|
+
* fix(ui): carousel last pagination button scrolls to absolute end ([0a50d84](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/0a50d84))
|
|
146
|
+
* fix(ui): export ImageLoading type from Image component ([1e21766](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1e21766))
|
|
147
|
+
* fix(ui): resolve image opacity bug in carousels ([469c5ea](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/469c5ea))
|
|
148
|
+
* fix(ui): use aspect-video for responsive YouTube iframe in TrailerCard (#3) ([8390486](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8390486)), closes [#3](https://github.com/fubaritico/vite-mf-monorepo-tmdb/issues/3)
|
|
149
|
+
* ci: add GitHub Actions workflows for linting, testing, and quality gates ([3363e0f](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/3363e0f))
|
|
150
|
+
* ci: add SonarQube integration and Netlify deployment automation ([dbe7905](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/dbe7905))
|
|
151
|
+
* ci: refactor CI/CD pipeline with unified validate workflow ([a635a49](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a635a49))
|
|
152
|
+
* ci: test netlify build hook integration ([2f3a715](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/2f3a715))
|
|
153
|
+
* ci: test netlify build hook integration ([8d31959](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8d31959))
|
|
154
|
+
* ci(validation): added code lint and type check git worflow ([a676516](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a676516))
|
|
155
|
+
* test: add comprehensive test suite reaching 90% coverage ([757a876](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/757a876))
|
|
156
|
+
* test: scoped build in netlify ([e0c52c5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e0c52c5))
|
|
157
|
+
* test: scoped build in netlify undo ([92138f9](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/92138f9))
|
|
158
|
+
* test(setup): set environment test for the project with vitest and testing library ([1b1287c](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1b1287c))
|
|
159
|
+
* chore: added start session skill to claude ([8618c4d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8618c4d))
|
|
160
|
+
* chore: generated types ([508fc49](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/508fc49))
|
|
161
|
+
* chore: improve dev script with watch support for shared and ui ([b5508e8](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/b5508e8))
|
|
162
|
+
* chore: update .windsurfrules with current project state ([e879115](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e879115))
|
|
163
|
+
* chore: updated react from 19.0.0 to 19.1.0 ([5ab9f01](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/5ab9f01))
|
|
164
|
+
* chore(cleaning): remove typos an consoles ([3935c3a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/3935c3a))
|
|
165
|
+
* chore(code): removed dead code and unused imports ([50c9732](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/50c9732))
|
|
166
|
+
* chore(deps): centralize fontsource packages in pnpm catalog ([49a7175](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/49a7175))
|
|
167
|
+
* chore(deps): remove husky for simplified commit process ([208474d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/208474d))
|
|
168
|
+
* chore(deps): update react-router to fix vulnerabilities ([01fccb2](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/01fccb2))
|
|
169
|
+
* chore(http-client): upgrade @hey-api/openapi-ts to v0.92.3 ([d421c97](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/d421c97))
|
|
170
|
+
* chore(netlify): enable Image CDN for remote TMDB images ([70710c3](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/70710c3))
|
|
171
|
+
* chore(node): configure project to use Node.js LTS version ([a0903ba](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a0903ba))
|
|
172
|
+
* chore(node): update to Node.js v22 and verify application startup ([55da4d5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/55da4d5))
|
|
173
|
+
* chore(project): made shared deps and remote consistent ([b80ef7b](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/b80ef7b))
|
|
174
|
+
* chore(project): setup working project architecture ([635d0c8](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/635d0c8))
|
|
175
|
+
* chore(readme): add issues section ([36fde18](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/36fde18))
|
|
176
|
+
* chore(rename): rename project before pushing to git ([3df9909](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/3df9909))
|
|
177
|
+
* chore(scripts): remove unused scripts ([db9ec20](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/db9ec20))
|
|
178
|
+
* refactor: centralize test utilities in shared package ([4058ac6](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4058ac6))
|
|
179
|
+
* refactor: move list and detail from packages/ to apps/ ([0459ce1](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/0459ce1))
|
|
180
|
+
* refactor: rename detail remote to movie ([76f18f8](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/76f18f8))
|
|
181
|
+
* refactor: rename list remote to home ([8c1cdf5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/8c1cdf5))
|
|
182
|
+
* refactor: rename list→home, detail→movie + fix vitest hanging ([532eb9e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/532eb9e))
|
|
183
|
+
* refactor: rename movie package to media and add TV series support ([c8251f5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/c8251f5))
|
|
184
|
+
* refactor: simplify remotes and centralize env config ([40f1d37](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/40f1d37))
|
|
185
|
+
* refactor(fonts): remove Press Start 2P dependency, keep preload optimization ([6cbfa7a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/6cbfa7a))
|
|
186
|
+
* refactor(home): extract hero image logic to HeroImage component ([aebf608](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/aebf608))
|
|
187
|
+
* refactor(media): remove tabs from SimilarSection and add empty state messages ([1c15ccd](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1c15ccd))
|
|
188
|
+
* refactor(media): simplify RecommendedSection to show only context media type ([e5f4520](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e5f4520))
|
|
189
|
+
* refactor(shared): centralize mocks and fix import.meta.env typing ([bbbc45f](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/bbbc45f))
|
|
190
|
+
* refactor(shared): move getBlurDataUrl utility from ui to shared package ([985022b](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/985022b))
|
|
191
|
+
* refactor(ui): created common component HeroImage for Hero sections ([ddb60ca](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/ddb60ca))
|
|
192
|
+
* refactor(ui): transform Tabs to Compound Component pattern ([4ced714](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4ced714))
|
|
193
|
+
* perf(build): enable terser minification across all remotes ([a21ffe3](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a21ffe3))
|
|
194
|
+
* perf(home): compress hero images with quality reduction and size optimization ([1f8f23f](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1f8f23f))
|
|
195
|
+
* perf(home): corrected home images size ([448ffaf](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/448ffaf))
|
|
196
|
+
* perf(home): corrected home images size and compress ([24a97a5](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/24a97a5))
|
|
197
|
+
* perf(home): lazy-load below-fold sections with React.lazy + Suspense ([7a8e8ca](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/7a8e8ca))
|
|
198
|
+
* perf(home): lazy-load PopularSection, revert TrendingSection to static ([86b6a9b](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/86b6a9b))
|
|
199
|
+
* perf(host): include main css in asset preload patterns ([a758870](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/a758870))
|
|
200
|
+
* perf(host): parallelize critical asset loading with dynamic preload injection ([06e3da0](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/06e3da0))
|
|
201
|
+
* perf(images): conditionally route to Netlify Image CDN based on environment ([0844091](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/0844091))
|
|
202
|
+
* perf(images): enable lazy loading for carousel posters and hero backdrops ([1a02e2c](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/1a02e2c))
|
|
203
|
+
* perf(images): enable netlify image optimization for automatic format conversion ([e257064](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/e257064))
|
|
204
|
+
* perf(images): implement responsive backdrops with picture element media queries ([ca8e1c8](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/ca8e1c8))
|
|
205
|
+
* perf(images): optimize image loading and sizing for viewport + network performance ([f27ac6e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/f27ac6e))
|
|
206
|
+
* perf(images): route TMDB images through Netlify Image CDN for format conversion ([9fd553e](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/9fd553e))
|
|
207
|
+
* perf(media): lazy-load below-fold sections with React.lazy + Suspense ([2685717](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/2685717))
|
|
208
|
+
* perf(media): preload for remoteentry.js files ([d37b940](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/d37b940))
|
|
209
|
+
* perf(media): removed lazy completely in media ([4d3ff77](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/4d3ff77))
|
|
210
|
+
* perf(media): removed remote health check ([ffb570a](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/ffb570a))
|
|
211
|
+
* perf(network): add preconnect hints for TMDB origins ([26f5af9](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/26f5af9))
|
|
212
|
+
* perf(shared): add width resizing and automatic format negotiation to Netlify Image CDN ([618746d](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/618746d))
|
|
213
|
+
* styles: migrated host styles to tailwind ([ce00be2](https://github.com/fubaritico/vite-mf-monorepo-tmdb/commit/ce00be2))
|
|
214
|
+
|
|
215
|
+
### BREAKING CHANGE
|
|
216
|
+
|
|
217
|
+
* Home remote now uses hm: prefix for all Tailwind classes
|
|
218
|
+
* New compositional API
|
|
219
|
+
|
|
220
|
+
Before: <Tabs items={[...]} activeTab="tab1" onChange={fn} />
|
|
221
|
+
After:
|
|
222
|
+
<Tabs value="tab1" onValueChange={fn}>
|
|
223
|
+
<Tabs.List>
|
|
224
|
+
<Tabs.Trigger value="tab1">Tab 1</Tabs.Trigger>
|
|
225
|
+
</Tabs.List>
|
|
226
|
+
</Tabs>
|
|
227
|
+
|
|
228
|
+
- Add Tabs.List and Tabs.Trigger sub-components
|
|
229
|
+
- Remove items prop
|
|
230
|
+
- Rename activeTab→value, onChange→onValueChange
|
|
231
|
+
- Add keyboard navigation skip for disabled tabs
|
|
232
|
+
- Fix icon alignment and react-refresh warnings
|
|
233
|
+
* Remove explicit return types from
|
|
234
|
+
usePopularMovies/usePopularTV
|
|
235
|
+
|
|
236
|
+
- Create CarouselLoading component (packages/ui) with props:
|
|
237
|
+
count, cardWidth, cardHeight, showTitle, showSubtitle
|
|
238
|
+
- Fix TMDBError typing: remove explicit return types from hooks,
|
|
239
|
+
add type assertion in components
|
|
240
|
+
- Use pattern: if (isLoading) return <CarouselLoading count={6} />
|
|
241
|
+
- Fix type narrowing: use 'if (error || instead of
|
|
242
|
+
'typeof error !== undefined'
|
|
243
|
+
- Rename usePopular.test.tsx → usePopularMovies.test.tsx
|
|
244
|
+
- Update test endpoint: /movie/popular
|
|
245
|
+
- Remove type annotations from popularData.ts mocks
|
|
246
|
+
- Delete .npmrc (hoisting not needed)
|
|
247
|
+
- Move errorMessage check after hooks in Carousel.tsx
|
|
248
|
+
- Format code with Prettier
|
|
249
|
+
|
|
250
|
+
1 created, 8 modified, 1 renamed, 1 deleted
|
|
251
|
+
* TypeScript type generation/consumption is temporarily disabled.
|
|
252
|
+
The integrated DTS in @module-federation/vite 1.11.0+ requires
|
|
253
|
+
@module-federation/dts-plugin which has compatibility issues.
|
|
254
|
+
This will be addressed in a future commit.
|
|
255
|
+
|
|
256
|
+
Fixes the 'Please call init first' error on initial dev load.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Fubaritico
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# @fubar-it-co/tmdb-client
|
|
2
|
+
|
|
3
|
+
TMDB API HTTP client generated with [heyAPI](https://heyapi.dev) from the official [OpenAPI specification](https://developer.themoviedb.org/openapi/tmdb-api.json).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Type-safe**: All endpoints and responses are fully typed
|
|
8
|
+
- **TanStack Query integration**: Generated query options for React Query
|
|
9
|
+
- **Fetch API**: Lightweight client based on native Fetch API
|
|
10
|
+
- **Auto-generated**: Regenerate anytime with `pnpm generate`
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
This package is part of the monorepo. Dependencies are managed at the workspace level.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm install
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
### SDK Functions
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import { moviePopularList, movieDetails } from '@fubar-it-co/tmdb-client'
|
|
26
|
+
|
|
27
|
+
// Get popular movies
|
|
28
|
+
const { data } = await moviePopularList({ query: { page: 1 } })
|
|
29
|
+
|
|
30
|
+
// Get movie details
|
|
31
|
+
const { data: movie } = await movieDetails({ path: { movie_id: 550 } })
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### With TanStack Query
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { useQuery } from '@tanstack/react-query'
|
|
38
|
+
import { moviePopularListOptions, movieDetailsOptions } from '@fubar-it-co/tmdb-client'
|
|
39
|
+
|
|
40
|
+
// In a React component
|
|
41
|
+
const { data, isLoading } = useQuery(moviePopularListOptions({ query: { page: 1 } }))
|
|
42
|
+
|
|
43
|
+
const { data: movie } = useQuery(movieDetailsOptions({ path: { movie_id: 550 } }))
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Configuration
|
|
47
|
+
|
|
48
|
+
The client is configured in `src/tmdb-config.ts`:
|
|
49
|
+
|
|
50
|
+
- **Base URL**: `https://api.themoviedb.org`
|
|
51
|
+
- **Authentication**: Bearer token from `VITE_TMDB_API_TOKEN` environment variable
|
|
52
|
+
|
|
53
|
+
### Environment Variables
|
|
54
|
+
|
|
55
|
+
Create a `.env.local` file at the monorepo root:
|
|
56
|
+
|
|
57
|
+
```env
|
|
58
|
+
VITE_TMDB_API_TOKEN=your_tmdb_bearer_token_here
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Regenerating the Client
|
|
62
|
+
|
|
63
|
+
If the TMDB OpenAPI spec changes, regenerate the client:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pnpm --filter @fubar-it-co/tmdb-client generate
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## File Structure
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
packages/http-client/
|
|
73
|
+
├── src/
|
|
74
|
+
│ ├── client/ # Generated by heyAPI (do not edit)
|
|
75
|
+
│ │ ├── client.gen.ts # HTTP client instance
|
|
76
|
+
│ │ ├── sdk.gen.ts # SDK functions
|
|
77
|
+
│ │ ├── types.gen.ts # TypeScript types
|
|
78
|
+
│ │ └── tanstack-query.gen.ts # TanStack Query options
|
|
79
|
+
│ ├── tmdb-config.ts # Runtime configuration (auth, baseUrl)
|
|
80
|
+
│ └── index.ts # Package entry point
|
|
81
|
+
├── openapi-ts.config.ts # heyAPI configuration
|
|
82
|
+
├── package.json
|
|
83
|
+
└── tsconfig.json
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Publishing
|
|
87
|
+
|
|
88
|
+
### Local testing with Verdaccio
|
|
89
|
+
|
|
90
|
+
Start Verdaccio (one-time global install):
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
npm install -g verdaccio
|
|
94
|
+
verdaccio
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
First time only — register on local Verdaccio (saves token in `.npmrc`):
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
cd packages/http-client
|
|
101
|
+
npm adduser --registry http://localhost:4873/ --userconfig ../../.npmrc
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Then publish to Verdaccio:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
./packages/http-client/publish-local.sh patch
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Publish to npm
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
./packages/http-client/publish.sh patch
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Requires `NPM_TOKEN` in `.env` at the monorepo root.
|
|
117
|
+
|
|
118
|
+
## Links
|
|
119
|
+
|
|
120
|
+
- [TMDB API Documentation](https://developer.themoviedb.org/docs)
|
|
121
|
+
- [heyAPI Documentation](https://heyapi.dev)
|
|
122
|
+
- [TanStack Query](https://tanstack.com/query)
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ESLint configuration for http-client package.
|
|
3
|
+
*
|
|
4
|
+
* Generated client files in src/client/ are ignored via .eslintignore.
|
|
5
|
+
*/
|
|
6
|
+
import js from '@eslint/js'
|
|
7
|
+
import tseslint from 'typescript-eslint'
|
|
8
|
+
|
|
9
|
+
export default tseslint.config(
|
|
10
|
+
js.configs.recommended,
|
|
11
|
+
...tseslint.configs.recommended,
|
|
12
|
+
{
|
|
13
|
+
ignores: ['src/client/**'],
|
|
14
|
+
}
|
|
15
|
+
)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview heyAPI OpenAPI-to-TypeScript configuration.
|
|
3
|
+
*
|
|
4
|
+
* This configuration file tells heyAPI how to generate the TMDB API client.
|
|
5
|
+
*
|
|
6
|
+
* ## Generated files (in `./src/client/`):
|
|
7
|
+
* - `types.gen.ts` - TypeScript interfaces for all API types
|
|
8
|
+
* - `sdk.gen.ts` - SDK functions for each API endpoint
|
|
9
|
+
* - `client.gen.ts` - HTTP client instance
|
|
10
|
+
* - `tanstack-query.gen.ts` - TanStack Query options and hooks
|
|
11
|
+
*
|
|
12
|
+
* ## Plugins used:
|
|
13
|
+
* - `@hey-api/typescript` - Generates TypeScript types from OpenAPI schemas
|
|
14
|
+
* - `@hey-api/sdk` - Generates SDK functions (e.g., `moviePopularList()`)
|
|
15
|
+
* - `@hey-api/client-fetch` - Fetch API-based HTTP client
|
|
16
|
+
* - `@tanstack/react-query` - TanStack Query integration
|
|
17
|
+
*
|
|
18
|
+
* ## Usage:
|
|
19
|
+
* Run `pnpm generate` to regenerate the client after OpenAPI spec changes.
|
|
20
|
+
*
|
|
21
|
+
* @see https://heyapi.dev/openapi-ts/configuration
|
|
22
|
+
*/
|
|
23
|
+
import { defineConfig } from '@hey-api/openapi-ts'
|
|
24
|
+
|
|
25
|
+
export default defineConfig({
|
|
26
|
+
input: 'https://developer.themoviedb.org/openapi/tmdb-api.json',
|
|
27
|
+
output: {
|
|
28
|
+
path: './src/client',
|
|
29
|
+
},
|
|
30
|
+
plugins: [
|
|
31
|
+
'@hey-api/typescript',
|
|
32
|
+
'@hey-api/sdk',
|
|
33
|
+
{
|
|
34
|
+
name: '@hey-api/client-fetch',
|
|
35
|
+
runtimeConfigPath: '../tmdb-config.ts',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: '@tanstack/react-query',
|
|
39
|
+
queryOptions: true,
|
|
40
|
+
mutationOptions: true,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fubar-it-co/tmdb-client",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"description": "TMDB API client generated with heyAPI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"import": "./dist/client/index.js",
|
|
15
|
+
"types": "./dist/client/index.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "private"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"clean": "rm -rf dist",
|
|
23
|
+
"lint": "eslint . --max-warnings 0",
|
|
24
|
+
"generate": "openapi-ts && node scripts/add-ts-nocheck.js && eslint src --fix",
|
|
25
|
+
"build": "pnpm clean && pnpm generate && tsc -p tsconfig.build.json",
|
|
26
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
27
|
+
"local-release:patch": "pnpm build && ./publish-local.sh patch",
|
|
28
|
+
"local-release:minor": "pnpm build && ./publish-local.sh minor",
|
|
29
|
+
"local-release:major": "pnpm build && ./publish-local.sh major",
|
|
30
|
+
"release:patch": "pnpm build && ./publish.sh patch",
|
|
31
|
+
"release:minor": "pnpm build && ./publish.sh minor",
|
|
32
|
+
"release:major": "pnpm build && ./publish.sh major"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@tanstack/react-query": "catalog:"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"conventional-changelog": "catalog:",
|
|
39
|
+
"@eslint/js": "catalog:",
|
|
40
|
+
"@hey-api/openapi-ts": "^0.92.3",
|
|
41
|
+
"eslint": "^9.0.0",
|
|
42
|
+
"typescript": "catalog:",
|
|
43
|
+
"typescript-eslint": "catalog:",
|
|
44
|
+
"vite": "catalog:"
|
|
45
|
+
}
|
|
46
|
+
}
|
package/publish-local.sh
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Set default version type to patch if not provided
|
|
4
|
+
VERSION_TYPE="${1:-patch}"
|
|
5
|
+
|
|
6
|
+
# Validate version type argument
|
|
7
|
+
if [[ ! "$VERSION_TYPE" =~ ^(patch|minor|major)$ ]]; then
|
|
8
|
+
echo -e "\033[0;31mError: Invalid version type. Must be one of: patch, minor, major\033[0m"
|
|
9
|
+
exit 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
RED='\033[0;31m'
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
YELLOW='\033[1;33m'
|
|
15
|
+
NC='\033[0m'
|
|
16
|
+
|
|
17
|
+
log() {
|
|
18
|
+
echo -e "${2:-$GREEN}$1${NC}"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
check_status() {
|
|
22
|
+
if [ $? -eq 0 ]; then
|
|
23
|
+
log "✓ $1 completed successfully"
|
|
24
|
+
else
|
|
25
|
+
log "✗ $1 failed" "$RED"
|
|
26
|
+
exit 1
|
|
27
|
+
fi
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
log "Checking if Verdaccio is running..." "$YELLOW"
|
|
31
|
+
curl -s http://localhost:4873 > /dev/null
|
|
32
|
+
if [ $? -ne 0 ]; then
|
|
33
|
+
log "Verdaccio is not running on localhost:4873" "$RED"
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
check_status "Verdaccio connection"
|
|
37
|
+
|
|
38
|
+
# Go to package directory first
|
|
39
|
+
cd "$(dirname "$0")" || exit 1
|
|
40
|
+
|
|
41
|
+
# Load token from .env
|
|
42
|
+
if [ -f ../../.env ]; then
|
|
43
|
+
export $(cat ../../.env | grep -v '^#' | xargs)
|
|
44
|
+
else
|
|
45
|
+
log ".env has not been found"
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
if [ -z "$VERDACCIO_TOKEN" ]; then
|
|
49
|
+
log "VERDACCIO_TOKEN not set in .env" "$RED"
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Create .npmrc with token
|
|
54
|
+
log "Configuring npm authentication..." "$YELLOW"
|
|
55
|
+
cat > .npmrc << EOL
|
|
56
|
+
//localhost:4873/:_authToken="$VERDACCIO_TOKEN"
|
|
57
|
+
registry=http://localhost:4873/
|
|
58
|
+
EOL
|
|
59
|
+
check_status "NPM authentication"
|
|
60
|
+
|
|
61
|
+
log "Building package..." "$YELLOW"
|
|
62
|
+
pnpm build
|
|
63
|
+
check_status "Build"
|
|
64
|
+
|
|
65
|
+
#log "Creating new version..." "$YELLOW"
|
|
66
|
+
#pnpm version "$VERSION_TYPE"
|
|
67
|
+
#check_status "Version bump"
|
|
68
|
+
|
|
69
|
+
log "Publishing to Verdaccio..." "$YELLOW"
|
|
70
|
+
npm publish --userconfig .npmrc
|
|
71
|
+
check_status "Publish"
|
|
72
|
+
|
|
73
|
+
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
74
|
+
|
|
75
|
+
log "Creating git tag..." "$YELLOW"
|
|
76
|
+
git tag -a "http-client-v${CURRENT_VERSION}" -m "http-client Version ${CURRENT_VERSION}" || true
|
|
77
|
+
check_status "Tag creation"
|
|
78
|
+
|
|
79
|
+
#log "Creating git tag..." "$YELLOW"
|
|
80
|
+
#git tag -a "http-client-v${CURRENT_VERSION}" -m "http-client Version ${CURRENT_VERSION}" || true
|
|
81
|
+
#check_status "Tag creation"
|
|
82
|
+
|
|
83
|
+
log "🎉 Package published! Version: ${CURRENT_VERSION}" "$GREEN"
|
|
84
|
+
|
|
85
|
+
# Cleanup
|
|
86
|
+
rm -f .npmrc
|