@dxos/plugin-github 0.13.0 → 0.16.0-next-60712ab191a99ba90316cc4be753e9e11b17100a
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.
- package/dist/lib/GitHubCapabilities.mjs +1 -10
- package/dist/lib/GitHubEvents.mjs +1 -15
- package/dist/lib/GitHubOperation.mjs +1 -358
- package/dist/lib/GitHubPlugin.mjs +1 -16
- package/dist/lib/Walkthrough.mjs +1 -59
- package/dist/lib/capabilities.browser.mjs +1 -2
- package/dist/lib/capabilities.browser.mjs.map +1 -1
- package/dist/lib/capabilities.mjs +1 -2
- package/dist/lib/capabilities.mjs.map +1 -1
- package/dist/lib/capabilities.tauri.mjs +1 -2
- package/dist/lib/capabilities.tauri.mjs.map +1 -1
- package/dist/lib/chunk-Extensions.mjs +18 -0
- package/dist/lib/chunk-Extensions.mjs.map +1 -0
- package/dist/lib/chunk-GitHubCapabilities.mjs +10 -0
- package/dist/lib/chunk-GitHubCapabilities.mjs.map +1 -0
- package/dist/lib/chunk-GitHubEvents.mjs +15 -0
- package/dist/lib/chunk-GitHubEvents.mjs.map +1 -0
- package/dist/lib/chunk-GitHubOperation.mjs +386 -0
- package/dist/lib/chunk-GitHubOperation.mjs.map +1 -0
- package/dist/lib/chunk-GitHubPlugin.mjs +16 -0
- package/dist/lib/chunk-GitHubPlugin.mjs.map +1 -0
- package/dist/lib/chunk-ImportPullRequestDialog.mjs.map +1 -1
- package/dist/lib/chunk-PLUGIN.mjs +1 -1
- package/dist/lib/chunk-PullRequestArticle.mjs +64 -21
- package/dist/lib/chunk-PullRequestArticle.mjs.map +1 -1
- package/dist/lib/chunk-PullRequestArticle2.mjs +1 -2
- package/dist/lib/chunk-PullRequestCardMenu.mjs +1 -1
- package/dist/lib/chunk-PullRequestsArticle.mjs +3 -3
- package/dist/lib/chunk-PullRequestsArticle.mjs.map +1 -1
- package/dist/lib/chunk-Walkthrough.mjs +59 -0
- package/dist/lib/chunk-Walkthrough.mjs.map +1 -0
- package/dist/lib/chunk-WalkthroughArticle.mjs +1 -1
- package/dist/lib/chunk-add-pull-request-comment.mjs.map +1 -1
- package/dist/lib/chunk-add-pull-request-review-comment.mjs.map +1 -1
- package/dist/lib/chunk-connector.mjs.map +1 -1
- package/dist/lib/chunk-generate-walkthrough.mjs.map +1 -1
- package/dist/lib/chunk-get-pull-request-diff.mjs.map +1 -1
- package/dist/lib/chunk-get-pull-request-status.mjs.map +1 -1
- package/dist/lib/chunk-get-repositories.mjs.map +1 -1
- package/dist/lib/chunk-github-api.mjs +1 -0
- package/dist/lib/chunk-github-api.mjs.map +1 -1
- package/dist/lib/chunk-import-pull-request.mjs +78 -3
- package/dist/lib/chunk-import-pull-request.mjs.map +1 -1
- package/dist/lib/chunk-link-resolver.mjs.map +1 -1
- package/dist/lib/chunk-pull-request2.mjs +1 -0
- package/dist/lib/chunk-pull-request2.mjs.map +1 -1
- package/dist/lib/chunk-react-surface.mjs +4 -4
- package/dist/lib/chunk-react-surface.mjs.map +1 -1
- package/dist/lib/chunk-refresh-pull-requests.mjs +49 -0
- package/dist/lib/chunk-refresh-pull-requests.mjs.map +1 -0
- package/dist/lib/chunk-submit-pull-request-approval.mjs.map +1 -1
- package/dist/lib/chunk-sync-pull-request.mjs +11 -9
- package/dist/lib/chunk-sync-pull-request.mjs.map +1 -1
- package/dist/lib/chunk-sync.mjs.map +1 -1
- package/dist/lib/index.mjs +2 -2
- package/dist/lib/meta.mjs.map +1 -1
- package/dist/lib/ns/Extensions.mjs +2 -16
- package/dist/lib/operations.mjs +2 -1
- package/dist/lib/operations.mjs.map +1 -1
- package/dist/lib/types.mjs +4 -4
- package/dist/types/src/capabilities/gen/browser.d.ts.map +1 -1
- package/dist/types/src/capabilities/gen/tauri.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/cards/GitHubCard.d.ts.map +1 -1
- package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts +6 -3
- package/dist/types/src/components/PullRequestOverview/CheckRunList.d.ts.map +1 -1
- package/dist/types/src/components/PullRequestOverview/CheckRunList.test.d.ts +2 -0
- package/dist/types/src/components/PullRequestOverview/CheckRunList.test.d.ts.map +1 -0
- package/dist/types/src/components/PullRequestOverview/PullRequestOverview.d.ts.map +1 -1
- package/dist/types/src/components/PullRequestStatus/PullRequestStatus.d.ts.map +1 -1
- package/dist/types/src/operations/import-pull-request.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/pull-request.d.ts.map +1 -1
- package/dist/types/src/operations/refresh-pull-requests.d.ts +5 -0
- package/dist/types/src/operations/refresh-pull-requests.d.ts.map +1 -0
- package/dist/types/src/operations/refresh.d.ts +37 -0
- package/dist/types/src/operations/refresh.d.ts.map +1 -0
- package/dist/types/src/operations/refresh.test.d.ts +2 -0
- package/dist/types/src/operations/refresh.test.d.ts.map +1 -0
- package/dist/types/src/operations/sync-pull-request.d.ts.map +1 -1
- package/dist/types/src/services/github-api.d.ts +1 -0
- package/dist/types/src/services/github-api.d.ts.map +1 -1
- package/dist/types/src/stories/PullRequestOverview.stories.d.ts +2 -0
- package/dist/types/src/stories/PullRequestOverview.stories.d.ts.map +1 -1
- package/dist/types/src/types/GitHubOperation.d.ts +14 -0
- package/dist/types/src/types/GitHubOperation.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +47 -47
- package/src/capabilities/gen/browser.ts +1 -3
- package/src/capabilities/gen/tauri.ts +1 -3
- package/src/capabilities/index.ts +1 -4
- package/src/cards/GitHubCard.tsx +7 -3
- package/src/components/PullRequestOverview/ArtifactPill.tsx +1 -1
- package/src/components/PullRequestOverview/CheckRunList.test.ts +29 -0
- package/src/components/PullRequestOverview/CheckRunList.tsx +62 -13
- package/src/components/PullRequestOverview/PullRequestOverview.tsx +5 -1
- package/src/components/PullRequestStatus/PullRequestStatus.tsx +8 -5
- package/src/containers/PullRequestsArticle/PullRequestsArticle.tsx +12 -10
- package/src/operations/import-pull-request.ts +8 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/pull-request.ts +1 -0
- package/src/operations/refresh-pull-requests.ts +69 -0
- package/src/operations/refresh.test.ts +112 -0
- package/src/operations/refresh.ts +111 -0
- package/src/operations/sync-pull-request.ts +10 -13
- package/src/services/github-api.ts +1 -0
- package/src/stories/PullRequestOverview.stories.tsx +22 -1
- package/src/types/GitHubOperation.ts +28 -0
- package/dist/lib/GitHubCapabilities.mjs.map +0 -1
- package/dist/lib/GitHubEvents.mjs.map +0 -1
- package/dist/lib/GitHubOperation.mjs.map +0 -1
- package/dist/lib/GitHubPlugin.mjs.map +0 -1
- package/dist/lib/Walkthrough.mjs.map +0 -1
- package/dist/lib/ns/Extensions.mjs.map +0 -1
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
-
import { meta } from "#meta";
|
|
4
|
-
//#region src/types/GitHubCapabilities.ts
|
|
5
|
-
var GitHubCapabilities_exports = /* @__PURE__ */ __exportAll({ LinkSource: () => LinkSource });
|
|
6
|
-
var LinkSource = Capability.make()(`${meta.profile.key}.capability.linkSource`);
|
|
7
|
-
//#endregion
|
|
8
|
-
export { LinkSource, GitHubCapabilities_exports as t };
|
|
9
|
-
|
|
10
|
-
//# sourceMappingURL=GitHubCapabilities.mjs.map
|
|
1
|
+
export { n as LinkSource } from "./chunk-GitHubCapabilities.mjs";
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { meta } from "#meta";
|
|
3
|
-
import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
|
|
4
|
-
//#region src/types/GitHubEvents.ts
|
|
5
|
-
var GitHubEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
|
|
6
|
-
/**
|
|
7
|
-
* The feature's start event: the plugin's start-gated modules (and cross-plugin
|
|
8
|
-
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
9
|
-
* host's idle trickle.
|
|
10
|
-
*/
|
|
11
|
-
var Start = ActivationEvent.pluginStart(meta.profile.key);
|
|
12
|
-
//#endregion
|
|
13
|
-
export { Start, GitHubEvents_exports as t };
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=GitHubEvents.mjs.map
|
|
1
|
+
export { n as Start } from "./chunk-GitHubEvents.mjs";
|
|
@@ -1,358 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { Walkthrough } from "./Walkthrough.mjs";
|
|
3
|
-
import * as ConnectorSpec from "@dxos/plugin-connector/ConnectorSpec";
|
|
4
|
-
import * as Operation from "@dxos/compute/Operation";
|
|
5
|
-
import { PullRequest } from "@dxos/types";
|
|
6
|
-
import { DXN, Database, Obj, Ref } from "@dxos/echo";
|
|
7
|
-
import * as Schema from "effect/Schema";
|
|
8
|
-
import { AiService } from "@dxos/ai";
|
|
9
|
-
import * as Trace from "@dxos/compute/Trace";
|
|
10
|
-
import * as PageAction from "@dxos/plugin-crx/PageAction";
|
|
11
|
-
//#region src/types/GitHubOperation.ts
|
|
12
|
-
var GitHubOperation_exports = /* @__PURE__ */ __exportAll({
|
|
13
|
-
AddPullRequestComment: () => AddPullRequestComment,
|
|
14
|
-
AddPullRequestReviewComment: () => AddPullRequestReviewComment,
|
|
15
|
-
CheckCounts: () => CheckCounts,
|
|
16
|
-
CheckOutcome: () => CheckOutcome,
|
|
17
|
-
CheckRun: () => CheckRun,
|
|
18
|
-
CiState: () => CiState,
|
|
19
|
-
GenerateWalkthrough: () => GenerateWalkthrough,
|
|
20
|
-
GetGitHubRepositories: () => GetGitHubRepositories,
|
|
21
|
-
GetPullRequestDiff: () => GetPullRequestDiff,
|
|
22
|
-
GetPullRequestStatus: () => GetPullRequestStatus,
|
|
23
|
-
ImportPullRequest: () => ImportPullRequest,
|
|
24
|
-
ImportPullRequestFromSnapshot: () => ImportPullRequestFromSnapshot,
|
|
25
|
-
MaterializeGitHubTarget: () => MaterializeGitHubTarget,
|
|
26
|
-
ReviewState: () => ReviewState,
|
|
27
|
-
SubmitPullRequestApproval: () => SubmitPullRequestApproval,
|
|
28
|
-
SyncGitHubRepositories: () => SyncGitHubRepositories,
|
|
29
|
-
SyncOptions: () => SyncOptions,
|
|
30
|
-
SyncPullRequest: () => SyncPullRequest,
|
|
31
|
-
createWalkthroughProgressKey: () => createWalkthroughProgressKey
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* Discovery only — list GitHub repositories the connection's token can see.
|
|
35
|
-
* Returns one descriptor per repo across all the user's orgs (and personal
|
|
36
|
-
* account). Read-only: NEVER materializes local objects — materialization is
|
|
37
|
-
* handled by the connector's `materializeTarget` when a `Cursor` is created.
|
|
38
|
-
*
|
|
39
|
-
* Orgs and their members are NOT presented as sync targets — they are
|
|
40
|
-
* auto-synced as part of the sync of any repo they own.
|
|
41
|
-
*/
|
|
42
|
-
var GetGitHubRepositories = Operation.make({
|
|
43
|
-
meta: {
|
|
44
|
-
key: DXN.make("org.dxos.operation.github.getRepositories"),
|
|
45
|
-
name: "Get GitHub Repositories",
|
|
46
|
-
description: "List GitHub repositories reachable from a connection without materializing local objects.",
|
|
47
|
-
icon: "ph--github-logo--regular"
|
|
48
|
-
},
|
|
49
|
-
input: ConnectorSpec.GetSyncTargetsInput,
|
|
50
|
-
output: ConnectorSpec.GetSyncTargetsOutput
|
|
51
|
-
});
|
|
52
|
-
/**
|
|
53
|
-
* Find-or-create the empty local root Project for a selected GitHub repo so a
|
|
54
|
-
* cursor can reference it as its `spec.target`. Keyed by the repo's
|
|
55
|
-
* GitHub foreign id (`remoteTarget.id`), so it is idempotent across re-selection.
|
|
56
|
-
*/
|
|
57
|
-
var MaterializeGitHubTarget = Operation.make({
|
|
58
|
-
meta: {
|
|
59
|
-
key: DXN.make("org.dxos.operation.github.materializeTarget"),
|
|
60
|
-
name: "Materialize GitHub Target",
|
|
61
|
-
description: "Create the empty local root Project bound to a selected GitHub repository.",
|
|
62
|
-
icon: "ph--github-logo--regular"
|
|
63
|
-
},
|
|
64
|
-
input: ConnectorSpec.MaterializeTargetInput,
|
|
65
|
-
output: ConnectorSpec.MaterializeTargetOutput
|
|
66
|
-
});
|
|
67
|
-
/**
|
|
68
|
-
* Per-target options. `maxDaysBack` caps how far back issues/PRs are pulled
|
|
69
|
-
* (mirrors the Gmail mailbox `daysBack`). Default — when unset — is "sync
|
|
70
|
-
* everything ever opened or edited."
|
|
71
|
-
*/
|
|
72
|
-
var SyncOptions = Schema.Struct({ maxDaysBack: Schema.Number.annotate({
|
|
73
|
-
title: "Sync history (days)",
|
|
74
|
-
description: "Pull issues and PRs updated within this many days. Leave empty to sync everything."
|
|
75
|
-
}).pipe(Schema.optional) });
|
|
76
|
-
/**
|
|
77
|
-
* Reconcile GitHub data for every repo bound to a connection (one cursor per repo).
|
|
78
|
-
*
|
|
79
|
-
* Pull-then-push per bound repo: auto-upsert its owning org + members,
|
|
80
|
-
* three-way merge the repo as a Project and its issues/PRs as Tasks (respecting
|
|
81
|
-
* `maxDaysBack` if set), then push diverged Project/Task fields back to GitHub.
|
|
82
|
-
* Sync state (`lastTick`/`lastError`/`spec.snapshots`) is written onto each binding.
|
|
83
|
-
*/
|
|
84
|
-
var SyncGitHubRepositories = Operation.make({
|
|
85
|
-
meta: {
|
|
86
|
-
key: DXN.make("org.dxos.operation.github.syncRepositories"),
|
|
87
|
-
name: "Sync GitHub Repositories",
|
|
88
|
-
description: "Reconcile every bound GitHub repo plus its owning org, members, issues, PRs, and comments.",
|
|
89
|
-
icon: "ph--arrows-clockwise--regular"
|
|
90
|
-
},
|
|
91
|
-
input: ConnectorSpec.SyncInput,
|
|
92
|
-
output: Schema.Struct({ pulled: Schema.Struct({
|
|
93
|
-
organizations: Schema.Number,
|
|
94
|
-
people: Schema.Number,
|
|
95
|
-
projects: Schema.Number,
|
|
96
|
-
tasks: Schema.Number,
|
|
97
|
-
comments: Schema.Number
|
|
98
|
-
}) })
|
|
99
|
-
}).pipe(Operation.visible);
|
|
100
|
-
/**
|
|
101
|
-
* Import a pull request named by a github.com URL or `owner/repo#123` into the space, so it can be
|
|
102
|
-
* opened, reviewed and walked through without waiting for a sync of the whole repository.
|
|
103
|
-
*
|
|
104
|
-
* Idempotent by coordinates — a pull request the space already holds is returned as it stands
|
|
105
|
-
* rather than duplicated.
|
|
106
|
-
*/
|
|
107
|
-
var ImportPullRequest = Operation.make({
|
|
108
|
-
meta: {
|
|
109
|
-
key: DXN.make("org.dxos.operation.github.importPullRequest"),
|
|
110
|
-
name: "Import Pull Request",
|
|
111
|
-
description: "Add a pull request to the space, named by its URL or as owner/repo#number.",
|
|
112
|
-
icon: "ph--git-pull-request--regular"
|
|
113
|
-
},
|
|
114
|
-
services: [Database.Service],
|
|
115
|
-
input: Schema.Struct({
|
|
116
|
-
/** A github.com pull request URL, or `owner/repo#123`. */
|
|
117
|
-
reference: Schema.String }),
|
|
118
|
-
output: Schema.Struct({
|
|
119
|
-
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
120
|
-
/** False where the space already held the pull request, which is then returned unchanged. */
|
|
121
|
-
imported: Schema.Boolean
|
|
122
|
-
}),
|
|
123
|
-
types: [PullRequest.PullRequest]
|
|
124
|
-
}).pipe(Operation.visible, Operation.mutation("write"));
|
|
125
|
-
/**
|
|
126
|
-
* Import the pull request the browser extension is looking at, named by the page's own URL.
|
|
127
|
-
*
|
|
128
|
-
* Separate from {@link ImportPullRequest} because the extension bridge invokes every page action
|
|
129
|
-
* with the fixed `{ snapshot, target }` shape and reads an `{ id }` back. Nothing is extracted from
|
|
130
|
-
* the page: the URL in the snapshot's source names the pull request, and GitHub is the authority on
|
|
131
|
-
* everything else.
|
|
132
|
-
*/
|
|
133
|
-
var ImportPullRequestFromSnapshot = Operation.make({
|
|
134
|
-
meta: {
|
|
135
|
-
key: DXN.make("org.dxos.operation.github.importPullRequestFromSnapshot"),
|
|
136
|
-
name: "Open pull request in Composer",
|
|
137
|
-
description: "Import the pull request a browser page shows, named by that page's URL.",
|
|
138
|
-
icon: "ph--git-pull-request--regular"
|
|
139
|
-
},
|
|
140
|
-
input: Schema.Struct({
|
|
141
|
-
snapshot: PageAction.Snapshot,
|
|
142
|
-
target: Database.Database.annotate({ description: "The database to add the pull request to." })
|
|
143
|
-
}),
|
|
144
|
-
output: Schema.Struct({ id: Schema.String }),
|
|
145
|
-
types: [PullRequest.PullRequest]
|
|
146
|
-
}).pipe(Operation.mutation("write"));
|
|
147
|
-
/**
|
|
148
|
-
* Generate a walkthrough of a pull request: one markdown document narrating the change in reading
|
|
149
|
-
* order, with its diff chunks spliced in from the patch itself.
|
|
150
|
-
*
|
|
151
|
-
* Idempotent by commit — a walkthrough already generated for the pull request's head is returned
|
|
152
|
-
* unchanged unless `force` says otherwise, since the answer cannot have changed.
|
|
153
|
-
*/
|
|
154
|
-
var GenerateWalkthrough = Operation.make({
|
|
155
|
-
meta: {
|
|
156
|
-
key: DXN.make("org.dxos.operation.github.generateWalkthrough"),
|
|
157
|
-
name: "Generate Walkthrough",
|
|
158
|
-
description: "Narrate a pull request as one markdown document, with the change's diffs embedded in it.",
|
|
159
|
-
icon: "ph--path--regular"
|
|
160
|
-
},
|
|
161
|
-
input: Schema.Struct({
|
|
162
|
-
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
163
|
-
/** Regenerate even where a walkthrough for this head already exists. */
|
|
164
|
-
force: Schema.Boolean.pipe(Schema.optional)
|
|
165
|
-
}),
|
|
166
|
-
output: Schema.Struct({
|
|
167
|
-
walkthrough: Ref.Ref(Walkthrough),
|
|
168
|
-
/** Whether the model ran, as against an existing walkthrough being returned unchanged. */
|
|
169
|
-
generated: Schema.Boolean,
|
|
170
|
-
/** Hunks the prose accounts for, over the patch's total. */
|
|
171
|
-
covered: Schema.Number,
|
|
172
|
-
total: Schema.Number
|
|
173
|
-
}),
|
|
174
|
-
types: [Walkthrough, PullRequest.PullRequest],
|
|
175
|
-
services: [Trace.TraceService, AiService.AiService]
|
|
176
|
-
}).pipe(Operation.visible);
|
|
177
|
-
/**
|
|
178
|
-
* Submit an approving review on a pull request, as the space's GitHub connection.
|
|
179
|
-
*
|
|
180
|
-
* Falls back to a marked conversation comment where GitHub refuses the review — the author's own
|
|
181
|
-
* pull request, or a token with no review permission — so the approval is still recorded and still
|
|
182
|
-
* detectable by an agent deciding whether the pull request is good to land.
|
|
183
|
-
*/
|
|
184
|
-
var SubmitPullRequestApproval = Operation.make({
|
|
185
|
-
meta: {
|
|
186
|
-
key: DXN.make("org.dxos.operation.github.submitPullRequestApproval"),
|
|
187
|
-
name: "Submit Pull Request Approval",
|
|
188
|
-
description: "Submit an approving review on a pull request, or record the approval as a comment.",
|
|
189
|
-
icon: "ph--check-circle--regular"
|
|
190
|
-
},
|
|
191
|
-
input: Schema.Struct({
|
|
192
|
-
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
193
|
-
/** Optional review summary. */
|
|
194
|
-
body: Schema.String.pipe(Schema.optional)
|
|
195
|
-
}),
|
|
196
|
-
output: Schema.Struct({
|
|
197
|
-
/** Set where the approving review was accepted. */
|
|
198
|
-
reviewId: Schema.Number.pipe(Schema.optional),
|
|
199
|
-
/** Set instead where the approval was recorded as a comment. */
|
|
200
|
-
commentId: Schema.Number.pipe(Schema.optional),
|
|
201
|
-
url: Schema.String.pipe(Schema.optional),
|
|
202
|
-
/** Whether the approval is a comment rather than a review. */
|
|
203
|
-
commented: Schema.Boolean
|
|
204
|
-
}),
|
|
205
|
-
types: [PullRequest.PullRequest]
|
|
206
|
-
});
|
|
207
|
-
/** Post a conversation comment on a pull request, as the space's GitHub connection. */
|
|
208
|
-
var AddPullRequestComment = Operation.make({
|
|
209
|
-
meta: {
|
|
210
|
-
key: DXN.make("org.dxos.operation.github.addPullRequestComment"),
|
|
211
|
-
name: "Add Pull Request Comment",
|
|
212
|
-
description: "Post a comment on a pull request.",
|
|
213
|
-
icon: "ph--chat-text--regular"
|
|
214
|
-
},
|
|
215
|
-
input: Schema.Struct({
|
|
216
|
-
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
217
|
-
body: Schema.String
|
|
218
|
-
}),
|
|
219
|
-
output: Schema.Struct({
|
|
220
|
-
commentId: Schema.Number,
|
|
221
|
-
url: Schema.String.pipe(Schema.optional)
|
|
222
|
-
}),
|
|
223
|
-
types: [PullRequest.PullRequest]
|
|
224
|
-
});
|
|
225
|
-
/** Post a review comment on one line of a pull request's diff, as the space's GitHub connection. */
|
|
226
|
-
var AddPullRequestReviewComment = Operation.make({
|
|
227
|
-
meta: {
|
|
228
|
-
key: DXN.make("org.dxos.operation.github.addPullRequestReviewComment"),
|
|
229
|
-
name: "Add Pull Request Review Comment",
|
|
230
|
-
description: "Post a review comment on a line of a pull request diff.",
|
|
231
|
-
icon: "ph--chat-centered-text--regular"
|
|
232
|
-
},
|
|
233
|
-
input: Schema.Struct({
|
|
234
|
-
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
235
|
-
body: Schema.String,
|
|
236
|
-
/** Head SHA the line numbers refer to; a walkthrough's `commit`. */
|
|
237
|
-
commit: Schema.String,
|
|
238
|
-
path: Schema.String,
|
|
239
|
-
line: Schema.Number,
|
|
240
|
-
/** `LEFT` for the removed side, `RIGHT` for added and context lines. */
|
|
241
|
-
side: Schema.Literals(["LEFT", "RIGHT"])
|
|
242
|
-
}),
|
|
243
|
-
output: Schema.Struct({
|
|
244
|
-
commentId: Schema.Number,
|
|
245
|
-
url: Schema.String.pipe(Schema.optional)
|
|
246
|
-
}),
|
|
247
|
-
types: [PullRequest.PullRequest]
|
|
248
|
-
});
|
|
249
|
-
/**
|
|
250
|
-
* Re-read a stored pull request from GitHub and write back whatever has changed — its title, state,
|
|
251
|
-
* description, branches and size — so the object in the space does not go stale between syncs.
|
|
252
|
-
*/
|
|
253
|
-
var SyncPullRequest = Operation.make({
|
|
254
|
-
meta: {
|
|
255
|
-
key: DXN.make("org.dxos.operation.github.syncPullRequest"),
|
|
256
|
-
name: "Sync Pull Request",
|
|
257
|
-
description: "Refresh a stored pull request from GitHub.",
|
|
258
|
-
icon: "ph--arrows-clockwise--regular"
|
|
259
|
-
},
|
|
260
|
-
input: Schema.Struct({ pullRequest: Ref.Ref(PullRequest.PullRequest) }),
|
|
261
|
-
output: Schema.Struct({
|
|
262
|
-
/** Names of the fields that changed; empty where the stored pull request was already current. */
|
|
263
|
-
updated: Schema.Array(Schema.String) }),
|
|
264
|
-
types: [PullRequest.PullRequest]
|
|
265
|
-
}).pipe(Operation.mutation("write"));
|
|
266
|
-
/** Aggregate outcome of a commit's check runs; `none` when the commit has no checks at all. */
|
|
267
|
-
var CiState = Schema.Literals([
|
|
268
|
-
"success",
|
|
269
|
-
"failure",
|
|
270
|
-
"pending",
|
|
271
|
-
"none"
|
|
272
|
-
]);
|
|
273
|
-
var CheckCounts = Schema.Struct({
|
|
274
|
-
total: Schema.Number,
|
|
275
|
-
passed: Schema.Number,
|
|
276
|
-
failed: Schema.Number,
|
|
277
|
-
pending: Schema.Number
|
|
278
|
-
});
|
|
279
|
-
/**
|
|
280
|
-
* Where the reviews stand, from each reviewer's latest verdict: any outstanding request for changes
|
|
281
|
-
* outweighs approvals, and `none` means no reviewer has approved or asked for changes.
|
|
282
|
-
*/
|
|
283
|
-
var ReviewState = Schema.Literals([
|
|
284
|
-
"approved",
|
|
285
|
-
"changes_requested",
|
|
286
|
-
"none"
|
|
287
|
-
]);
|
|
288
|
-
/** How one check run ended, folded to what a reader acts on; `skipped` is neither passing nor failing. */
|
|
289
|
-
var CheckOutcome = Schema.Literals([
|
|
290
|
-
"success",
|
|
291
|
-
"failure",
|
|
292
|
-
"pending",
|
|
293
|
-
"skipped",
|
|
294
|
-
"neutral"
|
|
295
|
-
]);
|
|
296
|
-
/** One check run on the head commit, as the article lists it. */
|
|
297
|
-
var CheckRun = Schema.Struct({
|
|
298
|
-
name: Schema.String,
|
|
299
|
-
outcome: CheckOutcome,
|
|
300
|
-
/** GitHub's own `conclusion` (`timed_out`, `cancelled`, …), kept for the label when it says more than the outcome. */
|
|
301
|
-
conclusion: Schema.String.pipe(Schema.optional),
|
|
302
|
-
/** Where the run's logs live: the provider's page when it has one, else GitHub's. */
|
|
303
|
-
url: Schema.String.pipe(Schema.optional),
|
|
304
|
-
startedAt: Schema.String.pipe(Schema.optional),
|
|
305
|
-
completedAt: Schema.String.pipe(Schema.optional)
|
|
306
|
-
});
|
|
307
|
-
/** Read a pull request's live state and the CI outcome of its head commit from GitHub. */
|
|
308
|
-
var GetPullRequestStatus = Operation.make({
|
|
309
|
-
meta: {
|
|
310
|
-
key: DXN.make("org.dxos.operation.github.getPullRequestStatus"),
|
|
311
|
-
name: "Get Pull Request Status",
|
|
312
|
-
description: "Read a pull request's state, its review verdict and the CI status of its head commit.",
|
|
313
|
-
icon: "ph--git-pull-request--regular"
|
|
314
|
-
},
|
|
315
|
-
input: Schema.Struct({ pullRequest: Ref.Ref(PullRequest.PullRequest) }),
|
|
316
|
-
output: Schema.Struct({
|
|
317
|
-
state: PullRequest.State,
|
|
318
|
-
title: Schema.String,
|
|
319
|
-
commit: Schema.String.pipe(Schema.optional),
|
|
320
|
-
/** The live description, which may have changed since the pull request was imported. */
|
|
321
|
-
body: Schema.String.pipe(Schema.optional),
|
|
322
|
-
ci: CiState,
|
|
323
|
-
checks: CheckCounts,
|
|
324
|
-
runs: Schema.Array(CheckRun),
|
|
325
|
-
review: ReviewState,
|
|
326
|
-
/** Reviewers whose latest verdict is an approval. */
|
|
327
|
-
approvals: Schema.Number
|
|
328
|
-
}),
|
|
329
|
-
types: [PullRequest.PullRequest]
|
|
330
|
-
});
|
|
331
|
-
/**
|
|
332
|
-
* Read a pull request's whole change as a unified diff, with the head commit it was taken at so a
|
|
333
|
-
* line comment on it anchors to the lines the reader saw.
|
|
334
|
-
*/
|
|
335
|
-
var GetPullRequestDiff = Operation.make({
|
|
336
|
-
meta: {
|
|
337
|
-
key: DXN.make("org.dxos.operation.github.getPullRequestDiff"),
|
|
338
|
-
name: "Get Pull Request Diff",
|
|
339
|
-
description: "Read a pull request's changed files as a unified diff.",
|
|
340
|
-
icon: "ph--git-diff--regular"
|
|
341
|
-
},
|
|
342
|
-
input: Schema.Struct({ pullRequest: Ref.Ref(PullRequest.PullRequest) }),
|
|
343
|
-
output: Schema.Struct({
|
|
344
|
-
commit: Schema.String.pipe(Schema.optional),
|
|
345
|
-
diff: Schema.String
|
|
346
|
-
}),
|
|
347
|
-
types: [PullRequest.PullRequest]
|
|
348
|
-
});
|
|
349
|
-
/**
|
|
350
|
-
* Progress key for {@link GenerateWalkthrough}, derived from the pull request rather than passed, so
|
|
351
|
-
* the UI can watch a run it did not start. The absolute URI form is required: a hydration-dependent
|
|
352
|
-
* one would not match the key the producer mints.
|
|
353
|
-
*/
|
|
354
|
-
var createWalkthroughProgressKey = (pullRequest) => Obj.getURI(pullRequest, { prefer: "absolute" }).toString() + "#walkthrough";
|
|
355
|
-
//#endregion
|
|
356
|
-
export { AddPullRequestComment, AddPullRequestReviewComment, CheckCounts, CheckOutcome, CheckRun, CiState, GenerateWalkthrough, GetGitHubRepositories, GetPullRequestDiff, GetPullRequestStatus, ImportPullRequest, ImportPullRequestFromSnapshot, MaterializeGitHubTarget, ReviewState, SubmitPullRequestApproval, SyncGitHubRepositories, SyncOptions, SyncPullRequest, createWalkthroughProgressKey, GitHubOperation_exports as t };
|
|
357
|
-
|
|
358
|
-
//# sourceMappingURL=GitHubOperation.mjs.map
|
|
1
|
+
export { t as AddPullRequestComment, n as AddPullRequestReviewComment, r as CheckCounts, i as CheckOutcome, a as CheckRun, o as CiState, s as GenerateWalkthrough, c as GetGitHubRepositories, l as GetPullRequestDiff, u as GetPullRequestStatus, f as ImportPullRequest, p as ImportPullRequestFromSnapshot, m as MaterializeGitHubTarget, h as RefreshPullRequests, g as ReviewState, _ as SubmitPullRequestApproval, v as SyncGitHubRepositories, y as SyncOptions, b as SyncPullRequest, x as createWalkthroughProgressKey } from "./chunk-GitHubOperation.mjs";
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { meta as meta$1 } from "#meta";
|
|
3
|
-
import * as Plugin from "@dxos/app-framework/Plugin";
|
|
4
|
-
//#region src/GitHubPlugin.ts
|
|
5
|
-
var GitHubPlugin_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
-
make: () => make,
|
|
7
|
-
meta: () => meta
|
|
8
|
-
});
|
|
9
|
-
/** Plugin metadata, available without loading the plugin body. */
|
|
10
|
-
var meta = meta$1;
|
|
11
|
-
/** Constructs the plugin; the body loads on first enable. */
|
|
12
|
-
var make = Plugin.lazy(meta, () => import("#plugin"));
|
|
13
|
-
//#endregion
|
|
14
|
-
export { make, meta, GitHubPlugin_exports as t };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=GitHubPlugin.mjs.map
|
|
1
|
+
export { n as make, r as meta } from "./chunk-GitHubPlugin.mjs";
|
package/dist/lib/Walkthrough.mjs
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { PullRequest } from "@dxos/types";
|
|
3
|
-
import { Annotation, DXN, Format, Obj, Ref, Type } from "@dxos/echo";
|
|
4
|
-
import * as Schema from "effect/Schema";
|
|
5
|
-
//#region src/types/Walkthrough.ts
|
|
6
|
-
var Walkthrough_exports = /* @__PURE__ */ __exportAll({
|
|
7
|
-
Walkthrough: () => Walkthrough,
|
|
8
|
-
instanceOf: () => instanceOf,
|
|
9
|
-
isStale: () => isStale,
|
|
10
|
-
make: () => make,
|
|
11
|
-
makeTitle: () => makeTitle
|
|
12
|
-
});
|
|
13
|
-
/**
|
|
14
|
-
* A narrated reading of a pull request: one markdown document whose prose, headings and ```diff
|
|
15
|
-
* fences describe the change in the order a reviewer should meet it.
|
|
16
|
-
*
|
|
17
|
-
* Generated against ONE commit and stale the moment the branch moves, which is why `commit` is part
|
|
18
|
-
* of the record rather than something to infer — see {@link isStale}.
|
|
19
|
-
*/
|
|
20
|
-
var Walkthrough = class extends Type.makeObject(DXN.make("org.dxos.type.walkthrough", "0.1.0"))(Schema.Struct({
|
|
21
|
-
/** The pull request this narrates. */
|
|
22
|
-
pullRequest: Ref.Ref(PullRequest.PullRequest),
|
|
23
|
-
/** `owner/repo#123: title`, copied at generation so the label needs no ref load. */
|
|
24
|
-
title: Schema.String.pipe(Schema.annotate({ title: "Title" }), Schema.optional),
|
|
25
|
-
/**
|
|
26
|
-
* The whole document, as a plain string rather than a text object.
|
|
27
|
-
*
|
|
28
|
-
* A walkthrough is replaced wholesale on every regeneration and is never co-edited character by
|
|
29
|
-
* character, so the CRDT a text object would impose is pure cost: it would keep per-character
|
|
30
|
-
* history for a document nobody edits.
|
|
31
|
-
*/
|
|
32
|
-
body: Schema.String.pipe(Schema.annotate({ title: "Body" })),
|
|
33
|
-
/** Head SHA the walkthrough was generated from; anything else means it describes another change. */
|
|
34
|
-
commit: Schema.String.pipe(Schema.annotate({ title: "Commit" })),
|
|
35
|
-
generatedAt: Format.DateTime.pipe(Schema.annotate({ title: "Generated" }), Schema.optional),
|
|
36
|
-
/** Model that produced the prose, so a regression can be attributed after the default moves. */
|
|
37
|
-
model: Schema.String.pipe(Schema.annotate({ title: "Model" }), Schema.optional),
|
|
38
|
-
/** Hunks the prose accounts for, over the patch's total — how much of the change it narrates. */
|
|
39
|
-
covered: Schema.Number.pipe(Schema.annotate({ title: "Hunks covered" }), Schema.optional),
|
|
40
|
-
total: Schema.Number.pipe(Schema.annotate({ title: "Hunks total" }), Schema.optional)
|
|
41
|
-
}).pipe(Schema.annotate({
|
|
42
|
-
title: "Walkthrough",
|
|
43
|
-
description: "A narrated reading of a pull request."
|
|
44
|
-
}), Annotation.LabelAnnotation.set(["title", "commit"]), Annotation.IconAnnotation.set({
|
|
45
|
-
icon: "ph--path--regular",
|
|
46
|
-
hue: "indigo"
|
|
47
|
-
}), Annotation.UserType.set())) {};
|
|
48
|
-
/** Factory wrapper around `Obj.make` for {@link Walkthrough}. */
|
|
49
|
-
var make = (props) => Obj.make(Walkthrough, props);
|
|
50
|
-
/** Returns true when value is a Walkthrough object. */
|
|
51
|
-
var instanceOf = (value) => Obj.instanceOf(Walkthrough, value);
|
|
52
|
-
/** The label a walkthrough of this pull request carries. */
|
|
53
|
-
var makeTitle = (pullRequest, title = pullRequest.title) => `${PullRequest.reference(pullRequest)}: ${title}`;
|
|
54
|
-
/** Whether the walkthrough describes a commit other than the one given. */
|
|
55
|
-
var isStale = (walkthrough, head) => walkthrough.commit !== head;
|
|
56
|
-
//#endregion
|
|
57
|
-
export { Walkthrough, instanceOf, isStale, make, makeTitle, Walkthrough_exports as t };
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=Walkthrough.mjs.map
|
|
1
|
+
export { t as Walkthrough, r as instanceOf, i as isStale, a as make, o as makeTitle } from "./chunk-Walkthrough.mjs";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
2
1
|
import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
|
|
3
2
|
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
3
|
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
@@ -44,7 +43,7 @@ var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs
|
|
|
44
43
|
var PluginAsset = AppCapability.pluginAsset({
|
|
45
44
|
pluginId: meta.profile.key,
|
|
46
45
|
path: "PLUGIN.mdl",
|
|
47
|
-
content:
|
|
46
|
+
content: () => import("./chunk-PLUGIN.mjs"),
|
|
48
47
|
mimeType: "application/x-mdl"
|
|
49
48
|
});
|
|
50
49
|
var Translations = AppCapability.translations(translations);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ConnectorEvents from '@dxos/plugin-connector/ConnectorEvents';\nimport * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';\nimport * as CrxCapabilities from '@dxos/plugin-crx/CrxCapabilities';\nimport * as CrxEvents from '@dxos/plugin-crx/CrxEvents';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';\nimport * as PreviewEvents from '@dxos/plugin-preview/PreviewEvents';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\
|
|
1
|
+
{"version":3,"file":"capabilities.browser.mjs","names":[],"sources":["../../src/capabilities/gen/browser.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'browser' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ConnectorEvents from '@dxos/plugin-connector/ConnectorEvents';\nimport * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';\nimport * as CrxCapabilities from '@dxos/plugin-crx/CrxCapabilities';\nimport * as CrxEvents from '@dxos/plugin-crx/CrxEvents';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';\nimport * as PreviewEvents from '@dxos/plugin-preview/PreviewEvents';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const Connector = Capability.lazyModule(\n 'GitHubConnector',\n { provides: [ConnectorSpec.Connector], activatesOn: ConnectorEvents.Start },\n () => import('../connector.ts'),\n);\n\n// Browser-only: the editor it decorates and the popover it answers render nowhere else.\nexport const MarkdownExtension = Capability.lazyModule(\n 'MarkdownExtension',\n {\n provides: [MarkdownCapabilities.ExtensionProvider],\n activatesOn: MarkdownEvents.Start,\n environments: ['browser', 'tauri'],\n },\n () => import('../markdown-extension.ts'),\n);\n\nexport const LinkResolver = Capability.lazyModule(\n 'LinkResolver',\n {\n provides: [PreviewCapabilities.LinkResolver],\n activatesOn: PreviewEvents.Start,\n environments: ['browser', 'tauri'],\n },\n () => import('../link-resolver.ts'),\n);\n\n// Narrower than the `appGraphBuilder` family default: the action opens a dialog, which means\n// nothing without an app shell.\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {\n environments: ['browser', 'tauri'],\n});\n\nexport const PageActionProvider = Capability.lazyModule(\n 'PageActionProvider',\n { provides: [CrxCapabilities.PageAction], activatesOn: CrxEvents.Start },\n () => import('../page-action.ts'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'));\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.cardContent', 'org.dxos.role.cardMenu', 'org.dxos.role.article', 'org.dxos.role.dialog'],\n});\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\n\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;;;;;;;;;;;AAqBA,IAAa,YAAY,WAAW,WAClC,mBACA;CAAE,UAAU,CAAC,cAAc,SAAS;CAAG,aAAa,gBAAgB;AAAM,SACpE,OAAO,wBACf;AAGA,IAAa,oBAAoB,WAAW,WAC1C,qBACA;CACE,UAAU,CAAC,qBAAqB,iBAAiB;CACjD,aAAa,eAAe;CAC5B,cAAc,CAAC,WAAW,OAAO;AACnC,SACM,OAAO,iCACf;AAEA,IAAa,eAAe,WAAW,WACrC,gBACA;CACE,UAAU,CAAC,oBAAoB,YAAY;CAC3C,aAAa,cAAc;CAC3B,cAAc,CAAC,WAAW,OAAO;AACnC,SACM,OAAO,4BACf;AAIA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA4B,EACpG,cAAc,CAAC,WAAW,OAAO,EACnC,CAAC;AAED,IAAa,qBAAqB,WAAW,WAC3C,sBACA;CAAE,UAAU,CAAC,gBAAgB,UAAU;CAAG,aAAa,UAAU;AAAM,SACjE,OAAO,0BACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA4B,EACtG,aAAa,iBAAiB,KAChC,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,+BAAyB;AAEnG,IAAa,eAAe,cAAc,cAAc,OAAO,4BAAA,CAAA,MAAA,MAAA,EAAA,CAAA,GAAwB,EACrF,OAAO;CAAC;CAA6B;CAA0B;CAAyB;AAAsB,EAChH,CAAC;AAED,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC;AAED,IAAa,eAAe,cAAc,aAAa,YAAY"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
2
1
|
import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
|
|
3
2
|
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
3
|
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
@@ -44,7 +43,7 @@ var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs
|
|
|
44
43
|
var PluginAsset = AppCapability.pluginAsset({
|
|
45
44
|
pluginId: meta.profile.key,
|
|
46
45
|
path: "PLUGIN.mdl",
|
|
47
|
-
content:
|
|
46
|
+
content: () => import("./chunk-PLUGIN.mjs"),
|
|
48
47
|
mimeType: "application/x-mdl"
|
|
49
48
|
});
|
|
50
49
|
var Translations = AppCapability.translations(translations);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ConnectorEvents from '@dxos/plugin-connector/ConnectorEvents';\nimport * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';\nimport * as CrxCapabilities from '@dxos/plugin-crx/CrxCapabilities';\nimport * as CrxEvents from '@dxos/plugin-crx/CrxEvents';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';\nimport * as PreviewEvents from '@dxos/plugin-preview/PreviewEvents';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\
|
|
1
|
+
{"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities/index.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ConnectorEvents from '@dxos/plugin-connector/ConnectorEvents';\nimport * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';\nimport * as CrxCapabilities from '@dxos/plugin-crx/CrxCapabilities';\nimport * as CrxEvents from '@dxos/plugin-crx/CrxEvents';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';\nimport * as PreviewEvents from '@dxos/plugin-preview/PreviewEvents';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const Connector = Capability.lazyModule(\n 'GitHubConnector',\n { provides: [ConnectorSpec.Connector], activatesOn: ConnectorEvents.Start },\n () => import('./connector.ts'),\n);\n// Browser-only: the editor it decorates and the popover it answers render nowhere else.\nexport const MarkdownExtension = Capability.lazyModule(\n 'MarkdownExtension',\n {\n provides: [MarkdownCapabilities.ExtensionProvider],\n activatesOn: MarkdownEvents.Start,\n environments: ['browser', 'tauri'],\n },\n () => import('./markdown-extension.ts'),\n);\nexport const LinkResolver = Capability.lazyModule(\n 'LinkResolver',\n {\n provides: [PreviewCapabilities.LinkResolver],\n activatesOn: PreviewEvents.Start,\n environments: ['browser', 'tauri'],\n },\n () => import('./link-resolver.ts'),\n);\n// Narrower than the `appGraphBuilder` family default: the action opens a dialog, which means\n// nothing without an app shell.\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('./app-graph-builder.ts'), {\n environments: ['browser', 'tauri'],\n});\nexport const PageActionProvider = Capability.lazyModule(\n 'PageActionProvider',\n { provides: [CrxCapabilities.PageAction], activatesOn: CrxEvents.Start },\n () => import('./page-action.ts'),\n);\nexport const OperationHandler = AppCapability.operationHandler(() => import('./operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\nexport const Schema = AppCapability.schema(() => import('./schema.ts'));\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('./skill-definition.ts'));\nexport const ReactSurface = AppCapability.surface(() => import('./react-surface.ts'), {\n roles: ['org.dxos.role.cardContent', 'org.dxos.role.cardMenu', 'org.dxos.role.article', 'org.dxos.role.dialog'],\n});\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;;;;;;;;;;;AAmBA,IAAa,YAAY,WAAW,WAClC,mBACA;CAAE,UAAU,CAAC,cAAc,SAAS;CAAG,aAAa,gBAAgB;AAAM,SACpE,OAAO,wBACf;AAEA,IAAa,oBAAoB,WAAW,WAC1C,qBACA;CACE,UAAU,CAAC,qBAAqB,iBAAiB;CACjD,aAAa,eAAe;CAC5B,cAAc,CAAC,WAAW,OAAO;AACnC,SACM,OAAO,iCACf;AACA,IAAa,eAAe,WAAW,WACrC,gBACA;CACE,UAAU,CAAC,oBAAoB,YAAY;CAC3C,aAAa,cAAc;CAC3B,cAAc,CAAC,WAAW,OAAO;AACnC,SACM,OAAO,4BACf;AAGA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA2B,EACnG,cAAc,CAAC,WAAW,OAAO,EACnC,CAAC;AACD,IAAa,qBAAqB,WAAW,WAC3C,sBACA;CAAE,UAAU,CAAC,gBAAgB,UAAU;CAAG,aAAa,UAAU;AAAM,SACjE,OAAO,0BACf;AACA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA2B,EACrG,aAAa,iBAAiB,KAChC,CAAC;AACD,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAc;AACtE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,+BAAwB;AAClG,IAAa,eAAe,cAAc,cAAc,OAAO,4BAAA,CAAA,MAAA,MAAA,EAAA,CAAA,GAAuB,EACpF,OAAO;CAAC;CAA6B;CAA0B;CAAyB;AAAsB,EAChH,CAAC;AACD,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC;AACD,IAAa,eAAe,cAAc,aAAa,YAAY"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as PLUGIN_default } from "./chunk-PLUGIN.mjs";
|
|
2
1
|
import * as ActivationEvents from "@dxos/app-framework/ActivationEvents";
|
|
3
2
|
import * as Capability from "@dxos/app-framework/Capability";
|
|
4
3
|
import * as AppCapability from "@dxos/app-toolkit/AppCapability";
|
|
@@ -44,7 +43,7 @@ var ReactSurface = AppCapability.surface(() => import("./chunk-react-surface.mjs
|
|
|
44
43
|
var PluginAsset = AppCapability.pluginAsset({
|
|
45
44
|
pluginId: meta.profile.key,
|
|
46
45
|
path: "PLUGIN.mdl",
|
|
47
|
-
content:
|
|
46
|
+
content: () => import("./chunk-PLUGIN.mjs"),
|
|
48
47
|
mimeType: "application/x-mdl"
|
|
49
48
|
});
|
|
50
49
|
var Translations = AppCapability.translations(translations);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.tauri.mjs","names":[],"sources":["../../src/capabilities/gen/tauri.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ConnectorEvents from '@dxos/plugin-connector/ConnectorEvents';\nimport * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';\nimport * as CrxCapabilities from '@dxos/plugin-crx/CrxCapabilities';\nimport * as CrxEvents from '@dxos/plugin-crx/CrxEvents';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';\nimport * as PreviewEvents from '@dxos/plugin-preview/PreviewEvents';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\
|
|
1
|
+
{"version":3,"file":"capabilities.tauri.mjs","names":[],"sources":["../../src/capabilities/gen/tauri.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// GENERATED by dx-plugin — do not edit. Sliced from ../index.ts for the 'tauri' condition.\n\nimport * as ActivationEvents from '@dxos/app-framework/ActivationEvents';\nimport * as Capability from '@dxos/app-framework/Capability';\nimport * as AppCapability from '@dxos/app-toolkit/AppCapability';\nimport * as ConnectorEvents from '@dxos/plugin-connector/ConnectorEvents';\nimport * as ConnectorSpec from '@dxos/plugin-connector/ConnectorSpec';\nimport * as CrxCapabilities from '@dxos/plugin-crx/CrxCapabilities';\nimport * as CrxEvents from '@dxos/plugin-crx/CrxEvents';\nimport * as MarkdownCapabilities from '@dxos/plugin-markdown/MarkdownCapabilities';\nimport * as MarkdownEvents from '@dxos/plugin-markdown/MarkdownEvents';\nimport * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';\nimport * as PreviewEvents from '@dxos/plugin-preview/PreviewEvents';\n\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const Connector = Capability.lazyModule(\n 'GitHubConnector',\n { provides: [ConnectorSpec.Connector], activatesOn: ConnectorEvents.Start },\n () => import('../connector.ts'),\n);\n\n// Browser-only: the editor it decorates and the popover it answers render nowhere else.\nexport const MarkdownExtension = Capability.lazyModule(\n 'MarkdownExtension',\n {\n provides: [MarkdownCapabilities.ExtensionProvider],\n activatesOn: MarkdownEvents.Start,\n environments: ['browser', 'tauri'],\n },\n () => import('../markdown-extension.ts'),\n);\n\nexport const LinkResolver = Capability.lazyModule(\n 'LinkResolver',\n {\n provides: [PreviewCapabilities.LinkResolver],\n activatesOn: PreviewEvents.Start,\n environments: ['browser', 'tauri'],\n },\n () => import('../link-resolver.ts'),\n);\n\n// Narrower than the `appGraphBuilder` family default: the action opens a dialog, which means\n// nothing without an app shell.\nexport const AppGraphBuilder = AppCapability.appGraphBuilder(() => import('../app-graph-builder.ts'), {\n environments: ['browser', 'tauri'],\n});\n\nexport const PageActionProvider = Capability.lazyModule(\n 'PageActionProvider',\n { provides: [CrxCapabilities.PageAction], activatesOn: CrxEvents.Start },\n () => import('../page-action.ts'),\n);\n\nexport const OperationHandler = AppCapability.operationHandler(() => import('../operation-handler.ts'), {\n activatesOn: ActivationEvents.Idle,\n});\n\nexport const Schema = AppCapability.schema(() => import('../schema.ts'));\n\nexport const SkillDefinition = AppCapability.skillDefinition(() => import('../skill-definition.ts'));\n\nexport const ReactSurface = AppCapability.surface(() => import('../react-surface.ts'), {\n roles: ['org.dxos.role.cardContent', 'org.dxos.role.cardMenu', 'org.dxos.role.article', 'org.dxos.role.dialog'],\n});\n\nexport const PluginAsset = AppCapability.pluginAsset({\n pluginId: meta.profile.key,\n path: 'PLUGIN.mdl',\n content: () => import('../../../PLUGIN.mdl?raw'),\n mimeType: 'application/x-mdl',\n});\n\nexport const Translations = AppCapability.translations(translations);\n"],"mappings":";;;;;;;;;;;;;;AAqBA,IAAa,YAAY,WAAW,WAClC,mBACA;CAAE,UAAU,CAAC,cAAc,SAAS;CAAG,aAAa,gBAAgB;AAAM,SACpE,OAAO,wBACf;AAGA,IAAa,oBAAoB,WAAW,WAC1C,qBACA;CACE,UAAU,CAAC,qBAAqB,iBAAiB;CACjD,aAAa,eAAe;CAC5B,cAAc,CAAC,WAAW,OAAO;AACnC,SACM,OAAO,iCACf;AAEA,IAAa,eAAe,WAAW,WACrC,gBACA;CACE,UAAU,CAAC,oBAAoB,YAAY;CAC3C,aAAa,cAAc;CAC3B,cAAc,CAAC,WAAW,OAAO;AACnC,SACM,OAAO,4BACf;AAIA,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,kCAA4B,EACpG,cAAc,CAAC,WAAW,OAAO,EACnC,CAAC;AAED,IAAa,qBAAqB,WAAW,WAC3C,sBACA;CAAE,UAAU,CAAC,gBAAgB,UAAU;CAAG,aAAa,UAAU;AAAM,SACjE,OAAO,0BACf;AAEA,IAAa,mBAAmB,cAAc,uBAAuB,OAAO,kCAA4B,EACtG,aAAa,iBAAiB,KAChC,CAAC;AAED,IAAa,SAAS,cAAc,aAAa,OAAO,qBAAe;AAEvE,IAAa,kBAAkB,cAAc,sBAAsB,OAAO,+BAAyB;AAEnG,IAAa,eAAe,cAAc,cAAc,OAAO,4BAAA,CAAA,MAAA,MAAA,EAAA,CAAA,GAAwB,EACrF,OAAO;CAAC;CAA6B;CAA0B;CAAyB;AAAsB,EAChH,CAAC;AAED,IAAa,cAAc,cAAc,YAAY;CACnD,UAAU,KAAK,QAAQ;CACvB,MAAM;CACN,eAAe,OAAO;CACtB,UAAU;AACZ,CAAC;AAED,IAAa,eAAe,cAAc,aAAa,YAAY"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import { n as parseGitHubLink, r as parsePullRequestReference, t as GITHUB_LINK } from "./chunk-github-link.mjs";
|
|
3
|
+
import { PULL_REQUEST_ICON, githubLinkIcon, githubLinks, githubReferences, referenceUrl } from "./extensions.mjs";
|
|
4
|
+
//#region src/Extensions.ts
|
|
5
|
+
var Extensions_exports = /* @__PURE__ */ __exportAll({
|
|
6
|
+
GITHUB_LINK: () => GITHUB_LINK,
|
|
7
|
+
PULL_REQUEST_ICON: () => PULL_REQUEST_ICON,
|
|
8
|
+
githubLinkIcon: () => githubLinkIcon,
|
|
9
|
+
githubLinks: () => githubLinks,
|
|
10
|
+
githubReferences: () => githubReferences,
|
|
11
|
+
parseGitHubLink: () => parseGitHubLink,
|
|
12
|
+
parsePullRequestReference: () => parsePullRequestReference,
|
|
13
|
+
referenceUrl: () => referenceUrl
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Extensions_exports as t };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=chunk-Extensions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-Extensions.mjs","names":[],"sources":["../../src/Extensions.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nexport * from './extensions/index.ts';\n"],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import * as Capability from "@dxos/app-framework/Capability";
|
|
3
|
+
import { meta } from "#meta";
|
|
4
|
+
//#region src/types/GitHubCapabilities.ts
|
|
5
|
+
var GitHubCapabilities_exports = /* @__PURE__ */ __exportAll({ LinkSource: () => LinkSource });
|
|
6
|
+
var LinkSource = Capability.make()(`${meta.profile.key}.capability.linkSource`);
|
|
7
|
+
//#endregion
|
|
8
|
+
export { LinkSource as n, GitHubCapabilities_exports as t };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=chunk-GitHubCapabilities.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-GitHubCapabilities.mjs","names":[],"sources":["../../src/types/GitHubCapabilities.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport type * as Effect from 'effect/Effect';\n\nimport * as Capability from '@dxos/app-framework/Capability';\nimport type * as PreviewCapabilities from '@dxos/plugin-preview/PreviewCapabilities';\nimport { type Issue, type PullRequest, type Repo } from '@dxos/types';\n\nimport { meta } from '#meta';\n\nimport { type GitHubLink } from '../extensions/index.ts';\n\n/**\n * Where a previewed link's repository, pull request or issue comes from. The plugin's default fetches it from\n * the GitHub API with the space's connection token (anonymously when there is none); a host that\n * contributes one — a story, a test, an offline build — replaces the fetch.\n */\nexport type GitHubLinkSource = (\n link: GitHubLink,\n context: PreviewCapabilities.PreviewLinkContext,\n) => Effect.Effect<Repo.Repo | Issue.Issue | PullRequest.PullRequest | undefined>;\n\nexport const LinkSource = Capability.make<GitHubLinkSource>()(`${meta.profile.key}.capability.linkSource`);\n"],"mappings":";;;;;AA0BA,IAAa,aAAa,WAAW,KAAuB,CAAC,CAAC,GAAG,KAAK,QAAQ,IAAI,uBAAuB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-rolldown-runtime.mjs";
|
|
2
|
+
import { meta } from "#meta";
|
|
3
|
+
import * as ActivationEvent from "@dxos/app-framework/ActivationEvent";
|
|
4
|
+
//#region src/types/GitHubEvents.ts
|
|
5
|
+
var GitHubEvents_exports = /* @__PURE__ */ __exportAll({ Start: () => Start });
|
|
6
|
+
/**
|
|
7
|
+
* The feature's start event: the plugin's start-gated modules (and cross-plugin
|
|
8
|
+
* contributions consumed by this feature) activate here. Fired on demand and by the
|
|
9
|
+
* host's idle trickle.
|
|
10
|
+
*/
|
|
11
|
+
var Start = ActivationEvent.pluginStart(meta.profile.key);
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Start as n, GitHubEvents_exports as t };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=chunk-GitHubEvents.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk-GitHubEvents.mjs","names":[],"sources":["../../src/types/GitHubEvents.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as ActivationEvent from '@dxos/app-framework/ActivationEvent';\n\nimport { meta } from '#meta';\n\n/**\n * The feature's start event: the plugin's start-gated modules (and cross-plugin\n * contributions consumed by this feature) activate here. Fired on demand and by the\n * host's idle trickle.\n */\nexport const Start = ActivationEvent.pluginStart(meta.profile.key);\n"],"mappings":";;;;;;;;;;AAeA,IAAa,QAAQ,gBAAgB,YAAY,KAAK,QAAQ,GAAG"}
|