lapeh 1.0.6 → 1.0.7
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/index.js +5 -2
- package/package.json +1 -1
- package/prisma/base.prisma +1 -1
- package/scripts/init-project.js +5 -2
package/bin/index.js
CHANGED
|
@@ -173,8 +173,11 @@ const selectOption = async (query, options) => {
|
|
|
173
173
|
console.log("📄 Updating prisma/base.prisma...");
|
|
174
174
|
if (fs.existsSync(prismaBaseFile)) {
|
|
175
175
|
let baseContent = fs.readFileSync(prismaBaseFile, "utf8");
|
|
176
|
-
// Replace provider
|
|
177
|
-
baseContent = baseContent.replace(
|
|
176
|
+
// Replace provider in datasource block
|
|
177
|
+
baseContent = baseContent.replace(
|
|
178
|
+
/(datasource\s+db\s+\{[\s\S]*?provider\s*=\s*")([^"]+)(")/,
|
|
179
|
+
`$1${dbProvider}$3`
|
|
180
|
+
);
|
|
178
181
|
fs.writeFileSync(prismaBaseFile, baseContent);
|
|
179
182
|
}
|
|
180
183
|
|
package/package.json
CHANGED
package/prisma/base.prisma
CHANGED
package/scripts/init-project.js
CHANGED
|
@@ -108,8 +108,11 @@ const selectOption = async (query, options) => {
|
|
|
108
108
|
console.log("📄 Updating prisma/base.prisma...");
|
|
109
109
|
if (fs.existsSync(prismaBaseFile)) {
|
|
110
110
|
let baseContent = fs.readFileSync(prismaBaseFile, "utf8");
|
|
111
|
-
// Replace provider
|
|
112
|
-
baseContent = baseContent.replace(
|
|
111
|
+
// Replace provider in datasource block
|
|
112
|
+
baseContent = baseContent.replace(
|
|
113
|
+
/(datasource\s+db\s+\{[\s\S]*?provider\s*=\s*")([^"]+)(")/,
|
|
114
|
+
`$1${dbProvider}$3`
|
|
115
|
+
);
|
|
113
116
|
fs.writeFileSync(prismaBaseFile, baseContent);
|
|
114
117
|
} else {
|
|
115
118
|
console.warn("⚠️ prisma/base.prisma not found. Skipping.");
|