MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / parseVarStr

Function parseVarStr

src/shared/Util.ts:325–335  ·  view source on GitHub ↗
(str: string, config?: AppConfigData)

Source from the content-addressed store, hash-verified

323// @TODO: Make better variables. Why are we using cwd() ?
324/* istanbul ignore next */
325export function parseVarStr(str: string, config?: AppConfigData) {
326 return parseVariableString(str, (name) => {
327 switch (name) {
328 case 'os': return process.platform;
329 case 'arch': return process.arch;
330 case 'cwd': return fixSlashes(process.cwd());
331 case 'fpPath': return config ? fixSlashes(config.flashpointPath) : '';
332 default: return '';
333 }
334 });
335}
336
337const errorProxySymbol = Symbol('Error Proxy');
338const errorProxyValue = {}; // Unique pointer

Callers 5

overwritePreferenceDataFunction · 0.90
overwriteConfigDataFunction · 0.90
parseServiceFileDataFunction · 0.90
parseBackProcessInfoFunction · 0.90
parseExecMappingFunction · 0.90

Calls 2

parseVariableStringFunction · 0.90
fixSlashesFunction · 0.85

Tested by

no test coverage detected