# dev.knotless.release

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

One version of a package a repository publishes: its files, and the commit they were built from.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.release)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.release/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.release/examples)

## Definitions

### `dev.knotless.release#file`

**Type**: `object`

One file of a release.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Its name, as it is downloaded: letters, digits, `.`, `_`, `+` and `-`, not first a `.`. |
| `parts` | `array` | Yes | The file, split over blobs in order, each no larger than its PDS takes. |
| `sha256` | `string` | Yes | The lowercase hex SHA-256 of the file. |
| `size` | `integer` | Yes | Bytes in the file. |

### `dev.knotless.release`

**Type**: `record`

Kept in the repository owner's account, keyed `<repo key>.<package hash>.<version hash>`, where each hash is the first 26 characters of the lowercase unpadded base32 SHA-256 of `package` or `version`, so a listing from the cursor `<repo key>/` walks one repository's releases, and from `<repo key>.<package hash>/` one package's. Created and never updated: creating it fails if that version was published, so a version's files never change. Deleting it unpublishes the version. Readers check every file against its `sha256`.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `check` | `string` (at-uri) | No | The dev.knotless.check, in its runner's account, of the run that built and published it. A reader trusts it only from a runner the repository names, and only once it has passed at `commit`. |
| `commit` | `string` | No | The hex object ID of the commit the files were built from. |
| `createdAt` | `string` (datetime) | Yes |  |
| `files` | `array` | Yes | What it publishes, by distinct names. |
| `notes` | `string` | No | What changed since the version before, in Markdown, as the changelog says. |
| `package` | `string` | Yes | The package's name, as npm's rules have it: lowercase letters, digits, `-`, `.`, `_` and `~`, after an optional `@scope/`. A repository can publish several. |
| `repo` | `string` (tid) | Yes | The `key` of the dev.knotless.repo that publishes it. |
| `version` | `string` | Yes | A Semantic Versioning 2.0 version, such as 1.4.0 or 2.0.0-rc.1. The highest version without a pre-release part is the package's latest. |

### `dev.knotless.release#part`

**Type**: `object`

One blob of a file, in order.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `blob` | `blob` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "file": {
      "description": "One file of a release.",
      "properties": {
        "name": {
          "description": "Its name, as it is downloaded: letters, digits, `.`, `_`, `+` and `-`, not first a `.`.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "parts": {
          "description": "The file, split over blobs in order, each no larger than its PDS takes.",
          "items": {
            "ref": "#part",
            "type": "ref"
          },
          "minLength": 1,
          "type": "array"
        },
        "sha256": {
          "description": "The lowercase hex SHA-256 of the file.",
          "maxLength": 64,
          "minLength": 64,
          "type": "string"
        },
        "size": {
          "description": "Bytes in the file.",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "name",
        "size",
        "sha256",
        "parts"
      ],
      "type": "object"
    },
    "main": {
      "description": "Kept in the repository owner's account, keyed `<repo key>.<package hash>.<version hash>`, where each hash is the first 26 characters of the lowercase unpadded base32 SHA-256 of `package` or `version`, so a listing from the cursor `<repo key>/` walks one repository's releases, and from `<repo key>.<package hash>/` one package's. Created and never updated: creating it fails if that version was published, so a version's files never change. Deleting it unpublishes the version. Readers check every file against its `sha256`.",
      "key": "any",
      "record": {
        "properties": {
          "check": {
            "description": "The dev.knotless.check, in its runner's account, of the run that built and published it. A reader trusts it only from a runner the repository names, and only once it has passed at `commit`.",
            "format": "at-uri",
            "type": "string"
          },
          "commit": {
            "description": "The hex object ID of the commit the files were built from.",
            "maxLength": 64,
            "minLength": 40,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "files": {
            "description": "What it publishes, by distinct names.",
            "items": {
              "ref": "#file",
              "type": "ref"
            },
            "maxLength": 64,
            "minLength": 1,
            "type": "array"
          },
          "notes": {
            "description": "What changed since the version before, in Markdown, as the changelog says.",
            "maxGraphemes": 5000,
            "maxLength": 20000,
            "type": "string"
          },
          "package": {
            "description": "The package's name, as npm's rules have it: lowercase letters, digits, `-`, `.`, `_` and `~`, after an optional `@scope/`. A repository can publish several.",
            "maxLength": 214,
            "minLength": 1,
            "type": "string"
          },
          "repo": {
            "description": "The `key` of the dev.knotless.repo that publishes it.",
            "format": "tid",
            "type": "string"
          },
          "version": {
            "description": "A Semantic Versioning 2.0 version, such as 1.4.0 or 2.0.0-rc.1. The highest version without a pre-release part is the package's latest.",
            "maxLength": 256,
            "minLength": 5,
            "type": "string"
          }
        },
        "required": [
          "repo",
          "package",
          "version",
          "files",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "part": {
      "description": "One blob of a file, in order.",
      "properties": {
        "blob": {
          "accept": [
            "application/octet-stream"
          ],
          "type": "blob"
        }
      },
      "required": [
        "blob"
      ],
      "type": "object"
    }
  },
  "description": "One version of a package a repository publishes: its files, and the commit they were built from.",
  "id": "dev.knotless.release",
  "lexicon": 1
}
```
