@@ -10,7 +10,7 @@ import { copyFile, mkdir } from 'fs/promises';
1010import { glob } from 'glob' ;
1111import * as path from 'path' ;
1212
13- const REPO_ROOT = path . join ( __dirname ) ;
13+ const REPO_ROOT = import . meta . dirname ;
1414const isWatch = process . argv . includes ( '--watch' ) ;
1515const isDev = process . argv . includes ( '--dev' ) ;
1616const isPreRelease = process . argv . includes ( '--prerelease' ) ;
@@ -45,7 +45,10 @@ const baseNodeBuildOptions = {
4545 platform : 'node' ,
4646 mainFields : [ "module" , "main" ] , // needed for jsonc-parser,
4747 define : {
48- 'process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT' : '"{}"'
48+ 'process.env.APPLICATIONINSIGHTS_CONFIGURATION_CONTENT' : JSON . stringify ( JSON . stringify ( {
49+ proxyHttpUrl : "" ,
50+ proxyHttpsUrl : ""
51+ } ) )
4952 } ,
5053} satisfies esbuild . BuildOptions ;
5154
@@ -251,8 +254,8 @@ const nodeSimulationWorkbenchUIBuildOptions = {
251254
252255async function typeScriptServerPluginPackageJsonInstall ( ) : Promise < void > {
253256 await mkdir ( './node_modules/@vscode/copilot-typescript-server-plugin' , { recursive : true } ) ;
254- const source = path . join ( __dirname , './src/extension/typescriptContext/serverPlugin/package.json' ) ;
255- const destination = path . join ( __dirname , './node_modules/@vscode/copilot-typescript-server-plugin/package.json' ) ;
257+ const source = path . join ( import . meta . dirname , './src/extension/typescriptContext/serverPlugin/package.json' ) ;
258+ const destination = path . join ( import . meta . dirname , './node_modules/@vscode/copilot-typescript-server-plugin/package.json' ) ;
256259 try {
257260 await copyFile ( source , destination ) ;
258261 } catch ( error ) {
@@ -369,7 +372,7 @@ async function main() {
369372}
370373
371374function applyPackageJsonPatch ( isPreRelease : boolean ) {
372- const packagejsonPath = path . join ( __dirname , './package.json' ) ;
375+ const packagejsonPath = path . join ( import . meta . dirname , './package.json' ) ;
373376 const json = JSON . parse ( fs . readFileSync ( packagejsonPath ) . toString ( ) ) ;
374377
375378 const newProps : any = {
0 commit comments