repoformat

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package repoformat is what an anfra repo is, as anything handling one outside the engine needs it: which files make up a repo (Publishable), and how a file's content is named (BlobID). anfra core owns it, as it owns the repo format; anfra-cloud imports it, so a server and the CLI agree on both.

Index

Constants

View Source
const AppsDir = "apps"

AppsDir is where a repo's Data Apps are: published whole.

TODO: configurable, in the repo's config, rather than fixed.

Variables

This section is empty.

Functions

func BlobID

func BlobID(content []byte) string

BlobID is content's git blob id: SHA-1 over "blob <size>\0" and the content, as git names it with no filters applied. It is what a publish names a file's content by, and what a server, storing it in git, answers for it.

func Publishable

func Publishable(path string) bool

Publishable reports whether a file is part of an anfra repo, so a publish carries it: its AML (*.aml), and its Data Apps (everything under AppsDir). path is slash-separated and relative to the repo root.

A publish carries the repo, not the folder it is in: what the server uses, chosen by the repo's format, the same on every machine, with or without git. So a .env, build output, notes or scripts beside the repo are never sent, and nothing depends on .gitignore, which says what belongs in version control, a different question (PUBLISH.md §What gets published). Within the repo, never:

  • a path with a part starting with ".": git's own files, the repo's config (.anfra/, whose data_sources.yml holds credentials), editors' and tools' state;
  • a path through node_modules: a Data App's installed dependencies.

The CLI selects with it, and a server refuses what it does not allow, so neither a modified client nor a mistake in one can publish anything else.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL