Fix TypeScript build errors for Docker deployment
- Add ImportMeta and ImportMetaEnv type declarations to env.d.ts - Fix typo: INDEEHHUB_API → INDEEDHUB_API in indeeHubApi.ts - Fix nostr-tools Filter type usage in subscribeToContent - Remove unused Filter import and userPrivkey parameter - Increase Workbox maximumFileSizeToCacheInBytes to 10MB for large images - Build now succeeds with 43 precached entries (81.98 MB) Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
14
src/env.d.ts
vendored
14
src/env.d.ts
vendored
@@ -1,5 +1,19 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import type { DefineComponent } from 'vue'
|
import type { DefineComponent } from 'vue'
|
||||||
const component: DefineComponent<{}, {}, any>
|
const component: DefineComponent<{}, {}, any>
|
||||||
export default component
|
export default component
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
readonly BASE_URL: string
|
||||||
|
readonly MODE: string
|
||||||
|
readonly DEV: boolean
|
||||||
|
readonly PROD: boolean
|
||||||
|
readonly SSR: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv
|
||||||
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export interface IndeeHubFilm {
|
|||||||
export async function fetchFilms(): Promise<IndeeHubFilm[]> {
|
export async function fetchFilms(): Promise<IndeeHubFilm[]> {
|
||||||
try {
|
try {
|
||||||
// TODO: Add authentication headers (NIP-98 for Nostr auth)
|
// TODO: Add authentication headers (NIP-98 for Nostr auth)
|
||||||
const response = await fetch(`${INDEEHHUB_API}/screening-room?type=film`, {
|
const response = await fetch(`${INDEEDHUB_API}/screening-room?type=film`, {
|
||||||
headers: {
|
headers: {
|
||||||
// Add your auth headers here
|
// Add your auth headers here
|
||||||
// 'Authorization': 'Bearer ...'
|
// 'Authorization': 'Bearer ...'
|
||||||
@@ -73,7 +73,7 @@ function getMockFilms(): IndeeHubFilm[] {
|
|||||||
*/
|
*/
|
||||||
export async function fetchFeaturedContent(): Promise<IndeeHubFilm | null> {
|
export async function fetchFeaturedContent(): Promise<IndeeHubFilm | null> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${INDEEHHUB_API}/featured`)
|
const response = await fetch(`${INDEEDHUB_API}/featured`)
|
||||||
if (!response.ok) return null
|
if (!response.ok) return null
|
||||||
return await response.json()
|
return await response.json()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -87,7 +87,7 @@ export async function fetchFeaturedContent(): Promise<IndeeHubFilm | null> {
|
|||||||
*/
|
*/
|
||||||
export async function fetchFilmsByCategory(category: string): Promise<IndeeHubFilm[]> {
|
export async function fetchFilmsByCategory(category: string): Promise<IndeeHubFilm[]> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${INDEEHHUB_API}/films?category=${category}`)
|
const response = await fetch(`${INDEEDHUB_API}/films?category=${category}`)
|
||||||
if (!response.ok) return []
|
if (!response.ok) return []
|
||||||
return await response.json()
|
return await response.json()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class NostrService {
|
|||||||
) {
|
) {
|
||||||
const sub = this.pool.subscribeMany(
|
const sub = this.pool.subscribeMany(
|
||||||
this.relays,
|
this.relays,
|
||||||
[{ kinds, limit: 10 }],
|
{ kinds, limit: 10 },
|
||||||
{
|
{
|
||||||
onevent(event) {
|
onevent(event) {
|
||||||
callback(event)
|
callback(event)
|
||||||
@@ -84,7 +84,7 @@ class NostrService {
|
|||||||
/**
|
/**
|
||||||
* Publish a view/watch event
|
* Publish a view/watch event
|
||||||
*/
|
*/
|
||||||
async publishView(videoEventId: string, userPrivkey: string) {
|
async publishView(videoEventId: string) {
|
||||||
// TODO: Implement NIP-XX for view tracking
|
// TODO: Implement NIP-XX for view tracking
|
||||||
console.log('Publishing view for:', videoEventId)
|
console.log('Publishing view for:', videoEventId)
|
||||||
}
|
}
|
||||||
|
|||||||
1
tsconfig.tsbuildinfo
Normal file
1
tsconfig.tsbuildinfo
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"root":["./src/env.d.ts","./src/main.ts","./src/composables/usemobile.ts","./src/data/indeehubfilms.ts","./src/router/index.ts","./src/stores/content.ts","./src/types/content.ts","./src/utils/indeehubapi.ts","./src/utils/nostr.ts","./src/app.vue","./src/components/contentrow.vue","./src/components/mobilenav.vue","./src/components/videoplayer.vue","./src/views/browse.vue"],"version":"5.9.3"}
|
||||||
@@ -27,6 +27,7 @@ export default defineConfig({
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
workbox: {
|
workbox: {
|
||||||
|
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10 MB limit
|
||||||
globPatterns: ['**/*.{js,css,html,ico,png,svg,jpg,jpeg,woff,woff2,otf}'],
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,jpg,jpeg,woff,woff2,otf}'],
|
||||||
runtimeCaching: [
|
runtimeCaching: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user