Fix installer paths for vendorised module

This commit is contained in:
Ingo Schommer 2017-10-03 02:53:35 +13:00
parent ffcfd4b7e8
commit 8e49b563a9
5 changed files with 21 additions and 72 deletions

View File

@ -64,7 +64,8 @@
}, },
"expose": [ "expose": [
"client/images", "client/images",
"client/styles" "client/styles",
"src/Dev/Install/client"
] ]
}, },
"autoload": { "autoload": {

View File

@ -1,53 +0,0 @@
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
(function webpackMissingModule() { throw new Error("Cannot find module \"watch\""); }());
(function webpackMissingModule() { throw new Error("Cannot find module \"profile\""); }());
/***/ }
/******/ ]);
/*# sourceMappingURL=main.css.map*/

View File

@ -199,7 +199,7 @@ class InstallRequirements
)); ));
// Check that we can identify the root folder successfully // Check that we can identify the root folder successfully
$this->requireFile('framework/src/Dev/Install/config-form.html', array( $this->requireFile('vendor/silverstripe/framework/src/Dev/Install/config-form.html', array(
"File permissions", "File permissions",
"Does the webserver know where files are stored?", "Does the webserver know where files are stored?",
"The webserver isn't letting me identify where files are stored.", "The webserver isn't letting me identify where files are stored.",
@ -211,9 +211,9 @@ class InstallRequirements
"mysite/ directory exists?", "mysite/ directory exists?",
'' ''
)); ));
$this->requireModule('framework', array( $this->requireModule('vendor/silverstripe/framework', array(
"File permissions", "File permissions",
"framework/ directory exists?", "vendor/silverstripe/framework/ directory exists?",
'', '',
)); ));

View File

@ -34,7 +34,7 @@ class Installer extends InstallRequirements
<meta charset="utf-8"/> <meta charset="utf-8"/>
<title>Installing SilverStripe...</title> <title>Installing SilverStripe...</title>
<link rel="stylesheet" type="text/css" <link rel="stylesheet" type="text/css"
href="framework/src/Dev/Install/client/styles/install.css"/> href="resources/silverstripe/framework/src/Dev/Install/client/styles/install.css"/>
<script src="//code.jquery.com/jquery-1.7.2.min.js"></script> <script src="//code.jquery.com/jquery-1.7.2.min.js"></script>
</head> </head>
<body> <body>
@ -439,25 +439,26 @@ ErrorDocument 500 /assets/error-500.html
$cgiClause $cgiClause
# Deny access to vendor, unless you're requesting main.php # Deny access to vendor, unless you're requesting main.php
RewriteCond %{REQUEST_URI} !^/vendor/silverstripe/framework/main\.php # Not restricting to the start of the path to support RewriteBase
RewriteRule ^vendor(/|$) - [F,L,NC]s RewriteCond %{REQUEST_URI} !/vendor/silverstripe/framework/main\.php
RewriteRule ^vendor(/|$) - [F,L,NC]
# Deny access to potentially sensitive files and folders # Deny access to potentially sensitive files and folders
RewriteRule ^\.env - [F,L,NC] RewriteRule ^\.env - [F,L,NC]
RewriteRule silverstripe-cache(/|$) - [F,L,NC] RewriteRule silverstripe-cache(/|$) - [F,L,NC]
RewriteRule composer\.(json|lock) - [F,L,NC] RewriteRule composer\.(json|lock) - [F,L,NC]
RewriteRule (error|silverstripe|debug)\.log - [F,L,NC] RewriteRule (error|silverstripe|debug)\.log - [F,L,NC]
# Deny access to potentially sensitive files and folders # Deny access to potentially sensitive files and folders
RewriteRule silverstripe-cache(/|$) - [F,L,NC] RewriteRule silverstripe-cache(/|$) - [F,L,NC]
RewriteRule composer\.(json|lock) - [F,L,NC] RewriteRule composer\.(json|lock) - [F,L,NC]
# Process through SilverStripe if no file with the requested name exists. # Process through SilverStripe if no file with the requested name exists.
# Pass through the original path as a query parameter, and retain the existing parameters. # Pass through the original path as a query parameter, and retain the existing parameters.
# Try finding framework in the vendor folder first # Try finding framework in the vendor folder first
RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* vendor/silverstripe/framework/main.php?url=%1 [QSA] RewriteRule .* vendor/silverstripe/framework/main.php?url=%1 [QSA]
</IfModule> </IfModule>
TEXT; TEXT;

View File

@ -104,8 +104,8 @@ if ($installFromCli && ($req->hasErrors() || $dbReq->hasErrors())) {
exit(1); exit(1);
} }
// Path to client resources // Path to client resources (copied through silverstripe/vendor-plugin)
$clientPath = (FRAMEWORK_DIR ? FRAMEWORK_DIR . '/' : '') . 'src/Dev/Install/client'; $clientPath = 'resources/silverstripe/framework/src/Dev/Install/client';
// config-form.html vars (placeholder to prevent deletion) // config-form.html vars (placeholder to prevent deletion)