From b2d9a3a47eba3806a002ad00a9b0096b14b32063 Mon Sep 17 00:00:00 2001 From: Tom Antas Date: Fri, 16 Oct 2026 19:05:57 +0200 Subject: [PATCH] web: migrate to sveltekit 3 Moves the app to SvelteKit 3 with the toolchain it needs (adapter-node 6, adapter-cloudflare 8, Vite 8.3, Vitest 5, Storybook 10.6). - $lib, $routes, $fixtures, $static and $storybook become package.json subpath imports (#lib/*, ...) with explicit file extensions - svelte.config.js is gone: kit and compiler options live in vite.config.ts, server env is declared in src/env.ts - $app/environment is now $app/env, param matchers move to src/params.ts - the docs site resolves #lib for the components it imports from web - eslint: escape the # in the fixtures import rule, which gitignore-style patterns read as a comment Signed-off-by: Tom Antas --- docs/astro.config.mjs | 2 + .../content/docs/components/other-services.md | 5 +- web/.storybook/MockAuth.svelte | 4 +- web/.storybook/MockNotifications.svelte | 4 +- web/.storybook/SimulatedRepoSettings.svelte | 18 +- web/.storybook/WorkflowRunReplay.svelte | 4 +- web/.storybook/main.ts | 22 +- web/.storybook/mocks/navigation.ts | 7 + web/_headers | 5 + web/eslint.config.js | 19 +- web/package.json | 49 +- .../@sveltejs__adapter-node@6.0.0.patch | 15 + web/pnpm-lock.yaml | 1878 ++++++++--------- web/pnpm-workspace.yaml | 4 + web/src/env.ts | 45 + web/src/fixtures/comments.ts | 4 +- web/src/fixtures/diff.ts | 14 +- web/src/fixtures/emails.ts | 2 +- web/src/fixtures/pipelines.ts | 6 +- web/src/fixtures/pull.ts | 10 +- web/src/fixtures/search.ts | 2 +- web/src/fixtures/timeline.ts | 4 +- web/src/hooks.server.test.ts | 2 +- web/src/hooks.server.ts | 6 +- web/src/lib/action.test.ts | 2 +- web/src/lib/api/_request.test.ts | 2 +- web/src/lib/api/_request.ts | 6 +- web/src/lib/api/access.test.ts | 4 +- web/src/lib/api/access.ts | 4 +- web/src/lib/api/actAs.test.ts | 2 +- web/src/lib/api/actAs.ts | 8 +- web/src/lib/api/appview.ts | 8 +- web/src/lib/api/attestation.test.ts | 10 +- web/src/lib/api/attestation.ts | 6 +- web/src/lib/api/awaitRecord.test.ts | 4 +- web/src/lib/api/awaitRecord.ts | 8 +- web/src/lib/api/blame.test.ts | 4 +- web/src/lib/api/blame.ts | 14 +- web/src/lib/api/blob.test.ts | 2 +- web/src/lib/api/blob.ts | 4 +- web/src/lib/api/cache.test.ts | 12 +- web/src/lib/api/cache.ts | 2 +- web/src/lib/api/client.test.ts | 10 +- web/src/lib/api/client.ts | 4 +- web/src/lib/api/cob.test.ts | 18 +- web/src/lib/api/cob.ts | 12 +- web/src/lib/api/collaborators.test.ts | 4 +- web/src/lib/api/collaborators.ts | 6 +- web/src/lib/api/comment.test.ts | 22 +- web/src/lib/api/comment.ts | 22 +- web/src/lib/api/commitStatuses.ts | 2 +- web/src/lib/api/count.ts | 6 +- web/src/lib/api/coverage.ts | 4 +- web/src/lib/api/delegation.test.ts | 4 +- web/src/lib/api/delegation.ts | 8 +- web/src/lib/api/deliberi.ts | 8 +- web/src/lib/api/descriptors.ts | 2 +- web/src/lib/api/emailDid.test.ts | 2 +- web/src/lib/api/emails.test.ts | 6 +- web/src/lib/api/emails.ts | 6 +- web/src/lib/api/enrich.ts | 12 +- web/src/lib/api/fileHistory.test.ts | 4 +- web/src/lib/api/fileHistory.ts | 2 +- web/src/lib/api/gitclient.test.ts | 2 +- web/src/lib/api/gitclient.ts | 8 +- web/src/lib/api/githubImport.test.ts | 28 +- web/src/lib/api/githubImport.ts | 22 +- web/src/lib/api/gitmirror.test.ts | 4 +- web/src/lib/api/gitmirror.ts | 20 +- web/src/lib/api/graph.test.ts | 10 +- web/src/lib/api/graph.ts | 22 +- web/src/lib/api/identity.test.ts | 4 +- web/src/lib/api/identity.ts | 6 +- web/src/lib/api/index.ts | 24 +- web/src/lib/api/invite.test.ts | 10 +- web/src/lib/api/invite.ts | 14 +- web/src/lib/api/issue.test.ts | 18 +- web/src/lib/api/issue.ts | 22 +- web/src/lib/api/knot.test.ts | 8 +- web/src/lib/api/knot.ts | 12 +- web/src/lib/api/knotmirror.test.ts | 4 +- web/src/lib/api/knotmirror.ts | 24 +- web/src/lib/api/labels.ts | 18 +- web/src/lib/api/liveCommitStatuses.svelte.ts | 8 +- web/src/lib/api/load.test.ts | 14 +- web/src/lib/api/load.ts | 9 +- web/src/lib/api/migrator.test.ts | 26 +- web/src/lib/api/migrator.ts | 24 +- web/src/lib/api/moderation.ts | 2 +- web/src/lib/api/moderationLabels.ts | 8 +- web/src/lib/api/notifications.ts | 18 +- web/src/lib/api/orgCreate.test.ts | 14 +- web/src/lib/api/orgCreate.ts | 10 +- web/src/lib/api/orgMembers.test.ts | 10 +- web/src/lib/api/orgMembers.ts | 6 +- web/src/lib/api/orgProfile.test.ts | 16 +- web/src/lib/api/orgProfile.ts | 10 +- web/src/lib/api/organizations.test.ts | 32 +- web/src/lib/api/organizations.ts | 18 +- web/src/lib/api/pagination.test.ts | 4 +- web/src/lib/api/pagination.ts | 2 +- web/src/lib/api/patchStream.test.ts | 4 +- web/src/lib/api/patchStream.ts | 2 +- web/src/lib/api/preferences.test.ts | 4 +- web/src/lib/api/preferences.ts | 6 +- web/src/lib/api/profile.test.ts | 8 +- web/src/lib/api/profile.ts | 18 +- web/src/lib/api/profileSettings.test.ts | 14 +- web/src/lib/api/profileSettings.ts | 10 +- web/src/lib/api/pull.test.ts | 14 +- web/src/lib/api/pull.ts | 10 +- web/src/lib/api/pullCompose.test.ts | 4 +- web/src/lib/api/pullCompose.ts | 18 +- web/src/lib/api/pullRoute.test.ts | 2 +- web/src/lib/api/rawCommit.ts | 14 + web/src/lib/api/reaction.ts | 16 +- web/src/lib/api/records.ts | 28 +- web/src/lib/api/repo.test.ts | 6 +- web/src/lib/api/repo.ts | 39 +- web/src/lib/api/repoCreate.ts | 20 +- web/src/lib/api/repoDiff.test.ts | 8 +- web/src/lib/api/repoDiff.ts | 18 +- web/src/lib/api/repoIndex.test.ts | 8 +- web/src/lib/api/repoIndex.ts | 14 +- web/src/lib/api/repoSettings.test.ts | 6 +- web/src/lib/api/repoSettings.ts | 24 +- web/src/lib/api/search.test.ts | 6 +- web/src/lib/api/search.ts | 10 +- web/src/lib/api/secrets.test.ts | 8 +- web/src/lib/api/secrets.ts | 8 +- web/src/lib/api/settings.ts | 12 +- web/src/lib/api/signup.test.ts | 2 +- web/src/lib/api/signup.ts | 4 +- web/src/lib/api/sites.test.ts | 12 +- web/src/lib/api/sites.ts | 10 +- web/src/lib/api/spindle.test.ts | 4 +- web/src/lib/api/spindle.ts | 18 +- web/src/lib/api/spindleLogs.test.ts | 2 +- web/src/lib/api/spindleLogs.ts | 4 +- web/src/lib/api/spindlewrite.test.ts | 12 +- web/src/lib/api/spindlewrite.ts | 19 +- web/src/lib/api/strings.test.ts | 6 +- web/src/lib/api/strings.ts | 18 +- web/src/lib/api/syntax.test.ts | 9 +- web/src/lib/api/ticket.test.ts | 10 +- web/src/lib/api/ticket.ts | 6 +- web/src/lib/api/ticketSearch.ts | 12 +- web/src/lib/api/tranquil.test.ts | 2 +- web/src/lib/api/tranquil.ts | 6 +- web/src/lib/api/uri.test.ts | 2 +- web/src/lib/api/uri.ts | 2 +- web/src/lib/api/webhooks.test.ts | 12 +- web/src/lib/api/webhooks.ts | 22 +- web/src/lib/api/write.test.ts | 34 +- web/src/lib/api/write.ts | 6 +- web/src/lib/assetHeaders.test.ts | 2 +- web/src/lib/auth.svelte.ts | 18 +- web/src/lib/auth.test.ts | 6 +- web/src/lib/auth/accounts.ts | 2 +- web/src/lib/auth/agent.test.ts | 2 +- web/src/lib/auth/agent.ts | 2 +- web/src/lib/auth/guards.ts | 8 +- web/src/lib/auth/handleResolver.test.ts | 2 +- web/src/lib/auth/onboarding.test.ts | 2 +- web/src/lib/auth/onboarding.ts | 2 +- web/src/lib/auth/orgSessions.test.ts | 4 +- web/src/lib/auth/orgSessions.ts | 2 +- web/src/lib/auth/pending.ts | 4 +- web/src/lib/auth/returnTo.test.ts | 2 +- web/src/lib/auth/scopes.test.ts | 2 +- .../attestations/AttestationBanner.svelte | 12 +- .../auth/AccountSelector.stories.svelte | 4 +- .../components/auth/AccountSelector.svelte | 8 +- .../components/comment/Comment.stories.svelte | 4 +- web/src/lib/components/comment/Comment.svelte | 29 +- .../comment/CommentBox.stories.svelte | 2 +- .../lib/components/comment/CommentBox.svelte | 8 +- .../comment/CommentCard.stories.svelte | 8 +- .../lib/components/comment/CommentCard.svelte | 52 +- .../comment/CommentEditor.stories.svelte | 8 +- .../components/comment/CommentEditor.svelte | 34 +- .../comment/CommentList.stories.svelte | 4 +- .../lib/components/comment/CommentList.svelte | 8 +- .../components/comment/CommentSection.svelte | 14 +- .../lib/components/comment/comments.test.ts | 10 +- web/src/lib/components/comment/comments.ts | 26 +- .../lib/components/editor/PierreEditor.svelte | 4 +- .../components/home/ChatAvatar.stories.svelte | 6 +- web/src/lib/components/home/ChatAvatar.svelte | 2 +- .../components/home/ChatBubble.stories.svelte | 4 +- web/src/lib/components/home/ChatBubble.svelte | 2 +- .../components/home/ChatEvent.stories.svelte | 4 +- web/src/lib/components/home/ChatEvent.svelte | 2 +- .../home/CircularTimeline.stories.svelte | 4 +- .../components/home/CircularTimeline.svelte | 10 +- .../home/DollyEditor.stories.svelte | 2 +- .../lib/components/home/DollyEditor.svelte | 6 +- .../home/FeatureCard.stories.svelte | 2 +- .../home/FeatureStack.stories.svelte | 2 +- .../lib/components/home/FeatureStack.svelte | 44 +- .../home/HackableSection.stories.svelte | 2 +- .../components/home/HackableSection.svelte | 10 +- .../lib/components/home/Hero.stories.svelte | 2 +- web/src/lib/components/home/Hero.svelte | 12 +- .../components/home/HomeCta.stories.svelte | 2 +- web/src/lib/components/home/HomeCta.svelte | 4 +- .../components/home/KnotGlobe.stories.svelte | 4 +- web/src/lib/components/home/KnotGlobe.svelte | 6 +- .../home/MarketingHome.stories.svelte | 2 +- .../lib/components/home/MarketingHome.svelte | 14 +- .../home/SectionHeader.stories.svelte | 4 +- .../lib/components/home/SectionHeader.svelte | 21 +- .../home/SelfHostSection.stories.svelte | 2 +- .../components/home/SelfHostSection.svelte | 16 +- .../components/home/SignupForm.stories.svelte | 2 +- web/src/lib/components/home/SignupForm.svelte | 4 +- .../home/SocialColumn.stories.svelte | 4 +- .../lib/components/home/SocialColumn.svelte | 4 +- .../components/home/SocialPost.stories.svelte | 4 +- web/src/lib/components/home/SocialPost.svelte | 6 +- .../components/home/SocialWall.stories.svelte | 4 +- web/src/lib/components/home/SocialWall.svelte | 6 +- .../home/SpindleSheets.stories.svelte | 2 +- .../lib/components/home/SpindleSheets.svelte | 7 +- .../components/home/StackDemo.stories.svelte | 4 +- web/src/lib/components/home/StackDemo.svelte | 12 +- .../components/home/Sticker.stories.svelte | 2 +- .../components/home/VouchChat.stories.svelte | 6 +- web/src/lib/components/home/VouchChat.svelte | 10 +- web/src/lib/components/home/content.ts | 18 +- web/src/lib/components/home/dolly.test.ts | 2 +- web/src/lib/components/home/dolly.ts | 2 +- .../electronics/FloppyComputer.stories.svelte | 2 +- .../home/electronics/FloppyComputer.svelte | 14 +- .../components/home/electronics/Guide.svelte | 2 +- .../components/home/electronics/Logo.svelte | 2 +- .../electronics/PiCartridge.stories.svelte | 2 +- .../home/electronics/PiCartridge.svelte | 16 +- .../components/home/electronics/Plate.svelte | 2 +- .../electronics/SnesCartridge.stories.svelte | 2 +- .../home/electronics/SnesCartridge.svelte | 14 +- .../components/home/electronics/Solid.svelte | 2 +- .../components/home/electronics/iso.test.ts | 2 +- .../components/home/electronics/pi.test.ts | 4 +- web/src/lib/components/home/electronics/pi.ts | 2 +- web/src/lib/components/home/globe.test.ts | 2 +- .../components/import/ConnectAccount.svelte | 4 +- .../import/GitHubAuthorizeStep.svelte | 4 +- .../import/GitHubConnectStep.svelte | 6 +- .../import/GitHubImporter.stories.svelte | 2 +- .../components/import/GitHubImporter.svelte | 14 +- .../import/GitHubImporterFixture.svelte | 2 +- .../import/GitHubRepoSelectStep.svelte | 26 +- .../lib/components/import/MigrationRow.svelte | 2 +- .../components/import/MigrationStep.svelte | 10 +- .../lib/components/import/RepoConfig.svelte | 6 +- web/src/lib/components/import/RepoRow.svelte | 19 +- .../components/import/UrlRepoImporter.svelte | 25 +- .../import/gitHubImportState.svelte.ts | 22 +- .../import/gitHubImportState.test.ts | 2 +- .../components/import/grantEvidence.test.ts | 2 +- .../lib/components/import/grantEvidence.ts | 2 +- .../components/import/migrationRows.test.ts | 4 +- .../lib/components/import/migrationRows.ts | 4 +- .../lib/components/import/stepGating.test.ts | 2 +- .../migration/MigrationLanding.stories.svelte | 2 +- .../migration/MigrationLanding.svelte | 22 +- .../ModerationNotice.stories.svelte | 8 +- .../moderation/ModerationNotice.svelte | 7 +- .../moderation/ReportDialog.stories.svelte | 2 +- .../components/moderation/ReportDialog.svelte | 20 +- .../moderation/ReportItems.stories.svelte | 4 +- .../components/moderation/ReportItems.svelte | 8 +- .../lib/components/moderation/gate.svelte.ts | 10 +- .../components/moderation/reportReasons.ts | 4 +- .../components/moderation/reporting.svelte.ts | 2 +- .../NotificationBell.stories.svelte | 4 +- .../notifications/NotificationBell.svelte | 16 +- .../NotificationItem.stories.svelte | 6 +- .../notifications/NotificationItem.svelte | 12 +- .../notifications/NotificationItem.test.ts | 6 +- .../NotificationList.stories.svelte | 6 +- .../notifications/NotificationList.svelte | 20 +- .../NotificationToolbar.stories.svelte | 2 +- .../notifications/NotificationToolbar.svelte | 8 +- web/src/lib/components/notifications/mock.ts | 2 +- .../notifications/notification.test.ts | 7 +- .../components/notifications/notification.ts | 4 +- .../OrganizationCreationForm.stories.svelte | 4 +- .../OrganizationCreationForm.svelte | 28 +- .../welcome/OrganizationFinishStep.svelte | 2 +- .../OrganizationMembersStep.stories.svelte | 4 +- .../welcome/OrganizationMembersStep.svelte | 4 +- .../welcome/OrganizationProfileStep.svelte | 6 +- .../profile/AvatarList.stories.svelte | 2 +- .../lib/components/profile/AvatarList.svelte | 4 +- .../profile/FollowButton.stories.svelte | 4 +- .../components/profile/FollowButton.svelte | 22 +- .../profile/FollowCard.stories.svelte | 4 +- .../lib/components/profile/FollowCard.svelte | 6 +- .../profile/FollowCardContent.svelte | 12 +- .../profile/FollowerFollowing.svelte | 4 +- .../components/profile/ListViewSwitch.svelte | 6 +- .../profile/NetworkVouches.stories.svelte | 4 +- .../components/profile/NetworkVouches.svelte | 8 +- .../lib/components/profile/PagedList.svelte | 14 +- .../profile/PagedListSkeleton.svelte | 10 +- .../profile/PinnedRepositories.svelte | 8 +- .../profile/ProfileActivityChart.svelte | 11 +- .../lib/components/profile/ProfileBio.svelte | 4 +- .../profile/ProfileChrome.stories.svelte | 12 +- .../components/profile/ProfileChrome.svelte | 33 +- .../components/profile/ProfileEditForm.svelte | 20 +- .../components/profile/ProfileMoreMenu.svelte | 6 +- .../profile/ProfilePopover.stories.svelte | 6 +- .../components/profile/ProfilePopover.svelte | 34 +- .../components/profile/ProfileShell.svelte | 8 +- .../profile/ProfileSocialLinks.svelte | 8 +- .../lib/components/profile/ProfileTabs.svelte | 6 +- .../components/profile/RepoSearchForm.svelte | 4 +- .../profile/StringCard.stories.svelte | 4 +- .../lib/components/profile/StringCard.svelte | 6 +- .../profile/StringCardContent.svelte | 8 +- .../profile/UserProfileChrome.svelte | 46 +- .../profile/VouchAvatar.stories.svelte | 4 +- .../lib/components/profile/VouchAvatar.svelte | 16 +- .../profile/VouchButton.stories.svelte | 2 +- .../lib/components/profile/VouchButton.svelte | 24 +- .../lib/components/profile/VouchCard.svelte | 4 +- web/src/lib/components/profile/bio.test.ts | 2 +- .../lib/components/profile/counts.svelte.ts | 4 +- .../organization/OrganizationChrome.svelte | 38 +- .../OrganizationOverviewTab.svelte | 6 +- web/src/lib/components/profile/pages.test.ts | 6 +- web/src/lib/components/profile/pages.ts | 36 +- .../components/profile/pagination.svelte.ts | 2 +- .../lib/components/profile/pagination.test.ts | 2 +- .../profile/profileActivityChart.test.ts | 4 +- .../profile/tabs/OverviewTab.stories.svelte | 4 +- .../profile/tabs/OverviewTab.svelte | 6 +- .../components/profile/tabs/PeopleTab.svelte | 16 +- .../profile/tabs/RepoListTab.stories.svelte | 4 +- .../profile/tabs/RepoListTab.svelte | 20 +- .../components/profile/tabs/StarredTab.svelte | 22 +- .../profile/tabs/StringListTab.svelte | 18 +- .../components/profile/tabs/VouchTab.svelte | 20 +- web/src/lib/components/profile/types.ts | 2 +- .../components/profile/vouchBadge.svelte.ts | 8 +- .../lib/components/profile/vouchBadge.test.ts | 6 +- .../profile/vouchRelationship.test.ts | 4 +- .../components/profile/vouchRelationship.ts | 6 +- .../lib/components/reaction/Reaction.svelte | 6 +- .../reaction/ReactionPicker.stories.svelte | 2 +- .../components/reaction/ReactionPicker.svelte | 25 +- .../reaction/ReactionSummary.svelte | 14 +- .../reaction/Reactions.stories.svelte | 8 +- .../lib/components/reaction/Reactions.svelte | 24 +- .../components/reaction/ReactorList.svelte | 8 +- .../lib/components/reaction/reactions.test.ts | 6 +- web/src/lib/components/reaction/reactions.ts | 6 +- .../components/repo/BlobHeader.stories.svelte | 2 +- web/src/lib/components/repo/BlobHeader.svelte | 38 +- .../components/repo/BlobView.stories.svelte | 10 +- web/src/lib/components/repo/BlobView.svelte | 18 +- .../components/repo/BranchList.stories.svelte | 2 +- web/src/lib/components/repo/BranchList.svelte | 10 +- .../repo/BranchTable.stories.svelte | 4 +- .../lib/components/repo/BranchTable.svelte | 8 +- .../repo/CloneDropdown.stories.svelte | 4 +- .../lib/components/repo/CloneDropdown.svelte | 16 +- .../repo/CommitHeader.stories.svelte | 6 +- .../lib/components/repo/CommitHeader.svelte | 18 +- .../components/repo/CommitList.stories.svelte | 6 +- web/src/lib/components/repo/CommitList.svelte | 22 +- .../repo/CommitLogView.stories.svelte | 6 +- .../lib/components/repo/CommitLogView.svelte | 14 +- .../components/repo/CommitRow.stories.svelte | 8 +- web/src/lib/components/repo/CommitRow.svelte | 28 +- .../lib/components/repo/CommitSignOff.svelte | 8 +- .../repo/CommitSignature.stories.svelte | 2 +- .../components/repo/CommitSignature.svelte | 4 +- .../components/repo/CommitView.stories.svelte | 6 +- web/src/lib/components/repo/CommitView.svelte | 26 +- .../lib/components/repo/DiffCodeView.svelte | 6 +- .../lib/components/repo/DiffFileHeader.svelte | 8 +- .../repo/DiffFileTree.stories.svelte | 2 +- .../lib/components/repo/DiffFileTree.svelte | 6 +- web/src/lib/components/repo/DiffFiles.svelte | 14 +- .../repo/DiffStatPill.stories.svelte | 2 +- .../lib/components/repo/DiffStatPill.svelte | 2 +- .../components/repo/DiffView.stories.svelte | 4 +- web/src/lib/components/repo/DiffView.svelte | 48 +- .../components/repo/EmptyRepo.stories.svelte | 4 +- web/src/lib/components/repo/EmptyRepo.svelte | 22 +- .../repo/EntitySubscribeButton.stories.svelte | 4 +- .../repo/EntitySubscribeButton.svelte | 14 +- .../repo/FileCardHeader.stories.svelte | 4 +- .../repo/FileHistoryView.stories.svelte | 4 +- .../components/repo/FileHistoryView.svelte | 14 +- .../components/repo/FileTree.stories.svelte | 2 +- web/src/lib/components/repo/FileTree.svelte | 10 +- .../repo/KnotUpgradeBanner.stories.svelte | 2 +- .../components/repo/KnotUpgradeBanner.svelte | 4 +- .../components/repo/LabelPanel.stories.svelte | 2 +- web/src/lib/components/repo/LabelPanel.svelte | 18 +- .../lib/components/repo/LabelSummary.svelte | 8 +- .../repo/LanguageBar.stories.svelte | 2 +- .../lib/components/repo/LanguageBar.svelte | 9 +- .../repo/LastCommitPanel.stories.svelte | 2 +- .../components/repo/LastCommitPanel.svelte | 8 +- web/src/lib/components/repo/OwnerTitle.svelte | 2 +- .../repo/PanelHeader.stories.svelte | 2 +- .../lib/components/repo/PanelHeader.svelte | 2 +- .../components/repo/PierreFile.stories.svelte | 4 +- web/src/lib/components/repo/PierreFile.svelte | 10 +- .../lib/components/repo/Readme.stories.svelte | 2 +- web/src/lib/components/repo/Readme.svelte | 2 +- .../components/repo/RefChip.stories.svelte | 2 +- .../repo/RefSelector.stories.svelte | 2 +- .../lib/components/repo/RefSelector.svelte | 6 +- .../components/repo/RepoCard.stories.svelte | 4 +- web/src/lib/components/repo/RepoCard.svelte | 8 +- .../components/repo/RepoCardContent.svelte | 15 +- .../components/repo/RepoChrome.stories.svelte | 8 +- web/src/lib/components/repo/RepoChrome.svelte | 8 +- .../components/repo/RepoCreationForm.svelte | 36 +- .../components/repo/RepoCrumbs.stories.svelte | 2 +- web/src/lib/components/repo/RepoCrumbs.svelte | 4 +- .../repo/RepoForkForm.stories.svelte | 4 +- .../lib/components/repo/RepoForkForm.svelte | 8 +- .../components/repo/RepoHeader.stories.svelte | 4 +- web/src/lib/components/repo/RepoHeader.svelte | 22 +- .../repo/RepoIndexPanelSkeleton.svelte | 4 +- .../repo/RepoIndexView.stories.svelte | 12 +- .../lib/components/repo/RepoIndexView.svelte | 45 +- .../components/repo/RepoReadmeSkeleton.svelte | 4 +- .../components/repo/RepoTabs.stories.svelte | 6 +- web/src/lib/components/repo/RepoTabs.svelte | 6 +- .../repo/RepoToolbar.stories.svelte | 4 +- .../lib/components/repo/RepoToolbar.svelte | 12 +- .../repo/ServicePicker.stories.svelte | 2 +- .../lib/components/repo/ServicePicker.svelte | 12 +- .../lib/components/repo/SourceSelector.svelte | 10 +- .../components/repo/StarButton.stories.svelte | 4 +- web/src/lib/components/repo/StarButton.svelte | 32 +- .../repo/StarredBy.bones.stories.svelte | 2 +- web/src/lib/components/repo/StarredBy.svelte | 4 +- .../components/repo/StarredByContent.svelte | 4 +- .../components/repo/SubjectLabelPanel.svelte | 18 +- .../repo/SubscribeButton.stories.svelte | 4 +- .../components/repo/SubscribeButton.svelte | 22 +- .../components/repo/TagCard.stories.svelte | 4 +- web/src/lib/components/repo/TagCard.svelte | 8 +- .../components/repo/TagList.stories.svelte | 6 +- web/src/lib/components/repo/TagList.svelte | 6 +- .../components/repo/TopicList.stories.svelte | 2 +- web/src/lib/components/repo/TopicList.svelte | 2 +- .../components/repo/TreeHeader.stories.svelte | 2 +- web/src/lib/components/repo/TreeHeader.svelte | 10 +- .../repo/TreeView.bones.stories.svelte | 8 +- .../components/repo/blame/BlameChip.svelte | 8 +- .../components/repo/blame/BlameOverlay.svelte | 6 +- .../repo/blame/request.stories.svelte | 2 +- .../components/repo/blame/request.svelte.ts | 8 +- .../lib/components/repo/blame/types.test.ts | 2 +- web/src/lib/components/repo/branchOptions.ts | 2 +- web/src/lib/components/repo/diffQueue.test.ts | 8 +- web/src/lib/components/repo/diffQueue.ts | 11 +- web/src/lib/components/repo/diffRpc.ts | 4 +- .../lib/components/repo/fileAnchor.svelte.ts | 2 +- web/src/lib/components/repo/fileDiff.test.ts | 2 +- .../lib/components/repo/importPoll.test.ts | 4 +- web/src/lib/components/repo/importPoll.ts | 2 +- .../repo/issues/IssueForm.stories.svelte | 2 +- .../components/repo/issues/IssueForm.svelte | 42 +- .../issues/IssueThreadView.stories.svelte | 6 +- .../repo/issues/IssueThreadView.svelte | 56 +- web/src/lib/components/repo/pierre.ts | 6 +- .../repo/pipelines/Elapsed.stories.svelte | 2 +- .../components/repo/pipelines/Elapsed.svelte | 2 +- .../pipelines/PipelineCard.stories.svelte | 4 +- .../repo/pipelines/PipelineCard.svelte | 6 +- .../repo/pipelines/PipelineCardContent.svelte | 20 +- .../repo/pipelines/PipelineEmptyState.svelte | 4 +- .../pipelines/PipelineList.stories.svelte | 4 +- .../repo/pipelines/PipelineList.svelte | 16 +- .../pipelines/PipelineSearch.stories.svelte | 2 +- .../repo/pipelines/PipelineSearch.svelte | 6 +- .../repo/pipelines/PipelineStatusIcon.svelte | 4 +- .../repo/pipelines/PipelineSymbol.svelte | 10 +- .../pipelines/PipelineToolbar.stories.svelte | 2 +- .../repo/pipelines/PipelineToolbar.svelte | 18 +- .../PipelineWorkflows.stories.svelte | 4 +- .../repo/pipelines/PipelineWorkflows.svelte | 20 +- .../pipelines/StepStatusIcon.stories.svelte | 4 +- .../repo/pipelines/StepStatusIcon.svelte | 6 +- .../pipelines/WorkflowLogs.stories.svelte | 6 +- .../repo/pipelines/WorkflowLogs.svelte | 22 +- .../pipelines/WorkflowRunView.stories.svelte | 4 +- .../repo/pipelines/WorkflowRunView.svelte | 16 +- .../pipelines/WorkflowSidebar.stories.svelte | 6 +- .../repo/pipelines/WorkflowSidebar.svelte | 12 +- .../pipelines/WorkflowSteps.stories.svelte | 8 +- .../repo/pipelines/WorkflowSteps.svelte | 12 +- .../pipelines/WorkflowView.stories.svelte | 8 +- .../repo/pipelines/WorkflowView.svelte | 14 +- .../repo/pipelines/livePipelines.test.ts | 4 +- .../repo/pipelines/livePipelines.ts | 4 +- .../repo/pipelines/logStream.svelte.ts | 4 +- .../components/repo/pipelines/logs.test.ts | 4 +- web/src/lib/components/repo/pipelines/logs.ts | 8 +- .../lib/components/repo/pipelines/pipeline.ts | 2 +- .../repo/pulls/PullActions.stories.svelte | 6 +- .../components/repo/pulls/PullActions.svelte | 12 +- .../repo/pulls/PullApproveCi.svelte | 8 +- .../repo/pulls/PullCommitList.stories.svelte | 10 +- .../repo/pulls/PullCommitList.svelte | 20 +- .../pulls/PullCommitListHeader.stories.svelte | 14 +- .../repo/pulls/PullCommitListHeader.svelte | 12 +- .../repo/pulls/PullCommitRow.svelte | 20 +- .../repo/pulls/PullCompose.stories.svelte | 8 +- .../components/repo/pulls/PullCompose.svelte | 71 +- .../repo/pulls/PullDiscussion.stories.svelte | 12 +- .../repo/pulls/PullDiscussion.svelte | 20 +- .../pulls/PullReviewComment.stories.svelte | 6 +- .../repo/pulls/PullReviewComment.svelte | 44 +- .../repo/pulls/PullReviewCommentEditor.svelte | 12 +- .../PullReviewCommentForm.stories.svelte | 2 +- .../repo/pulls/PullReviewCommentForm.svelte | 14 +- .../repo/pulls/PullVersionList.stories.svelte | 6 +- .../repo/pulls/PullVersionList.svelte | 12 +- .../repo/pulls/PullVersionSheet.svelte | 12 +- .../repo/tickets/AssigneeField.svelte | 18 +- .../repo/tickets/TargetBranchField.svelte | 6 +- .../repo/tickets/Ticket.stories.svelte | 4 +- .../lib/components/repo/tickets/Ticket.svelte | 34 +- .../repo/tickets/TicketBody.stories.svelte | 2 +- .../components/repo/tickets/TicketBody.svelte | 2 +- .../repo/tickets/TicketCard.stories.svelte | 4 +- .../components/repo/tickets/TicketCard.svelte | 10 +- .../repo/tickets/TicketCardContent.svelte | 6 +- .../repo/tickets/TicketForm.stories.svelte | 2 +- .../components/repo/tickets/TicketForm.svelte | 24 +- .../repo/tickets/TicketInfoBar.svelte | 16 +- .../repo/tickets/TicketLabels.svelte | 8 +- .../repo/tickets/TicketList.stories.svelte | 4 +- .../components/repo/tickets/TicketList.svelte | 8 +- .../tickets/TicketQueryInput.stories.svelte | 2 +- .../repo/tickets/TicketQueryInput.svelte | 6 +- .../repo/tickets/TicketSearch.stories.svelte | 2 +- .../repo/tickets/TicketSearch.svelte | 7 +- .../tickets/TicketStatePill.stories.svelte | 2 +- .../repo/tickets/TicketToolbar.stories.svelte | 2 +- .../repo/tickets/TicketToolbar.svelte | 20 +- web/src/lib/components/repo/types.ts | 8 +- .../search/CodeResultCard.stories.svelte | 4 +- .../components/search/CodeResultCard.svelte | 8 +- .../components/search/CodeSearchView.svelte | 30 +- .../search/FileMatch.stories.svelte | 4 +- .../lib/components/search/FileMatch.svelte | 19 +- .../lib/components/search/SearchBar.svelte | 2 +- .../components/search/SearchSidebar.svelte | 9 +- .../lib/components/search/SearchTabs.svelte | 2 +- web/src/lib/components/search/chunks.test.ts | 2 +- web/src/lib/components/search/chunks.ts | 5 +- .../components/search/codeSearch.svelte.ts | 10 +- web/src/lib/components/search/highlight.ts | 8 +- .../search/tabs/CodeSearchTab.svelte | 2 +- .../search/tabs/RepoSearchTab.svelte | 8 +- .../lib/components/settings/AvatarForm.svelte | 16 +- .../lib/components/settings/DocsButton.svelte | 2 +- .../lib/components/settings/DrillDown.svelte | 2 +- .../lib/components/settings/FormRow.svelte | 2 +- .../settings/KeyCard.stories.svelte | 2 +- .../lib/components/settings/KeyCard.svelte | 4 +- .../components/settings/KeyCardContent.svelte | 6 +- .../settings/ProfileSettingsForm.svelte | 34 +- .../settings/RepoGeneralForm.svelte | 54 +- .../components/settings/SettingsBlock.svelte | 4 +- .../settings/SettingsNav.stories.svelte | 2 +- .../components/settings/SettingsNav.svelte | 8 +- .../settings/SettingsPanel.stories.svelte | 26 +- .../components/settings/SettingsPanel.svelte | 2 +- .../components/settings/SettingsRow.svelte | 4 +- .../settings/SettingsSaveBar.svelte | 2 +- .../settings/SettingsSection.svelte | 2 +- .../settings/SettingsToolbar.svelte | 2 +- .../components/settings/ThemePicker.svelte | 6 +- .../settings/VerifyEmailCard.stories.svelte | 2 +- .../settings/VerifyEmailCard.svelte | 2 +- .../settings/tabs/EmailsTab.stories.svelte | 4 +- .../components/settings/tabs/EmailsTab.svelte | 34 +- .../components/settings/tabs/KeysTab.svelte | 32 +- .../components/settings/tabs/KnotsTab.svelte | 28 +- .../settings/tabs/NotificationsTab.svelte | 24 +- .../tabs/OrganizationsTab.stories.svelte | 4 +- .../settings/tabs/OrganizationsTab.svelte | 30 +- .../settings/tabs/ProfileTab.svelte | 26 +- .../components/settings/tabs/SitesTab.svelte | 38 +- .../settings/tabs/SpindlesTab.svelte | 28 +- .../settings/tabs/emailRecheck.test.ts | 8 +- .../components/settings/tabs/emailRecheck.ts | 2 +- web/src/lib/components/shell/Footer.svelte | 2 +- .../components/shell/Topbar.stories.svelte | 4 +- web/src/lib/components/shell/Topbar.svelte | 20 +- .../lib/components/shell/TopbarSearch.svelte | 2 +- .../strings/StringForm.stories.svelte | 2 +- .../lib/components/strings/StringForm.svelte | 32 +- .../components/strings/StringHeader.svelte | 12 +- .../strings/StringView.stories.svelte | 2 +- .../lib/components/strings/StringView.svelte | 12 +- .../timeline/Announcements.stories.svelte | 4 +- .../components/timeline/Announcements.svelte | 6 +- .../NotificationsPreview.stories.svelte | 6 +- .../timeline/NotificationsPreview.svelte | 20 +- .../components/timeline/PreviewCard.svelte | 6 +- .../timeline/RecentItem.stories.svelte | 4 +- .../lib/components/timeline/RecentItem.svelte | 6 +- .../timeline/RecentsPreview.stories.svelte | 6 +- .../components/timeline/RecentsPreview.svelte | 16 +- .../timeline/Timeline.stories.svelte | 4 +- .../lib/components/timeline/Timeline.svelte | 18 +- .../timeline/TimelineActorHeader.svelte | 6 +- .../components/timeline/TimelineCard.svelte | 6 +- .../TimelineFollowEvent.stories.svelte | 6 +- .../timeline/TimelineFollowEvent.svelte | 16 +- .../timeline/TimelineFollowers.svelte | 14 +- .../timeline/TimelineForkers.svelte | 12 +- .../components/timeline/TimelineGroup.svelte | 10 +- .../timeline/TimelineRepoEvent.stories.svelte | 6 +- .../timeline/TimelineRepoEvent.svelte | 14 +- .../timeline/TimelineSkeleton.svelte | 4 +- .../timeline/TimelineStarEvent.stories.svelte | 6 +- .../timeline/TimelineStarEvent.svelte | 14 +- .../timeline/TimelineStargazers.svelte | 12 +- .../timeline/TimelineTargetHeader.svelte | 8 +- .../timeline/TimelineTargets.stories.svelte | 10 +- .../timeline/TimelineView.stories.svelte | 4 +- .../components/timeline/TimelineView.svelte | 28 +- .../timeline/TrendingRepos.stories.svelte | 4 +- .../components/timeline/TrendingRepos.svelte | 12 +- .../timeline/TrendingReposList.stories.svelte | 4 +- .../timeline/TrendingReposList.svelte | 6 +- .../timeline/TrendingSkeleton.svelte | 6 +- web/src/lib/components/timeline/group.test.ts | 4 +- web/src/lib/components/timeline/group.ts | 4 +- web/src/lib/components/timeline/load.ts | 10 +- web/src/lib/components/timeline/mappers.ts | 8 +- web/src/lib/components/timeline/types.ts | 2 +- web/src/lib/components/ui/ActorInput.svelte | 10 +- .../lib/components/ui/Avatar.stories.svelte | 2 +- web/src/lib/components/ui/Avatar.svelte | 4 +- web/src/lib/components/ui/Bones.svelte | 2 +- .../lib/components/ui/Button.stories.svelte | 2 +- web/src/lib/components/ui/Button.svelte | 2 +- .../components/ui/ButtonCard.stories.svelte | 2 +- .../components/ui/ButtonGroup.stories.svelte | 4 +- web/src/lib/components/ui/Card.stories.svelte | 2 +- .../lib/components/ui/Checkbox.stories.svelte | 2 +- .../lib/components/ui/CodeBlockToolbar.svelte | 6 +- .../components/ui/ColorBall.stories.svelte | 2 +- web/src/lib/components/ui/Combobox.svelte | 10 +- .../components/ui/ConfirmModal.stories.svelte | 2 +- web/src/lib/components/ui/ConfirmModal.svelte | 4 +- .../components/ui/CopyButton.stories.svelte | 2 +- web/src/lib/components/ui/CopyButton.svelte | 4 +- .../lib/components/ui/Dropdown.stories.svelte | 4 +- web/src/lib/components/ui/Dropdown.svelte | 8 +- web/src/lib/components/ui/DropdownItem.svelte | 2 +- .../components/ui/EmptyState.stories.svelte | 4 +- web/src/lib/components/ui/EmptyState.svelte | 2 +- .../lib/components/ui/Error.stories.svelte | 2 +- .../lib/components/ui/Field.stories.svelte | 4 +- .../lib/components/ui/FormStep.stories.svelte | 8 +- web/src/lib/components/ui/FormStep.svelte | 2 +- .../components/ui/FormStepDisclosure.svelte | 4 +- .../components/ui/GraphCell.stories.svelte | 2 +- .../ui/HiddenContent.stories.svelte | 2 +- .../lib/components/ui/HiddenContent.svelte | 4 +- .../components/ui/Hovercard.stories.svelte | 4 +- web/src/lib/components/ui/Hovercard.svelte | 4 +- .../lib/components/ui/Input.stories.svelte | 8 +- web/src/lib/components/ui/Input.svelte | 6 +- web/src/lib/components/ui/Kbd.stories.svelte | 4 +- .../components/ui/LayerCard.stories.svelte | 6 +- .../lib/components/ui/Lightbox.stories.svelte | 4 +- web/src/lib/components/ui/Lightbox.svelte | 8 +- web/src/lib/components/ui/Link.stories.svelte | 2 +- web/src/lib/components/ui/ListPanel.svelte | 2 +- web/src/lib/components/ui/Logo.stories.svelte | 2 +- .../ui/MarkdownEditor.stories.svelte | 4 +- .../lib/components/ui/MarkdownEditor.svelte | 32 +- .../components/ui/MarkdownTypeahead.svelte | 20 +- .../lib/components/ui/Modal.stories.svelte | 4 +- web/src/lib/components/ui/Modal.svelte | 6 +- .../lib/components/ui/MoreMenu.stories.svelte | 4 +- web/src/lib/components/ui/MoreMenu.svelte | 4 +- .../components/ui/Pagination.stories.svelte | 2 +- web/src/lib/components/ui/Pagination.svelte | 2 +- web/src/lib/components/ui/Pending.svelte | 2 +- .../components/ui/Radio.bones.stories.svelte | 2 +- .../lib/components/ui/Radio.stories.svelte | 2 +- .../ui/RangeSelector.stories.svelte | 6 +- .../lib/components/ui/RangeSelector.svelte | 6 +- .../lib/components/ui/RangeSelectorRow.svelte | 4 +- .../components/ui/ResizeHandle.stories.svelte | 2 +- web/src/lib/components/ui/ResizeHandle.svelte | 2 +- .../lib/components/ui/RoutePagination.svelte | 6 +- .../lib/components/ui/Section.stories.svelte | 2 +- web/src/lib/components/ui/Section.svelte | 2 +- web/src/lib/components/ui/Segment.svelte | 4 +- .../ui/SegmentedControl.stories.svelte | 4 +- .../lib/components/ui/SegmentedControl.svelte | 2 +- .../lib/components/ui/Select.stories.svelte | 4 +- web/src/lib/components/ui/Select.svelte | 4 +- .../components/ui/Separator.stories.svelte | 2 +- .../components/ui/ShimmerText.stories.svelte | 2 +- .../components/ui/SignupPrompt.stories.svelte | 2 +- web/src/lib/components/ui/SignupPrompt.svelte | 4 +- .../lib/components/ui/Spinner.stories.svelte | 2 +- .../components/ui/SplitButton.stories.svelte | 2 +- web/src/lib/components/ui/SplitButton.svelte | 8 +- web/src/lib/components/ui/StaleReload.svelte | 6 +- .../components/ui/StepMarker.stories.svelte | 2 +- web/src/lib/components/ui/Tabs.stories.svelte | 2 +- web/src/lib/components/ui/Tabs.svelte | 12 +- web/src/lib/components/ui/Tag.stories.svelte | 2 +- web/src/lib/components/ui/TagInput.svelte | 10 +- .../lib/components/ui/TextSwap.stories.svelte | 6 +- .../lib/components/ui/Textarea.stories.svelte | 2 +- web/src/lib/components/ui/Textarea.svelte | 2 +- .../lib/components/ui/TimeAgo.stories.svelte | 2 +- web/src/lib/components/ui/TimeAgo.svelte | 2 +- .../lib/components/ui/Toggle.stories.svelte | 2 +- web/src/lib/components/ui/ToggleFaces.svelte | 4 +- .../lib/components/ui/Tooltip.stories.svelte | 4 +- web/src/lib/components/ui/Tooltip.svelte | 4 +- web/src/lib/components/ui/User.stories.svelte | 2 +- web/src/lib/components/ui/User.svelte | 6 +- .../lib/components/ui/codeblockToolbars.ts | 2 +- web/src/lib/components/ui/inputField.ts | 2 +- .../lib/components/ui/markdownFormat.test.ts | 2 +- .../lib/components/ui/markdownScroll.test.ts | 2 +- .../components/ui/markdownSuggestions.test.ts | 2 +- .../lib/components/ui/markdownSuggestions.ts | 18 +- web/src/lib/components/ui/rangeMode.test.ts | 2 +- web/src/lib/components/ui/rangeMode.ts | 2 +- .../welcome/EmailsStep.stories.svelte | 2 +- .../lib/components/welcome/EmailsStep.svelte | 4 +- .../lib/components/welcome/FinishStep.svelte | 4 +- .../lib/components/welcome/KeysStep.svelte | 16 +- .../lib/components/welcome/ProfileStep.svelte | 6 +- .../lib/components/welcome/SocialStep.svelte | 12 +- web/src/lib/components/welcome/Steps.svelte | 2 +- .../lib/components/welcome/WelcomeCard.svelte | 6 +- web/src/lib/format.test.ts | 2 +- web/src/lib/markup/collapse.test.ts | 6 +- web/src/lib/markup/highlight.ts | 2 +- web/src/lib/markup/index.ts | 6 +- web/src/lib/markup/markdown.test.ts | 6 +- web/src/lib/markup/markdown.ts | 8 +- web/src/lib/markup/preview.test.ts | 6 +- web/src/lib/markup/preview.ts | 4 +- web/src/lib/markup/render.test.ts | 6 +- web/src/lib/markup/render.ts | 6 +- web/src/lib/markup/sanitize.ts | 4 +- web/src/lib/migration/import.test.ts | 8 +- web/src/lib/migration/import.ts | 16 +- web/src/lib/migration/liar.test.ts | 4 +- web/src/lib/migration/liar.ts | 8 +- web/src/lib/migration/mock.ts | 6 +- web/src/lib/migration/status.test.ts | 10 +- web/src/lib/migration/status.ts | 6 +- web/src/lib/migration/tombstone.test.ts | 4 +- web/src/lib/migration/tombstone.ts | 4 +- web/src/lib/navPulse.test.ts | 2 +- web/src/lib/notifications.svelte.ts | 10 +- web/src/lib/notifications.test.ts | 6 +- web/src/lib/oauth-client-metadata.test.ts | 4 +- web/src/lib/pagination.svelte.ts | 2 +- web/src/lib/pagination.test.ts | 2 +- web/src/lib/seo/og.test.ts | 2 +- web/src/lib/seo/og.ts | 10 +- web/src/lib/server/blob.ts | 18 +- web/src/lib/server/camo.ts | 6 +- web/src/lib/server/camotarget.test.ts | 2 +- web/src/lib/server/comments.ts | 18 +- web/src/lib/server/config.ts | 9 +- web/src/lib/server/github.test.ts | 9 +- web/src/lib/server/github/api.ts | 4 +- web/src/lib/server/github/cookies.ts | 2 +- web/src/lib/server/github/env.ts | 7 +- web/src/lib/server/github/index.ts | 14 +- web/src/lib/server/github/oauth.ts | 6 +- web/src/lib/server/github/session.ts | 8 +- web/src/lib/server/indexnow.test.ts | 2 +- web/src/lib/server/indexnow.ts | 2 +- web/src/lib/server/repo.ts | 16 +- web/src/lib/server/repoIndex.ts | 18 +- web/src/lib/subdomain.test.ts | 2 +- web/src/lib/theme.test.ts | 2 +- web/src/lib/ticketQuery.test.ts | 2 +- web/src/lib/unsavedChanges.ts | 1 + web/src/params.ts | 10 + web/src/params/rawCommit.ts | 6 - web/src/routes/+error.svelte | 2 +- web/src/routes/+layout.server.ts | 6 +- web/src/routes/+layout.svelte | 24 +- web/src/routes/+page.svelte | 8 +- web/src/routes/+page.ts | 8 +- web/src/routes/[handle]/+layout.svelte | 18 +- web/src/routes/[handle]/+layout.ts | 20 +- web/src/routes/[handle]/+page.svelte | 38 +- web/src/routes/[handle]/+page.ts | 8 +- .../routes/[handle]/[repo]/+layout.server.ts | 28 +- .../routes/[handle]/[repo]/+layout@.svelte | 27 +- .../routes/[handle]/[repo]/+page.server.ts | 4 +- web/src/routes/[handle]/[repo]/+page.svelte | 22 +- .../blob/[ref]/[...path]/+page.server.ts | 4 +- .../[repo]/blob/[ref]/[...path]/+page.svelte | 18 +- .../[handle]/[repo]/branches/+page.svelte | 10 +- .../routes/[handle]/[repo]/branches/+page.ts | 10 +- .../[repo]/commit-statuses/+server.ts | 12 +- .../[handle]/[repo]/commit/[ref]/+page.svelte | 24 +- .../[handle]/[repo]/commit/[ref]/+page.ts | 20 +- .../[repo]/commit/[spec=rawCommit]/+server.ts | 8 +- .../[repo]/commits/[ref]/+page.svelte | 12 +- .../[handle]/[repo]/commits/[ref]/+page.ts | 12 +- .../[handle]/[repo]/fork/+page.server.ts | 4 +- .../routes/[handle]/[repo]/fork/+page.svelte | 8 +- .../history/[ref]/[...path]/+page.svelte | 10 +- .../[repo]/history/[ref]/[...path]/+page.ts | 12 +- .../[handle]/[repo]/issues/+page.server.ts | 24 +- .../[handle]/[repo]/issues/+page.svelte | 18 +- .../[repo]/issues/[rkey]/+page.server.ts | 36 +- .../[repo]/issues/[rkey]/+page.svelte | 18 +- .../[repo]/issues/[rkey]/issue.test.ts | 6 +- .../[handle]/[repo]/issues/issues.test.ts | 4 +- .../[repo]/issues/new/+page.server.ts | 2 +- .../[handle]/[repo]/issues/new/+page.svelte | 10 +- .../[handle]/[repo]/pipelines/+page.svelte | 18 +- .../routes/[handle]/[repo]/pipelines/+page.ts | 14 +- .../workflow/[workflow]/+page.svelte | 12 +- .../[pipeline]/workflow/[workflow]/+page.ts | 4 +- .../[repo]/pipelines/pipelines.test.ts | 4 +- .../[handle]/[repo]/pulls/+page.server.ts | 20 +- .../routes/[handle]/[repo]/pulls/+page.svelte | 18 +- .../[repo]/pulls/[rkey]/+layout.server.ts | 31 +- .../pulls/[rkey]/[version]/+layout.server.ts | 14 +- .../[rkey]/[version]/[[range]]/+page.svelte | 8 +- .../pulls/[rkey]/[version]/[[range]]/+page.ts | 10 +- .../[[range]]/PullViewPage.stories.svelte | 18 +- .../[version]/[[range]]/PullViewPage.svelte | 120 +- .../[handle]/[repo]/pulls/new/+page.server.ts | 2 +- .../[handle]/[repo]/pulls/new/+page.svelte | 8 +- .../routes/[handle]/[repo]/pulls/new/+page.ts | 6 +- .../[handle]/[repo]/pulls/pulls.test.ts | 4 +- .../[repo]/raw/[ref]/[...path]/+server.ts | 4 +- .../[handle]/[repo]/search/+page.svelte | 4 +- .../routes/[handle]/[repo]/search/+page.ts | 2 +- .../[handle]/[repo]/settings/+layout.svelte | 10 +- .../[handle]/[repo]/settings/+layout.ts | 8 +- .../[handle]/[repo]/settings/+page.svelte | 8 +- .../routes/[handle]/[repo]/settings/+page.ts | 12 +- .../[repo]/settings/access/+page.svelte | 34 +- .../[handle]/[repo]/settings/access/+page.ts | 8 +- .../[repo]/settings/access/new/+page.svelte | 24 +- .../[repo]/settings/access/new/+page.ts | 2 +- .../[repo]/settings/hooks/+layout.svelte | 18 +- .../[handle]/[repo]/settings/hooks/+layout.ts | 2 +- .../[repo]/settings/hooks/+page.svelte | 34 +- .../[repo]/settings/hooks/[id]/+page.svelte | 36 +- .../hooks/[id]/deliveries/+page.svelte | 32 +- .../[repo]/settings/hooks/new/+page.svelte | 30 +- .../[repo]/settings/labels/new/+page.svelte | 30 +- .../[repo]/settings/labels/new/+page.ts | 2 +- .../[repo]/settings/pipelines/+page.svelte | 60 +- .../pipelines/secrets/new/+page.svelte | 28 +- .../[repo]/settings/rename/+page.svelte | 26 +- .../[handle]/[repo]/settings/rename/+page.ts | 2 +- .../[repo]/settings/sites/+page.svelte | 48 +- .../[handle]/[repo]/settings/sites/+page.ts | 10 +- .../routes/[handle]/[repo]/stars/+page.svelte | 14 +- web/src/routes/[handle]/[repo]/stars/+page.ts | 12 +- .../routes/[handle]/[repo]/tags/+page.svelte | 12 +- web/src/routes/[handle]/[repo]/tags/+page.ts | 10 +- .../[handle]/[repo]/tags/[tag]/+page.svelte | 12 +- .../[handle]/[repo]/tags/[tag]/+page.ts | 8 +- .../[repo]/tree/[ref]/+page.server.ts | 4 +- .../[handle]/[repo]/tree/[ref]/+page.svelte | 10 +- .../tree/[ref]/[...path]/+page.server.ts | 4 +- .../[repo]/tree/[ref]/[...path]/+page.svelte | 18 +- web/src/routes/[handle]/handle.test.ts | 10 +- .../settings/OrganizationAvatar.svelte | 14 +- .../OrganizationProfileTab.stories.svelte | 4 +- .../settings/OrganizationProfileTab.svelte | 24 +- .../settings/OrganizationSettingsTab.svelte | 32 +- .../members/InviteMembers.stories.svelte | 2 +- .../settings/members/InviteMembers.svelte | 28 +- .../members/MembersTab.stories.svelte | 2 +- .../settings/members/MembersTab.svelte | 36 +- web/src/routes/_internal/email-did/+server.ts | 4 +- .../email-did/email-did.server.test.ts | 4 +- web/src/routes/_internal/github/+server.ts | 2 +- .../routes/_internal/github/avatar/+server.ts | 2 +- .../_internal/github/callback/+server.ts | 4 +- .../_internal/github/connect/+server.ts | 4 +- .../routes/_internal/github/github.test.ts | 22 +- .../github/install/callback/+server.ts | 4 +- .../github/migrator/createTask/+server.ts | 4 +- web/src/routes/_internal/indexnow/+server.ts | 4 +- web/src/routes/about/+page.svelte | 2 +- web/src/routes/avatar/[did]/+server.ts | 2 +- web/src/routes/blob/[did]/[cid]/+server.ts | 8 +- web/src/routes/camo/[hex]/+server.ts | 4 +- web/src/routes/dev/components/+page.svelte | 120 +- web/src/routes/dev/components/+page.ts | 2 +- web/src/routes/dev/components/Shell.svelte | 8 +- web/src/routes/favicon.svg/+server.ts | 4 +- web/src/routes/invite/+page.server.ts | 2 +- web/src/routes/invite/+page.svelte | 24 +- web/src/routes/login/+page.svelte | 12 +- web/src/routes/notifications/+page.svelte | 16 +- web/src/routes/notifications/+page.ts | 2 +- .../oauth-client-metadata.json/+server.ts | 2 +- web/src/routes/oauth/callback/+page.svelte | 12 +- .../[handle]/welcome/+page.svelte | 14 +- .../routes/organizations/new/+page.server.ts | 2 +- web/src/routes/organizations/new/+page.svelte | 6 +- web/src/routes/repo/migrate/+page.server.ts | 2 +- web/src/routes/repo/migrate/+page.svelte | 22 +- web/src/routes/repo/new/+page.server.ts | 2 +- web/src/routes/repo/new/+page.svelte | 8 +- web/src/routes/search/+page.svelte | 4 +- web/src/routes/settings/+layout.server.ts | 2 +- web/src/routes/settings/+layout.svelte | 6 +- web/src/routes/settings/+page.svelte | 2 +- web/src/routes/settings/emails/+page.svelte | 2 +- .../routes/settings/emails/new/+page.svelte | 22 +- .../emails/new/AddEmailPage.stories.svelte | 2 +- web/src/routes/settings/keys/+page.svelte | 2 +- web/src/routes/settings/keys/new/+page.svelte | 24 +- web/src/routes/settings/knots/+page.svelte | 2 +- .../routes/settings/knots/new/+page.svelte | 22 +- .../settings/notifications/+page.svelte | 2 +- .../settings/organizations/+page.svelte | 2 +- .../settings/organizations/new/+page.svelte | 4 +- .../settings/profile/avatar/+page.svelte | 10 +- .../settings/profile/deactivate/+page.svelte | 12 +- .../settings/profile/delete/+page.svelte | 12 +- .../settings/profile/handle/+page.svelte | 14 +- .../settings/profile/password/+page.svelte | 12 +- web/src/routes/settings/sites/+page.svelte | 2 +- web/src/routes/settings/spindles/+page.svelte | 2 +- .../routes/settings/spindles/new/+page.svelte | 22 +- web/src/routes/signup/+page.svelte | 14 +- web/src/routes/signup/verify/+page.svelte | 16 +- .../strings/[handle]/[rkey]/+page.server.ts | 22 +- .../strings/[handle]/[rkey]/+page.svelte | 8 +- .../[handle]/[rkey]/StringPageContent.svelte | 32 +- .../strings/[handle]/[rkey]/raw/+server.ts | 6 +- .../[handle]/[rkey]/stringPage.test.ts | 12 +- web/src/routes/strings/new/+page.server.ts | 2 +- web/src/routes/strings/new/+page.svelte | 6 +- web/src/routes/timeline/+page.server.ts | 6 +- web/src/routes/timeline/+page.svelte | 6 +- web/src/routes/verify/email/+page.svelte | 8 +- .../email/VerifyEmailPage.stories.svelte | 2 +- web/src/routes/welcome/+page.svelte | 62 +- web/src/routes/welcome/+page.ts | 16 +- web/svelte.config.js | 47 - web/tsconfig.json | 19 +- web/vite.config.ts | 53 +- 973 files changed, 5692 insertions(+), 5575 deletions(-) create mode 100644 web/.storybook/mocks/navigation.ts create mode 100644 web/_headers create mode 100644 web/patches/@sveltejs__adapter-node@6.0.0.patch create mode 100644 web/src/env.ts create mode 100644 web/src/lib/api/rawCommit.ts create mode 100644 web/src/params.ts delete mode 100644 web/src/params/rawCommit.ts delete mode 100644 web/svelte.config.js diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 01ba815a0..c19b420f4 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -212,6 +212,8 @@ export default defineConfig({ // same aliases the web app's components import through alias: { $lib: webLib, + // the web app's own imports (sveltekit 3 subpath imports) + "#lib": webLib, "$icon/": "~icons/lucide/", // routing is sveltekit-only; components that build hrefs import it "$app/paths": fileURLToPath(new URL("./src/stubs/app-paths.ts", import.meta.url)), diff --git a/docs/src/content/docs/components/other-services.md b/docs/src/content/docs/components/other-services.md index 37c4f2df1..95877c954 100644 --- a/docs/src/content/docs/components/other-services.md +++ b/docs/src/content/docs/components/other-services.md @@ -61,7 +61,7 @@ If the knot advertises `knot-social-writes`, the record goes to the repo's account on the knot; otherwise the app falls back to legacy `sh.tangled.*` records in your PDS. -**Adapters.** `web/svelte.config.js` picks one at build time: Node +**Adapters.** `web/vite.config.ts` picks one at build time: Node (default; `web/Containerfile` runs `node build` on port 3000, the one to self-host) or Cloudflare (`SVELTE_ADAPTER=cloudflare`, `WRANGLER_CONFIG`; `/xrpc/*` and sitemaps use `BOBBIN` and `SITEMAP` @@ -74,7 +74,8 @@ docker build -f web/Containerfile \ web ``` -Runtime settings (`web/src/lib/server/config.ts`): +Runtime settings (`web/src/lib/server/config.ts`). SvelteKit only hands the server +variables declared in `web/src/env.ts`, so a new one is added there too: | Variable | Purpose | | ---------------------------------------------------------------------------------- | ----------------------------------------------- | diff --git a/web/.storybook/MockAuth.svelte b/web/.storybook/MockAuth.svelte index 4db736ed4..2c5aa823c 100644 --- a/web/.storybook/MockAuth.svelte +++ b/web/.storybook/MockAuth.svelte @@ -27,8 +27,8 @@ // fake agent's fetch handler rejects unless the story passes `respond`, so putIssue/putComment // land in the form's catch block by default. import { setContext, type Snippet } from "svelte"; - import { AUTH_KEY, type Auth } from "$lib/auth.svelte"; - import oauthMetadata from "$lib/oauth-client-metadata"; + import { AUTH_KEY, type Auth } from "#lib/auth.svelte.ts"; + import oauthMetadata from "#lib/oauth-client-metadata.ts"; interface Props { auth?: MockAuthParam; diff --git a/web/.storybook/MockNotifications.svelte b/web/.storybook/MockNotifications.svelte index 4b0bf7afb..637a04625 100644 --- a/web/.storybook/MockNotifications.svelte +++ b/web/.storybook/MockNotifications.svelte @@ -1,5 +1,5 @@ @@ -19,9 +20,19 @@ stickers: Snippet; class?: string; stickersClass?: string; + headingClass?: string; + subtitleClass?: string; } - let { title, subtitle, stickers, class: className = "", stickersClass = "" }: Props = $props(); + let { + title, + subtitle, + stickers, + class: className = "", + stickersClass = "", + headingClass = "", + subtitleClass = "" + }: Props = $props(); const slots = sectionHeader(); @@ -30,8 +41,8 @@ -

- {title}
- {subtitle} +

+ {title} + {subtitle}

diff --git a/web/src/lib/components/home/SelfHostSection.stories.svelte b/web/src/lib/components/home/SelfHostSection.stories.svelte index 591255480..c4d23bee5 100644 --- a/web/src/lib/components/home/SelfHostSection.stories.svelte +++ b/web/src/lib/components/home/SelfHostSection.stories.svelte @@ -1,6 +1,6 @@
diff --git a/web/src/lib/components/organization/welcome/OrganizationProfileStep.svelte b/web/src/lib/components/organization/welcome/OrganizationProfileStep.svelte index c19ac8e9c..36a87c3f7 100644 --- a/web/src/lib/components/organization/welcome/OrganizationProfileStep.svelte +++ b/web/src/lib/components/organization/welcome/OrganizationProfileStep.svelte @@ -22,9 +22,9 @@ diff --git a/web/src/lib/components/profile/NetworkVouches.stories.svelte b/web/src/lib/components/profile/NetworkVouches.stories.svelte index cfbd8f8a6..f3e73c896 100644 --- a/web/src/lib/components/profile/NetworkVouches.stories.svelte +++ b/web/src/lib/components/profile/NetworkVouches.stories.svelte @@ -1,7 +1,7 @@ diff --git a/web/src/lib/components/profile/UserProfileChrome.svelte b/web/src/lib/components/profile/UserProfileChrome.svelte index e460ecb9d..a2fa2ae7e 100644 --- a/web/src/lib/components/profile/UserProfileChrome.svelte +++ b/web/src/lib/components/profile/UserProfileChrome.svelte @@ -1,27 +1,31 @@ diff --git a/web/src/lib/components/repo/RepoIndexView.stories.svelte b/web/src/lib/components/repo/RepoIndexView.stories.svelte index 3d8d7fe8d..7fba5899c 100644 --- a/web/src/lib/components/repo/RepoIndexView.stories.svelte +++ b/web/src/lib/components/repo/RepoIndexView.stories.svelte @@ -1,12 +1,12 @@ diff --git a/web/src/lib/components/repo/RepoTabs.stories.svelte b/web/src/lib/components/repo/RepoTabs.stories.svelte index e2e78ab4a..6873597b1 100644 --- a/web/src/lib/components/repo/RepoTabs.stories.svelte +++ b/web/src/lib/components/repo/RepoTabs.stories.svelte @@ -1,8 +1,8 @@ diff --git a/web/src/lib/components/repo/pipelines/WorkflowSidebar.svelte b/web/src/lib/components/repo/pipelines/WorkflowSidebar.svelte index b00b513a5..c2697e8e2 100644 --- a/web/src/lib/components/repo/pipelines/WorkflowSidebar.svelte +++ b/web/src/lib/components/repo/pipelines/WorkflowSidebar.svelte @@ -38,12 +38,12 @@ diff --git a/web/src/lib/components/repo/tickets/TicketStatePill.stories.svelte b/web/src/lib/components/repo/tickets/TicketStatePill.stories.svelte index 4699527a9..7449a2079 100644 --- a/web/src/lib/components/repo/tickets/TicketStatePill.stories.svelte +++ b/web/src/lib/components/repo/tickets/TicketStatePill.stories.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/components/settings/SettingsBlock.svelte b/web/src/lib/components/settings/SettingsBlock.svelte index 64adeead4..7d5754011 100644 --- a/web/src/lib/components/settings/SettingsBlock.svelte +++ b/web/src/lib/components/settings/SettingsBlock.svelte @@ -1,7 +1,7 @@ @@ -7,9 +7,9 @@ diff --git a/web/src/lib/components/timeline/NotificationsPreview.stories.svelte b/web/src/lib/components/timeline/NotificationsPreview.stories.svelte index 2fa470486..25a7a09bf 100644 --- a/web/src/lib/components/timeline/NotificationsPreview.stories.svelte +++ b/web/src/lib/components/timeline/NotificationsPreview.stories.svelte @@ -1,9 +1,9 @@ diff --git a/web/src/lib/components/timeline/Timeline.stories.svelte b/web/src/lib/components/timeline/Timeline.stories.svelte index fb7e9f3a8..6529c849d 100644 --- a/web/src/lib/components/timeline/Timeline.stories.svelte +++ b/web/src/lib/components/timeline/Timeline.stories.svelte @@ -1,8 +1,8 @@ diff --git a/web/src/lib/components/timeline/TimelineStarEvent.stories.svelte b/web/src/lib/components/timeline/TimelineStarEvent.stories.svelte index 265bce747..1bd5c0e66 100644 --- a/web/src/lib/components/timeline/TimelineStarEvent.stories.svelte +++ b/web/src/lib/components/timeline/TimelineStarEvent.stories.svelte @@ -1,9 +1,9 @@ diff --git a/web/src/lib/components/timeline/TrendingSkeleton.svelte b/web/src/lib/components/timeline/TrendingSkeleton.svelte index b62fe20e5..3a0a7e8c6 100644 --- a/web/src/lib/components/timeline/TrendingSkeleton.svelte +++ b/web/src/lib/components/timeline/TrendingSkeleton.svelte @@ -1,8 +1,8 @@ diff --git a/web/src/lib/components/timeline/group.test.ts b/web/src/lib/components/timeline/group.test.ts index 23e936d12..b0eb2df57 100644 --- a/web/src/lib/components/timeline/group.test.ts +++ b/web/src/lib/components/timeline/group.test.ts @@ -1,6 +1,6 @@ import { describe, expect, it } from "vitest"; -import { groupTimeline } from "$lib/components/timeline/group"; -import type * as OrgTangledFeedGetTimeline from "$lib/api/lexicons/types/org/tangled/feed/getTimeline"; +import { groupTimeline } from "#lib/components/timeline/group.ts"; +import type * as OrgTangledFeedGetTimeline from "#lib/api/lexicons/types/org/tangled/feed/getTimeline.ts"; type TimelineItem = OrgTangledFeedGetTimeline.$output["feed"][number]; diff --git a/web/src/lib/components/timeline/group.ts b/web/src/lib/components/timeline/group.ts index 238dad271..756972277 100644 --- a/web/src/lib/components/timeline/group.ts +++ b/web/src/lib/components/timeline/group.ts @@ -1,5 +1,5 @@ -import type * as OrgTangledActorDefs from "$lib/api/lexicons/types/org/tangled/actor/defs"; -import type * as OrgTangledFeedGetTimeline from "$lib/api/lexicons/types/org/tangled/feed/getTimeline"; +import type * as OrgTangledActorDefs from "#lib/api/lexicons/types/org/tangled/actor/defs.ts"; +import type * as OrgTangledFeedGetTimeline from "#lib/api/lexicons/types/org/tangled/feed/getTimeline.ts"; type TimelineItem = OrgTangledFeedGetTimeline.$output["feed"][number]; diff --git a/web/src/lib/components/timeline/load.ts b/web/src/lib/components/timeline/load.ts index cf3007355..f41349649 100644 --- a/web/src/lib/components/timeline/load.ts +++ b/web/src/lib/components/timeline/load.ts @@ -1,8 +1,8 @@ -import { jsonGet } from "$lib/api/_request"; -import { getTrending } from "$lib/api/profile"; -import { toRepoCard } from "$lib/components/timeline/mappers"; -import type { BobbinContext } from "$lib/api/client"; -import type * as OrgTangledFeedGetTimeline from "$lib/api/lexicons/types/org/tangled/feed/getTimeline"; +import { jsonGet } from "#lib/api/_request.ts"; +import { getTrending } from "#lib/api/profile.ts"; +import { toRepoCard } from "#lib/components/timeline/mappers.ts"; +import type { BobbinContext } from "#lib/api/client.ts"; +import type * as OrgTangledFeedGetTimeline from "#lib/api/lexicons/types/org/tangled/feed/getTimeline.ts"; const PAGE_LIMIT = 50; diff --git a/web/src/lib/components/timeline/mappers.ts b/web/src/lib/components/timeline/mappers.ts index 7e4216dbe..2c5e978eb 100644 --- a/web/src/lib/components/timeline/mappers.ts +++ b/web/src/lib/components/timeline/mappers.ts @@ -1,8 +1,8 @@ import { resolve } from "$app/paths"; -import { rkeyFromUri } from "$lib/api/uri"; -import type { RepoCardData, PersonData } from "$lib/components/profile/types"; -import type * as OrgTangledRepoDefs from "$lib/api/lexicons/types/org/tangled/repo/defs"; -import type * as OrgTangledActorDefs from "$lib/api/lexicons/types/org/tangled/actor/defs"; +import { rkeyFromUri } from "#lib/api/uri.ts"; +import type { RepoCardData, PersonData } from "#lib/components/profile/types.ts"; +import type * as OrgTangledRepoDefs from "#lib/api/lexicons/types/org/tangled/repo/defs.ts"; +import type * as OrgTangledActorDefs from "#lib/api/lexicons/types/org/tangled/actor/defs.ts"; export const toRepoCard = (repo: OrgTangledRepoDefs.RepoViewBasic): RepoCardData => ({ name: repo.slug, diff --git a/web/src/lib/components/timeline/types.ts b/web/src/lib/components/timeline/types.ts index a53b18feb..11e66031f 100644 --- a/web/src/lib/components/timeline/types.ts +++ b/web/src/lib/components/timeline/types.ts @@ -1,6 +1,6 @@ // view models for the timeline rail, mirroring the appview's recents rows. -import type { PullState } from "$lib/components/repo/types"; +import type { PullState } from "#lib/components/repo/types.ts"; interface RecentBase { /** when the viewer last opened the page */ diff --git a/web/src/lib/components/ui/ActorInput.svelte b/web/src/lib/components/ui/ActorInput.svelte index fd564feb4..217eab53a 100644 --- a/web/src/lib/components/ui/ActorInput.svelte +++ b/web/src/lib/components/ui/ActorInput.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/[handle]/+page.ts b/web/src/routes/[handle]/+page.ts index 59288b7d5..75e3d4fc3 100644 --- a/web/src/routes/[handle]/+page.ts +++ b/web/src/routes/[handle]/+page.ts @@ -1,7 +1,7 @@ import type { Did } from "@atcute/lexicons/syntax"; -import { cached } from "$lib/api/cache"; -import { createBobbinClient } from "$lib/api/client"; -import { settle, stream } from "$lib/api/load"; +import { cached } from "#lib/api/cache.ts"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { settle, stream } from "#lib/api/load.ts"; import { fetchReposPage, fetchStringsPage, @@ -9,7 +9,7 @@ import { fetchPeoplePage, fetchPinned, fetchProfileActivity -} from "$lib/components/profile/pages"; +} from "#lib/components/profile/pages.ts"; import type { PageLoad } from "./$types"; const TABS = [ diff --git a/web/src/routes/[handle]/[repo]/+layout.server.ts b/web/src/routes/[handle]/[repo]/+layout.server.ts index 6c20bf05b..60e055c74 100644 --- a/web/src/routes/[handle]/[repo]/+layout.server.ts +++ b/web/src/routes/[handle]/[repo]/+layout.server.ts @@ -1,19 +1,19 @@ import { isDid, isHandle } from "@atcute/lexicons/syntax"; import { error, redirect } from "@sveltejs/kit"; -import { tryHostForKnot } from "$lib/api/_request"; -import { NO_ACCESS, resolveRepoAccess } from "$lib/api/access"; -import { createBobbinClient } from "$lib/api/client"; -import { count } from "$lib/api/count"; -import { getStarRkey, getSubscriptionRkey } from "$lib/api/graph"; -import { resolveMiniDoc } from "$lib/api/identity"; -import { early, hold, orNull, parallel, settle, stream, toHttpError } from "$lib/api/load"; -import type { RepoRecord } from "$lib/api/records"; -import { resolveRepoByName, resolveRepoByRepoDid } from "$lib/api/repo"; -import { didFromUri } from "$lib/api/uri"; -import { sameOrigin } from "$lib/migration/status"; -import { getConfig } from "$lib/server/config"; -import type { BobbinContext } from "$lib/api/client"; -import type { KnotInfo, RepoCounts, RepoInfo, RepoSource } from "$lib/components/repo/types"; +import { tryHostForKnot } from "#lib/api/_request.ts"; +import { NO_ACCESS, resolveRepoAccess } from "#lib/api/access.ts"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { count } from "#lib/api/count.ts"; +import { getStarRkey, getSubscriptionRkey } from "#lib/api/graph.ts"; +import { resolveMiniDoc } from "#lib/api/identity.ts"; +import { early, hold, orNull, parallel, settle, stream, toHttpError } from "#lib/api/load.ts"; +import type { RepoRecord } from "#lib/api/records.ts"; +import { resolveRepoByName, resolveRepoByRepoDid } from "#lib/api/repo.ts"; +import { didFromUri } from "#lib/api/uri.ts"; +import { sameOrigin } from "#lib/migration/status.ts"; +import { getConfig } from "#lib/server/config.ts"; +import type { BobbinContext } from "#lib/api/client.ts"; +import type { KnotInfo, RepoCounts, RepoInfo, RepoSource } from "#lib/components/repo/types.ts"; import type { LayoutServerLoad } from "./$types"; const resolveSource = async ( diff --git a/web/src/routes/[handle]/[repo]/+layout@.svelte b/web/src/routes/[handle]/[repo]/+layout@.svelte index f76ce9817..aa5003506 100644 --- a/web/src/routes/[handle]/[repo]/+layout@.svelte +++ b/web/src/routes/[handle]/[repo]/+layout@.svelte @@ -2,20 +2,23 @@ // the @ resets out of the profile shell, repo pages want their own header and // tabs instead of the profile card import { goto } from "$app/navigation"; - import { LANGUAGE_COLORS, LANGUAGE_COLOR_FALLBACK } from "$lib/components/repo/languageColors"; - import type { LanguageSlice } from "$lib/components/repo/types"; + import { + LANGUAGE_COLORS, + LANGUAGE_COLOR_FALLBACK + } from "#lib/components/repo/languageColors.ts"; + import type { LanguageSlice } from "#lib/components/repo/types.ts"; import { resolve } from "$app/paths"; import { page } from "$app/state"; - import KnotUpgradeBanner from "$lib/components/repo/KnotUpgradeBanner.svelte"; - import RepoChrome from "$lib/components/repo/RepoChrome.svelte"; - import Bones from "$lib/components/ui/Bones.svelte"; - import repoRepoheaderFullMetadata from "$lib/bones/repo-repoheader--full-metadata.bones.json"; - import repoRepochromeSkeletonFixture from "$lib/bones/repo-repochrome--skeleton-fixture.bones.json"; - import Error from "$lib/components/ui/Error.svelte"; - import Pending from "$lib/components/ui/Pending.svelte"; - import Meta from "$lib/components/seo/Meta.svelte"; - import { repoCard } from "$lib/seo/og"; - import type { RepoInfo } from "$lib/components/repo/types"; + import KnotUpgradeBanner from "#lib/components/repo/KnotUpgradeBanner.svelte"; + import RepoChrome from "#lib/components/repo/RepoChrome.svelte"; + import Bones from "#lib/components/ui/Bones.svelte"; + import repoRepoheaderFullMetadata from "#lib/bones/repo-repoheader--full-metadata.bones.json"; + import repoRepochromeSkeletonFixture from "#lib/bones/repo-repochrome--skeleton-fixture.bones.json"; + import Error from "#lib/components/ui/Error.svelte"; + import Pending from "#lib/components/ui/Pending.svelte"; + import Meta from "#lib/components/seo/Meta.svelte"; + import { repoCard } from "#lib/seo/og.ts"; + import type { RepoInfo } from "#lib/components/repo/types.ts"; const CUSTOM_OG_ROUTES = [ "/issues/[rkey]", diff --git a/web/src/routes/[handle]/[repo]/+page.server.ts b/web/src/routes/[handle]/[repo]/+page.server.ts index 30bfcfa7e..afbd3ee71 100644 --- a/web/src/routes/[handle]/[repo]/+page.server.ts +++ b/web/src/routes/[handle]/[repo]/+page.server.ts @@ -1,5 +1,5 @@ -import { orNull, settle } from "$lib/api/load"; -import { loadRepoIndex } from "$lib/server/repoIndex"; +import { orNull, settle } from "#lib/api/load.ts"; +import { loadRepoIndex } from "#lib/server/repoIndex.ts"; import type { PageServerLoad } from "./$types"; export const load: PageServerLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/+page.svelte b/web/src/routes/[handle]/[repo]/+page.svelte index b847a62cf..b3d27f5a9 100644 --- a/web/src/routes/[handle]/[repo]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/+page.svelte @@ -1,14 +1,14 @@ diff --git a/web/src/routes/[handle]/[repo]/branches/+page.svelte b/web/src/routes/[handle]/[repo]/branches/+page.svelte index fb11b806c..5c9bf0f90 100644 --- a/web/src/routes/[handle]/[repo]/branches/+page.svelte +++ b/web/src/routes/[handle]/[repo]/branches/+page.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/[handle]/[repo]/branches/+page.ts b/web/src/routes/[handle]/[repo]/branches/+page.ts index 1d67bee1d..577e64458 100644 --- a/web/src/routes/[handle]/[repo]/branches/+page.ts +++ b/web/src/routes/[handle]/[repo]/branches/+page.ts @@ -1,8 +1,8 @@ -import { branches, gitTarget, requireGit } from "$lib/api/gitclient"; -import { REF_LIMIT } from "$lib/api/repoIndex"; -import { branchSummaries } from "$lib/api/repo"; -import { settle, stream } from "$lib/api/load"; -import { discoveredPageCount, offsetFor, pageCount, pageParam } from "$lib/pagination"; +import { branches, gitTarget, requireGit } from "#lib/api/gitclient.ts"; +import { REF_LIMIT } from "#lib/api/repoIndex.ts"; +import { branchSummaries } from "#lib/api/repo.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { discoveredPageCount, offsetFor, pageCount, pageParam } from "#lib/pagination.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/commit-statuses/+server.ts b/web/src/routes/[handle]/[repo]/commit-statuses/+server.ts index c0b97dbe8..1f0886c50 100644 --- a/web/src/routes/[handle]/[repo]/commit-statuses/+server.ts +++ b/web/src/routes/[handle]/[repo]/commit-statuses/+server.ts @@ -1,11 +1,11 @@ import { json } from "@sveltejs/kit"; -import { createSpindleClient, queryPipelines, toPipelineSummary } from "$lib/api/spindle"; -import { tryHostForKnot } from "$lib/api/_request"; -import { didOf } from "$lib/api/syntax"; -import { resolveRepoFromParams } from "$lib/server/repo"; -import type { CommitStatuses } from "$lib/api/commitStatuses"; +import { createSpindleClient, queryPipelines, toPipelineSummary } from "#lib/api/spindle.ts"; +import { tryHostForKnot } from "#lib/api/_request.ts"; +import { didOf } from "#lib/api/syntax.ts"; +import { resolveRepoFromParams } from "#lib/server/repo.ts"; +import type { CommitStatuses } from "#lib/api/commitStatuses.ts"; import type { RequestHandler } from "./$types"; -import { didFromUri } from "$lib/api"; +import { didFromUri } from "#lib/api/index.ts"; export const GET: RequestHandler = async (event) => { const { view } = await resolveRepoFromParams(event); diff --git a/web/src/routes/[handle]/[repo]/commit/[ref]/+page.svelte b/web/src/routes/[handle]/[repo]/commit/[ref]/+page.svelte index f80f22ecc..8f7f2edd8 100644 --- a/web/src/routes/[handle]/[repo]/commit/[ref]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/commit/[ref]/+page.svelte @@ -1,17 +1,17 @@ diff --git a/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.svelte b/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.svelte index ad853fcd0..26ced5abc 100644 --- a/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.svelte @@ -1,9 +1,9 @@ diff --git a/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.ts b/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.ts index fc8b49ce7..3f31338e6 100644 --- a/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.ts +++ b/web/src/routes/[handle]/[repo]/history/[ref]/[...path]/+page.ts @@ -1,10 +1,10 @@ import { error } from "@sveltejs/kit"; -import { gitTarget, log, requireGit } from "$lib/api/gitclient"; -import { authorsOf, mockFileHistory } from "$lib/api/fileHistory"; -import { settle, stream } from "$lib/api/load"; -import { withAuthorHandles } from "$lib/api/repoIndex"; -import { toMirrorCommitSummary } from "$lib/api/gitmirror"; -import { pageCount, pageParam } from "$lib/pagination"; +import { gitTarget, log, requireGit } from "#lib/api/gitclient.ts"; +import { authorsOf, mockFileHistory } from "#lib/api/fileHistory.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { withAuthorHandles } from "#lib/api/repoIndex.ts"; +import { toMirrorCommitSummary } from "#lib/api/gitmirror.ts"; +import { pageCount, pageParam } from "#lib/pagination.ts"; import type { PageLoad } from "./$types"; const COMMIT_LIMIT = 50; diff --git a/web/src/routes/[handle]/[repo]/issues/+page.server.ts b/web/src/routes/[handle]/[repo]/issues/+page.server.ts index 66b65c9ff..68904677e 100644 --- a/web/src/routes/[handle]/[repo]/issues/+page.server.ts +++ b/web/src/routes/[handle]/[repo]/issues/+page.server.ts @@ -1,15 +1,15 @@ -import { createBobbinClient } from "$lib/api/client"; -import { TICKET_AUTHOR_DOCS } from "$lib/api/descriptors"; -import { authorOf, target } from "$lib/api/enrich"; -import { moderationTargets, subjectModeration } from "$lib/api/moderationLabels"; -import { TICKET_COLLECTION } from "$lib/api/ticket"; -import { EMPTY_COUNTS, trySearchTickets, type TicketSearchOutcome } from "$lib/api/ticketSearch"; -import { settle, stream } from "$lib/api/load"; -import { rkeyFromUri } from "$lib/api/uri"; -import { labelsOfTokens, listLabelDefinitions } from "$lib/api/labels"; -import type { IssueSummary } from "$lib/components/repo/types"; -import { offsetFor, pageCount, pageParam } from "$lib/pagination"; -import { queryFromUrl } from "$lib/ticketQuery"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { TICKET_AUTHOR_DOCS } from "#lib/api/descriptors.ts"; +import { authorOf, target } from "#lib/api/enrich.ts"; +import { moderationTargets, subjectModeration } from "#lib/api/moderationLabels.ts"; +import { TICKET_COLLECTION } from "#lib/api/ticket.ts"; +import { EMPTY_COUNTS, trySearchTickets, type TicketSearchOutcome } from "#lib/api/ticketSearch.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { rkeyFromUri } from "#lib/api/uri.ts"; +import { labelsOfTokens, listLabelDefinitions } from "#lib/api/labels.ts"; +import type { IssueSummary } from "#lib/components/repo/types.ts"; +import { offsetFor, pageCount, pageParam } from "#lib/pagination.ts"; +import { queryFromUrl } from "#lib/ticketQuery.ts"; import type { PageServerLoad } from "./$types"; const ISSUE_LIMIT = 30; diff --git a/web/src/routes/[handle]/[repo]/issues/+page.svelte b/web/src/routes/[handle]/[repo]/issues/+page.svelte index 8833d6dfb..3ff2a193e 100644 --- a/web/src/routes/[handle]/[repo]/issues/+page.svelte +++ b/web/src/routes/[handle]/[repo]/issues/+page.svelte @@ -1,14 +1,14 @@ diff --git a/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.server.ts b/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.server.ts index e70f7b819..664911aed 100644 --- a/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.server.ts +++ b/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.server.ts @@ -1,27 +1,27 @@ import { isRecordKey } from "@atcute/lexicons/syntax"; import { error, isHttpError } from "@sveltejs/kit"; -import { createBobbinClient, ClientResponseError, type BobbinContext } from "$lib/api/client"; -import { REACTION_AUTHOR_DOCS } from "$lib/api/descriptors"; -import { enrich, miniDocOf, target, type Enriched } from "$lib/api/enrich"; -import { INVALID_HANDLE, type MiniDoc } from "$lib/api/identity"; -import { loadSubjectLabels, NO_SUBJECT_LABELS } from "$lib/api/labels"; -import type { ReactionListPage, ReactionRecord } from "$lib/api/reaction"; -import { moderationTargets, subjectModeration } from "$lib/api/moderationLabels"; -import { TICKET_COLLECTION } from "$lib/api/ticket"; -import type { RecordView, TicketViewDetailed } from "$lib/api/records"; -import { authorDidOf, rkeyFromUri } from "$lib/api/uri"; -import { httpStatusFor, settle, stream } from "$lib/api/load"; -import { renderMarkup } from "$lib/markup/render"; -import type { MarkupContext } from "$lib/markup/paths"; +import { createBobbinClient, ClientResponseError, type BobbinContext } from "#lib/api/client.ts"; +import { REACTION_AUTHOR_DOCS } from "#lib/api/descriptors.ts"; +import { enrich, miniDocOf, target, type Enriched } from "#lib/api/enrich.ts"; +import { INVALID_HANDLE, type MiniDoc } from "#lib/api/identity.ts"; +import { loadSubjectLabels, NO_SUBJECT_LABELS } from "#lib/api/labels.ts"; +import type { ReactionListPage, ReactionRecord } from "#lib/api/reaction.ts"; +import { moderationTargets, subjectModeration } from "#lib/api/moderationLabels.ts"; +import { TICKET_COLLECTION } from "#lib/api/ticket.ts"; +import type { RecordView, TicketViewDetailed } from "#lib/api/records.ts"; +import { authorDidOf, rkeyFromUri } from "#lib/api/uri.ts"; +import { httpStatusFor, settle, stream } from "#lib/api/load.ts"; +import { renderMarkup } from "#lib/markup/render.ts"; +import type { MarkupContext } from "#lib/markup/paths.ts"; import { buildCommentThreads, listCommentItems, type CommentThread -} from "$lib/components/comment/comments"; -import { toThreadInputs } from "$lib/server/comments"; -import { buildReactions, type ReactionGroup } from "$lib/components/reaction/reactions"; -import type { IssueData } from "$lib/components/repo/issues/IssueThreadView.svelte"; -import type { RepoInfo } from "$lib/components/repo/types"; +} from "#lib/components/comment/comments.ts"; +import { toThreadInputs } from "#lib/server/comments.ts"; +import { buildReactions, type ReactionGroup } from "#lib/components/reaction/reactions.ts"; +import type { IssueData } from "#lib/components/repo/issues/IssueThreadView.svelte"; +import type { RepoInfo } from "#lib/components/repo/types.ts"; import type { PageServerLoad } from "./$types"; export type { IssueData }; diff --git a/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.svelte b/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.svelte index 50b200199..2da5837a6 100644 --- a/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/issues/[rkey]/+page.svelte @@ -1,16 +1,16 @@ diff --git a/web/src/routes/[handle]/[repo]/pipelines/+page.ts b/web/src/routes/[handle]/[repo]/pipelines/+page.ts index 91aa6a22b..6afbf4451 100644 --- a/web/src/routes/[handle]/[repo]/pipelines/+page.ts +++ b/web/src/routes/[handle]/[repo]/pipelines/+page.ts @@ -3,13 +3,13 @@ import { queryPipelines, toPipelineSummary, triggersOf -} from "$lib/api/spindle"; -import { createBobbinClient } from "$lib/api/client"; -import { resolveForkRepoLabels } from "$lib/api/repo"; -import { settle, stream } from "$lib/api/load"; -import { matchesQuery, type PipelineFilter } from "$lib/components/repo/pipelines/pipeline"; -import type { PipelineSummary } from "$lib/components/repo/types"; -import { pageCount, pageParam } from "$lib/pagination"; +} from "#lib/api/spindle.ts"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { resolveForkRepoLabels } from "#lib/api/repo.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { matchesQuery, type PipelineFilter } from "#lib/components/repo/pipelines/pipeline.ts"; +import type { PipelineSummary } from "#lib/components/repo/types.ts"; +import { pageCount, pageParam } from "#lib/pagination.ts"; import type { Did } from "@atcute/lexicons"; import type { PageLoad } from "./$types"; diff --git a/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.svelte b/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.svelte index 786034113..2717c7f61 100644 --- a/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.ts b/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.ts index 474b3a280..86fbeedb7 100644 --- a/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.ts +++ b/web/src/routes/[handle]/[repo]/pipelines/[pipeline]/workflow/[workflow]/+page.ts @@ -1,6 +1,6 @@ import { error } from "@sveltejs/kit"; -import { settle, stream } from "$lib/api/load"; -import { createSpindleClient, getPipeline, toPipelineSummary } from "$lib/api/spindle"; +import { settle, stream } from "#lib/api/load.ts"; +import { createSpindleClient, getPipeline, toPipelineSummary } from "#lib/api/spindle.ts"; import type { PageLoad } from "./$types"; import type { Did } from "@atcute/lexicons"; diff --git a/web/src/routes/[handle]/[repo]/pipelines/pipelines.test.ts b/web/src/routes/[handle]/[repo]/pipelines/pipelines.test.ts index c1d745fae..df992291a 100644 --- a/web/src/routes/[handle]/[repo]/pipelines/pipelines.test.ts +++ b/web/src/routes/[handle]/[repo]/pipelines/pipelines.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest"; import { load } from "./+page"; -import type * as Pipeline from "$lib/api/lexicons/types/org/tangled/ci/pipeline"; -import type { PipelineSummary } from "$lib/components/repo/types"; +import type * as Pipeline from "#lib/api/lexicons/types/org/tangled/ci/pipeline.ts"; +import type { PipelineSummary } from "#lib/components/repo/types.ts"; const REPO_DID = "did:plc:j5hmlfdrwkvtxm7cjmu7j2is"; diff --git a/web/src/routes/[handle]/[repo]/pulls/+page.server.ts b/web/src/routes/[handle]/[repo]/pulls/+page.server.ts index cdac24175..68bbfd0d9 100644 --- a/web/src/routes/[handle]/[repo]/pulls/+page.server.ts +++ b/web/src/routes/[handle]/[repo]/pulls/+page.server.ts @@ -1,13 +1,13 @@ -import { createBobbinClient } from "$lib/api/client"; -import { TICKET_AUTHOR_DOCS } from "$lib/api/descriptors"; -import { authorOf, target } from "$lib/api/enrich"; -import { EMPTY_COUNTS, trySearchTickets, type TicketSearchOutcome } from "$lib/api/ticketSearch"; -import { settle, stream } from "$lib/api/load"; -import { rkeyFromUri } from "$lib/api/uri"; -import { labelsOfTokens, listLabelDefinitions } from "$lib/api/labels"; -import type { PullSummary } from "$lib/components/repo/types"; -import { offsetFor, pageCount, pageParam } from "$lib/pagination"; -import { queryFromUrl } from "$lib/ticketQuery"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { TICKET_AUTHOR_DOCS } from "#lib/api/descriptors.ts"; +import { authorOf, target } from "#lib/api/enrich.ts"; +import { EMPTY_COUNTS, trySearchTickets, type TicketSearchOutcome } from "#lib/api/ticketSearch.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { rkeyFromUri } from "#lib/api/uri.ts"; +import { labelsOfTokens, listLabelDefinitions } from "#lib/api/labels.ts"; +import type { PullSummary } from "#lib/components/repo/types.ts"; +import { offsetFor, pageCount, pageParam } from "#lib/pagination.ts"; +import { queryFromUrl } from "#lib/ticketQuery.ts"; import type { PageServerLoad } from "./$types"; const PULL_LIMIT = 30; diff --git a/web/src/routes/[handle]/[repo]/pulls/+page.svelte b/web/src/routes/[handle]/[repo]/pulls/+page.svelte index 491c0d648..7717fafaf 100644 --- a/web/src/routes/[handle]/[repo]/pulls/+page.svelte +++ b/web/src/routes/[handle]/[repo]/pulls/+page.svelte @@ -1,14 +1,14 @@ diff --git a/web/src/routes/[handle]/[repo]/pulls/[rkey]/+layout.server.ts b/web/src/routes/[handle]/[repo]/pulls/[rkey]/+layout.server.ts index b5cdbe103..945cf3a4e 100644 --- a/web/src/routes/[handle]/[repo]/pulls/[rkey]/+layout.server.ts +++ b/web/src/routes/[handle]/[repo]/pulls/[rkey]/+layout.server.ts @@ -1,24 +1,24 @@ import { isRecordKey } from "@atcute/lexicons/syntax"; import { error } from "@sveltejs/kit"; -import { createBobbinClient } from "$lib/api/client"; -import { REACTION_AUTHOR_DOCS } from "$lib/api/descriptors"; -import { enrich, miniDocOf, target } from "$lib/api/enrich"; -import { INVALID_HANDLE } from "$lib/api/identity"; -import { loadSubjectLabels, NO_SUBJECT_LABELS } from "$lib/api/labels"; -import { getTicketView, listPatches } from "$lib/api/records"; -import { rkeyFromUri } from "$lib/api/uri"; -import { early, httpStatusFor, settle, stream, toHttpError } from "$lib/api/load"; -import type { MarkupContext } from "$lib/markup"; -import { renderMarkup } from "$lib/markup/render"; -import type { CommentListPage } from "$lib/api/comment"; -import type { ReactionListPage } from "$lib/api/reaction"; -import { buildReactions, type ReactionGroup } from "$lib/components/reaction/reactions"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { REACTION_AUTHOR_DOCS } from "#lib/api/descriptors.ts"; +import { enrich, miniDocOf, target } from "#lib/api/enrich.ts"; +import { INVALID_HANDLE } from "#lib/api/identity.ts"; +import { loadSubjectLabels, NO_SUBJECT_LABELS } from "#lib/api/labels.ts"; +import { getTicketView, listPatches } from "#lib/api/records.ts"; +import { rkeyFromUri } from "#lib/api/uri.ts"; +import { early, httpStatusFor, settle, stream, toHttpError } from "#lib/api/load.ts"; +import type { MarkupContext } from "#lib/markup/index.ts"; +import { renderMarkup } from "#lib/markup/render.ts"; +import type { CommentListPage } from "#lib/api/comment.ts"; +import type { ReactionListPage } from "#lib/api/reaction.ts"; +import { buildReactions, type ReactionGroup } from "#lib/components/reaction/reactions.ts"; import { COMMENT_ENRICH, commentModerationOf, commentAuthorOf, type CommentView -} from "$lib/components/comment/comments"; +} from "#lib/components/comment/comments.ts"; import type { LayoutServerLoad } from "./$types"; export const load: LayoutServerLoad = async (event) => { @@ -57,7 +57,8 @@ export const load: LayoutServerLoad = async (event) => { page.output.items, parent.auth?.did, (did) => - miniDocOf(page.data, did, REACTION_AUTHOR_DOCS)?.handle ?? INVALID_HANDLE + miniDocOf(page.data, did, REACTION_AUTHOR_DOCS)?.handle ?? + INVALID_HANDLE ) ) .catch(() => []); diff --git a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/+layout.server.ts b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/+layout.server.ts index 651a38c06..ebc039790 100644 --- a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/+layout.server.ts +++ b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/+layout.server.ts @@ -1,11 +1,11 @@ import { redirect } from "@sveltejs/kit"; -import { createBobbinClient } from "$lib/api/client"; -import { listLog } from "$lib/api/gitmirror"; -import { early, orNull, settle, stream } from "$lib/api/load"; -import { isRedirect, parseDiffRoute, parseInterdiffRoute } from "$lib/api/pullRoute"; -import { withAuthorHandles } from "$lib/api/repoIndex"; -import { countCommentsByCommit } from "$lib/components/comment/comments"; -import { didFromUri } from "$lib/api/uri"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { listLog } from "#lib/api/gitmirror.ts"; +import { early, orNull, settle, stream } from "#lib/api/load.ts"; +import { isRedirect, parseDiffRoute, parseInterdiffRoute } from "#lib/api/pullRoute.ts"; +import { withAuthorHandles } from "#lib/api/repoIndex.ts"; +import { countCommentsByCommit } from "#lib/components/comment/comments.ts"; +import { didFromUri } from "#lib/api/uri.ts"; import type { Did } from "@atcute/lexicons/syntax"; import type { LayoutServerLoad } from "./$types"; diff --git a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.svelte b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.svelte index d590c2e77..f2f6012ae 100644 --- a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.svelte @@ -3,10 +3,10 @@ import { goto } from "$app/navigation"; import { resolve } from "$app/paths"; import type { ComponentProps } from "svelte"; - import Bones from "$lib/components/ui/Bones.svelte"; - import Pending from "$lib/components/ui/Pending.svelte"; - import repoPullsPullviewpageSkeletonFixture from "$lib/bones/repo-pulls-pullviewpage--skeleton-fixture.bones.json"; - import PullViewPage from "$routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.svelte"; + import Bones from "#lib/components/ui/Bones.svelte"; + import Pending from "#lib/components/ui/Pending.svelte"; + import repoPullsPullviewpageSkeletonFixture from "#lib/bones/repo-pulls-pullviewpage--skeleton-fixture.bones.json"; + import PullViewPage from "#routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.svelte"; type LoadedPullViewData = Awaited["data"]>; diff --git a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.ts b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.ts index 56e137ef7..98a14513f 100644 --- a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.ts +++ b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/+page.ts @@ -1,9 +1,9 @@ -import { browser } from "$app/environment"; +import { browser } from "$app/env"; import { redirect } from "@sveltejs/kit"; -import { formatPatchUrl } from "$lib/api/knotmirror"; -import { getPatchStream } from "$lib/api/patchStream"; -import { isRedirect, parseDiffRoute, parseInterdiffRoute } from "$lib/api/pullRoute"; -import { settle, stream } from "$lib/api/load"; +import { formatPatchUrl } from "#lib/api/knotmirror.ts"; +import { getPatchStream } from "#lib/api/patchStream.ts"; +import { isRedirect, parseDiffRoute, parseInterdiffRoute } from "#lib/api/pullRoute.ts"; +import { settle, stream } from "#lib/api/load.ts"; import type { Did } from "@atcute/lexicons/syntax"; import type { PageLoad } from "./$types"; diff --git a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.stories.svelte b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.stories.svelte index d4c3c84e7..98a4c363f 100644 --- a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.stories.svelte +++ b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.stories.svelte @@ -2,7 +2,7 @@ import { defineMeta, type StoryContext } from "@storybook/addon-svelte-csf"; import { expect, userEvent, waitFor, within } from "storybook/test"; import type { ComponentProps } from "svelte"; - import { holdErrorReset } from "$storybook/holdErrorReset"; + import { holdErrorReset } from "#storybook/holdErrorReset.ts"; import { base, bobbinUrl, @@ -20,15 +20,15 @@ sourceRepoDid, targetBranch, type PullFetchOptions - } from "$fixtures/pull"; + } from "#fixtures/pull.ts"; import PullViewRoute from "./+page.svelte"; - import { accessFor } from "$lib/api/access"; - import { NO_SUBJECT_LABELS } from "$lib/api/labels"; - import type { TicketState } from "$lib/api/records"; - import type { Did } from "$lib/api/syntax"; - import type { PullView } from "$lib/api/pullRoute"; - import type { CommentView } from "$lib/components/comment/comments"; - import type { PullCiApproval } from "$lib/components/repo/pulls/PullApproveCi.svelte"; + import { accessFor } from "#lib/api/access.ts"; + import { NO_SUBJECT_LABELS } from "#lib/api/labels.ts"; + import type { TicketState } from "#lib/api/records.ts"; + import type { Did } from "#lib/api/syntax.ts"; + import type { PullView } from "#lib/api/pullRoute.ts"; + import type { CommentView } from "#lib/components/comment/comments.ts"; + import type { PullCiApproval } from "#lib/components/repo/pulls/PullApproveCi.svelte"; type PullViewRouteData = ComponentProps["data"]; diff --git a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.svelte b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.svelte index bede5d272..6cbed3320 100644 --- a/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.svelte +++ b/web/src/routes/[handle]/[repo]/pulls/[rkey]/[version]/[[range]]/PullViewPage.svelte @@ -1,11 +1,11 @@ diff --git a/web/src/routes/[handle]/[repo]/pulls/new/+page.ts b/web/src/routes/[handle]/[repo]/pulls/new/+page.ts index c7f837605..0bd7e0ab2 100644 --- a/web/src/routes/[handle]/[repo]/pulls/new/+page.ts +++ b/web/src/routes/[handle]/[repo]/pulls/new/+page.ts @@ -1,6 +1,6 @@ -import { settle, stream } from "$lib/api/load"; -import { requireGit } from "$lib/api/gitclient"; -import { loadCompose } from "$lib/api/pullCompose"; +import { settle, stream } from "#lib/api/load.ts"; +import { requireGit } from "#lib/api/gitclient.ts"; +import { loadCompose } from "#lib/api/pullCompose.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/pulls/pulls.test.ts b/web/src/routes/[handle]/[repo]/pulls/pulls.test.ts index ae834dc8c..08d613958 100644 --- a/web/src/routes/[handle]/[repo]/pulls/pulls.test.ts +++ b/web/src/routes/[handle]/[repo]/pulls/pulls.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest"; import { load } from "./+page.server"; -import { TICKET_AUTHOR_DOCS } from "$lib/api/descriptors"; -import { TYPE_MINIDOC } from "$lib/api/enrich"; +import { TICKET_AUTHOR_DOCS } from "#lib/api/descriptors.ts"; +import { TYPE_MINIDOC } from "#lib/api/enrich.ts"; const REPO_DID = "did:plc:j5hmlfdrwkvtxm7cjmu7j2is"; const AUTHOR_DID = "did:plc:2zcfjzyocp6kapg6jc4eacok"; diff --git a/web/src/routes/[handle]/[repo]/raw/[ref]/[...path]/+server.ts b/web/src/routes/[handle]/[repo]/raw/[ref]/[...path]/+server.ts index 68206fdb0..23fbd4a63 100644 --- a/web/src/routes/[handle]/[repo]/raw/[ref]/[...path]/+server.ts +++ b/web/src/routes/[handle]/[repo]/raw/[ref]/[...path]/+server.ts @@ -1,6 +1,6 @@ import { error } from "@sveltejs/kit"; -import { blobRawUrl } from "$lib/api/gitclient"; -import { resolveRepoFromParams } from "$lib/server/repo"; +import { blobRawUrl } from "#lib/api/gitclient.ts"; +import { resolveRepoFromParams } from "#lib/server/repo.ts"; import type { RequestHandler } from "./$types"; // redirecting instead of proxying keeps repo content off our own origin, same diff --git a/web/src/routes/[handle]/[repo]/search/+page.svelte b/web/src/routes/[handle]/[repo]/search/+page.svelte index d4de1a422..0ef4728b7 100644 --- a/web/src/routes/[handle]/[repo]/search/+page.svelte +++ b/web/src/routes/[handle]/[repo]/search/+page.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/routes/[handle]/[repo]/search/+page.ts b/web/src/routes/[handle]/[repo]/search/+page.ts index 3e7e31364..e245f6774 100644 --- a/web/src/routes/[handle]/[repo]/search/+page.ts +++ b/web/src/routes/[handle]/[repo]/search/+page.ts @@ -1,4 +1,4 @@ -import { requireGit } from "$lib/api/gitclient"; +import { requireGit } from "#lib/api/gitclient.ts"; import type { PageLoad } from "./$types"; // the search itself is client-side diff --git a/web/src/routes/[handle]/[repo]/settings/+layout.svelte b/web/src/routes/[handle]/[repo]/settings/+layout.svelte index ee8d423f5..acc68b0b9 100644 --- a/web/src/routes/[handle]/[repo]/settings/+layout.svelte +++ b/web/src/routes/[handle]/[repo]/settings/+layout.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/+page.ts b/web/src/routes/[handle]/[repo]/settings/+page.ts index 9f4276a38..0a5dfbf98 100644 --- a/web/src/routes/[handle]/[repo]/settings/+page.ts +++ b/web/src/routes/[handle]/[repo]/settings/+page.ts @@ -1,9 +1,9 @@ -import { createBobbinClient } from "$lib/api/client"; -import { branches, gitTarget, hasGit } from "$lib/api/gitclient"; -import { listLabelDefinitions } from "$lib/api/labels"; -import { settle, stream } from "$lib/api/load"; -import { branchSummaries } from "$lib/api/repo"; -import { REF_LIMIT } from "$lib/api/repoIndex"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { branches, gitTarget, hasGit } from "#lib/api/gitclient.ts"; +import { listLabelDefinitions } from "#lib/api/labels.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { branchSummaries } from "#lib/api/repo.ts"; +import { REF_LIMIT } from "#lib/api/repoIndex.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/settings/access/+page.svelte b/web/src/routes/[handle]/[repo]/settings/access/+page.svelte index b03f954f1..b76c56949 100644 --- a/web/src/routes/[handle]/[repo]/settings/access/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/access/+page.svelte @@ -1,21 +1,21 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/access/+page.ts b/web/src/routes/[handle]/[repo]/settings/access/+page.ts index c7205c3d5..f1eb9b17d 100644 --- a/web/src/routes/[handle]/[repo]/settings/access/+page.ts +++ b/web/src/routes/[handle]/[repo]/settings/access/+page.ts @@ -1,7 +1,7 @@ -import { requireRepoAdmin } from "$lib/api/access"; -import { createBobbinClient } from "$lib/api/client"; -import { listCollaborators } from "$lib/api/collaborators"; -import { settle, stream } from "$lib/api/load"; +import { requireRepoAdmin } from "#lib/api/access.ts"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { listCollaborators } from "#lib/api/collaborators.ts"; +import { settle, stream } from "#lib/api/load.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/settings/access/new/+page.svelte b/web/src/routes/[handle]/[repo]/settings/access/new/+page.svelte index 5ecf09db4..c25ebfe99 100644 --- a/web/src/routes/[handle]/[repo]/settings/access/new/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/access/new/+page.svelte @@ -1,17 +1,17 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/access/new/+page.ts b/web/src/routes/[handle]/[repo]/settings/access/new/+page.ts index a308e5542..4bbff18aa 100644 --- a/web/src/routes/[handle]/[repo]/settings/access/new/+page.ts +++ b/web/src/routes/[handle]/[repo]/settings/access/new/+page.ts @@ -1,4 +1,4 @@ -import { requireRepoAdmin } from "$lib/api/access"; +import { requireRepoAdmin } from "#lib/api/access.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/settings/hooks/+layout.svelte b/web/src/routes/[handle]/[repo]/settings/hooks/+layout.svelte index 66eedebf1..e68389130 100644 --- a/web/src/routes/[handle]/[repo]/settings/hooks/+layout.svelte +++ b/web/src/routes/[handle]/[repo]/settings/hooks/+layout.svelte @@ -1,14 +1,14 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/hooks/[id]/deliveries/+page.svelte b/web/src/routes/[handle]/[repo]/settings/hooks/[id]/deliveries/+page.svelte index 8b5ab6e09..7613ab93a 100644 --- a/web/src/routes/[handle]/[repo]/settings/hooks/[id]/deliveries/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/hooks/[id]/deliveries/+page.svelte @@ -1,18 +1,22 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/labels/new/+page.svelte b/web/src/routes/[handle]/[repo]/settings/labels/new/+page.svelte index cc556886f..649966758 100644 --- a/web/src/routes/[handle]/[repo]/settings/labels/new/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/labels/new/+page.svelte @@ -1,20 +1,20 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/labels/new/+page.ts b/web/src/routes/[handle]/[repo]/settings/labels/new/+page.ts index a308e5542..4bbff18aa 100644 --- a/web/src/routes/[handle]/[repo]/settings/labels/new/+page.ts +++ b/web/src/routes/[handle]/[repo]/settings/labels/new/+page.ts @@ -1,4 +1,4 @@ -import { requireRepoAdmin } from "$lib/api/access"; +import { requireRepoAdmin } from "#lib/api/access.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/settings/pipelines/+page.svelte b/web/src/routes/[handle]/[repo]/settings/pipelines/+page.svelte index e7e4bc07e..8a77db1b9 100644 --- a/web/src/routes/[handle]/[repo]/settings/pipelines/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/pipelines/+page.svelte @@ -1,34 +1,34 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/rename/+page.svelte b/web/src/routes/[handle]/[repo]/settings/rename/+page.svelte index f54b3e766..0921a1e58 100644 --- a/web/src/routes/[handle]/[repo]/settings/rename/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/rename/+page.svelte @@ -1,18 +1,18 @@ diff --git a/web/src/routes/[handle]/[repo]/settings/rename/+page.ts b/web/src/routes/[handle]/[repo]/settings/rename/+page.ts index a308e5542..4bbff18aa 100644 --- a/web/src/routes/[handle]/[repo]/settings/rename/+page.ts +++ b/web/src/routes/[handle]/[repo]/settings/rename/+page.ts @@ -1,4 +1,4 @@ -import { requireRepoAdmin } from "$lib/api/access"; +import { requireRepoAdmin } from "#lib/api/access.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/settings/sites/+page.svelte b/web/src/routes/[handle]/[repo]/settings/sites/+page.svelte index 762b65edd..f2645fcb2 100644 --- a/web/src/routes/[handle]/[repo]/settings/sites/+page.svelte +++ b/web/src/routes/[handle]/[repo]/settings/sites/+page.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/[handle]/[repo]/stars/+page.ts b/web/src/routes/[handle]/[repo]/stars/+page.ts index 799380028..a53789726 100644 --- a/web/src/routes/[handle]/[repo]/stars/+page.ts +++ b/web/src/routes/[handle]/[repo]/stars/+page.ts @@ -1,9 +1,9 @@ -import { createBobbinClient } from "$lib/api/client"; -import { IdentityCache } from "$lib/api/identity"; -import { settle, stream } from "$lib/api/load"; -import { listStars } from "$lib/api/records"; -import { didFromUri } from "$lib/api/uri"; -import { offsetFor, pageCount, pageParam } from "$lib/pagination"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { IdentityCache } from "#lib/api/identity.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { listStars } from "#lib/api/records.ts"; +import { didFromUri } from "#lib/api/uri.ts"; +import { offsetFor, pageCount, pageParam } from "#lib/pagination.ts"; import type { PageLoad } from "./$types"; const LIMIT = 50; diff --git a/web/src/routes/[handle]/[repo]/tags/+page.svelte b/web/src/routes/[handle]/[repo]/tags/+page.svelte index 4e9c167c1..4b517d690 100644 --- a/web/src/routes/[handle]/[repo]/tags/+page.svelte +++ b/web/src/routes/[handle]/[repo]/tags/+page.svelte @@ -1,11 +1,11 @@ diff --git a/web/src/routes/[handle]/[repo]/tags/+page.ts b/web/src/routes/[handle]/[repo]/tags/+page.ts index f3ee40e94..eccb98a8f 100644 --- a/web/src/routes/[handle]/[repo]/tags/+page.ts +++ b/web/src/routes/[handle]/[repo]/tags/+page.ts @@ -1,8 +1,8 @@ -import { gitTarget, requireGit, tags } from "$lib/api/gitclient"; -import { REF_LIMIT } from "$lib/api/repoIndex"; -import { toTagSummary } from "$lib/api/repo"; -import { settle, stream } from "$lib/api/load"; -import { discoveredPageCount, offsetFor, pageCount, pageParam } from "$lib/pagination"; +import { gitTarget, requireGit, tags } from "#lib/api/gitclient.ts"; +import { REF_LIMIT } from "#lib/api/repoIndex.ts"; +import { toTagSummary } from "#lib/api/repo.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { discoveredPageCount, offsetFor, pageCount, pageParam } from "#lib/pagination.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/tags/[tag]/+page.svelte b/web/src/routes/[handle]/[repo]/tags/[tag]/+page.svelte index eadea42ea..6cf62d874 100644 --- a/web/src/routes/[handle]/[repo]/tags/[tag]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/tags/[tag]/+page.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/[handle]/[repo]/tags/[tag]/+page.ts b/web/src/routes/[handle]/[repo]/tags/[tag]/+page.ts index 69205875a..3a3549e6a 100644 --- a/web/src/routes/[handle]/[repo]/tags/[tag]/+page.ts +++ b/web/src/routes/[handle]/[repo]/tags/[tag]/+page.ts @@ -1,8 +1,8 @@ import { error } from "@sveltejs/kit"; -import { gitTarget, requireGit, tag, tags } from "$lib/api/gitclient"; -import { settle, stream } from "$lib/api/load"; -import { toTagSummary } from "$lib/api/repo"; -import type * as ListTags from "$lib/api/lexicons/types/org/tangled/temp/git/listTags"; +import { gitTarget, requireGit, tag, tags } from "#lib/api/gitclient.ts"; +import { settle, stream } from "#lib/api/load.ts"; +import { toTagSummary } from "#lib/api/repo.ts"; +import type * as ListTags from "#lib/api/lexicons/types/org/tangled/temp/git/listTags.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/src/routes/[handle]/[repo]/tree/[ref]/+page.server.ts b/web/src/routes/[handle]/[repo]/tree/[ref]/+page.server.ts index bfd9f66d3..d6e9bf124 100644 --- a/web/src/routes/[handle]/[repo]/tree/[ref]/+page.server.ts +++ b/web/src/routes/[handle]/[repo]/tree/[ref]/+page.server.ts @@ -1,5 +1,5 @@ -import { early, settle } from "$lib/api/load"; -import { loadRepoIndex } from "$lib/server/repoIndex"; +import { early, settle } from "#lib/api/load.ts"; +import { loadRepoIndex } from "#lib/server/repoIndex.ts"; import type { PageServerLoad } from "./$types"; // the ref is a single encoded segment, so `feature/x` arrives here intact diff --git a/web/src/routes/[handle]/[repo]/tree/[ref]/+page.svelte b/web/src/routes/[handle]/[repo]/tree/[ref]/+page.svelte index 324516319..6d6663654 100644 --- a/web/src/routes/[handle]/[repo]/tree/[ref]/+page.svelte +++ b/web/src/routes/[handle]/[repo]/tree/[ref]/+page.svelte @@ -1,9 +1,9 @@ diff --git a/web/src/routes/[handle]/handle.test.ts b/web/src/routes/[handle]/handle.test.ts index d2d029c48..1684c2ec3 100644 --- a/web/src/routes/[handle]/handle.test.ts +++ b/web/src/routes/[handle]/handle.test.ts @@ -1,9 +1,9 @@ import { describe, expect, it, vi } from "vitest"; -import { load as handleLayoutLoad } from "$routes/[handle]/+layout"; -import { load as repoLayoutLoad } from "$routes/[handle]/[repo]/+layout.server"; -import { REPO_OWNER_DOCS } from "$lib/api/descriptors"; -import { ACCOUNT_MODERATION, PROFILE_MODERATION } from "$lib/api/moderationLabels"; -import { TYPE_MINIDOC, type LabelsDescriptor, type Sidecar } from "$lib/api/enrich"; +import { load as handleLayoutLoad } from "#routes/[handle]/+layout.ts"; +import { load as repoLayoutLoad } from "#routes/[handle]/[repo]/+layout.server.ts"; +import { REPO_OWNER_DOCS } from "#lib/api/descriptors.ts"; +import { ACCOUNT_MODERATION, PROFILE_MODERATION } from "#lib/api/moderationLabels.ts"; +import { TYPE_MINIDOC, type LabelsDescriptor, type Sidecar } from "#lib/api/enrich.ts"; const labeled = (ref: string, of: LabelsDescriptor, val: string): Sidecar => ({ [ref]: { diff --git a/web/src/routes/[handle]/settings/OrganizationAvatar.svelte b/web/src/routes/[handle]/settings/OrganizationAvatar.svelte index 53929b69a..ab450c752 100644 --- a/web/src/routes/[handle]/settings/OrganizationAvatar.svelte +++ b/web/src/routes/[handle]/settings/OrganizationAvatar.svelte @@ -1,11 +1,11 @@ diff --git a/web/src/routes/[handle]/settings/OrganizationProfileTab.stories.svelte b/web/src/routes/[handle]/settings/OrganizationProfileTab.stories.svelte index 1d669836d..ced87dd96 100644 --- a/web/src/routes/[handle]/settings/OrganizationProfileTab.stories.svelte +++ b/web/src/routes/[handle]/settings/OrganizationProfileTab.stories.svelte @@ -1,8 +1,8 @@ diff --git a/web/src/routes/avatar/[did]/+server.ts b/web/src/routes/avatar/[did]/+server.ts index e7a8f09dd..6dce9223c 100644 --- a/web/src/routes/avatar/[did]/+server.ts +++ b/web/src/routes/avatar/[did]/+server.ts @@ -1,6 +1,6 @@ import { createHmac } from "node:crypto"; import { error } from "@sveltejs/kit"; -import { getConfig } from "$lib/server/config"; +import { getConfig } from "#lib/server/config.ts"; import type { RequestHandler } from "./$types"; // half a day, the same as what the service puts on the image diff --git a/web/src/routes/blob/[did]/[cid]/+server.ts b/web/src/routes/blob/[did]/[cid]/+server.ts index 4ea3e2aec..a9add4abb 100644 --- a/web/src/routes/blob/[did]/[cid]/+server.ts +++ b/web/src/routes/blob/[did]/[cid]/+server.ts @@ -1,9 +1,9 @@ import { error } from "@sveltejs/kit"; import { isCid, isDid } from "@atcute/lexicons/syntax"; -import { createBobbinClient } from "$lib/api/client"; -import { resolveMiniDoc } from "$lib/api/identity"; -import { camoUrl } from "$lib/server/camo"; -import { getConfig } from "$lib/server/config"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { resolveMiniDoc } from "#lib/api/identity.ts"; +import { camoUrl } from "#lib/server/camo.ts"; +import { getConfig } from "#lib/server/config.ts"; import type { RequestHandler } from "./$types"; // markup renders blob+at:/// against this route because resolving the diff --git a/web/src/routes/camo/[hex]/+server.ts b/web/src/routes/camo/[hex]/+server.ts index 79d16fbd8..a2e530fb0 100644 --- a/web/src/routes/camo/[hex]/+server.ts +++ b/web/src/routes/camo/[hex]/+server.ts @@ -1,6 +1,6 @@ import { error } from "@sveltejs/kit"; -import { camoUrl } from "$lib/server/camo"; -import { signableTarget } from "$lib/server/camotarget"; +import { camoUrl } from "#lib/server/camo.ts"; +import { signableTarget } from "#lib/server/camotarget.ts"; import type { RequestHandler } from "./$types"; // the signed url only changes when the secret does, so it can cache for a day diff --git a/web/src/routes/dev/components/+page.svelte b/web/src/routes/dev/components/+page.svelte index d480174c5..974bc9209 100644 --- a/web/src/routes/dev/components/+page.svelte +++ b/web/src/routes/dev/components/+page.svelte @@ -19,69 +19,69 @@ import Star from "$icon/star"; import Trash2 from "$icon/trash-2"; import TriangleAlert from "$icon/triangle-alert"; - import bonesRadioLoadingRow from "$lib/bones/bones-radio--loading-row.bones.json"; - import ActorInput from "$lib/components/ui/ActorInput.svelte"; - import Avatar from "$lib/components/ui/Avatar.svelte"; - import Bones from "$lib/components/ui/Bones.svelte"; - import Button from "$lib/components/ui/Button.svelte"; - import ButtonCard from "$lib/components/ui/ButtonCard.svelte"; - import ButtonGroup from "$lib/components/ui/ButtonGroup.svelte"; - import Segment from "$lib/components/ui/Segment.svelte"; - import SegmentedControl from "$lib/components/ui/SegmentedControl.svelte"; - import Card from "$lib/components/ui/Card.svelte"; - import Checkbox from "$lib/components/ui/Checkbox.svelte"; - import ColorBall from "$lib/components/ui/ColorBall.svelte"; - import Combobox from "$lib/components/ui/Combobox.svelte"; - import ConfirmModal from "$lib/components/ui/ConfirmModal.svelte"; - import CopyButton from "$lib/components/ui/CopyButton.svelte"; - import Dropdown from "$lib/components/ui/Dropdown.svelte"; - import DropdownItem from "$lib/components/ui/DropdownItem.svelte"; - import EmptyState from "$lib/components/ui/EmptyState.svelte"; - import ErrorMessage from "$lib/components/ui/Error.svelte"; - import Field from "$lib/components/ui/Field.svelte"; - import FormStep from "$lib/components/ui/FormStep.svelte"; - import FormStepDisclosure from "$lib/components/ui/FormStepDisclosure.svelte"; - import GraphCell, { type Band } from "$lib/components/ui/GraphCell.svelte"; - import Hovercard from "$lib/components/ui/Hovercard.svelte"; - import Input from "$lib/components/ui/Input.svelte"; - import Kbd from "$lib/components/ui/Kbd.svelte"; - import Lightbox from "$lib/components/ui/Lightbox.svelte"; - import Link from "$lib/components/ui/Link.svelte"; - import ListPanel, { listRows } from "$lib/components/ui/ListPanel.svelte"; - import ListToolbar from "$lib/components/ui/ListToolbar.svelte"; - import Logo from "$lib/components/ui/Logo.svelte"; - import MarkdownEditor from "$lib/components/ui/MarkdownEditor.svelte"; - import Modal from "$lib/components/ui/Modal.svelte"; - import MoreMenu from "$lib/components/ui/MoreMenu.svelte"; - import Pagination from "$lib/components/ui/Pagination.svelte"; - import Radio from "$lib/components/ui/Radio.svelte"; + import bonesRadioLoadingRow from "#lib/bones/bones-radio--loading-row.bones.json"; + import ActorInput from "#lib/components/ui/ActorInput.svelte"; + import Avatar from "#lib/components/ui/Avatar.svelte"; + import Bones from "#lib/components/ui/Bones.svelte"; + import Button from "#lib/components/ui/Button.svelte"; + import ButtonCard from "#lib/components/ui/ButtonCard.svelte"; + import ButtonGroup from "#lib/components/ui/ButtonGroup.svelte"; + import Segment from "#lib/components/ui/Segment.svelte"; + import SegmentedControl from "#lib/components/ui/SegmentedControl.svelte"; + import Card from "#lib/components/ui/Card.svelte"; + import Checkbox from "#lib/components/ui/Checkbox.svelte"; + import ColorBall from "#lib/components/ui/ColorBall.svelte"; + import Combobox from "#lib/components/ui/Combobox.svelte"; + import ConfirmModal from "#lib/components/ui/ConfirmModal.svelte"; + import CopyButton from "#lib/components/ui/CopyButton.svelte"; + import Dropdown from "#lib/components/ui/Dropdown.svelte"; + import DropdownItem from "#lib/components/ui/DropdownItem.svelte"; + import EmptyState from "#lib/components/ui/EmptyState.svelte"; + import ErrorMessage from "#lib/components/ui/Error.svelte"; + import Field from "#lib/components/ui/Field.svelte"; + import FormStep from "#lib/components/ui/FormStep.svelte"; + import FormStepDisclosure from "#lib/components/ui/FormStepDisclosure.svelte"; + import GraphCell, { type Band } from "#lib/components/ui/GraphCell.svelte"; + import Hovercard from "#lib/components/ui/Hovercard.svelte"; + import Input from "#lib/components/ui/Input.svelte"; + import Kbd from "#lib/components/ui/Kbd.svelte"; + import Lightbox from "#lib/components/ui/Lightbox.svelte"; + import Link from "#lib/components/ui/Link.svelte"; + import ListPanel, { listRows } from "#lib/components/ui/ListPanel.svelte"; + import ListToolbar from "#lib/components/ui/ListToolbar.svelte"; + import Logo from "#lib/components/ui/Logo.svelte"; + import MarkdownEditor from "#lib/components/ui/MarkdownEditor.svelte"; + import Modal from "#lib/components/ui/Modal.svelte"; + import MoreMenu from "#lib/components/ui/MoreMenu.svelte"; + import Pagination from "#lib/components/ui/Pagination.svelte"; + import Radio from "#lib/components/ui/Radio.svelte"; import RangeSelector, { type Range, type RowActions - } from "$lib/components/ui/RangeSelector.svelte"; - import ResizeHandle from "$lib/components/ui/ResizeHandle.svelte"; - import Section from "$lib/components/ui/Section.svelte"; - import Select from "$lib/components/ui/Select.svelte"; - import Separator from "$lib/components/ui/Separator.svelte"; - import ShimmerText from "$lib/components/ui/ShimmerText.svelte"; - import SignupPrompt from "$lib/components/ui/SignupPrompt.svelte"; - import Spinner from "$lib/components/ui/Spinner.svelte"; - import SplitButton from "$lib/components/ui/SplitButton.svelte"; - import StepMarker from "$lib/components/ui/StepMarker.svelte"; - import Tabs from "$lib/components/ui/Tabs.svelte"; - import Tag from "$lib/components/ui/Tag.svelte"; - import Textarea from "$lib/components/ui/Textarea.svelte"; - import TextSwap from "$lib/components/ui/TextSwap.svelte"; - import TimeAgo from "$lib/components/ui/TimeAgo.svelte"; - import Toggle from "$lib/components/ui/Toggle.svelte"; - import ToggleFaces from "$lib/components/ui/ToggleFaces.svelte"; - import Tooltip from "$lib/components/ui/Tooltip.svelte"; - import User from "$lib/components/ui/User.svelte"; - import type { InputTag } from "$lib/components/ui/inputField"; - import type { SelectOption } from "$lib/components/ui/selectField"; - import type { LightboxImage } from "$lib/lightbox.svelte"; - import Shell from "$routes/dev/components/Shell.svelte"; - import Tile from "$routes/dev/components/Tile.svelte"; + } from "#lib/components/ui/RangeSelector.svelte"; + import ResizeHandle from "#lib/components/ui/ResizeHandle.svelte"; + import Section from "#lib/components/ui/Section.svelte"; + import Select from "#lib/components/ui/Select.svelte"; + import Separator from "#lib/components/ui/Separator.svelte"; + import ShimmerText from "#lib/components/ui/ShimmerText.svelte"; + import SignupPrompt from "#lib/components/ui/SignupPrompt.svelte"; + import Spinner from "#lib/components/ui/Spinner.svelte"; + import SplitButton from "#lib/components/ui/SplitButton.svelte"; + import StepMarker from "#lib/components/ui/StepMarker.svelte"; + import Tabs from "#lib/components/ui/Tabs.svelte"; + import Tag from "#lib/components/ui/Tag.svelte"; + import Textarea from "#lib/components/ui/Textarea.svelte"; + import TextSwap from "#lib/components/ui/TextSwap.svelte"; + import TimeAgo from "#lib/components/ui/TimeAgo.svelte"; + import Toggle from "#lib/components/ui/Toggle.svelte"; + import ToggleFaces from "#lib/components/ui/ToggleFaces.svelte"; + import Tooltip from "#lib/components/ui/Tooltip.svelte"; + import User from "#lib/components/ui/User.svelte"; + import type { InputTag } from "#lib/components/ui/inputField.ts"; + import type { SelectOption } from "#lib/components/ui/selectField.ts"; + import type { LightboxImage } from "#lib/lightbox.svelte.ts"; + import Shell from "#routes/dev/components/Shell.svelte"; + import Tile from "#routes/dev/components/Tile.svelte"; const versions: SelectOption[] = [ { value: "v1.2.0", hint: "latest" }, diff --git a/web/src/routes/dev/components/+page.ts b/web/src/routes/dev/components/+page.ts index 7591adb85..9d036cf81 100644 --- a/web/src/routes/dev/components/+page.ts +++ b/web/src/routes/dev/components/+page.ts @@ -1,4 +1,4 @@ -import { dev } from "$app/environment"; +import { dev } from "$app/env"; import { error } from "@sveltejs/kit"; export const ssr = false; diff --git a/web/src/routes/dev/components/Shell.svelte b/web/src/routes/dev/components/Shell.svelte index 35091883a..8480551b9 100644 --- a/web/src/routes/dev/components/Shell.svelte +++ b/web/src/routes/dev/components/Shell.svelte @@ -7,10 +7,10 @@ import Search from "$icon/search"; import Sun from "$icon/sun"; import X from "$icon/x"; - import Button from "$lib/components/ui/Button.svelte"; - import Input from "$lib/components/ui/Input.svelte"; - import Logo from "$lib/components/ui/Logo.svelte"; - import { plural } from "$lib/format"; + import Button from "#lib/components/ui/Button.svelte"; + import Input from "#lib/components/ui/Input.svelte"; + import Logo from "#lib/components/ui/Logo.svelte"; + import { plural } from "#lib/format.ts"; interface Entry { name: string; diff --git a/web/src/routes/favicon.svg/+server.ts b/web/src/routes/favicon.svg/+server.ts index 7a3f9d868..29effcf18 100644 --- a/web/src/routes/favicon.svg/+server.ts +++ b/web/src/routes/favicon.svg/+server.ts @@ -1,5 +1,5 @@ -import { dev } from "$app/environment"; -import dolly from "$static/logos/dolly.svg?raw"; +import { dev } from "$app/env"; +import dolly from "#static/logos/dolly.svg?raw"; import type { RequestHandler } from "./$types"; const devTint = "#d97706"; // --color-foreground-warning diff --git a/web/src/routes/invite/+page.server.ts b/web/src/routes/invite/+page.server.ts index a68ccc6c9..28a0fea4b 100644 --- a/web/src/routes/invite/+page.server.ts +++ b/web/src/routes/invite/+page.server.ts @@ -1,4 +1,4 @@ -import { requireAuth } from "$lib/auth/guards"; +import { requireAuth } from "#lib/auth/guards.ts"; import type { PageServerLoad } from "./$types"; export const load: PageServerLoad = (event) => { diff --git a/web/src/routes/invite/+page.svelte b/web/src/routes/invite/+page.svelte index c1e95d0ac..344b7e47c 100644 --- a/web/src/routes/invite/+page.svelte +++ b/web/src/routes/invite/+page.svelte @@ -1,21 +1,21 @@ diff --git a/web/src/routes/repo/migrate/+page.server.ts b/web/src/routes/repo/migrate/+page.server.ts index a68ccc6c9..28a0fea4b 100644 --- a/web/src/routes/repo/migrate/+page.server.ts +++ b/web/src/routes/repo/migrate/+page.server.ts @@ -1,4 +1,4 @@ -import { requireAuth } from "$lib/auth/guards"; +import { requireAuth } from "#lib/auth/guards.ts"; import type { PageServerLoad } from "./$types"; export const load: PageServerLoad = (event) => { diff --git a/web/src/routes/repo/migrate/+page.svelte b/web/src/routes/repo/migrate/+page.svelte index 110106e8b..8f7ac5559 100644 --- a/web/src/routes/repo/migrate/+page.svelte +++ b/web/src/routes/repo/migrate/+page.svelte @@ -1,18 +1,18 @@ diff --git a/web/src/routes/settings/emails/+page.svelte b/web/src/routes/settings/emails/+page.svelte index b67576858..d6b525ca3 100644 --- a/web/src/routes/settings/emails/+page.svelte +++ b/web/src/routes/settings/emails/+page.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/routes/settings/emails/new/+page.svelte b/web/src/routes/settings/emails/new/+page.svelte index 8f7a9abf5..c126dd09e 100644 --- a/web/src/routes/settings/emails/new/+page.svelte +++ b/web/src/routes/settings/emails/new/+page.svelte @@ -1,16 +1,16 @@ diff --git a/web/src/routes/settings/keys/new/+page.svelte b/web/src/routes/settings/keys/new/+page.svelte index a44818d10..a7e594810 100644 --- a/web/src/routes/settings/keys/new/+page.svelte +++ b/web/src/routes/settings/keys/new/+page.svelte @@ -1,18 +1,18 @@ diff --git a/web/src/routes/settings/knots/new/+page.svelte b/web/src/routes/settings/knots/new/+page.svelte index cdb2a3fd1..546ff52bf 100644 --- a/web/src/routes/settings/knots/new/+page.svelte +++ b/web/src/routes/settings/knots/new/+page.svelte @@ -1,17 +1,17 @@ diff --git a/web/src/routes/settings/organizations/+page.svelte b/web/src/routes/settings/organizations/+page.svelte index 97408dfc2..35490b406 100644 --- a/web/src/routes/settings/organizations/+page.svelte +++ b/web/src/routes/settings/organizations/+page.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/routes/settings/organizations/new/+page.svelte b/web/src/routes/settings/organizations/new/+page.svelte index 1e64aee78..409d06852 100644 --- a/web/src/routes/settings/organizations/new/+page.svelte +++ b/web/src/routes/settings/organizations/new/+page.svelte @@ -1,6 +1,6 @@ - import { getAuth } from "$lib/auth.svelte"; - import { createLoad } from "$lib/action.svelte"; - import { createBobbinClient } from "$lib/api/client"; - import { loadProfile, saveAvatar } from "$lib/api/profileSettings"; - import AvatarForm from "$lib/components/settings/AvatarForm.svelte"; + import { getAuth } from "#lib/auth.svelte.ts"; + import { createLoad } from "#lib/action.svelte.ts"; + import { createBobbinClient } from "#lib/api/client.ts"; + import { loadProfile, saveAvatar } from "#lib/api/profileSettings.ts"; + import AvatarForm from "#lib/components/settings/AvatarForm.svelte"; const auth = getAuth(); const user = $derived(auth.currentUser); diff --git a/web/src/routes/settings/profile/deactivate/+page.svelte b/web/src/routes/settings/profile/deactivate/+page.svelte index a69f52b30..8599a2133 100644 --- a/web/src/routes/settings/profile/deactivate/+page.svelte +++ b/web/src/routes/settings/profile/deactivate/+page.svelte @@ -1,10 +1,10 @@ diff --git a/web/src/routes/settings/spindles/+page.svelte b/web/src/routes/settings/spindles/+page.svelte index e0beff6a4..2b3484494 100644 --- a/web/src/routes/settings/spindles/+page.svelte +++ b/web/src/routes/settings/spindles/+page.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/routes/settings/spindles/new/+page.svelte b/web/src/routes/settings/spindles/new/+page.svelte index 48e8ba398..4ac372631 100644 --- a/web/src/routes/settings/spindles/new/+page.svelte +++ b/web/src/routes/settings/spindles/new/+page.svelte @@ -1,17 +1,17 @@ diff --git a/web/src/routes/strings/[handle]/[rkey]/StringPageContent.svelte b/web/src/routes/strings/[handle]/[rkey]/StringPageContent.svelte index f418289aa..dd7585b87 100644 --- a/web/src/routes/strings/[handle]/[rkey]/StringPageContent.svelte +++ b/web/src/routes/strings/[handle]/[rkey]/StringPageContent.svelte @@ -1,21 +1,21 @@ @@ -349,7 +353,7 @@ You have an unfinished repository migration from GitHub.

View migration diff --git a/web/src/routes/welcome/+page.ts b/web/src/routes/welcome/+page.ts index 8134ac0f2..8ae7e4e64 100644 --- a/web/src/routes/welcome/+page.ts +++ b/web/src/routes/welcome/+page.ts @@ -1,12 +1,12 @@ import { redirect } from "@sveltejs/kit"; -import { createBobbinClient } from "$lib/api/client"; -import { FOLLOW_VIEWER, STAR_VIEWER } from "$lib/api/descriptors"; -import { viewerRkeyOf } from "$lib/api/enrich"; -import { getTrendingWithViewerState } from "$lib/api/profile"; -import { httpStatusFor, toHttpError } from "$lib/api/load"; -import { getProfile } from "$lib/api/records"; -import { listPubKeys, sshFingerprint } from "$lib/api/settings"; -import { toPerson, toRepoCard } from "$lib/components/timeline/mappers"; +import { createBobbinClient } from "#lib/api/client.ts"; +import { FOLLOW_VIEWER, STAR_VIEWER } from "#lib/api/descriptors.ts"; +import { viewerRkeyOf } from "#lib/api/enrich.ts"; +import { getTrendingWithViewerState } from "#lib/api/profile.ts"; +import { httpStatusFor, toHttpError } from "#lib/api/load.ts"; +import { getProfile } from "#lib/api/records.ts"; +import { listPubKeys, sshFingerprint } from "#lib/api/settings.ts"; +import { toPerson, toRepoCard } from "#lib/components/timeline/mappers.ts"; import type { PageLoad } from "./$types"; export const load: PageLoad = async (event) => { diff --git a/web/svelte.config.js b/web/svelte.config.js deleted file mode 100644 index 4acdaa0f0..000000000 --- a/web/svelte.config.js +++ /dev/null @@ -1,47 +0,0 @@ -import cloudflareAdapter from "@sveltejs/adapter-cloudflare"; -import adapter from "@sveltejs/adapter-node"; -import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; -import { testids } from "./scripts/testids.ts"; - -const useCloudflareAdapter = process.env.SVELTE_ADAPTER === "cloudflare"; -const injectTestIds = process.env.E2E_TESTIDS === "true"; -const wranglerConfig = process.env.WRANGLER_CONFIG ?? "wrangler.dev.jsonc"; - -const config = { - preprocess: [vitePreprocess(), ...(injectTestIds ? [testids()] : [])], - compilerOptions: { - runes: ({ filename }) => (filename.split(/[/\\]/).includes("node_modules") ? undefined : true), - // `await` in templates, so a page can hand a streamed promise straight to - // instead of threading {#await} through every view - experimental: { async: true } - }, - kit: { - adapter: useCloudflareAdapter - ? cloudflareAdapter({ - config: wranglerConfig, - // dev-only: serve the worker bindings locally; remoteBindings would need tokens - platformProxy: { configPath: wranglerConfig, persist: true, remoteBindings: false } - }) - : adapter(), - // storybook input, not app code. eslint keeps the app from importing it - alias: { - $fixtures: "src/fixtures", - $routes: "src/routes", - $static: "static", - $storybook: ".storybook", - "$storybook/*": ".storybook/*" - }, - // defaults to the build's clock, which makes every build of the same source - // differ. the deploys pass the web tree's git hash, so it only changes with the app - version: { name: process.env.APP_VERSION || undefined }, - paths: { - // GFE is evil and rewrites // to / - // so we do this to have /_app/ be at root always which means it doesnt break - // bcz // -> / removes a depth level which makes browser try to fetch app - // bundle that doesnt exist at that path - relative: false - } - } -}; - -export default config; diff --git a/web/tsconfig.json b/web/tsconfig.json index fc4aefb63..d9a249e18 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -1,22 +1,9 @@ { - "extends": "./.svelte-kit/tsconfig.json", + "extends": "$app/tsconfig", "compilerOptions": { - "rewriteRelativeImportExtensions": true, - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, "allowArbitraryExtensions": true - } - // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias - // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files - // - // To make changes to top-level options such as include and exclude, we recommend extending - // the generated config; see https://svelte.dev/docs/kit/configuration#typescript + }, + "include": ["src", "vite.config.ts"] } diff --git a/web/vite.config.ts b/web/vite.config.ts index 7588341f7..02fae107f 100644 --- a/web/vite.config.ts +++ b/web/vite.config.ts @@ -1,14 +1,17 @@ -import tailwindcss from "@tailwindcss/vite"; +import cloudflareAdapter from "@sveltejs/adapter-cloudflare"; +import adapter from "@sveltejs/adapter-node"; import { sveltekit } from "@sveltejs/kit/vite"; +import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; +import tailwindcss from "@tailwindcss/vite"; import Icons from "unplugin-icons/vite"; import { defineConfig } from "vitest/config"; -import oauthMetadata, { loopbackClientId, loopbackScope } from "./src/lib/oauth-client-metadata"; +import oauthMetadata, { loopbackClientId, loopbackScope } from "./src/lib/oauth-client-metadata.ts"; +import { testids } from "./scripts/testids.ts"; import path from "node:path"; -import { fileURLToPath } from "node:url"; import { storybookTest } from "@storybook/addon-vitest/vitest-plugin"; import { playwright } from "@vitest/browser-playwright"; -const dirname = - typeof __dirname !== "undefined" ? __dirname : path.dirname(fileURLToPath(import.meta.url)); + +const dirname = import.meta.dirname; // More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon const devHost = process.env.VITE_DEV_HOST ?? "127.0.0.1"; @@ -30,6 +33,10 @@ const devScope = process.env.VITE_OAUTH_SCOPE ?? (process.env.VITE_OAUTH_CLIENT_ID ? oauthMetadata.scope : loopbackScope); const devClientId = loopbackClientId(devRedirectUri, devScope); +const useCloudflareAdapter = process.env.SVELTE_ADAPTER === "cloudflare"; +const injectTestIds = process.env.E2E_TESTIDS === "true"; +const wranglerConfig = process.env.WRANGLER_CONFIG ?? "wrangler.dev.jsonc"; + export default defineConfig({ plugins: [ { @@ -54,10 +61,38 @@ export default defineConfig({ } }, tailwindcss(), - Icons({ - compiler: "svelte" - }), - sveltekit() + Icons({ compiler: "svelte" }), + sveltekit({ + preprocess: [vitePreprocess(), ...(injectTestIds ? [testids()] : [])], + compilerOptions: { + runes: ({ filename }) => + filename.split(/[/\\]/).includes("node_modules") ? undefined : true, + // `await` in templates, so a page can hand a streamed promise straight to + // instead of threading {#await} through every view + experimental: { async: true } + }, + adapter: useCloudflareAdapter + ? cloudflareAdapter({ + config: wranglerConfig, + // dev-only: serve the worker bindings locally; remoteBindings would need tokens + platformProxy: { + configPath: wranglerConfig, + persist: true, + remoteBindings: false + } + }) + : adapter(), + // defaults to the build's clock, which makes every build of the same source + // differ. the deploys pass the web tree's git hash, so it only changes with the app + version: { name: process.env.APP_VERSION || undefined }, + paths: { + // GFE is evil and rewrites // to / + // so we do this to have /_app/ be at root always which means it doesnt break + // bcz // -> / removes a depth level which makes browser try to fetch app + // bundle that doesnt exist at that path + relative: false + } + }) ], resolve: { alias: { -- 2.54.0