ttsc 0.32.0 → 0.32.1

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 (164) hide show
  1. package/lib/TtscCompiler.js +1 -1
  2. package/lib/TtscCompiler.js.map +1 -1
  3. package/lib/compiler/internal/ResidentCheckProcess.d.ts +74 -96
  4. package/lib/compiler/internal/ResidentCheckProcess.js +150 -335
  5. package/lib/compiler/internal/ResidentCheckProcess.js.map +1 -1
  6. package/lib/compiler/internal/ResidentCheckProcessHost.d.ts +127 -0
  7. package/lib/compiler/internal/ResidentCheckProcessHost.js +447 -0
  8. package/lib/compiler/internal/ResidentCheckProcessHost.js.map +1 -0
  9. package/lib/compiler/internal/ResidentCheckProcessProtocol.d.ts +64 -0
  10. package/lib/compiler/internal/ResidentCheckProcessProtocol.js +3 -0
  11. package/lib/compiler/internal/ResidentCheckProcessProtocol.js.map +1 -0
  12. package/lib/compiler/internal/build/BuildExecution.d.ts +103 -1
  13. package/lib/compiler/internal/build/BuildExecution.js +91 -11
  14. package/lib/compiler/internal/build/BuildExecution.js.map +1 -1
  15. package/lib/compiler/internal/build/ResidentCheckWatchSession.d.ts +16 -11
  16. package/lib/compiler/internal/build/ResidentCheckWatchSession.js +37 -21
  17. package/lib/compiler/internal/build/ResidentCheckWatchSession.js.map +1 -1
  18. package/lib/compiler/internal/build/RunBuildOptions.d.ts +6 -5
  19. package/lib/compiler/internal/build/WatchInputPublication.d.ts +59 -0
  20. package/lib/compiler/internal/build/WatchInputPublication.js +93 -0
  21. package/lib/compiler/internal/build/WatchInputPublication.js.map +1 -0
  22. package/lib/compiler/internal/build/runBuild.d.ts +29 -2
  23. package/lib/compiler/internal/build/runBuild.js +45 -19
  24. package/lib/compiler/internal/build/runBuild.js.map +1 -1
  25. package/lib/compiler/internal/buildNativeCompiler.d.ts +2 -0
  26. package/lib/compiler/internal/buildNativeCompiler.js +1 -0
  27. package/lib/compiler/internal/buildNativeCompiler.js.map +1 -1
  28. package/lib/compiler/internal/compileProjectInMemory.js +4 -2
  29. package/lib/compiler/internal/compileProjectInMemory.js.map +1 -1
  30. package/lib/compiler/internal/project/resolveOwningProjectConfig.d.ts +7 -2
  31. package/lib/compiler/internal/project/resolveOwningProjectConfig.js +6 -3
  32. package/lib/compiler/internal/project/resolveOwningProjectConfig.js.map +1 -1
  33. package/lib/compiler/internal/readEffectiveCompilerOptions.js +1 -1
  34. package/lib/compiler/internal/readEffectiveCompilerOptions.js.map +1 -1
  35. package/lib/compiler/internal/resolveBinary.d.ts +1 -0
  36. package/lib/compiler/internal/resolveBinary.js.map +1 -1
  37. package/lib/compiler/internal/resolveTsgo.d.ts +6 -0
  38. package/lib/compiler/internal/resolveTsgo.js.map +1 -1
  39. package/lib/compiler/internal/runSingleFileEmit.d.ts +28 -1
  40. package/lib/compiler/internal/runSingleFileEmit.js +120 -86
  41. package/lib/compiler/internal/runSingleFileEmit.js.map +1 -1
  42. package/lib/compiler/internal/startResidentTransform.js +8 -2
  43. package/lib/compiler/internal/startResidentTransform.js.map +1 -1
  44. package/lib/compiler/internal/transformProjectInMemory.js +11 -3
  45. package/lib/compiler/internal/transformProjectInMemory.js.map +1 -1
  46. package/lib/compiler/internal/transformProjectInWorker.d.ts +1 -1
  47. package/lib/compiler/internal/transformProjectInWorker.js +3 -2
  48. package/lib/compiler/internal/transformProjectInWorker.js.map +1 -1
  49. package/lib/internal/workerModuleUrl.d.ts +28 -0
  50. package/lib/internal/workerModuleUrl.js +40 -0
  51. package/lib/internal/workerModuleUrl.js.map +1 -0
  52. package/lib/launcher/internal/buildSingleRootProject.js +2 -1
  53. package/lib/launcher/internal/buildSingleRootProject.js.map +1 -1
  54. package/lib/launcher/internal/getCompilerVersionText.js +3 -2
  55. package/lib/launcher/internal/getCompilerVersionText.js.map +1 -1
  56. package/lib/launcher/internal/prepareExecution.js +2 -1
  57. package/lib/launcher/internal/prepareExecution.js.map +1 -1
  58. package/lib/launcher/internal/runTtsc.js +91 -41
  59. package/lib/launcher/internal/runTtsc.js.map +1 -1
  60. package/lib/launcher/internal/runtime/CommonJsRuntimeSource.d.ts +10 -6
  61. package/lib/launcher/internal/runtime/CommonJsRuntimeSource.js +11 -9
  62. package/lib/launcher/internal/runtime/CommonJsRuntimeSource.js.map +1 -1
  63. package/lib/launcher/internal/runtime/advertiseTypeScriptExtensions.d.ts +20 -0
  64. package/lib/launcher/internal/runtime/advertiseTypeScriptExtensions.js +27 -0
  65. package/lib/launcher/internal/runtime/advertiseTypeScriptExtensions.js.map +1 -0
  66. package/lib/launcher/internal/runtime/installRuntimeHooks.d.ts +5 -3
  67. package/lib/launcher/internal/runtime/installRuntimeHooks.js +7 -3
  68. package/lib/launcher/internal/runtime/installRuntimeHooks.js.map +1 -1
  69. package/lib/launcher/internal/watch/AsyncWatchTopology.d.ts +113 -0
  70. package/lib/launcher/internal/watch/AsyncWatchTopology.js +232 -0
  71. package/lib/launcher/internal/watch/AsyncWatchTopology.js.map +1 -0
  72. package/lib/launcher/internal/watch/WatchSettlement.d.ts +49 -0
  73. package/lib/launcher/internal/watch/WatchSettlement.js +70 -0
  74. package/lib/launcher/internal/watch/WatchSettlement.js.map +1 -0
  75. package/lib/launcher/internal/watch/WatchTopology.d.ts +29 -1
  76. package/lib/launcher/internal/watch/WatchTopology.js +86 -10
  77. package/lib/launcher/internal/watch/WatchTopology.js.map +1 -1
  78. package/lib/launcher/internal/watch/WatchTopologyWorkerProtocol.d.ts +121 -0
  79. package/lib/launcher/internal/watch/WatchTopologyWorkerProtocol.js +3 -0
  80. package/lib/launcher/internal/watch/WatchTopologyWorkerProtocol.js.map +1 -0
  81. package/lib/launcher/internal/watch/serveWatchTopologyWorker.d.ts +19 -0
  82. package/lib/launcher/internal/watch/serveWatchTopologyWorker.js +62 -0
  83. package/lib/launcher/internal/watch/serveWatchTopologyWorker.js.map +1 -0
  84. package/lib/launcher/internal/watch/watchTopologyWorker.d.ts +1 -0
  85. package/lib/launcher/internal/watch/watchTopologyWorker.js +22 -0
  86. package/lib/launcher/internal/watch/watchTopologyWorker.js.map +1 -0
  87. package/lib/plugin/CapabilityPluginResolver.d.ts +1 -1
  88. package/lib/plugin/CapabilityPluginResolver.js +3 -2
  89. package/lib/plugin/CapabilityPluginResolver.js.map +1 -1
  90. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.d.ts +15 -12
  91. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js +13 -11
  92. package/lib/plugin/internal/load/PluginDescriptorEvaluationCache.js.map +1 -1
  93. package/lib/plugin/internal/load/PluginPackageResolution.d.ts +2 -2
  94. package/lib/plugin/internal/load/PluginPackageResolution.js +13 -7
  95. package/lib/plugin/internal/load/PluginPackageResolution.js.map +1 -1
  96. package/lib/plugin/internal/load/ProjectPluginEntries.d.ts +23 -7
  97. package/lib/plugin/internal/load/ProjectPluginEntries.js +36 -14
  98. package/lib/plugin/internal/load/ProjectPluginEntries.js.map +1 -1
  99. package/lib/plugin/internal/load/collectProjectHostInputs.d.ts +3 -1
  100. package/lib/plugin/internal/load/collectProjectHostInputs.js +5 -2
  101. package/lib/plugin/internal/load/collectProjectHostInputs.js.map +1 -1
  102. package/lib/plugin/internal/load/hasProjectPluginEntries.d.ts +3 -1
  103. package/lib/plugin/internal/load/hasProjectPluginEntries.js +4 -2
  104. package/lib/plugin/internal/load/hasProjectPluginEntries.js.map +1 -1
  105. package/lib/plugin/internal/load/loadProjectPlugins.d.ts +36 -5
  106. package/lib/plugin/internal/load/loadProjectPlugins.js +466 -416
  107. package/lib/plugin/internal/load/loadProjectPlugins.js.map +1 -1
  108. package/lib/plugin/internal/load/pluginResolutionFailure.d.ts +18 -0
  109. package/lib/plugin/internal/load/pluginResolutionFailure.js +32 -0
  110. package/lib/plugin/internal/load/pluginResolutionFailure.js.map +1 -0
  111. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.d.ts +1 -1
  112. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js +3 -2
  113. package/lib/plugin/internal/source/PluginBuildEnvironmentReadings.js.map +1 -1
  114. package/lib/structures/ITtscCompilerContext.d.ts +12 -12
  115. package/lib/structures/ITtscPlugin.d.ts +7 -5
  116. package/lib/structures/ITtscPluginFactoryContext.d.ts +9 -8
  117. package/lib/structures/internal/TtscSingleFileEmitOptions.d.ts +12 -6
  118. package/package.json +9 -9
  119. package/src/TtscCompiler.ts +1 -1
  120. package/src/compiler/internal/ResidentCheckProcess.ts +159 -374
  121. package/src/compiler/internal/ResidentCheckProcessHost.ts +502 -0
  122. package/src/compiler/internal/ResidentCheckProcessProtocol.ts +53 -0
  123. package/src/compiler/internal/build/BuildExecution.ts +118 -9
  124. package/src/compiler/internal/build/ResidentCheckWatchSession.ts +41 -24
  125. package/src/compiler/internal/build/RunBuildOptions.ts +9 -5
  126. package/src/compiler/internal/build/WatchInputPublication.ts +106 -0
  127. package/src/compiler/internal/build/runBuild.ts +58 -34
  128. package/src/compiler/internal/buildNativeCompiler.ts +4 -0
  129. package/src/compiler/internal/compileProjectInMemory.ts +8 -2
  130. package/src/compiler/internal/project/resolveOwningProjectConfig.ts +16 -5
  131. package/src/compiler/internal/readEffectiveCompilerOptions.ts +1 -1
  132. package/src/compiler/internal/resolveBinary.ts +4 -1
  133. package/src/compiler/internal/resolveTsgo.ts +7 -0
  134. package/src/compiler/internal/runSingleFileEmit.ts +139 -99
  135. package/src/compiler/internal/startResidentTransform.ts +9 -2
  136. package/src/compiler/internal/transformProjectInMemory.ts +12 -3
  137. package/src/compiler/internal/transformProjectInWorker.ts +10 -2
  138. package/src/internal/workerModuleUrl.ts +34 -0
  139. package/src/launcher/internal/buildSingleRootProject.ts +2 -0
  140. package/src/launcher/internal/getCompilerVersionText.ts +3 -2
  141. package/src/launcher/internal/prepareExecution.ts +2 -0
  142. package/src/launcher/internal/runTtsc.ts +123 -45
  143. package/src/launcher/internal/runtime/CommonJsRuntimeSource.ts +11 -9
  144. package/src/launcher/internal/runtime/advertiseTypeScriptExtensions.ts +25 -0
  145. package/src/launcher/internal/runtime/installRuntimeHooks.ts +7 -3
  146. package/src/launcher/internal/watch/AsyncWatchTopology.ts +267 -0
  147. package/src/launcher/internal/watch/WatchSettlement.ts +67 -0
  148. package/src/launcher/internal/watch/WatchTopology.ts +84 -13
  149. package/src/launcher/internal/watch/WatchTopologyWorkerProtocol.ts +106 -0
  150. package/src/launcher/internal/watch/serveWatchTopologyWorker.ts +75 -0
  151. package/src/launcher/internal/watch/watchTopologyWorker.ts +29 -0
  152. package/src/plugin/CapabilityPluginResolver.ts +9 -2
  153. package/src/plugin/internal/load/PluginDescriptorEvaluationCache.ts +17 -12
  154. package/src/plugin/internal/load/PluginPackageResolution.ts +14 -9
  155. package/src/plugin/internal/load/ProjectPluginEntries.ts +40 -15
  156. package/src/plugin/internal/load/collectProjectHostInputs.ts +7 -1
  157. package/src/plugin/internal/load/hasProjectPluginEntries.ts +8 -3
  158. package/src/plugin/internal/load/loadProjectPlugins.ts +672 -594
  159. package/src/plugin/internal/load/pluginResolutionFailure.ts +37 -0
  160. package/src/plugin/internal/source/PluginBuildEnvironmentReadings.ts +8 -2
  161. package/src/structures/ITtscCompilerContext.ts +12 -12
  162. package/src/structures/ITtscPlugin.ts +7 -5
  163. package/src/structures/ITtscPluginFactoryContext.ts +9 -8
  164. package/src/structures/internal/TtscSingleFileEmitOptions.ts +22 -11
