omnius 1.0.899 → 1.0.900

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.
@@ -57172,7 +57172,7 @@ var require_util = __commonJS({
57172
57172
  return path3;
57173
57173
  }
57174
57174
  exports.normalize = normalize;
57175
- function join20(aRoot, aPath) {
57175
+ function join21(aRoot, aPath) {
57176
57176
  if (aRoot === "") {
57177
57177
  aRoot = ".";
57178
57178
  }
@@ -57204,7 +57204,7 @@ var require_util = __commonJS({
57204
57204
  }
57205
57205
  return joined;
57206
57206
  }
57207
- exports.join = join20;
57207
+ exports.join = join21;
57208
57208
  exports.isAbsolute = function(aPath) {
57209
57209
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
57210
57210
  };
@@ -57377,7 +57377,7 @@ var require_util = __commonJS({
57377
57377
  parsed.path = parsed.path.substring(0, index + 1);
57378
57378
  }
57379
57379
  }
57380
- sourceURL = join20(urlGenerate(parsed), sourceURL);
57380
+ sourceURL = join21(urlGenerate(parsed), sourceURL);
57381
57381
  }
57382
57382
  return normalize(sourceURL);
57383
57383
  }
@@ -64716,7 +64716,7 @@ ${lanes.join("\n")}
64716
64716
  recursionIdentityMap.set(recursionIdentity, recursionToken);
64717
64717
  }
64718
64718
  }
64719
- const descriptor = {
64719
+ const descriptor2 = {
64720
64720
  id: type.id,
64721
64721
  intrinsicName: type.intrinsicName,
64722
64722
  symbolName: (symbol == null ? void 0 : symbol.escapedName) && unescapeLeadingUnderscores(symbol.escapedName),
@@ -64737,7 +64737,7 @@ ${lanes.join("\n")}
64737
64737
  flags: Debug.formatTypeFlags(type.flags).split("|"),
64738
64738
  display
64739
64739
  };
64740
- fs.writeSync(typesFd, JSON.stringify(descriptor));
64740
+ fs.writeSync(typesFd, JSON.stringify(descriptor2));
64741
64741
  if (i < numTypes - 1) {
64742
64742
  fs.writeSync(typesFd, ",\n");
64743
64743
  }
@@ -90487,7 +90487,7 @@ ${lanes.join("\n")}
90487
90487
  /* AdviseOnEmitNode */
90488
90488
  );
90489
90489
  }
