Skip to content

Commit

Permalink
dependency update
Browse files Browse the repository at this point in the history
  • Loading branch information
MP281X committed Jun 4, 2024
1 parent a91979e commit 2323d1a
Show file tree
Hide file tree
Showing 18 changed files with 71 additions and 65 deletions.
4 changes: 2 additions & 2 deletions apps/cron-jobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"build": "bun build index.ts --outdir ./build --target bun",
"preview": "bun run build && bun ./build/index.js"
},
"dependencies": {
"redis": "^4.6.7",
"devDependencies": {
"redis": "^4.6.14",
"cache": "workspace:*",
"jobs": "workspace:*",
"s3": "workspace:*",
Expand Down
28 changes: 14 additions & 14 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
"scripts": {
"dev": "vite dev",
"build": "vite build --logLevel error",
"lint": "svelte-kit sync",
"lint": "svelte-kit sync && svelte-check --output human --tsconfig ./tsconfig.json",
"preview": "bun run build && bun ./build"
},
"devDependencies": {
"@sveltejs/kit": "^1.20.4",
"autoprefixer": "^10.4.15",
"postcss": "^8.4.29",
"svelte": "^4.0.5",
"svelte-adapter-bun": "^0.5.0",
"svelte-check": "^3.4.3",
"tailwindcss": "^3.3.3",
"tslib": "^2.4.1",
"vite": "^4.4.2"
"@sveltejs/kit": "^2.5.10",
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"svelte": "^4.2.17",
"svelte-adapter-bun": "^0.5.2",
"svelte-check": "^3.8.0",
"tailwindcss": "^3.4.3",
"tslib": "^2.6.2",
"vite": "^5.2.12"
},
"dependencies": {
"@egoist/tailwindcss-icons": "^1.1.0",
"@iconify-json/ph": "^1.1.6",
"zod": "^3.22.2",
"hls.js": "^1.4.12",
"@egoist/tailwindcss-icons": "^1.8.0",
"@iconify-json/ph": "^1.1.13",
"zod": "^3.23.8",
"hls.js": "^1.5.10",
"db": "workspace:*",
"jobs": "workspace:*",
"s3": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { downloadUrl } from 's3';

export const handle: Handle = async ({ event, resolve }) => {
const unauthorized = () => {
event.cookies.delete('auth_token');
event.cookies.delete('auth_token', { path: '/' });
throw redirect(303, 'auth');
};

Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from 'svelte-adapter-bun';
import { vitePreprocess } from '@sveltejs/kit/vite';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand Down
4 changes: 2 additions & 2 deletions apps/jobs-handler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"build": "bun build index.ts --outdir ./build --target bun",
"preview": "bun run build && bun ./build/index.js"
},
"dependencies": {
"redis": "^4.6.7",
"devDependencies": {
"redis": "^4.6.14",
"ai": "workspace:*",
"cache": "workspace:*",
"jobs": "workspace:*",
Expand Down
Binary file modified bun.lockb
Binary file not shown.
44 changes: 22 additions & 22 deletions k8s/secrets.yaml

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
"secrets": "bun task-runner.ts secrets"
},
"devDependencies": {
"bun-types": "^1.0.3",
"@types/bun": "1.1.3",
"nodemon": "^3.0.1",
"prettier": "^3.0.3",
"prettier-plugin-svelte": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.3",
"typescript": "^5.1.6"
}
},
"trustedDependencies": [
"@sveltejs/kit",
"esbuild",
"svelte-preprocess"
]
}
4 changes: 2 additions & 2 deletions packages/ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"main": "index.ts",
"types": "index.ts",
"dependencies": {
"openai": "^4.11.0",
"redis": "^4.6.7"
"openai": "^4.47.3",
"redis": "^4.6.14"
}
}
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"main": "index.ts",
"types": "index.ts",
"dependencies": {
"redis": "^4.6.7"
"redis": "^4.6.14"
}
}
8 changes: 4 additions & 4 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"main": "index.ts",
"types": "index.ts",
"dependencies": {
"kysely": "^0.26.3",
"pg": "^8.11.3",
"zod": "^3.22.2"
"kysely": "^0.27.3",
"pg": "^8.11.5",
"zod": "^3.23.8"
},
"devDependencies": {
"kysely-codegen": "^0.10.1"
"kysely-codegen": "^0.15.0"
}
}
4 changes: 2 additions & 2 deletions packages/db/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import { ZodError, z } from 'zod';
type ValidatorSchema<Table extends keyof DB, Req extends 'optional' | 'required'> = Req extends 'required'
? {
[K in keyof InsertObject<DB, Table>]: z.ZodType<SelectType<DB[Table][K]>>;
} & Record<`_${string}`, z.ZodType>
} & Record<`_${string}`, z.ZodType>
: {
[K in keyof InsertObject<DB, Table>]+?: z.ZodType<SelectType<DB[Table][K]>>;
} & Record<`_${string}`, z.ZodType>;
} & Record<`_${string}`, z.ZodType>;

