Skip to content

Commit

Permalink
v0.0.3-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Aug 24, 2024
1 parent 58960f3 commit ae1e01c
Show file tree
Hide file tree
Showing 19 changed files with 429 additions and 136 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
{
"code": 120
}
],
"no-console": [
"error",
{
"allow": [
"warn",
"error"
]
}
]
},
"ignorePatterns": [
Expand Down
9 changes: 3 additions & 6 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type { ForgeConfig } from '@electron-forge/shared-types';
import { VitePlugin } from '@electron-forge/plugin-vite';
import { FusesPlugin } from '@electron-forge/plugin-fuses';
import { FuseV1Options, FuseVersion } from '@electron/fuses';
import { PublisherGithub } from '@electron-forge/publisher-github';
import packageJson from './package.json';
import path from 'node:path';

Expand All @@ -17,12 +16,12 @@ const commonLinuxConfig = {
const config: ForgeConfig = {
packagerConfig: {
name: 'Comet',
executableName: 'comet',
executableName: 'Comet',
icon: 'src/assets/images/icons/icon',
appBundleId: 'com.thavarshan.comet',
appCategoryType: 'public.app-category.video',
asar: {
unpack: "**/node_modules/ffmpeg-static/**"
unpack: "**/node_modules/{ffmpeg-static,ffprobe-static}/**",
},
},
rebuildConfig: {},
Expand All @@ -42,9 +41,7 @@ const config: ForgeConfig = {
{
name: '@electron-forge/maker-zip',
platforms: ['darwin'],
config: {
name: 'Comet'
},
config: {},
},
{
name: '@electron-forge/maker-deb',
Expand Down
32 changes: 31 additions & 1 deletion forge.env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ declare global {
selectDirectory: () => Promise<string | undefined>;
getDesktopPath: () => string;
getFilePath: (file: File) => string;
convertVideo: (filePath: string, outputFormat: string, saveDirectory: string) => Promise<string>;
cancelConversion: (id: number | string) => Promise<unknown>;
convertVideo: (id: string, filePath: string, outputFormat: string, saveDirectory: string) => Promise<string>;
on: (channel: string, callback: (event: Electron.IpcRendererEvent, ...args: unknown[]) => void) => void;
removeAllListeners: (channel: string) => void;
};
Expand All @@ -42,3 +43,32 @@ declare module 'vite' {
forgeConfigSelf: VitePluginConfig[K][number];
}
}

declare module 'ffmpeg-probe' {
interface FFProbeResult {
streams: Array<{
codec_name: string;
codec_type: string;
width?: number;
height?: number;
[key: string]: unknown;
}>;
format: {
filename: string;
nb_streams: number;
nb_programs: number;
format_name: string;
format_long_name: string;
start_time: string;
duration: string;
size: string;
bit_rate: string;
[key: string]: unknown;
};
[key: string]: unknown;
}

function ffprobe(filePath: string): Promise<FFProbeResult>;

export = ffprobe;
}
7 changes: 5 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>☄️ Comet | Video Converter</title>
<title>Comet</title>
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self' https: data:; media-src 'none'; child-src 'self'; object-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self' https: sentry-ipc:; font-src 'self' https:;">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body style="font-family: sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #334155; background-color: #fff; min-height: 100%; display: flex; flex-direction: column; overflow-anchor: none;" scroll-region="">
<body
style="font-family: sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; color: #334155; background-color: #fff; min-height: 100%; display: flex; flex-direction: column; overflow: hidden;"
scroll-region=""
>
<div id="app" style="overflow: hidden;"></div>
<script type="module" src="/src/renderer.ts"></script>
</body>
Expand Down
82 changes: 70 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,18 @@
},
"dependencies": {
"@electron-forge/publisher-github": "^7.4.0",
"@heroicons/vue": "^2.1.5",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"electron-squirrel-startup": "^1.0.1",
"ffmpeg-static": "^5.2.0",
"ffprobe-static": "^3.1.0",
"filesize": "^10.1.4",
"fluent-ffmpeg": "^2.1.3",
"lucide-vue-next": "^0.435.0",
"radix-vue": "^1.9.4",
"tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
"uuid": "^10.0.0",
"vue": "^3.4.38"
},
"devDependencies": {
Expand All @@ -59,7 +62,10 @@
"@electron-forge/plugin-fuses": "^7.4.0",
"@electron-forge/plugin-vite": "^7.4.0",
"@electron/fuses": "^1.8.0",
"@types/ffmpeg": "^1.0.7",
"@types/ffprobe-static": "^2.0.3",
"@types/fluent-ffmpeg": "^2.1.25",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@vitejs/plugin-vue": "^5.1.2",
Expand All @@ -80,7 +86,10 @@
"asarUnpack": [
"node_modules/ffmpeg-static/bin/${os}/${arch}/ffmpeg",
"node_modules/ffmpeg-static/index.js",
"node_modules/ffmpeg-static/package.json"
"node_modules/ffmpeg-static/package.json",
"node_modules/ffprobe-static/bin/${os}/${arch}/ffprobe",
"node_modules/ffprobe-static/index.js",
"node_modules/ffprobe-static/package.json"
]
}
}
7 changes: 7 additions & 0 deletions src/consts/formats.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export const CONVERSION_FORMATS = [
'mp4', 'webm', 'ogg', 'flv', 'avi',
'mov', 'wmv', '3gp', 'mkv', 'm4v',
'mpg', 'mpeg', 'vob', 'ts', 'asf',
'f4v', 'h264', 'hevc', 'm2ts', 'm2v',
'mts', 'ogv', 'rm', 'swf', 'xvid',
];
Loading

0 comments on commit ae1e01c

Please sign in to comment.