Compare commits

...

6 Commits

8 changed files with 52 additions and 168 deletions

View File

@ -21,49 +21,21 @@
"laminas/laminas-httphandlerrunner": "2.14.x-dev", "laminas/laminas-httphandlerrunner": "2.14.x-dev",
"vlucas/phpdotenv": "^3.4@dev", "vlucas/phpdotenv": "^3.4@dev",
"middlewares/whoops": "dev-master", "middlewares/whoops": "dev-master",
"mcnd/storage": "dev-master", "mcnd/dump": "~1.0.0",
"mcnd/lean-console": "dev-master", "mcnd/storage": "~1.0.0",
"mcnd/ulmus": "dev-master", "mcnd/event": "~1.0.0",
"mcnd/tell": "dev-master", "mcnd/tell": "~1.0.0",
"mcnd/dump": "dev-master", "mcnd/ulmus": "^1.0 || ^2.0",
"mcnd/event": "dev-master", "mcnd/kash": "~1.0.0",
"mcnd/thebugs": "dev-master", "mcnd/taxus": "1.1.0",
"mcnd/taxus": "dev-master", "mcnd/notes": "^2.1.1",
"mcnd/notes": "dev-master", "mcnd/thebugs": "^1.0.0",
"psr/simple-cache": "*" "psr/simple-cache": "*"
}, },
"repositories": [ "repositories": [
{ {
"type": "vcs", "type": "composer",
"url": "https://git.mcnd.ca/mcndave/event.git" "url": "https://git.mcnd.ca/api/packages/mcndave/composer"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/the-bugs.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/storage.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/notes.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/tell.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean-console.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/dump.git"
} }
], ],
"autoload": { "autoload": {

View File

@ -2,7 +2,6 @@
use Tell\I18n; use Tell\I18n;
use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface;
use Notes\Tell\LanguageHandler;
use function DI\autowire, DI\create, DI\get, DI\add; use function DI\autowire, DI\create, DI\get, DI\add;

View File

@ -65,7 +65,7 @@ return [
} }
} }
$router->addPatternMatcher('email', '[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n]+'); $router->addPatternMatcher('email', '[^@ \t\r\n]+@[^@ \t\r\n]+\.[^@ \t\r\n/]+');
$routing = $container->get(Lean\Routing::class); $routing = $container->get(Lean\Routing::class);
$routing->registerRoute($container, getenv('URL_BASE')); $routing->registerRoute($container, getenv('URL_BASE'));

View File

@ -5,7 +5,8 @@ CRON_KEY = dev
# Route # Route
URL_BASE = "" URL_BASE = ""
APP_URL = "dev.mcnd.ca" APP_URL = "myapp.ca"
ASSET_PATH = "static/"
# Path # Path
CACHE_DIR = "var/cache" CACHE_DIR = "var/cache"
@ -23,19 +24,18 @@ DEFAULT_TIME = "fr.UTF-8"
DEFAULT_TIME_FALLBACK = "french.UTF-8" DEFAULT_TIME_FALLBACK = "french.UTF-8"
# Database # Database
#SQLITE_PATH = "var/home.sqlite3" SQLITE_PATH = "var/myapp.sqlite3"
#SQLITE_ADAPTER = "SQLite" SQLITE_ADAPTER = "SQLite"
#SQLITE_PRAGMA_BEGIN = "foreign_keys=ON,synchronous=NORMAL" SQLITE_PRAGMA_BEGIN = "foreign_keys=ON,synchronous=NORMAL"
#SQLITE_PRAGMA_DEBUG_BEGIN = "journal_mode=WAL" SQLITE_PRAGMA_DEBUG_BEGIN = "journal_mode=WAL"
#SQLITE_PRAGMA_CLOSE = "analysis_limit=500,optimize" SQLITE_PRAGMA_CLOSE = "analysis_limit=500,optimize"
DATABASE_PORT = "" #DATABASE_PORT = ""
DATABASE_HOST = "" #DATABASE_HOST = ""
DATABASE_NAME = "" #DATABASE_NAME = ""
DATABASE_USERNAME = "" #DATABASE_USERNAME = ""
DATABASE_PASSWORD = "" #DATABASE_PASSWORD = ""
DATABASE_CHARSET = "utf8" #DATABASE_CHARSET = "utf8"
DATABASE_ADAPTER = "MariaDB" #DATABASE_ADAPTER = "MariaDB"
LEAN_RANDOM = "%RAND64%"
LEAN_RANDOM = "%RAND64%"

View File

