Skip to content
Open
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
16 changes: 15 additions & 1 deletion src/components/Table/Table.module.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
.container {
width: 100%;
overflow-x: auto;
}

.root {
width: 100%;
margin-block: var(--space-m);
border: 1px solid var(--color-border);
border-radius: var(--border-radius-m);
border-spacing: 0;
min-width: 0;
}

.root td:first-child,
Expand Down Expand Up @@ -42,7 +48,15 @@
.root td {
padding: var(--space-xs);
border-bottom: 1px solid var(--color-border);
font-size: var(--text-body-xs);
font-size: var(--text-body-xs);
overflow-wrap: anywhere;
word-break: break-word;
}

.root td :global(code) {
display: inline;
overflow-wrap: anywhere;
word-break: break-word;
}

.root tbody tr:first-child td {
Expand Down
6 changes: 5 additions & 1 deletion src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import styles from './Table.module.css';

export function Table(props: React.ComponentPropsWithoutRef<'table'>) {
return <table className={styles.root} {...props} />;
return (
<div className={styles.container}>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new scroll container enables horizontal scrolling, but a plain <div> with overflow-x: auto isn’t keyboard-focusable by default, which makes horizontal scrolling difficult for keyboard-only users. Consider making the container focusable (e.g., tabIndex={0}) and giving it an accessible name (via aria-label/aria-labelledby, potentially reusing the table’s labeling props) so assistive tech users can discover and operate the scroll region.

Suggested change
<div className={styles.container}>
<div
className={styles.container}
tabIndex={0}
aria-label={props['aria-label']}
aria-labelledby={props['aria-labelledby']}
>

Copilot uses AI. Check for mistakes.
<table className={styles.root} {...props} />
</div>
);
}
33 changes: 31 additions & 2 deletions src/content/formats/generic-repository.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ In the upstream creation menu, define a name for your upstream and enter the ups

Please see our [Upstream Proxying](/repositories/upstreams#create-a-generic-upstream) documentation for further instructions on configuring upstreams.

### Example: Node.js Distributions
### Examples

This example demonstrates how upstream URLs, prefixes, and file paths work together.
#### Node.js Distributions

This example demonstrates how upstream URLs, prefixes, and file paths are applied when working with Node.js distributions.

**Upstream configuration:**
- **Upstream URL**: `https://nodejs.org/dist/`
Expand All @@ -261,6 +263,33 @@ curl -sLf -O 'https://generic.cloudsmith.io/OWNER/REPOSITORY/node_distributions/

The upstream prefix (`node_distributions`) ensures files from Node.js don't collide with files from other upstreams, even if they share identical file paths.

#### Github Releases
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heading uses "Github" here, but elsewhere in this doc (and generally) the brand is styled as "GitHub". Please rename this heading to "GitHub Releases" for consistency.

Suggested change
#### Github Releases
#### GitHub Releases

Copilot uses AI. Check for mistakes.

This example demonstrates how upstream URLs, prefixes, and file paths are applied when working with GitHub Releases.

**Upstream configuration:**
- **Upstream URL**: `https://api.github.com/repos/<owner>/<repo>/releases`
- **Upstream Prefix**: `github_releases`

**How paths are resolved:**

The upstream URL includes the base path (`/releases/`), so file paths are relative to that location.
To download `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz`, request the path `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` from Cloudsmith:

| Component | Value |
| :-------- | :---- |
| Upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases` |
| File path on upstream | `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` |
| Full upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` |
Comment on lines +271 to +283
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GitHub Releases example currently uses the GitHub API endpoint (https://api.github.com/repos/.../releases) as the upstream base, but release assets are not downloadable by appending /<tag>/<asset> to that API URL (the endpoint returns JSON and .../releases/v0.x/... will 404). Update the example to use a download-able base URL (e.g., https://github.com/<owner>/<repo>/releases/download/) and adjust the “Full upstream URL” row/path explanation accordingly so the resolved URL matches the actual asset URL format (.../releases/download/<tag>/<asset>).

Suggested change
- **Upstream URL**: `https://api.github.com/repos/<owner>/<repo>/releases`
- **Upstream Prefix**: `github_releases`
**How paths are resolved:**
The upstream URL includes the base path (`/releases/`), so file paths are relative to that location.
To download `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz`, request the path `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` from Cloudsmith:
| Component | Value |
| :-------- | :---- |
| Upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases` |
| File path on upstream | `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` |
| Full upstream URL | `https://api.github.com/repos/aquasecurity/trivy/releases/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` |
- **Upstream URL**: `https://github.com/<owner>/<repo>/releases/download/`
- **Upstream Prefix**: `github_releases`
**How paths are resolved:**
The upstream URL includes the base path (`/releases/download/`), so file paths are appended after that location.
To download `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz`, request the path `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` from Cloudsmith:
| Component | Value |
| :-------- | :---- |
| Upstream URL | `https://github.com/aquasecurity/trivy/releases/download/` |
| File path on upstream | `v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` |
| Full upstream URL | `https://github.com/aquasecurity/trivy/releases/download/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` |

Copilot uses AI. Check for mistakes.
| Upstream prefix | `github_releases` |
| Cloudsmith URL | `https://generic.cloudsmith.io/OWNER/REPOSITORY/github_releases/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz` |

**Download command:**

```shell
curl -sLf -O 'https://generic.cloudsmith.io/OWNER/REPOSITORY/github_releases/v0.69.3/trivy_0.69.3_Linux-ARM64.tar.gz'
```

### Upstream Priority

Upstream priority behaves differently for Generic repositories due to the nature of upstream prefixes. All upstreams within a prefix are given a priority of 1. Changing the priority setting does not impact package blending, as each upstream is uniquely namespaced within its own prefix.
Expand Down
Loading