forges 0.0.0 → 0.1.0

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 (152) hide show
  1. package/LICENCE +21 -0
  2. package/README.md +72 -0
  3. package/dist/azure-devops/index.d.mts +2 -0
  4. package/dist/azure-devops/index.mjs +1 -0
  5. package/dist/azure-devops-DwQvL4TV.mjs +1355 -0
  6. package/dist/bitbucket/index.d.mts +2 -0
  7. package/dist/bitbucket/index.mjs +1 -0
  8. package/dist/bitbucket-CpcfJlYi.mjs +1171 -0
  9. package/dist/crypto-CQNEyYHD.mjs +156 -0
  10. package/dist/cursor-origin/index.d.mts +2 -0
  11. package/dist/cursor-origin/index.mjs +1 -0
  12. package/dist/cursor-origin-BhqYx2oW.mjs +980 -0
  13. package/dist/define-B2_4ob2i.d.mts +307 -0
  14. package/dist/define-D3yEXtKK.mjs +2276 -0
  15. package/dist/env.d.mts +46 -0
  16. package/dist/env.mjs +283 -0
  17. package/dist/fake/index.d.mts +227 -0
  18. package/dist/fake/index.mjs +1001 -0
  19. package/dist/fetch-D4pSRvvA.d.mts +1723 -0
  20. package/dist/forgejo/index.d.mts +2 -0
  21. package/dist/forgejo/index.mjs +1 -0
  22. package/dist/forgejo-BCefbHUN.mjs +2005 -0
  23. package/dist/gitea/index.d.mts +2 -0
  24. package/dist/gitea/index.mjs +22 -0
  25. package/dist/gitee/index.d.mts +2 -0
  26. package/dist/gitee/index.mjs +1 -0
  27. package/dist/gitee-CA-f7Rs8.mjs +1272 -0
  28. package/dist/github/index.d.mts +2 -0
  29. package/dist/github/index.mjs +1 -0
  30. package/dist/github-B0umL8_f.mjs +3259 -0
  31. package/dist/gitlab/index.d.mts +2 -0
  32. package/dist/gitlab/index.mjs +1 -0
  33. package/dist/gitlab-Bsr__Z0C.mjs +2378 -0
  34. package/dist/graphql-D7uGzZTf.mjs +366 -0
  35. package/dist/index-BQ6VS31s.d.mts +32 -0
  36. package/dist/index-C-jz9Mo3.d.mts +16 -0
  37. package/dist/index-C4fYzmK3.d.mts +102 -0
  38. package/dist/index-CQiIX4SH.d.mts +27 -0
  39. package/dist/index-CTj5gQzl.d.mts +35 -0
  40. package/dist/index-CliBWzOF.d.mts +23 -0
  41. package/dist/index-Cz_y-t3d.d.mts +36 -0
  42. package/dist/index-DEt25E1w.d.mts +77 -0
  43. package/dist/index-DIuS0EOy.d.mts +43 -0
  44. package/dist/index-uSpsMCrC.d.mts +26 -0
  45. package/dist/index.d.mts +41 -0
  46. package/dist/index.mjs +13 -0
  47. package/dist/kit.d.mts +183 -0
  48. package/dist/kit.mjs +4 -0
  49. package/dist/provider-CoZ7cCxp.d.mts +1439 -0
  50. package/dist/provider-Ed1YhkQN.mjs +169 -0
  51. package/dist/pushin/index.d.mts +2 -0
  52. package/dist/pushin/index.mjs +1 -0
  53. package/dist/pushin-CkxgJ2cU.mjs +343 -0
  54. package/dist/schema/Actor.json +96 -0
  55. package/dist/schema/AlertSupport.json +49 -0
  56. package/dist/schema/AuthKind.json +15 -0
  57. package/dist/schema/Branch.json +31 -0
  58. package/dist/schema/ChangedFile.json +58 -0
  59. package/dist/schema/Check.json +169 -0
  60. package/dist/schema/CheckRef.json +114 -0
  61. package/dist/schema/CheckState.json +14 -0
  62. package/dist/schema/ChecksSummary.json +34 -0
  63. package/dist/schema/CiJob.json +186 -0
  64. package/dist/schema/CiJobRef.json +132 -0
  65. package/dist/schema/CiRun.json +234 -0
  66. package/dist/schema/CiRunRef.json +103 -0
  67. package/dist/schema/CodeFragment.json +19 -0
  68. package/dist/schema/CodeMatch.json +128 -0
  69. package/dist/schema/Collaborator.json +169 -0
  70. package/dist/schema/Comment.json +336 -0
  71. package/dist/schema/CommentRef.json +158 -0
  72. package/dist/schema/Commit.json +307 -0
  73. package/dist/schema/CommitRef.json +104 -0
  74. package/dist/schema/CommitSignature.json +118 -0
  75. package/dist/schema/Comparison.json +355 -0
  76. package/dist/schema/Cursor.json +21 -0
  77. package/dist/schema/EventAction.json +33 -0
  78. package/dist/schema/EventDetail.json +649 -0
  79. package/dist/schema/EventKind.json +26 -0
  80. package/dist/schema/FileContent.json +73 -0
  81. package/dist/schema/FileStatus.json +15 -0
  82. package/dist/schema/ForgeCapabilities.json +737 -0
  83. package/dist/schema/ForgeEvent.json +789 -0
  84. package/dist/schema/ForgeInstance.json +7 -0
  85. package/dist/schema/ForgeKind.json +32 -0
  86. package/dist/schema/ForgeWarning.json +49 -0
  87. package/dist/schema/ForgeWarningCode.json +7 -0
  88. package/dist/schema/GetManyResult.json +699 -0
  89. package/dist/schema/Installation.json +131 -0
  90. package/dist/schema/InstallationToken.json +31 -0
  91. package/dist/schema/KnownForgeKind.json +19 -0
  92. package/dist/schema/Label.json +22 -0
  93. package/dist/schema/MergeMethod.json +14 -0
  94. package/dist/schema/Milestone.json +40 -0
  95. package/dist/schema/Notification.json +498 -0
  96. package/dist/schema/NotificationReason.json +28 -0
  97. package/dist/schema/NotificationRef.json +60 -0
  98. package/dist/schema/NotificationSubject.json +376 -0
  99. package/dist/schema/PerKind.json +49 -0
  100. package/dist/schema/PullBranches.json +125 -0
  101. package/dist/schema/PushCommit.json +24 -0
  102. package/dist/schema/Reaction.json +148 -0
  103. package/dist/schema/ReactionContent.json +17 -0
  104. package/dist/schema/ReactionSummary.json +70 -0
  105. package/dist/schema/Release.json +286 -0
  106. package/dist/schema/ReleaseAsset.json +169 -0
  107. package/dist/schema/ReleaseAssetRef.json +138 -0
  108. package/dist/schema/ReleaseRef.json +107 -0
  109. package/dist/schema/Repo.json +354 -0
  110. package/dist/schema/RepoFeatures.json +35 -0
  111. package/dist/schema/RepoPermissions.json +35 -0
  112. package/dist/schema/RepoRef.json +77 -0
  113. package/dist/schema/RepoRole.json +15 -0
  114. package/dist/schema/RepoVisibility.json +12 -0
  115. package/dist/schema/Review.json +371 -0
  116. package/dist/schema/ReviewComment.json +280 -0
  117. package/dist/schema/ReviewCommentInput.json +34 -0
  118. package/dist/schema/ReviewRef.json +158 -0
  119. package/dist/schema/ReviewState.json +15 -0
  120. package/dist/schema/Reviewer.json +133 -0
  121. package/dist/schema/SecurityAlert.json +219 -0
  122. package/dist/schema/SecurityAlertKind.json +14 -0
  123. package/dist/schema/SecurityAlertRef.json +122 -0
  124. package/dist/schema/SecuritySeverity.json +14 -0
  125. package/dist/schema/SourceKind.json +12 -0
  126. package/dist/schema/SubscriptionState.json +12 -0
  127. package/dist/schema/Support.json +23 -0
  128. package/dist/schema/Tag.json +25 -0
  129. package/dist/schema/TextLimits.json +18 -0
  130. package/dist/schema/Thread.json +653 -0
  131. package/dist/schema/ThreadKind.json +14 -0
  132. package/dist/schema/ThreadRef.json +131 -0
  133. package/dist/schema/ThreadStack.json +146 -0
  134. package/dist/schema/ThreadState.json +13 -0
  135. package/dist/schema/TreeEntry.json +46 -0
  136. package/dist/schema/TreeEntryType.json +13 -0
  137. package/dist/schema/UpsertCommentResult.json +355 -0
  138. package/dist/schema/User.json +123 -0
  139. package/dist/schema/Webhook.json +188 -0
  140. package/dist/schema/WebhookDeliveryRecord.json +173 -0
  141. package/dist/schema/WebhookDeliveryRef.json +135 -0
  142. package/dist/schema/WebhookRef.json +105 -0
  143. package/dist/schema/index.d.mts +4 -0
  144. package/dist/schema/index.mjs +3219 -0
  145. package/dist/tangled/index.d.mts +2 -0
  146. package/dist/tangled/index.mjs +1 -0
  147. package/dist/tangled-ChdPmiv-.mjs +1570 -0
  148. package/dist/testing/index.d.mts +123 -0
  149. package/dist/testing/index.mjs +242 -0
  150. package/dist/webhooks-rn9-8lxT.mjs +70 -0
  151. package/package.json +115 -3
  152. package/dist/.gitkeep +0 -0
