@inkeep/agents-cli 0.22.0 → 0.22.2

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.
Files changed (2) hide show
  1. package/dist/index.js +1093 -927
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1025,9 +1025,9 @@ var init_request = __esm({
1025
1025
  routeIndex = 0;
1026
1026
  path;
1027
1027
  bodyCache = {};
1028
- constructor(request, path3 = "/", matchResult = [[]]) {
1028
+ constructor(request, path4 = "/", matchResult = [[]]) {
1029
1029
  this.raw = request;
1030
- this.path = path3;
1030
+ this.path = path4;
1031
1031
  this.#matchResult = matchResult;
1032
1032
  this.#validatedData = {};
1033
1033
  }
@@ -1620,7 +1620,6 @@ var init_schema = __esm({
1620
1620
  ...uiProperties,
1621
1621
  models: text("models", { mode: "json" }).$type(),
1622
1622
  stopWhen: text("stop_when", { mode: "json" }).$type(),
1623
- sandboxConfig: text("sandbox_config", { mode: "json" }).$type(),
1624
1623
  ...timestamps
1625
1624
  },
1626
1625
  (table) => [primaryKey({ columns: [table.tenantId, table.id] })]
@@ -2452,7 +2451,7 @@ var init_utility = __esm({
2452
2451
  });
2453
2452
 
2454
2453
  // ../packages/agents-core/src/validation/schemas.ts
2455
- var StopWhenSchema, AgentStopWhenSchema, SubAgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, SandboxConfigSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createAgentScopedApiSchema, createAgentScopedApiInsertSchema, createAgentScopedApiUpdateSchema, SubAgentSelectSchema, SubAgentInsertSchema, SubAgentUpdateSchema, SubAgentApiSelectSchema, SubAgentApiInsertSchema, SubAgentApiUpdateSchema, SubAgentRelationSelectSchema, SubAgentRelationInsertSchema, SubAgentRelationUpdateSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationQuerySchema, ExternalSubAgentRelationInsertSchema, ExternalSubAgentRelationApiInsertSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentUpdateSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentUpdateSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiUpdateSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionToolSelectSchema, FunctionToolInsertSchema, FunctionToolUpdateSchema, FunctionToolApiSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationUpdateSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullAgentAgentInsertSchema, AgentWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, ProjectResponse, SubAgentResponse, AgentResponse, ToolResponse, ExternalAgentResponse, ContextConfigResponse, ApiKeyResponse, CredentialReferenceResponse, FunctionResponse, FunctionToolResponse, DataComponentResponse, ArtifactComponentResponse, SubAgentRelationResponse, SubAgentToolRelationResponse, ConversationResponse, MessageResponse, ProjectListResponse, SubAgentListResponse, AgentListResponse, ToolListResponse, ExternalAgentListResponse, ContextConfigListResponse, ApiKeyListResponse, CredentialReferenceListResponse, FunctionListResponse, FunctionToolListResponse, DataComponentListResponse, ArtifactComponentListResponse, SubAgentRelationListResponse, SubAgentToolRelationListResponse, ConversationListResponse, MessageListResponse, SubAgentDataComponentResponse, SubAgentArtifactComponentResponse, SubAgentDataComponentListResponse, SubAgentArtifactComponentListResponse, HeadersScopeSchema, TenantId, ProjectId, AgentId, SubAgentId, TenantParamsSchema, TenantIdParamsSchema, TenantProjectParamsSchema, TenantProjectIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, PaginationQueryParamsSchema;
2454
+ var StopWhenSchema, AgentStopWhenSchema, SubAgentStopWhenSchema, MIN_ID_LENGTH, MAX_ID_LENGTH, URL_SAFE_ID_PATTERN, resourceIdSchema, ModelSettingsSchema, ModelSchema, ProjectModelSchema, FunctionToolConfigSchema, createApiSchema, createApiInsertSchema, createApiUpdateSchema, createAgentScopedApiSchema, createAgentScopedApiInsertSchema, createAgentScopedApiUpdateSchema, SubAgentSelectSchema, SubAgentInsertSchema, SubAgentUpdateSchema, SubAgentApiSelectSchema, SubAgentApiInsertSchema, SubAgentApiUpdateSchema, SubAgentRelationSelectSchema, SubAgentRelationInsertSchema, SubAgentRelationUpdateSchema, SubAgentRelationApiSelectSchema, SubAgentRelationApiInsertSchema, SubAgentRelationApiUpdateSchema, SubAgentRelationQuerySchema, ExternalSubAgentRelationInsertSchema, ExternalSubAgentRelationApiInsertSchema, AgentSelectSchema, AgentInsertSchema, AgentUpdateSchema, AgentApiSelectSchema, AgentApiInsertSchema, AgentApiUpdateSchema, TaskSelectSchema, TaskInsertSchema, TaskUpdateSchema, TaskApiSelectSchema, TaskApiInsertSchema, TaskApiUpdateSchema, TaskRelationSelectSchema, TaskRelationInsertSchema, TaskRelationUpdateSchema, TaskRelationApiSelectSchema, TaskRelationApiInsertSchema, TaskRelationApiUpdateSchema, imageUrlSchema, McpTransportConfigSchema, ToolStatusSchema, McpToolDefinitionSchema, ToolSelectSchema, ToolInsertSchema, ConversationSelectSchema, ConversationInsertSchema, ConversationUpdateSchema, ConversationApiSelectSchema, ConversationApiInsertSchema, ConversationApiUpdateSchema, MessageSelectSchema, MessageInsertSchema, MessageUpdateSchema, MessageApiSelectSchema, MessageApiInsertSchema, MessageApiUpdateSchema, ContextCacheSelectSchema, ContextCacheInsertSchema, ContextCacheUpdateSchema, ContextCacheApiSelectSchema, ContextCacheApiInsertSchema, ContextCacheApiUpdateSchema, DataComponentSelectSchema, DataComponentInsertSchema, DataComponentBaseSchema, DataComponentUpdateSchema, DataComponentApiSelectSchema, DataComponentApiInsertSchema, DataComponentApiUpdateSchema, SubAgentDataComponentSelectSchema, SubAgentDataComponentInsertSchema, SubAgentDataComponentUpdateSchema, SubAgentDataComponentApiSelectSchema, SubAgentDataComponentApiInsertSchema, SubAgentDataComponentApiUpdateSchema, ArtifactComponentSelectSchema, ArtifactComponentInsertSchema, ArtifactComponentUpdateSchema, ArtifactComponentApiSelectSchema, ArtifactComponentApiInsertSchema, ArtifactComponentApiUpdateSchema, SubAgentArtifactComponentSelectSchema, SubAgentArtifactComponentInsertSchema, SubAgentArtifactComponentUpdateSchema, SubAgentArtifactComponentApiSelectSchema, SubAgentArtifactComponentApiInsertSchema, SubAgentArtifactComponentApiUpdateSchema, ExternalAgentSelectSchema, ExternalAgentInsertSchema, ExternalAgentUpdateSchema, ExternalAgentApiSelectSchema, ExternalAgentApiInsertSchema, ExternalAgentApiUpdateSchema, AllAgentSchema, ApiKeySelectSchema, ApiKeyInsertSchema, ApiKeyUpdateSchema, ApiKeyApiSelectSchema, ApiKeyApiCreationResponseSchema, ApiKeyApiInsertSchema, ApiKeyApiUpdateSchema, CredentialReferenceSelectSchema, CredentialReferenceInsertSchema, CredentialReferenceUpdateSchema, CredentialReferenceApiSelectSchema, CredentialReferenceApiInsertSchema, CredentialReferenceApiUpdateSchema, McpToolSchema, MCPToolConfigSchema, ToolUpdateSchema, ToolApiSelectSchema, ToolApiInsertSchema, ToolApiUpdateSchema, FunctionToolSelectSchema, FunctionToolInsertSchema, FunctionToolUpdateSchema, FunctionToolApiSelectSchema, FunctionToolApiInsertSchema, FunctionToolApiUpdateSchema, FunctionSelectSchema, FunctionInsertSchema, FunctionUpdateSchema, FunctionApiSelectSchema, FunctionApiInsertSchema, FunctionApiUpdateSchema, FetchConfigSchema, FetchDefinitionSchema, ContextConfigSelectSchema, ContextConfigInsertSchema, ContextConfigUpdateSchema, ContextConfigApiSelectSchema, ContextConfigApiInsertSchema, ContextConfigApiUpdateSchema, SubAgentToolRelationSelectSchema, SubAgentToolRelationInsertSchema, SubAgentToolRelationUpdateSchema, SubAgentToolRelationApiSelectSchema, SubAgentToolRelationApiInsertSchema, SubAgentToolRelationApiUpdateSchema, LedgerArtifactSelectSchema, LedgerArtifactInsertSchema, LedgerArtifactUpdateSchema, LedgerArtifactApiSelectSchema, LedgerArtifactApiInsertSchema, LedgerArtifactApiUpdateSchema, StatusComponentSchema, StatusUpdateSchema, CanUseItemSchema, FullAgentAgentInsertSchema, AgentWithinContextOfProjectSchema, PaginationSchema, ErrorResponseSchema, ExistsResponseSchema, RemovedResponseSchema, ProjectSelectSchema, ProjectInsertSchema, ProjectUpdateSchema, ProjectApiSelectSchema, ProjectApiInsertSchema, ProjectApiUpdateSchema, FullProjectDefinitionSchema, ProjectResponse, SubAgentResponse, AgentResponse, ToolResponse, ExternalAgentResponse, ContextConfigResponse, ApiKeyResponse, CredentialReferenceResponse, FunctionResponse, FunctionToolResponse, DataComponentResponse, ArtifactComponentResponse, SubAgentRelationResponse, SubAgentToolRelationResponse, ConversationResponse, MessageResponse, ProjectListResponse, SubAgentListResponse, AgentListResponse, ToolListResponse, ExternalAgentListResponse, ContextConfigListResponse, ApiKeyListResponse, CredentialReferenceListResponse, FunctionListResponse, FunctionToolListResponse, DataComponentListResponse, ArtifactComponentListResponse, SubAgentRelationListResponse, SubAgentToolRelationListResponse, ConversationListResponse, MessageListResponse, SubAgentDataComponentResponse, SubAgentArtifactComponentResponse, SubAgentDataComponentListResponse, SubAgentArtifactComponentListResponse, HeadersScopeSchema, TenantId, ProjectId, AgentId, SubAgentId, TenantParamsSchema, TenantIdParamsSchema, TenantProjectParamsSchema, TenantProjectIdParamsSchema, TenantProjectAgentParamsSchema, TenantProjectAgentIdParamsSchema, TenantProjectAgentSubAgentParamsSchema, TenantProjectAgentSubAgentIdParamsSchema, PaginationQueryParamsSchema;
2456
2455
  var init_schemas = __esm({
2457
2456
  "../packages/agents-core/src/validation/schemas.ts"() {
2458
2457
  "use strict";
@@ -2494,12 +2493,6 @@ var init_schemas = __esm({
2494
2493
  structuredOutput: ModelSettingsSchema.optional(),
2495
2494
  summarizer: ModelSettingsSchema.optional()
2496
2495
  }).openapi("ProjectModel");
2497
- SandboxConfigSchema = z2.object({
2498
- provider: z2.enum(["vercel", "local"]),
2499
- runtime: z2.enum(["node22", "typescript"]),
2500
- timeout: z2.number().min(1e3).max(3e5).optional(),
2501
- vcpus: z2.number().min(1).max(8).optional()
2502
- }).openapi("SandboxConfig");
2503
2496
  FunctionToolConfigSchema = z2.object({
2504
2497
  name: z2.string(),
2505
2498
  description: z2.string(),
@@ -2519,15 +2512,9 @@ var init_schemas = __esm({
2519
2512
  models: ModelSchema.optional()
2520
2513
  });
2521
2514
  SubAgentUpdateSchema = SubAgentInsertSchema.partial();
2522
- SubAgentApiSelectSchema = createAgentScopedApiSchema(SubAgentSelectSchema).openapi(
2523
- "SubAgent"
2524
- );
2525
- SubAgentApiInsertSchema = createAgentScopedApiInsertSchema(
2526
- SubAgentInsertSchema
2527
- ).openapi("SubAgentCreate");
2528
- SubAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(
2529
- SubAgentUpdateSchema
2530
- ).openapi("SubAgentUpdate");
2515
+ SubAgentApiSelectSchema = createAgentScopedApiSchema(SubAgentSelectSchema).openapi("SubAgent");
2516
+ SubAgentApiInsertSchema = createAgentScopedApiInsertSchema(SubAgentInsertSchema).openapi("SubAgentCreate");
2517
+ SubAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(SubAgentUpdateSchema).openapi("SubAgentUpdate");
2531
2518
  SubAgentRelationSelectSchema = createSelectSchema(subAgentRelations);
2532
2519
  SubAgentRelationInsertSchema = createInsertSchema(subAgentRelations).extend({
2533
2520
  id: resourceIdSchema,
@@ -2596,9 +2583,7 @@ var init_schemas = __esm({
2596
2583
  AgentApiInsertSchema = createApiInsertSchema(AgentInsertSchema).extend({
2597
2584
  id: resourceIdSchema
2598
2585
  }).openapi("AgentCreate");
2599
- AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi(
2600
- "AgentUpdate"
2601
- );
2586
+ AgentApiUpdateSchema = createApiUpdateSchema(AgentUpdateSchema).openapi("AgentUpdate");
2602
2587
  TaskSelectSchema = createSelectSchema(tasks);
2603
2588
  TaskInsertSchema = createInsertSchema(tasks).extend({
2604
2589
  id: resourceIdSchema,
@@ -2683,15 +2668,9 @@ var init_schemas = __esm({
2683
2668
  contextConfigId: resourceIdSchema.optional()
2684
2669
  });
2685
2670
  ConversationUpdateSchema = ConversationInsertSchema.partial();
2686
- ConversationApiSelectSchema = createApiSchema(ConversationSelectSchema).openapi(
2687
- "Conversation"
2688
- );
2689
- ConversationApiInsertSchema = createApiInsertSchema(ConversationInsertSchema).openapi(
2690
- "ConversationCreate"
2691
- );
2692
- ConversationApiUpdateSchema = createApiUpdateSchema(ConversationUpdateSchema).openapi(
2693
- "ConversationUpdate"
2694
- );
2671
+ ConversationApiSelectSchema = createApiSchema(ConversationSelectSchema).openapi("Conversation");
2672
+ ConversationApiInsertSchema = createApiInsertSchema(ConversationInsertSchema).openapi("ConversationCreate");
2673
+ ConversationApiUpdateSchema = createApiUpdateSchema(ConversationUpdateSchema).openapi("ConversationUpdate");
2695
2674
  MessageSelectSchema = createSelectSchema(messages);
2696
2675
  MessageInsertSchema = createInsertSchema(messages).extend({
2697
2676
  id: resourceIdSchema,
@@ -2700,12 +2679,8 @@ var init_schemas = __esm({
2700
2679
  });
2701
2680
  MessageUpdateSchema = MessageInsertSchema.partial();
2702
2681
  MessageApiSelectSchema = createApiSchema(MessageSelectSchema).openapi("Message");
2703
- MessageApiInsertSchema = createApiInsertSchema(MessageInsertSchema).openapi(
2704
- "MessageCreate"
2705
- );
2706
- MessageApiUpdateSchema = createApiUpdateSchema(MessageUpdateSchema).openapi(
2707
- "MessageUpdate"
2708
- );
2682
+ MessageApiInsertSchema = createApiInsertSchema(MessageInsertSchema).openapi("MessageCreate");
2683
+ MessageApiUpdateSchema = createApiUpdateSchema(MessageUpdateSchema).openapi("MessageUpdate");
2709
2684
  ContextCacheSelectSchema = createSelectSchema(contextCache);
2710
2685
  ContextCacheInsertSchema = createInsertSchema(contextCache);
2711
2686
  ContextCacheUpdateSchema = ContextCacheInsertSchema.partial();
@@ -2721,15 +2696,9 @@ var init_schemas = __esm({
2721
2696
  updatedAt: true
2722
2697
  });
2723
2698
  DataComponentUpdateSchema = DataComponentInsertSchema.partial();
2724
- DataComponentApiSelectSchema = createApiSchema(
2725
- DataComponentSelectSchema
2726
- ).openapi("DataComponent");
2727
- DataComponentApiInsertSchema = createApiInsertSchema(
2728
- DataComponentInsertSchema
2729
- ).openapi("DataComponentCreate");
2730
- DataComponentApiUpdateSchema = createApiUpdateSchema(
2731
- DataComponentUpdateSchema
2732
- ).openapi("DataComponentUpdate");
2699
+ DataComponentApiSelectSchema = createApiSchema(DataComponentSelectSchema).openapi("DataComponent");
2700
+ DataComponentApiInsertSchema = createApiInsertSchema(DataComponentInsertSchema).openapi("DataComponentCreate");
2701
+ DataComponentApiUpdateSchema = createApiUpdateSchema(DataComponentUpdateSchema).openapi("DataComponentUpdate");
2733
2702
  SubAgentDataComponentSelectSchema = createSelectSchema(subAgentDataComponents);
2734
2703
  SubAgentDataComponentInsertSchema = createInsertSchema(subAgentDataComponents);
2735
2704
  SubAgentDataComponentUpdateSchema = SubAgentDataComponentInsertSchema.partial();
@@ -2791,15 +2760,9 @@ var init_schemas = __esm({
2791
2760
  id: resourceIdSchema
2792
2761
  });
2793
2762
  ExternalAgentUpdateSchema = ExternalAgentInsertSchema.partial();
2794
- ExternalAgentApiSelectSchema = createAgentScopedApiSchema(
2795
- ExternalAgentSelectSchema
2796
- ).openapi("ExternalAgent");
2797
- ExternalAgentApiInsertSchema = createAgentScopedApiInsertSchema(
2798
- ExternalAgentInsertSchema
2799
- ).openapi("ExternalAgentCreate");
2800
- ExternalAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(
2801
- ExternalAgentUpdateSchema
2802
- ).openapi("ExternalAgentUpdate");
2763
+ ExternalAgentApiSelectSchema = createAgentScopedApiSchema(ExternalAgentSelectSchema).openapi("ExternalAgent");
2764
+ ExternalAgentApiInsertSchema = createAgentScopedApiInsertSchema(ExternalAgentInsertSchema).openapi("ExternalAgentCreate");
2765
+ ExternalAgentApiUpdateSchema = createAgentScopedApiUpdateSchema(ExternalAgentUpdateSchema).openapi("ExternalAgentUpdate");
2803
2766
  AllAgentSchema = z2.discriminatedUnion("type", [
2804
2767
  SubAgentApiSelectSchema.extend({ type: z2.literal("internal") }),
2805
2768
  ExternalAgentApiSelectSchema.extend({ type: z2.literal("external") })
@@ -2862,9 +2825,7 @@ var init_schemas = __esm({
2862
2825
  retrievalParams: z2.record(z2.string(), z2.unknown()).nullish()
2863
2826
  });
2864
2827
  CredentialReferenceUpdateSchema = CredentialReferenceInsertSchema.partial();
2865
- CredentialReferenceApiSelectSchema = createApiSchema(
2866
- CredentialReferenceSelectSchema
2867
- ).extend({
2828
+ CredentialReferenceApiSelectSchema = createApiSchema(CredentialReferenceSelectSchema).extend({
2868
2829
  type: z2.enum(CredentialStoreType),
2869
2830
  tools: z2.array(ToolSelectSchema).optional()
2870
2831
  }).openapi("CredentialReference");
@@ -2914,27 +2875,17 @@ var init_schemas = __esm({
2914
2875
  id: resourceIdSchema
2915
2876
  });
2916
2877
  FunctionToolUpdateSchema = FunctionToolInsertSchema.partial();
2917
- FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).openapi(
2918
- "FunctionTool"
2919
- );
2920
- FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(
2921
- FunctionToolInsertSchema
2922
- ).openapi("FunctionToolCreate");
2923
- FunctionToolApiUpdateSchema = createApiUpdateSchema(
2924
- FunctionToolUpdateSchema
2925
- ).openapi("FunctionToolUpdate");
2878
+ FunctionToolApiSelectSchema = createApiSchema(FunctionToolSelectSchema).openapi("FunctionTool");
2879
+ FunctionToolApiInsertSchema = createAgentScopedApiInsertSchema(FunctionToolInsertSchema).openapi("FunctionToolCreate");
2880
+ FunctionToolApiUpdateSchema = createApiUpdateSchema(FunctionToolUpdateSchema).openapi("FunctionToolUpdate");
2926
2881
  FunctionSelectSchema = createSelectSchema(functions);
2927
2882
  FunctionInsertSchema = createInsertSchema(functions).extend({
2928
2883
  id: resourceIdSchema
2929
2884
  });
2930
2885
  FunctionUpdateSchema = FunctionInsertSchema.partial();
2931
2886
  FunctionApiSelectSchema = createApiSchema(FunctionSelectSchema).openapi("Function");
2932
- FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi(
2933
- "FunctionCreate"
2934
- );
2935
- FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi(
2936
- "FunctionUpdate"
2937
- );
2887
+ FunctionApiInsertSchema = createApiInsertSchema(FunctionInsertSchema).openapi("FunctionCreate");
2888
+ FunctionApiUpdateSchema = createApiUpdateSchema(FunctionUpdateSchema).openapi("FunctionUpdate");
2938
2889
  FetchConfigSchema = z2.object({
2939
2890
  url: z2.string().min(1, "URL is required"),
2940
2891
  method: z2.enum(["GET", "POST", "PUT", "DELETE", "PATCH"]).optional().default("GET"),
@@ -3082,8 +3033,7 @@ var init_schemas = __esm({
3082
3033
  ProjectSelectSchema = createSelectSchema(projects);
3083
3034
  ProjectInsertSchema = createInsertSchema(projects).extend({
3084
3035
  models: ProjectModelSchema,
3085
- stopWhen: StopWhenSchema.optional(),
3086
- sandboxConfig: SandboxConfigSchema.optional()
3036
+ stopWhen: StopWhenSchema.optional()
3087
3037
  }).omit({
3088
3038
  createdAt: true,
3089
3039
  updatedAt: true
@@ -5038,16 +4988,16 @@ var require_util = __commonJS({
5038
4988
  }
5039
4989
  exports.urlGenerate = urlGenerate;
5040
4990
  function normalize(aPath) {
5041
- var path3 = aPath;
4991
+ var path4 = aPath;
5042
4992
  var url = urlParse(aPath);
5043
4993
  if (url) {
5044
4994
  if (!url.path) {
5045
4995
  return aPath;
5046
4996
  }
5047
- path3 = url.path;
4997
+ path4 = url.path;
5048
4998
  }
5049
- var isAbsolute = exports.isAbsolute(path3);
5050
- var parts = path3.split(/\/+/);
4999
+ var isAbsolute = exports.isAbsolute(path4);
5000
+ var parts = path4.split(/\/+/);
5051
5001
  for (var part, up = 0, i2 = parts.length - 1; i2 >= 0; i2--) {
5052
5002
  part = parts[i2];
5053
5003
  if (part === ".") {
@@ -5064,15 +5014,15 @@ var require_util = __commonJS({
5064
5014
  }
5065
5015
  }
5066
5016
  }
5067
- path3 = parts.join("/");
5068
- if (path3 === "") {
5069
- path3 = isAbsolute ? "/" : ".";
5017
+ path4 = parts.join("/");
5018
+ if (path4 === "") {
5019
+ path4 = isAbsolute ? "/" : ".";
5070
5020
  }
5071
5021
  if (url) {
5072
- url.path = path3;
5022
+ url.path = path4;
5073
5023
  return urlGenerate(url);
5074
5024
  }
5075
- return path3;
5025
+ return path4;
5076
5026
  }
5077
5027
  exports.normalize = normalize;
5078
5028
  function join13(aRoot, aPath) {
@@ -6712,7 +6662,7 @@ var require_source_map_support = __commonJS({
6712
6662
  "use strict";
6713
6663
  init_esm_shims();
6714
6664
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
6715
- var path3 = __require("path");
6665
+ var path4 = __require("path");
6716
6666
  var fs5;
6717
6667
  try {
6718
6668
  fs5 = __require("fs");
@@ -6773,18 +6723,18 @@ var require_source_map_support = __commonJS({
6773
6723
  };
6774
6724
  }
6775
6725
  var retrieveFile = handlerExec(retrieveFileHandlers);
6776
- retrieveFileHandlers.push(function(path4) {
6777
- path4 = path4.trim();
6778
- if (/^file:/.test(path4)) {
6779
- path4 = path4.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
6726
+ retrieveFileHandlers.push(function(path5) {
6727
+ path5 = path5.trim();
6728
+ if (/^file:/.test(path5)) {
6729
+ path5 = path5.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
6780
6730
  return drive ? "" : (
6781
6731
  // file:///C:/dir/file -> C:/dir/file
6782
6732
  "/"
6783
6733
  );
6784
6734
  });
6785
6735
  }
6786
- if (path4 in fileContentsCache) {
6787
- return fileContentsCache[path4];
6736
+ if (path5 in fileContentsCache) {
6737
+ return fileContentsCache[path5];
6788
6738
  }
6789
6739
  var contents = "";
6790
6740
  try {
@@ -6792,7 +6742,7 @@ var require_source_map_support = __commonJS({
6792
6742
  var xhr = new XMLHttpRequest();
6793
6743
  xhr.open(
6794
6744
  "GET",
6795
- path4,
6745
+ path5,
6796
6746
  /** async */
6797
6747
  false
6798
6748
  );
@@ -6800,24 +6750,24 @@ var require_source_map_support = __commonJS({
6800
6750
  if (xhr.readyState === 4 && xhr.status === 200) {
6801
6751
  contents = xhr.responseText;
6802
6752
  }
6803
- } else if (fs5.existsSync(path4)) {
6804
- contents = fs5.readFileSync(path4, "utf8");
6753
+ } else if (fs5.existsSync(path5)) {
6754
+ contents = fs5.readFileSync(path5, "utf8");
6805
6755
  }
6806
6756
  } catch (er) {
6807
6757
  }
6808
- return fileContentsCache[path4] = contents;
6758
+ return fileContentsCache[path5] = contents;
6809
6759
  });
6810
6760
  function supportRelativeURL(file, url) {
6811
6761
  if (!file) return url;
6812
- var dir = path3.dirname(file);
6762
+ var dir = path4.dirname(file);
6813
6763
  var match = /^\w+:\/\/[^\/]*/.exec(dir);
6814
6764
  var protocol = match ? match[0] : "";
6815
6765
  var startPath = dir.slice(protocol.length);
6816
6766
  if (protocol && /^\/\w\:/.test(startPath)) {
6817
6767
  protocol += "/";
6818
- return protocol + path3.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
6768
+ return protocol + path4.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
6819
6769
  }
6820
- return protocol + path3.resolve(dir.slice(protocol.length), url);
6770
+ return protocol + path4.resolve(dir.slice(protocol.length), url);
6821
6771
  }
6822
6772
  function retrieveSourceMapURL(source) {
6823
6773
  var fileData;
@@ -15054,17 +15004,17 @@ ${lanes.join("\n")}
15054
15004
  }
15055
15005
  function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
15056
15006
  const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
15057
- const path3 = toCanonicalFileName(name);
15058
- const existing = cache.get(path3);
15007
+ const path4 = toCanonicalFileName(name);
15008
+ const existing = cache.get(path4);
15059
15009
  if (existing) {
15060
15010
  existing.callbacks.push(callback);
15061
15011
  } else {
15062
- cache.set(path3, {
15012
+ cache.set(path4, {
15063
15013
  watcher: createWatcher(
15064
15014
  // Cant infer types correctly so lets satisfy checker
15065
15015
  (param1, param2, param3) => {
15066
15016
  var _a;
15067
- return (_a = cache.get(path3)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
15017
+ return (_a = cache.get(path4)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
15068
15018
  }
15069
15019
  ),
15070
15020
  callbacks: [callback]
@@ -15072,10 +15022,10 @@ ${lanes.join("\n")}
15072
15022
  }
15073
15023
  return {
15074
15024
  close: () => {
15075
- const watcher = cache.get(path3);
15025
+ const watcher = cache.get(path4);
15076
15026
  if (!watcher) return;
15077
15027
  if (!orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length) return;
15078
- cache.delete(path3);
15028
+ cache.delete(path4);
15079
15029
  closeFileWatcherOf(watcher);
15080
15030
  }
15081
15031
  };
@@ -15327,13 +15277,13 @@ ${lanes.join("\n")}
15327
15277
  (newChildWatches || (newChildWatches = [])).push(childWatcher);
15328
15278
  }
15329
15279
  }
15330
- function isIgnoredPath(path3, options) {
15331
- return some(ignoredPaths, (searchPath) => isInPath(path3, searchPath)) || isIgnoredByWatchOptions(path3, options, useCaseSensitiveFileNames2, getCurrentDirectory);
15280
+ function isIgnoredPath(path4, options) {
15281
+ return some(ignoredPaths, (searchPath) => isInPath(path4, searchPath)) || isIgnoredByWatchOptions(path4, options, useCaseSensitiveFileNames2, getCurrentDirectory);
15332
15282
  }
15333
- function isInPath(path3, searchPath) {
15334
- if (path3.includes(searchPath)) return true;
15283
+ function isInPath(path4, searchPath) {
15284
+ if (path4.includes(searchPath)) return true;
15335
15285
  if (useCaseSensitiveFileNames2) return false;
15336
- return toCanonicalFilePath(path3).includes(searchPath);
15286
+ return toCanonicalFilePath(path4).includes(searchPath);
15337
15287
  }
15338
15288
  }
15339
15289
  var FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => {
@@ -15711,8 +15661,8 @@ ${lanes.join("\n")}
15711
15661
  }
15712
15662
  function patchWriteFileEnsuringDirectory(sys2) {
15713
15663
  const originalWriteFile = sys2.writeFile;
15714
- sys2.writeFile = (path3, data, writeBom) => writeFileEnsuringDirectories(
15715
- path3,
15664
+ sys2.writeFile = (path4, data, writeBom) => writeFileEnsuringDirectories(
15665
+ path4,
15716
15666
  data,
15717
15667
  !!writeBom,
15718
15668
  (path22, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path22, data2, writeByteOrderMark),
@@ -15756,7 +15706,7 @@ ${lanes.join("\n")}
15756
15706
  // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
15757
15707
  // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
15758
15708
  fsSupportsRecursiveFsWatch,
15759
- getAccessibleSortedChildDirectories: (path3) => getAccessibleFileSystemEntries(path3).directories,
15709
+ getAccessibleSortedChildDirectories: (path4) => getAccessibleFileSystemEntries(path4).directories,
15760
15710
  realpath,
15761
15711
  tscWatchFile: process.env.TSC_WATCHFILE,
15762
15712
  useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,
@@ -15783,7 +15733,7 @@ ${lanes.join("\n")}
15783
15733
  watchFile: watchFile2,
15784
15734
  watchDirectory,
15785
15735
  preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
15786
- resolvePath: (path3) => _path.resolve(path3),
15736
+ resolvePath: (path4) => _path.resolve(path4),
15787
15737
  fileExists,
15788
15738
  directoryExists,
15789
15739
  getAccessibleFileSystemEntries,
@@ -15818,8 +15768,8 @@ ${lanes.join("\n")}
15818
15768
  }
15819
15769
  return process.memoryUsage().heapUsed;
15820
15770
  },
15821
- getFileSize(path3) {
15822
- const stat = statSync2(path3);
15771
+ getFileSize(path4) {
15772
+ const stat = statSync2(path4);
15823
15773
  if (stat == null ? void 0 : stat.isFile()) {
15824
15774
  return stat.size;
15825
15775
  }
@@ -15863,14 +15813,14 @@ ${lanes.join("\n")}
15863
15813
  }
15864
15814
  };
15865
15815
  return nodeSystem;
15866
- function statSync2(path3) {
15816
+ function statSync2(path4) {
15867
15817
  try {
15868
- return _fs.statSync(path3, statSyncOptions);
15818
+ return _fs.statSync(path4, statSyncOptions);
15869
15819
  } catch {
15870
15820
  return void 0;
15871
15821
  }
15872
15822
  }
15873
- function enableCPUProfiler(path3, cb) {
15823
+ function enableCPUProfiler(path4, cb) {
15874
15824
  if (activeSession) {
15875
15825
  cb();
15876
15826
  return false;
@@ -15885,7 +15835,7 @@ ${lanes.join("\n")}
15885
15835
  session.post("Profiler.enable", () => {
15886
15836
  session.post("Profiler.start", () => {
15887
15837
  activeSession = session;
15888
- profilePath = path3;
15838
+ profilePath = path4;
15889
15839
  cb();
15890
15840
  });
15891
15841
  });
@@ -16029,9 +15979,9 @@ ${lanes.join("\n")}
16029
15979
  }
16030
15980
  }
16031
15981
  }
16032
- function getAccessibleFileSystemEntries(path3) {
15982
+ function getAccessibleFileSystemEntries(path4) {
16033
15983
  try {
16034
- const entries = _fs.readdirSync(path3 || ".", { withFileTypes: true });
15984
+ const entries = _fs.readdirSync(path4 || ".", { withFileTypes: true });
16035
15985
  const files = [];
16036
15986
  const directories = [];
16037
15987
  for (const dirent of entries) {
@@ -16041,7 +15991,7 @@ ${lanes.join("\n")}
16041
15991
  }
16042
15992
  let stat;
16043
15993
  if (typeof dirent === "string" || dirent.isSymbolicLink()) {
16044
- const name = combinePaths(path3, entry);
15994
+ const name = combinePaths(path4, entry);
16045
15995
  stat = statSync2(name);
16046
15996
  if (!stat) {
16047
15997
  continue;
@@ -16062,11 +16012,11 @@ ${lanes.join("\n")}
16062
16012
  return emptyFileSystemEntries;
16063
16013
  }
16064
16014
  }
16065
- function readDirectory(path3, extensions, excludes, includes, depth) {
16066
- return matchFiles(path3, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
16015
+ function readDirectory(path4, extensions, excludes, includes, depth) {
16016
+ return matchFiles(path4, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
16067
16017
  }
16068
- function fileSystemEntryExists(path3, entryKind) {
16069
- const stat = statSync2(path3);
16018
+ function fileSystemEntryExists(path4, entryKind) {
16019
+ const stat = statSync2(path4);
16070
16020
  if (!stat) {
16071
16021
  return false;
16072
16022
  }
@@ -16079,47 +16029,47 @@ ${lanes.join("\n")}
16079
16029
  return false;
16080
16030
  }
16081
16031
  }
16082
- function fileExists(path3) {
16032
+ function fileExists(path4) {
16083
16033
  return fileSystemEntryExists(
16084
- path3,
16034
+ path4,
16085
16035
  0
16086
16036
  /* File */
16087
16037
  );
16088
16038
  }
16089
- function directoryExists(path3) {
16039
+ function directoryExists(path4) {
16090
16040
  return fileSystemEntryExists(
16091
- path3,
16041
+ path4,
16092
16042
  1
16093
16043
  /* Directory */
16094
16044
  );
16095
16045
  }
16096
- function getDirectories(path3) {
16097
- return getAccessibleFileSystemEntries(path3).directories.slice();
16046
+ function getDirectories(path4) {
16047
+ return getAccessibleFileSystemEntries(path4).directories.slice();
16098
16048
  }
16099
- function fsRealPathHandlingLongPath(path3) {
16100
- return path3.length < 260 ? _fs.realpathSync.native(path3) : _fs.realpathSync(path3);
16049
+ function fsRealPathHandlingLongPath(path4) {
16050
+ return path4.length < 260 ? _fs.realpathSync.native(path4) : _fs.realpathSync(path4);
16101
16051
  }
16102
- function realpath(path3) {
16052
+ function realpath(path4) {
16103
16053
  try {
16104
- return fsRealpath(path3);
16054
+ return fsRealpath(path4);
16105
16055
  } catch {
16106
- return path3;
16056
+ return path4;
16107
16057
  }
16108
16058
  }
16109
- function getModifiedTime3(path3) {
16059
+ function getModifiedTime3(path4) {
16110
16060
  var _a;
16111
- return (_a = statSync2(path3)) == null ? void 0 : _a.mtime;
16061
+ return (_a = statSync2(path4)) == null ? void 0 : _a.mtime;
16112
16062
  }
16113
- function setModifiedTime(path3, time) {
16063
+ function setModifiedTime(path4, time) {
16114
16064
  try {
16115
- _fs.utimesSync(path3, time, time);
16065
+ _fs.utimesSync(path4, time, time);
16116
16066
  } catch {
16117
16067
  return;
16118
16068
  }
16119
16069
  }
16120
- function deleteFile(path3) {
16070
+ function deleteFile(path4) {
16121
16071
  try {
16122
- return _fs.unlinkSync(path3);
16072
+ return _fs.unlinkSync(path4);
16123
16073
  } catch {
16124
16074
  return;
16125
16075
  }
@@ -16159,41 +16109,41 @@ ${lanes.join("\n")}
16159
16109
  function isAnyDirectorySeparator(charCode) {
16160
16110
  return charCode === 47 || charCode === 92;
16161
16111
  }
16162
- function isUrl(path3) {
16163
- return getEncodedRootLength(path3) < 0;
16112
+ function isUrl(path4) {
16113
+ return getEncodedRootLength(path4) < 0;
16164
16114
  }
16165
- function isRootedDiskPath(path3) {
16166
- return getEncodedRootLength(path3) > 0;
16115
+ function isRootedDiskPath(path4) {
16116
+ return getEncodedRootLength(path4) > 0;
16167
16117
  }
16168
- function isDiskPathRoot(path3) {
16169
- const rootLength = getEncodedRootLength(path3);
16170
- return rootLength > 0 && rootLength === path3.length;
16118
+ function isDiskPathRoot(path4) {
16119
+ const rootLength = getEncodedRootLength(path4);
16120
+ return rootLength > 0 && rootLength === path4.length;
16171
16121
  }
16172
- function pathIsAbsolute(path3) {
16173
- return getEncodedRootLength(path3) !== 0;
16122
+ function pathIsAbsolute(path4) {
16123
+ return getEncodedRootLength(path4) !== 0;
16174
16124
  }
16175
- function pathIsRelative(path3) {
16176
- return /^\.\.?(?:$|[\\/])/.test(path3);
16125
+ function pathIsRelative(path4) {
16126
+ return /^\.\.?(?:$|[\\/])/.test(path4);
16177
16127
  }
16178
- function pathIsBareSpecifier(path3) {
16179
- return !pathIsAbsolute(path3) && !pathIsRelative(path3);
16128
+ function pathIsBareSpecifier(path4) {
16129
+ return !pathIsAbsolute(path4) && !pathIsRelative(path4);
16180
16130
  }
16181
16131
  function hasExtension(fileName) {
16182
16132
  return getBaseFileName(fileName).includes(".");
16183
16133
  }
16184
- function fileExtensionIs(path3, extension) {
16185
- return path3.length > extension.length && endsWith(path3, extension);
16134
+ function fileExtensionIs(path4, extension) {
16135
+ return path4.length > extension.length && endsWith(path4, extension);
16186
16136
  }
16187
- function fileExtensionIsOneOf(path3, extensions) {
16137
+ function fileExtensionIsOneOf(path4, extensions) {
16188
16138
  for (const extension of extensions) {
16189
- if (fileExtensionIs(path3, extension)) {
16139
+ if (fileExtensionIs(path4, extension)) {
16190
16140
  return true;
16191
16141
  }
16192
16142
  }
16193
16143
  return false;
16194
16144
  }
16195
- function hasTrailingDirectorySeparator(path3) {
16196
- return path3.length > 0 && isAnyDirectorySeparator(path3.charCodeAt(path3.length - 1));
16145
+ function hasTrailingDirectorySeparator(path4) {
16146
+ return path4.length > 0 && isAnyDirectorySeparator(path4.charCodeAt(path4.length - 1));
16197
16147
  }
16198
16148
  function isVolumeCharacter(charCode) {
16199
16149
  return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90;
@@ -16207,111 +16157,111 @@ ${lanes.join("\n")}
16207
16157
  }
16208
16158
  return -1;
16209
16159
  }
16210
- function getEncodedRootLength(path3) {
16211
- if (!path3) return 0;
16212
- const ch0 = path3.charCodeAt(0);
16160
+ function getEncodedRootLength(path4) {
16161
+ if (!path4) return 0;
16162
+ const ch0 = path4.charCodeAt(0);
16213
16163
  if (ch0 === 47 || ch0 === 92) {
16214
- if (path3.charCodeAt(1) !== ch0) return 1;
16215
- const p1 = path3.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
16216
- if (p1 < 0) return path3.length;
16164
+ if (path4.charCodeAt(1) !== ch0) return 1;
16165
+ const p1 = path4.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
16166
+ if (p1 < 0) return path4.length;
16217
16167
  return p1 + 1;
16218
16168
  }
16219
- if (isVolumeCharacter(ch0) && path3.charCodeAt(1) === 58) {
16220
- const ch2 = path3.charCodeAt(2);
16169
+ if (isVolumeCharacter(ch0) && path4.charCodeAt(1) === 58) {
16170
+ const ch2 = path4.charCodeAt(2);
16221
16171
  if (ch2 === 47 || ch2 === 92) return 3;
16222
- if (path3.length === 2) return 2;
16172
+ if (path4.length === 2) return 2;
16223
16173
  }
16224
- const schemeEnd = path3.indexOf(urlSchemeSeparator);
16174
+ const schemeEnd = path4.indexOf(urlSchemeSeparator);
16225
16175
  if (schemeEnd !== -1) {
16226
16176
  const authorityStart = schemeEnd + urlSchemeSeparator.length;
16227
- const authorityEnd = path3.indexOf(directorySeparator, authorityStart);
16177
+ const authorityEnd = path4.indexOf(directorySeparator, authorityStart);
16228
16178
  if (authorityEnd !== -1) {
16229
- const scheme = path3.slice(0, schemeEnd);
16230
- const authority = path3.slice(authorityStart, authorityEnd);
16231
- if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path3.charCodeAt(authorityEnd + 1))) {
16232
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path3, authorityEnd + 2);
16179
+ const scheme = path4.slice(0, schemeEnd);
16180
+ const authority = path4.slice(authorityStart, authorityEnd);
16181
+ if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path4.charCodeAt(authorityEnd + 1))) {
16182
+ const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path4, authorityEnd + 2);
16233
16183
  if (volumeSeparatorEnd !== -1) {
16234
- if (path3.charCodeAt(volumeSeparatorEnd) === 47) {
16184
+ if (path4.charCodeAt(volumeSeparatorEnd) === 47) {
16235
16185
  return ~(volumeSeparatorEnd + 1);
16236
16186
  }
16237
- if (volumeSeparatorEnd === path3.length) {
16187
+ if (volumeSeparatorEnd === path4.length) {
16238
16188
  return ~volumeSeparatorEnd;
16239
16189
  }
16240
16190
  }
16241
16191
  }
16242
16192
  return ~(authorityEnd + 1);
16243
16193
  }
16244
- return ~path3.length;
16194
+ return ~path4.length;
16245
16195
  }
16246
16196
  return 0;
16247
16197
  }
16248
- function getRootLength(path3) {
16249
- const rootLength = getEncodedRootLength(path3);
16198
+ function getRootLength(path4) {
16199
+ const rootLength = getEncodedRootLength(path4);
16250
16200
  return rootLength < 0 ? ~rootLength : rootLength;
16251
16201
  }
16252
- function getDirectoryPath(path3) {
16253
- path3 = normalizeSlashes(path3);
16254
- const rootLength = getRootLength(path3);
16255
- if (rootLength === path3.length) return path3;
16256
- path3 = removeTrailingDirectorySeparator(path3);
16257
- return path3.slice(0, Math.max(rootLength, path3.lastIndexOf(directorySeparator)));
16258
- }
16259
- function getBaseFileName(path3, extensions, ignoreCase) {
16260
- path3 = normalizeSlashes(path3);
16261
- const rootLength = getRootLength(path3);
16262
- if (rootLength === path3.length) return "";
16263
- path3 = removeTrailingDirectorySeparator(path3);
16264
- const name = path3.slice(Math.max(getRootLength(path3), path3.lastIndexOf(directorySeparator) + 1));
16202
+ function getDirectoryPath(path4) {
16203
+ path4 = normalizeSlashes(path4);
16204
+ const rootLength = getRootLength(path4);
16205
+ if (rootLength === path4.length) return path4;
16206
+ path4 = removeTrailingDirectorySeparator(path4);
16207
+ return path4.slice(0, Math.max(rootLength, path4.lastIndexOf(directorySeparator)));
16208
+ }
16209
+ function getBaseFileName(path4, extensions, ignoreCase) {
16210
+ path4 = normalizeSlashes(path4);
16211
+ const rootLength = getRootLength(path4);
16212
+ if (rootLength === path4.length) return "";
16213
+ path4 = removeTrailingDirectorySeparator(path4);
16214
+ const name = path4.slice(Math.max(getRootLength(path4), path4.lastIndexOf(directorySeparator) + 1));
16265
16215
  const extension = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(name, extensions, ignoreCase) : void 0;
16266
16216
  return extension ? name.slice(0, name.length - extension.length) : name;
16267
16217
  }
16268
- function tryGetExtensionFromPath(path3, extension, stringEqualityComparer) {
16218
+ function tryGetExtensionFromPath(path4, extension, stringEqualityComparer) {
16269
16219
  if (!startsWith(extension, ".")) extension = "." + extension;
16270
- if (path3.length >= extension.length && path3.charCodeAt(path3.length - extension.length) === 46) {
16271
- const pathExtension = path3.slice(path3.length - extension.length);
16220
+ if (path4.length >= extension.length && path4.charCodeAt(path4.length - extension.length) === 46) {
16221
+ const pathExtension = path4.slice(path4.length - extension.length);
16272
16222
  if (stringEqualityComparer(pathExtension, extension)) {
16273
16223
  return pathExtension;
16274
16224
  }
16275
16225
  }
16276
16226
  }
16277
- function getAnyExtensionFromPathWorker(path3, extensions, stringEqualityComparer) {
16227
+ function getAnyExtensionFromPathWorker(path4, extensions, stringEqualityComparer) {
16278
16228
  if (typeof extensions === "string") {
16279
- return tryGetExtensionFromPath(path3, extensions, stringEqualityComparer) || "";
16229
+ return tryGetExtensionFromPath(path4, extensions, stringEqualityComparer) || "";
16280
16230
  }
16281
16231
  for (const extension of extensions) {
16282
- const result = tryGetExtensionFromPath(path3, extension, stringEqualityComparer);
16232
+ const result = tryGetExtensionFromPath(path4, extension, stringEqualityComparer);
16283
16233
  if (result) return result;
16284
16234
  }
16285
16235
  return "";
16286
16236
  }
16287
- function getAnyExtensionFromPath(path3, extensions, ignoreCase) {
16237
+ function getAnyExtensionFromPath(path4, extensions, ignoreCase) {
16288
16238
  if (extensions) {
16289
- return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path3), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
16239
+ return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path4), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
16290
16240
  }
16291
- const baseFileName = getBaseFileName(path3);
16241
+ const baseFileName = getBaseFileName(path4);
16292
16242
  const extensionIndex = baseFileName.lastIndexOf(".");
16293
16243
  if (extensionIndex >= 0) {
16294
16244
  return baseFileName.substring(extensionIndex);
16295
16245
  }
16296
16246
  return "";
16297
16247
  }
16298
- function pathComponents(path3, rootLength) {
16299
- const root = path3.substring(0, rootLength);
16300
- const rest = path3.substring(rootLength).split(directorySeparator);
16248
+ function pathComponents(path4, rootLength) {
16249
+ const root = path4.substring(0, rootLength);
16250
+ const rest = path4.substring(rootLength).split(directorySeparator);
16301
16251
  if (rest.length && !lastOrUndefined(rest)) rest.pop();
16302
16252
  return [root, ...rest];
16303
16253
  }
16304
- function getPathComponents(path3, currentDirectory = "") {
16305
- path3 = combinePaths(currentDirectory, path3);
16306
- return pathComponents(path3, getRootLength(path3));
16254
+ function getPathComponents(path4, currentDirectory = "") {
16255
+ path4 = combinePaths(currentDirectory, path4);
16256
+ return pathComponents(path4, getRootLength(path4));
16307
16257
  }
16308
16258
  function getPathFromPathComponents(pathComponents2, length2) {
16309
16259
  if (pathComponents2.length === 0) return "";
16310
16260
  const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]);
16311
16261
  return root + pathComponents2.slice(1, length2).join(directorySeparator);
16312
16262
  }
16313
- function normalizeSlashes(path3) {
16314
- return path3.includes("\\") ? path3.replace(backslashRegExp, directorySeparator) : path3;
16263
+ function normalizeSlashes(path4) {
16264
+ return path4.includes("\\") ? path4.replace(backslashRegExp, directorySeparator) : path4;
16315
16265
  }
16316
16266
  function reducePathComponents(components) {
16317
16267
  if (!some(components)) return [];
@@ -16332,39 +16282,39 @@ ${lanes.join("\n")}
16332
16282
  }
16333
16283
  return reduced;
16334
16284
  }
16335
- function combinePaths(path3, ...paths) {
16336
- if (path3) path3 = normalizeSlashes(path3);
16285
+ function combinePaths(path4, ...paths) {
16286
+ if (path4) path4 = normalizeSlashes(path4);
16337
16287
  for (let relativePath of paths) {
16338
16288
  if (!relativePath) continue;
16339
16289
  relativePath = normalizeSlashes(relativePath);
16340
- if (!path3 || getRootLength(relativePath) !== 0) {
16341
- path3 = relativePath;
16290
+ if (!path4 || getRootLength(relativePath) !== 0) {
16291
+ path4 = relativePath;
16342
16292
  } else {
16343
- path3 = ensureTrailingDirectorySeparator(path3) + relativePath;
16293
+ path4 = ensureTrailingDirectorySeparator(path4) + relativePath;
16344
16294
  }
16345
16295
  }
16346
- return path3;
16296
+ return path4;
16347
16297
  }
16348
- function resolvePath(path3, ...paths) {
16349
- return normalizePath(some(paths) ? combinePaths(path3, ...paths) : normalizeSlashes(path3));
16298
+ function resolvePath(path4, ...paths) {
16299
+ return normalizePath(some(paths) ? combinePaths(path4, ...paths) : normalizeSlashes(path4));
16350
16300
  }
16351
- function getNormalizedPathComponents(path3, currentDirectory) {
16352
- return reducePathComponents(getPathComponents(path3, currentDirectory));
16301
+ function getNormalizedPathComponents(path4, currentDirectory) {
16302
+ return reducePathComponents(getPathComponents(path4, currentDirectory));
16353
16303
  }
16354
- function getNormalizedAbsolutePath(path3, currentDirectory) {
16355
- let rootLength = getRootLength(path3);
16304
+ function getNormalizedAbsolutePath(path4, currentDirectory) {
16305
+ let rootLength = getRootLength(path4);
16356
16306
  if (rootLength === 0 && currentDirectory) {
16357
- path3 = combinePaths(currentDirectory, path3);
16358
- rootLength = getRootLength(path3);
16307
+ path4 = combinePaths(currentDirectory, path4);
16308
+ rootLength = getRootLength(path4);
16359
16309
  } else {
16360
- path3 = normalizeSlashes(path3);
16310
+ path4 = normalizeSlashes(path4);
16361
16311
  }
16362
- const simpleNormalized = simpleNormalizePath(path3);
16312
+ const simpleNormalized = simpleNormalizePath(path4);
16363
16313
  if (simpleNormalized !== void 0) {
16364
16314
  return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized;
16365
16315
  }
16366
- const length2 = path3.length;
16367
- const root = path3.substring(0, rootLength);
16316
+ const length2 = path4.length;
16317
+ const root = path4.substring(0, rootLength);
16368
16318
  let normalized;
16369
16319
  let index2 = rootLength;
16370
16320
  let segmentStart = index2;
@@ -16372,23 +16322,23 @@ ${lanes.join("\n")}
16372
16322
  let seenNonDotDotSegment = rootLength !== 0;
16373
16323
  while (index2 < length2) {
16374
16324
  segmentStart = index2;
16375
- let ch = path3.charCodeAt(index2);
16325
+ let ch = path4.charCodeAt(index2);
16376
16326
  while (ch === 47 && index2 + 1 < length2) {
16377
16327
  index2++;
16378
- ch = path3.charCodeAt(index2);
16328
+ ch = path4.charCodeAt(index2);
16379
16329
  }
16380
16330
  if (index2 > segmentStart) {
16381
- normalized ?? (normalized = path3.substring(0, segmentStart - 1));
16331
+ normalized ?? (normalized = path4.substring(0, segmentStart - 1));
16382
16332
  segmentStart = index2;
16383
16333
  }
16384
- let segmentEnd = path3.indexOf(directorySeparator, index2 + 1);
16334
+ let segmentEnd = path4.indexOf(directorySeparator, index2 + 1);
16385
16335
  if (segmentEnd === -1) {
16386
16336
  segmentEnd = length2;
16387
16337
  }
16388
16338
  const segmentLength = segmentEnd - segmentStart;
16389
- if (segmentLength === 1 && path3.charCodeAt(index2) === 46) {
16390
- normalized ?? (normalized = path3.substring(0, normalizedUpTo));
16391
- } else if (segmentLength === 2 && path3.charCodeAt(index2) === 46 && path3.charCodeAt(index2 + 1) === 46) {
16339
+ if (segmentLength === 1 && path4.charCodeAt(index2) === 46) {
16340
+ normalized ?? (normalized = path4.substring(0, normalizedUpTo));
16341
+ } else if (segmentLength === 2 && path4.charCodeAt(index2) === 46 && path4.charCodeAt(index2 + 1) === 46) {
16392
16342
  if (!seenNonDotDotSegment) {
16393
16343
  if (normalized !== void 0) {
16394
16344
  normalized += normalized.length === rootLength ? ".." : "/..";
@@ -16397,9 +16347,9 @@ ${lanes.join("\n")}
16397
16347
  }
16398
16348
  } else if (normalized === void 0) {
16399
16349
  if (normalizedUpTo - 2 >= 0) {
16400
- normalized = path3.substring(0, Math.max(rootLength, path3.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
16350
+ normalized = path4.substring(0, Math.max(rootLength, path4.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
16401
16351
  } else {
16402
- normalized = path3.substring(0, normalizedUpTo);
16352
+ normalized = path4.substring(0, normalizedUpTo);
16403
16353
  }
16404
16354
  } else {
16405
16355
  const lastSlash = normalized.lastIndexOf(directorySeparator);
@@ -16417,36 +16367,36 @@ ${lanes.join("\n")}
16417
16367
  normalized += directorySeparator;
16418
16368
  }
16419
16369
  seenNonDotDotSegment = true;
16420
- normalized += path3.substring(segmentStart, segmentEnd);
16370
+ normalized += path4.substring(segmentStart, segmentEnd);
16421
16371
  } else {
16422
16372
  seenNonDotDotSegment = true;
16423
16373
  normalizedUpTo = segmentEnd;
16424
16374
  }
16425
16375
  index2 = segmentEnd + 1;
16426
16376
  }
16427
- return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path3) : path3);
16377
+ return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path4) : path4);
16428
16378
  }
16429
- function normalizePath(path3) {
16430
- path3 = normalizeSlashes(path3);
16431
- let normalized = simpleNormalizePath(path3);
16379
+ function normalizePath(path4) {
16380
+ path4 = normalizeSlashes(path4);
16381
+ let normalized = simpleNormalizePath(path4);
16432
16382
  if (normalized !== void 0) {
16433
16383
  return normalized;
16434
16384
  }
16435
- normalized = getNormalizedAbsolutePath(path3, "");
16436
- return normalized && hasTrailingDirectorySeparator(path3) ? ensureTrailingDirectorySeparator(normalized) : normalized;
16385
+ normalized = getNormalizedAbsolutePath(path4, "");
16386
+ return normalized && hasTrailingDirectorySeparator(path4) ? ensureTrailingDirectorySeparator(normalized) : normalized;
16437
16387
  }
16438
- function simpleNormalizePath(path3) {
16439
- if (!relativePathSegmentRegExp.test(path3)) {
16440
- return path3;
16388
+ function simpleNormalizePath(path4) {
16389
+ if (!relativePathSegmentRegExp.test(path4)) {
16390
+ return path4;
16441
16391
  }
16442
- let simplified = path3.replace(/\/\.\//g, "/");
16392
+ let simplified = path4.replace(/\/\.\//g, "/");
16443
16393
  if (simplified.startsWith("./")) {
16444
16394
  simplified = simplified.slice(2);
16445
16395
  }
16446
- if (simplified !== path3) {
16447
- path3 = simplified;
16448
- if (!relativePathSegmentRegExp.test(path3)) {
16449
- return path3;
16396
+ if (simplified !== path4) {
16397
+ path4 = simplified;
16398
+ if (!relativePathSegmentRegExp.test(path4)) {
16399
+ return path4;
16450
16400
  }
16451
16401
  }
16452
16402
  return void 0;
@@ -16462,31 +16412,31 @@ ${lanes.join("\n")}
16462
16412
  const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath);
16463
16413
  return getCanonicalFileName(nonCanonicalizedPath);
16464
16414
  }
16465
- function removeTrailingDirectorySeparator(path3) {
16466
- if (hasTrailingDirectorySeparator(path3)) {
16467
- return path3.substr(0, path3.length - 1);
16415
+ function removeTrailingDirectorySeparator(path4) {
16416
+ if (hasTrailingDirectorySeparator(path4)) {
16417
+ return path4.substr(0, path4.length - 1);
16468
16418
  }
16469
- return path3;
16419
+ return path4;
16470
16420
  }
16471
- function ensureTrailingDirectorySeparator(path3) {
16472
- if (!hasTrailingDirectorySeparator(path3)) {
16473
- return path3 + directorySeparator;
16421
+ function ensureTrailingDirectorySeparator(path4) {
16422
+ if (!hasTrailingDirectorySeparator(path4)) {
16423
+ return path4 + directorySeparator;
16474
16424
  }
16475
- return path3;
16425
+ return path4;
16476
16426
  }
16477
- function ensurePathIsNonModuleName(path3) {
16478
- return !pathIsAbsolute(path3) && !pathIsRelative(path3) ? "./" + path3 : path3;
16427
+ function ensurePathIsNonModuleName(path4) {
16428
+ return !pathIsAbsolute(path4) && !pathIsRelative(path4) ? "./" + path4 : path4;
16479
16429
  }
16480
- function changeAnyExtension(path3, ext, extensions, ignoreCase) {
16481
- const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path3, extensions, ignoreCase) : getAnyExtensionFromPath(path3);
16482
- return pathext ? path3.slice(0, path3.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path3;
16430
+ function changeAnyExtension(path4, ext, extensions, ignoreCase) {
16431
+ const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path4, extensions, ignoreCase) : getAnyExtensionFromPath(path4);
16432
+ return pathext ? path4.slice(0, path4.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path4;
16483
16433
  }
16484
- function changeFullExtension(path3, newExtension) {
16485
- const declarationExtension = getDeclarationFileExtension(path3);
16434
+ function changeFullExtension(path4, newExtension) {
16435
+ const declarationExtension = getDeclarationFileExtension(path4);
16486
16436
  if (declarationExtension) {
16487
- return path3.slice(0, path3.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
16437
+ return path4.slice(0, path4.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
16488
16438
  }
16489
- return changeAnyExtension(path3, newExtension);
16439
+ return changeAnyExtension(path4, newExtension);
16490
16440
  }
16491
16441
  var relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/;
16492
16442
  function comparePathsWorker(a, b2, componentComparer) {
@@ -27939,8 +27889,8 @@ ${lanes.join("\n")}
27939
27889
  function getResolvedExternalModuleName(host, file, referenceFile) {
27940
27890
  return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName);
27941
27891
  }
27942
- function getCanonicalAbsolutePath(host, path3) {
27943
- return host.getCanonicalFileName(getNormalizedAbsolutePath(path3, host.getCurrentDirectory()));
27892
+ function getCanonicalAbsolutePath(host, path4) {
27893
+ return host.getCanonicalFileName(getNormalizedAbsolutePath(path4, host.getCurrentDirectory()));
27944
27894
  }
27945
27895
  function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
27946
27896
  const file = resolver.getExternalModuleFileFromDeclaration(declaration);
@@ -27983,20 +27933,20 @@ ${lanes.join("\n")}
27983
27933
  }
27984
27934
  function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
27985
27935
  const outputDir = options.declarationDir || options.outDir;
27986
- const path3 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
27987
- const declarationExtension = getDeclarationEmitExtensionForPath(path3);
27988
- return removeFileExtension(path3) + declarationExtension;
27936
+ const path4 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
27937
+ const declarationExtension = getDeclarationEmitExtensionForPath(path4);
27938
+ return removeFileExtension(path4) + declarationExtension;
27989
27939
  }
27990
- function getDeclarationEmitExtensionForPath(path3) {
27991
- return fileExtensionIsOneOf(path3, [
27940
+ function getDeclarationEmitExtensionForPath(path4) {
27941
+ return fileExtensionIsOneOf(path4, [
27992
27942
  ".mjs",
27993
27943
  ".mts"
27994
27944
  /* Mts */
27995
- ]) ? ".d.mts" : fileExtensionIsOneOf(path3, [
27945
+ ]) ? ".d.mts" : fileExtensionIsOneOf(path4, [
27996
27946
  ".cjs",
27997
27947
  ".cts"
27998
27948
  /* Cts */
27999
- ]) ? ".d.cts" : fileExtensionIsOneOf(path3, [
27949
+ ]) ? ".d.cts" : fileExtensionIsOneOf(path4, [
28000
27950
  ".json"
28001
27951
  /* Json */
28002
27952
  ]) ? `.d.json.ts` : (
@@ -28004,8 +27954,8 @@ ${lanes.join("\n")}
28004
27954
  ".d.ts"
28005
27955
  );
28006
27956
  }
28007
- function getPossibleOriginalInputExtensionForExtension(path3) {
28008
- return fileExtensionIsOneOf(path3, [
27957
+ function getPossibleOriginalInputExtensionForExtension(path4) {
27958
+ return fileExtensionIsOneOf(path4, [
28009
27959
  ".d.mts",
28010
27960
  ".mjs",
28011
27961
  ".mts"
@@ -28014,7 +27964,7 @@ ${lanes.join("\n")}
28014
27964
  ".mts",
28015
27965
  ".mjs"
28016
27966
  /* Mjs */
28017
- ] : fileExtensionIsOneOf(path3, [
27967
+ ] : fileExtensionIsOneOf(path4, [
28018
27968
  ".d.cts",
28019
27969
  ".cjs",
28020
27970
  ".cts"
@@ -28023,7 +27973,7 @@ ${lanes.join("\n")}
28023
27973
  ".cts",
28024
27974
  ".cjs"
28025
27975
  /* Cjs */
28026
- ] : fileExtensionIsOneOf(path3, [`.d.json.ts`]) ? [
27976
+ ] : fileExtensionIsOneOf(path4, [`.d.json.ts`]) ? [
28027
27977
  ".json"
28028
27978
  /* Json */
28029
27979
  ] : [
@@ -28108,12 +28058,12 @@ ${lanes.join("\n")}
28108
28058
  createDirectory(directoryPath);
28109
28059
  }
28110
28060
  }
28111
- function writeFileEnsuringDirectories(path3, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
28061
+ function writeFileEnsuringDirectories(path4, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
28112
28062
  try {
28113
- writeFile2(path3, data, writeByteOrderMark);
28063
+ writeFile2(path4, data, writeByteOrderMark);
28114
28064
  } catch {
28115
- ensureDirectoriesExist(getDirectoryPath(normalizePath(path3)), createDirectory, directoryExists);
28116
- writeFile2(path3, data, writeByteOrderMark);
28065
+ ensureDirectoriesExist(getDirectoryPath(normalizePath(path4)), createDirectory, directoryExists);
28066
+ writeFile2(path4, data, writeByteOrderMark);
28117
28067
  }
28118
28068
  }
28119
28069
  function getLineOfLocalPosition(sourceFile, pos) {
@@ -28813,20 +28763,20 @@ ${lanes.join("\n")}
28813
28763
  }
28814
28764
  return getStringFromExpandedCharCodes(expandedCharCodes);
28815
28765
  }
28816
- function readJsonOrUndefined(path3, hostOrText) {
28817
- const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path3);
28766
+ function readJsonOrUndefined(path4, hostOrText) {
28767
+ const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path4);
28818
28768
  if (!jsonText) return void 0;
28819
28769
  let result = tryParseJson(jsonText);
28820
28770
  if (result === void 0) {
28821
- const looseResult = parseConfigFileTextToJson(path3, jsonText);
28771
+ const looseResult = parseConfigFileTextToJson(path4, jsonText);
28822
28772
  if (!looseResult.error) {
28823
28773
  result = looseResult.config;
28824
28774
  }
28825
28775
  }
28826
28776
  return result;
28827
28777
  }
28828
- function readJson(path3, host) {
28829
- return readJsonOrUndefined(path3, host) || {};
28778
+ function readJson(path4, host) {
28779
+ return readJsonOrUndefined(path4, host) || {};
28830
28780
  }
28831
28781
  function tryParseJson(text2) {
28832
28782
  try {
@@ -29976,7 +29926,7 @@ ${lanes.join("\n")}
29976
29926
  getSymlinkedFiles: () => symlinkedFiles,
29977
29927
  getSymlinkedDirectories: () => symlinkedDirectories,
29978
29928
  getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath,
29979
- setSymlinkedFile: (path3, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path3, real),
29929
+ setSymlinkedFile: (path4, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path4, real),
29980
29930
  setSymlinkedDirectory: (symlink, real) => {
29981
29931
  let symlinkPath = toPath(symlink, cwd, getCanonicalFileName);
29982
29932
  if (!containsIgnoredPath(symlinkPath)) {
@@ -30036,8 +29986,8 @@ ${lanes.join("\n")}
30036
29986
  function stripLeadingDirectorySeparator(s2) {
30037
29987
  return isAnyDirectorySeparator(s2.charCodeAt(0)) ? s2.slice(1) : void 0;
30038
29988
  }
30039
- function tryRemoveDirectoryPrefix(path3, dirPath, getCanonicalFileName) {
30040
- const withoutPrefix = tryRemovePrefix(path3, dirPath, getCanonicalFileName);
29989
+ function tryRemoveDirectoryPrefix(path4, dirPath, getCanonicalFileName) {
29990
+ const withoutPrefix = tryRemovePrefix(path4, dirPath, getCanonicalFileName);
30041
29991
  return withoutPrefix === void 0 ? void 0 : stripLeadingDirectorySeparator(withoutPrefix);
30042
29992
  }
30043
29993
  var reservedCharacterPattern = /[^\w\s/]/g;
@@ -30163,25 +30113,25 @@ ${lanes.join("\n")}
30163
30113
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
30164
30114
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
30165
30115
  }
30166
- function getFileMatcherPatterns(path3, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
30167
- path3 = normalizePath(path3);
30116
+ function getFileMatcherPatterns(path4, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
30117
+ path4 = normalizePath(path4);
30168
30118
  currentDirectory = normalizePath(currentDirectory);
30169
- const absolutePath = combinePaths(currentDirectory, path3);
30119
+ const absolutePath = combinePaths(currentDirectory, path4);
30170
30120
  return {
30171
30121
  includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
30172
30122
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
30173
30123
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
30174
30124
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
30175
- basePaths: getBasePaths(path3, includes, useCaseSensitiveFileNames2)
30125
+ basePaths: getBasePaths(path4, includes, useCaseSensitiveFileNames2)
30176
30126
  };
30177
30127
  }
30178
30128
  function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
30179
30129
  return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
30180
30130
  }
30181
- function matchFiles(path3, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
30182
- path3 = normalizePath(path3);
30131
+ function matchFiles(path4, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
30132
+ path4 = normalizePath(path4);
30183
30133
  currentDirectory = normalizePath(currentDirectory);
30184
- const patterns = getFileMatcherPatterns(path3, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
30134
+ const patterns = getFileMatcherPatterns(path4, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
30185
30135
  const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
30186
30136
  const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
30187
30137
  const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
@@ -30226,17 +30176,17 @@ ${lanes.join("\n")}
30226
30176
  }
30227
30177
  }
30228
30178
  }
30229
- function getBasePaths(path3, includes, useCaseSensitiveFileNames2) {
30230
- const basePaths = [path3];
30179
+ function getBasePaths(path4, includes, useCaseSensitiveFileNames2) {
30180
+ const basePaths = [path4];
30231
30181
  if (includes) {
30232
30182
  const includeBasePaths = [];
30233
30183
  for (const include of includes) {
30234
- const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path3, include));
30184
+ const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path4, include));
30235
30185
  includeBasePaths.push(getIncludeBasePath(absolute));
30236
30186
  }
30237
30187
  includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
30238
30188
  for (const includeBasePath of includeBasePaths) {
30239
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path3, !useCaseSensitiveFileNames2))) {
30189
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path4, !useCaseSensitiveFileNames2))) {
30240
30190
  basePaths.push(includeBasePath);
30241
30191
  }
30242
30192
  }
@@ -30500,24 +30450,24 @@ ${lanes.join("\n")}
30500
30450
  ".json"
30501
30451
  /* Json */
30502
30452
  ];
30503
- function removeFileExtension(path3) {
30453
+ function removeFileExtension(path4) {
30504
30454
  for (const ext of extensionsToRemove) {
30505
- const extensionless = tryRemoveExtension(path3, ext);
30455
+ const extensionless = tryRemoveExtension(path4, ext);
30506
30456
  if (extensionless !== void 0) {
30507
30457
  return extensionless;
30508
30458
  }
30509
30459
  }
30510
- return path3;
30460
+ return path4;
30511
30461
  }
30512
- function tryRemoveExtension(path3, extension) {
30513
- return fileExtensionIs(path3, extension) ? removeExtension(path3, extension) : void 0;
30462
+ function tryRemoveExtension(path4, extension) {
30463
+ return fileExtensionIs(path4, extension) ? removeExtension(path4, extension) : void 0;
30514
30464
  }
30515
- function removeExtension(path3, extension) {
30516
- return path3.substring(0, path3.length - extension.length);
30465
+ function removeExtension(path4, extension) {
30466
+ return path4.substring(0, path4.length - extension.length);
30517
30467
  }
30518
- function changeExtension(path3, newExtension) {
30468
+ function changeExtension(path4, newExtension) {
30519
30469
  return changeAnyExtension(
30520
- path3,
30470
+ path4,
30521
30471
  newExtension,
30522
30472
  extensionsToRemove,
30523
30473
  /*ignoreCase*/
@@ -30543,8 +30493,8 @@ ${lanes.join("\n")}
30543
30493
  let matchableStringSet;
30544
30494
  let patterns;
30545
30495
  const pathList = getOwnKeys(paths);
30546
- for (const path3 of pathList) {
30547
- const patternOrStr = tryParsePattern(path3);
30496
+ for (const path4 of pathList) {
30497
+ const patternOrStr = tryParsePattern(path4);
30548
30498
  if (patternOrStr === void 0) {
30549
30499
  continue;
30550
30500
  } else if (typeof patternOrStr === "string") {
@@ -30571,15 +30521,15 @@ ${lanes.join("\n")}
30571
30521
  function resolutionExtensionIsTSOrJson(ext) {
30572
30522
  return extensionIsTS(ext) || ext === ".json";
30573
30523
  }
30574
- function extensionFromPath(path3) {
30575
- const ext = tryGetExtensionFromPath2(path3);
30576
- return ext !== void 0 ? ext : Debug.fail(`File ${path3} has unknown extension.`);
30524
+ function extensionFromPath(path4) {
30525
+ const ext = tryGetExtensionFromPath2(path4);
30526
+ return ext !== void 0 ? ext : Debug.fail(`File ${path4} has unknown extension.`);
30577
30527
  }
30578
- function isAnySupportedFileExtension(path3) {
30579
- return tryGetExtensionFromPath2(path3) !== void 0;
30528
+ function isAnySupportedFileExtension(path4) {
30529
+ return tryGetExtensionFromPath2(path4) !== void 0;
30580
30530
  }
30581
- function tryGetExtensionFromPath2(path3) {
30582
- return find(extensionsToRemove, (e2) => fileExtensionIs(path3, e2));
30531
+ function tryGetExtensionFromPath2(path4) {
30532
+ return find(extensionsToRemove, (e2) => fileExtensionIs(path4, e2));
30583
30533
  }
30584
30534
  function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
30585
30535
  return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
@@ -30888,8 +30838,8 @@ ${lanes.join("\n")}
30888
30838
  return false;
30889
30839
  }
30890
30840
  }
30891
- function containsIgnoredPath(path3) {
30892
- return some(ignoredPaths, (p2) => path3.includes(p2));
30841
+ function containsIgnoredPath(path4) {
30842
+ return some(ignoredPaths, (p2) => path4.includes(p2));
30893
30843
  }
30894
30844
  function getContainingNodeArray(node) {
30895
30845
  if (!node.parent) return void 0;
@@ -50697,7 +50647,7 @@ ${lanes.join("\n")}
50697
50647
  const typeReferenceDirectives = context.typeReferenceDirectives;
50698
50648
  const libReferenceDirectives = context.libReferenceDirectives;
50699
50649
  forEach(toArray(entryOrList), (arg) => {
50700
- const { types, lib, path: path3, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
50650
+ const { types, lib, path: path4, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
50701
50651
  const preserve = _preserve === "true" ? true : void 0;
50702
50652
  if (arg.arguments["no-default-lib"] === "true") {
50703
50653
  context.hasNoDefaultLib = true;
@@ -50706,8 +50656,8 @@ ${lanes.join("\n")}
50706
50656
  typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
50707
50657
  } else if (lib) {
50708
50658
  libReferenceDirectives.push({ pos: lib.pos, end: lib.end, fileName: lib.value, ...preserve ? { preserve } : {} });
50709
- } else if (path3) {
50710
- referencedFiles.push({ pos: path3.pos, end: path3.end, fileName: path3.value, ...preserve ? { preserve } : {} });
50659
+ } else if (path4) {
50660
+ referencedFiles.push({ pos: path4.pos, end: path4.end, fileName: path4.value, ...preserve ? { preserve } : {} });
50711
50661
  } else {
50712
50662
  reportDiagnostic(arg.range.pos, arg.range.end - arg.range.pos, Diagnostics.Invalid_reference_directive_syntax);
50713
50663
  }
@@ -53136,9 +53086,9 @@ ${lanes.join("\n")}
53136
53086
  if (specs[0] === defaultIncludeSpec) return void 0;
53137
53087
  return specs;
53138
53088
  }
53139
- function matchesSpecs(path3, includeSpecs, excludeSpecs, host) {
53089
+ function matchesSpecs(path4, includeSpecs, excludeSpecs, host) {
53140
53090
  if (!includeSpecs) return returnTrue;
53141
- const patterns = getFileMatcherPatterns(path3, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
53091
+ const patterns = getFileMatcherPatterns(path4, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
53142
53092
  const excludeRe = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames);
53143
53093
  const includeRe = patterns.includeFilePattern && getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames);
53144
53094
  if (includeRe) {
@@ -53783,9 +53733,9 @@ ${lanes.join("\n")}
53783
53733
  const setPropertyInResultIfNotUndefined = (propertyName) => {
53784
53734
  if (ownConfig.raw[propertyName]) return;
53785
53735
  if (extendsRaw[propertyName]) {
53786
- result[propertyName] = map(extendsRaw[propertyName], (path3) => startsWithConfigDirTemplate(path3) || isRootedDiskPath(path3) ? path3 : combinePaths(
53736
+ result[propertyName] = map(extendsRaw[propertyName], (path4) => startsWithConfigDirTemplate(path4) || isRootedDiskPath(path4) ? path4 : combinePaths(
53787
53737
  relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),
53788
- path3
53738
+ path4
53789
53739
  ));
53790
53740
  }
53791
53741
  };
@@ -53939,11 +53889,11 @@ ${lanes.join("\n")}
53939
53889
  return void 0;
53940
53890
  }
53941
53891
  function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
53942
- const path3 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
53892
+ const path4 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
53943
53893
  let value;
53944
53894
  let extendedResult;
53945
53895
  let extendedConfig;
53946
- if (extendedConfigCache && (value = extendedConfigCache.get(path3))) {
53896
+ if (extendedConfigCache && (value = extendedConfigCache.get(path4))) {
53947
53897
  ({ extendedResult, extendedConfig } = value);
53948
53898
  } else {
53949
53899
  extendedResult = readJsonConfigFile(extendedConfigPath, (path22) => host.readFile(path22));
@@ -53961,7 +53911,7 @@ ${lanes.join("\n")}
53961
53911
  );
53962
53912
  }
53963
53913
  if (extendedConfigCache) {
53964
- extendedConfigCache.set(path3, { extendedResult, extendedConfig });
53914
+ extendedConfigCache.set(path4, { extendedResult, extendedConfig });
53965
53915
  }
53966
53916
  }
53967
53917
  if (sourceFile) {
@@ -54229,24 +54179,24 @@ ${lanes.join("\n")}
54229
54179
  }
54230
54180
  const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
54231
54181
  if (match) {
54232
- const { key, path: path3, flags } = match;
54182
+ const { key, path: path4, flags } = match;
54233
54183
  const existingPath = wildCardKeyToPath.get(key);
54234
54184
  const existingFlags = existingPath !== void 0 ? wildcardDirectories[existingPath] : void 0;
54235
54185
  if (existingFlags === void 0 || existingFlags < flags) {
54236
- wildcardDirectories[existingPath !== void 0 ? existingPath : path3] = flags;
54237
- if (existingPath === void 0) wildCardKeyToPath.set(key, path3);
54186
+ wildcardDirectories[existingPath !== void 0 ? existingPath : path4] = flags;
54187
+ if (existingPath === void 0) wildCardKeyToPath.set(key, path4);
54238
54188
  if (flags === 1) {
54239
54189
  recursiveKeys.push(key);
54240
54190
  }
54241
54191
  }
54242
54192
  }
54243
54193
  }
54244
- for (const path3 in wildcardDirectories) {
54245
- if (hasProperty(wildcardDirectories, path3)) {
54194
+ for (const path4 in wildcardDirectories) {
54195
+ if (hasProperty(wildcardDirectories, path4)) {
54246
54196
  for (const recursiveKey of recursiveKeys) {
54247
- const key = toCanonicalKey(path3, useCaseSensitiveFileNames2);
54197
+ const key = toCanonicalKey(path4, useCaseSensitiveFileNames2);
54248
54198
  if (key !== recursiveKey && containsPath(recursiveKey, key, basePath, !useCaseSensitiveFileNames2)) {
54249
- delete wildcardDirectories[path3];
54199
+ delete wildcardDirectories[path4];
54250
54200
  }
54251
54201
  }
54252
54202
  }
@@ -54254,8 +54204,8 @@ ${lanes.join("\n")}
54254
54204
  }
54255
54205
  return wildcardDirectories;
54256
54206
  }
54257
- function toCanonicalKey(path3, useCaseSensitiveFileNames2) {
54258
- return useCaseSensitiveFileNames2 ? path3 : toFileNameLowerCase(path3);
54207
+ function toCanonicalKey(path4, useCaseSensitiveFileNames2) {
54208
+ return useCaseSensitiveFileNames2 ? path4 : toFileNameLowerCase(path4);
54259
54209
  }
54260
54210
  function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
54261
54211
  const match = wildcardDirectoryPattern.exec(spec);
@@ -54271,10 +54221,10 @@ ${lanes.join("\n")}
54271
54221
  };
54272
54222
  }
54273
54223
  if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
54274
- const path3 = removeTrailingDirectorySeparator(spec);
54224
+ const path4 = removeTrailingDirectorySeparator(spec);
54275
54225
  return {
54276
- key: toCanonicalKey(path3, useCaseSensitiveFileNames2),
54277
- path: path3,
54226
+ key: toCanonicalKey(path4, useCaseSensitiveFileNames2),
54227
+ path: path4,
54278
54228
  flags: 1
54279
54229
  /* Recursive */
54280
54230
  };
@@ -54513,11 +54463,11 @@ ${lanes.join("\n")}
54513
54463
  }
54514
54464
  return;
54515
54465
  }
54516
- const path3 = normalizePath(combinePaths(baseDirectory, fileName));
54466
+ const path4 = normalizePath(combinePaths(baseDirectory, fileName));
54517
54467
  if (state.traceEnabled) {
54518
- trace2(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path3);
54468
+ trace2(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path4);
54519
54469
  }
54520
- return path3;
54470
+ return path4;
54521
54471
  }
54522
54472
  function readPackageJsonTypesFields(jsonContent, baseDirectory, state) {
54523
54473
  return readPackageJsonPathField(jsonContent, "typings", baseDirectory, state) || readPackageJsonPathField(jsonContent, "types", baseDirectory, state);
@@ -55031,13 +54981,13 @@ ${lanes.join("\n")}
55031
54981
  directoryToModuleNameMap.update(options2);
55032
54982
  }
55033
54983
  function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
55034
- const path3 = toPath(directoryName, currentDirectory, getCanonicalFileName);
55035
- return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path3, () => createModeAwareCache());
54984
+ const path4 = toPath(directoryName, currentDirectory, getCanonicalFileName);
54985
+ return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path4, () => createModeAwareCache());
55036
54986
  }
55037
54987
  function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
55038
54988
  var _a, _b;
55039
- const path3 = toPath(directoryName, currentDirectory, getCanonicalFileName);
55040
- return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path3)) == null ? void 0 : _b.get(name, mode);
54989
+ const path4 = toPath(directoryName, currentDirectory, getCanonicalFileName);
54990
+ return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path4)) == null ? void 0 : _b.get(name, mode);
55041
54991
  }
55042
54992
  }
55043
54993
  function createModeAwareCacheKey(specifier, mode) {
@@ -55114,14 +55064,14 @@ ${lanes.join("\n")}
55114
55064
  return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName));
55115
55065
  }
55116
55066
  function set(directory, result) {
55117
- const path3 = toPath(directory, currentDirectory, getCanonicalFileName);
55118
- if (directoryPathMap.has(path3)) {
55067
+ const path4 = toPath(directory, currentDirectory, getCanonicalFileName);
55068
+ if (directoryPathMap.has(path4)) {
55119
55069
  return;
55120
55070
  }
55121
- directoryPathMap.set(path3, result);
55071
+ directoryPathMap.set(path4, result);
55122
55072
  const resolvedFileName = getResolvedFileName(result);
55123
- const commonPrefix = resolvedFileName && getCommonPrefix(path3, resolvedFileName);
55124
- let current = path3;
55073
+ const commonPrefix = resolvedFileName && getCommonPrefix(path4, resolvedFileName);
55074
+ let current = path4;
55125
55075
  while (current !== commonPrefix) {
55126
55076
  const parent2 = getDirectoryPath(current);
55127
55077
  if (parent2 === current || directoryPathMap.has(parent2)) {
@@ -55685,16 +55635,16 @@ ${lanes.join("\n")}
55685
55635
  const combined = combinePaths(containingDirectory, moduleName);
55686
55636
  const parts = getPathComponents(combined);
55687
55637
  const lastPart = lastOrUndefined(parts);
55688
- const path3 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
55689
- return { path: path3, parts };
55638
+ const path4 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
55639
+ return { path: path4, parts };
55690
55640
  }
55691
- function realPath(path3, host, traceEnabled) {
55641
+ function realPath(path4, host, traceEnabled) {
55692
55642
  if (!host.realpath) {
55693
- return path3;
55643
+ return path4;
55694
55644
  }
55695
- const real = normalizePath(host.realpath(path3));
55645
+ const real = normalizePath(host.realpath(path4));
55696
55646
  if (traceEnabled) {
55697
- trace2(host, Diagnostics.Resolving_real_path_for_0_result_1, path3, real);
55647
+ trace2(host, Diagnostics.Resolving_real_path_for_0_result_1, path4, real);
55698
55648
  }
55699
55649
  return real;
55700
55650
  }
@@ -55739,25 +55689,25 @@ ${lanes.join("\n")}
55739
55689
  return void 0;
55740
55690
  }
55741
55691
  var nodeModulesPathPart = "/node_modules/";
55742
- function pathContainsNodeModules(path3) {
55743
- return path3.includes(nodeModulesPathPart);
55692
+ function pathContainsNodeModules(path4) {
55693
+ return path4.includes(nodeModulesPathPart);
55744
55694
  }
55745
55695
  function parseNodeModuleFromPath(resolved, isFolder) {
55746
- const path3 = normalizePath(resolved);
55747
- const idx = path3.lastIndexOf(nodeModulesPathPart);
55696
+ const path4 = normalizePath(resolved);
55697
+ const idx = path4.lastIndexOf(nodeModulesPathPart);
55748
55698
  if (idx === -1) {
55749
55699
  return void 0;
55750
55700
  }
55751
55701
  const indexAfterNodeModules = idx + nodeModulesPathPart.length;
55752
- let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path3, indexAfterNodeModules, isFolder);
55753
- if (path3.charCodeAt(indexAfterNodeModules) === 64) {
55754
- indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path3, indexAfterPackageName, isFolder);
55702
+ let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path4, indexAfterNodeModules, isFolder);
55703
+ if (path4.charCodeAt(indexAfterNodeModules) === 64) {
55704
+ indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path4, indexAfterPackageName, isFolder);
55755
55705
  }
55756
- return path3.slice(0, indexAfterPackageName);
55706
+ return path4.slice(0, indexAfterPackageName);
55757
55707
  }
55758
- function moveToNextDirectorySeparatorIfAvailable(path3, prevSeparatorIndex, isFolder) {
55759
- const nextSeparatorIndex = path3.indexOf(directorySeparator, prevSeparatorIndex + 1);
55760
- return nextSeparatorIndex === -1 ? isFolder ? path3.length : prevSeparatorIndex : nextSeparatorIndex;
55708
+ function moveToNextDirectorySeparatorIfAvailable(path4, prevSeparatorIndex, isFolder) {
55709
+ const nextSeparatorIndex = path4.indexOf(directorySeparator, prevSeparatorIndex + 1);
55710
+ return nextSeparatorIndex === -1 ? isFolder ? path4.length : prevSeparatorIndex : nextSeparatorIndex;
55761
55711
  }
55762
55712
  function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
55763
55713
  return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
@@ -55899,8 +55849,8 @@ ${lanes.join("\n")}
55899
55849
  return extensions & 4 && !isDeclarationFileName(candidate + originalExtension) && tryExtension(`.d${originalExtension}.ts`) || void 0;
55900
55850
  }
55901
55851
  function tryExtension(ext, resolvedUsingTsExtension) {
55902
- const path3 = tryFile(candidate + ext, onlyRecordFailures, state);
55903
- return path3 === void 0 ? void 0 : { path: path3, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
55852
+ const path4 = tryFile(candidate + ext, onlyRecordFailures, state);
55853
+ return path4 === void 0 ? void 0 : { path: path4, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
55904
55854
  }
55905
55855
  }
55906
55856
  function tryFile(fileName, onlyRecordFailures, state) {
@@ -56596,10 +56546,10 @@ ${lanes.join("\n")}
56596
56546
  /*value*/
56597
56547
  void 0
56598
56548
  );
56599
- function toAbsolutePath(path3) {
56549
+ function toAbsolutePath(path4) {
56600
56550
  var _a2, _b2;
56601
- if (path3 === void 0) return path3;
56602
- return getNormalizedAbsolutePath(path3, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2));
56551
+ if (path4 === void 0) return path4;
56552
+ return getNormalizedAbsolutePath(path4, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2));
56603
56553
  }
56604
56554
  function combineDirectoryPath(root, dir) {
56605
56555
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
@@ -56850,10 +56800,10 @@ ${lanes.join("\n")}
56850
56800
  trace2(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
56851
56801
  }
56852
56802
  const resolved = forEach(paths[matchedPatternText], (subst) => {
56853
- const path3 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
56854
- const candidate = normalizePath(combinePaths(baseDirectory, path3));
56803
+ const path4 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
56804
+ const candidate = normalizePath(combinePaths(baseDirectory, path4));
56855
56805
  if (state.traceEnabled) {
56856
- trace2(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path3);
56806
+ trace2(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path4);
56857
56807
  }
56858
56808
  const extension = tryGetExtensionFromPath2(subst);
56859
56809
  if (extension !== void 0) {
@@ -61006,10 +60956,10 @@ ${lanes.join("\n")}
61006
60956
  if (a === void 0 || b2 === void 0) return false;
61007
60957
  return comparePaths(a, b2, ignoreCase) === 0;
61008
60958
  }
61009
- function countPathComponents(path3) {
60959
+ function countPathComponents(path4) {
61010
60960
  let count16 = 0;
61011
- for (let i2 = startsWith(path3, "./") ? 2 : 0; i2 < path3.length; i2++) {
61012
- if (path3.charCodeAt(i2) === 47) count16++;
60961
+ for (let i2 = startsWith(path4, "./") ? 2 : 0; i2 < path4.length; i2++) {
60962
+ if (path4.charCodeAt(i2) === 47) count16++;
61013
60963
  }
61014
60964
  return count16;
61015
60965
  }
@@ -61126,9 +61076,9 @@ ${lanes.join("\n")}
61126
61076
  host,
61127
61077
  /*preferSymlinks*/
61128
61078
  true,
61129
- (path3, isRedirect) => {
61130
- const isInNodeModules = pathContainsNodeModules(path3);
61131
- allFileNames.set(path3, { path: info.getCanonicalFileName(path3), isRedirect, isInNodeModules });
61079
+ (path4, isRedirect) => {
61080
+ const isInNodeModules = pathContainsNodeModules(path4);
61081
+ allFileNames.set(path4, { path: info.getCanonicalFileName(path4), isRedirect, isInNodeModules });
61132
61082
  importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
61133
61083
  }
61134
61084
  );
@@ -61136,8 +61086,8 @@ ${lanes.join("\n")}
61136
61086
  for (let directory = info.canonicalSourceDirectory; allFileNames.size !== 0; ) {
61137
61087
  const directoryStart = ensureTrailingDirectorySeparator(directory);
61138
61088
  let pathsInDirectory;
61139
- allFileNames.forEach(({ path: path3, isRedirect, isInNodeModules }, fileName) => {
61140
- if (startsWith(path3, directoryStart)) {
61089
+ allFileNames.forEach(({ path: path4, isRedirect, isInNodeModules }, fileName) => {
61090
+ if (startsWith(path4, directoryStart)) {
61141
61091
  (pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName, isRedirect, isInNodeModules });
61142
61092
  allFileNames.delete(fileName);
61143
61093
  }
@@ -61440,17 +61390,17 @@ ${lanes.join("\n")}
61440
61390
  }
61441
61391
  return processEnding(shortest, allowedEndings, compilerOptions);
61442
61392
  }
61443
- function tryGetModuleNameAsNodeModule({ path: path3, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
61393
+ function tryGetModuleNameAsNodeModule({ path: path4, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
61444
61394
  if (!host.fileExists || !host.readFile) {
61445
61395
  return void 0;
61446
61396
  }
61447
- const parts = getNodeModulePathParts(path3);
61397
+ const parts = getNodeModulePathParts(path4);
61448
61398
  if (!parts) {
61449
61399
  return void 0;
61450
61400
  }
61451
61401
  const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile);
61452
61402
  const allowedEndings = preferences.getAllowedEndingsInPreferredOrder();
61453
- let moduleSpecifier = path3;
61403
+ let moduleSpecifier = path4;
61454
61404
  let isPackageRootPath = false;
61455
61405
  if (!packageNameOnly) {
61456
61406
  let packageRootIndex = parts.packageRootIndex;
@@ -61471,7 +61421,7 @@ ${lanes.join("\n")}
61471
61421
  break;
61472
61422
  }
61473
61423
  if (!moduleFileName) moduleFileName = moduleFileToTry;
61474
- packageRootIndex = path3.indexOf(directorySeparator, packageRootIndex + 1);
61424
+ packageRootIndex = path4.indexOf(directorySeparator, packageRootIndex + 1);
61475
61425
  if (packageRootIndex === -1) {
61476
61426
  moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host);
61477
61427
  break;
@@ -61491,9 +61441,9 @@ ${lanes.join("\n")}
61491
61441
  return getEmitModuleResolutionKind(options) === 1 && packageName === nodeModulesDirectoryName ? void 0 : packageName;
61492
61442
  function tryDirectoryWithPackageJson(packageRootIndex) {
61493
61443
  var _a, _b;
61494
- const packageRootPath = path3.substring(0, packageRootIndex);
61444
+ const packageRootPath = path4.substring(0, packageRootIndex);
61495
61445
  const packageJsonPath2 = combinePaths(packageRootPath, "package.json");
61496
- let moduleFileToTry = path3;
61446
+ let moduleFileToTry = path4;
61497
61447
  let maybeBlockedByTypesVersions = false;
61498
61448
  const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath2);
61499
61449
  if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === void 0 && host.fileExists(packageJsonPath2)) {
@@ -61506,7 +61456,7 @@ ${lanes.join("\n")}
61506
61456
  const fromExports = (packageJsonContent == null ? void 0 : packageJsonContent.exports) ? tryGetModuleNameFromExports(
61507
61457
  options,
61508
61458
  host,
61509
- path3,
61459
+ path4,
61510
61460
  packageRootPath,
61511
61461
  packageName2,
61512
61462
  packageJsonContent.exports,
@@ -61516,12 +61466,12 @@ ${lanes.join("\n")}
61516
61466
  return { ...fromExports, verbatimFromExports: true };
61517
61467
  }
61518
61468
  if (packageJsonContent == null ? void 0 : packageJsonContent.exports) {
61519
- return { moduleFileToTry: path3, blockedByExports: true };
61469
+ return { moduleFileToTry: path4, blockedByExports: true };
61520
61470
  }
61521
61471
  }
61522
61472
  const versionPaths = (packageJsonContent == null ? void 0 : packageJsonContent.typesVersions) ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : void 0;
61523
61473
  if (versionPaths) {
61524
- const subModuleName = path3.slice(packageRootPath.length + 1);
61474
+ const subModuleName = path4.slice(packageRootPath.length + 1);
61525
61475
  const fromPaths = tryGetModuleNameFromPaths(
61526
61476
  subModuleName,
61527
61477
  versionPaths.paths,
@@ -61556,7 +61506,7 @@ ${lanes.join("\n")}
61556
61506
  return { moduleFileToTry };
61557
61507
  }
61558
61508
  }
61559
- function tryGetAnyFileFromPath(host, path3) {
61509
+ function tryGetAnyFileFromPath(host, path4) {
61560
61510
  if (!host.fileExists) return;
61561
61511
  const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, {
61562
61512
  extension: "json",
@@ -61565,15 +61515,15 @@ ${lanes.join("\n")}
61565
61515
  /* JSON */
61566
61516
  }]));
61567
61517
  for (const e2 of extensions) {
61568
- const fullPath = path3 + e2;
61518
+ const fullPath = path4 + e2;
61569
61519
  if (host.fileExists(fullPath)) {
61570
61520
  return fullPath;
61571
61521
  }
61572
61522
  }
61573
61523
  }
61574
- function getPathsRelativeToRootDirs(path3, rootDirs, getCanonicalFileName) {
61524
+ function getPathsRelativeToRootDirs(path4, rootDirs, getCanonicalFileName) {
61575
61525
  return mapDefined(rootDirs, (rootDir) => {
61576
- const relativePath = getRelativePathIfInSameVolume(path3, rootDir, getCanonicalFileName);
61526
+ const relativePath = getRelativePathIfInSameVolume(path4, rootDir, getCanonicalFileName);
61577
61527
  return relativePath !== void 0 && isPathRelativeToParent(relativePath) ? void 0 : relativePath;
61578
61528
  });
61579
61529
  }
@@ -61690,10 +61640,10 @@ ${lanes.join("\n")}
61690
61640
  return void 0;
61691
61641
  }
61692
61642
  }
61693
- function getRelativePathIfInSameVolume(path3, directoryPath, getCanonicalFileName) {
61643
+ function getRelativePathIfInSameVolume(path4, directoryPath, getCanonicalFileName) {
61694
61644
  const relativePath = getRelativePathToDirectoryOrUrl(
61695
61645
  directoryPath,
61696
- path3,
61646
+ path4,
61697
61647
  directoryPath,
61698
61648
  getCanonicalFileName,
61699
61649
  /*isAbsolutePathAnUrl*/
@@ -61701,8 +61651,8 @@ ${lanes.join("\n")}
61701
61651
  );
61702
61652
  return isRootedDiskPath(relativePath) ? void 0 : relativePath;
61703
61653
  }
61704
- function isPathRelativeToParent(path3) {
61705
- return startsWith(path3, "..");
61654
+ function isPathRelativeToParent(path4) {
61655
+ return startsWith(path4, "..");
61706
61656
  }
61707
61657
  function getDefaultResolutionModeForFile(file, host, compilerOptions) {
61708
61658
  return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions);
@@ -76751,10 +76701,10 @@ ${lanes.join("\n")}
76751
76701
  const text2 = identifier.escapedText;
76752
76702
  if (text2) {
76753
76703
  const parentSymbol = name.kind === 167 ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 212 ? getUnresolvedSymbolForEntityName(name.expression) : void 0;
76754
- const path3 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text2}` : text2;
76755
- let result = unresolvedSymbols.get(path3);
76704
+ const path4 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text2}` : text2;
76705
+ let result = unresolvedSymbols.get(path4);
76756
76706
  if (!result) {
76757
- unresolvedSymbols.set(path3, result = createSymbol(
76707
+ unresolvedSymbols.set(path4, result = createSymbol(
76758
76708
  524288,
76759
76709
  text2,
76760
76710
  1048576
@@ -81555,24 +81505,24 @@ ${lanes.join("\n")}
81555
81505
  }
81556
81506
  return;
81557
81507
  }
81558
- let path3 = "";
81508
+ let path4 = "";
81559
81509
  const secondaryRootErrors = [];
81560
81510
  while (stack.length) {
81561
81511
  const [msg, ...args] = stack.pop();
81562
81512
  switch (msg.code) {
81563
81513
  case Diagnostics.Types_of_property_0_are_incompatible.code: {
81564
- if (path3.indexOf("new ") === 0) {
81565
- path3 = `(${path3})`;
81514
+ if (path4.indexOf("new ") === 0) {
81515
+ path4 = `(${path4})`;
81566
81516
  }
81567
81517
  const str = "" + args[0];
81568
- if (path3.length === 0) {
81569
- path3 = `${str}`;
81518
+ if (path4.length === 0) {
81519
+ path4 = `${str}`;
81570
81520
  } else if (isIdentifierText(str, getEmitScriptTarget(compilerOptions))) {
81571
- path3 = `${path3}.${str}`;
81521
+ path4 = `${path4}.${str}`;
81572
81522
  } else if (str[0] === "[" && str[str.length - 1] === "]") {
81573
- path3 = `${path3}${str}`;
81523
+ path4 = `${path4}${str}`;
81574
81524
  } else {
81575
- path3 = `${path3}[${str}]`;
81525
+ path4 = `${path4}[${str}]`;
81576
81526
  }
81577
81527
  break;
81578
81528
  }
@@ -81580,7 +81530,7 @@ ${lanes.join("\n")}
81580
81530
  case Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code:
81581
81531
  case Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:
81582
81532
  case Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: {
81583
- if (path3.length === 0) {
81533
+ if (path4.length === 0) {
81584
81534
  let mappedMsg = msg;
81585
81535
  if (msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) {
81586
81536
  mappedMsg = Diagnostics.Call_signature_return_types_0_and_1_are_incompatible;
@@ -81591,7 +81541,7 @@ ${lanes.join("\n")}
81591
81541
  } else {
81592
81542
  const prefix = msg.code === Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "new " : "";
81593
81543
  const params = msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "...";
81594
- path3 = `${prefix}${path3}(${params})`;
81544
+ path4 = `${prefix}${path4}(${params})`;
81595
81545
  }
81596
81546
  break;
81597
81547
  }
@@ -81607,10 +81557,10 @@ ${lanes.join("\n")}
81607
81557
  return Debug.fail(`Unhandled Diagnostic: ${msg.code}`);
81608
81558
  }
81609
81559
  }
81610
- if (path3) {
81560
+ if (path4) {
81611
81561
  reportError(
81612
- path3[path3.length - 1] === ")" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types,
81613
- path3
81562
+ path4[path4.length - 1] === ")" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types,
81563
+ path4
81614
81564
  );
81615
81565
  } else {
81616
81566
  secondaryRootErrors.shift();
@@ -136678,9 +136628,9 @@ ${lanes.join("\n")}
136678
136628
  function createAddOutput() {
136679
136629
  let outputs;
136680
136630
  return { addOutput, getOutputs };
136681
- function addOutput(path3) {
136682
- if (path3) {
136683
- (outputs || (outputs = [])).push(path3);
136631
+ function addOutput(path4) {
136632
+ if (path4) {
136633
+ (outputs || (outputs = [])).push(path4);
136684
136634
  }
136685
136635
  }
136686
136636
  function getOutputs() {
@@ -141906,7 +141856,7 @@ ${lanes.join("\n")}
141906
141856
  return {
141907
141857
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
141908
141858
  fileExists,
141909
- readFile: (path3, encoding) => host.readFile(path3, encoding),
141859
+ readFile: (path4, encoding) => host.readFile(path4, encoding),
141910
141860
  directoryExists: host.directoryExists && directoryExists,
141911
141861
  getDirectories,
141912
141862
  readDirectory,
@@ -141923,8 +141873,8 @@ ${lanes.join("\n")}
141923
141873
  function getCachedFileSystemEntries(rootDirPath) {
141924
141874
  return cachedReadDirectoryResult.get(ensureTrailingDirectorySeparator(rootDirPath));
141925
141875
  }
141926
- function getCachedFileSystemEntriesForBaseDir(path3) {
141927
- const entries = getCachedFileSystemEntries(getDirectoryPath(path3));
141876
+ function getCachedFileSystemEntriesForBaseDir(path4) {
141877
+ const entries = getCachedFileSystemEntries(getDirectoryPath(path4));
141928
141878
  if (!entries) {
141929
141879
  return entries;
141930
141880
  }
@@ -141979,8 +141929,8 @@ ${lanes.join("\n")}
141979
141929
  return index2 >= 0;
141980
141930
  }
141981
141931
  function writeFile2(fileName, data, writeByteOrderMark) {
141982
- const path3 = toPath3(fileName);
141983
- const result = getCachedFileSystemEntriesForBaseDir(path3);
141932
+ const path4 = toPath3(fileName);
141933
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
141984
141934
  if (result) {
141985
141935
  updateFilesOfFileSystemEntry(
141986
141936
  result,
@@ -141992,17 +141942,17 @@ ${lanes.join("\n")}
141992
141942
  return host.writeFile(fileName, data, writeByteOrderMark);
141993
141943
  }
141994
141944
  function fileExists(fileName) {
141995
- const path3 = toPath3(fileName);
141996
- const result = getCachedFileSystemEntriesForBaseDir(path3);
141945
+ const path4 = toPath3(fileName);
141946
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
141997
141947
  return result && hasEntry(result.sortedAndCanonicalizedFiles, getCanonicalFileName(getBaseNameOfFileName(fileName))) || host.fileExists(fileName);
141998
141948
  }
141999
141949
  function directoryExists(dirPath) {
142000
- const path3 = toPath3(dirPath);
142001
- return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path3)) || host.directoryExists(dirPath);
141950
+ const path4 = toPath3(dirPath);
141951
+ return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path4)) || host.directoryExists(dirPath);
142002
141952
  }
142003
141953
  function createDirectory(dirPath) {
142004
- const path3 = toPath3(dirPath);
142005
- const result = getCachedFileSystemEntriesForBaseDir(path3);
141954
+ const path4 = toPath3(dirPath);
141955
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
142006
141956
  if (result) {
142007
141957
  const baseName = getBaseNameOfFileName(dirPath);
142008
141958
  const canonicalizedBaseName = getCanonicalFileName(baseName);
@@ -142030,15 +141980,15 @@ ${lanes.join("\n")}
142030
141980
  }
142031
141981
  return host.readDirectory(rootDir, extensions, excludes, includes, depth);
142032
141982
  function getFileSystemEntries(dir) {
142033
- const path3 = toPath3(dir);
142034
- if (path3 === rootDirPath) {
142035
- return rootResult || getFileSystemEntriesFromHost(dir, path3);
141983
+ const path4 = toPath3(dir);
141984
+ if (path4 === rootDirPath) {
141985
+ return rootResult || getFileSystemEntriesFromHost(dir, path4);
142036
141986
  }
142037
- const result = tryReadDirectory2(dir, path3);
142038
- return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path3) : emptyFileSystemEntries;
141987
+ const result = tryReadDirectory2(dir, path4);
141988
+ return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path4) : emptyFileSystemEntries;
142039
141989
  }
142040
- function getFileSystemEntriesFromHost(dir, path3) {
142041
- if (rootSymLinkResult && path3 === rootDirPath) return rootSymLinkResult;
141990
+ function getFileSystemEntriesFromHost(dir, path4) {
141991
+ if (rootSymLinkResult && path4 === rootDirPath) return rootSymLinkResult;
142042
141992
  const result = {
142043
141993
  files: map(host.readDirectory(
142044
141994
  dir,
@@ -142051,7 +142001,7 @@ ${lanes.join("\n")}
142051
142001
  ), getBaseNameOfFileName) || emptyArray,
142052
142002
  directories: host.getDirectories(dir) || emptyArray
142053
142003
  };
142054
- if (path3 === rootDirPath) rootSymLinkResult = result;
142004
+ if (path4 === rootDirPath) rootSymLinkResult = result;
142055
142005
  return result;
142056
142006
  }
142057
142007
  }
@@ -142510,15 +142460,15 @@ ${lanes.join("\n")}
142510
142460
  return getDirectoryPath(normalizePath(system.getExecutingFilePath()));
142511
142461
  }
142512
142462
  const newLine = getNewLineCharacter(options);
142513
- const realpath = system.realpath && ((path3) => system.realpath(path3));
142463
+ const realpath = system.realpath && ((path4) => system.realpath(path4));
142514
142464
  const compilerHost = {
142515
142465
  getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), setParentNodes),
142516
142466
  getDefaultLibLocation,
142517
142467
  getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
142518
142468
  writeFile: createWriteFileMeasuringIO(
142519
- (path3, data, writeByteOrderMark) => system.writeFile(path3, data, writeByteOrderMark),
142520
- (path3) => (compilerHost.createDirectory || system.createDirectory)(path3),
142521
- (path3) => directoryExists(path3)
142469
+ (path4, data, writeByteOrderMark) => system.writeFile(path4, data, writeByteOrderMark),
142470
+ (path4) => (compilerHost.createDirectory || system.createDirectory)(path4),
142471
+ (path4) => directoryExists(path4)
142522
142472
  ),
142523
142473
  getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
142524
142474
  useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,
@@ -142529,9 +142479,9 @@ ${lanes.join("\n")}
142529
142479
  trace: (s2) => system.write(s2 + newLine),
142530
142480
  directoryExists: (directoryName) => system.directoryExists(directoryName),
142531
142481
  getEnvironmentVariable: (name) => system.getEnvironmentVariable ? system.getEnvironmentVariable(name) : "",
142532
- getDirectories: (path3) => system.getDirectories(path3),
142482
+ getDirectories: (path4) => system.getDirectories(path4),
142533
142483
  realpath,
142534
- readDirectory: (path3, extensions, include, exclude, depth) => system.readDirectory(path3, extensions, include, exclude, depth),
142484
+ readDirectory: (path4, extensions, include, exclude, depth) => system.readDirectory(path4, extensions, include, exclude, depth),
142535
142485
  createDirectory: (d2) => system.createDirectory(d2),
142536
142486
  createHash: maybeBind(system, system.createHash)
142537
142487
  };
@@ -142970,13 +142920,13 @@ ${lanes.join("\n")}
142970
142920
  }
142971
142921
  function getLibraryNameFromLibFileName(libFileName) {
142972
142922
  const components = libFileName.split(".");
142973
- let path3 = components[1];
142923
+ let path4 = components[1];
142974
142924
  let i2 = 2;
142975
142925
  while (components[i2] && components[i2] !== "d") {
142976
- path3 += (i2 === 2 ? "/" : "-") + components[i2];
142926
+ path4 += (i2 === 2 ? "/" : "-") + components[i2];
142977
142927
  i2++;
142978
142928
  }
142979
- return "@typescript/lib-" + path3;
142929
+ return "@typescript/lib-" + path4;
142980
142930
  }
142981
142931
  function isReferencedFile(reason) {
142982
142932
  switch (reason == null ? void 0 : reason.kind) {
@@ -144052,18 +144002,18 @@ ${lanes.join("\n")}
144052
144002
  filesByName.set(newSourceFile.path, newSourceFile);
144053
144003
  }
144054
144004
  const oldFilesByNameMap = oldProgram.getFilesByNameMap();
144055
- oldFilesByNameMap.forEach((oldFile, path3) => {
144005
+ oldFilesByNameMap.forEach((oldFile, path4) => {
144056
144006
  if (!oldFile) {
144057
- filesByName.set(path3, oldFile);
144007
+ filesByName.set(path4, oldFile);
144058
144008
  return;
144059
144009
  }
144060
- if (oldFile.path === path3) {
144010
+ if (oldFile.path === path4) {
144061
144011
  if (oldProgram.isSourceFileFromExternalLibrary(oldFile)) {
144062
144012
  sourceFilesFoundSearchingNodeModules.set(oldFile.path, true);
144063
144013
  }
144064
144014
  return;
144065
144015
  }
144066
- filesByName.set(path3, filesByName.get(oldFile.path));
144016
+ filesByName.set(path4, filesByName.get(oldFile.path));
144067
144017
  });
144068
144018
  const isConfigIdentical = oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations);
144069
144019
  programDiagnostics.reuseStateFromOldProgram(oldProgram.getProgramDiagnosticsContainer(), isConfigIdentical);
@@ -144101,9 +144051,9 @@ ${lanes.join("\n")}
144101
144051
  getModeForResolutionAtIndex: getModeForResolutionAtIndex2,
144102
144052
  readFile: (f) => host.readFile(f),
144103
144053
  fileExists: (f) => {
144104
- const path3 = toPath3(f);
144105
- if (getSourceFileByPath(path3)) return true;
144106
- if (missingFileNames.has(path3)) return false;
144054
+ const path4 = toPath3(f);
144055
+ if (getSourceFileByPath(path4)) return true;
144056
+ if (missingFileNames.has(path4)) return false;
144107
144057
  return host.fileExists(f);
144108
144058
  },
144109
144059
  realpath: maybeBind(host, host.realpath),
@@ -144243,8 +144193,8 @@ ${lanes.join("\n")}
144243
144193
  function getSourceFile(fileName) {
144244
144194
  return getSourceFileByPath(toPath3(fileName));
144245
144195
  }
144246
- function getSourceFileByPath(path3) {
144247
- return filesByName.get(path3) || void 0;
144196
+ function getSourceFileByPath(path4) {
144197
+ return filesByName.get(path4) || void 0;
144248
144198
  }
144249
144199
  function getDiagnosticsHelper(sourceFile, getDiagnostics2, cancellationToken) {
144250
144200
  if (sourceFile) {
@@ -144887,16 +144837,16 @@ ${lanes.join("\n")}
144887
144837
  addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]);
144888
144838
  }
144889
144839
  }
144890
- function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path3, resolvedPath, originalFileName, sourceFileOptions) {
144840
+ function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path4, resolvedPath, originalFileName, sourceFileOptions) {
144891
144841
  var _a2;
144892
144842
  const redirect = parseNodeFactory.createRedirectedSourceFile({ redirectTarget, unredirected });
144893
144843
  redirect.fileName = fileName;
144894
- redirect.path = path3;
144844
+ redirect.path = path4;
144895
144845
  redirect.resolvedPath = resolvedPath;
144896
144846
  redirect.originalFileName = originalFileName;
144897
144847
  redirect.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;
144898
144848
  redirect.packageJsonScope = sourceFileOptions.packageJsonScope;
144899
- sourceFilesFoundSearchingNodeModules.set(path3, currentNodeModulesDepth > 0);
144849
+ sourceFilesFoundSearchingNodeModules.set(path4, currentNodeModulesDepth > 0);
144900
144850
  return redirect;
144901
144851
  }
144902
144852
  function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
@@ -144918,18 +144868,18 @@ ${lanes.join("\n")}
144918
144868
  }
144919
144869
  function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
144920
144870
  var _a2, _b2;
144921
- const path3 = toPath3(fileName);
144871
+ const path4 = toPath3(fileName);
144922
144872
  if (useSourceOfProjectReferenceRedirect) {
144923
- let source = getRedirectFromOutput(path3);
144873
+ let source = getRedirectFromOutput(path4);
144924
144874
  if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
144925
144875
  const realPath2 = toPath3(host.realpath(fileName));
144926
- if (realPath2 !== path3) source = getRedirectFromOutput(realPath2);
144876
+ if (realPath2 !== path4) source = getRedirectFromOutput(realPath2);
144927
144877
  }
144928
144878
  if (source == null ? void 0 : source.source) {
144929
144879
  const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
144930
144880
  if (file2) addFileToFilesByName(
144931
144881
  file2,
144932
- path3,
144882
+ path4,
144933
144883
  fileName,
144934
144884
  /*redirectedPath*/
144935
144885
  void 0
@@ -144938,8 +144888,8 @@ ${lanes.join("\n")}
144938
144888
  }
144939
144889
  }
144940
144890
  const originalFileName = fileName;
144941
- if (filesByName.has(path3)) {
144942
- const file2 = filesByName.get(path3);
144891
+ if (filesByName.has(path4)) {
144892
+ const file2 = filesByName.get(path4);
144943
144893
  const addedReason = addFileIncludeReason(
144944
144894
  file2 || void 0,
144945
144895
  reason,
@@ -145005,28 +144955,28 @@ ${lanes.join("\n")}
145005
144955
  const packageIdKey = packageIdToString(packageId);
145006
144956
  const fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
145007
144957
  if (fileFromPackageId) {
145008
- const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path3, toPath3(fileName), originalFileName, sourceFileOptions);
144958
+ const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path4, toPath3(fileName), originalFileName, sourceFileOptions);
145009
144959
  redirectTargetsMap.add(fileFromPackageId.path, fileName);
145010
- addFileToFilesByName(dupFile, path3, fileName, redirectedPath);
144960
+ addFileToFilesByName(dupFile, path4, fileName, redirectedPath);
145011
144961
  addFileIncludeReason(
145012
144962
  dupFile,
145013
144963
  reason,
145014
144964
  /*checkExisting*/
145015
144965
  false
145016
144966
  );
145017
- sourceFileToPackageName.set(path3, packageIdToPackageName(packageId));
144967
+ sourceFileToPackageName.set(path4, packageIdToPackageName(packageId));
145018
144968
  processingOtherFiles.push(dupFile);
145019
144969
  return dupFile;
145020
144970
  } else if (file) {
145021
144971
  packageIdToSourceFile.set(packageIdKey, file);
145022
- sourceFileToPackageName.set(path3, packageIdToPackageName(packageId));
144972
+ sourceFileToPackageName.set(path4, packageIdToPackageName(packageId));
145023
144973
  }
145024
144974
  }
145025
- addFileToFilesByName(file, path3, fileName, redirectedPath);
144975
+ addFileToFilesByName(file, path4, fileName, redirectedPath);
145026
144976
  if (file) {
145027
- sourceFilesFoundSearchingNodeModules.set(path3, currentNodeModulesDepth > 0);
144977
+ sourceFilesFoundSearchingNodeModules.set(path4, currentNodeModulesDepth > 0);
145028
144978
  file.fileName = fileName;
145029
- file.path = path3;
144979
+ file.path = path4;
145030
144980
  file.resolvedPath = toPath3(fileName);
145031
144981
  file.originalFileName = originalFileName;
145032
144982
  file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0;
@@ -145038,7 +144988,7 @@ ${lanes.join("\n")}
145038
144988
  false
145039
144989
  );
145040
144990
  if (host.useCaseSensitiveFileNames()) {
145041
- const pathLowerCase = toFileNameLowerCase(path3);
144991
+ const pathLowerCase = toFileNameLowerCase(path4);
145042
144992
  const existingFile = filesByNameIgnoreCase.get(pathLowerCase);
145043
144993
  if (existingFile) {
145044
144994
  reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason);
@@ -145071,18 +145021,18 @@ ${lanes.join("\n")}
145071
145021
  }
145072
145022
  return false;
145073
145023
  }
145074
- function addFileToFilesByName(file, path3, fileName, redirectedPath) {
145024
+ function addFileToFilesByName(file, path4, fileName, redirectedPath) {
145075
145025
  if (redirectedPath) {
145076
145026
  updateFilesByNameMap(fileName, redirectedPath, file);
145077
- updateFilesByNameMap(fileName, path3, file || false);
145027
+ updateFilesByNameMap(fileName, path4, file || false);
145078
145028
  } else {
145079
- updateFilesByNameMap(fileName, path3, file);
145029
+ updateFilesByNameMap(fileName, path4, file);
145080
145030
  }
145081
145031
  }
145082
- function updateFilesByNameMap(fileName, path3, file) {
145083
- filesByName.set(path3, file);
145084
- if (file !== void 0) missingFileNames.delete(path3);
145085
- else missingFileNames.set(path3, fileName);
145032
+ function updateFilesByNameMap(fileName, path4, file) {
145033
+ filesByName.set(path4, file);
145034
+ if (file !== void 0) missingFileNames.delete(path4);
145035
+ else missingFileNames.set(path4, fileName);
145086
145036
  }
145087
145037
  function getRedirectFromSourceFile(fileName) {
145088
145038
  return mapSourceFileToResolvedRef == null ? void 0 : mapSourceFileToResolvedRef.get(toPath3(fileName));
@@ -145090,8 +145040,8 @@ ${lanes.join("\n")}
145090
145040
  function forEachResolvedProjectReference2(cb) {
145091
145041
  return forEachResolvedProjectReference(resolvedProjectReferences, cb);
145092
145042
  }
145093
- function getRedirectFromOutput(path3) {
145094
- return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path3);
145043
+ function getRedirectFromOutput(path4) {
145044
+ return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path4);
145095
145045
  }
145096
145046
  function isSourceOfProjectReferenceRedirect(fileName) {
145097
145047
  return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName);
@@ -145390,7 +145340,7 @@ ${lanes.join("\n")}
145390
145340
  }
145391
145341
  const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
145392
145342
  commandLine.fileNames.forEach((fileName) => {
145393
- const path3 = toPath3(fileName);
145343
+ const path4 = toPath3(fileName);
145394
145344
  let outputDts;
145395
145345
  if (!isDeclarationFileName(fileName) && !fileExtensionIs(
145396
145346
  fileName,
@@ -145404,7 +145354,7 @@ ${lanes.join("\n")}
145404
145354
  outputDts = outDts;
145405
145355
  }
145406
145356
  }
145407
- mapSourceFileToResolvedRef.set(path3, { resolvedRef, outputDts });
145357
+ mapSourceFileToResolvedRef.set(path4, { resolvedRef, outputDts });
145408
145358
  });
145409
145359
  }
145410
145360
  if (commandLine.projectReferences) {
@@ -146092,9 +146042,9 @@ ${lanes.join("\n")}
146092
146042
  host.compilerHost.fileExists = fileExists;
146093
146043
  let directoryExists;
146094
146044
  if (originalDirectoryExists) {
146095
- directoryExists = host.compilerHost.directoryExists = (path3) => {
146096
- if (originalDirectoryExists.call(host.compilerHost, path3)) {
146097
- handleDirectoryCouldBeSymlink(path3);
146045
+ directoryExists = host.compilerHost.directoryExists = (path4) => {
146046
+ if (originalDirectoryExists.call(host.compilerHost, path4)) {
146047
+ handleDirectoryCouldBeSymlink(path4);
146098
146048
  return true;
146099
146049
  }
146100
146050
  if (!host.getResolvedProjectReferences()) return false;
@@ -146113,14 +146063,14 @@ ${lanes.join("\n")}
146113
146063
  });
146114
146064
  }
146115
146065
  return fileOrDirectoryExistsUsingSource(
146116
- path3,
146066
+ path4,
146117
146067
  /*isFile*/
146118
146068
  false
146119
146069
  );
146120
146070
  };
146121
146071
  }
146122
146072
  if (originalGetDirectories) {
146123
- host.compilerHost.getDirectories = (path3) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path3) ? originalGetDirectories.call(host.compilerHost, path3) : [];
146073
+ host.compilerHost.getDirectories = (path4) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path4) ? originalGetDirectories.call(host.compilerHost, path4) : [];
146124
146074
  }
146125
146075
  if (originalRealpath) {
146126
146076
  host.compilerHost.realpath = (s2) => {
@@ -146787,12 +146737,12 @@ ${lanes.join("\n")}
146787
146737
  state.allFileNames = void 0;
146788
146738
  }
146789
146739
  BuilderState2.releaseCache = releaseCache2;
146790
- function getFilesAffectedBy(state, programOfThisState, path3, cancellationToken, host) {
146740
+ function getFilesAffectedBy(state, programOfThisState, path4, cancellationToken, host) {
146791
146741
  var _a;
146792
146742
  const result = getFilesAffectedByWithOldState(
146793
146743
  state,
146794
146744
  programOfThisState,
146795
- path3,
146745
+ path4,
146796
146746
  cancellationToken,
146797
146747
  host
146798
146748
  );
@@ -146800,8 +146750,8 @@ ${lanes.join("\n")}
146800
146750
  return result;
146801
146751
  }
146802
146752
  BuilderState2.getFilesAffectedBy = getFilesAffectedBy;
146803
- function getFilesAffectedByWithOldState(state, programOfThisState, path3, cancellationToken, host) {
146804
- const sourceFile = programOfThisState.getSourceFileByPath(path3);
146753
+ function getFilesAffectedByWithOldState(state, programOfThisState, path4, cancellationToken, host) {
146754
+ const sourceFile = programOfThisState.getSourceFileByPath(path4);
146805
146755
  if (!sourceFile) {
146806
146756
  return emptyArray;
146807
146757
  }
@@ -146811,9 +146761,9 @@ ${lanes.join("\n")}
146811
146761
  return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host);
146812
146762
  }
146813
146763
  BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
146814
- function updateSignatureOfFile(state, signature, path3) {
146815
- state.fileInfos.get(path3).signature = signature;
146816
- (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path3);
146764
+ function updateSignatureOfFile(state, signature, path4) {
146765
+ state.fileInfos.get(path4).signature = signature;
146766
+ (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path4);
146817
146767
  }
146818
146768
  BuilderState2.updateSignatureOfFile = updateSignatureOfFile;
146819
146769
  function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) {
@@ -146882,10 +146832,10 @@ ${lanes.join("\n")}
146882
146832
  const seenMap = /* @__PURE__ */ new Set();
146883
146833
  const queue = [sourceFile.resolvedPath];
146884
146834
  while (queue.length) {
146885
- const path3 = queue.pop();
146886
- if (!seenMap.has(path3)) {
146887
- seenMap.add(path3);
146888
- const references = state.referencedMap.getValues(path3);
146835
+ const path4 = queue.pop();
146836
+ if (!seenMap.has(path4)) {
146837
+ seenMap.add(path4);
146838
+ const references = state.referencedMap.getValues(path4);
146889
146839
  if (references) {
146890
146840
  for (const key of references.keys()) {
146891
146841
  queue.push(key);
@@ -146893,9 +146843,9 @@ ${lanes.join("\n")}
146893
146843
  }
146894
146844
  }
146895
146845
  }
146896
- return arrayFrom(mapDefinedIterator(seenMap.keys(), (path3) => {
146846
+ return arrayFrom(mapDefinedIterator(seenMap.keys(), (path4) => {
146897
146847
  var _a;
146898
- return ((_a = programOfThisState.getSourceFileByPath(path3)) == null ? void 0 : _a.fileName) ?? path3;
146848
+ return ((_a = programOfThisState.getSourceFileByPath(path4)) == null ? void 0 : _a.fileName) ?? path4;
146899
146849
  }));
146900
146850
  }
146901
146851
  BuilderState2.getAllDependencies = getAllDependencies;
@@ -147074,7 +147024,7 @@ ${lanes.join("\n")}
147074
147024
  oldInfo.version !== info.version || // Implied formats dont match
147075
147025
  oldInfo.impliedFormat !== info.impliedFormat || // Referenced files changed
147076
147026
  !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program
147077
- newReferences && forEachKey(newReferences, (path3) => !state.fileInfos.has(path3) && oldState.fileInfos.has(path3))) {
147027
+ newReferences && forEachKey(newReferences, (path4) => !state.fileInfos.has(path4) && oldState.fileInfos.has(path4))) {
147078
147028
  addFileToChangeSet(sourceFilePath);
147079
147029
  } else {
147080
147030
  const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
@@ -147140,8 +147090,8 @@ ${lanes.join("\n")}
147140
147090
  }
147141
147091
  if (useOldState && state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && oldState.checkPending !== state.checkPending) state.buildInfoEmitPending = true;
147142
147092
  return state;
147143
- function addFileToChangeSet(path3) {
147144
- state.changedFilesSet.add(path3);
147093
+ function addFileToChangeSet(path4) {
147094
+ state.changedFilesSet.add(path4);
147145
147095
  if (outFilePath) {
147146
147096
  canCopySemanticDiagnostics = false;
147147
147097
  canCopyEmitDiagnostics = false;
@@ -147205,9 +147155,9 @@ ${lanes.join("\n")}
147205
147155
  result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r2) => convertToDiagnosticRelatedInformation(r2, diagnosticFilePath, newProgram, toPathInBuildInfoDirectory)) : [] : void 0;
147206
147156
  return result;
147207
147157
  });
147208
- function toPathInBuildInfoDirectory(path3) {
147158
+ function toPathInBuildInfoDirectory(path4) {
147209
147159
  buildInfoDirectory ?? (buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory())));
147210
- return toPath(path3, buildInfoDirectory, newProgram.getCanonicalFileName);
147160
+ return toPath(path4, buildInfoDirectory, newProgram.getCanonicalFileName);
147211
147161
  }
147212
147162
  }
147213
147163
  function convertToDiagnosticRelatedInformation(diagnostic, diagnosticFilePath, newProgram, toPath3) {
@@ -147282,10 +147232,10 @@ ${lanes.join("\n")}
147282
147232
  state.affectedFilesPendingEmit = void 0;
147283
147233
  state.programEmitPending = void 0;
147284
147234
  }
147285
- (_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path3) => {
147235
+ (_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path4) => {
147286
147236
  const pending = !isForDtsErrors ? emitKind & 7 : emitKind & (7 | 48);
147287
- if (!pending) state.affectedFilesPendingEmit.delete(path3);
147288
- else state.affectedFilesPendingEmit.set(path3, pending);
147237
+ if (!pending) state.affectedFilesPendingEmit.delete(path4);
147238
+ else state.affectedFilesPendingEmit.set(path4, pending);
147289
147239
  });
147290
147240
  if (state.programEmitPending) {
147291
147241
  const pending = !isForDtsErrors ? state.programEmitPending & 7 : state.programEmitPending & (7 | 48);
@@ -147305,11 +147255,11 @@ ${lanes.join("\n")}
147305
147255
  function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {
147306
147256
  var _a;
147307
147257
  if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return void 0;
147308
- return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path3) => {
147258
+ return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path4) => {
147309
147259
  var _a2;
147310
- const affectedFile = state.program.getSourceFileByPath(path3);
147260
+ const affectedFile = state.program.getSourceFileByPath(path4);
147311
147261
  if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
147312
- state.affectedFilesPendingEmit.delete(path3);
147262
+ state.affectedFilesPendingEmit.delete(path4);
147313
147263
  return void 0;
147314
147264
  }
147315
147265
  const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath);
@@ -147325,11 +147275,11 @@ ${lanes.join("\n")}
147325
147275
  function getNextPendingEmitDiagnosticsFile(state, isForDtsErrors) {
147326
147276
  var _a;
147327
147277
  if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) return void 0;
147328
- return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path3) => {
147278
+ return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path4) => {
147329
147279
  var _a2;
147330
- const affectedFile = state.program.getSourceFileByPath(path3);
147280
+ const affectedFile = state.program.getSourceFileByPath(path4);
147331
147281
  if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
147332
- state.emitDiagnosticsPerFile.delete(path3);
147282
+ state.emitDiagnosticsPerFile.delete(path4);
147333
147283
  return void 0;
147334
147284
  }
147335
147285
  const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0;
@@ -147364,10 +147314,10 @@ ${lanes.join("\n")}
147364
147314
  host
147365
147315
  );
147366
147316
  }
147367
- function handleDtsMayChangeOf(state, path3, invalidateJsFiles, cancellationToken, host) {
147368
- removeSemanticDiagnosticsOf(state, path3);
147369
- if (!state.changedFilesSet.has(path3)) {
147370
- const sourceFile = state.program.getSourceFileByPath(path3);
147317
+ function handleDtsMayChangeOf(state, path4, invalidateJsFiles, cancellationToken, host) {
147318
+ removeSemanticDiagnosticsOf(state, path4);
147319
+ if (!state.changedFilesSet.has(path4)) {
147320
+ const sourceFile = state.program.getSourceFileByPath(path4);
147371
147321
  if (sourceFile) {
147372
147322
  BuilderState.updateShapeSignature(
147373
147323
  state,
@@ -147381,13 +147331,13 @@ ${lanes.join("\n")}
147381
147331
  if (invalidateJsFiles) {
147382
147332
  addToAffectedFilesPendingEmit(
147383
147333
  state,
147384
- path3,
147334
+ path4,
147385
147335
  getBuilderFileEmit(state.compilerOptions)
147386
147336
  );
147387
147337
  } else if (getEmitDeclarations(state.compilerOptions)) {
147388
147338
  addToAffectedFilesPendingEmit(
147389
147339
  state,
147390
- path3,
147340
+ path4,
147391
147341
  state.compilerOptions.declarationMap ? 56 : 24
147392
147342
  /* Dts */
147393
147343
  );
@@ -147395,17 +147345,17 @@ ${lanes.join("\n")}
147395
147345
  }
147396
147346
  }
147397
147347
  }
147398
- function removeSemanticDiagnosticsOf(state, path3) {
147348
+ function removeSemanticDiagnosticsOf(state, path4) {
147399
147349
  if (!state.semanticDiagnosticsFromOldState) {
147400
147350
  return true;
147401
147351
  }
147402
- state.semanticDiagnosticsFromOldState.delete(path3);
147403
- state.semanticDiagnosticsPerFile.delete(path3);
147352
+ state.semanticDiagnosticsFromOldState.delete(path4);
147353
+ state.semanticDiagnosticsPerFile.delete(path4);
147404
147354
  return !state.semanticDiagnosticsFromOldState.size;
147405
147355
  }
147406
- function isChangedSignature(state, path3) {
147407
- const oldSignature = Debug.checkDefined(state.oldSignatures).get(path3) || void 0;
147408
- const newSignature = Debug.checkDefined(state.fileInfos.get(path3)).signature;
147356
+ function isChangedSignature(state, path4) {
147357
+ const oldSignature = Debug.checkDefined(state.oldSignatures).get(path4) || void 0;
147358
+ const newSignature = Debug.checkDefined(state.fileInfos.get(path4)).signature;
147409
147359
  return newSignature !== oldSignature;
147410
147360
  }
147411
147361
  function handleDtsMayChangeOfGlobalScope(state, filePath, invalidateJsFiles, cancellationToken, host) {
@@ -147512,13 +147462,13 @@ ${lanes.join("\n")}
147512
147462
  }
147513
147463
  function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) {
147514
147464
  semanticDiagnosticsPerFile ?? (semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile);
147515
- const path3 = sourceFile.resolvedPath;
147516
- const cachedDiagnostics = semanticDiagnosticsPerFile.get(path3);
147465
+ const path4 = sourceFile.resolvedPath;
147466
+ const cachedDiagnostics = semanticDiagnosticsPerFile.get(path4);
147517
147467
  if (cachedDiagnostics) {
147518
147468
  return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);
147519
147469
  }
147520
147470
  const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken);
147521
- semanticDiagnosticsPerFile.set(path3, diagnostics);
147471
+ semanticDiagnosticsPerFile.set(path4, diagnostics);
147522
147472
  state.buildInfoEmitPending = true;
147523
147473
  return filterSemanticDiagnostics(diagnostics, state.compilerOptions);
147524
147474
  }
@@ -147666,11 +147616,11 @@ ${lanes.join("\n")}
147666
147616
  if ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.size) {
147667
147617
  const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
147668
147618
  const seenFiles = /* @__PURE__ */ new Set();
147669
- for (const path3 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
147670
- if (tryAddToSet(seenFiles, path3)) {
147671
- const file = state.program.getSourceFileByPath(path3);
147619
+ for (const path4 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
147620
+ if (tryAddToSet(seenFiles, path4)) {
147621
+ const file = state.program.getSourceFileByPath(path4);
147672
147622
  if (!file || !sourceFileMayBeEmitted(file, state.program)) continue;
147673
- const fileId = toFileId(path3), pendingEmit = state.affectedFilesPendingEmit.get(path3);
147623
+ const fileId = toFileId(path4), pendingEmit = state.affectedFilesPendingEmit.get(path4);
147674
147624
  affectedFilesPendingEmit = append(
147675
147625
  affectedFilesPendingEmit,
147676
147626
  pendingEmit === fullEmitForOptions ? fileId : (
@@ -147704,17 +147654,17 @@ ${lanes.join("\n")}
147704
147654
  version
147705
147655
  };
147706
147656
  return buildInfo;
147707
- function relativeToBuildInfoEnsuringAbsolutePath(path3) {
147708
- return relativeToBuildInfo(getNormalizedAbsolutePath(path3, currentDirectory));
147657
+ function relativeToBuildInfoEnsuringAbsolutePath(path4) {
147658
+ return relativeToBuildInfo(getNormalizedAbsolutePath(path4, currentDirectory));
147709
147659
  }
147710
- function relativeToBuildInfo(path3) {
147711
- return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path3, state.program.getCanonicalFileName));
147660
+ function relativeToBuildInfo(path4) {
147661
+ return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path4, state.program.getCanonicalFileName));
147712
147662
  }
147713
- function toFileId(path3) {
147714
- let fileId = fileNameToFileId.get(path3);
147663
+ function toFileId(path4) {
147664
+ let fileId = fileNameToFileId.get(path4);
147715
147665
  if (fileId === void 0) {
147716
- fileNames.push(relativeToBuildInfo(path3));
147717
- fileNameToFileId.set(path3, fileId = fileNames.length);
147666
+ fileNames.push(relativeToBuildInfo(path4));
147667
+ fileNameToFileId.set(path4, fileId = fileNames.length);
147718
147668
  }
147719
147669
  return fileId;
147720
147670
  }
@@ -147728,8 +147678,8 @@ ${lanes.join("\n")}
147728
147678
  }
147729
147679
  return fileIdListId;
147730
147680
  }
147731
- function tryAddRoot(path3, fileId) {
147732
- const file = state.program.getSourceFile(path3);
147681
+ function tryAddRoot(path4, fileId) {
147682
+ const file = state.program.getSourceFile(path4);
147733
147683
  if (!state.program.getFileIncludeReasons().get(file.path).some(
147734
147684
  (r2) => r2.kind === 0
147735
147685
  /* RootFile */
@@ -147746,10 +147696,10 @@ ${lanes.join("\n")}
147746
147696
  }
147747
147697
  function toResolvedRoot() {
147748
147698
  let result;
147749
- rootFileNames.forEach((path3) => {
147750
- const file = state.program.getSourceFileByPath(path3);
147751
- if (file && path3 !== file.resolvedPath) {
147752
- result = append(result, [toFileId(file.resolvedPath), toFileId(path3)]);
147699
+ rootFileNames.forEach((path4) => {
147700
+ const file = state.program.getSourceFileByPath(path4);
147701
+ if (file && path4 !== file.resolvedPath) {
147702
+ result = append(result, [toFileId(file.resolvedPath), toFileId(path4)]);
147753
147703
  }
147754
147704
  });
147755
147705
  return result;
@@ -147857,8 +147807,8 @@ ${lanes.join("\n")}
147857
147807
  function toChangeFileSet() {
147858
147808
  let changeFileSet;
147859
147809
  if (state.changedFilesSet.size) {
147860
- for (const path3 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
147861
- changeFileSet = append(changeFileSet, toFileId(path3));
147810
+ for (const path4 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
147811
+ changeFileSet = append(changeFileSet, toFileId(path4));
147862
147812
  }
147863
147813
  }
147864
147814
  return changeFileSet;
@@ -148357,8 +148307,8 @@ ${lanes.join("\n")}
148357
148307
  const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));
148358
148308
  if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
148359
148309
  buildInfo.fileInfos.forEach((fileInfo, index2) => {
148360
- const path3 = toFilePath(index2 + 1);
148361
- fileInfos.set(path3, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
148310
+ const path4 = toFilePath(index2 + 1);
148311
+ fileInfos.set(path4, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
148362
148312
  });
148363
148313
  state = {
148364
148314
  fileInfos,
@@ -148377,10 +148327,10 @@ ${lanes.join("\n")}
148377
148327
  filePathsSetList = (_b = buildInfo.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
148378
148328
  const emitSignatures = ((_c = buildInfo.options) == null ? void 0 : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map() : void 0;
148379
148329
  buildInfo.fileInfos.forEach((fileInfo, index2) => {
148380
- const path3 = toFilePath(index2 + 1);
148330
+ const path4 = toFilePath(index2 + 1);
148381
148331
  const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
148382
- fileInfos.set(path3, stateFileInfo);
148383
- if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path3, stateFileInfo.signature);
148332
+ fileInfos.set(path4, stateFileInfo);
148333
+ if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path4, stateFileInfo.signature);
148384
148334
  });
148385
148335
  (_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => {
148386
148336
  if (isNumber(value)) emitSignatures.delete(toFilePath(value));
@@ -148434,11 +148384,11 @@ ${lanes.join("\n")}
148434
148384
  close: noop,
148435
148385
  hasChangedEmitSignature: returnFalse
148436
148386
  };
148437
- function toPathInBuildInfoDirectory(path3) {
148438
- return toPath(path3, buildInfoDirectory, getCanonicalFileName);
148387
+ function toPathInBuildInfoDirectory(path4) {
148388
+ return toPath(path4, buildInfoDirectory, getCanonicalFileName);
148439
148389
  }
148440
- function toAbsolutePath(path3) {
148441
- return getNormalizedAbsolutePath(path3, buildInfoDirectory);
148390
+ function toAbsolutePath(path4) {
148391
+ return getNormalizedAbsolutePath(path4, buildInfoDirectory);
148442
148392
  }
148443
148393
  function toFilePath(fileId) {
148444
148394
  return filePaths[fileId - 1];
@@ -148477,30 +148427,30 @@ ${lanes.join("\n")}
148477
148427
  const roots = /* @__PURE__ */ new Map();
148478
148428
  const resolvedRoots = new Map(program2.resolvedRoot);
148479
148429
  program2.fileInfos.forEach((fileInfo, index2) => {
148480
- const path3 = toPath(program2.fileNames[index2], buildInfoDirectory, getCanonicalFileName);
148430
+ const path4 = toPath(program2.fileNames[index2], buildInfoDirectory, getCanonicalFileName);
148481
148431
  const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;
148482
- fileInfos.set(path3, version2);
148432
+ fileInfos.set(path4, version2);
148483
148433
  if (rootIndex < program2.root.length) {
148484
148434
  const current = program2.root[rootIndex];
148485
148435
  const fileId = index2 + 1;
148486
148436
  if (isArray(current)) {
148487
148437
  if (current[0] <= fileId && fileId <= current[1]) {
148488
- addRoot(fileId, path3);
148438
+ addRoot(fileId, path4);
148489
148439
  if (current[1] === fileId) rootIndex++;
148490
148440
  }
148491
148441
  } else if (current === fileId) {
148492
- addRoot(fileId, path3);
148442
+ addRoot(fileId, path4);
148493
148443
  rootIndex++;
148494
148444
  }
148495
148445
  }
148496
148446
  });
148497
148447
  return { fileInfos, roots };
148498
- function addRoot(fileId, path3) {
148448
+ function addRoot(fileId, path4) {
148499
148449
  const root = resolvedRoots.get(fileId);
148500
148450
  if (root) {
148501
- roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path3);
148451
+ roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path4);
148502
148452
  } else {
148503
- roots.set(path3, void 0);
148453
+ roots.set(path4, void 0);
148504
148454
  }
148505
148455
  }
148506
148456
  }
@@ -148575,11 +148525,11 @@ ${lanes.join("\n")}
148575
148525
  newConfigFileParsingDiagnostics
148576
148526
  );
148577
148527
  }
148578
- function removeIgnoredPath(path3) {
148579
- if (endsWith(path3, "/node_modules/.staging")) {
148580
- return removeSuffix(path3, "/.staging");
148528
+ function removeIgnoredPath(path4) {
148529
+ if (endsWith(path4, "/node_modules/.staging")) {
148530
+ return removeSuffix(path4, "/.staging");
148581
148531
  }
148582
- return some(ignoredPaths, (searchPath) => path3.includes(searchPath)) ? void 0 : path3;
148532
+ return some(ignoredPaths, (searchPath) => path4.includes(searchPath)) ? void 0 : path4;
148583
148533
  }
148584
148534
  function perceivedOsRootLengthForWatching(pathComponents2, length2) {
148585
148535
  if (length2 <= 1) return 1;
@@ -148605,8 +148555,8 @@ ${lanes.join("\n")}
148605
148555
  const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2);
148606
148556
  return length2 > perceivedOsRootLength + 1;
148607
148557
  }
148608
- function canWatchDirectoryOrFilePath(path3) {
148609
- return canWatchDirectoryOrFile(getPathComponents(path3));
148558
+ function canWatchDirectoryOrFilePath(path4) {
148559
+ return canWatchDirectoryOrFile(getPathComponents(path4));
148610
148560
  }
148611
148561
  function canWatchAtTypes(atTypes) {
148612
148562
  return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes));
@@ -148900,11 +148850,11 @@ ${lanes.join("\n")}
148900
148850
  filesWithChangedSetOfUnresolvedImports = void 0;
148901
148851
  return collected;
148902
148852
  }
148903
- function isFileWithInvalidatedNonRelativeUnresolvedImports(path3) {
148853
+ function isFileWithInvalidatedNonRelativeUnresolvedImports(path4) {
148904
148854
  if (!filesWithInvalidatedNonRelativeUnresolvedImports) {
148905
148855
  return false;
148906
148856
  }
148907
- const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path3);
148857
+ const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path4);
148908
148858
  return !!value && !!value.length;
148909
148859
  }
148910
148860
  function createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidatedLibResolutions) {
@@ -148912,7 +148862,7 @@ ${lanes.join("\n")}
148912
148862
  const collected = filesWithInvalidatedResolutions;
148913
148863
  filesWithInvalidatedResolutions = void 0;
148914
148864
  return {
148915
- hasInvalidatedResolutions: (path3) => customHasInvalidatedResolutions(path3) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path3)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path3),
148865
+ hasInvalidatedResolutions: (path4) => customHasInvalidatedResolutions(path4) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path4)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path4),
148916
148866
  hasInvalidatedLibResolutions: (libFileName) => {
148917
148867
  var _a;
148918
148868
  return customHasInvalidatedLibResolutions(libFileName) || !!((_a = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName)) == null ? void 0 : _a.isInvalidated);
@@ -148968,11 +148918,11 @@ ${lanes.join("\n")}
148968
148918
  if (expected) impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations);
148969
148919
  else impliedFormatPackageJsons.delete(newFile.resolvedPath);
148970
148920
  });
148971
- impliedFormatPackageJsons.forEach((existing, path3) => {
148972
- const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(path3);
148973
- if (!newFile || newFile.resolvedPath !== path3) {
148921
+ impliedFormatPackageJsons.forEach((existing, path4) => {
148922
+ const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(path4);
148923
+ if (!newFile || newFile.resolvedPath !== path4) {
148974
148924
  existing.forEach((location) => fileWatchesOfAffectingLocations.get(location).files--);
148975
- impliedFormatPackageJsons.delete(path3);
148925
+ impliedFormatPackageJsons.delete(path4);
148976
148926
  }
148977
148927
  });
148978
148928
  }
@@ -148991,16 +148941,16 @@ ${lanes.join("\n")}
148991
148941
  packageDirWatchers.delete(packageDirPath);
148992
148942
  }
148993
148943
  }
148994
- function closeDirectoryWatchesOfFailedLookup(watcher, path3) {
148944
+ function closeDirectoryWatchesOfFailedLookup(watcher, path4) {
148995
148945
  if (watcher.refCount === 0) {
148996
- directoryWatchesOfFailedLookups.delete(path3);
148946
+ directoryWatchesOfFailedLookups.delete(path4);
148997
148947
  watcher.watcher.close();
148998
148948
  }
148999
148949
  }
149000
- function closeFileWatcherOfAffectingLocation(watcher, path3) {
148950
+ function closeFileWatcherOfAffectingLocation(watcher, path4) {
149001
148951
  var _a;
149002
148952
  if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) {
149003
- fileWatchesOfAffectingLocations.delete(path3);
148953
+ fileWatchesOfAffectingLocations.delete(path4);
149004
148954
  watcher.watcher.close();
149005
148955
  }
149006
148956
  }
@@ -149019,10 +148969,10 @@ ${lanes.join("\n")}
149019
148969
  logChanges
149020
148970
  }) {
149021
148971
  var _a;
149022
- const path3 = resolutionHost.toPath(containingFile);
149023
- const resolutionsInFile = perFileCache.get(path3) || perFileCache.set(path3, createModeAwareCache()).get(path3);
148972
+ const path4 = resolutionHost.toPath(containingFile);
148973
+ const resolutionsInFile = perFileCache.get(path4) || perFileCache.set(path4, createModeAwareCache()).get(path4);
149024
148974
  const resolvedModules = [];
149025
- const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path3);
148975
+ const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path4);
149026
148976
  const program2 = resolutionHost.getCurrentProgram();
149027
148977
  const oldRedirect = program2 && ((_a = program2.getRedirectFromSourceFile(containingFile)) == null ? void 0 : _a.resolvedRef);
149028
148978
  const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
@@ -149040,13 +148990,13 @@ ${lanes.join("\n")}
149040
148990
  }
149041
148991
  resolutionsInFile.set(name, mode, resolution);
149042
148992
  if (resolution !== existingResolution) {
149043
- watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path3, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
148993
+ watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path4, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
149044
148994
  if (existingResolution) {
149045
- stopWatchFailedLookupLocationOfResolution(existingResolution, path3, getResolutionWithResolvedFileName);
148995
+ stopWatchFailedLookupLocationOfResolution(existingResolution, path4, getResolutionWithResolvedFileName);
149046
148996
  }
149047
148997
  }
149048
148998
  if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
149049
- filesWithChangedSetOfUnresolvedImports.push(path3);
148999
+ filesWithChangedSetOfUnresolvedImports.push(path4);
149050
149000
  logChanges = false;
149051
149001
  }
149052
149002
  } else {
@@ -149077,7 +149027,7 @@ ${lanes.join("\n")}
149077
149027
  if (resolutionsInFile.size() !== seenNamesInFile.size()) {
149078
149028
  resolutionsInFile.forEach((resolution, name, mode) => {
149079
149029
  if (!seenNamesInFile.has(name, mode)) {
149080
- stopWatchFailedLookupLocationOfResolution(resolution, path3, getResolutionWithResolvedFileName);
149030
+ stopWatchFailedLookupLocationOfResolution(resolution, path4, getResolutionWithResolvedFileName);
149081
149031
  resolutionsInFile.delete(name, mode);
149082
149032
  }
149083
149033
  });
@@ -149151,18 +149101,18 @@ ${lanes.join("\n")}
149151
149101
  if (!resolution || resolution.isInvalidated) {
149152
149102
  const existingResolution = resolution;
149153
149103
  resolution = resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache);
149154
- const path3 = resolutionHost.toPath(resolveFrom);
149104
+ const path4 = resolutionHost.toPath(resolveFrom);
149155
149105
  watchFailedLookupLocationsOfExternalModuleResolutions(
149156
149106
  libraryName,
149157
149107
  resolution,
149158
- path3,
149108
+ path4,
149159
149109
  getResolvedModuleFromResolution,
149160
149110
  /*deferWatchingNonRelativeResolution*/
149161
149111
  false
149162
149112
  );
149163
149113
  resolvedLibraries.set(libFileName, resolution);
149164
149114
  if (existingResolution) {
149165
- stopWatchFailedLookupLocationOfResolution(existingResolution, path3, getResolvedModuleFromResolution);
149115
+ stopWatchFailedLookupLocationOfResolution(existingResolution, path4, getResolvedModuleFromResolution);
149166
149116
  }
149167
149117
  } else {
149168
149118
  if (isTraceEnabled(options, host)) {
@@ -149181,8 +149131,8 @@ ${lanes.join("\n")}
149181
149131
  }
149182
149132
  function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
149183
149133
  var _a, _b;
149184
- const path3 = resolutionHost.toPath(containingFile);
149185
- const resolutionsInFile = resolvedModuleNames.get(path3);
149134
+ const path4 = resolutionHost.toPath(containingFile);
149135
+ const resolutionsInFile = resolvedModuleNames.get(path4);
149186
149136
  const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get(
149187
149137
  moduleName,
149188
149138
  /*mode*/
@@ -149339,13 +149289,13 @@ ${lanes.join("\n")}
149339
149289
  (symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation);
149340
149290
  }
149341
149291
  }
149342
- function invalidateAffectingFileWatcher(path3, packageJsonMap) {
149292
+ function invalidateAffectingFileWatcher(path4, packageJsonMap) {
149343
149293
  var _a;
149344
- const watcher = fileWatchesOfAffectingLocations.get(path3);
149345
- if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path3);
149346
- if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path3);
149294
+ const watcher = fileWatchesOfAffectingLocations.get(path4);
149295
+ if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path4);
149296
+ if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path4);
149347
149297
  (_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path22) => invalidateAffectingFileWatcher(path22, packageJsonMap));
149348
- packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path3));
149298
+ packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path4));
149349
149299
  }
149350
149300
  function watchFailedLookupLocationOfNonRelativeModuleResolutions() {
149351
149301
  nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution);
@@ -149584,7 +149534,7 @@ ${lanes.join("\n")}
149584
149534
  function invalidatePackageJsonMap() {
149585
149535
  const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
149586
149536
  if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {
149587
- packageJsonMap.forEach((_value, path3) => isInvalidatedFailedLookup(path3) ? packageJsonMap.delete(path3) : void 0);
149537
+ packageJsonMap.forEach((_value, path4) => isInvalidatedFailedLookup(path4) ? packageJsonMap.delete(path4) : void 0);
149588
149538
  }
149589
149539
  }
149590
149540
  function invalidateResolutionsOfFailedLookupLocations() {
@@ -150202,9 +150152,9 @@ ${lanes.join("\n")}
150202
150152
  getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
150203
150153
  getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
150204
150154
  writeFile: createWriteFileMeasuringIO(
150205
- (path3, data, writeByteOrderMark) => host.writeFile(path3, data, writeByteOrderMark),
150206
- (path3) => host.createDirectory(path3),
150207
- (path3) => host.directoryExists(path3)
150155
+ (path4, data, writeByteOrderMark) => host.writeFile(path4, data, writeByteOrderMark),
150156
+ (path4) => host.createDirectory(path4),
150157
+ (path4) => host.directoryExists(path4)
150208
150158
  ),
150209
150159
  getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
150210
150160
  useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
@@ -150275,16 +150225,16 @@ ${lanes.join("\n")}
150275
150225
  getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
150276
150226
  getDefaultLibLocation,
150277
150227
  getDefaultLibFileName: (options) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
150278
- fileExists: (path3) => system.fileExists(path3),
150279
- readFile: (path3, encoding) => system.readFile(path3, encoding),
150280
- directoryExists: (path3) => system.directoryExists(path3),
150281
- getDirectories: (path3) => system.getDirectories(path3),
150282
- readDirectory: (path3, extensions, exclude, include, depth) => system.readDirectory(path3, extensions, exclude, include, depth),
150228
+ fileExists: (path4) => system.fileExists(path4),
150229
+ readFile: (path4, encoding) => system.readFile(path4, encoding),
150230
+ directoryExists: (path4) => system.directoryExists(path4),
150231
+ getDirectories: (path4) => system.getDirectories(path4),
150232
+ readDirectory: (path4, extensions, exclude, include, depth) => system.readDirectory(path4, extensions, exclude, include, depth),
150283
150233
  realpath: maybeBind(system, system.realpath),
150284
150234
  getEnvironmentVariable: maybeBind(system, system.getEnvironmentVariable),
150285
150235
  trace: (s2) => system.write(s2 + system.newLine),
150286
- createDirectory: (path3) => system.createDirectory(path3),
150287
- writeFile: (path3, data, writeByteOrderMark) => system.writeFile(path3, data, writeByteOrderMark),
150236
+ createDirectory: (path4) => system.createDirectory(path4),
150237
+ writeFile: (path4, data, writeByteOrderMark) => system.writeFile(path4, data, writeByteOrderMark),
150288
150238
  createHash: maybeBind(system, system.createHash),
150289
150239
  createProgram: createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram,
150290
150240
  storeSignatureInfo: system.storeSignatureInfo,
@@ -150597,7 +150547,7 @@ ${lanes.join("\n")}
150597
150547
  originalWriteFile,
150598
150548
  readFileWithCache
150599
150549
  } = changeCompilerHostLikeToUseCache(compilerHost, toPath3);
150600
- if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path3) => getSourceVersion(path3, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
150550
+ if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path4) => getSourceVersion(path4, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
150601
150551
  if (hasChangedConfigFileParsingErrors) {
150602
150552
  if (reportFileChangeDetectedOnCreateProgram) {
150603
150553
  reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation);
@@ -150691,14 +150641,14 @@ ${lanes.join("\n")}
150691
150641
  return typeof hostSourceFile.version === "boolean";
150692
150642
  }
150693
150643
  function fileExists(fileName) {
150694
- const path3 = toPath3(fileName);
150695
- if (isFileMissingOnHost(sourceFilesCache.get(path3))) {
150644
+ const path4 = toPath3(fileName);
150645
+ if (isFileMissingOnHost(sourceFilesCache.get(path4))) {
150696
150646
  return false;
150697
150647
  }
150698
150648
  return directoryStructureHost.fileExists(fileName);
150699
150649
  }
150700
- function getVersionedSourceFileByPath(fileName, path3, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
150701
- const hostSourceFile = sourceFilesCache.get(path3);
150650
+ function getVersionedSourceFileByPath(fileName, path4, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
150651
+ const hostSourceFile = sourceFilesCache.get(path4);
150702
150652
  if (isFileMissingOnHost(hostSourceFile)) {
150703
150653
  return void 0;
150704
150654
  }
@@ -150710,41 +150660,41 @@ ${lanes.join("\n")}
150710
150660
  hostSourceFile.sourceFile = sourceFile;
150711
150661
  hostSourceFile.version = sourceFile.version;
150712
150662
  if (!hostSourceFile.fileWatcher) {
150713
- hostSourceFile.fileWatcher = watchFilePath(path3, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150663
+ hostSourceFile.fileWatcher = watchFilePath(path4, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150714
150664
  }
150715
150665
  } else {
150716
150666
  if (hostSourceFile.fileWatcher) {
150717
150667
  hostSourceFile.fileWatcher.close();
150718
150668
  }
150719
- sourceFilesCache.set(path3, false);
150669
+ sourceFilesCache.set(path4, false);
150720
150670
  }
150721
150671
  } else {
150722
150672
  if (sourceFile) {
150723
- const fileWatcher = watchFilePath(path3, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150724
- sourceFilesCache.set(path3, { sourceFile, version: sourceFile.version, fileWatcher });
150673
+ const fileWatcher = watchFilePath(path4, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150674
+ sourceFilesCache.set(path4, { sourceFile, version: sourceFile.version, fileWatcher });
150725
150675
  } else {
150726
- sourceFilesCache.set(path3, false);
150676
+ sourceFilesCache.set(path4, false);
150727
150677
  }
150728
150678
  }
150729
150679
  return sourceFile;
150730
150680
  }
150731
150681
  return hostSourceFile.sourceFile;
150732
150682
  }
150733
- function nextSourceFileVersion(path3) {
150734
- const hostSourceFile = sourceFilesCache.get(path3);
150683
+ function nextSourceFileVersion(path4) {
150684
+ const hostSourceFile = sourceFilesCache.get(path4);
150735
150685
  if (hostSourceFile !== void 0) {
150736
150686
  if (isFileMissingOnHost(hostSourceFile)) {
150737
- sourceFilesCache.set(path3, { version: false });
150687
+ sourceFilesCache.set(path4, { version: false });
150738
150688
  } else {
150739
150689
  hostSourceFile.version = false;
150740
150690
  }
150741
150691
  }
150742
150692
  }
150743
- function getSourceVersion(path3, readFileWithCache) {
150744
- const hostSourceFile = sourceFilesCache.get(path3);
150693
+ function getSourceVersion(path4, readFileWithCache) {
150694
+ const hostSourceFile = sourceFilesCache.get(path4);
150745
150695
  if (!hostSourceFile) return void 0;
150746
150696
  if (hostSourceFile.version) return hostSourceFile.version;
150747
- const text2 = readFileWithCache(path3);
150697
+ const text2 = readFileWithCache(path4);
150748
150698
  return text2 !== void 0 ? getSourceFileVersionAsHashFromText(compilerHost, text2) : void 0;
150749
150699
  }
150750
150700
  function onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath) {
@@ -150923,28 +150873,28 @@ ${lanes.join("\n")}
150923
150873
  }
150924
150874
  function onReleaseParsedCommandLine(fileName) {
150925
150875
  var _a;
150926
- const path3 = toPath3(fileName);
150927
- const config = parsedConfigs == null ? void 0 : parsedConfigs.get(path3);
150876
+ const path4 = toPath3(fileName);
150877
+ const config = parsedConfigs == null ? void 0 : parsedConfigs.get(path4);
150928
150878
  if (!config) return;
150929
- parsedConfigs.delete(path3);
150879
+ parsedConfigs.delete(path4);
150930
150880
  if (config.watchedDirectories) clearMap(config.watchedDirectories, closeFileWatcherOf);
150931
150881
  (_a = config.watcher) == null ? void 0 : _a.close();
150932
- clearSharedExtendedConfigFileWatcher(path3, sharedExtendedConfigFileWatchers);
150882
+ clearSharedExtendedConfigFileWatcher(path4, sharedExtendedConfigFileWatchers);
150933
150883
  }
150934
- function watchFilePath(path3, file, callback, pollingInterval, options, watchType) {
150935
- return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path3), pollingInterval, options, watchType);
150884
+ function watchFilePath(path4, file, callback, pollingInterval, options, watchType) {
150885
+ return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path4), pollingInterval, options, watchType);
150936
150886
  }
150937
- function onSourceFileChange(fileName, eventKind, path3) {
150938
- updateCachedSystemWithFile(fileName, path3, eventKind);
150939
- if (eventKind === 2 && sourceFilesCache.has(path3)) {
150940
- resolutionCache.invalidateResolutionOfFile(path3);
150887
+ function onSourceFileChange(fileName, eventKind, path4) {
150888
+ updateCachedSystemWithFile(fileName, path4, eventKind);
150889
+ if (eventKind === 2 && sourceFilesCache.has(path4)) {
150890
+ resolutionCache.invalidateResolutionOfFile(path4);
150941
150891
  }
150942
- nextSourceFileVersion(path3);
150892
+ nextSourceFileVersion(path4);
150943
150893
  scheduleProgramUpdate();
150944
150894
  }
150945
- function updateCachedSystemWithFile(fileName, path3, eventKind) {
150895
+ function updateCachedSystemWithFile(fileName, path4, eventKind) {
150946
150896
  if (cachedDirectoryStructureHost) {
150947
- cachedDirectoryStructureHost.addOrDeleteFile(fileName, path3, eventKind);
150897
+ cachedDirectoryStructureHost.addOrDeleteFile(fileName, path4, eventKind);
150948
150898
  }
150949
150899
  }
150950
150900
  function watchMissingFilePath(missingFilePath, missingFileName) {
@@ -151165,9 +151115,9 @@ ${lanes.join("\n")}
151165
151115
  }
151166
151116
  function createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus) {
151167
151117
  const host = createProgramHost(system, createProgram2);
151168
- host.getModifiedTime = system.getModifiedTime ? (path3) => system.getModifiedTime(path3) : returnUndefined;
151169
- host.setModifiedTime = system.setModifiedTime ? (path3, date) => system.setModifiedTime(path3, date) : noop;
151170
- host.deleteFile = system.deleteFile ? (path3) => system.deleteFile(path3) : noop;
151118
+ host.getModifiedTime = system.getModifiedTime ? (path4) => system.getModifiedTime(path4) : returnUndefined;
151119
+ host.setModifiedTime = system.setModifiedTime ? (path4, date) => system.setModifiedTime(path4, date) : noop;
151120
+ host.deleteFile = system.deleteFile ? (path4) => system.deleteFile(path4) : noop;
151171
151121
  host.reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system);
151172
151122
  host.reportSolutionBuilderStatus = reportSolutionBuilderStatus || createBuilderStatusReporter(system);
151173
151123
  host.now = maybeBind(system, system.now);
@@ -151338,8 +151288,8 @@ ${lanes.join("\n")}
151338
151288
  }
151339
151289
  function toResolvedConfigFilePath(state, fileName) {
151340
151290
  const { resolvedConfigFilePaths } = state;
151341
- const path3 = resolvedConfigFilePaths.get(fileName);
151342
- if (path3 !== void 0) return path3;
151291
+ const path4 = resolvedConfigFilePaths.get(fileName);
151292
+ if (path4 !== void 0) return path4;
151343
151293
  const resolvedPath = toPath2(state, fileName);
151344
151294
  resolvedConfigFilePaths.set(fileName, resolvedPath);
151345
151295
  return resolvedPath;
@@ -151727,7 +151677,7 @@ ${lanes.join("\n")}
151727
151677
  void 0,
151728
151678
  (name, text2, writeByteOrderMark, onError, sourceFiles, data) => {
151729
151679
  var _a2;
151730
- const path3 = toPath2(state, name);
151680
+ const path4 = toPath2(state, name);
151731
151681
  emittedOutputs.set(toPath2(state, name), name);
151732
151682
  if (data == null ? void 0 : data.buildInfo) {
151733
151683
  now || (now = getCurrentTime(state.host));
@@ -151757,7 +151707,7 @@ ${lanes.join("\n")}
151757
151707
  );
151758
151708
  if (data == null ? void 0 : data.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime);
151759
151709
  else if (!isIncremental && state.watch) {
151760
- (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path3, now || (now = getCurrentTime(state.host)));
151710
+ (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path4, now || (now = getCurrentTime(state.host)));
151761
151711
  }
151762
151712
  },
151763
151713
  cancellationToken,
@@ -151941,8 +151891,8 @@ ${lanes.join("\n")}
151941
151891
  return !!value.watcher;
151942
151892
  }
151943
151893
  function getModifiedTime2(state, fileName) {
151944
- const path3 = toPath2(state, fileName);
151945
- const existing = state.filesWatched.get(path3);
151894
+ const path4 = toPath2(state, fileName);
151895
+ const existing = state.filesWatched.get(path4);
151946
151896
  if (state.watch && !!existing) {
151947
151897
  if (!isFileWatcherWithModifiedTime(existing)) return existing;
151948
151898
  if (existing.modifiedTime) return existing.modifiedTime;
@@ -151950,20 +151900,20 @@ ${lanes.join("\n")}
151950
151900
  const result = getModifiedTime(state.host, fileName);
151951
151901
  if (state.watch) {
151952
151902
  if (existing) existing.modifiedTime = result;
151953
- else state.filesWatched.set(path3, result);
151903
+ else state.filesWatched.set(path4, result);
151954
151904
  }
151955
151905
  return result;
151956
151906
  }
151957
151907
  function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
151958
- const path3 = toPath2(state, file);
151959
- const existing = state.filesWatched.get(path3);
151908
+ const path4 = toPath2(state, file);
151909
+ const existing = state.filesWatched.get(path4);
151960
151910
  if (existing && isFileWatcherWithModifiedTime(existing)) {
151961
151911
  existing.callbacks.push(callback);
151962
151912
  } else {
151963
151913
  const watcher = state.watchFile(
151964
151914
  file,
151965
151915
  (fileName, eventKind, modifiedTime) => {
151966
- const existing2 = Debug.checkDefined(state.filesWatched.get(path3));
151916
+ const existing2 = Debug.checkDefined(state.filesWatched.get(path4));
151967
151917
  Debug.assert(isFileWatcherWithModifiedTime(existing2));
151968
151918
  existing2.modifiedTime = modifiedTime;
151969
151919
  existing2.callbacks.forEach((cb) => cb(fileName, eventKind, modifiedTime));
@@ -151973,14 +151923,14 @@ ${lanes.join("\n")}
151973
151923
  watchType,
151974
151924
  project
151975
151925
  );
151976
- state.filesWatched.set(path3, { callbacks: [callback], watcher, modifiedTime: existing });
151926
+ state.filesWatched.set(path4, { callbacks: [callback], watcher, modifiedTime: existing });
151977
151927
  }
151978
151928
  return {
151979
151929
  close: () => {
151980
- const existing2 = Debug.checkDefined(state.filesWatched.get(path3));
151930
+ const existing2 = Debug.checkDefined(state.filesWatched.get(path4));
151981
151931
  Debug.assert(isFileWatcherWithModifiedTime(existing2));
151982
151932
  if (existing2.callbacks.length === 1) {
151983
- state.filesWatched.delete(path3);
151933
+ state.filesWatched.delete(path4);
151984
151934
  closeFileWatcherOf(existing2);
151985
151935
  } else {
151986
151936
  unorderedRemoveItem(existing2.callbacks, callback);
@@ -151995,19 +151945,19 @@ ${lanes.join("\n")}
151995
151945
  return result;
151996
151946
  }
151997
151947
  function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
151998
- const path3 = toPath2(state, buildInfoPath);
151948
+ const path4 = toPath2(state, buildInfoPath);
151999
151949
  const existing = state.buildInfoCache.get(resolvedConfigPath);
152000
- return (existing == null ? void 0 : existing.path) === path3 ? existing : void 0;
151950
+ return (existing == null ? void 0 : existing.path) === path4 ? existing : void 0;
152001
151951
  }
152002
151952
  function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
152003
- const path3 = toPath2(state, buildInfoPath);
151953
+ const path4 = toPath2(state, buildInfoPath);
152004
151954
  const existing = state.buildInfoCache.get(resolvedConfigPath);
152005
- if (existing !== void 0 && existing.path === path3) {
151955
+ if (existing !== void 0 && existing.path === path4) {
152006
151956
  return existing.buildInfo || void 0;
152007
151957
  }
152008
151958
  const value = state.readFileWithCache(buildInfoPath);
152009
151959
  const buildInfo = value ? getBuildInfo(buildInfoPath, value) : void 0;
152010
- state.buildInfoCache.set(resolvedConfigPath, { path: path3, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
151960
+ state.buildInfoCache.set(resolvedConfigPath, { path: path4, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
152011
151961
  return buildInfo;
152012
151962
  }
152013
151963
  function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
@@ -152188,11 +152138,11 @@ ${lanes.join("\n")}
152188
152138
  const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
152189
152139
  for (const output of outputs) {
152190
152140
  if (output === buildInfoPath) continue;
152191
- const path3 = toPath2(state, output);
152192
- let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path3);
152141
+ const path4 = toPath2(state, output);
152142
+ let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path4);
152193
152143
  if (!outputTime) {
152194
152144
  outputTime = getModifiedTime(state.host, output);
152195
- outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path3, outputTime);
152145
+ outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path4, outputTime);
152196
152146
  }
152197
152147
  if (outputTime === missingFileModifiedTime) {
152198
152148
  return {
@@ -152246,7 +152196,7 @@ ${lanes.join("\n")}
152246
152196
  const packageJsonLookups = state.lastCachedPackageJsonLookups.get(resolvedPath);
152247
152197
  const dependentPackageFileStatus = packageJsonLookups && forEachKey(
152248
152198
  packageJsonLookups,
152249
- (path3) => checkConfigFileUpToDateStatus(state, path3, oldestOutputFileTime, oldestOutputFileName)
152199
+ (path4) => checkConfigFileUpToDateStatus(state, path4, oldestOutputFileTime, oldestOutputFileName)
152250
152200
  );
152251
152201
  if (dependentPackageFileStatus) return dependentPackageFileStatus;
152252
152202
  return {
@@ -152296,8 +152246,8 @@ ${lanes.join("\n")}
152296
152246
  if (!skipOutputs || outputs.length !== skipOutputs.size) {
152297
152247
  let reportVerbose = !!state.options.verbose;
152298
152248
  for (const file of outputs) {
152299
- const path3 = toPath2(state, file);
152300
- if (skipOutputs == null ? void 0 : skipOutputs.has(path3)) continue;
152249
+ const path4 = toPath2(state, file);
152250
+ if (skipOutputs == null ? void 0 : skipOutputs.has(path4)) continue;
152301
152251
  if (reportVerbose) {
152302
152252
  reportVerbose = false;
152303
152253
  reportStatus(state, verboseMessage, proj.options.configFilePath);
@@ -152305,8 +152255,8 @@ ${lanes.join("\n")}
152305
152255
  host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
152306
152256
  if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
152307
152257
  else if (outputTimeStampMap) {
152308
- outputTimeStampMap.set(path3, now);
152309
- modifiedOutputs.add(path3);
152258
+ outputTimeStampMap.set(path4, now);
152259
+ modifiedOutputs.add(path4);
152310
152260
  }
152311
152261
  }
152312
152262
  }
@@ -152734,8 +152684,8 @@ ${lanes.join("\n")}
152734
152684
  close: () => stopWatching(state)
152735
152685
  };
152736
152686
  }
152737
- function relName(state, path3) {
152738
- return convertToRelativePath(path3, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
152687
+ function relName(state, path4) {
152688
+ return convertToRelativePath(path4, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
152739
152689
  }
152740
152690
  function reportStatus(state, message, ...args) {
152741
152691
  state.host.reportSolutionBuilderStatus(createCompilerDiagnostic(message, ...args));
@@ -152954,13 +152904,13 @@ ${lanes.join("\n")}
152954
152904
  } else if (file.isDeclarationFile) {
152955
152905
  return "Definitions";
152956
152906
  }
152957
- const path3 = file.path;
152958
- if (fileExtensionIsOneOf(path3, supportedTSExtensionsFlat)) {
152907
+ const path4 = file.path;
152908
+ if (fileExtensionIsOneOf(path4, supportedTSExtensionsFlat)) {
152959
152909
  return "TypeScript";
152960
- } else if (fileExtensionIsOneOf(path3, supportedJSExtensionsFlat)) {
152910
+ } else if (fileExtensionIsOneOf(path4, supportedJSExtensionsFlat)) {
152961
152911
  return "JavaScript";
152962
152912
  } else if (fileExtensionIs(
152963
- path3,
152913
+ path4,
152964
152914
  ".json"
152965
152915
  /* Json */
152966
152916
  )) {
@@ -153572,7 +153522,7 @@ ${lanes.join("\n")}
153572
153522
  );
153573
153523
  }
153574
153524
  }
153575
- const commandLine = parseCommandLine(commandLineArgs, (path3) => system.readFile(path3));
153525
+ const commandLine = parseCommandLine(commandLineArgs, (path4) => system.readFile(path4));
153576
153526
  if (commandLine.options.generateCpuProfile && system.enableCPUProfiler) {
153577
153527
  system.enableCPUProfiler(commandLine.options.generateCpuProfile, () => executeCommandLineWorker(
153578
153528
  system,
@@ -155448,12 +155398,12 @@ ${lanes.join("\n")}
155448
155398
  return nodeCoreModules.has(moduleName) ? "node" : moduleName;
155449
155399
  }
155450
155400
  function loadSafeList(host, safeListPath) {
155451
- const result = readConfigFile(safeListPath, (path3) => host.readFile(path3));
155401
+ const result = readConfigFile(safeListPath, (path4) => host.readFile(path4));
155452
155402
  return new Map(Object.entries(result.config));
155453
155403
  }
155454
155404
  function loadTypesMap(host, typesMapPath) {
155455
155405
  var _a;
155456
- const result = readConfigFile(typesMapPath, (path3) => host.readFile(path3));
155406
+ const result = readConfigFile(typesMapPath, (path4) => host.readFile(path4));
155457
155407
  if ((_a = result.config) == null ? void 0 : _a.simpleMap) {
155458
155408
  return new Map(Object.entries(result.config.simpleMap));
155459
155409
  }
@@ -155465,9 +155415,9 @@ ${lanes.join("\n")}
155465
155415
  }
155466
155416
  const inferredTypings = /* @__PURE__ */ new Map();
155467
155417
  fileNames = mapDefined(fileNames, (fileName) => {
155468
- const path3 = normalizePath(fileName);
155469
- if (hasJSFileExtension(path3)) {
155470
- return path3;
155418
+ const path4 = normalizePath(fileName);
155419
+ if (hasJSFileExtension(path4)) {
155420
+ return path4;
155471
155421
  }
155472
155422
  });
155473
155423
  const filesToWatch = [];
@@ -155529,7 +155479,7 @@ ${lanes.join("\n")}
155529
155479
  let manifestTypingNames;
155530
155480
  if (host.fileExists(manifestPath)) {
155531
155481
  filesToWatch2.push(manifestPath);
155532
- manifest = readConfigFile(manifestPath, (path3) => host.readFile(path3)).config;
155482
+ manifest = readConfigFile(manifestPath, (path4) => host.readFile(path4)).config;
155533
155483
  manifestTypingNames = flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], getOwnKeys);
155534
155484
  addInferredTypings(manifestTypingNames, `Typing names in '${manifestPath}' dependencies`);
155535
155485
  }
@@ -155563,7 +155513,7 @@ ${lanes.join("\n")}
155563
155513
  if (log) log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`);
155564
155514
  for (const manifestPath2 of dependencyManifestNames) {
155565
155515
  const normalizedFileName = normalizePath(manifestPath2);
155566
- const result2 = readConfigFile(normalizedFileName, (path3) => host.readFile(path3));
155516
+ const result2 = readConfigFile(normalizedFileName, (path4) => host.readFile(path4));
155567
155517
  const manifest2 = result2.config;
155568
155518
  if (!manifest2.name) {
155569
155519
  continue;
@@ -158343,14 +158293,14 @@ ${lanes.join("\n")}
158343
158293
  function tryGetDirectories(host, directoryName) {
158344
158294
  return tryIOAndConsumeErrors(host, host.getDirectories, directoryName) || [];
158345
158295
  }
158346
- function tryReadDirectory(host, path3, extensions, exclude, include) {
158347
- return tryIOAndConsumeErrors(host, host.readDirectory, path3, extensions, exclude, include) || emptyArray;
158296
+ function tryReadDirectory(host, path4, extensions, exclude, include) {
158297
+ return tryIOAndConsumeErrors(host, host.readDirectory, path4, extensions, exclude, include) || emptyArray;
158348
158298
  }
158349
- function tryFileExists(host, path3) {
158350
- return tryIOAndConsumeErrors(host, host.fileExists, path3);
158299
+ function tryFileExists(host, path4) {
158300
+ return tryIOAndConsumeErrors(host, host.fileExists, path4);
158351
158301
  }
158352
- function tryDirectoryExists(host, path3) {
158353
- return tryAndIgnoreErrors(() => directoryProbablyExists(path3, host)) || false;
158302
+ function tryDirectoryExists(host, path4) {
158303
+ return tryAndIgnoreErrors(() => directoryProbablyExists(path4, host)) || false;
158354
158304
  }
158355
158305
  function tryAndIgnoreErrors(cb) {
158356
158306
  try {
@@ -159192,13 +159142,13 @@ ${lanes.join("\n")}
159192
159142
  function getIsExcluded(excludePatterns, host) {
159193
159143
  var _a;
159194
159144
  const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
159195
- return ({ fileName, path: path3 }) => {
159145
+ return ({ fileName, path: path4 }) => {
159196
159146
  if (excludePatterns.some((p2) => p2.test(fileName))) return true;
159197
159147
  if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {
159198
159148
  let dir = getDirectoryPath(fileName);
159199
159149
  return forEachAncestorDirectoryStoppingAtGlobalCache(
159200
159150
  host,
159201
- getDirectoryPath(path3),
159151
+ getDirectoryPath(path4),
159202
159152
  (dirPath) => {
159203
159153
  const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));
159204
159154
  if (symlinks) {
@@ -160854,14 +160804,14 @@ ${lanes.join("\n")}
160854
160804
  return settingsOrHost;
160855
160805
  }
160856
160806
  function acquireDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160857
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
160807
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
160858
160808
  const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
160859
- return acquireDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160809
+ return acquireDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160860
160810
  }
160861
- function acquireDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160811
+ function acquireDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160862
160812
  return acquireOrUpdateDocument(
160863
160813
  fileName,
160864
- path3,
160814
+ path4,
160865
160815
  compilationSettings,
160866
160816
  key,
160867
160817
  scriptSnapshot,
@@ -160873,14 +160823,14 @@ ${lanes.join("\n")}
160873
160823
  );
160874
160824
  }
160875
160825
  function updateDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160876
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
160826
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
160877
160827
  const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
160878
- return updateDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160828
+ return updateDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160879
160829
  }
160880
- function updateDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160830
+ function updateDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160881
160831
  return acquireOrUpdateDocument(
160882
160832
  fileName,
160883
- path3,
160833
+ path4,
160884
160834
  getCompilationSettings(compilationSettings),
160885
160835
  key,
160886
160836
  scriptSnapshot,
@@ -160896,7 +160846,7 @@ ${lanes.join("\n")}
160896
160846
  Debug.assert(scriptKind === void 0 || !entry || entry.sourceFile.scriptKind === scriptKind, `Script kind should match provided ScriptKind:${scriptKind} and sourceFile.scriptKind: ${entry == null ? void 0 : entry.sourceFile.scriptKind}, !entry: ${!entry}`);
160897
160847
  return entry;
160898
160848
  }
160899
- function acquireOrUpdateDocument(fileName, path3, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) {
160849
+ function acquireOrUpdateDocument(fileName, path4, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) {
160900
160850
  var _a, _b, _c, _d;
160901
160851
  scriptKind = ensureScriptKind(fileName, scriptKind);
160902
160852
  const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
@@ -160904,7 +160854,7 @@ ${lanes.join("\n")}
160904
160854
  const scriptTarget = scriptKind === 6 ? 100 : getEmitScriptTarget(compilationSettings);
160905
160855
  const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
160906
160856
  languageVersion: scriptTarget,
160907
- impliedNodeFormat: host && getImpliedNodeFormatForFile(path3, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings),
160857
+ impliedNodeFormat: host && getImpliedNodeFormatForFile(path4, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings),
160908
160858
  setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
160909
160859
  jsDocParsingMode
160910
160860
  };
@@ -160917,15 +160867,15 @@ ${lanes.join("\n")}
160917
160867
  if (buckets.size > oldBucketCount) {
160918
160868
  tracing.instant(tracing.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: keyWithMode });
160919
160869
  }
160920
- const otherBucketKey = !isDeclarationFileName(path3) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path3) && bucketKey);
160870
+ const otherBucketKey = !isDeclarationFileName(path4) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path4) && bucketKey);
160921
160871
  if (otherBucketKey) {
160922
- tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path3, key1: otherBucketKey, key2: keyWithMode });
160872
+ tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path4, key1: otherBucketKey, key2: keyWithMode });
160923
160873
  }
160924
160874
  }
160925
- const bucketEntry = bucket.get(path3);
160875
+ const bucketEntry = bucket.get(path4);
160926
160876
  let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
160927
160877
  if (!entry && externalCache) {
160928
- const sourceFile = externalCache.getDocument(keyWithMode, path3);
160878
+ const sourceFile = externalCache.getDocument(keyWithMode, path4);
160929
160879
  if (sourceFile && sourceFile.scriptKind === scriptKind && sourceFile.text === getSnapshotText(scriptSnapshot)) {
160930
160880
  Debug.assert(acquiring);
160931
160881
  entry = {
@@ -160946,7 +160896,7 @@ ${lanes.join("\n")}
160946
160896
  scriptKind
160947
160897
  );
160948
160898
  if (externalCache) {
160949
- externalCache.setDocument(keyWithMode, path3, sourceFile);
160899
+ externalCache.setDocument(keyWithMode, path4, sourceFile);
160950
160900
  }
160951
160901
  entry = {
160952
160902
  sourceFile,
@@ -160957,7 +160907,7 @@ ${lanes.join("\n")}
160957
160907
  if (entry.sourceFile.version !== version2) {
160958
160908
  entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version2, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot));
160959
160909
  if (externalCache) {
160960
- externalCache.setDocument(keyWithMode, path3, entry.sourceFile);
160910
+ externalCache.setDocument(keyWithMode, path4, entry.sourceFile);
160961
160911
  }
160962
160912
  }
160963
160913
  if (acquiring) {
@@ -160968,35 +160918,35 @@ ${lanes.join("\n")}
160968
160918
  return entry.sourceFile;
160969
160919
  function setBucketEntry() {
160970
160920
  if (!bucketEntry) {
160971
- bucket.set(path3, entry);
160921
+ bucket.set(path4, entry);
160972
160922
  } else if (isDocumentRegistryEntry(bucketEntry)) {
160973
160923
  const scriptKindMap = /* @__PURE__ */ new Map();
160974
160924
  scriptKindMap.set(bucketEntry.sourceFile.scriptKind, bucketEntry);
160975
160925
  scriptKindMap.set(scriptKind, entry);
160976
- bucket.set(path3, scriptKindMap);
160926
+ bucket.set(path4, scriptKindMap);
160977
160927
  } else {
160978
160928
  bucketEntry.set(scriptKind, entry);
160979
160929
  }
160980
160930
  }
160981
160931
  }
160982
160932
  function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {
160983
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
160933
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
160984
160934
  const key = getKeyForCompilationSettings(compilationSettings);
160985
- return releaseDocumentWithKey(path3, key, scriptKind, impliedNodeFormat);
160935
+ return releaseDocumentWithKey(path4, key, scriptKind, impliedNodeFormat);
160986
160936
  }
160987
- function releaseDocumentWithKey(path3, key, scriptKind, impliedNodeFormat) {
160937
+ function releaseDocumentWithKey(path4, key, scriptKind, impliedNodeFormat) {
160988
160938
  const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key, impliedNodeFormat)));
160989
- const bucketEntry = bucket.get(path3);
160939
+ const bucketEntry = bucket.get(path4);
160990
160940
  const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);
160991
160941
  entry.languageServiceRefCount--;
160992
160942
  Debug.assert(entry.languageServiceRefCount >= 0);
160993
160943
  if (entry.languageServiceRefCount === 0) {
160994
160944
  if (isDocumentRegistryEntry(bucketEntry)) {
160995
- bucket.delete(path3);
160945
+ bucket.delete(path4);
160996
160946
  } else {
160997
160947
  bucketEntry.delete(scriptKind);
160998
160948
  if (bucketEntry.size === 1) {
160999
- bucket.set(path3, firstDefinedIterator(bucketEntry.values(), identity));
160949
+ bucket.set(path4, firstDefinedIterator(bucketEntry.values(), identity));
161000
160950
  }
161001
160951
  }
161002
160952
  }
@@ -161032,10 +160982,10 @@ ${lanes.join("\n")}
161032
160982
  }
161033
160983
  function getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) {
161034
160984
  const canonicalOldPath = getCanonicalFileName(oldFileOrDirPath);
161035
- return (path3) => {
161036
- const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path3, pos: 0 });
161037
- const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path3);
161038
- return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path3, getCanonicalFileName) : updatedPath;
160985
+ return (path4) => {
160986
+ const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path4, pos: 0 });
160987
+ const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path4);
160988
+ return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path4, getCanonicalFileName) : updatedPath;
161039
160989
  };
161040
160990
  function getUpdatedPath(pathToUpdate) {
161041
160991
  if (getCanonicalFileName(pathToUpdate) === canonicalOldPath) return newFileOrDirPath;
@@ -161111,10 +161061,10 @@ ${lanes.join("\n")}
161111
161061
  }
161112
161062
  return false;
161113
161063
  }
161114
- function relativePath(path3) {
161064
+ function relativePath(path4) {
161115
161065
  return getRelativePathFromDirectory(
161116
161066
  configDir,
161117
- path3,
161067
+ path4,
161118
161068
  /*ignoreCase*/
161119
161069
  !useCaseSensitiveFileNames2
161120
161070
  );
@@ -161922,8 +161872,8 @@ ${lanes.join("\n")}
161922
161872
  return toPath(fileName, currentDirectory, getCanonicalFileName);
161923
161873
  }
161924
161874
  function getDocumentPositionMapper2(generatedFileName, sourceFileName) {
161925
- const path3 = toPath3(generatedFileName);
161926
- const value = documentPositionMappers.get(path3);
161875
+ const path4 = toPath3(generatedFileName);
161876
+ const value = documentPositionMappers.get(path4);
161927
161877
  if (value) return value;
161928
161878
  let mapper;
161929
161879
  if (host.getDocumentPositionMapper) {
@@ -161937,7 +161887,7 @@ ${lanes.join("\n")}
161937
161887
  (f) => !host.fileExists || host.fileExists(f) ? host.readFile(f) : void 0
161938
161888
  );
161939
161889
  }
161940
- documentPositionMappers.set(path3, mapper || identitySourceMapConsumer);
161890
+ documentPositionMappers.set(path4, mapper || identitySourceMapConsumer);
161941
161891
  return mapper || identitySourceMapConsumer;
161942
161892
  }
161943
161893
  function tryGetSourcePosition(info) {
@@ -161965,21 +161915,21 @@ ${lanes.join("\n")}
161965
161915
  function getSourceFile(fileName) {
161966
161916
  const program2 = host.getProgram();
161967
161917
  if (!program2) return void 0;
161968
- const path3 = toPath3(fileName);
161969
- const file = program2.getSourceFileByPath(path3);
161970
- return file && file.resolvedPath === path3 ? file : void 0;
161918
+ const path4 = toPath3(fileName);
161919
+ const file = program2.getSourceFileByPath(path4);
161920
+ return file && file.resolvedPath === path4 ? file : void 0;
161971
161921
  }
161972
161922
  function getOrCreateSourceFileLike(fileName) {
161973
- const path3 = toPath3(fileName);
161974
- const fileFromCache = sourceFileLike.get(path3);
161923
+ const path4 = toPath3(fileName);
161924
+ const fileFromCache = sourceFileLike.get(path4);
161975
161925
  if (fileFromCache !== void 0) return fileFromCache ? fileFromCache : void 0;
161976
161926
  if (!host.readFile || host.fileExists && !host.fileExists(fileName)) {
161977
- sourceFileLike.set(path3, false);
161927
+ sourceFileLike.set(path4, false);
161978
161928
  return void 0;
161979
161929
  }
161980
161930
  const text2 = host.readFile(fileName);
161981
161931
  const file = text2 ? createSourceFileLike(text2) : false;
161982
- sourceFileLike.set(path3, file);
161932
+ sourceFileLike.set(path4, file);
161983
161933
  return file ? file : void 0;
161984
161934
  }
161985
161935
  function getSourceFileLike(fileName) {
@@ -170065,12 +170015,12 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170065
170015
  directoryExists: (directoryName) => {
170066
170016
  return directoryProbablyExists(directoryName, host);
170067
170017
  },
170068
- getDirectories: (path3) => {
170069
- return host.getDirectories ? host.getDirectories(path3) : [];
170018
+ getDirectories: (path4) => {
170019
+ return host.getDirectories ? host.getDirectories(path4) : [];
170070
170020
  },
170071
- readDirectory: (path3, extensions, exclude, include, depth) => {
170021
+ readDirectory: (path4, extensions, exclude, include, depth) => {
170072
170022
  Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
170073
- return host.readDirectory(path3, extensions, exclude, include, depth);
170023
+ return host.readDirectory(path4, extensions, exclude, include, depth);
170074
170024
  },
170075
170025
  onReleaseOldSourceFile,
170076
170026
  onReleaseParsedCommandLine,
@@ -170133,11 +170083,11 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170133
170083
  program2.getTypeChecker();
170134
170084
  return;
170135
170085
  function getParsedCommandLine(fileName) {
170136
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
170137
- const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path3);
170086
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
170087
+ const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path4);
170138
170088
  if (existing !== void 0) return existing || void 0;
170139
170089
  const result = host.getParsedCommandLine ? host.getParsedCommandLine(fileName) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName);
170140
- (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path3, result || false);
170090
+ (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path4, result || false);
170141
170091
  return result;
170142
170092
  }
170143
170093
  function getParsedCommandLineOfConfigFileUsingSourceFile(configFileName) {
@@ -170179,7 +170129,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170179
170129
  function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
170180
170130
  return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile);
170181
170131
  }
170182
- function getOrCreateSourceFileByPath(fileName, path3, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
170132
+ function getOrCreateSourceFileByPath(fileName, path4, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
170183
170133
  Debug.assert(compilerHost, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
170184
170134
  const scriptSnapshot = host.getScriptSnapshot(fileName);
170185
170135
  if (!scriptSnapshot) {
@@ -170188,17 +170138,17 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170188
170138
  const scriptKind = getScriptKind(fileName, host);
170189
170139
  const scriptVersion = host.getScriptVersion(fileName);
170190
170140
  if (!shouldCreateNewSourceFile) {
170191
- const oldSourceFile = program2 && program2.getSourceFileByPath(path3);
170141
+ const oldSourceFile = program2 && program2.getSourceFileByPath(path4);
170192
170142
  if (oldSourceFile) {
170193
170143
  if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds.has(oldSourceFile.resolvedPath)) {
170194
- return documentRegistry.updateDocumentWithKey(fileName, path3, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170144
+ return documentRegistry.updateDocumentWithKey(fileName, path4, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170195
170145
  } else {
170196
170146
  documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program2.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat);
170197
170147
  releasedScriptKinds.add(oldSourceFile.resolvedPath);
170198
170148
  }
170199
170149
  }
170200
170150
  }
170201
- return documentRegistry.acquireDocumentWithKey(fileName, path3, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170151
+ return documentRegistry.acquireDocumentWithKey(fileName, path4, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170202
170152
  }
170203
170153
  }
170204
170154
  function getProgram() {
@@ -170804,7 +170754,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170804
170754
  return isArray(action) ? Promise.all(action.map((a) => applySingleCodeActionCommand(a))) : applySingleCodeActionCommand(action);
170805
170755
  }
170806
170756
  function applySingleCodeActionCommand(action) {
170807
- const getPath2 = (path3) => toPath(path3, currentDirectory, getCanonicalFileName);
170757
+ const getPath2 = (path4) => toPath(path4, currentDirectory, getCanonicalFileName);
170808
170758
  Debug.assertEqual(action.type, "install package");
170809
170759
  return host.installPackage ? host.installPackage({ fileName: getPath2(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
170810
170760
  }
@@ -171148,8 +171098,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
171148
171098
  function isLetterOrDigit(char) {
171149
171099
  return char >= 97 && char <= 122 || char >= 65 && char <= 90 || char >= 48 && char <= 57;
171150
171100
  }
171151
- function isNodeModulesFile(path3) {
171152
- return path3.includes("/node_modules/");
171101
+ function isNodeModulesFile(path4) {
171102
+ return path4.includes("/node_modules/");
171153
171103
  }
171154
171104
  }
171155
171105
  function getRenameInfo2(fileName, position, preferences) {
@@ -184783,11 +184733,11 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
184783
184733
  }
184784
184734
  });
184785
184735
  }
184786
- function generateJSDocParamTagsForDestructuring(path3, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
184736
+ function generateJSDocParamTagsForDestructuring(path4, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
184787
184737
  if (!isJs) {
184788
184738
  return [
184789
184739
  getJSDocParamAnnotation(
184790
- path3,
184740
+ path4,
184791
184741
  initializer,
184792
184742
  dotDotDotToken,
184793
184743
  isJs,
@@ -184801,7 +184751,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
184801
184751
  )
184802
184752
  ];
184803
184753
  }
184804
- return patternWorker(path3, pattern, initializer, dotDotDotToken, { tabstop: 1 });
184754
+ return patternWorker(path4, pattern, initializer, dotDotDotToken, { tabstop: 1 });
184805
184755
  function patternWorker(path22, pattern2, initializer2, dotDotDotToken2, counter) {
184806
184756
  if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) {
184807
184757
  const oldTabstop = counter.tabstop;
@@ -189424,21 +189374,21 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189424
189374
  function getFragmentDirectory(fragment) {
189425
189375
  return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;
189426
189376
  }
189427
- function getCompletionsForPathMapping(path3, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program2, host, moduleSpecifierResolutionHost) {
189428
- const parsedPath = tryParsePattern(path3);
189377
+ function getCompletionsForPathMapping(path4, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program2, host, moduleSpecifierResolutionHost) {
189378
+ const parsedPath = tryParsePattern(path4);
189429
189379
  if (!parsedPath) {
189430
189380
  return emptyArray;
189431
189381
  }
189432
189382
  if (typeof parsedPath === "string") {
189433
189383
  return justPathMappingName(
189434
- path3,
189384
+ path4,
189435
189385
  "script"
189436
189386
  /* scriptElement */
189437
189387
  );
189438
189388
  }
189439
189389
  const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);
189440
189390
  if (remainingFragment === void 0) {
189441
- const starIsFullPathComponent = endsWith(path3, "/*");
189391
+ const starIsFullPathComponent = endsWith(path4, "/*");
189442
189392
  return starIsFullPathComponent ? justPathMappingName(
189443
189393
  parsedPath.prefix,
189444
189394
  "directory"
@@ -189524,9 +189474,9 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189524
189474
  function getDirectoryMatches(directoryName) {
189525
189475
  return mapDefined(tryGetDirectories(host, directoryName), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir));
189526
189476
  }
189527
- function trimPrefixAndSuffix(path3, prefix) {
189477
+ function trimPrefixAndSuffix(path4, prefix) {
189528
189478
  return firstDefined(matchingSuffixes, (suffix) => {
189529
- const inner = withoutStartAndEnd(normalizePath(path3), prefix, suffix);
189479
+ const inner = withoutStartAndEnd(normalizePath(path4), prefix, suffix);
189530
189480
  return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner);
189531
189481
  });
189532
189482
  }
@@ -189534,8 +189484,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189534
189484
  function withoutStartAndEnd(s2, start, end) {
189535
189485
  return startsWith(s2, start) && endsWith(s2, end) ? s2.slice(start.length, s2.length - end.length) : void 0;
189536
189486
  }
189537
- function removeLeadingDirectorySeparator(path3) {
189538
- return path3[0] === directorySeparator ? path3.slice(1) : path3;
189487
+ function removeLeadingDirectorySeparator(path4) {
189488
+ return path4[0] === directorySeparator ? path4.slice(1) : path4;
189539
189489
  }
189540
189490
  function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
189541
189491
  const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
@@ -189650,10 +189600,10 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189650
189600
  /* ESNext */
189651
189601
  ) ? void 0 : createTextSpan(textStart + offset, length2);
189652
189602
  }
189653
- function isPathRelativeToScript(path3) {
189654
- if (path3 && path3.length >= 2 && path3.charCodeAt(0) === 46) {
189655
- const slashIndex = path3.length >= 3 && path3.charCodeAt(1) === 46 ? 2 : 1;
189656
- const slashCharCode = path3.charCodeAt(slashIndex);
189603
+ function isPathRelativeToScript(path4) {
189604
+ if (path4 && path4.length >= 2 && path4.charCodeAt(0) === 46) {
189605
+ const slashIndex = path4.length >= 3 && path4.charCodeAt(1) === 46 ? 2 : 1;
189606
+ const slashCharCode = path4.charCodeAt(slashIndex);
189657
189607
  return slashCharCode === 47 || slashCharCode === 92;
189658
189608
  }
189659
189609
  return false;
@@ -205624,17 +205574,17 @@ ${options.prefix}` : "\n" : options.prefix
205624
205574
  function createNormalizedPathMap() {
205625
205575
  const map2 = /* @__PURE__ */ new Map();
205626
205576
  return {
205627
- get(path3) {
205628
- return map2.get(path3);
205577
+ get(path4) {
205578
+ return map2.get(path4);
205629
205579
  },
205630
- set(path3, value) {
205631
- map2.set(path3, value);
205580
+ set(path4, value) {
205581
+ map2.set(path4, value);
205632
205582
  },
205633
- contains(path3) {
205634
- return map2.has(path3);
205583
+ contains(path4) {
205584
+ return map2.has(path4);
205635
205585
  },
205636
- remove(path3) {
205637
- map2.delete(path3);
205586
+ remove(path4) {
205587
+ map2.delete(path4);
205638
205588
  }
205639
205589
  };
205640
205590
  }
@@ -206147,12 +206097,12 @@ ${options.prefix}` : "\n" : options.prefix
206147
206097
  return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
206148
206098
  }
206149
206099
  var ScriptInfo = class {
206150
- constructor(host, fileName, scriptKind, hasMixedContent, path3, initialVersion) {
206100
+ constructor(host, fileName, scriptKind, hasMixedContent, path4, initialVersion) {
206151
206101
  this.host = host;
206152
206102
  this.fileName = fileName;
206153
206103
  this.scriptKind = scriptKind;
206154
206104
  this.hasMixedContent = hasMixedContent;
206155
- this.path = path3;
206105
+ this.path = path4;
206156
206106
  this.containingProjects = [];
206157
206107
  this.isDynamic = isDynamicFileName(fileName);
206158
206108
  this.textStorage = new TextStorage(host, this, initialVersion);
@@ -206787,8 +206737,8 @@ ${options.prefix}` : "\n" : options.prefix
206787
206737
  useCaseSensitiveFileNames() {
206788
206738
  return this.projectService.host.useCaseSensitiveFileNames;
206789
206739
  }
206790
- readDirectory(path3, extensions, exclude, include, depth) {
206791
- return this.directoryStructureHost.readDirectory(path3, extensions, exclude, include, depth);
206740
+ readDirectory(path4, extensions, exclude, include, depth) {
206741
+ return this.directoryStructureHost.readDirectory(path4, extensions, exclude, include, depth);
206792
206742
  }
206793
206743
  readFile(fileName) {
206794
206744
  return this.projectService.host.readFile(fileName);
@@ -206797,8 +206747,8 @@ ${options.prefix}` : "\n" : options.prefix
206797
206747
  return this.projectService.host.writeFile(fileName, content);
206798
206748
  }
206799
206749
  fileExists(file) {
206800
- const path3 = this.toPath(file);
206801
- return !!this.projectService.getScriptInfoForPath(path3) || !this.isWatchedMissingFile(path3) && this.directoryStructureHost.fileExists(file);
206750
+ const path4 = this.toPath(file);
206751
+ return !!this.projectService.getScriptInfoForPath(path4) || !this.isWatchedMissingFile(path4) && this.directoryStructureHost.fileExists(file);
206802
206752
  }
206803
206753
  /** @internal */
206804
206754
  resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
@@ -206823,11 +206773,11 @@ ${options.prefix}` : "\n" : options.prefix
206823
206773
  resolveLibrary(libraryName, resolveFrom, options, libFileName) {
206824
206774
  return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName);
206825
206775
  }
206826
- directoryExists(path3) {
206827
- return this.directoryStructureHost.directoryExists(path3);
206776
+ directoryExists(path4) {
206777
+ return this.directoryStructureHost.directoryExists(path4);
206828
206778
  }
206829
- getDirectories(path3) {
206830
- return this.directoryStructureHost.getDirectories(path3);
206779
+ getDirectories(path4) {
206780
+ return this.directoryStructureHost.getDirectories(path4);
206831
206781
  }
206832
206782
  /** @internal */
206833
206783
  getCachedDirectoryStructureHost() {
@@ -207090,16 +207040,16 @@ ${options.prefix}` : "\n" : options.prefix
207090
207040
  }
207091
207041
  }));
207092
207042
  }
207093
- getSourceFile(path3) {
207043
+ getSourceFile(path4) {
207094
207044
  if (!this.program) {
207095
207045
  return void 0;
207096
207046
  }
207097
- return this.program.getSourceFileByPath(path3);
207047
+ return this.program.getSourceFileByPath(path4);
207098
207048
  }
207099
207049
  /** @internal */
207100
- getSourceFileOrConfigFile(path3) {
207050
+ getSourceFileOrConfigFile(path4) {
207101
207051
  const options = this.program.getCompilerOptions();
207102
- return path3 === options.configFilePath ? options.configFile : this.getSourceFile(path3);
207052
+ return path4 === options.configFilePath ? options.configFile : this.getSourceFile(path4);
207103
207053
  }
207104
207054
  close() {
207105
207055
  var _a;
@@ -207276,8 +207226,8 @@ ${options.prefix}` : "\n" : options.prefix
207276
207226
  }
207277
207227
  // add a root file that doesnt exist on host
207278
207228
  addMissingFileRoot(fileName) {
207279
- const path3 = this.projectService.toPath(fileName);
207280
- this.rootFilesMap.set(path3, { fileName });
207229
+ const path4 = this.projectService.toPath(fileName);
207230
+ this.rootFilesMap.set(path4, { fileName });
207281
207231
  this.markAsDirty();
207282
207232
  }
207283
207233
  removeFile(info, fileExists, detachFromProject) {
@@ -207443,22 +207393,22 @@ ${options.prefix}` : "\n" : options.prefix
207443
207393
  const toRemove = new Map(this.typingWatchers);
207444
207394
  if (!this.typingWatchers) this.typingWatchers = /* @__PURE__ */ new Map();
207445
207395
  this.typingWatchers.isInvoked = false;
207446
- const createProjectWatcher = (path3, typingsWatcherType) => {
207447
- const canonicalPath = this.toPath(path3);
207396
+ const createProjectWatcher = (path4, typingsWatcherType) => {
207397
+ const canonicalPath = this.toPath(path4);
207448
207398
  toRemove.delete(canonicalPath);
207449
207399
  if (!this.typingWatchers.has(canonicalPath)) {
207450
207400
  const watchType = typingsWatcherType === "FileWatcher" ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory;
207451
207401
  this.typingWatchers.set(
207452
207402
  canonicalPath,
207453
207403
  canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === "FileWatcher" ? this.projectService.watchFactory.watchFile(
207454
- path3,
207404
+ path4,
207455
207405
  () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`),
207456
207406
  2e3,
207457
207407
  this.projectService.getWatchOptions(this),
207458
207408
  watchType,
207459
207409
  this
207460
207410
  ) : this.projectService.watchFactory.watchDirectory(
207461
- path3,
207411
+ path4,
207462
207412
  (f) => {
207463
207413
  if (this.typingWatchers.isInvoked) return this.writeLog(`TypingWatchers already invoked`);
207464
207414
  if (!fileExtensionIs(
@@ -207473,7 +207423,7 @@ ${options.prefix}` : "\n" : options.prefix
207473
207423
  this.projectService.getWatchOptions(this),
207474
207424
  watchType,
207475
207425
  this
207476
- ) : (this.writeLog(`Skipping watcher creation at ${path3}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher)
207426
+ ) : (this.writeLog(`Skipping watcher creation at ${path4}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher)
207477
207427
  );
207478
207428
  }
207479
207429
  };
@@ -207518,9 +207468,9 @@ ${options.prefix}` : "\n" : options.prefix
207518
207468
  /* DirectoryWatcher */
207519
207469
  );
207520
207470
  }
207521
- toRemove.forEach((watch, path3) => {
207471
+ toRemove.forEach((watch, path4) => {
207522
207472
  watch.close();
207523
- this.typingWatchers.delete(path3);
207473
+ this.typingWatchers.delete(path4);
207524
207474
  });
207525
207475
  }
207526
207476
  /** @internal */
@@ -207554,9 +207504,9 @@ ${options.prefix}` : "\n" : options.prefix
207554
207504
  let hasNewProgram = false;
207555
207505
  if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2)) {
207556
207506
  hasNewProgram = true;
207557
- this.rootFilesMap.forEach((value, path3) => {
207507
+ this.rootFilesMap.forEach((value, path4) => {
207558
207508
  var _a2;
207559
- const file = this.program.getSourceFileByPath(path3);
207509
+ const file = this.program.getSourceFileByPath(path4);
207560
207510
  const info = value.info;
207561
207511
  if (!file || ((_a2 = value.info) == null ? void 0 : _a2.path) === file.resolvedPath) return;
207562
207512
  value.info = this.projectService.getScriptInfo(file.fileName);
@@ -207712,8 +207662,8 @@ ${options.prefix}` : "\n" : options.prefix
207712
207662
  );
207713
207663
  return fileWatcher;
207714
207664
  }
207715
- isWatchedMissingFile(path3) {
207716
- return !!this.missingFilesMap && this.missingFilesMap.has(path3);
207665
+ isWatchedMissingFile(path4) {
207666
+ return !!this.missingFilesMap && this.missingFilesMap.has(path4);
207717
207667
  }
207718
207668
  /** @internal */
207719
207669
  addGeneratedFileWatch(generatedFile, sourceFile) {
@@ -207722,17 +207672,17 @@ ${options.prefix}` : "\n" : options.prefix
207722
207672
  this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile);
207723
207673
  }
207724
207674
  } else {
207725
- const path3 = this.toPath(sourceFile);
207675
+ const path4 = this.toPath(sourceFile);
207726
207676
  if (this.generatedFilesMap) {
207727
207677
  if (isGeneratedFileWatcher(this.generatedFilesMap)) {
207728
207678
  Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);
207729
207679
  return;
207730
207680
  }
207731
- if (this.generatedFilesMap.has(path3)) return;
207681
+ if (this.generatedFilesMap.has(path4)) return;
207732
207682
  } else {
207733
207683
  this.generatedFilesMap = /* @__PURE__ */ new Map();
207734
207684
  }
207735
- this.generatedFilesMap.set(path3, this.createGeneratedFileWatcher(generatedFile));
207685
+ this.generatedFilesMap.set(path4, this.createGeneratedFileWatcher(generatedFile));
207736
207686
  }
207737
207687
  }
207738
207688
  createGeneratedFileWatcher(generatedFile) {
@@ -208132,7 +208082,7 @@ ${options.prefix}` : "\n" : options.prefix
208132
208082
  isDefaultProjectForOpenFiles() {
208133
208083
  return !!forEachEntry(
208134
208084
  this.projectService.openFiles,
208135
- (_projectRootPath, path3) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path3)) === this
208085
+ (_projectRootPath, path4) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path4)) === this
208136
208086
  );
208137
208087
  }
208138
208088
  /** @internal */
@@ -209306,33 +209256,33 @@ ${options.prefix}` : "\n" : options.prefix
209306
209256
  getCurrentDirectory: () => service.host.getCurrentDirectory(),
209307
209257
  useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames
209308
209258
  };
209309
- function watchFile2(path3, callback) {
209259
+ function watchFile2(path4, callback) {
209310
209260
  return getOrCreateFileWatcher(
209311
209261
  watchedFiles,
209312
- path3,
209262
+ path4,
209313
209263
  callback,
209314
- (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path3 } })
209264
+ (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path4 } })
209315
209265
  );
209316
209266
  }
209317
- function watchDirectory(path3, callback, recursive) {
209267
+ function watchDirectory(path4, callback, recursive) {
209318
209268
  return getOrCreateFileWatcher(
209319
209269
  recursive ? watchedDirectoriesRecursive : watchedDirectories,
209320
- path3,
209270
+ path4,
209321
209271
  callback,
209322
209272
  (id) => ({
209323
209273
  eventName: CreateDirectoryWatcherEvent,
209324
209274
  data: {
209325
209275
  id,
209326
- path: path3,
209276
+ path: path4,
209327
209277
  recursive: !!recursive,
209328
209278
  // Special case node_modules as we watch it for changes to closed script infos as well
209329
- ignoreUpdate: !path3.endsWith("/node_modules") ? true : void 0
209279
+ ignoreUpdate: !path4.endsWith("/node_modules") ? true : void 0
209330
209280
  }
209331
209281
  })
209332
209282
  );
209333
209283
  }
209334
- function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path3, callback, event) {
209335
- const key = service.toPath(path3);
209284
+ function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path4, callback, event) {
209285
+ const key = service.toPath(path4);
209336
209286
  let id = pathToId.get(key);
209337
209287
  if (!id) pathToId.set(key, id = ids++);
209338
209288
  let callbacks = idToCallbacks.get(id);
@@ -209501,13 +209451,13 @@ ${options.prefix}` : "\n" : options.prefix
209501
209451
  return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
209502
209452
  }
209503
209453
  /** @internal */
209504
- setDocument(key, path3, sourceFile) {
209505
- const info = Debug.checkDefined(this.getScriptInfoForPath(path3));
209454
+ setDocument(key, path4, sourceFile) {
209455
+ const info = Debug.checkDefined(this.getScriptInfoForPath(path4));
209506
209456
  info.cacheSourceFile = { key, sourceFile };
209507
209457
  }
209508
209458
  /** @internal */
209509
- getDocument(key, path3) {
209510
- const info = this.getScriptInfoForPath(path3);
209459
+ getDocument(key, path4) {
209460
+ const info = this.getScriptInfoForPath(path4);
209511
209461
  return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : void 0;
209512
209462
  }
209513
209463
  /** @internal */
@@ -209629,7 +209579,7 @@ ${options.prefix}` : "\n" : options.prefix
209629
209579
  const event = {
209630
209580
  eventName: ProjectsUpdatedInBackgroundEvent,
209631
209581
  data: {
209632
- openFiles: arrayFrom(this.openFiles.keys(), (path3) => this.getScriptInfoForPath(path3).fileName)
209582
+ openFiles: arrayFrom(this.openFiles.keys(), (path4) => this.getScriptInfoForPath(path4).fileName)
209633
209583
  }
209634
209584
  };
209635
209585
  this.eventHandler(event);
@@ -209851,11 +209801,11 @@ ${options.prefix}` : "\n" : options.prefix
209851
209801
  }
209852
209802
  delayUpdateSourceInfoProjects(sourceInfos) {
209853
209803
  if (sourceInfos) {
209854
- sourceInfos.forEach((_value, path3) => this.delayUpdateProjectsOfScriptInfoPath(path3));
209804
+ sourceInfos.forEach((_value, path4) => this.delayUpdateProjectsOfScriptInfoPath(path4));
209855
209805
  }
209856
209806
  }
209857
- delayUpdateProjectsOfScriptInfoPath(path3) {
209858
- const info = this.getScriptInfoForPath(path3);
209807
+ delayUpdateProjectsOfScriptInfoPath(path4) {
209808
+ const info = this.getScriptInfoForPath(path4);
209859
209809
  if (info) {
209860
209810
  this.delayUpdateProjectGraphs(
209861
209811
  info.containingProjects,
@@ -209949,8 +209899,8 @@ ${options.prefix}` : "\n" : options.prefix
209949
209899
  const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath);
209950
209900
  if (!project) return;
209951
209901
  if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) {
209952
- const path3 = this.toPath(configFileName);
209953
- if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path3)) {
209902
+ const path4 = this.toPath(configFileName);
209903
+ if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path4)) {
209954
209904
  project.markAutoImportProviderAsDirty();
209955
209905
  }
209956
209906
  }
@@ -210005,10 +209955,10 @@ ${options.prefix}` : "\n" : options.prefix
210005
209955
  });
210006
209956
  return;
210007
209957
  }
210008
- const path3 = this.toPath(canonicalConfigFilePath);
210009
- project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path3);
209958
+ const path4 = this.toPath(canonicalConfigFilePath);
209959
+ project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path4);
210010
209960
  this.delayUpdateProjectGraph(project);
210011
- if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path3)) {
209961
+ if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path4)) {
210012
209962
  project.markAutoImportProviderAsDirty();
210013
209963
  }
210014
209964
  }
@@ -210033,20 +209983,20 @@ ${options.prefix}` : "\n" : options.prefix
210033
209983
  canonicalConfigFilePath,
210034
209984
  "Change in config file detected"
210035
209985
  );
210036
- this.openFiles.forEach((_projectRootPath, path3) => {
209986
+ this.openFiles.forEach((_projectRootPath, path4) => {
210037
209987
  var _a, _b;
210038
- const configFileForOpenFile = this.configFileForOpenFiles.get(path3);
210039
- if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path3))) return;
210040
- this.configFileForOpenFiles.delete(path3);
210041
- const info = this.getScriptInfoForPath(path3);
209988
+ const configFileForOpenFile = this.configFileForOpenFiles.get(path4);
209989
+ if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path4))) return;
209990
+ this.configFileForOpenFiles.delete(path4);
209991
+ const info = this.getScriptInfoForPath(path4);
210042
209992
  const newConfigFileNameForInfo = this.getConfigFileNameForFile(
210043
209993
  info,
210044
209994
  /*findFromCacheOnly*/
210045
209995
  false
210046
209996
  );
210047
209997
  if (!newConfigFileNameForInfo) return;
210048
- if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path3))) {
210049
- (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path3, configFileForOpenFile);
209998
+ if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path4))) {
209999
+ (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path4, configFileForOpenFile);
210050
210000
  }
210051
210001
  });
210052
210002
  this.delayEnsureProjectForOpenFiles();
@@ -210141,8 +210091,8 @@ ${options.prefix}` : "\n" : options.prefix
210141
210091
  return project;
210142
210092
  }
210143
210093
  assignOrphanScriptInfosToInferredProject() {
210144
- this.openFiles.forEach((projectRootPath, path3) => {
210145
- const info = this.getScriptInfoForPath(path3);
210094
+ this.openFiles.forEach((projectRootPath, path4) => {
210095
+ const info = this.getScriptInfoForPath(path4);
210146
210096
  if (info.isOrphan()) {
210147
210097
  this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
210148
210098
  }
@@ -210454,8 +210404,8 @@ ${options.prefix}` : "\n" : options.prefix
210454
210404
  this.configuredProjects.forEach(printProjectWithoutFileNames);
210455
210405
  this.inferredProjects.forEach(printProjectWithoutFileNames);
210456
210406
  this.logger.info("Open files: ");
210457
- this.openFiles.forEach((projectRootPath, path3) => {
210458
- const info = this.getScriptInfoForPath(path3);
210407
+ this.openFiles.forEach((projectRootPath, path4) => {
210408
+ const info = this.getScriptInfoForPath(path4);
210459
210409
  this.logger.info(` FileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`);
210460
210410
  this.logger.info(` Projects: ${info.containingProjects.map((p2) => p2.getProjectName())}`);
210461
210411
  });
@@ -210781,12 +210731,12 @@ ${options.prefix}` : "\n" : options.prefix
210781
210731
  const newRootFile = propertyReader.getFileName(f);
210782
210732
  const fileName = toNormalizedPath(newRootFile);
210783
210733
  const isDynamic = isDynamicFileName(fileName);
210784
- let path3;
210734
+ let path4;
210785
210735
  if (!isDynamic && !project.fileExists(newRootFile)) {
210786
- path3 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
210787
- const existingValue = projectRootFilesMap.get(path3);
210736
+ path4 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
210737
+ const existingValue = projectRootFilesMap.get(path4);
210788
210738
  if (existingValue) {
210789
- if (((_a = existingValue.info) == null ? void 0 : _a.path) === path3) {
210739
+ if (((_a = existingValue.info) == null ? void 0 : _a.path) === path4) {
210790
210740
  project.removeFile(
210791
210741
  existingValue.info,
210792
210742
  /*fileExists*/
@@ -210798,7 +210748,7 @@ ${options.prefix}` : "\n" : options.prefix
210798
210748
  }
210799
210749
  existingValue.fileName = fileName;
210800
210750
  } else {
210801
- projectRootFilesMap.set(path3, { fileName });
210751
+ projectRootFilesMap.set(path4, { fileName });
210802
210752
  }
210803
210753
  } else {
210804
210754
  const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions);
@@ -210812,8 +210762,8 @@ ${options.prefix}` : "\n" : options.prefix
210812
210762
  /*deferredDeleteOk*/
210813
210763
  false
210814
210764
  ));
210815
- path3 = scriptInfo.path;
210816
- const existingValue = projectRootFilesMap.get(path3);
210765
+ path4 = scriptInfo.path;
210766
+ const existingValue = projectRootFilesMap.get(path4);
210817
210767
  if (!existingValue || existingValue.info !== scriptInfo) {
210818
210768
  project.addRoot(scriptInfo, fileName);
210819
210769
  if (scriptInfo.isScriptOpen()) {
@@ -210823,11 +210773,11 @@ ${options.prefix}` : "\n" : options.prefix
210823
210773
  existingValue.fileName = fileName;
210824
210774
  }
210825
210775
  }
210826
- newRootScriptInfoMap.set(path3, true);
210776
+ newRootScriptInfoMap.set(path4, true);
210827
210777
  }
210828
210778
  if (projectRootFilesMap.size > newRootScriptInfoMap.size) {
210829
- projectRootFilesMap.forEach((value, path3) => {
210830
- if (!newRootScriptInfoMap.has(path3)) {
210779
+ projectRootFilesMap.forEach((value, path4) => {
210780
+ if (!newRootScriptInfoMap.has(path4)) {
210831
210781
  if (value.info) {
210832
210782
  project.removeFile(
210833
210783
  value.info,
@@ -210836,7 +210786,7 @@ ${options.prefix}` : "\n" : options.prefix
210836
210786
  true
210837
210787
  );
210838
210788
  } else {
210839
- projectRootFilesMap.delete(path3);
210789
+ projectRootFilesMap.delete(path4);
210840
210790
  }
210841
210791
  }
210842
210792
  });
@@ -211073,8 +211023,8 @@ ${options.prefix}` : "\n" : options.prefix
211073
211023
  }
211074
211024
  /** @internal */
211075
211025
  getScriptInfoOrConfig(uncheckedFileName) {
211076
- const path3 = toNormalizedPath(uncheckedFileName);
211077
- const info = this.getScriptInfoForNormalizedPath(path3);
211026
+ const path4 = toNormalizedPath(uncheckedFileName);
211027
+ const info = this.getScriptInfoForNormalizedPath(path4);
211078
211028
  if (info) return info;
211079
211029
  const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName));
211080
211030
  return configProject && configProject.getCompilerOptions().configFile;
@@ -211086,7 +211036,7 @@ ${options.prefix}` : "\n" : options.prefix
211086
211036
  this.filenameToScriptInfo.entries(),
211087
211037
  (entry) => entry[1].deferredDelete ? void 0 : entry
211088
211038
  ),
211089
- ([path3, scriptInfo]) => ({ path: path3, fileName: scriptInfo.fileName })
211039
+ ([path4, scriptInfo]) => ({ path: path4, fileName: scriptInfo.fileName })
211090
211040
  );
211091
211041
  this.logger.msg(
211092
211042
  `Could not find file ${JSON.stringify(fileName)}.
@@ -211118,7 +211068,7 @@ All files are: ${JSON.stringify(names)}`,
211118
211068
  if (!projects2) {
211119
211069
  projects2 = createMultiMap();
211120
211070
  projects2.add(toAddInfo.path, project);
211121
- } else if (!forEachEntry(projects2, (projs, path3) => path3 === toAddInfo.path ? false : contains(projs, project))) {
211071
+ } else if (!forEachEntry(projects2, (projs, path4) => path4 === toAddInfo.path ? false : contains(projs, project))) {
211122
211072
  projects2.add(toAddInfo.path, project);
211123
211073
  }
211124
211074
  }
@@ -211280,8 +211230,8 @@ All files are: ${JSON.stringify(names)}`,
211280
211230
  }
211281
211231
  getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn, deferredDeleteOk) {
211282
211232
  Debug.assert(fileContent === void 0 || openedByClient, "ScriptInfo needs to be opened by client to be able to set its user defined content");
211283
- const path3 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
211284
- let info = this.filenameToScriptInfo.get(path3);
211233
+ const path4 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
211234
+ let info = this.filenameToScriptInfo.get(path4);
211285
211235
  if (!info) {
211286
211236
  const isDynamic = isDynamicFileName(fileName);
211287
211237
  Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}
@@ -211293,7 +211243,7 @@ Dynamic files must always be opened with service's current directory or service
211293
211243
  if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
211294
211244
  return;
211295
211245
  }
211296
- info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path3, this.filenameToScriptInfoVersion.get(path3));
211246
+ info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path4, this.filenameToScriptInfoVersion.get(path4));
211297
211247
  this.filenameToScriptInfo.set(info.path, info);
211298
211248
  this.filenameToScriptInfoVersion.delete(info.path);
211299
211249
  if (!openedByClient) {
@@ -211440,9 +211390,9 @@ Dynamic files must always be opened with service's current directory or service
211440
211390
  getSourceFileLike(fileName, projectNameOrProject, declarationInfo) {
211441
211391
  const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject);
211442
211392
  if (project) {
211443
- const path3 = project.toPath(fileName);
211444
- const sourceFile = project.getSourceFile(path3);
211445
- if (sourceFile && sourceFile.resolvedPath === path3) return sourceFile;
211393
+ const path4 = project.toPath(fileName);
211394
+ const sourceFile = project.getSourceFile(path4);
211395
+ if (sourceFile && sourceFile.resolvedPath === path4) return sourceFile;
211446
211396
  }
211447
211397
  const info = this.getOrCreateScriptInfoNotOpenedByClient(
211448
211398
  fileName,
@@ -211608,8 +211558,8 @@ Dynamic files must always be opened with service's current directory or service
211608
211558
  }
211609
211559
  });
211610
211560
  });
211611
- this.openFiles.forEach((_projectRootPath, path3) => {
211612
- const info = this.getScriptInfoForPath(path3);
211561
+ this.openFiles.forEach((_projectRootPath, path4) => {
211562
+ const info = this.getScriptInfoForPath(path4);
211613
211563
  if (find(info.containingProjects, isExternalProject)) return;
211614
211564
  this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
211615
211565
  info,
@@ -211662,14 +211612,14 @@ Dynamic files must always be opened with service's current directory or service
211662
211612
  const pendingOpenFileProjectUpdates = this.pendingOpenFileProjectUpdates;
211663
211613
  this.pendingOpenFileProjectUpdates = void 0;
211664
211614
  pendingOpenFileProjectUpdates == null ? void 0 : pendingOpenFileProjectUpdates.forEach(
211665
- (_config, path3) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
211666
- this.getScriptInfoForPath(path3),
211615
+ (_config, path4) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
211616
+ this.getScriptInfoForPath(path4),
211667
211617
  5
211668
211618
  /* Create */
211669
211619
  )
211670
211620
  );
211671
- this.openFiles.forEach((projectRootPath, path3) => {
211672
- const info = this.getScriptInfoForPath(path3);
211621
+ this.openFiles.forEach((projectRootPath, path4) => {
211622
+ const info = this.getScriptInfoForPath(path4);
211673
211623
  if (info.isOrphan()) {
211674
211624
  this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
211675
211625
  } else {
@@ -212180,9 +212130,9 @@ Dynamic files must always be opened with service's current directory or service
212180
212130
  }
212181
212131
  });
212182
212132
  if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;
212183
- forEachEntry(this.openFiles, (_projectRootPath, path3) => {
212184
- if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path3)) return;
212185
- const info = this.getScriptInfoForPath(path3);
212133
+ forEachEntry(this.openFiles, (_projectRootPath, path4) => {
212134
+ if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path4)) return;
212135
+ const info = this.getScriptInfoForPath(path4);
212186
212136
  if (find(info.containingProjects, isExternalProject)) return;
212187
212137
  const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
212188
212138
  info,
@@ -212231,8 +212181,8 @@ Dynamic files must always be opened with service's current directory or service
212231
212181
  sourceInfos = info.sourceMapFilePath.sourceInfos;
212232
212182
  }
212233
212183
  if (!sourceInfos) return;
212234
- if (!forEachKey(sourceInfos, (path3) => {
212235
- const info2 = this.getScriptInfoForPath(path3);
212184
+ if (!forEachKey(sourceInfos, (path4) => {
212185
+ const info2 = this.getScriptInfoForPath(path4);
212236
212186
  return !!info2 && (info2.isScriptOpen() || !info2.isOrphan());
212237
212187
  })) {
212238
212188
  return;
@@ -212256,7 +212206,7 @@ Dynamic files must always be opened with service's current directory or service
212256
212206
  sourceInfos = info.sourceMapFilePath.sourceInfos;
212257
212207
  }
212258
212208
  if (sourceInfos) {
212259
- sourceInfos.forEach((_value, path3) => toRemoveScriptInfos.delete(path3));
212209
+ sourceInfos.forEach((_value, path4) => toRemoveScriptInfos.delete(path4));
212260
212210
  }
212261
212211
  }
212262
212212
  });
@@ -212739,9 +212689,9 @@ Dynamic files must always be opened with service's current directory or service
212739
212689
  }
212740
212690
  );
212741
212691
  }
212742
- watchPackageJsonFile(file, path3, project) {
212692
+ watchPackageJsonFile(file, path4, project) {
212743
212693
  Debug.assert(project !== void 0);
212744
- let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path3);
212694
+ let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path4);
212745
212695
  if (!result) {
212746
212696
  let watcher = this.watchFactory.watchFile(
212747
212697
  file,
@@ -212749,11 +212699,11 @@ Dynamic files must always be opened with service's current directory or service
212749
212699
  switch (eventKind) {
212750
212700
  case 0:
212751
212701
  case 1:
212752
- this.packageJsonCache.addOrUpdate(fileName, path3);
212702
+ this.packageJsonCache.addOrUpdate(fileName, path4);
212753
212703
  this.onPackageJsonChange(result);
212754
212704
  break;
212755
212705
  case 2:
212756
- this.packageJsonCache.delete(path3);
212706
+ this.packageJsonCache.delete(path4);
212757
212707
  this.onPackageJsonChange(result);
212758
212708
  result.projects.clear();
212759
212709
  result.close();
@@ -212770,11 +212720,11 @@ Dynamic files must always be opened with service's current directory or service
212770
212720
  if (result.projects.size || !watcher) return;
212771
212721
  watcher.close();
212772
212722
  watcher = void 0;
212773
- (_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(path3);
212774
- this.packageJsonCache.invalidate(path3);
212723
+ (_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(path4);
212724
+ this.packageJsonCache.invalidate(path4);
212775
212725
  }
212776
212726
  };
212777
- this.packageJsonFilesMap.set(path3, result);
212727
+ this.packageJsonFilesMap.set(path4, result);
212778
212728
  }
212779
212729
  result.projects.add(project);
212780
212730
  (project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set())).add(result);
@@ -212964,14 +212914,14 @@ Dynamic files must always be opened with service's current directory or service
212964
212914
  );
212965
212915
  }
212966
212916
  };
212967
- function addOrUpdate(fileName, path3) {
212917
+ function addOrUpdate(fileName, path4) {
212968
212918
  const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host));
212969
- packageJsons.set(path3, packageJsonInfo);
212970
- directoriesWithoutPackageJson.delete(getDirectoryPath(path3));
212919
+ packageJsons.set(path4, packageJsonInfo);
212920
+ directoriesWithoutPackageJson.delete(getDirectoryPath(path4));
212971
212921
  }
212972
- function invalidate(path3) {
212973
- packageJsons.delete(path3);
212974
- directoriesWithoutPackageJson.delete(getDirectoryPath(path3));
212922
+ function invalidate(path4) {
212923
+ packageJsons.delete(path4);
212924
+ directoriesWithoutPackageJson.delete(getDirectoryPath(path4));
212975
212925
  }
212976
212926
  function directoryHasPackageJson(directory) {
212977
212927
  return packageJsons.has(combinePaths(directory, "package.json")) ? -1 : directoriesWithoutPackageJson.has(directory) ? 0 : 3;
@@ -213168,8 +213118,8 @@ ${json}${newLine}`;
213168
213118
  function combineProjectOutput(defaultValue, getValue, projects2, action) {
213169
213119
  const outputs = flatMapToMutable(isArray(projects2) ? projects2 : projects2.projects, (project) => action(project, defaultValue));
213170
213120
  if (!isArray(projects2) && projects2.symLinkedProjects) {
213171
- projects2.symLinkedProjects.forEach((projects22, path3) => {
213172
- const value = getValue(path3);
213121
+ projects2.symLinkedProjects.forEach((projects22, path4) => {
213122
+ const value = getValue(path4);
213173
213123
  outputs.push(...flatMap(projects22, (project) => action(project, value)));
213174
213124
  });
213175
213125
  }
@@ -213315,9 +213265,9 @@ ${json}${newLine}`;
213315
213265
  });
213316
213266
  return results.filter((o2) => o2.references.length !== 0);
213317
213267
  }
213318
- function forEachProjectInProjects(projects2, path3, cb) {
213268
+ function forEachProjectInProjects(projects2, path4, cb) {
213319
213269
  for (const project of isArray(projects2) ? projects2 : projects2.projects) {
213320
- cb(project, path3);
213270
+ cb(project, path4);
213321
213271
  }
213322
213272
  if (!isArray(projects2) && projects2.symLinkedProjects) {
213323
213273
  projects2.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => {
@@ -213331,8 +213281,8 @@ ${json}${newLine}`;
213331
213281
  const resultsMap = /* @__PURE__ */ new Map();
213332
213282
  const queue = createQueue();
213333
213283
  queue.enqueue({ project: defaultProject, location: initialLocation });
213334
- forEachProjectInProjects(projects2, initialLocation.fileName, (project, path3) => {
213335
- const location = { fileName: path3, pos: initialLocation.pos };
213284
+ forEachProjectInProjects(projects2, initialLocation.fileName, (project, path4) => {
213285
+ const location = { fileName: path4, pos: initialLocation.pos };
213336
213286
  queue.enqueue({ project, location });
213337
213287
  });
213338
213288
  const projectService = defaultProject.projectService;
@@ -215174,8 +215124,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
215174
215124
  nodeModulesPathParts.packageRootIndex
215175
215125
  );
215176
215126
  const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart));
215177
- const path3 = project.toPath(fileName);
215178
- if (entrypoints && some(entrypoints, (e2) => project.toPath(e2) === path3)) {
215127
+ const path4 = project.toPath(fileName);
215128
+ if (entrypoints && some(entrypoints, (e2) => project.toPath(e2) === path4)) {
215179
215129
  return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? void 0 : _b.resolvedFileName;
215180
215130
  } else {
215181
215131
  const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1);
@@ -215955,7 +215905,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
215955
215905
  }
215956
215906
  return combineProjectOutput(
215957
215907
  info,
215958
- (path3) => this.projectService.getScriptInfoForPath(path3),
215908
+ (path4) => this.projectService.getScriptInfoForPath(path4),
215959
215909
  projects2,
215960
215910
  (project, info2) => {
215961
215911
  if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) {
@@ -215982,7 +215932,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
215982
215932
  return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false;
215983
215933
  }
215984
215934
  const scriptInfo = project.getScriptInfo(file);
215985
- const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path3, data, writeByteOrderMark) => this.host.writeFile(path3, data, writeByteOrderMark));
215935
+ const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path4, data, writeByteOrderMark) => this.host.writeFile(path4, data, writeByteOrderMark));
215986
215936
  return args.richResponse ? {
215987
215937
  emitSkipped,
215988
215938
  diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d2) => formatDiagnosticToProtocol(
@@ -219963,8 +219913,8 @@ var require_uri_all = __commonJS({
219963
219913
  wsComponents.secure = void 0;
219964
219914
  }
219965
219915
  if (wsComponents.resourceName) {
219966
- var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path3 = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
219967
- wsComponents.path = path3 && path3 !== "/" ? path3 : void 0;
219916
+ var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path4 = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
219917
+ wsComponents.path = path4 && path4 !== "/" ? path4 : void 0;
219968
219918
  wsComponents.query = query;
219969
219919
  wsComponents.resourceName = void 0;
219970
219920
  }
@@ -220340,12 +220290,12 @@ var require_util2 = __commonJS({
220340
220290
  return "'" + escapeQuotes(str) + "'";
220341
220291
  }
220342
220292
  function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
220343
- var path3 = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'";
220344
- return joinPaths(currentPath, path3);
220293
+ var path4 = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'";
220294
+ return joinPaths(currentPath, path4);
220345
220295
  }
220346
220296
  function getPath2(currentPath, prop, jsonPointers) {
220347
- var path3 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop));
220348
- return joinPaths(currentPath, path3);
220297
+ var path4 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop));
220298
+ return joinPaths(currentPath, path4);
220349
220299
  }
220350
220300
  var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
220351
220301
  var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
@@ -230107,8 +230057,8 @@ var require_utils = __commonJS({
230107
230057
  }
230108
230058
  return ind;
230109
230059
  }
230110
- function removeDotSegments(path3) {
230111
- let input = path3;
230060
+ function removeDotSegments(path4) {
230061
+ let input = path4;
230112
230062
  const output = [];
230113
230063
  let nextSlash = -1;
230114
230064
  let len = 0;
@@ -230308,8 +230258,8 @@ var require_schemes = __commonJS({
230308
230258
  wsComponent.secure = void 0;
230309
230259
  }
230310
230260
  if (wsComponent.resourceName) {
230311
- const [path3, query] = wsComponent.resourceName.split("?");
230312
- wsComponent.path = path3 && path3 !== "/" ? path3 : void 0;
230261
+ const [path4, query] = wsComponent.resourceName.split("?");
230262
+ wsComponent.path = path4 && path4 !== "/" ? path4 : void 0;
230313
230263
  wsComponent.query = query;
230314
230264
  wsComponent.resourceName = void 0;
230315
230265
  }
@@ -234525,17 +234475,17 @@ function generateMultiPlaceholderString(value, jsonPath, tracker) {
234525
234475
  }
234526
234476
  return value;
234527
234477
  }
234528
- function isJsonSchemaPath(path3) {
234529
- if (path3.endsWith("contextConfig.headersSchema") || path3.endsWith("responseSchema")) {
234478
+ function isJsonSchemaPath(path4) {
234479
+ if (path4.endsWith("contextConfig.headersSchema") || path4.endsWith("responseSchema")) {
234530
234480
  return true;
234531
234481
  }
234532
- if (path3.includes("artifactComponents") && path3.endsWith("props")) {
234482
+ if (path4.includes("artifactComponents") && path4.endsWith("props")) {
234533
234483
  return true;
234534
234484
  }
234535
- if (path3.includes("dataComponents") && path3.endsWith("props")) {
234485
+ if (path4.includes("dataComponents") && path4.endsWith("props")) {
234536
234486
  return true;
234537
234487
  }
234538
- if (path3.includes("statusComponents") && path3.endsWith("detailsSchema")) {
234488
+ if (path4.includes("statusComponents") && path4.endsWith("detailsSchema")) {
234539
234489
  return true;
234540
234490
  }
234541
234491
  return false;
@@ -234544,16 +234494,16 @@ function updateTracker(tracker, placeholder, value) {
234544
234494
  tracker.placeholderToValue.set(placeholder, value);
234545
234495
  tracker.valueToPlaceholder.set(value, placeholder);
234546
234496
  }
234547
- function processObject(obj, tracker, path3 = "") {
234497
+ function processObject(obj, tracker, path4 = "") {
234548
234498
  if (typeof obj === "string") {
234549
234499
  if (containsTemplateLiterals(obj)) {
234550
- return generateMultiPlaceholderString(obj, path3, tracker);
234500
+ return generateMultiPlaceholderString(obj, path4, tracker);
234551
234501
  } else {
234552
234502
  const existingPlaceholder = tracker.valueToPlaceholder.get(obj);
234553
234503
  if (existingPlaceholder) {
234554
234504
  return existingPlaceholder;
234555
234505
  }
234556
- const placeholder = generatePlaceholder(path3);
234506
+ const placeholder = generatePlaceholder(path4);
234557
234507
  if (shouldReplaceString(obj, placeholder)) {
234558
234508
  const existingValue = tracker.placeholderToValue.get(placeholder);
234559
234509
  if (existingValue && existingValue !== obj) {
@@ -234567,7 +234517,7 @@ function processObject(obj, tracker, path3 = "") {
234567
234517
  }
234568
234518
  return obj;
234569
234519
  }
234570
- if (isJsonSchemaPath(path3)) {
234520
+ if (isJsonSchemaPath(path4)) {
234571
234521
  try {
234572
234522
  const zodSchema = jsonSchemaToZod(obj);
234573
234523
  return zodSchema;
@@ -234576,12 +234526,12 @@ function processObject(obj, tracker, path3 = "") {
234576
234526
  }
234577
234527
  }
234578
234528
  if (Array.isArray(obj)) {
234579
- return obj.map((item, index2) => processObject(item, tracker, `${path3}[${index2}]`));
234529
+ return obj.map((item, index2) => processObject(item, tracker, `${path4}[${index2}]`));
234580
234530
  }
234581
234531
  if (obj && typeof obj === "object") {
234582
234532
  const result = {};
234583
234533
  for (const [key, value] of Object.entries(obj)) {
234584
- const currentPath = path3 ? `${path3}.${key}` : key;
234534
+ const currentPath = path4 ? `${path4}.${key}` : key;
234585
234535
  result[key] = processObject(value, tracker, currentPath);
234586
234536
  }
234587
234537
  return result;
@@ -237849,24 +237799,183 @@ import { Command } from "commander";
237849
237799
 
237850
237800
  // src/commands/add.ts
237851
237801
  init_esm_shims();
237802
+ init_src();
237852
237803
  import chalk from "chalk";
237853
237804
  import fs3 from "fs-extra";
237854
237805
  import ora from "ora";
237855
237806
 
237856
237807
  // src/utils/templates.ts
237857
237808
  init_esm_shims();
237809
+ import path3 from "path";
237858
237810
  import degit from "degit";
237859
237811
  import fs2 from "fs-extra";
237860
- async function cloneTemplate(templatePath, targetPath) {
237812
+ async function cloneTemplate(templatePath, targetPath, replacements) {
237861
237813
  await fs2.mkdir(targetPath, { recursive: true });
237862
237814
  const templatePathSuffix = templatePath.replace("https://github.com/", "");
237863
237815
  const emitter = degit(templatePathSuffix);
237864
237816
  try {
237865
237817
  await emitter.clone(targetPath);
237818
+ if (replacements && replacements.length > 0) {
237819
+ await replaceContentInFiles(targetPath, replacements);
237820
+ }
237866
237821
  } catch (_error) {
237867
237822
  process.exit(1);
237868
237823
  }
237869
237824
  }
237825
+ async function replaceContentInFiles(targetPath, replacements) {
237826
+ for (const replacement of replacements) {
237827
+ const filePath = path3.join(targetPath, replacement.filePath);
237828
+ if (!await fs2.pathExists(filePath)) {
237829
+ console.warn(`Warning: File ${filePath} not found, skipping replacements`);
237830
+ continue;
237831
+ }
237832
+ const content = await fs2.readFile(filePath, "utf-8");
237833
+ const updatedContent = await replaceObjectProperties(content, replacement.replacements);
237834
+ await fs2.writeFile(filePath, updatedContent, "utf-8");
237835
+ }
237836
+ }
237837
+ async function replaceObjectProperties(content, replacements) {
237838
+ let updatedContent = content;
237839
+ for (const [propertyPath, replacement] of Object.entries(replacements)) {
237840
+ updatedContent = replaceObjectProperty(updatedContent, propertyPath, replacement);
237841
+ }
237842
+ return updatedContent;
237843
+ }
237844
+ function replaceObjectProperty(content, propertyPath, replacement) {
237845
+ const singleLineMatch = content.match(
237846
+ new RegExp(`^(.+{[^{}]*${propertyPath}\\s*:\\s*{[^{}]*}[^{}]*}.*)$`, "m")
237847
+ );
237848
+ if (singleLineMatch) {
237849
+ const singleLinePattern = new RegExp(`((^|\\s|{)${propertyPath}\\s*:\\s*)({[^}]*})`);
237850
+ return content.replace(
237851
+ singleLinePattern,
237852
+ `$1${JSON.stringify(replacement).replace(/"/g, "'").replace(/:/g, ": ").replace(/,/g, ", ")}`
237853
+ );
237854
+ }
237855
+ const replacementStr = JSON.stringify(replacement, null, 2).replace(/"/g, "'");
237856
+ const lines = content.split("\n");
237857
+ const result = [];
237858
+ let inTargetProperty = false;
237859
+ let braceCount = 0;
237860
+ let targetPropertyIndent = "";
237861
+ let foundProperty = false;
237862
+ for (let i2 = 0; i2 < lines.length; i2++) {
237863
+ const line = lines[i2];
237864
+ const trimmedLine = line.trim();
237865
+ if (inTargetProperty) {
237866
+ for (const char of line) {
237867
+ if (char === "{") braceCount++;
237868
+ if (char === "}") braceCount--;
237869
+ }
237870
+ if (braceCount <= 0) {
237871
+ const hasTrailingComma = line.includes(",") || i2 + 1 < lines.length && lines[i2 + 1].trim().startsWith("}") === false && lines[i2 + 1].trim() !== "";
237872
+ const indentedReplacement = replacementStr.split("\n").map((replacementLine, index2) => {
237873
+ if (index2 === 0) {
237874
+ return `${targetPropertyIndent}${propertyPath}: ${replacementLine}`;
237875
+ }
237876
+ return `${targetPropertyIndent}${replacementLine}`;
237877
+ }).join("\n");
237878
+ result.push(`${indentedReplacement}${hasTrailingComma ? "," : ""}`);
237879
+ inTargetProperty = false;
237880
+ foundProperty = true;
237881
+ continue;
237882
+ }
237883
+ continue;
237884
+ }
237885
+ const propertyPattern = new RegExp(`(^|\\s+)${propertyPath}\\s*:`);
237886
+ if (trimmedLine.startsWith(`${propertyPath}:`) || propertyPattern.test(line)) {
237887
+ inTargetProperty = true;
237888
+ braceCount = 0;
237889
+ if (line.includes(" = { ")) {
237890
+ targetPropertyIndent = `${line.match(/^\s*/)?.[0] || ""} `;
237891
+ } else {
237892
+ const propertyMatch = line.match(new RegExp(`(.*?)(^|\\s+)${propertyPath}\\s*:`));
237893
+ targetPropertyIndent = propertyMatch ? propertyMatch[1] : line.match(/^\s*/)?.[0] || "";
237894
+ }
237895
+ for (const char of line) {
237896
+ if (char === "{") braceCount++;
237897
+ if (char === "}") braceCount--;
237898
+ }
237899
+ if (braceCount <= 0) {
237900
+ const hasTrailingComma = line.includes(",");
237901
+ const indentedReplacement = replacementStr.split("\n").map((replacementLine, index2) => {
237902
+ if (index2 === 0) {
237903
+ return `${targetPropertyIndent}${propertyPath}: ${replacementLine}`;
237904
+ }
237905
+ return `${targetPropertyIndent}${replacementLine}`;
237906
+ }).join("\n");
237907
+ result.push(`${indentedReplacement}${hasTrailingComma ? "," : ""}`);
237908
+ inTargetProperty = false;
237909
+ foundProperty = true;
237910
+ continue;
237911
+ }
237912
+ continue;
237913
+ }
237914
+ result.push(line);
237915
+ }
237916
+ if (!foundProperty) {
237917
+ return injectPropertyIntoObject(result.join("\n"), propertyPath, replacement);
237918
+ }
237919
+ return result.join("\n");
237920
+ }
237921
+ function injectPropertyIntoObject(content, propertyPath, replacement) {
237922
+ const replacementStr = JSON.stringify(replacement, null, 2).replace(/"/g, "'");
237923
+ const lines = content.split("\n");
237924
+ const result = [];
237925
+ let foundObjectStart = false;
237926
+ let objectDepth = 0;
237927
+ let insertionPoint = -1;
237928
+ let baseIndent = "";
237929
+ for (let i2 = 0; i2 < lines.length; i2++) {
237930
+ const line = lines[i2];
237931
+ const trimmedLine = line.trim();
237932
+ if (!foundObjectStart && (trimmedLine.includes("({") || trimmedLine.endsWith(" = {") || line.includes(" = { "))) {
237933
+ foundObjectStart = true;
237934
+ baseIndent = line.match(/^\s*/)?.[0] || "";
237935
+ objectDepth = 0;
237936
+ for (const char of line) {
237937
+ if (char === "{") objectDepth++;
237938
+ if (char === "}") objectDepth--;
237939
+ }
237940
+ } else if (foundObjectStart) {
237941
+ for (const char of line) {
237942
+ if (char === "{") objectDepth++;
237943
+ if (char === "}") objectDepth--;
237944
+ }
237945
+ if (objectDepth === 0 && trimmedLine.startsWith("}")) {
237946
+ insertionPoint = i2;
237947
+ break;
237948
+ }
237949
+ }
237950
+ }
237951
+ if (insertionPoint !== -1) {
237952
+ const propertyIndent = `${baseIndent} `;
237953
+ let needsCommaPrefix = false;
237954
+ if (insertionPoint > 0) {
237955
+ const prevLine = lines[insertionPoint - 1].trim();
237956
+ needsCommaPrefix = prevLine !== "" && !prevLine.endsWith(",") && !prevLine.startsWith("}");
237957
+ }
237958
+ const indentedReplacement = replacementStr.split("\n").map((replacementLine, index2) => {
237959
+ if (index2 === 0) {
237960
+ return `${propertyIndent}${propertyPath}: ${replacementLine}`;
237961
+ }
237962
+ return `${propertyIndent}${replacementLine}`;
237963
+ }).join("\n");
237964
+ for (let i2 = 0; i2 < lines.length; i2++) {
237965
+ if (i2 === insertionPoint) {
237966
+ result.push(indentedReplacement);
237967
+ }
237968
+ if (i2 === insertionPoint - 1 && needsCommaPrefix) {
237969
+ result.push(`${lines[i2]},`);
237970
+ } else {
237971
+ result.push(lines[i2]);
237972
+ }
237973
+ }
237974
+ return result.join("\n");
237975
+ }
237976
+ console.warn(`Could not inject property "${propertyPath}" - no suitable object found in content`);
237977
+ return content;
237978
+ }
237870
237979
  async function getAvailableTemplates() {
237871
237980
  const response = await fetch(
237872
237981
  "https://api.github.com/repos/inkeep/agents-cookbook/contents/template-projects"
@@ -237876,6 +237985,39 @@ async function getAvailableTemplates() {
237876
237985
  }
237877
237986
 
237878
237987
  // src/commands/add.ts
237988
+ var defaultGoogleModelConfigurations = {
237989
+ base: {
237990
+ model: GOOGLE_MODELS.GEMINI_2_5_FLASH
237991
+ },
237992
+ structuredOutput: {
237993
+ model: GOOGLE_MODELS.GEMINI_2_5_FLASH_LITE
237994
+ },
237995
+ summarizer: {
237996
+ model: GOOGLE_MODELS.GEMINI_2_5_FLASH_LITE
237997
+ }
237998
+ };
237999
+ var defaultOpenaiModelConfigurations = {
238000
+ base: {
238001
+ model: OPENAI_MODELS.GPT_4_1_20250414
238002
+ },
238003
+ structuredOutput: {
238004
+ model: OPENAI_MODELS.GPT_4_1_MINI_20250414
238005
+ },
238006
+ summarizer: {
238007
+ model: OPENAI_MODELS.GPT_4_1_NANO_20250414
238008
+ }
238009
+ };
238010
+ var defaultAnthropicModelConfigurations = {
238011
+ base: {
238012
+ model: ANTHROPIC_MODELS.CLAUDE_SONNET_4_5_20250929
238013
+ },
238014
+ structuredOutput: {
238015
+ model: ANTHROPIC_MODELS.CLAUDE_SONNET_4_5_20250929
238016
+ },
238017
+ summarizer: {
238018
+ model: ANTHROPIC_MODELS.CLAUDE_SONNET_4_5_20250929
238019
+ }
238020
+ };
237879
238021
  async function addCommand(options) {
237880
238022
  const templates = await getAvailableTemplates();
237881
238023
  if (!options.template) {
@@ -237889,6 +238031,30 @@ async function addCommand(options) {
237889
238031
  console.error(`\u274C Template "${options.template}" not found`);
237890
238032
  process.exit(1);
237891
238033
  }
238034
+ const anthropicKey = process.env.ANTHROPIC_API_KEY;
238035
+ const openAiKey = process.env.OPENAI_API_KEY;
238036
+ const googleKey = process.env.GOOGLE_API_KEY;
238037
+ let defaultModelSettings = {};
238038
+ if (anthropicKey) {
238039
+ defaultModelSettings = defaultAnthropicModelConfigurations;
238040
+ } else if (openAiKey) {
238041
+ defaultModelSettings = defaultOpenaiModelConfigurations;
238042
+ } else if (googleKey) {
238043
+ defaultModelSettings = defaultGoogleModelConfigurations;
238044
+ }
238045
+ const contentReplacements = [
238046
+ {
238047
+ filePath: "index.ts",
238048
+ replacements: {
238049
+ models: defaultModelSettings
238050
+ }
238051
+ }
238052
+ ];
238053
+ if (Object.keys(defaultModelSettings).length === 0) {
238054
+ console.error(
238055
+ "\u274C No AI provider key found in environment variables. Please set one of: ANTHROPIC_API_KEY, OPENAI_API_KEY, or GOOGLE_GENERATIVE_AI_API_KEY"
238056
+ );
238057
+ }
237892
238058
  const baseDir = options.targetPath || process.cwd();
237893
238059
  const templateDir = `${baseDir}/${options.template}`;
237894
238060
  if (await fs3.pathExists(templateDir)) {
@@ -237907,7 +238073,7 @@ async function addCommand(options) {
237907
238073
  }
237908
238074
  const spinner = ora("Adding template...").start();
237909
238075
  const fullTemplatePath = `https://github.com/inkeep/agents-cookbook/template-projects/${options.template}`;
237910
- await cloneTemplate(fullTemplatePath, templateDir);
238076
+ await cloneTemplate(fullTemplatePath, templateDir, contentReplacements);
237911
238077
  spinner.succeed(`Template "${options.template}" added to ${templateDir}`);
237912
238078
  return;
237913
238079
  }
@@ -238251,8 +238417,8 @@ This project can be deployed to any platform that supports Next.js:
238251
238417
  }
238252
238418
  }
238253
238419
  async function devCommand(options) {
238254
- const { port, host, build, outputDir, path: path3, export: exportFlag } = options;
238255
- if (path3) {
238420
+ const { port, host, build, outputDir, path: path4, export: exportFlag } = options;
238421
+ if (path4) {
238256
238422
  const rt = resolveWebRuntime(true);
238257
238423
  console.log(rt);
238258
238424
  return;
@@ -239373,8 +239539,8 @@ program.name("inkeep").description("CLI tool for Inkeep Agent Framework").versio
239373
239539
  program.command("add [template]").description("Add a new template to the project").option("--target-path <path>", "Target path to add the template to").option("--config <path>", "Path to configuration file").action(async (template, options) => {
239374
239540
  await addCommand({ template, ...options });
239375
239541
  });
239376
- program.command("init [path]").description("Initialize a new Inkeep configuration file").option("--no-interactive", "Skip interactive path selection").option("--config <path>", "Path to use as template for new configuration").action(async (path3, options) => {
239377
- await initCommand({ path: path3, ...options });
239542
+ program.command("init [path]").description("Initialize a new Inkeep configuration file").option("--no-interactive", "Skip interactive path selection").option("--config <path>", "Path to use as template for new configuration").action(async (path4, options) => {
239543
+ await initCommand({ path: path4, ...options });
239378
239544
  });
239379
239545
  var configCommand = program.command("config").description("Manage Inkeep configuration");
239380
239546
  configCommand.command("get [key]").description("Get configuration value(s)").option("--config <path>", "Path to configuration file").option("--config-file-path <path>", "Path to configuration file (deprecated, use --config)").action(async (key, options) => {