@heroiclands/package-build 21.1.0 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +245 -0
- package/CONTENT.md +107 -3
- package/assets/fonts/libertinus/LibertinusMono-Regular.otf +0 -0
- package/assets/fonts/libertinus/LibertinusSans-Bold.otf +0 -0
- package/assets/fonts/libertinus/LibertinusSans-Italic.otf +0 -0
- package/assets/fonts/libertinus/LibertinusSans-Regular.otf +0 -0
- package/assets/fonts/libertinus/OFL.txt +94 -0
- package/assets/fonts/libertinus/provenance.yaml +11 -0
- package/assets/images/banners/afflictionbnr.webp +0 -0
- package/assets/images/banners/armorclothingbnr.webp +0 -0
- package/assets/images/banners/attributebnr.webp +0 -0
- package/assets/images/banners/containerbnr.webp +0 -0
- package/assets/images/banners/devdocsbnr.webp +0 -0
- package/assets/images/banners/miscgearbnr.webp +0 -0
- package/assets/images/banners/mysticalabilitybnr.webp +0 -0
- package/assets/images/banners/projectilebnr.webp +0 -0
- package/assets/images/banners/rulesbnr.webp +0 -0
- package/assets/images/banners/skillbnr.webp +0 -0
- package/assets/images/banners/traumabnr.webp +0 -0
- package/assets/images/banners/userguidebnr.webp +0 -0
- package/assets/images/banners/weapongearbnr.webp +0 -0
- package/assets/images/provenance.yaml +4 -0
- package/bin/content-build.mjs +19 -5
- package/bin/package-build.mjs +6 -5
- package/ci/emit-asset-index.mjs +32 -0
- package/content-config.mjs +30 -1
- package/docs/api.md +103 -27
- package/docs/commands.md +13 -11
- package/docs/configuration.md +16 -7
- package/docs/content-format.md +523 -111
- package/engine/actor-compiler.mjs +58 -9
- package/engine/art-fields.mjs +292 -0
- package/engine/asset-index.mjs +397 -0
- package/engine/asset-types.mjs +192 -0
- package/engine/base-compiler.mjs +69 -1
- package/engine/bundles.mjs +5 -5
- package/engine/compile-corpus.mjs +4 -0
- package/engine/content-address.mjs +14 -2
- package/engine/content-charset.mjs +5 -1
- package/engine/content-embeds.mjs +314 -0
- package/engine/content-html.mjs +5 -1
- package/engine/content-icons.mjs +5 -1
- package/engine/content-images.mjs +26 -5
- package/engine/content-index.mjs +68 -33
- package/engine/content-links.mjs +164 -24
- package/engine/dependency-bump.mjs +14 -16
- package/engine/frontmatter-lint.mjs +36 -23
- package/engine/helpers.mjs +83 -31
- package/engine/index-records.mjs +63 -4
- package/engine/index.mjs +15 -0
- package/engine/infobox-registry.mjs +50 -3
- package/engine/infobox.mjs +12 -8
- package/engine/item-compiler.mjs +10 -10
- package/engine/journals.mjs +3 -0
- package/engine/macros.mjs +16 -13
- package/engine/map-notes.mjs +29 -22
- package/engine/metadata-index.mjs +44 -36
- package/engine/note-vocabulary.mjs +71 -29
- package/engine/pack-router.mjs +14 -0
- package/engine/packagebuild-index.mjs +124 -0
- package/engine/packages.mjs +83 -0
- package/engine/pathnames.mjs +74 -0
- package/engine/pdf-build.mjs +133 -8
- package/engine/pdf-render.mjs +49 -12
- package/engine/scenes.mjs +12 -9
- package/engine/site-build.mjs +43 -16
- package/engine/site-index.mjs +10 -1
- package/engine/subtype-registry.mjs +21 -0
- package/engine/web-wikilinks.mjs +46 -12
- package/engine/wikilink-syntax.mjs +20 -2
- package/engine/wikilinks.mjs +15 -2
- package/hm3/actors.mjs +11 -38
- package/manifest.mjs +67 -13
- package/package.json +5 -2
- package/packagebuild-metadata.jsonl +13 -0
- package/sohl/actors.mjs +12 -86
- package/sohl/note-schemas.mjs +4 -16
- package/types/content-config.d.mts +8 -0
- package/types/engine/actor-compiler.d.mts +29 -0
- package/types/engine/art-fields.d.mts +192 -0
- package/types/engine/asset-index.d.mts +92 -0
- package/types/engine/asset-types.d.mts +110 -0
- package/types/engine/base-compiler.d.mts +42 -1
- package/types/engine/compile-corpus.d.mts +4 -1
- package/types/engine/content-charset.d.mts +4 -0
- package/types/engine/content-embeds.d.mts +218 -0
- package/types/engine/content-html.d.mts +4 -0
- package/types/engine/content-icons.d.mts +4 -0
- package/types/engine/content-images.d.mts +15 -2
- package/types/engine/content-index.d.mts +27 -15
- package/types/engine/dependency-bump.d.mts +2 -2
- package/types/engine/frontmatter-lint.d.mts +11 -14
- package/types/engine/helpers.d.mts +7 -2
- package/types/engine/index-records.d.mts +44 -3
- package/types/engine/index.d.mts +5 -0
- package/types/engine/infobox-registry.d.mts +36 -1
- package/types/engine/infobox.d.mts +6 -4
- package/types/engine/macros.d.mts +9 -5
- package/types/engine/map-notes.d.mts +10 -6
- package/types/engine/metadata-index.d.mts +2 -17
- package/types/engine/note-vocabulary.d.mts +30 -0
- package/types/engine/packagebuild-index.d.mts +56 -0
- package/types/engine/packages.d.mts +62 -0
- package/types/engine/pathnames.d.mts +41 -81
- package/types/engine/pdf-build.d.mts +58 -1
- package/types/engine/pdf-render.d.mts +3 -1
- package/types/engine/scenes.d.mts +2 -1
- package/types/engine/site-build.d.mts +5 -1
- package/types/engine/site-index.d.mts +4 -1
- package/types/engine/subtype-registry.d.mts +20 -0
- package/types/engine/web-wikilinks.d.mts +14 -4
- package/types/engine/wikilink-syntax.d.mts +13 -1
- package/types/engine/wikilinks.d.mts +7 -1
- package/types/manifest.d.mts +42 -1
- package/types/sohl/actors.d.mts +0 -1
|
@@ -128,6 +128,10 @@ export function anchorPageId(noteId: string, anchorSlug: string): string;
|
|
|
128
128
|
* vendored manifests of packages this build links into but does not publish.
|
|
129
129
|
* @param {string} [contentPackage] - This build's *content* package, which an
|
|
130
130
|
* authored address may name explicitly. Defaults to `packageId`.
|
|
131
|
+
* @param {object} [opts] - Options.
|
|
132
|
+
* @param {Map<string, object>} [opts.assets] - The files this package ships, by
|
|
133
|
+
* canonical address. They resolve no link — an asset is not a document — and
|
|
134
|
+
* answer only the art fields, which name a file and never a document.
|
|
131
135
|
* @returns {{byShortcode: Map<string, object>, types: Set<string>}} `types` is
|
|
132
136
|
* every type the tree actually contains, so a qualifier naming no real type
|
|
133
137
|
* can be told apart from a missing target.
|
|
@@ -140,7 +144,9 @@ export function buildWikilinkIndex(docs: Array<{
|
|
|
140
144
|
pack?: string;
|
|
141
145
|
docPack?: string;
|
|
142
146
|
draft?: boolean;
|
|
143
|
-
}>, packageId: string, foreign?: Map<string, object>, contentPackage?: string
|
|
147
|
+
}>, packageId: string, foreign?: Map<string, object>, contentPackage?: string, { assets }?: {
|
|
148
|
+
assets?: Map<string, object> | undefined;
|
|
149
|
+
}): {
|
|
144
150
|
byShortcode: Map<string, object>;
|
|
145
151
|
types: Set<string>;
|
|
146
152
|
};
|
package/types/manifest.d.mts
CHANGED
|
@@ -17,6 +17,28 @@
|
|
|
17
17
|
export function normalizeRepoUrl(repository: string | {
|
|
18
18
|
url?: string;
|
|
19
19
|
}): string;
|
|
20
|
+
/**
|
|
21
|
+
* A package's homepage — the page `url` sends a reader to.
|
|
22
|
+
*
|
|
23
|
+
* Derived from the content package rather than declared, because the address is
|
|
24
|
+
* already fixed: every package publishes an authored homepage at
|
|
25
|
+
* `<origin>/<contentPackage>/`, and the shared site-deploy workflow publishes
|
|
26
|
+
* it there. A declared copy would be a second spelling of a settled fact, free
|
|
27
|
+
* to drift — and the one that drifts is this one, because nothing fetches `url`
|
|
28
|
+
* the way Foundry fetches `manifest`, so a wrong value is never reported.
|
|
29
|
+
*
|
|
30
|
+
* The site's own `baseURL` says the same thing, and is deliberately not the
|
|
31
|
+
* source: it sits at `site/hugo.toml` in most repositories and `kb/hugo.toml`
|
|
32
|
+
* in the system, so reading it would mean the packaging half knowing where each
|
|
33
|
+
* repository keeps its site configuration.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} contentPackage - The package's content-package name.
|
|
36
|
+
* @returns {string} The homepage URL, with its trailing slash.
|
|
37
|
+
* @throws {TypeError} When no name is given. Interpolating a missing one yields
|
|
38
|
+
* `<origin>/undefined/`, a URL that resolves and is wrong — and nothing
|
|
39
|
+
* fetches `url`, so it would be advertised for as long as nobody clicked it.
|
|
40
|
+
*/
|
|
41
|
+
export function packageHomepage(contentPackage: string): string;
|
|
20
42
|
/**
|
|
21
43
|
* The addresses a Foundry manifest advertises.
|
|
22
44
|
*
|
|
@@ -26,14 +48,23 @@ export function normalizeRepoUrl(repository: string | {
|
|
|
26
48
|
* install at that release forever. `download` points at this exact version,
|
|
27
49
|
* because that is the archive this manifest describes.
|
|
28
50
|
*
|
|
51
|
+
* **`url` is the homepage, not the repository.** It is the Project Homepage
|
|
52
|
+
* link a reader follows from the package listing *before* installing anything,
|
|
53
|
+
* so it answers "what is this?" — which a page written for that question does
|
|
54
|
+
* and a source tree does not. `bugs`, `manifest` and `download` address release
|
|
55
|
+
* artefacts and stay on the repository that holds them.
|
|
56
|
+
*
|
|
29
57
|
* @param {object} opts
|
|
30
58
|
* @param {string} opts.repoUrl - Normalised repository URL.
|
|
59
|
+
* @param {string} opts.homeUrl - The package's homepage, from
|
|
60
|
+
* {@link packageHomepage}.
|
|
31
61
|
* @param {string} opts.version - The version being built.
|
|
32
62
|
* @param {"system"|"module"} opts.artifact - Which artifact is shipped.
|
|
33
63
|
* @returns {{url: string, bugs: string, manifest: string, download: string}}
|
|
34
64
|
*/
|
|
35
|
-
export function releaseUrls({ repoUrl, version, artifact }: {
|
|
65
|
+
export function releaseUrls({ repoUrl, homeUrl, version, artifact }: {
|
|
36
66
|
repoUrl: string;
|
|
67
|
+
homeUrl: string;
|
|
37
68
|
version: string;
|
|
38
69
|
artifact: "system" | "module";
|
|
39
70
|
}): {
|
|
@@ -223,6 +254,16 @@ export function writeManifest({ config, packageJson, artifact, outDir, flags, co
|
|
|
223
254
|
* convention this project is free to choose.
|
|
224
255
|
*/
|
|
225
256
|
export const ARTIFACTS: readonly string[];
|
|
257
|
+
/**
|
|
258
|
+
* Where every HeroicLands package's homepage is served from.
|
|
259
|
+
*
|
|
260
|
+
* Stated once here and read by {@link packageHomepage}, so the origin a
|
|
261
|
+
* manifest advertises and the origin the configuration documents cannot come
|
|
262
|
+
* to disagree.
|
|
263
|
+
*
|
|
264
|
+
* @type {string}
|
|
265
|
+
*/
|
|
266
|
+
export const HOMEPAGE_ORIGIN: string;
|
|
226
267
|
/**
|
|
227
268
|
* Relationship keys that direct the **build**, rather than describe the
|
|
228
269
|
* package.
|