create-prisma-php-app 3.1.18 → 3.1.20
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/dist/index.js +14 -6
- package/dist/src/Lib/MainLayout.php +2 -2
- package/dist/src/Lib/PHPX/TemplateCompiler.php +15 -2
- package/package.json +1 -1
- package/vendor/autoload.php +25 -25
- package/vendor/composer/ClassLoader.php +579 -579
- package/vendor/composer/InstalledVersions.php +359 -359
- package/vendor/composer/LICENSE +21 -21
- package/vendor/composer/autoload_classmap.php +10 -10
- package/vendor/composer/autoload_namespaces.php +9 -9
- package/vendor/composer/autoload_real.php +38 -38
- package/vendor/composer/installed.json +825 -825
- package/vendor/composer/installed.php +132 -132
package/dist/index.js
CHANGED
|
@@ -33,15 +33,23 @@ async function installNpmDependencies(baseDir, dependencies, isDev = false) {
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
async function installComposerDependencies(baseDir, dependencies) {
|
|
36
|
-
console.log(
|
|
36
|
+
console.log(
|
|
37
|
+
chalk.green(
|
|
38
|
+
`Composer project initialization: ${
|
|
39
|
+
updateAnswer?.isUpdate
|
|
40
|
+
? "Updating existing project..."
|
|
41
|
+
: "Setting up new project..."
|
|
42
|
+
}`
|
|
43
|
+
)
|
|
44
|
+
);
|
|
37
45
|
// Initialize a composer.json if it doesn't exist
|
|
38
46
|
if (!fs.existsSync(path.join(baseDir, "composer.json"))) {
|
|
39
47
|
execSync(
|
|
40
|
-
`composer init -n
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
48
|
+
`composer init -n \
|
|
49
|
+
--name="tsnc/prisma-php-app" \
|
|
50
|
+
--require="php:^8.2" \
|
|
51
|
+
--version="1.0.0"`,
|
|
52
|
+
{ stdio: "inherit", cwd: baseDir }
|
|
45
53
|
);
|
|
46
54
|
}
|
|
47
55
|
// Log the dependencies being installed
|
|
@@ -110,8 +110,8 @@ class MainLayout
|
|
|
110
110
|
$attrs = $m[1];
|
|
111
111
|
$encodedClass = 's' . base_convert(sprintf('%u', crc32($rawClassName)), 10, 36);
|
|
112
112
|
|
|
113
|
-
if (!str_contains($attrs, 'pp-
|
|
114
|
-
$attrs .= " pp-
|
|
113
|
+
if (!str_contains($attrs, 'pp-component=')) {
|
|
114
|
+
$attrs .= " pp-component=\"{$encodedClass}\"";
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
if (!preg_match('/\btype\s*=\s*(["\'])[^\1]*\1|\btype\s*=\s*\S+/i', $attrs)) {
|
|
@@ -209,11 +209,24 @@ class TemplateCompiler
|
|
|
209
209
|
return $m[0];
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
if (
|
|
212
|
+
if (str_contains($m[2], '<![CDATA[')) {
|
|
213
213
|
return $m[0];
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
|
|
216
|
+
$type = '';
|
|
217
|
+
if (preg_match('/\btype\s*=\s*([\'"]?)([^\'"\s>]+)/i', $m[1], $t)) {
|
|
218
|
+
$type = strtolower($t[2]);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
$codeTypes = [
|
|
222
|
+
'',
|
|
223
|
+
'text/javascript',
|
|
224
|
+
'application/javascript',
|
|
225
|
+
'module',
|
|
226
|
+
'text/php',
|
|
227
|
+
];
|
|
228
|
+
|
|
229
|
+
if (!in_array($type, $codeTypes, true)) {
|
|
217
230
|
return $m[0];
|
|
218
231
|
}
|
|
219
232
|
|
package/package.json
CHANGED
package/vendor/autoload.php
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
<?php
|
|
2
|
-
|
|
3
|
-
// autoload.php @generated by Composer
|
|
4
|
-
|
|
5
|
-
if (PHP_VERSION_ID < 50600) {
|
|
6
|
-
if (!headers_sent()) {
|
|
7
|
-
header('HTTP/1.1 500 Internal Server Error');
|
|
8
|
-
}
|
|
9
|
-
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
|
10
|
-
if (!ini_get('display_errors')) {
|
|
11
|
-
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
|
12
|
-
fwrite(STDERR, $err);
|
|
13
|
-
} elseif (!headers_sent()) {
|
|
14
|
-
echo $err;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
trigger_error(
|
|
18
|
-
$err,
|
|
19
|
-
E_USER_ERROR
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
require_once __DIR__ . '/composer/autoload_real.php';
|
|
24
|
-
|
|
25
|
-
return ComposerAutoloaderInit47138f7a82a187607bb66e41f7465a9c::getLoader();
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
// autoload.php @generated by Composer
|
|
4
|
+
|
|
5
|
+
if (PHP_VERSION_ID < 50600) {
|
|
6
|
+
if (!headers_sent()) {
|
|
7
|
+
header('HTTP/1.1 500 Internal Server Error');
|
|
8
|
+
}
|
|
9
|
+
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
|
|
10
|
+
if (!ini_get('display_errors')) {
|
|
11
|
+
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
|
|
12
|
+
fwrite(STDERR, $err);
|
|
13
|
+
} elseif (!headers_sent()) {
|
|
14
|
+
echo $err;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
trigger_error(
|
|
18
|
+
$err,
|
|
19
|
+
E_USER_ERROR
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
require_once __DIR__ . '/composer/autoload_real.php';
|
|
24
|
+
|
|
25
|
+
return ComposerAutoloaderInit47138f7a82a187607bb66e41f7465a9c::getLoader();
|