File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
npm-packages/system-udfs/convex Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,15 @@ import { queryPrivateSystem } from "../secretSystemTables";
33export const version = queryPrivateSystem ( {
44 args : { } ,
55 handler : async function ( { db } ) {
6+ const modules = await db . query ( "_modules" ) . take ( 1000 ) ;
7+ const nodeModules = modules . filter ( ( m ) => m . environment === "node" ) ;
8+
9+ // We keep lambdas around even if they are not currently in use. So, we need to
10+ // return early if there are no node actions currently deployed.
11+ if ( nodeModules . length === 0 && modules . length < 1000 ) {
12+ return null ;
13+ }
14+
615 const version = await db
716 . query ( "_aws_lambda_versions" )
817 . order ( "desc" )
Original file line number Diff line number Diff line change @@ -346,6 +346,11 @@ export default defineSchema({
346346 deleted : v . boolean ( ) ,
347347 analyzeResult : v . union ( analyzedModule , v . null ( ) ) ,
348348 sourcePackageId : v . string ( ) ,
349+ environment : v . union (
350+ v . literal ( "node" ) ,
351+ v . literal ( "isolate" ) ,
352+ v . literal ( "invalid" ) ,
353+ ) ,
349354 } ) . index ( "by_path" , [ "path" ] ) ,
350355 _auth : defineTable (
351356 v . union (
You can’t perform that action at this time.
0 commit comments