From 0dde2bc958dfa8e3efeb8aa6c748473b5bfb3bf3 Mon Sep 17 00:00:00 2001 From: Joery <44531907+Joery-M@users.noreply.github.com> Date: Thu, 11 Apr 2024 00:14:18 +0200 Subject: [PATCH] Fixed relative imports in shared --- packages/shared/src/Project/SimpleProject.ts | 6 +++--- packages/shared/src/Storage/IndexedDbStorage.ts | 10 +++++----- packages/shared/src/Storage/MediaManager.ts | 6 +++--- packages/shared/src/Storage/db.ts | 2 +- packages/shared/src/base/Storage.ts | 13 +++++++++---- packages/shared/src/base/TimelineItem.ts | 4 ++-- packages/shared/tsconfig.json | 5 ----- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/shared/src/Project/SimpleProject.ts b/packages/shared/src/Project/SimpleProject.ts index 4d5c2b6a..9b57cef9 100644 --- a/packages/shared/src/Project/SimpleProject.ts +++ b/packages/shared/src/Project/SimpleProject.ts @@ -1,8 +1,8 @@ -import SimpleTimeline from '@/Timeline/SimpleTimeline'; +import SimpleTimeline from '../Timeline/SimpleTimeline'; +import { v4 as uuidv4 } from 'uuid'; import { computed, ref, shallowReactive } from 'vue'; +import { default as BaseProject, type ProjectType } from '../base/Project'; import Media from '../Media/Media'; -import { v4 as uuidv4 } from 'uuid'; -import BaseProject, { type ProjectType } from '../base/Project'; export default class SimpleProject extends BaseProject { public id = uuidv4(); diff --git a/packages/shared/src/Storage/IndexedDbStorage.ts b/packages/shared/src/Storage/IndexedDbStorage.ts index f5dfe123..110c1243 100644 --- a/packages/shared/src/Storage/IndexedDbStorage.ts +++ b/packages/shared/src/Storage/IndexedDbStorage.ts @@ -1,8 +1,4 @@ -import BaseProject from '@/base/Project'; -import type BaseTimeline from '@/base/Timeline'; -import Media from '@/Media/Media'; -import SimpleProject from '@/Project/SimpleProject'; -import type SimpleTimeline from '@/Timeline/SimpleTimeline'; +import type BaseProject from '../base/Project'; import type { SaveResults, StorageControllerType, @@ -10,6 +6,10 @@ import type { StoredProject } from '../base/Storage'; import BaseStorageController from '../base/Storage'; +import type BaseTimeline from '../base/Timeline'; +import Media from '../Media/Media'; +import SimpleProject from '../Project/SimpleProject'; +import type SimpleTimeline from '../Timeline/SimpleTimeline'; import { SafelightIndexedDB } from './db'; export default class IndexedDbStorageController extends BaseStorageController { diff --git a/packages/shared/src/Storage/MediaManager.ts b/packages/shared/src/Storage/MediaManager.ts index 9f11ea26..cbdb254b 100644 --- a/packages/shared/src/Storage/MediaManager.ts +++ b/packages/shared/src/Storage/MediaManager.ts @@ -1,9 +1,9 @@ -import { Storage } from '@/base/Storage'; -import { generateMediaThumbnail } from '@/helpers/Video/GenerateMediaThumbnail'; -import { getVideoInfo } from '@/helpers/Video/GetVideoInfo'; import { createMD5 } from 'hash-wasm'; import { Observable } from 'rxjs'; import { v4 as uuidv4 } from 'uuid'; +import { Storage } from '../base/Storage'; +import { generateMediaThumbnail } from '../helpers/Video/GenerateMediaThumbnail'; +import { getVideoInfo } from '../helpers/Video/GetVideoInfo'; const chunkSize = 64 * 1024 * 1024; diff --git a/packages/shared/src/Storage/db.ts b/packages/shared/src/Storage/db.ts index 07485d8e..eeab657b 100644 --- a/packages/shared/src/Storage/db.ts +++ b/packages/shared/src/Storage/db.ts @@ -1,5 +1,5 @@ -import type { StoredMedia, StoredProject } from '@/base/Storage'; import Dexie, { type Table } from 'dexie'; +import type { StoredMedia, StoredProject } from '../base/Storage'; export class SafelightIndexedDB extends Dexie { media!: Table; diff --git a/packages/shared/src/base/Storage.ts b/packages/shared/src/base/Storage.ts index 9e838b00..f4c63602 100644 --- a/packages/shared/src/base/Storage.ts +++ b/packages/shared/src/base/Storage.ts @@ -1,9 +1,14 @@ -import type { AudioTrackInfo, ImageInfo, TextTrackInfo, VideoTrackInfo } from '@/Media/Media'; -import { type default as Media, type MediaType } from '@/Media/Media'; import type { MediaInfoType } from 'mediainfo.js'; +import type { + default as Media, + MediaType, + AudioTrackInfo, + ImageInfo, + TextTrackInfo, + VideoTrackInfo +} from '../Media/Media'; import type IndexedDbStorageController from '../Storage/IndexedDbStorage'; -import type BaseProject from './Project'; -import type { ProjectType } from './Project'; +import type { default as BaseProject, ProjectType } from './Project'; import type BaseTimeline from './Timeline'; import type { TimelineItemType } from './TimelineItem'; diff --git a/packages/shared/src/base/TimelineItem.ts b/packages/shared/src/base/TimelineItem.ts index 61375b75..de1cc201 100644 --- a/packages/shared/src/base/TimelineItem.ts +++ b/packages/shared/src/base/TimelineItem.ts @@ -1,5 +1,5 @@ -import type AudioTimelineItem from '@/TimelineItem/AudioTimelineItem'; -import type VideoTimelineItem from '@/TimelineItem/VideoTimelineItem'; +import type AudioTimelineItem from '../TimelineItem/AudioTimelineItem'; +import type VideoTimelineItem from '../TimelineItem/VideoTimelineItem'; import { v4 as uuidv4 } from 'uuid'; import { ref } from 'vue'; diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json index 80d2e20e..05a273a5 100644 --- a/packages/shared/tsconfig.json +++ b/packages/shared/tsconfig.json @@ -8,11 +8,6 @@ "verbatimModuleSyntax": true, "lib": ["DOM", "ESNext"], - "baseUrl": ".", - "paths": { - "@/*": ["./src/*"], - "$/*": ["./public/*"] - }, "allowSyntheticDefaultImports": true, "resolveJsonModule": true,