diff --git a/src/cli.ts b/src/cli.ts index 8d44f1d..dda8c75 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -3,12 +3,14 @@ Fairpost cli handler */ -import * as path from "path"; import "./bootstrap-cli"; + +import * as path from "path"; + import Fairpost from "./services/Fairpost"; import Logger from "./services/Logger"; -import { PostStatus } from "./models/Post"; import { PlatformId } from "./platforms"; +import { PostStatus } from "./models/Post"; // arguments const COMMAND = process.argv[2] ?? "help"; diff --git a/src/models/Feed.ts b/src/models/Feed.ts index 1e584f1..847b873 100644 --- a/src/models/Feed.ts +++ b/src/models/Feed.ts @@ -1,11 +1,12 @@ import * as fs from "fs"; + +import Folder from "./Folder"; import Logger from "../services/Logger"; -import Storage from "../services/Storage"; import Platform from "./Platform"; -import Folder from "./Folder"; +import { PlatformId } from "../platforms"; import Post from "./Post"; import { PostStatus } from "./Post"; -import { PlatformId } from "../platforms"; +import Storage from "../services/Storage"; /** * Feed - the core handler of fairpost diff --git a/src/models/Folder.ts b/src/models/Folder.ts index 0987069..747b11f 100644 --- a/src/models/Folder.ts +++ b/src/models/Folder.ts @@ -1,5 +1,6 @@ import * as fs from "fs"; import * as path from "path"; + import Logger from "../services/Logger"; /** diff --git a/src/models/Platform.ts b/src/models/Platform.ts index af0b444..df44e36 100644 --- a/src/models/Platform.ts +++ b/src/models/Platform.ts @@ -1,9 +1,10 @@ import * as fs from "fs"; -import Logger from "../services/Logger"; + import Folder from "./Folder"; +import Logger from "../services/Logger"; +import { PlatformId } from "../platforms"; import Post from "./Post"; import { PostStatus } from "./Post"; -import { PlatformId } from "../platforms"; /** * Platform base class to extend all platforms on diff --git a/src/models/Post.ts b/src/models/Post.ts index 16ea65f..4664fe7 100644 --- a/src/models/Post.ts +++ b/src/models/Post.ts @@ -1,6 +1,7 @@ import * as fs from "fs"; -import Logger from "../services/Logger"; + import Folder from "./Folder"; +import Logger from "../services/Logger"; import Platform from "./Platform"; /** diff --git a/src/platforms/Ayrshare.ts b/src/platforms/Ayrshare.ts index ead73e0..e08c1a6 100644 --- a/src/platforms/Ayrshare.ts +++ b/src/platforms/Ayrshare.ts @@ -1,13 +1,14 @@ -import Logger from "../services/Logger"; -import Storage from "../services/Storage"; import * as fs from "fs"; import * as path from "path"; -import { randomUUID } from "crypto"; -import { PlatformId } from "."; -import Platform from "../models/Platform"; + import Folder from "../models/Folder"; +import Logger from "../services/Logger"; +import Platform from "../models/Platform"; +import { PlatformId } from "."; import Post from "../models/Post"; import { PostStatus } from "../models/Post"; +import Storage from "../services/Storage"; +import { randomUUID } from "crypto"; /** * Ayrshare base class to extend all ayrshare platforms on diff --git a/src/platforms/Ayrshare/AsFacebook.ts b/src/platforms/Ayrshare/AsFacebook.ts index 9e9cd6e..031c6ca 100644 --- a/src/platforms/Ayrshare/AsFacebook.ts +++ b/src/platforms/Ayrshare/AsFacebook.ts @@ -1,9 +1,10 @@ +import * as fs from "fs"; +import * as sharp from "sharp"; + import Ayrshare from "../Ayrshare"; -import { PlatformId } from ".."; import Folder from "../../models/Folder"; +import { PlatformId } from ".."; import Post from "../../models/Post"; -import * as fs from "fs"; -import * as sharp from "sharp"; /** * AsFacebook: support for facebook platform through Ayrshare diff --git a/src/platforms/Ayrshare/AsInstagram.ts b/src/platforms/Ayrshare/AsInstagram.ts index 571e2c3..d95d552 100644 --- a/src/platforms/Ayrshare/AsInstagram.ts +++ b/src/platforms/Ayrshare/AsInstagram.ts @@ -1,9 +1,10 @@ -import Logger from "../../services/Logger"; +import * as sharp from "sharp"; + import Ayrshare from "../Ayrshare"; -import { PlatformId } from ".."; import Folder from "../../models/Folder"; +import Logger from "../../services/Logger"; +import { PlatformId } from ".."; import Post from "../../models/Post"; -import * as sharp from "sharp"; /** * AsInstagram: support for instagram platform through Ayrshare diff --git a/src/platforms/Ayrshare/AsLinkedIn.ts b/src/platforms/Ayrshare/AsLinkedIn.ts index 0c9fa86..4c662b9 100644 --- a/src/platforms/Ayrshare/AsLinkedIn.ts +++ b/src/platforms/Ayrshare/AsLinkedIn.ts @@ -1,10 +1,11 @@ -import Logger from "../../services/Logger"; +import * as fs from "fs"; +import * as sharp from "sharp"; + import Ayrshare from "../Ayrshare"; -import { PlatformId } from ".."; import Folder from "../../models/Folder"; +import Logger from "../../services/Logger"; +import { PlatformId } from ".."; import Post from "../../models/Post"; -import * as fs from "fs"; -import * as sharp from "sharp"; /** * AsLinkedIn: support for linkedin platform through Ayrshare diff --git a/src/platforms/Ayrshare/AsReddit.ts b/src/platforms/Ayrshare/AsReddit.ts index 55c01c2..054394b 100644 --- a/src/platforms/Ayrshare/AsReddit.ts +++ b/src/platforms/Ayrshare/AsReddit.ts @@ -1,8 +1,8 @@ import Ayrshare from "../Ayrshare"; -import { PlatformId } from ".."; -import Storage from "../../services/Storage"; import Folder from "../../models/Folder"; +import { PlatformId } from ".."; import Post from "../../models/Post"; +import Storage from "../../services/Storage"; /** * AsReddit: support for reddit platform through Ayrshare diff --git a/src/platforms/Ayrshare/AsTikTok.ts b/src/platforms/Ayrshare/AsTikTok.ts index 350480a..2c571c4 100644 --- a/src/platforms/Ayrshare/AsTikTok.ts +++ b/src/platforms/Ayrshare/AsTikTok.ts @@ -1,6 +1,6 @@ import Ayrshare from "../Ayrshare"; -import { PlatformId } from ".."; import Folder from "../../models/Folder"; +import { PlatformId } from ".."; import Post from "../../models/Post"; /** diff --git a/src/platforms/Ayrshare/AsTwitter.ts b/src/platforms/Ayrshare/AsTwitter.ts index d6930bc..ac307d2 100644 --- a/src/platforms/Ayrshare/AsTwitter.ts +++ b/src/platforms/Ayrshare/AsTwitter.ts @@ -1,10 +1,11 @@ -import Logger from "../../services/Logger"; +import * as fs from "fs"; +import * as sharp from "sharp"; + import Ayrshare from "../Ayrshare"; -import { PlatformId } from ".."; import Folder from "../../models/Folder"; +import Logger from "../../services/Logger"; +import { PlatformId } from ".."; import Post from "../../models/Post"; -import * as fs from "fs"; -import * as sharp from "sharp"; /** * AsTwitter: support for twitter platform through Ayrshare diff --git a/src/platforms/Ayrshare/AsYouTube.ts b/src/platforms/Ayrshare/AsYouTube.ts index 6c01786..16f19ab 100644 --- a/src/platforms/Ayrshare/AsYouTube.ts +++ b/src/platforms/Ayrshare/AsYouTube.ts @@ -1,6 +1,6 @@ import Ayrshare from "../Ayrshare"; -import { PlatformId } from ".."; import Folder from "../../models/Folder"; +import { PlatformId } from ".."; import Post from "../../models/Post"; /** diff --git a/src/platforms/Facebook.ts b/src/platforms/Facebook.ts index f1f7f72..f2918d8 100644 --- a/src/platforms/Facebook.ts +++ b/src/platforms/Facebook.ts @@ -1,14 +1,15 @@ -import Storage from "../services/Storage"; +import * as fs from "fs"; +import * as path from "path"; +import * as sharp from "sharp"; + +import FacebookAuth from "../auth/FacebookAuth"; +import Folder from "../models/Folder"; import Logger from "../services/Logger"; import Platform from "../models/Platform"; import { PlatformId } from "."; -import Folder from "../models/Folder"; import Post from "../models/Post"; import { PostStatus } from "../models/Post"; -import FacebookAuth from "../auth/FacebookAuth"; -import * as fs from "fs"; -import * as path from "path"; -import * as sharp from "sharp"; +import Storage from "../services/Storage"; /** * Facebook: support for facebook platform. diff --git a/src/platforms/Instagram.ts b/src/platforms/Instagram.ts index 58bd9a9..e1e2e6c 100644 --- a/src/platforms/Instagram.ts +++ b/src/platforms/Instagram.ts @@ -1,14 +1,15 @@ -import Storage from "../services/Storage"; +import * as fs from "fs"; +import * as path from "path"; +import * as sharp from "sharp"; + +import Folder from "../models/Folder"; +import InstagramAuth from "../auth/InstagramAuth"; import Logger from "../services/Logger"; import Platform from "../models/Platform"; -import InstagramAuth from "../auth/InstagramAuth"; import { PlatformId } from "."; -import Folder from "../models/Folder"; import Post from "../models/Post"; import { PostStatus } from "../models/Post"; -import * as fs from "fs"; -import * as path from "path"; -import * as sharp from "sharp"; +import Storage from "../services/Storage"; /** * Instagram: support for instagram platform. diff --git a/src/platforms/LinkedIn.ts b/src/platforms/LinkedIn.ts index 4a1b270..a5d0ac5 100644 --- a/src/platforms/LinkedIn.ts +++ b/src/platforms/LinkedIn.ts @@ -1,14 +1,15 @@ +import * as fs from "fs"; +//import * as path from "path"; +import * as sharp from "sharp"; + +import Folder from "../models/Folder"; +import LinkedInAuth from "../auth/LinkedInAuth"; import Logger from "../services/Logger"; -import Storage from "../services/Storage"; import Platform from "../models/Platform"; import { PlatformId } from "."; -import Folder from "../models/Folder"; import Post from "../models/Post"; -import LinkedInAuth from "../auth/LinkedInAuth"; import { PostStatus } from "../models/Post"; -import * as fs from "fs"; -//import * as path from "path"; -import * as sharp from "sharp"; +import Storage from "../services/Storage"; export default class LinkedIn extends Platform { id: PlatformId = PlatformId.LINKEDIN; diff --git a/src/platforms/Reddit.ts b/src/platforms/Reddit.ts index 87d8bcc..2dfd851 100644 --- a/src/platforms/Reddit.ts +++ b/src/platforms/Reddit.ts @@ -1,15 +1,17 @@ -import Storage from "../services/Storage"; -import Logger from "../services/Logger"; -import RedditAuth from "../auth/RedditAuth"; -import { PlatformId } from "."; -import Platform from "../models/Platform"; -import Folder from "../models/Folder"; -import Post, { PostStatus } from "../models/Post"; import * as fs from "fs"; import * as path from "path"; -import { XMLParser } from "fast-xml-parser"; import * as sharp from "sharp"; +import Post, { PostStatus } from "../models/Post"; + +import Folder from "../models/Folder"; +import Logger from "../services/Logger"; +import Platform from "../models/Platform"; +import { PlatformId } from "."; +import RedditAuth from "../auth/RedditAuth"; +import Storage from "../services/Storage"; +import { XMLParser } from "fast-xml-parser"; + /** * Reddit: support for reddit platform */ diff --git a/src/platforms/Twitter.ts b/src/platforms/Twitter.ts index bfce2ec..a10bb81 100644 --- a/src/platforms/Twitter.ts +++ b/src/platforms/Twitter.ts @@ -1,14 +1,16 @@ -import { TwitterApi } from "twitter-api-v2"; -import Storage from "../services/Storage"; -import Logger from "../services/Logger"; -import TwitterAuth from "../auth/TwitterAuth"; -import { PlatformId } from "."; -import Platform from "../models/Platform"; -import Folder from "../models/Folder"; -import Post, { PostStatus } from "../models/Post"; import * as fs from "fs"; import * as sharp from "sharp"; +import Post, { PostStatus } from "../models/Post"; + +import Folder from "../models/Folder"; +import Logger from "../services/Logger"; +import Platform from "../models/Platform"; +import { PlatformId } from "."; +import Storage from "../services/Storage"; +import { TwitterApi } from "twitter-api-v2"; +import TwitterAuth from "../auth/TwitterAuth"; + /** * Twitter: support for twitter platform */ diff --git a/src/services/Fairpost.ts b/src/services/Fairpost.ts index 6eaba60..db8080e 100644 --- a/src/services/Fairpost.ts +++ b/src/services/Fairpost.ts @@ -1,10 +1,11 @@ import * as fs from "fs"; import * as path from "path"; +import * as platforms from "../platforms"; + import Feed from "../models/Feed"; +import Logger from "./Logger"; import Platform from "../models/Platform"; import Storage from "./Storage"; -import Logger from "./Logger"; -import * as platforms from "../platforms"; /** * Fairpost - singleton service for fairpost app