90490
- function createDecorateHelper(decoratorExpressions, target, memberName, descriptor) {
90490
+ function createDecorateHelper(decoratorExpressions, target, memberName, descriptor2) {
90491
90491
  context.requestEmitHelper(decorateHelper);
90492
90492
  const argumentsArray = [];
90493
90493
  argumentsArray.push(factory2.createArrayLiteralExpression(
@@ -90498,8 +90498,8 @@ ${lanes.join("\n")}
90498
90498
  argumentsArray.push(target);
90499
90499
  if (memberName) {
90500
90500
  argumentsArray.push(memberName);
90501
- if (descriptor) {
90502
- argumentsArray.push(descriptor);
90501
+ if (descriptor2) {
90502
+ argumentsArray.push(descriptor2);
90503
90503
  }
90504
90504
  }
90505
90505
  return factory2.createCallExpression(
@@ -105292,7 +105292,7 @@ ${lanes.join("\n")}
105292
105292
  const pathOptions = { configFilePath: getNormalizedAbsolutePath(configFileName, host.getCurrentDirectory()), useCaseSensitiveFileNames: host.useCaseSensitiveFileNames };
105293
105293
  const optionMap = serializeCompilerOptions(configParseResult.options, pathOptions);
105294
105294
  const watchOptionMap = configParseResult.watchOptions && serializeWatchOptions(configParseResult.watchOptions);
105295
- const config = {
105295
+ const config2 = {
105296
105296
  compilerOptions: {
105297
105297
  ...optionMapToObject(optionMap),
105298
105298
  showConfig: void 0,
@@ -105326,8 +105326,8 @@ ${lanes.join("\n")}
105326
105326
  }
105327
105327
  }
105328
105328
  }
105329
- assign(config.compilerOptions, optionMapToObject(serializeCompilerOptions(impliedCompilerOptions, pathOptions)));
105330
- return config;
105329
+ assign(config2.compilerOptions, optionMapToObject(serializeCompilerOptions(impliedCompilerOptions, pathOptions)));
105330
+ return config2;
105331
105331
  }
105332
105332
  function optionDependsOn(option, dependsOn) {
105333
105333
  const seen = /* @__PURE__ */ new Set();
@@ -105941,8 +105941,8 @@ ${lanes.join("\n")}
105941
105941
  function shouldReportNoInputFiles(fileNames, canJsonReportNoInutFiles, resolutionStack) {
105942
105942
  return fileNames.length === 0 && canJsonReportNoInutFiles && (!resolutionStack || resolutionStack.length === 0);
105943
105943
  }
105944
- function isSolutionConfig(config) {
105945
- return !config.fileNames.length && hasProperty(config.raw, "references");
105944
+ function isSolutionConfig(config2) {
105945
+ return !config2.fileNames.length && hasProperty(config2.raw, "references");
105946
105946
  }
105947
105947
  function canJsonReportNoInputFiles(raw) {
105948
105948
  return !hasProperty(raw, "files") && !hasProperty(raw, "references");
@@ -169059,8 +169059,8 @@ ${lanes.join("\n")}
169059
169059
  return expression;
169060
169060
  } else {
169061
169061
  const name = isComputedPropertyName(propertyName) ? propertyName.expression : isIdentifier(propertyName) ? factory2.createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) : propertyName;
169062
- const descriptor = factory2.createPropertyDescriptor({ value: initializer, configurable: true, writable: true, enumerable: true });
169063
- return factory2.createObjectDefinePropertyCall(receiver, name, descriptor);
169062
+ const descriptor2 = factory2.createPropertyDescriptor({ value: initializer, configurable: true, writable: true, enumerable: true });
169063
+ return factory2.createObjectDefinePropertyCall(receiver, name, descriptor2);
169064
169064
  }
169065
169065
  }
169066
169066
  function enableSubstitutionForClassAliases() {
@@ -170384,12 +170384,12 @@ ${lanes.join("\n")}
170384
170384
  /* Ambient */
170385
170385
  )
170386
170386
  );
170387
- const descriptor = isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull();
170387
+ const descriptor2 = isPropertyDeclaration(member) && !hasAccessorModifier(member) ? factory2.createVoidZero() : factory2.createNull();
170388
170388
  const helper = emitHelpers().createDecorateHelper(
170389
170389
  decoratorExpressions,
170390
170390
  prefix,
170391
170391
  memberName,
170392
- descriptor
170392
+ descriptor2
170393
170393
  );
170394
170394
  setEmitFlags(
170395
170395
  helper,
@@ -171576,13 +171576,13 @@ ${lanes.join("\n")}
171576
171576
  if (isMethodOrAccessor(member)) {
171577
171577
  const methodExtraInitializersName = isStatic(member) ? classInfo2.staticMethodExtraInitializersName : classInfo2.instanceMethodExtraInitializersName;
171578
171578
  Debug.assertIsDefined(methodExtraInitializersName);
171579
- let descriptor;
171579
+ let descriptor2;
171580
171580
  if (isPrivateIdentifierClassElementDeclaration(member) && createDescriptor) {
171581
- descriptor = createDescriptor(member, visitNodes2(modifiers, (node) => tryCast(node, isAsyncModifier), isModifier));
171581
+ descriptor2 = createDescriptor(member, visitNodes2(modifiers, (node) => tryCast(node, isAsyncModifier), isModifier));
171582
171582
  memberInfo.memberDescriptorName = descriptorName = createHelperVariable(member, "descriptor");
171583
- descriptor = factory2.createAssignment(descriptorName, descriptor);
171583
+ descriptor2 = factory2.createAssignment(descriptorName, descriptor2);
171584
171584
  }
171585
- const esDecorateExpression = emitHelpers().createESDecorateHelper(factory2.createThis(), descriptor ?? factory2.createNull(), memberDecoratorsName, context2, factory2.createNull(), methodExtraInitializersName);
171585
+ const esDecorateExpression = emitHelpers().createESDecorateHelper(factory2.createThis(), descriptor2 ?? factory2.createNull(), memberDecoratorsName, context2, factory2.createNull(), methodExtraInitializersName);
171586
171586
  const esDecorateStatement = factory2.createExpressionStatement(esDecorateExpression);
171587
171587
  setSourceMapRange(esDecorateStatement, moveRangePastDecorators(member));
171588
171588
  statements.push(esDecorateStatement);
@@ -171592,19 +171592,19 @@ ${lanes.join("\n")}
171592
171592
  if (isStatic(member)) {
171593
171593
  thisArg = classInfo2.classThis;
171594
171594
  }
171595
- let descriptor;
171595
+ let descriptor2;
171596
171596
  if (isPrivateIdentifierClassElementDeclaration(member) && hasAccessorModifier(member) && createDescriptor) {
171597
- descriptor = createDescriptor(
171597
+ descriptor2 = createDescriptor(
171598
171598
  member,
171599
171599
  /*modifiers*/
171600
171600
  void 0
171601
171601
  );
171602
171602
  memberInfo.memberDescriptorName = descriptorName = createHelperVariable(member, "descriptor");
171603
- descriptor = factory2.createAssignment(descriptorName, descriptor);
171603
+ descriptor2 = factory2.createAssignment(descriptorName, descriptor2);
171604
171604
  }
171605
171605
  const esDecorateExpression = emitHelpers().createESDecorateHelper(
171606
171606
  isAutoAccessorPropertyDeclaration(member) ? factory2.createThis() : factory2.createNull(),
171607
- descriptor ?? factory2.createNull(),
171607
+ descriptor2 ?? factory2.createNull(),
171608
171608
  memberDecoratorsName,
171609
171609
  context2,
171610
171610
  initializersName,
@@ -203302,12 +203302,12 @@ ${lanes.join("\n")}
203302
203302
  missingFilesMap = void 0;
203303
203303
  }
203304
203304
  if (parsedConfigs) {
203305
- clearMap(parsedConfigs, (config) => {
203305
+ clearMap(parsedConfigs, (config2) => {
203306
203306
  var _a3;
203307
- (_a3 = config.watcher) == null ? void 0 : _a3.close();
203308
- config.watcher = void 0;
203309
- if (config.watchedDirectories) clearMap(config.watchedDirectories, closeFileWatcherOf);
203310
- config.watchedDirectories = void 0;
203307
+ (_a3 = config2.watcher) == null ? void 0 : _a3.close();
203308
+ config2.watcher = void 0;
203309
+ if (config2.watchedDirectories) clearMap(config2.watchedDirectories, closeFileWatcherOf);
203310
+ config2.watchedDirectories = void 0;
203311
203311
  });
203312
203312
  parsedConfigs = void 0;
203313
203313
  }
@@ -203380,8 +203380,8 @@ ${lanes.join("\n")}
203380
203380
  watchConfigFileWildCardDirectories();
203381
203381
  if (configFileName) updateExtendedConfigFilesWatches(toPath3(configFileName), compilerOptions, watchOptions, WatchType.ExtendedConfigFile);
203382
203382
  } else {
203383
- const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203384
- if (config) watchReferencedProject(configFile, configPath, config);
203383
+ const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203384
+ if (config2) watchReferencedProject(configFile, configPath, config2);
203385
203385
  }
203386
203386
  });
203387
203387
  staleWatches = void 0;
@@ -203625,30 +203625,30 @@ ${lanes.join("\n")}
203625
203625
  }
203626
203626
  function getParsedCommandLine(configFileName2) {
203627
203627
  const configPath = toPath3(configFileName2);
203628
- let config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203629
- if (config) {
203630
- if (!config.updateLevel) return config.parsedCommandLine;
203631
- if (config.parsedCommandLine && config.updateLevel === 1 && !host.getParsedCommandLine) {
203628
+ let config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203629
+ if (config2) {
203630
+ if (!config2.updateLevel) return config2.parsedCommandLine;
203631
+ if (config2.parsedCommandLine && config2.updateLevel === 1 && !host.getParsedCommandLine) {
203632
203632
  writeLog("Reloading new file names and options");
203633
203633
  Debug.assert(compilerOptions);
203634
203634
  const fileNames = getFileNamesFromConfigSpecs(
203635
- config.parsedCommandLine.options.configFile.configFileSpecs,
203635
+ config2.parsedCommandLine.options.configFile.configFileSpecs,
203636
203636
  getNormalizedAbsolutePath(getDirectoryPath(configFileName2), currentDirectory),
203637
203637
  compilerOptions,
203638
203638
  parseConfigFileHost
203639
203639
  );
203640
- config.parsedCommandLine = { ...config.parsedCommandLine, fileNames };
203641
- config.updateLevel = void 0;
203642
- return config.parsedCommandLine;
203640
+ config2.parsedCommandLine = { ...config2.parsedCommandLine, fileNames };
203641
+ config2.updateLevel = void 0;
203642
+ return config2.parsedCommandLine;
203643
203643
  }
203644
203644
  }
203645
203645
  writeLog(`Loading config file: ${configFileName2}`);
203646
203646
  const parsedCommandLine = host.getParsedCommandLine ? host.getParsedCommandLine(configFileName2) : getParsedCommandLineFromConfigFileHost(configFileName2);
203647
- if (config) {
203648
- config.parsedCommandLine = parsedCommandLine;
203649
- config.updateLevel = void 0;
203647
+ if (config2) {
203648
+ config2.parsedCommandLine = parsedCommandLine;
203649
+ config2.updateLevel = void 0;
203650
203650
  } else {
203651
- (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config = { parsedCommandLine });
203651
+ (parsedConfigs || (parsedConfigs = /* @__PURE__ */ new Map())).set(configPath, config2 = { parsedCommandLine });
203652
203652
  }
203653
203653
  (staleWatches ?? (staleWatches = /* @__PURE__ */ new Map())).set(configPath, configFileName2);
203654
203654
  return parsedCommandLine;
@@ -203670,11 +203670,11 @@ ${lanes.join("\n")}
203670
203670
  function onReleaseParsedCommandLine(fileName) {
203671
203671
  var _a3;
203672
203672
  const path3 = toPath3(fileName);
203673
- const config = parsedConfigs == null ? void 0 : parsedConfigs.get(path3);
203674
- if (!config) return;
203673
+ const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(path3);
203674
+ if (!config2) return;
203675
203675
  parsedConfigs.delete(path3);
203676
- if (config.watchedDirectories) clearMap(config.watchedDirectories, closeFileWatcherOf);
203677
- (_a3 = config.watcher) == null ? void 0 : _a3.close();
203676
+ if (config2.watchedDirectories) clearMap(config2.watchedDirectories, closeFileWatcherOf);
203677
+ (_a3 = config2.watcher) == null ? void 0 : _a3.close();
203678
203678
  clearSharedExtendedConfigFileWatcher(path3, sharedExtendedConfigFileWatchers);
203679
203679
  }
203680
203680
  function watchFilePath(path3, file, callback, pollingInterval, options, watchType) {
@@ -203770,8 +203770,8 @@ ${lanes.join("\n")}
203770
203770
  if (configFileName && toPath3(configFileName) === projectPath) {
203771
203771
  updateLevel = 2;
203772
203772
  } else {
203773
- const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath);
203774
- if (config) config.updateLevel = 2;
203773
+ const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath);
203774
+ if (config2) config2.updateLevel = 2;
203775
203775
  resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath);
203776
203776
  }
203777
203777
  scheduleProgramUpdate();
@@ -203790,8 +203790,8 @@ ${lanes.join("\n")}
203790
203790
  configFileName2,
203791
203791
  (_fileName, eventKind) => {
203792
203792
  updateCachedSystemWithFile(configFileName2, configPath, eventKind);
203793
- const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203794
- if (config) config.updateLevel = 2;
203793
+ const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203794
+ if (config2) config2.updateLevel = 2;
203795
203795
  resolutionCache.removeResolutionsFromProjectReferenceRedirects(configPath);
203796
203796
  scheduleProgramUpdate();
203797
203797
  },
@@ -203812,22 +203812,22 @@ ${lanes.join("\n")}
203812
203812
  cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
203813
203813
  }
203814
203814
  nextSourceFileVersion(fileOrDirectoryPath);
203815
- const config = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203816
- if (!(config == null ? void 0 : config.parsedCommandLine)) return;
203815
+ const config2 = parsedConfigs == null ? void 0 : parsedConfigs.get(configPath);
203816
+ if (!(config2 == null ? void 0 : config2.parsedCommandLine)) return;
203817
203817
  if (isIgnoredFileFromWildCardWatching({
203818
203818
  watchedDirPath: toPath3(directory),
203819
203819
  fileOrDirectory,
203820
203820
  fileOrDirectoryPath,
203821
203821
  configFileName: configFileName2,
203822
- options: config.parsedCommandLine.options,
203823
- program: config.parsedCommandLine.fileNames,
203822
+ options: config2.parsedCommandLine.options,
203823
+ program: config2.parsedCommandLine.fileNames,
203824
203824
  currentDirectory,
203825
203825
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
203826
203826
  writeLog,
203827
203827
  toPath: toPath3
203828
203828
  })) return;
203829
- if (config.updateLevel !== 2) {
203830
- config.updateLevel = 1;
203829
+ if (config2.updateLevel !== 2) {
203830
+ config2.updateLevel = 1;
203831
203831
  scheduleProgramUpdate();
203832
203832
  }
203833
203833
  },
@@ -204318,29 +204318,29 @@ ${lanes.join("\n")}
204318
204318
  state.projectPendingBuild.delete(projectPath);
204319
204319
  return state.diagnostics.has(projectPath) ? 1 : 0;
204320
204320
  }
204321
- function createUpdateOutputFileStampsProject(state, project, projectPath, config, buildOrder) {
204321
+ function createUpdateOutputFileStampsProject(state, project, projectPath, config2, buildOrder) {
204322
204322
  let updateOutputFileStampsPending = true;
204323
204323
  return {
204324
204324
  kind: 1,
204325
204325
  project,
204326
204326
  projectPath,
204327
204327
  buildOrder,
204328
- getCompilerOptions: () => config.options,
204328
+ getCompilerOptions: () => config2.options,
204329
204329
  getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(),
204330
204330
  updateOutputFileStatmps: () => {
204331
- updateOutputTimestamps(state, config, projectPath);
204331
+ updateOutputTimestamps(state, config2, projectPath);
204332
204332
  updateOutputFileStampsPending = false;
204333
204333
  },
204334
204334
  done: () => {
204335
204335
  if (updateOutputFileStampsPending) {
204336
- updateOutputTimestamps(state, config, projectPath);
204336
+ updateOutputTimestamps(state, config2, projectPath);
204337
204337
  }
204338
204338
  mark("SolutionBuilder::Timestamps only updates");
204339
204339
  return doneInvalidatedProject(state, projectPath);
204340
204340
  }
204341
204341
  };
204342
204342
  }
204343
- function createBuildOrUpdateInvalidedProject(state, project, projectPath, projectIndex, config, status, buildOrder) {
204343
+ function createBuildOrUpdateInvalidedProject(state, project, projectPath, projectIndex, config2, status, buildOrder) {
204344
204344
  let step = 0;
204345
204345
  let program;
204346
204346
  let buildResult;
@@ -204349,7 +204349,7 @@ ${lanes.join("\n")}
204349
204349
  project,
204350
204350
  projectPath,
204351
204351
  buildOrder,
204352
- getCompilerOptions: () => config.options,
204352
+ getCompilerOptions: () => config2.options,
204353
204353
  getCurrentDirectory: () => state.compilerHost.getCurrentDirectory(),
204354
204354
  getBuilderProgram: () => withProgramOrUndefined(identity),
204355
204355
  getProgram: () => withProgramOrUndefined(
@@ -204421,23 +204421,23 @@ ${lanes.join("\n")}
204421
204421
  return;
204422
204422
  }
204423
204423
  if (state.options.verbose) reportStatus(state, Diagnostics.Building_project_0, project);
204424
- if (config.fileNames.length === 0) {
204425
- reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
204424
+ if (config2.fileNames.length === 0) {
204425
+ reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config2));
204426
204426
  buildResult = 0;
204427
204427
  step = 2;
204428
204428
  return;
204429
204429
  }
204430
204430
  const { host, compilerHost } = state;
204431
- state.projectCompilerOptions = config.options;
204432
- (_a3 = state.moduleResolutionCache) == null ? void 0 : _a3.update(config.options);
204433
- (_b = state.typeReferenceDirectiveResolutionCache) == null ? void 0 : _b.update(config.options);
204431
+ state.projectCompilerOptions = config2.options;
204432
+ (_a3 = state.moduleResolutionCache) == null ? void 0 : _a3.update(config2.options);
204433
+ (_b = state.typeReferenceDirectiveResolutionCache) == null ? void 0 : _b.update(config2.options);
204434
204434
  program = host.createProgram(
204435
- config.fileNames,
204436
- config.options,
204435
+ config2.fileNames,
204436
+ config2.options,
204437
204437
  compilerHost,
204438
- getOldProgram(state, projectPath, config),
204439
- getConfigFileParsingDiagnostics(config),
204440
- config.projectReferences
204438
+ getOldProgram(state, projectPath, config2),
204439
+ getConfigFileParsingDiagnostics(config2),
204440
+ config2.projectReferences
204441
204441
  );
204442
204442
  if (state.watch) {
204443
204443
  const internalMap = (_c = state.moduleResolutionCache) == null ? void 0 : _c.getPackageJsonInfoCache().getInternalMap();
@@ -204512,7 +204512,7 @@ ${lanes.join("\n")}
204512
204512
  customTransformers || ((_b = (_a3 = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a3, project))
204513
204513
  );
204514
204514
  if ((!options.noEmitOnError || !diagnostics.length) && (emittedOutputs.size || status.type !== 8)) {
204515
- updateOutputTimestampsWorker(state, config, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
204515
+ updateOutputTimestampsWorker(state, config2, projectPath, Diagnostics.Updating_unchanged_output_timestamps_of_project_0, emittedOutputs);
204516
204516
  }
204517
204517
  state.projectErrorsReported.set(projectPath, true);
204518
204518
  buildResult = ((_c = program.hasChangedEmitSignature) == null ? void 0 : _c.call(program)) ? 0 : 2;
@@ -204520,7 +204520,7 @@ ${lanes.join("\n")}
204520
204520
  state.diagnostics.delete(projectPath);
204521
204521
  state.projectStatus.set(projectPath, {
204522
204522
  type: 1,
204523
- oldestOutputFileName: firstOrUndefinedIterator(emittedOutputs.values()) ?? getFirstProjectOutput(config, !host.useCaseSensitiveFileNames())
204523
+ oldestOutputFileName: firstOrUndefinedIterator(emittedOutputs.values()) ?? getFirstProjectOutput(config2, !host.useCaseSensitiveFileNames())
204524
204524
  });
204525
204525
  } else {
204526
204526
  state.diagnostics.set(projectPath, diagnostics);
@@ -204542,7 +204542,7 @@ ${lanes.join("\n")}
204542
204542
  emit(writeFile2, cancellationToken, customTransformers);
204543
204543
  break;
204544
204544
  case 2:
204545
- queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult));
204545
+ queueReferencingProjects(state, project, projectPath, projectIndex, config2, buildOrder, Debug.checkDefined(buildResult));
204546
204546
  step++;
204547
204547
  break;
204548
204548
  // Should never be done
@@ -204567,35 +204567,35 @@ ${lanes.join("\n")}
204567
204567
  reportQueue = false;
204568
204568
  reportBuildQueue(state, buildOrder);
204569
204569
  }
204570
- const config = parseConfigFile(state, project, projectPath);
204571
- if (!config) {
204570
+ const config2 = parseConfigFile(state, project, projectPath);
204571
+ if (!config2) {
204572
204572
  reportParseConfigFileDiagnostic(state, projectPath);
204573
204573
  projectPendingBuild.delete(projectPath);
204574
204574
  continue;
204575
204575
  }
204576
204576
  if (updateLevel === 2) {
204577
- watchConfigFile(state, project, projectPath, config);
204578
- watchExtendedConfigFiles(state, projectPath, config);
204579
- watchWildCardDirectories(state, project, projectPath, config);
204580
- watchInputFiles(state, project, projectPath, config);
204581
- watchPackageJsonFiles(state, project, projectPath, config);
204577
+ watchConfigFile(state, project, projectPath, config2);
204578
+ watchExtendedConfigFiles(state, projectPath, config2);
204579
+ watchWildCardDirectories(state, project, projectPath, config2);
204580
+ watchInputFiles(state, project, projectPath, config2);
204581
+ watchPackageJsonFiles(state, project, projectPath, config2);
204582
204582
  } else if (updateLevel === 1) {
204583
- config.fileNames = getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, getDirectoryPath(project), config.options, state.parseConfigFileHost);
204583
+ config2.fileNames = getFileNamesFromConfigSpecs(config2.options.configFile.configFileSpecs, getDirectoryPath(project), config2.options, state.parseConfigFileHost);
204584
204584
  updateErrorForNoInputFiles(
204585
- config.fileNames,
204585
+ config2.fileNames,
204586
204586
  project,
204587
- config.options.configFile.configFileSpecs,
204588
- config.errors,
204589
- canJsonReportNoInputFiles(config.raw)
204587
+ config2.options.configFile.configFileSpecs,
204588
+ config2.errors,
204589
+ canJsonReportNoInputFiles(config2.raw)
204590
204590
  );
204591
- watchInputFiles(state, project, projectPath, config);
204592
- watchPackageJsonFiles(state, project, projectPath, config);
204591
+ watchInputFiles(state, project, projectPath, config2);
204592
+ watchPackageJsonFiles(state, project, projectPath, config2);
204593
204593
  }
204594
- const status = getUpToDateStatus(state, config, projectPath);
204594
+ const status = getUpToDateStatus(state, config2, projectPath);
204595
204595
  if (!options.force) {
204596
204596
  if (status.type === 1) {
204597
204597
  verboseReportProjectStatus(state, project, status);
204598
- reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
204598
+ reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config2));
204599
204599
  projectPendingBuild.delete(projectPath);
204600
204600
  if (options.dry) {
204601
204601
  reportStatus(state, Diagnostics.Project_0_is_up_to_date, project);
@@ -204603,20 +204603,20 @@ ${lanes.join("\n")}
204603
204603
  continue;
204604
204604
  }
204605
204605
  if (status.type === 2 || status.type === 15) {
204606
- reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
204606
+ reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config2));
204607
204607
  return {
204608
204608
  kind: 1,
204609
204609
  status,
204610
204610
  project,
204611
204611
  projectPath,
204612
204612
  projectIndex,
204613
- config
204613
+ config: config2
204614
204614
  };
204615
204615
  }
204616
204616
  }
204617
204617
  if (status.type === 12) {
204618
204618
  verboseReportProjectStatus(state, project, status);
204619
- reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
204619
+ reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config2));
204620
204620
  projectPendingBuild.delete(projectPath);
204621
204621
  if (options.verbose) {
204622
204622
  reportStatus(
@@ -204630,7 +204630,7 @@ ${lanes.join("\n")}
204630
204630
  }
204631
204631
  if (status.type === 16) {
204632
204632
  verboseReportProjectStatus(state, project, status);
204633
- reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config));
204633
+ reportAndStoreErrors(state, projectPath, getConfigFileParsingDiagnostics(config2));
204634
204634
  projectPendingBuild.delete(projectPath);
204635
204635
  continue;
204636
204636
  }
@@ -204640,7 +204640,7 @@ ${lanes.join("\n")}
204640
204640
  project,
204641
204641
  projectPath,
204642
204642
  projectIndex,
204643
- config
204643
+ config: config2
204644
204644
  };
204645
204645
  }
204646
204646
  return void 0;
@@ -205078,9 +205078,9 @@ ${lanes.join("\n")}
205078
205078
  oldestOutputFileName: getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
205079
205079
  });
205080
205080
  }
