create-prisma-php-app 3.1.3 → 3.1.4

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.
@@ -108,20 +108,15 @@ class MainLayout
108
108
  '/<script\b([^>]*)>/i',
109
109
  function ($m) use ($rawClassName) {
110
110
  $attrs = $m[1];
111
-
112
- $attrs = preg_replace(
113
- '/\btype\s*=\s*("[^"]*"|\'[^\']*\'|\S+)/i',
114
- '',
115
- $attrs
116
- );
117
-
118
111
  $encodedClass = 's' . base_convert(sprintf('%u', crc32($rawClassName)), 10, 36);
119
112
 
120
113
  if (!str_contains($attrs, 'pp-sync-script=')) {
121
114
  $attrs .= " pp-sync-script=\"{$encodedClass}\"";
122
115
  }
123
116
 
124
- $attrs .= ' type="text/php"';
117
+ if (!preg_match('/\btype\s*=\s*(["\'])[^\1]*\1|\btype\s*=\s*\S+/i', $attrs)) {
118
+ $attrs .= ' type="text/php"';
119
+ }
125
120
 
126
121
  return "<script{$attrs}>";
127
122
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",