.wa/kit.json records which kit version a project comes from, which kit modules it has, with their manifests and file hashes, and which modules the project wrote itself. gato create, add, remove and update write it; you edit only locales and projectModules by hand. Commit it.
.wa/kit.json
schemaRelation passes and the real field gets its default.
Top-level fields
Kit version the project’s kit files come from.
add and list fetch the kit at tag v<kitVersion>; update uses it as the merge base. Changed only by gato update.Default kit source for
add, list and update. gato create writes the repo of the kit it used, https://github.com/webamigos/gatojs.git for the public kit. The schema default applies only to old files without the field.Display name and slug.
add and update use them to replace placeholders in kit files; generate uses them for {{projectName}} and {{projectSlug}} in module variable examples. The snake name is derived from the slug.App languages: at least one, must contain
pl, no duplicates. generate writes them to src/i18n/locales.generated.ts and creates translation loaders only for them. Edit it by hand, then run gato generate.Features written in the project. See Project modules.
File hashes
For every filecreate, add or update copies, modules.<name>.files holds a value computed from the content written to the project (after placeholder replacement):
The hashes let
gato remove refuse to delete files you changed, and give gato update a base to tell kit changes from yours. After an update, hashes are those of the kit’s content at the target version, so a merged file with local changes still counts as changed. Generated files are not copied and have no hash.
Project modules
A project module is a feature written in the project, registered next to kit modules. Its entry has only amanifest, without a version or file hashes:
.wa/kit.json validates these entries first and stops on the first problem:
nameequals the key;- no kit module has the same name;
- every module in
requiresis installed (as a kit or project module); fileshas a pattern starting withsrc/features/<name>/.
Building a feature step by step: Build a feature.
Module manifest
The same schema describes kit modules (kit/modules/<name>.json in the kit repository, copied into modules.<name>.manifest) and project modules.
Module name. In the kit it equals the manifest’s file name; in
projectModules it equals the key.Modules this one needs.
create and add add them; remove refuses to remove a module that another one requires.Patterns of the files the module owns. Supported wildcards:
**/ (zero or more directories), ** (anything, including /) and * (anything except /). Everything else is literal, including [locale] and (app); braces are not supported. generate uses only patterns under src/features/<name>/ to find features.npm dependencies added to
package.json by create and add, and removed by remove when no other manifest declares them in the same section.Variables written to the
wa:modules region of .env.example as name=example. {{projectSlug}} and {{projectName}} in example are replaced. required is not read by the CLI; whether a variable is required is decided by the feature’s env.ts schema.Back-relation lines written to
wa:relations in the User model (auth.prisma) or the Organization model (organizations.prisma). Other models are ignored.Path, relative to the project, of a file with Docker Compose service definitions (without the
services: key). Written into the wa:services region. The file must belong to the module’s files.Path, relative to the project, of a file with GitHub Actions steps. Written into the
wa:ci-integration regions of ci.yml and mutation.yml. The file must belong to the module’s files.In the kit repository
The kit repository has its own.wa/kit.json, rewritten from the manifests by gato kit sync. There every module has empty files, and project holds the placeholder names WA App and wa-app. Do not edit it by hand: see Kit repository.