forked from MapComplete/MapComplete
		
	Fix tests
This commit is contained in:
		
							parent
							
								
									040cd5a3b8
								
							
						
					
					
						commit
						2f05010648
					
				
					 2 changed files with 11 additions and 3 deletions
				
			
		|  | @ -1,5 +1,6 @@ | |||
| import {lstatSync, readdirSync, readFileSync} from "fs"; | ||||
| import {Utils} from "../Utils"; | ||||
| 
 | ||||
| Utils.runningFromConsole = true | ||||
| import * as https from "https"; | ||||
| import {LayerConfigJson} from "../Customizations/JSON/LayerConfigJson"; | ||||
|  | @ -52,8 +53,15 @@ export default class ScriptUtils { | |||
|         return new Promise((resolve, reject) => { | ||||
|             try { | ||||
| 
 | ||||
| 
 | ||||
|                 https.get(url, (res) => { | ||||
|                 const urlObj = new URL(url) | ||||
|                 https.get({ | ||||
|                     host: urlObj.host, | ||||
|                     path: urlObj.pathname, | ||||
|                     port: urlObj.port, | ||||
|                     headers: { | ||||
|                         "accept": "application/json" | ||||
|                     } | ||||
|                 }, (res) => { | ||||
|                     const parts: string[] = [] | ||||
|                     res.setEncoding('utf8'); | ||||
|                     res.on('data', function (chunk) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue