@ttsc/unplugin 0.38.1 → 0.38.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.
- package/README.md +1 -1
- package/lib/core/bridge/HostWatchBridge.d.cts +1 -1
- package/lib/core/bridge/HostWatchBridge.d.mts +1 -1
- package/lib/core/bridge/HostWatchBridge.d.ts +1 -1
- package/lib/core/bridge/MANAGED_PROJECT_RECORDS.d.cts +2 -0
- package/lib/core/bridge/MANAGED_PROJECT_RECORDS.d.mts +2 -0
- package/lib/core/bridge/MANAGED_PROJECT_RECORDS.d.ts +2 -0
- package/lib/core/bridge/MANAGED_PROJECT_RECORDS.js +7 -0
- package/lib/core/bridge/MANAGED_PROJECT_RECORDS.js.map +1 -0
- package/lib/core/bridge/MANAGED_PROJECT_RECORDS.mjs +5 -0
- package/lib/core/bridge/MANAGED_PROJECT_RECORDS.mjs.map +1 -0
- package/lib/core/bridge/TtscProjectRecord.d.cts +9 -0
- package/lib/core/bridge/TtscProjectRecord.d.mts +9 -0
- package/lib/core/bridge/TtscProjectRecord.d.ts +9 -0
- package/lib/core/bridge/fallbackRecordStorage.d.cts +33 -0
- package/lib/core/bridge/fallbackRecordStorage.d.mts +33 -0
- package/lib/core/bridge/fallbackRecordStorage.d.ts +33 -0
- package/lib/core/bridge/fallbackRecordStorage.js +96 -0
- package/lib/core/bridge/fallbackRecordStorage.js.map +1 -0
- package/lib/core/bridge/fallbackRecordStorage.mjs +94 -0
- package/lib/core/bridge/fallbackRecordStorage.mjs.map +1 -0
- package/lib/core/bridge/fallbackToolDirectory.d.cts +11 -15
- package/lib/core/bridge/fallbackToolDirectory.d.mts +11 -15
- package/lib/core/bridge/fallbackToolDirectory.d.ts +11 -15
- package/lib/core/bridge/fallbackToolDirectory.js +19 -30
- package/lib/core/bridge/fallbackToolDirectory.js.map +1 -1
- package/lib/core/bridge/fallbackToolDirectory.mjs +19 -30
- package/lib/core/bridge/fallbackToolDirectory.mjs.map +1 -1
- package/lib/core/bridge/fallbackToolDirectoryLocation.d.cts +14 -0
- package/lib/core/bridge/fallbackToolDirectoryLocation.d.mts +14 -0
- package/lib/core/bridge/fallbackToolDirectoryLocation.d.ts +14 -0
- package/lib/core/bridge/fallbackToolDirectoryLocation.js +38 -0
- package/lib/core/bridge/fallbackToolDirectoryLocation.js.map +1 -0
- package/lib/core/bridge/fallbackToolDirectoryLocation.mjs +36 -0
- package/lib/core/bridge/fallbackToolDirectoryLocation.mjs.map +1 -0
- package/lib/core/bridge/hostToolDirectory.d.cts +13 -46
- package/lib/core/bridge/hostToolDirectory.d.mts +13 -46
- package/lib/core/bridge/hostToolDirectory.d.ts +13 -46
- package/lib/core/bridge/hostToolDirectory.js +14 -47
- package/lib/core/bridge/hostToolDirectory.js.map +1 -1
- package/lib/core/bridge/hostToolDirectory.mjs +14 -47
- package/lib/core/bridge/hostToolDirectory.mjs.map +1 -1
- package/lib/core/bridge/openHostWatchBridge.d.cts +11 -1
- package/lib/core/bridge/openHostWatchBridge.d.mts +11 -1
- package/lib/core/bridge/openHostWatchBridge.d.ts +11 -1
- package/lib/core/bridge/openHostWatchBridge.js +28 -6
- package/lib/core/bridge/openHostWatchBridge.js.map +1 -1
- package/lib/core/bridge/openHostWatchBridge.mjs +28 -6
- package/lib/core/bridge/openHostWatchBridge.mjs.map +1 -1
- package/lib/core/bridge/prepareProjectRecordDirectory.d.cts +41 -0
- package/lib/core/bridge/prepareProjectRecordDirectory.d.mts +41 -0
- package/lib/core/bridge/prepareProjectRecordDirectory.d.ts +41 -0
- package/lib/core/bridge/prepareProjectRecordDirectory.js +127 -0
- package/lib/core/bridge/prepareProjectRecordDirectory.js.map +1 -0
- package/lib/core/bridge/prepareProjectRecordDirectory.mjs +125 -0
- package/lib/core/bridge/prepareProjectRecordDirectory.mjs.map +1 -0
- package/lib/core/bridge/privateProjectRecordAvailable.d.cts +13 -0
- package/lib/core/bridge/privateProjectRecordAvailable.d.mts +13 -0
- package/lib/core/bridge/privateProjectRecordAvailable.d.ts +13 -0
- package/lib/core/bridge/privateProjectRecordAvailable.js +31 -0
- package/lib/core/bridge/privateProjectRecordAvailable.js.map +1 -0
- package/lib/core/bridge/privateProjectRecordAvailable.mjs +29 -0
- package/lib/core/bridge/privateProjectRecordAvailable.mjs.map +1 -0
- package/lib/core/bridge/projectRecordMoved.js +5 -0
- package/lib/core/bridge/projectRecordMoved.js.map +1 -1
- package/lib/core/bridge/projectRecordMoved.mjs +5 -0
- package/lib/core/bridge/projectRecordMoved.mjs.map +1 -1
- package/lib/core/bridge/projectRecordWatchInputs.js +6 -0
- package/lib/core/bridge/projectRecordWatchInputs.js.map +1 -1
- package/lib/core/bridge/projectRecordWatchInputs.mjs +6 -0
- package/lib/core/bridge/projectRecordWatchInputs.mjs.map +1 -1
- package/lib/core/bridge/readProjectRecordFile.js +23 -1
- package/lib/core/bridge/readProjectRecordFile.js.map +1 -1
- package/lib/core/bridge/readProjectRecordFile.mjs +23 -1
- package/lib/core/bridge/readProjectRecordFile.mjs.map +1 -1
- package/lib/core/bridge/refreshProjectRecordFile.d.cts +7 -2
- package/lib/core/bridge/refreshProjectRecordFile.d.mts +7 -2
- package/lib/core/bridge/refreshProjectRecordFile.d.ts +7 -2
- package/lib/core/bridge/refreshProjectRecordFile.js +24 -7
- package/lib/core/bridge/refreshProjectRecordFile.js.map +1 -1
- package/lib/core/bridge/refreshProjectRecordFile.mjs +24 -7
- package/lib/core/bridge/refreshProjectRecordFile.mjs.map +1 -1
- package/lib/core/bridge/refreshProjectRecordFiles.d.cts +7 -4
- package/lib/core/bridge/refreshProjectRecordFiles.d.mts +7 -4
- package/lib/core/bridge/refreshProjectRecordFiles.d.ts +7 -4
- package/lib/core/bridge/refreshProjectRecordFiles.js +30 -8
- package/lib/core/bridge/refreshProjectRecordFiles.js.map +1 -1
- package/lib/core/bridge/refreshProjectRecordFiles.mjs +30 -8
- package/lib/core/bridge/refreshProjectRecordFiles.mjs.map +1 -1
- package/lib/core/bridge/registerProjectRecord.js +3 -1
- package/lib/core/bridge/registerProjectRecord.js.map +1 -1
- package/lib/core/bridge/registerProjectRecord.mjs +3 -1
- package/lib/core/bridge/registerProjectRecord.mjs.map +1 -1
- package/lib/core/bridge/signalProjectRecordFile.d.cts +7 -2
- package/lib/core/bridge/signalProjectRecordFile.d.mts +7 -2
- package/lib/core/bridge/signalProjectRecordFile.d.ts +7 -2
- package/lib/core/bridge/signalProjectRecordFile.js +18 -5
- package/lib/core/bridge/signalProjectRecordFile.js.map +1 -1
- package/lib/core/bridge/signalProjectRecordFile.mjs +18 -5
- package/lib/core/bridge/signalProjectRecordFile.mjs.map +1 -1
- package/lib/core/bridge/writeProjectRecordFile.js +7 -3
- package/lib/core/bridge/writeProjectRecordFile.js.map +1 -1
- package/lib/core/bridge/writeProjectRecordFile.mjs +7 -3
- package/lib/core/bridge/writeProjectRecordFile.mjs.map +1 -1
- package/lib/core/esbuild/createEsbuildOptions.js +9 -7
- package/lib/core/esbuild/createEsbuildOptions.js.map +1 -1
- package/lib/core/esbuild/createEsbuildOptions.mjs +9 -7
- package/lib/core/esbuild/createEsbuildOptions.mjs.map +1 -1
- package/lib/core/farm/createFarmRecordUpdates.d.cts +63 -0
- package/lib/core/farm/createFarmRecordUpdates.d.mts +63 -0
- package/lib/core/farm/createFarmRecordUpdates.d.ts +63 -0
- package/lib/core/farm/createFarmRecordUpdates.js +129 -0
- package/lib/core/farm/createFarmRecordUpdates.js.map +1 -0
- package/lib/core/farm/createFarmRecordUpdates.mjs +127 -0
- package/lib/core/farm/createFarmRecordUpdates.mjs.map +1 -0
- package/lib/core/farm/farmPersistentCacheWithoutRecords.d.cts +15 -40
- package/lib/core/farm/farmPersistentCacheWithoutRecords.d.mts +15 -40
- package/lib/core/farm/farmPersistentCacheWithoutRecords.d.ts +15 -40
- package/lib/core/farm/farmPersistentCacheWithoutRecords.js +23 -56
- package/lib/core/farm/farmPersistentCacheWithoutRecords.js.map +1 -1
- package/lib/core/farm/farmPersistentCacheWithoutRecords.mjs +23 -56
- package/lib/core/farm/farmPersistentCacheWithoutRecords.mjs.map +1 -1
- package/lib/core/farm/farmRecordFallback.d.cts +15 -15
- package/lib/core/farm/farmRecordFallback.d.mts +15 -15
- package/lib/core/farm/farmRecordFallback.d.ts +15 -15
- package/lib/core/farm/farmRecordFallback.js +22 -20
- package/lib/core/farm/farmRecordFallback.js.map +1 -1
- package/lib/core/farm/farmRecordFallback.mjs +22 -20
- package/lib/core/farm/farmRecordFallback.mjs.map +1 -1
- package/lib/core/next/next.js +5 -4
- package/lib/core/next/next.js.map +1 -1
- package/lib/core/next/next.mjs +5 -4
- package/lib/core/next/next.mjs.map +1 -1
- package/lib/core/observer/InputCondition.d.cts +5 -0
- package/lib/core/observer/InputCondition.d.mts +5 -0
- package/lib/core/observer/InputCondition.d.ts +5 -0
- package/lib/core/observer/InputObserverChange.d.cts +2 -0
- package/lib/core/observer/InputObserverChange.d.mts +2 -0
- package/lib/core/observer/InputObserverChange.d.ts +2 -0
- package/lib/core/observer/createInputObserver.d.cts +3 -1
- package/lib/core/observer/createInputObserver.d.mts +3 -1
- package/lib/core/observer/createInputObserver.d.ts +3 -1
- package/lib/core/observer/createInputObserver.js +179 -26
- package/lib/core/observer/createInputObserver.js.map +1 -1
- package/lib/core/observer/createInputObserver.mjs +180 -27
- package/lib/core/observer/createInputObserver.mjs.map +1 -1
- package/lib/core/observer/ttscWriteDirectories.d.cts +31 -0
- package/lib/core/observer/ttscWriteDirectories.d.mts +31 -0
- package/lib/core/observer/ttscWriteDirectories.d.ts +31 -0
- package/lib/core/observer/ttscWriteDirectories.js +59 -0
- package/lib/core/observer/ttscWriteDirectories.js.map +1 -0
- package/lib/core/observer/ttscWriteDirectories.mjs +57 -0
- package/lib/core/observer/ttscWriteDirectories.mjs.map +1 -0
- package/lib/core/rollup/TtscRollupDelivery.d.cts +2 -0
- package/lib/core/rollup/TtscRollupDelivery.d.mts +2 -0
- package/lib/core/rollup/TtscRollupDelivery.d.ts +2 -0
- package/lib/core/rollup/createRollupCachedModuleProof.d.cts +15 -11
- package/lib/core/rollup/createRollupCachedModuleProof.d.mts +15 -11
- package/lib/core/rollup/createRollupCachedModuleProof.d.ts +15 -11
- package/lib/core/rollup/createRollupCachedModuleProof.js +62 -33
- package/lib/core/rollup/createRollupCachedModuleProof.js.map +1 -1
- package/lib/core/rollup/createRollupCachedModuleProof.mjs +62 -33
- package/lib/core/rollup/createRollupCachedModuleProof.mjs.map +1 -1
- package/lib/core/rollup/rollupDeliveryOptions.d.cts +6 -4
- package/lib/core/rollup/rollupDeliveryOptions.d.mts +6 -4
- package/lib/core/rollup/rollupDeliveryOptions.d.ts +6 -4
- package/lib/core/rollup/rollupDeliveryOptions.js +7 -4
- package/lib/core/rollup/rollupDeliveryOptions.js.map +1 -1
- package/lib/core/rollup/rollupDeliveryOptions.mjs +7 -4
- package/lib/core/rollup/rollupDeliveryOptions.mjs.map +1 -1
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.cts +7 -0
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.mts +7 -0
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.ts +7 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.cts +3 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.d.mts +3 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.d.ts +3 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.js +7 -4
- package/lib/core/transform/cache/selectCachedGenerationAction.js.map +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs +7 -4
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs.map +1 -1
- package/lib/core/transform/deliverCachedTransform.js +1 -0
- package/lib/core/transform/deliverCachedTransform.js.map +1 -1
- package/lib/core/transform/deliverCachedTransform.mjs +1 -0
- package/lib/core/transform/deliverCachedTransform.mjs.map +1 -1
- package/lib/core/transform/envelope/TtscEnvelopeDerivation.d.cts +6 -15
- package/lib/core/transform/envelope/TtscEnvelopeDerivation.d.mts +6 -15
- package/lib/core/transform/envelope/TtscEnvelopeDerivation.d.ts +6 -15
- package/lib/core/transform/envelope/collectDeclaredIdentities.d.cts +1 -1
- package/lib/core/transform/envelope/collectDeclaredIdentities.d.mts +1 -1
- package/lib/core/transform/envelope/collectDeclaredIdentities.d.ts +1 -1
- package/lib/core/transform/envelope/collectDeclaredIdentities.js.map +1 -1
- package/lib/core/transform/envelope/collectDeclaredIdentities.mjs.map +1 -1
- package/lib/core/transform/envelope/createEnvelopeKeyIndex.d.cts +1 -1
- package/lib/core/transform/envelope/createEnvelopeKeyIndex.d.mts +1 -1
- package/lib/core/transform/envelope/createEnvelopeKeyIndex.d.ts +1 -1
- package/lib/core/transform/envelope/createEnvelopeKeyIndex.js.map +1 -1
- package/lib/core/transform/envelope/createEnvelopeKeyIndex.mjs.map +1 -1
- package/lib/core/transform/envelope/declaresCompleteDependencies.d.cts +2 -2
- package/lib/core/transform/envelope/declaresCompleteDependencies.d.mts +2 -2
- package/lib/core/transform/envelope/declaresCompleteDependencies.d.ts +2 -2
- package/lib/core/transform/envelope/declaresCompleteDependencies.js +2 -1
- package/lib/core/transform/envelope/declaresCompleteDependencies.js.map +1 -1
- package/lib/core/transform/envelope/declaresCompleteDependencies.mjs +2 -1
- package/lib/core/transform/envelope/declaresCompleteDependencies.mjs.map +1 -1
- package/lib/core/transform/envelope/derivationIdentity.d.cts +1 -1
- package/lib/core/transform/envelope/derivationIdentity.d.mts +1 -1
- package/lib/core/transform/envelope/derivationIdentity.d.ts +1 -1
- package/lib/core/transform/envelope/derivationIdentity.js.map +1 -1
- package/lib/core/transform/envelope/derivationIdentity.mjs.map +1 -1
- package/lib/core/transform/envelope/deriveWatchInputs.js +4 -64
- package/lib/core/transform/envelope/deriveWatchInputs.js.map +1 -1
- package/lib/core/transform/envelope/deriveWatchInputs.mjs +4 -64
- package/lib/core/transform/envelope/deriveWatchInputs.mjs.map +1 -1
- package/lib/core/transform/envelope/deriveWatchInputsFromIndexes.d.cts +24 -0
- package/lib/core/transform/envelope/deriveWatchInputsFromIndexes.d.mts +24 -0
- package/lib/core/transform/envelope/deriveWatchInputsFromIndexes.d.ts +24 -0
- package/lib/core/transform/envelope/deriveWatchInputsFromIndexes.js +84 -0
- package/lib/core/transform/envelope/deriveWatchInputsFromIndexes.js.map +1 -0
- package/lib/core/transform/envelope/deriveWatchInputsFromIndexes.mjs +82 -0
- package/lib/core/transform/envelope/deriveWatchInputsFromIndexes.mjs.map +1 -0
- package/lib/core/transform/envelope/envelopeDerivation.js +1 -0
- package/lib/core/transform/envelope/envelopeDerivation.js.map +1 -1
- package/lib/core/transform/envelope/envelopeDerivation.mjs +1 -0
- package/lib/core/transform/envelope/envelopeDerivation.mjs.map +1 -1
- package/lib/core/transform/envelope/envelopeGraphIndexes.d.cts +2 -1
- package/lib/core/transform/envelope/envelopeGraphIndexes.d.mts +2 -1
- package/lib/core/transform/envelope/envelopeGraphIndexes.d.ts +2 -1
- package/lib/core/transform/envelope/envelopeGraphIndexes.js +2 -1
- package/lib/core/transform/envelope/envelopeGraphIndexes.js.map +1 -1
- package/lib/core/transform/envelope/envelopeGraphIndexes.mjs +2 -1
- package/lib/core/transform/envelope/envelopeGraphIndexes.mjs.map +1 -1
- package/lib/core/transform/envelope/isVolatileFile.d.cts +2 -2
- package/lib/core/transform/envelope/isVolatileFile.d.mts +2 -2
- package/lib/core/transform/envelope/isVolatileFile.d.ts +2 -2
- package/lib/core/transform/envelope/isVolatileFile.js +1 -1
- package/lib/core/transform/envelope/isVolatileFile.js.map +1 -1
- package/lib/core/transform/envelope/isVolatileFile.mjs +1 -1
- package/lib/core/transform/envelope/isVolatileFile.mjs.map +1 -1
- package/lib/core/transform/envelope/selectFileDependencies.d.cts +4 -5
- package/lib/core/transform/envelope/selectFileDependencies.d.mts +4 -5
- package/lib/core/transform/envelope/selectFileDependencies.d.ts +4 -5
- package/lib/core/transform/envelope/selectFileDependencies.js +3 -10
- package/lib/core/transform/envelope/selectFileDependencies.js.map +1 -1
- package/lib/core/transform/envelope/selectFileDependencies.mjs +3 -10
- package/lib/core/transform/envelope/selectFileDependencies.mjs.map +1 -1
- package/lib/core/transform/envelope/selectGraphInputs.d.cts +2 -5
- package/lib/core/transform/envelope/selectGraphInputs.d.mts +2 -5
- package/lib/core/transform/envelope/selectGraphInputs.d.ts +2 -5
- package/lib/core/transform/envelope/selectGraphInputs.js +5 -4
- package/lib/core/transform/envelope/selectGraphInputs.js.map +1 -1
- package/lib/core/transform/envelope/selectGraphInputs.mjs +5 -4
- package/lib/core/transform/envelope/selectGraphInputs.mjs.map +1 -1
- package/lib/core/transform/envelope/selectHostInputs.d.cts +1 -1
- package/lib/core/transform/envelope/selectHostInputs.d.mts +1 -1
- package/lib/core/transform/envelope/selectHostInputs.d.ts +1 -1
- package/lib/core/transform/envelope/selectHostInputs.js +4 -1
- package/lib/core/transform/envelope/selectHostInputs.js.map +1 -1
- package/lib/core/transform/envelope/selectHostInputs.mjs +4 -1
- package/lib/core/transform/envelope/selectHostInputs.mjs.map +1 -1
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.d.cts +8 -7
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.d.mts +8 -7
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.d.ts +8 -7
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.js +11 -8
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.js.map +1 -1
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.mjs +11 -8
- package/lib/core/transform/envelope/selectNotifiableAbsentInputs.mjs.map +1 -1
- package/lib/core/transform/envelope/selectReachableEdges.d.cts +1 -1
- package/lib/core/transform/envelope/selectReachableEdges.d.mts +1 -1
- package/lib/core/transform/envelope/selectReachableEdges.d.ts +1 -1
- package/lib/core/transform/envelope/selectReachableEdges.js.map +1 -1
- package/lib/core/transform/envelope/selectReachableEdges.mjs.map +1 -1
- package/lib/core/transform/envelope/selectReachableSources.d.cts +1 -1
- package/lib/core/transform/envelope/selectReachableSources.d.mts +1 -1
- package/lib/core/transform/envelope/selectReachableSources.d.ts +1 -1
- package/lib/core/transform/envelope/selectReachableSources.js.map +1 -1
- package/lib/core/transform/envelope/selectReachableSources.mjs.map +1 -1
- package/lib/core/transform/envelope/selectResolutionCandidateInputs.d.cts +1 -6
- package/lib/core/transform/envelope/selectResolutionCandidateInputs.d.mts +1 -6
- package/lib/core/transform/envelope/selectResolutionCandidateInputs.d.ts +1 -6
- package/lib/core/transform/envelope/selectResolutionCandidateInputs.js +3 -6
- package/lib/core/transform/envelope/selectResolutionCandidateInputs.js.map +1 -1
- package/lib/core/transform/envelope/selectResolutionCandidateInputs.mjs +3 -6
- package/lib/core/transform/envelope/selectResolutionCandidateInputs.mjs.map +1 -1
- package/lib/core/transform/filesystem/userStateDirectory.d.cts +22 -4
- package/lib/core/transform/filesystem/userStateDirectory.d.mts +22 -4
- package/lib/core/transform/filesystem/userStateDirectory.d.ts +22 -4
- package/lib/core/transform/filesystem/userStateDirectory.js +37 -12
- package/lib/core/transform/filesystem/userStateDirectory.js.map +1 -1
- package/lib/core/transform/filesystem/userStateDirectory.mjs +37 -12
- package/lib/core/transform/filesystem/userStateDirectory.mjs.map +1 -1
- package/lib/core/transform/generation/TtscFailedGenerationValidation.d.cts +3 -0
- package/lib/core/transform/generation/TtscFailedGenerationValidation.d.mts +3 -0
- package/lib/core/transform/generation/TtscFailedGenerationValidation.d.ts +3 -0
- package/lib/core/transform/generation/captureTransformGeneration.js +51 -13
- package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs +51 -13
- package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
- package/lib/core/transform/generation/createUnstableGenerationError.d.cts +5 -3
- package/lib/core/transform/generation/createUnstableGenerationError.d.mts +5 -3
- package/lib/core/transform/generation/createUnstableGenerationError.d.ts +5 -3
- package/lib/core/transform/generation/createUnstableGenerationError.js +21 -4
- package/lib/core/transform/generation/createUnstableGenerationError.js.map +1 -1
- package/lib/core/transform/generation/createUnstableGenerationError.mjs +21 -4
- package/lib/core/transform/generation/createUnstableGenerationError.mjs.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.d.cts +5 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.d.mts +5 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.d.ts +5 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js +13 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs +14 -2
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs.map +1 -1
- package/lib/core/transform/inputs/hostInputRealpath.d.cts +9 -8
- package/lib/core/transform/inputs/hostInputRealpath.d.mts +9 -8
- package/lib/core/transform/inputs/hostInputRealpath.d.ts +9 -8
- package/lib/core/transform/inputs/hostInputRealpath.js +12 -8
- package/lib/core/transform/inputs/hostInputRealpath.js.map +1 -1
- package/lib/core/transform/inputs/hostInputRealpath.mjs +12 -8
- package/lib/core/transform/inputs/hostInputRealpath.mjs.map +1 -1
- package/lib/core/transform/inputs/sameHostInputRealpath.d.cts +3 -2
- package/lib/core/transform/inputs/sameHostInputRealpath.d.mts +3 -2
- package/lib/core/transform/inputs/sameHostInputRealpath.d.ts +3 -2
- package/lib/core/transform/inputs/sameHostInputRealpath.js +5 -2
- package/lib/core/transform/inputs/sameHostInputRealpath.js.map +1 -1
- package/lib/core/transform/inputs/sameHostInputRealpath.mjs +5 -2
- package/lib/core/transform/inputs/sameHostInputRealpath.mjs.map +1 -1
- package/lib/core/transform/session/claimSharedCompile.js +2 -0
- package/lib/core/transform/session/claimSharedCompile.js.map +1 -1
- package/lib/core/transform/session/claimSharedCompile.mjs +2 -0
- package/lib/core/transform/session/claimSharedCompile.mjs.map +1 -1
- package/lib/core/transform/transformTtsc.d.cts +1 -1
- package/lib/core/transform/transformTtsc.d.mts +1 -1
- package/lib/core/transform/transformTtsc.d.ts +1 -1
- package/lib/core/transform/transformTtsc.js +26 -8
- package/lib/core/transform/transformTtsc.js.map +1 -1
- package/lib/core/transform/transformTtsc.mjs +26 -8
- package/lib/core/transform/transformTtsc.mjs.map +1 -1
- package/lib/core/transform/tsconfig/createTransformScratchDirectory.d.cts +11 -9
- package/lib/core/transform/tsconfig/createTransformScratchDirectory.d.mts +11 -9
- package/lib/core/transform/tsconfig/createTransformScratchDirectory.d.ts +11 -9
- package/lib/core/transform/tsconfig/createTransformScratchDirectory.js +31 -32
- package/lib/core/transform/tsconfig/createTransformScratchDirectory.js.map +1 -1
- package/lib/core/transform/tsconfig/createTransformScratchDirectory.mjs +31 -32
- package/lib/core/transform/tsconfig/createTransformScratchDirectory.mjs.map +1 -1
- package/lib/core/transform/validation/TtscGenerationProof.d.cts +19 -2
- package/lib/core/transform/validation/TtscGenerationProof.d.mts +19 -2
- package/lib/core/transform/validation/TtscGenerationProof.d.ts +19 -2
- package/lib/core/transform/validation/TtscGenerationProof.js +41 -2
- package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -1
- package/lib/core/transform/validation/TtscGenerationProof.mjs +42 -3
- package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js +9 -0
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +10 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCachedExternalInputs.d.cts +6 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.d.mts +6 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.d.ts +6 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.js +8 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesCachedExternalInputs.mjs +8 -2
- package/lib/core/transform/validation/matchesCachedExternalInputs.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.cts +8 -7
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.mts +8 -7
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.ts +8 -7
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js +19 -9
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs +19 -9
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs.map +1 -1
- package/lib/core/transform/validation/matchesExternalInputRealpaths.d.cts +7 -4
- package/lib/core/transform/validation/matchesExternalInputRealpaths.d.mts +7 -4
- package/lib/core/transform/validation/matchesExternalInputRealpaths.d.ts +7 -4
- package/lib/core/transform/validation/matchesExternalInputRealpaths.js +9 -4
- package/lib/core/transform/validation/matchesExternalInputRealpaths.js.map +1 -1
- package/lib/core/transform/validation/matchesExternalInputRealpaths.mjs +9 -4
- package/lib/core/transform/validation/matchesExternalInputRealpaths.mjs.map +1 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.cts +5 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.mts +5 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.ts +5 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.js +62 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs +62 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs.map +1 -1
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.cts +7 -6
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.mts +7 -6
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.ts +7 -6
- package/lib/core/transform/validation/nativeInputPredicatesHold.js +16 -6
- package/lib/core/transform/validation/nativeInputPredicatesHold.js.map +1 -1
- package/lib/core/transform/validation/nativeInputPredicatesHold.mjs +16 -6
- package/lib/core/transform/validation/nativeInputPredicatesHold.mjs.map +1 -1
- package/lib/core/transform/watch/RECOVERY_TREE_DIGEST.d.cts +8 -0
- package/lib/core/transform/watch/RECOVERY_TREE_DIGEST.d.mts +8 -0
- package/lib/core/transform/watch/RECOVERY_TREE_DIGEST.d.ts +8 -0
- package/lib/core/transform/watch/RECOVERY_TREE_DIGEST.js +12 -0
- package/lib/core/transform/watch/RECOVERY_TREE_DIGEST.js.map +1 -0
- package/lib/core/transform/watch/RECOVERY_TREE_DIGEST.mjs +10 -0
- package/lib/core/transform/watch/RECOVERY_TREE_DIGEST.mjs.map +1 -0
- package/lib/core/transform/watch/TtscProjectRegistration.d.cts +3 -0
- package/lib/core/transform/watch/TtscProjectRegistration.d.mts +3 -0
- package/lib/core/transform/watch/TtscProjectRegistration.d.ts +3 -0
- package/lib/core/transform/watch/TtscProjectRegistration.js +3 -0
- package/lib/core/transform/watch/TtscProjectRegistration.js.map +1 -0
- package/lib/core/transform/watch/TtscProjectRegistration.mjs +2 -0
- package/lib/core/transform/watch/TtscProjectRegistration.mjs.map +1 -0
- package/lib/core/transform/watch/TtscTransformHooks.d.cts +33 -12
- package/lib/core/transform/watch/TtscTransformHooks.d.mts +33 -12
- package/lib/core/transform/watch/TtscTransformHooks.d.ts +33 -12
- package/lib/core/transform/watch/TtscTransformHooks.js +3 -0
- package/lib/core/transform/watch/TtscTransformHooks.js.map +1 -0
- package/lib/core/transform/watch/TtscTransformHooks.mjs +2 -0
- package/lib/core/transform/watch/TtscTransformHooks.mjs.map +1 -0
- package/lib/core/transform/watch/TtscWatchInputEvidence.d.cts +3 -0
- package/lib/core/transform/watch/TtscWatchInputEvidence.d.mts +3 -0
- package/lib/core/transform/watch/TtscWatchInputEvidence.d.ts +3 -0
- package/lib/core/transform/watch/TtscWorkspaceWatchEvidence.d.cts +14 -0
- package/lib/core/transform/watch/TtscWorkspaceWatchEvidence.d.mts +14 -0
- package/lib/core/transform/watch/TtscWorkspaceWatchEvidence.d.ts +14 -0
- package/lib/core/transform/watch/captureRecoveryTreeDigest.d.cts +26 -0
- package/lib/core/transform/watch/captureRecoveryTreeDigest.d.mts +26 -0
- package/lib/core/transform/watch/captureRecoveryTreeDigest.d.ts +26 -0
- package/lib/core/transform/watch/captureRecoveryTreeDigest.js +54 -0
- package/lib/core/transform/watch/captureRecoveryTreeDigest.js.map +1 -0
- package/lib/core/transform/watch/captureRecoveryTreeDigest.mjs +52 -0
- package/lib/core/transform/watch/captureRecoveryTreeDigest.mjs.map +1 -0
- package/lib/core/transform/watch/evidencedWatchInput.js +6 -0
- package/lib/core/transform/watch/evidencedWatchInput.js.map +1 -1
- package/lib/core/transform/watch/evidencedWatchInput.mjs +6 -0
- package/lib/core/transform/watch/evidencedWatchInput.mjs.map +1 -1
- package/lib/core/transform/watch/handWatchInputs.d.cts +4 -4
- package/lib/core/transform/watch/handWatchInputs.d.mts +4 -4
- package/lib/core/transform/watch/handWatchInputs.d.ts +4 -4
- package/lib/core/transform/watch/handWatchInputs.js +21 -5
- package/lib/core/transform/watch/handWatchInputs.js.map +1 -1
- package/lib/core/transform/watch/handWatchInputs.mjs +21 -5
- package/lib/core/transform/watch/handWatchInputs.mjs.map +1 -1
- package/lib/core/transform/watch/notifyFailedGenerationInputs.d.cts +8 -1
- package/lib/core/transform/watch/notifyFailedGenerationInputs.d.mts +8 -1
- package/lib/core/transform/watch/notifyFailedGenerationInputs.d.ts +8 -1
- package/lib/core/transform/watch/notifyFailedGenerationInputs.js +51 -9
- package/lib/core/transform/watch/notifyFailedGenerationInputs.js.map +1 -1
- package/lib/core/transform/watch/notifyFailedGenerationInputs.mjs +51 -9
- package/lib/core/transform/watch/notifyFailedGenerationInputs.mjs.map +1 -1
- package/lib/core/transform/watch/notifyProjectRecord.js +55 -20
- package/lib/core/transform/watch/notifyProjectRecord.js.map +1 -1
- package/lib/core/transform/watch/notifyProjectRecord.mjs +55 -20
- package/lib/core/transform/watch/notifyProjectRecord.mjs.map +1 -1
- package/lib/core/transform/watch/notifyRejectedGenerationInputs.js +20 -10
- package/lib/core/transform/watch/notifyRejectedGenerationInputs.js.map +1 -1
- package/lib/core/transform/watch/notifyRejectedGenerationInputs.mjs +20 -10
- package/lib/core/transform/watch/notifyRejectedGenerationInputs.mjs.map +1 -1
- package/lib/core/transform/watch/notifyVolatileDelivery.d.cts +4 -6
- package/lib/core/transform/watch/notifyVolatileDelivery.d.mts +4 -6
- package/lib/core/transform/watch/notifyVolatileDelivery.d.ts +4 -6
- package/lib/core/transform/watch/notifyVolatileDelivery.js +12 -11
- package/lib/core/transform/watch/notifyVolatileDelivery.js.map +1 -1
- package/lib/core/transform/watch/notifyVolatileDelivery.mjs +12 -11
- package/lib/core/transform/watch/notifyVolatileDelivery.mjs.map +1 -1
- package/lib/core/transform/watch/notifyWatchInputs.d.cts +6 -3
- package/lib/core/transform/watch/notifyWatchInputs.d.mts +6 -3
- package/lib/core/transform/watch/notifyWatchInputs.d.ts +6 -3
- package/lib/core/transform/watch/notifyWatchInputs.js +66 -14
- package/lib/core/transform/watch/notifyWatchInputs.js.map +1 -1
- package/lib/core/transform/watch/notifyWatchInputs.mjs +66 -14
- package/lib/core/transform/watch/notifyWatchInputs.mjs.map +1 -1
- package/lib/core/transform/watch/prepareProjectRecordDirectories.d.cts +4 -5
- package/lib/core/transform/watch/prepareProjectRecordDirectories.d.mts +4 -5
- package/lib/core/transform/watch/prepareProjectRecordDirectories.d.ts +4 -5
- package/lib/core/transform/watch/prepareProjectRecordDirectories.js +9 -16
- package/lib/core/transform/watch/prepareProjectRecordDirectories.js.map +1 -1
- package/lib/core/transform/watch/prepareProjectRecordDirectories.mjs +9 -16
- package/lib/core/transform/watch/prepareProjectRecordDirectories.mjs.map +1 -1
- package/lib/core/transform/watch/projectRecordDirectories.d.cts +18 -0
- package/lib/core/transform/watch/projectRecordDirectories.d.mts +18 -0
- package/lib/core/transform/watch/projectRecordDirectories.d.ts +18 -0
- package/lib/core/transform/watch/projectRecordDirectories.js +34 -0
- package/lib/core/transform/watch/projectRecordDirectories.js.map +1 -0
- package/lib/core/transform/watch/projectRecordDirectories.mjs +32 -0
- package/lib/core/transform/watch/projectRecordDirectories.mjs.map +1 -0
- package/lib/core/transform/watch/recordedDependencyWitnesses.js +7 -7
- package/lib/core/transform/watch/recordedDependencyWitnesses.js.map +1 -1
- package/lib/core/transform/watch/recordedDependencyWitnesses.mjs +7 -7
- package/lib/core/transform/watch/recordedDependencyWitnesses.mjs.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.js +2 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.js.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.mjs +2 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesBaseline.mjs.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js +7 -0
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs +7 -0
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs.map +1 -1
- package/lib/core/unplugin.js +43 -27
- package/lib/core/unplugin.js.map +1 -1
- package/lib/core/unplugin.mjs +43 -27
- package/lib/core/unplugin.mjs.map +1 -1
- package/lib/core/vite/ViteServeInputWatch.d.cts +17 -0
- package/lib/core/vite/ViteServeInputWatch.d.mts +17 -0
- package/lib/core/vite/ViteServeInputWatch.d.ts +17 -0
- package/lib/core/vite/createViteServeInputWatch.d.cts +5 -0
- package/lib/core/vite/createViteServeInputWatch.d.mts +5 -0
- package/lib/core/vite/createViteServeInputWatch.d.ts +5 -0
- package/lib/core/vite/createViteServeInputWatch.js +86 -10
- package/lib/core/vite/createViteServeInputWatch.js.map +1 -1
- package/lib/core/vite/createViteServeInputWatch.mjs +86 -10
- package/lib/core/vite/createViteServeInputWatch.mjs.map +1 -1
- package/lib/core/vite/createViteServeWatchHooks.d.cts +6 -5
- package/lib/core/vite/createViteServeWatchHooks.d.mts +6 -5
- package/lib/core/vite/createViteServeWatchHooks.d.ts +6 -5
- package/lib/core/vite/createViteServeWatchHooks.js +10 -4
- package/lib/core/vite/createViteServeWatchHooks.js.map +1 -1
- package/lib/core/vite/createViteServeWatchHooks.mjs +10 -4
- package/lib/core/vite/createViteServeWatchHooks.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/bridge/HostWatchBridge.ts +2 -0
- package/src/core/bridge/MANAGED_PROJECT_RECORDS.ts +2 -0
- package/src/core/bridge/TtscProjectRecord.ts +9 -0
- package/src/core/bridge/fallbackRecordStorage.ts +104 -0
- package/src/core/bridge/fallbackToolDirectory.ts +22 -38
- package/src/core/bridge/fallbackToolDirectoryLocation.ts +40 -0
- package/src/core/bridge/hostToolDirectory.ts +14 -47
- package/src/core/bridge/openHostWatchBridge.ts +48 -6
- package/src/core/bridge/prepareProjectRecordDirectory.ts +134 -0
- package/src/core/bridge/privateProjectRecordAvailable.ts +25 -0
- package/src/core/bridge/projectRecordMoved.ts +7 -0
- package/src/core/bridge/projectRecordWatchInputs.ts +6 -0
- package/src/core/bridge/readProjectRecordFile.ts +28 -1
- package/src/core/bridge/refreshProjectRecordFile.ts +40 -7
- package/src/core/bridge/refreshProjectRecordFiles.ts +44 -12
- package/src/core/bridge/registerProjectRecord.ts +2 -0
- package/src/core/bridge/signalProjectRecordFile.ts +25 -5
- package/src/core/bridge/writeProjectRecordFile.ts +10 -3
- package/src/core/esbuild/createEsbuildOptions.ts +9 -10
- package/src/core/farm/createFarmRecordUpdates.ts +167 -0
- package/src/core/farm/farmPersistentCacheWithoutRecords.ts +25 -55
- package/src/core/farm/farmRecordFallback.ts +25 -20
- package/src/core/next/next.ts +5 -3
- package/src/core/observer/InputCondition.ts +7 -0
- package/src/core/observer/InputObserverChange.ts +3 -0
- package/src/core/observer/createInputObserver.ts +186 -25
- package/src/core/observer/ttscWriteDirectories.ts +56 -0
- package/src/core/rollup/TtscRollupDelivery.ts +2 -0
- package/src/core/rollup/createRollupCachedModuleProof.ts +65 -33
- package/src/core/rollup/rollupDeliveryOptions.ts +7 -4
- package/src/core/transform/cache/TtscCachedProjectTransform.ts +6 -0
- package/src/core/transform/cache/selectCachedGenerationAction.ts +9 -4
- package/src/core/transform/deliverCachedTransform.ts +1 -0
- package/src/core/transform/envelope/TtscEnvelopeDerivation.ts +6 -17
- package/src/core/transform/envelope/collectDeclaredIdentities.ts +1 -1
- package/src/core/transform/envelope/createEnvelopeKeyIndex.ts +1 -1
- package/src/core/transform/envelope/declaresCompleteDependencies.ts +17 -7
- package/src/core/transform/envelope/derivationIdentity.ts +1 -1
- package/src/core/transform/envelope/deriveWatchInputs.ts +10 -64
- package/src/core/transform/envelope/deriveWatchInputsFromIndexes.ts +117 -0
- package/src/core/transform/envelope/envelopeDerivation.ts +1 -0
- package/src/core/transform/envelope/envelopeGraphIndexes.ts +2 -1
- package/src/core/transform/envelope/isVolatileFile.ts +12 -3
- package/src/core/transform/envelope/selectFileDependencies.ts +11 -14
- package/src/core/transform/envelope/selectGraphInputs.ts +13 -10
- package/src/core/transform/envelope/selectHostInputs.ts +11 -2
- package/src/core/transform/envelope/selectNotifiableAbsentInputs.ts +13 -8
- package/src/core/transform/envelope/selectReachableEdges.ts +2 -2
- package/src/core/transform/envelope/selectReachableSources.ts +2 -2
- package/src/core/transform/envelope/selectResolutionCandidateInputs.ts +9 -15
- package/src/core/transform/filesystem/userStateDirectory.ts +46 -15
- package/src/core/transform/generation/TtscFailedGenerationValidation.ts +5 -0
- package/src/core/transform/generation/captureTransformGeneration.ts +64 -22
- package/src/core/transform/generation/createUnstableGenerationError.ts +24 -4
- package/src/core/transform/generation/failedGenerationEnvironmentChanged.ts +18 -2
- package/src/core/transform/inputs/hostInputRealpath.ts +13 -8
- package/src/core/transform/inputs/sameHostInputRealpath.ts +4 -2
- package/src/core/transform/session/claimSharedCompile.ts +2 -0
- package/src/core/transform/transformTtsc.ts +28 -7
- package/src/core/transform/tsconfig/createTransformScratchDirectory.ts +36 -31
- package/src/core/transform/validation/TtscGenerationProof.ts +57 -2
- package/src/core/transform/validation/captureUniversalHostInputValidation.ts +12 -0
- package/src/core/transform/validation/matchesCachedExternalInputs.ts +6 -1
- package/src/core/transform/validation/matchesCompleteInputSnapshot.ts +23 -9
- package/src/core/transform/validation/matchesExternalInputRealpaths.ts +7 -3
- package/src/core/transform/validation/matchesNarrowPersistentInputs.ts +81 -2
- package/src/core/transform/validation/nativeInputPredicatesHold.ts +15 -6
- package/src/core/transform/watch/RECOVERY_TREE_DIGEST.ts +12 -0
- package/src/core/transform/watch/TtscProjectRegistration.ts +4 -0
- package/src/core/transform/watch/TtscTransformHooks.ts +40 -12
- package/src/core/transform/watch/TtscWatchInputEvidence.ts +3 -0
- package/src/core/transform/watch/TtscWorkspaceWatchEvidence.ts +17 -0
- package/src/core/transform/watch/captureRecoveryTreeDigest.ts +58 -0
- package/src/core/transform/watch/evidencedWatchInput.ts +7 -0
- package/src/core/transform/watch/handWatchInputs.ts +21 -5
- package/src/core/transform/watch/notifyFailedGenerationInputs.ts +66 -10
- package/src/core/transform/watch/notifyProjectRecord.ts +68 -25
- package/src/core/transform/watch/notifyRejectedGenerationInputs.ts +22 -9
- package/src/core/transform/watch/notifyVolatileDelivery.ts +7 -6
- package/src/core/transform/watch/notifyWatchInputs.ts +112 -14
- package/src/core/transform/watch/prepareProjectRecordDirectories.ts +14 -16
- package/src/core/transform/watch/projectRecordDirectories.ts +33 -0
- package/src/core/transform/watch/recordedDependencyWitnesses.ts +8 -9
- package/src/core/transform/watch/watchInputEvidenceMatchesBaseline.ts +2 -1
- package/src/core/transform/watch/watchInputEvidenceMatchesDisk.ts +7 -0
- package/src/core/unplugin.ts +72 -42
- package/src/core/vite/ViteServeInputWatch.ts +24 -0
- package/src/core/vite/createViteServeInputWatch.ts +98 -9
- package/src/core/vite/createViteServeWatchHooks.ts +15 -6
- package/lib/core/bridge/projectRecordDirectoryWritable.d.cts +0 -36
- package/lib/core/bridge/projectRecordDirectoryWritable.d.mts +0 -36
- package/lib/core/bridge/projectRecordDirectoryWritable.d.ts +0 -36
- package/lib/core/bridge/projectRecordDirectoryWritable.js +0 -65
- package/lib/core/bridge/projectRecordDirectoryWritable.js.map +0 -1
- package/lib/core/bridge/projectRecordDirectoryWritable.mjs +0 -63
- package/lib/core/bridge/projectRecordDirectoryWritable.mjs.map +0 -1
- package/src/core/bridge/projectRecordDirectoryWritable.ts +0 -61
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
|
|
3
|
+
import { MANAGED_PROJECT_RECORDS } from "../../bridge/MANAGED_PROJECT_RECORDS";
|
|
3
4
|
import type { TtscProjectRecord } from "../../bridge/TtscProjectRecord";
|
|
4
5
|
import { membershipRecordDigest } from "../../bridge/membershipRecordDigest";
|
|
6
|
+
import { privateProjectRecordAvailable } from "../../bridge/privateProjectRecordAvailable";
|
|
5
7
|
import { projectRecordFile } from "../../bridge/projectRecordFile";
|
|
6
8
|
import { warnUnwritableProjectRecord } from "../../bridge/warnUnwritableProjectRecord";
|
|
7
9
|
import { writeProjectRecordFile } from "../../bridge/writeProjectRecordFile";
|
|
@@ -11,9 +13,11 @@ import { createHostPathIdentityContext } from "../filesystem/createHostPathIdent
|
|
|
11
13
|
import { pathIdentityKey } from "../filesystem/pathIdentityKey";
|
|
12
14
|
import { hostInputStateHash } from "../inputs/hostInputStateHash";
|
|
13
15
|
import { MISSING_INPUT_STATE } from "../validation/MISSING_INPUT_STATE";
|
|
16
|
+
import { RECOVERY_TREE_DIGEST } from "./RECOVERY_TREE_DIGEST";
|
|
14
17
|
import type { TtscTransformHooks } from "./TtscTransformHooks";
|
|
15
18
|
import type { TtscWatchInput } from "./TtscWatchInput";
|
|
16
19
|
import { projectMembershipInput } from "./projectMembershipInput";
|
|
20
|
+
import { projectRecordDirectories } from "./projectRecordDirectories";
|
|
17
21
|
|
|
18
22
|
/**
|
|
19
23
|
* What each generation hands a build host in this process: the inputs read for
|
|
@@ -38,7 +42,10 @@ const HANDED = new WeakMap<
|
|
|
38
42
|
* The records written, one per host root the generation reached, each with
|
|
39
43
|
* the digest of the bytes written.
|
|
40
44
|
*/
|
|
41
|
-
written: Map<
|
|
45
|
+
written: Map<
|
|
46
|
+
string,
|
|
47
|
+
{ digest: string; revision: number; privateStorage: boolean }
|
|
48
|
+
>;
|
|
42
49
|
}
|
|
43
50
|
>();
|
|
44
51
|
|
|
@@ -156,28 +163,38 @@ export function notifyProjectRecord(
|
|
|
156
163
|
: [...handed.evidenced, membership];
|
|
157
164
|
++handed.revision;
|
|
158
165
|
}
|
|
159
|
-
const records =
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
const records = projectRecordDirectories(project).map(
|
|
167
|
+
({ directory, privateStorage }) => ({
|
|
168
|
+
file: projectRecordFile(directory, cached.tsconfig),
|
|
169
|
+
privateStorage,
|
|
170
|
+
}),
|
|
171
|
+
);
|
|
172
|
+
const available = (candidate: (typeof records)[number]): boolean =>
|
|
173
|
+
candidate.privateStorage
|
|
174
|
+
? privateProjectRecordAvailable(candidate.file)
|
|
175
|
+
: recordAvailable(candidate.file);
|
|
176
|
+
let record: (typeof records)[number] | undefined;
|
|
166
177
|
let refused: unknown;
|
|
167
178
|
for (const candidate of records) {
|
|
168
|
-
|
|
169
|
-
|
|
179
|
+
const { file, privateStorage } = candidate;
|
|
180
|
+
const accepted = handed.written.get(file);
|
|
181
|
+
if (
|
|
182
|
+
accepted?.revision === handed.revision &&
|
|
183
|
+
accepted.privateStorage === privateStorage
|
|
184
|
+
) {
|
|
185
|
+
if (available(candidate)) {
|
|
170
186
|
record = candidate;
|
|
171
187
|
break;
|
|
172
188
|
}
|
|
173
|
-
handed.written.delete(
|
|
189
|
+
handed.written.delete(file);
|
|
174
190
|
}
|
|
175
191
|
try {
|
|
176
|
-
handed.written.set(
|
|
177
|
-
digest: writeProjectRecordFile(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
),
|
|
192
|
+
handed.written.set(file, {
|
|
193
|
+
digest: writeProjectRecordFile(file, {
|
|
194
|
+
...recordOf(cached, handed.evidenced),
|
|
195
|
+
...(privateStorage ? { privateStorage: true as const } : {}),
|
|
196
|
+
}),
|
|
197
|
+
privateStorage,
|
|
181
198
|
revision: handed.revision,
|
|
182
199
|
});
|
|
183
200
|
record = candidate;
|
|
@@ -186,23 +203,30 @@ export function notifyProjectRecord(
|
|
|
186
203
|
refused ??= error;
|
|
187
204
|
}
|
|
188
205
|
}
|
|
189
|
-
record ??= records.find(
|
|
206
|
+
record ??= records.find(available);
|
|
190
207
|
if (record === undefined) {
|
|
191
|
-
|
|
208
|
+
const primary = records[0]!.file;
|
|
209
|
+
warnUnwritableProjectRecord(primary, refused);
|
|
192
210
|
if (project.watching === true && !failed) {
|
|
193
|
-
throw new TtscProjectRecordUnwritableError(
|
|
211
|
+
throw new TtscProjectRecordUnwritableError(primary, refused);
|
|
194
212
|
}
|
|
195
213
|
return false;
|
|
196
214
|
}
|
|
197
215
|
const registered = handed.inputs;
|
|
198
|
-
const written = handed.written.get(record);
|
|
216
|
+
const written = handed.written.get(record.file);
|
|
199
217
|
const digest =
|
|
200
|
-
written?.revision === handed.revision
|
|
218
|
+
written?.revision === handed.revision &&
|
|
219
|
+
written.privateStorage === record.privateStorage
|
|
220
|
+
? written.digest
|
|
221
|
+
: undefined;
|
|
201
222
|
project.register({
|
|
202
223
|
...(digest === undefined ? {} : { digest }),
|
|
224
|
+
...(record.privateStorage
|
|
225
|
+
? { [MANAGED_PROJECT_RECORDS]: true as const }
|
|
226
|
+
: {}),
|
|
203
227
|
failed,
|
|
204
228
|
inputs: () => registered,
|
|
205
|
-
record,
|
|
229
|
+
record: record.file,
|
|
206
230
|
});
|
|
207
231
|
return true;
|
|
208
232
|
}
|
|
@@ -253,10 +277,24 @@ function recordOf(
|
|
|
253
277
|
root: cached.projectRoot,
|
|
254
278
|
signal: 0,
|
|
255
279
|
tsconfig: cached.tsconfig,
|
|
280
|
+
...(cached.result.type !== "exception" &&
|
|
281
|
+
cached.result.workspaceReplayRequired === true
|
|
282
|
+
? { workspaceReplayRequired: true as const }
|
|
283
|
+
: {}),
|
|
256
284
|
};
|
|
257
285
|
for (const input of inputs) {
|
|
258
|
-
|
|
259
|
-
|
|
286
|
+
const digest = RECOVERY_TREE_DIGEST.get(input);
|
|
287
|
+
// Workspace recovery is live-only. Restoring its record requires a new
|
|
288
|
+
// workspace delivery, so keep the separate compiler source slot intact.
|
|
289
|
+
if (digest !== undefined && input.evidence?.workspace === undefined) {
|
|
290
|
+
record.recoveryTree = { file: input.file, digest };
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
if (input.evidence !== undefined) {
|
|
294
|
+
const { workspace, ...evidence } = input.evidence;
|
|
295
|
+
if (workspace === undefined || evidence.state !== undefined)
|
|
296
|
+
record.inputs[input.file] = evidence;
|
|
297
|
+
}
|
|
260
298
|
}
|
|
261
299
|
return record;
|
|
262
300
|
}
|
|
@@ -271,7 +309,12 @@ function readUnrecordedState(
|
|
|
271
309
|
input: TtscWatchInput,
|
|
272
310
|
identities: ReturnType<typeof createHostPathIdentityContext>,
|
|
273
311
|
): TtscWatchInput {
|
|
274
|
-
if (
|
|
312
|
+
if (
|
|
313
|
+
input.evidence?.state !== undefined ||
|
|
314
|
+
input.evidence?.workspace !== undefined ||
|
|
315
|
+
RECOVERY_TREE_DIGEST.has(input)
|
|
316
|
+
)
|
|
317
|
+
return input;
|
|
275
318
|
const hash = hostInputStateHash(input.file) ?? MISSING_INPUT_STATE;
|
|
276
319
|
const missing = hash === MISSING_INPUT_STATE;
|
|
277
320
|
return {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
|
+
import { MANAGED_PROJECT_RECORDS } from "../../bridge/MANAGED_PROJECT_RECORDS";
|
|
5
|
+
import { privateProjectRecordAvailable } from "../../bridge/privateProjectRecordAvailable";
|
|
4
6
|
import { projectRecordFile } from "../../bridge/projectRecordFile";
|
|
5
7
|
import { hostSpelling } from "../envelope/hostSpelling";
|
|
6
8
|
import { TtscUnstableGenerationError } from "../errors/TtscUnstableGenerationError";
|
|
@@ -9,6 +11,7 @@ import type { TtscTransformHooks } from "./TtscTransformHooks";
|
|
|
9
11
|
import type { TtscWatchSelection } from "./TtscWatchSelection";
|
|
10
12
|
import { handWatchInputs } from "./handWatchInputs";
|
|
11
13
|
import { notifyFailedGenerationInputs } from "./notifyFailedGenerationInputs";
|
|
14
|
+
import { projectRecordDirectories } from "./projectRecordDirectories";
|
|
12
15
|
import { selectionInputs } from "./selectionInputs";
|
|
13
16
|
|
|
14
17
|
/**
|
|
@@ -58,6 +61,7 @@ export function notifyRejectedGenerationInputs(
|
|
|
58
61
|
rejection.validation.cached,
|
|
59
62
|
file,
|
|
60
63
|
selection,
|
|
64
|
+
rejection.validation.workspaceInputs,
|
|
61
65
|
);
|
|
62
66
|
return;
|
|
63
67
|
}
|
|
@@ -83,16 +87,25 @@ export function notifyRejectedGenerationInputs(
|
|
|
83
87
|
if (hooks.project !== undefined) {
|
|
84
88
|
// Below the host's tool directory, or the fallback it accepts, where the
|
|
85
89
|
// last generation may have written it (samchon/ttsc#1480).
|
|
86
|
-
const record =
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
const record = projectRecordDirectories(hooks.project)
|
|
91
|
+
.map(({ directory, privateStorage }) => ({
|
|
92
|
+
file: projectRecordFile(directory, selection.tsconfig),
|
|
93
|
+
privateStorage,
|
|
94
|
+
}))
|
|
95
|
+
.find(({ file, privateStorage }) =>
|
|
96
|
+
privateStorage
|
|
97
|
+
? privateProjectRecordAvailable(file)
|
|
98
|
+
: fs.existsSync(file),
|
|
99
|
+
);
|
|
94
100
|
if (record !== undefined) {
|
|
95
|
-
hooks.project.register({
|
|
101
|
+
hooks.project.register({
|
|
102
|
+
...(record.privateStorage
|
|
103
|
+
? { [MANAGED_PROJECT_RECORDS]: true as const }
|
|
104
|
+
: {}),
|
|
105
|
+
failed: true,
|
|
106
|
+
inputs: () => inputs,
|
|
107
|
+
record: record.file,
|
|
108
|
+
});
|
|
96
109
|
} else {
|
|
97
110
|
hooks.markVolatile?.();
|
|
98
111
|
}
|
|
@@ -4,13 +4,11 @@ import { isVolatileFile } from "../envelope/isVolatileFile";
|
|
|
4
4
|
import type { TtscTransformHooks } from "./TtscTransformHooks";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Notify the host
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* with the hooks object as its receiver, and its exception reaches the caller.
|
|
11
|
-
* This notification does not acquire or certify compiler metadata.
|
|
7
|
+
* Notify the host of a volatile delivery or a required workspace replay when
|
|
8
|
+
* its cache has opted in. A supplied callback runs with the hooks object as its
|
|
9
|
+
* receiver, and its exception reaches the caller.
|
|
12
10
|
*
|
|
13
|
-
* @evidence contracts/common.md#principled-implementation
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation A declared volatile file requests cache withdrawal. A required workspace replay does so only for a host that opts in to this fallback.
|
|
14
12
|
* @evidence contracts/common.md#clear-and-simple-design Generation declaration matching remains with isVolatileFile, while this operation owns the conditional delivery notification used by transformTtsc.
|
|
15
13
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts No output-text inference or fabricated compiler declaration replaces recorded membership, and callback failures are not suppressed.
|
|
16
14
|
* @evidence contracts/common.md#meaningful-documentation Native prose identifies declaration evaluation, callback receiver and exception behavior, and excludes compiler acquisition certification.
|
|
@@ -25,6 +23,9 @@ export function notifyVolatileDelivery(
|
|
|
25
23
|
file: string,
|
|
26
24
|
): void {
|
|
27
25
|
if (
|
|
26
|
+
(hooks?.workspaceReplayUsesVolatility === true &&
|
|
27
|
+
cached.result.type !== "exception" &&
|
|
28
|
+
cached.result.workspaceReplayRequired === true) ||
|
|
28
29
|
isVolatileFile(envelopeDerivation(cached), {
|
|
29
30
|
file,
|
|
30
31
|
projectRoot: cached.projectRoot,
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
1
3
|
import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform";
|
|
4
|
+
import type { TtscEnvelopeDerivation } from "../envelope/TtscEnvelopeDerivation";
|
|
5
|
+
import { derivationIdentity } from "../envelope/derivationIdentity";
|
|
6
|
+
import { deriveWatchInputsFromIndexes } from "../envelope/deriveWatchInputsFromIndexes";
|
|
2
7
|
import { envelopeDerivation } from "../envelope/envelopeDerivation";
|
|
8
|
+
import { envelopeGraphIndexes } from "../envelope/envelopeGraphIndexes";
|
|
3
9
|
import { hostSpelling } from "../envelope/hostSpelling";
|
|
10
|
+
import { selectPluginSourceInputs } from "../envelope/selectPluginSourceInputs";
|
|
4
11
|
import { selectWatchInputs } from "../envelope/selectWatchInputs";
|
|
5
12
|
import type { TtscTransformHooks } from "./TtscTransformHooks";
|
|
6
13
|
import type { TtscWatchInput } from "./TtscWatchInput";
|
|
@@ -29,16 +36,19 @@ import { selectionInputs } from "./selectionInputs";
|
|
|
29
36
|
*
|
|
30
37
|
* A project hook receives the generation's record through notifyProjectRecord.
|
|
31
38
|
* When both project and module hooks are present, both receive their respective
|
|
32
|
-
* registrations; without module hooks, delivery stops after project handoff.
|
|
39
|
+
* registrations; without module hooks, delivery stops after project handoff. A
|
|
40
|
+
* serve hook can register the generation union once and use the exact module
|
|
41
|
+
* dependency selection when an observed input changes. Routing and membership
|
|
42
|
+
* remain per delivery.
|
|
33
43
|
*
|
|
34
|
-
* @evidence contracts/common.md#principled-implementation Module delivery derives the selected file's
|
|
44
|
+
* @evidence contracts/common.md#principled-implementation Module delivery derives the selected file's dependencies. Grouped importers match changed paths against those dependencies. The Vite owner reloads conservatively when a change list is unavailable or matching throws. Project delivery records the full generation and its routing configs. Membership remains opt-in.
|
|
35
45
|
* @evidence contracts/common.md#clear-and-simple-design Both host models share one routing observation batch, with dependency selection, evidence mapping and record persistence delegated to their actual owners.
|
|
36
46
|
* @evidence contracts/common.md#prohibited-implementation-shortcuts Generation derivation removes disposed scratch inputs. A refused project record requests volatility through a supplied markVolatile callback instead of inventing a record; host-owned cache withdrawal remains that callback's responsibility, not an effect fabricated by this orchestrator.
|
|
37
47
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs distinguish module and project dependencies, scratch exclusion and routing, followed by separated tags under documentation guidance.
|
|
38
48
|
* @evidence contracts/portability.md#os-neutral-implementation Generation-owned identity and hostSpelling keep native physical identity separate from adapter spelling; routing observations use the delivery's filesystem capability.
|
|
39
49
|
* @evidence contracts/performance.md#efficient-algorithms No consuming hooks short-circuit all work. Otherwise every routing occurrence is observed once for this delivery, then shared between record and module branches. A project branch delegates full generation/record costs; a module branch delegates selected closure/index/native identity work, maps fresh evidence carriers, copies/spells routed entries and performs final keyed handoff. Costs include bytes, key/path text, cold native observations, membership encoding and callback effects, with call-local arrays sized by these populations even when some underlying generation lists are memoized.
|
|
40
50
|
* @evidence contracts/performance.md#reuse-equivalent-work Generation lists, identities and membership use their owners' qualified immutable/root/options/native-view memos. Routing evidence is observed once here and shared between current branches; actual callbacks still run for each delivery, and new routing spellings extend the record snapshot rather than being dropped because a generation is reused.
|
|
41
|
-
* @
|
|
51
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Live importers can retain their generation's routing metadata, graph indexes and path identities after eviction. Vite releases an importer on replacement, forgetting or disposal. Retention grows with live importers and the metadata of their generations, without a separate fixed cap. The compiler cache owns emitted output and validation state.
|
|
42
52
|
*/
|
|
43
53
|
export function notifyWatchInputs(
|
|
44
54
|
hooks: TtscTransformHooks | undefined,
|
|
@@ -81,6 +91,28 @@ export function notifyWatchInputs(
|
|
|
81
91
|
return;
|
|
82
92
|
}
|
|
83
93
|
const spell = hostSpelling(state.project, file);
|
|
94
|
+
const local: TtscWatchInput[] = [];
|
|
95
|
+
const membership =
|
|
96
|
+
hooks.membership === true ? projectMembershipInput(cached) : undefined;
|
|
97
|
+
if (membership !== undefined) local.push(membership);
|
|
98
|
+
for (const input of routedInputs)
|
|
99
|
+
local.push({ ...input, file: spell(input.file) });
|
|
100
|
+
// Across a linked root the delivered spelling can change the observation
|
|
101
|
+
// path, so each importer keeps its own registration there.
|
|
102
|
+
if (
|
|
103
|
+
hooks.watchGeneration !== undefined &&
|
|
104
|
+
cached.result.type === "success" &&
|
|
105
|
+
cached.scratchDirectory !== undefined &&
|
|
106
|
+
state.project.physical === state.project.spelling &&
|
|
107
|
+
hooks.watchGeneration(
|
|
108
|
+
cached.scratchDirectory,
|
|
109
|
+
generationWatchInputs(cached),
|
|
110
|
+
local,
|
|
111
|
+
bindWatchMatcher(groupedWatchMatcher(cached, cached.result, state), file),
|
|
112
|
+
)
|
|
113
|
+
)
|
|
114
|
+
return;
|
|
115
|
+
|
|
84
116
|
const inputs: TtscWatchInput[] = selectWatchInputs({
|
|
85
117
|
file,
|
|
86
118
|
projectRoot: cached.projectRoot,
|
|
@@ -88,22 +120,88 @@ export function notifyWatchInputs(
|
|
|
88
120
|
scratchDirectory: cached.scratchDirectory,
|
|
89
121
|
temporaryTsconfig: cached.temporaryTsconfig,
|
|
90
122
|
}).map((input) => evidencedWatchInput(cached, state, input, spell));
|
|
91
|
-
// The root files are the adapter's own decision rather than a compiler
|
|
92
|
-
// input, so a host that asked for them gets them beside the derived ones.
|
|
93
|
-
const membership =
|
|
94
|
-
hooks.membership === true ? projectMembershipInput(cached) : undefined;
|
|
95
|
-
if (membership !== undefined) inputs.push(membership);
|
|
96
|
-
for (const entryToAppend of routedInputs.map((input) => ({
|
|
97
|
-
...input,
|
|
98
|
-
file: spell(input.file),
|
|
99
|
-
})))
|
|
100
|
-
inputs.push(entryToAppend);
|
|
101
123
|
handWatchInputs(
|
|
102
124
|
hooks,
|
|
103
|
-
inputs,
|
|
125
|
+
[...inputs, ...local],
|
|
104
126
|
undefined,
|
|
105
127
|
cached.result.type === "exception"
|
|
106
128
|
? undefined
|
|
107
129
|
: cached.result.environmentInputs,
|
|
108
130
|
);
|
|
109
131
|
}
|
|
132
|
+
|
|
133
|
+
type WatchMatcher = (file: string, changed: ReadonlySet<string>) => boolean;
|
|
134
|
+
|
|
135
|
+
const GROUPED_MATCHERS = new WeakMap<
|
|
136
|
+
TtscCachedProjectTransform,
|
|
137
|
+
WatchMatcher
|
|
138
|
+
>();
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Share a generation's routing inputs among Vite importers. Importers can keep
|
|
142
|
+
* this matcher after eviction, so its closure takes no cached transform or
|
|
143
|
+
* compiler result.
|
|
144
|
+
*/
|
|
145
|
+
function groupedWatchMatcher(
|
|
146
|
+
cached: TtscCachedProjectTransform,
|
|
147
|
+
result: Extract<TtscCachedProjectTransform["result"], { type: "success" }>,
|
|
148
|
+
state: TtscEnvelopeDerivation,
|
|
149
|
+
): WatchMatcher {
|
|
150
|
+
const prior = GROUPED_MATCHERS.get(cached);
|
|
151
|
+
if (prior !== undefined) return prior;
|
|
152
|
+
const { edges, spellings, candidates, globals, configs, resolutionInputs } =
|
|
153
|
+
envelopeGraphIndexes(state, cached);
|
|
154
|
+
const matcher = makeWatchMatcher(
|
|
155
|
+
{
|
|
156
|
+
identities: state.identities,
|
|
157
|
+
identityContext: state.identityContext,
|
|
158
|
+
selection: state.selection,
|
|
159
|
+
},
|
|
160
|
+
{ edges, spellings, candidates, globals, configs, resolutionInputs },
|
|
161
|
+
{
|
|
162
|
+
projectRoot: cached.projectRoot,
|
|
163
|
+
scratchDirectory: cached.scratchDirectory,
|
|
164
|
+
temporaryTsconfig: cached.temporaryTsconfig,
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
type: result.type,
|
|
168
|
+
dependencies: result.dependencies,
|
|
169
|
+
dependenciesComplete: result.dependenciesComplete,
|
|
170
|
+
hostInputs: result.hostInputs,
|
|
171
|
+
workspaceInputs: result.workspaceInputs,
|
|
172
|
+
volatile: result.volatile,
|
|
173
|
+
},
|
|
174
|
+
[...selectPluginSourceInputs(result).keys()],
|
|
175
|
+
);
|
|
176
|
+
GROUPED_MATCHERS.set(cached, matcher);
|
|
177
|
+
return matcher;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Match a changed path against one importer's dependency selection using only
|
|
182
|
+
* the routing data borrowed from its generation.
|
|
183
|
+
*/
|
|
184
|
+
function makeWatchMatcher(
|
|
185
|
+
state: Parameters<typeof deriveWatchInputsFromIndexes>[0],
|
|
186
|
+
graph: Parameters<typeof deriveWatchInputsFromIndexes>[1],
|
|
187
|
+
options: Omit<Parameters<typeof deriveWatchInputsFromIndexes>[2], "file">,
|
|
188
|
+
dependencies: Parameters<typeof deriveWatchInputsFromIndexes>[3],
|
|
189
|
+
pluginSources: readonly string[],
|
|
190
|
+
): WatchMatcher {
|
|
191
|
+
return (file, changed) =>
|
|
192
|
+
deriveWatchInputsFromIndexes(
|
|
193
|
+
state,
|
|
194
|
+
graph,
|
|
195
|
+
{ ...options, file },
|
|
196
|
+
dependencies,
|
|
197
|
+
pluginSources,
|
|
198
|
+
derivationIdentity(state, file),
|
|
199
|
+
).some((input) => changed.has(path.resolve(input)));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function bindWatchMatcher(
|
|
203
|
+
match: WatchMatcher,
|
|
204
|
+
file: string,
|
|
205
|
+
): (changed: ReadonlySet<string>) => boolean {
|
|
206
|
+
return (changed) => match(file, changed);
|
|
207
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
|
|
4
3
|
import { PROJECT_RECORD_DIRECTORY } from "../../bridge/PROJECT_RECORD_DIRECTORY";
|
|
4
|
+
import { prepareProjectRecordDirectory } from "../../bridge/prepareProjectRecordDirectory";
|
|
5
5
|
import type { TtscTransformHooks } from "./TtscTransformHooks";
|
|
6
|
+
import { projectRecordDirectories } from "./projectRecordDirectories";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Acquire the host's record directories before a generation observes inputs.
|
|
9
10
|
*
|
|
10
11
|
* A record is handed over after capture. Creating its parent then would change
|
|
11
|
-
* a native directory witness that includes the host root.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* policy.
|
|
12
|
+
* a native directory witness that includes the host root. Only the first usable
|
|
13
|
+
* parent is acquired here. This creates no record and proves no writability.
|
|
14
|
+
* Failed acquisition remains subject to the existing writer's fallback, warning
|
|
15
|
+
* and watching-error policy.
|
|
16
16
|
*
|
|
17
17
|
* @param project The current host's optional record registration owner.
|
|
18
18
|
* @evidence contracts/common.md#principled-implementation Owned parent acquisition precedes generation observation; actual record writes and refusals retain their existing owner.
|
|
@@ -28,17 +28,15 @@ export function prepareProjectRecordDirectories(
|
|
|
28
28
|
project: TtscTransformHooks["project"],
|
|
29
29
|
): void {
|
|
30
30
|
if (project === undefined) return;
|
|
31
|
-
const
|
|
32
|
-
project
|
|
33
|
-
|
|
34
|
-
? []
|
|
35
|
-
: [project.fallbackToolDirectory]),
|
|
36
|
-
];
|
|
37
|
-
for (const directory of directories) {
|
|
31
|
+
for (const { directory, privateStorage } of projectRecordDirectories(
|
|
32
|
+
project,
|
|
33
|
+
)) {
|
|
38
34
|
try {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
prepareProjectRecordDirectory(
|
|
36
|
+
path.join(directory, PROJECT_RECORD_DIRECTORY),
|
|
37
|
+
privateStorage,
|
|
38
|
+
);
|
|
39
|
+
return;
|
|
42
40
|
} catch {
|
|
43
41
|
// Preparation cannot decide whether the later record can be written.
|
|
44
42
|
// The existing writer owns its actual error and fallback semantics.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { MANAGED_PROJECT_RECORDS } from "../../bridge/MANAGED_PROJECT_RECORDS";
|
|
2
|
+
import type { TtscTransformHooks } from "./TtscTransformHooks";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Enumerate a host's record directories in write order with the storage policy
|
|
6
|
+
* of each candidate.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation The adapter marks the generated candidate by its role in the hook.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design Preparation and handoff share the same candidate order and policy.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts A caller's matching path spelling does not establish managed provenance.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment explains the order and per-candidate policy.
|
|
12
|
+
* @evidence contracts/portability.md#os-neutral-implementation Both candidates retain their supplied native spelling.
|
|
13
|
+
* @evidence contracts/performance.md#efficient-algorithms Each call creates at most two candidate objects.
|
|
14
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work The short list is derived from the current hook.
|
|
15
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The caller owns the returned list.
|
|
16
|
+
*/
|
|
17
|
+
export function projectRecordDirectories(
|
|
18
|
+
project: NonNullable<TtscTransformHooks["project"]>,
|
|
19
|
+
): { directory: string; privateStorage: boolean }[] {
|
|
20
|
+
const directories = [
|
|
21
|
+
{
|
|
22
|
+
directory: project.toolDirectory,
|
|
23
|
+
privateStorage: project[MANAGED_PROJECT_RECORDS] === "toolDirectory",
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
if (project.fallbackToolDirectory !== undefined)
|
|
27
|
+
directories.push({
|
|
28
|
+
directory: project.fallbackToolDirectory,
|
|
29
|
+
privateStorage:
|
|
30
|
+
project[MANAGED_PROJECT_RECORDS] === "fallbackToolDirectory",
|
|
31
|
+
});
|
|
32
|
+
return directories;
|
|
33
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { privateProjectRecordAvailable } from "../../bridge/privateProjectRecordAvailable";
|
|
1
2
|
import { projectRecordFile } from "../../bridge/projectRecordFile";
|
|
2
3
|
import { readProjectRecordFile } from "../../bridge/readProjectRecordFile";
|
|
3
4
|
import type { TtscTransformHooks } from "./TtscTransformHooks";
|
|
5
|
+
import { projectRecordDirectories } from "./projectRecordDirectories";
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* The dependency-only paths the project record of `tsconfig` carries
|
|
@@ -35,15 +37,12 @@ export function recordedDependencyWitnesses(
|
|
|
35
37
|
tsconfig: string,
|
|
36
38
|
): readonly string[] | undefined {
|
|
37
39
|
if (project === undefined) return undefined;
|
|
38
|
-
for (const directory of
|
|
39
|
-
project
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const record = readProjectRecordFile(
|
|
45
|
-
projectRecordFile(directory, tsconfig),
|
|
46
|
-
);
|
|
40
|
+
for (const { directory, privateStorage } of projectRecordDirectories(
|
|
41
|
+
project,
|
|
42
|
+
)) {
|
|
43
|
+
const file = projectRecordFile(directory, tsconfig);
|
|
44
|
+
if (privateStorage && !privateProjectRecordAvailable(file)) continue;
|
|
45
|
+
const record = readProjectRecordFile(file);
|
|
47
46
|
if (record !== undefined) return record.dependencies;
|
|
48
47
|
}
|
|
49
48
|
return undefined;
|
|
@@ -28,7 +28,8 @@ export function watchInputEvidenceMatchesBaseline(
|
|
|
28
28
|
if (
|
|
29
29
|
!isWatchInputKeyBaseline(baseline) ||
|
|
30
30
|
evidence.identity !== baseline.identity ||
|
|
31
|
-
evidence.state === undefined
|
|
31
|
+
evidence.state === undefined ||
|
|
32
|
+
evidence.workspace !== undefined
|
|
32
33
|
) {
|
|
33
34
|
return false;
|
|
34
35
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PluginBuildEnvironmentWitness } from "ttsc/plugin-source";
|
|
2
|
+
|
|
1
3
|
import { DEFAULT_FILESYSTEM_OPERATIONS } from "../filesystem/DEFAULT_FILESYSTEM_OPERATIONS";
|
|
2
4
|
import type { TtscTransformFilesystemOperations } from "../filesystem/TtscTransformFilesystemOperations";
|
|
3
5
|
import { createHostPathIdentityContext } from "../filesystem/createHostPathIdentityContext";
|
|
@@ -41,6 +43,11 @@ export function watchInputEvidenceMatchesDisk(
|
|
|
41
43
|
projectRoot?: string,
|
|
42
44
|
): boolean {
|
|
43
45
|
const state = evidence.state;
|
|
46
|
+
if (evidence.workspace !== undefined) {
|
|
47
|
+
if (!PluginBuildEnvironmentWitness.holds(evidence.workspace.entries))
|
|
48
|
+
return false;
|
|
49
|
+
if (state === undefined) return true;
|
|
50
|
+
}
|
|
44
51
|
if (state === undefined || state.codec === "membership") return false;
|
|
45
52
|
try {
|
|
46
53
|
if (state.codec === "tree") {
|