@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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ask Farm to update the modules that depend on a project record each time the
|
|
3
|
+
* watch bridge moves it (samchon/ttsc#1942).
|
|
4
|
+
*
|
|
5
|
+
* The record lives where every host keeps it, below the root's
|
|
6
|
+
* `node_modules/.cache/ttsc/unplugin`, and Farm holds it as a watch file of
|
|
7
|
+
* each module that named it. Farm's own watcher cannot report its moves: it
|
|
8
|
+
* ignores every path below `node_modules`, and `farm watch` on Farm 2 observes
|
|
9
|
+
* no watch file outside its root either (measured on Farm 1.7.11 and 2.0.1).
|
|
10
|
+
* Farm's public update relates the record to its dependents all the same, so
|
|
11
|
+
* the adapter makes the request Farm's watcher would have made for a changed
|
|
12
|
+
* path:
|
|
13
|
+
*
|
|
14
|
+
* - A dev server (`configureServer` on Farm 2, `configureDevServer` on Farm 1)
|
|
15
|
+
* updates through its HMR engine, which also sends the result to the page;
|
|
16
|
+
* one without HMR updates nothing on a change, and neither does this.
|
|
17
|
+
* - `farm watch` updates through the compiler and writes the resources, as its
|
|
18
|
+
* loop does for a path the compiler holds a module for.
|
|
19
|
+
*
|
|
20
|
+
* Farm 2 names an update by `{ path, type }` and Farm 1 by the path. Farm 2's
|
|
21
|
+
* compiler is told apart by `waitForCompileFinish`, the public readiness method
|
|
22
|
+
* that came with the item-shaped update. A failed update is reported through
|
|
23
|
+
* Farm's logger when the compiler exposes one, as Farm's own loop reports it.
|
|
24
|
+
*
|
|
25
|
+
* Farm 1 hands its dev server only to `configureDevServer`, a key Farm 2's
|
|
26
|
+
* strict plugin schema refuses, so the plugin cannot carry it from the start.
|
|
27
|
+
* Farm 1 validates no keys, calls `configureCompiler` on the plugin object
|
|
28
|
+
* before its server exists, and later calls `configureDevServer` on that same
|
|
29
|
+
* object once its server and watcher are ready. The compiler hook therefore
|
|
30
|
+
* adds the server hook to its plugin when a Farm 1 compiler arrives, and Farm
|
|
31
|
+
* 2, which validated the plugin before handing over its compiler, never sees
|
|
32
|
+
* it.
|
|
33
|
+
*
|
|
34
|
+
* A move can be announced from inside one of Farm's own hooks, a transform that
|
|
35
|
+
* read a state already gone among them, and Farm's native compile can hold its
|
|
36
|
+
* module graph while it waits for that hook; a graph query made from it would
|
|
37
|
+
* wait on the compile in turn. A request therefore leaves the hook first and
|
|
38
|
+
* waits until the compiler is idle (`compiling`, with Farm 2's
|
|
39
|
+
* `waitForCompileFinish`). Moves of one record while it waits are one request,
|
|
40
|
+
* which reads the record as the last move left it.
|
|
41
|
+
*
|
|
42
|
+
* @evidence contracts/common.md#principled-implementation Each request is the one Farm's own watcher makes for a changed path, through the API that mode uses, so Farm's HMR, queueing and resource writing apply unchanged; it is made only once no hook of the compile is on the stack and the compiler is idle.
|
|
43
|
+
* @evidence contracts/common.md#clear-and-simple-design One owner holds the current compiler and server and turns a record move into one request; the bridge only announces moves.
|
|
44
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No Farm watcher, event or private member is touched; only the plugin hooks and update methods Farm publishes are used, and each major receives only the hooks its plugin API defines.
|
|
45
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states why Farm cannot observe the record, which API each mode uses, how the two majors are told apart, how Farm 1's server hook joins the plugin and how failures surface.
|
|
46
|
+
* @evidence contracts/portability.md#os-neutral-implementation The record is handed back in the absolute native spelling the adapter registered it under.
|
|
47
|
+
* @evidence contracts/performance.md#efficient-algorithms One feature check and one asynchronous Farm call per record once the compiler is idle; moves made while it compiles are one request, and Farm 1, which has no readiness promise, is rechecked every 10 ms only while it compiles.
|
|
48
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Every move is a new change Farm has to apply.
|
|
49
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Only the latest compiler and server are retained, replaced when Farm creates new ones, and the records awaiting an idle compiler, each released as its request is made.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createFarmRecordUpdates(): {
|
|
52
|
+
/**
|
|
53
|
+
* The Farm plugin hooks that hand over the compiler and the dev server. The
|
|
54
|
+
* compiler hook adds Farm 1's `configureDevServer` to the plugin it is called
|
|
55
|
+
* on.
|
|
56
|
+
*/
|
|
57
|
+
hooks: {
|
|
58
|
+
configureCompiler(this: Record<string, unknown>, compiler: unknown): void;
|
|
59
|
+
configureServer(server: unknown): void;
|
|
60
|
+
};
|
|
61
|
+
/** Ask Farm to update the modules that watch a moved record. */
|
|
62
|
+
request(record: string): void;
|
|
63
|
+
};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Ask Farm to update the modules that depend on a project record each time the
|
|
5
|
+
* watch bridge moves it (samchon/ttsc#1942).
|
|
6
|
+
*
|
|
7
|
+
* The record lives where every host keeps it, below the root's
|
|
8
|
+
* `node_modules/.cache/ttsc/unplugin`, and Farm holds it as a watch file of
|
|
9
|
+
* each module that named it. Farm's own watcher cannot report its moves: it
|
|
10
|
+
* ignores every path below `node_modules`, and `farm watch` on Farm 2 observes
|
|
11
|
+
* no watch file outside its root either (measured on Farm 1.7.11 and 2.0.1).
|
|
12
|
+
* Farm's public update relates the record to its dependents all the same, so
|
|
13
|
+
* the adapter makes the request Farm's watcher would have made for a changed
|
|
14
|
+
* path:
|
|
15
|
+
*
|
|
16
|
+
* - A dev server (`configureServer` on Farm 2, `configureDevServer` on Farm 1)
|
|
17
|
+
* updates through its HMR engine, which also sends the result to the page;
|
|
18
|
+
* one without HMR updates nothing on a change, and neither does this.
|
|
19
|
+
* - `farm watch` updates through the compiler and writes the resources, as its
|
|
20
|
+
* loop does for a path the compiler holds a module for.
|
|
21
|
+
*
|
|
22
|
+
* Farm 2 names an update by `{ path, type }` and Farm 1 by the path. Farm 2's
|
|
23
|
+
* compiler is told apart by `waitForCompileFinish`, the public readiness method
|
|
24
|
+
* that came with the item-shaped update. A failed update is reported through
|
|
25
|
+
* Farm's logger when the compiler exposes one, as Farm's own loop reports it.
|
|
26
|
+
*
|
|
27
|
+
* Farm 1 hands its dev server only to `configureDevServer`, a key Farm 2's
|
|
28
|
+
* strict plugin schema refuses, so the plugin cannot carry it from the start.
|
|
29
|
+
* Farm 1 validates no keys, calls `configureCompiler` on the plugin object
|
|
30
|
+
* before its server exists, and later calls `configureDevServer` on that same
|
|
31
|
+
* object once its server and watcher are ready. The compiler hook therefore
|
|
32
|
+
* adds the server hook to its plugin when a Farm 1 compiler arrives, and Farm
|
|
33
|
+
* 2, which validated the plugin before handing over its compiler, never sees
|
|
34
|
+
* it.
|
|
35
|
+
*
|
|
36
|
+
* A move can be announced from inside one of Farm's own hooks, a transform that
|
|
37
|
+
* read a state already gone among them, and Farm's native compile can hold its
|
|
38
|
+
* module graph while it waits for that hook; a graph query made from it would
|
|
39
|
+
* wait on the compile in turn. A request therefore leaves the hook first and
|
|
40
|
+
* waits until the compiler is idle (`compiling`, with Farm 2's
|
|
41
|
+
* `waitForCompileFinish`). Moves of one record while it waits are one request,
|
|
42
|
+
* which reads the record as the last move left it.
|
|
43
|
+
*
|
|
44
|
+
* @evidence contracts/common.md#principled-implementation Each request is the one Farm's own watcher makes for a changed path, through the API that mode uses, so Farm's HMR, queueing and resource writing apply unchanged; it is made only once no hook of the compile is on the stack and the compiler is idle.
|
|
45
|
+
* @evidence contracts/common.md#clear-and-simple-design One owner holds the current compiler and server and turns a record move into one request; the bridge only announces moves.
|
|
46
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No Farm watcher, event or private member is touched; only the plugin hooks and update methods Farm publishes are used, and each major receives only the hooks its plugin API defines.
|
|
47
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states why Farm cannot observe the record, which API each mode uses, how the two majors are told apart, how Farm 1's server hook joins the plugin and how failures surface.
|
|
48
|
+
* @evidence contracts/portability.md#os-neutral-implementation The record is handed back in the absolute native spelling the adapter registered it under.
|
|
49
|
+
* @evidence contracts/performance.md#efficient-algorithms One feature check and one asynchronous Farm call per record once the compiler is idle; moves made while it compiles are one request, and Farm 1, which has no readiness promise, is rechecked every 10 ms only while it compiles.
|
|
50
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Every move is a new change Farm has to apply.
|
|
51
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Only the latest compiler and server are retained, replaced when Farm creates new ones, and the records awaiting an idle compiler, each released as its request is made.
|
|
52
|
+
*/
|
|
53
|
+
function createFarmRecordUpdates() {
|
|
54
|
+
let compiler;
|
|
55
|
+
let server;
|
|
56
|
+
// The records whose request waits for an idle compiler.
|
|
57
|
+
const waiting = new Set();
|
|
58
|
+
const keepServer = (value) => {
|
|
59
|
+
server = value;
|
|
60
|
+
};
|
|
61
|
+
const dispatch = (record, current) => {
|
|
62
|
+
const itemShaped = typeof current.waitForCompileFinish === "function";
|
|
63
|
+
const item = itemShaped ? { path: record, type: "updated" } : record;
|
|
64
|
+
let work;
|
|
65
|
+
try {
|
|
66
|
+
if (server !== undefined)
|
|
67
|
+
work = server.hmrEngine?.hmrUpdate(item);
|
|
68
|
+
else if (current.hasModule(record))
|
|
69
|
+
work = (itemShaped
|
|
70
|
+
? current.update([item], true, false, false)
|
|
71
|
+
: current.update([item], true)).then(() => current.writeResourcesToDisk());
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
work = Promise.reject(error);
|
|
75
|
+
}
|
|
76
|
+
work?.catch((error) => report(current, error));
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
hooks: {
|
|
80
|
+
configureCompiler(value) {
|
|
81
|
+
compiler = value;
|
|
82
|
+
if (typeof compiler.waitForCompileFinish !== "function")
|
|
83
|
+
this.configureDevServer = keepServer;
|
|
84
|
+
},
|
|
85
|
+
configureServer: keepServer,
|
|
86
|
+
},
|
|
87
|
+
request: (record) => {
|
|
88
|
+
const current = compiler;
|
|
89
|
+
if (current === undefined || waiting.has(record))
|
|
90
|
+
return;
|
|
91
|
+
waiting.add(record);
|
|
92
|
+
untilIdle(current).then(() => {
|
|
93
|
+
waiting.delete(record);
|
|
94
|
+
dispatch(record, compiler ?? current);
|
|
95
|
+
}, (error) => {
|
|
96
|
+
waiting.delete(record);
|
|
97
|
+
report(current, error);
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Leave the hook a move may have been announced from, then wait until the
|
|
104
|
+
* compiler is idle: Farm 2 through its readiness promise, Farm 1, which has
|
|
105
|
+
* none, by rechecking its `compiling` flag.
|
|
106
|
+
*/
|
|
107
|
+
async function untilIdle(compiler) {
|
|
108
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
109
|
+
while (compiler.compiling === true) {
|
|
110
|
+
if (typeof compiler.waitForCompileFinish === "function")
|
|
111
|
+
await compiler.waitForCompileFinish();
|
|
112
|
+
if (compiler.compiling === true)
|
|
113
|
+
await new Promise((resolve) => setTimeout(resolve, IDLE_RECHECK_MS));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** Report a failed update through Farm's logger, as Farm's own loop does. */
|
|
117
|
+
function report(compiler, error) {
|
|
118
|
+
const message = `@ttsc/unplugin: Farm update error: ${error instanceof Error ? error.message : String(error)}`;
|
|
119
|
+
const logger = compiler.config?.logger;
|
|
120
|
+
if (typeof logger?.error === "function")
|
|
121
|
+
logger.error(message, { exit: false });
|
|
122
|
+
else
|
|
123
|
+
console.error(message);
|
|
124
|
+
}
|
|
125
|
+
/** How often a Farm 1 compiler, which has no readiness promise, is rechecked. */
|
|
126
|
+
const IDLE_RECHECK_MS = 10;
|
|
127
|
+
|
|
128
|
+
exports.createFarmRecordUpdates = createFarmRecordUpdates;
|
|
129
|
+
//# sourceMappingURL=createFarmRecordUpdates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFarmRecordUpdates.js","sources":["../../../src/core/farm/createFarmRecordUpdates.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ask Farm to update the modules that depend on a project record each time the
|
|
3
|
+
* watch bridge moves it (samchon/ttsc#1942).
|
|
4
|
+
*
|
|
5
|
+
* The record lives where every host keeps it, below the root's
|
|
6
|
+
* `node_modules/.cache/ttsc/unplugin`, and Farm holds it as a watch file of
|
|
7
|
+
* each module that named it. Farm's own watcher cannot report its moves: it
|
|
8
|
+
* ignores every path below `node_modules`, and `farm watch` on Farm 2 observes
|
|
9
|
+
* no watch file outside its root either (measured on Farm 1.7.11 and 2.0.1).
|
|
10
|
+
* Farm's public update relates the record to its dependents all the same, so
|
|
11
|
+
* the adapter makes the request Farm's watcher would have made for a changed
|
|
12
|
+
* path:
|
|
13
|
+
*
|
|
14
|
+
* - A dev server (`configureServer` on Farm 2, `configureDevServer` on Farm 1)
|
|
15
|
+
* updates through its HMR engine, which also sends the result to the page;
|
|
16
|
+
* one without HMR updates nothing on a change, and neither does this.
|
|
17
|
+
* - `farm watch` updates through the compiler and writes the resources, as its
|
|
18
|
+
* loop does for a path the compiler holds a module for.
|
|
19
|
+
*
|
|
20
|
+
* Farm 2 names an update by `{ path, type }` and Farm 1 by the path. Farm 2's
|
|
21
|
+
* compiler is told apart by `waitForCompileFinish`, the public readiness method
|
|
22
|
+
* that came with the item-shaped update. A failed update is reported through
|
|
23
|
+
* Farm's logger when the compiler exposes one, as Farm's own loop reports it.
|
|
24
|
+
*
|
|
25
|
+
* Farm 1 hands its dev server only to `configureDevServer`, a key Farm 2's
|
|
26
|
+
* strict plugin schema refuses, so the plugin cannot carry it from the start.
|
|
27
|
+
* Farm 1 validates no keys, calls `configureCompiler` on the plugin object
|
|
28
|
+
* before its server exists, and later calls `configureDevServer` on that same
|
|
29
|
+
* object once its server and watcher are ready. The compiler hook therefore
|
|
30
|
+
* adds the server hook to its plugin when a Farm 1 compiler arrives, and Farm
|
|
31
|
+
* 2, which validated the plugin before handing over its compiler, never sees
|
|
32
|
+
* it.
|
|
33
|
+
*
|
|
34
|
+
* A move can be announced from inside one of Farm's own hooks, a transform that
|
|
35
|
+
* read a state already gone among them, and Farm's native compile can hold its
|
|
36
|
+
* module graph while it waits for that hook; a graph query made from it would
|
|
37
|
+
* wait on the compile in turn. A request therefore leaves the hook first and
|
|
38
|
+
* waits until the compiler is idle (`compiling`, with Farm 2's
|
|
39
|
+
* `waitForCompileFinish`). Moves of one record while it waits are one request,
|
|
40
|
+
* which reads the record as the last move left it.
|
|
41
|
+
*
|
|
42
|
+
* @evidence contracts/common.md#principled-implementation Each request is the one Farm's own watcher makes for a changed path, through the API that mode uses, so Farm's HMR, queueing and resource writing apply unchanged; it is made only once no hook of the compile is on the stack and the compiler is idle.
|
|
43
|
+
* @evidence contracts/common.md#clear-and-simple-design One owner holds the current compiler and server and turns a record move into one request; the bridge only announces moves.
|
|
44
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No Farm watcher, event or private member is touched; only the plugin hooks and update methods Farm publishes are used, and each major receives only the hooks its plugin API defines.
|
|
45
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states why Farm cannot observe the record, which API each mode uses, how the two majors are told apart, how Farm 1's server hook joins the plugin and how failures surface.
|
|
46
|
+
* @evidence contracts/portability.md#os-neutral-implementation The record is handed back in the absolute native spelling the adapter registered it under.
|
|
47
|
+
* @evidence contracts/performance.md#efficient-algorithms One feature check and one asynchronous Farm call per record once the compiler is idle; moves made while it compiles are one request, and Farm 1, which has no readiness promise, is rechecked every 10 ms only while it compiles.
|
|
48
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Every move is a new change Farm has to apply.
|
|
49
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Only the latest compiler and server are retained, replaced when Farm creates new ones, and the records awaiting an idle compiler, each released as its request is made.
|
|
50
|
+
*/
|
|
51
|
+
function createFarmRecordUpdates() {
|
|
52
|
+
let compiler;
|
|
53
|
+
let server;
|
|
54
|
+
// The records whose request waits for an idle compiler.
|
|
55
|
+
const waiting = new Set();
|
|
56
|
+
const keepServer = (value) => {
|
|
57
|
+
server = value;
|
|
58
|
+
};
|
|
59
|
+
const dispatch = (record, current) => {
|
|
60
|
+
const itemShaped = typeof current.waitForCompileFinish === "function";
|
|
61
|
+
const item = itemShaped ? { path: record, type: "updated" } : record;
|
|
62
|
+
let work;
|
|
63
|
+
try {
|
|
64
|
+
if (server !== undefined)
|
|
65
|
+
work = server.hmrEngine?.hmrUpdate(item);
|
|
66
|
+
else if (current.hasModule(record))
|
|
67
|
+
work = (itemShaped
|
|
68
|
+
? current.update([item], true, false, false)
|
|
69
|
+
: current.update([item], true)).then(() => current.writeResourcesToDisk());
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
work = Promise.reject(error);
|
|
73
|
+
}
|
|
74
|
+
work?.catch((error) => report(current, error));
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
hooks: {
|
|
78
|
+
configureCompiler(value) {
|
|
79
|
+
compiler = value;
|
|
80
|
+
if (typeof compiler.waitForCompileFinish !== "function")
|
|
81
|
+
this.configureDevServer = keepServer;
|
|
82
|
+
},
|
|
83
|
+
configureServer: keepServer,
|
|
84
|
+
},
|
|
85
|
+
request: (record) => {
|
|
86
|
+
const current = compiler;
|
|
87
|
+
if (current === undefined || waiting.has(record))
|
|
88
|
+
return;
|
|
89
|
+
waiting.add(record);
|
|
90
|
+
untilIdle(current).then(() => {
|
|
91
|
+
waiting.delete(record);
|
|
92
|
+
dispatch(record, compiler ?? current);
|
|
93
|
+
}, (error) => {
|
|
94
|
+
waiting.delete(record);
|
|
95
|
+
report(current, error);
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Leave the hook a move may have been announced from, then wait until the
|
|
102
|
+
* compiler is idle: Farm 2 through its readiness promise, Farm 1, which has
|
|
103
|
+
* none, by rechecking its `compiling` flag.
|
|
104
|
+
*/
|
|
105
|
+
async function untilIdle(compiler) {
|
|
106
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
107
|
+
while (compiler.compiling === true) {
|
|
108
|
+
if (typeof compiler.waitForCompileFinish === "function")
|
|
109
|
+
await compiler.waitForCompileFinish();
|
|
110
|
+
if (compiler.compiling === true)
|
|
111
|
+
await new Promise((resolve) => setTimeout(resolve, IDLE_RECHECK_MS));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/** Report a failed update through Farm's logger, as Farm's own loop does. */
|
|
115
|
+
function report(compiler, error) {
|
|
116
|
+
const message = `@ttsc/unplugin: Farm update error: ${error instanceof Error ? error.message : String(error)}`;
|
|
117
|
+
const logger = compiler.config?.logger;
|
|
118
|
+
if (typeof logger?.error === "function")
|
|
119
|
+
logger.error(message, { exit: false });
|
|
120
|
+
else
|
|
121
|
+
console.error(message);
|
|
122
|
+
}
|
|
123
|
+
/** How often a Farm 1 compiler, which has no readiness promise, is rechecked. */
|
|
124
|
+
const IDLE_RECHECK_MS = 10;
|
|
125
|
+
|
|
126
|
+
export { createFarmRecordUpdates };
|
|
127
|
+
//# sourceMappingURL=createFarmRecordUpdates.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFarmRecordUpdates.mjs","sources":["../../../src/core/farm/createFarmRecordUpdates.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
|
@@ -1,45 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Farm's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Disable Farm's persistent cache when no project record can be written: the
|
|
3
|
+
* root's own `node_modules/.cache/ttsc/unplugin` cannot hold one, and neither
|
|
4
|
+
* can the same-volume fallback (`farmRecordFallback`). Farm has no per-module
|
|
5
|
+
* persistent-cache switch, so without a record an edit made while Farm was
|
|
6
|
+
* stopped could leave an old transformed module in its cache. A record Farm
|
|
7
|
+
* holds as a watch file is revalidated when Farm starts again, below
|
|
8
|
+
* `node_modules` as anywhere else (measured on Farm 1.7.11 and 2.0.1).
|
|
5
9
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* will exist: below its root (`hostToolDirectory`), or in the fallback it
|
|
15
|
-
* accepts (`farmRecordFallback`), each tested by a current write. This does not
|
|
16
|
-
* promise later write capability. Where neither can be written persistent cache
|
|
17
|
-
* use is disabled in the returned configuration, and the user is told once why,
|
|
18
|
-
* as a Node process warning, code `TTSC_PROJECT_RECORD_UNWRITABLE`.
|
|
19
|
-
*
|
|
20
|
-
* @param config Farm's user configuration, as its `config` hook receives it.
|
|
21
|
-
* @param cwd The directory Farm runs in, the root when the configuration names
|
|
22
|
-
* none.
|
|
23
|
-
* @evidence contracts/common.md#principled-implementation Current record-directory probes select whether Farm is asked to retain persistent modules; when both fail the returned config disables that cache. Later writes still need delivery-time failure handling, so a successful probe is not lifetime invalidation authority.
|
|
24
|
-
* @evidence contracts/common.md#clear-and-simple-design The configuration hook probes the two existing record locations and returns a shallow config/compilation copy changing persistentCache when needed. Other own enumerable fields and shared nested values are preserved.
|
|
25
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts This is a host capability boundary with a stated invalidation reason, rather than a test-only bypass, patched cache implementation, or assumed writable directory.
|
|
26
|
-
* @evidence contracts/common.md#meaningful-documentation The comment explains why per-module opt-out is unavailable and why the warning and configuration-level fallback are necessary.
|
|
27
|
-
* @evidence contracts/portability.md#os-neutral-implementation Writability is proven by an actual write below the tool directory and the fallback, and the root is resolved with path.resolve against cwd, so no operating-system name, permission bit or drive layout is assumed.
|
|
28
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
29
|
-
* At most two write probes retain native path/mkdir/write/removal work and
|
|
30
|
-
* delegated fallback naming/trust setup. Warning text follows path length;
|
|
31
|
-
* disabling cache copies the config/compilation own fields. A fixed probe
|
|
32
|
-
* count does not make native operations or field populations constant cost.
|
|
33
|
-
* @evidence contracts/performance.md#reuse-equivalent-work
|
|
34
|
-
* The WARNED set emits the unwritable-records warning once per tool
|
|
35
|
-
* directory spelling, not once per config pass. It marks before emission,
|
|
36
|
-
* so it suppresses later attempts rather than certifying user receipt. Write
|
|
37
|
-
* capability is still freshly probed instead of reused from that warning key.
|
|
38
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
39
|
-
* WARNED retains each distinct tool-directory spelling for the process life,
|
|
40
|
-
* without eviction or a fixed string-byte bound. Probe cleanup and persistent
|
|
41
|
-
* directories belong to the write-probe helper; failed removal can leave its
|
|
42
|
-
* probe. Returned config ownership transfers to Farm.
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The configuration hook keeps persistent caching whenever the default record directory or the private fallback on Farm's volume can host an ordinary record directory; a later write retains its own error handling.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design The default location's probe and the fallback query, in the order records are written, decide whether to copy the config with persistentCache disabled.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No probe file or nonignored project directory is created to test the candidate.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment explains the host limitation, invalidation failure and configuration-level fallback.
|
|
14
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path resolution and filesystem access checks observe the candidate under the host's selected root and platform permissions.
|
|
15
|
+
* @evidence contracts/performance.md#efficient-algorithms The default location's bounded component walk runs first, and the fallback's ancestor walk only when it refuses; the disabled case copies the configuration's own properties.
|
|
16
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Writability is observed afresh on each configuration pass.
|
|
17
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The warning set retains one spelling per refused root for the process lifetime, with no fixed cap. No probe file or handle is retained.
|
|
43
18
|
*/
|
|
44
19
|
export declare function farmPersistentCacheWithoutRecords<Config extends {
|
|
45
20
|
compilation?: {
|
|
@@ -1,45 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Farm's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Disable Farm's persistent cache when no project record can be written: the
|
|
3
|
+
* root's own `node_modules/.cache/ttsc/unplugin` cannot hold one, and neither
|
|
4
|
+
* can the same-volume fallback (`farmRecordFallback`). Farm has no per-module
|
|
5
|
+
* persistent-cache switch, so without a record an edit made while Farm was
|
|
6
|
+
* stopped could leave an old transformed module in its cache. A record Farm
|
|
7
|
+
* holds as a watch file is revalidated when Farm starts again, below
|
|
8
|
+
* `node_modules` as anywhere else (measured on Farm 1.7.11 and 2.0.1).
|
|
5
9
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* will exist: below its root (`hostToolDirectory`), or in the fallback it
|
|
15
|
-
* accepts (`farmRecordFallback`), each tested by a current write. This does not
|
|
16
|
-
* promise later write capability. Where neither can be written persistent cache
|
|
17
|
-
* use is disabled in the returned configuration, and the user is told once why,
|
|
18
|
-
* as a Node process warning, code `TTSC_PROJECT_RECORD_UNWRITABLE`.
|
|
19
|
-
*
|
|
20
|
-
* @param config Farm's user configuration, as its `config` hook receives it.
|
|
21
|
-
* @param cwd The directory Farm runs in, the root when the configuration names
|
|
22
|
-
* none.
|
|
23
|
-
* @evidence contracts/common.md#principled-implementation Current record-directory probes select whether Farm is asked to retain persistent modules; when both fail the returned config disables that cache. Later writes still need delivery-time failure handling, so a successful probe is not lifetime invalidation authority.
|
|
24
|
-
* @evidence contracts/common.md#clear-and-simple-design The configuration hook probes the two existing record locations and returns a shallow config/compilation copy changing persistentCache when needed. Other own enumerable fields and shared nested values are preserved.
|
|
25
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts This is a host capability boundary with a stated invalidation reason, rather than a test-only bypass, patched cache implementation, or assumed writable directory.
|
|
26
|
-
* @evidence contracts/common.md#meaningful-documentation The comment explains why per-module opt-out is unavailable and why the warning and configuration-level fallback are necessary.
|
|
27
|
-
* @evidence contracts/portability.md#os-neutral-implementation Writability is proven by an actual write below the tool directory and the fallback, and the root is resolved with path.resolve against cwd, so no operating-system name, permission bit or drive layout is assumed.
|
|
28
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
29
|
-
* At most two write probes retain native path/mkdir/write/removal work and
|
|
30
|
-
* delegated fallback naming/trust setup. Warning text follows path length;
|
|
31
|
-
* disabling cache copies the config/compilation own fields. A fixed probe
|
|
32
|
-
* count does not make native operations or field populations constant cost.
|
|
33
|
-
* @evidence contracts/performance.md#reuse-equivalent-work
|
|
34
|
-
* The WARNED set emits the unwritable-records warning once per tool
|
|
35
|
-
* directory spelling, not once per config pass. It marks before emission,
|
|
36
|
-
* so it suppresses later attempts rather than certifying user receipt. Write
|
|
37
|
-
* capability is still freshly probed instead of reused from that warning key.
|
|
38
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
39
|
-
* WARNED retains each distinct tool-directory spelling for the process life,
|
|
40
|
-
* without eviction or a fixed string-byte bound. Probe cleanup and persistent
|
|
41
|
-
* directories belong to the write-probe helper; failed removal can leave its
|
|
42
|
-
* probe. Returned config ownership transfers to Farm.
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The configuration hook keeps persistent caching whenever the default record directory or the private fallback on Farm's volume can host an ordinary record directory; a later write retains its own error handling.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design The default location's probe and the fallback query, in the order records are written, decide whether to copy the config with persistentCache disabled.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No probe file or nonignored project directory is created to test the candidate.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment explains the host limitation, invalidation failure and configuration-level fallback.
|
|
14
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path resolution and filesystem access checks observe the candidate under the host's selected root and platform permissions.
|
|
15
|
+
* @evidence contracts/performance.md#efficient-algorithms The default location's bounded component walk runs first, and the fallback's ancestor walk only when it refuses; the disabled case copies the configuration's own properties.
|
|
16
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Writability is observed afresh on each configuration pass.
|
|
17
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The warning set retains one spelling per refused root for the process lifetime, with no fixed cap. No probe file or handle is retained.
|
|
43
18
|
*/
|
|
44
19
|
export declare function farmPersistentCacheWithoutRecords<Config extends {
|
|
45
20
|
compilation?: {
|
|
@@ -1,45 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Farm's
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Disable Farm's persistent cache when no project record can be written: the
|
|
3
|
+
* root's own `node_modules/.cache/ttsc/unplugin` cannot hold one, and neither
|
|
4
|
+
* can the same-volume fallback (`farmRecordFallback`). Farm has no per-module
|
|
5
|
+
* persistent-cache switch, so without a record an edit made while Farm was
|
|
6
|
+
* stopped could leave an old transformed module in its cache. A record Farm
|
|
7
|
+
* holds as a watch file is revalidated when Farm starts again, below
|
|
8
|
+
* `node_modules` as anywhere else (measured on Farm 1.7.11 and 2.0.1).
|
|
5
9
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* will exist: below its root (`hostToolDirectory`), or in the fallback it
|
|
15
|
-
* accepts (`farmRecordFallback`), each tested by a current write. This does not
|
|
16
|
-
* promise later write capability. Where neither can be written persistent cache
|
|
17
|
-
* use is disabled in the returned configuration, and the user is told once why,
|
|
18
|
-
* as a Node process warning, code `TTSC_PROJECT_RECORD_UNWRITABLE`.
|
|
19
|
-
*
|
|
20
|
-
* @param config Farm's user configuration, as its `config` hook receives it.
|
|
21
|
-
* @param cwd The directory Farm runs in, the root when the configuration names
|
|
22
|
-
* none.
|
|
23
|
-
* @evidence contracts/common.md#principled-implementation Current record-directory probes select whether Farm is asked to retain persistent modules; when both fail the returned config disables that cache. Later writes still need delivery-time failure handling, so a successful probe is not lifetime invalidation authority.
|
|
24
|
-
* @evidence contracts/common.md#clear-and-simple-design The configuration hook probes the two existing record locations and returns a shallow config/compilation copy changing persistentCache when needed. Other own enumerable fields and shared nested values are preserved.
|
|
25
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts This is a host capability boundary with a stated invalidation reason, rather than a test-only bypass, patched cache implementation, or assumed writable directory.
|
|
26
|
-
* @evidence contracts/common.md#meaningful-documentation The comment explains why per-module opt-out is unavailable and why the warning and configuration-level fallback are necessary.
|
|
27
|
-
* @evidence contracts/portability.md#os-neutral-implementation Writability is proven by an actual write below the tool directory and the fallback, and the root is resolved with path.resolve against cwd, so no operating-system name, permission bit or drive layout is assumed.
|
|
28
|
-
* @evidence contracts/performance.md#efficient-algorithms
|
|
29
|
-
* At most two write probes retain native path/mkdir/write/removal work and
|
|
30
|
-
* delegated fallback naming/trust setup. Warning text follows path length;
|
|
31
|
-
* disabling cache copies the config/compilation own fields. A fixed probe
|
|
32
|
-
* count does not make native operations or field populations constant cost.
|
|
33
|
-
* @evidence contracts/performance.md#reuse-equivalent-work
|
|
34
|
-
* The WARNED set emits the unwritable-records warning once per tool
|
|
35
|
-
* directory spelling, not once per config pass. It marks before emission,
|
|
36
|
-
* so it suppresses later attempts rather than certifying user receipt. Write
|
|
37
|
-
* capability is still freshly probed instead of reused from that warning key.
|
|
38
|
-
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
39
|
-
* WARNED retains each distinct tool-directory spelling for the process life,
|
|
40
|
-
* without eviction or a fixed string-byte bound. Probe cleanup and persistent
|
|
41
|
-
* directories belong to the write-probe helper; failed removal can leave its
|
|
42
|
-
* probe. Returned config ownership transfers to Farm.
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The configuration hook keeps persistent caching whenever the default record directory or the private fallback on Farm's volume can host an ordinary record directory; a later write retains its own error handling.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design The default location's probe and the fallback query, in the order records are written, decide whether to copy the config with persistentCache disabled.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No probe file or nonignored project directory is created to test the candidate.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment explains the host limitation, invalidation failure and configuration-level fallback.
|
|
14
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native path resolution and filesystem access checks observe the candidate under the host's selected root and platform permissions.
|
|
15
|
+
* @evidence contracts/performance.md#efficient-algorithms The default location's bounded component walk runs first, and the fallback's ancestor walk only when it refuses; the disabled case copies the configuration's own properties.
|
|
16
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Writability is observed afresh on each configuration pass.
|
|
17
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The warning set retains one spelling per refused root for the process lifetime, with no fixed cap. No probe file or handle is retained.
|
|
43
18
|
*/
|
|
44
19
|
export declare function farmPersistentCacheWithoutRecords<Config extends {
|
|
45
20
|
compilation?: {
|