@ludeo/cloud-common 1.2.94 → 1.2.95-dodofmine

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.
@@ -1,4 +1,4 @@
1
- import { CloudProvider, CloudProviderSettings } from "../../cloud";
1
+ import { CloudProvider } from "../../cloud";
2
2
  import { CloudPoolType } from "../type";
3
3
  import { BasePoolAttributes } from "./attributes";
4
4
  export declare class PoolScaleConfiguration {
@@ -6,7 +6,6 @@ export declare class PoolScaleConfiguration {
6
6
  minSize?: number;
7
7
  }
8
8
  export declare class BaseCloudPoolConfiguration {
9
- providerSettings?: CloudProviderSettings;
10
9
  cloudProvider: CloudProvider;
11
10
  poolId: string;
12
11
  poolScaleConfiguration: PoolScaleConfiguration;
@@ -30,11 +30,6 @@ __decorate([
30
30
  class BaseCloudPoolConfiguration {
31
31
  }
32
32
  exports.BaseCloudPoolConfiguration = BaseCloudPoolConfiguration;
33
- __decorate([
34
- (0, class_validator_1.IsOptional)(),
35
- (0, decorators_1.ValidateNestedType)(cloud_1.getProviderSettingsType),
36
- __metadata("design:type", Object)
37
- ], BaseCloudPoolConfiguration.prototype, "providerSettings", void 0);
38
33
  __decorate([
39
34
  (0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
40
35
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,uCAIqB;AACrB,kCAAwC;AACxC,6CAAkD;AAClD,uDAA4D;AAE5D,MAAa,sBAAsB;CAOlC;AAPD,wDAOC;AALC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACM;AAGnB,MAAa,0BAA0B;CAuBtC;AAvBD,gEAuBC;AApBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,+BAAkB,EAAC,+BAAuB,CAAC;;oEACH;AAGzC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;iEACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;0DACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;0EAAC;AAG/C;IADC,IAAA,wBAAM,EAAC,oBAAa,CAAC;;wDACF;AAGpB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAkB,CAAC;8BACjC,+BAAkB;8DAAC;AAI/B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wEACiB"}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,uCAIqB;AACrB,kCAAwC;AACxC,6CAAkD;AAClD,uDAA4D;AAE5D,MAAa,sBAAsB;CAOlC;AAPD,wDAOC;AALC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAIb;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;uDACM;AAGnB,MAAa,0BAA0B;CAmBtC;AAnBD,gEAmBC;AAjBC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;iEACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;0DACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;0EAAC;AAG/C;IADC,IAAA,wBAAM,EAAC,oBAAa,CAAC;;wDACF;AAGpB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAkB,CAAC;8BACjC,+BAAkB;8DAAC;AAI/B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wEACiB"}
@@ -1,7 +1,9 @@
1
1
  import { CloudPoolType } from "../type";
2
2
  import { GamePoolAttributes } from "./attributes";
3
3
  import { BaseCloudPoolConfiguration } from "./base";
4
- export declare class GamePoolConfiguration extends BaseCloudPoolConfiguration {
4
+ import { CloudProviderSettings } from "../../cloud";
5
+ export declare class GamePoolConfiguration<T extends CloudProviderSettings = CloudProviderSettings> extends BaseCloudPoolConfiguration {
6
+ providerSettings?: T;
5
7
  type: CloudPoolType.GAME;
6
8
  gameId: string;
7
9
  machinePoolId: string;
@@ -15,9 +15,15 @@ const type_1 = require("../type");
15
15
  const attributes_1 = require("./attributes");
16
16
  const base_1 = require("./base");
17
17
  const decorators_1 = require("../../../../decorators");
18
+ const cloud_1 = require("../../cloud");
18
19
  class GamePoolConfiguration extends base_1.BaseCloudPoolConfiguration {
19
20
  }
20
21
  exports.GamePoolConfiguration = GamePoolConfiguration;
22
+ __decorate([
23
+ (0, class_validator_1.IsOptional)(),
24
+ (0, decorators_1.ValidateNestedType)(cloud_1.getProviderSettingsType),
25
+ __metadata("design:type", Object)
26
+ ], GamePoolConfiguration.prototype, "providerSettings", void 0);
21
27
  __decorate([
22
28
  (0, class_validator_1.IsEnum)(type_1.CloudPoolType),
23
29
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"game.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/game.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,kCAAwC;AACxC,6CAAkD;AAClD,iCAAoD;AACpD,uDAA4D;AAE5D,MAAa,qBAAsB,SAAQ,iCAA0B;CAoBpE;AApBD,sDAoBC;AAlBC;IADC,IAAA,wBAAM,EAAC,oBAAa,CAAC;;mDACG;AAGzB;IADC,IAAA,wBAAM,GAAE;;qDACM;AAGf;IADC,IAAA,wBAAM,GAAE;;4DACa;AAGtB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAkB,CAAC;8BACjC,+BAAkB;yDAAC;AAQ/B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEACgB"}
1
+ {"version":3,"file":"game.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/game.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,kCAAwC;AACxC,6CAAkD;AAClD,iCAAoD;AACpD,uDAA4D;AAC5D,uCAA6E;AAE7E,MAAa,qBAEX,SAAQ,iCAA0B;CAwBnC;AA1BD,sDA0BC;AArBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,+BAAkB,EAAC,+BAAuB,CAAC;;+DACvB;AAGrB;IADC,IAAA,wBAAM,EAAC,oBAAa,CAAC;;mDACG;AAGzB;IADC,IAAA,wBAAM,GAAE;;qDACM;AAGf;IADC,IAAA,wBAAM,GAAE;;4DACa;AAGtB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,+BAAkB,CAAC;8BACjC,+BAAkB;yDAAC;AAQ/B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEACgB"}
@@ -1,7 +1,9 @@
1
1
  import { CloudPoolType } from "../type";
2
2
  import { BaseCloudPoolConfiguration } from "./base";
3
3
  import { MachinePoolAttributes } from "./attributes";
4
- export declare class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
4
+ import { CloudProviderSettings } from "../../cloud";
5
+ export declare class MachinePoolConfiguration<T extends CloudProviderSettings = CloudProviderSettings> extends BaseCloudPoolConfiguration {
6
+ providerSettings?: T;
5
7
  type: CloudPoolType.MACHINE;
6
8
  attributes: MachinePoolAttributes;
7
9
  }
@@ -15,9 +15,15 @@ const type_1 = require("../type");
15
15
  const base_1 = require("./base");
16
16
  const attributes_1 = require("./attributes");
17
17
  const decorators_1 = require("../../../../decorators");
18
+ const cloud_1 = require("../../cloud");
18
19
  class MachinePoolConfiguration extends base_1.BaseCloudPoolConfiguration {
19
20
  }
20
21
  exports.MachinePoolConfiguration = MachinePoolConfiguration;
22
+ __decorate([
23
+ (0, class_validator_1.IsOptional)(),
24
+ (0, decorators_1.ValidateNestedType)(cloud_1.getProviderSettingsType),
25
+ __metadata("design:type", Object)
26
+ ], MachinePoolConfiguration.prototype, "providerSettings", void 0);
21
27
  __decorate([
22
28
  (0, class_validator_1.IsEnum)(type_1.CloudPoolType),
23
29
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"machine.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/machine.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,kCAAwC;AACxC,iCAAoD;AACpD,6CAAqD;AACrD,uDAA4D;AAE5D,MAAa,wBAAyB,SAAQ,iCAA0B;CAMvE;AAND,4DAMC;AAJC;IADC,IAAA,wBAAM,EAAC,oBAAa,CAAC;;sDACM;AAG5B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,kCAAqB,CAAC;8BACpC,kCAAqB;4DAAC"}
1
+ {"version":3,"file":"machine.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/machine.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AAErD,kCAAwC;AACxC,iCAAoD;AACpD,6CAAqD;AACrD,uDAA4D;AAC5D,uCAA6E;AAE7E,MAAa,wBAEX,SAAQ,iCAA0B;CAUnC;AAZD,4DAYC;AAPC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,+BAAkB,EAAC,+BAAuB,CAAC;;kEACvB;AAGrB;IADC,IAAA,wBAAM,EAAC,oBAAa,CAAC;;sDACM;AAG5B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,kCAAqB,CAAC;8BACpC,kCAAqB;4DAAC"}
@@ -3,4 +3,5 @@ import { GamePoolConfiguration } from "./game";
3
3
  import { LudeoPoolConfiguration } from "./ludeo";
4
4
  import { BaseCloudPoolConfiguration } from "./base";
5
5
  import { MachinePoolConfiguration } from "./machine";
6
- export type CloudPoolConfigurationType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudPoolConfiguration : T extends CloudPoolType.GAME ? GamePoolConfiguration : T extends CloudPoolType.MACHINE ? MachinePoolConfiguration : T extends CloudPoolType.LUDEO ? LudeoPoolConfiguration : BaseCloudPoolConfiguration;
6
+ import { CloudProviderSettings } from "../../cloud";
7
+ export type CloudPoolConfigurationType<T extends CloudPoolType | undefined = undefined, C extends CloudProviderSettings = CloudProviderSettings> = T extends undefined ? BaseCloudPoolConfiguration : T extends CloudPoolType.GAME ? GamePoolConfiguration<C> : T extends CloudPoolType.MACHINE ? MachinePoolConfiguration<C> : T extends CloudPoolType.LUDEO ? LudeoPoolConfiguration : BaseCloudPoolConfiguration;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.2.94",
3
+ "version": "1.2.95-dodofmine",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -19,10 +19,6 @@ export class PoolScaleConfiguration {
19
19
  }
20
20
 
21
21
  export class BaseCloudPoolConfiguration {
22
- @IsOptional()
23
- @ValidateNestedType(getProviderSettingsType)
24
- providerSettings?: CloudProviderSettings;
25
-
26
22
  @IsEnum(CloudProvider)
27
23
  cloudProvider: CloudProvider;
28
24
 
@@ -4,8 +4,15 @@ import { CloudPoolType } from "../type";
4
4
  import { GamePoolAttributes } from "./attributes";
5
5
  import { BaseCloudPoolConfiguration } from "./base";
6
6
  import { ValidateNestedType } from "../../../../decorators";
7
+ import { CloudProviderSettings, getProviderSettingsType } from "../../cloud";
8
+
9
+ export class GamePoolConfiguration<
10
+ T extends CloudProviderSettings = CloudProviderSettings,
11
+ > extends BaseCloudPoolConfiguration {
12
+ @IsOptional()
13
+ @ValidateNestedType(getProviderSettingsType)
14
+ providerSettings?: T;
7
15
 
8
- export class GamePoolConfiguration extends BaseCloudPoolConfiguration {
9
16
  @IsEnum(CloudPoolType)
10
17
  type: CloudPoolType.GAME;
11
18
 
@@ -1,11 +1,18 @@
1
- import { IsEnum } from "class-validator";
1
+ import { IsEnum, IsOptional } from "class-validator";
2
2
 
3
3
  import { CloudPoolType } from "../type";
4
4
  import { BaseCloudPoolConfiguration } from "./base";
5
5
  import { MachinePoolAttributes } from "./attributes";
6
6
  import { ValidateNestedType } from "../../../../decorators";
7
+ import { CloudProviderSettings, getProviderSettingsType } from "../../cloud";
8
+
9
+ export class MachinePoolConfiguration<
10
+ T extends CloudProviderSettings = CloudProviderSettings,
11
+ > extends BaseCloudPoolConfiguration {
12
+ @IsOptional()
13
+ @ValidateNestedType(getProviderSettingsType)
14
+ providerSettings?: T;
7
15
 
8
- export class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
9
16
  @IsEnum(CloudPoolType)
10
17
  type: CloudPoolType.MACHINE;
11
18
 
@@ -3,15 +3,17 @@ import { GamePoolConfiguration } from "./game";
3
3
  import { LudeoPoolConfiguration } from "./ludeo";
4
4
  import { BaseCloudPoolConfiguration } from "./base";
5
5
  import { MachinePoolConfiguration } from "./machine";
6
+ import { CloudProviderSettings } from "../../cloud";
6
7
 
7
8
  export type CloudPoolConfigurationType<
8
- T extends CloudPoolType | undefined = undefined
9
+ T extends CloudPoolType | undefined = undefined,
10
+ C extends CloudProviderSettings = CloudProviderSettings,
9
11
  > = T extends undefined
10
12
  ? BaseCloudPoolConfiguration
11
13
  : T extends CloudPoolType.GAME
12
- ? GamePoolConfiguration
13
- : T extends CloudPoolType.MACHINE
14
- ? MachinePoolConfiguration
15
- : T extends CloudPoolType.LUDEO
16
- ? LudeoPoolConfiguration
17
- : BaseCloudPoolConfiguration;
14
+ ? GamePoolConfiguration<C>
15
+ : T extends CloudPoolType.MACHINE
16
+ ? MachinePoolConfiguration<C>
17
+ : T extends CloudPoolType.LUDEO
18
+ ? LudeoPoolConfiguration
19
+ : BaseCloudPoolConfiguration;