@@ -2,6 +2,8 @@ import type { ITtscParsedProjectConfig } from "../../../structures/internal/ITts
2
2
  /**
3
3
  * Return config ancestry and package-discovery manifest inputs, including
4
4
  * missing nearer candidates that could redirect the selected package later.
5
+ * Discovery uses the selected config directory or explicit pluginConfigDir,
6
+ * matching the entry resolver independently of the compiler's source root.
5
7
  *
6
8
  * @evidence contracts/common.md#principled-implementation Config ancestry, lexical selection and missing config candidates influence selection; automatic discovery additionally observes nearest manifest and dependency search candidates through the selecting root. The project reader separately states whether these config observations are complete.
7
9
  * @evidence contracts/common.md#clear-and-simple-design The collector obtains package resolution from its owner and assembles universal loader inputs, leaving source Program dependencies to the native reference graph.
@@ -13,4 +15,4 @@ import type { ITtscParsedProjectConfig } from "../../../structures/internal/ITts
13
15
  *
14
16
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The Set and returned array belong to this call, with no cross-call retention or acquired open resource.
15
17
  */
16
- export declare function collectProjectHostInputs(project: ITtscParsedProjectConfig, includePluginDiscovery?: boolean): string[];
18
+ export declare function collectProjectHostInputs(project: ITtscParsedProjectConfig, includePluginDiscovery?: boolean, pluginConfigDir?: string): string[];
@@ -7,10 +7,13 @@ exports.collectProjectHostInputs = collectProjectHostInputs;
7
7
  const node_module_1 = require("node:module");
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const PluginPackageResolution_1 = require("./PluginPackageResolution");
10
+ const ProjectPluginEntries_1 = require("./ProjectPluginEntries");
10
11
  const moduleResolutionBaseSelects_1 = require("./moduleResolutionBaseSelects");
