Skip to content
Svartz v2.6.0

@svartz/plugin-submissions/server

10 exported symbols.

Interfaces

i BuildDataWhat the build records for the server: never sent to the browser.
i RouteHolderThe page holding a route: its slug, which permissions are checked on, and its URL below the deployment base, `null` when hidden.
i SavedEditsThe edits a vault's site saved among those asked about, each with the id of the account that saved it, or `null`.
i VaultRecordsWhere a vault's sync keeps its records: the D1 binding, the repository, and the vault's folder in it.

Types

t CredentialsExactly one kind of GitHub credentials: a token, or a GitHub App.
t ServerOptionsThe plugin's server options, as written into the server bundle.

Functions

f changedFilesThe vault files each of `commits` (SHAs) changed, as vault paths, for those the mirror of the vault `records` describes holds with their files. In one query; none when the binding is missing.
f isVaultSubmissionWhether pull request `number` is a submission the site saved for the vault `records` describes: what that vault's `POST close/` accepts. `false` when the binding is missing. The moderation plugin asks before it offers Close.
f savedEditsWhich of `commits` (SHAs) and `pulls` (numbers) the site saved for the vault `records` describes, and the account behind each: whoever made the commit, or opened the pull request with its first save. `null` for a save by someone without an account. In one query; none are saved when the binding is missing.

Variables

v default