From 89a2a06e8060663c7969d7776db833a2aae6dbe7 Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Sun, 25 Sep 2022 03:34:39 +0100 Subject: [PATCH 1/3] fix: do not commit on changeset --- .changeset/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/config.json b/.changeset/config.json index 1ab7dae2..c1463cbd 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,7 +1,7 @@ { "$schema": "https://unpkg.com/@changesets/config@2.1.1/schema.json", "changelog": "@changesets/cli/changelog", - "commit": true, + "commit": false, "fixed": [], "linked": [], "access": "restricted", From 387068347d5db3add6d768062bb4bfc3a56327ff Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Sun, 25 Sep 2022 03:39:32 +0100 Subject: [PATCH 2/3] feat: implement updating a deployment --- src/rest/types/ignite.ts | 6 ++++++ src/sdks/ignite.ts | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/rest/types/ignite.ts b/src/rest/types/ignite.ts index d71d1a9b..bf3d25f3 100644 --- a/src/rest/types/ignite.ts +++ b/src/rest/types/ignite.ts @@ -535,4 +535,10 @@ export type IgniteEndpoints = '/v1/ignite/deployments/:deployment_id/gateways', {gateway: Gateway}, {type: GatewayType; target_port: number; protocol: Gateway['protocol']} + > + | Endpoint< + 'PATCH', + '/v1/ignite/deployments/:deployment_id', + {deployment: Deployment}, + DeploymentConfig >; diff --git a/src/sdks/ignite.ts b/src/sdks/ignite.ts index 7dd6f324..1c1648da 100644 --- a/src/sdks/ignite.ts +++ b/src/sdks/ignite.ts @@ -2,6 +2,7 @@ import {create, Infer} from '@onehop/json-methods'; import {API, assertId, Id} from '../rest/index.js'; import { Deployment, + DeploymentConfig, Gateway, GatewayType, RuntimeType, @@ -218,6 +219,18 @@ export const ignite = sdk(client => { create: createDeployment, get: getDeployment, + async update(deploymentId: Id<'deployment'>, config: DeploymentConfig) { + const {deployment} = await client.patch( + '/v1/ignite/deployments/:deployment_id', + config, + { + deployment_id: deploymentId, + }, + ); + + return deployment; + }, + /** * Get all containers for a deployment * From 38f7c55e2009ef771b425374f1fca2f94b14e320 Mon Sep 17 00:00:00 2001 From: Alistair Smith Date: Sun, 25 Sep 2022 03:40:00 +0100 Subject: [PATCH 3/3] feat: add changeset --- .changeset/pretty-bees-appear.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/pretty-bees-appear.md diff --git a/.changeset/pretty-bees-appear.md b/.changeset/pretty-bees-appear.md new file mode 100644 index 00000000..2defb0ef --- /dev/null +++ b/.changeset/pretty-bees-appear.md @@ -0,0 +1,5 @@ +--- +'@onehop/js': patch +--- + +add patching deployments