// type helper (transform a zod schema into an object)
type InputSchema<Schema extends ValidatorSchema<any, any>> = {
Expand Down
4 changes: 2 additions & 2 deletions packages/ffmpeg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getVideoInfo = async ({ id, file }: GetVideoInfo) => {
);

if ((await ffprobe.exited) !== 0) throw new Error('unable to get the file info');
const fileInfo = (await new Response(ffprobe.stdout).json())['streams'][0];
const fileInfo = ((await new Response(ffprobe.stdout).json()) as any)['streams'][0];

return {
resolution: fileInfo['height'],
Expand Down Expand Up @@ -42,7 +42,7 @@ export const convertVideo = async ({ id, file, resolution, tot_frames, status }:
{ stderr: 'pipe', stdout: 'ignore', cwd: `${process.cwd()}/.cache/${id}` }
);

for await (const chunk of cmd.stderr) {
for await (const chunk of cmd.stderr as any) {
let log = new TextDecoder().decode(chunk).split('\n');
log.forEach(async txt => {
if (!txt || txt.trim() === '') return;
Expand Down
2 changes: 1 addition & 1 deletion packages/jobs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"../../apps/jobs-handler/src/*.ts"
],
"dependencies": {
"redis": "^4.6.7"
"redis": "^4.6.14"
}
}
2 changes: 1 addition & 1 deletion packages/realtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"main": "index.ts",
"types": "index.ts",
"dependencies": {
"redis": "^4.6.7"
"redis": "^4.6.14"
}
}
10 changes: 5 additions & 5 deletions packages/s3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const upload = async (type: FileType, name: string, path?: string, abortC
const dir = `${process.cwd()}/.cache/${path ?? name}`;
if (!fs.statSync(dir).isDirectory()) {
const { url } = await uploadUrl(type, name);
const res = await fetch(url, { method: 'PUT', body: Bun.file(dir), timeout: false });
const res = await fetch(url, { method: 'PUT', body: Bun.file(dir) });

if (!res.ok) throw new Error('unable to upload the file');
fs.rmSync(dir);
Expand All @@ -74,7 +74,7 @@ export const upload = async (type: FileType, name: string, path?: string, abortC
if (!fs.existsSync(`${dir}/${filename}`)) continue;

const { url } = await uploadUrl(type, `${name}/${filename}`);
const res = await fetch(url, { method: 'PUT', body: Bun.file(`${dir}/${filename}`), timeout: false });
const res = await fetch(url, { method: 'PUT', body: Bun.file(`${dir}/${filename}`) });
if (res.ok) fs.rmSync(`${dir}/${filename}`);
}
} catch (e) {}
Expand All @@ -85,7 +85,7 @@ export const upload = async (type: FileType, name: string, path?: string, abortC
if (fs.statSync(`${dir}/${file}`).isDirectory()) continue;

const { url } = await uploadUrl(type, `${name}/${file}`);
const res = await fetch(url, { method: 'PUT', body: Bun.file(`${dir}/${file}`), timeout: false });
const res = await fetch(url, { method: 'PUT', body: Bun.file(`${dir}/${file}`) });
if (!res.ok) throw new Error('unable to upload the files');

fs.rmSync(`${dir}/${file}`);
Expand All @@ -107,10 +107,10 @@ export const downloadUrl = async (type: FileType, id: string) => {

export const download = async (type: FileType, id: string, path: string) => {
const url = await downloadUrl(type, id);
const res = await fetch(url, { timeout: false });
const res = await fetch(url);
if (!res.ok) throw new Error(`unable to download ${type}:${id}`);

await writeFile(`${process.cwd()}/.cache/${path}`, await res.arrayBuffer());
await writeFile(`${process.cwd()}/.cache/${path}`, (await res.arrayBuffer()) as any);
};

export const listFiles = async (type: FileType, id: string = '') => {
Expand Down
6 changes: 3 additions & 3 deletions packages/s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"main": "index.ts",
"types": "index.ts",
"dependencies": {
"@aws-sdk/client-s3": "^3.397.0",
"@aws-sdk/s3-presigned-post": "^3.397.0",
"@aws-sdk/s3-request-presigner": "^3.397.0"
"@aws-sdk/client-s3": "^3.588.0",
"@aws-sdk/s3-presigned-post": "^3.588.0",
"@aws-sdk/s3-request-presigner": "^3.588.0"
}
}
1 change: 1 addition & 0 deletions task-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const log = async (title: string, input: string | Uint8Array | ReadableStream<Ui
if (txt.includes('VITE') || txt.includes('use --host to expose') || txt.includes('✨')) return;
if (txt.includes('./.svelte-kit/tsconfig.json') || txt.includes('╵') || txt.includes('tsconfig.json:2:12:')) return;
if (txt.includes('NOTICE:') || txt.includes('DETAIL:') || txt.includes('drop cascade')) return;
if (txt.includes('bun build') || txt.includes('vite build')) return;

if (color === 91 && Bun.argv[2]! !== 'dev') {
console.error(`\x1b[${color}m${title} ➜ \x1b[0m${txt}`);
Expand Down

0 comments on commit 2323d1a

Please sign in to comment.