INNER CODE UNIT · TypeScript

Promise

cloudflare/serverless-registry · push/index.ts:172

              await new Promise((resFlush) => gzipStream.flush(() => resFlush(true)));
              // End the stream
              await new Promise<void>((res) => gzipStream.end(res));
            },
          }),
        );

      // Wait until the gzipStream has finished all the piping
      await new Promise((res) => gzipStream.on("end", () => res(true)));

      const digest = hasher.digest("hex");
      await rename(inprogressPath, path.join(cacheFolder, digest));
      await write(layerCachePath, digest);
      return digest;
    }),
  );
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…