Skip to content

l0.DependencyControl.domain

domain = require "l0.DependencyControl.domain"
local domain = require("l0.DependencyControl.domain")

Functions

validateNamespace

Domain.validateNamespace namespace
Domain.validateNamespace(namespace)

Validates a DependencyControl namespace string.

param type description
namespace string

Returns:

  • valid boolean? — True when the namespace is well-formed.
  • err string? — Validation error message when invalid.

getAutomationDir

Domain.getAutomationDir scriptType, rootDir
Domain.getAutomationDir(scriptType, rootDir)

Returns the Aegisub directory that scripts of the given type are installed to.

param type description
scriptType ScriptType Whether to resolve the automation-script or module directory.
rootDir? string Aegisub path token to resolve against (defaults to "?user").

Returns:

  • dir string? — Absolute directory path, or nil for an unrecognized script type.

getTestDir

Domain.getTestDir scriptType, rootDir
Domain.getTestDir(scriptType, rootDir)

Returns the DepUnit test directory for scripts of the given type.

param type description
scriptType ScriptType Whether to resolve the automation-script or module test directory.
rootDir? string Aegisub path token to resolve against (defaults to "?user").

Returns:

  • dir string? — Absolute directory path, or nil for an unrecognized script type.

Fields

field type description
terms table

Enums

FetchUntrustedFeeds

member value description
Always "always" fetch untrusted feeds without asking (the default)
Never "never" never fetch untrusted feeds
Prompt "prompt" ask before fetching an untrusted feed; falls back to Never where no prompter is available (e.g. headless)

RecordType

member value description
Managed "managed" a script/module DependencyControl installs and keeps up to date
Unmanaged "unmanaged" a record describing a module DependencyControl tracks but does not update

ScriptType

member value description
Automation "automation" an automation script (macro / applied filter)
Module "module" a require()-able module

ScriptTypeSection

member value description
ScriptType.Automation "macros" Automation scripts are stored in the "macros" section
ScriptType.Module "modules" Modules are stored in the "modules" section