imcp 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/installers/clients/BaseClientInstaller.js +1 -1
- package/dist/core/installers/clients/BaseClientInstaller.js.map +1 -1
- package/dist/core/installers/clients/ClientInstallerFactory.js +1 -1
- package/dist/core/installers/clients/ClientInstallerFactory.js.map +1 -1
- package/dist/core/installers/clients/VisualStudioInstaller.d.ts +51 -0
- package/dist/core/installers/clients/VisualStudioInstaller.js +2 -0
- package/dist/core/installers/clients/VisualStudioInstaller.js.map +1 -0
- package/dist/core/installers/requirements/NpmInstaller.d.ts +6 -0
- package/dist/core/installers/requirements/NpmInstaller.js +1 -1
- package/dist/core/installers/requirements/NpmInstaller.js.map +1 -1
- package/dist/core/loaders/ConfigurationLoader.js +1 -1
- package/dist/core/loaders/ConfigurationLoader.js.map +1 -1
- package/dist/core/loaders/ConfigurationProvider.js +1 -1
- package/dist/core/loaders/ConfigurationProvider.js.map +1 -1
- package/dist/core/metadatas/constants.d.ts +5 -1
- package/dist/core/metadatas/constants.js +1 -1
- package/dist/core/metadatas/constants.js.map +1 -1
- package/dist/core/metadatas/recordingConstants.d.ts +2 -0
- package/dist/core/metadatas/recordingConstants.js +1 -1
- package/dist/core/metadatas/recordingConstants.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Logger}from"../../../utils/logger.js";import{exec}from"child_process";import{promisify}from"util";import{isCommandAvailable,getNpmExecutablePath}from"../../../utils/osUtils.js";import{ExtensionInstaller}from"./ExtensionInstaller.js";import{SUPPORTED_CLIENTS}from"../../metadatas/constants.js";import{MACRO_EXPRESSIONS,MacroResolverFunctions}from"../../../utils/macroExpressionUtils.js";import{InstallOperationManager}from"../../loaders/InstallOperationManager.js";import*as RecordingConstants from"../../metadatas/recordingConstants.js";const execAsync=promisify(exec);export class BaseClientInstaller{generateOperationId(){return`install-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}async setupInstallConfig(e,
|
|
1
|
+
import{Logger}from"../../../utils/logger.js";import{exec}from"child_process";import{promisify}from"util";import{isCommandAvailable,getNpmExecutablePath}from"../../../utils/osUtils.js";import{ExtensionInstaller}from"./ExtensionInstaller.js";import{SUPPORTED_CLIENTS}from"../../metadatas/constants.js";import{MACRO_EXPRESSIONS,MacroResolverFunctions}from"../../../utils/macroExpressionUtils.js";import{InstallOperationManager}from"../../loaders/InstallOperationManager.js";import*as RecordingConstants from"../../metadatas/recordingConstants.js";const execAsync=promisify(exec);export class BaseClientInstaller{generateOperationId(){return`install-${Date.now()}-${Math.random().toString(36).substr(2,9)}`}async setupInstallConfig(e,s){const t={...e.installation};t.mode=e.mode,s.args&&s.args.length>0&&(Logger.debug(`Using args from ServerInstallOptions: ${s.args.join(" ")}`),t.args=s.args);const n=t.env||{},a={};for(const[e,s]of Object.entries(n)){const t=s;t.Default&&(a[e]=t.Default)}return t.env={...a,...s.env||{}},await this._resolveConfigMacros(t,s),Logger.debug(`Final installation config: ${JSON.stringify(t)}`),t}async _resolveConfigMacros(e,s){for(const t of Object.values(MACRO_EXPRESSIONS)){const n=e.args?.some((e=>"string"==typeof e&&e.includes(t))),a=Object.values(e.env||{}).some((e=>"string"==typeof e&&e.includes(t)));if(!n&&!a){Logger.debug(`Macro ${t} not found in args or env, skipping resolution.`);continue}const i=MacroResolverFunctions[t];if(i){const n=await i(e,s);if(void 0!==n){if(e.args){const s=e.args.join(" ");e.args=e.args.map((e=>"string"==typeof e&&e.includes(t)?e.replace(new RegExp(t.replace(/[${}]/g,"\\$&"),"g"),n):e)),e.args.join(" ")!==s&&Logger.debug(`Args after ${t} ('${n}') replacement: ${e.args.join(" ")}`)}if(e.env){const s=JSON.stringify(e.env);for(const s in e.env)"string"==typeof e.env[s]&&e.env[s].includes(t)&&(e.env[s]=e.env[s].replace(new RegExp(t.replace(/[${}]/g,"\\$&"),"g"),n));JSON.stringify(e.env)!==s&&Logger.debug(`Env after ${t} ('${n}') replacement: ${JSON.stringify(e.env)}`)}}else Logger.debug(`Could not resolve value for macro: ${t}. It will not be replaced.`)}}}async handleWindowsNpx(e){if("win32"===process.platform&&"npx"===e.command){const s=await getNpmExecutablePath();return{...e,command:"cmd",args:["/c","npx",...e.args],env:{...e.env,APPDATA:s}}}return e}initializeSettings(e){e.mcpServers||(e.mcpServers={})}async handleStdioMode(e,s,t){t.args&&(t.args=t.args.map((e=>"string"==typeof e?e.replace(/\\/g,"/"):e))),e.mcpServers[s]={command:t.command,args:t.args,env:t.env,autoApprove:[],disabled:!1,alwaysAllow:[]}}handleSseMode(e,s,t){e.mcpServers[s]={type:"sse",url:t.url}}async checkVSCodeAndInstallExtension(e){const s=await isCommandAvailable("code"),t=await isCommandAvailable("code-insiders");if(!s&&!t)return{status:"failed",type:"install",target:"server",message:"Failed to install as neither VS Code nor VS Code Insiders are installed on this system. Please run `code` or `code-insiders` to make sure they are installed. Relaunch imcp after installation.",operationId:e};return await ExtensionInstaller.installExtension(this.clientName)?void 0:(Logger.debug(`Failed to install ${this.clientName} extension`),{status:"failed",type:"install",target:"server",message:`Failed to install ${this.clientName} extension`,operationId:e})}async updateVSCodeSettings(e,s){const t=[],n=await isCommandAvailable("code"),a=await isCommandAvailable("code-insiders");if(n)try{const n=SUPPORTED_CLIENTS[this.clientName].codeSettingPath;await this.setupClientSettings(n,e,s),t.push({success:!0,path:n})}catch(e){t.push({success:!1,path:SUPPORTED_CLIENTS[this.clientName].codeSettingPath,error:e instanceof Error?e.message:String(e)})}if(a)try{const n=SUPPORTED_CLIENTS[this.clientName].codeInsiderSettingPath;await this.setupClientSettings(n,e,s),t.push({success:!0,path:n})}catch(e){t.push({success:!1,path:SUPPORTED_CLIENTS[this.clientName].codeInsiderSettingPath,error:e instanceof Error?e.message:String(e)})}return t}async install(e,s,t){const n=this.generateOperationId(),a=InstallOperationManager.getInstance(t||e.name,e.name);return await a.recording((async()=>{await a.recording((()=>this.checkVSCodeAndInstallExtension(n)),{stepName:RecordingConstants.STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION,endMessage:e=>e?.message,onResult:e=>"failed"!==e?.status});const t=await a.recording((()=>this.setupInstallConfig(e,s)),{stepName:RecordingConstants.STEP_SETUP_INSTALLATION_CONFIG});e.mode&&(t.mode=e.mode);const i=await a.recording((()=>this.updateVSCodeSettings(e.name,t)),{stepName:RecordingConstants.STEP_UPDATE_VSCODE_SETTINGS,endMessage:e=>e?.some((e=>e.success))?`Updated settings in: ${e.map((e=>e.path)).join(", ")}`:`Failed to update settings: ${e.map((e=>e.error)).join("; ")}`,onResult:e=>e?.some((e=>e.success))}),r=i.some((e=>e.success)),o=i.filter((e=>e.success)).map((e=>e.path)),l=i.filter((e=>!e.success)).map((e=>e.error));return{status:r?"completed":"failed",type:"install",target:"server",message:r?`Successfully installed ${this.clientName} client. Updated settings in: ${o.join(", ")}`:`Failed to install ${this.clientName} client. Errors: ${l.join("; ")}`,operationId:n,error:r?void 0:l.join("; ")}}),{stepName:RecordingConstants.STEP_INSTALLATION,onResult:e=>"failed"!==e?.status,endMessage:e=>e?.message,onError:e=>{const s=`Unexpected error installing ${this.clientName} client: ${e instanceof Error?e.message:String(e)}`;return{result:{status:"failed",type:"install",target:"server",message:s,operationId:n,error:e instanceof Error?e.message:String(e)},message:s}}})}}
|
|
2
2
|
//# sourceMappingURL=BaseClientInstaller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Logger","exec","promisify","isCommandAvailable","getNpmExecutablePath","ExtensionInstaller","SUPPORTED_CLIENTS","MACRO_EXPRESSIONS","MacroResolverFunctions","InstallOperationManager","RecordingConstants","execAsync","BaseClientInstaller","generateOperationId","Date","now","Math","random","toString","substr","setupInstallConfig","serverConfig","options","finalConfig","installation","mode","args","length","debug","join","baseEnv","env","defaultEnv","key","config","Object","entries","envConfig","Default","this","_resolveConfigMacros","JSON","stringify","macro","values","isMacroInArgs","some","arg","includes","isMacroInEnv","value","resolver","resolvedValue","undefined","originalArgsString","map","replace","RegExp","originalEnvJson","handleWindowsNpx","process","platform","command","npmPath","APPDATA","initializeSettings","settings","mcpServers","handleStdioMode","serverName","autoApprove","disabled","alwaysAllow","handleSseMode","installConfig","type","url","checkVSCodeAndInstallExtension","operationId","isVSCodeInstalled","isVSCodeInsidersInstalled","status","target","message","installExtension","clientName","updateVSCodeSettings","results","settingPath","codeSettingPath","setupClientSettings","push","success","path","error","Error","String","codeInsiderSettingPath","install","categoryName","recorder","getInstance","name","recording","async","stepName","STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION","
|
|
1
|
+
{"version":3,"names":["Logger","exec","promisify","isCommandAvailable","getNpmExecutablePath","ExtensionInstaller","SUPPORTED_CLIENTS","MACRO_EXPRESSIONS","MacroResolverFunctions","InstallOperationManager","RecordingConstants","execAsync","BaseClientInstaller","generateOperationId","Date","now","Math","random","toString","substr","setupInstallConfig","serverConfig","options","finalConfig","installation","mode","args","length","debug","join","baseEnv","env","defaultEnv","key","config","Object","entries","envConfig","Default","this","_resolveConfigMacros","JSON","stringify","macro","values","isMacroInArgs","some","arg","includes","isMacroInEnv","value","resolver","resolvedValue","undefined","originalArgsString","map","replace","RegExp","originalEnvJson","handleWindowsNpx","process","platform","command","npmPath","APPDATA","initializeSettings","settings","mcpServers","handleStdioMode","serverName","autoApprove","disabled","alwaysAllow","handleSseMode","installConfig","type","url","checkVSCodeAndInstallExtension","operationId","isVSCodeInstalled","isVSCodeInsidersInstalled","status","target","message","installExtension","clientName","updateVSCodeSettings","results","settingPath","codeSettingPath","setupClientSettings","push","success","path","error","Error","String","codeInsiderSettingPath","install","categoryName","recorder","getInstance","name","recording","async","stepName","STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION","endMessage","result","onResult","STEP_SETUP_INSTALLATION_CONFIG","STEP_UPDATE_VSCODE_SETTINGS","r","anySuccess","successPaths","filter","errors","STEP_INSTALLATION","onError","errorMsg"],"sources":["../../../../src/core/installers/clients/BaseClientInstaller.ts"],"mappings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EpB,UAASrC,KAAIyD,GAAKA,EAAElB,QAM1D,MAAO,CACHb,OAAQgC,EAAa,YAAc,SACnCtC,KAAM,UACNO,OAAQ,SACRC,QARiB8B,EACf,0BAA0B1E,KAAK8C,2CAA2C6B,EAAarF,KAAK,QAC5F,qBAAqBU,KAAK8C,8BAA8B+B,EAAOvF,KAAK,QAOtEiD,cACAgB,MAAOmB,OAAa5D,EAAY+D,EAAOvF,KAAK,MAC/C,GAEL,CACI4E,SAAU/F,mBAAmB2G,kBAC7BR,SAAWD,GAA8B,WAAnBA,GAAQ3B,OAC9B0B,WAAaC,GAAYA,GAA4BzB,QACrDmC,QAAUxB,IACN,MAAMyB,EAAW,+BAA+BhF,KAAK8C,sBAAsBS,aAAiBC,MAAQD,EAAMX,QAAUa,OAAOF,KAC3H,MAAO,CACHc,OAAQ,CACJ3B,OAAQ,SACRN,KAAM,UACNO,OAAQ,SACRC,QAASoC,EACTzC,cACAgB,MAAOA,aAAiBC,MAAQD,EAAMX,QAAUa,OAAOF,IACxDX,QAASoC,EACf,GAKjB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{MSRooCodeInstaller}from"./MSRooCodeInstaller.js";import{ClineInstaller}from"./ClineInstaller.js";import{GithubCopilotInstaller}from"./GithubCopilotInstaller.js";import{SUPPORTED_CLIENTS}from"../../metadatas/constants.js";export class ClientInstallerFactory{static installerMap={[Object.keys(SUPPORTED_CLIENTS)[0]]:MSRooCodeInstaller,[Object.keys(SUPPORTED_CLIENTS)[1]]:ClineInstaller,[Object.keys(SUPPORTED_CLIENTS)[2]]:GithubCopilotInstaller};static getInstaller(t){if(!SUPPORTED_CLIENTS[t])return;const
|
|
1
|
+
import{MSRooCodeInstaller}from"./MSRooCodeInstaller.js";import{ClineInstaller}from"./ClineInstaller.js";import{GithubCopilotInstaller}from"./GithubCopilotInstaller.js";import{VisualStudioInstaller}from"./VisualStudioInstaller.js";import{SUPPORTED_CLIENTS}from"../../metadatas/constants.js";export class ClientInstallerFactory{static installerMap={[Object.keys(SUPPORTED_CLIENTS)[0]]:MSRooCodeInstaller,[Object.keys(SUPPORTED_CLIENTS)[1]]:ClineInstaller,[Object.keys(SUPPORTED_CLIENTS)[2]]:GithubCopilotInstaller,[Object.keys(SUPPORTED_CLIENTS)[3]]:VisualStudioInstaller};static getInstaller(t){if(!SUPPORTED_CLIENTS[t])return;const l=this.installerMap[t];return l?new l:void 0}static isClientSupported(t){return!!SUPPORTED_CLIENTS[t]}}
|
|
2
2
|
//# sourceMappingURL=ClientInstallerFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MSRooCodeInstaller","ClineInstaller","GithubCopilotInstaller","SUPPORTED_CLIENTS","ClientInstallerFactory","static","Object","keys","getInstaller","clientName","InstallerClass","this","installerMap","undefined","isClientSupported"],"sources":["../../../../src/core/installers/clients/ClientInstallerFactory.ts"],"mappings":"OAASA,uBAA0B,iCAC1BC,mBAAsB,6BACtBC,2BAA8B,
|
|
1
|
+
{"version":3,"names":["MSRooCodeInstaller","ClineInstaller","GithubCopilotInstaller","VisualStudioInstaller","SUPPORTED_CLIENTS","ClientInstallerFactory","static","Object","keys","getInstaller","clientName","InstallerClass","this","installerMap","undefined","isClientSupported"],"sources":["../../../../src/core/installers/clients/ClientInstallerFactory.ts"],"mappings":"OAASA,uBAA0B,iCAC1BC,mBAAsB,6BACtBC,2BAA8B,qCAC9BC,0BAA6B,oCAE7BC,sBAAyB,sCAM5B,MAAOC,uBACDC,oBAA8E,CAClF,CAACC,OAAOC,KAAKJ,mBAAmB,IAAKJ,mBACrC,CAACO,OAAOC,KAAKJ,mBAAmB,IAAKH,eACrC,CAACM,OAAOC,KAAKJ,mBAAmB,IAAKF,uBACrC,CAACK,OAAOC,KAAKJ,mBAAmB,IAAKD,uBAQzC,mBAAOM,CACHC,GAGA,IAAKN,kBAAkBM,GACnB,OAGJ,MAAMC,EAAiBC,KAAKC,aAAaH,GACzC,OAAOC,EAAiB,IAAIA,OAAmBG,CACnD,CAOA,wBAAOC,CAAkBL,GACrB,QAASN,kBAAkBM,EAC/B","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { BaseClientInstaller } from './BaseClientInstaller.js';
|
|
2
|
+
import { McpConfig, ServerInstallOptions, OperationStatus } from '../../metadatas/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Installer for Visual Studio client
|
|
5
|
+
* Handles installation and configuration of MCP server integration for Visual Studio
|
|
6
|
+
*/
|
|
7
|
+
export declare class VisualStudioInstaller extends BaseClientInstaller {
|
|
8
|
+
protected readonly clientName: string;
|
|
9
|
+
/**
|
|
10
|
+
* Update VS settings without checking for VS Code variants
|
|
11
|
+
* @param serverName The name of the server to configure
|
|
12
|
+
* @param installConfig The installation configuration
|
|
13
|
+
* @returns Array of results indicating success/failure for VS settings
|
|
14
|
+
*/
|
|
15
|
+
protected updateVSSettings(serverName: string, installConfig: any): Promise<Array<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
path: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
}>>;
|
|
20
|
+
/**
|
|
21
|
+
* Sets up client settings for Visual Studio
|
|
22
|
+
* Implements the abstract method from BaseClientInstaller
|
|
23
|
+
* @param settingPath Path to the settings file
|
|
24
|
+
* @param serverName Name of the server being installed
|
|
25
|
+
* @param installConfig Installation configuration
|
|
26
|
+
*/
|
|
27
|
+
setupClientSettings(settingPath: string, serverName: string, installConfig: any): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Initialize settings with GithubCopilot-specific structure
|
|
30
|
+
* Overrides base method to provide custom initialization
|
|
31
|
+
*/
|
|
32
|
+
protected initializeSettings(settings: any): void;
|
|
33
|
+
/**
|
|
34
|
+
* Handle stdio mode configuration for GithubCopilot
|
|
35
|
+
* Overrides base method to provide custom stdio configuration
|
|
36
|
+
*/
|
|
37
|
+
protected handleStdioMode(settings: any, serverName: string, finalConfig: any): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Handle SSE mode configuration for GithubCopilot
|
|
40
|
+
* Overrides base method to provide custom SSE configuration
|
|
41
|
+
*/
|
|
42
|
+
protected handleSseMode(settings: any, serverName: string, installConfig: any): void;
|
|
43
|
+
/**
|
|
44
|
+
* Install MCP server configuration for Visual Studio
|
|
45
|
+
* Custom implementation that skips VSCode-specific steps
|
|
46
|
+
* @param serverConfig Server configuration
|
|
47
|
+
* @param options Installation options
|
|
48
|
+
* @param categoryName Server category name
|
|
49
|
+
*/
|
|
50
|
+
install(serverConfig: McpConfig, options: ServerInstallOptions, categoryName?: string): Promise<OperationStatus>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{BaseClientInstaller}from"./BaseClientInstaller.js";import{Logger}from"../../../utils/logger.js";import fs from"fs/promises";import path from"path";import{SUPPORTED_CLIENTS}from"../../metadatas/constants.js";import{InstallOperationManager}from"../../loaders/InstallOperationManager.js";import*as RecordingConstants from"../../metadatas/recordingConstants.js";export class VisualStudioInstaller extends BaseClientInstaller{clientName="VisualStudio";async updateVSSettings(e,t){Logger.debug("Updating Visual Studio settings");const s=[];try{const a=SUPPORTED_CLIENTS[this.clientName].codeSettingPath;Logger.debug(`Attempting to update settings at: ${a}`),await this.setupClientSettings(a,e,t),s.push({success:!0,path:a}),Logger.debug("Successfully updated Visual Studio settings")}catch(e){const t=e instanceof Error?e.message:String(e);Logger.error("Failed to update Visual Studio settings:",e),s.push({success:!1,path:SUPPORTED_CLIENTS[this.clientName].codeSettingPath,error:t})}return s}async setupClientSettings(e,t,s){Logger.debug(`Setting up Visual Studio client settings at ${e}`);try{const a=path.dirname(e);await fs.mkdir(a,{recursive:!0});let i={};try{const t=await fs.readFile(e,"utf8");i=JSON.parse(t)}catch(e){Logger.debug("No existing settings file found, creating new one")}this.initializeSettings(i),t=t.replace(/-/g,"_"),"stdio"===s.mode?await this.handleStdioMode(i,t,s):"sse"===s.mode&&this.handleSseMode(i,t,s),await fs.writeFile(e,JSON.stringify(i,null,2),"utf8"),Logger.debug(`Successfully updated Visual Studio settings at ${e}`)}catch(e){throw Logger.error("Failed to setup Visual Studio client settings:",e),e}}initializeSettings(e){e||(e={servers:{},inputs:[]}),e.inputs||(e.inputs=[]),e.servers||(e.servers={})}async handleStdioMode(e,t,s){s.args&&(s.args=s.args.map((e=>"string"==typeof e?e.replace(/\\/g,"/"):e))),e.servers[t]={command:s.command,args:s.args,env:s.env}}handleSseMode(e,t,s){e.servers[t]={type:"sse",url:s.url}}async install(e,t,s){const a=this.generateOperationId(),i=InstallOperationManager.getInstance(s||e.name,e.name);return await i.recording((async()=>{const s=await i.recording((()=>this.setupInstallConfig(e,t)),{stepName:RecordingConstants.STEP_SETUP_INSTALLATION_CONFIG});e.mode&&(s.mode=e.mode);const n=await i.recording((()=>this.updateVSSettings(e.name,s)),{stepName:RecordingConstants.STEP_UPDATE_VS_SETTINGS,onResult:e=>e?.some((e=>e.success))}),r=n.some((e=>e.success)),o=n.filter((e=>e.success)).map((e=>e.path)),l=n.filter((e=>!e.success)).map((e=>e.error));return{status:r?"completed":"failed",type:"install",target:"server",message:r?`Successfully installed ${this.clientName} client. Updated settings in: ${o.join(", ")}`:`Failed to install ${this.clientName} client. Errors: ${l.join("; ")}`,operationId:a,error:r?void 0:l.join("; ")}}),{stepName:RecordingConstants.STEP_INSTALLATION,onResult:e=>"failed"!==e?.status,endMessage:e=>e?.message,onError:e=>{const t=`Unexpected error installing ${this.clientName} client: ${e instanceof Error?e.message:String(e)}`;return{result:{status:"failed",type:"install",target:"server",message:t,operationId:a,error:e instanceof Error?e.message:String(e)},message:t}}})}}
|
|
2
|
+
//# sourceMappingURL=VisualStudioInstaller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BaseClientInstaller","Logger","fs","path","SUPPORTED_CLIENTS","InstallOperationManager","RecordingConstants","VisualStudioInstaller","clientName","updateVSSettings","serverName","installConfig","debug","results","settingPath","this","codeSettingPath","setupClientSettings","push","success","error","errorMessage","Error","message","String","settingsDir","dirname","mkdir","recursive","settings","existingContent","readFile","JSON","parse","initializeSettings","replace","mode","handleStdioMode","handleSseMode","writeFile","stringify","servers","inputs","finalConfig","args","map","arg","command","env","type","url","install","serverConfig","options","categoryName","operationId","generateOperationId","recorder","getInstance","name","recording","async","setupInstallConfig","stepName","STEP_SETUP_INSTALLATION_CONFIG","STEP_UPDATE_VS_SETTINGS","onResult","result","some","r","anySuccess","successPaths","filter","errors","status","target","join","undefined","STEP_INSTALLATION","endMessage","onError","errorMsg"],"sources":["../../../../src/core/installers/clients/VisualStudioInstaller.ts"],"mappings":"OAASA,wBAA2B,kCAC3BC,WAAc,kCAChBC,OAAQ,qBACRC,SAAU,cACRC,sBAAyB,sCAEzBC,4BAA+B,qDAC5BC,uBAAwB,+CAM9B,MAAOC,8BAA8BP,oBACpBQ,WAAqB,eAO9B,sBAAMC,CAAiBC,EAAoBC,GACjDV,OAAOW,MAAM,mCACb,MAAMC,EAAqE,GAE3E,IACI,MAAMC,EAAcV,kBAAkBW,KAAKP,YAAYQ,gBACvDf,OAAOW,MAAM,qCAAqCE,WAE5CC,KAAKE,oBAAoBH,EAAaJ,EAAYC,GACxDE,EAAQK,KAAK,CAAEC,SAAS,EAAMhB,KAAMW,IACpCb,OAAOW,MAAM,8CACjB,CAAE,MAAOQ,GACL,MAAMC,EAAeD,aAAiBE,MAAQF,EAAMG,QAAUC,OAAOJ,GACrEnB,OAAOmB,MAAM,2CAA4CA,GACzDP,EAAQK,KAAK,CACTC,SAAS,EACThB,KAAMC,kBAAkBW,KAAKP,YAAYQ,gBACzCI,MAAOC,GAEf,CAEA,OAAOR,CACX,CASA,yBAAMI,CAAoBH,EAAqBJ,EAAoBC,GAC/DV,OAAOW,MAAM,+CAA+CE,KAE5D,IAEI,MAAMW,EAActB,KAAKuB,QAAQZ,SAC3BZ,GAAGyB,MAAMF,EAAa,CAAEG,WAAW,IAGzC,IAAIC,EAAW,GACf,IACI,MAAMC,QAAwB5B,GAAG6B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,EAAahB,OACbzB,EAAcyB,KAAOgB,EAAahB,MAGtC,MAAMvB,QAAgB4C,EAASG,WAC3B,IAAM7C,KAAKN,iBAAiB2C,EAAaO,KAAMhD,IAAgB,CAC/DoD,SAAUzD,mBAAmB2D,wBAC7BC,SAAWC,GAAWA,GAAQC,MAAKC,GAAKA,EAAElD,YAKxCmD,EAAazD,EAAQuD,MAAKC,GAAKA,EAAElD,UACjCoD,EAAe1D,EAAQ2D,QAAOH,GAAKA,EAAElD,UAAS0B,KAAIwB,GAAKA,EAAElE,OACzDsE,EAAS5D,EAAQ2D,QAAOH,IAAMA,EAAElD,UAAS0B,KAAIwB,GAAKA,EAAEjD,QAM1D,MAAO,CACHsD,OAAQJ,EAAa,YAAc,SACnCrB,KAAM,UACN0B,OAAQ,SACRpD,QARiB+C,EACf,0BAA0BvD,KAAKP,2CAA2C+D,EAAaK,KAAK,QAC5F,qBAAqB7D,KAAKP,8BAA8BiE,EAAOG,KAAK,QAOtErB,cACAnC,MAAOkD,OAAaO,EAAYJ,EAAOG,KAAK,MAC/C,GAEL,CACIb,SAAUzD,mBAAmBwE,kBAC7BZ,SAAWC,GAA8B,WAAnBA,GAAQO,OAC9BK,WAAaZ,GAAYA,GAA4B5C,QACrDyD,QAAU5D,IACN,MAAM6D,EAAW,+BAA+BlE,KAAKP,sBAAsBY,aAAiBE,MAAQF,EAAMG,QAAUC,OAAOJ,KAC3H,MAAO,CACH+C,OAAQ,CACJO,OAAQ,SACRzB,KAAM,UACN0B,OAAQ,SACRpD,QAAS0D,EACT1B,cACAnC,MAAOA,aAAiBE,MAAQF,EAAMG,QAAUC,OAAOJ,IACxDG,QAAS0D,EACf,GAKjB","ignoreList":[]}
|
|
@@ -32,6 +32,12 @@ export declare class NpmInstaller extends BaseInstaller {
|
|
|
32
32
|
* @param options Installation options, may contain folderName.
|
|
33
33
|
* @returns The status of the requirement
|
|
34
34
|
*/
|
|
35
|
+
/**
|
|
36
|
+
* Checks if the given NPM requirement is installed in the specified directory.
|
|
37
|
+
* Now checks if the requirementDir exists before attempting to get the installed version.
|
|
38
|
+
* @param requirement The requirement configuration
|
|
39
|
+
* @param options Optional server install options
|
|
40
|
+
*/
|
|
35
41
|
checkInstallation(requirement: RequirementConfig, options?: ServerInstallOptions): Promise<RequirementStatus>;
|
|
36
42
|
/**
|
|
37
43
|
* Retrieves the installed version of an NPM package from a given directory.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{BaseInstaller}from"./BaseInstaller.js";import{compareVersions}from"../../../utils/versionUtils.js";import{handleGitHubRelease,getGitHubLatestVersion}from"../../../utils/githubUtils.js";import{handleArtifact as handleAdoArtifact,getArtifactLatestVersion}from"../../../utils/adoUtils.js";import path from"path";import fs from"fs/promises";import{SETTINGS_DIR}from"../../metadatas/constants.js";import{Logger}from"../../../utils/logger.js";import*as RecordingConstants from"../../metadatas/recordingConstants.js";export class NpmInstaller extends BaseInstaller{canHandle(e){return"npm"===e.type}supportCheckUpdates(){return!0}async getLatestVersion(e,t){if(e.registry){if(e.registry.githubRelease)return getGitHubLatestVersion(this.execPromise,e.registry.githubRelease.repository);if(e.registry.artifacts){const r=t?.settings?.folderName||this._getRequirementFolderPath(e);return getArtifactLatestVersion(e,e.registry.artifacts,t,r)}}const{stdout:r}=await this.execPromise(`npm view ${e.name} version`);return r.trim()}_getRequirementFolderPath(e){return path.join(SETTINGS_DIR,"npm_requirements",e.name,e.version.includes("latest")?"latest":e.version)}async checkInstallation(e,t){const r=t?.settings?.folderName||this._getRequirementFolderPath(e),n=this._getRequirementName(e);Logger.debug(`
|
|
1
|
+
import{BaseInstaller}from"./BaseInstaller.js";import{compareVersions}from"../../../utils/versionUtils.js";import{handleGitHubRelease,getGitHubLatestVersion}from"../../../utils/githubUtils.js";import{handleArtifact as handleAdoArtifact,getArtifactLatestVersion}from"../../../utils/adoUtils.js";import path from"path";import fs from"fs/promises";import{SETTINGS_DIR}from"../../metadatas/constants.js";import{Logger}from"../../../utils/logger.js";import*as RecordingConstants from"../../metadatas/recordingConstants.js";export class NpmInstaller extends BaseInstaller{canHandle(e){return"npm"===e.type}supportCheckUpdates(){return!0}async getLatestVersion(e,t){if(e.registry){if(e.registry.githubRelease)return getGitHubLatestVersion(this.execPromise,e.registry.githubRelease.repository);if(e.registry.artifacts){const r=t?.settings?.folderName||this._getRequirementFolderPath(e);return getArtifactLatestVersion(e,e.registry.artifacts,t,r)}}const{stdout:r}=await this.execPromise(`npm view ${e.name} version`);return r.trim()}_getRequirementFolderPath(e){return path.join(SETTINGS_DIR,"npm_requirements",e.name,e.version.includes("latest")?"latest":e.version)}async checkInstallation(e,t){const r=t?.settings?.folderName||this._getRequirementFolderPath(e),n=this._getRequirementName(e);try{await fs.access(r)}catch(t){return Logger.debug(`Requirement directory ${r} does not exist. Skipping installation check.`),{name:e.name,type:"npm",installed:!1,inProgress:!1,error:`Requirement directory ${r} does not exist. Skipping installation check.`}}try{const t=await this._getInstalledVersion(n,r);return t?{name:e.name,type:"npm",installed:!0,version:t,npmPath:r,inProgress:!1}:{name:e.name,type:"npm",installed:!1,inProgress:!1,error:`Package ${e.name} not found or version missing in npm list output in ${r}.`}}catch(t){return Logger.debug(`Error checking installation for ${e.name} in ${r}: ${t instanceof Error?t.message:String(t)}`),{name:e.name,type:"npm",installed:!1,inProgress:!1,error:t instanceof Error?t.message:String(t)}}}async _getInstalledVersion(e,t){try{const r=`npm list ${e} --depth=0 --json --prefix "${t}"`;Logger.debug(`Getting installed version for ${e} in ${t} with command: ${r}`);const{stdout:n}=await this.execPromise(r),s=JSON.parse(n);return s.dependencies&&s.dependencies[e]&&s.dependencies[e].version?s.dependencies[e].version:void Logger.debug(`Package ${e} not found in npm list output in ${t}.`)}catch(r){return void Logger.debug(`Error getting installed version for ${e} in ${t}: ${r instanceof Error?r.message:String(r)}`)}}_getRequirementName(e){return e.registry?.artifacts?.registryName?`@${e.registry.artifacts.registryName}/${e.name}`:e.name}async _installPackage(e,t,r,n){Logger.debug(`Installing NPM package from "${t}" into "${r}"`),await fs.mkdir(r,{recursive:!0});const s=`npm install ${t} --prefix "${r}"`;Logger.debug(`Executing install command: ${s}`);const i=this._getRequirementName(e);return await n.recording((async()=>{const{stdout:n,stderr:a}=await this.execPromise(s);Logger.debug(`NPM install stdout for ${t} in ${r}: ${n}`),!a||a.toLowerCase().includes("added")||a.toLowerCase().includes("updated")||a.toLowerCase().includes("found 0 vulnerabilities")||Logger.log(`NPM install stderr for ${t} in ${r}: ${a}`);const o=await this._getInstalledVersion(i,r);if(o)return Logger.log(`Successfully installed and verified ${i}@${o} into ${r}`),{version:o};throw new Error(`Successfully ran npm install for ${t}, but ${e.name} version could not be determined via npm list in ${r}, stderr: ${a}`)}),{stepName:RecordingConstants.STEP_INSTALLATION_COMMAND_EXECUTION,inProgressMessage:`Running: ${s}`,onError:e=>{throw Logger.error(`Error during NPM installation: ${e instanceof Error?e.message:String(e)}`),e}})}async install(e,t,r){const n=r?.settings?.folderName||this._getRequirementFolderPath(e);return await fs.mkdir(n,{recursive:!0}),t.recording((async()=>{const s=await this.checkInstallation(e,{settings:{folderName:n}});if(s.installed&&s.version&&0===compareVersions(s.version,e.version)&&!e.version.toLowerCase().includes("latest"))return Logger.log(`${e.name}@${s.version} already installed in ${n}.`),s;let i=e.version,a=`${e.name}@${e.version}`;if(e.registry)if(e.registry.githubRelease){const t=await handleGitHubRelease(e,e.registry.githubRelease);a=t.resolvedPath,i=t.resolvedVersion}else{if(!e.registry.artifacts)throw t&&await t.recordStep("NpmInstaller:RegistryConfig","failed","Invalid registry configuration for npm."),new Error("Invalid registry configuration for npm.");{const t=await handleAdoArtifact(e,e.registry.artifacts,r?.settings?.pythonCommand,n);a=`${t.package}@${t.version}`,i=t.version}}return i=(await this._installPackage(e,a,n,t)).version,{name:e.name,type:"npm",installed:!0,version:i,inProgress:!1,npmPath:n}}),{stepName:RecordingConstants.STEP_NPM_INSTALLER_INSTALL,inProgressMessage:`Installing npm package: ${e.name}`,endMessage:t=>t.installed?`Install completed for ${e.name}`:`Install failed for ${e.name}`,onError:t=>({result:{name:e.name,type:"npm",installed:!1,error:t instanceof Error?t.message:String(t),inProgress:!1},message:t instanceof Error?t.message:String(t)})})}}
|
|
2
2
|
//# sourceMappingURL=NpmInstaller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseInstaller","compareVersions","handleGitHubRelease","getGitHubLatestVersion","handleAdoArtifact","getArtifactLatestVersion","path","fs","SETTINGS_DIR","Logger","RecordingConstants","NpmInstaller","canHandle","requirement","type","supportCheckUpdates","getLatestVersion","options","registry","githubRelease","this","execPromise","repository","artifacts","targetDir","settings","folderName","_getRequirementFolderPath","stdout","name","trim","join","version","includes","checkInstallation","requirementDir","requirementName","_getRequirementName","
|
|
1
|
+
{"version":3,"names":["BaseInstaller","compareVersions","handleGitHubRelease","getGitHubLatestVersion","handleAdoArtifact","getArtifactLatestVersion","path","fs","SETTINGS_DIR","Logger","RecordingConstants","NpmInstaller","canHandle","requirement","type","supportCheckUpdates","getLatestVersion","options","registry","githubRelease","this","execPromise","repository","artifacts","targetDir","settings","folderName","_getRequirementFolderPath","stdout","name","trim","join","version","includes","checkInstallation","requirementDir","requirementName","_getRequirementName","access","dirErr","debug","installed","inProgress","error","installedVersion","_getInstalledVersion","npmPath","Error","message","String","directory","command","listOutput","JSON","parse","dependencies","registryName","_installPackage","packageSource","recorder","mkdir","recursive","installCommand","recording","async","installStdout","stderr","installStderr","toLowerCase","log","stepName","STEP_INSTALLATION_COMMAND_EXECUTION","inProgressMessage","onError","install","status","resolvedVersion","packageToInstall","result","resolvedPath","recordStep","adoResult","pythonCommand","package","STEP_NPM_INSTALLER_INSTALL","endMessage"],"sources":["../../../../src/core/installers/requirements/NpmInstaller.ts"],"mappings":"OACSA,kBAAqB,4BACrBC,oBAAuB,wCACvBC,oBAAqBC,2BAA8B,yDAEjCC,kBAAsCC,6BAAgC,oCAC1FC,SAAU,cACVC,OAAQ,qBACNC,iBAAoB,sCACpBC,WAAc,qCAEX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AmBC,EAAOC,aAC1BH,EAAkBE,EAAOF,eAC7B,KAAO,KAAI/D,EAAYK,SAASK,UAW5B,MADIoC,SAAgBA,EAASqB,WAAW,8BAA+B,SAAU,2CAC3E,IAAIjC,MAAM,2CAXuB,CACvC,MAAMkC,QAAqC7E,kBACvCS,EACAA,EAAYK,SAASK,UACrBN,GAASQ,UAAUyD,cACnB1D,GAEJqD,EAAmB,GAAGI,EAAUE,WAAWF,EAAUjD,UACrD4C,EAAkBK,EAAUjD,OAChC,CAGA,CAKJ,OAFA4C,SADiCxD,KAAKqC,gBAAgB5C,EAAagE,EAAkBrD,EAAWmC,IAC3D3B,QAE9B,CACHH,KAAMhB,EAAYgB,KAClBf,KAAM,MACN2B,WAAW,EACXT,QAAS4C,EACTlC,YAAY,EACZI,QAAStB,EACZ,GAEL,CACI8C,SAAU5D,mBAAmB0E,2BAC7BZ,kBAAmB,2BAA2B3D,EAAYgB,OAC1DwD,WAAaP,GACTA,EAAOrC,UACD,yBAAyB5B,EAAYgB,OACrC,sBAAsBhB,EAAYgB,OAC5C4C,QAAU9B,IACC,CACHmC,OAAQ,CACJjD,KAAMhB,EAAYgB,KAClBf,KAAM,MACN2B,WAAW,EACXE,MAAOA,aAAiBI,MAAQJ,EAAMK,QAAUC,OAAON,GACvDD,YAAY,GAEhBM,QAASL,aAAiBI,MAAQJ,EAAMK,QAAUC,OAAON,MAI7E","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import fs from"fs/promises";import path from"path";import{LOCAL_FEEDS_DIR,SUPPORTED_CLIENTS}from"../metadatas/constants.js";import{Logger}from"../../utils/logger.js";import{readJsonFile}from"../../utils/clientUtils.js";export class ConfigurationLoader{static updateServerInstalledStatus(e,t,s){e.installedStatus||(e.installedStatus={}),e.installedStatus[t]=s}static removeClientStatus(e,t){e.installedStatus&&e.installedStatus[t]&&delete e.installedStatus[t]}static syncServerCategoriesWithClientSettings(e){return e.clientMCPSettings?(e.localServerCategories=e.localServerCategories.map((t=>{if(!t.installationStatus?.serversStatus)return t;const s={...t.installationStatus.serversStatus},a=e.clientMCPSettings;for(const[e,t]of Object.entries(a)){const a="GithubCopilot"===e?t.servers||{}:t.mcpServers||{};Object.keys(s).forEach((t=>{if(a[
|
|
1
|
+
import fs from"fs/promises";import path from"path";import{LOCAL_FEEDS_DIR,SUPPORTED_CLIENTS}from"../metadatas/constants.js";import{Logger}from"../../utils/logger.js";import{readJsonFile}from"../../utils/clientUtils.js";export class ConfigurationLoader{static updateServerInstalledStatus(e,t,s){e.installedStatus||(e.installedStatus={}),e.installedStatus[t]=s}static removeClientStatus(e,t){e.installedStatus&&e.installedStatus[t]&&delete e.installedStatus[t]}static syncServerCategoriesWithClientSettings(e){return e.clientMCPSettings?(e.localServerCategories=e.localServerCategories.map((t=>{if(!t.installationStatus?.serversStatus)return t;const s={...t.installationStatus.serversStatus},a=e.clientMCPSettings;for(const[e,t]of Object.entries(a)){const a="GithubCopilot"===e||"VisualStudio"===e?t.servers||{}:t.mcpServers||{};Object.keys(s).forEach((t=>{const r="VisualStudio"===e?t.replace(/-/g,"_"):t;if(a[r]){if(!s[t].installedStatus[e]){const a={status:"completed",type:"install",target:"server",message:`Server ${t} is configured for client ${e}`};ConfigurationLoader.updateServerInstalledStatus(s[t],e,a)}}else ConfigurationLoader.removeClientStatus(s[t],e)}))}return{...t,installationStatus:{...t.installationStatus,serversStatus:s,lastUpdated:(new Date).toISOString()}}})),e):e}static initializeInstallationStatus(e){const t={},s={};if(e){if(e.requirements)for(const s of e.requirements)t[s.name]={name:s.name,type:s.type,installed:!1,version:s.version,error:void 0};if(e.mcpServers)for(const t of e.mcpServers)s[t.name]={name:t.name,error:void 0,installedStatus:{}}}return{requirementsStatus:t,serversStatus:s,lastUpdated:(new Date).toISOString()}}static async syncServerCategoriesWithFeeds(e){e.localServerCategories=e.localServerCategories.filter((t=>e.feeds[t.name])).map((t=>(t.feedConfiguration=e.feeds[t.name],t.installationStatus&&t.installationStatus.requirementsStatus&&0!==Object.keys(t.installationStatus.requirementsStatus).length&&t.installationStatus.serversStatus&&!(Object.keys(t.installationStatus.serversStatus).length<Object.keys(t.feedConfiguration?.mcpServers||[]).length)||(t.installationStatus=ConfigurationLoader.initializeInstallationStatus(t.feedConfiguration)),t)));const t=new Set(e.localServerCategories.map((e=>e.name)));for(const[s,a]of Object.entries(e.feeds))if(!t.has(s)){const t={name:s,displayName:a.displayName||s,type:"local",description:a.description||`Local MCP server category: ${s}`,installationStatus:ConfigurationLoader.initializeInstallationStatus(a),feedConfiguration:a};e.localServerCategories.push(t),console.log(`Created new local server entry for feed: ${s}`)}return e}static async loadFeedsIntoConfiguration(e,t,s){try{await fs.mkdir(LOCAL_FEEDS_DIR,{recursive:!0});const a={};if(t)try{const e=await fs.readFile(t,"utf8");let r=JSON.parse(e);r&&r.name&&(r.systemTags||(r.systemTags={}),r.systemTags.adhoc="true",s?.prLink&&(r.PullRequest=s.prLink),s?.adhocServers&&s.adhocServers.length>0&&r.mcpServers&&(r.mcpServers=r.mcpServers.map((e=>(s.adhocServers.includes(e.name)&&(e.systemTags||(e.systemTags={}),e.systemTags.adhoc="true"),e)))),a[r.name]=r,console.log(`Loaded and processed feed configuration from provided file: ${t}`))}catch(e){console.log(`Error loading feed configuration from provided file ${t}:`,e)}const r=(await fs.readdir(LOCAL_FEEDS_DIR)).filter((e=>e.endsWith(".json")));if(0===r.length&&!t)return console.log(`No feed configuration files found in ${LOCAL_FEEDS_DIR}`),e;for(const e of r)try{const t=path.join(LOCAL_FEEDS_DIR,e),s=await fs.readFile(t,"utf8"),r=JSON.parse(s);r&&r.name&&(a[r.name]?console.log(`Skipping local feed ${r.name} as it was provided via --feed-file`):a[r.name]=r)}catch(t){console.warn(`Error loading feed configuration from ${e}:`,t)}const o=Object.values(a);o.sort(((e,t)=>{const s=e.displayName||"",a=t.displayName||"";return s.localeCompare(a)}));const n={};for(const e of o)n[e.name]=e;return e.feeds=n,await ConfigurationLoader.syncServerCategoriesWithFeeds(e)}catch(e){throw console.error("Error loading feed configurations:",e),e}}static async loadClientMCPSettings(e){try{Logger.debug("Starting to load MCP client settings...");const t={};for(const[e,s]of Object.entries(SUPPORTED_CLIENTS)){const a=process.env.CODE_INSIDERS?s.codeInsiderSettingPath:s.codeSettingPath;try{let s=await readJsonFile(a,!0);"GithubCopilot"===e&&(s=s.mcp?s.mcp:{servers:{},inputs:[]}),t[e]=s,Logger.debug(`Successfully loaded MCP settings for ${e}`)}catch(s){Logger.debug(`Warning: Could not load MCP settings for client ${e}: ${s instanceof Error?s.message:String(s)}`),t[e]={}}}return e.clientMCPSettings=t,ConfigurationLoader.syncServerCategoriesWithClientSettings(e)}catch(e){throw Logger.error("Error loading client MCP settings:",e),e}}}
|
|
2
2
|
//# sourceMappingURL=ConfigurationLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fs","path","LOCAL_FEEDS_DIR","SUPPORTED_CLIENTS","Logger","readJsonFile","ConfigurationLoader","updateServerInstalledStatus","serverStatus","clientName","operationStatus","installedStatus","removeClientStatus","syncServerCategoriesWithClientSettings","configuration","clientMCPSettings","localServerCategories","map","category","installationStatus","serversStatus","updatedServerStatus","clientSettings","settings","Object","entries","clientServers","servers","mcpServers","keys","forEach","serverName","status","type","target","message","lastUpdated","Date","toISOString","initializeInstallationStatus","feedConfig","requirementsStatus","requirements","req","name","installed","version","error","undefined","mcp","syncServerCategoriesWithFeeds","filter","server","feeds","feedConfiguration","length","existingServerNames","Set","feedName","has","newServerCategory","displayName","description","push","console","log","loadFeedsIntoConfiguration","feedFile","mkdir","recursive","content","readFile","config","JSON","parse","systemTags","prLink","PullRequest","adhocServers","includes","jsonFiles","readdir","file","endsWith","filePath","join","warn","feedValues","values","sort","a","b","displayNameA","displayNameB","localeCompare","sortedFeeds","loadClientMCPSettings","debug","settingPath","process","env","CODE_INSIDERS","codeInsiderSettingPath","codeSettingPath","inputs","Error","String"],"sources":["../../../src/core/loaders/ConfigurationLoader.ts"],"mappings":"OAAOA,OAAQ,qBACRC,SAAU,cACRC,gBAAiBC,sBAAyB,mCAC1CC,WAAc,+BACdC,iBAAoB,oCAWvB,MAAOC,oBAID,kCAAOC,CACXC,EACAC,EACAC,GAEKF,EAAaG,kBACdH,EAAaG,gBAAkB,IAEnCH,EAAaG,gBAAgBF,GAAcC,CAC/C,CAKQ,yBAAOE,CACXJ,EACAC,GAEID,EAAaG,iBAAmBH,EAAaG,gBAAgBF,WACtDD,EAAaG,gBAAgBF,EAE5C,CAMA,6CAAOI,CAAuCC,GAC1C,OAAKA,EAAcC,mBAInBD,EAAcE,sBAAwBF,EAAcE,sBAAsBC,KAAIC,IAC1E,IAAKA,EAASC,oBAAoBC,cAC9B,OAAOF,EAGX,MAAMG,EAAsB,IAAKH,EAASC,mBAAmBC,eACvDE,EAAiBR,EAAcC,kBAErC,IAAK,MAAON,EAAYc,KAAaC,OAAOC,QAAQH,GAAiB,
|
|
1
|
+
{"version":3,"names":["fs","path","LOCAL_FEEDS_DIR","SUPPORTED_CLIENTS","Logger","readJsonFile","ConfigurationLoader","updateServerInstalledStatus","serverStatus","clientName","operationStatus","installedStatus","removeClientStatus","syncServerCategoriesWithClientSettings","configuration","clientMCPSettings","localServerCategories","map","category","installationStatus","serversStatus","updatedServerStatus","clientSettings","settings","Object","entries","clientServers","servers","mcpServers","keys","forEach","serverName","checkServerName","replace","status","type","target","message","lastUpdated","Date","toISOString","initializeInstallationStatus","feedConfig","requirementsStatus","requirements","req","name","installed","version","error","undefined","mcp","syncServerCategoriesWithFeeds","filter","server","feeds","feedConfiguration","length","existingServerNames","Set","feedName","has","newServerCategory","displayName","description","push","console","log","loadFeedsIntoConfiguration","feedFile","mkdir","recursive","content","readFile","config","JSON","parse","systemTags","prLink","PullRequest","adhocServers","includes","jsonFiles","readdir","file","endsWith","filePath","join","warn","feedValues","values","sort","a","b","displayNameA","displayNameB","localeCompare","sortedFeeds","loadClientMCPSettings","debug","settingPath","process","env","CODE_INSIDERS","codeInsiderSettingP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import path from"path";import{exec}from"child_process";import{promisify}from"util";import{fileURLToPath}from"url";import{GITHUB_REPO,LOCAL_FEEDS_DIR,SETTINGS_DIR,SUPPORTED_CLIENTS}from"../metadatas/constants.js";import{Logger}from"../../utils/logger.js";import{checkGithubAuth}from"../../utils/githubAuth.js";import{ConfigurationLoader}from"./ConfigurationLoader.js";const execAsync=promisify(exec),__dirname=path.dirname(fileURLToPath(import.meta.url));export class ConfigurationProvider{static instance;configPath;configuration;configLock=Promise.resolve();tempDir;constructor(){this.configPath=path.join(SETTINGS_DIR,"configurations.json"),this.configuration={localServerCategories:[],feeds:{},clientMCPSettings:{}},this.tempDir=path.join(LOCAL_FEEDS_DIR,"../temp")}static getInstance(){return ConfigurationProvider.instance||(ConfigurationProvider.instance=new ConfigurationProvider),ConfigurationProvider.instance}async withLock(t){const e=this.configLock;let i;this.configLock=new Promise((t=>i=t));try{return await e,await t()}finally{i()}}async initialize(t,e){await this.withLock((async()=>{const i=path.dirname(this.configPath);await fs.mkdir(i,{recursive:!0});try{await fs.rm(this.configPath,{recursive:!0,force:!0})}catch(t){if("ENOENT"!==t.code)throw t}try{try{const t=JSON.parse(await fs.readFile(this.configPath,"utf8"));this.configuration=t}catch(t){if("ENOENT"!==t.code)throw t;await this.saveConfiguration()}await this.loadFeedsIntoConfiguration(t,e),await this.loadClientMCPSettings()}catch(t){throw Logger.error("Error during initialization",t),t}}))}async saveConfiguration(){const t=path.dirname(this.configPath);await fs.mkdir(t,{recursive:!0}),await fs.writeFile(this.configPath,JSON.stringify(this.configuration,null,2))}async getServerCategories(){return await this.withLock((async()=>this.configuration.localServerCategories))}async getServerCategory(t){return await this.withLock((async()=>this.configuration.localServerCategories.find((e=>e.name===t))))}async getClientMcpSettings(){return await this.withLock((async()=>this.configuration.clientMCPSettings))}async getFeedConfiguration(t){return await this.withLock((async()=>this.configuration.feeds[t]))}async getServerMcpConfig(t,e){return await this.withLock((async()=>this.configuration.feeds[t]?.mcpServers.find((t=>t.name===e))))}async getInstallationStatus(t){return await this.withLock((async()=>{const e=this.configuration.localServerCategories.find((e=>e.name===t));return e?.installationStatus}))}async getServerStatus(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t)),a=i?.installationStatus;return a?.serversStatus[e]}))}async getRequirementStatus(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t)),a=i?.installationStatus;return a?.requirementsStatus[e]}))}async updateInstallationStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a&&(a.installationStatus||(a.installationStatus={requirementsStatus:{},serversStatus:{},lastUpdated:(new Date).toISOString()}),a.installationStatus.requirementsStatus={...a.installationStatus.requirementsStatus,...e},a.installationStatus.serversStatus={...a.installationStatus.serversStatus,...i},a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateRequirementStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a?.installationStatus&&(a.installationStatus.requirementsStatus[e]=i,a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateRequirementOperationStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a?.installationStatus?.requirementsStatus[e]&&(a.installationStatus.requirementsStatus[e].operationStatus=i,a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateServerStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a?.installationStatus&&(a.installationStatus.serversStatus[e]=i,a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateServerOperationStatus(t,e,i,a){return await this.withLock((async()=>{const r=this.configuration.localServerCategories.find((e=>e.name===t));return!!r?.installationStatus?.serversStatus[e]&&(r.installationStatus.serversStatus[e].installedStatus[i]=a,r.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async isRequirementsReady(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t));if(!i?.feedConfiguration)return!1;const a=i.feedConfiguration.mcpServers.find((t=>t.name===e));if(!a?.dependencies?.requirements)return!0;const r=a.dependencies.requirements.map((t=>t.name)),n=i?.installationStatus;return!!n?.requirementsStatus&&r.every((t=>{const e=n.requirementsStatus[t];return e?.installed&&!e?.error}))}))}async GetServerRequirementStatus(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t));if(!i?.feedConfiguration)return[];const a=i.feedConfiguration.mcpServers.find((t=>t.name===e));if(!a?.dependencies?.requirements)return[];return a.dependencies.requirements.map((t=>t.name)).map((t=>i?.installationStatus?.requirementsStatus[t])).filter((t=>void 0!==t))}))}async isServerReady(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t)),r=a?.installationStatus,n=r?.serversStatus[e];return!!n&&i.every((t=>{const e=n.installedStatus?.[t];return"completed"===e?.status&&!e?.error}))}))}async syncFeeds(t,e){return await this.withLock((async()=>{Logger.log("Starting feed synchronization...");try{await checkGithubAuth(),Logger.debug({action:"create_directories",paths:{localFeeds:LOCAL_FEEDS_DIR,tempDir:this.tempDir}}),await fs.mkdir(LOCAL_FEEDS_DIR,{recursive:!0}),await fs.mkdir(this.tempDir,{recursive:!0}),await fs.rm(this.tempDir,{recursive:!0,force:!0});const i=t||GITHUB_REPO.url,a=e||"main";if(t||e){Logger.debug(`Using git clone with repository ${i} and branch ${a}`);const{cloneGitRepository:t}=await import("../../utils/gitUtils.js"),e=path.join(this.tempDir,"repo-clone");await t(i,a,e);const r=path.join(e,GITHUB_REPO.feedsPath);Logger.debug("Updating local feeds from git clone..."),await fs.rm(LOCAL_FEEDS_DIR,{recursive:!0,force:!0});try{await fs.access(r)}catch(t){throw new Error(`Could not find feeds directory in cloned repository: ${r}`)}await fs.cp(r,LOCAL_FEEDS_DIR,{recursive:!0,force:!0}),Logger.log("Successfully updated local feeds from git repository")}else{Logger.debug("Downloading latest release...");const{downloadGithubRelease:t}=await import("../../utils/githubUtils.js"),{version:e,downloadPath:i}=await t(GITHUB_REPO.repoName,"latest",GITHUB_REPO.feedAssetsName,void 0,!0,this.tempDir);Logger.debug({action:"download_release",downloadPath:i,version:e,repoName:GITHUB_REPO.repoName}),Logger.debug("Updating local feeds..."),await fs.rm(LOCAL_FEEDS_DIR,{recursive:!0,force:!0});const a=i;try{await fs.access(i)}catch(t){throw new Error(`Could not find feeds directory in downloaded path: ${a}`)}await fs.cp(a,LOCAL_FEEDS_DIR,{recursive:!0,force:!0}),Logger.log("Successfully updated local feeds")}}catch(t){throw Logger.error("Error during feed synchronization",t),new Error("Failed to sync feeds. Use --verbose for detailed error information.")}}))}async loadFeedsIntoConfiguration(t,e){this.configuration=await ConfigurationLoader.loadFeedsIntoConfiguration(this.configuration,t,e),await this.saveConfiguration()}async loadClientMCPSettings(){this.configuration=await ConfigurationLoader.loadClientMCPSettings(this.configuration),await this.saveConfiguration()}async reloadClientMCPSettings(){return await this.withLock((async()=>{await this.loadClientMCPSettings()}))}async removeServerFromClientMCPSettings(t,e){return await this.withLock((async()=>{const{readJsonFile:i,writeJsonFile:a}=await import("../../utils/clientUtils.js"),r=Object.entries(SUPPORTED_CLIENTS),n=e?r.filter((([t])=>t===e)):r;for(const[e,r]of n){const n=process.env.CODE_INSIDERS?r.codeInsiderSettingPath:r.codeSettingPath;try{const r=await i(n,!0);let s=!1;"GithubCopilot"===e&&r.mcp?.servers?.[t]
|
|
1
|
+
import fs from"fs/promises";import path from"path";import{exec}from"child_process";import{promisify}from"util";import{fileURLToPath}from"url";import{GITHUB_REPO,LOCAL_FEEDS_DIR,SETTINGS_DIR,SUPPORTED_CLIENTS}from"../metadatas/constants.js";import{Logger}from"../../utils/logger.js";import{checkGithubAuth}from"../../utils/githubAuth.js";import{ConfigurationLoader}from"./ConfigurationLoader.js";const execAsync=promisify(exec),__dirname=path.dirname(fileURLToPath(import.meta.url));export class ConfigurationProvider{static instance;configPath;configuration;configLock=Promise.resolve();tempDir;constructor(){this.configPath=path.join(SETTINGS_DIR,"configurations.json"),this.configuration={localServerCategories:[],feeds:{},clientMCPSettings:{}},this.tempDir=path.join(LOCAL_FEEDS_DIR,"../temp")}static getInstance(){return ConfigurationProvider.instance||(ConfigurationProvider.instance=new ConfigurationProvider),ConfigurationProvider.instance}async withLock(t){const e=this.configLock;let i;this.configLock=new Promise((t=>i=t));try{return await e,await t()}finally{i()}}async initialize(t,e){await this.withLock((async()=>{const i=path.dirname(this.configPath);await fs.mkdir(i,{recursive:!0});try{await fs.rm(this.configPath,{recursive:!0,force:!0})}catch(t){if("ENOENT"!==t.code)throw t}try{try{const t=JSON.parse(await fs.readFile(this.configPath,"utf8"));this.configuration=t}catch(t){if("ENOENT"!==t.code)throw t;await this.saveConfiguration()}await this.loadFeedsIntoConfiguration(t,e),await this.loadClientMCPSettings()}catch(t){throw Logger.error("Error during initialization",t),t}}))}async saveConfiguration(){const t=path.dirname(this.configPath);await fs.mkdir(t,{recursive:!0}),await fs.writeFile(this.configPath,JSON.stringify(this.configuration,null,2))}async getServerCategories(){return await this.withLock((async()=>this.configuration.localServerCategories))}async getServerCategory(t){return await this.withLock((async()=>this.configuration.localServerCategories.find((e=>e.name===t))))}async getClientMcpSettings(){return await this.withLock((async()=>this.configuration.clientMCPSettings))}async getFeedConfiguration(t){return await this.withLock((async()=>this.configuration.feeds[t]))}async getServerMcpConfig(t,e){return await this.withLock((async()=>this.configuration.feeds[t]?.mcpServers.find((t=>t.name===e))))}async getInstallationStatus(t){return await this.withLock((async()=>{const e=this.configuration.localServerCategories.find((e=>e.name===t));return e?.installationStatus}))}async getServerStatus(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t)),a=i?.installationStatus;return a?.serversStatus[e]}))}async getRequirementStatus(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t)),a=i?.installationStatus;return a?.requirementsStatus[e]}))}async updateInstallationStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a&&(a.installationStatus||(a.installationStatus={requirementsStatus:{},serversStatus:{},lastUpdated:(new Date).toISOString()}),a.installationStatus.requirementsStatus={...a.installationStatus.requirementsStatus,...e},a.installationStatus.serversStatus={...a.installationStatus.serversStatus,...i},a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateRequirementStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a?.installationStatus&&(a.installationStatus.requirementsStatus[e]=i,a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateRequirementOperationStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a?.installationStatus?.requirementsStatus[e]&&(a.installationStatus.requirementsStatus[e].operationStatus=i,a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateServerStatus(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t));return!!a?.installationStatus&&(a.installationStatus.serversStatus[e]=i,a.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async updateServerOperationStatus(t,e,i,a){return await this.withLock((async()=>{const r=this.configuration.localServerCategories.find((e=>e.name===t));return!!r?.installationStatus?.serversStatus[e]&&(r.installationStatus.serversStatus[e].installedStatus[i]=a,r.installationStatus.lastUpdated=(new Date).toISOString(),await this.saveConfiguration(),!0)}))}async isRequirementsReady(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t));if(!i?.feedConfiguration)return!1;const a=i.feedConfiguration.mcpServers.find((t=>t.name===e));if(!a?.dependencies?.requirements)return!0;const r=a.dependencies.requirements.map((t=>t.name)),n=i?.installationStatus;return!!n?.requirementsStatus&&r.every((t=>{const e=n.requirementsStatus[t];return e?.installed&&!e?.error}))}))}async GetServerRequirementStatus(t,e){return await this.withLock((async()=>{const i=this.configuration.localServerCategories.find((e=>e.name===t));if(!i?.feedConfiguration)return[];const a=i.feedConfiguration.mcpServers.find((t=>t.name===e));if(!a?.dependencies?.requirements)return[];return a.dependencies.requirements.map((t=>t.name)).map((t=>i?.installationStatus?.requirementsStatus[t])).filter((t=>void 0!==t))}))}async isServerReady(t,e,i){return await this.withLock((async()=>{const a=this.configuration.localServerCategories.find((e=>e.name===t)),r=a?.installationStatus,n=r?.serversStatus[e];return!!n&&i.every((t=>{const e=n.installedStatus?.[t];return"completed"===e?.status&&!e?.error}))}))}async syncFeeds(t,e){return await this.withLock((async()=>{Logger.log("Starting feed synchronization...");try{await checkGithubAuth(),Logger.debug({action:"create_directories",paths:{localFeeds:LOCAL_FEEDS_DIR,tempDir:this.tempDir}}),await fs.mkdir(LOCAL_FEEDS_DIR,{recursive:!0}),await fs.mkdir(this.tempDir,{recursive:!0}),await fs.rm(this.tempDir,{recursive:!0,force:!0});const i=t||GITHUB_REPO.url,a=e||"main";if(t||e){Logger.debug(`Using git clone with repository ${i} and branch ${a}`);const{cloneGitRepository:t}=await import("../../utils/gitUtils.js"),e=path.join(this.tempDir,"repo-clone");await t(i,a,e);const r=path.join(e,GITHUB_REPO.feedsPath);Logger.debug("Updating local feeds from git clone..."),await fs.rm(LOCAL_FEEDS_DIR,{recursive:!0,force:!0});try{await fs.access(r)}catch(t){throw new Error(`Could not find feeds directory in cloned repository: ${r}`)}await fs.cp(r,LOCAL_FEEDS_DIR,{recursive:!0,force:!0}),Logger.log("Successfully updated local feeds from git repository")}else{Logger.debug("Downloading latest release...");const{downloadGithubRelease:t}=await import("../../utils/githubUtils.js"),{version:e,downloadPath:i}=await t(GITHUB_REPO.repoName,"latest",GITHUB_REPO.feedAssetsName,void 0,!0,this.tempDir);Logger.debug({action:"download_release",downloadPath:i,version:e,repoName:GITHUB_REPO.repoName}),Logger.debug("Updating local feeds..."),await fs.rm(LOCAL_FEEDS_DIR,{recursive:!0,force:!0});const a=i;try{await fs.access(i)}catch(t){throw new Error(`Could not find feeds directory in downloaded path: ${a}`)}await fs.cp(a,LOCAL_FEEDS_DIR,{recursive:!0,force:!0}),Logger.log("Successfully updated local feeds")}}catch(t){throw Logger.error("Error during feed synchronization",t),new Error("Failed to sync feeds. Use --verbose for detailed error information.")}}))}async loadFeedsIntoConfiguration(t,e){this.configuration=await ConfigurationLoader.loadFeedsIntoConfiguration(this.configuration,t,e),await this.saveConfiguration()}async loadClientMCPSettings(){this.configuration=await ConfigurationLoader.loadClientMCPSettings(this.configuration),await this.saveConfiguration()}async reloadClientMCPSettings(){return await this.withLock((async()=>{await this.loadClientMCPSettings()}))}async removeServerFromClientMCPSettings(t,e){return await this.withLock((async()=>{const{readJsonFile:i,writeJsonFile:a}=await import("../../utils/clientUtils.js"),r=Object.entries(SUPPORTED_CLIENTS),n=e?r.filter((([t])=>t===e)):r;for(const[e,r]of n){const n=process.env.CODE_INSIDERS?r.codeInsiderSettingPath:r.codeSettingPath;try{const r=await i(n,!0);let s=!1;if("GithubCopilot"===e&&r.mcp?.servers?.[t])delete r.mcp.servers[t],s=!0;else if("VisualStudio"===e){const e=t.replace(/-/g,"_");r.servers?.[e]&&(delete r.servers[e],s=!0)}else r.mcpServers?.[t]&&(delete r.mcpServers[t],s=!0);s&&(await a(n,r),Logger.debug(`Removed server ${t} from client ${e} settings`))}catch(i){Logger.error(`Failed to remove server ${t} from client ${e} settings:`,i)}}if(this.configuration.clientMCPSettings){if(e){const i=this.configuration.clientMCPSettings[e];i&&(i.mcpServers?.[t]&&delete i.mcpServers[t],i.servers?.[t]&&delete i.servers[t])}else for(const e of Object.values(this.configuration.clientMCPSettings))e.mcpServers?.[t]&&delete e.mcpServers[t],e.servers?.[t]&&delete e.servers[t];await this.saveConfiguration()}}))}}export const configProvider=ConfigurationProvider.getInstance();
|
|
2
2
|
//# sourceMappingURL=ConfigurationProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fs","path","exec","promisify","fileURLToPath","GITHUB_REPO","LOCAL_FEEDS_DIR","SETTINGS_DIR","SUPPORTED_CLIENTS","Logger","checkGithubAuth","ConfigurationLoader","execAsync","__dirname","dirname","url","ConfigurationProvider","static","configPath","configuration","configLock","Promise","resolve","tempDir","constructor","this","join","localServerCategories","feeds","clientMCPSettings","getInstance","instance","withLock","operation","current","r","initialize","feedFile","settings","async","configDir","mkdir","recursive","rm","force","error","code","config","JSON","parse","readFile","saveConfiguration","loadFeedsIntoConfiguration","loadClientMCPSettings","writeFile","stringify","getServerCategories","getServerCategory","categoryName","find","s","name","getClientMcpSettings","getFeedConfiguration","getServerMcpConfig","serverName","mcpServers","getInstallationStatus","category","installationStatus","getServerStatus","status","serversStatus","getRequirementStatus","requirementName","requirementsStatus","updateInstallationStatus","requirementStatus","serverStatus","lastUpdated","Date","toISOString","updateRequirementStatus","updateRequirementOperationStatus","operationStatus","updateServerStatus","updateServerOperationStatus","clientName","installedStatus","isRequirementsReady","feedConfiguration","serverConfig","dependencies","requirements","requirementNames","map","every","reqStatus","installed","GetServerRequirementStatus","filter","x","undefined","isServerReady","clients","clientStatus","syncFeeds","repo","branch","log","debug","action","paths","localFeeds","repoUrl","repoBranch","cloneGitRepository","import","clonePath","sourceFeedsDir","feedsPath","access","err","Error","cp","downloadGithubRelease","version","downloadPath","repoName","feedAssetsName","reloadClientMCPSettings","removeServerFromClientMCPSettings","target","readJsonFile","writeJsonFile","clientEntries","Object","entries","targetClients","clientSettings","settingPath","process","env","CODE_INSIDERS","codeInsiderSettingPath","codeSettingPath","content","modified","mcp","servers","values","configProvider"],"sources":["../../../src/core/loaders/ConfigurationProvider.ts"],"mappings":"OAAOA,OAAQ,qBACRC,SAAU,cACRC,SAAY,uBACZC,cAAiB,cACjBC,kBAAqB,aACrBC,YAAaC,gBAAiBC,aAAcC,sBAAyB,mCACrEC,WAAc,+BACdC,oBAAuB,mCAYvBC,wBAA2B,2BAEpC,MAAMC,U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N,EAChBG,EAAcnC,QAAO,EAAEb,KAAgBA,IAAe6C,IACtDG,EAEN,IAAK,MAAOhD,EAAYoD,KAAmBD,EAAe,CACtD,MAAME,EAAcC,QAAQC,IAAIC,cAC1BJ,EAAeK,uBACfL,EAAeM,gBAErB,IACI,MAAMC,QAAgBb,EAAaO,GAAa,GAChD,IAAIO,GAAW,
|
|
1
|
+
{"version":3,"names":["fs","path","exec","promisify","fileURLToPath","GITHUB_REPO","LOCAL_FEEDS_DIR","SETTINGS_DIR","SUPPORTED_CLIENTS","Logger","checkGithubAuth","ConfigurationLoader","execAsync","__dirname","dirname","url","ConfigurationProvider","static","configPath","configuration","configLock","Promise","resolve","tempDir","constructor","this","join","localServerCategories","feeds","clientMCPSettings","getInstance","instance","withLock","operation","current","r","initialize","feedFile","settings","async","configDir","mkdir","recursive","rm","force","error","code","config","JSON","parse","readFile","saveConfiguration","loadFeedsIntoConfiguration","loadClientMCPSettings","writeFile","stringify","getServerCategories","getServerCategory","categoryName","find","s","name","getClientMcpSettings","getFeedConfiguration","getServerMcpConfig","serverName","mcpServers","getInstallationStatus","category","installationStatus","getServerStatus","status","serversStatus","getRequirementStatus","requirementName","requirementsStatus","updateInstallationStatus","requirementStatus","serverStatus","lastUpdated","Date","toISOString","updateRequirementStatus","updateRequirementOperationStatus","operationStatus","updateServerStatus","updateServerOperationStatus","clientName","installedStatus","isRequirementsReady","feedConfiguration","serverConfig","dependencies","requirements","requirementNames","map","every","reqStatus","installed","GetServerRequirementStatus","filter","x","undefined","isServerReady","clients","clientStatus","syncFeeds","repo","branch","log","debug","action","paths","localFeeds","repoUrl","repoBranch","cloneGitRepository","import","clonePath","sourceFeedsDir","feedsPath","access","err","Error","cp","downloadGithubRelease","version","downloadPath","repoName","feedAssetsName","reloadClientMCPSettings","removeServerFromClientMCPSettings","target","readJsonFile","writeJsonFile","clientEntries","Object","entries","targetClients","clientSettings","settingPath","process","env","CODE_INSIDERS","codeInsiderSettingPath","codeSettingPath","content","modified","mcp","servers","actualServerName","replace","values","configProvider"],"sources":["../../../src/core/loaders/ConfigurationProvider.ts"],"mappings":"OAAOA,OAAQ,qBACRC,SAAU,cACRC,SAAY,uBACZC,cAAiB,cACjBC,kBAAqB,aACrBC,YAAaC,gBAAiBC,aAAcC,sBAAyB,mCACrEC,WAAc,+BACdC,oBAAuB,mCAYvBC,wBAA2B,2BAEpC,MAAMC,UAAYT,UAAUD,MACtBW,UAAYZ,KAAKa,QAAQV,0BAA0BW,aAEnD,MAAOC,sBACDC,gBACAC,WACAC,cACAC,WAA4BC,QAAQC,UACpCC,QAER,WAAAC,GAEIC,KAAKP,WAAajB,KAAKyB,KAAKnB,aAAc,uBAC1CkB,KAAKN,cAAgB,CACjBQ,sBAAuB,GACvBC,MAAO,GACPC,kBAAmB,IAEvBJ,KAAKF,QAAUtB,KAAKyB,KAAKpB,gBAAiB,UAC9C,CAEO,kBAAOwB,GAIV,OAHKd,sBAAsBe,WACvBf,sBAAsBe,SAAW,IAAIf,uBAElCA,sBAAsBe,QACjC,CAEQ,cAAMC,CAAYC,GACtB,MAAMC,EAAUT,KAAKL,WACrB,IAAIE,EACJG,KAAKL,WAAa,IAAIC,SAAcc,GAAKb,EAAUa,IACnD,IAEI,aADMD,QACOD,GACjB,C,QACIX,GACJ,CACJ,CAEA,gBAAMc,CAAWC,EAAmBC,SAC1Bb,KAAKO,UAASO,UAChB,MAAMC,EAAYvC,KAAKa,QAAQW,KAAKP,kBAC9BlB,GAAGyC,MAAMD,EAAW,CAAEE,WAAW,IAEvC,UACU1C,GAAG2C,GAAGlB,KAAKP,WAAY,CAAEwB,WAAW,EAAME,OAAO,GAC3D,CAAE,MAAOC,GACL,GAA8C,WAAzCA,EAAgCC,KACjC,MAAMD,CAEd,CAEA,IACI,IACI,MAAME,EAASC,KAAKC,YAAYjD,GAAGkD,SAASzB,KAAKP,WAAY,SAC7DO,KAAKN,cAAgB4B,CACzB,CAAE,MAAOF,GACL,GAA8C,WAAzCA,EAAgCC,KACjC,M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B0E,EAAezE,WAAWD,GAEjC0E,EAAeU,UAAUpF,WAClB0E,EAAeU,QAAQpF,SAIpCxC,KAAK0B,mBACf,IAER,SAIG,MAAMsG,eAAiBzI,sBAAsBc","ignoreList":[]}
|
|
@@ -32,8 +32,12 @@ export declare const LOCAL_FEEDS_SCHEMA_DIR: string;
|
|
|
32
32
|
* Value: Client-specific settings or configuration details.
|
|
33
33
|
* TODO: Define actual client settings structure.
|
|
34
34
|
*/
|
|
35
|
+
/**
|
|
36
|
+
* Dynamically builds the SUPPORTED_CLIENTS object.
|
|
37
|
+
* If the OS is not Windows, the VisualStudio section is omitted.
|
|
38
|
+
*/
|
|
35
39
|
export declare const SUPPORTED_CLIENTS: Record<string, {
|
|
36
|
-
extension
|
|
40
|
+
extension?: {
|
|
37
41
|
extensionId: string;
|
|
38
42
|
leastVersion?: string;
|
|
39
43
|
repository?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import os from"os";import path from"path";export const GITHUB_REPO={url:"https://github.com/ai-microsoft/imcp-feed.git",repoName:"ai-microsoft/imcp-feed",feedsPath:"feeds",feedAssetsName:"imcp-feeds-${latest}.zip"};export const SETTINGS_DIR=(process.platform,path.join(os.homedir(),".imcp"));export const LOCAL_FEEDS_DIR=path.join(SETTINGS_DIR,"feeds");export const USER_INFO_PATH=path.join(SETTINGS_DIR,"settings","user_info.json");export const LOCAL_FEEDS_SCHEMA_DIR=path.join(LOCAL_FEEDS_DIR,"schemas");const CODE_STRORAGE_DIR=(()=>{switch(process.platform){case"win32":return path.join(os.homedir(),"AppData","Roaming","Code","User");case"darwin":return path.join(os.homedir(),"Library","Application Support","Code","User");default:return path.join(os.homedir(),".config","Code","User")}})(),CODE_INSIDER_STRORAGE_DIR=(()=>{switch(process.platform){case"win32":return path.join(os.homedir(),"AppData","Roaming","Code - Insiders","User");case"darwin":return path.join(os.homedir(),"Library","Application Support","Code - Insiders","User");default:return path.join(os.homedir(),".config","Code - Insiders","User")}})();export const SUPPORTED_CLIENTS={MSRooCode:{extension:{extensionId:"microsoftai.ms-roo-cline",leastVersion:"0.0.8",repository:"ai-microsoft/roo-cline",assetName:"ms-roo-cline-${version}.vsix",private:!0},codeSettingPath:path.join(CODE_STRORAGE_DIR,"globalStorage","microsoftai.ms-roo-cline","settings","cline_mcp_settings.json"),codeInsiderSettingPath:path.join(CODE_INSIDER_STRORAGE_DIR,"globalStorage","microsoftai.ms-roo-cline","settings","cline_mcp_settings.json")},Cline:{extension:{extensionId:"saoudrizwan.claude-dev"},codeSettingPath:path.join(CODE_STRORAGE_DIR,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),codeInsiderSettingPath:path.join(CODE_INSIDER_STRORAGE_DIR,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json")},GithubCopilot:{extension:{extensionId:"github.copilot"},codeSettingPath:path.join(CODE_STRORAGE_DIR,"settings.json"),codeInsiderSettingPath:path.join(CODE_INSIDER_STRORAGE_DIR,"settings.json")}};export const SUPPORTED_CLIENT_NAMES=Object.keys(SUPPORTED_CLIENTS);export const UPDATE_CHECK_INTERVAL_MS=6e5;
|
|
1
|
+
import os from"os";import path from"path";export const GITHUB_REPO={url:"https://github.com/ai-microsoft/imcp-feed.git",repoName:"ai-microsoft/imcp-feed",feedsPath:"feeds",feedAssetsName:"imcp-feeds-${latest}.zip"};export const SETTINGS_DIR=(process.platform,path.join(os.homedir(),".imcp"));export const LOCAL_FEEDS_DIR=path.join(SETTINGS_DIR,"feeds");export const USER_INFO_PATH=path.join(SETTINGS_DIR,"settings","user_info.json");export const LOCAL_FEEDS_SCHEMA_DIR=path.join(LOCAL_FEEDS_DIR,"schemas");const CODE_STRORAGE_DIR=(()=>{switch(process.platform){case"win32":return path.join(os.homedir(),"AppData","Roaming","Code","User");case"darwin":return path.join(os.homedir(),"Library","Application Support","Code","User");default:return path.join(os.homedir(),".config","Code","User")}})(),CODE_INSIDER_STRORAGE_DIR=(()=>{switch(process.platform){case"win32":return path.join(os.homedir(),"AppData","Roaming","Code - Insiders","User");case"darwin":return path.join(os.homedir(),"Library","Application Support","Code - Insiders","User");default:return path.join(os.homedir(),".config","Code - Insiders","User")}})();export const SUPPORTED_CLIENTS=(()=>{const o={MSRooCode:{extension:{extensionId:"microsoftai.ms-roo-cline",leastVersion:"0.0.8",repository:"ai-microsoft/roo-cline",assetName:"ms-roo-cline-${version}.vsix",private:!0},codeSettingPath:path.join(CODE_STRORAGE_DIR,"globalStorage","microsoftai.ms-roo-cline","settings","cline_mcp_settings.json"),codeInsiderSettingPath:path.join(CODE_INSIDER_STRORAGE_DIR,"globalStorage","microsoftai.ms-roo-cline","settings","cline_mcp_settings.json")},Cline:{extension:{extensionId:"saoudrizwan.claude-dev"},codeSettingPath:path.join(CODE_STRORAGE_DIR,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json"),codeInsiderSettingPath:path.join(CODE_INSIDER_STRORAGE_DIR,"globalStorage","saoudrizwan.claude-dev","settings","cline_mcp_settings.json")},GithubCopilot:{extension:{extensionId:"github.copilot"},codeSettingPath:path.join(CODE_STRORAGE_DIR,"settings.json"),codeInsiderSettingPath:path.join(CODE_INSIDER_STRORAGE_DIR,"settings.json")}};return"win32"===process.platform&&(o.VisualStudio={codeSettingPath:path.join(os.homedir(),".mcp.json"),codeInsiderSettingPath:path.join(os.homedir(),".mcp.json")}),o})();export const SUPPORTED_CLIENT_NAMES=Object.keys(SUPPORTED_CLIENTS);export const UPDATE_CHECK_INTERVAL_MS=6e5;
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["os","path","GITHUB_REPO","url","repoName","feedsPath","feedAssetsName","SETTINGS_DIR","process","platform","join","homedir","LOCAL_FEEDS_DIR","USER_INFO_PATH","LOCAL_FEEDS_SCHEMA_DIR","CODE_STRORAGE_DIR","CODE_INSIDER_STRORAGE_DIR","SUPPORTED_CLIENTS","MSRooCode","extension","extensionId","leastVersion","repository","assetName","private","codeSettingPath","codeInsiderSettingPath","Cline","GithubCopilot","SUPPORTED_CLIENT_NAMES","Object","keys","UPDATE_CHECK_INTERVAL_MS"],"sources":["../../../src/core/metadatas/constants.ts"],"mappings":"OAAOA,OAAQ,YACRC,SAAU,
|
|
1
|
+
{"version":3,"names":["os","path","GITHUB_REPO","url","repoName","feedsPath","feedAssetsName","SETTINGS_DIR","process","platform","join","homedir","LOCAL_FEEDS_DIR","USER_INFO_PATH","LOCAL_FEEDS_SCHEMA_DIR","CODE_STRORAGE_DIR","CODE_INSIDER_STRORAGE_DIR","SUPPORTED_CLIENTS","clients","MSRooCode","extension","extensionId","leastVersion","repository","assetName","private","codeSettingPath","codeInsiderSettingPath","Cline","GithubCopilot","SUPPORTED_CLIENT_NAMES","Object","keys","UPDATE_CHECK_INTERVAL_MS"],"sources":["../../../src/core/metadatas/constants.ts"],"mappings":"OAAOA,OAAQ,YACRC,SAAU,cAQV,MAAMC,YAAc,CACzBC,IAAK,gDACLC,SAAU,yBACVC,UAAW,QACXC,eAAgB,mCAMX,MAAMC,cACHC,QAAQC,SAILR,KAAKS,KAAKV,GAAGW,UAAW,iBAO9B,MAAMC,gBAAkBX,KAAKS,KAAKH,aAAc,gBAKhD,MAAMM,eAAiBZ,KAAKS,KAAKH,aAAc,WAAY,yBAK3D,MAAMO,uBAAyBb,KAAKS,KAAKE,gBAAiB,WAEjE,MAAMG,kBAAoB,MACxB,OAAQP,QAAQC,UACd,IAAK,QACH,OAAOR,KAAKS,KAAKV,GAAGW,UAAW,UAAW,UAAW,OAAQ,QAC/D,IAAK,SACH,OAAOV,KAAKS,KAAKV,GAAGW,UAAW,UAAW,sBAAuB,OAAQ,QAC3E,QACE,OAAOV,KAAKS,KAAKV,GAAGW,UAAW,UAAW,OAAQ,QAEvD,EATyB,GAWpBK,0BAA4B,MAChC,OAAQR,QAAQC,UACd,IAAK,QACH,OAAOR,KAAKS,KAAKV,GAAGW,UAAW,UAAW,UAAW,kBAAmB,QAC1E,IAAK,SACH,OAAOV,KAAKS,KAAKV,GAAGW,UAAW,UAAW,sBAAuB,kBAAmB,QACtF,QACE,OAAOV,KAAKS,KAAKV,GAAGW,UAAW,UAAW,kBAAmB,QAElE,EATiC,UAqB3B,MAAMM,kBAUR,MACH,MAAMC,EAA+B,CACnCC,UAAa,CACXC,UAAW,CACTC,YAAa,2BACbC,aAAc,QACdC,WAAY,yBACZC,UAAW,+BACXC,SAAS,GAEXC,gBAAiBzB,KAAKS,KAAKK,kBAAmB,gBAAiB,2BAA4B,WAAY,2BACvGY,uBAAwB1B,KAAKS,KAAKM,0BAA2B,gBAAiB,2BAA4B,WAAY,4BAExHY,MAAS,CACPR,UAAW,CACTC,YAAa,0BAEfK,gBAAiBzB,KAAKS,KAAKK,kBAAmB,gBAAiB,yBAA0B,WAAY,2BACrGY,uBAAwB1B,KAAKS,KAAKM,0BAA2B,gBAAiB,yBAA0B,WAAY,4BAEtHa,cAAiB,CACfT,UAAW,CACTC,YAAa,kBAEfK,gBAAiBzB,KAAKS,KAAKK,kBAAmB,iBAC9CY,uBAAwB1B,KAAKS,KAAKM,0BAA2B,mBAUjE,MANyB,UAArBR,QAAQC,WACVS,EAAsB,aAAI,CACxBQ,gBAAiBzB,KAAKS,KAAKV,GAAGW,UAAW,aACzCgB,uBAAwB1B,KAAKS,KAAKV,GAAGW,UAAW,eAG7CO,CACR,EApCI,UAyCE,MAAMY,uBAAyBC,OAAOC,KAAKf,0BAM3C,MAAMgB,yBAA2B","ignoreList":[]}
|
|
@@ -40,6 +40,8 @@ export declare const STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION = "Checking and ins
|
|
|
40
40
|
export declare const STEP_SETUP_INSTALLATION_CONFIG = "Setting up installation configuration";
|
|
41
41
|
/** Step for updating VS Code settings for the client/server. */
|
|
42
42
|
export declare const STEP_UPDATE_VSCODE_SETTINGS = "Updating VS Code settings for client/server";
|
|
43
|
+
/** Step for updating VS settings for the client/server. */
|
|
44
|
+
export declare const STEP_UPDATE_VS_SETTINGS = "Updating VS settings for client/server";
|
|
43
45
|
/** Step for the overall installation process of a client or server. */
|
|
44
46
|
export declare const STEP_INSTALLATION = "Running overall installation process";
|
|
45
47
|
/** Step for marking the initiation of an onboarding or installation process. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const STEP_PROCESS_REQUIREMENT_UPDATES="Processing all requirement updates";export const STEP_CHECKING_REQUIREMENT_STATUS="Checking the status of requirement";export const STEP_INSTALLING_REQUIREMENTS_IN_BACKGROUND="Installing requirements in the background";export const STEP_NUGET_INSTALLER_INSTALL="Running install in NugetInstaller";export const STEP_CHECK_AND_INSTALL_REQUIREMENTS="Checking and installing all requirements";export const STEP_COMMAND_INSTALLER_INSTALL="Running install in CommandInstaller";export const STEP_GENERAL_INSTALLER_INSTALL="Running install in GeneralInstaller";export const STEP_INSTALLATION_COMMAND_EXECUTION="Executing installation command for requirement";export const STEP_PIP_INSTALLER_INSTALL="Running install in PipInstaller";export const STEP_PROCESS_REQUIREMENT_UPDATES_SERVICE="Processing requirement updates in RequirementService";export const STEP_CHECK_SERVER_READINESS="Checking server readiness after installation";export const STEP_NPM_INSTALLER_INSTALL="Running install in NpmInstaller";export const STEP_INSTALL_REQUIREMENT_PREFIX="Updating requirement:";export const STEP_INSTALL_COMMAND_PREFIX="Executing installation command for:";export const STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION="Checking and installing VS Code extension for client";export const STEP_SETUP_INSTALLATION_CONFIG="Setting up installation configuration";export const STEP_UPDATE_VSCODE_SETTINGS="Updating VS Code settings for client/server";export const STEP_INSTALLATION="Running overall installation process";export const STEP_INITIATED="Initiating onboarding or installation process";
|
|
1
|
+
export const STEP_PROCESS_REQUIREMENT_UPDATES="Processing all requirement updates";export const STEP_CHECKING_REQUIREMENT_STATUS="Checking the status of requirement";export const STEP_INSTALLING_REQUIREMENTS_IN_BACKGROUND="Installing requirements in the background";export const STEP_NUGET_INSTALLER_INSTALL="Running install in NugetInstaller";export const STEP_CHECK_AND_INSTALL_REQUIREMENTS="Checking and installing all requirements";export const STEP_COMMAND_INSTALLER_INSTALL="Running install in CommandInstaller";export const STEP_GENERAL_INSTALLER_INSTALL="Running install in GeneralInstaller";export const STEP_INSTALLATION_COMMAND_EXECUTION="Executing installation command for requirement";export const STEP_PIP_INSTALLER_INSTALL="Running install in PipInstaller";export const STEP_PROCESS_REQUIREMENT_UPDATES_SERVICE="Processing requirement updates in RequirementService";export const STEP_CHECK_SERVER_READINESS="Checking server readiness after installation";export const STEP_NPM_INSTALLER_INSTALL="Running install in NpmInstaller";export const STEP_INSTALL_REQUIREMENT_PREFIX="Updating requirement:";export const STEP_INSTALL_COMMAND_PREFIX="Executing installation command for:";export const STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION="Checking and installing VS Code extension for client";export const STEP_SETUP_INSTALLATION_CONFIG="Setting up installation configuration";export const STEP_UPDATE_VSCODE_SETTINGS="Updating VS Code settings for client/server";export const STEP_UPDATE_VS_SETTINGS="Updating VS settings for client/server";export const STEP_INSTALLATION="Running overall installation process";export const STEP_INITIATED="Initiating onboarding or installation process";
|
|
2
2
|
//# sourceMappingURL=recordingConstants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["STEP_PROCESS_REQUIREMENT_UPDATES","STEP_CHECKING_REQUIREMENT_STATUS","STEP_INSTALLING_REQUIREMENTS_IN_BACKGROUND","STEP_NUGET_INSTALLER_INSTALL","STEP_CHECK_AND_INSTALL_REQUIREMENTS","STEP_COMMAND_INSTALLER_INSTALL","STEP_GENERAL_INSTALLER_INSTALL","STEP_INSTALLATION_COMMAND_EXECUTION","STEP_PIP_INSTALLER_INSTALL","STEP_PROCESS_REQUIREMENT_UPDATES_SERVICE","STEP_CHECK_SERVER_READINESS","STEP_NPM_INSTALLER_INSTALL","STEP_INSTALL_REQUIREMENT_PREFIX","STEP_INSTALL_COMMAND_PREFIX","STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION","STEP_SETUP_INSTALLATION_CONFIG","STEP_UPDATE_VSCODE_SETTINGS","STEP_INSTALLATION","STEP_INITIATED"],"sources":["../../../src/core/metadatas/recordingConstants.ts"],"mappings":"OAUO,MAAMA,iCAAmC,4CAGzC,MAAMC,iCAAmC,4CAGzC,MAAMC,2CAA6C,mDAGnD,MAAMC,6BAA+B,2CAGrC,MAAMC,oCAAsC,kDAG5C,MAAMC,+BAAiC,6CAGvC,MAAMC,+BAAiC,6CAGvC,MAAMC,oCAAsC,wDAG5C,MAAMC,2BAA6B,yCAGnC,MAAMC,yCAA2C,8DAGjD,MAAMC,4BAA8B,sDAGpC,MAAMC,2BAA6B,yCAGnC,MAAMC,gCAAkC,+BAGxC,MAAMC,4BAA8B,6CAGpC,MAAMC,wCAA0C,8DAGhD,MAAMC,+BAAiC,+CAGvC,MAAMC,4BAA8B,qDAGpC,MAAMC,kBAAoB,8CAG1B,MAAMC,eAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["STEP_PROCESS_REQUIREMENT_UPDATES","STEP_CHECKING_REQUIREMENT_STATUS","STEP_INSTALLING_REQUIREMENTS_IN_BACKGROUND","STEP_NUGET_INSTALLER_INSTALL","STEP_CHECK_AND_INSTALL_REQUIREMENTS","STEP_COMMAND_INSTALLER_INSTALL","STEP_GENERAL_INSTALLER_INSTALL","STEP_INSTALLATION_COMMAND_EXECUTION","STEP_PIP_INSTALLER_INSTALL","STEP_PROCESS_REQUIREMENT_UPDATES_SERVICE","STEP_CHECK_SERVER_READINESS","STEP_NPM_INSTALLER_INSTALL","STEP_INSTALL_REQUIREMENT_PREFIX","STEP_INSTALL_COMMAND_PREFIX","STEP_CHECK_VSCODE_AND_INSTALL_EXTENSION","STEP_SETUP_INSTALLATION_CONFIG","STEP_UPDATE_VSCODE_SETTINGS","STEP_UPDATE_VS_SETTINGS","STEP_INSTALLATION","STEP_INITIATED"],"sources":["../../../src/core/metadatas/recordingConstants.ts"],"mappings":"OAUO,MAAMA,iCAAmC,4CAGzC,MAAMC,iCAAmC,4CAGzC,MAAMC,2CAA6C,mDAGnD,MAAMC,6BAA+B,2CAGrC,MAAMC,oCAAsC,kDAG5C,MAAMC,+BAAiC,6CAGvC,MAAMC,+BAAiC,6CAGvC,MAAMC,oCAAsC,wDAG5C,MAAMC,2BAA6B,yCAGnC,MAAMC,yCAA2C,8DAGjD,MAAMC,4BAA8B,sDAGpC,MAAMC,2BAA6B,yCAGnC,MAAMC,gCAAkC,+BAGxC,MAAMC,4BAA8B,6CAGpC,MAAMC,wCAA0C,8DAGhD,MAAMC,+BAAiC,+CAGvC,MAAMC,4BAA8B,qDAGpC,MAAMC,wBAA0B,gDAGhC,MAAMC,kBAAoB,8CAG1B,MAAMC,eAAiB","ignoreList":[]}
|