- Worked on skeleton update
This commit is contained in:
		
							parent
							
								
									34ca18f34c
								
							
						
					
					
						commit
						f9c081ff26
					
				
							
								
								
									
										152
									
								
								skeleton/composer.json.dist
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										152
									
								
								skeleton/composer.json.dist
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,152 @@ | ||||
| { | ||||
|     "name": "my_namespace/my_project", | ||||
|     "description": "", | ||||
|     "type": "app", | ||||
|     "license": "MIT", | ||||
|     "authors": [ | ||||
| 
 | ||||
|     ], | ||||
|     "minimum-stability": "dev", | ||||
|     "require": { | ||||
|         "php": "^8.2", | ||||
|         "ext-apcu": "*", | ||||
|         "ext-json": "*", | ||||
|         "league/route": "^5.0.0-dev", | ||||
|         "laminas/laminas-diactoros": "2.24.x-dev", | ||||
|         "laminas/laminas-httphandlerrunner": "2.5.x-dev", | ||||
|         "vlucas/phpdotenv": "^3.4@dev", | ||||
|         "middlewares/whoops": "dev-master", | ||||
|         "ralouphie/getallheaders": "dev-master", | ||||
|         "mcnd/dump": "dev-master", | ||||
|         "mcnd/storage": "dev-master", | ||||
|         "mcnd/event": "dev-master", | ||||
|         "mcnd/ulmus": "dev-master", | ||||
|         "mcnd/ulmus-api": "dev-master", | ||||
|         "mcnd/ulmus-user": "dev-master", | ||||
|         "mcnd/picea": "dev-master", | ||||
|         "mcnd/picea-ui": "dev-master", | ||||
|         "mcnd/picea-asset": "dev-master", | ||||
|         "mcnd/cronard": "dev-master", | ||||
|         "mcnd/lean-console": "dev-master", | ||||
|         "mcnd/kash": "dev-master", | ||||
|         "mcnd/taxus": "dev-master", | ||||
|         "mcnd/notes": "dev-master", | ||||
|         "mcnd/thebugs": "dev-master", | ||||
|         "mcnd/negundo-client": "dev-master" | ||||
|     }, | ||||
|     "repositories": [ | ||||
|         { | ||||
|             "type": "vcs", | ||||
|             "url": "https://git.mcnd.ca/mcndave/cronard.git" | ||||
|         }, | ||||
|         { | ||||
|             "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-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" | ||||
|         } | ||||
|     ], | ||||
|     "autoload": { | ||||
|         "psr-4": { | ||||
|             "MyProject\\Namespace": "src/" | ||||
|         } | ||||
|     }, | ||||
|     "scripts": { | ||||
|         "post-install-cmd": [ | ||||
|             "Lean\\Composer::postInstall" | ||||
|         ], | ||||
|         "post-update-cmd": [ | ||||
|             "Lean\\Composer::postUpdate" | ||||
|         ] | ||||
|     }, | ||||
|     "extra" : { | ||||
|         "lean" : { | ||||
|             "autoload": { | ||||
|                 "definitions" : [ | ||||
|                     "meta/definitions/definitions.php", | ||||
|                     "meta/definitions/storage.php", | ||||
|                     "meta/definitions/security.php", | ||||
|                     "meta/definitions/auth.php", | ||||
|                     "meta/definitions/env.php" | ||||
|                 ], | ||||
|                 "config" : [ | ||||
|                     "meta/config.php" | ||||
|                 ] | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
							
								
								
									
										3
									
								
								skeleton/meta/definitions/env.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								skeleton/meta/definitions/env.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| <?php | ||||
| 
 | ||||
| return require("env/" . ( getenv('APP_ENV') ?? 'prod' ) . ".php"); | ||||
| @ -6,14 +6,28 @@ use Taxus\{ Privilege, Taxus, PermissionGrantInterface, DefaultPermissionGrant } | ||||
| 
 | ||||
| use Psr\Http\Message\ServerRequestInterface; | ||||
| 
 | ||||
| use function DI\autowire, DI\create, DI\get; | ||||
| use function DI\{ create, get, add }; | ||||
| 
 | ||||
| return [ | ||||
|     Taxus::class => function ($c) { | ||||
|         return ( new Taxus( $c->get(PermissionGrantInterface::class) ) )->add( | ||||
|             $c->get(Lean\Lean::class)->getTaxusPrivileges() | ||||
|         ); | ||||
|         $taxus = new Taxus( ... $c->get('taxus.gates') ); | ||||
| 
 | ||||
|         $list = []; | ||||
| 
 | ||||
|         foreach($c->get(Lean\Lean::class)->getTaxusPrivileges() as $key => $privilege) { | ||||
|             foreach($privilege as $name => $description) { | ||||
|                 $list[] = [ new Privilege($name, $description), $key ]; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         $taxus->add(... $list); | ||||
| 
 | ||||
|         return $taxus; | ||||
|     }, | ||||
| 
 | ||||
|     'taxus.gates' => add([ | ||||
|         get(PermissionGrantInterface::class), | ||||
|     ]), | ||||
| 
 | ||||
|     PermissionGrantInterface::class => create(%NAMESPACE%\PrivilegeGrantAccess::class)->constructor(get(ServerRequestInterface::class), get(Session::class)), | ||||
| ]; | ||||
|  | ||||
| @ -1,12 +1,18 @@ | ||||
| <IfModule mod_rewrite.c> | ||||
|     RewriteEngine On | ||||
|     # RewriteBase / | ||||
| 
 | ||||
|     # Force HTTPS (disabled by default) | ||||
|     # RewriteCond %{HTTPS} off | ||||
|     # RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | ||||
| 
 | ||||
|     # Remove trailing slashes from request URL | ||||
|     #RewriteCond %{REQUEST_FILENAME} !-d | ||||
|     #RewriteCond %{REQUEST_URI} (.+)/$ | ||||
|     #RewriteRule ^ %1 [R=301,L] | ||||
| 
 | ||||
|     # Redirect everything into app | ||||
|     RewriteCond %{REQUEST_FILENAME} !-f | ||||
|     RewriteCond %{REQUEST_FILENAME} !-d | ||||
|     RewriteCond %{REQUEST_URI} (.+)/$ | ||||
|     RewriteRule ^ %1 [R=301,L] | ||||
|     RewriteRule ^([^?]*)$ %1 [NC,L,QSA] | ||||
| </IfModule> | ||||
|  | ||||
| @ -1,8 +1,8 @@ | ||||
| <?php | ||||
| 
 | ||||
| try { | ||||
|     require_once("../src/Kernel.php"); | ||||
|     require_once(dirname(__DIR__)."/src/Kernel.php"); | ||||
| } | ||||
| catch(\Throwable $t) { | ||||
|     echo $t->getMessage(); | ||||
|     echo sprintf("%s in <strong>%s</strong> <pre>%s</pre>", $t->getMessage(), $t->getFile() . ":" . $t->getLine(), $t->getTraceAsString()); | ||||
| } | ||||
| @ -1,45 +0,0 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <configuration> | ||||
|     <system.webServer> | ||||
|         <rewrite> | ||||
|             <rules> | ||||
|                 <rule name="Remove trailing slash" stopProcessing="true"> | ||||
|                     <match url="(.*)/$" /> | ||||
|                     <conditions> | ||||
|                         <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | ||||
|                         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | ||||
|                     </conditions> | ||||
|                     <action type="Redirect" redirectType="Permanent" url="{R:1}" /> | ||||
|                 </rule> | ||||
|                 <rule name="Framework Routing" stopProcessing="true"> | ||||
|                     <match url="." ignoreCase="false" /> | ||||
|                     <conditions logicalGrouping="MatchAll"> | ||||
|                         <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> | ||||
|                         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> | ||||
|                     </conditions> | ||||
|                     <action type="Rewrite" url="index.php" /> | ||||
|                 </rule> | ||||
|             </rules> | ||||
|         </rewrite> | ||||
|         <staticContent> | ||||
|             <remove fileExtension=".js" /> | ||||
|             <mimeMap fileExtension=".js" mimeType="application/x-javascript; charset=UTF-8" /> | ||||
|             <remove fileExtension=".css" /> | ||||
|             <mimeMap fileExtension=".css" mimeType="text/css; charset=UTF-8" /> | ||||
|             <remove fileExtension=".woff" /> | ||||
|             <remove fileExtension=".eot" /> | ||||
|             <remove fileExtension=".ttf" /> | ||||
|             <remove fileExtension=".svg" /> | ||||
| 
 | ||||
|             <mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" /> | ||||
|             <mimeMap fileExtension=".ttf" mimeType="application/font-sfnt" /> | ||||
|             <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> | ||||
|             <mimeMap fileExtension=".woff" mimeType="application/font-woff" /> | ||||
|         </staticContent> | ||||
|         <handlers> | ||||
|             <remove name="PHP7.3" /> | ||||
|             <add name="PHP7.3" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:\php\7.4.0\php-cgi.exe" resourceType="File" requireAccess="Script" /> | ||||
|         </handlers> | ||||
|         <httpErrors errorMode="Detailed" /> | ||||
|     </system.webServer> | ||||
| </configuration> | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user