205081
- function queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, buildResult) {
205081
+ function queueReferencingProjects(state, project, projectPath, projectIndex, config2, buildOrder, buildResult) {
205082
205082
  if (state.options.stopBuildOnErrors && buildResult & 4) return;
205083
- if (!config.options.composite) return;
205083
+ if (!config2.options.composite) return;
205084
205084
  for (let index = projectIndex + 1; index < buildOrder.length; index++) {
205085
205085
  const nextProject = buildOrder[index];
205086
205086
  const nextProjectPath = toResolvedConfigFilePath(state, nextProject);
@@ -206442,8 +206442,8 @@ ${lanes.join("\n")}
206442
206442
  function createReportErrorSummary(sys2, options) {
206443
206443
  return shouldBePretty(sys2, options) ? (errorCount, filesInError) => sys2.write(getErrorSummaryText(errorCount, filesInError, sys2.newLine, sys2)) : void 0;
206444
206444
  }
206445
- function performCompilation(sys2, cb, reportDiagnostic, config) {
206446
- const { fileNames, options, projectReferences } = config;
206445
+ function performCompilation(sys2, cb, reportDiagnostic, config2) {
206446
+ const { fileNames, options, projectReferences } = config2;
206447
206447
  const host = createCompilerHostWorker(
206448
206448
  options,
206449
206449
  /*setParentNodes*/
@@ -206465,7 +206465,7 @@ ${lanes.join("\n")}
206465
206465
  options,
206466
206466
  projectReferences,
206467
206467
  host,
206468
- configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config)
206468
+ configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config2)
206469
206469
  };
206470
206470
  const program = createProgram(programOptions);
206471
206471
  const exitStatus = emitFilesAndReportErrorsAndGetExitStatus(
@@ -206483,8 +206483,8 @@ ${lanes.join("\n")}
206483
206483
  cb(program);
206484
206484
  return sys2.exit(exitStatus);
206485
206485
  }
206486
- function performIncrementalCompilation2(sys2, cb, reportDiagnostic, config) {
206487
- const { options, fileNames, projectReferences } = config;
206486
+ function performIncrementalCompilation2(sys2, cb, reportDiagnostic, config2) {
206487
+ const { options, fileNames, projectReferences } = config2;
206488
206488
  enableStatisticsAndTracing(
206489
206489
  sys2,
206490
206490
  options,
@@ -206498,7 +206498,7 @@ ${lanes.join("\n")}
206498
206498
  system: sys2,
206499
206499
  rootNames: fileNames,
206500
206500
  options,
206501
- configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config),
206501
+ configFileParsingDiagnostics: getConfigFileParsingDiagnostics(config2),
206502
206502
  projectReferences,
206503
206503
  reportDiagnostic,
206504
206504
  reportErrorSummary: createReportErrorSummary(sys2, options),
@@ -220150,37 +220150,37 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
220150
220150
  return containingFunction ? [containingFunction, containingClass] : [containingClass];
220151
220151
  }
220152
220152
  }
220153
- const scopes = [];
220153
+ const scopes2 = [];
220154
220154
  while (true) {
220155
220155
  current = current.parent;
220156
220156
  if (current.kind === 170) {
220157
220157
  current = findAncestor(current, (parent2) => isFunctionLikeDeclaration(parent2)).parent;
220158
220158
  }
220159
220159
  if (isScope(current)) {
220160
- scopes.push(current);
220160
+ scopes2.push(current);
220161
220161
  if (current.kind === 308) {
220162
- return scopes;
220162
+ return scopes2;
220163
220163
  }
220164
220164
  }
220165
220165
  }
220166
220166
  }
220167
220167
  function getFunctionExtractionAtIndex(targetRange, context, requestedChangesIndex) {
220168
- const { scopes, readsAndWrites: { target, usagesPerScope, functionErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context);
220168
+ const { scopes: scopes2, readsAndWrites: { target, usagesPerScope, functionErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context);
220169
220169
  Debug.assert(!functionErrorsPerScope[requestedChangesIndex].length, "The extraction went missing? How?");
220170
220170
  context.cancellationToken.throwIfCancellationRequested();
220171
- return extractFunctionInScope(target, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], exposedVariableDeclarations, targetRange, context);
220171
+ return extractFunctionInScope(target, scopes2[requestedChangesIndex], usagesPerScope[requestedChangesIndex], exposedVariableDeclarations, targetRange, context);
220172
220172
  }
220173
220173
  function getConstantExtractionAtIndex(targetRange, context, requestedChangesIndex) {
220174
- const { scopes, readsAndWrites: { target, usagesPerScope, constantErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context);
220174
+ const { scopes: scopes2, readsAndWrites: { target, usagesPerScope, constantErrorsPerScope, exposedVariableDeclarations } } = getPossibleExtractionsWorker(targetRange, context);
220175
220175
  Debug.assert(!constantErrorsPerScope[requestedChangesIndex].length, "The extraction went missing? How?");
220176
220176
  Debug.assert(exposedVariableDeclarations.length === 0, "Extract constant accepted a range containing a variable declaration?");
220177
220177
  context.cancellationToken.throwIfCancellationRequested();
220178
220178
  const expression = isExpression(target) ? target : target.statements[0].expression;
220179
- return extractConstantInScope(expression, scopes[requestedChangesIndex], usagesPerScope[requestedChangesIndex], targetRange.facts, context);
220179
+ return extractConstantInScope(expression, scopes2[requestedChangesIndex], usagesPerScope[requestedChangesIndex], targetRange.facts, context);
220180
220180
  }
220181
220181
  function getPossibleExtractions(targetRange, context) {
220182
- const { scopes, affectedTextRange, readsAndWrites: { functionErrorsPerScope, constantErrorsPerScope } } = getPossibleExtractionsWorker(targetRange, context);
220183
- const extractions = scopes.map((scope, i) => {
220182
+ const { scopes: scopes2, affectedTextRange, readsAndWrites: { functionErrorsPerScope, constantErrorsPerScope } } = getPossibleExtractionsWorker(targetRange, context);
220183
+ const extractions = scopes2.map((scope, i) => {
220184
220184
  const functionDescriptionPart = getDescriptionForFunctionInScope(scope);
220185
220185
  const constantDescriptionPart = getDescriptionForConstantInScope(scope);
220186
220186
  const scopeDescription = isFunctionLikeDeclaration(scope) ? getDescriptionForFunctionLikeDeclaration(scope) : isClassLike(scope) ? getDescriptionForClassLikeDeclaration(scope) : getDescriptionForModuleLikeDeclaration(scope);
@@ -220214,17 +220214,17 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
220214
220214
  }
220215
220215
  function getPossibleExtractionsWorker(targetRange, context) {
220216
220216
  const { file: sourceFile } = context;
220217
- const scopes = collectEnclosingScopes(targetRange);
220217
+ const scopes2 = collectEnclosingScopes(targetRange);
220218
220218
  const enclosingTextRange = getEnclosingTextRange(targetRange, sourceFile);
220219
220219
  const readsAndWrites = collectReadsAndWrites(
220220
220220
  targetRange,
220221
- scopes,
220221
+ scopes2,
220222
220222
  enclosingTextRange,
220223
220223
  sourceFile,
220224
220224
  context.program.getTypeChecker(),
220225
220225
  context.cancellationToken
220226
220226
  );
220227
- return { scopes, affectedTextRange: enclosingTextRange, readsAndWrites };
220227
+ return { scopes: scopes2, affectedTextRange: enclosingTextRange, readsAndWrites };
220228
220228
  }
220229
220229
  function getDescriptionForFunctionInScope(scope) {
220230
220230
  return isFunctionLikeDeclaration(scope) ? "inner function" : isClassLike(scope) ? "method" : "function";
@@ -221018,7 +221018,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
221018
221018
  function getEnclosingTextRange(targetRange, sourceFile) {
221019
221019
  return isReadonlyArray(targetRange.range) ? { pos: first(targetRange.range).getStart(sourceFile), end: last(targetRange.range).getEnd() } : targetRange.range;
221020
221020
  }
221021
- function collectReadsAndWrites(targetRange, scopes, enclosingTextRange, sourceFile, checker, cancellationToken) {
221021
+ function collectReadsAndWrites(targetRange, scopes2, enclosingTextRange, sourceFile, checker, cancellationToken) {
221022
221022
  const allTypeParameterUsages = /* @__PURE__ */ new Map();
221023
221023
  const usagesPerScope = [];
221024
221024
  const substitutionsPerScope = [];
@@ -221038,7 +221038,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
221038
221038
  } else if (checker.getTypeAtLocation(expression).flags & (16 | 262144)) {
221039
221039
  expressionDiagnostic = createDiagnosticForNode(expression, Messages.uselessConstantType);
221040
221040
  }
221041
- for (const scope of scopes) {
221041
+ for (const scope of scopes2) {
221042
221042
  usagesPerScope.push({ usages: /* @__PURE__ */ new Map(), typeParameterUsages: /* @__PURE__ */ new Map(), substitutions: /* @__PURE__ */ new Map() });
221043
221043
  substitutionsPerScope.push(/* @__PURE__ */ new Map());
221044
221044
  functionErrorsPerScope.push([]);
@@ -221066,8 +221066,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
221066
221066
  if (allTypeParameterUsages.size > 0) {
221067
221067
  const seenTypeParameterUsages = /* @__PURE__ */ new Map();
221068
221068
  let i = 0;
221069
- for (let curr = unmodifiedNode; curr !== void 0 && i < scopes.length; curr = curr.parent) {
221070
- if (curr === scopes[i]) {
221069
+ for (let curr = unmodifiedNode; curr !== void 0 && i < scopes2.length; curr = curr.parent) {
221070
+ if (curr === scopes2[i]) {
221071
221071
  seenTypeParameterUsages.forEach((typeParameter, id2) => {
221072
221072
  usagesPerScope[i].typeParameterUsages.set(id2, typeParameter);
221073
221073
  });
@@ -221082,19 +221082,19 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
221082
221082
  }
221083
221083
  }
221084
221084
  }
221085
- Debug.assert(i === scopes.length, "Should have iterated all scopes");
221085
+ Debug.assert(i === scopes2.length, "Should have iterated all scopes");
221086
221086
  }
221087
221087
  if (visibleDeclarationsInExtractedRange.length) {
221088
- const containingLexicalScopeOfExtraction = isBlockScope(scopes[0], scopes[0].parent) ? scopes[0] : getEnclosingBlockScopeContainer(scopes[0]);
221088
+ const containingLexicalScopeOfExtraction = isBlockScope(scopes2[0], scopes2[0].parent) ? scopes2[0] : getEnclosingBlockScopeContainer(scopes2[0]);
221089
221089
  forEachChild(containingLexicalScopeOfExtraction, checkForUsedDeclarations);
221090
221090
  }
221091
- for (let i = 0; i < scopes.length; i++) {
221091
+ for (let i = 0; i < scopes2.length; i++) {
221092
221092
  const scopeUsages = usagesPerScope[i];
221093
221093
  if (i > 0 && (scopeUsages.usages.size > 0 || scopeUsages.typeParameterUsages.size > 0)) {
221094
221094
  const errorNode = isReadonlyArray(targetRange.range) ? targetRange.range[0] : targetRange.range;
221095
221095
  constantErrorsPerScope[i].push(createDiagnosticForNode(errorNode, Messages.cannotAccessVariablesFromNestedScopes));
221096
221096
  }
221097
- if (targetRange.facts & 16 && isClassLike(scopes[i])) {
221097
+ if (targetRange.facts & 16 && isClassLike(scopes2[i])) {
221098
221098
  functionErrorsPerScope[i].push(createDiagnosticForNode(targetRange.thisNode, Messages.cannotExtractFunctionsContainingThisToMethod));
221099
221099
  }
221100
221100
  let hasWrite = false;
@@ -221185,7 +221185,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
221185
221185
  function recordUsage(n, usage, isTypeNode2) {
221186
221186
  const symbolId = recordUsagebySymbol(n, usage, isTypeNode2);
221187
221187
  if (symbolId) {
221188
- for (let i = 0; i < scopes.length; i++) {
221188
+ for (let i = 0; i < scopes2.length; i++) {
221189
221189
  const substitution = substitutionsPerScope[i].get(symbolId);
221190
221190
  if (substitution) {
221191
221191
  usagesPerScope[i].substitutions.set(getNodeId(n).toString(), substitution);
@@ -221230,8 +221230,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
221230
221230
  errors.push(diag2);
221231
221231
  }
221232
221232
  }
221233
- for (let i = 0; i < scopes.length; i++) {
221234
- const scope = scopes[i];
221233
+ for (let i = 0; i < scopes2.length; i++) {
221234
+ const scope = scopes2[i];
221235
221235
  const resolvedSymbol = checker.resolveName(
221236
221236
  symbol.name,
221237
221237
  scope,
@@ -223856,36 +223856,36 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
223856
223856
  const range2 = ts_formatting_exports.getRangeOfEnclosingComment(sourceFile, position);
223857
223857
  return range2 && (!onlyMultiLine || range2.kind === 3) ? createTextSpanFromRange(range2) : void 0;
223858
223858
  }
223859
- function getTodoComments(fileName, descriptors) {
223859
+ function getTodoComments(fileName, descriptors2) {
223860
223860
  synchronizeHostData();
223861
223861
  const sourceFile = getValidSourceFile(fileName);
223862
223862
  cancellationToken.throwIfCancellationRequested();
223863
223863
  const fileContents = sourceFile.text;
223864
223864
  const result = [];
223865
- if (descriptors.length > 0 && !isNodeModulesFile(sourceFile.fileName)) {
223865
+ if (descriptors2.length > 0 && !isNodeModulesFile(sourceFile.fileName)) {
223866
223866
  const regExp = getTodoCommentsRegExp();
223867
223867
  let matchArray;
223868
223868
  while (matchArray = regExp.exec(fileContents)) {
223869
223869
  cancellationToken.throwIfCancellationRequested();
223870
223870
  const firstDescriptorCaptureIndex = 3;
223871
- Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex);
223871
+ Debug.assert(matchArray.length === descriptors2.length + firstDescriptorCaptureIndex);
223872
223872
  const preamble = matchArray[1];
223873
223873
  const matchPosition = matchArray.index + preamble.length;
223874
223874
  if (!isInComment(sourceFile, matchPosition)) {
223875
223875
  continue;
223876
223876
  }
223877
- let descriptor;
223878
- for (let i = 0; i < descriptors.length; i++) {
223877
+ let descriptor2;
223878
+ for (let i = 0; i < descriptors2.length; i++) {
223879
223879
  if (matchArray[i + firstDescriptorCaptureIndex]) {
223880
- descriptor = descriptors[i];
223880
+ descriptor2 = descriptors2[i];
223881
223881
  }
223882
223882
  }
223883
- if (descriptor === void 0) return Debug.fail();
223884
- if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor.text.length))) {
223883
+ if (descriptor2 === void 0) return Debug.fail();
223884
+ if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor2.text.length))) {
223885
223885
  continue;
223886
223886
  }
223887
223887
  const message = matchArray[2];
223888
- result.push({ descriptor, message, position: matchPosition });
223888
+ result.push({ descriptor: descriptor2, message, position: matchPosition });
223889
223889
  }
223890
223890
  }
223891
223891
  return result;
@@ -223897,7 +223897,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
223897
223897
  const multiLineCommentStart = /(?:\/\*+\s*)/.source;
223898
223898
  const anyNumberOfSpacesAndAsterisksAtStartOfLine = /(?:^(?:\s|\*)*)/.source;
223899
223899
  const preamble = "(" + anyNumberOfSpacesAndAsterisksAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")";
223900
- const literals = "(?:" + map(descriptors, (d) => "(" + escapeRegExp(d.text) + ")").join("|") + ")";
223900
+ const literals = "(?:" + map(descriptors2, (d) => "(" + escapeRegExp(d.text) + ")").join("|") + ")";
223901
223901
  const endOfLineOrEndOfComment = /(?:$|\*\/)/.source;
223902
223902
  const messageRemainder = /(?:.*?)/.source;
223903
223903
  const messagePortion = "(" + literals + messageRemainder + ")";
@@ -225273,8 +225273,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
225273
225273
  }
225274
225274
  function getFixes(context) {
225275
225275
  const diagnostics = getDiagnostics(context);
225276
- const registrations = errorCodeToFixes.get(String(context.errorCode));
225277
- return flatMap(registrations, (f) => map(f.getCodeActions(context), removeFixIdIfFixAllUnavailable(f, diagnostics)));
225276
+ const registrations2 = errorCodeToFixes.get(String(context.errorCode));
225277
+ return flatMap(registrations2, (f) => map(f.getCodeActions(context), removeFixIdIfFixAllUnavailable(f, diagnostics)));
225278
225278
  }
225279
225279
  function getAllFixes(context) {
225280
225280
  return fixIdToRegistration.get(cast(context.fixId, isString)).getAllCodeActions(context);
@@ -262727,18 +262727,18 @@ ${options.prefix}` : "\n" : options.prefix
262727
262727
  /**
262728
262728
  * This is to watch whenever files are added or removed to the wildcard directories
262729
262729
  */
262730
- watchWildcardDirectory(directory, flags, configFileName, config) {
262730
+ watchWildcardDirectory(directory, flags, configFileName, config2) {
262731
262731
  let watcher = this.watchFactory.watchDirectory(
262732
262732
  directory,
262733
262733
  (fileOrDirectory) => this.onWildCardDirectoryWatcherInvoke(
262734
262734
  directory,
262735
262735
  configFileName,
262736
- config,
262736
+ config2,
262737
262737
  result,
262738
262738
  fileOrDirectory
262739
262739
  ),
262740
262740
  flags,
262741
- this.getWatchOptionsFromProjectWatchOptions(config.parsedCommandLine.watchOptions, getDirectoryPath(configFileName)),
262741
+ this.getWatchOptionsFromProjectWatchOptions(config2.parsedCommandLine.watchOptions, getDirectoryPath(configFileName)),
262742
262742
  WatchType.WildcardDirectory,
262743
262743
  configFileName
262744
262744
  );
@@ -262759,9 +262759,9 @@ ${options.prefix}` : "\n" : options.prefix
262759
262759
  };
262760
262760
  return result;
262761
262761
  }
262762
- onWildCardDirectoryWatcherInvoke(directory, configFileName, config, wildCardWatcher, fileOrDirectory) {
262762
+ onWildCardDirectoryWatcherInvoke(directory, configFileName, config2, wildCardWatcher, fileOrDirectory) {
262763
262763
  const fileOrDirectoryPath = this.toPath(fileOrDirectory);
262764
- const fsResult = config.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
262764
+ const fsResult = config2.cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
262765
262765
  if (getBaseFileName(fileOrDirectoryPath) === "package.json" && !isInsideNodeModules(fileOrDirectoryPath) && (fsResult && fsResult.fileExists || !fsResult && this.host.fileExists(fileOrDirectory))) {
262766
262766
  const file = this.getNormalizedAbsolutePath(fileOrDirectory);
262767
262767
  this.logger.info(`Config: ${configFileName} Detected new package.json: ${file}`);
@@ -262779,15 +262779,15 @@ ${options.prefix}` : "\n" : options.prefix
262779
262779
  configFileName,
262780
262780
  extraFileExtensions: this.hostConfiguration.extraFileExtensions,
262781
262781
  currentDirectory: this.currentDirectory,
262782
- options: config.parsedCommandLine.options,
262783
- program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config.parsedCommandLine.fileNames,
262782
+ options: config2.parsedCommandLine.options,
262783
+ program: (configuredProjectForConfig == null ? void 0 : configuredProjectForConfig.getCurrentProgram()) || config2.parsedCommandLine.fileNames,
262784
262784
  useCaseSensitiveFileNames: this.host.useCaseSensitiveFileNames,
262785
262785
  writeLog: (s) => this.logger.info(s),
262786
262786
  toPath: (s) => this.toPath(s),
262787
262787
  getScriptKind: configuredProjectForConfig ? ((fileName) => configuredProjectForConfig.getScriptKind(fileName)) : void 0
262788
262788
  })) return;
262789
- if (config.updateLevel !== 2) config.updateLevel = 1;
262790
- config.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => {
262789
+ if (config2.updateLevel !== 2) config2.updateLevel = 1;
262790
+ config2.projects.forEach((watchWildcardDirectories, projectCanonicalPath) => {
262791
262791
  var _a3;
262792
262792
  if (!watchWildcardDirectories) return;
262793
262793
  const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath);
@@ -263251,9 +263251,9 @@ ${options.prefix}` : "\n" : options.prefix
263251
263251
  /** Caches the configFilename for script info or ancestor of open script info */
263252
263252
  setConfigFileNameForFileInCache(info, configFileName) {
263253
263253
  if (!this.openFiles.has(info.path)) return;
263254
- const config = configFileName || false;
263254
+ const config2 = configFileName || false;
263255
263255
  if (!isAncestorConfigFileInfo(info)) {
263256
- this.configFileForOpenFiles.set(info.path, config);
263256
+ this.configFileForOpenFiles.set(info.path, config2);
263257
263257
  } else {
263258
263258
  let configFileForOpenFile = this.configFileForOpenFiles.get(info.path);
263259
263259
  if (!configFileForOpenFile || isString(configFileForOpenFile)) {
@@ -263262,7 +263262,7 @@ ${options.prefix}` : "\n" : options.prefix
263262
263262
  configFileForOpenFile = (/* @__PURE__ */ new Map()).set(false, configFileForOpenFile)
263263
263263
  );
263264
263264
  }
263265
- configFileForOpenFile.set(info.fileName, config);
263265
+ configFileForOpenFile.set(info.fileName, config2);
263266
263266
  }
263267
263267
  }
263268
263268
  /**
@@ -263585,22 +263585,22 @@ ${options.prefix}` : "\n" : options.prefix
263585
263585
  return configFileExistenceInfo;
263586
263586
  }
263587
263587
  /** @internal */
263588
- watchWildcards(configFileName, { exists, config }, forProject) {
263589
- config.projects.set(forProject.canonicalConfigFilePath, true);
263588
+ watchWildcards(configFileName, { exists, config: config2 }, forProject) {
263589
+ config2.projects.set(forProject.canonicalConfigFilePath, true);
263590
263590
  if (exists) {
263591
- if (config.watchedDirectories && !config.watchedDirectoriesStale) return;
263592
- config.watchedDirectoriesStale = false;
263591
+ if (config2.watchedDirectories && !config2.watchedDirectoriesStale) return;
263592
+ config2.watchedDirectoriesStale = false;
263593
263593
  updateWatchingWildcardDirectories(
263594
- config.watchedDirectories || (config.watchedDirectories = /* @__PURE__ */ new Map()),
263595
- config.parsedCommandLine.wildcardDirectories,
263594
+ config2.watchedDirectories || (config2.watchedDirectories = /* @__PURE__ */ new Map()),
263595
+ config2.parsedCommandLine.wildcardDirectories,
263596
263596
  // Create new directory watcher
263597
- (directory, flags) => this.watchWildcardDirectory(directory, flags, configFileName, config)
263597
+ (directory, flags) => this.watchWildcardDirectory(directory, flags, configFileName, config2)
263598
263598
  );
263599
263599
  } else {
263600
- config.watchedDirectoriesStale = false;
263601
- if (!config.watchedDirectories) return;
263602
- clearMap(config.watchedDirectories, closeFileWatcherOf);
263603
- config.watchedDirectories = void 0;
263600
+ config2.watchedDirectoriesStale = false;
263601
+ if (!config2.watchedDirectories) return;
263602
+ clearMap(config2.watchedDirectories, closeFileWatcherOf);
263603
+ config2.watchedDirectories = void 0;
263604
263604
  }
263605
263605
  }
263606
263606
  /** @internal */
@@ -263700,11 +263700,11 @@ ${options.prefix}` : "\n" : options.prefix
263700
263700
  * @internal
263701
263701
  */
263702
263702
  reloadFileNamesOfConfiguredProject(project) {
263703
- const config = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config);
263704
- project.updateErrorOnNoInputFiles(config);
263703
+ const config2 = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath).config);
263704
+ project.updateErrorOnNoInputFiles(config2);
263705
263705
  this.updateNonInferredProjectFiles(
263706
263706
  project,
263707
- config.fileNames.concat(project.getExternalFiles(
263707
+ config2.fileNames.concat(project.getExternalFiles(
263708
263708
  1
263709
263709
  /* RootNamesAndUpdate */
263710
263710
  )),
@@ -263713,23 +263713,23 @@ ${options.prefix}` : "\n" : options.prefix
263713
263713
  project.markAsDirty();
263714
263714
  return project.updateGraph();
263715
263715
  }
263716
- reloadFileNamesOfParsedConfig(configFileName, config) {
263717
- if (config.updateLevel === void 0) return config.parsedCommandLine;
263716
+ reloadFileNamesOfParsedConfig(configFileName, config2) {
263717
+ if (config2.updateLevel === void 0) return config2.parsedCommandLine;
263718
263718
  Debug.assert(
263719
- config.updateLevel === 1
263719
+ config2.updateLevel === 1
263720
263720
  /* RootNamesAndUpdate */
263721
263721
  );
263722
- const configFileSpecs = config.parsedCommandLine.options.configFile.configFileSpecs;
263722
+ const configFileSpecs = config2.parsedCommandLine.options.configFile.configFileSpecs;
263723
263723
  const fileNames = getFileNamesFromConfigSpecs(
263724
263724
  configFileSpecs,
263725
263725
  getDirectoryPath(configFileName),
263726
- config.parsedCommandLine.options,
263727
- config.cachedDirectoryStructureHost,
263726
+ config2.parsedCommandLine.options,
263727
+ config2.cachedDirectoryStructureHost,
263728
263728
  this.hostConfiguration.extraFileExtensions
263729
263729
  );
263730
- config.parsedCommandLine = { ...config.parsedCommandLine, fileNames };
263731
- config.updateLevel = void 0;
263732
- return config.parsedCommandLine;
263730
+ config2.parsedCommandLine = { ...config2.parsedCommandLine, fileNames };
263731
+ config2.updateLevel = void 0;
263732
+ return config2.parsedCommandLine;
263733
263733
  }
263734
263734
  /** @internal */
263735
263735
  setFileNamesOfAutoImportProviderOrAuxillaryProject(project, fileNames) {
@@ -264735,14 +264735,14 @@ Dynamic files must always be opened with service's current directory or service
264735
264735
  reloadedProjects
264736
264736
  );
264737
264737
  }
264738
- isMatchedByConfig(configFileName, config, info) {
264739
- if (config.fileNames.some((rootName) => this.toPath(rootName) === info.path)) return true;
264738
+ isMatchedByConfig(configFileName, config2, info) {
264739
+ if (config2.fileNames.some((rootName) => this.toPath(rootName) === info.path)) return true;
264740
264740
  if (isSupportedSourceFileName(
264741
264741
  info.fileName,
264742
- config.options,
264742
+ config2.options,
264743
264743
  this.hostConfiguration.extraFileExtensions
264744
264744
  )) return false;
264745
- const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = config.options.configFile.configFileSpecs;
264745
+ const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = config2.options.configFile.configFileSpecs;
264746
264746
  const basePath = toNormalizedPath(getNormalizedAbsolutePath(getDirectoryPath(configFileName), this.currentDirectory));
264747
264747
  if (validatedFilesSpec == null ? void 0 : validatedFilesSpec.some((fileSpec) => this.toPath(getNormalizedAbsolutePath(fileSpec, basePath)) === info.path)) return true;
264748
264748
  if (!(validatedIncludeSpecs == null ? void 0 : validatedIncludeSpecs.length)) return false;
@@ -264959,7 +264959,7 @@ Dynamic files must always be opened with service's current directory or service
264959
264959
  this.removeOrphanScriptInfos();
264960
264960
  }
264961
264961
  tryInvokeWildCardDirectories(info) {
264962
- this.configFileExistenceInfoCache.forEach((configFileExistenceInfo, config) => {
264962
+ this.configFileExistenceInfoCache.forEach((configFileExistenceInfo, config2) => {
264963
264963
  var _a3, _b;
264964
264964
  if (!((_a3 = configFileExistenceInfo.config) == null ? void 0 : _a3.parsedCommandLine) || contains(
264965
264965
  configFileExistenceInfo.config.parsedCommandLine.fileNames,
@@ -264970,10 +264970,10 @@ Dynamic files must always be opened with service's current directory or service
264970
264970
  }
264971
264971
  (_b = configFileExistenceInfo.config.watchedDirectories) == null ? void 0 : _b.forEach((watcher, directory) => {
264972
264972
  if (containsPath(directory, info.fileName, !this.host.useCaseSensitiveFileNames)) {
264973
- this.logger.info(`Invoking ${config}:: wildcard for open scriptInfo:: ${info.fileName}`);
264973
+ this.logger.info(`Invoking ${config2}:: wildcard for open scriptInfo:: ${info.fileName}`);
264974
264974
  this.onWildCardDirectoryWatcherInvoke(
264975
264975
  directory,
264976
- config,
264976
+ config2,
264977
264977
  configFileExistenceInfo.config,
264978
264978
  watcher.watcher,
264979
264979
  info.fileName
@@ -265661,8 +265661,8 @@ Dynamic files must always be opened with service's current directory or service
265661
265661
  }
265662
265662
  };
265663
265663
  }
265664
- function isConfigFile(config) {
265665
- return config.kind !== void 0;
265664
+ function isConfigFile(config2) {
265665
+ return config2.kind !== void 0;
265666
265666
  }
265667
265667
  function printProjectWithoutFileNames(project) {
265668
265668
  project.print(
@@ -268366,7 +268366,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
268366
268366
  }
268367
268367
  }
268368
268368
  });
268369
- (_a3 = result.seenConfigs) == null ? void 0 : _a3.forEach((config) => (notMatchedByConfig ?? (notMatchedByConfig = [])).push(config));
268369
+ (_a3 = result.seenConfigs) == null ? void 0 : _a3.forEach((config2) => (notMatchedByConfig ?? (notMatchedByConfig = [])).push(config2));
268370
268370
  return {
268371
268371
  notMatchedByConfig,
268372
268372
  notInProject,
@@ -272790,7 +272790,7 @@ var require_path_browserify = __commonJS({
272790
272790
  assertPath(path3);
272791
272791
  return path3.length > 0 && path3.charCodeAt(0) === 47;
272792
272792
  },
272793
- join: function join20() {
272793
+ join: function join21() {
272794
272794
  if (arguments.length === 0)
272795
272795
  return ".";
272796
272796
  var joined;
@@ -273665,7 +273665,7 @@ var require_scan = __commonJS({
273665
273665
  var require_parse = __commonJS({
273666
273666
  "node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js"(exports, module) {
273667
273667
  "use strict";
273668
- var constants3 = require_constants();
273668
+ var constants4 = require_constants();
273669
273669
  var utils = require_utils();
273670
273670
  var {
273671
273671
  MAX_LENGTH,
@@ -273673,7 +273673,7 @@ var require_parse = __commonJS({
273673
273673
  REGEX_NON_SPECIAL_CHARS,
273674
273674
  REGEX_SPECIAL_CHARS_BACKREF,
273675
273675
  REPLACEMENTS
273676
- } = constants3;
273676
+ } = constants4;
273677
273677
  var expandRange = (args, options) => {
273678
273678
  if (typeof options.expandRange === "function") {
273679
273679
  return options.expandRange(...args, options);
@@ -273879,7 +273879,7 @@ var require_parse = __commonJS({
273879
273879
  if (options.maxExtglobRecursion === false) {
273880
273880
  return { risky: false };
273881
273881
  }
273882
- const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants3.DEFAULT_MAX_EXTGLOB_RECURSION;
273882
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants4.DEFAULT_MAX_EXTGLOB_RECURSION;
273883
273883
  const branches = splitTopLevel(body).map((branch) => branch.trim());
273884
273884
  if (branches.length > 1) {
273885
273885
  if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
@@ -273911,8 +273911,8 @@ var require_parse = __commonJS({
273911
273911
  const bos = { type: "bos", value: "", output: opts.prepend || "" };
273912
273912
  const tokens = [bos];
273913
273913
  const capture = opts.capture ? "" : "?:";
273914
- const PLATFORM_CHARS = constants3.globChars(opts.windows);
273915
- const EXTGLOB_CHARS = constants3.extglobChars(PLATFORM_CHARS);
273914
+ const PLATFORM_CHARS = constants4.globChars(opts.windows);
273915
+ const EXTGLOB_CHARS = constants4.extglobChars(PLATFORM_CHARS);
273916
273916
  const {
273917
273917
  DOT_LITERAL,
273918
273918
  PLUS_LITERAL,
@@ -274607,7 +274607,7 @@ var require_parse = __commonJS({
274607
274607
  NO_DOTS_SLASH,
274608
274608
  STAR,
274609
274609
  START_ANCHOR
274610
- } = constants3.globChars(opts.windows);
274610
+ } = constants4.globChars(opts.windows);
274611
274611
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
274612
274612
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
274613
274613
  const capture = opts.capture ? "" : "?:";
@@ -274665,7 +274665,7 @@ var require_picomatch = __commonJS({
274665
274665
  var scan = require_scan();
274666
274666
  var parse2 = require_parse();
274667
274667
  var utils = require_utils();
274668
- var constants3 = require_constants();
274668
+ var constants4 = require_constants();
274669
274669
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
274670
274670
  var picomatch = (glob2, options, returnState = false) => {
274671
274671
  if (Array.isArray(glob2)) {
@@ -274793,7 +274793,7 @@ var require_picomatch = __commonJS({
274793
274793
  return /$^/;
274794
274794
  }
274795
274795
  };
274796
- picomatch.constants = constants3;
274796
+ picomatch.constants = constants4;
274797
274797
  module.exports = picomatch;
274798
274798
  }
274799
274799
  });
@@ -278624,7 +278624,7 @@ ${nodeLocation}` : message;
278624
278624
  }
278625
278625
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
278626
278626
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
278627
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
278627
+ var descriptor2 = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
278628
278628
  var _, done = false;
278629
278629
  for (var i = decorators.length - 1; i >= 0; i--) {
278630
278630
  var context = {};
@@ -278634,19 +278634,19 @@ ${nodeLocation}` : message;
278634
278634
  if (done) throw new TypeError("Cannot add initializers after decoration has completed");
278635
278635
  extraInitializers.push(accept(f || null));
278636
278636
  };
278637
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
278637
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor2.get, set: descriptor2.set } : descriptor2[key], context);
278638
278638
  if (kind === "accessor") {
278639
278639
  if (result === void 0) continue;
278640
278640
  if (result === null || typeof result !== "object") throw new TypeError("Object expected");
278641
- if (_ = accept(result.get)) descriptor.get = _;
278642
- if (_ = accept(result.set)) descriptor.set = _;
278641
+ if (_ = accept(result.get)) descriptor2.get = _;
278642
+ if (_ = accept(result.set)) descriptor2.set = _;
278643
278643
  if (_ = accept(result.init)) initializers.unshift(_);
278644
278644
  } else if (_ = accept(result)) {
278645
278645
  if (kind === "field") initializers.unshift(_);
278646
- else descriptor[key] = _;
278646
+ else descriptor2[key] = _;
278647
278647
  }
278648
278648
  }
278649
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
278649
+ if (target) Object.defineProperty(target, contextIn.name, descriptor2);
278650
278650
  done = true;
278651
278651
  }
278652
278652
  function __runInitializers(thisArg, initializers, value) {
@@ -288151,7 +288151,7 @@ Node text: ${this.#forgottenText}`;
288151
288151
  }
288152
288152
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
288153
288153
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
288154
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
288154
+ var descriptor2 = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
288155
288155
  var _, done = false;
288156
288156
  for (var i = decorators.length - 1; i >= 0; i--) {
288157
288157
  var context = {};
@@ -288161,19 +288161,19 @@ Node text: ${this.#forgottenText}`;
288161
288161
  if (done) throw new TypeError("Cannot add initializers after decoration has completed");
288162
288162
  extraInitializers.push(accept(f || null));
288163
288163
  };
288164
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
288164
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor2.get, set: descriptor2.set } : descriptor2[key], context);
288165
288165
  if (kind === "accessor") {
288166
288166
  if (result === void 0) continue;
288167
288167
  if (result === null || typeof result !== "object") throw new TypeError("Object expected");
288168
- if (_ = accept(result.get)) descriptor.get = _;
288169
- if (_ = accept(result.set)) descriptor.set = _;
288168
+ if (_ = accept(result.get)) descriptor2.get = _;
288169
+ if (_ = accept(result.set)) descriptor2.set = _;
288170
288170
  if (_ = accept(result.init)) initializers.unshift(_);
288171
288171
  } else if (_ = accept(result)) {
288172
288172
  if (kind === "field") initializers.unshift(_);
288173
- else descriptor[key] = _;
288173
+ else descriptor2[key] = _;
288174
288174
  }
288175
288175
  }
288176
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
288176
+ if (target) Object.defineProperty(target, contextIn.name, descriptor2);
288177
288177
  done = true;
288178
288178
  }
288179
288179
  function __runInitializers(thisArg, initializers, value) {
@@ -304478,6 +304478,13 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
304478
304478
  );
304479
304479
  }
304480
304480
  daemonQuiesced = false;
304481
+ if ((dependencies.stabilityWindowMs ?? 0) > 0) {
304482
+ await new Promise((resolve13) => setTimeout(resolve13, dependencies.stabilityWindowMs));
304483
+ throwIfCancelled();
304484
+ const settled = await dependencies.observeDaemon();
304485
+ if (settled?.bootVersion !== target || settled.bootPackageHash !== evidence.packageHash)
304486
+ throw new Error(`The updated daemon did not stay up for ${Math.round(dependencies.stabilityWindowMs / 1e3)}s after restart (observed ${settled?.bootVersion ?? "unreachable"})`);
304487
+ }
304481
304488
  state = await transition(state, {
304482
304489
  phase: "runtime_verified",
304483
304490
  daemon_version: daemon.bootVersion,
@@ -304538,6 +304545,7 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
304538
304545
  let recoveryNote;
304539
304546
  let packageRecoveryNote;
304540
304547
  let restoredPackageVerified = false;
304548
+ let rolledBack = false;
304541
304549
  if (installStarted && installerSettled && !packageVerified && installLease && previousInstallation) {
304542
304550
  state = await transition(state, { phase: "recovering" }, paths);
304543
304551
  const journal = (recovery) => ({
@@ -304590,11 +304598,60 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
304590
304598
  packageRecoveryNote = `Package recovery could not be verified: ${detail}`;
304591
304599
  }
304592
304600
  }
304593
- if (daemonQuiesced && dependencies.recoverDaemon && installerSettled && (!installStarted || packageVerified || restoredPackageVerified)) {
304601
+ if (!cancelled && packageVerified && installerSettled && installLease && previousInstallation && previousInstallationCopy) {
304602
+ state = await transition(state, { phase: "rolling_back" }, paths);
304603
+ try {
304604
+ const recovered = await restoreVerifiedNpmInstallation(previousInstallationCopy, {
304605
+ lease: installLease,
304606
+ backups: retirementBackups,
304607
+ assertOwned: assertRecoveryOwned,
304608
+ async onPrepare(recovery) {
304609
+ state = await transition(state, { package_recovery: {
304610
+ status: "planned",
304611
+ version: recovery.version,
304612
+ package_hash: recovery.packageHash,
304613
+ source_path: recovery.sourcePath,
304614
+ ...recovery.partialPath ? { partial_path: recovery.partialPath } : {}
304615
+ } }, paths);
304616
+ }
304617
+ });
304618
+ if (!recovered) throw new Error("the preserved prior installation was no longer available");
304619
+ assertRecoveryOwned();
304620
+ restoreOmniusExecutableLink(state.npm_prefix, previousInstallation);
304621
+ const verified = await inspectGlobalOmniusInstall(previousInstallation.version, { npmPath, env, cwd });
304622
+ if (verified.packageHash !== previousInstallation.packageHash) throw new Error("the restored manifest differs from the pre-install verification");
304623
+ restoredPackageVerified = rolledBack = true;
304624
+ state = await transition(state, {
304625
+ rolled_back_to: verified.installedVersion,
304626
+ package_recovery: {
304627
+ status: "restored",
304628
+ version: recovered.version,
304629
+ package_hash: recovered.packageHash,
304630
+ source_path: recovered.sourcePath,
304631
+ ...recovered.partialPath ? { partial_path: recovered.partialPath } : {}
304632
+ },
304633
+ npm_recoveries: state.npm_recoveries?.map((item) => item.backup_path === recovered.sourcePath ? { ...item, status: "restored" } : item),
304634
+ package_json_path: verified.packageJsonPath,
304635
+ global_executable: verified.executablePath,
304636
+ installed_version: verified.installedVersion,
304637
+ executable_version: verified.executableVersion,
304638
+ installed_package_hash: verified.packageHash
304639
+ }, paths);
304640
+ packageRecoveryNote = `Rolled back to the previous verified Omnius v${verified.installedVersion}.${recovered.partialPath ? ` The failed v${target} files remain at ${recovered.partialPath}.` : ""}`;
304641
+ } catch (rollbackError) {
304642
+ const detail = rollbackError instanceof Error ? rollbackError.message : String(rollbackError);
304643
+ state = await transition(state, { package_recovery: { ...state.package_recovery, status: "failed", error: detail } }, paths);
304644
+ packageRecoveryNote = `Rollback could not be verified: ${detail}`;
304645
+ }
304646
+ }
304647
+ if ((daemonQuiesced || rolledBack) && dependencies.recoverDaemon && installerSettled && (!installStarted || packageVerified || restoredPackageVerified)) {
304594
304648
  state = await transition(state, { phase: "recovering" }, paths);
304595
304649
  try {
304596
304650
  const recovered = await dependencies.recoverDaemon();
304597
304651
  recoveryNote = recovered ? "The daemon was restarted after the interrupted update." : "The daemon could not be recovered automatically after the failed update.";
304652
+ if (rolledBack && state.tray_was_running && dependencies.restartTray && state.global_executable) {
304653
+ recoveryNote += await dependencies.restartTray(state.global_executable).catch(() => false) ? " The indicator was relaunched on the restored version." : " The indicator could not be relaunched on the restored version.";
304654
+ }
304598
304655
  } catch (recoveryError) {
304599
304656
  recoveryNote = `Daemon recovery failed: ${recoveryError instanceof Error ? recoveryError.message : String(recoveryError)}`;
304600
304657
  }
@@ -304628,20 +304685,31 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
304628
304685
  // packages/cli/src/tray.ts
304629
304686
  import { spawn as spawn4 } from "node:child_process";
304630
304687
  import {
304631
- closeSync as closeSync5,
304688
+ closeSync as closeSync6,
304632
304689
  chmodSync as chmodSync2,
304633
- existsSync as existsSync8,
304634
- mkdirSync as mkdirSync7,
304635
- openSync as openSync5,
304636
- readFileSync as readFileSync9,
304690
+ existsSync as existsSync9,
304691
+ mkdirSync as mkdirSync8,
304692
+ openSync as openSync6,
304693
+ readFileSync as readFileSync10,
304637
304694
  realpathSync as realpathSync2,
304638
- renameSync as renameSync6,
304639
- unlinkSync as unlinkSync5,
304640
- writeFileSync as writeFileSync7,
304695
+ renameSync as renameSync7,
304696
+ unlinkSync as unlinkSync6,
304697
+ writeFileSync as writeFileSync8,
304641
304698
  writeSync as writeSync3
304642
304699
  } from "node:fs";
304643
- import { homedir as homedir17, tmpdir as tmpdir6 } from "node:os";
304644
- import { basename as basename9, delimiter, dirname as dirname11, join as join19 } from "node:path";
304700
+ import { homedir as homedir18, tmpdir as tmpdir6 } from "node:os";
304701
+ import { basename as basename9, delimiter, dirname as dirname11, join as join20 } from "node:path";
304702
+
304703
+ // packages/cli/src/config-home.ts
304704
+ import { homedir as homedir17 } from "node:os";
304705
+ import { join as join18 } from "node:path";
304706
+ function omniusConfigDir(...parts) {
304707
+ return join18(
304708
+ process.env["OMNIUS_CONFIG_HOME"] ?? homedir17(),
304709
+ ".omnius",
304710
+ ...parts
304711
+ );
304712
+ }
304645
304713
 
304646
304714
  // packages/cli/src/tray-menu.ts
304647
304715
  import { execFile as execFile4 } from "node:child_process";
@@ -304668,30 +304736,686 @@ var run = promisify4(execFile4);
304668
304736
  init_daemon();
304669
304737
 
304670
304738
  // packages/cli/src/updater.ts
304671
- import { join as join18 } from "node:path";
304739
+ import { join as join19 } from "node:path";
304672
304740
  var UPDATE_CHECK_INTERVAL_MS = 60 * 1e3;
304673
304741
  var CACHE_DIR = resolveUpdatePaths().stateDir;
304674
- var CACHE_FILE = join18(CACHE_DIR, "registry-check.json");
304742
+ var CACHE_FILE = join19(CACHE_DIR, "registry-check.json");
304743
+
304744
+ // packages/backend-vllm/dist/providerRegistry.js
304745
+ var CHAT_CAPABILITIES = [
304746
+ "chat",
304747
+ "streaming",
304748
+ "models",
304749
+ "tools",
304750
+ "structured-output"
304751
+ ];
304752
+ var OPENAI_CAPABILITIES = [
304753
+ ...CHAT_CAPABILITIES,
304754
+ "embeddings"
304755
+ ];
304756
+ var bearerAuth = (required, keyPrefix, staticHeaders) => ({
304757
+ strategy: "bearer",
304758
+ required,
304759
+ ...keyPrefix ? { keyPrefix } : {},
304760
+ ...staticHeaders ? { staticHeaders } : {}
304761
+ });
304762
+ var descriptor = (value) => Object.freeze({
304763
+ ...value,
304764
+ aliases: Object.freeze([...value.aliases]),
304765
+ paths: Object.freeze({ ...value.paths }),
304766
+ auth: Object.freeze({
304767
+ ...value.auth,
304768
+ ...value.auth.staticHeaders ? { staticHeaders: Object.freeze({ ...value.auth.staticHeaders }) } : {}
304769
+ }),
304770
+ capabilities: Object.freeze([...value.capabilities]),
304771
+ ...value.availability ? { availability: Object.freeze({ ...value.availability }) } : {}
304772
+ });
304773
+ var registrations = [
304774
+ {
304775
+ descriptor: descriptor({
304776
+ id: "mesh",
304777
+ aliases: [],
304778
+ label: "Sponsored inference mesh",
304779
+ protocol: "openai-chat",
304780
+ local: false,
304781
+ apiPrefix: "/v1",
304782
+ paths: { chat: "/v1/chat/completions", models: "/v1/models" },
304783
+ auth: bearerAuth(true),
304784
+ capabilities: CHAT_CAPABILITIES,
304785
+ defaultUrl: "http://127.0.0.1:11436/v1",
304786
+ description: "Opt-in remote sponsor inference through your private authenticated mesh gateway."
304787
+ }),
304788
+ // A loopback port is not provider identity. Select this transport explicitly.
304789
+ match: () => false
304790
+ },
304791
+ {
304792
+ descriptor: descriptor({
304793
+ id: "anthropic",
304794
+ aliases: ["claude"],
304795
+ label: "Anthropic (Claude)",
304796
+ protocol: "anthropic-messages",
304797
+ local: false,
304798
+ apiPrefix: "/v1",
304799
+ paths: {
304800
+ chat: "/v1/messages",
304801
+ models: "/v1/models"
304802
+ },
304803
+ auth: {
304804
+ strategy: "anthropic-api-key",
304805
+ required: true,
304806
+ keyPrefix: "sk-ant-",
304807
+ staticHeaders: { "anthropic-version": "2023-06-01" }
304808
+ },
304809
+ capabilities: CHAT_CAPABILITIES,
304810
+ defaultUrl: "https://api.anthropic.com/v1",
304811
+ apiKeyUrl: "https://console.anthropic.com/settings/keys",
304812
+ docsUrl: "https://docs.anthropic.com/en/api",
304813
+ description: "Claude through Anthropic's native Messages API."
304814
+ }),
304815
+ match: (url) => url.hostname.toLowerCase() === "api.anthropic.com"
304816
+ },
304817
+ {
304818
+ descriptor: descriptor({
304819
+ id: "gemini",
304820
+ aliases: ["google", "google-ai"],
304821
+ label: "Google Gemini",
304822
+ protocol: "openai-chat",
304823
+ local: false,
304824
+ apiPrefix: "/v1beta/openai",
304825
+ paths: {
304826
+ chat: "/v1beta/openai/chat/completions",
304827
+ models: "/v1beta/openai/models",
304828
+ embeddings: "/v1beta/openai/embeddings"
304829
+ },
304830
+ auth: bearerAuth(true, void 0, {
304831
+ "x-goog-api-client": "omnius/{version}"
304832
+ }),
304833
+ capabilities: OPENAI_CAPABILITIES,
304834
+ defaultUrl: "https://generativelanguage.googleapis.com/v1beta/openai",
304835
+ apiKeyUrl: "https://aistudio.google.com/app/apikey",
304836
+ docsUrl: "https://ai.google.dev/gemini-api/docs/openai",
304837
+ description: "Gemini through Google's official OpenAI-compatible API."
304838
+ }),
304839
+ match: (url) => url.hostname.toLowerCase() === "generativelanguage.googleapis.com"
304840
+ },
304841
+ {
304842
+ descriptor: descriptor({
304843
+ id: "openai",
304844
+ aliases: [],
304845
+ label: "OpenAI",
304846
+ protocol: "openai-chat",
304847
+ local: false,
304848
+ apiPrefix: "/v1",
304849
+ paths: {
304850
+ chat: "/v1/chat/completions",
304851
+ models: "/v1/models",
304852
+ embeddings: "/v1/embeddings"
304853
+ },
304854
+ auth: bearerAuth(true, "sk-"),
304855
+ capabilities: OPENAI_CAPABILITIES,
304856
+ defaultUrl: "https://api.openai.com/v1",
304857
+ apiKeyUrl: "https://platform.openai.com/api-keys",
304858
+ docsUrl: "https://platform.openai.com/docs/api-reference",
304859
+ description: "OpenAI API models."
304860
+ }),
304861
+ match: (url) => url.hostname.toLowerCase() === "api.openai.com"
304862
+ },
304863
+ {
304864
+ descriptor: descriptor({
304865
+ id: "openrouter",
304866
+ aliases: [],
304867
+ label: "OpenRouter",
304868
+ protocol: "openai-chat",
304869
+ local: false,
304870
+ apiPrefix: "/v1",
304871
+ paths: {
304872
+ chat: "/v1/chat/completions",
304873
+ models: "/v1/models",
304874
+ embeddings: "/v1/embeddings"
304875
+ },
304876
+ auth: bearerAuth(true, "sk-or-"),
304877
+ capabilities: OPENAI_CAPABILITIES,
304878
+ defaultUrl: "https://openrouter.ai/api/v1",
304879
+ apiKeyUrl: "https://openrouter.ai/keys",
304880
+ docsUrl: "https://openrouter.ai/docs",
304881
+ description: "OpenAI-compatible routing across hosted models."
304882
+ }),
304883
+ match: (url) => url.hostname.toLowerCase() === "openrouter.ai"
304884
+ },
304885
+ {
304886
+ descriptor: descriptor({
304887
+ id: "groq",
304888
+ aliases: [],
304889
+ label: "Groq",
304890
+ protocol: "openai-chat",
304891
+ local: false,
304892
+ apiPrefix: "/openai/v1",
304893
+ paths: {
304894
+ chat: "/openai/v1/chat/completions",
304895
+ models: "/openai/v1/models",
304896
+ embeddings: "/openai/v1/embeddings"
304897
+ },
304898
+ auth: bearerAuth(true, "gsk_"),
304899
+ capabilities: OPENAI_CAPABILITIES,
304900
+ defaultUrl: "https://api.groq.com/openai/v1",
304901
+ apiKeyUrl: "https://console.groq.com/keys",
304902
+ docsUrl: "https://console.groq.com/docs",
304903
+ description: "Groq OpenAI-compatible inference."
304904
+ }),
304905
+ match: (url) => url.hostname.toLowerCase() === "api.groq.com"
304906
+ },
304907
+ {
304908
+ descriptor: descriptor({
304909
+ id: "deepinfra",
304910
+ aliases: [],
304911
+ label: "DeepInfra",
304912
+ protocol: "openai-chat",
304913
+ local: false,
304914
+ apiPrefix: "/v1/openai",
304915
+ paths: {
304916
+ chat: "/v1/openai/chat/completions",
304917
+ models: "/v1/openai/models",
304918
+ embeddings: "/v1/openai/embeddings"
304919
+ },
304920
+ auth: bearerAuth(true),
304921
+ capabilities: OPENAI_CAPABILITIES,
304922
+ defaultUrl: "https://api.deepinfra.com/v1/openai",
304923
+ apiKeyUrl: "https://deepinfra.com/dash/api_keys",
304924
+ docsUrl: "https://deepinfra.com/docs/openai_api",
304925
+ description: "DeepInfra OpenAI-compatible hosted models."
304926
+ }),
304927
+ match: (url) => url.hostname.toLowerCase() === "api.deepinfra.com"
304928
+ },
304929
+ {
304930
+ descriptor: descriptor({
304931
+ id: "fireworks",
304932
+ aliases: ["fireworks-ai"],
304933
+ label: "Fireworks AI",
304934
+ protocol: "openai-chat",
304935
+ local: false,
304936
+ apiPrefix: "/inference/v1",
304937
+ paths: {
304938
+ chat: "/inference/v1/chat/completions",
304939
+ models: "/inference/v1/models",
304940
+ embeddings: "/inference/v1/embeddings"
304941
+ },
304942
+ auth: bearerAuth(true, "fw_"),
304943
+ capabilities: OPENAI_CAPABILITIES,
304944
+ defaultUrl: "https://api.fireworks.ai/inference/v1",
304945
+ apiKeyUrl: "https://fireworks.ai/account/api-keys",
304946
+ docsUrl: "https://docs.fireworks.ai",
304947
+ description: "Fireworks OpenAI-compatible inference."
304948
+ }),
304949
+ match: (url) => url.hostname.toLowerCase() === "api.fireworks.ai"
304950
+ },
304951
+ {
304952
+ descriptor: descriptor({
304953
+ id: "together",
304954
+ aliases: ["together-ai"],
304955
+ label: "Together AI",
304956
+ protocol: "openai-chat",
304957
+ local: false,
304958
+ apiPrefix: "/v1",
304959
+ paths: {
304960
+ chat: "/v1/chat/completions",
304961
+ models: "/v1/models",
304962
+ embeddings: "/v1/embeddings"
304963
+ },
304964
+ auth: bearerAuth(true),
304965
+ capabilities: OPENAI_CAPABILITIES,
304966
+ defaultUrl: "https://api.together.ai/v1",
304967
+ apiKeyUrl: "https://api.together.xyz/settings/api-keys",
304968
+ docsUrl: "https://docs.together.ai",
304969
+ description: "Together OpenAI-compatible inference."
304970
+ }),
304971
+ match: (url) => ["api.together.ai", "api.together.xyz"].includes(url.hostname.toLowerCase())
304972
+ },
304973
+ {
304974
+ descriptor: descriptor({
304975
+ id: "chutes",
304976
+ aliases: ["chutes-ai"],
304977
+ label: "Chutes AI",
304978
+ protocol: "openai-chat",
304979
+ local: false,
304980
+ apiPrefix: "/v1",
304981
+ paths: {
304982
+ chat: "/v1/chat/completions",
304983
+ models: "/v1/models",
304984
+ embeddings: "/v1/embeddings"
304985
+ },
304986
+ auth: bearerAuth(true, "cpk_"),
304987
+ capabilities: OPENAI_CAPABILITIES,
304988
+ defaultUrl: "https://llm.chutes.ai/v1",
304989
+ apiKeyUrl: "https://chutes.ai/app/api",
304990
+ docsUrl: "https://docs.chutes.ai",
304991
+ description: "Chutes OpenAI-compatible model endpoint."
304992
+ }),
304993
+ match: (url) => ["llm.chutes.ai", "chutes.ai"].includes(url.hostname.toLowerCase())
304994
+ },
304995
+ {
304996
+ descriptor: descriptor({
304997
+ id: "mistral",
304998
+ aliases: ["mistral-ai"],
304999
+ label: "Mistral AI",
305000
+ protocol: "openai-chat",
305001
+ local: false,
305002
+ apiPrefix: "/v1",
305003
+ paths: {
305004
+ chat: "/v1/chat/completions",
305005
+ models: "/v1/models",
305006
+ embeddings: "/v1/embeddings"
305007
+ },
305008
+ auth: bearerAuth(true),
305009
+ capabilities: OPENAI_CAPABILITIES,
305010
+ defaultUrl: "https://api.mistral.ai/v1",
305011
+ apiKeyUrl: "https://console.mistral.ai/api-keys",
305012
+ docsUrl: "https://docs.mistral.ai",
305013
+ description: "Mistral hosted model endpoint."
305014
+ }),
305015
+ match: (url) => url.hostname.toLowerCase() === "api.mistral.ai"
305016
+ },
305017
+ {
305018
+ descriptor: descriptor({
305019
+ id: "cerebras",
305020
+ aliases: [],
305021
+ label: "Cerebras",
305022
+ protocol: "openai-chat",
305023
+ local: false,
305024
+ apiPrefix: "/v1",
305025
+ paths: {
305026
+ chat: "/v1/chat/completions",
305027
+ models: "/v1/models",
305028
+ embeddings: "/v1/embeddings"
305029
+ },
305030
+ auth: bearerAuth(true, "csk-"),
305031
+ capabilities: OPENAI_CAPABILITIES,
305032
+ defaultUrl: "https://api.cerebras.ai/v1",
305033
+ apiKeyUrl: "https://cloud.cerebras.ai/platform",
305034
+ docsUrl: "https://inference-docs.cerebras.ai",
305035
+ description: "Cerebras OpenAI-compatible inference."
305036
+ }),
305037
+ match: (url) => url.hostname.toLowerCase() === "api.cerebras.ai"
305038
+ },
305039
+ {
305040
+ descriptor: descriptor({
305041
+ id: "sambanova",
305042
+ aliases: ["samba-nova"],
305043
+ label: "SambaNova",
305044
+ protocol: "openai-chat",
305045
+ local: false,
305046
+ apiPrefix: "/v1",
305047
+ paths: {
305048
+ chat: "/v1/chat/completions",
305049
+ models: "/v1/models",
305050
+ embeddings: "/v1/embeddings"
305051
+ },
305052
+ auth: bearerAuth(true),
305053
+ capabilities: OPENAI_CAPABILITIES,
305054
+ defaultUrl: "https://api.sambanova.ai/v1",
305055
+ apiKeyUrl: "https://cloud.sambanova.ai/apis",
305056
+ docsUrl: "https://docs.sambanova.ai",
305057
+ description: "SambaNova OpenAI-compatible inference."
305058
+ }),
305059
+ match: (url) => url.hostname.toLowerCase() === "api.sambanova.ai"
305060
+ },
305061
+ {
305062
+ descriptor: descriptor({
305063
+ id: "nvidia",
305064
+ aliases: ["nvidia-nim", "nim"],
305065
+ label: "NVIDIA NIM",
305066
+ protocol: "openai-chat",
305067
+ local: false,
305068
+ apiPrefix: "/v1",
305069
+ paths: {
305070
+ chat: "/v1/chat/completions",
305071
+ models: "/v1/models",
305072
+ embeddings: "/v1/embeddings"
305073
+ },
305074
+ auth: bearerAuth(true, "nvapi-"),
305075
+ capabilities: OPENAI_CAPABILITIES,
305076
+ defaultUrl: "https://integrate.api.nvidia.com/v1",
305077
+ apiKeyUrl: "https://build.nvidia.com",
305078
+ docsUrl: "https://docs.api.nvidia.com/nim",
305079
+ description: "NVIDIA-hosted NIM models."
305080
+ }),
305081
+ match: (url) => url.hostname.toLowerCase() === "integrate.api.nvidia.com"
305082
+ },
305083
+ {
305084
+ descriptor: descriptor({
305085
+ id: "hyperbolic",
305086
+ aliases: [],
305087
+ label: "Hyperbolic",
305088
+ protocol: "openai-chat",
305089
+ local: false,
305090
+ apiPrefix: "/v1",
305091
+ paths: {
305092
+ chat: "/v1/chat/completions",
305093
+ models: "/v1/models",
305094
+ embeddings: "/v1/embeddings"
305095
+ },
305096
+ auth: bearerAuth(true),
305097
+ capabilities: OPENAI_CAPABILITIES,
305098
+ defaultUrl: "https://api.hyperbolic.xyz/v1",
305099
+ apiKeyUrl: "https://app.hyperbolic.xyz/settings",
305100
+ docsUrl: "https://docs.hyperbolic.xyz",
305101
+ description: "Retired Hyperbolic serverless API. Explicit custom deployments require their own URL.",
305102
+ availability: { state: "retired", reason: "Hyperbolic's serverless inference API has been retired; old serverless models no longer accept requests, including with valid keys.", docsUrl: "https://www.hyperbolic.ai/docs/faq/inference-models" }
305103
+ }),
305104
+ match: (url) => url.hostname.toLowerCase() === "api.hyperbolic.xyz"
305105
+ },
305106
+ {
305107
+ descriptor: descriptor({
305108
+ id: "ollama",
305109
+ aliases: [],
305110
+ label: "Ollama (local)",
305111
+ protocol: "ollama",
305112
+ local: true,
305113
+ apiPrefix: "",
305114
+ paths: {
305115
+ chat: "/v1/chat/completions",
305116
+ nativeChat: "/api/chat",
305117
+ models: "/api/tags",
305118
+ embeddings: "/api/embed",
305119
+ health: "/api/tags"
305120
+ },
305121
+ auth: bearerAuth(false),
305122
+ capabilities: OPENAI_CAPABILITIES,
305123
+ defaultUrl: "http://127.0.0.1:11434",
305124
+ docsUrl: "https://docs.ollama.com/api",
305125
+ description: "Local Ollama runtime."
305126
+ }),
305127
+ match: (url) => url.port === "11434"
305128
+ },
305129
+ {
305130
+ descriptor: descriptor({
305131
+ id: "lmstudio",
305132
+ aliases: ["lm-studio"],
305133
+ label: "LM Studio (local)",
305134
+ protocol: "openai-chat",
305135
+ local: true,
305136
+ apiPrefix: "/v1",
305137
+ paths: {
305138
+ chat: "/v1/chat/completions",
305139
+ models: "/v1/models",
305140
+ embeddings: "/v1/embeddings"
305141
+ },
305142
+ auth: bearerAuth(false),
305143
+ capabilities: OPENAI_CAPABILITIES,
305144
+ defaultUrl: "http://127.0.0.1:1234/v1",
305145
+ docsUrl: "https://lmstudio.ai/docs",
305146
+ description: "Local LM Studio OpenAI-compatible server."
305147
+ }),
305148
+ match: (url) => url.port === "1234"
305149
+ },
305150
+ {
305151
+ descriptor: descriptor({
305152
+ id: "vllm",
305153
+ aliases: ["v-llm"],
305154
+ label: "vLLM (local)",
305155
+ protocol: "openai-chat",
305156
+ local: true,
305157
+ apiPrefix: "/v1",
305158
+ paths: {
305159
+ chat: "/v1/chat/completions",
305160
+ models: "/v1/models",
305161
+ embeddings: "/v1/embeddings",
305162
+ health: "/health"
305163
+ },
305164
+ auth: bearerAuth(false),
305165
+ capabilities: OPENAI_CAPABILITIES,
305166
+ defaultUrl: "http://127.0.0.1:8000/v1",
305167
+ docsUrl: "https://docs.vllm.ai",
305168
+ description: "Self-hosted vLLM OpenAI-compatible endpoint."
305169
+ }),
305170
+ match: (url) => url.port === "8000"
305171
+ }
305172
+ ];
305173
+ var descriptors = registrations.map((entry) => entry.descriptor);
305174
+ function listProviderDescriptors() {
305175
+ return [...descriptors].sort((left, right) => Number(right.local) - Number(left.local)).map((entry) => ({
305176
+ ...entry,
305177
+ aliases: [...entry.aliases],
305178
+ paths: { ...entry.paths },
305179
+ auth: {
305180
+ ...entry.auth,
305181
+ ...entry.auth.staticHeaders ? { staticHeaders: { ...entry.auth.staticHeaders } } : {}
305182
+ },
305183
+ capabilities: [...entry.capabilities],
305184
+ ...entry.availability ? { availability: { ...entry.availability } } : {}
305185
+ }));
305186
+ }
305187
+
305188
+ // packages/backend-vllm/dist/normalizeUrl.js
305189
+ function normalizeBaseUrl(url) {
305190
+ let value = url.trim().replace(/\/+$/, "");
305191
+ value = value.replace(/\/chat\/completions$/, "");
305192
+ value = value.replace(/\/completions$/, "");
305193
+ value = value.replace(/\/embeddings$/, "");
305194
+ value = value.replace(/\/models(?:\/.*)?$/, "");
305195
+ value = value.replace(/\/+$/, "");
305196
+ value = value.replace(/\/v1\/openai$/, "");
305197
+ value = value.replace(/\/+$/, "");
305198
+ value = value.replace(/\/v1$/, "");
305199
+ return value.replace(/\/+$/, "");
305200
+ }
305201
+ function toProviderInfo(provider) {
305202
+ const normalizedDefault = provider.defaultUrl ? normalizeBaseUrl(provider.defaultUrl) : "";
305203
+ const absoluteModelsUrl = provider.defaultUrl && provider.paths.models ? `${new URL(provider.defaultUrl).origin}${provider.paths.models}` : "";
305204
+ const modelsPath = normalizedDefault && absoluteModelsUrl.startsWith(normalizedDefault) ? absoluteModelsUrl.slice(normalizedDefault.length) || "/models" : provider.paths.models ?? `${provider.apiPrefix}/models`;
305205
+ return {
305206
+ id: provider.id,
305207
+ label: provider.label,
305208
+ local: provider.local,
305209
+ authRequired: provider.auth.required,
305210
+ ...provider.auth.keyPrefix ? { keyPrefix: provider.auth.keyPrefix } : {},
305211
+ // Compatibility path relative to normalizeBaseUrl(defaultUrl). New code
305212
+ // should use resolveProviderTransport().urls.models directly.
305213
+ modelsPath,
305214
+ ...provider.defaultUrl ? { defaultUrl: provider.defaultUrl } : {},
305215
+ ...provider.apiKeyUrl ? { apiKeyUrl: provider.apiKeyUrl } : {},
305216
+ ...provider.docsUrl ? { docsUrl: provider.docsUrl } : {},
305217
+ description: provider.description,
305218
+ protocol: provider.protocol,
305219
+ apiPrefix: provider.apiPrefix,
305220
+ aliases: provider.aliases
305221
+ };
305222
+ }
305223
+ var PROVIDER_PRESETS = [
305224
+ ...listProviderDescriptors().filter((provider) => provider.availability?.state !== "retired").map(toProviderInfo),
305225
+ {
305226
+ id: "custom",
305227
+ label: "Custom endpoint",
305228
+ local: false,
305229
+ authRequired: false,
305230
+ modelsPath: "/v1/models",
305231
+ description: "Custom endpoint; an explicit ollama, openai-chat, or anthropic-messages protocol is required."
305232
+ }
305233
+ ];
305234
+
305235
+ // packages/cli/src/provider-credentials.ts
305236
+ import { constants as constants3, closeSync as closeSync5, existsSync as existsSync8, fstatSync as fstatSync3, fsyncSync as fsyncSync3, lstatSync as lstatSync3, mkdirSync as mkdirSync7, openSync as openSync5, readFileSync as readFileSync9, readdirSync as readdirSync2, renameSync as renameSync6, unlinkSync as unlinkSync5, writeFileSync as writeFileSync7 } from "node:fs";
305237
+ var NOFOLLOW = constants3.O_NOFOLLOW ?? 0;
305238
+
305239
+ // packages/cli/src/config.ts
305240
+ var DEFAULT_CONFIG2 = Object.freeze({
305241
+ backendUrl: "http://127.0.0.1:11434",
305242
+ model: "",
305243
+ backendType: "ollama",
305244
+ apiKey: "",
305245
+ maxRetries: 3,
305246
+ timeoutMs: 3e5,
305247
+ dryRun: false,
305248
+ verbose: false,
305249
+ debug: false,
305250
+ thinking: false,
305251
+ dbPath: omniusConfigDir("memory.db")
305252
+ });
305253
+ var LEGACY_LOCAL_INFERENCE = Object.freeze({
305254
+ backendUrl: "http://127.0.0.1:11434",
305255
+ backendType: "ollama",
305256
+ model: ""
305257
+ });
305258
+
305259
+ // packages/cli/src/redact/secret-redactor.ts
305260
+ var _PREFIX_PATTERNS = [
305261
+ "sk-[A-Za-z0-9_-]{10,}",
305262
+ // OpenAI / OpenRouter / Anthropic (sk-ant-*)
305263
+ "ghp_[A-Za-z0-9]{10,}",
305264
+ // GitHub PAT (classic)
305265
+ "github_pat_[A-Za-z0-9_]{10,}",
305266
+ // GitHub PAT (fine-grained)
305267
+ "xox[baprs]-[A-Za-z0-9-]{10,}",
305268
+ // Slack tokens
305269
+ "AIza[A-Za-z0-9_-]{30,}",
305270
+ // Google API keys
305271
+ "pplx-[A-Za-z0-9]{10,}",
305272
+ // Perplexity
305273
+ "fal_[A-Za-z0-9_-]{10,}",
305274
+ // Fal.ai
305275
+ "fc-[A-Za-z0-9]{10,}",
305276
+ // Firecrawl
305277
+ "bb_live_[A-Za-z0-9_-]{10,}",
305278
+ // BrowserBase
305279
+ "gAAAA[A-Za-z0-9_=-]{20,}",
305280
+ // Codex encrypted tokens
305281
+ "AKIA[A-Z0-9]{16}",
305282
+ // AWS Access Key ID
305283
+ "sk_live_[A-Za-z0-9]{10,}",
305284
+ // Stripe secret key (live)
305285
+ "sk_test_[A-Za-z0-9]{10,}",
305286
+ // Stripe secret key (test)
305287
+ "rk_live_[A-Za-z0-9]{10,}",
305288
+ // Stripe restricted key
305289
+ "SG\\.[A-Za-z0-9_-]{10,}",
305290
+ // SendGrid API key
305291
+ "hf_[A-Za-z0-9]{10,}",
305292
+ // HuggingFace token
305293
+ "r8_[A-Za-z0-9]{10,}",
305294
+ // Replicate API token
305295
+ "npm_[A-Za-z0-9]{10,}",
305296
+ // npm access token
305297
+ "pypi-[A-Za-z0-9_-]{10,}",
305298
+ // PyPI API token
305299
+ "dop_v1_[A-Za-z0-9]{10,}",
305300
+ // DigitalOcean PAT
305301
+ "doo_v1_[A-Za-z0-9]{10,}",
305302
+ // DigitalOcean OAuth
305303
+ "am_[A-Za-z0-9_-]{10,}"
305304
+ // AgentMail API key
305305
+ ];
305306
+ var _SECRET_ENV_NAMES = "(?:API_?KEY|TOKEN|SECRET|PASSWORD|PASSWD|CREDENTIAL|AUTH)";
305307
+ var _JSON_KEY_NAMES = "(?:api_?[Kk]ey|token|secret|password|access_token|refresh_token|auth_token|bearer|secret_value|raw_secret|secret_input|key_material)";
305308
+ var _PREFIX_RE = new RegExp(
305309
+ "(?<![A-Za-z0-9_-])(" + _PREFIX_PATTERNS.join("|") + ")(?![A-Za-z0-9_-])",
305310
+ "g"
305311
+ );
305312
+ var _ENV_ASSIGN_RE = new RegExp(
305313
+ "(?<![A-Z_])([A-Z_]*" + _SECRET_ENV_NAMES + `[A-Z_]*)\\s*=\\s*(['"]?)(\\S+)\\2`,
305314
+ "gi"
305315
+ );
305316
+ var _JSON_FIELD_RE = new RegExp(
305317
+ '("' + _JSON_KEY_NAMES + '")\\s*:\\s*"([^"]+)"',
305318
+ "gi"
305319
+ );
305320
+
305321
+ // packages/cli/src/tui/omnius-directory.ts
305322
+ init_dist5();
305323
+
305324
+ // packages/cli/src/tui/theme.ts
305325
+ var TERMINAL_DEFAULTS = {
305326
+ mode: "system",
305327
+ bg: -1,
305328
+ accent: -1,
305329
+ textPrimary: -1,
305330
+ textDim: -1,
305331
+ boxColor: -1
305332
+ };
305333
+ var config = { ...TERMINAL_DEFAULTS };
305334
+
305335
+ // packages/cli/src/tui/native/output-scope.ts
305336
+ import { AsyncLocalStorage as AsyncLocalStorage5 } from "node:async_hooks";
305337
+ var scopes = new AsyncLocalStorage5();
305338
+
305339
+ // packages/cli/src/ui/brand-palette.ts
305340
+ var OMNIUS_EARTH_HEX = Object.freeze({
305341
+ ink: "#101310",
305342
+ void: "#080a08",
305343
+ canvas: "#0d100d",
305344
+ backdropTop: "#171813",
305345
+ backdropBottom: "#2a2019",
305346
+ panel: "#111510",
305347
+ panelRaised: "#1d241e",
305348
+ panelHover: "#29322a",
305349
+ paper: "#f3f2ec",
305350
+ ground: "#d4d1c3",
305351
+ moss: "#506a55",
305352
+ sage: "#91aa93",
305353
+ muted: "#b8bcb5",
305354
+ lichen: "#d8ed9d",
305355
+ bark: "#936658",
305356
+ soil: "#2a1d17",
305357
+ clay: "#d27b61",
305358
+ ochre: "#dfbd73",
305359
+ success: "#7fd48b"
305360
+ });
305361
+ var OMNIUS_EARTH_256 = Object.freeze({
305362
+ background: 233,
305363
+ surface: 234,
305364
+ surfaceRaised: 235,
305365
+ accent: 108,
305366
+ accentDim: 65,
305367
+ textPrimary: 254,
305368
+ textDim: 145,
305369
+ ground: 187,
305370
+ focus: 193,
305371
+ success: 114,
305372
+ warning: 180,
305373
+ error: 173,
305374
+ info: 108,
305375
+ bark: 137
305376
+ });
305377
+
305378
+ // packages/cli/src/tui/text-selection.ts
305379
+ var SEL_BG = OMNIUS_EARTH_256.accent;
305380
+ var SEL_FG = 30;
305381
+ var SEL_START = `\x1B[${SEL_FG}m\x1B[48;5;${SEL_BG}m`;
305382
+
305383
+ // packages/cli/src/tui/task-complete-box.ts
305384
+ var TASK_COMPLETE_GREEN_256 = 114;
305385
+ var GREEN = `\x1B[38;5;${TASK_COMPLETE_GREEN_256}m`;
305386
+ var FG_BORDER = `\x1B[38;5;${TASK_COMPLETE_GREEN_256}m`;
305387
+ var FG_TITLE = `\x1B[1;38;5;${TASK_COMPLETE_GREEN_256}m`;
305388
+ var wrapGraphemes = new Intl.Segmenter(void 0, {
305389
+ granularity: "grapheme"
305390
+ });
305391
+
305392
+ // packages/cli/src/tui/omnius-directory.ts
305393
+ var MAX_CONTEXT_LEDGER_BYTES = 512 * 1024;
305394
+ var SAME_TASK_REPLACE_WINDOW_MS = 12 * 60 * 60 * 1e3;
305395
+
305396
+ // packages/cli/src/service-auto-update.ts
305397
+ var SERVICE_AUTO_UPDATE_INTERVAL_MS = 60 * 60 * 1e3;
305398
+ var FAILED_TARGET_RETRY_MS = 24 * 60 * 60 * 1e3;
304675
305399
 
304676
305400
  // packages/cli/src/tray.ts
304677
305401
  var DEFAULT_ENDPOINT = "http://127.0.0.1:11435";
304678
305402
  function uidSuffix() {
304679
305403
  return typeof process.getuid === "function" ? String(process.getuid()) : "user";
304680
305404
  }
304681
- function resolveTrayPaths(env = process.env, platform2 = process.platform, home = homedir17()) {
304682
- const runtimeBase = env["XDG_RUNTIME_DIR"] || join19(tmpdir6(), `omnius-${uidSuffix()}`);
304683
- const stateBase = platform2 === "win32" ? env["LOCALAPPDATA"] || join19(home, "AppData", "Local") : env["XDG_STATE_HOME"] || join19(home, ".local", "state");
304684
- const configBase = platform2 === "win32" ? env["APPDATA"] || join19(home, "AppData", "Roaming") : env["XDG_CONFIG_HOME"] || join19(home, ".config");
304685
- const runtimeDir = join19(runtimeBase, "omnius");
304686
- const stateDir = platform2 === "win32" ? join19(stateBase, "Omnius") : join19(stateBase, "omnius");
304687
- const autostartFile = platform2 === "darwin" ? join19(home, "Library", "LaunchAgents", "ai.omnius.tray.plist") : platform2 === "win32" ? join19(configBase, "Microsoft", "Windows", "Start Menu", "Programs", "Startup", "omnius-tray.cmd") : join19(configBase, "autostart", "omnius-tray.desktop");
305405
+ function resolveTrayPaths(env = process.env, platform2 = process.platform, home = homedir18()) {
305406
+ const runtimeBase = env["XDG_RUNTIME_DIR"] || join20(tmpdir6(), `omnius-${uidSuffix()}`);
305407
+ const stateBase = platform2 === "win32" ? env["LOCALAPPDATA"] || join20(home, "AppData", "Local") : env["XDG_STATE_HOME"] || join20(home, ".local", "state");
305408
+ const configBase = platform2 === "win32" ? env["APPDATA"] || join20(home, "AppData", "Roaming") : env["XDG_CONFIG_HOME"] || join20(home, ".config");
305409
+ const runtimeDir = join20(runtimeBase, "omnius");
305410
+ const stateDir = platform2 === "win32" ? join20(stateBase, "Omnius") : join20(stateBase, "omnius");
305411
+ const autostartFile = platform2 === "darwin" ? join20(home, "Library", "LaunchAgents", "ai.omnius.tray.plist") : platform2 === "win32" ? join20(configBase, "Microsoft", "Windows", "Start Menu", "Programs", "Startup", "omnius-tray.cmd") : join20(configBase, "autostart", "omnius-tray.desktop");
304688
305412
  return {
304689
305413
  runtimeDir,
304690
305414
  stateDir,
304691
- pidFile: join19(runtimeDir, "tray.pid"),
304692
- stateFile: join19(runtimeDir, "tray-state.json"),
304693
- stdoutLog: join19(stateDir, "tray.log"),
304694
- stderrLog: join19(stateDir, "tray.err.log"),
305415
+ pidFile: join20(runtimeDir, "tray.pid"),
305416
+ stateFile: join20(runtimeDir, "tray-state.json"),
305417
+ stdoutLog: join20(stateDir, "tray.log"),
305418
+ stderrLog: join20(stateDir, "tray.err.log"),
304695
305419
  autostartFile
304696
305420
  };
304697
305421
  }
@@ -304765,7 +305489,7 @@ function isProcessAlive2(pid) {
304765
305489
  }
304766
305490
  function readPid(path3) {
304767
305491
  try {
304768
- const pid = Number(readFileSync9(path3, "utf8").trim());
305492
+ const pid = Number(readFileSync10(path3, "utf8").trim());
304769
305493
  return Number.isInteger(pid) && pid > 0 ? pid : null;
304770
305494
  } catch {
304771
305495
  return null;
@@ -304773,7 +305497,7 @@ function readPid(path3) {
304773
305497
  }
304774
305498
  function readProcessState(path3) {
304775
305499
  try {
304776
- return JSON.parse(readFileSync9(path3, "utf8"));
305500
+ return JSON.parse(readFileSync10(path3, "utf8"));
304777
305501
  } catch {
304778
305502
  return null;
304779
305503
  }
@@ -304807,7 +305531,7 @@ async function commandOutput(command, args, timeout = 2e3) {
304807
305531
  async function processCommandLine(pid) {
304808
305532
  try {
304809
305533
  if (process.platform === "linux") {
304810
- return readFileSync9(`/proc/${pid}/cmdline`, "utf8").replace(/\0/g, " ");
305534
+ return readFileSync10(`/proc/${pid}/cmdline`, "utf8").replace(/\0/g, " ");
304811
305535
  }
304812
305536
  if (process.platform !== "win32") {
304813
305537
  return (await commandOutput("ps", ["-p", String(pid), "-o", "command="])).trim();
@@ -304826,7 +305550,7 @@ async function getTrayStatus(explicitEndpoint) {
304826
305550
  const running = pid !== null && isProcessAlive2(pid);
304827
305551
  if (pid && !running) {
304828
305552
  try {
304829
- unlinkSync5(paths.pidFile);
305553
+ unlinkSync6(paths.pidFile);
304830
305554
  } catch {
304831
305555
  }
304832
305556
  }
@@ -304841,7 +305565,7 @@ async function getTrayStatus(explicitEndpoint) {
304841
305565
  // requested endpoint. This previously kept resurrecting an obsolete
304842
305566
  // custom port (for example 11535) after the daemon had returned to 11435.
304843
305567
  endpoint: running || !explicitEndpoint ? state?.endpoint || requestedEndpoint : requestedEndpoint,
304844
- registered: existsSync8(paths.autostartFile),
305568
+ registered: existsSync9(paths.autostartFile),
304845
305569
  registrationFile: paths.autostartFile,
304846
305570
  ...state?.health ? { health: state.health } : {},
304847
305571
  supported: support.supported,
@@ -304854,11 +305578,11 @@ async function stopTray() {
304854
305578
  const pid = readPid(paths.pidFile);
304855
305579
  if (!pid || !isProcessAlive2(pid)) {
304856
305580
  try {
304857
- unlinkSync5(paths.pidFile);
305581
+ unlinkSync6(paths.pidFile);
304858
305582
  } catch {
304859
305583
  }
304860
305584
  try {
304861
- unlinkSync5(paths.stateFile);
305585
+ unlinkSync6(paths.stateFile);
304862
305586
  } catch {
304863
305587
  }
304864
305588
  return false;
@@ -304875,11 +305599,11 @@ async function stopTray() {
304875
305599
  for (let i = 0; i < 30; i++) {
304876
305600
  if (!isProcessAlive2(pid)) {
304877
305601
  try {
304878
- unlinkSync5(paths.pidFile);
305602
+ unlinkSync6(paths.pidFile);
304879
305603
  } catch {
304880
305604
  }
304881
305605
  try {
304882
- unlinkSync5(paths.stateFile);
305606
+ unlinkSync6(paths.stateFile);
304883
305607
  } catch {
304884
305608
  }
304885
305609
  return true;
@@ -304894,11 +305618,11 @@ async function stopTray() {
304894
305618
  for (let i = 0; i < 20; i++) {
304895
305619
  if (!isProcessAlive2(pid)) {
304896
305620
  try {
304897
- unlinkSync5(paths.pidFile);
305621
+ unlinkSync6(paths.pidFile);
304898
305622
  } catch {
304899
305623
  }
304900
305624
  try {
304901
- unlinkSync5(paths.stateFile);
305625
+ unlinkSync6(paths.stateFile);
304902
305626
  } catch {
304903
305627
  }
304904
305628
  return true;
@@ -304964,6 +305688,8 @@ async function runUpdateWorkerRuntime(state, paths, endpoint) {
304964
305688
  } : null;
304965
305689
  },
304966
305690
  restartTray: trayWasRunning ? (executable) => restartTrayWithInstalledExecutable(executable, endpoint) : void 0,
305691
+ // A daemon that boots but crashes shortly after is an update failure.
305692
+ stabilityWindowMs: 15e3,
304967
305693
  signal: cancellation.signal
304968
305694
  },
304969
305695
  paths