@friggframework/core 2.0.0--canary.707.2702ff3.0 → 2.0.0--canary.707.df52379.0
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/extensions/prisma-composer.js +20 -14
- package/package.json +5 -5
|
@@ -203,9 +203,27 @@ function composeExtensionPrisma({
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
const extensionSchemas = getExtensionSchemaPaths(extensions, dbType);
|
|
206
|
-
//
|
|
206
|
+
// Migrations do not depend on a schema: an extension may ship only
|
|
207
|
+
// SQL (a table it reads with raw queries), and it must still be applied.
|
|
208
|
+
const migrations =
|
|
209
|
+
dbType === 'postgresql'
|
|
210
|
+
? copyExtensionMigrations(
|
|
211
|
+
extensions,
|
|
212
|
+
path.join(schemaDir, 'migrations')
|
|
213
|
+
)
|
|
214
|
+
: [];
|
|
215
|
+
if (migrations.length > 0) {
|
|
216
|
+
log(`[Frigg] Added extension migrations: ${migrations.join(', ')}`);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// No schema to compose and none composed before: the schema and the
|
|
220
|
+
// client stay exactly as core shipped them.
|
|
207
221
|
if (extensionSchemas.length === 0 && !fs.existsSync(basePath)) {
|
|
208
|
-
results.push({
|
|
222
|
+
results.push({
|
|
223
|
+
dbType,
|
|
224
|
+
changed: migrations.length > 0,
|
|
225
|
+
migrations,
|
|
226
|
+
});
|
|
209
227
|
continue;
|
|
210
228
|
}
|
|
211
229
|
|
|
@@ -218,14 +236,6 @@ function composeExtensionPrisma({
|
|
|
218
236
|
const schemaChanged = current !== target;
|
|
219
237
|
if (schemaChanged) fs.writeFileSync(schemaPath, target, 'utf-8');
|
|
220
238
|
|
|
221
|
-
const migrations =
|
|
222
|
-
dbType === 'postgresql'
|
|
223
|
-
? copyExtensionMigrations(
|
|
224
|
-
extensions,
|
|
225
|
-
path.join(schemaDir, 'migrations')
|
|
226
|
-
)
|
|
227
|
-
: [];
|
|
228
|
-
|
|
229
239
|
const clientPath = path.join(
|
|
230
240
|
corePath,
|
|
231
241
|
'generated',
|
|
@@ -242,10 +252,6 @@ function composeExtensionPrisma({
|
|
|
242
252
|
);
|
|
243
253
|
generate({ schemaPath, corePath, dbType });
|
|
244
254
|
}
|
|
245
|
-
if (migrations.length > 0) {
|
|
246
|
-
log(`[Frigg] Added extension migrations: ${migrations.join(', ')}`);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
255
|
results.push({
|
|
250
256
|
dbType,
|
|
251
257
|
changed: schemaChanged || clientStale || migrations.length > 0,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.707.
|
|
4
|
+
"version": "2.0.0--canary.707.df52379.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.588.0",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@friggframework/eslint-config": "2.0.0--canary.707.
|
|
52
|
-
"@friggframework/prettier-config": "2.0.0--canary.707.
|
|
53
|
-
"@friggframework/test": "2.0.0--canary.707.
|
|
51
|
+
"@friggframework/eslint-config": "2.0.0--canary.707.df52379.0",
|
|
52
|
+
"@friggframework/prettier-config": "2.0.0--canary.707.df52379.0",
|
|
53
|
+
"@friggframework/test": "2.0.0--canary.707.df52379.0",
|
|
54
54
|
"@prisma/client": "^6.19.3",
|
|
55
55
|
"@types/lodash": "4.17.15",
|
|
56
56
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"publishConfig": {
|
|
91
91
|
"access": "public"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "df52379ae496d26aec99abe2127f304230e86f36"
|
|
94
94
|
}
|