async commit(pipelineKey) {
    var _this$value$hash;

    // If there is a dirty AST, clear out any old content and map as these
    // must be regenerated later and shouldn't be committed.
    if (this.ast != null && this.isASTDirty) {
      this.content = null;
      this.mapBuffer = null;
    }

    let size = 0;
    let contentKey = this.content == null ? null : this.getCacheKey('content' + pipelineKey);
    let mapKey = this.mapBuffer == null ? null : this.getCacheKey('map' + pipelineKey);
    let astKey = this.ast == null ? null : this.getCacheKey('ast' + pipelineKey); // Since we can only read from the stream once, compute the content length
    // and hash while it's being written to the cache.

    await Promise.all([contentKey != null && this.commitContent(contentKey).then(s => size = s), this.mapBuffer != null && mapKey != null && this.options.cache.setBlob(mapKey, this.mapBuffer), astKey != null && this.options.cache.setBlob(astKey, (0, _serializer.serializeRaw)(this.ast))]);
    this.value.contentKey = contentKey;
    this.value.mapKey = mapKey;
    this.value.astKey = astKey;
    this.value.outputHash = (0, _hash().hashString)(((_this$value$hash = this.value.hash) !== null && _this$value$hash !== void 0 ? _this$value$hash : '') + pipelineKey + (await (0, _assetUtils.getInvalidationHash)(this.getInvalidations(), this.options)));

    if (this.content != null) {
      this.value.stats.size = size;
    }

    this.value.isLargeBlob = this.content instanceof _stream().Readable;
    this.value.committed = true;
  }
/*
   * Prepares the asset for being serialized to the cache by commiting its
   * content and map of the asset to the cache.
   */
Prepares the asset for being serialized to the cache by commiting its
content and map of the asset to the cache.
Prepares the asset for being serialized to the cache by commiting its content and map of the asset to the cache .
async commit(pipelineKey) {
    var _this$value$hash;
    if (this.ast != null && this.isASTDirty) {
      this.content = null;
      this.mapBuffer = null;
    }
    let size = 0;
    let contentKey = this.content == null ? null : this.getCacheKey('content' + pipelineKey);
    let mapKey = this.mapBuffer == null ? null : this.getCacheKey('map' + pipelineKey);
    let astKey = this.ast == null ? null : this.getCacheKey('ast' + pipelineKey); 
    await Promise.all([contentKey != null && this.commitContent(contentKey).then(s => size = s), this.mapBuffer != null && mapKey != null && this.options.cache.setBlob(mapKey, this.mapBuffer), astKey != null && this.options.cache.setBlob(astKey, (0, _serializer.serializeRaw)(this.ast))]);
    this.value.contentKey = contentKey;
    this.value.mapKey = mapKey;
    this.value.astKey = astKey;
    this.value.outputHash = (0, _hash().hashString)(((_this$value$hash = this.value.hash) !== null && _this$value$hash !== void 0 ? _this$value$hash : '') + pipelineKey + (await (0, _assetUtils.getInvalidationHash)(this.getInvalidations(), this.options)));
    if (this.content != null) {
      this.value.stats.size = size;
    }
    this.value.isLargeBlob = this.content instanceof _stream().Readable;
    this.value.committed = true;
  }
async commit ( pipelineKey ) { var _this$value$hash ; if ( this . ast != null && this . isASTDirty ) { this . content = null ; this . mapBuffer = null ; } let size = 0 ; let contentKey = this . content == null ? null : this . getCacheKey ( 'content' + pipelineKey ) ; let mapKey = this . mapBuffer == null ? null : this . getCacheKey ( 'map' + pipelineKey ) ; let astKey = this . ast == null ? null : this . getCacheKey ( 'ast' + pipelineKey ) ; await Promise . all ( [ contentKey != null && this . commitContent ( contentKey ) . then ( s => size = s ) , this . mapBuffer != null && mapKey != null && this . options . cache . setBlob ( mapKey , this . mapBuffer ) , astKey != null && this . options . cache . setBlob ( astKey , ( 0 , _serializer . serializeRaw ) ( this . ast ) ) ] ) ; this . value . contentKey = contentKey ; this . value . mapKey = mapKey ; this . value . astKey = astKey ; this . value . outputHash = ( 0 , _hash ( ) . hashString ) ( ( ( _this$value$hash = this . value . hash ) !== null && _this$value$hash !== void 0 ? _this$value$hash : '' ) + pipelineKey + ( await ( 0 , _assetUtils . getInvalidationHash ) ( this . getInvalidations ( ) , this . options ) ) ) ; if ( this . content != null ) { this . value . stats . size = size ; } this . value . isLargeBlob = this . content instanceof _stream ( ) . Readable ; this . value . committed = true ; }
Prepares the asset for being serialized to the cache by commiting its
 content and map of the asset to the cache.
Prepares the asset for being serialized to the cache by commiting its content and map of the asset to the cache .
// If there is a dirty AST, clear out any old content and map as these // must be regenerated later and shouldn't be committed. // Since we can only read from the stream once, compute the content length // and hash while it's being written to the cache.