Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
The Fathym reference architecture, used for cross cutting concerns and repeatable design patterns.
default
Common reference architecture and cross cutting concerns.
$Tag<TType, TTag> is a utility type used for tagging other types with metadata during type inference.
The key for the tag is created dynamically using the TType parameter and is prefixed with an @ symbol.
If the TTag type is never or undefined, the tag is omitted.
$TagDeepStrip<T, TType, TTag> recursively removes $Tag metadata from the entire type tree.
$TagDeepStripArray<T, TType, TTag> removes $Tag from arrays recursively.
$TagDeepStripObject<T, TType, TTag> removes $Tag from objects recursively.
$TagDeepStripTuple<T, TType, TTag> removes $Tag from tuples recursively.
$TagExists<T, TType, TTag, TData> checks whether a specific $Tag exists within a type T.
The check can be based on the tag type TType, the tag value TTag, or specific tag data TData.
$TagExtract<T, TType> extracts the tag value from a $Tag type T based on the tag type TType.
Extracts all data keys from a $Tag based on a tag type TType.
$TagExtractValue<T, TType, TData> extracts the tag data value from a $Tag type T
based on a tag type TType and tag data TData.
$TagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $Tag type and returns it
along with the stripped version of the type.
$TagExtractValues<T, TType, TData> extracts all tag data values from a $Tag type T
in a nested structure, based on tag type TType and tag data TData.
$TagValues<TType, TTag, TData, TValues> is a utility type for tagging other types with metadata
values during type inference. It allows attaching multiple key-value pairs (TValues) alongside
the primary tag.
The base request object for all API requests.
The base response object for API requests.
The base response object for API requests including a model.
Concatenate two Uint8Array objects into a new Uint8Array object.
Convert an async iterable to an async iterable of another type.
Creates a directory if it doesn't exist (async). If the directory already exists, no action is taken.
Creates a directory if it doesn't exist (sync). If the directory already exists, no action is taken.
Establishes headers for an HTTP request, combining existing headers with new.
ExcludeKeys<T, TKey> is a TypeScript utility type that constructs a new type by
excluding properties from the original type T that match the key type TKey.
ExcludeKeysByPrefix<T, Prefix> is a TypeScript utility type that constructs a new type by excluding
properties from the original type T whose key names start with the given Prefix.
Determine if a path exists (async).
Determine if a path exists (sync).
ExtractExact<T, TExtract> is a TypeScript utility type that constructs a new type by
extracting from TExtract those types that exactly match T from the union.
ExtractKeysByPrefix<T, Prefix> is a TypeScript utility type that extracts properties
from an object type T whose keys start with the given Prefix.
Represents a request for files in a directory based on the given extensions.
FluentTagDeepStripIndexSignature<T, TType, TTag> recursively removes $Tag metadata
from all properties of an object, including index signatures, while handling both
regular and dynamic properties.
Generates a JSON Web Key (JWK) for the given JWT config.
Retrieves a list of files in the specified directory, optionally filtering by extension. Use the meta to give the file list current context.
HasIndexSignatures<T, MatchAll> determines if an object T contains index signatures
(such as string, number, or symbol). It returns true if index signatures are present,
and false otherwise.
HasKeys<T, Prefix> checks if the object T has any keys that start with the given Prefix.
HasTypeCheck<T, U, MatchAll> checks if a type T extends U.
If MatchAll is true, it checks if all types in a union extend U.
If MatchAll is false, it checks if at least one type in a union extends U.
IsMatched<Matches, MatchAll> evaluates whether all matches in Matches are true if MatchAll is true,
or whether at least one match is true if MatchAll is false.
IsNativeType<T> checks if a given type T is a native JavaScript type.
Native types include Date, Promise, Map, Set, and others.
IsNotUndefined<T> checks whether a given type T is not strictly undefined.
IsObject<T> checks if a given type T is an object that is not an array.
It excludes null, undefined, arrays, and any types by first removing null and undefined using NonNullable.
IsRecord<T> checks if a given type T is a record-like object.
It evaluates to true if:
Check to see if a status is successful (code 0).
IsUndefined<T> is a utility type that determines if a type T is undefined
or can possibly be undefined. It covers scenarios where T is explicitly undefined,
includes undefined in a union, or is an optional type.
Checks if a given type T is a union type.
Clones a value with Map/Set replacer and reviver applied.
Parses a JSON string into a value with Map/Set reviver applied.
Replacer function for Map/Set parsing.
Reviver function for Map/Set parsing.
Stringifies a value with Map/Set replacer applied.
Loads JWT configuration from environment variables.
MatchSwitch<Condition, Matched, NotMatched, MatchAll> evaluates the provided Condition.
It breaks down unions in Condition using infer U, and then checks if all or any types
match using the IsMatched type.
Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be replaced with the new array.
Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be merged the new array.
NoPropertiesUndefined<T> is a TypeScript utility type that recursively removes undefined and null
from all properties and sub-properties of an object type T.
NormalizeNever<T, Replacement> converts never to Replacement, but leaves all other types unchanged.
It works for unions, intersections, and single types.
NullableArrayOrObject is a utility type that recursively makes all properties
of a given type T nullable if they are arrays or objects.
Create a new array by slicing from the start and end of the input array. Ensures no duplicate items are included even if slices overlap.
Processes cache control headers on a response.
Proxies the request to a remote server.
Redirects the request to a new location with the specified status code.
RemoveIndexSignatures<T> is a TypeScript utility type that constructs a new type by
removing index signatures (string, number, and symbol) from the original type T.
ResolveIndexSignatures<T> is a TypeScript utility type that constructs a new type by
resolving and retaining any index signatures from the original type T, while excluding
explicitly defined keys.
runTest<TResult, TExpected> is a generic test helper function designed to verify
type assertions and runtime equality in TypeScript. It takes in a result and expected
value, ensuring that the types match at compile-time and values match at runtime.
ValueType<T> extracts the value type of a Record type. If the input type T is not a record,
the type will resolve to never.
build
Helpers for working with Deno and build processes.
This is the schema for the Deno configuration file.
Loads the deno configuration file and returns the DenoConfig object.
Loads the deno configuration file synchronously and returns the DenoConfig object.
Use to load the full path relative to the reference architecture module.
Resolves a path using the provided resolver function.
SetVersion provides an interface for setting the version of a Deno project.
build/version
Entry point for the version management script.
The version that was used to configure the deno file.
cli
Helpers for delivering quality, interactive CLI experiences.
Clears the line and performs a carriage return
CLICommandExecutor is the runtime orchestrator that prepares and runs a single command — handling logging, params, services, and lifecycle phases (Init, Run, DryRun, Cleanup).
Options provided when executing a CLI command. These are derived during the parsing + resolution phase.
Inferred runtime type from CLIConfigSchema. Matches the validated structure used throughout the CLI engine.
Defines the shape of a CLI-wide initialization hook. Called once before command resolution.
CommandContext defines the full execution context passed to each command lifecycle method
(Init, Run, DryRun, and Cleanup). It includes schemas, CLI config, command metadata,
resolved runtime parameters, logging tools, service instances, and optional subcommands.
Runtime-typed version of CommandContext for validation, help, and introspection.
A map of command invocation functions. Each key represents a subcommand, and each value is a function that executes that subcommand with named flags and optional positional args.
Represents a complete, executable CLI command module. Includes runtime class, schemas for validation and docs, and metadata for help.
Represents the metadata for a single CLI command module. This metadata includes the command's name, description, usage, and examples.
Type inferred from the CommandModuleMetadataSchema, providing type safety when working with command metadata in the application.
Strongly typed constructor for a CommandParams subclass.
Base class for all CLI command parameter sets. Provides typed access to raw flags and args, plus standard dry-run support.
Abstract base class for all CLI commands. Supports both fluent-built and class-authored modules via a shared lifecycle contract.
Strongly typed helper to define a CLI CommandModule cleanly. Ensures full type inference for flags, args, and param classes.
TemplateLocator implementation that reads from a preloaded in-memory map. Typically used in statically compiled CLI binaries.
Emits a given Zod schema as a JSON Schema to the schemas/ directory.
HelpCommand takes no positional arguments.
Parameters used by HelpCommand — surfaces structured HelpContext flags.
Represents the structured context used by the HelpCommand to dynamically render help output for the CLI.
Inferred runtime type from HelpContextSchema. Matches the validated structure of CLI help flags.
Flag schema for HelpCommand — directly matches the HelpContext structure.
Hides the terminal cursor
Dynamically imports a module from a DFS.
If compiled, bundles .ts files to JS via deno bundle and loads via Blob URL.
Shows the terminal cursor
The collection of available color effects that can be applied to text.
Options used for configuring the UpdateInline CLI tool.
deno-kv
Helpers for interacting with and managing Deno KV.
Used for chaining atomic operations.
A nonce object containing a unique nonce and an optional versionstamp.
Enqueues an atomic operation and returns the result.
Enqueues an atomic operation with a nonce and optional delay.
Determine if a key exists in a Deno.Kv instance.
Initialize Deno.Kv instance.
Listen for a message in the queue and apply the atomic operation handler.
Abstract base class implementing IDFSFileHandler.
Concrete implementations must provide method implementations.
Interface defining methods for a Distributed File System (DFS) File Handler.
Implements DFSFileHandler for local file system storage.
Represents details for a Local File System-backed Distributed File System (DFS) in Everything as Code (EaC).
fluent
The Fluent SDK for use in easily generating fluent style management of types.
$FluentTag<TType, TTag, TData, TValues> is used to apply Fluent tagging metadata to types,
enforcing Fluent type inference controls. This type allows you to attach both primary and
additional metadata values (TValues) based on TData.
$FluentTagDataKeyOptions<TType> maps the provided tag type to its corresponding key options.
$FluentTagDataValueTypesOptions<TType, TData> maps the provided tag type and data key to its corresponding value type.
$FluentTagDeepStrip<T, TType, TTag> is a utility type that recursively removes $FluentTag
metadata from the entire type tree, delegating the operation to $TagDeepStrip.
$FluentTagExists<T, TType, TTag, TData> checks if a $FluentTag exists within a type T.
$FluentTagExtract<T, TType> extracts the tag value from a $FluentTag type T
based on the specified TType, utilizing the $TagExtract utility for extraction.
$FluentTagExtractDataKeys<T, TType> extracts all the data keys from a $FluentTag based on the tag type TType.
$FluentTagExtractValue<T, TType, TData> extracts the tag data value from a $FluentTag type T
based on a tag type TType and a specific tag data key TData.
$FluentTagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $FluentTag type T
and returns the result alongside the stripped version of the type T (without the tag metadata).
$FluentTagExtractValues<T, TType, TData> extracts all tag data values from a $FluentTag type T
in a nested structure, based on the tag type TType and tag data TData.
$FluentTagLoadHandlers<T[K]> extracts the handlers from a $FluentTag on the T[K] property,
if they exist, or returns an empty object if not.
$FluentTagMethodsDataKeyOptions provides specific key options for "Methods" tag type.
$FluentTagMethodsOptions provides specific options for the "Methods" tag type.
$FluentTagOptions<TTagType> maps the provided tag type to its corresponding tag options.
$FluentTagTypeOptions defines the available tag type options for Fluent tagging.
The default Fluent Methods type.
DetermineDefaultFluentMethodsType<T, K> determines the appropriate default method type
for a given object property based on the type of the property and its value.
DetermineFluentMethodsType<T, K> determines the Fluent Methods type by checking if a FluentTag has been assigned
to the property T[K]. If a FluentTag exists, it returns the extracted value for the Methods tag. If no tag exists,
it falls back to a default type based on the shape of T[K] using DetermineDefaultFluentMethodsType.
A dynamic, Proxy based, Fluent API builder. It handles all of the data management when using the Fluent API methods. Supports defining custom handlers to invoke in varying scopes.
FluentBuilderMethodsHandlers extracts and enforces strong typing for handler functions from
a $FluentTagDataValueTypesOptions<"Methods", "handlers"> tag.
A default mapping of method types to their corresponding methods type.
Used for managing the property as an object, returning a fluent API for each of it's properties.
Used for managing the property as it's value type.
Used for managing the property as an object, returning a fluent API for each of it's properties.
Used to Select the Fluent builder type to use.
SelectFluentMethods<T, TBuilderModel> processes a type T and selects the appropriate Fluent methods based on the type of the properties.
http
Helpers to assist with HTTP operations.
Establishes headers for an HTTP request, combining existing headers with new.
Processes cache control headers on a response.
Proxies the request to a remote server.
Redirects the request to a new location with the specified status code.
iterables
Helpers to assist with iterable operations and management.
Concatenate two Uint8Array objects into a new Uint8Array object.
Convert an async iterable to an async iterable of another type.
Clones a value with Map/Set replacer and reviver applied.
Parses a JSON string into a value with Map/Set reviver applied.
Replacer function for Map/Set parsing.
Reviver function for Map/Set parsing.
Stringifies a value with Map/Set replacer applied.
Create a new array by slicing from the start and end of the input array. Ensures no duplicate items are included even if slices overlap.
iterables/json-map-set
JSON serialization functions for Map/Set cloning.
Clones a value with Map/Set replacer and reviver applied.
Parses a JSON string into a value with Map/Set reviver applied.
Replacer function for Map/Set parsing.
Reviver function for Map/Set parsing.
Stringifies a value with Map/Set replacer applied.
jwt
Helpers for interacting with and managing JWTs.
Generates a JSON Web Key (JWK) for the given JWT config.
Loads JWT configuration from environment variables.
Finds the closest fuzzy match using Levenshtein distance.
Levenshtein distance — classic edit-distance algorithm.
merge
Helper functions for deep merging objects.
Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be replaced with the new array.
Merges objects recursively, in a deep merge pattern. Any arrays, maps or sets that exist in both objects will be merged the new array.
oauth
Helpers to support working OAuth in Deno with DenoKV.
Creates an Azure AD B2C OAuth2 client configuration.
Creates an OAuth helpers object for Azure AD OAuth.
Creates an Azure AD OAuth2 client configuration.
Creates an OAuth helpers object for GitHub OAuth.
Creates a GitHub OAuth2 client configuration.
Creates an OAuth helpers object.
Creates an OAuth2 client configuration.
The OAuth request handler.
User OAuth connection object representing the user's OAuth token.
Checks if the user's OAuth connection is expired.
path
Helper functions to assist with file paths and directories.
Creates a directory if it doesn't exist (async). If the directory already exists, no action is taken.
Creates a directory if it doesn't exist (sync). If the directory already exists, no action is taken.
Determine if a path exists (async).
Determine if a path exists (sync).
Represents a request for files in a directory based on the given extensions.
Retrieves a list of files in the specified directory, optionally filtering by extension. Use the meta to give the file list current context.
$Tag<TType, TTag> is a utility type used for tagging other types with metadata during type inference.
The key for the tag is created dynamically using the TType parameter and is prefixed with an @ symbol.
If the TTag type is never or undefined, the tag is omitted.
$TagDeepStrip<T, TType, TTag> recursively removes $Tag metadata from the entire type tree.
$TagDeepStripArray<T, TType, TTag> removes $Tag from arrays recursively.
$TagDeepStripObject<T, TType, TTag> removes $Tag from objects recursively.
$TagDeepStripTuple<T, TType, TTag> removes $Tag from tuples recursively.
$TagExists<T, TType, TTag, TData> checks whether a specific $Tag exists within a type T.
The check can be based on the tag type TType, the tag value TTag, or specific tag data TData.
$TagExtract<T, TType> extracts the tag value from a $Tag type T based on the tag type TType.
Extracts all data keys from a $Tag based on a tag type TType.
$TagExtractValue<T, TType, TData> extracts the tag data value from a $Tag type T
based on a tag type TType and tag data TData.
$TagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $Tag type and returns it
along with the stripped version of the type.
$TagExtractValues<T, TType, TData> extracts all tag data values from a $Tag type T
in a nested structure, based on tag type TType and tag data TData.
$TagValues<TType, TTag, TData, TValues> is a utility type for tagging other types with metadata
values during type inference. It allows attaching multiple key-value pairs (TValues) alongside
the primary tag.
FluentTagDeepStripIndexSignature<T, TType, TTag> recursively removes $Tag metadata
from all properties of an object, including index signatures, while handling both
regular and dynamic properties.
types
Helper types used by the Fathym systems.
$Tag<TType, TTag> is a utility type used for tagging other types with metadata during type inference.
The key for the tag is created dynamically using the TType parameter and is prefixed with an @ symbol.
If the TTag type is never or undefined, the tag is omitted.
$TagDeepStrip<T, TType, TTag> recursively removes $Tag metadata from the entire type tree.
$TagDeepStripArray<T, TType, TTag> removes $Tag from arrays recursively.
$TagDeepStripObject<T, TType, TTag> removes $Tag from objects recursively.
$TagDeepStripTuple<T, TType, TTag> removes $Tag from tuples recursively.
$TagExists<T, TType, TTag, TData> checks whether a specific $Tag exists within a type T.
The check can be based on the tag type TType, the tag value TTag, or specific tag data TData.
$TagExtract<T, TType> extracts the tag value from a $Tag type T based on the tag type TType.
Extracts all data keys from a $Tag based on a tag type TType.
$TagExtractValue<T, TType, TData> extracts the tag data value from a $Tag type T
based on a tag type TType and tag data TData.
$TagExtractValueAndStrip<T, TType, TTag, TData> extracts the tag data value from a $Tag type and returns it
along with the stripped version of the type.
$TagExtractValues<T, TType, TData> extracts all tag data values from a $Tag type T
in a nested structure, based on tag type TType and tag data TData.
$TagValues<TType, TTag, TData, TValues> is a utility type for tagging other types with metadata
values during type inference. It allows attaching multiple key-value pairs (TValues) alongside
the primary tag.
ExcludeKeys<T, TKey> is a TypeScript utility type that constructs a new type by
excluding properties from the original type T that match the key type TKey.
ExcludeKeysByPrefix<T, Prefix> is a TypeScript utility type that constructs a new type by excluding
properties from the original type T whose key names start with the given Prefix.
ExtractExact<T, TExtract> is a TypeScript utility type that constructs a new type by
extracting from TExtract those types that exactly match T from the union.
ExtractKeysByPrefix<T, Prefix> is a TypeScript utility type that extracts properties
from an object type T whose keys start with the given Prefix.
FluentTagDeepStripIndexSignature<T, TType, TTag> recursively removes $Tag metadata
from all properties of an object, including index signatures, while handling both
regular and dynamic properties.
HasIndexSignatures<T, MatchAll> determines if an object T contains index signatures
(such as string, number, or symbol). It returns true if index signatures are present,
and false otherwise.
HasKeys<T, Prefix> checks if the object T has any keys that start with the given Prefix.
HasTypeCheck<T, U, MatchAll> checks if a type T extends U.
If MatchAll is true, it checks if all types in a union extend U.
If MatchAll is false, it checks if at least one type in a union extends U.
IsMatched<Matches, MatchAll> evaluates whether all matches in Matches are true if MatchAll is true,
or whether at least one match is true if MatchAll is false.
IsNativeType<T> checks if a given type T is a native JavaScript type.
Native types include Date, Promise, Map, Set, and others.
IsNotUndefined<T> checks whether a given type T is not strictly undefined.
IsObject<T> checks if a given type T is an object that is not an array.
It excludes null, undefined, arrays, and any types by first removing null and undefined using NonNullable.
IsRecord<T> checks if a given type T is a record-like object.
It evaluates to true if:
IsUndefined<T> is a utility type that determines if a type T is undefined
or can possibly be undefined. It covers scenarios where T is explicitly undefined,
includes undefined in a union, or is an optional type.
Checks if a given type T is a union type.
MatchSwitch<Condition, Matched, NotMatched, MatchAll> evaluates the provided Condition.
It breaks down unions in Condition using infer U, and then checks if all or any types
match using the IsMatched type.
NoPropertiesUndefined<T> is a TypeScript utility type that recursively removes undefined and null
from all properties and sub-properties of an object type T.
NormalizeNever<T, Replacement> converts never to Replacement, but leaves all other types unchanged.
It works for unions, intersections, and single types.
NullableArrayOrObject is a utility type that recursively makes all properties
of a given type T nullable if they are arrays or objects.
RemoveIndexSignatures<T> is a TypeScript utility type that constructs a new type by
removing index signatures (string, number, and symbol) from the original type T.
ResolveIndexSignatures<T> is a TypeScript utility type that constructs a new type by
resolving and retaining any index signatures from the original type T, while excluding
explicitly defined keys.
runTest<TResult, TExpected> is a generic test helper function designed to verify
type assertions and runtime equality in TypeScript. It takes in a result and expected
value, ensuring that the types match at compile-time and values match at runtime.
ValueType<T> extracts the value type of a Record type. If the input type T is not a record,
the type will resolve to never.