@ttsc/unplugin 0.38.0 → 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
package/src/core/unplugin.ts
CHANGED
|
@@ -6,18 +6,20 @@ import {
|
|
|
6
6
|
} from "unplugin";
|
|
7
7
|
|
|
8
8
|
import type { HostWatchBridge } from "./bridge/HostWatchBridge";
|
|
9
|
+
import { MANAGED_PROJECT_RECORDS } from "./bridge/MANAGED_PROJECT_RECORDS";
|
|
9
10
|
import { buildHostDeclaresPolling } from "./bridge/buildHostDeclaresPolling";
|
|
10
11
|
import {
|
|
11
12
|
resolveConfiguredHostRoot,
|
|
12
13
|
selectBuildHostRoot,
|
|
13
14
|
} from "./bridge/buildHostRoot";
|
|
14
15
|
import { createBuildWatchFile } from "./bridge/createBuildWatchFile";
|
|
15
|
-
import {
|
|
16
|
+
import { fallbackToolDirectoryLocation } from "./bridge/fallbackToolDirectoryLocation";
|
|
16
17
|
import { hostToolDirectory } from "./bridge/hostToolDirectory";
|
|
17
18
|
import { openHostWatchBridge } from "./bridge/openHostWatchBridge";
|
|
18
19
|
import { refreshProjectRecordFiles } from "./bridge/refreshProjectRecordFiles";
|
|
19
20
|
import { registerProjectRecord } from "./bridge/registerProjectRecord";
|
|
20
21
|
import { createEsbuildOptions } from "./esbuild/createEsbuildOptions";
|
|
22
|
+
import { createFarmRecordUpdates } from "./farm/createFarmRecordUpdates";
|
|
21
23
|
import { farmPersistentCacheWithoutRecords } from "./farm/farmPersistentCacheWithoutRecords";
|
|
22
24
|
import { farmRecordFallback } from "./farm/farmRecordFallback";
|
|
23
25
|
import { isTransformTarget } from "./isTransformTarget";
|
|
@@ -112,27 +114,30 @@ const unpluginFactory: UnpluginFactory<
|
|
|
112
114
|
// that watches: `farm start` and `farm watch` resolve it, `farm build` does
|
|
113
115
|
// not.
|
|
114
116
|
let farmWatching: boolean | undefined;
|
|
115
|
-
// Farm's configured root, which Farm relates every watch file to
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
// host this factory serves takes any path, and its record lives below the
|
|
119
|
-
// directory it runs in.
|
|
117
|
+
// Farm's configured root, which Farm relates every watch file to. Its
|
|
118
|
+
// records live below it like every host's, and Farm is told of each move,
|
|
119
|
+
// since its watcher ignores `node_modules` (samchon/ttsc#1942).
|
|
120
120
|
let farmRoot: string | undefined;
|
|
121
|
+
const farmUpdates = createFarmRecordUpdates();
|
|
121
122
|
const hostRoot = (): string => selectBuildHostRoot(farmRoot);
|
|
122
123
|
// Where a host that cannot write below its root keeps its records
|
|
123
124
|
// (samchon/ttsc#1480): below this user's temporary directory, which every
|
|
124
|
-
// host this factory serves accepts but Farm on another drive
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
125
|
+
// host this factory serves accepts but Farm on another drive, which Farm 1
|
|
126
|
+
// cannot relate to its root.
|
|
127
|
+
const recordFallback = (): string | undefined =>
|
|
128
|
+
farmRoot === undefined
|
|
129
|
+
? fallbackToolDirectoryLocation(hostRoot())
|
|
130
|
+
: farmRecordFallback(farmRoot);
|
|
131
|
+
// The session's bridge: a Farm one tells Farm of each record it moves.
|
|
132
|
+
const openBridge = (
|
|
133
|
+
context: Parameters<typeof buildHostDeclaresPolling>[0],
|
|
134
|
+
): HostWatchBridge =>
|
|
135
|
+
openHostWatchBridge(
|
|
136
|
+
hostRoot(),
|
|
137
|
+
{},
|
|
138
|
+
buildHostDeclaresPolling(context),
|
|
139
|
+
farmRoot === undefined ? undefined : farmUpdates.request,
|
|
140
|
+
);
|
|
136
141
|
const closeBridge = async (): Promise<void> => {
|
|
137
142
|
const open = bridge;
|
|
138
143
|
bridge = undefined;
|
|
@@ -463,7 +468,7 @@ const unpluginFactory: UnpluginFactory<
|
|
|
463
468
|
farmWatching =
|
|
464
469
|
config.compilation?.mode === "development" ||
|
|
465
470
|
(config.compilation?.watch ?? false) !== false;
|
|
466
|
-
farmRoot = resolveConfiguredHostRoot(config.root);
|
|
471
|
+
farmRoot = resolveConfiguredHostRoot(config.root ?? ".");
|
|
467
472
|
},
|
|
468
473
|
// Farm calls buildStart only for the initial compilation. Every update
|
|
469
474
|
// opens a new pass so a failed verdict can recover, while an unchanged
|
|
@@ -474,6 +479,10 @@ const unpluginFactory: UnpluginFactory<
|
|
|
474
479
|
passStartedAt = bridge?.begin();
|
|
475
480
|
},
|
|
476
481
|
},
|
|
482
|
+
// The compiler and dev server the record moves are reported to
|
|
483
|
+
// (`createFarmRecordUpdates`). Farm 1's `configureDevServer`, which
|
|
484
|
+
// Farm 2's plugin schema refuses, joins once a Farm 1 compiler arrives.
|
|
485
|
+
...farmUpdates.hooks,
|
|
477
486
|
},
|
|
478
487
|
buildStart() {
|
|
479
488
|
cachedModules.begin();
|
|
@@ -519,11 +528,7 @@ const unpluginFactory: UnpluginFactory<
|
|
|
519
528
|
// by module, or that keeps none, has nothing for either to cover.
|
|
520
529
|
const opening = bridge === undefined;
|
|
521
530
|
if (opening && hostWatching(this)) {
|
|
522
|
-
bridge =
|
|
523
|
-
hostRoot(),
|
|
524
|
-
{},
|
|
525
|
-
buildHostDeclaresPolling(this.getNativeBuildContext?.()),
|
|
526
|
-
);
|
|
531
|
+
bridge = openBridge(this.getNativeBuildContext?.());
|
|
527
532
|
}
|
|
528
533
|
passStartedAt = bridge?.begin();
|
|
529
534
|
if (restoresUnanswered(this)) {
|
|
@@ -531,12 +536,27 @@ const unpluginFactory: UnpluginFactory<
|
|
|
531
536
|
resolveCompilerEnvironment(options.runExternalCode),
|
|
532
537
|
).identity;
|
|
533
538
|
const argumentsChanged = recordArgumentsIdentity !== identity;
|
|
534
|
-
recordArgumentsIdentity = identity;
|
|
535
539
|
// Below the root, and in the fallback a host that cannot write there
|
|
536
540
|
// keeps its records in (samchon/ttsc#1480).
|
|
537
|
-
if (opening || argumentsChanged)
|
|
538
|
-
|
|
539
|
-
|
|
541
|
+
if (opening || argumentsChanged) {
|
|
542
|
+
recordArgumentsIdentity = undefined;
|
|
543
|
+
refreshProjectRecordFiles(
|
|
544
|
+
hostToolDirectory(hostRoot()),
|
|
545
|
+
bridge,
|
|
546
|
+
undefined,
|
|
547
|
+
identity,
|
|
548
|
+
);
|
|
549
|
+
const fallback = recordFallback();
|
|
550
|
+
if (fallback !== undefined)
|
|
551
|
+
refreshProjectRecordFiles(
|
|
552
|
+
fallback,
|
|
553
|
+
bridge,
|
|
554
|
+
undefined,
|
|
555
|
+
identity,
|
|
556
|
+
true,
|
|
557
|
+
);
|
|
558
|
+
recordArgumentsIdentity = identity;
|
|
559
|
+
}
|
|
540
560
|
}
|
|
541
561
|
}
|
|
542
562
|
},
|
|
@@ -560,10 +580,8 @@ const unpluginFactory: UnpluginFactory<
|
|
|
560
580
|
// The bridge opened with the first pass (`buildStart`); a host that
|
|
561
581
|
// opened none before its first transform gets it here.
|
|
562
582
|
const bridgeStartedAt = hostWatching(this)
|
|
563
|
-
? (passStartedAt ??= (bridge ??=
|
|
564
|
-
|
|
565
|
-
{},
|
|
566
|
-
buildHostDeclaresPolling(this.getNativeBuildContext?.()),
|
|
583
|
+
? (passStartedAt ??= (bridge ??= openBridge(
|
|
584
|
+
this.getNativeBuildContext?.(),
|
|
567
585
|
)).begin())
|
|
568
586
|
: undefined;
|
|
569
587
|
// A build host takes the project's record, and nothing else, through
|
|
@@ -577,6 +595,16 @@ const unpluginFactory: UnpluginFactory<
|
|
|
577
595
|
native,
|
|
578
596
|
file,
|
|
579
597
|
);
|
|
598
|
+
const toolDirectory = hostToolDirectory(hostRoot());
|
|
599
|
+
const viteServeHooks = createViteServeWatchHooks(
|
|
600
|
+
viteLifecycle.command,
|
|
601
|
+
viteLifecycle.watching,
|
|
602
|
+
serveInputs,
|
|
603
|
+
file,
|
|
604
|
+
serveStartedAt,
|
|
605
|
+
);
|
|
606
|
+
const fallback =
|
|
607
|
+
viteServeHooks === undefined ? recordFallback() : undefined;
|
|
580
608
|
// Lifecycle admission needs an actual host declaration, rather than the
|
|
581
609
|
// ordinary bridge helper's default when no watch capability is reported.
|
|
582
610
|
const watching =
|
|
@@ -592,7 +620,7 @@ const unpluginFactory: UnpluginFactory<
|
|
|
592
620
|
// What the delivery was handed, for Rollup's cache to be answered by:
|
|
593
621
|
// the record, or that no cache may serve the module.
|
|
594
622
|
const handed: {
|
|
595
|
-
record?: { digest: string; file: string };
|
|
623
|
+
record?: { digest: string; file: string; privateStorage?: true };
|
|
596
624
|
unprovable: boolean;
|
|
597
625
|
} = { unprovable: false };
|
|
598
626
|
const result = await transformTtsc(
|
|
@@ -606,13 +634,7 @@ const unpluginFactory: UnpluginFactory<
|
|
|
606
634
|
// A dev server keys each importer on its own inputs through its
|
|
607
635
|
// module graph; a watcherless one has no invalidation channel and
|
|
608
636
|
// needs no derivation.
|
|
609
|
-
...(
|
|
610
|
-
viteLifecycle.command,
|
|
611
|
-
viteLifecycle.watching,
|
|
612
|
-
serveInputs,
|
|
613
|
-
file,
|
|
614
|
-
serveStartedAt,
|
|
615
|
-
) ?? {
|
|
637
|
+
...(viteServeHooks ?? {
|
|
616
638
|
project: {
|
|
617
639
|
register: (registration: TtscProjectRegistration) => {
|
|
618
640
|
registerProjectRecord({
|
|
@@ -632,10 +654,18 @@ const unpluginFactory: UnpluginFactory<
|
|
|
632
654
|
handed.record = {
|
|
633
655
|
digest: registration.digest,
|
|
634
656
|
file: registration.record,
|
|
657
|
+
...(registration[MANAGED_PROJECT_RECORDS] === true
|
|
658
|
+
? { privateStorage: true as const }
|
|
659
|
+
: {}),
|
|
635
660
|
};
|
|
636
661
|
},
|
|
637
|
-
toolDirectory
|
|
638
|
-
...
|
|
662
|
+
toolDirectory,
|
|
663
|
+
...(fallback === undefined
|
|
664
|
+
? {}
|
|
665
|
+
: {
|
|
666
|
+
[MANAGED_PROJECT_RECORDS]: "fallbackToolDirectory" as const,
|
|
667
|
+
fallbackToolDirectory: fallback,
|
|
668
|
+
}),
|
|
639
669
|
watching: bridge !== undefined,
|
|
640
670
|
},
|
|
641
671
|
}),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TtscTransformHooks } from "../transform/watch/TtscTransformHooks";
|
|
1
2
|
import type { TtscWatchInput } from "../transform/watch/TtscWatchInput";
|
|
2
3
|
import type { ViteDevServerLike } from "./ViteDevServerLike";
|
|
3
4
|
|
|
@@ -31,6 +32,29 @@ import type { ViteDevServerLike } from "./ViteDevServerLike";
|
|
|
31
32
|
* its observer implementation owns release and retained restart association.
|
|
32
33
|
*/
|
|
33
34
|
export interface ViteServeInputWatch {
|
|
35
|
+
/**
|
|
36
|
+
* Join an observed generation while keeping this importer's local inputs and
|
|
37
|
+
* invalidation predicate. `startedAt` is the capture token for replaying
|
|
38
|
+
* changes before registration. Returning false leaves registration with the
|
|
39
|
+
* per-importer path.
|
|
40
|
+
*
|
|
41
|
+
* @evidence contracts/common.md#principled-implementation The method joins a generation input set under the importer's capture token while preserving its local inputs and affected predicate.
|
|
42
|
+
* @evidence contracts/common.md#clear-and-simple-design One method transports the same grouped registration defined by the transform hook and adds Vite's importer and sequence.
|
|
43
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Refusal leaves the existing per-importer registration available. The grouped shape requires the exact dependency predicate for a module.
|
|
44
|
+
* @evidence contracts/common.md#meaningful-documentation The comment identifies the capture token, preserved inputs and return value.
|
|
45
|
+
* @evidence contracts/portability.md#os-neutral-implementation The importer and input spellings are native paths. The sequence expresses observer ordering rather than a native timestamp.
|
|
46
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms The signature specifies the handoff. The observer implementation owns its costs.
|
|
47
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work The observer implementation owns generation registration reuse.
|
|
48
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The signature retains no group state or resources. The observer owns their lifetime.
|
|
49
|
+
*/
|
|
50
|
+
replaceGeneration?(
|
|
51
|
+
importer: string,
|
|
52
|
+
startedAt: number,
|
|
53
|
+
...registration: Parameters<
|
|
54
|
+
NonNullable<TtscTransformHooks["watchGeneration"]>
|
|
55
|
+
>
|
|
56
|
+
): boolean;
|
|
57
|
+
|
|
34
58
|
/**
|
|
35
59
|
* Bind the dev server whose graphs are invalidated. A watching server opens
|
|
36
60
|
* the pinned project-root scope; null watching releases prior registrations
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
1
3
|
import type { InputObserverOperations } from "../observer/InputObserverOperations";
|
|
2
4
|
import { createInputObserver } from "../observer/createInputObserver";
|
|
3
5
|
import { hostDeclaresPolling } from "../transform/tracker/hostDeclaresPolling";
|
|
6
|
+
import type { TtscWatchInput } from "../transform/watch/TtscWatchInput";
|
|
4
7
|
import type { ViteDevServerLike } from "./ViteDevServerLike";
|
|
5
8
|
import type { ViteServeInputWatch } from "./ViteServeInputWatch";
|
|
6
9
|
import { invalidateImporters } from "./invalidateImporters";
|
|
@@ -20,6 +23,11 @@ import { reloadImporters } from "./reloadImporters";
|
|
|
20
23
|
* graph nodes (`invalidateImporters`, samchon/ttsc#1419), without proving that
|
|
21
24
|
* the actual root set changed or requesting an HMR update.
|
|
22
25
|
*
|
|
26
|
+
* Each compiler generation can share one set of recorded inputs. Changed input
|
|
27
|
+
* spellings are matched against the joined importers' dependency selections.
|
|
28
|
+
* Each importer independently registers routing and membership, and the last
|
|
29
|
+
* one to leave releases the generation registration.
|
|
30
|
+
*
|
|
23
31
|
* A watching server opens the observer on its root before compilation begins. A
|
|
24
32
|
* watcherless server (`server.watch: null`) registers no notification inputs
|
|
25
33
|
* and releases any preceding server's observer. A server told to poll registers
|
|
@@ -69,11 +77,62 @@ export function createViteServeInputWatch(
|
|
|
69
77
|
): ViteServeInputWatch {
|
|
70
78
|
let server: ViteDevServerLike | undefined;
|
|
71
79
|
let watching = false;
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
80
|
+
const groupByImporter = new Map<string, string>();
|
|
81
|
+
const groups = new Map<
|
|
82
|
+
string,
|
|
83
|
+
{
|
|
84
|
+
inputs: readonly TtscWatchInput[];
|
|
85
|
+
importers: Map<string, (changed: ReadonlySet<string>) => boolean>;
|
|
86
|
+
needsRegistration: boolean;
|
|
87
|
+
}
|
|
88
|
+
>();
|
|
89
|
+
const observer = createInputObserver(
|
|
90
|
+
({ invalidate, reload, reloadInputs }) => {
|
|
91
|
+
if (server === undefined) return;
|
|
92
|
+
const affected = new Set<string>();
|
|
93
|
+
for (const owner of reload) {
|
|
94
|
+
const group = groups.get(owner);
|
|
95
|
+
if (group === undefined) {
|
|
96
|
+
affected.add(owner);
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
group.needsRegistration = true;
|
|
100
|
+
const files = reloadInputs?.get(owner);
|
|
101
|
+
for (const [importer, dependsOn] of group.importers) {
|
|
102
|
+
try {
|
|
103
|
+
if (files === undefined || dependsOn(files)) affected.add(importer);
|
|
104
|
+
} catch {
|
|
105
|
+
// Dependency selection could not rule out this importer after a change.
|
|
106
|
+
affected.add(importer);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
if (affected.size !== 0) reloadImporters(server, affected);
|
|
111
|
+
if (invalidate.size !== 0)
|
|
112
|
+
invalidateImporters(
|
|
113
|
+
server,
|
|
114
|
+
new Set([...invalidate].filter((owner) => !affected.has(owner))),
|
|
115
|
+
);
|
|
116
|
+
},
|
|
117
|
+
operations,
|
|
118
|
+
true,
|
|
119
|
+
);
|
|
120
|
+
const forgetGroup = (importer: string) => {
|
|
121
|
+
const key = groupByImporter.get(importer);
|
|
122
|
+
if (key === undefined) return;
|
|
123
|
+
groupByImporter.delete(importer);
|
|
124
|
+
const group = groups.get(key)!;
|
|
125
|
+
group.importers.delete(importer);
|
|
126
|
+
if (group.importers.size === 0) {
|
|
127
|
+
groups.delete(key);
|
|
128
|
+
observer.forget(key);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const dispose = () => {
|
|
132
|
+
groupByImporter.clear();
|
|
133
|
+
groups.clear();
|
|
134
|
+
return observer.dispose();
|
|
135
|
+
};
|
|
77
136
|
return {
|
|
78
137
|
attach(next) {
|
|
79
138
|
server = next;
|
|
@@ -81,7 +140,7 @@ export function createViteServeInputWatch(
|
|
|
81
140
|
if (!watching) {
|
|
82
141
|
// dispose clears registrations and closes handles synchronously; its
|
|
83
142
|
// Promise exposes the common observer lifecycle to asynchronous owners.
|
|
84
|
-
void
|
|
143
|
+
void dispose();
|
|
85
144
|
return;
|
|
86
145
|
}
|
|
87
146
|
observer.open(
|
|
@@ -94,10 +153,40 @@ export function createViteServeInputWatch(
|
|
|
94
153
|
},
|
|
95
154
|
begin: () => observer.begin(),
|
|
96
155
|
// The attached server is kept across overlapping Vite restart containers.
|
|
97
|
-
dispose
|
|
98
|
-
forget: (importer) =>
|
|
156
|
+
dispose,
|
|
157
|
+
forget: (importer) => {
|
|
158
|
+
forgetGroup(path.resolve(importer));
|
|
159
|
+
observer.forget(importer);
|
|
160
|
+
},
|
|
99
161
|
replace: (importer, inputs, failed, startedAt) => {
|
|
100
|
-
if (watching)
|
|
162
|
+
if (!watching) return;
|
|
163
|
+
if (!failed) forgetGroup(path.resolve(importer));
|
|
164
|
+
observer.replace(importer, inputs, failed, startedAt);
|
|
165
|
+
},
|
|
166
|
+
replaceGeneration(importer, startedAt, owner, inputs, local, affected) {
|
|
167
|
+
if (!watching) return false;
|
|
168
|
+
importer = path.resolve(importer);
|
|
169
|
+
owner = path.resolve(owner);
|
|
170
|
+
let group = groups.get(owner);
|
|
171
|
+
if (
|
|
172
|
+
inputs.length === 0 ||
|
|
173
|
+
importer === owner ||
|
|
174
|
+
(group !== undefined && group.inputs !== inputs)
|
|
175
|
+
)
|
|
176
|
+
return false;
|
|
177
|
+
if (groupByImporter.get(importer) !== owner) forgetGroup(importer);
|
|
178
|
+
if (group === undefined) {
|
|
179
|
+
group = { inputs, importers: new Map(), needsRegistration: true };
|
|
180
|
+
groups.set(owner, group);
|
|
181
|
+
}
|
|
182
|
+
groupByImporter.set(importer, owner);
|
|
183
|
+
group.importers.set(importer, affected);
|
|
184
|
+
if (group.needsRegistration) {
|
|
185
|
+
group.needsRegistration = false;
|
|
186
|
+
observer.replace(owner, inputs, false, startedAt);
|
|
187
|
+
}
|
|
188
|
+
observer.replace(importer, local, false, startedAt);
|
|
189
|
+
return true;
|
|
101
190
|
},
|
|
102
191
|
};
|
|
103
192
|
}
|
|
@@ -4,10 +4,11 @@ import type { ViteServeInputWatch } from "./ViteServeInputWatch";
|
|
|
4
4
|
/**
|
|
5
5
|
* Select Vite's compiler-input channel without adding executable import edges.
|
|
6
6
|
*
|
|
7
|
-
* A watching serve delivery binds its
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* A watching serve delivery binds its input batches to the observer and
|
|
8
|
+
* requests membership. A capture token permits shared generation registration
|
|
9
|
+
* when the observer supports it. A watcherless serve delivery supplies no input
|
|
10
|
+
* hooks. Other commands return undefined so the caller can construct its
|
|
11
|
+
* build-project handoff at its original boundary.
|
|
11
12
|
*
|
|
12
13
|
* The binding preserves the delivered spelling, precompile sequence token,
|
|
13
14
|
* input batch and failure flag. It does not acquire an observer or certify
|
|
@@ -44,15 +45,23 @@ import type { ViteServeInputWatch } from "./ViteServeInputWatch";
|
|
|
44
45
|
export function createViteServeWatchHooks(
|
|
45
46
|
command: string | undefined,
|
|
46
47
|
watching: boolean,
|
|
47
|
-
serveInputs: Pick<ViteServeInputWatch, "replace">,
|
|
48
|
+
serveInputs: Pick<ViteServeInputWatch, "replace" | "replaceGeneration">,
|
|
48
49
|
file: string,
|
|
49
50
|
startedAt: number | undefined,
|
|
50
|
-
):
|
|
51
|
+
):
|
|
52
|
+
| Pick<TtscTransformHooks, "addWatchFiles" | "membership" | "watchGeneration">
|
|
53
|
+
| undefined {
|
|
51
54
|
if (command !== "serve") return undefined;
|
|
52
55
|
if (!watching) return {};
|
|
53
56
|
return {
|
|
54
57
|
addWatchFiles: (inputs, failed) =>
|
|
55
58
|
serveInputs.replace(file, inputs, failed, startedAt),
|
|
56
59
|
membership: true,
|
|
60
|
+
...(startedAt === undefined || serveInputs.replaceGeneration === undefined
|
|
61
|
+
? {}
|
|
62
|
+
: {
|
|
63
|
+
watchGeneration: (...registration) =>
|
|
64
|
+
serveInputs.replaceGeneration!(file, startedAt, ...registration),
|
|
65
|
+
}),
|
|
57
66
|
};
|
|
58
67
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether a probe can currently be written below `toolDirectory`, observed by
|
|
3
|
-
* creating the record directory and writing a file there, which is what a
|
|
4
|
-
* delivery will do (samchon/ttsc#1480).
|
|
5
|
-
*
|
|
6
|
-
* A host that must choose record-dependent caching before any delivery, Farm
|
|
7
|
-
* choosing its persistent cache at configuration time, asks this. Only a write
|
|
8
|
-
* proves a directory writable: a permission check can pass where an access
|
|
9
|
-
* control list, a read-only mount, or a file standing where a directory would
|
|
10
|
-
* be still refuses the write. A successful probe does not promise later
|
|
11
|
-
* delivery writes after permissions, mounts or directory topology change.
|
|
12
|
-
*
|
|
13
|
-
* @param toolDirectory A host's tool directory (`hostToolDirectory`) or its
|
|
14
|
-
* fallback (`fallbackToolDirectory`).
|
|
15
|
-
* @evidence contracts/common.md#principled-implementation
|
|
16
|
-
* Creating the same record directory and writing a unique probe demonstrates
|
|
17
|
-
* the needed write capability more directly than permission-bit prediction.
|
|
18
|
-
* @evidence contracts/common.md#clear-and-simple-design
|
|
19
|
-
* One operation owns acquisition and finally-cleanup of its probe; callers
|
|
20
|
-
* receive a current observation rather than implementation-specific errors.
|
|
21
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts
|
|
22
|
-
* PID/UUID identify a collision-resistant owned probe, not expected fixture
|
|
23
|
-
* paths; supported unwritable boundaries return false rather than bypassing them.
|
|
24
|
-
* @evidence contracts/common.md#meaningful-documentation
|
|
25
|
-
* Native prose explains why access checks are insufficient and describes the
|
|
26
|
-
* real side effect, with separated paragraphs/tags per documentation guidance.
|
|
27
|
-
* @evidence contracts/portability.md#os-neutral-implementation Native mkdir and an actual write determine capability across permissions, ACLs and read-only mounts rather than inferring it from platform or permission bits.
|
|
28
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
29
|
-
* Native joins scan tool-directory text; recursive mkdir visits the needed
|
|
30
|
-
* ancestor components, then one empty probe write and one removal observe
|
|
31
|
-
* capability without enumerating directory contents. Native IO is not a
|
|
32
|
-
* constant-duration operation merely because these call counts are fixed.
|
|
33
|
-
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This observes current write capability; sharing an old answer could hide changed permissions or mount state, and the calling host owns its configuration-phase result.
|
|
34
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources A unique probe is owned by this call and removed in finally on success or failure; failed native removal can leave the probe on disk, while the record directory intentionally remains for subsequent deliveries.
|
|
35
|
-
*/
|
|
36
|
-
export declare function projectRecordDirectoryWritable(toolDirectory: string): boolean;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether a probe can currently be written below `toolDirectory`, observed by
|
|
3
|
-
* creating the record directory and writing a file there, which is what a
|
|
4
|
-
* delivery will do (samchon/ttsc#1480).
|
|
5
|
-
*
|
|
6
|
-
* A host that must choose record-dependent caching before any delivery, Farm
|
|
7
|
-
* choosing its persistent cache at configuration time, asks this. Only a write
|
|
8
|
-
* proves a directory writable: a permission check can pass where an access
|
|
9
|
-
* control list, a read-only mount, or a file standing where a directory would
|
|
10
|
-
* be still refuses the write. A successful probe does not promise later
|
|
11
|
-
* delivery writes after permissions, mounts or directory topology change.
|
|
12
|
-
*
|
|
13
|
-
* @param toolDirectory A host's tool directory (`hostToolDirectory`) or its
|
|
14
|
-
* fallback (`fallbackToolDirectory`).
|
|
15
|
-
* @evidence contracts/common.md#principled-implementation
|
|
16
|
-
* Creating the same record directory and writing a unique probe demonstrates
|
|
17
|
-
* the needed write capability more directly than permission-bit prediction.
|
|
18
|
-
* @evidence contracts/common.md#clear-and-simple-design
|
|
19
|
-
* One operation owns acquisition and finally-cleanup of its probe; callers
|
|
20
|
-
* receive a current observation rather than implementation-specific errors.
|
|
21
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts
|
|
22
|
-
* PID/UUID identify a collision-resistant owned probe, not expected fixture
|
|
23
|
-
* paths; supported unwritable boundaries return false rather than bypassing them.
|
|
24
|
-
* @evidence contracts/common.md#meaningful-documentation
|
|
25
|
-
* Native prose explains why access checks are insufficient and describes the
|
|
26
|
-
* real side effect, with separated paragraphs/tags per documentation guidance.
|
|
27
|
-
* @evidence contracts/portability.md#os-neutral-implementation Native mkdir and an actual write determine capability across permissions, ACLs and read-only mounts rather than inferring it from platform or permission bits.
|
|
28
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
29
|
-
* Native joins scan tool-directory text; recursive mkdir visits the needed
|
|
30
|
-
* ancestor components, then one empty probe write and one removal observe
|
|
31
|
-
* capability without enumerating directory contents. Native IO is not a
|
|
32
|
-
* constant-duration operation merely because these call counts are fixed.
|
|
33
|
-
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This observes current write capability; sharing an old answer could hide changed permissions or mount state, and the calling host owns its configuration-phase result.
|
|
34
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources A unique probe is owned by this call and removed in finally on success or failure; failed native removal can leave the probe on disk, while the record directory intentionally remains for subsequent deliveries.
|
|
35
|
-
*/
|
|
36
|
-
export declare function projectRecordDirectoryWritable(toolDirectory: string): boolean;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Whether a probe can currently be written below `toolDirectory`, observed by
|
|
3
|
-
* creating the record directory and writing a file there, which is what a
|
|
4
|
-
* delivery will do (samchon/ttsc#1480).
|
|
5
|
-
*
|
|
6
|
-
* A host that must choose record-dependent caching before any delivery, Farm
|
|
7
|
-
* choosing its persistent cache at configuration time, asks this. Only a write
|
|
8
|
-
* proves a directory writable: a permission check can pass where an access
|
|
9
|
-
* control list, a read-only mount, or a file standing where a directory would
|
|
10
|
-
* be still refuses the write. A successful probe does not promise later
|
|
11
|
-
* delivery writes after permissions, mounts or directory topology change.
|
|
12
|
-
*
|
|
13
|
-
* @param toolDirectory A host's tool directory (`hostToolDirectory`) or its
|
|
14
|
-
* fallback (`fallbackToolDirectory`).
|
|
15
|
-
* @evidence contracts/common.md#principled-implementation
|
|
16
|
-
* Creating the same record directory and writing a unique probe demonstrates
|
|
17
|
-
* the needed write capability more directly than permission-bit prediction.
|
|
18
|
-
* @evidence contracts/common.md#clear-and-simple-design
|
|
19
|
-
* One operation owns acquisition and finally-cleanup of its probe; callers
|
|
20
|
-
* receive a current observation rather than implementation-specific errors.
|
|
21
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts
|
|
22
|
-
* PID/UUID identify a collision-resistant owned probe, not expected fixture
|
|
23
|
-
* paths; supported unwritable boundaries return false rather than bypassing them.
|
|
24
|
-
* @evidence contracts/common.md#meaningful-documentation
|
|
25
|
-
* Native prose explains why access checks are insufficient and describes the
|
|
26
|
-
* real side effect, with separated paragraphs/tags per documentation guidance.
|
|
27
|
-
* @evidence contracts/portability.md#os-neutral-implementation Native mkdir and an actual write determine capability across permissions, ACLs and read-only mounts rather than inferring it from platform or permission bits.
|
|
28
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
29
|
-
* Native joins scan tool-directory text; recursive mkdir visits the needed
|
|
30
|
-
* ancestor components, then one empty probe write and one removal observe
|
|
31
|
-
* capability without enumerating directory contents. Native IO is not a
|
|
32
|
-
* constant-duration operation merely because these call counts are fixed.
|
|
33
|
-
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This observes current write capability; sharing an old answer could hide changed permissions or mount state, and the calling host owns its configuration-phase result.
|
|
34
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources A unique probe is owned by this call and removed in finally on success or failure; failed native removal can leave the probe on disk, while the record directory intentionally remains for subsequent deliveries.
|
|
35
|
-
*/
|
|
36
|
-
export declare function projectRecordDirectoryWritable(toolDirectory: string): boolean;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var crypto = require('node:crypto');
|
|
4
|
-
var fs = require('node:fs');
|
|
5
|
-
var path = require('node:path');
|
|
6
|
-
var PROJECT_RECORD_DIRECTORY = require('./PROJECT_RECORD_DIRECTORY.js');
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Whether a probe can currently be written below `toolDirectory`, observed by
|
|
10
|
-
* creating the record directory and writing a file there, which is what a
|
|
11
|
-
* delivery will do (samchon/ttsc#1480).
|
|
12
|
-
*
|
|
13
|
-
* A host that must choose record-dependent caching before any delivery, Farm
|
|
14
|
-
* choosing its persistent cache at configuration time, asks this. Only a write
|
|
15
|
-
* proves a directory writable: a permission check can pass where an access
|
|
16
|
-
* control list, a read-only mount, or a file standing where a directory would
|
|
17
|
-
* be still refuses the write. A successful probe does not promise later
|
|
18
|
-
* delivery writes after permissions, mounts or directory topology change.
|
|
19
|
-
*
|
|
20
|
-
* @param toolDirectory A host's tool directory (`hostToolDirectory`) or its
|
|
21
|
-
* fallback (`fallbackToolDirectory`).
|
|
22
|
-
* @evidence contracts/common.md#principled-implementation
|
|
23
|
-
* Creating the same record directory and writing a unique probe demonstrates
|
|
24
|
-
* the needed write capability more directly than permission-bit prediction.
|
|
25
|
-
* @evidence contracts/common.md#clear-and-simple-design
|
|
26
|
-
* One operation owns acquisition and finally-cleanup of its probe; callers
|
|
27
|
-
* receive a current observation rather than implementation-specific errors.
|
|
28
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts
|
|
29
|
-
* PID/UUID identify a collision-resistant owned probe, not expected fixture
|
|
30
|
-
* paths; supported unwritable boundaries return false rather than bypassing them.
|
|
31
|
-
* @evidence contracts/common.md#meaningful-documentation
|
|
32
|
-
* Native prose explains why access checks are insufficient and describes the
|
|
33
|
-
* real side effect, with separated paragraphs/tags per documentation guidance.
|
|
34
|
-
* @evidence contracts/portability.md#os-neutral-implementation Native mkdir and an actual write determine capability across permissions, ACLs and read-only mounts rather than inferring it from platform or permission bits.
|
|
35
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
36
|
-
* Native joins scan tool-directory text; recursive mkdir visits the needed
|
|
37
|
-
* ancestor components, then one empty probe write and one removal observe
|
|
38
|
-
* capability without enumerating directory contents. Native IO is not a
|
|
39
|
-
* constant-duration operation merely because these call counts are fixed.
|
|
40
|
-
* @evidenceExclude contracts/performance.md#reuse-equivalent-work This observes current write capability; sharing an old answer could hide changed permissions or mount state, and the calling host owns its configuration-phase result.
|
|
41
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources A unique probe is owned by this call and removed in finally on success or failure; failed native removal can leave the probe on disk, while the record directory intentionally remains for subsequent deliveries.
|
|
42
|
-
*/
|
|
43
|
-
function projectRecordDirectoryWritable(toolDirectory) {
|
|
44
|
-
const directory = path.join(toolDirectory, PROJECT_RECORD_DIRECTORY.PROJECT_RECORD_DIRECTORY);
|
|
45
|
-
const probe = path.join(directory, `.writable-${process.pid}-${crypto.randomUUID()}`);
|
|
46
|
-
try {
|
|
47
|
-
fs.mkdirSync(directory, { recursive: true });
|
|
48
|
-
fs.writeFileSync(probe, "");
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
catch {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
finally {
|
|
55
|
-
try {
|
|
56
|
-
fs.rmSync(probe, { force: true });
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
// Cleanup is best effort; a native removal failure can leave the probe.
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
exports.projectRecordDirectoryWritable = projectRecordDirectoryWritable;
|
|
65
|
-
//# sourceMappingURL=projectRecordDirectoryWritable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projectRecordDirectoryWritable.js","sources":["../../../src/core/bridge/projectRecordDirectoryWritable.ts"],"sourcesContent":[null],"names":["PROJECT_RECORD_DIRECTORY"],"mappings":";;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCG;AACG,SAAU,8BAA8B,CAAC,aAAqB,EAAA;IAClE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAEA,iDAAwB,CAAC;AACpE,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CACrB,SAAS,EACT,CAAA,UAAA,EAAa,OAAO,CAAC,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAA,CAAE,CAClD;AACD,IAAA,IAAI;QACF,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC5C,QAAA,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,CAAC;AAC3B,QAAA,OAAO,IAAI;IACb;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;YAAU;AACR,QAAA,IAAI;YACF,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACnC;AAAE,QAAA,MAAM;;QAER;IACF;AACF;;;;"}
|