@vite-hub/forge 0.4.1 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +11 -4
  2. package/dist/{association-Ds6Tgs0W-Cu9_YCGq.js → association-Ds6Tgs0W-CgBVH3ii.js} +1 -2
  3. package/dist/build/node.d.ts +1 -3
  4. package/dist/build/node.js +3 -6
  5. package/dist/build.d.ts +1 -1
  6. package/dist/build.js +1 -2
  7. package/dist/{forgejo-UNPc42cY.js → definition-BQFdu9ti-WxMjcAEl.js} +15 -13
  8. package/dist/{events-DW3SFUDA-D2rhS9D-.js → events-BL0zcgMf-9TwyYtCt.js} +3 -5
  9. package/dist/{events-uCMi3LHU-Bz79PQtq.js → events-DDdJnmD2-BSMoOqjV.js} +4 -5
  10. package/dist/{events-DjRw3KSr-C72gY7Vu.js → events-DHqSJ5KI-z2-5_1vo.js} +59 -60
  11. package/dist/{events-DmSWTdpS-BdJBABfI.js → events-DXE-Ul2S-BzTkugIK.js} +4 -5
  12. package/dist/{feed-BlzdKdNv-DbxuSgsx.js → feed-B1OiHFg0-DevZZe0y.js} +3 -5
  13. package/dist/{feed-CIaAZINm-Dpe9DxwK.js → feed-DROLF1tb-CtRfA_7N.js} +3 -5
  14. package/dist/{feed-BwdcTgZq-Bm_c8br8.js → feed-iWegqepj-ConxMpg4.js} +3 -5
  15. package/dist/forgejo-4sbZukng.js +6 -0
  16. package/dist/gitea-Cj7qy2X3.js +10 -0
  17. package/dist/{gitee-BXyl2_3W-dQOAjWqr.js → gitee-CKt4pEC0-BuLWggck.js} +2 -3
  18. package/dist/{github-CUiEF2FK.js → github-CHzhqYOr.js} +377 -293
  19. package/dist/{gitlab-zvWb9zOi.js → gitlab-CS0shW2u.js} +12 -10
  20. package/dist/{graphql-BDhuP5jN-BSpB8lWf.js → graphql-DxRA9BGO-BBbmTmWi.js} +43 -33
  21. package/dist/{identity-CmVEBLP5.js → identity-BwC2_3S9.js} +1 -2
  22. package/dist/{identity-CNTWZZuv.d.ts → identity-D2-HaDku.d.ts} +0 -2
  23. package/dist/index.d.ts +50 -44
  24. package/dist/index.js +149 -98
  25. package/dist/model-Biiu1CfI-CVLamGai.js +288 -0
  26. package/dist/{templates-BGDqQMu4-PSB43E1j.js → templates-0m5QBVIh-D1fZeoC-.js} +3 -3
  27. package/dist/{webhooks-Bc6QhmI8-CNgCERCq.js → webhooks-Bc6QhmI8-eK71_mJE.js} +1034 -98
  28. package/package.json +8 -7
  29. package/dist/events-C6C7lk1x-J8VCAjEX.js +0 -131
  30. package/dist/knot-bGebBK_B-CeDHcJUz.js +0 -350
  31. package/dist/tangled-8lg_73Wi-bSufNXiN.js +0 -43
  32. package/dist/utils-DC7MBR65-B7Vr2hFm.js +0 -1214
