Skip to content

Commit

Permalink
Merge branch 'main' of github.com:elwood-software/run
Browse files Browse the repository at this point in the history
  • Loading branch information
traviskuhl committed Dec 9, 2024
2 parents e0b2fff + bc39ca3 commit b681849
Show file tree
Hide file tree
Showing 9 changed files with 968 additions and 885 deletions.
21 changes: 15 additions & 6 deletions src/cli/ffr/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { printError } from "../libs/error.ts";

export default async function main(ctx: FFrCliContext) {
const { args } = ctx;
const { size, include = [] } = parseArgs(args.raw, {
string: ["size", "include"],
collect: ["include"],
const { size, parallel, matrix = [], include = [] } = parseArgs(args.raw, {
string: ["size", "include", "matrix", "parallel"],
collect: ["include", "matrix"],
});
let ffmpegArgs = args.raw;

Expand All @@ -38,16 +38,23 @@ export default async function main(ctx: FFrCliContext) {
}).args;
}

await execute(ctx, ffmpegArgs, size, include);
await execute(ctx, ffmpegArgs, { size, include, matrix, parallel });
}

export type ExecuteOptions = {
size: string | undefined;
include: string[];
matrix: string[];
parallel: string | undefined;
};

export async function execute(
ctx: FFrCliContext,
ffmpegArgs: string[],
size: string | undefined,
include: string[],
options: ExecuteOptions,
) {
const { remoteUrl, cwd } = ctx;
const { size, include } = options;
let token = await state.getToken();

// if there's no token lets try to get one
Expand Down Expand Up @@ -163,6 +170,8 @@ export async function execute(
size,
args: ffmpegArgs,
input: foundFiles,
matrix: options.matrix,
parallel: options.parallel,
}),
});

Expand Down
2 changes: 1 addition & 1 deletion src/cli/ffr/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function main(compiledVersion: string, args: FFrArgs) {
"",
"Usage:",
" ffremote <...ffmpeg-args>",
" ffremote --size=<size> --include=<file>... -- <...ffmpeg-args>",
" ffremote --size=<size> --matrix=<matrix>... --parallel=<parallel> --include=<file>... -- <...ffmpeg-args>",
" ffremote get <id>",
" ffremote watch <id>",
" ffremote status <id>",
Expand Down
9 changes: 6 additions & 3 deletions src/cli/ffr/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ export default async function main(ctx: FFrCliContext) {
Deno.exit(0);
}

console.log("Starting execution!");

await execute(ctx, normalizedArgs, undefined, []);
await execute(ctx, data.args, {
size: undefined,
include: [],
matrix: [],
parallel: undefined,
});
}
18 changes: 13 additions & 5 deletions www/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import remarkGithubAlerts from "remark-github-alerts";
import { remarkCodeHike } from "@code-hike/mdx";
import { recmaCodeHike, remarkCodeHike } from "codehike/mdx";
import remarkGfm from "remark-gfm";
import rehypeSlug from "rehype-slug";
import { default as mdx } from "@next/mdx";
Expand Down Expand Up @@ -74,19 +74,27 @@ const nextConfig = {
},
};

/** @type {import('codehike/mdx').CodeHikeConfig} */
const opts = {
components: { code: "Code" },
syntaxHighlighting: {
theme: "github-dark",
},
lineNumbers: false,
showCopyButton: true,
};

export default mdx({
options: {
remarkPlugins: [
remarkGfm,
remarkGithubAlerts,
[
remarkCodeHike,
{
lineNumbers: false,
showCopyButton: true,
},
opts,
],
],
recmaCodeHike: [[recmaCodeHike, opts]],
rehypePlugins: [rehypeSlug],
},
})(nextConfig);
43 changes: 22 additions & 21 deletions www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@code-hike/mdx": "^0.9.0",
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@next/mdx": "^15.0.3",
"@next/mdx": "^15.0.4",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.2",
Expand All @@ -23,39 +23,40 @@
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.4",
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.46.1",
"@supabase/supabase-js": "^2.47.2",
"@tailwindcss/typography": "^0.5.15",
"@tanstack/react-query": "^5.60.5",
"@tanstack/react-query": "^5.62.3",
"@types/mdx": "^2.0.13",
"@vercel/analytics": "^1.4.0",
"class-variance-authority": "^0.7.0",
"@vercel/analytics": "^1.4.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cookie": "^1.0.1",
"lucide-react": "^0.460.0",
"next": "15.0.3",
"codehike": "^1.0.4",
"cookie": "^1.0.2",
"lucide-react": "^0.468.0",
"next": "15.0.4",
"next-mdx-remote": "^5.0.0",
"next-themes": "^0.4.3",
"react": "^18.3.1",
"next-themes": "^0.4.4",
"react": "^19.0.0",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^18.3.1",
"react-dom": "^19.0.0",
"rehype-pretty-code": "^0.14.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
"remark-github-alerts": "^0.1.0",
"tailwind-merge": "^2.5.4",
"tailwind-merge": "^2.5.5",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@eslint/plugin-kit": "^0.2.3",
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@eslint/plugin-kit": "^0.2.4",
"@types/node": "^22.10.1",
"@types/react": "^19.0.1",
"@types/react-copy-to-clipboard": "^5.0.7",
"@types/react-dom": "^18.3.1",
"eslint": "^9.15.0",
"eslint-config-next": "15.0.3",
"@types/react-dom": "^19.0.1",
"eslint": "^9.16.0",
"eslint-config-next": "15.0.4",
"postcss": "^8.4.49",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.15",
"typescript": "^5.6.3"
"prettier": "^3.4.2",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2"
}
}
Loading

0 comments on commit b681849

Please sign in to comment.