Skip to content
PHP Ecosystem
Explore

DenoManager

API reference › Foxy › Asset › DenoManager

Integrates Deno with Foxy’s dependency workspace, update, and audit workflows.

PropertyTypeDescriptionDefined by
$config protected constructorFoxy\Config\ConfigFoxy configuration.AbstractManifestAssetManager
$executor protected constructorComposer\Util\ProcessExecutorProcess executor used to invoke the manager.AbstractAssetManager
$fs protected constructorComposer\Util\FilesystemFilesystem used to resolve and update manifest paths.AbstractManifestAssetManager
$io protected constructorComposer\IO\IOInterfaceComposer output used for progress messages.AbstractManifestAssetManager
$updatable protectedboolWhether an existing frontend installation may be updated. Default: true.AbstractManifestAssetManager
$versionConverter protected constructorFoxy\Converter\VersionConverterInterface|nullConverter for manager version output. Default: null.AbstractAssetManager
MethodDescriptionDefined by
__construct()Creates a manager that executes frontend commands for the configured asset manifest.AbstractAssetManager
addDependencies()Merges Composer asset dependencies into the frontend package manifest.AbstractManifestAssetManager
audit()Runs the manager audit command against the current lock file.AbstractAssetManager
getAuditParser()Returns the parser for the human-readable text report produced by deno audit.DenoManager
getLockPackageName()Returns Deno’s lock-file name.DenoManager
getName()Returns the manager name used in Foxy configuration.DenoManager
getPackageJsonPath()Returns the frontend package manifest path.AbstractManifestAssetManager
getPackageName()Returns the frontend package manifest filename.AbstractManifestAssetManager
getVersionConstraint()Returns the Deno versions supported by this integration.DenoManager
hasLockFile()Returns whether the manager lock file exists.AbstractManifestAssetManager
isAvailable()Returns whether the manager executable reports a detectable version.AbstractAssetManager
isInstalled()Returns whether the package manifest, dependency directory, and Deno lock file exist.DenoManager
isUpdatable()Returns whether an existing frontend installation may be updated.AbstractManifestAssetManager
run()Installs or updates frontend dependencies according to the manager state and configuration.AbstractAssetManager
setUpdatable()Enables or disables updates of an existing frontend installation.AbstractManifestAssetManager
validate()Validates the installed manager version against Foxy’s supported and configured constraints.AbstractAssetManager
actionWhenComposerDependenciesAreAlreadyInstalled() protectedHandles dependencies already present in the frontend installation.AbstractManifestAssetManager
actionWhenComposerDependenciesAreMerged() protectedSynchronizes Deno workspace members with the merged Composer asset dependencies.DenoManager
buildCommand() protectedReturns the manager command run by the configured or default binary, followed by the manager-options and manager-{action}-options values.AbstractAssetManager
buildUnconfiguredCommand() protectedReturns the manager command run by the configured or default binary, without the install and update options.AbstractAssetManager
getAuditCommand() protectedReturns the Deno audit command for the complete workspace.DenoManager
getAuditEnvironment() protectedReturns environment overrides that disable color in Deno audit output.DenoManager
getDefaultBinary() protectedReturns the platform-specific Deno binary name.DenoManager
getInstallCommand() protectedReturns the command that installs the asset dependencies, followed by the manager-options and manager-install-options values.AbstractAssetManager
getLockFilePath() protectedReturns the manager lock-file path under the root package directory.AbstractManifestAssetManager
getManagerConfig() protectedReturns the configuration scoped to this manager, so manager-* map entries resolve to its own value.AbstractManifestAssetManager
getManagerWorkingDirectory() protectedReturns the configured manager working directory, or null to use the process default.AbstractManifestAssetManager
getNodeModulesPath() protectedReturns the node_modules path under the root package directory.AbstractManifestAssetManager
getRootPackageDir() protectedReturns the resolved root package directory.AbstractManifestAssetManager
getRootPackagePath() protectedResolves a path under the root package directory.AbstractManifestAssetManager
getUpdateCommand() protectedReturns the command that refreshes the lock file and then installs dependencies.DenoManager
getVersion() protectedReturns the normalized manager version, or null when it cannot be detected.AbstractAssetManager
getVersionCommand() protectedReturns the command that prints the manager version, without the install and update options.AbstractAssetManager
normalizeVersionOutput() protectedExtracts the version number from Deno’s version output.DenoManager
validateAuditConfiguration() protectedRejects production-only audits because Deno cannot exclude development dependencies.DenoManager
withManagerTimeout() protected finalRuns the callback with the process timeout set to the manager-timeout option and restores the previous timeout afterward, even when the callback throws.AbstractAssetManager
ConstantValueDescriptionDefined by
NODE_MODULES_PATH'./node_modules'AbstractManifestAssetManager
public function getAuditParser(): Foxy\Audit\AuditParserInterface

Returns the parser for the human-readable text report produced by deno audit.

public function getLockPackageName(): string

Returns Deno’s lock-file name.

Returns

string

public function getName(): string

Returns the manager name used in Foxy configuration.

Returns

string

public function getVersionConstraint(): string

Returns the Deno versions supported by this integration.

Returns

string

public function isInstalled(): bool

Returns whether the package manifest, dependency directory, and Deno lock file exist.

Returns

bool

actionWhenComposerDependenciesAreMerged()

Section titled “actionWhenComposerDependenciesAreMerged() ”
protected function actionWhenComposerDependenciesAreMerged(Foxy\Asset\AssetPackageInterface $assetPackage, array $previousDependencies): void

Synchronizes Deno workspace members with the merged Composer asset dependencies.

Parameters

ParameterTypeDescription
$assetPackageAssetPackageInterface
$previousDependenciesarray
protected function getAuditCommand(bool $noDev): string

Returns the Deno audit command for the complete workspace.

Parameters

ParameterTypeDescription
$noDevbool

Returns

string

protected function getAuditEnvironment(): array

Returns environment overrides that disable color in Deno audit output.

Returns

array

protected function getDefaultBinary(): string

Returns the platform-specific Deno binary name.

Returns

string

protected function getUpdateCommand(): string

Returns the command that refreshes the lock file and then installs dependencies.

Returns

string

protected function normalizeVersionOutput(string $output): string

Extracts the version number from Deno’s version output.

Parameters

ParameterTypeDescription
$outputstring

Returns

string

protected function validateAuditConfiguration(bool $noDev): void

Rejects production-only audits because Deno cannot exclude development dependencies.

Parameters

ParameterTypeDescription
$noDevbool