File tree Expand file tree Collapse file tree 2 files changed +0
-49
lines changed
npm-packages/system-udfs/convex Expand file tree Collapse file tree 2 files changed +0
-49
lines changed Original file line number Diff line number Diff line change @@ -6,46 +6,6 @@ import {
66 Visibility ,
77} from "./common" ;
88import { queryPrivateSystem } from "../secretSystemTables" ;
9- import { v } from "convex/values" ;
10-
11- export const getSourceCode = queryPrivateSystem ( {
12- args : { path : v . string ( ) } ,
13- handler : async ( { db } , { path } ) : Promise < string | null > => {
14- const module = await db
15- . query ( "_modules" )
16- . withIndex ( "by_path" , ( q ) => q . eq ( "path" , path ) )
17- . unique ( ) ;
18- if ( ! module ) {
19- return null ;
20- }
21- const moduleVersion = await db
22- . query ( "_module_versions" )
23- . withIndex ( "by_module_and_version" , ( q ) => q . eq ( "module_id" , module . _id ) )
24- . unique ( ) ;
25- if ( ! moduleVersion ) {
26- return null ;
27- }
28- const analyzeResult = module . analyzeResult ;
29- if ( ! analyzeResult ) {
30- return null ;
31- }
32-
33- if (
34- analyzeResult . sourceMapped &&
35- analyzeResult . sourceMapped . sourceIndex !== null &&
36- moduleVersion . sourceMap
37- ) {
38- const sourceIndex = Number ( analyzeResult . sourceMapped . sourceIndex ) ;
39- try {
40- const sourceMap = JSON . parse ( moduleVersion . sourceMap ) ;
41- return sourceMap . sourcesContent [ sourceIndex ] ;
42- } catch ( e : any ) {
43- // Failed to load source map
44- }
45- }
46- return null ;
47- } ,
48- } ) ;
499
5010export const list = queryPrivateSystem ( {
5111 args : { } ,
Original file line number Diff line number Diff line change @@ -278,15 +278,6 @@ export default defineSchema({
278278 analyzeResult : v . union ( analyzedModule , v . null ( ) ) ,
279279 sourcePackageId : v . string ( ) ,
280280 } ) . index ( "by_path" , [ "path" ] ) ,
281- _module_versions : defineTable ( {
282- module_id : v . id ( "_modules" ) ,
283- source : v . string ( ) ,
284- sourceMap : v . union ( v . string ( ) , v . null ( ) ) ,
285-
286- // version should never be read.
287- // read it from _modules instead.
288- version : v . int64 ( ) ,
289- } ) . index ( "by_module_and_version" , [ "module_id" , "version" ] ) ,
290281 _auth : defineTable ( {
291282 applicationID : v . string ( ) ,
292283 domain : v . string ( ) ,
You can’t perform that action at this time.
0 commit comments