@punks/backend-entity-manager 0.0.472 → 0.0.474
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 +36 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/platforms/nest/extensions/jobs/abstractions/runner.d.ts +2 -0
- package/dist/cjs/types/platforms/nest/extensions/jobs/commands/job-dispatch/command.d.ts +2 -0
- package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/manager/converters.d.ts +4 -0
- package/dist/cjs/types/platforms/nest/plugins/jobs/aws-batch/manager/types.d.ts +2 -0
- package/dist/esm/index.js +36 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/platforms/nest/extensions/jobs/abstractions/runner.d.ts +2 -0
- package/dist/esm/types/platforms/nest/extensions/jobs/commands/job-dispatch/command.d.ts +2 -0
- package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/manager/converters.d.ts +4 -0
- package/dist/esm/types/platforms/nest/plugins/jobs/aws-batch/manager/types.d.ts +2 -0
- package/dist/index.d.ts +25 -22
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BatchJobVariables } from "../../../plugins/jobs/aws-batch/manager/types";
|
|
1
2
|
import { JobDefinition, JobSchedule } from "./definition";
|
|
2
3
|
export interface JobDispatchInput {
|
|
3
4
|
definition: JobDefinition<unknown, unknown>;
|
|
@@ -5,6 +6,7 @@ export interface JobDispatchInput {
|
|
|
5
6
|
instanceId: string;
|
|
6
7
|
payload?: unknown;
|
|
7
8
|
commandPlaceholders?: Record<string, string>;
|
|
9
|
+
variables?: BatchJobVariables;
|
|
8
10
|
}
|
|
9
11
|
export declare enum JobProviderState {
|
|
10
12
|
Initializing = "initializing",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BatchJobVariables } from "../../../../plugins/jobs/aws-batch/manager/types";
|
|
1
2
|
import { JobDefinition, JobRunType, JobSchedule } from "../../abstractions";
|
|
2
3
|
export interface JobDispatchCommandInput {
|
|
3
4
|
job: JobDefinition<unknown, unknown>;
|
|
@@ -5,6 +6,7 @@ export interface JobDispatchCommandInput {
|
|
|
5
6
|
runType: JobRunType;
|
|
6
7
|
payload?: unknown;
|
|
7
8
|
commandPlaceholders?: Record<string, string>;
|
|
9
|
+
variables?: BatchJobVariables;
|
|
8
10
|
}
|
|
9
11
|
export declare class JobDispatchCommand {
|
|
10
12
|
readonly input: JobDispatchCommandInput;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { KeyValuePair } from "@aws-sdk/client-batch";
|
|
2
|
+
import { BatchJobVariables } from "./types";
|
|
3
|
+
export declare const replaceVariable: (environmentValue: KeyValuePair, variables: BatchJobVariables) => KeyValuePair;
|
|
4
|
+
export declare const replaceVariables: (environment: KeyValuePair[], variables: BatchJobVariables) => KeyValuePair[];
|
|
@@ -11,10 +11,12 @@ export type BatchJobOverrides = {
|
|
|
11
11
|
command?: string[];
|
|
12
12
|
batchComputeEnvironment?: string;
|
|
13
13
|
};
|
|
14
|
+
export type BatchJobVariables = Record<string, string>;
|
|
14
15
|
export type SubmitBatchJobInput = {
|
|
15
16
|
overrides?: BatchJobOverrides;
|
|
16
17
|
jobUid: string;
|
|
17
18
|
instanceId: string;
|
|
19
|
+
variables?: BatchJobVariables;
|
|
18
20
|
};
|
|
19
21
|
export type GetBatchJobStatusInput = {
|
|
20
22
|
jobUid: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2802,12 +2802,37 @@ declare class JobsScheduler {
|
|
|
2802
2802
|
private get jobsSettings();
|
|
2803
2803
|
}
|
|
2804
2804
|
|
|
2805
|
+
type AwsJobComputePlatformType = "ec2" | "fargate";
|
|
2806
|
+
type AwsJobEnvironmentVariable = {
|
|
2807
|
+
name: string;
|
|
2808
|
+
value: string;
|
|
2809
|
+
};
|
|
2810
|
+
type AwsBatchInfrastructureParams = {
|
|
2811
|
+
vcpu: number;
|
|
2812
|
+
memory: number;
|
|
2813
|
+
gpu?: number;
|
|
2814
|
+
dockerImage: string;
|
|
2815
|
+
environmentVariables?: AwsJobEnvironmentVariable[];
|
|
2816
|
+
computePlatformType?: AwsJobComputePlatformType;
|
|
2817
|
+
assignPublicIp?: boolean;
|
|
2818
|
+
logGroupName?: string;
|
|
2819
|
+
privileged?: boolean;
|
|
2820
|
+
batchComputeEnvironment?: string;
|
|
2821
|
+
};
|
|
2822
|
+
type AwsBatchInvocationParams = {
|
|
2823
|
+
startCommand: string[];
|
|
2824
|
+
};
|
|
2825
|
+
type AwsJobDefinition = JobDefinition<AwsBatchInfrastructureParams, AwsBatchInvocationParams>;
|
|
2826
|
+
|
|
2827
|
+
type BatchJobVariables = Record<string, string>;
|
|
2828
|
+
|
|
2805
2829
|
interface JobDispatchInput {
|
|
2806
2830
|
definition: JobDefinition<unknown, unknown>;
|
|
2807
2831
|
schedule?: JobSchedule<unknown>;
|
|
2808
2832
|
instanceId: string;
|
|
2809
2833
|
payload?: unknown;
|
|
2810
2834
|
commandPlaceholders?: Record<string, string>;
|
|
2835
|
+
variables?: BatchJobVariables;
|
|
2811
2836
|
}
|
|
2812
2837
|
declare enum JobProviderState {
|
|
2813
2838
|
Initializing = "initializing",
|
|
@@ -3651,28 +3676,6 @@ declare class InMemoryEmailProvider implements IEmailProvider<void> {
|
|
|
3651
3676
|
getSentEmails(): SentEmail[];
|
|
3652
3677
|
}
|
|
3653
3678
|
|
|
3654
|
-
type AwsJobComputePlatformType = "ec2" | "fargate";
|
|
3655
|
-
type AwsJobEnvironmentVariable = {
|
|
3656
|
-
name: string;
|
|
3657
|
-
value: string;
|
|
3658
|
-
};
|
|
3659
|
-
type AwsBatchInfrastructureParams = {
|
|
3660
|
-
vcpu: number;
|
|
3661
|
-
memory: number;
|
|
3662
|
-
gpu?: number;
|
|
3663
|
-
dockerImage: string;
|
|
3664
|
-
environmentVariables?: AwsJobEnvironmentVariable[];
|
|
3665
|
-
computePlatformType?: AwsJobComputePlatformType;
|
|
3666
|
-
assignPublicIp?: boolean;
|
|
3667
|
-
logGroupName?: string;
|
|
3668
|
-
privileged?: boolean;
|
|
3669
|
-
batchComputeEnvironment?: string;
|
|
3670
|
-
};
|
|
3671
|
-
type AwsBatchInvocationParams = {
|
|
3672
|
-
startCommand: string[];
|
|
3673
|
-
};
|
|
3674
|
-
type AwsJobDefinition = JobDefinition<AwsBatchInfrastructureParams, AwsBatchInvocationParams>;
|
|
3675
|
-
|
|
3676
3679
|
type AwsBatchSettings = {
|
|
3677
3680
|
awsAccessKeyId?: string;
|
|
3678
3681
|
awsSecretAccessKey?: string;
|