Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ cargo fmt
3. **Rust Formatting**: Always run `cargo fmt` - CI will fail without it.
4. **Linear History**: Use squash merge for PRs.
5. **React Components**: Avoid large ternary operations, instead break out the two pieces into components and use a simple ternary operation e.g. `condition ? <ComponentA /> : <ComponentB />`
6. **React Utilities**: Separate styling from logic and abstract reuseable functions into utils files.
6. **React Utilities**: Separate styling from logic and abstract reusable functions into utils files.
7. **React Styling**: Attempt to reference existing pages and components for style guidelines, be sure to re-use components and match styling to maintain consistency.
8. **Prefer Line-of-Sight Coding**: Avoid large indentation by returning early and keeping an unnested control flow, for example:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Check out our [developer docs!](https://docs.realm.pub/dev-guide/introduction)

## Contact Support

Need a hand? We're here to help! If you're facing an issue with Realm, we're happy to assist! To ensure we can provide the best support, please [create an issue on our Github](https://github.com/spellshift/realm/issues/new?labels=bug&template=bug_report.md).
Need a hand? We're here to help! If you're facing an issue with Realm, we're happy to assist! To ensure we can provide the best support, please [create an issue on our GitHub](https://github.com/spellshift/realm/issues/new?labels=bug&template=bug_report.md).

### Bug Support

Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ bundle exec jekyll serve --livereload

## Docsy Jekyll Template

* [Source on Github](https://github.com/vsoch/docsy-jekyll)
* [View on Github Pages](https://vsoch.github.io/docsy-jekyll/)
* [Source on GitHub](https://github.com/vsoch/docsy-jekyll)
* [View on GitHub Pages](https://vsoch.github.io/docsy-jekyll/)
2 changes: 1 addition & 1 deletion docs/_docs/user-guide/golem.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Your tome Metadata should look like this:
```yaml
name: List files # The name of your tome.
description: List the files and directories found at the path # A description to help users understand what your tome does.
author: hulto # Your Github username.
author: hulto # Your GitHub username.
support_model: FIRST_PARTY # Is this a tome that ships with Realm or not?
tactic: RECON # Which MITRE ATT&CK Tactic best describes this tome?
paramdefs: # A list of inputs the tome requires.
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/editable.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<a href="{{ site.repo }}/issues/new?labels={% if page.editable %}{{ page.editable }}{% else %}question{% endif %}&title=Question:&body=Question on: {{ site.repo }}/tree/master/{{ page.path }}" target="_blank"><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href="{{ site.repo }}/issues/new" target="_blank"><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
<!-- this will parse through the header fields and add a button to open
an issue / ask a question on Github. The editable field should be in
an issue / ask a question on GitHub. The editable field should be in
the post frontend matter, and refer to the label to open the issue for -->
2 changes: 1 addition & 1 deletion docs/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Our three sections of documentation are split by intended audience, but feel fre

### Contact Support

Need a hand? We're here to help! If you're facing an issue with Realm, we're happy to assist! To ensure we can provide the best support, please [create an issue on our Github](https://github.com/spellshift/realm/issues/new?labels=bug&template=bug_report.md).
Need a hand? We're here to help! If you're facing an issue with Realm, we're happy to assist! To ensure we can provide the best support, please [create an issue on our GitHub](https://github.com/spellshift/realm/issues/new?labels=bug&template=bug_report.md).

#### Bug Support

Expand Down
2 changes: 1 addition & 1 deletion tavern/cli/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func Authenticate(ctx context.Context, browser Browser, tavernURL string) (Token
// Wait for Token, Error, or Cancellation
select {
case <-ctx.Done():
return Token(""), fmt.Errorf("authentication cancelled: %w", ctx.Err())
return Token(""), fmt.Errorf("authentication canceled: %w", ctx.Err())
case err := <-errCh:
return Token(""), fmt.Errorf("failed to obtain credentials: %w", err)
case token := <-tokenCh:
Expand Down
2 changes: 1 addition & 1 deletion tavern/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ var (
EnvSecretsManagerPath = EnvString{"SECRETS_FILE_PATH", ""}
)

// Config holds information that controls the behaviour of Tavern
// Config holds information that controls the behavior of Tavern
type Config struct {
srv *http.Server

Expand Down
4 changes: 2 additions & 2 deletions tavern/internal/auth/oauth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"realm.pub/tavern/internal/ent/user"
)

// TestNewOAuthLoginHandler ensures the OAuth Login Handler exhibits expected behaviour
// TestNewOAuthLoginHandler ensures the OAuth Login Handler exhibits expected behavior
func TestNewOAuthLoginHandler(t *testing.T) {
// Generate keys for signing JWTs
pubKey, privKey, err := ed25519.GenerateKey(rand.Reader)
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestNewOAuthLoginHandler(t *testing.T) {
assert.Less(t, claims.ExpiresAt.Time.Unix(), time.Now().Add(11*time.Minute).Unix())
}

// TestNewOAuthAuthorizationHandler ensures the OAuth Authorization Handler exhibits expected behaviour
// TestNewOAuthAuthorizationHandler ensures the OAuth Authorization Handler exhibits expected behavior
func TestNewOAuthAuthorizationHandler(t *testing.T) {
var (
expectedClientID = "12345"
Expand Down
8 changes: 4 additions & 4 deletions tavern/internal/cdn/download_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cdn

import (
"bytes"
"net/http"
"log/slog"
"net/http"
"strings"
"time"

Expand Down Expand Up @@ -55,15 +55,15 @@ func NewLinkDownloadHandler(graph *ent.Client, prefix string) http.Handler {
if l.DownloadLimit != nil {
downloadLimit = *l.DownloadLimit
}
if downloadLimit > 0 && l.Downloads >= downloadLimit {
if downloadLimit > 0 && l.Downloads >= downloadLimit {
slog.Info("Failed attempt to download link, maximum downloads reached", "path", linkPath, "downloads", l.Downloads, "download_limit", l.DownloadLimit)
return ErrFileNotFound
}

// Increment Link Downloads
if _, err := graph.Link.UpdateOne(l).
SetDownloads(l.Downloads + 1).
Save(ctx); err != nil {
SetDownloads(l.Downloads + 1).
Save(ctx); err != nil {
slog.Error("failed to increment downloads for link", "path", linkPath, "downloads", l.Downloads, "err", err)

// Only error if a download limit is enforced
Expand Down
6 changes: 3 additions & 3 deletions tavern/internal/ent/schema/link_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ func TestCreateLinkWithExplicitExpiresAt(t *testing.T) {
futureTime := time.Now().Add(24 * time.Hour)
downloadLimit := 5
input := ent.CreateLinkInput{
AssetID: asset.ID,
DownloadLimit: &downloadLimit,
ExpiresAt: &futureTime,
AssetID: asset.ID,
DownloadLimit: &downloadLimit,
ExpiresAt: &futureTime,
}

link, err := graph.Link.Create().SetInput(input).Save(ctx)
Expand Down
2 changes: 1 addition & 1 deletion tavern/internal/errors/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"realm.pub/tavern/internal/errors"
)

// TestWrapHandler asserts that wrapped handlers exhibit expected behaviour.
// TestWrapHandler asserts that wrapped handlers exhibit expected behavior.
func TestWrapHandler(t *testing.T) {
t.Run("BasicError", newWrapHandlerTest(
errors.NewHTTP("some error", 101),
Expand Down
4 changes: 2 additions & 2 deletions tavern/internal/portals/mux/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func BenchmarkMuxThroughput(b *testing.B) {
case <-hostCh:
// Success
case <-ctx.Done():
b.Fatal("Context cancelled")
b.Fatal("Context canceled")
}

// 2. Host sends to Client (TopicOut)
Expand All @@ -90,7 +90,7 @@ func BenchmarkMuxThroughput(b *testing.B) {
case <-clientCh:
// Success
case <-ctx.Done():
b.Fatal("Context cancelled")
b.Fatal("Context canceled")
}
}
}
2 changes: 1 addition & 1 deletion tavern/internal/redirectors/http1/grpc_stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestCreateStreamWithContext(t *testing.T) {
// Verify context can be used for timeout checks
select {
case <-ctx.Done():
t.Error("Context should not be cancelled yet")
t.Error("Context should not be canceled yet")
default:
// Expected
}
Expand Down
11 changes: 5 additions & 6 deletions tavern/internal/redirectors/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ func tryACME(ctx context.Context, host string) (tlsCfg *tls.Config, err error) {
slog.Debug("redirectors: using short lived certificates")
}
acme := certmagic.ACMEIssuer{
Agreed: true,
Email: "",
CA: certmagic.LetsEncryptProductionCA,
Agreed: true,
Email: "",
CA: certmagic.LetsEncryptProductionCA,
Profile: profile,
}

Expand Down Expand Up @@ -85,9 +85,8 @@ func selfSignedTLSConfig(host string) (*tls.Config, error) {
}

template := x509.Certificate{
SerialNumber: serialNumber,
Subject: pkix.Name{
},
SerialNumber: serialNumber,
Subject: pkix.Name{},
NotBefore: time.Now(),
NotAfter: time.Now().Add(365 * 24 * time.Hour),
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
Expand Down
12 changes: 6 additions & 6 deletions tavern/internal/www/build/asset-manifest.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tavern/internal/www/build/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions tavern/internal/www/build/static/css/main.8ae73297.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tavern/internal/www/build/static/css/main.8ae73297.css.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions tavern/internal/www/build/static/css/main.f9a79b4a.css

This file was deleted.

1 change: 0 additions & 1 deletion tavern/internal/www/build/static/css/main.f9a79b4a.css.map

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const StepAddDeploymentKey: FC<StepAddDeploymentKeyProps> = ({ setCurrStep, newR
To import tomes, you need to give Realm access to your git repository. Copy the public key below into your repositories deployment keys, often found in admin settings.
</p>
<ul className="text-sm list-disc px-4 py-2">
<li>Setup for <a className="external-link" rel="noreferrer" target="_blank" href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#set-up-deploy-keys">Github</a></li>
<li>Setup for <a className="external-link" rel="noreferrer" target="_blank" href="https://docs.gitlab.com/ee/user/project/deploy_keys/#create-a-project-deploy-key">Gitlab</a></li>
<li>Setup for <a className="external-link" rel="noreferrer" target="_blank" href="https://docs.github.com/en/authentication/connecting-to-github-with-ssh/managing-deploy-keys#set-up-deploy-keys">GitHub</a></li>
<li>Setup for <a className="external-link" rel="noreferrer" target="_blank" href="https://docs.gitlab.com/ee/user/project/deploy_keys/#create-a-project-deploy-key">GitLab</a></li>
<li>Setup for <a className="external-link" rel="noreferrer" target="_blank" href="https://bitbucket.org/blog/deployment-keys">Bitbucket</a></li>
</ul>
</div>
Expand Down
Loading