11
12
  /**
12
13
  * Return config ancestry and package-discovery manifest inputs, including
13
14
  * missing nearer candidates that could redirect the selected package later.
15
+ * Discovery uses the selected config directory or explicit pluginConfigDir,
16
+ * matching the entry resolver independently of the compiler's source root.
14
17
  *
15
18
  * @evidence contracts/common.md#principled-implementation Config ancestry, lexical selection and missing config candidates influence selection; automatic discovery additionally observes nearest manifest and dependency search candidates through the selecting root. The project reader separately states whether these config observations are complete.
16
19
  * @evidence contracts/common.md#clear-and-simple-design The collector obtains package resolution from its owner and assembles universal loader inputs, leaving source Program dependencies to the native reference graph.
@@ -22,11 +25,11 @@ const moduleResolutionBaseSelects_1 = require("./moduleResolutionBaseSelects");
22
25
  *
23
26
  * @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The Set and returned array belong to this call, with no cross-call retention or acquired open resource.
24
27
  */
25
- function collectProjectHostInputs(project, includePluginDiscovery = true) {
28
+ function collectProjectHostInputs(project, includePluginDiscovery = true, pluginConfigDir) {
26
29
  const inputs = new Set([...project.configPaths, ...(project.configInputs ?? [])].map((file) => node_path_1.default.resolve(file)));
27
30
  if (!includePluginDiscovery)
28
31
  return [...inputs].sort();
29
- const manifestCandidates = PluginPackageResolution_1.PluginPackageResolution.collectNearestPackageJsonCandidates(project.root);
32
+ const manifestCandidates = PluginPackageResolution_1.PluginPackageResolution.collectNearestPackageJsonCandidates(ProjectPluginEntries_1.ProjectPluginEntries.resolvePluginBaseDir(project, pluginConfigDir));
30
33
  for (const candidate of manifestCandidates)
31
34
  inputs.add(candidate);
32
35
  const manifest = manifestCandidates.find(PluginPackageResolution_1.PluginPackageResolution.existingFile);
@@ -1 +1 @@
1
- {"version":3,"file":"collectProjectHostInputs.js","sourceRoot":"","sources":["../../../../src/plugin/internal/load/collectProjectHostInputs.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAG7B,uEAAoE;AACpE,+EAA4E;AAE5E;;;;;;;;;;;;;GAaG;AACH,kCACE,OAAiC,EACjC,sBAAsB,GAAY,IAAI;IAEtC,MAAM,MAAM,GAAG,IAAI,GAAG,CACpB,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACrE,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CACnB,CACF,CAAC;IACF,IAAI,CAAC,sBAAsB;QAAE,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvD,MAAM,kBAAkB,GACtB,iDAAuB,CAAC,mCAAmC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,KAAK,MAAM,SAAS,IAAI,kBAAkB;QAAE,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CACtC,iDAAuB,CAAC,YAAY,CACrC,CAAC;IACF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,eAAe,GACnB,iDAAuB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACxD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,WAAW,GAAG,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC3C,KAAK,MAAM,UAAU,IAAI,iDAAuB,CAAC,qBAAqB,CACpE,eAAe,CAChB,EAAE,CAAC;gBACF,MAAM,kBAAkB,GACtB,iDAAuB,CAAC,4BAA4B,CAClD,UAAU,EACV,WAAW,CACZ,CAAC;gBACJ,KAAK,MAAM,SAAS,IAAI,mCAAmC,CACzD,UAAU,EACV,QAAQ,EACR,kBAAkB,CACnB,EAAE,CAAC;oBACF,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACxB,CAAC;gBACD,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;oBACrC,MAAM,CAAC,GAAG,CAAC,mBAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC/C,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,SAAS,mCAAmC,CAC1C,WAAmB,EACnB,UAAkB,EAClB,gBAAoC;IAEpC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,UAAU,IAAI,IAAA,2BAAa,EAAC,UAAU,CAAC,CAAC,OAAO,CAAC,KAAK,CAC9D,WAAW,CACZ,IAAI,EAAE,EAAE,CAAC;QACR,MAAM,gBAAgB,GAAG,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1E,GAAG,CAAC,IAAI,CAAC,mBAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,CAAC;QACtD,IAAI,IAAA,yDAA2B,EAAC,gBAAgB,EAAE,gBAAgB,EAAE,EAAE,CAAC;YACrE,MAAM;IACV,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
1
+ {"version":3,"file":"collectProjectHostInputs.js","sourceRoot":"","sources":["../../../../src/plugin/internal/load/collectProjectHostInputs.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,0DAA6B;AAG7B,uEAAoE;AACpE,iEAA8D;AAC9D,+EAA4E;AAE5E;;;;;;;;;;;;;;;GAeG;AACH,kCACE,OAAiC,EACjC,sBAAsB,GAAY,IAAI,EACtC,eAAwB;IAExB,MAAM,MAAM,GAAG,IAAI,GAAG,CACpB,CAAC,GAAG,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACrE,mBAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CACnB,CACF,CAAC;IACF,IAAI,CAAC,sBAAsB;QAAE,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACvD,MAAM,kBAAkB,GACtB,iDAAuB,CAAC,mCAAmC,CACzD,2CAAoB,CAAC,oBAAoB,CAAC,OAAO,EAAE,eAAe,CAAC,CACpE,CAAC;IACJ,KAAK,MAAM,SAAS,IAAI,kBAAkB;QAAE,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CACtC,iDAAuB,CAAC,YAAY,CACrC,CAAC;IACF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,eAAe,GACnB,iDAAuB,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACxD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,WAAW,GAAG,mBAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC3C,KAAK,MAAM,UAAU,IAAI,iDAAuB,CAAC,qBAAqB,CACpE,eAAe,CAChB,EAAE,CAAC;gBACF,MAAM,kBAAkB,GACtB,iDAAuB,CAAC,4BAA4B,CAClD,UAAU,EACV,WAAW,CACZ,CAAC;gBACJ,KAAK,MAAM,SAAS,IAAI,mCAAmC,CACzD,UAAU,EACV,QAAQ,EACR,kBAAkB,CACnB,EAAE,CAAC;oBACF,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;gBACxB,CAAC;gBACD,IAAI,kBAAkB,KAAK,SAAS,EAAE,CAAC;oBACrC,MAAM,CAAC,GAAG,CAAC,mBAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBAC/C,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,SAAS,mCAAmC,CAC1C,WAAmB,EACnB,UAAkB,EAClB,gBAAoC;IAEpC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,UAAU,IAAI,IAAA,2BAAa,EAAC,UAAU,CAAC,CAAC,OAAO,CAAC,KAAK,CAC9D,WAAW,CACZ,IAAI,EAAE,EAAE,CAAC;QACR,MAAM,gBAAgB,GAAG,mBAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAC1E,GAAG,CAAC,IAAI,CAAC,mBAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC,CAAC;QACtD,IAAI,IAAA,yDAA2B,EAAC,gBAAgB,EAAE,gBAAgB,EAAE,EAAE,CAAC;YACrE,MAAM;IACV,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -9,6 +9,8 @@ import type { ITtscParsedProjectConfig } from "../../../structures/internal/ITts
9
9
  * omitted entries can therefore read manifests and resolve native packages.
10
10
  *
11
11
  * @param entries - Explicit entries; `false` always returns `false`.
12
+ * @param pluginConfigDir - Original consumer directory for generated configs;
13
+ * omitted entries otherwise discover from the selected config directory.
12
14
  * @evidence contracts/common.md#principled-implementation Explicit false disables all plugin discovery; otherwise the shared entry resolver's enabled-not-false predicate checks the same population the loader would consider.
13
15
  * @evidence contracts/common.md#clear-and-simple-design The presence query delegates config/package selection to its owner instead of reproducing descriptor evaluation or build logic.
14
16
  * @evidence contracts/common.md#prohibited-implementation-shortcuts Enabled selection follows declared configuration, without assuming a known package marker or fabricating absence after a resolver error.
@@ -18,4 +20,4 @@ import type { ITtscParsedProjectConfig } from "../../../structures/internal/ITts
18
20
  * @evidence contracts/performance.md#efficient-algorithms Explicit false avoids discovery. Otherwise resolution materializes all entries before an at-most-linear enabled scan; explicit lists allocate one wrapper per entry, while omitted lists additionally incur ancestor, manifest-byte, dependency and native specifier-resolution work delegated to the entry resolver. No fixed project-size bound is imposed.
19
21
  * @evidenceExclude contracts/performance.md#reuse-equivalent-work This fresh presence observation coordinates no reusable producer result across calls; it neither retains package authority nor promises that subsequent loading avoids discovery again.
20
22
  */
21
- export declare function hasProjectPluginEntries(project: ITtscParsedProjectConfig, entries?: readonly ITtscProjectPluginConfig[] | false): boolean;
23
+ export declare function hasProjectPluginEntries(project: ITtscParsedProjectConfig, entries?: readonly ITtscProjectPluginConfig[] | false, pluginConfigDir?: string): boolean;
@@ -11,6 +11,8 @@ const ProjectPluginEntries_1 = require("./ProjectPluginEntries");
11
11
  * omitted entries can therefore read manifests and resolve native packages.
12
12
  *
13
13
  * @param entries - Explicit entries; `false` always returns `false`.
14
+ * @param pluginConfigDir - Original consumer directory for generated configs;
15
+ * omitted entries otherwise discover from the selected config directory.
14
16
  * @evidence contracts/common.md#principled-implementation Explicit false disables all plugin discovery; otherwise the shared entry resolver's enabled-not-false predicate checks the same population the loader would consider.
15
17
  * @evidence contracts/common.md#clear-and-simple-design The presence query delegates config/package selection to its owner instead of reproducing descriptor evaluation or build logic.
16
18
  * @evidence contracts/common.md#prohibited-implementation-shortcuts Enabled selection follows declared configuration, without assuming a known package marker or fabricating absence after a resolver error.
@@ -20,10 +22,10 @@ const ProjectPluginEntries_1 = require("./ProjectPluginEntries");
20
22
  * @evidence contracts/performance.md#efficient-algorithms Explicit false avoids discovery. Otherwise resolution materializes all entries before an at-most-linear enabled scan; explicit lists allocate one wrapper per entry, while omitted lists additionally incur ancestor, manifest-byte, dependency and native specifier-resolution work delegated to the entry resolver. No fixed project-size bound is imposed.
21
23
  * @evidenceExclude contracts/performance.md#reuse-equivalent-work This fresh presence observation coordinates no reusable producer result across calls; it neither retains package authority nor promises that subsequent loading avoids discovery again.
22
24
  */
23
- function hasProjectPluginEntries(project, entries) {
25
+ function hasProjectPluginEntries(project, entries, pluginConfigDir) {
24
26
  if (entries === false) {
25
27
  return false;
26
28
  }
27
- return ProjectPluginEntries_1.ProjectPluginEntries.resolvePluginEntries(project, entries).some((entry) => entry.config.enabled !== false);
29
+ return ProjectPluginEntries_1.ProjectPluginEntries.resolvePluginEntries(project, entries, pluginConfigDir).some((entry) => entry.config.enabled !== false);
28
30
  }
29
31
  //# sourceMappingURL=hasProjectPluginEntries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hasProjectPluginEntries.js","sourceRoot":"","sources":["../../../../src/plugin/internal/load/hasProjectPluginEntries.ts"],"names":[],"mappings":";;;AAEA,iEAA8D;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,iCACE,OAAiC,EACjC,OAAqD;IAErD,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,2CAAoB,CAAC,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CACrE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,KAAK,KAAK,CAC1C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"hasProjectPluginEntries.js","sourceRoot":"","sources":["../../../../src/plugin/internal/load/hasProjectPluginEntries.ts"],"names":[],"mappings":";;;AAEA,iEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iCACE,OAAiC,EACjC,OAAqD,EACrD,eAAwB;IAExB,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,2CAAoB,CAAC,oBAAoB,CAC9C,OAAO,EACP,OAAO,EACP,eAAe,CAChB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC;AACpD,CAAC"}
@@ -1,6 +1,8 @@
1
+ import { WatchInputPublication } from "../../../compiler/internal/build/WatchInputPublication";
1
2
  import type { ITtscProjectPluginConfig } from "../../../structures/ITtscProjectPluginConfig";
2
3
  import type { ITtscLoadedNativePlugin } from "../../../structures/internal/ITtscLoadedNativePlugin";
3
4
  import type { ITtscParsedProjectConfig } from "../../../structures/internal/ITtscParsedProjectConfig";
5
+ import type { TtscPluginSourceInputsHandler } from "../../../structures/internal/TtscSingleFileEmitOptions";
4
6
  import { PluginContentIdentities } from "../source/PluginContentIdentities";
5
7
  /**
6
8
  * Resolve, load, and build all native plugin sidecars for a TypeScript project.
@@ -31,6 +33,9 @@ import { PluginContentIdentities } from "../source/PluginContentIdentities";
31
33
  * declaration. Sequential content, metadata and physical-path observations are
32
34
  * not an atomic snapshot or detection of every omitted read.
33
35
  *
36
+ * Synchronous callers require synchronous watch-input handlers; use
37
+ * {@link loadProjectPlugins.async} to await a worker's baseline publication.
38
+ *
34
39
  * @param options.binary - Absolute path to the ttsc native helper binary.
35
40
  * @param options.cacheDir - Override the plugin binary cache directory.
36
41
  * @param options.cwd - Working directory for resolving relative paths.
@@ -41,11 +46,12 @@ import { PluginContentIdentities } from "../source/PluginContentIdentities";
41
46
  * native environment-name identity. Defaults to `process.env` for CLI
42
47
  * callers, so ambient behavior is unchanged.
43
48
  * @param options.file - Path to the tsconfig/jsconfig file.
44
- * @param options.pluginConfigDir - Caller-declared anchor for plugin
45
- * config-file discovery (see `ITtscPluginFactoryContext.pluginConfigDir`).
46
- * @param options.projectRoot - Override the project root directory.
49
+ * @param options.pluginConfigDir - Caller-declared consumer directory for
50
+ * plugin packages, factory contexts and config-file discovery.
51
+ * @param options.projectRoot - Override the source root, native working
52
+ * directory, cache anchor and returned relative Go-source base.
47
53
  * @param options.tsconfig - Alias for `file`.
48
- * @evidence contracts/common.md#principled-implementation The loader brackets project discovery observations, evaluates descriptors in isolated processes and validates declarations before publishing conservative source repair interests. Metadata refusal remains terminal; valid records narrow watch interests before final admission/build, while contradictory content or physical observations are omitted from proof rather than retroactively blessed.
54
+ * @evidence contracts/common.md#principled-implementation The loader brackets discovery at the selected config or explicit pluginConfigDir and factories receive that consumer anchor, independently of the source root retained for descriptor/native process cwd, caches and relative Go sources. It validates declarations before publishing conservative source repair interests. Metadata refusal remains terminal; valid records narrow watch interests before final admission/build, while contradictory content or physical observations are omitted from proof rather than retroactively blessed.
49
55
  * @evidence contracts/common.md#clear-and-simple-design The operation owns one ordered load generation; private helpers separate discovery, evaluation, validation, composition and proof merging, while package resolution and source building remain their own modules.
50
56
  * @evidence contracts/common.md#prohibited-implementation-shortcuts Descriptor module caches are isolated rather than deleting application singletons. ttsx retry occurs only for explicit supported TypeScript loader incompatibility, with plugins disabled to avoid recursive self-hosting; arbitrary descriptor failures are not retried into false success.
51
57
  * @evidence contracts/common.md#meaningful-documentation Native JSDoc explains result provenance, environment and path options; helper comments explain input races, conservative proof omission, fallback authority and cleanup. Member/tag spacing and separated concepts follow the documentation skill.
@@ -76,7 +82,7 @@ export declare function loadProjectPlugins(options: {
76
82
  * Observe plugin build roots before building, including failed builds, with
77
83
  * the record store that proves their states (#1728).
78
84
  */
79
- onWatchInputs?: (inputs: readonly string[], identities?: PluginContentIdentities.Store) => void;
85
+ onWatchInputs?: TtscPluginSourceInputsHandler;
80
86
  /** Caller-selected anchor for plugin-owned configuration discovery. */
81
87
  pluginConfigDir?: string;
82
88
  /** Project root override for generated config wrappers. */
@@ -124,3 +130,28 @@ export declare function loadProjectPlugins(options: {
124
130
  /** Resolved project values and logical/physical configuration identity. */
125
131
  project: ITtscParsedProjectConfig;
126
132
  };
133
+ /**
134
+ * Keep synchronous loading and awaited watch handoffs on one load sequence.
135
+ *
136
+ * @evidence contracts/common.md#principled-implementation Both completion modes advance one ordered discovery, admission, publication and build sequence. Awaited stepping preserves baseline-before-read handoffs before package selection and source builds, including empty selection and conservative repair roots.
137
+ * @evidence contracts/common.md#clear-and-simple-design The namespace adds an awaited runner beside synchronous loading and exposes one generator to build orchestration; existing helpers retain discovery, validation and compilation responsibilities.
138
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Publication suspension retains failed-build interests and source proof rather than rebuilding a baseline after compilation. Pending publication cannot establish observation; rejection enters the real load failure path without replacing admission or native builds.
139
+ * @evidence contracts/common.md#meaningful-documentation Entry prose distinguishes completion modes, baseline-before-read ordering and internal sequence completion/rejection duties; the primary loader documents input and result provenance.
140
+ * @evidence contracts/portability.md#os-neutral-implementation The shared sequence retains existing native resolution, paths, environment and argument-array handling; the namespace adds no independent boundary.
141
+ * @evidence contracts/performance.md#efficient-algorithms Discovery, source hashing, Go metadata, validation and builds retain their original input costs; each publication adds one suspension without repeating those phases.
142
+ * @evidence contracts/performance.md#reuse-equivalent-work Validated descriptor/source records and load-local digest/reader sharing remain available across suspension; the completion wrapper retains no reusable load or in-flight cache.
143
+ * @evidence contracts/performance.md#bound-retention-and-release-resources One load generation stays live while its current handoff settles; evaluator cleanup and returned-generation ownership remain with the sequence, and handler rejection enters generator cleanup.
144
+ */
145
+ export declare namespace loadProjectPlugins {
146
+ /**
147
+ * Load plugins after each watch owner confirms its reported input baseline. A
148
+ * rejected handoff fails loading before the next source read or build.
149
+ */
150
+ function async(options: Parameters<typeof loadProjectPlugins>[0]): Promise<ReturnType<typeof loadProjectPlugins>>;
151
+ /**
152
+ * Produce one load, suspending at each watch-input handoff before continuing.
153
+ * Internal build orchestration consumes the whole sequence with its chosen
154
+ * completion runner; it must deliver rejection back into the sequence.
155
+ */
156
+ function steps(options: Parameters<typeof loadProjectPlugins>[0]): WatchInputPublication.Sequence<ReturnType<typeof loadProjectPlugins>>;
157
+ }