# configuration/strings/anatomy.strings.ts

> 33 lines of code and 11 definitions.

Tree: Bane's Lab Build Scripts
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/build-scripts#file-build-scripts-configuration-strings-anatomy-strings-ts
Source text: https://banes-lab.com/source/build-scripts/configuration/strings/anatomy.strings.ts.txt

Listed in [configuration/strings](https://banes-lab.com/api/source/build-scripts/configuration/strings.md), before [configuration/strings/asset.strings.ts](https://banes-lab.com/source/build-scripts/configuration/strings/asset.strings.ts.md).

## Definitions

- `anatomyLine` (lexical_declaration, line 5, exported)
- `unpublishedFiles` (lexical_declaration, line 13, exported)
- `unlicensedTree` (lexical_declaration, line 17, exported)
- `lostReferencesLine` (lexical_declaration, line 35, exported)
- `treeSummaryLine` (lexical_declaration, line 39, exported)
- `ANATOMY_TREE_LABEL` (lexical_declaration, line 3, exported)
- `treesLine` (lexical_declaration, line 9, exported)
- `unlabeledTree` (lexical_declaration, line 21, exported)
- `lostReference` (lexical_declaration, line 25, exported)
- `now` (lexical_declaration, line 31, exported)
- `{ snapshot }` (lexical_declaration, line 40, exported)

## Contained in

- [configuration/strings](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-configuration-strings.md)

## Used by

- [core/coordinators/anatomy.coordinator.ts](https://banes-lab.com/source/build-scripts/core/coordinators/anatomy.coordinator.ts.md)
- [core/loaders/tree.loader.ts](https://banes-lab.com/source/build-scripts/core/loaders/tree.loader.ts.md)
- [core/persistence/tree.persistence.ts](https://banes-lab.com/source/build-scripts/core/persistence/tree.persistence.ts.md)

## Linked from

- [core/coordinators](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-coordinators.md)
- [core/loaders](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-loaders.md)
- [core/persistence](https://banes-lab.com/anatomy/build-scripts/folder-build-scripts-core-persistence.md)

## Source

```typescript
import type { AnatomyFiles, DerivedTree } from "#types/anatomy.types";

export const ANATOMY_TREE_LABEL = "anatomy";

export const anatomyLine = function anatomyLine(summaries: readonly string[], files: AnatomyFiles): string {
    return `anatomy: derived ${summaries.join("; ")} into ${files.anatomy}, walks under ${files.walks}, sources under ${files.sources}\n`;
};

export const treesLine = function treesLine(count: number, file: string): string {
    return `anatomy: declared ${String(count)} tree(s) from the workspace members into ${file}\n`;
};

export const unpublishedFiles = function unpublishedFiles(folder: string, paths: readonly string[]): string {
    return `trees: ${folder} lacks ${String(paths.length)} file(s) the site links to after the sync: ${paths.join(", ")}. Check what the sync admitted against the tree's published files.`;
};

export const unlicensedTree = function unlicensedTree(tab: string, folder: string): string {
    return `anatomy: the ${tab} tree publishes to the methodology repository, but ${folder} declares no license in its package.json. Add the license the published files carry.`;
};

export const unlabeledTree = function unlabeledTree(tab: string): string {
    return `anatomy: ${tab}: no declaration label`;
};

export const lostReference = function lostReference(
    path: string,
    channel: string,
    text: string,
    candidates: readonly string[],
): string {
    const now = candidates.length === 0 ? "nothing" : candidates.join(", ");
    return `${path} (${channel}) ${JSON.stringify(text)} now resolves to ${now}`;
};

export const lostReferencesLine = function lostReferencesLine(lost: readonly string[]): string {
    return `anatomy: these references resolved to one target in the last build and now resolve to several or to none: ${lost.join("; ")}. Make each name unique again, or qualify the reference so it names one target.`;
};

export const treeSummaryLine = function treeSummaryLine(tree: DerivedTree, folders: number): string {
    const { snapshot } = tree;
    return `${tree.exportName}: ${String(folders)} folder(s), ${String(snapshot.tree.stats.files)} file(s), ${String(snapshot.metrics.definitions)} definition(s)`;
};
```