package/README.md CHANGED
@@ -5,9 +5,9 @@
5
5
  [![license](https://img.shields.io/static/v1?label=license&message=Apache-2.0&color=blue)](https://github.com/vite-hub/vitehub/blob/main/LICENSE)
6
6
  [![docs](https://img.shields.io/static/v1?label=docs&message=vitehub.dev&color=blue)](https://vitehub.dev/docs)
7
7
 
8
- `@vite-hub/forge` is the one Forge identity of ViteHub. Apps call `useForge()` to act as their GitHub App, or with their GitLab or Forgejo token. Channels, Capabilities, Workspaces and Sources read the same env names. It is built on [`forges`](https://forges.link). User docs: [Forge](https://vitehub.dev/docs/forge).
8
+ `@vite-hub/forge` is the one Forge identity of ViteHub. Apps call `useForge()` to act as their GitHub App, or with their GitLab, Forgejo or Gitea token. Channels, Capabilities, Workspaces and Sources read the same env names. It is built on [`forges`](https://forges.link). User docs: [Forge](https://vitehub.dev/docs/forge).
9
9
 
10
- The GitHub Channel, the `forge()` Capability, and the Workspace GitHub store mint App installation tokens through `useForge()`. GitHub Sources use only `VITEHUB_GITHUB_TOKEN` (or `FORGES_GITHUB_TOKEN`). Channels, Workspaces and Sources list `@vite-hub/forge` as an optional peer and load it only on a Forge path, so an app without a Forge does not install it. Such an app that uses a Forge Channel, the `forge()` Capability, a GitHub Store or a GitHub Source fails with `INTERNAL_FORGE_NOT_INSTALLED` until it runs `pnpm add @vite-hub/forge`.
10
+ The GitHub Channel, the `forge()` Capability, and the Workspace GitHub store mint App installation tokens through `useForge()` when using App credentials. The store prefers an explicit `token` over App credentials and falls back to the env token when no App ID is set. GitHub Sources read `VITEHUB_GITHUB_TOKEN` (or `FORGES_GITHUB_TOKEN`) when `auth` is omitted. Channels, Workspaces and Sources list `@vite-hub/forge` as an optional peer and load it only on a Forge path, so an app without a Forge does not install it. Such an app that uses a Forge Channel, the `forge()` Capability, a GitHub Store or a GitHub Source fails with `INTERNAL_FORGE_NOT_INSTALLED` until it runs `pnpm add @vite-hub/forge`.
11
11
 
12
12
  ## Use it in an app
13
13
 
@@ -32,7 +32,7 @@ await github.request("POST", "/repos/acme/web/issues", { body: { title: "Nightly
32
32
  | `forge.kind`, `forge.auth`, `forge.baseUrl` | The Forge, `"app"` or `"token"`, and the API base. |
33
33
  | `forge.token({ repository, installation, refresh, minLifetime, signal })` | `[error, { token, expiresAt }]`. With a GitHub App, an installation token for `installation`, such as `installation.id` of a webhook delivery, else for the owner of `repository` (see [Installations](https://vitehub.dev/docs/forge/configure#installations)), or for `VITEHUB_GITHUB_INSTALLATION_ID` without `repository`. Cached until `minLifetime` milliseconds (default one minute) before it expires. |
34
34
  | `forge.provider({ repository, installation, refresh, minLifetime, signal })` | `[error, provider]`, a `forges` provider that sends `token()`. A GitHub provider has `graphql()`. |
35
- | `forge.app({ signal })` | `[error, { id, slug, login }]` of the GitHub App. Throws `FORGE_NOT_APP` with a token. |
35
+ | `forge.app({ signal })` | `[error, { id, slug, login, email }]` of the GitHub App. Throws `FORGE_NOT_APP` with a token. |
36
36
 
37
37
  GitHub uses the App when `VITEHUB_GITHUB_APP_ID` is set, and `VITEHUB_GITHUB_TOKEN` otherwise. Runtime errors are `FORGE_APP_NOT_INSTALLED` and `FORGE_REQUEST_FAILED`. A cancelled call rejects with the abort reason. The codes are documented at [Forge limits and errors](https://vitehub.dev/docs/forge/limits-and-errors).
38
38
 
@@ -52,6 +52,9 @@ Each field reads its `VITEHUB_` name first, then the `FORGES_` name that the `fo
52
52
  | `github.webhookSecret` | `VITEHUB_GITHUB_WEBHOOK_SECRET`, `FORGES_GITHUB_WEBHOOK_SECRET` |
53
53
  | `gitlab.baseUrl`, `gitlab.token`, `gitlab.webhookSecret` | `VITEHUB_GITLAB_*`, `FORGES_GITLAB_*` |
54
54
  | `forgejo.baseUrl`, `forgejo.token`, `forgejo.webhookSecret` | `VITEHUB_FORGEJO_*`, `FORGES_FORGEJO_*` |
55
+ | `gitea.baseUrl`, `gitea.token`, `gitea.webhookSecret` | `VITEHUB_GITEA_*`, `FORGES_GITEA_*` |
56
+
57
+ For Gitea, `useForge()` uses `VITEHUB_GITEA_WEBHOOK_SECRET` (or `FORGES_GITEA_WEBHOOK_SECRET`) as the default secret for `provider.webhooks.verify({ headers, body })`. Pass the raw request body so the signature matches.
55
58
 
56
59
  `GH_TOKEN` and `GITHUB_TOKEN` are not read. In GitHub Actions, set `VITEHUB_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`.
57
60
 
@@ -70,6 +73,7 @@ Each field reads its `VITEHUB_` name first, then the `FORGES_` name that the `fo
70
73
  | `readForgeEnv(field, env)` | The first value set for one `forgeEnv` field, from an env record or a lookup function. |
71
74
  | `forgeProvider(connection)` | A `forges` provider for one Forge. Return it from a public API only where that API owns the Forge credentials. A GitHub provider has `graphql()`. GitHub providers revalidate repeated GETs with `If-None-Match`, so unchanged responses come back as `304`s that GitHub doesn't charge; `conditionalRequests: false` turns it off, and `{ identity, cache }` sets who shares entries and where they live. |
72
75
  | `conditionalFetch(fetch, { identity, cache })`, `forgeMemoryCache({ maxSize, maxEntrySize })` | The `fetch` wrapper behind `conditionalRequests`, and its in-memory LRU. The default cache is shared by the process, holds up to 32 MiB of bodies, and skips bodies over 1 MiB. |
76
+ | `forgeBranchRules(provider, repo, branch, options)` | Reads branch rules with `provider.repos.branchRules()`. Returns empty rules only as a fallback when GitHub responds with a `403` asking you to upgrade or make the repository public and the branch summary confirms the branch is unprotected. Other `403` responses still reject. |
73
77
  | `githubBranchRuleDetails(rules)` | GitHub only. Required workflows, ruleset merge methods and the classic protection source from the result of `provider.repos.branchRules()`. |
74
78
  | `retargetPullRequest(provider, pull, base)` | GitHub only. Change the base branch of a pull request. |
75
79
  | `forgeMerge(provider, pull, options)` | `threads.merge()` with `bypassRules`. GitHub only with `bypassRules: true`: merge past failing branch rules, as an admin or a ruleset bypass actor. It needs `method` and `sha`. |
@@ -84,7 +88,7 @@ Each field reads its `VITEHUB_` name first, then the `FORGES_` name that the `fo
84
88
  | `forgeBlob(provider, repo, sha, { signal })` | The bytes of one blob by sha. GitHub only. |
85
89
  | `forgeCommitFiles(provider, repo, input, options)` | `contents.commitFiles()` that can also set git file modes (`100644`, `100755`, `120000`). Returns the commit sha. |
86
90
  | `BranchMovedError` | The bundled `forges` error for a branch that moved before a commit. |
87
- | `forgeErrorStatus(error)`, `isForgeResponseError(error)` | Classify Forge request failures. |
91
+ | `forgeResponseError(problem)`, `forgeErrorStatus(error)`, `isForgeResponseError(error)` | Build `FORGE_RESPONSE_INVALID` errors and classify Forge request failures. |
88
92
  | `withSignal(promise, signal)`, `abortError(signal)` | Cancellation helpers for Forge calls. |
89
93
 
90
94
  ## Diagnostics
@@ -99,6 +103,8 @@ Each field reads its `VITEHUB_` name first, then the `FORGES_` name that the `fo
99
103
  | `FORGE_R0006` | A GitHub-only helper got a provider for another Forge. |
100
104
  | `FORGE_R0007` | `githubBranchRuleDetails()` got branch rules that are not complete GitHub rulesets or classic protection. |
101
105
  | `FORGE_R0009` | A GitHub-only helper got a reference that is not a numbered pull request, or an empty input. |
106
+ | `FORGE_RESPONSE_INVALID` | A Forge request returned missing or invalid data. Read the error message for the specific problem. |
107
+ | `FORGE_UNSUPPORTED` | The `forge` value of a Forge connection is not `github`, `gitlab`, `forgejo`, or `gitea`. |
102
108
 
103
109
  ## Gaps in `forges`
104
110
 
@@ -110,6 +116,7 @@ Each field reads its `VITEHUB_` name first, then the `FORGES_` name that the `fo
110
116
  | `forgeBlob()` | `contents.getFile()` reads by path, not by blob sha. |
111
117
  | `forgeCommitFiles()` | `contents.commitFiles()` cannot set a file mode. |
112
118
  | `forgeGitCredentials()`, `forgeGitAuthHeader()` | `Repo.cloneUrls` has no transport credential. |
119
+ | `forgeBranchRules()` | `repos.branchRules()` rejects on GitHub's plan-limit `403` even when the branch is unprotected. |
113
120
  | `githubBranchRuleDetails()` | `BranchRules` has no required workflows, ruleset merge methods or classic protection source. |
114
121
  | `retargetPullRequest()` | No pull request base change. |
115
122
  | `forgeMerge()` | `threads.merge()` cannot bypass branch rules. |
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/association-Ds6Tgs0W.mjs
1
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/association-Ds6Tgs0W.mjs
2
2
  const AUTHOR_ASSOCIATIONS = {
3
3
  OWNER: "owner",
4
4
  MEMBER: "member",
@@ -15,5 +15,4 @@ function toAuthorAssociation(raw) {
15
15
  authorAssociationRaw: raw
16
16
  } : {};
17
17
  }
18
- //#endregion
19
18
  export { toAuthorAssociation as t };
@@ -1,5 +1,4 @@
1
- import { a as buildMetaName, i as buildMetaContent, n as ForgeBuild, o as parseBuildMeta, r as buildIdentity, t as BuildIdentity } from "../identity-CNTWZZuv.js";
2
- //#region src/build/read.d.ts
1
+ import { a as buildMetaName, i as buildMetaContent, n as ForgeBuild, o as parseBuildMeta, r as buildIdentity, t as BuildIdentity } from "../identity-D2-HaDku.js";
3
2
  /** `owner/name` of a GitHub or Enterprise remote. The forge's API URL selects the server at runtime. */
4
3
  export declare function githubRepository(remote: string | undefined): string | undefined;
5
4
  /**
@@ -8,5 +7,4 @@ export declare function githubRepository(remote: string | undefined): string | u
8
7
  * that have neither CI variables nor `.git`, such as a Docker build. Empty outside a Git checkout.
9
8
  */
10
9
  export declare function readForgeBuild(root: string, env?: Record<string, string | undefined>): Promise<ForgeBuild>;
11
- //#endregion
12
10
  export { type BuildIdentity, type ForgeBuild, buildIdentity, buildMetaContent, buildMetaName, parseBuildMeta };
@@ -1,8 +1,8 @@
1
- import { i as parseBuildMeta, n as buildMetaContent, r as buildMetaName, t as buildIdentity } from "../identity-CmVEBLP5.js";
1
+ import { i as parseBuildMeta, n as buildMetaContent, r as buildMetaName, t as buildIdentity } from "../identity-BwC2_3S9.js";
2
2
  import { execFile } from "node:child_process";
3
3
  import { readFile } from "node:fs/promises";
4
4
  import { promisify } from "node:util";
5
- //#region ../internal/src/build/revision.ts
5
+ // ../internal/src/build/revision.ts
6
6
  /** CI and host variables that name the commit and branch of a build, in the order they are read. */
7
7
  const buildVariables = [
8
8
  ["VERCEL_GIT_COMMIT_SHA", "VERCEL_GIT_COMMIT_REF"],
@@ -72,13 +72,11 @@ async function readBuildRevision(root, env = process.env, git = (args) => readGi
72
72
  ...branch ? { branch } : {}
73
73
  };
74
74
  }
75
- //#endregion
76
- //#region src/build/read.ts
75
+ // src/build/read.ts
77
76
  /** `owner/name` of a GitHub or Enterprise remote. The forge's API URL selects the server at runtime. */
78
77
  function githubRepository(remote) {
79
78
  return remote ? /^(?:(?:https?|ssh|git):\/\/[^/]+\/|(?:[^@/:]+@)?[\w.-]+:)([\w.-]+\/[\w.-]+?)(?:\.git)?\/?$/.exec(remote.trim())?.[1] : void 0;
80
79
  }
81
- /** The pull request that the CI or host builds, when it names one. */
82
80
  function pullRequestOf(env) {
83
81
  const value = env.VERCEL_GIT_PULL_REQUEST_ID || (env.PULL_REQUEST === "true" ? env.REVIEW_ID : void 0) || /^refs\/pull\/(\d+)\//.exec(env.GITHUB_REF ?? "")?.[1];
84
82
  const number = Number(value);
@@ -102,5 +100,4 @@ async function readForgeBuild(root, env = process.env) {
102
100
  ...pullRequest ? { pullRequest } : {}
103
101
  };
104
102
  }
105
- //#endregion
106
103
  export { buildIdentity, buildMetaContent, buildMetaName, githubRepository, parseBuildMeta, readForgeBuild };
package/dist/build.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as buildMetaName, i as buildMetaContent, n as ForgeBuild, o as parseBuildMeta, r as buildIdentity, t as BuildIdentity } from "./identity-CNTWZZuv.js";
1
+ import { a as buildMetaName, i as buildMetaContent, n as ForgeBuild, o as parseBuildMeta, r as buildIdentity, t as BuildIdentity } from "./identity-D2-HaDku.js";
2
2
  export { type BuildIdentity, type ForgeBuild, buildIdentity, buildMetaContent, buildMetaName, parseBuildMeta };
package/dist/build.js CHANGED
@@ -1,2 +1 @@
1
- import { i as parseBuildMeta, n as buildMetaContent, r as buildMetaName, t as buildIdentity } from "./identity-CmVEBLP5.js";
2
- export { buildIdentity, buildMetaContent, buildMetaName, parseBuildMeta };
1
+ export { t as buildIdentity, n as buildMetaContent, r as buildMetaName, i as parseBuildMeta } from "./identity-BwC2_3S9.js";
@@ -1,6 +1,6 @@
1
- import { $ as toDate, A as hexColour, B as milestoneId, C as createListing, F as latestCommentOf, G as requireIssueOrPull, I as mapConcurrent, K as requireThread, L as memo, M as isFirstPage, O as getManyConcurrently, Q as teamOrg, R as memoBy, U as rateLimitPart, X as summariseChecks, Y as soleMergeMethod, at as versionAtLeast, ct as isNamespaceRef, d as NotFoundError, et as toFileStatus, g as UnsupportedOperationError, it as toWarning, j as hostOf, k as hasEveryLabel, n as BranchMovedError, nt as toPage, o as ForgeError, pt as reactionContent, q as resolveToken, rt as toPullStats, tt as toMergeError, y as actorLogin } from "./utils-DC7MBR65-B7Vr2hFm.js";
2
- import { C as verb, S as toFileContent, T as githubShapedWeb, _ as reviewState, a as verifyHmacSignature, c as changeBase64, d as eventTime, f as existingFiles, g as perKind, l as defineForgeProvider, m as inDirectories, p as fromBase64, r as nativeEventsFor, s as WRITE_VERBS, t as eventKindsOf } from "./webhooks-Bc6QhmI8-CNgCERCq.js";
3
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/web-khKJ7nW8.mjs
1
+ import { B as memo, F as hostOf, I as isFirstPage, J as requireIssueOrPull, K as rateLimitPart, M as getManyConcurrently, N as hasEveryLabel, O as createListing, P as hexColour, Q as summariseChecks, R as latestCommentOf, U as milestoneId, V as memoBy, X as resolveToken, Y as requireThread, a as verifyHmacSignature, at as toWarning, ct as changeBase64, d as perKind, dt as inDirectories, et as teamOrg, f as reviewState, g as verb, it as toPullStats, lt as existingFiles, mt as toFileContent, nt as toFileStatus, ot as versionAtLeast, r as nativeEventsFor, rt as toPage, s as WRITE_VERBS, t as eventKindsOf, tt as toDate, u as eventTime, ut as fromBase64, w as actorLogin, y as githubShapedWeb, z as mapConcurrent } from "./webhooks-Bc6QhmI8-eK71_mJE.js";
2
+ import { A as toMergeError, T as UnsupportedOperationError, b as NotFoundError, k as soleMergeMethod, m as ForgeError, n as isNamespaceRef, s as reactionContent, u as BranchMovedError } from "./model-Biiu1CfI-CVLamGai.js";
3
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/web-C0rMyC0A.mjs
4
4
  const RESERVED_PATHS = [
5
5
  "-",
6
6
  ".well-known",
@@ -49,8 +49,8 @@ function forgejoWeb(forge, baseUrl) {
49
49
  };
50
50
  }
51
51
  const FORGEJO_WEB = /* @__PURE__ */ forgejoWeb("forgejo", "https://codeberg.org");
52
- //#endregion
53
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/definition-0wjaAw2i.mjs
52
+ const GITEA_WEB = /* @__PURE__ */ forgejoWeb("gitea", "https://gitea.com");
53
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/definition-BQFdu9ti.mjs
54
54
  const FORGEJO_HEADERS = {
55
55
  signature: ["x-forgejo-signature", "x-gitea-signature"],
56
56
  event: [
@@ -60,6 +60,11 @@ const FORGEJO_HEADERS = {
60
60
  ],
61
61
  delivery: ["x-forgejo-delivery", "x-gitea-delivery"]
62
62
  };
63
+ const GITEA_HEADERS = {
64
+ signature: ["x-gitea-signature"],
65
+ event: ["x-gitea-event", "x-github-event"],
66
+ delivery: ["x-gitea-delivery"]
67
+ };
63
68
  /** Native Forgejo and Gitea event names per normalised kind, for hook subscriptions. */
64
69
  const FORGEJO_NATIVE_EVENTS = {
65
70
  comment: ["issue_comment", "pull_request_comment"],
@@ -1022,7 +1027,7 @@ function forgejoWebhooks(profile) {
1022
1027
  return ({ options, origin }) => ({
1023
1028
  events: FORGEJO_WEBHOOK_EVENTS,
1024
1029
  verify: (delivery) => verifyForgejoSignature(delivery, options.webhookSecret, profile.headers),
1025
- translate: async (delivery) => (await import("./events-DmSWTdpS-BdJBABfI.js")).translateForgejoWebhook(origin, delivery, profile.headers)
1030
+ translate: async (delivery) => (await import("./events-DXE-Ul2S-BzTkugIK.js")).translateForgejoWebhook(origin, delivery, profile.headers)
1026
1031
  });
1027
1032
  }
1028
1033
  const YAML_FILE = /\.ya?ml$/i;
@@ -1523,7 +1528,7 @@ function setupForgejo({ options, origin, fetcher: baseFetcher, baseUrl }, profil
1523
1528
  return released(isGitea ? giteaMinimum : forgejoMinimum);
1524
1529
  }
1525
1530
  async function feedPage(path, listOptions, query) {
1526
- const { toFeedEvent } = await import("./feed-BwdcTgZq-Bm_c8br8.js");
1531
+ const { toFeedEvent } = await import("./feed-iWegqepj-ConxMpg4.js");
1527
1532
  return list(path, listOptions, (raw) => toFeedEvent(origin, raw), { query });
1528
1533
  }
1529
1534
  async function setBlocked(scope, login, blocked, options) {
@@ -1707,6 +1712,8 @@ function setupForgejo({ options, origin, fetcher: baseFetcher, baseUrl }, profil
1707
1712
  authKinds: ["token", "anonymous"]
1708
1713
  },
1709
1714
  notApplicable: [
1715
+ "users.sponsorable",
1716
+ "users.sponsorableMany",
1710
1717
  ...isGitea ? [] : ["threads.lock"],
1711
1718
  "threads.hideComment",
1712
1719
  "threads.resolveReviewThread",
@@ -2316,9 +2323,4 @@ function forgejoScopesFor(verb) {
2316
2323
  if (group === "threads" || group === "repos" || group === "contents" || group === "releases" || group === "checks" || group === "ci") return { token: [write ? "write:issue" : "read:issue", write ? "write:repository" : "read:repository"] };
2317
2324
  return {};
2318
2325
  }
2319
- //#endregion
2320
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/forgejo/index.mjs
2321
- /** Creates a Forgejo provider for Codeberg or any self-hosted Forgejo instance. */
2322
- const forgejo = /* @__PURE__ */ defineForgeProvider(/* @__PURE__ */ forgejoDefinition(FORGEJO_PROFILE));
2323
- //#endregion
2324
- export { forgejo, toThread as i, toActor as n, toRepoRef as r, FORGEJO_HEADERS as t };
2326
+ export { toActor as a, GITEA_WEB as c, forgejoDefinition as i, FORGEJO_PROFILE as n, toRepoRef as o, GITEA_HEADERS as r, toThread as s, FORGEJO_HEADERS as t };
@@ -1,7 +1,6 @@
1
- import { $ as toDate } from "./utils-DC7MBR65-B7Vr2hFm.js";
2
- import { A as headerValue, d as eventTime, i as refEvent, k as bodyText, v as snapshotOfThread } from "./webhooks-Bc6QhmI8-CNgCERCq.js";
3
- import { a as toRepoRef, i as toPullThread, n as toActor, r as toIssueThread, t as FORGE } from "./gitee-BXyl2_3W-dQOAjWqr.js";
4
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/events-DW3SFUDA.mjs
1
+ import { gt as headerValue, ht as bodyText, i as refEvent, p as snapshotOfThread, tt as toDate, u as eventTime } from "./webhooks-Bc6QhmI8-eK71_mJE.js";
2
+ import { a as toRepoRef, i as toPullThread, n as toActor, r as toIssueThread, t as FORGE } from "./gitee-CKt4pEC0-BuLWggck.js";
3
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/events-BL0zcgMf.mjs
5
4
  const STATES = {
6
5
  open: "open",
7
6
  reopen: "open",
@@ -120,5 +119,4 @@ function translateGiteeWebhook(instance, delivery) {
120
119
  summary: `${who} ${payload.action ?? "changed"} ${thread ? `${thread.kind === "issue" ? "" : "!"}${thread.number}` : hook}`
121
120
  }];
122
121
  }
123
- //#endregion
124
122
  export { translateGiteeWebhook };
@@ -1,7 +1,7 @@
1
- import { $ as toDate, _ as WebhookVerificationError } from "./utils-DC7MBR65-B7Vr2hFm.js";
2
- import { A as headerValue, d as eventTime, i as refEvent, k as bodyText, u as eventAction, x as threadSnapshot } from "./webhooks-Bc6QhmI8-CNgCERCq.js";
3
- import { a as toRepoRef, i as toLabel, n as approvalId, o as toState, r as toActor, t as FORGE } from "./gitlab-zvWb9zOi.js";
4
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/events-uCMi3LHU.mjs
1
+ import { gt as headerValue, h as threadSnapshot, ht as bodyText, i as refEvent, l as eventAction, tt as toDate, u as eventTime } from "./webhooks-Bc6QhmI8-eK71_mJE.js";
2
+ import { E as WebhookVerificationError } from "./model-Biiu1CfI-CVLamGai.js";
3
+ import { a as toRepoRef, i as toLabel, n as approvalId, o as toState, r as toActor, t as FORGE } from "./gitlab-CS0shW2u.js";
4
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/events-DDdJnmD2.mjs
5
5
  const EVENT_HEADER = "x-gitlab-event";
6
6
  function snapshotOf(instance, raw) {
7
7
  return raw && threadSnapshot({
@@ -350,5 +350,4 @@ function translateGitLabWebhook(instance, delivery) {
350
350
  payload
351
351
  }];
352
352
  }
353
- //#endregion
354
353
  export { translateGitLabWebhook };
@@ -1,7 +1,7 @@
1
- import { $ as toDate, _ as WebhookVerificationError, rt as toPullStats } from "./utils-DC7MBR65-B7Vr2hFm.js";
2
- import { A as headerValue, _ as reviewState, d as eventTime, i as refEvent, k as bodyText, u as eventAction, x as threadSnapshot } from "./webhooks-Bc6QhmI8-CNgCERCq.js";
3
- import { a as toRepoRef, i as toLabels, n as toActor, o as toThreadState, r as toIssueType, t as FORGE } from "./github-CUiEF2FK.js";
4
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/events-DjRw3KSr.mjs
1
+ import { f as reviewState, gt as headerValue, h as threadSnapshot, ht as bodyText, i as refEvent, it as toPullStats, l as eventAction, tt as toDate, u as eventTime } from "./webhooks-Bc6QhmI8-eK71_mJE.js";
2
+ import { E as WebhookVerificationError } from "./model-Biiu1CfI-CVLamGai.js";
3
+ import { a as toThreadState, i as toRepoRef, n as toIssueType, r as toLabels, t as toActor } from "./github-CHzhqYOr.js";
4
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/events-DHqSJ5KI.mjs
5
5
  const EVENT_HEADER = "x-github-event";
6
6
  const DELIVERY_HEADER = "x-github-delivery";
7
7
  function visibilityChange(isPublic, who, payload) {
@@ -16,7 +16,7 @@ function visibilityChange(isPublic, who, payload) {
16
16
  occurredAt: toDate(payload.repository?.updated_at)
17
17
  };
18
18
  }
19
- function repoLevel(instance, event, payload, who, repo) {
19
+ function repoLevel(origin, event, payload, who, repo) {
20
20
  switch (event) {
21
21
  case "push": return {
22
22
  ...refEvent(who, {
@@ -103,7 +103,7 @@ function repoLevel(instance, event, payload, who, repo) {
103
103
  action: "created",
104
104
  detail: {
105
105
  type: "fork",
106
- fork: payload.forkee ? toRepoRef(instance, payload.forkee) : void 0
106
+ fork: payload.forkee ? toRepoRef(origin, payload.forkee) : void 0
107
107
  },
108
108
  summary: `${who} forked the repository${payload.forkee ? ` to ${payload.forkee.full_name}` : ""}`,
109
109
  occurredAt: toDate(payload.forkee?.created_at)
@@ -128,8 +128,8 @@ function repoLevel(instance, event, payload, who, repo) {
128
128
  type: "installation",
129
129
  actionRaw: payload.action ?? event,
130
130
  installationId: payload.installation ? String(payload.installation.id) : void 0,
131
- added: (payload.repositories_added ?? (payload.action === "created" ? payload.repositories : void 0) ?? []).map((repo) => toRepoRef(instance, repo)),
132
- removed: (payload.repositories_removed ?? []).map((repo) => toRepoRef(instance, repo))
131
+ added: (payload.repositories_added ?? (payload.action === "created" ? payload.repositories : void 0) ?? []).map((repo) => toRepoRef(origin, repo)),
132
+ removed: (payload.repositories_removed ?? []).map((repo) => toRepoRef(origin, repo))
133
133
  },
134
134
  summary: `${who} ${payload.action ?? "changed"} the installation`
135
135
  };
@@ -139,7 +139,7 @@ function repoLevel(instance, event, payload, who, repo) {
139
139
  detail: {
140
140
  type: "membership",
141
141
  actionRaw: payload.action ?? event,
142
- member: toActor(instance, payload.member ?? payload.membership?.user)
142
+ member: toActor(origin, payload.member ?? payload.membership?.user)
143
143
  },
144
144
  summary: `${who} ${payload.action ?? "changed"} a member`
145
145
  };
@@ -151,8 +151,8 @@ function repoLevel(instance, event, payload, who, repo) {
151
151
  detail: {
152
152
  type: "release",
153
153
  release: {
154
- forge: FORGE,
155
- instance,
154
+ forge: origin.forge,
155
+ instance: origin.instance,
156
156
  repo,
157
157
  id: String(payload.release.id),
158
158
  tag: payload.release.tag_name
@@ -177,7 +177,7 @@ const THREAD_EVENT_KIND = {
177
177
  pull_request_review: "review",
178
178
  pull_request_review_comment: "review_comment"
179
179
  };
180
- function threadOf(payload, repo, instance) {
180
+ function threadOf(payload, repo, origin) {
181
181
  if (!repo) return;
182
182
  const candidates = [
183
183
  ["pull_request", payload.pull_request],
@@ -185,8 +185,8 @@ function threadOf(payload, repo, instance) {
185
185
  [payload.issue?.pull_request ? "pull_request" : "issue", payload.issue]
186
186
  ];
187
187
  for (const [kind, subject] of candidates) if (subject) return {
188
- forge: FORGE,
189
- instance,
188
+ forge: origin.forge,
189
+ instance: origin.instance,
190
190
  repo,
191
191
  kind,
192
192
  number: String(subject.number),
@@ -194,27 +194,27 @@ function threadOf(payload, repo, instance) {
194
194
  };
195
195
  }
196
196
  /** The commit of a comment on a commit, which names no thread. */
197
- function commitOf(payload, thread, repo, instance) {
197
+ function commitOf(payload, thread, repo, origin) {
198
198
  return !thread && repo && payload.comment?.commit_id ? {
199
- forge: FORGE,
200
- instance,
199
+ forge: origin.forge,
200
+ instance: origin.instance,
201
201
  repo,
202
202
  sha: payload.comment.commit_id
203
203
  } : void 0;
204
204
  }
205
205
  /** The repository a pull request's head is on. Activity feeds name it by an API `url` alone. */
206
- function headRepo(instance, repo) {
207
- if (repo?.full_name) return toRepoRef(instance, repo);
206
+ function headRepo(origin, repo) {
207
+ if (repo?.full_name) return toRepoRef(origin, repo);
208
208
  const [, owner, name] = repo?.url?.match(/\/repos\/([^/]+)\/([^/]+)$/) ?? [];
209
209
  return owner && name ? {
210
- forge: FORGE,
211
- instance,
210
+ forge: origin.forge,
211
+ instance: origin.instance,
212
212
  owner,
213
213
  name,
214
214
  externalId: repo?.id === void 0 ? void 0 : String(repo.id)
215
215
  } : void 0;
216
216
  }
217
- function snapshotOf(instance, payload) {
217
+ function snapshotOf(origin, payload) {
218
218
  const raw = payload.pull_request ?? payload.discussion ?? payload.issue;
219
219
  return raw && threadSnapshot({
220
220
  title: raw.title,
@@ -228,7 +228,7 @@ function snapshotOf(instance, payload) {
228
228
  stateRaw: raw.state,
229
229
  stateReason: raw.state_reason ?? void 0,
230
230
  isDraft: raw.draft,
231
- author: toActor(instance, raw.user),
231
+ author: toActor(origin, raw.user),
232
232
  labels: raw.labels && toLabels(raw.labels),
233
233
  issueType: toIssueType(raw.type),
234
234
  url: raw.html_url,
@@ -236,7 +236,7 @@ function snapshotOf(instance, payload) {
236
236
  head: {
237
237
  ref: raw.head.ref,
238
238
  sha: raw.head.sha,
239
- repo: headRepo(instance, raw.head.repo)
239
+ repo: headRepo(origin, raw.head.repo)
240
240
  },
241
241
  base: {
242
242
  ref: raw.base.ref,
@@ -250,7 +250,7 @@ function snapshotOf(instance, payload) {
250
250
  changedFileCount: raw.changed_files,
251
251
  commitCount: raw.commits
252
252
  }),
253
- mergedBy: toActor(instance, raw.merged_by)
253
+ mergedBy: toActor(origin, raw.merged_by)
254
254
  });
255
255
  }
256
256
  function eventKindFor(event, payload) {
@@ -308,11 +308,11 @@ function actionOf(event, payload) {
308
308
  if (event === "pull_request" && payload.action === "closed" && payload.pull_request?.merged) return "merged";
309
309
  return eventAction(payload.action);
310
310
  }
311
- function detailOf(kind, thread, commit, instance, payload) {
311
+ function detailOf(kind, thread, commit, origin, payload) {
312
312
  const comment = payload.comment;
313
313
  const commentRef = comment?.id !== void 0 && thread ? {
314
- forge: FORGE,
315
- instance,
314
+ forge: origin.forge,
315
+ instance: origin.instance,
316
316
  thread,
317
317
  id: thread.kind === "discussion" && comment.node_id ? comment.node_id : String(comment.id)
318
318
  } : void 0;
@@ -320,8 +320,8 @@ function detailOf(kind, thread, commit, instance, payload) {
320
320
  case "comment": return {
321
321
  type: "comment",
322
322
  comment: commentRef ?? (comment?.id !== void 0 && commit ? {
323
- forge: "github",
324
- instance,
323
+ forge: origin.forge,
324
+ instance: origin.instance,
325
325
  commit,
326
326
  id: String(comment.id)
327
327
  } : void 0),
@@ -340,8 +340,8 @@ function detailOf(kind, thread, commit, instance, payload) {
340
340
  stateRaw: payload.review?.state,
341
341
  body: payload.review?.body ?? void 0,
342
342
  review: payload.review?.id !== void 0 && thread ? {
343
- forge: FORGE,
344
- instance,
343
+ forge: origin.forge,
344
+ instance: origin.instance,
345
345
  thread,
346
346
  id: String(payload.review.id)
347
347
  } : void 0
@@ -356,7 +356,7 @@ function detailOf(kind, thread, commit, instance, payload) {
356
356
  } : void 0;
357
357
  case "assignment": return {
358
358
  type: "assignment",
359
- assignee: toActor(instance, payload.assignee ?? payload.requested_reviewer ?? void 0)
359
+ assignee: toActor(origin, payload.assignee ?? payload.requested_reviewer ?? void 0)
360
360
  };
361
361
  case "state_change": {
362
362
  const pull = payload.pull_request;
@@ -373,12 +373,12 @@ function detailOf(kind, thread, commit, instance, payload) {
373
373
  }
374
374
  }
375
375
  /** Normalises a GitHub event, named as a webhook names it, from a webhook delivery or an activity feed. */
376
- function toGitHubEvent(instance, event, payload, context) {
376
+ function toGitHubEvent(origin, event, payload, context) {
377
377
  const { actor, repo } = context;
378
- const level = repoLevel(instance, event, payload, actor?.login ?? "someone", repo);
378
+ const level = repoLevel(origin, event, payload, actor?.login ?? "someone", repo);
379
379
  if (level) return {
380
- forge: FORGE,
381
- instance,
380
+ forge: origin.forge,
381
+ instance: origin.instance,
382
382
  id: context.id,
383
383
  kind: level.kind,
384
384
  action: level.action,
@@ -393,45 +393,45 @@ function toGitHubEvent(instance, event, payload, context) {
393
393
  source: context.source,
394
394
  payload: context.payload ?? payload
395
395
  };
396
- const thread = threadOf(payload, repo, instance);
397
- const commit = commitOf(payload, thread, repo, instance);
396
+ const thread = threadOf(payload, repo, origin);
397
+ const commit = commitOf(payload, thread, repo, origin);
398
398
  const kind = eventKindFor(event, payload);
399
399
  return {
400
- forge: FORGE,
401
- instance,
400
+ forge: origin.forge,
401
+ instance: origin.instance,
402
402
  id: context.id,
403
403
  kind,
404
404
  kindRaw: context.kindRaw,
405
405
  action: actionOf(event, payload),
406
406
  actionRaw: context.actionRaw,
407
- detail: detailOf(kind, thread, commit, instance, payload),
407
+ detail: detailOf(kind, thread, commit, origin, payload),
408
408
  summary: summarise(event, payload, actor?.login ?? "someone"),
409
409
  ...eventTime(context.occurredAt ?? threadTime(payload)),
410
410
  actor,
411
411
  repo,
412
412
  thread,
413
413
  commit,
414
- threadSnapshot: snapshotOf(instance, payload),
414
+ threadSnapshot: snapshotOf(origin, payload),
415
415
  installationId: context.installationId,
416
416
  source: context.source,
417
417
  payload: context.payload ?? payload
418
418
  };
419
419
  }
420
- function translateGitHubWebhook(instance, delivery) {
420
+ function translateGitHubWebhook(origin, delivery) {
421
421
  const event = headerValue(delivery.headers, EVENT_HEADER);
422
422
  if (!event) throw new WebhookVerificationError(`Missing ${EVENT_HEADER} header`, {
423
- forge: FORGE,
424
- instance
423
+ forge: origin.forge,
424
+ instance: origin.instance
425
425
  });
426
426
  const payload = JSON.parse(bodyText(delivery.body));
427
427
  const id = headerValue(delivery.headers, DELIVERY_HEADER) ?? crypto.randomUUID();
428
- return perPage(event, payload).map(([page, suffix]) => toGitHubEvent(instance, event, page, {
428
+ return perPage(event, payload).map(([page, suffix]) => toGitHubEvent(origin, event, page, {
429
429
  id: `${id}${suffix}`,
430
430
  kindRaw: verbOf(page) ? `${event}.${verbOf(page)}` : event,
431
431
  actionRaw: verbOf(page),
432
432
  source: "webhook",
433
- actor: toActor(instance, payload.sender),
434
- repo: payload.repository ? toRepoRef(instance, payload.repository) : void 0,
433
+ actor: toActor(origin, payload.sender),
434
+ repo: payload.repository ? toRepoRef(origin, payload.repository) : void 0,
435
435
  installationId: payload.installation ? String(payload.installation.id) : void 0
436
436
  }));
437
437
  }
@@ -469,30 +469,30 @@ const FEED_EVENTS = {
469
469
  /** Summaries of the feed event types that have no shared kind. */
470
470
  const FEED_SUMMARIES = { SponsorshipEvent: "changed a sponsorship" };
471
471
  /** Normalises an item of an activity feed into one event per wiki page, and one event otherwise. */
472
- function toFeedEvents(instance, raw) {
472
+ function toFeedEvents(origin, raw) {
473
473
  const pages = raw.type === "GollumEvent" ? perPage("gollum", raw.payload ?? {}) : [];
474
474
  return pages.length > 1 ? pages.map(([payload, suffix]) => ({
475
- ...toFeedEvent(instance, {
475
+ ...toFeedEvent(origin, {
476
476
  ...raw,
477
477
  payload
478
478
  }),
479
479
  id: `${raw.id}${suffix}`,
480
480
  payload: raw
481
- })) : [toFeedEvent(instance, raw)];
481
+ })) : [toFeedEvent(origin, raw)];
482
482
  }
483
483
  /** Normalises an item of a repository's or an account's activity feed. */
484
- function toFeedEvent(instance, raw) {
484
+ function toFeedEvent(origin, raw) {
485
485
  const type = raw.type ?? "Event";
486
486
  const payload = raw.payload ?? {};
487
487
  const [owner = "", name = ""] = raw.repo?.name.split("/") ?? [];
488
488
  const repo = raw.repo ? {
489
- forge: FORGE,
490
- instance,
489
+ forge: origin.forge,
490
+ instance: origin.instance,
491
491
  owner,
492
492
  name,
493
493
  externalId: String(raw.repo.id)
494
494
  } : void 0;
495
- const actor = toActor(instance, raw.actor);
495
+ const actor = toActor(origin, raw.actor);
496
496
  const visibility = typeof raw.public === "boolean" ? { isPublic: raw.public } : {};
497
497
  const context = {
498
498
  id: raw.id,
@@ -506,8 +506,8 @@ function toFeedEvent(instance, raw) {
506
506
  };
507
507
  const event = FEED_EVENTS[type];
508
508
  if (!event) return {
509
- forge: FORGE,
510
- instance,
509
+ forge: origin.forge,
510
+ instance: origin.instance,
511
511
  ...context,
512
512
  kind: "other",
513
513
  summary: `${actor?.login ?? "someone"} ${FEED_SUMMARIES[type] ?? type}`,
@@ -516,12 +516,11 @@ function toFeedEvent(instance, raw) {
516
516
  payload: raw
517
517
  };
518
518
  return {
519
- ...toGitHubEvent(instance, event, type === "PullRequestReviewEvent" && payload.action === "created" ? {
519
+ ...toGitHubEvent(origin, event, type === "PullRequestReviewEvent" && payload.action === "created" ? {
520
520
  ...payload,
521
521
  action: "submitted"
522
522
  } : payload, context),
523
523
  ...visibility
524
524
  };
525
525
  }
526
- //#endregion
527
526
  export { toFeedEvents, translateGitHubWebhook };
@@ -1,7 +1,7 @@
1
- import { $ as toDate, _ as WebhookVerificationError } from "./utils-DC7MBR65-B7Vr2hFm.js";
2
- import { _ as reviewState, d as eventTime, i as refEvent, k as bodyText, n as firstHeader, u as eventAction, v as snapshotOfThread } from "./webhooks-Bc6QhmI8-CNgCERCq.js";
3
- import { i as toThread, n as toActor, r as toRepoRef, t as FORGEJO_HEADERS } from "./forgejo-UNPc42cY.js";
4
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/events-DmSWTdpS.mjs
1
+ import { f as reviewState, ht as bodyText, i as refEvent, l as eventAction, n as firstHeader, p as snapshotOfThread, tt as toDate, u as eventTime } from "./webhooks-Bc6QhmI8-eK71_mJE.js";
2
+ import { E as WebhookVerificationError } from "./model-Biiu1CfI-CVLamGai.js";
3
+ import { a as toActor, o as toRepoRef, s as toThread, t as FORGEJO_HEADERS } from "./definition-BQFdu9ti-WxMjcAEl.js";
4
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/events-DXE-Ul2S.mjs
5
5
  const EVENT_KINDS = {
6
6
  issue_comment: "comment",
7
7
  pull_request_comment: "comment",
@@ -210,5 +210,4 @@ function translateForgejoWebhook(origin, delivery, names = FORGEJO_HEADERS) {
210
210
  payload
211
211
  }];
212
212
  }
213
- //#endregion
214
213
  export { translateForgejoWebhook };
@@ -1,7 +1,6 @@
1
- import { $ as toDate } from "./utils-DC7MBR65-B7Vr2hFm.js";
2
- import { d as eventTime, i as refEvent, u as eventAction } from "./webhooks-Bc6QhmI8-CNgCERCq.js";
3
- import { n as approvalId, r as toActor, s as toThreadKind, t as FORGE } from "./gitlab-zvWb9zOi.js";
4
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/feed-BlzdKdNv.mjs
1
+ import { i as refEvent, l as eventAction, tt as toDate, u as eventTime } from "./webhooks-Bc6QhmI8-eK71_mJE.js";
2
+ import { n as approvalId, r as toActor, s as toThreadKind, t as FORGE } from "./gitlab-CS0shW2u.js";
3
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/feed-B1OiHFg0.mjs
5
4
  const FEED_STATES = {
6
5
  opened: {
7
6
  action: "opened",
@@ -175,5 +174,4 @@ function toFeedEvent(instance, raw, repo) {
175
174
  payload: raw
176
175
  };
177
176
  }
178
- //#endregion
179
177
  export { toFeedEvent };
@@ -1,7 +1,6 @@
1
- import { $ as toDate } from "./utils-DC7MBR65-B7Vr2hFm.js";
2
- import { d as eventTime, i as refEvent, u as eventAction } from "./webhooks-Bc6QhmI8-CNgCERCq.js";
3
- import { a as toRepoRef, n as toActor, t as FORGE } from "./gitee-BXyl2_3W-dQOAjWqr.js";
4
- //#region ../../node_modules/.pnpm/forges@0.3.1/node_modules/forges/dist/feed-CIaAZINm.mjs
1
+ import { i as refEvent, l as eventAction, tt as toDate, u as eventTime } from "./webhooks-Bc6QhmI8-eK71_mJE.js";
2
+ import { a as toRepoRef, n as toActor, t as FORGE } from "./gitee-CKt4pEC0-BuLWggck.js";
3
+ // ../../node_modules/.pnpm/forges@0.4.1/node_modules/forges/dist/feed-DROLF1tb.mjs
5
4
  /** Summaries of the feed event types that have no shared kind. */
6
5
  const FEED_SUMMARIES = { WatchEvent: "watched the repository" };
7
6
  const THREAD_TYPES = {
@@ -130,5 +129,4 @@ function toFeedEvent(instance, raw) {
130
129
  payload: raw
131
130
  };
132
131
  }
133
- //#endregion
134
132
  export { toFeedEvent };