@ludeo/cloud-common 1.1.70 → 1.1.72
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/tsconfig.tsbuildinfo +1 -1
- package/dist/v2/types/pools.d.ts +1 -0
- package/dist/v2/types/pools.js +1 -0
- package/dist/v2/types/pools.js.map +1 -1
- package/dist/v3/types/pools/configuration/base.d.ts +12 -0
- package/dist/v3/types/pools/configuration/base.js +48 -0
- package/dist/v3/types/pools/configuration/base.js.map +1 -0
- package/dist/v3/types/pools/configuration/game.d.ts +7 -0
- package/dist/v3/types/pools/configuration/game.js +31 -0
- package/dist/v3/types/pools/configuration/game.js.map +1 -0
- package/dist/v3/types/pools/configuration/index.d.ts +4 -0
- package/dist/v3/types/pools/configuration/index.js +21 -0
- package/dist/v3/types/pools/configuration/index.js.map +1 -0
- package/dist/v3/types/pools/configuration/machine.d.ts +5 -0
- package/dist/v3/types/pools/configuration/machine.js +23 -0
- package/dist/v3/types/pools/configuration/machine.js.map +1 -0
- package/dist/v3/types/pools/configuration/type.d.ts +5 -0
- package/dist/v3/types/pools/configuration/type.js +3 -0
- package/dist/v3/types/pools/configuration/type.js.map +1 -0
- package/dist/v3/types/pools/index.d.ts +5 -0
- package/dist/v3/types/pools/index.js +22 -0
- package/dist/v3/types/pools/index.js.map +1 -0
- package/dist/v3/types/pools/pool.d.ts +13 -0
- package/dist/v3/types/pools/pool.js +7 -0
- package/dist/v3/types/pools/pool.js.map +1 -0
- package/dist/v3/types/pools/resource/base.d.ts +9 -0
- package/dist/v3/types/pools/resource/base.js +41 -0
- package/dist/v3/types/pools/resource/base.js.map +1 -0
- package/dist/v3/types/pools/resource/game.d.ts +4 -0
- package/dist/v3/types/pools/resource/game.js +23 -0
- package/dist/v3/types/pools/resource/game.js.map +1 -0
- package/dist/v3/types/pools/resource/index.d.ts +6 -0
- package/dist/v3/types/pools/resource/index.js +23 -0
- package/dist/v3/types/pools/resource/index.js.map +1 -0
- package/dist/v3/types/pools/resource/machine.d.ts +3 -0
- package/dist/v3/types/pools/resource/machine.js +8 -0
- package/dist/v3/types/pools/resource/machine.js.map +1 -0
- package/dist/v3/types/pools/resource/status.d.ts +10 -0
- package/dist/v3/types/pools/resource/status.js +15 -0
- package/dist/v3/types/pools/resource/status.js.map +1 -0
- package/dist/v3/types/pools/resource/statusMap.d.ts +2 -0
- package/dist/v3/types/pools/resource/statusMap.js +3 -0
- package/dist/v3/types/pools/resource/statusMap.js.map +1 -0
- package/dist/v3/types/pools/resource/type.d.ts +5 -0
- package/dist/v3/types/pools/resource/type.js +3 -0
- package/dist/v3/types/pools/resource/type.js.map +1 -0
- package/dist/v3/types/pools/status.d.ts +6 -0
- package/dist/v3/types/pools/status.js +11 -0
- package/dist/v3/types/pools/status.js.map +1 -0
- package/dist/v3/types/pools/type.d.ts +4 -0
- package/dist/v3/types/pools/type.js +9 -0
- package/dist/v3/types/pools/type.js.map +1 -0
- package/package.json +1 -1
- package/src/v2/types/pools.ts +1 -0
- package/src/v3/types/pools/configuration/base.ts +32 -0
- package/src/v3/types/pools/configuration/game.ts +15 -0
- package/src/v3/types/pools/configuration/index.ts +4 -0
- package/src/v3/types/pools/configuration/machine.ts +9 -0
- package/src/v3/types/pools/configuration/type.ts +14 -0
- package/src/v3/types/pools/index.ts +5 -0
- package/src/v3/types/pools/pool.ts +15 -0
- package/src/v3/types/pools/resource/base.ts +23 -0
- package/src/v3/types/pools/resource/game.ts +9 -0
- package/src/v3/types/pools/resource/index.ts +6 -0
- package/src/v3/types/pools/resource/machine.ts +3 -0
- package/src/v3/types/pools/resource/status.ts +10 -0
- package/src/v3/types/pools/resource/statusMap.ts +3 -0
- package/src/v3/types/pools/resource/type.ts +13 -0
- package/src/v3/types/pools/status.ts +6 -0
- package/src/v3/types/pools/type.ts +4 -0
- package/src/v3/types/pools.ts +0 -130
package/dist/v2/types/pools.d.ts
CHANGED
package/dist/v2/types/pools.js
CHANGED
|
@@ -27,6 +27,7 @@ var CloudResourceStatus;
|
|
|
27
27
|
var CloudPoolStatus;
|
|
28
28
|
(function (CloudPoolStatus) {
|
|
29
29
|
CloudPoolStatus["Active"] = "active";
|
|
30
|
+
CloudPoolStatus["Created"] = "created";
|
|
30
31
|
CloudPoolStatus["Scaling"] = "scaling";
|
|
31
32
|
CloudPoolStatus["Terminated"] = "terminated";
|
|
32
33
|
})(CloudPoolStatus || (exports.CloudPoolStatus = CloudPoolStatus = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v2/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,mCAIiB;AACjB,iDAAsD;AAEtD,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gDAAyB,CAAA;IACzB,kDAA2B,CAAA;AAC7B,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"pools.js","sourceRoot":"","sources":["../../../src/v2/types/pools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,mCAIiB;AACjB,iDAAsD;AAEtD,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,gDAAyB,CAAA;IACzB,kDAA2B,CAAA;AAC7B,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;AAC3B,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,MAAa,sBAAsB;CAGlC;AAHD,wDAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAGf,MAAa,sBAAsB;CAelC;AAfD,wDAeC;AAXC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;6DACO;AAG7B;IADC,IAAA,wBAAM,GAAE;;sDACM;AAGf;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACzB,sBAAsB;sEAAC;AAI/C;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;sDACO;AAYlB,MAAa,SAAS;CAOrB;AAPD,8BAOC;AAED,MAAa,aAAa;CAMzB;AAND,sCAMC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CloudPoolType } from "..";
|
|
2
|
+
import { CloudProvider, CloudProviderSettings } from "../../cloud";
|
|
3
|
+
export declare class PoolScaleConfiguration {
|
|
4
|
+
size: number;
|
|
5
|
+
}
|
|
6
|
+
export declare class BaseCloudPoolConfiguration {
|
|
7
|
+
providerSettings?: CloudProviderSettings;
|
|
8
|
+
cloudProvider: CloudProvider;
|
|
9
|
+
poolId: string;
|
|
10
|
+
poolScaleConfiguration: PoolScaleConfiguration;
|
|
11
|
+
type: CloudPoolType;
|
|
12
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseCloudPoolConfiguration = exports.PoolScaleConfiguration = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const decorators_1 = require("../../../../decorators");
|
|
16
|
+
const cloud_1 = require("../../cloud");
|
|
17
|
+
class PoolScaleConfiguration {
|
|
18
|
+
}
|
|
19
|
+
exports.PoolScaleConfiguration = PoolScaleConfiguration;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsNumber)(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], PoolScaleConfiguration.prototype, "size", void 0);
|
|
24
|
+
class BaseCloudPoolConfiguration {
|
|
25
|
+
}
|
|
26
|
+
exports.BaseCloudPoolConfiguration = BaseCloudPoolConfiguration;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, decorators_1.ValidateNestedType)(() => cloud_1.AWSProviderSettings),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], BaseCloudPoolConfiguration.prototype, "providerSettings", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsEnum)(cloud_1.CloudProvider),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], BaseCloudPoolConfiguration.prototype, "cloudProvider", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsUUID)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], BaseCloudPoolConfiguration.prototype, "poolId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, decorators_1.ValidateNestedType)(() => PoolScaleConfiguration),
|
|
42
|
+
__metadata("design:type", PoolScaleConfiguration)
|
|
43
|
+
], BaseCloudPoolConfiguration.prototype, "poolScaleConfiguration", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsEnum)(__1.CloudPoolType),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], BaseCloudPoolConfiguration.prototype, "type", void 0);
|
|
48
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/configuration/base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,0BAAmC;AACnC,uDAA4D;AAC5D,uCAIqB;AAErB,MAAa,sBAAsB;CAGlC;AAHD,wDAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;oDACE;AAGf,MAAa,0BAA0B;CAgBtC;AAhBD,gEAgBC;AAbC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;oEACL;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,iBAAa,CAAC;;wDACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GamePoolConfiguration = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const base_1 = require("./base");
|
|
16
|
+
class GamePoolConfiguration extends base_1.BaseCloudPoolConfiguration {
|
|
17
|
+
}
|
|
18
|
+
exports.GamePoolConfiguration = GamePoolConfiguration;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsEnum)(__1.CloudPoolType),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], GamePoolConfiguration.prototype, "type", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsUUID)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], GamePoolConfiguration.prototype, "gameId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsUUID)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], GamePoolConfiguration.prototype, "machinePoolId", void 0);
|
|
31
|
+
//# sourceMappingURL=game.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/configuration/game.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,0BAAmC;AACnC,iCAAoD;AAEpD,MAAa,qBAAsB,SAAQ,iCAA0B;CASpE;AATD,sDASC;AAPC;IADC,IAAA,wBAAM,EAAC,iBAAa,CAAC;;mDACG;AAGzB;IADC,IAAA,wBAAM,GAAE;;qDACM;AAGf;IADC,IAAA,wBAAM,GAAE;;4DACa"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base"), exports);
|
|
18
|
+
__exportStar(require("./game"), exports);
|
|
19
|
+
__exportStar(require("./machine"), exports);
|
|
20
|
+
__exportStar(require("./type"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,yCAAuB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MachinePoolConfiguration = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const __1 = require("..");
|
|
15
|
+
const base_1 = require("./base");
|
|
16
|
+
class MachinePoolConfiguration extends base_1.BaseCloudPoolConfiguration {
|
|
17
|
+
}
|
|
18
|
+
exports.MachinePoolConfiguration = MachinePoolConfiguration;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsEnum)(__1.CloudPoolType),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], MachinePoolConfiguration.prototype, "type", void 0);
|
|
23
|
+
//# sourceMappingURL=machine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/configuration/machine.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,0BAAmC;AACnC,iCAAoD;AAEpD,MAAa,wBAAyB,SAAQ,iCAA0B;CAGvE;AAHD,4DAGC;AADC;IADC,IAAA,wBAAM,EAAC,iBAAa,CAAC;;sDACM"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CloudPoolType } from "..";
|
|
2
|
+
import { GamePoolConfiguration } from "./game";
|
|
3
|
+
import { BaseCloudPoolConfiguration } from "./base";
|
|
4
|
+
import { MachinePoolConfiguration } from "./machine";
|
|
5
|
+
export type CloudPoolConfigurationType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudPoolConfiguration : T extends CloudPoolType.GAME ? GamePoolConfiguration : T extends CloudPoolType.MACHINE ? MachinePoolConfiguration : BaseCloudPoolConfiguration;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/configuration/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./status"), exports);
|
|
18
|
+
__exportStar(require("./configuration"), exports);
|
|
19
|
+
__exportStar(require("./type"), exports);
|
|
20
|
+
__exportStar(require("./resource"), exports);
|
|
21
|
+
__exportStar(require("./pool"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/v3/types/pools/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,kDAAgC;AAChC,yCAAuB;AACvB,6CAA2B;AAC3B,yCAAuB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CloudPoolType } from "./type";
|
|
2
|
+
import { CloudPoolStatus } from "./status";
|
|
3
|
+
import { CloudPoolConfigurationType } from "./configuration";
|
|
4
|
+
import { BaseCloudResource, CloudResourceType } from "./resource";
|
|
5
|
+
export type CloudResourcesMap<T extends BaseCloudResource> = Record<string, T>;
|
|
6
|
+
export declare class CloudPool<T extends CloudPoolType | undefined = undefined> {
|
|
7
|
+
id: string;
|
|
8
|
+
status: CloudPoolStatus;
|
|
9
|
+
createdAt: number;
|
|
10
|
+
updatedAt?: number;
|
|
11
|
+
config: CloudPoolConfigurationType<T>;
|
|
12
|
+
resources?: CloudResourcesMap<CloudResourceType<T>>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../../../../src/v3/types/pools/pool.ts"],"names":[],"mappings":";;;AAOA,MAAa,SAAS;CAOrB;AAPD,8BAOC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CloudResourceStatus } from "./status";
|
|
2
|
+
import { AWSResourceProviderSettings } from "../../cloud";
|
|
3
|
+
export declare class BaseCloudResource {
|
|
4
|
+
id: string;
|
|
5
|
+
status: CloudResourceStatus;
|
|
6
|
+
createdAt: number;
|
|
7
|
+
updatedAt?: number;
|
|
8
|
+
settings?: AWSResourceProviderSettings;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BaseCloudResource = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const status_1 = require("./status");
|
|
15
|
+
const cloud_1 = require("../../cloud");
|
|
16
|
+
const decorators_1 = require("../../../../decorators");
|
|
17
|
+
class BaseCloudResource {
|
|
18
|
+
}
|
|
19
|
+
exports.BaseCloudResource = BaseCloudResource;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], BaseCloudResource.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsEnum)(status_1.CloudResourceStatus),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], BaseCloudResource.prototype, "status", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsNumber)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], BaseCloudResource.prototype, "createdAt", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsNumber)(),
|
|
34
|
+
(0, class_validator_1.IsOptional)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], BaseCloudResource.prototype, "updatedAt", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, decorators_1.ValidateNestedType)(() => cloud_1.AWSResourceProviderSettings),
|
|
39
|
+
__metadata("design:type", cloud_1.AWSResourceProviderSettings)
|
|
40
|
+
], BaseCloudResource.prototype, "settings", void 0);
|
|
41
|
+
//# sourceMappingURL=base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/base.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AAEvE,qCAA+C;AAC/C,uCAA0D;AAC1D,uDAA4D;AAE5D,MAAa,iBAAiB;CAgB7B;AAhBD,8CAgBC;AAdC;IADC,IAAA,wBAAM,GAAE;;6CACE;AAGX;IADC,IAAA,wBAAM,EAAC,4BAAmB,CAAC;;iDACA;AAG5B;IADC,IAAA,0BAAQ,GAAE;;oDACO;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oDACM;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,mCAA2B,CAAC;8BAC3C,mCAA2B;mDAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GameCloudResource = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const base_1 = require("./base");
|
|
15
|
+
class GameCloudResource extends base_1.BaseCloudResource {
|
|
16
|
+
}
|
|
17
|
+
exports.GameCloudResource = GameCloudResource;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], GameCloudResource.prototype, "machineResourceId", void 0);
|
|
23
|
+
//# sourceMappingURL=game.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"game.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/game.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,iCAA2C;AAE3C,MAAa,iBAAkB,SAAQ,wBAAiB;CAIvD;AAJD,8CAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4DACc"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./base"), exports);
|
|
18
|
+
__exportStar(require("./game"), exports);
|
|
19
|
+
__exportStar(require("./machine"), exports);
|
|
20
|
+
__exportStar(require("./status"), exports);
|
|
21
|
+
__exportStar(require("./statusMap"), exports);
|
|
22
|
+
__exportStar(require("./type"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,yCAAuB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MachineCloudResource = void 0;
|
|
4
|
+
const base_1 = require("./base");
|
|
5
|
+
class MachineCloudResource extends base_1.BaseCloudResource {
|
|
6
|
+
}
|
|
7
|
+
exports.MachineCloudResource = MachineCloudResource;
|
|
8
|
+
//# sourceMappingURL=machine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"machine.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/machine.ts"],"names":[],"mappings":";;;AAAA,iCAA2C;AAE3C,MAAa,oBAAqB,SAAQ,wBAAiB;CAAG;AAA9D,oDAA8D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudResourceStatus = void 0;
|
|
4
|
+
var CloudResourceStatus;
|
|
5
|
+
(function (CloudResourceStatus) {
|
|
6
|
+
CloudResourceStatus["Allocated"] = "allocated";
|
|
7
|
+
CloudResourceStatus["Available"] = "available";
|
|
8
|
+
CloudResourceStatus["Creating"] = "creating";
|
|
9
|
+
CloudResourceStatus["Created"] = "created";
|
|
10
|
+
CloudResourceStatus["Allocating"] = "allocating";
|
|
11
|
+
CloudResourceStatus["Error"] = "error";
|
|
12
|
+
CloudResourceStatus["Terminating"] = "terminating";
|
|
13
|
+
CloudResourceStatus["Terminated"] = "terminated";
|
|
14
|
+
})(CloudResourceStatus || (exports.CloudResourceStatus = CloudResourceStatus = {}));
|
|
15
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/status.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,gDAAyB,CAAA;IACzB,sCAAe,CAAA;IACf,kDAA2B,CAAA;IAC3B,gDAAyB,CAAA;AAC3B,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusMap.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/statusMap.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CloudPoolType } from "../type";
|
|
2
|
+
import { BaseCloudResource } from "./base";
|
|
3
|
+
import { GameCloudResource } from "./game";
|
|
4
|
+
import { MachineCloudResource } from "./machine";
|
|
5
|
+
export type CloudResourceType<T extends CloudPoolType | undefined = undefined> = T extends undefined ? BaseCloudResource : T extends CloudPoolType.GAME ? GameCloudResource : T extends CloudPoolType.MACHINE ? MachineCloudResource : BaseCloudResource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../../src/v3/types/pools/resource/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudPoolStatus = void 0;
|
|
4
|
+
var CloudPoolStatus;
|
|
5
|
+
(function (CloudPoolStatus) {
|
|
6
|
+
CloudPoolStatus["Active"] = "active";
|
|
7
|
+
CloudPoolStatus["Created"] = "created";
|
|
8
|
+
CloudPoolStatus["Scaling"] = "scaling";
|
|
9
|
+
CloudPoolStatus["Terminated"] = "terminated";
|
|
10
|
+
})(CloudPoolStatus || (exports.CloudPoolStatus = CloudPoolStatus = {}));
|
|
11
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../../src/v3/types/pools/status.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,4CAAyB,CAAA;AAC3B,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CloudPoolType = void 0;
|
|
4
|
+
var CloudPoolType;
|
|
5
|
+
(function (CloudPoolType) {
|
|
6
|
+
CloudPoolType["GAME"] = "game";
|
|
7
|
+
CloudPoolType["MACHINE"] = "machine";
|
|
8
|
+
})(CloudPoolType || (exports.CloudPoolType = CloudPoolType = {}));
|
|
9
|
+
//# sourceMappingURL=type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../src/v3/types/pools/type.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,oCAAmB,CAAA;AACrB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB"}
|
package/package.json
CHANGED
package/src/v2/types/pools.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IsNumber, IsEnum, IsUUID, IsOptional } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudPoolType } from "..";
|
|
4
|
+
import { ValidateNestedType } from "../../../../decorators";
|
|
5
|
+
import {
|
|
6
|
+
AWSProviderSettings,
|
|
7
|
+
CloudProvider,
|
|
8
|
+
CloudProviderSettings,
|
|
9
|
+
} from "../../cloud";
|
|
10
|
+
|
|
11
|
+
export class PoolScaleConfiguration {
|
|
12
|
+
@IsNumber()
|
|
13
|
+
size: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class BaseCloudPoolConfiguration {
|
|
17
|
+
@IsOptional()
|
|
18
|
+
@ValidateNestedType(() => AWSProviderSettings)
|
|
19
|
+
providerSettings?: CloudProviderSettings;
|
|
20
|
+
|
|
21
|
+
@IsEnum(CloudProvider)
|
|
22
|
+
cloudProvider: CloudProvider;
|
|
23
|
+
|
|
24
|
+
@IsUUID()
|
|
25
|
+
poolId: string;
|
|
26
|
+
|
|
27
|
+
@ValidateNestedType(() => PoolScaleConfiguration)
|
|
28
|
+
poolScaleConfiguration: PoolScaleConfiguration;
|
|
29
|
+
|
|
30
|
+
@IsEnum(CloudPoolType)
|
|
31
|
+
type: CloudPoolType;
|
|
32
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IsEnum, IsUUID } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudPoolType } from "..";
|
|
4
|
+
import { BaseCloudPoolConfiguration } from "./base";
|
|
5
|
+
|
|
6
|
+
export class GamePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
7
|
+
@IsEnum(CloudPoolType)
|
|
8
|
+
type: CloudPoolType.GAME;
|
|
9
|
+
|
|
10
|
+
@IsUUID()
|
|
11
|
+
gameId: string;
|
|
12
|
+
|
|
13
|
+
@IsUUID()
|
|
14
|
+
machinePoolId: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IsEnum } from "class-validator";
|
|
2
|
+
|
|
3
|
+
import { CloudPoolType } from "..";
|
|
4
|
+
import { BaseCloudPoolConfiguration } from "./base";
|
|
5
|
+
|
|
6
|
+
export class MachinePoolConfiguration extends BaseCloudPoolConfiguration {
|
|
7
|
+
@IsEnum(CloudPoolType)
|
|
8
|
+
type: CloudPoolType.MACHINE;
|
|
9
|
+
}
|