Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function readDecodeAndAddFileContentsToProjectFiles
import { readDecodeAndAddFileContentsToProjectFiles } from "https://deno.land/x/netzo@v0.2.10/cli/src/utils/netzo.ts";

Add 'contents' field for each file entry by reading and decoding file contents from disk.

USAGE: const projectFiles = await readDecodeAndAddFileContentsToProjectFiles(manifest)

Parameters

filesWithoutContents: Omit<Project["files"], "contents">

{Omit<Project['files'], 'contents'>} - a flat manifest of file entries without the 'contents' field

Returns

Promise<Project["files"]>
  • a flat manifest of file entries