File tree Expand file tree Collapse file tree 9 files changed +17
-13
lines changed Expand file tree Collapse file tree 9 files changed +17
-13
lines changed Original file line number Diff line number Diff line change 5
5
"dev" : " pnpm -w cap-setup && dotenv -e ../../.env -- pnpm run preparescript && dotenv -e ../../.env -- pnpm tauri dev" ,
6
6
"build:tauri" : " dotenv -e ../../.env -- pnpm run preparescript && dotenv -e ../../.env -- pnpm tauri build" ,
7
7
"preparescript" : " node scripts/prepare.js" ,
8
- "localdev" : " dotenv -e ../../.env -- vinxi dev --port 3001 " ,
8
+ "localdev" : " dotenv -e ../../.env -- vinxi dev --port 3002 " ,
9
9
"build" : " vinxi build" ,
10
10
"tauri" : " tauri"
11
11
},
54
54
"@ts-rest/core" : " ^3.52.1" ,
55
55
"@types/react-tooltip" : " ^4.2.4" ,
56
56
"cva" : " npm:class-variance-authority@^0.7.0" ,
57
- "effect" : " ^3.17.7 " ,
57
+ "effect" : " ^3.17.13 " ,
58
58
"mp4box" : " ^0.5.2" ,
59
59
"posthog-js" : " ^1.215.3" ,
60
60
"solid-js" : " ^1.9.3" ,
Original file line number Diff line number Diff line change 5
5
"mainBinaryName" : " Cap - Development" ,
6
6
"build" : {
7
7
"beforeDevCommand" : " pnpm localdev" ,
8
- "devUrl" : " http://localhost:3001 " ,
8
+ "devUrl" : " http://localhost:3002 " ,
9
9
"beforeBuildCommand" : " pnpm turbo build --filter @cap/desktop" ,
10
10
"frontendDist" : " ../.output/public"
11
11
},
Original file line number Diff line number Diff line change 3
3
"private" : true ,
4
4
"scripts" : {
5
5
"deploy" : " wrangler deploy" ,
6
- "dev" : " wrangler dev" ,
6
+ "bot- dev" : " wrangler dev" ,
7
7
"start" : " wrangler dev" ,
8
8
"test" : " vitest" ,
9
9
"cf-typegen" : " wrangler types"
Original file line number Diff line number Diff line change 5
5
"main" : " src/index.ts" ,
6
6
"scripts" : {
7
7
"start" : " node dist/src/index.js" ,
8
- "dev" : " ts-node src/index.ts" ,
9
8
"build" : " tsc" ,
10
9
"start:dist" : " node dist/src/index.js" ,
11
10
"test" : " jest" ,
Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ import {
11
11
spaceVideos ,
12
12
videos ,
13
13
} from "@cap/database/schema" ;
14
+ import type { Video } from "@cap/web-domain" ;
14
15
import { and , eq , inArray } from "drizzle-orm" ;
15
16
import { revalidatePath } from "next/cache" ;
16
17
17
18
interface ShareCapParams {
18
- capId : string ;
19
+ capId : Video . VideoId ;
19
20
spaceIds : string [ ] ;
20
21
public ?: boolean ;
21
22
}
Original file line number Diff line number Diff line change 3
3
import { db } from "@cap/database" ;
4
4
import { getCurrentUser } from "@cap/database/auth/session" ;
5
5
import { folders , spaceVideos , videos } from "@cap/database/schema" ;
6
+ import type { Folder , Video } from "@cap/web-domain" ;
6
7
import { and , eq } from "drizzle-orm" ;
7
8
import { revalidatePath } from "next/cache" ;
8
9
@@ -11,8 +12,8 @@ export async function moveVideoToFolder({
11
12
folderId,
12
13
spaceId,
13
14
} : {
14
- videoId : string ;
15
- folderId : string | null ;
15
+ videoId : Video . VideoId ;
16
+ folderId : Folder . FolderId | null ;
16
17
spaceId ?: string | null ;
17
18
} ) {
18
19
const user = await getCurrentUser ( ) ;
@@ -23,7 +24,7 @@ export async function moveVideoToFolder({
23
24
24
25
// Get the current video to know its original folder
25
26
const [ currentVideo ] = await db ( )
26
- . select ( { folderId : videos . folderId } )
27
+ . select ( { folderId : videos . folderId , id : videos . id } )
27
28
. from ( videos )
28
29
. where ( eq ( videos . id , videoId ) ) ;
29
30
Original file line number Diff line number Diff line change 3
3
import { db } from "@cap/database" ;
4
4
import { getCurrentUser } from "@cap/database/auth/session" ;
5
5
import { folders } from "@cap/database/schema" ;
6
+ import type { Folder } from "@cap/web-domain" ;
6
7
import { and , eq } from "drizzle-orm" ;
7
8
import { revalidatePath } from "next/cache" ;
8
9
@@ -12,10 +13,10 @@ export async function updateFolder({
12
13
color,
13
14
parentId,
14
15
} : {
15
- folderId : string ;
16
+ folderId : Folder . FolderId ;
16
17
name ?: string ;
17
18
color ?: "normal" | "blue" | "red" | "yellow" ;
18
- parentId ?: string | null ;
19
+ parentId ?: Folder . FolderId | null ;
19
20
} ) {
20
21
const user = await getCurrentUser ( ) ;
21
22
if ( ! user || ! user . activeOrganizationId )
Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ import {
9
9
sharedVideos ,
10
10
videos ,
11
11
} from "@cap/database/schema" ;
12
+ import type { Video } from "@cap/web-domain" ;
12
13
import { and , eq , inArray } from "drizzle-orm" ;
13
14
import { revalidatePath } from "next/cache" ;
14
15
15
16
export async function addVideosToOrganization (
16
17
organizationId : string ,
17
- videoIds : string [ ] ,
18
+ videoIds : Video . VideoId [ ] ,
18
19
) {
19
20
try {
20
21
const user = await getCurrentUser ( ) ;
Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ import {
9
9
sharedVideos ,
10
10
videos ,
11
11
} from "@cap/database/schema" ;
12
+ import type { Video } from "@cap/web-domain" ;
12
13
import { and , eq , inArray } from "drizzle-orm" ;
13
14
import { revalidatePath } from "next/cache" ;
14
15
15
16
export async function removeVideosFromOrganization (
16
17
organizationId : string ,
17
- videoIds : string [ ] ,
18
+ videoIds : Video . VideoId [ ] ,
18
19
) {
19
20
try {
20
21
const user = await getCurrentUser ( ) ;
You can’t perform that action at this time.
0 commit comments