File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,11 +33,14 @@ import Color from './utils/color.js';
3333import JSONCoT , { Detail } from './types/types.js'
3434import AJV from 'ajv' ;
3535import fs from 'fs' ;
36+ import path from 'node:path' ;
37+ import { fileURLToPath } from 'node:url' ;
3638
3739// GeoJSON Geospatial ops will truncate to the below
3840const COORDINATE_PRECISION = 6 ;
3941
40- const RootMessage = await protobuf . load ( new URL ( './proto/takmessage.proto' , import . meta. url ) . pathname ) ;
42+ const protoPath = path . join ( path . dirname ( fileURLToPath ( import . meta. url ) ) , 'proto' , 'takmessage.proto' ) ;
43+ const RootMessage = await protobuf . load ( protoPath ) ;
4144
4245const pkg = JSON . parse ( String ( fs . readFileSync ( new URL ( '../package.json' , import . meta. url ) ) ) ) ;
4346
Original file line number Diff line number Diff line change @@ -204,8 +204,7 @@ export class DataPackage {
204204 strict ?: boolean
205205 cleanup ?: boolean
206206 } ) : Promise < DataPackage > {
207- input = input instanceof URL ? decodeURIComponent ( input . pathname ) : input ;
208-
207+ input = input instanceof URL ? path . normalize ( decodeURIComponent ( input . pathname ) ) : input ;
209208 if ( ! opts ) opts = { } ;
210209 if ( opts . strict === undefined ) opts . strict = true ;
211210 if ( opts . cleanup === undefined ) opts . cleanup = true ;
You can’t perform that action at this time.
0 commit comments