@friggframework/core 2.0.0--canary.461.23a07de.0 → 2.0.0--canary.461.b8c7c6b.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.
|
@@ -100,6 +100,17 @@ class CredentialRepositoryMongo extends CredentialRepositoryInterface {
|
|
|
100
100
|
if (!identifiers)
|
|
101
101
|
throw new Error('identifiers required to upsert credential');
|
|
102
102
|
|
|
103
|
+
if (!identifiers.user && !identifiers.userId) {
|
|
104
|
+
throw new Error('user or userId required in identifiers');
|
|
105
|
+
}
|
|
106
|
+
if (!identifiers.externalId) {
|
|
107
|
+
throw new Error(
|
|
108
|
+
'externalId required in identifiers to prevent credential collision. ' +
|
|
109
|
+
'When multiple credentials exist for the same user, both userId and externalId ' +
|
|
110
|
+
'are needed to uniquely identify which credential to update.'
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
103
114
|
// Build where clause from identifiers
|
|
104
115
|
const where = this._convertIdentifiersToWhere(identifiers);
|
|
105
116
|
|
|
@@ -119,6 +119,17 @@ class CredentialRepositoryPostgres extends CredentialRepositoryInterface {
|
|
|
119
119
|
if (!identifiers)
|
|
120
120
|
throw new Error('identifiers required to upsert credential');
|
|
121
121
|
|
|
122
|
+
if (!identifiers.user && !identifiers.userId) {
|
|
123
|
+
throw new Error('user or userId required in identifiers');
|
|
124
|
+
}
|
|
125
|
+
if (!identifiers.externalId) {
|
|
126
|
+
throw new Error(
|
|
127
|
+
'externalId required in identifiers to prevent credential collision. ' +
|
|
128
|
+
'When multiple credentials exist for the same user, both userId and externalId ' +
|
|
129
|
+
'are needed to uniquely identify which credential to update.'
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
122
133
|
const where = this._convertIdentifiersToWhere(identifiers);
|
|
123
134
|
|
|
124
135
|
const { user, externalId } = identifiers;
|
|
@@ -219,10 +219,10 @@ async function runPrismaMigrate(command = 'dev', verbose = false) {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
// Execute the command (prismaBin might be 'node /path/to/index.js' or 'npx prisma')
|
|
222
|
-
const [
|
|
223
|
-
const fullArgs = [...
|
|
222
|
+
const [executable, ...executableArgs] = prismaBin.split(' ');
|
|
223
|
+
const fullArgs = [...executableArgs, ...args];
|
|
224
224
|
|
|
225
|
-
const proc = spawn(
|
|
225
|
+
const proc = spawn(executable, fullArgs, {
|
|
226
226
|
stdio: 'inherit',
|
|
227
227
|
env: {
|
|
228
228
|
...process.env,
|
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.461.
|
|
4
|
+
"version": "2.0.0--canary.461.b8c7c6b.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.588.0",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@friggframework/eslint-config": "2.0.0--canary.461.
|
|
41
|
-
"@friggframework/prettier-config": "2.0.0--canary.461.
|
|
42
|
-
"@friggframework/test": "2.0.0--canary.461.
|
|
40
|
+
"@friggframework/eslint-config": "2.0.0--canary.461.b8c7c6b.0",
|
|
41
|
+
"@friggframework/prettier-config": "2.0.0--canary.461.b8c7c6b.0",
|
|
42
|
+
"@friggframework/test": "2.0.0--canary.461.b8c7c6b.0",
|
|
43
43
|
"@prisma/client": "^6.17.0",
|
|
44
44
|
"@types/lodash": "4.17.15",
|
|
45
45
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "b8c7c6bedb12c3dd0c055eedae89456050458d48"
|
|
83
83
|
}
|