@ -25,20 +25,20 @@
"league/oauth2-client": "dev-master", "league/oauth2-client": "dev-master",
"php-di/php-di": "dev-master", "php-di/php-di": "dev-master",
"league/commonmark": "^2.7@dev", "league/commonmark": "^2.7@dev",
"assets-package/ace": "dev-master", "assets-package/ace": "1.0.0",
"mcnd/dump": "dev-master", "mcnd/dump": "dev-master",
"mcnd/storage": "dev-master", "mcnd/storage": "dev-master",
"mcnd/cli": "dev-master", "mcnd/cli": "dev-master",
"mcnd/event": "dev-master", "mcnd/event": "dev-master",
"mcnd/ulmus": "dev-master", "mcnd/ulmus": "^1.0 || ^2.0",
"mcnd/ulmus-api": "dev-master", "mcnd/ulmus-api": "^1.3.0",
"mcnd/ulmus-user": "dev-master", "mcnd/ulmus-user": "~1.1.2",
"mcnd/picea": "dev-master", "mcnd/picea": "dev-master",
"mcnd/picea-ui": "dev-master", "mcnd/picea-ui": "dev-master",
"mcnd/picea-asset": "dev-master", "mcnd/picea-asset": "~1.0.2",
"mcnd/cronard": "dev-master", "mcnd/cronard": "dev-master",
"mcnd/lean-api": "dev-master", "mcnd/lean-api": "dev-master",
"mcnd/lean-console": "dev-master", "mcnd/lean-console": "~1.3.2",
"mcnd/kash": "dev-master", "mcnd/kash": "dev-master",
"mcnd/taxus": "dev-master", "mcnd/taxus": "dev-master",
"mcnd/notes": "dev-master", "mcnd/notes": "dev-master",
@ -47,101 +47,13 @@
}, },
"repositories": [ "repositories": [
{ {
"type": "vcs", "type": "composer",
"url": "https://git.mcnd.ca/mcndave/cronard.git" "url": "https://git.mcnd.ca/api/packages/mcndave/composer"
}, },
{ {
"type": "vcs", "type": "composer",
"url": "https://git.mcnd.ca/mcndave/cli.git" "url": "https://git.mcnd.ca/api/packages/assets-package/composer"
}, }
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/dump.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/storage.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean-api.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/lean-console.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus-api.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus-user.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/ulmus-api-gitea.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/picea.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/storage.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/picea-ui.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/picea-asset.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/notes.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/the-bugs.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/tell.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/taxus.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/dump.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/kash.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/event.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/mcndave/negundo-client.git"
},
{
"type": "vcs",
"url": "https://git.mcnd.ca/assets-package/ace.git"
}
], ],
"autoload": { "autoload": {
"psr-4": { "psr-4": {

View File

@ -19,7 +19,7 @@ return [
'ulmus' => [ 'ulmus' => [
'connections' => [ 'connections' => [
'default' => [ /*'default' => [
'adapter' => getenv("DATABASE_ADAPTER"), 'adapter' => getenv("DATABASE_ADAPTER"),
'host' => getenv("DATABASE_HOST"), 'host' => getenv("DATABASE_HOST"),
'port' => getenv("DATABASE_PORT"), 'port' => getenv("DATABASE_PORT"),
@ -29,18 +29,18 @@ return [
'settings' => [ 'settings' => [
'charset' => getenv("DATABASE_CHARSET"), 'charset' => getenv("DATABASE_CHARSET"),
], ],
], ],*/
'sqlite' => [ 'default' => [
'adapter' => getenv("SQLITE_ADAPTER"), 'adapter' => getenv("SQLITE_ADAPTER"),
'path' => getenv('PROJECT_PATH') . DIRECTORY_SEPARATOR . getenv("SQLITE_PATH"), 'path' => getenv('PROJECT_PATH') . DIRECTORY_SEPARATOR . getenv("SQLITE_PATH"),
'pragma' => explode(',', getenv("SQLITE_PRAGMA")), 'pragma' => explode(',', getenv("SQLITE_PRAGMA")),
'pragma_begin' => array_merge( 'pragma_begin' => array_merge(
explode(',', getenv("SQLITE_PRAGMA_BEGIN")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_BEGIN") : "") explode(',', getenv("SQLITE_PRAGMA_BEGIN")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_BEGIN") : "")
), ),
'pragma_close' => array_merge( 'pragma_close' => array_merge(
explode(',', getenv("SQLITE_PRAGMA_CLOSE")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_CLOSE") : "") explode(',', getenv("SQLITE_PRAGMA_CLOSE")), explode(',', getenv('DEBUG') ? getenv("SQLITE_PRAGMA_DEBUG_CLOSE") : "")
), ),
], ],
] ]
] ]

View File

@ -8,7 +8,7 @@ try {
new class($projectPath) extends %NAMESPACE%\Kernel {}; new class($projectPath) extends %NAMESPACE%\Kernel {};
} }
catch(\Throwable $t) { catch(\Throwable $t) {
echo sprintf("%s in <strong>%s</strong> <pre>%s</pre>", $t->getMessage(), $t->getFile() . ":" . $t->getLine(), getenv('DEBUG') ? $t->getTraceAsString() : ""); echo sprintf("%s<hr><small>%s:%d</small><br><pre>%s</pre>", $t->getMessage(), $t->getFile(), $t->getLine(), getenv('DEBUG') ? var_export($t->getTrace(), true) : "");
error_log($t->getMessage()); error_log($t->getMessage());
header("HTTP/1.1 500 Internal Server Error"); header("HTTP/1.1 500 Internal Server Error");
} }

View File

@ -7,6 +7,7 @@ use Storage\Session;
use Ulmus\User\Entity\User; use Ulmus\User\Entity\User;
use Notes\Route\Attribute\Object\Route; use Notes\Route\Attribute\Object\Route;
use Notes\Security\Attribute\Security; use Notes\Security\Attribute\Security;
use DI\Attribute\Inject;
use %NAMESPACE%\{ Entity, Lib, Form }; use %NAMESPACE%\{ Entity, Lib, Form };
@ -18,9 +19,9 @@ use Notes\Attribute\Ignore;use Ulmus\User\Entity\UserInterface;
trait ControllerTrait { trait ControllerTrait {
use \Lean\ControllerTrait; use \Lean\ControllerTrait;
#[Ignore] #[Inject]
public ? UserInterface $user; public ? UserInterface $user;
#[Ignore] #[Inject]
protected EventManager $eventManager; protected EventManager $eventManager;
} }