Skip to content

Commit

Permalink
Updates dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Brown committed Dec 29, 2023
1 parent e37752a commit 6714fd7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 25 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/structurizr/cli/LockCommand.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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");
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/structurizr/cli/PullCommand.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
Expand Down
20 changes: 9 additions & 11 deletions src/main/java/com/structurizr/cli/PushCommand.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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(".");
Expand All @@ -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");
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/structurizr/cli/UnlockCommand.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 6714fd7

Please sign in to comment.