alinea 2.0.0-preview.12 → 2.0.0-preview.13
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/.init/content/pages/welcome.json +1 -1
- package/dist/.mcp/later/dev.json +1 -1
- package/dist/.mcp/online/dev.json +1 -1
- package/dist/adapter/next/cms.js +16 -8
- package/dist/adapter/next/dashboardUrl.d.ts +6 -0
- package/dist/adapter/next/dashboardUrl.js +13 -0
- package/dist/adapter/next/syncCheck.d.ts +15 -2
- package/dist/adapter/next/syncCheck.js +26 -9
- package/dist/backend/Handler.js +5 -1
- package/dist/backend/api/BlobStore.d.ts +21 -0
- package/dist/backend/api/BlobStore.js +63 -0
- package/dist/backend/api/CreateBackend.js +10 -8
- package/dist/backend/api/DatabaseApi.d.ts +4 -1
- package/dist/backend/api/DatabaseApi.js +88 -4
- package/dist/backend/api/GithubApi.js +47 -24
- package/dist/backend/api/database.js +6 -6
- package/dist/bundled.d.ts +676 -280
- package/dist/chunks/{bun-sqlite-5SHXN3AT.js → bun-sqlite-RI6BYU5S.js} +3 -3
- package/dist/chunks/{chunk-OHGAVV4G.js → chunk-3QFSGTGF.js} +2 -3
- package/dist/chunks/{chunk-QJGGYF6E.js → chunk-4ZA6KZHS.js} +5 -5
- package/dist/chunks/{chunk-ASYKC6IE.js → chunk-5H4D5JQL.js} +1 -1
- package/dist/chunks/{chunk-ETWOY4AL.js → chunk-A2I6MCCS.js} +1 -1
- package/dist/chunks/{chunk-W5AXN7GH.js → chunk-CYVOGRSD.js} +1 -2
- package/dist/chunks/{chunk-TIJTT5ZI.js → chunk-G43W7AME.js} +1 -0
- package/dist/chunks/{chunk-RE523BQ7.js → chunk-HOETF6HN.js} +5829 -5830
- package/dist/chunks/{chunk-AIU6CMVT.js → chunk-PTYZMV5G.js} +1 -1
- package/dist/chunks/{chunk-JOF663EG.js → chunk-QHHMKJUO.js} +1 -1
- package/dist/chunks/{chunk-66YZ47TY.js → chunk-RAR44T5O.js} +1 -1
- package/dist/chunks/{chunk-QSN6RH6X.js → chunk-VA6NC3MI.js} +1 -1
- package/dist/chunks/{node-sqlite-XVNTNMCY.js → node-sqlite-C7VJ2NSN.js} +3 -3
- package/dist/cli/Mcp.js +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +2 -3
- package/dist/cli/serve/mcp/DevMcp.js +1 -1
- package/dist/cli/serve/mcp/McpTools.js +29 -1
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/components/Alert.js +2 -2
- package/dist/components/AppShell.js +2 -2
- package/dist/components/Badge.d.ts +3 -1
- package/dist/components/Badge.js +5 -3
- package/dist/components/Breadcrumbs.js +7 -7
- package/dist/components/Button.d.ts +6 -1
- package/dist/components/Button.js +16 -7
- package/dist/components/Calendar.js +20 -20
- package/dist/components/Checkbox.js +7 -7
- package/dist/components/CheckboxGroup.js +4 -4
- package/dist/components/Code.js +2 -2
- package/dist/components/Collapsible.js +3 -3
- package/dist/components/ColorSwatch.js +2 -2
- package/dist/components/ColorSwatchPicker.js +2 -2
- package/dist/components/ComboBox.js +7 -7
- package/dist/components/Command.js +14 -13
- package/dist/components/ContentCard.d.ts +3 -1
- package/dist/components/ContentCard.js +46 -24
- package/dist/components/ContentGrid.js +17 -17
- package/dist/components/DataList.js +2 -2
- package/dist/components/DateField.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/DateRangePicker.js +2 -2
- package/dist/components/Dialog.js +7 -7
- package/dist/components/DropZone.js +6 -6
- package/dist/components/DropdownMenu.js +9 -9
- package/dist/components/Empty.js +5 -5
- package/dist/components/Field.js +8 -8
- package/dist/components/List.js +27 -27
- package/dist/components/MediaPreview.js +5 -5
- package/dist/components/MultipleSelect.js +22 -22
- package/dist/components/NavRail.js +4 -4
- package/dist/components/NumberField.js +4 -4
- package/dist/components/Page.js +3 -3
- package/dist/components/Popover.js +2 -2
- package/dist/components/PreviewFrame.js +9 -9
- package/dist/components/RadioGroup.js +9 -9
- package/dist/components/Resizable.js +4 -4
- package/dist/components/SearchField.d.ts +6 -1
- package/dist/components/SearchField.js +5 -3
- package/dist/components/Select.js +13 -13
- package/dist/components/Sheet.d.ts +50 -0
- package/dist/components/Sheet.js +202 -0
- package/dist/components/Sidebar.js +4 -4
- package/dist/components/SortableList.d.ts +34 -30
- package/dist/components/SortableList.js +161 -264
- package/dist/components/Spinner.js +2 -2
- package/dist/components/Surface.js +2 -2
- package/dist/components/Switch.js +8 -8
- package/dist/components/Table.d.ts +3 -1
- package/dist/components/Table.js +57 -46
- package/dist/components/Tabs.js +5 -5
- package/dist/components/TagGroup.js +8 -8
- package/dist/components/TextField.js +10 -10
- package/dist/components/TimeField.js +6 -6
- package/dist/components/Timestamp.js +1 -1
- package/dist/components/ToggleGroup.js +2 -2
- package/dist/components/Toolbar.js +2 -2
- package/dist/components/Tooltip.js +5 -5
- package/dist/components/Tree.js +24 -24
- package/dist/components/internal/DateControl.js +12 -12
- package/dist/components/internal/ListBoxOption.js +6 -6
- package/dist/components/internal/Locale.js +2 -2
- package/dist/components/internal/PopoverSurface.js +4 -4
- package/dist/components/internal/SelectionCheckbox.js +5 -5
- package/dist/components/internal/Slot.js +1 -1
- package/dist/components/internal/ToggleButton.js +3 -3
- package/dist/components/internal/Trigger.js +2 -2
- package/dist/components/internal/sortableDrag.d.ts +19 -0
- package/dist/components/internal/sortableDrag.js +175 -0
- package/dist/components/internal/useDragDrop.js +2 -2
- package/dist/components.d.ts +1 -0
- package/dist/components.js +1 -0
- package/dist/core/Config.d.ts +6 -1
- package/dist/core/Document.d.ts +9 -1
- package/dist/core/Document.js +31 -6
- package/dist/core/Overview.d.ts +2 -4
- package/dist/core/TextDoc.d.ts +4 -0
- package/dist/core/Validation.d.ts +0 -1
- package/dist/core/Validation.js +0 -6
- package/dist/core/field/RichTextField.js +23 -4
- package/dist/core/media/MediaTypes.js +1 -1
- package/dist/core/source/GithubSource.d.ts +4 -0
- package/dist/core/source/GithubSource.js +127 -25
- package/dist/core/source/GithubUsage.d.ts +21 -0
- package/dist/core/source/GithubUsage.js +47 -0
- package/dist/dashboard/App.d.ts +2 -2
- package/dist/dashboard/App.js +5 -3
- package/dist/dashboard/ViewKeys.d.ts +1 -0
- package/dist/dashboard/ViewKeys.js +1 -0
- package/dist/dashboard/app/ActivityStatus.js +7 -7
- package/dist/dashboard/app/AuthView.js +5 -5
- package/dist/dashboard/app/BlockSheet.d.ts +50 -0
- package/dist/dashboard/app/BlockSheet.js +207 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.d.ts +6 -0
- package/dist/dashboard/app/BlockSheetStoryFrame.js +29 -0
- package/dist/dashboard/app/CompactField.js +16 -16
- package/dist/dashboard/app/DashboardLayout.js +3 -1
- package/dist/dashboard/app/EntryFields.js +2 -2
- package/dist/dashboard/app/EntryHeader.js +33 -34
- package/dist/dashboard/app/EntryReferences.js +7 -7
- package/dist/dashboard/app/EntrySidebar.js +15 -15
- package/dist/dashboard/app/EntrySidebarPreview.js +3 -3
- package/dist/dashboard/app/EntryStatusIcon.d.ts +23 -0
- package/dist/dashboard/app/EntryStatusIcon.js +58 -0
- package/dist/dashboard/app/EntryValidationModal.d.ts +6 -5
- package/dist/dashboard/app/EntryValidationModal.js +20 -20
- package/dist/dashboard/app/Explorer.d.ts +3 -1
- package/dist/dashboard/app/Explorer.js +48 -44
- package/dist/dashboard/app/ExplorerBatchActions.d.ts +3 -1
- package/dist/dashboard/app/ExplorerBatchActions.js +68 -43
- package/dist/dashboard/app/ExplorerCards.js +7 -1
- package/dist/dashboard/app/ExplorerControls.js +6 -6
- package/dist/dashboard/app/ExplorerList.js +5 -5
- package/dist/dashboard/app/ExplorerModal.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +11 -8
- package/dist/dashboard/app/ImageEditor.js +28 -28
- package/dist/dashboard/app/ImagePicker.js +3 -13
- package/dist/dashboard/app/LinkPicker.js +28 -26
- package/dist/dashboard/app/LocaleMenu.js +4 -4
- package/dist/dashboard/app/MediaPreviewCell.js +1 -1
- package/dist/dashboard/app/MoveConfirmDialog.d.ts +5 -0
- package/dist/dashboard/app/MoveConfirmDialog.js +79 -0
- package/dist/dashboard/app/OverviewCell.js +8 -13
- package/dist/dashboard/app/PendingUploadsView.js +3 -3
- package/dist/dashboard/app/ReadOnlyBadge.d.ts +1 -1
- package/dist/dashboard/app/RemoveDialog.d.ts +17 -0
- package/dist/dashboard/app/{DeleteDialog.js → RemoveDialog.js} +67 -27
- package/dist/dashboard/app/RemoveRedirect.d.ts +7 -0
- package/dist/dashboard/app/RemoveRedirect.js +123 -0
- package/dist/dashboard/app/SearchBar.d.ts +9 -0
- package/dist/dashboard/app/SearchBar.js +31 -0
- package/dist/dashboard/app/SidebarTree.js +27 -72
- package/dist/dashboard/app/WorkspaceMenu.js +7 -7
- package/dist/dashboard/app/WorkspaceRoots.js +12 -12
- package/dist/dashboard/app/editor/FileEditor.js +14 -14
- package/dist/dashboard/app/modals/CreateEntry.js +3 -3
- package/dist/dashboard/app/pages/EntryPage.d.ts +2 -1
- package/dist/dashboard/app/pages/EntryPage.js +34 -15
- package/dist/dashboard/app/pages/SplashPage.js +37 -37
- package/dist/dashboard/app/pages/UsersPage.js +12 -12
- package/dist/dashboard/app/ui/DashboardModal.js +15 -14
- package/dist/dashboard/atoms/dashboard.js +1 -1
- package/dist/dashboard/atoms/entry.js +1 -14
- package/dist/dashboard/atoms/entryTable.js +1 -0
- package/dist/dashboard/atoms/explorer.d.ts +4 -0
- package/dist/dashboard/atoms/explorer.js +19 -7
- package/dist/dashboard/atoms/graph.js +1 -1
- package/dist/dashboard/atoms/link.js +5 -2
- package/dist/dashboard/atoms/move.d.ts +5 -0
- package/dist/dashboard/atoms/move.js +29 -3
- package/dist/dashboard/atoms/moveConfirmation.d.ts +34 -0
- package/dist/dashboard/atoms/moveConfirmation.js +95 -0
- package/dist/dashboard/atoms/nav.d.ts +9 -5
- package/dist/dashboard/atoms/nav.js +120 -45
- package/dist/dashboard/atoms/overview.d.ts +6 -5
- package/dist/dashboard/atoms/overview.js +2 -16
- package/dist/dashboard/atoms/remove.d.ts +112 -0
- package/dist/dashboard/atoms/remove.js +268 -0
- package/dist/dashboard/atoms/root.d.ts +2 -2
- package/dist/dashboard/atoms/root.js +41 -26
- package/dist/dashboard/atoms/user.js +1 -1
- package/dist/dashboard/atoms/utils.js +1 -1
- package/dist/dashboard/boot/Boot.js +25 -17
- package/dist/dashboard/boot/DashboardWorker.d.ts +1 -0
- package/dist/dashboard/boot/DashboardWorker.js +10 -46
- package/dist/dashboard/boot/LoadWorker.js +17 -10
- package/dist/dashboard/cms/EntryTable.js +8 -5
- package/dist/database/BrowserEntryStore.d.ts +12 -62
- package/dist/database/BrowserEntryStore.js +97 -196
- package/dist/database/DatabaseTables.js +2 -2
- package/dist/database/EntryDatabase.js +21 -1
- package/dist/database/EntryTransaction.js +0 -35
- package/dist/database/EntryUrlAliases.d.ts +4 -0
- package/dist/database/EntryUrlAliases.js +16 -10
- package/dist/database/driver/RuntimeDatabase.js +3 -3
- package/dist/database/driver/WasmDatabase.d.ts +5 -18
- package/dist/database/driver/WasmDatabase.js +15 -16
- package/dist/database/entry/EntryTable.js +2 -2
- package/dist/database/query/EntryQuery.js +1 -1
- package/dist/database/query/Relation.js +1 -1
- package/dist/database/query/Search.js +2 -2
- package/dist/field/code/CodeField.view.js +16 -16
- package/dist/field/link/EntryLink.d.ts +4 -4
- package/dist/field/link/FileLink.d.ts +4 -4
- package/dist/field/link/ImageLink.d.ts +4 -4
- package/dist/field/link/Link.d.ts +1 -1
- package/dist/field/link/LinkField.d.ts +5 -0
- package/dist/field/link/LinkField.view.js +244 -370
- package/dist/field/link/UrlLink.d.ts +4 -4
- package/dist/field/list/ListField.d.ts +2 -0
- package/dist/field/list/ListField.view.d.ts +15 -0
- package/dist/field/list/ListField.view.js +343 -301
- package/dist/field/metadata/MetadataField.d.ts +17 -7
- package/dist/field/metadata/MetadataField.js +14 -3
- package/dist/field/metadata/MetadataField.view.d.ts +1 -0
- package/dist/field/metadata/MetadataField.view.js +25 -21
- package/dist/field/richtext/RichTextBlock.d.ts +3 -1
- package/dist/field/richtext/RichTextBlock.js +177 -74
- package/dist/field/richtext/RichTextBlockHost.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +31 -31
- package/dist/field/richtext/RichTextField.view.js +14 -8
- package/dist/field/richtext/RichTextInsertMenu.js +43 -27
- package/dist/field/views.js +2 -0
- package/dist/index.css +490 -309
- package/dist/picker/url/UrlPicker.js +1 -0
- package/docs/components/badge.md +1 -0
- package/docs/components/button.md +1 -0
- package/docs/components/content-card.md +1 -0
- package/docs/components/search-field.md +1 -0
- package/docs/components/sortable-list.md +5 -20
- package/docs/components/table.md +1 -0
- package/docs/configuration.md +1 -1
- package/docs/deploy/self-host.md +1 -1
- package/docs/deploy.md +5 -4
- package/docs/fields.md +1 -1
- package/docs/index.md +1 -1
- package/docs/instant-publishing.md +7 -22
- package/docs/overviews.md +3 -4
- package/docs/upgrading.md +3 -2
- package/llms-full.txt +31 -55
- package/package.json +2 -3
- package/dist/core/db/EntryValidationError.d.ts +0 -13
- package/dist/core/db/EntryValidationError.js +0 -23
- package/dist/dashboard/app/DeleteDialog.d.ts +0 -11
- package/dist/dashboard/atoms/delete.d.ts +0 -68
- package/dist/dashboard/atoms/delete.js +0 -143
- package/dist/chunks/{chunk-MOWR65LM.js → chunk-PYDOMKJZ.js} +71 -71
|
@@ -8,8 +8,11 @@ import {
|
|
|
8
8
|
normalizeGithubSourceOptions
|
|
9
9
|
} from "alinea/core/source/GithubSource";
|
|
10
10
|
import { ShaMismatchError } from "alinea/core/source/ShaMismatchError";
|
|
11
|
+
import { ReadonlyTree } from "alinea/core/source/Tree";
|
|
12
|
+
import { assert } from "alinea/core/util/Assert";
|
|
11
13
|
import { base64, btoa } from "alinea/core/util/Encoding";
|
|
12
14
|
import { fileVersions } from "alinea/core/util/EntryFilenames";
|
|
15
|
+
import { isRecord } from "alinea/core/util/Objects";
|
|
13
16
|
import { join, relative } from "alinea/core/util/Paths";
|
|
14
17
|
var GithubApi = class extends GithubSource {
|
|
15
18
|
#options;
|
|
@@ -18,9 +21,15 @@ var GithubApi = class extends GithubSource {
|
|
|
18
21
|
super(normalized);
|
|
19
22
|
this.#options = normalized;
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
write(request) {
|
|
25
|
+
return this.spending("save", () => this.#write(request));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Commit through GraphQL, which also answers the content sha before and
|
|
29
|
+
* after: a save spends none of the REST rate limit.
|
|
30
|
+
*/
|
|
31
|
+
async #write(request) {
|
|
32
|
+
const { oid: currentCommit, contentSha: currentSha } = await this.#getLatestCommit();
|
|
24
33
|
if (currentSha !== request.fromSha)
|
|
25
34
|
throw new ShaMismatchError(currentSha, request.fromSha);
|
|
26
35
|
const { user } = request;
|
|
@@ -35,13 +44,16 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
35
44
|
request.changes,
|
|
36
45
|
commitMessage
|
|
37
46
|
);
|
|
38
|
-
return { sha:
|
|
47
|
+
return { sha: newCommit.contentSha };
|
|
39
48
|
}
|
|
40
|
-
|
|
41
|
-
return this.#getFileCommitHistory(file);
|
|
49
|
+
revisions(file) {
|
|
50
|
+
return this.spending("history", () => this.#getFileCommitHistory(file));
|
|
42
51
|
}
|
|
43
52
|
async revisionData(file, revisionId) {
|
|
44
|
-
const content = await this
|
|
53
|
+
const content = await this.spending(
|
|
54
|
+
"revision",
|
|
55
|
+
() => this.#getFileContentAtCommit(file, revisionId)
|
|
56
|
+
);
|
|
45
57
|
try {
|
|
46
58
|
return content ? JSON.parse(content) : void 0;
|
|
47
59
|
} catch (error) {
|
|
@@ -49,7 +61,7 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
49
61
|
}
|
|
50
62
|
}
|
|
51
63
|
async #graphQL(query, variables, token) {
|
|
52
|
-
return
|
|
64
|
+
return this.githubFetch("https://api.github.com/graphql", {
|
|
53
65
|
method: "POST",
|
|
54
66
|
headers: {
|
|
55
67
|
Authorization: `Bearer ${token}`,
|
|
@@ -60,9 +72,12 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
60
72
|
if (response.ok) return response.json();
|
|
61
73
|
throw new HttpError(response.status, await response.text());
|
|
62
74
|
}).then((result) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
const errors = Array.isArray(result.errors) ? result.errors.filter((error) => !isMissingFile(error)) : [];
|
|
76
|
+
if (errors.length > 0) {
|
|
77
|
+
const message = errors.map(
|
|
78
|
+
(error) => isRecord(error) && typeof error.message === "string" ? error.message : JSON.stringify(error)
|
|
79
|
+
).join("; ");
|
|
80
|
+
console.trace(errors);
|
|
66
81
|
throw new Error(message);
|
|
67
82
|
}
|
|
68
83
|
return result;
|
|
@@ -119,7 +134,7 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
119
134
|
}))
|
|
120
135
|
);
|
|
121
136
|
const earliest = commits[commits.length - 1].oid;
|
|
122
|
-
const res = await
|
|
137
|
+
const res = await this.githubFetch(
|
|
123
138
|
`https://api.github.com/repos/${owner}/${repo}/commits/${earliest}`,
|
|
124
139
|
{ headers: { Authorization: `Bearer ${authToken}` } }
|
|
125
140
|
);
|
|
@@ -157,10 +172,10 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
157
172
|
const { additions, deletions } = await this.#processChanges(changes);
|
|
158
173
|
const { owner, repo, branch, authToken } = this.#options;
|
|
159
174
|
return this.#graphQL(
|
|
160
|
-
`mutation CreateCommitOnBranch($input: CreateCommitOnBranchInput!) {
|
|
175
|
+
`mutation CreateCommitOnBranch($input: CreateCommitOnBranchInput!, $content: String!) {
|
|
161
176
|
createCommitOnBranch(input: $input) {
|
|
162
177
|
commit {
|
|
163
|
-
|
|
178
|
+
${commitStateFields}
|
|
164
179
|
}
|
|
165
180
|
}
|
|
166
181
|
}`,
|
|
@@ -173,13 +188,11 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
173
188
|
message: { headline: commitMessage },
|
|
174
189
|
fileChanges: { additions, deletions },
|
|
175
190
|
expectedHeadOid
|
|
176
|
-
}
|
|
191
|
+
},
|
|
192
|
+
content: this.contentLocation
|
|
177
193
|
},
|
|
178
194
|
authToken
|
|
179
|
-
).then((result) => {
|
|
180
|
-
const commitId = result.data.createCommitOnBranch.commit.oid;
|
|
181
|
-
return commitId;
|
|
182
|
-
}).catch((error) => {
|
|
195
|
+
).then((result) => commitState(result.data.createCommitOnBranch.commit)).catch((error) => {
|
|
183
196
|
if (error instanceof Error) {
|
|
184
197
|
const mismatchMessage = /is at ([a-z0-9]+) but expected ([a-z0-9]+)/;
|
|
185
198
|
const match = error.message.match(mismatchMessage);
|
|
@@ -238,21 +251,21 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
238
251
|
}
|
|
239
252
|
return { additions, deletions };
|
|
240
253
|
}
|
|
241
|
-
async #
|
|
254
|
+
async #getLatestCommit() {
|
|
242
255
|
const { owner, repo, branch, authToken } = this.#options;
|
|
243
256
|
return this.#graphQL(
|
|
244
|
-
`query GetLatestCommit($owner: String!, $repo: String!, $branch: String!) {
|
|
257
|
+
`query GetLatestCommit($owner: String!, $repo: String!, $branch: String!, $content: String!) {
|
|
245
258
|
repository(owner: $owner, name: $repo) {
|
|
246
259
|
ref(qualifiedName: $branch) {
|
|
247
260
|
target {
|
|
248
|
-
|
|
261
|
+
${commitStateFields}
|
|
249
262
|
}
|
|
250
263
|
}
|
|
251
264
|
}
|
|
252
265
|
}`,
|
|
253
|
-
{ owner, repo, branch },
|
|
266
|
+
{ owner, repo, branch, content: this.contentLocation },
|
|
254
267
|
authToken
|
|
255
|
-
).then((result) => result.data.repository.ref.target
|
|
268
|
+
).then((result) => commitState(result.data.repository.ref.target));
|
|
256
269
|
}
|
|
257
270
|
async #fetchUploadedContent(url) {
|
|
258
271
|
const response = await fetch(url);
|
|
@@ -264,6 +277,16 @@ Co-authored-by: ${user.name} <${user.email}>`;
|
|
|
264
277
|
function repositoryPath(...segments) {
|
|
265
278
|
return relative("/", join("/", ...segments));
|
|
266
279
|
}
|
|
280
|
+
var commitStateFields = `oid ... on Commit { file(path: $content) { oid } }`;
|
|
281
|
+
function commitState(commit) {
|
|
282
|
+
assert(isRecord(commit) && typeof commit.oid === "string");
|
|
283
|
+
const file = commit.file;
|
|
284
|
+
const contentSha = isRecord(file) && typeof file.oid === "string" ? file.oid : ReadonlyTree.EMPTY.sha;
|
|
285
|
+
return { oid: commit.oid, contentSha };
|
|
286
|
+
}
|
|
287
|
+
function isMissingFile(error) {
|
|
288
|
+
return isRecord(error) && error.type === "NOT_FOUND" && Array.isArray(error.path) && error.path.at(-1) === "file";
|
|
289
|
+
}
|
|
267
290
|
export {
|
|
268
291
|
GithubApi
|
|
269
292
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
driver_exports
|
|
3
|
-
} from "../../chunks/chunk-
|
|
4
|
-
import "../../chunks/chunk-
|
|
5
|
-
import "../../chunks/chunk-
|
|
6
|
-
import "../../chunks/chunk-
|
|
7
|
-
import "../../chunks/chunk-
|
|
3
|
+
} from "../../chunks/chunk-4ZA6KZHS.js";
|
|
4
|
+
import "../../chunks/chunk-VA6NC3MI.js";
|
|
5
|
+
import "../../chunks/chunk-A2I6MCCS.js";
|
|
6
|
+
import "../../chunks/chunk-RAR44T5O.js";
|
|
7
|
+
import "../../chunks/chunk-PTYZMV5G.js";
|
|
8
8
|
import "../../chunks/chunk-N47Y62CI.js";
|
|
9
9
|
import "../../chunks/chunk-QBPYWU6C.js";
|
|
10
10
|
import "../../chunks/chunk-2BJ2IFQM.js";
|
|
11
11
|
import "../../chunks/chunk-XCZXR3C2.js";
|
|
12
|
-
import "../../chunks/chunk-
|
|
12
|
+
import "../../chunks/chunk-PYDOMKJZ.js";
|
|
13
13
|
import "../../chunks/chunk-76VMZTLN.js";
|
|
14
14
|
import "../../chunks/chunk-2PIFHEYR.js";
|
|
15
15
|
import "../../chunks/chunk-K62JP6HR.js";
|