@ttsc/unplugin 0.31.0 → 0.31.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/lib/core/bridge/projectRecordMoved.js +1 -1
- package/lib/core/bridge/projectRecordMoved.js.map +1 -1
- package/lib/core/bridge/projectRecordMoved.mjs +1 -1
- package/lib/core/bridge/projectRecordMoved.mjs.map +1 -1
- package/lib/core/bun/bun.d.cts +3 -2
- package/lib/core/bun/bun.d.mts +3 -2
- package/lib/core/bun/bun.d.ts +3 -2
- package/lib/core/bun/bun.js +8 -4
- package/lib/core/bun/bun.js.map +1 -1
- package/lib/core/bun/bun.mjs +8 -4
- package/lib/core/bun/bun.mjs.map +1 -1
- package/lib/core/observer/createInputObserver.js +7 -6
- package/lib/core/observer/createInputObserver.js.map +1 -1
- package/lib/core/observer/createInputObserver.mjs +7 -6
- package/lib/core/observer/createInputObserver.mjs.map +1 -1
- package/lib/core/observer/openIsolatedRecursiveWatch.d.cts +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.d.mts +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.d.ts +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.js +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.js.map +1 -1
- package/lib/core/observer/openIsolatedRecursiveWatch.mjs +11 -12
- package/lib/core/observer/openIsolatedRecursiveWatch.mjs.map +1 -1
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.cts +12 -3
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.mts +12 -3
- package/lib/core/transform/cache/TtscCachedProjectTransform.d.ts +12 -3
- package/lib/core/transform/cache/selectCachedGenerationAction.d.cts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.mts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.d.ts +2 -0
- package/lib/core/transform/cache/selectCachedGenerationAction.js +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.js.map +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs +1 -1
- package/lib/core/transform/cache/selectCachedGenerationAction.mjs.map +1 -1
- package/lib/core/transform/deliverCachedTransform.d.cts +36 -0
- package/lib/core/transform/deliverCachedTransform.d.mts +36 -0
- package/lib/core/transform/deliverCachedTransform.d.ts +36 -0
- package/lib/core/transform/deliverCachedTransform.js +73 -0
- package/lib/core/transform/deliverCachedTransform.js.map +1 -0
- package/lib/core/transform/deliverCachedTransform.mjs +71 -0
- package/lib/core/transform/deliverCachedTransform.mjs.map +1 -0
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.cts +2 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.mts +2 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.d.ts +2 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js +6 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.js.map +1 -1
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs +6 -2
- package/lib/core/transform/envelope/selectDeclaredProjectInputKeys.mjs.map +1 -1
- package/lib/core/transform/envelope/selectExternalInputPaths.d.cts +3 -5
- package/lib/core/transform/envelope/selectExternalInputPaths.d.mts +3 -5
- package/lib/core/transform/envelope/selectExternalInputPaths.d.ts +3 -5
- package/lib/core/transform/envelope/selectExternalInputPaths.js +8 -7
- package/lib/core/transform/envelope/selectExternalInputPaths.js.map +1 -1
- package/lib/core/transform/envelope/selectExternalInputPaths.mjs +8 -7
- package/lib/core/transform/envelope/selectExternalInputPaths.mjs.map +1 -1
- package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.cts +15 -12
- package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.mts +15 -12
- package/lib/core/transform/filesystem/TtscTransformFilesystemOperations.d.ts +15 -12
- package/lib/core/transform/generation/captureFailedGenerationInputStates.js +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.js.map +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs +1 -1
- package/lib/core/transform/generation/captureFailedGenerationInputStates.mjs.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.js +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.js.map +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs +1 -1
- package/lib/core/transform/generation/captureTransformGeneration.mjs.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js +2 -2
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.js.map +1 -1
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs +2 -2
- package/lib/core/transform/generation/failedGenerationEnvironmentChanged.mjs.map +1 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.cts +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.mts +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.d.ts +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.js +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.js.map +1 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs +3 -1
- package/lib/core/transform/generation/selectTransformAttemptDisposition.mjs.map +1 -1
- package/lib/core/transform/generation/transformProject.d.cts +9 -7
- package/lib/core/transform/generation/transformProject.d.mts +9 -7
- package/lib/core/transform/generation/transformProject.d.ts +9 -7
- package/lib/core/transform/generation/transformProject.js +14 -9
- package/lib/core/transform/generation/transformProject.js.map +1 -1
- package/lib/core/transform/generation/transformProject.mjs +14 -9
- package/lib/core/transform/generation/transformProject.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.cts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.mts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.d.ts +9 -3
- package/lib/core/transform/inputs/pluginSourceFilesDigest.js +10 -4
- package/lib/core/transform/inputs/pluginSourceFilesDigest.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs +11 -5
- package/lib/core/transform/inputs/pluginSourceFilesDigest.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceHolds.d.cts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.d.mts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.d.ts +4 -2
- package/lib/core/transform/inputs/pluginSourceHolds.js +9 -4
- package/lib/core/transform/inputs/pluginSourceHolds.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceHolds.mjs +9 -4
- package/lib/core/transform/inputs/pluginSourceHolds.mjs.map +1 -1
- package/lib/core/transform/inputs/pluginSourceState.d.cts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.d.mts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.d.ts +3 -1
- package/lib/core/transform/inputs/pluginSourceState.js +8 -3
- package/lib/core/transform/inputs/pluginSourceState.js.map +1 -1
- package/lib/core/transform/inputs/pluginSourceState.mjs +8 -3
- package/lib/core/transform/inputs/pluginSourceState.mjs.map +1 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.cts +18 -5
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.mts +18 -5
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.d.ts +18 -5
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.js +53 -12
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.js.map +1 -1
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs +53 -12
- package/lib/core/transform/inputs/preparePluginBuildEnvironments.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/WatchBroker.d.cts +14 -4
- package/lib/core/transform/tracker/broker/WatchBroker.d.mts +14 -4
- package/lib/core/transform/tracker/broker/WatchBroker.d.ts +14 -4
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.cts +63 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.mts +63 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.d.ts +63 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.js +89 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.js.map +1 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs +89 -0
- package/lib/core/transform/tracker/broker/WatchBrokerTransport.mjs.map +1 -0
- package/lib/core/transform/tracker/broker/drainWatchBroker.d.cts +8 -8
- package/lib/core/transform/tracker/broker/drainWatchBroker.d.mts +8 -8
- package/lib/core/transform/tracker/broker/drainWatchBroker.d.ts +8 -8
- package/lib/core/transform/tracker/broker/drainWatchBroker.js +12 -13
- package/lib/core/transform/tracker/broker/drainWatchBroker.js.map +1 -1
- package/lib/core/transform/tracker/broker/drainWatchBroker.mjs +12 -13
- package/lib/core/transform/tracker/broker/drainWatchBroker.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/getWatchBroker.d.cts +18 -15
- package/lib/core/transform/tracker/broker/getWatchBroker.d.mts +18 -15
- package/lib/core/transform/tracker/broker/getWatchBroker.d.ts +18 -15
- package/lib/core/transform/tracker/broker/getWatchBroker.js +87 -17
- package/lib/core/transform/tracker/broker/getWatchBroker.js.map +1 -1
- package/lib/core/transform/tracker/broker/getWatchBroker.mjs +87 -17
- package/lib/core/transform/tracker/broker/getWatchBroker.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/openBrokeredWatch.d.cts +5 -5
- package/lib/core/transform/tracker/broker/openBrokeredWatch.d.mts +5 -5
- package/lib/core/transform/tracker/broker/openBrokeredWatch.d.ts +5 -5
- package/lib/core/transform/tracker/broker/openBrokeredWatch.js +11 -14
- package/lib/core/transform/tracker/broker/openBrokeredWatch.js.map +1 -1
- package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs +11 -14
- package/lib/core/transform/tracker/broker/openBrokeredWatch.mjs.map +1 -1
- package/lib/core/transform/tracker/broker/usesWatchBroker.d.cts +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.d.mts +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.d.ts +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.js +7 -7
- package/lib/core/transform/tracker/broker/usesWatchBroker.mjs +7 -7
- package/lib/core/transform/tracker/broker/watchBrokerSource.d.cts +9 -10
- package/lib/core/transform/tracker/broker/watchBrokerSource.d.mts +9 -10
- package/lib/core/transform/tracker/broker/watchBrokerSource.d.ts +9 -10
- package/lib/core/transform/tracker/broker/watchBrokerSource.js +10 -11
- package/lib/core/transform/tracker/broker/watchBrokerSource.js.map +1 -1
- package/lib/core/transform/tracker/broker/watchBrokerSource.mjs +10 -11
- package/lib/core/transform/tracker/broker/watchBrokerSource.mjs.map +1 -1
- package/lib/core/transform/transformTtsc.d.cts +7 -4
- package/lib/core/transform/transformTtsc.d.mts +7 -4
- package/lib/core/transform/transformTtsc.d.ts +7 -4
- package/lib/core/transform/transformTtsc.js +38 -93
- package/lib/core/transform/transformTtsc.js.map +1 -1
- package/lib/core/transform/transformTtsc.mjs +38 -93
- package/lib/core/transform/transformTtsc.mjs.map +1 -1
- package/lib/core/transform/validation/TtscGenerationProof.d.cts +105 -0
- package/lib/core/transform/validation/TtscGenerationProof.d.mts +105 -0
- package/lib/core/transform/validation/TtscGenerationProof.d.ts +105 -0
- package/lib/core/transform/validation/TtscGenerationProof.js +149 -0
- package/lib/core/transform/validation/TtscGenerationProof.js.map +1 -0
- package/lib/core/transform/validation/TtscGenerationProof.mjs +149 -0
- package/lib/core/transform/validation/TtscGenerationProof.mjs.map +1 -0
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js +2 -2
- package/lib/core/transform/validation/captureUniversalHostInputValidation.js.map +1 -1
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs +2 -2
- package/lib/core/transform/validation/captureUniversalHostInputValidation.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.d.cts +18 -15
- package/lib/core/transform/validation/matchesCachedSource.d.mts +18 -15
- package/lib/core/transform/validation/matchesCachedSource.d.ts +18 -15
- package/lib/core/transform/validation/matchesCachedSource.js +28 -22
- package/lib/core/transform/validation/matchesCachedSource.js.map +1 -1
- package/lib/core/transform/validation/matchesCachedSource.mjs +28 -22
- package/lib/core/transform/validation/matchesCachedSource.mjs.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.cts +3 -2
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.mts +3 -2
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.d.ts +3 -2
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js +4 -4
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.js.map +1 -1
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs +4 -4
- package/lib/core/transform/validation/matchesCompleteInputSnapshot.mjs.map +1 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.cts +2 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.mts +2 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.d.ts +2 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.js +2 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs +2 -2
- package/lib/core/transform/validation/matchesNarrowPersistentInputs.mjs.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.cts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.mts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.d.ts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.js +7 -5
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.js.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs +7 -5
- package/lib/core/transform/validation/matchesUniversalHostInputTrees.mjs.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.d.cts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputs.d.mts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputs.d.ts +3 -2
- package/lib/core/transform/validation/matchesUniversalHostInputs.js +5 -5
- package/lib/core/transform/validation/matchesUniversalHostInputs.js.map +1 -1
- package/lib/core/transform/validation/matchesUniversalHostInputs.mjs +5 -5
- package/lib/core/transform/validation/matchesUniversalHostInputs.mjs.map +1 -1
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.cts +5 -4
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.mts +5 -4
- package/lib/core/transform/validation/nativeInputPredicatesHold.d.ts +5 -4
- package/lib/core/transform/validation/nativeInputPredicatesHold.js +31 -12
- package/lib/core/transform/validation/nativeInputPredicatesHold.js.map +1 -1
- package/lib/core/transform/validation/nativeInputPredicatesHold.mjs +31 -12
- package/lib/core/transform/validation/nativeInputPredicatesHold.mjs.map +1 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.cts +2 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.mts +2 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.d.ts +2 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.js +2 -2
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.js.map +1 -1
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs +2 -2
- package/lib/core/transform/validation/notificationsProveProgramUnchanged.mjs.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaseline.d.cts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.d.mts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.d.ts +4 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.js +3 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.js.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaseline.mjs +3 -0
- package/lib/core/transform/watch/captureWatchInputBaseline.mjs.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.d.cts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.d.mts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.d.ts +2 -0
- package/lib/core/transform/watch/captureWatchInputBaselines.js +3 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.js.map +1 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.mjs +3 -1
- package/lib/core/transform/watch/captureWatchInputBaselines.mjs.map +1 -1
- package/lib/core/transform/watch/notifyWatchInputs.js +3 -0
- package/lib/core/transform/watch/notifyWatchInputs.js.map +1 -1
- package/lib/core/transform/watch/notifyWatchInputs.mjs +3 -0
- package/lib/core/transform/watch/notifyWatchInputs.mjs.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.cts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.mts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.d.ts +5 -2
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js +6 -3
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.js.map +1 -1
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs +6 -3
- package/lib/core/transform/watch/watchInputEvidenceMatchesDisk.mjs.map +1 -1
- package/lib/core/turbopack/turbopack.js +2 -1
- package/lib/core/turbopack/turbopack.js.map +1 -1
- package/lib/core/turbopack/turbopack.mjs +2 -1
- package/lib/core/turbopack/turbopack.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/bridge/projectRecordMoved.ts +3 -1
- package/src/core/bun/bun.ts +8 -4
- package/src/core/observer/createInputObserver.ts +8 -5
- package/src/core/observer/openIsolatedRecursiveWatch.ts +11 -12
- package/src/core/transform/cache/TtscCachedProjectTransform.ts +13 -3
- package/src/core/transform/cache/selectCachedGenerationAction.ts +9 -1
- package/src/core/transform/deliverCachedTransform.ts +97 -0
- package/src/core/transform/envelope/selectDeclaredProjectInputKeys.ts +5 -2
- package/src/core/transform/envelope/selectExternalInputPaths.ts +7 -7
- package/src/core/transform/filesystem/TtscTransformFilesystemOperations.ts +15 -12
- package/src/core/transform/generation/captureFailedGenerationInputStates.ts +1 -0
- package/src/core/transform/generation/captureTransformGeneration.ts +6 -1
- package/src/core/transform/generation/failedGenerationEnvironmentChanged.ts +12 -2
- package/src/core/transform/generation/selectTransformAttemptDisposition.ts +3 -1
- package/src/core/transform/generation/transformProject.ts +13 -9
- package/src/core/transform/inputs/pluginSourceFilesDigest.ts +11 -4
- package/src/core/transform/inputs/pluginSourceHolds.ts +13 -3
- package/src/core/transform/inputs/pluginSourceState.ts +8 -2
- package/src/core/transform/inputs/preparePluginBuildEnvironments.ts +64 -11
- package/src/core/transform/tracker/broker/WatchBroker.ts +15 -4
- package/src/core/transform/tracker/broker/WatchBrokerTransport.ts +82 -0
- package/src/core/transform/tracker/broker/drainWatchBroker.ts +12 -13
- package/src/core/transform/tracker/broker/getWatchBroker.ts +89 -18
- package/src/core/transform/tracker/broker/openBrokeredWatch.ts +11 -14
- package/src/core/transform/tracker/broker/usesWatchBroker.ts +7 -7
- package/src/core/transform/tracker/broker/watchBrokerSource.ts +10 -11
- package/src/core/transform/transformTtsc.ts +38 -92
- package/src/core/transform/validation/TtscGenerationProof.ts +201 -0
- package/src/core/transform/validation/captureUniversalHostInputValidation.ts +2 -1
- package/src/core/transform/validation/matchesCachedSource.ts +27 -21
- package/src/core/transform/validation/matchesCompleteInputSnapshot.ts +5 -3
- package/src/core/transform/validation/matchesNarrowPersistentInputs.ts +3 -1
- package/src/core/transform/validation/matchesUniversalHostInputTrees.ts +8 -3
- package/src/core/transform/validation/matchesUniversalHostInputs.ts +6 -4
- package/src/core/transform/validation/nativeInputPredicatesHold.ts +36 -14
- package/src/core/transform/validation/notificationsProveProgramUnchanged.ts +3 -1
- package/src/core/transform/watch/captureWatchInputBaseline.ts +4 -0
- package/src/core/transform/watch/captureWatchInputBaselines.ts +7 -1
- package/src/core/transform/watch/notifyWatchInputs.ts +3 -0
- package/src/core/transform/watch/watchInputEvidenceMatchesDisk.ts +12 -2
- package/src/core/turbopack/turbopack.ts +2 -1
|
@@ -8,34 +8,26 @@ var TRANSFORM_CACHE_DEPENDENCY_WITNESSES = require('./cache/TRANSFORM_CACHE_DEPE
|
|
|
8
8
|
var TRANSFORM_RESULT_FILESYSTEM = require('./cache/TRANSFORM_RESULT_FILESYSTEM.js');
|
|
9
9
|
var awaitOrEvict = require('./cache/awaitOrEvict.js');
|
|
10
10
|
var createTransformCacheKey = require('./cache/createTransformCacheKey.js');
|
|
11
|
-
var disposeCachedTransform = require('./cache/disposeCachedTransform.js');
|
|
12
11
|
var evictGeneration = require('./cache/evictGeneration.js');
|
|
13
12
|
var replaysTerminalGeneration = require('./cache/replaysTerminalGeneration.js');
|
|
14
13
|
var selectCachedGenerationAction = require('./cache/selectCachedGenerationAction.js');
|
|
15
|
-
var selectOrEvict = require('./cache/selectOrEvict.js');
|
|
16
14
|
var transformCacheEpoch = require('./cache/transformCacheEpoch.js');
|
|
17
15
|
var transformCacheTrustsNotifications = require('./cache/transformCacheTrustsNotifications.js');
|
|
18
16
|
var transformFilesystem = require('./cache/transformFilesystem.js');
|
|
19
17
|
var withdrawGenerationNotifications = require('./cache/withdrawGenerationNotifications.js');
|
|
20
|
-
var
|
|
21
|
-
var reportSuccessDiagnostics = require('./diagnostics/reportSuccessDiagnostics.js');
|
|
22
|
-
var TtscMissingProgramOutputError = require('./errors/TtscMissingProgramOutputError.js');
|
|
18
|
+
var deliverCachedTransform = require('./deliverCachedTransform.js');
|
|
23
19
|
var TtscUnstableGenerationError = require('./errors/TtscUnstableGenerationError.js');
|
|
24
20
|
var transformProject = require('./generation/transformProject.js');
|
|
25
21
|
var preparePluginBuildEnvironments = require('./inputs/preparePluginBuildEnvironments.js');
|
|
26
22
|
var TRANSFORM_CACHE_SESSIONS = require('./session/TRANSFORM_CACHE_SESSIONS.js');
|
|
27
23
|
var settleProjectMutationEvents = require('./tracker/settleProjectMutationEvents.js');
|
|
28
24
|
var resolveProjectSelection = require('./tsconfig/resolveProjectSelection.js');
|
|
29
|
-
var createTransformResult = require('./utils/createTransformResult.js');
|
|
30
25
|
var isDeclarationFile = require('./utils/isDeclarationFile.js');
|
|
31
26
|
var isHostWrapperQuery = require('./utils/isHostWrapperQuery.js');
|
|
32
27
|
var pluginsAreDisabled = require('./utils/pluginsAreDisabled.js');
|
|
33
28
|
var stripQuery = require('./utils/stripQuery.js');
|
|
34
|
-
var
|
|
35
|
-
var notifyFailedGenerationInputs = require('./watch/notifyFailedGenerationInputs.js');
|
|
29
|
+
var TtscGenerationProof = require('./validation/TtscGenerationProof.js');
|
|
36
30
|
var notifyRejectedGenerationInputs = require('./watch/notifyRejectedGenerationInputs.js');
|
|
37
|
-
var notifyVolatileDelivery = require('./watch/notifyVolatileDelivery.js');
|
|
38
|
-
var notifyWatchInputs = require('./watch/notifyWatchInputs.js');
|
|
39
31
|
var prepareProjectRecordDirectories = require('./watch/prepareProjectRecordDirectories.js');
|
|
40
32
|
|
|
41
33
|
/**
|
|
@@ -73,7 +65,7 @@ var prepareProjectRecordDirectories = require('./watch/prepareProjectRecordDirec
|
|
|
73
65
|
* per build, not per compilation.
|
|
74
66
|
* @evidence contracts/common.md#principled-implementation Project selection and generation-qualified cache admission preserve compiler disk authority; fresh-only success additionally needs an explicit nonwatching lifecycle, coherent project declaration and actual host-cache withdrawal, because incomplete observation cannot support watch invalidation.
|
|
75
67
|
* @evidence contracts/common.md#clear-and-simple-design One delivery coordinator composes project selection, cache admission, compilation, output selection and host notifications; dedicated owners handle proof and lifetime internals.
|
|
76
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines
|
|
68
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines; incomplete local results can share only explicitly nonwatching first deliveries in their exact pass. Unknown/watching lifecycles or unsupported withdrawal reject and evict them rather than invent persistent records or dependency closure.
|
|
77
69
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notification responsibilities with links to maintained reference context.
|
|
78
70
|
* @evidence contracts/performance.md#efficient-algorithms
|
|
79
71
|
* Selection/key construction pays ancestor/config/alias/option/path text work.
|
|
@@ -81,15 +73,18 @@ var prepareProjectRecordDirectories = require('./watch/prepareProjectRecordDirec
|
|
|
81
73
|
* replay source/project/external/universal proofs before selecting output.
|
|
82
74
|
* In-flight/valid completed reuse avoids compilation, not those checks or
|
|
83
75
|
* output/map/notification/record work. Capture misses pay whole native compile
|
|
84
|
-
* and input populations
|
|
76
|
+
* and input populations. The common proof owner skips redundant environment
|
|
77
|
+
* preparation for proven first deliveries and shares synchronous native proof
|
|
78
|
+
* queries; persistent/repeated delivery establishes fresh authority. Concurrent supersession can repeat the outer loop
|
|
85
79
|
* without a delivery-level retry/time bound here.
|
|
86
80
|
* @evidence contracts/performance.md#reuse-equivalent-work Cache identity covers config/options/plugins/aliases; current generations, pass-qualified terminal verdicts and in-flight Promises are shared only while their source and dependency proof remains valid.
|
|
87
81
|
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
88
82
|
* Optional cache state retains current generation Promises/results and
|
|
89
83
|
* per-key dependency/case facts without a byte/key cap here. Native tasks
|
|
90
84
|
* belong to compiler/capture owners; uncached captures retain no notification
|
|
91
|
-
* or persistent clock probe. Fresh-only delivery
|
|
92
|
-
*
|
|
85
|
+
* or persistent clock probe. Fresh-only delivery releases capture resources,
|
|
86
|
+
* retaining only an explicitly admitted local pass result; rejected or failed
|
|
87
|
+
* incomplete handoff detaches its generation. Eviction/disposal attempt independent resource release
|
|
93
88
|
* and native failures need not close every handle or remove every probe.
|
|
94
89
|
* @evidence contracts/portability.md#os-neutral-implementation Native module paths and project coordinates use supported path/filesystem abstractions, while actual case policy and watcher capability come from generation proof rather than OS-name assumptions.
|
|
95
90
|
*/
|
|
@@ -151,7 +146,7 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
151
146
|
const terminal = TERMINAL_TRANSFORM_GENERATIONS.TERMINAL_TRANSFORM_GENERATIONS.get(transformed);
|
|
152
147
|
if (terminal !== undefined) {
|
|
153
148
|
if (terminal instanceof TtscUnstableGenerationError.TtscUnstableGenerationError) {
|
|
154
|
-
await preparePluginBuildEnvironments.preparePluginBuildEnvironments(terminal.validation.cached.result, filesystem);
|
|
149
|
+
await preparePluginBuildEnvironments.preparePluginBuildEnvironments(terminal.validation.cached.result, filesystem, undefined, terminal.validation.cached.projectRoot);
|
|
155
150
|
if (cache?.get(key) !== transformed)
|
|
156
151
|
continue;
|
|
157
152
|
}
|
|
@@ -190,16 +185,19 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
190
185
|
if (!transformCacheTrustsNotifications.transformCacheTrustsNotifications(cache)) {
|
|
191
186
|
withdrawGenerationNotifications.withdrawGenerationNotifications(cached);
|
|
192
187
|
}
|
|
193
|
-
await preparePluginBuildEnvironments.preparePluginBuildEnvironments(cached.result, filesystem, cached);
|
|
194
|
-
if (cache?.get(key) !== transformed)
|
|
195
|
-
continue;
|
|
196
188
|
if (epoch === undefined) {
|
|
197
189
|
await settleProjectMutationEvents.settleProjectMutationEvents(cached);
|
|
198
190
|
if (cache?.get(key) !== transformed) {
|
|
199
191
|
continue;
|
|
200
192
|
}
|
|
201
193
|
}
|
|
194
|
+
await TtscGenerationProof.TtscGenerationProof.prepare(cached, file, epoch);
|
|
195
|
+
if (cache?.get(key) !== transformed)
|
|
196
|
+
continue;
|
|
197
|
+
// No await between this observation and synchronous admission.
|
|
198
|
+
const proof = TtscGenerationProof.TtscGenerationProof.create(cached, file, epoch);
|
|
202
199
|
const action = selectCachedGenerationAction.selectCachedGenerationAction({
|
|
200
|
+
proof,
|
|
203
201
|
cache,
|
|
204
202
|
cached,
|
|
205
203
|
epoch,
|
|
@@ -212,37 +210,17 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
212
210
|
continue;
|
|
213
211
|
}
|
|
214
212
|
if (action === "serve") {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
catch (error) {
|
|
229
|
-
if (!(error instanceof TtscMissingProgramOutputError.TtscMissingProgramOutputError)) {
|
|
230
|
-
notifyFailedGenerationInputs.notifyFailedGenerationInputs(hooks, cached, file, watchSelection);
|
|
231
|
-
throw error;
|
|
232
|
-
}
|
|
233
|
-
// The compile is fine and simply has nothing for this module, so the
|
|
234
|
-
// module goes back to the host untransformed rather than failing the
|
|
235
|
-
// build (samchon/ttsc#1308). Its project config and selection inputs
|
|
236
|
-
// still decide whether a later generation will contain this module,
|
|
237
|
-
// so hosts must receive the same universal watch-input batch.
|
|
238
|
-
reportMissingProgramOutput.reportMissingProgramOutput(cached, error, epoch);
|
|
239
|
-
notifyWatchInputs.notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
240
|
-
markCachedSourceServed.markCachedSourceServed(cached, file);
|
|
241
|
-
return undefined;
|
|
242
|
-
}
|
|
243
|
-
notifyWatchInputs.notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
244
|
-
markCachedSourceServed.markCachedSourceServed(cached, file);
|
|
245
|
-
return createTransformResult.createTransformResult(file, source, output);
|
|
213
|
+
return deliverCachedTransform.deliverCachedTransform({
|
|
214
|
+
cache,
|
|
215
|
+
cached,
|
|
216
|
+
generation: transformed,
|
|
217
|
+
key,
|
|
218
|
+
epoch,
|
|
219
|
+
file,
|
|
220
|
+
source,
|
|
221
|
+
hooks,
|
|
222
|
+
selection: watchSelection,
|
|
223
|
+
});
|
|
246
224
|
}
|
|
247
225
|
transformed = undefined;
|
|
248
226
|
}
|
|
@@ -304,50 +282,17 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
304
282
|
policies.set(key, reported);
|
|
305
283
|
}
|
|
306
284
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
hooks.markVolatile === undefined ||
|
|
319
|
-
(hooks.project?.watching !== undefined &&
|
|
320
|
-
hooks.project.watching !== hooks.watching))) {
|
|
321
|
-
throw new Error("@ttsc/unplugin: plugin input observation is unavailable; fresh output " +
|
|
322
|
-
"requires an explicitly nonwatching host with supported cache withdrawal. " +
|
|
323
|
-
"Watching, unknown or contradictory lifecycles cannot safely observe its changes.");
|
|
324
|
-
}
|
|
325
|
-
hooks?.markVolatile?.();
|
|
326
|
-
}
|
|
327
|
-
reportSuccessDiagnostics.reportSuccessDiagnostics(cached, epoch);
|
|
328
|
-
let output;
|
|
329
|
-
try {
|
|
330
|
-
output = selectOrEvict.selectOrEvict(cache, key, generation, epoch, {
|
|
331
|
-
file,
|
|
332
|
-
projectRoot,
|
|
333
|
-
result,
|
|
334
|
-
tsconfig: cached.tsconfig,
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
catch (error) {
|
|
338
|
-
if (!(error instanceof TtscMissingProgramOutputError.TtscMissingProgramOutputError)) {
|
|
339
|
-
notifyFailedGenerationInputs.notifyFailedGenerationInputs(hooks, cached, file, watchSelection);
|
|
340
|
-
throw error;
|
|
341
|
-
}
|
|
342
|
-
reportMissingProgramOutput.reportMissingProgramOutput(cached, error, epoch);
|
|
343
|
-
notifyWatchInputs.notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
344
|
-
markCachedSourceServed.markCachedSourceServed(cached, file);
|
|
345
|
-
return undefined;
|
|
346
|
-
}
|
|
347
|
-
notifyWatchInputs.notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
348
|
-
markCachedSourceServed.markCachedSourceServed(cached, file);
|
|
349
|
-
notifyVolatileDelivery.notifyVolatileDelivery(hooks, cached, file);
|
|
350
|
-
return createTransformResult.createTransformResult(file, source, output);
|
|
285
|
+
return deliverCachedTransform.deliverCachedTransform({
|
|
286
|
+
cache,
|
|
287
|
+
cached,
|
|
288
|
+
generation,
|
|
289
|
+
key,
|
|
290
|
+
epoch,
|
|
291
|
+
file,
|
|
292
|
+
source,
|
|
293
|
+
hooks,
|
|
294
|
+
selection: watchSelection,
|
|
295
|
+
});
|
|
351
296
|
}
|
|
352
297
|
}
|
|
353
298
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformTtsc.js","sources":["../../../src/core/transform/transformTtsc.ts"],"sourcesContent":[null],"names":["transformFilesystem","stripQuery","isHostWrapperQuery","isDeclarationFile","pluginsAreDisabled","prepareProjectRecordDirectories","resolveProjectSelection","createAliasPaths","createTransformCacheKey","transformCacheEpoch","TERMINAL_TRANSFORM_GENERATIONS","TtscUnstableGenerationError","preparePluginBuildEnvironments","replaysTerminalGeneration","notifyRejectedGenerationInputs","evictGeneration","awaitOrEvict","TRANSFORM_RESULT_FILESYSTEM","transformCacheTrustsNotifications","withdrawGenerationNotifications","settleProjectMutationEvents","
|
|
1
|
+
{"version":3,"file":"transformTtsc.js","sources":["../../../src/core/transform/transformTtsc.ts"],"sourcesContent":[null],"names":["transformFilesystem","stripQuery","isHostWrapperQuery","isDeclarationFile","pluginsAreDisabled","prepareProjectRecordDirectories","resolveProjectSelection","createAliasPaths","createTransformCacheKey","transformCacheEpoch","TERMINAL_TRANSFORM_GENERATIONS","TtscUnstableGenerationError","preparePluginBuildEnvironments","replaysTerminalGeneration","notifyRejectedGenerationInputs","evictGeneration","awaitOrEvict","TRANSFORM_RESULT_FILESYSTEM","transformCacheTrustsNotifications","withdrawGenerationNotifications","settleProjectMutationEvents","TtscGenerationProof","selectCachedGenerationAction","deliverCachedTransform","transformProject","TRANSFORM_CACHE_SESSIONS","TRANSFORM_CACHE_CASE_POLICIES","TRANSFORM_CACHE_DEPENDENCY_WITNESSES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDG;AACI,eAAe,aAAa,CACjC,EAAU,EACV,MAAc,EACd,OAAoC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_DE
|
|
|
6
6
|
import { TRANSFORM_RESULT_FILESYSTEM } from './cache/TRANSFORM_RESULT_FILESYSTEM.mjs';
|
|
7
7
|
import { awaitOrEvict } from './cache/awaitOrEvict.mjs';
|
|
8
8
|
import { createTransformCacheKey } from './cache/createTransformCacheKey.mjs';
|
|
9
|
-
import { disposeCachedTransform } from './cache/disposeCachedTransform.mjs';
|
|
10
9
|
import { evictGeneration } from './cache/evictGeneration.mjs';
|
|
11
10
|
import { replaysTerminalGeneration } from './cache/replaysTerminalGeneration.mjs';
|
|
12
11
|
import { selectCachedGenerationAction } from './cache/selectCachedGenerationAction.mjs';
|
|
13
|
-
import { selectOrEvict } from './cache/selectOrEvict.mjs';
|
|
14
12
|
import { transformCacheEpoch } from './cache/transformCacheEpoch.mjs';
|
|
15
13
|
import { transformCacheTrustsNotifications } from './cache/transformCacheTrustsNotifications.mjs';
|
|
16
14
|
import { transformFilesystem } from './cache/transformFilesystem.mjs';
|
|
17
15
|
import { withdrawGenerationNotifications } from './cache/withdrawGenerationNotifications.mjs';
|
|
18
|
-
import {
|
|
19
|
-
import { reportSuccessDiagnostics } from './diagnostics/reportSuccessDiagnostics.mjs';
|
|
20
|
-
import { TtscMissingProgramOutputError } from './errors/TtscMissingProgramOutputError.mjs';
|
|
16
|
+
import { deliverCachedTransform } from './deliverCachedTransform.mjs';
|
|
21
17
|
import { TtscUnstableGenerationError } from './errors/TtscUnstableGenerationError.mjs';
|
|
22
18
|
import { transformProject } from './generation/transformProject.mjs';
|
|
23
19
|
import { preparePluginBuildEnvironments } from './inputs/preparePluginBuildEnvironments.mjs';
|
|
24
20
|
import { TRANSFORM_CACHE_SESSIONS } from './session/TRANSFORM_CACHE_SESSIONS.mjs';
|
|
25
21
|
import { settleProjectMutationEvents } from './tracker/settleProjectMutationEvents.mjs';
|
|
26
22
|
import { resolveProjectSelection } from './tsconfig/resolveProjectSelection.mjs';
|
|
27
|
-
import { createTransformResult } from './utils/createTransformResult.mjs';
|
|
28
23
|
import { isDeclarationFile } from './utils/isDeclarationFile.mjs';
|
|
29
24
|
import { isHostWrapperQuery } from './utils/isHostWrapperQuery.mjs';
|
|
30
25
|
import { pluginsAreDisabled } from './utils/pluginsAreDisabled.mjs';
|
|
31
26
|
import { stripQuery } from './utils/stripQuery.mjs';
|
|
32
|
-
import {
|
|
33
|
-
import { notifyFailedGenerationInputs } from './watch/notifyFailedGenerationInputs.mjs';
|
|
27
|
+
import { TtscGenerationProof } from './validation/TtscGenerationProof.mjs';
|
|
34
28
|
import { notifyRejectedGenerationInputs } from './watch/notifyRejectedGenerationInputs.mjs';
|
|
35
|
-
import { notifyVolatileDelivery } from './watch/notifyVolatileDelivery.mjs';
|
|
36
|
-
import { notifyWatchInputs } from './watch/notifyWatchInputs.mjs';
|
|
37
29
|
import { prepareProjectRecordDirectories } from './watch/prepareProjectRecordDirectories.mjs';
|
|
38
30
|
|
|
39
31
|
/**
|
|
@@ -71,7 +63,7 @@ import { prepareProjectRecordDirectories } from './watch/prepareProjectRecordDir
|
|
|
71
63
|
* per build, not per compilation.
|
|
72
64
|
* @evidence contracts/common.md#principled-implementation Project selection and generation-qualified cache admission preserve compiler disk authority; fresh-only success additionally needs an explicit nonwatching lifecycle, coherent project declaration and actual host-cache withdrawal, because incomplete observation cannot support watch invalidation.
|
|
73
65
|
* @evidence contracts/common.md#clear-and-simple-design One delivery coordinator composes project selection, cache admission, compilation, output selection and host notifications; dedicated owners handle proof and lifetime internals.
|
|
74
|
-
* @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines
|
|
66
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Wrapper modules cannot poison source baselines; incomplete local results can share only explicitly nonwatching first deliveries in their exact pass. Unknown/watching lifecycles or unsupported withdrawal reject and evict them rather than invent persistent records or dependency closure.
|
|
75
67
|
* @evidence contracts/common.md#meaningful-documentation Native paragraphs and argument tags explain project scope, no-transform outcomes, cache epochs and per-build notification responsibilities with links to maintained reference context.
|
|
76
68
|
* @evidence contracts/performance.md#efficient-algorithms
|
|
77
69
|
* Selection/key construction pays ancestor/config/alias/option/path text work.
|
|
@@ -79,15 +71,18 @@ import { prepareProjectRecordDirectories } from './watch/prepareProjectRecordDir
|
|
|
79
71
|
* replay source/project/external/universal proofs before selecting output.
|
|
80
72
|
* In-flight/valid completed reuse avoids compilation, not those checks or
|
|
81
73
|
* output/map/notification/record work. Capture misses pay whole native compile
|
|
82
|
-
* and input populations
|
|
74
|
+
* and input populations. The common proof owner skips redundant environment
|
|
75
|
+
* preparation for proven first deliveries and shares synchronous native proof
|
|
76
|
+
* queries; persistent/repeated delivery establishes fresh authority. Concurrent supersession can repeat the outer loop
|
|
83
77
|
* without a delivery-level retry/time bound here.
|
|
84
78
|
* @evidence contracts/performance.md#reuse-equivalent-work Cache identity covers config/options/plugins/aliases; current generations, pass-qualified terminal verdicts and in-flight Promises are shared only while their source and dependency proof remains valid.
|
|
85
79
|
* @evidence contracts/performance.md#bound-retention-and-release-resources
|
|
86
80
|
* Optional cache state retains current generation Promises/results and
|
|
87
81
|
* per-key dependency/case facts without a byte/key cap here. Native tasks
|
|
88
82
|
* belong to compiler/capture owners; uncached captures retain no notification
|
|
89
|
-
* or persistent clock probe. Fresh-only delivery
|
|
90
|
-
*
|
|
83
|
+
* or persistent clock probe. Fresh-only delivery releases capture resources,
|
|
84
|
+
* retaining only an explicitly admitted local pass result; rejected or failed
|
|
85
|
+
* incomplete handoff detaches its generation. Eviction/disposal attempt independent resource release
|
|
91
86
|
* and native failures need not close every handle or remove every probe.
|
|
92
87
|
* @evidence contracts/portability.md#os-neutral-implementation Native module paths and project coordinates use supported path/filesystem abstractions, while actual case policy and watcher capability come from generation proof rather than OS-name assumptions.
|
|
93
88
|
*/
|
|
@@ -149,7 +144,7 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
149
144
|
const terminal = TERMINAL_TRANSFORM_GENERATIONS.get(transformed);
|
|
150
145
|
if (terminal !== undefined) {
|
|
151
146
|
if (terminal instanceof TtscUnstableGenerationError) {
|
|
152
|
-
await preparePluginBuildEnvironments(terminal.validation.cached.result, filesystem);
|
|
147
|
+
await preparePluginBuildEnvironments(terminal.validation.cached.result, filesystem, undefined, terminal.validation.cached.projectRoot);
|
|
153
148
|
if (cache?.get(key) !== transformed)
|
|
154
149
|
continue;
|
|
155
150
|
}
|
|
@@ -188,16 +183,19 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
188
183
|
if (!transformCacheTrustsNotifications(cache)) {
|
|
189
184
|
withdrawGenerationNotifications(cached);
|
|
190
185
|
}
|
|
191
|
-
await preparePluginBuildEnvironments(cached.result, filesystem, cached);
|
|
192
|
-
if (cache?.get(key) !== transformed)
|
|
193
|
-
continue;
|
|
194
186
|
if (epoch === undefined) {
|
|
195
187
|
await settleProjectMutationEvents(cached);
|
|
196
188
|
if (cache?.get(key) !== transformed) {
|
|
197
189
|
continue;
|
|
198
190
|
}
|
|
199
191
|
}
|
|
192
|
+
await TtscGenerationProof.prepare(cached, file, epoch);
|
|
193
|
+
if (cache?.get(key) !== transformed)
|
|
194
|
+
continue;
|
|
195
|
+
// No await between this observation and synchronous admission.
|
|
196
|
+
const proof = TtscGenerationProof.create(cached, file, epoch);
|
|
200
197
|
const action = selectCachedGenerationAction({
|
|
198
|
+
proof,
|
|
201
199
|
cache,
|
|
202
200
|
cached,
|
|
203
201
|
epoch,
|
|
@@ -210,37 +208,17 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
210
208
|
continue;
|
|
211
209
|
}
|
|
212
210
|
if (action === "serve") {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
catch (error) {
|
|
227
|
-
if (!(error instanceof TtscMissingProgramOutputError)) {
|
|
228
|
-
notifyFailedGenerationInputs(hooks, cached, file, watchSelection);
|
|
229
|
-
throw error;
|
|
230
|
-
}
|
|
231
|
-
// The compile is fine and simply has nothing for this module, so the
|
|
232
|
-
// module goes back to the host untransformed rather than failing the
|
|
233
|
-
// build (samchon/ttsc#1308). Its project config and selection inputs
|
|
234
|
-
// still decide whether a later generation will contain this module,
|
|
235
|
-
// so hosts must receive the same universal watch-input batch.
|
|
236
|
-
reportMissingProgramOutput(cached, error, epoch);
|
|
237
|
-
notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
238
|
-
markCachedSourceServed(cached, file);
|
|
239
|
-
return undefined;
|
|
240
|
-
}
|
|
241
|
-
notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
242
|
-
markCachedSourceServed(cached, file);
|
|
243
|
-
return createTransformResult(file, source, output);
|
|
211
|
+
return deliverCachedTransform({
|
|
212
|
+
cache,
|
|
213
|
+
cached,
|
|
214
|
+
generation: transformed,
|
|
215
|
+
key,
|
|
216
|
+
epoch,
|
|
217
|
+
file,
|
|
218
|
+
source,
|
|
219
|
+
hooks,
|
|
220
|
+
selection: watchSelection,
|
|
221
|
+
});
|
|
244
222
|
}
|
|
245
223
|
transformed = undefined;
|
|
246
224
|
}
|
|
@@ -302,50 +280,17 @@ async function transformTtsc(id, source, options, aliases, cache, hooks) {
|
|
|
302
280
|
policies.set(key, reported);
|
|
303
281
|
}
|
|
304
282
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
hooks.markVolatile === undefined ||
|
|
317
|
-
(hooks.project?.watching !== undefined &&
|
|
318
|
-
hooks.project.watching !== hooks.watching))) {
|
|
319
|
-
throw new Error("@ttsc/unplugin: plugin input observation is unavailable; fresh output " +
|
|
320
|
-
"requires an explicitly nonwatching host with supported cache withdrawal. " +
|
|
321
|
-
"Watching, unknown or contradictory lifecycles cannot safely observe its changes.");
|
|
322
|
-
}
|
|
323
|
-
hooks?.markVolatile?.();
|
|
324
|
-
}
|
|
325
|
-
reportSuccessDiagnostics(cached, epoch);
|
|
326
|
-
let output;
|
|
327
|
-
try {
|
|
328
|
-
output = selectOrEvict(cache, key, generation, epoch, {
|
|
329
|
-
file,
|
|
330
|
-
projectRoot,
|
|
331
|
-
result,
|
|
332
|
-
tsconfig: cached.tsconfig,
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
catch (error) {
|
|
336
|
-
if (!(error instanceof TtscMissingProgramOutputError)) {
|
|
337
|
-
notifyFailedGenerationInputs(hooks, cached, file, watchSelection);
|
|
338
|
-
throw error;
|
|
339
|
-
}
|
|
340
|
-
reportMissingProgramOutput(cached, error, epoch);
|
|
341
|
-
notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
342
|
-
markCachedSourceServed(cached, file);
|
|
343
|
-
return undefined;
|
|
344
|
-
}
|
|
345
|
-
notifyWatchInputs(hooks, cached, file, watchSelection);
|
|
346
|
-
markCachedSourceServed(cached, file);
|
|
347
|
-
notifyVolatileDelivery(hooks, cached, file);
|
|
348
|
-
return createTransformResult(file, source, output);
|
|
283
|
+
return deliverCachedTransform({
|
|
284
|
+
cache,
|
|
285
|
+
cached,
|
|
286
|
+
generation,
|
|
287
|
+
key,
|
|
288
|
+
epoch,
|
|
289
|
+
file,
|
|
290
|
+
source,
|
|
291
|
+
hooks,
|
|
292
|
+
selection: watchSelection,
|
|
293
|
+
});
|
|
349
294
|
}
|
|
350
295
|
}
|
|
351
296
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transformTtsc.mjs","sources":["../../../src/core/transform/transformTtsc.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transformTtsc.mjs","sources":["../../../src/core/transform/transformTtsc.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;;;;;;;;;;;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105 @@
|
|
|
1
|
+
import type { TtscCachedProjectTransform } from "../cache/TtscCachedProjectTransform.cjs";
|
|
2
|
+
import type { TtscTransformCache } from "../cache/TtscTransformCache.cjs";
|
|
3
|
+
import type { TtscTransformHooks } from "../watch/TtscTransformHooks.cjs";
|
|
4
|
+
/**
|
|
5
|
+
* The shared ownership boundary for generation reuse in every adapter.
|
|
6
|
+
*
|
|
7
|
+
* WARNING (#1712, #1713): a module, a synchronous input-proof transaction, a
|
|
8
|
+
* delivery pass, and a persistent generation have different lifetimes. Keep
|
|
9
|
+
* those distinctions here. Do not add native preparation before every module,
|
|
10
|
+
* keep positive toolchain checks for a whole process, or make Bun's adapter
|
|
11
|
+
* invent its own cache policy. A proven pass shares its first deliveries;
|
|
12
|
+
* persistent/repeated deliveries require new current observations. Incomplete
|
|
13
|
+
* observations can share a coherent local result only inside an explicitly
|
|
14
|
+
* nonwatching pass with actual host-cache withdrawal, never a record or pool.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/common.md#principled-implementation Explicit pass identity, source baseline and first-delivery membership delimit sharing; synchronous transactions independently qualify current native inputs and incomplete local outputs retain stricter lifecycle admission.
|
|
17
|
+
* @evidence contracts/common.md#clear-and-simple-design One core owner supplies the same preparation, pass and fresh-only policies to every adapter instead of separate host-specific caches.
|
|
18
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Missing observation never becomes complete snapshot authority; watching, persistent, repeated and unknown boundaries cannot borrow an incomplete pass result.
|
|
19
|
+
* @evidence contracts/common.md#meaningful-documentation Native context names the four lifetimes and warns against the specific performance and stale-cache regressions they prevent.
|
|
20
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation Members delegate native observations to the generation's filesystem and the native environment owner.
|
|
21
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms Members own baseline lookup, batch qualification and admission.
|
|
22
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work Members establish the distinct sharing boundaries.
|
|
23
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The namespace owns no registry; transactions and generations have explicit callers.
|
|
24
|
+
*/
|
|
25
|
+
export declare namespace TtscGenerationProof {
|
|
26
|
+
/**
|
|
27
|
+
* One synchronous admission after all asynchronous preparation has settled.
|
|
28
|
+
* Never retain this object in a generation or use it after an await.
|
|
29
|
+
*
|
|
30
|
+
* @evidence contracts/common.md#principled-implementation The exact cached owner prevents a proof of another result from supplying authority; optional native verdict is earned only by this synchronous transaction.
|
|
31
|
+
* @evidence contracts/common.md#clear-and-simple-design One transaction carries environment observations and the shared native predicate verdict.
|
|
32
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Absent environment or predicate proof remains absent, never implied success.
|
|
33
|
+
* @evidence contracts/common.md#meaningful-documentation Prose states the no-await lifetime and members distinguish owner, environment and predicate authority.
|
|
34
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation Native identity is retained by the referenced generation, not inferred by this carrier.
|
|
35
|
+
* @evidenceExclude contracts/performance.md#efficient-algorithms This carrier executes no computation.
|
|
36
|
+
* @evidenceExclude contracts/performance.md#reuse-equivalent-work The creating operation and validators own sharing decisions.
|
|
37
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The synchronous caller owns this handle-free carrier.
|
|
38
|
+
*/
|
|
39
|
+
interface Transaction {
|
|
40
|
+
/** Exact generation being synchronously admitted. */
|
|
41
|
+
readonly cached: TtscCachedProjectTransform;
|
|
42
|
+
/** Current batch, absent when the pass already owns this input proof. */
|
|
43
|
+
readonly environments?: ReadonlyMap<string, string | undefined>;
|
|
44
|
+
/** Current native predicate verdict, unbuilt until its first gate. */
|
|
45
|
+
nativePredicates?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Prepare native authority only when this delivery needs a new input proof.
|
|
49
|
+
* The caller must create its synchronous transaction after awaiting this.
|
|
50
|
+
*
|
|
51
|
+
* @evidence contracts/common.md#principled-implementation A qualified first-delivery pass already owns environment proof; all other requests prepare actual authority before synchronous admission.
|
|
52
|
+
* @evidence contracts/common.md#clear-and-simple-design One branch delegates native preparation rather than repeating it in adapters.
|
|
53
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Only the existing explicit pass contract permits skipping preparation; no watcher silence or process lifetime substitutes for it.
|
|
54
|
+
* @evidence contracts/common.md#meaningful-documentation Prose states preparation versus transaction ordering.
|
|
55
|
+
* @evidence contracts/portability.md#os-neutral-implementation Preparation uses the actual generation filesystem and native toolchain reader.
|
|
56
|
+
* @evidence contracts/performance.md#efficient-algorithms Qualified first deliveries perform baseline/identity lookups; other deliveries delegate one preparation per unique plugin directory.
|
|
57
|
+
* @evidence contracts/performance.md#reuse-equivalent-work The pass shares its existing first-delivery proof; persistent and repeated deliveries establish new native authority.
|
|
58
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources Native requests belong to their environment owner; no transaction survives this await.
|
|
59
|
+
*/
|
|
60
|
+
function prepare(cached: TtscCachedProjectTransform, file: string, epoch: number | undefined): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Start fresh synchronous observation after notification and preparation
|
|
63
|
+
* awaits, sharing actual SDK queries and native predicate replay locally.
|
|
64
|
+
*
|
|
65
|
+
* @evidence contracts/common.md#principled-implementation Current environments are batch-qualified after asynchronous work; a qualified pass needs no redundant native environment observation.
|
|
66
|
+
* @evidence contracts/common.md#clear-and-simple-design One constructor binds observations to their exact generation.
|
|
67
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts No current verdict is retained across deliveries or asynchronous boundaries.
|
|
68
|
+
* @evidence contracts/common.md#meaningful-documentation Native prose identifies the mandatory ordering and synchronous lifetime.
|
|
69
|
+
* @evidence contracts/portability.md#os-neutral-implementation Native observation remains with the environment witness owner and actual generation path identity.
|
|
70
|
+
* @evidence contracts/performance.md#efficient-algorithms Plugin selection is generation-indexed; one batch shares variable hashing and distinct SDK metadata queries.
|
|
71
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Only the following synchronous validators borrow this batch; pass sharing uses its independent first-delivery contract.
|
|
72
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources The caller releases the transaction at the end of synchronous admission; no registry or native handle is acquired.
|
|
73
|
+
*/
|
|
74
|
+
function create(cached: TtscCachedProjectTransform, file: string, epoch: number | undefined): Transaction;
|
|
75
|
+
/**
|
|
76
|
+
* Whether this module's first delivery belongs to this generation's proven
|
|
77
|
+
* pass. A missing source baseline cannot acquire this permission.
|
|
78
|
+
*
|
|
79
|
+
* @evidence contracts/common.md#principled-implementation Epoch equality, coherent snapshot or admitted local-pass state, a recorded source and an unserved identity are all required.
|
|
80
|
+
* @evidence contracts/common.md#clear-and-simple-design One predicate is shared by async preparation and synchronous source validation.
|
|
81
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts An incomplete ordinary generation or absent module baseline cannot earn pass reuse.
|
|
82
|
+
* @evidence contracts/common.md#meaningful-documentation Prose states the first-delivery and baseline restrictions.
|
|
83
|
+
* @evidence contracts/portability.md#os-neutral-implementation Baselines use the generation's actual identity and compiler project-key policy.
|
|
84
|
+
* @evidence contracts/performance.md#efficient-algorithms Baseline and served-set lookup avoid full input population traversal.
|
|
85
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Only first deliveries in the same explicitly declared pass share its proof; repeated and later-pass requests do not.
|
|
86
|
+
* @evidenceExclude contracts/performance.md#bound-retention-and-release-resources The predicate borrows generation state without retaining another owner.
|
|
87
|
+
*/
|
|
88
|
+
function sharesPass(cached: TtscCachedProjectTransform, file: string, epoch: number | undefined): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Admit and notify a fresh-only local delivery. A coherent pass-only success
|
|
91
|
+
* can keep its result inside this pass after releasing capture resources;
|
|
92
|
+
* every other fresh-only answer is detached before notifying the host.
|
|
93
|
+
* Callback failure always evicts the incomplete owner.
|
|
94
|
+
*
|
|
95
|
+
* @evidence contracts/common.md#principled-implementation Explicit nonwatching, consistent project lifecycle and cache-withdrawal capability are required on every successful incomplete delivery; retention additionally needs the compile's exact pass-only epoch.
|
|
96
|
+
* @evidence contracts/common.md#clear-and-simple-design One owner handles initial and cached fresh-only admission, resource release and host notification.
|
|
97
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts Incomplete output never acquires a persistent record or publication, and failed/unknown/watching capability cannot leave a reusable owner.
|
|
98
|
+
* @evidence contracts/common.md#meaningful-documentation Native paragraphs distinguish local pass retention, resource release and callback failure effects.
|
|
99
|
+
* @evidenceExclude contracts/portability.md#os-neutral-implementation This lifecycle operation delegates native resource release to the generation disposer.
|
|
100
|
+
* @evidence contracts/performance.md#efficient-algorithms Identity/epoch checks and one callback add no input scan; resource disposal visits the fixed tracker population.
|
|
101
|
+
* @evidence contracts/performance.md#reuse-equivalent-work Only coherent locally admitted output in its exact nonwatching pass survives; a later pass or repeated module must obtain another result.
|
|
102
|
+
* @evidence contracts/performance.md#bound-retention-and-release-resources Capture resources are released even when local output is kept; rejection and callback failure detach the owning Promise, and the cache lifecycle bounds retained result lifetime.
|
|
103
|
+
*/
|
|
104
|
+
function admitFreshOnly(cached: TtscCachedProjectTransform, cache: TtscTransformCache | undefined, key: string, generation: Promise<TtscCachedProjectTransform>, epoch: number | undefined, hooks: TtscTransformHooks | undefined): void;
|
|
105
|
+
}
|