@punks/backend-entity-manager 0.0.292 → 0.0.294
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/dist/cjs/index.js +25 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/errors.d.ts +6 -1
- package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/manager/types.d.ts +1 -0
- package/dist/esm/index.js +25 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/errors.d.ts +6 -1
- package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/manager/types.d.ts +1 -0
- package/dist/index.d.ts +6 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -105,13 +105,19 @@ class EntityOperationUnauthorizedException extends EntityManagerUnauthorizedExce
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
class EntityNotFoundException extends EntityManagerException {
|
|
108
|
-
constructor(
|
|
109
|
-
super(
|
|
110
|
-
|
|
108
|
+
constructor(entityData) {
|
|
109
|
+
super(entityData
|
|
110
|
+
? `Entity ${entityData.type} with id ${entityData.id} not found`
|
|
111
|
+
: "Entity not found");
|
|
112
|
+
this.entityId = entityData.id;
|
|
113
|
+
this.entityType = entityData.type;
|
|
111
114
|
}
|
|
112
115
|
getEntityId() {
|
|
113
116
|
return this.entityId;
|
|
114
117
|
}
|
|
118
|
+
getEntityType() {
|
|
119
|
+
return this.entityType;
|
|
120
|
+
}
|
|
115
121
|
}
|
|
116
122
|
class MultipleEntitiesFoundException extends EntityManagerException {
|
|
117
123
|
constructor() {
|
|
@@ -687,7 +693,10 @@ class EntityDeleteCommand {
|
|
|
687
693
|
}
|
|
688
694
|
const entity = await this.services.resolveRepository().get(id);
|
|
689
695
|
if (entity == null) {
|
|
690
|
-
throw new EntityNotFoundException(
|
|
696
|
+
throw new EntityNotFoundException({
|
|
697
|
+
id,
|
|
698
|
+
type: this.services.getEntityName(),
|
|
699
|
+
});
|
|
691
700
|
}
|
|
692
701
|
const contextService = this.services.resolveAuthenticationContextProvider();
|
|
693
702
|
const context = await contextService?.getContext();
|
|
@@ -912,7 +921,10 @@ class EntityUpdateCommand {
|
|
|
912
921
|
}
|
|
913
922
|
const currentEntity = await this.services.resolveRepository().get(id);
|
|
914
923
|
if (currentEntity == null) {
|
|
915
|
-
throw new EntityNotFoundException(
|
|
924
|
+
throw new EntityNotFoundException({
|
|
925
|
+
id,
|
|
926
|
+
type: this.services.getEntityName(),
|
|
927
|
+
});
|
|
916
928
|
}
|
|
917
929
|
const context = await this.getContext();
|
|
918
930
|
if (!context) {
|
|
@@ -40087,6 +40099,14 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
|
|
|
40087
40099
|
type: clientBatch.ResourceType.VCPU,
|
|
40088
40100
|
value: definition.vcpu.toString(),
|
|
40089
40101
|
},
|
|
40102
|
+
...(definition.gpuMemory
|
|
40103
|
+
? [
|
|
40104
|
+
{
|
|
40105
|
+
type: clientBatch.ResourceType.GPU,
|
|
40106
|
+
value: definition.gpuMemory.toString(),
|
|
40107
|
+
},
|
|
40108
|
+
]
|
|
40109
|
+
: []),
|
|
40090
40110
|
],
|
|
40091
40111
|
networkConfiguration: {
|
|
40092
40112
|
assignPublicIp: clientBatch.AssignPublicIp.ENABLED,
|