From 6714fd7388273c84898d23e6a27043d7139145fa Mon Sep 17 00:00:00 2001 From: Simon Brown Date: Fri, 29 Dec 2023 15:32:16 +0000 Subject: [PATCH] Updates dependencies. --- build.gradle | 4 ++-- docs/changelog.md | 5 +++++ .../java/com/structurizr/cli/LockCommand.java | 8 ++++---- .../java/com/structurizr/cli/PullCommand.java | 8 ++++---- .../java/com/structurizr/cli/PushCommand.java | 20 +++++++++---------- .../com/structurizr/cli/UnlockCommand.java | 8 ++++---- 6 files changed, 28 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index fd2b0ab..e34fadb 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,8 @@ repositories { dependencies { - implementation 'com.structurizr:structurizr-dsl:1.34.0' - implementation 'com.structurizr:structurizr-export:1.18.0' + implementation 'com.structurizr:structurizr-dsl:1.35.0' + implementation 'com.structurizr:structurizr-export:1.19.0' implementation 'io.github.goto1134:structurizr-d2-exporter:1.5.2' implementation 'com.structurizr:structurizr-graphviz:2.2.2' diff --git a/docs/changelog.md b/docs/changelog.md index e727107..5a46ea0 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,5 +1,10 @@ # Changelog +## unreleased + +- structurizr/dsl: Updated to 1.35.0 - [changelog](https://github.com/structurizr/dsl/releases/tag/v1.35.0). +- structurizr/export: Updated to 1.19.0 - [changelog](https://github.com/structurizr/export/releases/tag/v1.19.0). + ## 1.35.0 (26th November 2023) - Adds workspace scope validation - see https://docs.structurizr.com/workspaces for details. diff --git a/src/main/java/com/structurizr/cli/LockCommand.java b/src/main/java/com/structurizr/cli/LockCommand.java index 433bb53..020584c 100644 --- a/src/main/java/com/structurizr/cli/LockCommand.java +++ b/src/main/java/com/structurizr/cli/LockCommand.java @@ -1,6 +1,6 @@ package com.structurizr.cli; -import com.structurizr.api.StructurizrClient; +import com.structurizr.api.WorkspaceApiClient; import org.apache.commons.cli.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -54,9 +54,9 @@ public void run(String... args) throws Exception { } log.info("Locking workspace " + workspaceId + " at " + apiUrl); - StructurizrClient structurizrClient = new StructurizrClient(apiUrl, apiKey, apiSecret); - structurizrClient.setAgent(getAgent()); - boolean locked = structurizrClient.lockWorkspace(workspaceId); + WorkspaceApiClient client = new WorkspaceApiClient(apiUrl, apiKey, apiSecret); + client.setAgent(getAgent()); + boolean locked = client.lockWorkspace(workspaceId); log.info(" - locked " + locked); log.info(" - finished"); diff --git a/src/main/java/com/structurizr/cli/PullCommand.java b/src/main/java/com/structurizr/cli/PullCommand.java index 4005f22..ff8c984 100644 --- a/src/main/java/com/structurizr/cli/PullCommand.java +++ b/src/main/java/com/structurizr/cli/PullCommand.java @@ -1,7 +1,7 @@ package com.structurizr.cli; import com.structurizr.Workspace; -import com.structurizr.api.StructurizrClient; +import com.structurizr.api.WorkspaceApiClient; import com.structurizr.util.WorkspaceUtils; import org.apache.commons.cli.*; import org.apache.commons.logging.Log; @@ -58,9 +58,9 @@ public void run(String... args) throws Exception { } log.info("Pulling workspace " + workspaceId + " from " + apiUrl); - StructurizrClient structurizrClient = new StructurizrClient(apiUrl, apiKey, apiSecret); - structurizrClient.setAgent(getAgent()); - Workspace workspace = structurizrClient.getWorkspace(workspaceId); + WorkspaceApiClient client = new WorkspaceApiClient(apiUrl, apiKey, apiSecret); + client.setAgent(getAgent()); + Workspace workspace = client.getWorkspace(workspaceId); File file = new File("structurizr-" + workspaceId + "-workspace.json"); WorkspaceUtils.saveWorkspaceToJson(workspace, file); diff --git a/src/main/java/com/structurizr/cli/PushCommand.java b/src/main/java/com/structurizr/cli/PushCommand.java index c543b71..cdb1f5a 100644 --- a/src/main/java/com/structurizr/cli/PushCommand.java +++ b/src/main/java/com/structurizr/cli/PushCommand.java @@ -1,11 +1,9 @@ package com.structurizr.cli; import com.structurizr.Workspace; -import com.structurizr.api.StructurizrClient; -import com.structurizr.dsl.StructurizrDslParser; +import com.structurizr.api.WorkspaceApiClient; import com.structurizr.encryption.AesEncryptionStrategy; import com.structurizr.util.StringUtils; -import com.structurizr.util.WorkspaceUtils; import org.apache.commons.cli.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -91,13 +89,13 @@ public void run(String... args) throws Exception { log.info("Pushing workspace " + workspaceId + " to " + apiUrl); - StructurizrClient structurizrClient = new StructurizrClient(apiUrl, apiKey, apiSecret); - structurizrClient.setAgent(getAgent()); - structurizrClient.setWorkspaceArchiveLocation(null); + WorkspaceApiClient client = new WorkspaceApiClient(apiUrl, apiKey, apiSecret); + client.setAgent(getAgent()); + client.setWorkspaceArchiveLocation(null); if (!StringUtils.isNullOrEmpty(passphrase)) { log.info(" - using client-side encryption"); - structurizrClient.setEncryptionStrategy(new AesEncryptionStrategy(passphrase)); + client.setEncryptionStrategy(new AesEncryptionStrategy(passphrase)); } File archivePath = new File("."); @@ -116,17 +114,17 @@ public void run(String... args) throws Exception { workspace.setRevision(null); log.info(" - merge layout from remote: " + mergeFromRemote); - structurizrClient.setMergeFromRemote(mergeFromRemote); + client.setMergeFromRemote(mergeFromRemote); addDefaultViewsAndStyles(workspace); if (archive) { - structurizrClient.setWorkspaceArchiveLocation(archivePath); - log.info(" - storing previous version of workspace in " + structurizrClient.getWorkspaceArchiveLocation()); + client.setWorkspaceArchiveLocation(archivePath); + log.info(" - storing previous version of workspace in " + client.getWorkspaceArchiveLocation()); } log.info(" - pushing workspace"); - structurizrClient.putWorkspace(workspaceId, workspace); + client.putWorkspace(workspaceId, workspace); log.info(" - finished"); } diff --git a/src/main/java/com/structurizr/cli/UnlockCommand.java b/src/main/java/com/structurizr/cli/UnlockCommand.java index 92242ef..33225a7 100644 --- a/src/main/java/com/structurizr/cli/UnlockCommand.java +++ b/src/main/java/com/structurizr/cli/UnlockCommand.java @@ -1,6 +1,6 @@ package com.structurizr.cli; -import com.structurizr.api.StructurizrClient; +import com.structurizr.api.WorkspaceApiClient; import org.apache.commons.cli.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -54,9 +54,9 @@ public void run(String... args) throws Exception { } log.info("Unlocking workspace " + workspaceId + " at " + apiUrl); - StructurizrClient structurizrClient = new StructurizrClient(apiUrl, apiKey, apiSecret); - structurizrClient.setAgent(getAgent()); - boolean locked = structurizrClient.unlockWorkspace(workspaceId); + WorkspaceApiClient client = new WorkspaceApiClient(apiUrl, apiKey, apiSecret); + client.setAgent(getAgent()); + boolean locked = client.unlockWorkspace(workspaceId); log.info(" - unlocked " + locked); log.info(" - finished");