- Various bug fixes and improved performance on package reading/writing - Corrected CHANGELOG.md - Updated dependency `Symfony/polyfill-mbstring` to 1.28.0 - Updated dependency `Symfony/polyfill-uuid` to 1.28.0 - Updated dependency `Symfony/Process` to 6.3.4 - Updated dependency `Symfony/Uid` to 6.3.0 - Updated dependency `Symfony/Yaml` to 6.3.3 - Added support for Gitea repositories - Added support for Packagist repositories - Added a new default Gitea repository nocturn9x at git.nocturn9x.space - Added a new default Gitea repository martinvlba at git.martinvlba.eu - Added a new default Gitea repository kuny at git.it-kuny.ch - Added dependency composer/semver version 3.4.0 for composer version comparison compatibility - Added a new class \ncc\Classes\ArchiveExtractor to extract multiple archive types - Refactored \ncc\Objects\RemoteRepository - Refactored the repository system - Refactored Github's repository interface - Refactored Gitlab's repository interface - Refactored SourcesMenu in the CLI to use the new repository system - Updated dependency nikic/php-parser to version 4.17.1 - Added a simple security measure in \ncc\Objects\Value\Entry to delay returns randomly when the password is incorrect - Refactored the CLI menu system to use a return exit code system - Updated the installer to remove unused components and installation steps - Updated dependency Symfony/Filesystem to 6.3.1 - Updated dependency Symfony/polyfill-ctype to 1.28.0 - Enforced credential storage security by applying 600 permissions to the storage file so that only the owner can read/write to the file; this will require root access to perform any operations on the credential file. A password will still be needed to decrypt entries in the file if any entries are encrypted. - Removed \ncc\Classes\NccExtension\Runner in favor of the new Execution Unit system - Removed \ncc\Managers\ExecutionPointerManager in favor of the new Execution Unit system
55 lines
No EOL
2.9 KiB
PHP
55 lines
No EOL
2.9 KiB
PHP
<?php
|
|
|
|
/**
|
|
* NCC Autoloader file v1.0
|
|
*
|
|
* This file attempts to autoload all the required files for NCC and
|
|
* initialize NCC immediately, this file checks for initialization
|
|
* before proceeding to improve performance.
|
|
*/
|
|
|
|
if(!defined('NCC_INIT'))
|
|
{
|
|
$third_party_path = __DIR__ . DIRECTORY_SEPARATOR . 'ThirdParty' . DIRECTORY_SEPARATOR;
|
|
$target_files = [
|
|
__DIR__ . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'composer' . DIRECTORY_SEPARATOR . 'semver' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'defuse' . DIRECTORY_SEPARATOR . 'php-encryption' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'jelix' . DIRECTORY_SEPARATOR . 'version' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'nikic' . DIRECTORY_SEPARATOR . 'PhpParser' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill_ctype' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill_ctype' . DIRECTORY_SEPARATOR . 'bootstrap.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill_mbstring' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill_mbstring' . DIRECTORY_SEPARATOR . 'bootstrap.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill_uuid' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'polyfill_uuid' . DIRECTORY_SEPARATOR . 'bootstrap.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Process' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Uid' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Filesystem' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'Symfony' . DIRECTORY_SEPARATOR . 'Yaml' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
$third_party_path . 'theseer' . DIRECTORY_SEPARATOR . 'DirectoryScanner' . DIRECTORY_SEPARATOR . 'autoload_spl.php',
|
|
];
|
|
|
|
$init_success = true;
|
|
foreach($target_files as $file)
|
|
{
|
|
if(!file_exists($file))
|
|
{
|
|
trigger_error('Cannot find file ' . $file, E_USER_WARNING);
|
|
$init_success = false;
|
|
continue;
|
|
}
|
|
|
|
require_once($file);
|
|
}
|
|
|
|
if(!$init_success)
|
|
{
|
|
trigger_error('One or more NCC components are missing/failed to load, NCC runtime may not be stable.', E_USER_WARNING);
|
|
}
|
|
|
|
if(!\ncc\ncc::initialize())
|
|
{
|
|
trigger_error('NCC Failed to initialize', E_USER_WARNING);
|
|
}
|
|
} |