create-berna-stencil 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/create.js +1 -1
- package/package.json +1 -1
- package/src/api/core/vendor/composer/installed.php +2 -2
- package/src/api/web.config +41 -0
- package/src/web.config +39 -0
package/bin/create.js
CHANGED
|
@@ -17,7 +17,7 @@ const COPY_TARGETS = [
|
|
|
17
17
|
|
|
18
18
|
const PROJECT_PACKAGE = {
|
|
19
19
|
name: path.basename(targetDir),
|
|
20
|
-
version: '1.0.
|
|
20
|
+
version: '1.0.24',
|
|
21
21
|
private: true,
|
|
22
22
|
scripts: {
|
|
23
23
|
"build:css": "sass src/scss:c:/laragon/www/Berna-Stencil-out/css --no-source-map --style=compressed --quiet",
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => '__root__',
|
|
4
4
|
'pretty_version' => 'dev-main',
|
|
5
5
|
'version' => 'dev-main',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => '7a680244883ce58f9dc698ec645fb54b20742eaf',
|
|
7
7
|
'type' => 'library',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
'__root__' => array(
|
|
14
14
|
'pretty_version' => 'dev-main',
|
|
15
15
|
'version' => 'dev-main',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => '7a680244883ce58f9dc698ec645fb54b20742eaf',
|
|
17
17
|
'type' => 'library',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<configuration>
|
|
3
|
+
<system.webServer>
|
|
4
|
+
<rewrite>
|
|
5
|
+
<rules>
|
|
6
|
+
|
|
7
|
+
<!-- 1. Permetti index.php (- [L]) -->
|
|
8
|
+
<rule name="Allow API index.php" stopProcessing="true">
|
|
9
|
+
<match url="^index\.php$" ignoreCase="true" />
|
|
10
|
+
<action type="None" />
|
|
11
|
+
</rule>
|
|
12
|
+
|
|
13
|
+
<!-- 2a. Manda tutti gli altri file .php a index.php -->
|
|
14
|
+
<rule name="Route other PHP to index" stopProcessing="true">
|
|
15
|
+
<match url="\.php$" ignoreCase="true" />
|
|
16
|
+
<action type="Rewrite" url="index.php" />
|
|
17
|
+
</rule>
|
|
18
|
+
|
|
19
|
+
<!-- 2b. Manda le richieste per le sottocartelle protette a index.php -->
|
|
20
|
+
<rule name="Protect Core API Directories" stopProcessing="true">
|
|
21
|
+
<match url="^(core|endpoints|modules|vendor)($|/)" ignoreCase="true" />
|
|
22
|
+
<action type="Rewrite" url="index.php" />
|
|
23
|
+
</rule>
|
|
24
|
+
|
|
25
|
+
<!-- 3. Regola per gli endpoint (se non è un file o una cartella, vai a index.php) -->
|
|
26
|
+
<rule name="API Endpoints Front Controller" stopProcessing="true">
|
|
27
|
+
<match url="^(.*)$" ignoreCase="true" />
|
|
28
|
+
<conditions logicalGrouping="MatchAll">
|
|
29
|
+
<!-- !-f -->
|
|
30
|
+
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
|
31
|
+
<!-- !-d -->
|
|
32
|
+
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
|
33
|
+
</conditions>
|
|
34
|
+
<!-- appendQueryString="true" equivale al flag [QSA] di Apache -->
|
|
35
|
+
<action type="Rewrite" url="index.php" appendQueryString="true" />
|
|
36
|
+
</rule>
|
|
37
|
+
|
|
38
|
+
</rules>
|
|
39
|
+
</rewrite>
|
|
40
|
+
</system.webServer>
|
|
41
|
+
</configuration>
|
package/src/web.config
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<configuration>
|
|
3
|
+
<system.webServer>
|
|
4
|
+
|
|
5
|
+
<!-- Forza IIS a usare il file 404.html per ogni errore 404 -->
|
|
6
|
+
<httpErrors errorMode="Custom" existingResponse="Replace">
|
|
7
|
+
<remove statusCode="404" subStatusCode="-1" />
|
|
8
|
+
<error statusCode="404" path="/404.html" responseMode="ExecuteURL" />
|
|
9
|
+
</httpErrors>
|
|
10
|
+
|
|
11
|
+
<!-- Sezione Rewrite (richiede il modulo "URL Rewrite" installato su IIS) -->
|
|
12
|
+
<rewrite>
|
|
13
|
+
<rules>
|
|
14
|
+
|
|
15
|
+
<!-- 1. Se la richiesta è per la cartella API, ferma l'elaborazione (action type="None") -->
|
|
16
|
+
<rule name="Ignore API Directory" stopProcessing="true">
|
|
17
|
+
<match url="^api/.*" ignoreCase="true" />
|
|
18
|
+
<action type="None" />
|
|
19
|
+
</rule>
|
|
20
|
+
|
|
21
|
+
<!-- 2. Se il file o la cartella richiesti esistono fisicamente, servili normalmente -->
|
|
22
|
+
<rule name="Serve Existing Files and Directories" stopProcessing="true">
|
|
23
|
+
<match url="(.*)" />
|
|
24
|
+
<conditions logicalGrouping="MatchAny">
|
|
25
|
+
<add input="{REQUEST_FILENAME}" matchType="IsFile" />
|
|
26
|
+
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" />
|
|
27
|
+
</conditions>
|
|
28
|
+
<!-- action type="None" significa "non riscrivere l'URL, lascia fare a IIS" -->
|
|
29
|
+
<action type="None" />
|
|
30
|
+
</rule>
|
|
31
|
+
|
|
32
|
+
<!-- 3. Se non esistono e non siamo in /api, IIS non avendo altre regole di rewrite
|
|
33
|
+
cercherà il file, non lo troverà e farà scattare l'httpErrors 404 configurato sopra -->
|
|
34
|
+
|
|
35
|
+
</rules>
|
|
36
|
+
</rewrite>
|
|
37
|
+
|
|
38
|
+
</system.webServer>
|
|
39
|
+
</configuration>
|