Scripting API
Scripting API
PackageManifest
Class in Abyss.Core, from Abyss.Core.
What a package says of itself, in the package.json at its folder's top: its id and version, who made it and on what terms, what engine it is for and what other packages it needs.
public sealed class PackageManifestRemarks
Marked as a package's. A file of that name is common, so it says "abyssPackage": 1, as every file of the engine's says what it is, and one that does not is not taken for a package.
Ranges. A dependency's, ^1.2.0, ~1.2.0 or 1.2.0, is read as PackageVersion.Satisfies reads one, and installing a package installs the newest version the registry has that it takes; PackageManifest.Engine is held as written.
Properties
Id
public required string Id { get; init; }The package's id, which names its folder and its files' paths; see PackagePath.IsId.
DisplayName
public required string DisplayName { get; init; }What a person reads it as; its id where it gives none.
Namespace
public string Namespace { get; init; }The namespace its C# is in, which its project builds it in and its types are held to: what it says, or what its id spells where it says nothing; see PackageManifest.NamespaceOf.
Version
public required string Version { get; init; }Its version, as major.minor.patch, with a pre-release after - if it is one.
Description
public string? Description { get; init; }A line on what it is.
Author
public PackageAuthor? Author { get; init; }Who made it.
Copyright
public string? Copyright { get; init; }Whose it is: © 2026 Acme Games.
License
public string? License { get; init; }What may be done with it: an SPDX name — MIT, Apache-2.0 — or Proprietary.
Engine
public string? Engine { get; init; }The engine versions it is made for, as a range: ^0.1.
Dependencies
public IReadOnlyDictionary<string, string> Dependencies { get; init; }The other packages it needs, each by its id and the range of its versions that will do.
NuGet
public IReadOnlyDictionary<string, string> NuGet { get; init; }The NuGet packages its code uses, each by its id and the one version it is built with, which its project references: "nuget": { "Newtonsoft.Json": "13.0.3" }; see PackageManifest.IsNuGetVersion.
Native
public IReadOnlyList<PackageNativeSource> Native { get; init; }What the libraries in its native folder (PackageFiles.Native) are built from, each as the notices beside a built game name it: "native": [{ "name": "Box2D", "version": "3.1.1", "license": "MIT", "url": "https://box2d.org", "licenseFile": "native/LICENSE-Box2D.txt" }].
Category
public string? Category { get; init; }What kind of package it is: Physics, Art, Tools.
Keywords
public IReadOnlyList<string> Keywords { get; init; }Words it is found by.
Documentation
public string? Documentation { get; init; }Where it is documented.
Methods
Read
public static PackageManifest Read(string folder)The manifest of the package in folder.
Parameters
folder
Exceptions
FormatException: There is no manifest, or it is not one this build reads, saying why.IOException: The file is there and cannot be read.
Parse
public static PackageManifest Parse(string json)A manifest from its text.
Parameters
json
Exceptions
FormatException: It is not a manifest this build reads, saying why.
IsVersion
public static bool IsVersion(string? version)Whether version is one: three numbers, major.minor.patch, with no leading zero, and a pre-release after - or a build after + if it has one.
Parameters
version
IsNuGetId
public static bool IsNuGetId(string? id)Whether id is a NuGet package's id: letters, digits, underscores, dots and hyphens, a letter, a digit or an underscore first, a hundred at most.
Parameters
id
IsNuGetVersion
public static bool IsNuGetVersion(string? version)Whether version is one exact version as NuGet writes it: two to four numbers, then a pre-release after - and build metadata after +, if any — 13.0.3, 2.0.0-beta.1 — and no range, [1.0,2.0), nor a floating one, 13.*.
Parameters
version
NamespaceOf
public static string NamespaceOf(string id)The namespace a package's id spells, where its manifest names none: each word's parts between hyphens capitalized and joined, acme.fx-pack is Acme.FxPack. As the project the engine writes for a package spells it (dotnet/build/AbyssWritePackageProjects.cs).
Parameters
id: A package's id; seePackagePath.IsId.
IsNamespace
public static bool IsNamespace(string name)Whether a name is a C# namespace: dotted identifiers, each a letter or an underscore first.
Parameters
name
Constants
CurrentVersion
public const int CurrentVersion = 1The version of the file this build writes, and the newest it reads.
FileName
public const string FileName = "package.json"The file's name, at the top of a package's folder.
