@punks/backend-entity-manager 0.0.295 → 0.0.297
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 +18 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/manager/index.d.ts +2 -2
- package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/manager/types.d.ts +6 -0
- package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/models/index.d.ts +2 -0
- package/dist/esm/index.js +18 -17
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/manager/index.d.ts +2 -2
- package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/manager/types.d.ts +6 -0
- package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/models/index.d.ts +2 -0
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -40085,32 +40085,36 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
|
|
|
40085
40085
|
await this.client().send(new clientBatch.RegisterJobDefinitionCommand({
|
|
40086
40086
|
jobDefinitionName: jobName,
|
|
40087
40087
|
type: clientBatch.JobDefinitionType.Container,
|
|
40088
|
-
platformCapabilities:
|
|
40088
|
+
platformCapabilities: definition.infrastructureParams.computePlatformType === "ec2"
|
|
40089
|
+
? [clientBatch.PlatformCapability.EC2]
|
|
40090
|
+
: [clientBatch.PlatformCapability.FARGATE],
|
|
40089
40091
|
containerProperties: {
|
|
40090
|
-
command: definition.
|
|
40091
|
-
image: definition.
|
|
40092
|
+
command: definition.invocationParams.startCommand,
|
|
40093
|
+
image: definition.infrastructureParams.dockerImage,
|
|
40092
40094
|
executionRoleArn: this.awsSettings.batchExecutionRole,
|
|
40093
40095
|
resourceRequirements: [
|
|
40094
40096
|
{
|
|
40095
40097
|
type: clientBatch.ResourceType.MEMORY,
|
|
40096
|
-
value: definition.memory.toString(),
|
|
40098
|
+
value: definition.infrastructureParams.memory.toString(),
|
|
40097
40099
|
},
|
|
40098
40100
|
{
|
|
40099
40101
|
type: clientBatch.ResourceType.VCPU,
|
|
40100
|
-
value: definition.vcpu.toString(),
|
|
40102
|
+
value: definition.infrastructureParams.vcpu.toString(),
|
|
40101
40103
|
},
|
|
40102
|
-
...(definition.gpuMemory
|
|
40104
|
+
...(definition.infrastructureParams.gpuMemory
|
|
40103
40105
|
? [
|
|
40104
40106
|
{
|
|
40105
40107
|
type: clientBatch.ResourceType.GPU,
|
|
40106
|
-
value: definition.gpuMemory.toString(),
|
|
40108
|
+
value: definition.infrastructureParams.gpuMemory.toString(),
|
|
40107
40109
|
},
|
|
40108
40110
|
]
|
|
40109
40111
|
: []),
|
|
40110
40112
|
],
|
|
40111
|
-
networkConfiguration:
|
|
40112
|
-
|
|
40113
|
-
|
|
40113
|
+
networkConfiguration: definition.infrastructureParams.computePlatformType !== "ec2"
|
|
40114
|
+
? {
|
|
40115
|
+
assignPublicIp: clientBatch.AssignPublicIp.ENABLED,
|
|
40116
|
+
}
|
|
40117
|
+
: undefined,
|
|
40114
40118
|
},
|
|
40115
40119
|
}));
|
|
40116
40120
|
}
|
|
@@ -40209,15 +40213,12 @@ let AwsJobsProvider = class AwsJobsProvider {
|
|
|
40209
40213
|
}
|
|
40210
40214
|
async upsertJobDefinition(input) {
|
|
40211
40215
|
const { definition } = input;
|
|
40212
|
-
const
|
|
40213
|
-
const
|
|
40216
|
+
const infrastructureParams = definition.infrastructureParams;
|
|
40217
|
+
const invocationParams = definition.invocationParams;
|
|
40214
40218
|
await this.awsBatchService.ensureJobDefinition({
|
|
40215
|
-
image: awsInfraParams.dockerImage,
|
|
40216
40219
|
jobUid: definition.uid,
|
|
40217
|
-
|
|
40218
|
-
|
|
40219
|
-
vcpu: awsInfraParams.vcpu,
|
|
40220
|
-
defaultCommand: awsInvocationParams.startCommand,
|
|
40220
|
+
infrastructureParams,
|
|
40221
|
+
invocationParams,
|
|
40221
40222
|
});
|
|
40222
40223
|
}
|
|
40223
40224
|
async getJobStatus(input) {
|