diff --git a/apps/chrome-extension/tsconfig.json b/apps/chrome-extension/tsconfig.json index badcd2393c3..b0c307ded6b 100644 --- a/apps/chrome-extension/tsconfig.json +++ b/apps/chrome-extension/tsconfig.json @@ -16,7 +16,8 @@ "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", - "baseUrl": "." + "types": ["chrome"], + "noUncheckedSideEffectImports": false }, "include": [ "src", diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 8abbdc20373..e0431701d7e 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -18,22 +18,26 @@ "noEmit": true, "jsx": "preserve", "incremental": true, + "noUncheckedSideEffectImports": false, "plugins": [ { "name": "next" }, - { "name": "@effect/language-service" }, + { + "name": "@effect/language-service", + "ignoreEffectWarningsInTscExitCode": true + }, { "name": "workflow" } ], - "baseUrl": ".", "paths": { - "@/app/*": ["app/*"], - "@/components/*": ["components/*"], - "@/pages/*": ["components/pages/*"], - "@/utils/*": ["utils/*"], - "@/lib/*": ["lib/*"], - "@/actions/*": ["actions/*"], - "@/data/*": ["data/*"], - "@/services": ["services"], - "@/workflows/*": ["workflows/*"] + "@/app/*": ["./app/*"], + "@/components/*": ["./components/*"], + "@/pages/*": ["./components/pages/*"], + "@/utils/*": ["./utils/*"], + "@/lib/*": ["./lib/*"], + "@/actions/*": ["./actions/*"], + "@/data/*": ["./data/*"], + "@/services": ["./services"], + "@/workflows/*": ["./workflows/*"], + "hooks/*": ["./hooks/*"] }, "types": ["node"] }, diff --git a/bun.lock b/bun.lock index 714da3725b6..d8e8c7cddb2 100644 --- a/bun.lock +++ b/bun.lock @@ -13,6 +13,7 @@ "react": "19.2.0", "react-dom": "19.2.0", "sharp": "0.35.3", + "tsc-rs": "0.6.0", "tsdown": "^0.15.6", "turbo": "^2.3.4", "typescript": "^5.8.3", @@ -2458,6 +2459,18 @@ "@ts-rest/core": ["@ts-rest/core@3.52.1", "", { "peerDependencies": { "@types/node": "^18.18.7 || >=20.8.4", "zod": "^3.22.3" }, "optionalPeers": ["@types/node", "zod"] }, "sha512-tAjz7Kxq/grJodcTA1Anop4AVRDlD40fkksEV5Mmal88VoZeRKAG8oMHsDwdwPZz+B/zgnz0q2sF+cm5M7Bc7g=="], + "@tsc-rs/darwin-arm64": ["@tsc-rs/darwin-arm64@0.6.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-9aToB7RVGciaousuImyOqAx2xGiE9g+kCqrQaoR2uiGKxItPcRY+V/bsCP/VIg4O/qWrz6EU128gbyoxG5SKDA=="], + + "@tsc-rs/darwin-x64": ["@tsc-rs/darwin-x64@0.6.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-OT/KmLYe47I4G7cCueorXeWRihCvOVd0+3dud8AtoQ+s6UrtasM9oz+rxvA9oK+F7eAWnxxrg9OeHAvmQtZVEA=="], + + "@tsc-rs/linux-arm64": ["@tsc-rs/linux-arm64@0.6.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-BG+gJQ3rE2vk/XhkZ5XIg2utrkiBp4Mk5y+CKTuOfy88+P8RgkLmPmPlk/cY3ona7xm61Dg4T5LuNjsY7nxsrQ=="], + + "@tsc-rs/linux-x64": ["@tsc-rs/linux-x64@0.6.0", "", { "os": "linux", "cpu": "x64" }, "sha512-I7OFBKqdLF9TzRYQ9VTRHFqKQiIAnpDo7EkSx/0jtwclYz9piosrual6yC3NP4sFaLSPCIMZkscHnGOs/6aCoA=="], + + "@tsc-rs/win32-arm64": ["@tsc-rs/win32-arm64@0.6.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-/ZQTIaLdn7pSYrvvB0lTTQ9EREYNIRIfWC08qeMXwHIoABxDf0vKW8GdoOrZOB5RAOS6wmZYD9UpDfOW0qbmzg=="], + + "@tsc-rs/win32-x64": ["@tsc-rs/win32-x64@0.6.0", "", { "os": "win32", "cpu": "x64" }, "sha512-0/2p/llHCgdopwRY/jsNpkS4foXHTeOGNsUKu/omX7FxXXhV57kodpDl+fjCZVPsInFHVGynrrN/fb2cfqw0cA=="], + "@tsconfig/bun": ["@tsconfig/bun@1.0.7", "", {}, "sha512-udGrGJBNQdXGVulehc1aWT73wkR9wdaGBtB6yL70RJsqwW/yJhIg6ZbRlPOfIUiFNrnBuYLBi9CSmMKfDC7dvA=="], "@tufjs/canonical-json": ["@tufjs/canonical-json@2.0.0", "", {}, "sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA=="], @@ -5514,6 +5527,8 @@ "ts-interface-checker": ["ts-interface-checker@0.1.13", "", {}, "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA=="], + "tsc-rs": ["tsc-rs@0.6.0", "", { "optionalDependencies": { "@tsc-rs/darwin-arm64": "0.6.0", "@tsc-rs/darwin-x64": "0.6.0", "@tsc-rs/linux-arm64": "0.6.0", "@tsc-rs/linux-x64": "0.6.0", "@tsc-rs/win32-arm64": "0.6.0", "@tsc-rs/win32-x64": "0.6.0" }, "bin": { "tsc-rs": "bin/tsc-rs" } }, "sha512-n2Y3ZF6rylMvIJHVwqDf2r7y4SpR5a81OqG4/FlmcasIl4GJ80fLiBa2xEj/nRAHhheQxzbhw5GSe/oU7ZeImA=="], + "tsconfck": ["tsconfck@3.1.6", "", { "peerDependencies": { "typescript": "^5.0.0" }, "optionalPeers": ["typescript"], "bin": { "tsconfck": "bin/tsconfck.js" } }, "sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w=="], "tsconfig": ["tsconfig@workspace:packages/tsconfig"], diff --git a/package.json b/package.json index 63c46e9ab0c..c91d86eeb26 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "lint": "bun run biome lint", "gpui:build": "dotenv -e .env -- node scripts/bundle-gpui.mjs", "tauri:build": "dotenv -e .env -- bun run --cwd apps/desktop build:tauri --config src-tauri/tauri.prod.conf.json --verbose", - "typecheck": "bun run --cwd apps/web next typegen && bun run tsc -b", + "typecheck": "bun run --cwd apps/web next typegen && tsc-rs -b", "test": "turbo run test", "test:web": "bun run --filter=@cap/web test", "test:discover": "bun run with-env cargo run -p cap-test -- discover", @@ -62,6 +62,7 @@ "react": "19.2.0", "react-dom": "19.2.0", "sharp": "0.35.3", + "tsc-rs": "0.6.0", "tsdown": "^0.15.6", "turbo": "^2.3.4", "typescript": "^5.8.3" diff --git a/packages/config/base.tsconfig.json b/packages/config/base.tsconfig.json index a96702bfba3..3520b492c15 100644 --- a/packages/config/base.tsconfig.json +++ b/packages/config/base.tsconfig.json @@ -14,7 +14,12 @@ "strict": true, "noFallthroughCasesInSwitch": true, "declaration": true, - "plugins": [{ "name": "@effect/language-service" }], + "plugins": [ + { + "name": "@effect/language-service", + "ignoreEffectWarningsInTscExitCode": true + } + ], "incremental": true }, "references": [{ "path": "./tsconfig.node.json" }] diff --git a/packages/env/tsconfig.json b/packages/env/tsconfig.json index c6bf43a4cee..31494481a80 100644 --- a/packages/env/tsconfig.json +++ b/packages/env/tsconfig.json @@ -3,7 +3,6 @@ "exclude": ["node_modules", "dist"], "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"], "compilerOptions": { - "baseUrl": ".", "moduleResolution": "bundler", "composite": true, "outDir": "dist", diff --git a/packages/ui-solid/tsconfig.json b/packages/ui-solid/tsconfig.json index debe0441810..c6e4cf29b38 100644 --- a/packages/ui-solid/tsconfig.json +++ b/packages/ui-solid/tsconfig.json @@ -5,6 +5,7 @@ "skipLibCheck": true, "emitDeclarationOnly": true, "declaration": true, + "rootDir": "./src", "outDir": "dist" } } diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index d3208ebd0ce..57b6401fd7d 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -4,14 +4,14 @@ "exclude": ["dist", "build", "node_modules"], "compilerOptions": { "rootDir": "src", - "baseUrl": ".", "composite": true, "outDir": "dist", "noEmit": false, "emitDeclarationOnly": true, + "noUncheckedSideEffectImports": false, "paths": { "@/*": ["./src/*"], - "@/utils/*": ["src/utils/*"] + "@/utils/*": ["./src/utils/*"] } } } diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 7969cb096f4..d19cc6df734 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -4,7 +4,6 @@ "exclude": ["dist", "build", "node_modules"], "compilerOptions": { "rootDir": "src", - "baseUrl": ".", "moduleResolution": "bundler", "composite": true, "outDir": "dist", diff --git a/packages/web-backend/src/Videos/VideosPolicy.ts b/packages/web-backend/src/Videos/VideosPolicy.ts index 95df93ec27b..1160dd0f904 100644 --- a/packages/web-backend/src/Videos/VideosPolicy.ts +++ b/packages/web-backend/src/Videos/VideosPolicy.ts @@ -124,7 +124,7 @@ const decideCanView = ( yield* Effect.log( "Email access restriction active and user not logged in. Access denied.", ); - yield* Effect.fail( + return yield* Effect.fail( new Policy.PolicyDeniedError({ reason: "email_restriction_login_required", }), @@ -136,7 +136,7 @@ const decideCanView = ( !(yield* repo.hasViewerGrant(video.id, user.value.email)) ) { yield* Effect.log("Email access restriction active. Access denied."); - yield* Effect.fail( + return yield* Effect.fail( new Policy.PolicyDeniedError({ reason: "email_restriction_denied", }),