From a3b0716b5e571b9cbdb2bd3cfb752762b4fb331e Mon Sep 17 00:00:00 2001 From: CorneliaRadu Date: Mon, 30 Sep 2024 13:22:33 +0300 Subject: [PATCH 1/4] update-resources-type --- src/model/Subscription.ts | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/model/Subscription.ts b/src/model/Subscription.ts index 973b249..884f432 100644 --- a/src/model/Subscription.ts +++ b/src/model/Subscription.ts @@ -219,9 +219,19 @@ export default class Subscription extends Ressource { green?: boolean; resources?: { - container_profiles: boolean; - production: {}; - development: {}; + container_profiles?: boolean, + production?: { + legacy_development: boolean, + max_cpu: number, + max_memory: number, + max_environments: number + }, + development?: { + legacy_development: true, + max_cpu: number, + max_memory: number, + max_environments: number + } }; resources_limit?: | { @@ -289,8 +299,9 @@ export default class Subscription extends Ressource { }; this.resources = subscription.resources ?? { container_profiles: false, - production: {}, - development: {} + development: { + max_environments: 1 + } }; this.resources_limit = subscription.resources_limit ?? { limit: {}, From 42cba8bc7b0e61bcd2ea2f56f20afdb805e31661 Mon Sep 17 00:00:00 2001 From: CorneliaRadu Date: Mon, 30 Sep 2024 17:14:49 +0300 Subject: [PATCH 2/4] lint fixes --- src/model/Subscription.ts | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/model/Subscription.ts b/src/model/Subscription.ts index 884f432..cdd08c2 100644 --- a/src/model/Subscription.ts +++ b/src/model/Subscription.ts @@ -219,20 +219,21 @@ export default class Subscription extends Ressource { green?: boolean; resources?: { - container_profiles?: boolean, + container_profiles?: boolean; production?: { - legacy_development: boolean, - max_cpu: number, - max_memory: number, - max_environments: number - }, + legacy_development: boolean; + max_cpu: number; + max_memory: number; + max_environments: number; + }; development?: { - legacy_development: true, - max_cpu: number, - max_memory: number, - max_environments: number - } + legacy_development: true; + max_cpu: number; + max_memory: number; + max_environments: number; + }; }; + resources_limit?: | { limit: ResourceType; @@ -300,7 +301,7 @@ export default class Subscription extends Ressource { this.resources = subscription.resources ?? { container_profiles: false, development: { - max_environments: 1 + max_environments: 1 } }; this.resources_limit = subscription.resources_limit ?? { From 0fa11bcceed6706658526c4716658f6dcb3bc4fa Mon Sep 17 00:00:00 2001 From: CorneliaRadu Date: Mon, 30 Sep 2024 18:42:00 +0300 Subject: [PATCH 3/4] update-data-types --- src/model/Subscription.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/Subscription.ts b/src/model/Subscription.ts index cdd08c2..6e591ea 100644 --- a/src/model/Subscription.ts +++ b/src/model/Subscription.ts @@ -227,9 +227,9 @@ export default class Subscription extends Ressource { max_environments: number; }; development?: { - legacy_development: true; - max_cpu: number; - max_memory: number; + legacy_development?: boolean; + max_cpu?: number; + max_memory?: number; max_environments: number; }; }; @@ -298,7 +298,7 @@ export default class Subscription extends Ressource { }, initialize: {} }; - this.resources = subscription.resources ?? { + this.resources = { container_profiles: false, development: { max_environments: 1 From ae25fb434b529e123d2c72c608da5c1692814fa8 Mon Sep 17 00:00:00 2001 From: CorneliaRadu Date: Tue, 1 Oct 2024 13:20:32 +0300 Subject: [PATCH 4/4] type-resources-wip --- src/model/Subscription.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/Subscription.ts b/src/model/Subscription.ts index 6e591ea..c2f072d 100644 --- a/src/model/Subscription.ts +++ b/src/model/Subscription.ts @@ -298,7 +298,7 @@ export default class Subscription extends Ressource { }, initialize: {} }; - this.resources = { + this.resources = subscription.resources && { container_profiles: false, development: { max_environments: 1