1010*/
1111
1212import * as detect from '@solid-devtools/shared/detect'
13- import { log , warn } from '@solid-devtools/shared/utils'
1413
1514import {
1615 Place_Name , type DetectionState ,
1716 window_post_message , window_on_message , window_post_message_obj ,
17+ place_log , place_warn ,
1818} from './shared.ts'
1919
2020
21- DEV: { log ( Place_Name . Detector_Real_World + ' loaded.') }
21+ DEV: { place_log ( Place_Name . Detector_Real_World , ' loaded.') }
2222
2323function main ( ) {
2424
@@ -31,9 +31,9 @@ function main() {
3131 detect . detectSolid ( ) . then ( detected => {
3232 if ( import . meta. env . DEV ) {
3333 if ( detected ) {
34- log ( 'Solid detected.' )
34+ place_log ( Place_Name . Detector_Real_World , 'Solid detected.' )
3535 } else {
36- warn ( 'Solid NOT detected.' )
36+ place_warn ( Place_Name . Detector_Real_World , 'Solid NOT detected.' )
3737 }
3838 }
3939 if ( detected && ! detect_state . solid ) {
@@ -44,7 +44,7 @@ function main() {
4444
4545 detect . onSolidDevDetect ( ( ) => {
4646 if ( import . meta. env . DEV ) {
47- log ( 'Solid_Dev_Mode detected.' )
47+ place_log ( Place_Name . Detector_Real_World , 'Solid_Dev_Mode detected.' )
4848 }
4949 detect_state . solid_dev = true
5050 detect_state . solid = true
@@ -53,7 +53,7 @@ function main() {
5353
5454 detect . onSolidDevtoolsDetect ( ( ) => {
5555 if ( import . meta. env . DEV ) {
56- log ( 'Devtools_Client detected.' )
56+ place_log ( Place_Name . Detector_Real_World , 'Devtools_Client detected.' )
5757 }
5858 detect_state . setup = true
5959 update_detected ( )
@@ -147,24 +147,24 @@ function warn_on_version_mismatch(
147147 title : string ,
148148) {
149149 if ( ! actual_str ) {
150- return warn ( `No actual ${ title } version found!` )
150+ return place_warn ( Place_Name . Detector_Real_World , `No actual ${ title } version found!` )
151151 }
152152 if ( ! expected_str ) {
153- return warn ( `No expected ${ title } version found!` )
153+ return place_warn ( Place_Name . Detector_Real_World , `No expected ${ title } version found!` )
154154 }
155155
156156 // warn if the matching adapter version is not the same minor version range as the actual adapter
157157 let [ actual , actual_ok ] = version_from_string ( actual_str )
158158 let [ expected , expected_ok ] = version_from_string ( expected_str )
159159
160160 if ( ! actual_ok ) {
161- warn ( `Actual version ${ title } @${ actual_str } cannot be parsed.` )
161+ place_warn ( Place_Name . Detector_Real_World , `Actual version ${ title } @${ actual_str } cannot be parsed.` )
162162 }
163163 if ( ! expected_ok ) {
164- warn ( `Expected version ${ title } @${ expected_str } cannot be parsed.` )
164+ place_warn ( Place_Name . Detector_Real_World , `Expected version ${ title } @${ expected_str } cannot be parsed.` )
165165 }
166166 if ( ! match_version_patch ( actual , expected ) ) {
167- warn ( `VERSION MISMATCH!
167+ place_warn ( Place_Name . Detector_Real_World , `VERSION MISMATCH!
168168Current version: ${ title } @${ actual_str }
169169Expected version: ${ title } @${ expected_str } ` )
170170 }
0 commit comments