@travetto/model 5.0.13 → 5.0.14
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/model",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.14",
|
|
4
4
|
"description": "Datastore abstraction for core operations.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datastore",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"directory": "module/model"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@travetto/config": "^5.0.
|
|
30
|
-
"@travetto/di": "^5.0.
|
|
31
|
-
"@travetto/registry": "^5.0.
|
|
32
|
-
"@travetto/schema": "^5.0.
|
|
29
|
+
"@travetto/config": "^5.0.13",
|
|
30
|
+
"@travetto/di": "^5.0.13",
|
|
31
|
+
"@travetto/registry": "^5.0.13",
|
|
32
|
+
"@travetto/schema": "^5.0.13"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@travetto/cli": "^5.0.
|
|
36
|
-
"@travetto/test": "^5.0.
|
|
35
|
+
"@travetto/cli": "^5.0.16",
|
|
36
|
+
"@travetto/test": "^5.0.15"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@travetto/cli": {
|
|
@@ -161,13 +161,13 @@ export abstract class ModelPolymorphismSuite extends BaseModelSuite<ModelCrudSup
|
|
|
161
161
|
service.upsert(Doctor, Doctor.from({
|
|
162
162
|
id: fire.id, name: 'gob', specialty: 'eyes'
|
|
163
163
|
})),
|
|
164
|
-
e =>
|
|
164
|
+
e => e instanceof SubTypeNotSupportedError || e instanceof ExistsError
|
|
165
165
|
);
|
|
166
166
|
|
|
167
167
|
await assert.rejects(
|
|
168
168
|
() => service.update(Engineer, castTo(Doctor.from({ ...doc }))),
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
e => e instanceof NotFoundError || e instanceof SubTypeNotSupportedError || e instanceof TypeMismatchError
|
|
170
|
+
);
|
|
171
171
|
await timers.setTimeout(15);
|
|
172
172
|
|
|
173
173
|
try {
|
|
@@ -189,7 +189,7 @@ export abstract class ModelPolymorphismSuite extends BaseModelSuite<ModelCrudSup
|
|
|
189
189
|
// Delete by wrong class
|
|
190
190
|
await assert.rejects(
|
|
191
191
|
() => service.delete(Doctor, fire.id),
|
|
192
|
-
e =>
|
|
192
|
+
e => e instanceof SubTypeNotSupportedError || e instanceof NotFoundError
|
|
193
193
|
);
|
|
194
194
|
|
|
195
195
|
// Delete by base class
|
|
@@ -203,7 +203,7 @@ export abstract class ModelPolymorphismSuite extends BaseModelSuite<ModelCrudSup
|
|
|
203
203
|
// Delete by any subtype when id is missing
|
|
204
204
|
await assert.rejects(
|
|
205
205
|
() => service.delete(Firefighter, doc.id),
|
|
206
|
-
e =>
|
|
206
|
+
e => e instanceof SubTypeNotSupportedError || e instanceof NotFoundError
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
|