From d2e4f65ded60859b0967a006f616e8d597a9b9ec Mon Sep 17 00:00:00 2001 From: Boris Yakubchik Date: Tue, 5 Apr 2022 13:54:04 -0400 Subject: [PATCH 1/2] VSCode works, npm start does not --- package.json | 2 -- src/app/app.module.ts | 12 +++++++----- src/app/common/app-state.ts | 2 +- src/app/components/home.component.ts | 16 +++++++++------- .../sort-order/sort-order.component.ts | 5 +++-- src/app/pipes/index.ts | 9 +++++++++ tsconfig.json | 3 +++ 7 files changed, 32 insertions(+), 17 deletions(-) create mode 100644 src/app/pipes/index.ts diff --git a/package.json b/package.json index 16294dcb..1e103204 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,6 @@ "build": "npm run electron:serve-tsc && ng build --base-href ./", "build:prod": "npm run build -- -c production", "buildsize": "sh ./bin/buildSizeCheck.sh", - "check": "npm run check:tsc && npm run check:lint", - "check:lint": "tslint --project ./tsconfig.json && tslint --project ./tsconfig-serve.json && tslint --project ./tsconfig.worker.json", "check:tsc": "tsc --project ./tsconfig.json --noEmit && tsc --project ./tsconfig-serve.json --noEmit && tsc --project ./tsconfig.worker.json --noEmit", "hasRemote": "sh ./bin/hasRemoteCheck.sh", "electron": "npm run hasRemote && npm run build:prod && electron-builder build && npm run buildsize", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f1a1af81..f9e1aaed 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -26,13 +26,15 @@ import { HomeComponent } from './components/home.component'; import { ImageElementService } from './services/image-element.service'; import { ManualTagsService } from './components/tags-manual/manual-tags.service'; import { ModalService } from './components/modal/modal.service'; -import { PipeSideEffectService } from './pipes/pipe-side-effect.service'; -import { ResolutionFilterService } from './pipes/resolution-filter.service'; import { ShortcutsService } from './components/shortcuts/shortcuts.service'; -import { SimilarityService } from './pipes/similarity.service'; import { SourceFolderService } from './components/statistics/source-folder.service'; -import { StarFilterService } from './pipes/star-filter.service'; -import { WordFrequencyService } from './pipes/word-frequency.service'; + +// Pipe Services +import { PipeSideEffectService } from '@pipes'; +import { ResolutionFilterService } from '@pipes'; +import { SimilarityService } from '@pipes'; +import { StarFilterService } from '@pipes'; +import { WordFrequencyService } from '@pipes'; // Components import { AddTagComponent } from './components/tags-manual/add-tag.component'; diff --git a/src/app/common/app-state.ts b/src/app/common/app-state.ts index 65455f9c..66768811 100644 --- a/src/app/common/app-state.ts +++ b/src/app/common/app-state.ts @@ -1,4 +1,4 @@ -import type { SortType } from '../pipes/sorting.pipe'; +import type { SortType } from '@pipes'; import type { SupportedView } from '../../../interfaces/shared-interfaces'; // Please conform the supported languages exactly to the first two characters from here: diff --git a/src/app/components/home.component.ts b/src/app/components/home.component.ts index d46fc589..32c4845d 100644 --- a/src/app/components/home.component.ts +++ b/src/app/components/home.component.ts @@ -16,12 +16,14 @@ import { FilePathService } from './views/file-path.service'; import { ImageElementService } from '../services/image-element.service'; import { ManualTagsService } from './tags-manual/manual-tags.service'; import { ModalService } from './modal/modal.service'; -import { PipeSideEffectService } from '../pipes/pipe-side-effect.service'; -import { ResolutionFilterService } from '../pipes/resolution-filter.service'; import { ShortcutsService, CustomShortcutAction } from './shortcuts/shortcuts.service'; import { SourceFolderService } from './statistics/source-folder.service'; -import { StarFilterService } from '../pipes/star-filter.service'; -import { WordFrequencyService, WordFreqAndHeight } from '../pipes/word-frequency.service'; + +// Pipe Services +import { PipeSideEffectService } from '@pipes'; +import { ResolutionFilterService } from '@pipes'; +import { StarFilterService } from '@pipes'; +import { WordFrequencyService, WordFreqAndHeight } from '@pipes'; // Components import { SortOrderComponent } from './sort-order/sort-order.component'; @@ -31,7 +33,9 @@ import type { FinalObject, ImageElement, ScreenshotSettings, ResolutionString } import type { ImportStage } from '../../../node/main-support'; import type { ServerDetails } from './statistics/statistics.component'; import type { RemoteSettings, SettingsButtonSavedProperties, SettingsObject } from '../../../interfaces/settings-object.interface'; -import type { SortType } from '../pipes/sorting.pipe'; +import type { SortType } from '@pipes'; +import type { SupportedLanguage, RowNumbers } from '../common/app-state'; +import type { SettingsButtonKey, SettingsButtonsType } from '../common/settings-buttons'; import type { WizardOptions } from '../../../interfaces/wizard-options.interface'; import type { HistoryItem, @@ -46,12 +50,10 @@ import { } from '../../../interfaces/shared-interfaces'; // Constants, etc -import type { SupportedLanguage, RowNumbers } from '../common/app-state'; import { AppState, DefaultImagesPerRow } from '../common/app-state'; import { Filters, filterKeyToIndex, FilterKeyNames } from '../common/filters'; import { GLOBALS } from '../../../node/main-globals'; import { LanguageLookup } from '../common/languages'; -import type { SettingsButtonKey, SettingsButtonsType } from '../common/settings-buttons'; import { SettingsButtons, SettingsButtonsGroups } from '../common/settings-buttons'; // Animations diff --git a/src/app/components/sort-order/sort-order.component.ts b/src/app/components/sort-order/sort-order.component.ts index 78374eb3..19b26fc8 100644 --- a/src/app/components/sort-order/sort-order.component.ts +++ b/src/app/components/sort-order/sort-order.component.ts @@ -1,10 +1,11 @@ import type { ElementRef} from '@angular/core'; import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core'; -import type { SortType } from '../../pipes/sorting.pipe'; -import { filterItemAppear } from '../../common/animations'; +import type { SortType } from '@pipes'; import type { SettingsButtonsType } from '../../common/settings-buttons'; +import { filterItemAppear } from '../../common/animations'; + @Component({ selector: 'app-sort-order', templateUrl: './sort-order.component.html', diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts new file mode 100644 index 00000000..38c74575 --- /dev/null +++ b/src/app/pipes/index.ts @@ -0,0 +1,9 @@ +// Services +export { PipeSideEffectService } from './pipe-side-effect.service'; +export { ResolutionFilterService } from './resolution-filter.service'; +export { StarFilterService } from './star-filter.service'; +export { WordFrequencyService, WordFreqAndHeight} from './word-frequency.service'; +export { SimilarityService } from './similarity.service'; + +// Interfaces +export { SortType } from './sorting.pipe'; diff --git a/tsconfig.json b/tsconfig.json index e4e185bf..94dfdeab 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,6 +4,9 @@ "strictTemplates": true }, "compilerOptions": { + "paths": { + "@pipes": ["src/app/pipes"] + }, "baseUrl": "", "declaration": false, "experimentalDecorators": true, From 540a6725f443a54a201d95b70080716d43420fd4 Mon Sep 17 00:00:00 2001 From: Boris Yakubchik Date: Tue, 5 Apr 2022 14:04:44 -0400 Subject: [PATCH 2/2] @my path for interfaces --- src/app/common/app-state.ts | 2 +- src/app/components/home.component.ts | 10 +++++----- src/app/components/meta/meta.component.ts | 4 ++-- .../components/rename-file/rename-file.component.ts | 4 ++-- .../components/rename-modal/rename-modal.component.ts | 4 ++-- src/app/components/sheet/sheet.component.ts | 4 ++-- .../components/similar-tray/similar-tray.component.ts | 2 +- src/app/components/statistics/source-folder.service.ts | 2 +- src/app/components/statistics/statistics.component.ts | 2 +- src/app/components/tag-tray/tag-tray.component.ts | 2 +- src/app/components/tags-auto/autotags.service.ts | 2 +- src/app/components/tags-auto/tag-display.pipe.ts | 4 ++-- src/app/components/tags-manual/manual-tags.service.ts | 2 +- src/app/components/tags-manual/view-tags.component.ts | 2 +- src/app/components/views/clip/clip.component.ts | 4 ++-- src/app/components/views/details/details.component.ts | 4 ++-- src/app/components/views/file-path.service.ts | 2 +- src/app/components/views/file/file.component.ts | 2 +- .../components/views/filmstrip/filmstrip.component.ts | 4 ++-- src/app/components/views/full/full.component.ts | 4 ++-- .../components/views/thumbnail/thumbnail.component.ts | 4 ++-- src/app/components/wizard/wizard.component.ts | 6 +++--- src/app/pipes/count.pipe.ts | 2 +- src/app/pipes/delete-file.pipe.ts | 2 +- src/app/pipes/duplicateFinder.pipe.ts | 2 +- src/app/pipes/file-search.pipe.ts | 2 +- src/app/pipes/file-size-filter.pipe.ts | 2 +- src/app/pipes/folder-view.pipe.ts | 4 ++-- src/app/pipes/fuzzy-search.pipe.ts | 2 +- src/app/pipes/hide-offline.pipe.ts | 2 +- src/app/pipes/length-filter.pipe.ts | 2 +- src/app/pipes/magic-search.pipe.ts | 2 +- src/app/pipes/pipe-side-effect.service.ts | 2 +- src/app/pipes/playlist.pipe.ts | 2 +- src/app/pipes/regex-search.pipe.ts | 2 +- src/app/pipes/resolution-filter.pipe.ts | 2 +- src/app/pipes/return-zero.pipe.ts | 2 +- src/app/pipes/similarity.pipe.ts | 2 +- src/app/pipes/sorting.pipe.ts | 2 +- src/app/pipes/star-filter.pipe.ts | 2 +- src/app/pipes/times-played-filter.pipe.ts | 2 +- src/app/pipes/word-frequency.pipe.ts | 2 +- src/app/pipes/year-filter.pipe.ts | 2 +- src/app/services/image-element.service.ts | 4 ++-- tsconfig.json | 3 ++- 45 files changed, 64 insertions(+), 63 deletions(-) diff --git a/src/app/common/app-state.ts b/src/app/common/app-state.ts index 66768811..4106841c 100644 --- a/src/app/common/app-state.ts +++ b/src/app/common/app-state.ts @@ -1,5 +1,5 @@ import type { SortType } from '@pipes'; -import type { SupportedView } from '../../../interfaces/shared-interfaces'; +import type { SupportedView } from '@my/shared-interfaces'; // Please conform the supported languages exactly to the first two characters from here: // https://github.com/electron/electron/blob/master/docs/api/locales.md diff --git a/src/app/components/home.component.ts b/src/app/components/home.component.ts index 32c4845d..1833fec9 100644 --- a/src/app/components/home.component.ts +++ b/src/app/components/home.component.ts @@ -29,25 +29,25 @@ import { WordFrequencyService, WordFreqAndHeight } from '@pipes'; import { SortOrderComponent } from './sort-order/sort-order.component'; // Interfaces -import type { FinalObject, ImageElement, ScreenshotSettings, ResolutionString } from '../../../interfaces/final-object.interface'; +import type { FinalObject, ImageElement, ScreenshotSettings, ResolutionString } from '@my/final-object.interface'; import type { ImportStage } from '../../../node/main-support'; import type { ServerDetails } from './statistics/statistics.component'; -import type { RemoteSettings, SettingsButtonSavedProperties, SettingsObject } from '../../../interfaces/settings-object.interface'; +import type { RemoteSettings, SettingsButtonSavedProperties, SettingsObject } from '@my/settings-object.interface'; import type { SortType } from '@pipes'; import type { SupportedLanguage, RowNumbers } from '../common/app-state'; import type { SettingsButtonKey, SettingsButtonsType } from '../common/settings-buttons'; -import type { WizardOptions } from '../../../interfaces/wizard-options.interface'; +import type { WizardOptions } from '@my/wizard-options.interface'; import type { HistoryItem, RemoteVideoClick, RenameFileResponse, SupportedTrayView, SupportedView, - VideoClickEmit} from '../../../interfaces/shared-interfaces'; + VideoClickEmit} from '@my/shared-interfaces'; import { AllSupportedBottomTrayViews, AllSupportedViews -} from '../../../interfaces/shared-interfaces'; +} from '@my/shared-interfaces'; // Constants, etc import { AppState, DefaultImagesPerRow } from '../common/app-state'; diff --git a/src/app/components/meta/meta.component.ts b/src/app/components/meta/meta.component.ts index 678a7e68..c24aa7f6 100644 --- a/src/app/components/meta/meta.component.ts +++ b/src/app/components/meta/meta.component.ts @@ -10,8 +10,8 @@ import { FilePathService } from '../views/file-path.service'; import { ImageElementService } from './../../services/image-element.service'; import { ManualTagsService } from '../tags-manual/manual-tags.service'; -import type { StarRating, ImageElement } from '../../../../interfaces/final-object.interface'; -import type { TagEmit, RenameFileResponse } from '../../../../interfaces/shared-interfaces'; +import type { StarRating, ImageElement } from '@my/final-object.interface'; +import type { TagEmit, RenameFileResponse } from '@my/shared-interfaces'; @Component({ selector: 'app-meta-item', diff --git a/src/app/components/rename-file/rename-file.component.ts b/src/app/components/rename-file/rename-file.component.ts index cb9aa4e0..fdff023b 100644 --- a/src/app/components/rename-file/rename-file.component.ts +++ b/src/app/components/rename-file/rename-file.component.ts @@ -7,8 +7,8 @@ import type { Observable, Subscription } from 'rxjs'; import { ElectronService } from '../../providers/electron.service'; import { FilePathService } from '../views/file-path.service'; -import type { ImageElement } from '../../../../interfaces/final-object.interface'; -import type { RenameFileResponse } from '../../../../interfaces/shared-interfaces'; +import type { ImageElement } from '@my/final-object.interface'; +import type { RenameFileResponse } from '@my/shared-interfaces'; @Component({ selector: 'app-rename-file', diff --git a/src/app/components/rename-modal/rename-modal.component.ts b/src/app/components/rename-modal/rename-modal.component.ts index 8ad800c1..785a4135 100644 --- a/src/app/components/rename-modal/rename-modal.component.ts +++ b/src/app/components/rename-modal/rename-modal.component.ts @@ -3,8 +3,8 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; import type { BehaviorSubject } from 'rxjs'; import type { AppStateInterface } from '../../common/app-state'; -import type { ImageElement } from '../../../../interfaces/final-object.interface'; -import type { RenameFileResponse } from '../../../../interfaces/shared-interfaces'; +import type { ImageElement } from '@my/final-object.interface'; +import type { RenameFileResponse } from '@my/shared-interfaces'; import type { SettingsButtonsType } from '../../common/settings-buttons'; @Component({ diff --git a/src/app/components/sheet/sheet.component.ts b/src/app/components/sheet/sheet.component.ts index d2a28fc1..2c3fe591 100644 --- a/src/app/components/sheet/sheet.component.ts +++ b/src/app/components/sheet/sheet.component.ts @@ -9,8 +9,8 @@ import { FilePathService } from '../views/file-path.service'; import { ImageElementService } from './../../services/image-element.service'; import { ManualTagsService } from '../tags-manual/manual-tags.service'; -import type { StarRating, ImageElement } from '../../../../interfaces/final-object.interface'; -import type { TagEmit, RenameFileResponse } from '../../../../interfaces/shared-interfaces'; +import type { StarRating, ImageElement } from '@my/final-object.interface'; +import type { TagEmit, RenameFileResponse } from '@my/shared-interfaces'; import { metaAppear, textAppear, modalAnimation } from '../../common/animations'; diff --git a/src/app/components/similar-tray/similar-tray.component.ts b/src/app/components/similar-tray/similar-tray.component.ts index a6928775..4dd6f3f8 100644 --- a/src/app/components/similar-tray/similar-tray.component.ts +++ b/src/app/components/similar-tray/similar-tray.component.ts @@ -3,7 +3,7 @@ import { Component, Input, EventEmitter, Output } from '@angular/core'; import { ImageElementService } from './../../services/image-element.service'; import { SourceFolderService } from '../statistics/source-folder.service'; -import type { RightClickEmit } from '../../../../interfaces/shared-interfaces'; +import type { RightClickEmit } from '@my/shared-interfaces'; import type { SettingsButtonsType } from '../../common/settings-buttons'; import { modalAnimation, similarResultsText } from '../../common/animations'; diff --git a/src/app/components/statistics/source-folder.service.ts b/src/app/components/statistics/source-folder.service.ts index de86ec3d..22f79df3 100644 --- a/src/app/components/statistics/source-folder.service.ts +++ b/src/app/components/statistics/source-folder.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import type { InputSources } from '../../../../interfaces/final-object.interface'; +import type { InputSources } from '@my/final-object.interface'; export type InputSourceConnected = Record; // matches InputSources number, boolean represents if folder is connected diff --git a/src/app/components/statistics/statistics.component.ts b/src/app/components/statistics/statistics.component.ts index a559e26b..471b9c83 100644 --- a/src/app/components/statistics/statistics.component.ts +++ b/src/app/components/statistics/statistics.component.ts @@ -9,7 +9,7 @@ import { ImageElementService } from './../../services/image-element.service'; import { SourceFolderService } from './source-folder.service'; import type { AppStateInterface } from '../../common/app-state'; -import type { ImageElement, ScreenshotSettings, InputSources } from '../../../../interfaces/final-object.interface'; +import type { ImageElement, ScreenshotSettings, InputSources } from '@my/final-object.interface'; import { metaAppear, breadcrumbWordAppear } from '../../common/animations'; diff --git a/src/app/components/tag-tray/tag-tray.component.ts b/src/app/components/tag-tray/tag-tray.component.ts index 003c915f..86d9d901 100644 --- a/src/app/components/tag-tray/tag-tray.component.ts +++ b/src/app/components/tag-tray/tag-tray.component.ts @@ -3,7 +3,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; import { ManualTagsService } from '../tags-manual/manual-tags.service'; import type { AppStateInterface } from '../../common/app-state'; -import type { TagEmit } from '../../../../interfaces/shared-interfaces'; +import type { TagEmit } from '@my/shared-interfaces'; import { modalAnimation } from '../../common/animations'; import type { SettingsButtonsType } from '../../common/settings-buttons'; diff --git a/src/app/components/tags-auto/autotags.service.ts b/src/app/components/tags-auto/autotags.service.ts index 3a7a2e3e..6a11af45 100644 --- a/src/app/components/tags-auto/autotags.service.ts +++ b/src/app/components/tags-auto/autotags.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { AutoTagsSaveService } from './tags-save.service'; -import type { ImageElement } from '../../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; export interface WordAndFreq { word: string; diff --git a/src/app/components/tags-auto/tag-display.pipe.ts b/src/app/components/tags-auto/tag-display.pipe.ts index 15084cfc..e7ce44f6 100644 --- a/src/app/components/tags-auto/tag-display.pipe.ts +++ b/src/app/components/tags-auto/tag-display.pipe.ts @@ -4,8 +4,8 @@ import { Pipe } from '@angular/core'; import { autoFileTagsRegex } from './autotags.service'; import { Colors } from '../../common/colors'; -import type { ImageElement } from '../../../../interfaces/final-object.interface'; -import type { Tag } from '../../../../interfaces/shared-interfaces'; +import type { ImageElement } from '@my/final-object.interface'; +import type { Tag } from '@my/shared-interfaces'; @Pipe({ name: 'tagDisplayPipe' diff --git a/src/app/components/tags-manual/manual-tags.service.ts b/src/app/components/tags-manual/manual-tags.service.ts index 047f5f3c..7b00614a 100644 --- a/src/app/components/tags-manual/manual-tags.service.ts +++ b/src/app/components/tags-manual/manual-tags.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import type { ImageElement } from '../../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Injectable() export class ManualTagsService { diff --git a/src/app/components/tags-manual/view-tags.component.ts b/src/app/components/tags-manual/view-tags.component.ts index 9a1b5dd8..a96fdad5 100644 --- a/src/app/components/tags-manual/view-tags.component.ts +++ b/src/app/components/tags-manual/view-tags.component.ts @@ -3,7 +3,7 @@ import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core import { ManualTagsService } from './manual-tags.service'; -import type { Tag, TagEmit } from '../../../../interfaces/shared-interfaces'; +import type { Tag, TagEmit } from '@my/shared-interfaces'; @Component({ selector: 'app-view-tags-component', diff --git a/src/app/components/views/clip/clip.component.ts b/src/app/components/views/clip/clip.component.ts index 9b44ecc9..4f3452ec 100644 --- a/src/app/components/views/clip/clip.component.ts +++ b/src/app/components/views/clip/clip.component.ts @@ -5,8 +5,8 @@ import { DomSanitizer } from '@angular/platform-browser'; import { FilePathService } from '../file-path.service'; -import type { ImageElement } from '../../../../../interfaces/final-object.interface'; -import type { RightClickEmit, VideoClickEmit } from '../../../../../interfaces/shared-interfaces'; +import type { ImageElement } from '@my/final-object.interface'; +import type { RightClickEmit, VideoClickEmit } from '@my/shared-interfaces'; import { metaAppear, textAppear } from '../../../common/animations'; diff --git a/src/app/components/views/details/details.component.ts b/src/app/components/views/details/details.component.ts index 8cee6acf..d57255fe 100644 --- a/src/app/components/views/details/details.component.ts +++ b/src/app/components/views/details/details.component.ts @@ -7,8 +7,8 @@ import type { BehaviorSubject } from 'rxjs'; import { FilePathService } from '../file-path.service'; import { ManualTagsService } from '../../tags-manual/manual-tags.service'; -import type { StarRating, ImageElement } from '../../../../../interfaces/final-object.interface'; -import type { VideoClickEmit, RightClickEmit, TagEmit, RenameFileResponse } from '../../../../../interfaces/shared-interfaces'; +import type { StarRating, ImageElement } from '@my/final-object.interface'; +import type { VideoClickEmit, RightClickEmit, TagEmit, RenameFileResponse } from '@my/shared-interfaces'; export interface YearEmission { index: number; diff --git a/src/app/components/views/file-path.service.ts b/src/app/components/views/file-path.service.ts index 05cb97e0..0ef80ce3 100644 --- a/src/app/components/views/file-path.service.ts +++ b/src/app/components/views/file-path.service.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import { SourceFolderService } from '../statistics/source-folder.service'; -import type { ImageElement } from '../../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; type FolderType = 'thumbnails' | 'filmstrips' | 'clips'; diff --git a/src/app/components/views/file/file.component.ts b/src/app/components/views/file/file.component.ts index 28135a54..1094f24a 100644 --- a/src/app/components/views/file/file.component.ts +++ b/src/app/components/views/file/file.component.ts @@ -1,6 +1,6 @@ import { Component, Input } from '@angular/core'; -import type { ImageElement } from '../../../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Component({ selector: 'app-file-item', diff --git a/src/app/components/views/filmstrip/filmstrip.component.ts b/src/app/components/views/filmstrip/filmstrip.component.ts index 2507f579..4b4345d6 100644 --- a/src/app/components/views/filmstrip/filmstrip.component.ts +++ b/src/app/components/views/filmstrip/filmstrip.component.ts @@ -6,8 +6,8 @@ import { FilePathService } from '../file-path.service'; import { metaAppear, textAppear } from '../../../common/animations'; -import type { ImageElement } from '../../../../../interfaces/final-object.interface'; -import type { RightClickEmit, VideoClickEmit } from '../../../../../interfaces/shared-interfaces'; +import type { ImageElement } from '@my/final-object.interface'; +import type { RightClickEmit, VideoClickEmit } from '@my/shared-interfaces'; @Component({ selector: 'app-filmstrip-item', diff --git a/src/app/components/views/full/full.component.ts b/src/app/components/views/full/full.component.ts index 820d0555..85cb1bf6 100644 --- a/src/app/components/views/full/full.component.ts +++ b/src/app/components/views/full/full.component.ts @@ -6,8 +6,8 @@ import { FilePathService } from '../file-path.service'; import { metaAppear, textAppear } from '../../../common/animations'; -import type { ImageElement } from '../../../../../interfaces/final-object.interface'; -import type { RightClickEmit, VideoClickEmit } from '../../../../../interfaces/shared-interfaces'; +import type { ImageElement } from '@my/final-object.interface'; +import type { RightClickEmit, VideoClickEmit } from '@my/shared-interfaces'; @Component({ selector: 'app-full-item', diff --git a/src/app/components/views/thumbnail/thumbnail.component.ts b/src/app/components/views/thumbnail/thumbnail.component.ts index f9320434..124b908d 100644 --- a/src/app/components/views/thumbnail/thumbnail.component.ts +++ b/src/app/components/views/thumbnail/thumbnail.component.ts @@ -5,8 +5,8 @@ import { FilePathService } from '../file-path.service'; import { metaAppear, textAppear } from '../../../common/animations'; -import type { ImageElement } from '../../../../../interfaces/final-object.interface'; -import type { VideoClickEmit, RightClickEmit } from '../../../../../interfaces/shared-interfaces'; +import type { ImageElement } from '@my/final-object.interface'; +import type { VideoClickEmit, RightClickEmit } from '@my/shared-interfaces'; @Component({ selector: 'app-thumbnail', diff --git a/src/app/components/wizard/wizard.component.ts b/src/app/components/wizard/wizard.component.ts index 93871099..ad830ac7 100644 --- a/src/app/components/wizard/wizard.component.ts +++ b/src/app/components/wizard/wizard.component.ts @@ -1,9 +1,9 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; -import type { AllowedScreenshotHeight } from '../../../../interfaces/final-object.interface'; -import type { HistoryItem } from '../../../../interfaces/shared-interfaces'; +import type { AllowedScreenshotHeight } from '@my/final-object.interface'; +import type { HistoryItem } from '@my/shared-interfaces'; import type { ImportStage } from '../../../../node/main-support'; -import type { WizardOptions } from '../../../../interfaces/wizard-options.interface'; +import type { WizardOptions } from '@my/wizard-options.interface'; import { historyItemRemove, slowFadeIn } from '../../common/animations'; diff --git a/src/app/pipes/count.pipe.ts b/src/app/pipes/count.pipe.ts index 4ec03651..09dfdbfc 100644 --- a/src/app/pipes/count.pipe.ts +++ b/src/app/pipes/count.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { PipeSideEffectService } from './pipe-side-effect.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'countPipe' diff --git a/src/app/pipes/delete-file.pipe.ts b/src/app/pipes/delete-file.pipe.ts index b36cc2fa..c2bc4c03 100644 --- a/src/app/pipes/delete-file.pipe.ts +++ b/src/app/pipes/delete-file.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'deleteFilePipe' diff --git a/src/app/pipes/duplicateFinder.pipe.ts b/src/app/pipes/duplicateFinder.pipe.ts index 29f1006a..f4d67683 100644 --- a/src/app/pipes/duplicateFinder.pipe.ts +++ b/src/app/pipes/duplicateFinder.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { SortingPipe } from './sorting.pipe'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; type DupeType = 'length' | 'size' | 'hash'; type SortBy = 'timeDesc' | 'sizeDesc' | 'hash'; diff --git a/src/app/pipes/file-search.pipe.ts b/src/app/pipes/file-search.pipe.ts index 45689398..d2c718ca 100644 --- a/src/app/pipes/file-search.pipe.ts +++ b/src/app/pipes/file-search.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; type SearchType = 'folder' | 'file' | 'tag' | 'notes'; diff --git a/src/app/pipes/file-size-filter.pipe.ts b/src/app/pipes/file-size-filter.pipe.ts index 7c3b0dc8..4f7078e2 100644 --- a/src/app/pipes/file-size-filter.pipe.ts +++ b/src/app/pipes/file-size-filter.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'fileSizeFilterPipe' diff --git a/src/app/pipes/folder-view.pipe.ts b/src/app/pipes/folder-view.pipe.ts index 2a57d7c2..9c777020 100644 --- a/src/app/pipes/folder-view.pipe.ts +++ b/src/app/pipes/folder-view.pipe.ts @@ -1,8 +1,8 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement, StarRating} from '../../../interfaces/final-object.interface'; -import { NewImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement, StarRating} from '@my/final-object.interface'; +import { NewImageElement } from '@my/final-object.interface'; import type { SettingsButtonsType} from '../common/settings-buttons'; import { SettingsButtons } from '../common/settings-buttons'; diff --git a/src/app/pipes/fuzzy-search.pipe.ts b/src/app/pipes/fuzzy-search.pipe.ts index 363316c9..d62977e8 100644 --- a/src/app/pipes/fuzzy-search.pipe.ts +++ b/src/app/pipes/fuzzy-search.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; import Fuse from 'fuse.js'; diff --git a/src/app/pipes/hide-offline.pipe.ts b/src/app/pipes/hide-offline.pipe.ts index 191173db..81e122bb 100644 --- a/src/app/pipes/hide-offline.pipe.ts +++ b/src/app/pipes/hide-offline.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { SourceFolderService } from '../components/statistics/source-folder.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'hideOfflinePipe' diff --git a/src/app/pipes/length-filter.pipe.ts b/src/app/pipes/length-filter.pipe.ts index 6ad6bb18..f47e84a6 100644 --- a/src/app/pipes/length-filter.pipe.ts +++ b/src/app/pipes/length-filter.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'lengthFilterPipe' diff --git a/src/app/pipes/magic-search.pipe.ts b/src/app/pipes/magic-search.pipe.ts index 0ff74038..d30caf99 100644 --- a/src/app/pipes/magic-search.pipe.ts +++ b/src/app/pipes/magic-search.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'magicSearchPipe' diff --git a/src/app/pipes/pipe-side-effect.service.ts b/src/app/pipes/pipe-side-effect.service.ts index fa31d846..1b5d44ed 100644 --- a/src/app/pipes/pipe-side-effect.service.ts +++ b/src/app/pipes/pipe-side-effect.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Injectable() export class PipeSideEffectService { diff --git a/src/app/pipes/playlist.pipe.ts b/src/app/pipes/playlist.pipe.ts index 53adf459..c01869fc 100644 --- a/src/app/pipes/playlist.pipe.ts +++ b/src/app/pipes/playlist.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { PipeSideEffectService } from './pipe-side-effect.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'playlistPipe' diff --git a/src/app/pipes/regex-search.pipe.ts b/src/app/pipes/regex-search.pipe.ts index 3c770620..d1d85022 100644 --- a/src/app/pipes/regex-search.pipe.ts +++ b/src/app/pipes/regex-search.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { PipeSideEffectService } from './pipe-side-effect.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'regexSearchPipe' diff --git a/src/app/pipes/resolution-filter.pipe.ts b/src/app/pipes/resolution-filter.pipe.ts index 1fdbf45f..69ac9bae 100644 --- a/src/app/pipes/resolution-filter.pipe.ts +++ b/src/app/pipes/resolution-filter.pipe.ts @@ -2,7 +2,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; import { ResolutionFilterService } from './resolution-filter.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'resolutionFilterPipe' diff --git a/src/app/pipes/return-zero.pipe.ts b/src/app/pipes/return-zero.pipe.ts index 65113cf4..ba03097c 100644 --- a/src/app/pipes/return-zero.pipe.ts +++ b/src/app/pipes/return-zero.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'returnZeroPipe' diff --git a/src/app/pipes/similarity.pipe.ts b/src/app/pipes/similarity.pipe.ts index a2c4e874..4655cb29 100644 --- a/src/app/pipes/similarity.pipe.ts +++ b/src/app/pipes/similarity.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { SimilarityService } from './similarity.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'similarityPipe' diff --git a/src/app/pipes/sorting.pipe.ts b/src/app/pipes/sorting.pipe.ts index be314724..4cb32ada 100644 --- a/src/app/pipes/sorting.pipe.ts +++ b/src/app/pipes/sorting.pipe.ts @@ -1,6 +1,6 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement, StarRating } from '../../../interfaces/final-object.interface'; +import type { ImageElement, StarRating } from '@my/final-object.interface'; import { randomizeArray } from '../../../node/utility'; import { orderBy } from 'natural-orderby'; diff --git a/src/app/pipes/star-filter.pipe.ts b/src/app/pipes/star-filter.pipe.ts index cd0184e3..96f339d2 100644 --- a/src/app/pipes/star-filter.pipe.ts +++ b/src/app/pipes/star-filter.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { StarFilterService } from './star-filter.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'starFilterPipe' diff --git a/src/app/pipes/times-played-filter.pipe.ts b/src/app/pipes/times-played-filter.pipe.ts index ec7ba3ca..c28be9ea 100644 --- a/src/app/pipes/times-played-filter.pipe.ts +++ b/src/app/pipes/times-played-filter.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'timesPlayedFilterPipe' diff --git a/src/app/pipes/word-frequency.pipe.ts b/src/app/pipes/word-frequency.pipe.ts index 97acdc93..4f252c01 100644 --- a/src/app/pipes/word-frequency.pipe.ts +++ b/src/app/pipes/word-frequency.pipe.ts @@ -3,7 +3,7 @@ import { Pipe } from '@angular/core'; import { WordFrequencyService } from './word-frequency.service'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'wordFrequencyPipe' diff --git a/src/app/pipes/year-filter.pipe.ts b/src/app/pipes/year-filter.pipe.ts index aee847d7..52e2eaff 100644 --- a/src/app/pipes/year-filter.pipe.ts +++ b/src/app/pipes/year-filter.pipe.ts @@ -1,7 +1,7 @@ import type { PipeTransform } from '@angular/core'; import { Pipe } from '@angular/core'; -import type { ImageElement } from '../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; @Pipe({ name: 'yearFilterPipe' diff --git a/src/app/services/image-element.service.ts b/src/app/services/image-element.service.ts index 9b354c07..5722e2a6 100644 --- a/src/app/services/image-element.service.ts +++ b/src/app/services/image-element.service.ts @@ -1,6 +1,6 @@ -import type { TagEmission } from './../../../interfaces/shared-interfaces'; +import type { TagEmission } from '@my/shared-interfaces'; import type { YearEmission} from './../components/views/details/details.component'; -import type { ImageElement } from './../../../interfaces/final-object.interface'; +import type { ImageElement } from '@my/final-object.interface'; import { Injectable } from '@angular/core'; import type { DefaultScreenEmission, StarEmission } from '../components/sheet/sheet.component'; diff --git a/tsconfig.json b/tsconfig.json index 94dfdeab..fc7919c4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,8 @@ }, "compilerOptions": { "paths": { - "@pipes": ["src/app/pipes"] + "@pipes": ["src/app/pipes"], + "@my/*": ["interfaces/*"] }, "baseUrl": "", "declaration": false,