@@ -133,17 +133,6 @@ pub mod permissions;
133133
134134const DEFAULT_ALLOC_CHECK_INT_MSEC : u64 = 1000 ;
135135
136- static SUPABASE_UA : Lazy < String > = Lazy :: new ( || {
137- let deno_version =
138- MAYBE_DENO_VERSION . get ( ) . map ( |it| & * * it) . unwrap_or ( "1.0.0" ) ;
139- let supabase_version = option_env ! ( "GIT_V_TAG" ) . unwrap_or ( "0.1.0" ) ;
140- format ! (
141- // TODO: It should be changed to a well-known name for the ecosystem.
142- "Deno/{} (variant; SupabaseEdgeRuntime/{})" ,
143- deno_version, supabase_version
144- )
145- } ) ;
146-
147136static ALLOC_CHECK_DUR : Lazy < Duration > = Lazy :: new ( || {
148137 std:: env:: var ( "EDGE_RUNTIME_ALLOC_CHECK_INT" )
149138 . ok ( )
@@ -159,7 +148,6 @@ pub static SHOULD_USE_VERBOSE_DEPRECATED_API_WARNING: OnceCell<bool> =
159148 OnceCell :: new ( ) ;
160149pub static SHOULD_INCLUDE_MALLOCED_MEMORY_ON_MEMCHECK : OnceCell < bool > =
161150 OnceCell :: new ( ) ;
162- pub static MAYBE_DENO_VERSION : OnceCell < String > = OnceCell :: new ( ) ;
163151
164152pub static MAIN_WORKER_INITIAL_HEAP_SIZE_MIB : OnceCell < u64 > = OnceCell :: new ( ) ;
165153pub static MAIN_WORKER_MAX_HEAP_SIZE_MIB : OnceCell < u64 > = OnceCell :: new ( ) ;
@@ -242,7 +230,6 @@ pub trait GetRuntimeContext {
242230 conf : & WorkerRuntimeOpts ,
243231 use_inspector : bool ,
244232 migrated : bool ,
245- version : Option < & str > ,
246233 otel_config : Option < OtelConfig > ,
247234 ) -> impl Serialize {
248235 serde_json:: json!( {
@@ -252,11 +239,8 @@ pub trait GetRuntimeContext {
252239 "inspector" : use_inspector,
253240 "migrated" : migrated,
254241 "version" : {
255- "runtime" : version. unwrap_or( "0.1.0" ) ,
256- "deno" : MAYBE_DENO_VERSION
257- . get( )
258- . map( |it| & * * it)
259- . unwrap_or( "UNKNOWN" ) ,
242+ "runtime" : deno:: edge_runtime_version( ) ,
243+ "deno" : deno:: version( ) ,
260244 } ,
261245 "flags" : {
262246 "SHOULD_DISABLE_DEPRECATED_API_WARNING" :
@@ -770,13 +754,13 @@ where
770754 deno_canvas:: deno_canvas:: init_ops( ) ,
771755 deno_fetch:: deno_fetch:: init_ops:: <PermissionsContainer >(
772756 deno_fetch:: Options {
773- user_agent: SUPABASE_UA . clone ( ) ,
757+ user_agent: deno :: versions :: user_agent ( ) . to_string ( ) ,
774758 root_cert_store_provider: Some ( root_cert_store_provider. clone( ) ) ,
775759 ..Default :: default ( )
776760 } ,
777761 ) ,
778762 deno_websocket:: deno_websocket:: init_ops:: <PermissionsContainer >(
779- SUPABASE_UA . clone ( ) ,
763+ deno :: versions :: user_agent ( ) . to_string ( ) ,
780764 Some ( root_cert_store_provider. clone( ) ) ,
781765 None ,
782766 ) ,
@@ -1036,7 +1020,6 @@ where
10361020 & conf,
10371021 has_inspector,
10381022 migrated,
1039- option_env!( "GIT_V_TAG" ) ,
10401023 maybe_otel_config,
10411024 ) ) ;
10421025
@@ -3065,7 +3048,10 @@ mod test {
30653048 . to_vec ( ) ;
30663049 assert_eq ! (
30673050 deno_version_array. first( ) . unwrap( ) . as_str( ) . unwrap( ) ,
3068- "supabase-edge-runtime-0.1.0 (compatible with Deno vUNKNOWN)"
3051+ format!(
3052+ "supabase-edge-runtime-0.1.0 (compatible with Deno v{})" ,
3053+ deno:: version( )
3054+ )
30693055 ) ;
30703056 assert_eq ! (
30713057 deno_version_array. get( 1 ) . unwrap( ) . as_str( ) . unwrap( ) ,
0 commit comments