public LockFile.Builder artifacts(Collection<ResolvedArtifact> artifacts) {
            this.artifacts.clear();
            for (ResolvedArtifact artifact : artifacts) {
                this.artifacts.get().put(artifact.getCoordinates(), LockedArtifact.from(artifact));
            }
            return this;
        }
Saves lockfile to current working directory.
smithy-cli/src/main/java/software/amazon/smithy/cli/commands/LockFile.java