$input->
getOption('preload'
),
$parts['alias'
] ??
$parts['package'
],
isset($parts['registry'
]) &&
$parts['registry'
] ?
$parts['registry'
] : null,
$path,
);
} if ($input->
getOption('download'
)) { $io->
warning(sprintf('The --download option is experimental. It should work well with the default %s provider but check your browser console for 404 errors.', ImportMapManager::PROVIDER_JSDELIVR_ESM
));
} $newPackages =
$this->importMapManager->
require($packages);
if (1 === \
count($newPackages)) { $newPackage =
$newPackages[0
];
$message =
sprintf('Package "%s" added to importmap.php',
$newPackage->importName
);
if ($newPackage->isDownloaded && null !==
$downloadedAsset =
$this->assetMapper->
getAsset($newPackage->path
)) { $application =
$this->
getApplication();
if ($application instanceof Application
) { $projectDir =
$application->
getKernel()->
getProjectDir();
$downloadedPath =
$downloadedAsset->sourcePath;
if (str_starts_with($downloadedPath,
$projectDir)) { $downloadedPath =
substr($downloadedPath, \
strlen($projectDir) + 1
);
}