@@ -0,0 +1,219 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "ref": {
6
+ "$ref": "#/definitions/SecurityAlertRef"
7
+ },
8
+ "kind": {
9
+ "$ref": "#/definitions/SecurityAlertKind"
10
+ },
11
+ "kindRaw": {
12
+ "type": "string"
13
+ },
14
+ "severity": {
15
+ "$ref": "#/definitions/SecuritySeverity"
16
+ },
17
+ "severityRaw": {
18
+ "type": "string"
19
+ },
20
+ "state": {
21
+ "type": "string",
22
+ "enum": [
23
+ "open",
24
+ "fixed",
25
+ "dismissed",
26
+ "unknown"
27
+ ]
28
+ },
29
+ "stateRaw": {
30
+ "type": "string"
31
+ },
32
+ "title": {
33
+ "type": "string",
34
+ "description": "A short description of the problem."
35
+ },
36
+ "package": {
37
+ "type": "object",
38
+ "properties": {
39
+ "ecosystem": {
40
+ "type": "string"
41
+ },
42
+ "name": {
43
+ "type": "string"
44
+ },
45
+ "vulnerableRange": {
46
+ "type": "string"
47
+ },
48
+ "fixedIn": {
49
+ "type": "string"
50
+ }
51
+ },
52
+ "required": [
53
+ "name"
54
+ ],
55
+ "description": "`ecosystem` is absent where the forge reports only the package name."
56
+ },
57
+ "url": {
58
+ "type": "string"
59
+ },
60
+ "createdAt": {
61
+ "type": "string",
62
+ "format": "date-time"
63
+ },
64
+ "updatedAt": {
65
+ "type": "string",
66
+ "format": "date-time"
67
+ },
68
+ "dismissedAt": {
69
+ "type": "string",
70
+ "format": "date-time"
71
+ },
72
+ "raw": {}
73
+ },
74
+ "required": [
75
+ "ref",
76
+ "kind",
77
+ "kindRaw",
78
+ "severity",
79
+ "state",
80
+ "stateRaw",
81
+ "title",
82
+ "raw"
83
+ ],
84
+ "description": "A security alert on a repository.",
85
+ "x-forges-type": "SecurityAlert",
86
+ "definitions": {
87
+ "ForgeInstance": {
88
+ "type": "string",
89
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
90
+ "x-forges-type": "ForgeInstance"
91
+ },
92
+ "ForgeKind": {
93
+ "anyOf": [
94
+ {
95
+ "$ref": "#/definitions/KnownForgeKind"
96
+ },
97
+ {
98
+ "type": "string"
99
+ }
100
+ ],
101
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
102
+ "x-forges-type": "ForgeKind"
103
+ },
104
+ "KnownForgeKind": {
105
+ "type": "string",
106
+ "enum": [
107
+ "github",
108
+ "gitlab",
109
+ "bitbucket",
110
+ "forgejo",
111
+ "gitea",
112
+ "tangled",
113
+ "gitee",
114
+ "azure-devops",
115
+ "cursor-origin",
116
+ "pushin"
117
+ ],
118
+ "description": "The forges this package ships providers for.",
119
+ "x-forges-type": "KnownForgeKind"
120
+ },
121
+ "RepoRef": {
122
+ "type": "object",
123
+ "properties": {
124
+ "forge": {
125
+ "$ref": "#/definitions/ForgeKind"
126
+ },
127
+ "instance": {
128
+ "$ref": "#/definitions/ForgeInstance",
129
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
130
+ },
131
+ "owner": {
132
+ "type": "string",
133
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
134
+ },
135
+ "name": {
136
+ "type": "string",
137
+ "description": "Repository name. Empty for namespace-scoped refs."
138
+ },
139
+ "kind": {
140
+ "type": "string",
141
+ "enum": [
142
+ "repo",
143
+ "namespace"
144
+ ],
145
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
146
+ },
147
+ "externalId": {
148
+ "type": "string",
149
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
150
+ }
151
+ },
152
+ "required": [
153
+ "forge",
154
+ "instance",
155
+ "name",
156
+ "owner"
157
+ ],
158
+ "description": "Addresses a repository by its forge, instance, owner and name.",
159
+ "x-forges-type": "RepoRef"
160
+ },
161
+ "SecurityAlertKind": {
162
+ "type": "string",
163
+ "enum": [
164
+ "dependency",
165
+ "code_scanning",
166
+ "secret",
167
+ "advisory",
168
+ "other"
169
+ ],
170
+ "description": "What an alert is about. `other` is a kind that the model does not name.",
171
+ "x-forges-type": "SecurityAlertKind"
172
+ },
173
+ "SecurityAlertRef": {
174
+ "type": "object",
175
+ "properties": {
176
+ "forge": {
177
+ "$ref": "#/definitions/ForgeKind"
178
+ },
179
+ "instance": {
180
+ "$ref": "#/definitions/ForgeInstance",
181
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
182
+ },
183
+ "repo": {
184
+ "$ref": "#/definitions/RepoRef"
185
+ },
186
+ "id": {
187
+ "type": "string",
188
+ "description": "Forge-native alert id. GitHub numbers each alert kind separately, so `kind` is needed to address one."
189
+ },
190
+ "kind": {
191
+ "$ref": "#/definitions/SecurityAlertKind"
192
+ },
193
+ "severityRaw": {
194
+ "type": "string"
195
+ }
196
+ },
197
+ "required": [
198
+ "forge",
199
+ "id",
200
+ "instance",
201
+ "repo"
202
+ ],
203
+ "description": "A security alert: a vulnerable dependency, a code scanning result, a leaked secret or an advisory.",
204
+ "x-forges-type": "SecurityAlertRef"
205
+ },
206
+ "SecuritySeverity": {
207
+ "type": "string",
208
+ "enum": [
209
+ "critical",
210
+ "high",
211
+ "medium",
212
+ "low",
213
+ "unknown"
214
+ ],
215
+ "description": "How severe an alert is. `unknown` is a level that the model does not name.",
216
+ "x-forges-type": "SecuritySeverity"
217
+ }
218
+ }
219
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "string",
4
+ "enum": [
5
+ "dependency",
6
+ "code_scanning",
7
+ "secret",
8
+ "advisory",
9
+ "other"
10
+ ],
11
+ "description": "What an alert is about. `other` is a kind that the model does not name.",
12
+ "x-forges-type": "SecurityAlertKind",
13
+ "definitions": {}
14
+ }
@@ -0,0 +1,122 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "forge": {
6
+ "$ref": "#/definitions/ForgeKind"
7
+ },
8
+ "instance": {
9
+ "$ref": "#/definitions/ForgeInstance",
10
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
11
+ },
12
+ "repo": {
13
+ "$ref": "#/definitions/RepoRef"
14
+ },
15
+ "id": {
16
+ "type": "string",
17
+ "description": "Forge-native alert id. GitHub numbers each alert kind separately, so `kind` is needed to address one."
18
+ },
19
+ "kind": {
20
+ "$ref": "#/definitions/SecurityAlertKind"
21
+ },
22
+ "severityRaw": {
23
+ "type": "string"
24
+ }
25
+ },
26
+ "required": [
27
+ "forge",
28
+ "id",
29
+ "instance",
30
+ "repo"
31
+ ],
32
+ "description": "A security alert: a vulnerable dependency, a code scanning result, a leaked secret or an advisory.",
33
+ "x-forges-type": "SecurityAlertRef",
34
+ "definitions": {
35
+ "ForgeInstance": {
36
+ "type": "string",
37
+ "description": "Host of a single forge deployment, for example `github.com` or `codeberg.org`.",
38
+ "x-forges-type": "ForgeInstance"
39
+ },
40
+ "ForgeKind": {
41
+ "anyOf": [
42
+ {
43
+ "$ref": "#/definitions/KnownForgeKind"
44
+ },
45
+ {
46
+ "type": "string"
47
+ }
48
+ ],
49
+ "description": "Identifier of a forge implementation. Unknown forges are permitted so that third-party providers can be registered without a core release.",
50
+ "x-forges-type": "ForgeKind"
51
+ },
52
+ "KnownForgeKind": {
53
+ "type": "string",
54
+ "enum": [
55
+ "github",
56
+ "gitlab",
57
+ "bitbucket",
58
+ "forgejo",
59
+ "gitea",
60
+ "tangled",
61
+ "gitee",
62
+ "azure-devops",
63
+ "cursor-origin",
64
+ "pushin"
65
+ ],
66
+ "description": "The forges this package ships providers for.",
67
+ "x-forges-type": "KnownForgeKind"
68
+ },
69
+ "RepoRef": {
70
+ "type": "object",
71
+ "properties": {
72
+ "forge": {
73
+ "$ref": "#/definitions/ForgeKind"
74
+ },
75
+ "instance": {
76
+ "$ref": "#/definitions/ForgeInstance",
77
+ "description": "The host of the instance, such as `github.com` or `git.example.com`."
78
+ },
79
+ "owner": {
80
+ "type": "string",
81
+ "description": "Full namespace path. On forges with nested groups (GitLab) this contains slashes, for example `acme/platform`; `name` never does."
82
+ },
83
+ "name": {
84
+ "type": "string",
85
+ "description": "Repository name. Empty for namespace-scoped refs."
86
+ },
87
+ "kind": {
88
+ "type": "string",
89
+ "enum": [
90
+ "repo",
91
+ "namespace"
92
+ ],
93
+ "description": "`'namespace'` for subjects that belong to a group rather than a repository (GitLab epics). Absent means a repository."
94
+ },
95
+ "externalId": {
96
+ "type": "string",
97
+ "description": "Stable forge-native identifier that survives renames and transfers: a GitHub, Forgejo or Gitea numeric id, a GitLab project or group id, a Bitbucket UUID or a Tangled repo DID. {@link repoKey} prefers it over `owner` and `name`."
98
+ }
99
+ },
100
+ "required": [
101
+ "forge",
102
+ "instance",
103
+ "name",
104
+ "owner"
105
+ ],
106
+ "description": "Addresses a repository by its forge, instance, owner and name.",
107
+ "x-forges-type": "RepoRef"
108
+ },
109
+ "SecurityAlertKind": {
110
+ "type": "string",
111
+ "enum": [
112
+ "dependency",
113
+ "code_scanning",
114
+ "secret",
115
+ "advisory",
116
+ "other"
117
+ ],
118
+ "description": "What an alert is about. `other` is a kind that the model does not name.",
119
+ "x-forges-type": "SecurityAlertKind"
120
+ }
121
+ }
122
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "string",
4
+ "enum": [
5
+ "critical",
6
+ "high",
7
+ "medium",
8
+ "low",
9
+ "unknown"
10
+ ],
11
+ "description": "How severe an alert is. `unknown` is a level that the model does not name.",
12
+ "x-forges-type": "SecuritySeverity",
13
+ "definitions": {}
14
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "string",
4
+ "enum": [
5
+ "poll",
6
+ "webhook",
7
+ "subscribe"
8
+ ],
9
+ "description": "How an event reached the caller.",
10
+ "x-forges-type": "SourceKind",
11
+ "definitions": {}
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "string",
4
+ "enum": [
5
+ "subscribed",
6
+ "ignored",
7
+ "none"
8
+ ],
9
+ "description": "Whether the account gets notifications for a thread.",
10
+ "x-forges-type": "SubscriptionState",
11
+ "definitions": {}
12
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "anyOf": [
4
+ {
5
+ "type": "boolean"
6
+ },
7
+ {
8
+ "type": "string",
9
+ "const": "emulated"
10
+ },
11
+ {
12
+ "type": "string",
13
+ "const": "experimental"
14
+ },
15
+ {
16
+ "type": "string",
17
+ "const": "unverified"
18
+ }
19
+ ],
20
+ "description": "Capability flag. Every value other than `false` means the operation is available:\n\n- `true`: native, and verified against the forge's responses.\n- `'experimental'`: native and verified, but built on an API the forge marks unstable, so it can change.\n- `'emulated'`: composed from other calls, so the result is approximate.\n- `'unverified'`: implemented, but not yet verified against the forge's responses, so it may not work.",
21
+ "x-forges-type": "Support",
22
+ "definitions": {}
23
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "name": {
6
+ "type": "string"
7
+ },
8
+ "sha": {
9
+ "type": "string",
10
+ "description": "Commit the tag points at, after dereferencing an annotated tag where the forge does so."
11
+ },
12
+ "url": {
13
+ "type": "string"
14
+ },
15
+ "raw": {}
16
+ },
17
+ "required": [
18
+ "name",
19
+ "sha",
20
+ "raw"
21
+ ],
22
+ "description": "A tag of a repository.",
23
+ "x-forges-type": "Tag",
24
+ "definitions": {}
25
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "bodyLength": {
6
+ "type": "number"
7
+ },
8
+ "commentLength": {
9
+ "type": "number"
10
+ },
11
+ "labelLength": {
12
+ "type": "number"
13
+ }
14
+ },
15
+ "description": "Maximum lengths the forge accepts, in characters.",
16
+ "x-forges-type": "TextLimits",
17
+ "definitions": {}
18
+ }