Skip to content

Commit

Permalink
chore: Sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pike authored and pike committed Dec 3, 2023
1 parent b2435cf commit bb88c10
Show file tree
Hide file tree
Showing 19 changed files with 86 additions and 67 deletions.
6 changes: 4 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 4 additions & 3 deletions src/models/Feed.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/models/Folder.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as fs from "fs";
import * as path from "path";

import Logger from "../services/Logger";

/**
Expand Down
5 changes: 3 additions & 2 deletions src/models/Platform.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/models/Post.ts
Original file line number Diff line number Diff line change
@@ -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";

/**
Expand Down
11 changes: 6 additions & 5 deletions src/platforms/Ayrshare.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/platforms/Ayrshare/AsFacebook.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/platforms/Ayrshare/AsInstagram.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 5 additions & 4 deletions src/platforms/Ayrshare/AsLinkedIn.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/Ayrshare/AsReddit.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/Ayrshare/AsTikTok.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ayrshare from "../Ayrshare";
import { PlatformId } from "..";
import Folder from "../../models/Folder";
import { PlatformId } from "..";
import Post from "../../models/Post";

/**
Expand Down
9 changes: 5 additions & 4 deletions src/platforms/Ayrshare/AsTwitter.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/platforms/Ayrshare/AsYouTube.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Ayrshare from "../Ayrshare";
import { PlatformId } from "..";
import Folder from "../../models/Folder";
import { PlatformId } from "..";
import Post from "../../models/Post";

/**
Expand Down
13 changes: 7 additions & 6 deletions src/platforms/Facebook.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
13 changes: 7 additions & 6 deletions src/platforms/Instagram.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
13 changes: 7 additions & 6 deletions src/platforms/LinkedIn.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
18 changes: 10 additions & 8 deletions src/platforms/Reddit.ts
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
18 changes: 10 additions & 8 deletions src/platforms/Twitter.ts
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down
5 changes: 3 additions & 2 deletions src/services/Fairpost.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit bb88c10

Please sign in to comment.