pagescms 0.0.0-stage → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +66 -2
- package/dist/package/_headers +7 -0
- package/dist/package/cli.mjs +138 -0
- package/dist/package/config-CAscGjBB.js +123 -0
- package/dist/package/config.mjs +1 -0
- package/dist/package/favicon.ico +0 -0
- package/dist/package/favicon.svg +16 -0
- package/dist/package/generate-B-YdQuMX.js +48 -0
- package/dist/package/generate.mjs +1 -0
- package/dist/package/images/astro-blog-template.webp +0 -0
- package/dist/package/images/eleventy-blog-template.webp +0 -0
- package/dist/package/images/email-logo.png +0 -0
- package/dist/package/images/nextjs-blog-template.webp +0 -0
- package/dist/package/images/social-card.png +0 -0
- package/dist/package/migrate.mjs +184 -0
- package/dist/package/reference/docs/configuration/actions.md +160 -0
- package/dist/package/reference/docs/configuration/components.md +56 -0
- package/dist/package/reference/docs/configuration/content/filename.md +63 -0
- package/dist/package/reference/docs/configuration/content/formats.md +63 -0
- package/dist/package/reference/docs/configuration/content/index.md +138 -0
- package/dist/package/reference/docs/configuration/content/view.md +52 -0
- package/dist/package/reference/docs/configuration/fields/block.md +62 -0
- package/dist/package/reference/docs/configuration/fields/boolean.md +22 -0
- package/dist/package/reference/docs/configuration/fields/code.md +29 -0
- package/dist/package/reference/docs/configuration/fields/date.md +35 -0
- package/dist/package/reference/docs/configuration/fields/file.md +34 -0
- package/dist/package/reference/docs/configuration/fields/image.md +48 -0
- package/dist/package/reference/docs/configuration/fields/index.md +130 -0
- package/dist/package/reference/docs/configuration/fields/number.md +28 -0
- package/dist/package/reference/docs/configuration/fields/object.md +63 -0
- package/dist/package/reference/docs/configuration/fields/reference.md +64 -0
- package/dist/package/reference/docs/configuration/fields/rich-text.md +126 -0
- package/dist/package/reference/docs/configuration/fields/select.md +48 -0
- package/dist/package/reference/docs/configuration/fields/string.md +31 -0
- package/dist/package/reference/docs/configuration/fields/text.md +30 -0
- package/dist/package/reference/docs/configuration/fields/uuid.md +28 -0
- package/dist/package/reference/docs/configuration/index.md +88 -0
- package/dist/package/reference/docs/configuration/localization.md +138 -0
- package/dist/package/reference/docs/configuration/media.md +77 -0
- package/dist/package/reference/docs/configuration/settings.md +85 -0
- package/dist/package/reference/docs/extending/custom-field.md +107 -0
- package/dist/package/reference/docs/extending/field-api.md +71 -0
- package/dist/package/reference/docs/extending/plugins.md +67 -0
- package/dist/package/reference/docs/guides/actions.md +14 -0
- package/dist/package/reference/docs/guides/collaborators.md +43 -0
- package/dist/package/reference/docs/guides/editing.md +36 -0
- package/dist/package/reference/docs/guides/media.md +24 -0
- package/dist/package/reference/docs/guides/translations.md +40 -0
- package/dist/package/reference/docs/how-it-works.md +33 -0
- package/dist/package/reference/docs/index.md +25 -0
- package/dist/package/reference/docs/quick-start.md +87 -0
- package/dist/package/reference/docs/reference.md +84 -0
- package/dist/package/reference/docs/self-hosting/cloudflare.md +62 -0
- package/dist/package/reference/docs/self-hosting/environment-variables.md +84 -0
- package/dist/package/reference/docs/self-hosting/github-app.md +54 -0
- package/dist/package/reference/docs/self-hosting/index.md +44 -0
- package/dist/package/reference/docs/self-hosting/netlify.md +41 -0
- package/dist/package/reference/docs/self-hosting/node.md +42 -0
- package/dist/package/reference/docs/self-hosting/upgrading.md +44 -0
- package/dist/package/reference/docs/self-hosting/vercel.md +41 -0
- package/dist/package/reference/docs.json +119 -0
- package/dist/package/reference/manifest.json +190 -0
- package/dist/package/reference.md +79 -0
- package/dist/package/serve-D2bbxXbp.js +25 -0
- package/dist/package/smtp.mjs +13 -0
- package/dist/package/vite-BUlNpf2j.js +260 -0
- package/dist/package/vite.mjs +1 -0
- package/dist/types/client/api/account.d.ts +33 -0
- package/dist/types/client/api/actions.d.ts +67 -0
- package/dist/types/client/api/activity.d.ts +4 -0
- package/dist/types/client/api/admin.d.ts +11 -0
- package/dist/types/client/api/auth.d.ts +375 -0
- package/dist/types/client/api/authentication.d.ts +2 -0
- package/dist/types/client/api/cache.d.ts +6 -0
- package/dist/types/client/api/collaborators.d.ts +13 -0
- package/dist/types/client/api/collections.d.ts +4 -0
- package/dist/types/client/api/configuration.d.ts +10 -0
- package/dist/types/client/api/dashboard.d.ts +2 -0
- package/dist/types/client/api/entries.d.ts +14 -0
- package/dist/types/client/api/entry-write.d.ts +3394 -0
- package/dist/types/client/api/fixed-file.d.ts +11 -0
- package/dist/types/client/api/index.d.ts +8 -0
- package/dist/types/client/api/local-account.d.ts +1 -0
- package/dist/types/client/api/media.d.ts +38 -0
- package/dist/types/client/api/reference.d.ts +7 -0
- package/dist/types/client/api/repositories.d.ts +1 -0
- package/dist/types/client/api/repository-search.d.ts +6 -0
- package/dist/types/client/api/repository.d.ts +14 -0
- package/dist/types/client/queries/admin.d.ts +179 -0
- package/dist/types/client/queries/content.d.ts +2012 -0
- package/dist/types/client/queries/file-history.d.ts +13 -0
- package/dist/types/client/queries/keys.d.ts +32 -0
- package/dist/types/client/queries/references.d.ts +59 -0
- package/dist/types/client/queries/repository-invalidation.d.ts +7 -0
- package/dist/types/client/queries/repository.d.ts +271 -0
- package/dist/types/client/queries/session.d.ts +116 -0
- package/dist/types/client.d.ts +1 -0
- package/dist/types/components/action-history-menu.d.ts +11 -0
- package/dist/types/components/code-editor-language.d.ts +1 -0
- package/dist/types/components/code-editor.d.ts +23 -0
- package/dist/types/components/code-field.d.ts +10 -0
- package/dist/types/components/collaborator-identity.d.ts +5 -0
- package/dist/types/components/collaborator-invite-input.d.ts +8 -0
- package/dist/types/components/collaborators-loading.d.ts +2 -0
- package/dist/types/components/collection-entry-creator.d.ts +14 -0
- package/dist/types/components/component-preloading.d.ts +1 -0
- package/dist/types/components/content-entry-editor.d.ts +20 -0
- package/dist/types/components/content-entry-skeleton.d.ts +4 -0
- package/dist/types/components/content-icon.d.ts +8 -0
- package/dist/types/components/dropdown-loading-row.d.ts +5 -0
- package/dist/types/components/editor-layout.d.ts +5 -0
- package/dist/types/components/editor-skeleton.d.ts +4 -0
- package/dist/types/components/error-alert.d.ts +6 -0
- package/dist/types/components/file-editor-history.d.ts +4 -0
- package/dist/types/components/file-editor-menu.d.ts +12 -0
- package/dist/types/components/github-icon.d.ts +2 -0
- package/dist/types/components/gradient-avatar-fallback.d.ts +4 -0
- package/dist/types/components/media-file-icon.d.ts +4 -0
- package/dist/types/components/media-thumbnail.d.ts +18 -0
- package/dist/types/components/operation-error.d.ts +18 -0
- package/dist/types/components/option-combobox.d.ts +24 -0
- package/dist/types/components/otp-verification-form.d.ts +13 -0
- package/dist/types/components/repository-action-buttons.d.ts +24 -0
- package/dist/types/components/repository-breadcrumb.d.ts +11 -0
- package/dist/types/components/repository-page-header.d.ts +15 -0
- package/dist/types/components/repository-shell.d.ts +26 -0
- package/dist/types/components/rich-text-field.d.ts +13 -0
- package/dist/types/components/root-error.d.ts +2 -0
- package/dist/types/components/search-input.d.ts +7 -0
- package/dist/types/components/settings-back-link.d.ts +4 -0
- package/dist/types/components/settings-layout.d.ts +17 -0
- package/dist/types/components/settings-loading.d.ts +2 -0
- package/dist/types/components/settings-row.d.ts +2 -0
- package/dist/types/components/sign-in-form.d.ts +6 -0
- package/dist/types/components/startup-error.d.ts +1 -0
- package/dist/types/components/structured-content-field.d.ts +23 -0
- package/dist/types/components/table-pager.d.ts +9 -0
- package/dist/types/components/ui/alert-dialog.d.ts +18 -0
- package/dist/types/components/ui/alert.d.ts +10 -0
- package/dist/types/components/ui/avatar.d.ts +12 -0
- package/dist/types/components/ui/badge.d.ts +9 -0
- package/dist/types/components/ui/breadcrumb.d.ts +11 -0
- package/dist/types/components/ui/button-group.d.ts +11 -0
- package/dist/types/components/ui/button.d.ts +10 -0
- package/dist/types/components/ui/card.d.ts +11 -0
- package/dist/types/components/ui/checkbox.d.ts +4 -0
- package/dist/types/components/ui/collapsible.d.ts +5 -0
- package/dist/types/components/ui/combobox.d.ts +27 -0
- package/dist/types/components/ui/command.d.ts +18 -0
- package/dist/types/components/ui/dialog.d.ts +17 -0
- package/dist/types/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/types/components/ui/editor/blockquote.d.ts +3 -0
- package/dist/types/components/ui/editor/document.d.ts +6 -0
- package/dist/types/components/ui/editor/html-policy.d.ts +20 -0
- package/dist/types/components/ui/editor/image.d.ts +12 -0
- package/dist/types/components/ui/editor/index.d.ts +52 -0
- package/dist/types/components/ui/editor/preserve.d.ts +39 -0
- package/dist/types/components/ui/editor/slash-command/commands-list.d.ts +24 -0
- package/dist/types/components/ui/editor/slash-command/commands.d.ts +14 -0
- package/dist/types/components/ui/editor/slash-command/suggestion.d.ts +42 -0
- package/dist/types/components/ui/empty.d.ts +11 -0
- package/dist/types/components/ui/field.d.ts +24 -0
- package/dist/types/components/ui/input-group.d.ts +16 -0
- package/dist/types/components/ui/input-otp.d.ts +11 -0
- package/dist/types/components/ui/input.d.ts +3 -0
- package/dist/types/components/ui/label.d.ts +4 -0
- package/dist/types/components/ui/pagination.d.ts +17 -0
- package/dist/types/components/ui/popover.d.ts +10 -0
- package/dist/types/components/ui/progress.d.ts +4 -0
- package/dist/types/components/ui/radio-group.d.ts +5 -0
- package/dist/types/components/ui/scroll-area.d.ts +5 -0
- package/dist/types/components/ui/select.d.ts +15 -0
- package/dist/types/components/ui/separator.d.ts +4 -0
- package/dist/types/components/ui/sheet.d.ts +14 -0
- package/dist/types/components/ui/sidebar.d.ts +69 -0
- package/dist/types/components/ui/skeleton.d.ts +2 -0
- package/dist/types/components/ui/sonner.d.ts +3 -0
- package/dist/types/components/ui/spinner.d.ts +3 -0
- package/dist/types/components/ui/switch.d.ts +6 -0
- package/dist/types/components/ui/table.d.ts +19 -0
- package/dist/types/components/ui/tabs.d.ts +11 -0
- package/dist/types/components/ui/textarea.d.ts +3 -0
- package/dist/types/components/ui/toggle-group.d.ts +10 -0
- package/dist/types/components/ui/toggle.d.ts +9 -0
- package/dist/types/components/ui/tooltip.d.ts +7 -0
- package/dist/types/deployment/builtins/resend-email.server.d.ts +2 -0
- package/dist/types/deployment/conformance/media-storage.d.ts +15 -0
- package/dist/types/deployment/contracts/client.d.ts +17 -0
- package/dist/types/deployment/contracts/server.server.d.ts +15 -0
- package/dist/types/deployment/contracts/version.d.ts +4 -0
- package/dist/types/deployment/default/client.d.ts +2 -0
- package/dist/types/deployment/default/server.server.d.ts +2 -0
- package/dist/types/features/account/account-copy.d.ts +11 -0
- package/dist/types/features/account/account-deleted-notice.d.ts +3 -0
- package/dist/types/features/account/account-menu.d.ts +7 -0
- package/dist/types/features/account/account-messages.d.ts +2 -0
- package/dist/types/features/account/app-header.d.ts +6 -0
- package/dist/types/features/account/content-editing-preferences.d.ts +3 -0
- package/dist/types/features/account/delete-account.d.ts +6 -0
- package/dist/types/features/account/language-field.d.ts +6 -0
- package/dist/types/features/account/language-preference.d.ts +4 -0
- package/dist/types/features/account/local-account-data.d.ts +1 -0
- package/dist/types/features/account/local-account-storage.d.ts +8 -0
- package/dist/types/features/account/profile-editor.d.ts +51 -0
- package/dist/types/features/account/profile-fields.d.ts +17 -0
- package/dist/types/features/account/profile-loading.d.ts +1 -0
- package/dist/types/features/account/profile-picture.d.ts +13 -0
- package/dist/types/features/account/profile-settings.d.ts +8 -0
- package/dist/types/features/account/profile-setup-heading.d.ts +1 -0
- package/dist/types/features/account/profile-setup.d.ts +5 -0
- package/dist/types/features/account/require-profile.d.ts +6 -0
- package/dist/types/features/account/sign-in-layout.d.ts +5 -0
- package/dist/types/features/account/sign-in-page.d.ts +9 -0
- package/dist/types/features/account/theme-preference.d.ts +1 -0
- package/dist/types/features/account/use-account-preferences.d.ts +14 -0
- package/dist/types/features/account/use-profile-editor.d.ts +41 -0
- package/dist/types/features/account/use-profile-update.d.ts +19 -0
- package/dist/types/features/activity/activity-feed-item.d.ts +7 -0
- package/dist/types/features/activity/activity-feed-skeleton.d.ts +1 -0
- package/dist/types/features/activity/activity-feed.d.ts +11 -0
- package/dist/types/features/activity/activity-query.d.ts +5 -0
- package/dist/types/features/admin/action-run-status.d.ts +5 -0
- package/dist/types/features/admin/actions-page.d.ts +9 -0
- package/dist/types/features/admin/actions-skeleton.d.ts +1 -0
- package/dist/types/features/admin/admin-loading.d.ts +5 -0
- package/dist/types/features/admin/admin-page.d.ts +2 -0
- package/dist/types/features/admin/allowlist-table.d.ts +12 -0
- package/dist/types/features/admin/cache-copy.d.ts +4 -0
- package/dist/types/features/admin/cache-files-trigger.d.ts +1 -0
- package/dist/types/features/admin/cache-files.d.ts +6 -0
- package/dist/types/features/admin/cache-page.d.ts +6 -0
- package/dist/types/features/admin/cache-skeleton.d.ts +1 -0
- package/dist/types/features/admin/collaborators-page.d.ts +6 -0
- package/dist/types/features/admin/collaborators-skeleton.d.ts +2 -0
- package/dist/types/features/admin/configuration-contribution.d.ts +5 -0
- package/dist/types/features/admin/configuration-page.d.ts +9 -0
- package/dist/types/features/admin/configuration-setup.d.ts +1 -0
- package/dist/types/features/admin/configuration-skeleton.d.ts +1 -0
- package/dist/types/features/admin/plugin-page.d.ts +14 -0
- package/dist/types/features/admin/repository-actions-page.d.ts +1 -0
- package/dist/types/features/admin/repository-admin-access.d.ts +6 -0
- package/dist/types/features/admin/repository-admin-page.d.ts +12 -0
- package/dist/types/features/admin/repository-configuration-page.d.ts +1 -0
- package/dist/types/features/admin/sign-in-allowlist.d.ts +1 -0
- package/dist/types/features/admin/use-action-run-tracking.d.ts +5 -0
- package/dist/types/features/collaborators/collaborator-status.d.ts +4 -0
- package/dist/types/features/collaborators/collaborators-contribution.d.ts +5 -0
- package/dist/types/features/collections/collection-cell.d.ts +25 -0
- package/dist/types/features/collections/collection-header.d.ts +28 -0
- package/dist/types/features/collections/collection-model.d.ts +32 -0
- package/dist/types/features/collections/collection-page.d.ts +4 -0
- package/dist/types/features/collections/collection-skeleton.d.ts +1 -0
- package/dist/types/features/collections/collection-table-layout.d.ts +18 -0
- package/dist/types/features/collections/collection-table.d.ts +44 -0
- package/dist/types/features/content/content-mutations.d.ts +78 -0
- package/dist/types/features/content/unavailable-entry.d.ts +6 -0
- package/dist/types/features/content/use-entry-actions.d.ts +100 -0
- package/dist/types/features/dashboard/about-dialog.d.ts +2 -0
- package/dist/types/features/dashboard/branch-manager.d.ts +8 -0
- package/dist/types/features/dashboard/branch-picker.d.ts +2 -0
- package/dist/types/features/dashboard/create-branch-dialog.d.ts +8 -0
- package/dist/types/features/dashboard/recent-repositories.d.ts +14 -0
- package/dist/types/features/dashboard/recent-repository-list.d.ts +3 -0
- package/dist/types/features/dashboard/relative-time.d.ts +1 -0
- package/dist/types/features/dashboard/repository-dashboard.d.ts +13 -0
- package/dist/types/features/dashboard/repository-loading.d.ts +10 -0
- package/dist/types/features/dashboard/repository-selector.d.ts +10 -0
- package/dist/types/features/dashboard/repository-template-preview.d.ts +8 -0
- package/dist/types/features/dashboard/repository-templates.d.ts +5 -0
- package/dist/types/features/drafts/collection-creation.d.ts +20 -0
- package/dist/types/features/drafts/draft-discard-dialog.d.ts +8 -0
- package/dist/types/features/drafts/draft-field-preview.d.ts +10 -0
- package/dist/types/features/drafts/draft-merge-dialog.d.ts +11 -0
- package/dist/types/features/drafts/draft-merge-fields.d.ts +2 -0
- package/dist/types/features/drafts/draft-read-cache.d.ts +13 -0
- package/dist/types/features/drafts/draft-save-button.d.ts +19 -0
- package/dist/types/features/drafts/draft-session.d.ts +63 -0
- package/dist/types/features/drafts/draft-store.d.ts +44 -0
- package/dist/types/features/drafts/merge-draft.d.ts +22 -0
- package/dist/types/features/drafts/relative-age.d.ts +1 -0
- package/dist/types/features/drafts/saved-draft-menu.d.ts +6 -0
- package/dist/types/features/drafts/use-content-draft.d.ts +30 -0
- package/dist/types/features/drafts/use-draft-merge.d.ts +15 -0
- package/dist/types/features/drafts/use-duplicate-entry.d.ts +7 -0
- package/dist/types/features/drafts/use-review-viewport.d.ts +28 -0
- package/dist/types/features/editor/commit-message-dialog.d.ts +8 -0
- package/dist/types/features/editor/editor-component-loaders.d.ts +8 -0
- package/dist/types/features/editor/entry-breadcrumb.d.ts +28 -0
- package/dist/types/features/editor/entry-page-header.d.ts +9 -0
- package/dist/types/features/editor/entry-title.d.ts +13 -0
- package/dist/types/features/editor/field-locale-menu.d.ts +10 -0
- package/dist/types/features/editor/field-locale-values.d.ts +5 -0
- package/dist/types/features/editor/fields/core-field-renderers.d.ts +1 -0
- package/dist/types/features/editor/fields/custom-field-components.d.ts +3 -0
- package/dist/types/features/editor/fields/field-renderer-registry.d.ts +23 -0
- package/dist/types/features/editor/fields/field-types.d.ts +15 -0
- package/dist/types/features/editor/fields/field-validation.d.ts +27 -0
- package/dist/types/features/editor/fields/structured-field-options.d.ts +9 -0
- package/dist/types/features/editor/fields/use-reference-options.d.ts +14 -0
- package/dist/types/features/editor/file-locale-menu.d.ts +26 -0
- package/dist/types/features/editor/locale-context.d.ts +31 -0
- package/dist/types/features/editor/locale-selection.d.ts +13 -0
- package/dist/types/features/editor/rich-text-media.d.ts +10 -0
- package/dist/types/features/editor/start-translation-dialog.d.ts +10 -0
- package/dist/types/features/editor/translation-preferences.d.ts +8 -0
- package/dist/types/features/editor/translation-start.d.ts +13 -0
- package/dist/types/features/media/media-breadcrumb.d.ts +8 -0
- package/dist/types/features/media/media-browser.d.ts +23 -0
- package/dist/types/features/media/media-delivery.d.ts +35 -0
- package/dist/types/features/media/media-drag-overlay.d.ts +1 -0
- package/dist/types/features/media/media-entry.d.ts +21 -0
- package/dist/types/features/media/media-folder-tree.d.ts +8 -0
- package/dist/types/features/media/media-model.d.ts +22 -0
- package/dist/types/features/media/media-move-dialog.d.ts +12 -0
- package/dist/types/features/media/media-mutations.d.ts +43 -0
- package/dist/types/features/media/media-page.d.ts +6 -0
- package/dist/types/features/media/media-picker-dialog.d.ts +14 -0
- package/dist/types/features/media/media-skeleton.d.ts +6 -0
- package/dist/types/features/media/media-upload.d.ts +28 -0
- package/dist/types/features/media/media-view.d.ts +3 -0
- package/dist/types/features/media/upload-conflict-dialog.d.ts +5 -0
- package/dist/types/features/media/upload-conflicts.d.ts +47 -0
- package/dist/types/features/pending-writes/account-operation.d.ts +10 -0
- package/dist/types/features/pending-writes/pending-write.d.ts +9 -0
- package/dist/types/features/pending-writes/use-operation.d.ts +30 -0
- package/dist/types/features/plugins/standalone-plugin-page.d.ts +4 -0
- package/dist/types/features/plugins/standalone-plugin-routes.d.ts +9 -0
- package/dist/types/features/repository/configuration-required.d.ts +10 -0
- package/dist/types/features/repository/overview-draft-actions.d.ts +5 -0
- package/dist/types/features/repository/overview-entry.d.ts +6 -0
- package/dist/types/features/repository/overview-file-item.d.ts +8 -0
- package/dist/types/features/repository/overview-loading.d.ts +4 -0
- package/dist/types/features/repository/overview-local-files.d.ts +10 -0
- package/dist/types/features/repository/overview-media-upload.d.ts +8 -0
- package/dist/types/features/repository/overview-shortcuts.d.ts +11 -0
- package/dist/types/features/repository/overview.d.ts +7 -0
- package/dist/types/features/repository/repository-loading.d.ts +2 -0
- package/dist/types/features/repository/repository-route-resource.d.ts +8 -0
- package/dist/types/features/repository/repository-route-state.d.ts +8 -0
- package/dist/types/features/repository/repository-shell-loading.d.ts +1 -0
- package/dist/types/features/repository/repository-unavailable-error.d.ts +2 -0
- package/dist/types/features/repository/use-overview-files.d.ts +9 -0
- package/dist/types/features/settings/account-access-table.d.ts +8 -0
- package/dist/types/features/settings/account-settings-contribution.d.ts +4 -0
- package/dist/types/features/settings/settings-navigation.d.ts +14 -0
- package/dist/types/features/settings/shared-projects.d.ts +3 -0
- package/dist/types/features/settings/user-settings-skeleton.d.ts +5 -0
- package/dist/types/features/settings/user-settings.d.ts +1 -0
- package/dist/types/fields/definition.d.ts +23 -0
- package/dist/types/fields/registry.d.ts +2 -0
- package/dist/types/hooks/use-media-github-link.d.ts +10 -0
- package/dist/types/hooks/use-mobile.d.ts +1 -0
- package/dist/types/hooks/use-page-scrolled.d.ts +1 -0
- package/dist/types/hooks/use-repository-coordinates.d.ts +7 -0
- package/dist/types/hooks/use-repository-github-link.d.ts +2 -0
- package/dist/types/hooks/use-route-retry.d.ts +5 -0
- package/dist/types/hooks/use-sidebar-scroll.d.ts +5 -0
- package/dist/types/hooks/use-unsaved-warning.d.ts +1 -0
- package/dist/types/i18n/catalogs.d.ts +3 -0
- package/dist/types/i18n/dates.d.ts +3 -0
- package/dist/types/i18n/document-title.d.ts +10 -0
- package/dist/types/i18n/error-catalogs.d.ts +4 -0
- package/dist/types/i18n/errors.d.ts +13 -0
- package/dist/types/i18n/known-errors.d.ts +2 -0
- package/dist/types/i18n/locale.d.ts +6 -0
- package/dist/types/i18n/localized-error.d.ts +4 -0
- package/dist/types/i18n/localized-route-head.d.ts +5 -0
- package/dist/types/i18n/message.d.ts +8 -0
- package/dist/types/i18n/plugin-catalogs.d.ts +3 -0
- package/dist/types/i18n/test-provider.d.ts +4 -0
- package/dist/types/integrations/tanstack-query/devtools.d.ts +5 -0
- package/dist/types/integrations/tanstack-query/root-provider.d.ts +4 -0
- package/dist/types/lib/access-denial.d.ts +10 -0
- package/dist/types/lib/action-run-tracker.d.ts +34 -0
- package/dist/types/lib/action-run-tracking.d.ts +9 -0
- package/dist/types/lib/actions.d.ts +32 -0
- package/dist/types/lib/activity.d.ts +23 -0
- package/dist/types/lib/auth-error.d.ts +1 -0
- package/dist/types/lib/auth-redirect.d.ts +2 -0
- package/dist/types/lib/authentication.d.ts +20 -0
- package/dist/types/lib/avatar-gradient.d.ts +1 -0
- package/dist/types/lib/base64.d.ts +3 -0
- package/dist/types/lib/cn.d.ts +1 -0
- package/dist/types/lib/collaborator-invites.d.ts +4 -0
- package/dist/types/lib/collaborator-key.d.ts +2 -0
- package/dist/types/lib/collaborator-status.d.ts +1 -0
- package/dist/types/lib/commit-message.d.ts +27 -0
- package/dist/types/lib/component-loader.d.ts +2 -0
- package/dist/types/lib/component-preloading.d.ts +11 -0
- package/dist/types/lib/configuration-completion.d.ts +10 -0
- package/dist/types/lib/content-field-values.d.ts +8 -0
- package/dist/types/lib/content-field.d.ts +2 -0
- package/dist/types/lib/content-filename.d.ts +6 -0
- package/dist/types/lib/content-icon-loader.d.ts +2 -0
- package/dist/types/lib/content-operations.d.ts +15 -0
- package/dist/types/lib/content-validation.d.ts +5 -0
- package/dist/types/lib/core-route-paths.d.ts +2 -0
- package/dist/types/lib/date-field.d.ts +4 -0
- package/dist/types/lib/deferred-component.d.ts +8 -0
- package/dist/types/lib/field-value-shapes.d.ts +11 -0
- package/dist/types/lib/field-values.d.ts +9 -0
- package/dist/types/lib/file-history.d.ts +2 -0
- package/dist/types/lib/file-types.d.ts +13 -0
- package/dist/types/lib/i18n-media.d.ts +4 -0
- package/dist/types/lib/i18n-schema.d.ts +44 -0
- package/dist/types/lib/i18n-values.d.ts +21 -0
- package/dist/types/lib/i18n.d.ts +43 -0
- package/dist/types/lib/icon-name.d.ts +1 -0
- package/dist/types/lib/markdown-images.d.ts +2 -0
- package/dist/types/lib/media-assets.d.ts +9 -0
- package/dist/types/lib/media-field-values.d.ts +20 -0
- package/dist/types/lib/media-upload-name.d.ts +3 -0
- package/dist/types/lib/media-variants.d.ts +4 -0
- package/dist/types/lib/notifications.d.ts +16 -0
- package/dist/types/lib/operation-error.d.ts +3 -0
- package/dist/types/lib/page-title.d.ts +9 -0
- package/dist/types/lib/profile.d.ts +6 -0
- package/dist/types/lib/reference-pages.d.ts +12 -0
- package/dist/types/lib/repository-identity.d.ts +18 -0
- package/dist/types/lib/repository-page-path.d.ts +4 -0
- package/dist/types/lib/repository.d.ts +13 -0
- package/dist/types/lib/select-options.d.ts +4 -0
- package/dist/types/lib/use-raw-search.d.ts +2 -0
- package/dist/types/package/cli.d.ts +2 -0
- package/dist/types/package/cloudflare-project-routes.d.ts +2 -0
- package/dist/types/package/config.d.ts +41 -0
- package/dist/types/package/configured-icons.d.ts +2 -0
- package/dist/types/package/constants.d.ts +2 -0
- package/dist/types/package/deploy-config.d.ts +1 -0
- package/dist/types/package/generate.d.ts +10 -0
- package/dist/types/package/icon-path.d.ts +2 -0
- package/dist/types/package/load.d.ts +1 -0
- package/dist/types/package/migrate.d.ts +31 -0
- package/dist/types/package/node-middleware.d.ts +7 -0
- package/dist/types/package/runtime.d.ts +20 -0
- package/dist/types/package/runtime.server.d.ts +11 -0
- package/dist/types/package/serve.d.ts +5 -0
- package/dist/types/package/server-entry.d.ts +1 -0
- package/dist/types/package/smtp.d.ts +9 -0
- package/dist/types/package/smtp.server.d.ts +2 -0
- package/dist/types/package/vite.d.ts +23 -0
- package/dist/types/plugins/client.d.ts +129 -0
- package/dist/types/plugins/compose.server.d.ts +30 -0
- package/dist/types/plugins/email/cloudflare.server.d.ts +6 -0
- package/dist/types/plugins/email/resend.server.d.ts +2 -0
- package/dist/types/plugins/email/smtp.server.d.ts +15 -0
- package/dist/types/plugins/identity.d.ts +4 -0
- package/dist/types/plugins/server.d.ts +83 -0
- package/dist/types/routeTree.gen.d.ts +592 -0
- package/dist/types/router.d.ts +6 -0
- package/dist/types/routes/__root.d.ts +8 -0
- package/dist/types/routes/admin.d.ts +17 -0
- package/dist/types/routes/auth.error.d.ts +4 -0
- package/dist/types/routes/auth.redirect.d.ts +5 -0
- package/dist/types/routes/github.$owner.$repo.$branch.$page.d.ts +11 -0
- package/dist/types/routes/github.$owner.$repo.$branch.actions.d.ts +13 -0
- package/dist/types/routes/github.$owner.$repo.$branch.cache.d.ts +11 -0
- package/dist/types/routes/github.$owner.$repo.$branch.collaborators.d.ts +11 -0
- package/dist/types/routes/github.$owner.$repo.$branch.collection.$name.d.ts +90 -0
- package/dist/types/routes/github.$owner.$repo.$branch.collection.$name_.edit.$.d.ts +11 -0
- package/dist/types/routes/github.$owner.$repo.$branch.collection.$name_.entry.$.d.ts +15 -0
- package/dist/types/routes/github.$owner.$repo.$branch.collection.$name_.new.d.ts +28 -0
- package/dist/types/routes/github.$owner.$repo.$branch.configuration.d.ts +11 -0
- package/dist/types/routes/github.$owner.$repo.$branch.d.ts +6 -0
- package/dist/types/routes/github.$owner.$repo.$branch.file.$name.d.ts +19 -0
- package/dist/types/routes/github.$owner.$repo.$branch.index.d.ts +32 -0
- package/dist/types/routes/github.$owner.$repo.$branch.media.$name.d.ts +14 -0
- package/dist/types/routes/github.$owner.$repo.index.d.ts +7 -0
- package/dist/types/routes/index.d.ts +11 -0
- package/dist/types/routes/onboarding.d.ts +7 -0
- package/dist/types/routes/settings.d.ts +1 -0
- package/dist/types/routes/sign-in.d.ts +11 -0
- package/dist/types/server/access/policy.d.ts +108 -0
- package/dist/types/server/access/repository-identity-policy.d.ts +3 -0
- package/dist/types/server/access/repository-identity.d.ts +65 -0
- package/dist/types/server/access/repository-policy.d.ts +33 -0
- package/dist/types/server/access/repository.d.ts +227 -0
- package/dist/types/server/account/account.d.ts +39 -0
- package/dist/types/server/account/deletion.d.ts +15 -0
- package/dist/types/server/account/preferences.d.ts +6 -0
- package/dist/types/server/actions/actions.d.ts +152 -0
- package/dist/types/server/activity/capture.d.ts +33 -0
- package/dist/types/server/activity/details.d.ts +23 -0
- package/dist/types/server/activity/store.d.ts +50 -0
- package/dist/types/server/activity/webhook.d.ts +4 -0
- package/dist/types/server/admin/access.d.ts +4 -0
- package/dist/types/server/admin/admin.d.ts +43 -0
- package/dist/types/server/admin/sign-in-allowlist.d.ts +16 -0
- package/dist/types/server/auth/index.d.ts +751 -0
- package/dist/types/server/auth/oauth-account.d.ts +23 -0
- package/dist/types/server/auth/oauth-token-adapter.d.ts +2 -0
- package/dist/types/server/auth/oauth-token-crypto.d.ts +7 -0
- package/dist/types/server/auth/rate-limit.d.ts +3 -0
- package/dist/types/server/auth/secret-crypto.d.ts +5 -0
- package/dist/types/server/auth/sign-in-allowlist.d.ts +4 -0
- package/dist/types/server/cache/configuration-access.d.ts +33 -0
- package/dist/types/server/cache/configuration-read.d.ts +5 -0
- package/dist/types/server/cache/configuration.d.ts +67 -0
- package/dist/types/server/cache/directory-store.d.ts +35 -0
- package/dist/types/server/cache/directory.d.ts +65 -0
- package/dist/types/server/cache/policy.d.ts +14 -0
- package/dist/types/server/cache/repository-read.d.ts +3 -0
- package/dist/types/server/cache/repository.d.ts +30 -0
- package/dist/types/server/collaborators/api.d.ts +2 -0
- package/dist/types/server/collaborators/branches.d.ts +7 -0
- package/dist/types/server/collaborators/collaborators.d.ts +90 -0
- package/dist/types/server/collaborators/membership-match.d.ts +5 -0
- package/dist/types/server/collaborators/shared-projects.d.ts +13 -0
- package/dist/types/server/content/collection.d.ts +67 -0
- package/dist/types/server/content/conflict.d.ts +1 -0
- package/dist/types/server/content/entry-editor.d.ts +2308 -0
- package/dist/types/server/content/localized-directory.d.ts +7 -0
- package/dist/types/server/content/reference.d.ts +26 -0
- package/dist/types/server/content/write-response.d.ts +7 -0
- package/dist/types/server/context-cloudflare.d.ts +1050 -0
- package/dist/types/server/context-node.d.ts +1051 -0
- package/dist/types/server/context.d.ts +1094 -0
- package/dist/types/server/csrf.d.ts +2 -0
- package/dist/types/server/db/client.d.ts +10 -0
- package/dist/types/server/db/core.d.ts +27 -0
- package/dist/types/server/db/schema.d.ts +3270 -0
- package/dist/types/server/db/sql.d.ts +8 -0
- package/dist/types/server/email/email.d.ts +15 -0
- package/dist/types/server/email/templates.d.ts +36 -0
- package/dist/types/server/email/translations.d.ts +121 -0
- package/dist/types/server/github/account.d.ts +7 -0
- package/dist/types/server/github/api.d.ts +208 -0
- package/dist/types/server/github/app-install.d.ts +2 -0
- package/dist/types/server/github/app.d.ts +21 -0
- package/dist/types/server/github/installation-token-cache.d.ts +5 -0
- package/dist/types/server/github/large-collection.d.ts +2 -0
- package/dist/types/server/github/webhook-response.d.ts +2 -0
- package/dist/types/server/github/webhook.d.ts +37 -0
- package/dist/types/server/http.d.ts +7 -0
- package/dist/types/server/index.d.ts +5 -0
- package/dist/types/server/media/media.d.ts +145 -0
- package/dist/types/server/media/preview.d.ts +8 -0
- package/dist/types/server/media/provider.d.ts +233 -0
- package/dist/types/server/repository/activity.d.ts +2 -0
- package/dist/types/server/repository/branches.d.ts +12 -0
- package/dist/types/server/repository/provider.d.ts +155 -0
- package/dist/types/server/repository/repositories.d.ts +55 -0
- package/dist/types/server/request-body.d.ts +4 -0
- package/dist/types/server/routes/account.d.ts +4 -0
- package/dist/types/server/routes/actions.d.ts +4 -0
- package/dist/types/server/routes/activity.d.ts +4 -0
- package/dist/types/server/routes/admin.d.ts +4 -0
- package/dist/types/server/routes/app-version.d.ts +1 -0
- package/dist/types/server/routes/auth.d.ts +4 -0
- package/dist/types/server/routes/cache.d.ts +4 -0
- package/dist/types/server/routes/collaborators.d.ts +4 -0
- package/dist/types/server/routes/configuration.d.ts +4 -0
- package/dist/types/server/routes/entries.d.ts +4 -0
- package/dist/types/server/routes/health.d.ts +6 -0
- package/dist/types/server/routes/index.d.ts +3 -0
- package/dist/types/server/routes/media.d.ts +4 -0
- package/dist/types/server/routes/plugin-request.d.ts +3 -0
- package/dist/types/server/routes/plugins.d.ts +4 -0
- package/dist/types/server/routes/repositories.d.ts +4 -0
- package/dist/types/server/routes/shared.d.ts +16 -0
- package/dist/types/server/routes/webhooks.d.ts +4 -0
- package/dist/types/server/runtime/runtime-ports.d.ts +4 -0
- package/dist/types/server/runtime-config.d.ts +41 -0
- package/dist/types/server/services/account-language.d.ts +3 -0
- package/dist/types/server/services/account.d.ts +41 -0
- package/dist/types/server/services/actions.d.ts +107 -0
- package/dist/types/server/services/activity.d.ts +51 -0
- package/dist/types/server/services/admin.d.ts +61 -0
- package/dist/types/server/services/authentication-state.d.ts +3 -0
- package/dist/types/server/services/cache-management.d.ts +41 -0
- package/dist/types/server/services/cache.d.ts +25 -0
- package/dist/types/server/services/collaborators.d.ts +22 -0
- package/dist/types/server/services/configuration-editor.d.ts +36 -0
- package/dist/types/server/services/configuration.d.ts +20 -0
- package/dist/types/server/services/content.d.ts +4764 -0
- package/dist/types/server/services/context.d.ts +37 -0
- package/dist/types/server/services/dashboard.d.ts +20 -0
- package/dist/types/server/services/entry-translations.d.ts +9 -0
- package/dist/types/server/services/errors.d.ts +14 -0
- package/dist/types/server/services/index.d.ts +12 -0
- package/dist/types/server/services/local-account-data.d.ts +4 -0
- package/dist/types/server/services/media.d.ts +96 -0
- package/dist/types/server/services/reference.d.ts +10 -0
- package/dist/types/server/services/repository.d.ts +40 -0
- package/dist/types/shared/account-preferences.d.ts +13 -0
- package/dist/types/shared/application-operations.d.ts +2 -0
- package/dist/types/shared/collection-presentation.d.ts +13 -0
- package/dist/types/shared/configuration-compatibility.d.ts +10 -0
- package/dist/types/shared/configuration-components.d.ts +4 -0
- package/dist/types/shared/configuration-content.d.ts +21 -0
- package/dist/types/shared/configuration-discovery.d.ts +3 -0
- package/dist/types/shared/configuration-names.d.ts +7 -0
- package/dist/types/shared/configuration-navigation.d.ts +25 -0
- package/dist/types/shared/configuration-schema.d.ts +653 -0
- package/dist/types/shared/configuration-settings.d.ts +4 -0
- package/dist/types/shared/configuration-source.d.ts +17 -0
- package/dist/types/shared/configuration-yaml.d.ts +23 -0
- package/dist/types/shared/configuration.d.ts +4 -0
- package/dist/types/shared/content-conflict.d.ts +2 -0
- package/dist/types/shared/content-serialization.d.ts +18 -0
- package/dist/types/shared/field-validation-error.d.ts +3 -0
- package/dist/types/shared/git-path.d.ts +11 -0
- package/dist/types/shared/json.d.ts +13 -0
- package/dist/types/shared/media-error.d.ts +9 -0
- package/dist/types/shared/repository-search.d.ts +5 -0
- package/dist/types/shared/repository-templates.d.ts +17 -0
- package/dist/types/shared/requests/account.d.ts +16 -0
- package/dist/types/shared/requests/action.d.ts +52 -0
- package/dist/types/shared/requests/activity.d.ts +7 -0
- package/dist/types/shared/requests/admin.d.ts +35 -0
- package/dist/types/shared/requests/branch.d.ts +7 -0
- package/dist/types/shared/requests/cache.d.ts +22 -0
- package/dist/types/shared/requests/collaborator.d.ts +20 -0
- package/dist/types/shared/requests/collection.d.ts +10 -0
- package/dist/types/shared/requests/configuration.d.ts +21 -0
- package/dist/types/shared/requests/entry-write.d.ts +108 -0
- package/dist/types/shared/requests/entry.d.ts +17 -0
- package/dist/types/shared/requests/fixed-file.d.ts +8 -0
- package/dist/types/shared/requests/local-account.d.ts +4 -0
- package/dist/types/shared/requests/media.d.ts +135 -0
- package/dist/types/shared/requests/reference.d.ts +14 -0
- package/dist/types/shared/requests/repository-template.d.ts +6 -0
- package/dist/types/shared/requests/repository.d.ts +6 -0
- package/dist/types/shared/requests/ui-language.d.ts +4 -0
- package/dist/types/shared/sign-in-allowlist.d.ts +18 -0
- package/dist/types/shared/yaml-aliases.d.ts +1 -0
- package/docs/public/configuration/actions.md +160 -0
- package/docs/public/configuration/components.md +56 -0
- package/docs/public/configuration/content/filename.md +63 -0
- package/docs/public/configuration/content/formats.md +63 -0
- package/docs/public/configuration/content/index.md +138 -0
- package/docs/public/configuration/content/view.md +52 -0
- package/docs/public/configuration/fields/block.md +62 -0
- package/docs/public/configuration/fields/boolean.md +22 -0
- package/docs/public/configuration/fields/code.md +29 -0
- package/docs/public/configuration/fields/date.md +35 -0
- package/docs/public/configuration/fields/file.md +34 -0
- package/docs/public/configuration/fields/image.md +48 -0
- package/docs/public/configuration/fields/index.md +130 -0
- package/docs/public/configuration/fields/number.md +28 -0
- package/docs/public/configuration/fields/object.md +63 -0
- package/docs/public/configuration/fields/reference.md +64 -0
- package/docs/public/configuration/fields/rich-text.md +126 -0
- package/docs/public/configuration/fields/select.md +48 -0
- package/docs/public/configuration/fields/string.md +31 -0
- package/docs/public/configuration/fields/text.md +30 -0
- package/docs/public/configuration/fields/uuid.md +28 -0
- package/docs/public/configuration/index.md +88 -0
- package/docs/public/configuration/localization.md +138 -0
- package/docs/public/configuration/media.md +77 -0
- package/docs/public/configuration/settings.md +85 -0
- package/docs/public/docs.json +119 -0
- package/docs/public/extending/custom-field.md +107 -0
- package/docs/public/extending/field-api.md +71 -0
- package/docs/public/extending/plugins.md +67 -0
- package/docs/public/guides/actions.md +14 -0
- package/docs/public/guides/collaborators.md +43 -0
- package/docs/public/guides/editing.md +36 -0
- package/docs/public/guides/media.md +24 -0
- package/docs/public/guides/translations.md +40 -0
- package/docs/public/how-it-works.md +33 -0
- package/docs/public/index.md +25 -0
- package/docs/public/quick-start.md +87 -0
- package/docs/public/reference.md +84 -0
- package/docs/public/self-hosting/cloudflare.md +62 -0
- package/docs/public/self-hosting/environment-variables.md +84 -0
- package/docs/public/self-hosting/github-app.md +54 -0
- package/docs/public/self-hosting/index.md +44 -0
- package/docs/public/self-hosting/netlify.md +41 -0
- package/docs/public/self-hosting/node.md +42 -0
- package/docs/public/self-hosting/upgrading.md +44 -0
- package/docs/public/self-hosting/vercel.md +41 -0
- package/drizzle/0000_wet_overlord.sql +268 -0
- package/drizzle/meta/0000_snapshot.json +1858 -0
- package/drizzle/meta/_journal.json +13 -0
- package/index.html +53 -0
- package/package.json +368 -3
- package/public/_headers +7 -0
- package/public/favicon.ico +0 -0
- package/public/favicon.svg +16 -0
- package/public/images/astro-blog-template.webp +0 -0
- package/public/images/eleventy-blog-template.webp +0 -0
- package/public/images/email-logo.png +0 -0
- package/public/images/nextjs-blog-template.webp +0 -0
- package/public/images/social-card.png +0 -0
- package/public/reference/docs/configuration/actions.md +160 -0
- package/public/reference/docs/configuration/components.md +56 -0
- package/public/reference/docs/configuration/content/filename.md +63 -0
- package/public/reference/docs/configuration/content/formats.md +63 -0
- package/public/reference/docs/configuration/content/index.md +138 -0
- package/public/reference/docs/configuration/content/view.md +52 -0
- package/public/reference/docs/configuration/fields/block.md +62 -0
- package/public/reference/docs/configuration/fields/boolean.md +22 -0
- package/public/reference/docs/configuration/fields/code.md +29 -0
- package/public/reference/docs/configuration/fields/date.md +35 -0
- package/public/reference/docs/configuration/fields/file.md +34 -0
- package/public/reference/docs/configuration/fields/image.md +48 -0
- package/public/reference/docs/configuration/fields/index.md +130 -0
- package/public/reference/docs/configuration/fields/number.md +28 -0
- package/public/reference/docs/configuration/fields/object.md +63 -0
- package/public/reference/docs/configuration/fields/reference.md +64 -0
- package/public/reference/docs/configuration/fields/rich-text.md +126 -0
- package/public/reference/docs/configuration/fields/select.md +48 -0
- package/public/reference/docs/configuration/fields/string.md +31 -0
- package/public/reference/docs/configuration/fields/text.md +30 -0
- package/public/reference/docs/configuration/fields/uuid.md +28 -0
- package/public/reference/docs/configuration/index.md +88 -0
- package/public/reference/docs/configuration/localization.md +138 -0
- package/public/reference/docs/configuration/media.md +77 -0
- package/public/reference/docs/configuration/settings.md +85 -0
- package/public/reference/docs/extending/custom-field.md +107 -0
- package/public/reference/docs/extending/field-api.md +71 -0
- package/public/reference/docs/extending/plugins.md +67 -0
- package/public/reference/docs/guides/actions.md +14 -0
- package/public/reference/docs/guides/collaborators.md +43 -0
- package/public/reference/docs/guides/editing.md +36 -0
- package/public/reference/docs/guides/media.md +24 -0
- package/public/reference/docs/guides/translations.md +40 -0
- package/public/reference/docs/how-it-works.md +33 -0
- package/public/reference/docs/index.md +25 -0
- package/public/reference/docs/quick-start.md +87 -0
- package/public/reference/docs/reference.md +84 -0
- package/public/reference/docs/self-hosting/cloudflare.md +62 -0
- package/public/reference/docs/self-hosting/environment-variables.md +84 -0
- package/public/reference/docs/self-hosting/github-app.md +54 -0
- package/public/reference/docs/self-hosting/index.md +44 -0
- package/public/reference/docs/self-hosting/netlify.md +41 -0
- package/public/reference/docs/self-hosting/node.md +42 -0
- package/public/reference/docs/self-hosting/upgrading.md +44 -0
- package/public/reference/docs/self-hosting/vercel.md +41 -0
- package/public/reference/docs.json +119 -0
- package/public/reference/manifest.json +190 -0
- package/public/reference.md +79 -0
- package/scripts/collaborators.mjs +470 -0
- package/scripts/setup-github-app.mjs +837 -0
- package/src/client/api/account.ts +48 -0
- package/src/client/api/actions.ts +53 -0
- package/src/client/api/activity.ts +17 -0
- package/src/client/api/admin.ts +25 -0
- package/src/client/api/auth.ts +8 -0
- package/src/client/api/authentication.ts +8 -0
- package/src/client/api/cache.ts +18 -0
- package/src/client/api/collaborators.ts +18 -0
- package/src/client/api/collections.ts +26 -0
- package/src/client/api/configuration.ts +38 -0
- package/src/client/api/dashboard.ts +6 -0
- package/src/client/api/entries.ts +53 -0
- package/src/client/api/entry-write.ts +54 -0
- package/src/client/api/fixed-file.ts +23 -0
- package/src/client/api/index.ts +98 -0
- package/src/client/api/local-account.ts +5 -0
- package/src/client/api/media.ts +62 -0
- package/src/client/api/reference.ts +9 -0
- package/src/client/api/repositories.ts +7 -0
- package/src/client/api/repository-search.ts +18 -0
- package/src/client/api/repository.ts +39 -0
- package/src/client/queries/admin.ts +19 -0
- package/src/client/queries/content.ts +114 -0
- package/src/client/queries/file-history.ts +44 -0
- package/src/client/queries/keys.ts +56 -0
- package/src/client/queries/references.ts +124 -0
- package/src/client/queries/repository-invalidation.ts +27 -0
- package/src/client/queries/repository.ts +96 -0
- package/src/client/queries/session.ts +45 -0
- package/src/client.tsx +15 -0
- package/src/components/action-history-menu.tsx +273 -0
- package/src/components/code-editor-language.ts +29 -0
- package/src/components/code-editor.tsx +146 -0
- package/src/components/code-field.tsx +42 -0
- package/src/components/collaborator-identity.tsx +34 -0
- package/src/components/collaborator-invite-input.tsx +160 -0
- package/src/components/collaborators-loading.tsx +53 -0
- package/src/components/collection-entry-creator.tsx +558 -0
- package/src/components/component-preloading.tsx +23 -0
- package/src/components/content-entry-editor.tsx +1240 -0
- package/src/components/content-entry-skeleton.tsx +200 -0
- package/src/components/content-icon.tsx +51 -0
- package/src/components/dropdown-loading-row.tsx +19 -0
- package/src/components/editor-layout.tsx +16 -0
- package/src/components/editor-skeleton.tsx +21 -0
- package/src/components/error-alert.tsx +44 -0
- package/src/components/file-editor-history.tsx +191 -0
- package/src/components/file-editor-menu.tsx +113 -0
- package/src/components/github-icon.tsx +17 -0
- package/src/components/gradient-avatar-fallback.tsx +39 -0
- package/src/components/media-file-icon.tsx +40 -0
- package/src/components/media-thumbnail.tsx +199 -0
- package/src/components/operation-error.tsx +161 -0
- package/src/components/option-combobox.tsx +195 -0
- package/src/components/otp-verification-form.tsx +125 -0
- package/src/components/repository-action-buttons.tsx +547 -0
- package/src/components/repository-breadcrumb.tsx +169 -0
- package/src/components/repository-page-header.tsx +97 -0
- package/src/components/repository-shell.tsx +938 -0
- package/src/components/rich-text-field.tsx +324 -0
- package/src/components/root-error.tsx +77 -0
- package/src/components/search-input.tsx +37 -0
- package/src/components/settings-back-link.tsx +43 -0
- package/src/components/settings-layout.tsx +178 -0
- package/src/components/settings-loading.tsx +19 -0
- package/src/components/settings-row.ts +9 -0
- package/src/components/sign-in-form.tsx +285 -0
- package/src/components/startup-error.tsx +93 -0
- package/src/components/structured-content-field.tsx +1900 -0
- package/src/components/table-pager.tsx +62 -0
- package/src/components/ui/alert-dialog.tsx +199 -0
- package/src/components/ui/alert.tsx +78 -0
- package/src/components/ui/avatar.tsx +113 -0
- package/src/components/ui/badge.tsx +53 -0
- package/src/components/ui/breadcrumb.tsx +128 -0
- package/src/components/ui/button-group.tsx +84 -0
- package/src/components/ui/button.tsx +67 -0
- package/src/components/ui/card.tsx +102 -0
- package/src/components/ui/checkbox.tsx +38 -0
- package/src/components/ui/collapsible.tsx +31 -0
- package/src/components/ui/combobox.tsx +336 -0
- package/src/components/ui/command.tsx +202 -0
- package/src/components/ui/dialog.tsx +174 -0
- package/src/components/ui/dropdown-menu.tsx +279 -0
- package/src/components/ui/editor/blockquote.ts +45 -0
- package/src/components/ui/editor/document.ts +29 -0
- package/src/components/ui/editor/html-policy.ts +945 -0
- package/src/components/ui/editor/image.ts +309 -0
- package/src/components/ui/editor/index.tsx +1383 -0
- package/src/components/ui/editor/preserve.ts +494 -0
- package/src/components/ui/editor/slash-command/commands-list.tsx +122 -0
- package/src/components/ui/editor/slash-command/commands.ts +66 -0
- package/src/components/ui/editor/slash-command/suggestion.tsx +305 -0
- package/src/components/ui/editor/typeset.css +1120 -0
- package/src/components/ui/empty.tsx +104 -0
- package/src/components/ui/field.tsx +246 -0
- package/src/components/ui/input-group.tsx +155 -0
- package/src/components/ui/input-otp.tsx +84 -0
- package/src/components/ui/input.tsx +18 -0
- package/src/components/ui/label.tsx +23 -0
- package/src/components/ui/pagination.tsx +153 -0
- package/src/components/ui/popover.tsx +86 -0
- package/src/components/ui/progress.tsx +29 -0
- package/src/components/ui/radio-group.tsx +41 -0
- package/src/components/ui/scroll-area.tsx +52 -0
- package/src/components/ui/select.tsx +206 -0
- package/src/components/ui/separator.tsx +25 -0
- package/src/components/ui/sheet.tsx +152 -0
- package/src/components/ui/sidebar.tsx +693 -0
- package/src/components/ui/skeleton.tsx +14 -0
- package/src/components/ui/sonner.tsx +88 -0
- package/src/components/ui/spinner.tsx +24 -0
- package/src/components/ui/switch.tsx +32 -0
- package/src/components/ui/table.tsx +165 -0
- package/src/components/ui/tabs.tsx +88 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/toggle-group.tsx +89 -0
- package/src/components/ui/toggle.tsx +47 -0
- package/src/components/ui/tooltip.tsx +54 -0
- package/src/deployment/builtins/resend-email.server.ts +75 -0
- package/src/deployment/conformance/media-storage.ts +177 -0
- package/src/deployment/contracts/client.ts +331 -0
- package/src/deployment/contracts/server.server.ts +55 -0
- package/src/deployment/contracts/version.ts +8 -0
- package/src/deployment/default/client.ts +6 -0
- package/src/deployment/default/server.server.ts +8 -0
- package/src/features/account/account-copy.ts +17 -0
- package/src/features/account/account-deleted-notice.tsx +23 -0
- package/src/features/account/account-menu.tsx +139 -0
- package/src/features/account/account-messages.ts +4 -0
- package/src/features/account/app-header.tsx +46 -0
- package/src/features/account/content-editing-preferences.tsx +104 -0
- package/src/features/account/delete-account.tsx +236 -0
- package/src/features/account/language-field.tsx +79 -0
- package/src/features/account/language-preference.tsx +101 -0
- package/src/features/account/local-account-data.tsx +131 -0
- package/src/features/account/local-account-storage.ts +82 -0
- package/src/features/account/profile-editor.ts +269 -0
- package/src/features/account/profile-fields.tsx +156 -0
- package/src/features/account/profile-loading.tsx +51 -0
- package/src/features/account/profile-picture.tsx +272 -0
- package/src/features/account/profile-settings.tsx +50 -0
- package/src/features/account/profile-setup-heading.tsx +17 -0
- package/src/features/account/profile-setup.tsx +171 -0
- package/src/features/account/require-profile.ts +40 -0
- package/src/features/account/sign-in-layout.tsx +29 -0
- package/src/features/account/sign-in-page.tsx +45 -0
- package/src/features/account/theme-preference.tsx +89 -0
- package/src/features/account/use-account-preferences.ts +96 -0
- package/src/features/account/use-profile-editor.ts +102 -0
- package/src/features/account/use-profile-update.ts +64 -0
- package/src/features/activity/activity-feed-item.tsx +320 -0
- package/src/features/activity/activity-feed-skeleton.tsx +28 -0
- package/src/features/activity/activity-feed.tsx +113 -0
- package/src/features/activity/activity-query.ts +17 -0
- package/src/features/admin/action-run-status.tsx +103 -0
- package/src/features/admin/actions-page.tsx +869 -0
- package/src/features/admin/actions-skeleton.tsx +155 -0
- package/src/features/admin/admin-loading.tsx +165 -0
- package/src/features/admin/admin-page.tsx +573 -0
- package/src/features/admin/allowlist-table.tsx +125 -0
- package/src/features/admin/cache-copy.ts +12 -0
- package/src/features/admin/cache-files-trigger.tsx +17 -0
- package/src/features/admin/cache-files.tsx +196 -0
- package/src/features/admin/cache-page.tsx +302 -0
- package/src/features/admin/cache-skeleton.tsx +76 -0
- package/src/features/admin/collaborators-page.tsx +425 -0
- package/src/features/admin/collaborators-skeleton.tsx +95 -0
- package/src/features/admin/configuration-contribution.tsx +44 -0
- package/src/features/admin/configuration-page.tsx +303 -0
- package/src/features/admin/configuration-setup.tsx +51 -0
- package/src/features/admin/configuration-skeleton.tsx +68 -0
- package/src/features/admin/plugin-page.tsx +115 -0
- package/src/features/admin/repository-actions-page.tsx +32 -0
- package/src/features/admin/repository-admin-access.ts +35 -0
- package/src/features/admin/repository-admin-page.tsx +75 -0
- package/src/features/admin/repository-configuration-page.tsx +18 -0
- package/src/features/admin/sign-in-allowlist.tsx +381 -0
- package/src/features/admin/use-action-run-tracking.ts +32 -0
- package/src/features/collaborators/collaborator-status.tsx +47 -0
- package/src/features/collaborators/collaborators-contribution.tsx +59 -0
- package/src/features/collections/collection-cell.tsx +336 -0
- package/src/features/collections/collection-header.tsx +233 -0
- package/src/features/collections/collection-model.ts +232 -0
- package/src/features/collections/collection-page.tsx +836 -0
- package/src/features/collections/collection-skeleton.tsx +106 -0
- package/src/features/collections/collection-table-layout.tsx +158 -0
- package/src/features/collections/collection-table.tsx +828 -0
- package/src/features/content/content-mutations.ts +544 -0
- package/src/features/content/unavailable-entry.tsx +64 -0
- package/src/features/content/use-entry-actions.tsx +399 -0
- package/src/features/dashboard/about-dialog.tsx +212 -0
- package/src/features/dashboard/branch-manager.tsx +118 -0
- package/src/features/dashboard/branch-picker.ts +17 -0
- package/src/features/dashboard/create-branch-dialog.tsx +182 -0
- package/src/features/dashboard/recent-repositories.ts +119 -0
- package/src/features/dashboard/recent-repository-list.tsx +82 -0
- package/src/features/dashboard/relative-time.ts +30 -0
- package/src/features/dashboard/repository-dashboard.tsx +174 -0
- package/src/features/dashboard/repository-loading.tsx +119 -0
- package/src/features/dashboard/repository-selector.tsx +398 -0
- package/src/features/dashboard/repository-template-preview.tsx +46 -0
- package/src/features/dashboard/repository-templates.tsx +237 -0
- package/src/features/drafts/collection-creation.ts +78 -0
- package/src/features/drafts/draft-discard-dialog.tsx +90 -0
- package/src/features/drafts/draft-field-preview.tsx +128 -0
- package/src/features/drafts/draft-merge-dialog.tsx +322 -0
- package/src/features/drafts/draft-merge-fields.ts +25 -0
- package/src/features/drafts/draft-read-cache.ts +73 -0
- package/src/features/drafts/draft-save-button.tsx +240 -0
- package/src/features/drafts/draft-session.ts +374 -0
- package/src/features/drafts/draft-store.ts +438 -0
- package/src/features/drafts/merge-draft.ts +131 -0
- package/src/features/drafts/relative-age.ts +13 -0
- package/src/features/drafts/saved-draft-menu.tsx +108 -0
- package/src/features/drafts/use-content-draft.tsx +157 -0
- package/src/features/drafts/use-draft-merge.tsx +253 -0
- package/src/features/drafts/use-duplicate-entry.ts +124 -0
- package/src/features/drafts/use-review-viewport.ts +61 -0
- package/src/features/editor/commit-message-dialog.tsx +100 -0
- package/src/features/editor/editor-component-loaders.ts +35 -0
- package/src/features/editor/entry-breadcrumb.ts +64 -0
- package/src/features/editor/entry-page-header.tsx +51 -0
- package/src/features/editor/entry-title.ts +55 -0
- package/src/features/editor/field-locale-menu.tsx +166 -0
- package/src/features/editor/field-locale-values.ts +69 -0
- package/src/features/editor/fields/core-field-renderers.tsx +300 -0
- package/src/features/editor/fields/custom-field-components.ts +15 -0
- package/src/features/editor/fields/field-renderer-registry.ts +45 -0
- package/src/features/editor/fields/field-types.ts +15 -0
- package/src/features/editor/fields/field-validation.tsx +174 -0
- package/src/features/editor/fields/structured-field-options.ts +66 -0
- package/src/features/editor/fields/use-reference-options.ts +47 -0
- package/src/features/editor/file-locale-menu.tsx +487 -0
- package/src/features/editor/locale-context.tsx +264 -0
- package/src/features/editor/locale-selection.tsx +63 -0
- package/src/features/editor/rich-text-media.ts +134 -0
- package/src/features/editor/start-translation-dialog.tsx +136 -0
- package/src/features/editor/translation-preferences.ts +58 -0
- package/src/features/editor/translation-start.ts +35 -0
- package/src/features/media/media-breadcrumb.tsx +84 -0
- package/src/features/media/media-browser.tsx +1236 -0
- package/src/features/media/media-delivery.ts +348 -0
- package/src/features/media/media-drag-overlay.tsx +59 -0
- package/src/features/media/media-entry.tsx +417 -0
- package/src/features/media/media-folder-tree.tsx +216 -0
- package/src/features/media/media-model.ts +60 -0
- package/src/features/media/media-move-dialog.tsx +97 -0
- package/src/features/media/media-mutations.ts +351 -0
- package/src/features/media/media-page.tsx +24 -0
- package/src/features/media/media-picker-dialog.tsx +123 -0
- package/src/features/media/media-skeleton.tsx +97 -0
- package/src/features/media/media-upload.ts +340 -0
- package/src/features/media/media-view.ts +16 -0
- package/src/features/media/upload-conflict-dialog.tsx +126 -0
- package/src/features/media/upload-conflicts.ts +166 -0
- package/src/features/pending-writes/account-operation.ts +44 -0
- package/src/features/pending-writes/pending-write.ts +41 -0
- package/src/features/pending-writes/use-operation.ts +158 -0
- package/src/features/plugins/standalone-plugin-page.tsx +31 -0
- package/src/features/plugins/standalone-plugin-routes.tsx +70 -0
- package/src/features/repository/configuration-required.tsx +91 -0
- package/src/features/repository/overview-draft-actions.tsx +28 -0
- package/src/features/repository/overview-entry.ts +59 -0
- package/src/features/repository/overview-file-item.tsx +115 -0
- package/src/features/repository/overview-loading.tsx +94 -0
- package/src/features/repository/overview-local-files.tsx +138 -0
- package/src/features/repository/overview-media-upload.tsx +183 -0
- package/src/features/repository/overview-shortcuts.tsx +138 -0
- package/src/features/repository/overview.tsx +88 -0
- package/src/features/repository/repository-loading.ts +12 -0
- package/src/features/repository/repository-route-resource.ts +26 -0
- package/src/features/repository/repository-route-state.tsx +147 -0
- package/src/features/repository/repository-shell-loading.tsx +228 -0
- package/src/features/repository/repository-unavailable-error.tsx +90 -0
- package/src/features/repository/use-overview-files.ts +74 -0
- package/src/features/settings/account-access-table.tsx +69 -0
- package/src/features/settings/account-settings-contribution.tsx +88 -0
- package/src/features/settings/settings-navigation.ts +99 -0
- package/src/features/settings/shared-projects.tsx +246 -0
- package/src/features/settings/user-settings-skeleton.tsx +132 -0
- package/src/features/settings/user-settings.tsx +426 -0
- package/src/fields/custom/README.md +56 -0
- package/src/fields/definition.ts +45 -0
- package/src/fields/registry.ts +9 -0
- package/src/hooks/use-media-github-link.ts +29 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-page-scrolled.ts +14 -0
- package/src/hooks/use-repository-coordinates.ts +15 -0
- package/src/hooks/use-repository-github-link.ts +8 -0
- package/src/hooks/use-route-retry.ts +27 -0
- package/src/hooks/use-sidebar-scroll.ts +48 -0
- package/src/hooks/use-unsaved-warning.ts +14 -0
- package/src/i18n/catalogs.ts +37 -0
- package/src/i18n/dates.ts +19 -0
- package/src/i18n/document-title.tsx +22 -0
- package/src/i18n/error-catalogs.ts +37 -0
- package/src/i18n/errors.ts +71 -0
- package/src/i18n/known-errors.ts +2738 -0
- package/src/i18n/lingui.config.mjs +18 -0
- package/src/i18n/locale.ts +51 -0
- package/src/i18n/localized-error.tsx +7 -0
- package/src/i18n/localized-route-head.tsx +82 -0
- package/src/i18n/message.ts +34 -0
- package/src/i18n/plugin-catalogs.ts +97 -0
- package/src/i18n/po.d.ts +5 -0
- package/src/i18n/test-provider.tsx +12 -0
- package/src/integrations/tanstack-query/devtools.tsx +6 -0
- package/src/integrations/tanstack-query/root-provider.tsx +26 -0
- package/src/lib/access-denial.ts +96 -0
- package/src/lib/action-run-tracker.ts +144 -0
- package/src/lib/action-run-tracking.ts +204 -0
- package/src/lib/actions.ts +105 -0
- package/src/lib/activity.ts +119 -0
- package/src/lib/auth-error.ts +15 -0
- package/src/lib/auth-redirect.ts +29 -0
- package/src/lib/authentication.ts +22 -0
- package/src/lib/avatar-gradient.ts +10 -0
- package/src/lib/base64.ts +29 -0
- package/src/lib/cn.ts +1 -0
- package/src/lib/collaborator-invites.ts +55 -0
- package/src/lib/collaborator-key.ts +4 -0
- package/src/lib/collaborator-status.ts +10 -0
- package/src/lib/commit-message.ts +149 -0
- package/src/lib/component-loader.ts +13 -0
- package/src/lib/component-preloading.ts +152 -0
- package/src/lib/configuration-completion.ts +61 -0
- package/src/lib/configuration-reference.d.mts +2 -0
- package/src/lib/configuration-reference.mjs +5 -0
- package/src/lib/content-field-values.ts +157 -0
- package/src/lib/content-field.ts +5 -0
- package/src/lib/content-filename.ts +116 -0
- package/src/lib/content-icon-loader.ts +42 -0
- package/src/lib/content-operations.ts +49 -0
- package/src/lib/content-validation.ts +68 -0
- package/src/lib/core-route-paths.ts +15 -0
- package/src/lib/date-field.ts +53 -0
- package/src/lib/deferred-component.tsx +42 -0
- package/src/lib/field-value-shapes.ts +94 -0
- package/src/lib/field-values.ts +467 -0
- package/src/lib/file-history.ts +9 -0
- package/src/lib/file-types.ts +88 -0
- package/src/lib/i18n-media.ts +77 -0
- package/src/lib/i18n-schema.ts +38 -0
- package/src/lib/i18n-values.ts +428 -0
- package/src/lib/i18n.ts +408 -0
- package/src/lib/icon-name.ts +2 -0
- package/src/lib/markdown-images.ts +156 -0
- package/src/lib/media-assets.ts +39 -0
- package/src/lib/media-field-values.ts +378 -0
- package/src/lib/media-upload-name.ts +41 -0
- package/src/lib/media-variants.ts +18 -0
- package/src/lib/notifications.ts +156 -0
- package/src/lib/operation-error.ts +9 -0
- package/src/lib/page-title.ts +13 -0
- package/src/lib/profile.ts +50 -0
- package/src/lib/reference-pages.ts +24 -0
- package/src/lib/repository-identity.ts +73 -0
- package/src/lib/repository-page-path.ts +29 -0
- package/src/lib/repository.ts +68 -0
- package/src/lib/select-options.ts +23 -0
- package/src/lib/use-raw-search.ts +9 -0
- package/src/locales/de/messages.po +5696 -0
- package/src/locales/en/messages.po +6125 -0
- package/src/locales/es/messages.po +5919 -0
- package/src/locales/fr/messages.po +6125 -0
- package/src/locales/ja/messages.po +5696 -0
- package/src/locales/pt-BR/messages.po +5919 -0
- package/src/locales/zh-CN/messages.po +5919 -0
- package/src/package/cli.ts +132 -0
- package/src/package/cloudflare-project-routes.ts +16 -0
- package/src/package/config.ts +224 -0
- package/src/package/configured-icons.ts +58 -0
- package/src/package/constants.ts +4 -0
- package/src/package/deploy-config.ts +59 -0
- package/src/package/generate.ts +108 -0
- package/src/package/icon-path.ts +9 -0
- package/src/package/libsql-web.mjs +1 -0
- package/src/package/libsql.mjs +1 -0
- package/src/package/load.ts +19 -0
- package/src/package/migrate.ts +365 -0
- package/src/package/node-middleware.ts +29 -0
- package/src/package/runtime.server.ts +66 -0
- package/src/package/runtime.ts +115 -0
- package/src/package/serve.ts +47 -0
- package/src/package/server-entry.ts +1 -0
- package/src/package/smtp.server.ts +52 -0
- package/src/package/smtp.ts +24 -0
- package/src/package/vite.ts +376 -0
- package/src/plugins/client.ts +141 -0
- package/src/plugins/compose.server.ts +429 -0
- package/src/plugins/email/cloudflare.server.ts +58 -0
- package/src/plugins/email/resend.server.ts +12 -0
- package/src/plugins/email/smtp.server.ts +77 -0
- package/src/plugins/identity.ts +17 -0
- package/src/plugins/server.ts +106 -0
- package/src/routeTree.gen.ts +510 -0
- package/src/router.tsx +49 -0
- package/src/routes/__root.tsx +149 -0
- package/src/routes/admin.tsx +77 -0
- package/src/routes/auth.error.tsx +64 -0
- package/src/routes/auth.redirect.tsx +12 -0
- package/src/routes/github.$owner.$repo.$branch.$page.tsx +54 -0
- package/src/routes/github.$owner.$repo.$branch.actions.tsx +41 -0
- package/src/routes/github.$owner.$repo.$branch.cache.tsx +42 -0
- package/src/routes/github.$owner.$repo.$branch.collaborators.tsx +58 -0
- package/src/routes/github.$owner.$repo.$branch.collection.$name.tsx +96 -0
- package/src/routes/github.$owner.$repo.$branch.collection.$name_.edit.$.tsx +13 -0
- package/src/routes/github.$owner.$repo.$branch.collection.$name_.entry.$.tsx +95 -0
- package/src/routes/github.$owner.$repo.$branch.collection.$name_.new.tsx +125 -0
- package/src/routes/github.$owner.$repo.$branch.configuration.tsx +49 -0
- package/src/routes/github.$owner.$repo.$branch.file.$name.tsx +81 -0
- package/src/routes/github.$owner.$repo.$branch.index.tsx +57 -0
- package/src/routes/github.$owner.$repo.$branch.media.$name.tsx +104 -0
- package/src/routes/github.$owner.$repo.$branch.tsx +203 -0
- package/src/routes/github.$owner.$repo.index.tsx +104 -0
- package/src/routes/index.tsx +65 -0
- package/src/routes/onboarding.tsx +51 -0
- package/src/routes/settings.tsx +39 -0
- package/src/routes/sign-in.tsx +71 -0
- package/src/server/access/policy.ts +316 -0
- package/src/server/access/repository-identity-policy.ts +120 -0
- package/src/server/access/repository-identity.ts +361 -0
- package/src/server/access/repository-policy.ts +85 -0
- package/src/server/access/repository.ts +759 -0
- package/src/server/account/account.ts +62 -0
- package/src/server/account/deletion.ts +74 -0
- package/src/server/account/preferences.ts +50 -0
- package/src/server/actions/actions.ts +767 -0
- package/src/server/activity/capture.ts +228 -0
- package/src/server/activity/details.ts +154 -0
- package/src/server/activity/store.ts +174 -0
- package/src/server/activity/webhook.ts +159 -0
- package/src/server/admin/access.ts +9 -0
- package/src/server/admin/admin.ts +159 -0
- package/src/server/admin/sign-in-allowlist.ts +60 -0
- package/src/server/auth/index.ts +284 -0
- package/src/server/auth/oauth-account.ts +131 -0
- package/src/server/auth/oauth-token-adapter.ts +48 -0
- package/src/server/auth/oauth-token-crypto.ts +56 -0
- package/src/server/auth/rate-limit.ts +56 -0
- package/src/server/auth/secret-crypto.ts +57 -0
- package/src/server/auth/sign-in-allowlist.ts +33 -0
- package/src/server/cache/configuration-access.ts +23 -0
- package/src/server/cache/configuration-read.ts +30 -0
- package/src/server/cache/configuration.ts +483 -0
- package/src/server/cache/directory-store.ts +314 -0
- package/src/server/cache/directory.ts +735 -0
- package/src/server/cache/policy.ts +69 -0
- package/src/server/cache/repository-read.ts +119 -0
- package/src/server/cache/repository.ts +345 -0
- package/src/server/collaborators/api.ts +39 -0
- package/src/server/collaborators/branches.ts +72 -0
- package/src/server/collaborators/collaborators.ts +600 -0
- package/src/server/collaborators/membership-match.ts +10 -0
- package/src/server/collaborators/shared-projects.ts +51 -0
- package/src/server/content/collection.ts +301 -0
- package/src/server/content/conflict.ts +11 -0
- package/src/server/content/entry-editor.ts +1487 -0
- package/src/server/content/localized-directory.ts +104 -0
- package/src/server/content/reference.ts +347 -0
- package/src/server/content/write-response.ts +32 -0
- package/src/server/context-cloudflare.ts +91 -0
- package/src/server/context-node.ts +80 -0
- package/src/server/context.ts +262 -0
- package/src/server/csrf.ts +27 -0
- package/src/server/db/client.ts +56 -0
- package/src/server/db/core.ts +69 -0
- package/src/server/db/schema.ts +447 -0
- package/src/server/db/sql.ts +49 -0
- package/src/server/email/email.ts +19 -0
- package/src/server/email/templates.ts +233 -0
- package/src/server/email/translations.ts +144 -0
- package/src/server/github/account.ts +72 -0
- package/src/server/github/api.ts +1375 -0
- package/src/server/github/app-install.ts +15 -0
- package/src/server/github/app.ts +228 -0
- package/src/server/github/installation-token-cache.ts +23 -0
- package/src/server/github/large-collection.ts +48 -0
- package/src/server/github/webhook-response.ts +81 -0
- package/src/server/github/webhook.ts +1013 -0
- package/src/server/http.ts +56 -0
- package/src/server/index.ts +57 -0
- package/src/server/media/media.ts +884 -0
- package/src/server/media/preview.ts +145 -0
- package/src/server/media/provider.ts +722 -0
- package/src/server/repository/activity.ts +20 -0
- package/src/server/repository/branches.ts +35 -0
- package/src/server/repository/provider.ts +237 -0
- package/src/server/repository/repositories.ts +340 -0
- package/src/server/request-body.ts +33 -0
- package/src/server/routes/account.ts +107 -0
- package/src/server/routes/actions.ts +65 -0
- package/src/server/routes/activity.ts +17 -0
- package/src/server/routes/admin.ts +46 -0
- package/src/server/routes/app-version.ts +51 -0
- package/src/server/routes/auth.ts +35 -0
- package/src/server/routes/cache.ts +41 -0
- package/src/server/routes/collaborators.ts +32 -0
- package/src/server/routes/configuration.ts +35 -0
- package/src/server/routes/entries.ts +103 -0
- package/src/server/routes/health.ts +78 -0
- package/src/server/routes/index.ts +154 -0
- package/src/server/routes/media.ts +95 -0
- package/src/server/routes/plugin-request.ts +110 -0
- package/src/server/routes/plugins.ts +30 -0
- package/src/server/routes/repositories.ts +68 -0
- package/src/server/routes/shared.ts +109 -0
- package/src/server/routes/webhooks.ts +11 -0
- package/src/server/runtime/runtime-ports.ts +7 -0
- package/src/server/runtime-config.ts +284 -0
- package/src/server/services/account-language.ts +21 -0
- package/src/server/services/account.ts +145 -0
- package/src/server/services/actions.ts +361 -0
- package/src/server/services/activity.ts +339 -0
- package/src/server/services/admin.ts +106 -0
- package/src/server/services/authentication-state.ts +58 -0
- package/src/server/services/cache-management.ts +165 -0
- package/src/server/services/cache.ts +100 -0
- package/src/server/services/collaborators.ts +138 -0
- package/src/server/services/configuration-editor.ts +272 -0
- package/src/server/services/configuration.ts +102 -0
- package/src/server/services/content.ts +598 -0
- package/src/server/services/context.ts +91 -0
- package/src/server/services/dashboard.ts +74 -0
- package/src/server/services/entry-translations.ts +44 -0
- package/src/server/services/errors.ts +159 -0
- package/src/server/services/index.ts +48 -0
- package/src/server/services/local-account-data.ts +91 -0
- package/src/server/services/media.ts +507 -0
- package/src/server/services/reference.ts +39 -0
- package/src/server/services/repository.ts +188 -0
- package/src/shadcn-tailwind.css +674 -0
- package/src/shared/account-preferences.ts +55 -0
- package/src/shared/application-operations.ts +40 -0
- package/src/shared/collection-presentation.ts +32 -0
- package/src/shared/configuration-compatibility.ts +192 -0
- package/src/shared/configuration-components.ts +98 -0
- package/src/shared/configuration-content.ts +120 -0
- package/src/shared/configuration-discovery.ts +111 -0
- package/src/shared/configuration-names.ts +52 -0
- package/src/shared/configuration-navigation.ts +166 -0
- package/src/shared/configuration-schema.ts +1257 -0
- package/src/shared/configuration-settings.ts +22 -0
- package/src/shared/configuration-source.ts +186 -0
- package/src/shared/configuration-yaml.ts +206 -0
- package/src/shared/configuration.ts +296 -0
- package/src/shared/content-conflict.ts +6 -0
- package/src/shared/content-serialization.ts +252 -0
- package/src/shared/field-validation-error.ts +32 -0
- package/src/shared/git-path.ts +68 -0
- package/src/shared/json.ts +30 -0
- package/src/shared/media-error.ts +23 -0
- package/src/shared/repository-search.ts +43 -0
- package/src/shared/repository-templates.ts +22 -0
- package/src/shared/requests/account.ts +37 -0
- package/src/shared/requests/action.ts +169 -0
- package/src/shared/requests/activity.ts +31 -0
- package/src/shared/requests/admin.ts +98 -0
- package/src/shared/requests/branch.ts +25 -0
- package/src/shared/requests/cache.ts +62 -0
- package/src/shared/requests/collaborator.ts +49 -0
- package/src/shared/requests/collection.ts +32 -0
- package/src/shared/requests/configuration.ts +41 -0
- package/src/shared/requests/entry-write.ts +221 -0
- package/src/shared/requests/entry.ts +35 -0
- package/src/shared/requests/fixed-file.ts +29 -0
- package/src/shared/requests/local-account.ts +5 -0
- package/src/shared/requests/media.ts +215 -0
- package/src/shared/requests/reference.ts +51 -0
- package/src/shared/requests/repository-template.ts +32 -0
- package/src/shared/requests/repository.ts +28 -0
- package/src/shared/requests/ui-language.ts +15 -0
- package/src/shared/sign-in-allowlist.ts +77 -0
- package/src/shared/yaml-aliases.ts +25 -0
- package/src/styles.css +453 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { limitAliasExpansion } from '#/shared/yaml-aliases'
|
|
2
|
+
import {
|
|
3
|
+
TomlDate,
|
|
4
|
+
parse as parseToml,
|
|
5
|
+
stringify as stringifyToml,
|
|
6
|
+
} from 'smol-toml'
|
|
7
|
+
import {
|
|
8
|
+
CORE_SCHEMA,
|
|
9
|
+
DEFAULT_SCALAR_STYLE_RULES,
|
|
10
|
+
SCALAR_STYLE,
|
|
11
|
+
dump,
|
|
12
|
+
load,
|
|
13
|
+
} from 'js-yaml'
|
|
14
|
+
|
|
15
|
+
import type { JsonObject, JsonValue } from '#/shared/json'
|
|
16
|
+
|
|
17
|
+
export type SerializedFormat = 'json' | 'yaml' | 'toml'
|
|
18
|
+
export type FrontmatterFormat =
|
|
19
|
+
'json-frontmatter' | 'yaml-frontmatter' | 'toml-frontmatter'
|
|
20
|
+
export type ContentFormat = SerializedFormat | FrontmatterFormat
|
|
21
|
+
export const contentFormats: ReadonlySet<ContentFormat> = new Set([
|
|
22
|
+
'json',
|
|
23
|
+
'yaml',
|
|
24
|
+
'toml',
|
|
25
|
+
'json-frontmatter',
|
|
26
|
+
'yaml-frontmatter',
|
|
27
|
+
'toml-frontmatter',
|
|
28
|
+
])
|
|
29
|
+
export type FrontmatterDelimiters = string | readonly string[]
|
|
30
|
+
|
|
31
|
+
type ContentRecord = Record<string, unknown>
|
|
32
|
+
|
|
33
|
+
function isRecord(value: unknown): value is ContentRecord {
|
|
34
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function setFrontmatterDelimiters(
|
|
38
|
+
delimiters: FrontmatterDelimiters | null | undefined,
|
|
39
|
+
format: FrontmatterFormat,
|
|
40
|
+
): [string, string] {
|
|
41
|
+
if (delimiters == null) {
|
|
42
|
+
if (format === 'toml-frontmatter') return ['+++', '+++']
|
|
43
|
+
if (format === 'json-frontmatter') return ['{', '}']
|
|
44
|
+
return ['---', '---']
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (typeof delimiters === 'string') return [delimiters, delimiters]
|
|
48
|
+
if (
|
|
49
|
+
Array.isArray(delimiters) &&
|
|
50
|
+
delimiters.length === 2 &&
|
|
51
|
+
typeof delimiters[0] === 'string' &&
|
|
52
|
+
typeof delimiters[1] === 'string'
|
|
53
|
+
) {
|
|
54
|
+
return [delimiters[0], delimiters[1]]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
throw new Error('Frontmatter delimiters must be one string or two strings')
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function deserializeContent(source: string, format: SerializedFormat): unknown {
|
|
61
|
+
if (!source.trim()) return {}
|
|
62
|
+
|
|
63
|
+
if (format === 'yaml') {
|
|
64
|
+
const value = load(source, { schema: CORE_SCHEMA, json: true })
|
|
65
|
+
limitAliasExpansion(value)
|
|
66
|
+
return value
|
|
67
|
+
}
|
|
68
|
+
if (format === 'json') return JSON.parse(source) as unknown
|
|
69
|
+
|
|
70
|
+
return JSON.parse(JSON.stringify(parseToml(source))) as unknown
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
type StructuredValue = JsonObject | JsonValue[]
|
|
74
|
+
|
|
75
|
+
function restoreTomlDates(value: JsonValue, original: unknown): unknown {
|
|
76
|
+
if (original instanceof TomlDate && original.toJSON() === value)
|
|
77
|
+
return original
|
|
78
|
+
if (Array.isArray(value) && Array.isArray(original))
|
|
79
|
+
return value.map((item, index) => restoreTomlDates(item, original[index]))
|
|
80
|
+
if (isRecord(value) && isRecord(original))
|
|
81
|
+
return Object.fromEntries(
|
|
82
|
+
Object.entries(value).map(([key, item]) => [
|
|
83
|
+
key,
|
|
84
|
+
restoreTomlDates(
|
|
85
|
+
item,
|
|
86
|
+
Object.hasOwn(original, key) ? original[key] : undefined,
|
|
87
|
+
),
|
|
88
|
+
]),
|
|
89
|
+
)
|
|
90
|
+
return value
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function serializeValue(
|
|
94
|
+
value: StructuredValue,
|
|
95
|
+
format: SerializedFormat,
|
|
96
|
+
originalSource?: string,
|
|
97
|
+
) {
|
|
98
|
+
if (format === 'toml' && Array.isArray(value)) {
|
|
99
|
+
throw new Error('TOML documents cannot contain a list at the root')
|
|
100
|
+
}
|
|
101
|
+
if (!Array.isArray(value) && Object.keys(value).length === 0) return ''
|
|
102
|
+
if (format === 'yaml')
|
|
103
|
+
return dump(value, {
|
|
104
|
+
schema: CORE_SCHEMA,
|
|
105
|
+
quoteStyle: 'double',
|
|
106
|
+
scalarStyleRules: [
|
|
107
|
+
...Object.values(DEFAULT_SCALAR_STYLE_RULES),
|
|
108
|
+
(layout) => {
|
|
109
|
+
if (layout.style === SCALAR_STYLE.SINGLE_QUOTED)
|
|
110
|
+
layout.style = SCALAR_STYLE.DOUBLE_QUOTED
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
})
|
|
114
|
+
if (format === 'json') return JSON.stringify(value, null, 2)
|
|
115
|
+
return stringifyToml(
|
|
116
|
+
originalSource ? restoreTomlDates(value, parseToml(originalSource)) : value,
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function escapeRegularExpression(value: string) {
|
|
121
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function findJsonObjectBoundary(source: string) {
|
|
125
|
+
if (!source.startsWith('{')) return -1
|
|
126
|
+
|
|
127
|
+
let depth = 0
|
|
128
|
+
let inString = false
|
|
129
|
+
let escaped = false
|
|
130
|
+
|
|
131
|
+
for (let index = 0; index < source.length; index += 1) {
|
|
132
|
+
const character = source[index]
|
|
133
|
+
|
|
134
|
+
if (inString) {
|
|
135
|
+
if (escaped) escaped = false
|
|
136
|
+
else if (character === '\\') escaped = true
|
|
137
|
+
else if (character === '"') inString = false
|
|
138
|
+
continue
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (character === '"') inString = true
|
|
142
|
+
else if (character === '{') depth += 1
|
|
143
|
+
else if (character === '}') {
|
|
144
|
+
depth -= 1
|
|
145
|
+
if (depth === 0) return index + 1
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return -1
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function splitFrontmatter(
|
|
153
|
+
source: string,
|
|
154
|
+
format: FrontmatterFormat,
|
|
155
|
+
delimiters: [string, string],
|
|
156
|
+
): { frontmatter: string; body: string } | undefined {
|
|
157
|
+
if (
|
|
158
|
+
format === 'json-frontmatter' &&
|
|
159
|
+
delimiters[0] === '{' &&
|
|
160
|
+
delimiters[1] === '}'
|
|
161
|
+
) {
|
|
162
|
+
const boundary = findJsonObjectBoundary(source)
|
|
163
|
+
if (boundary === -1) return
|
|
164
|
+
return {
|
|
165
|
+
frontmatter: source.slice(0, boundary),
|
|
166
|
+
body: source.slice(boundary).replace(/^(?:\r?\n)+/, ''),
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const start = escapeRegularExpression(delimiters[0])
|
|
171
|
+
const end = escapeRegularExpression(delimiters[1])
|
|
172
|
+
// Prefer an immediate closing delimiter over consuming it as metadata.
|
|
173
|
+
const match = new RegExp(
|
|
174
|
+
`^${start}\\r?\\n(?:([\\s\\S]*?)\\r?\\n)??${end}(?:\\r?\\n([\\s\\S]*))?$`,
|
|
175
|
+
).exec(source)
|
|
176
|
+
|
|
177
|
+
if (!match) return
|
|
178
|
+
return { frontmatter: match.at(1) ?? '', body: match.at(2) ?? '' }
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export function parseContent(
|
|
182
|
+
source = '',
|
|
183
|
+
options: {
|
|
184
|
+
delimiters?: FrontmatterDelimiters
|
|
185
|
+
format?: ContentFormat
|
|
186
|
+
} = {},
|
|
187
|
+
): unknown {
|
|
188
|
+
const format = options.format ?? 'yaml-frontmatter'
|
|
189
|
+
if (format === 'yaml' || format === 'json' || format === 'toml') {
|
|
190
|
+
return deserializeContent(source, format)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const delimiters = setFrontmatterDelimiters(options.delimiters, format)
|
|
194
|
+
const parts = splitFrontmatter(source, format, delimiters)
|
|
195
|
+
if (!parts) return { body: source }
|
|
196
|
+
|
|
197
|
+
const value = deserializeContent(
|
|
198
|
+
parts.frontmatter,
|
|
199
|
+
format.split('-')[0] as SerializedFormat,
|
|
200
|
+
)
|
|
201
|
+
if (!isRecord(value)) {
|
|
202
|
+
throw new Error('Frontmatter must contain an object')
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
return { ...value, body: parts.body.replace(/^\r?\n/, '') }
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function serializeContent(
|
|
209
|
+
content: StructuredValue = {},
|
|
210
|
+
options: {
|
|
211
|
+
originalSource?: string
|
|
212
|
+
delimiters?: FrontmatterDelimiters
|
|
213
|
+
format?: ContentFormat
|
|
214
|
+
} = {},
|
|
215
|
+
) {
|
|
216
|
+
const format = options.format ?? 'yaml-frontmatter'
|
|
217
|
+
if (format === 'yaml' || format === 'json' || format === 'toml') {
|
|
218
|
+
if (format === 'json') return JSON.stringify(content, null, 2)
|
|
219
|
+
return serializeValue(content, format, options.originalSource)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (!isRecord(content)) {
|
|
223
|
+
throw new Error('Frontmatter content must contain an object')
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
const delimiters = setFrontmatterDelimiters(options.delimiters, format)
|
|
227
|
+
const copy = { ...content }
|
|
228
|
+
const rawBody = copy.body
|
|
229
|
+
const body = rawBody ? String(rawBody) : ''
|
|
230
|
+
delete copy.body
|
|
231
|
+
|
|
232
|
+
const serialized = serializeValue(
|
|
233
|
+
copy,
|
|
234
|
+
format.split('-')[0] as SerializedFormat,
|
|
235
|
+
format === 'toml-frontmatter' && options.originalSource
|
|
236
|
+
? splitFrontmatter(options.originalSource, format, delimiters)
|
|
237
|
+
?.frontmatter
|
|
238
|
+
: undefined,
|
|
239
|
+
).trim()
|
|
240
|
+
const frontmatter = serialized ? `${serialized}\n` : ''
|
|
241
|
+
|
|
242
|
+
if (
|
|
243
|
+
format === 'json-frontmatter' &&
|
|
244
|
+
delimiters[0] === '{' &&
|
|
245
|
+
delimiters[1] === '}'
|
|
246
|
+
) {
|
|
247
|
+
// Keep an explicit empty object so a body starting with JSON stays body text.
|
|
248
|
+
return `${frontmatter || '{}\n'}${body}`
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return `${delimiters[0]}\n${frontmatter}${delimiters[1]}\n${body}`
|
|
252
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { FieldIssue } from '#/lib/field-values'
|
|
2
|
+
|
|
3
|
+
const prefix = 'Content validation failed: '
|
|
4
|
+
|
|
5
|
+
export function fieldValidationError(issues: FieldIssue[]) {
|
|
6
|
+
return new Error(prefix + JSON.stringify(issues))
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function fieldValidationIssues(
|
|
10
|
+
error: unknown,
|
|
11
|
+
): FieldIssue[] | undefined {
|
|
12
|
+
if (!(error instanceof Error) || !error.message.startsWith(prefix)) return
|
|
13
|
+
try {
|
|
14
|
+
const value: unknown = JSON.parse(error.message.slice(prefix.length))
|
|
15
|
+
if (
|
|
16
|
+
Array.isArray(value) &&
|
|
17
|
+
value.length &&
|
|
18
|
+
value.every(
|
|
19
|
+
(issue: unknown) =>
|
|
20
|
+
typeof issue === 'object' &&
|
|
21
|
+
issue !== null &&
|
|
22
|
+
'path' in issue &&
|
|
23
|
+
typeof issue.path === 'string' &&
|
|
24
|
+
'message' in issue &&
|
|
25
|
+
typeof issue.message === 'string',
|
|
26
|
+
)
|
|
27
|
+
)
|
|
28
|
+
return value as FieldIssue[]
|
|
29
|
+
} catch {
|
|
30
|
+
/* Unrecognized operation failures use the ordinary error UI. */
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export function containsControlCharacter(value: string) {
|
|
2
|
+
return Array.from(value).some((character) => {
|
|
3
|
+
const codePoint = character.codePointAt(0)
|
|
4
|
+
return codePoint !== undefined && (codePoint <= 31 || codePoint === 127)
|
|
5
|
+
})
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Converts an absolute-looking or relative repository path into its canonical,
|
|
10
|
+
* repository-relative form. Paths that escape the repository root are rejected.
|
|
11
|
+
*/
|
|
12
|
+
export function normalizeGitPath(path: string): string {
|
|
13
|
+
if (containsControlCharacter(path)) {
|
|
14
|
+
throw new Error('Git path cannot contain control characters')
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const normalizedSegments: string[] = []
|
|
18
|
+
|
|
19
|
+
for (const segment of path.split('/')) {
|
|
20
|
+
if (segment === '' || segment === '.') continue
|
|
21
|
+
|
|
22
|
+
if (segment === '..') {
|
|
23
|
+
if (normalizedSegments.length === 0) {
|
|
24
|
+
throw new Error('Git path cannot escape the repository root')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
normalizedSegments.pop()
|
|
28
|
+
continue
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
normalizedSegments.push(segment)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return normalizedSegments.join('/')
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function joinGitPath(...segments: string[]): string {
|
|
38
|
+
return normalizeGitPath(segments.join('/'))
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function getGitFileName(path: string): string {
|
|
42
|
+
return normalizeGitPath(path).split('/').pop() ?? ''
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function getGitParentPath(path: string): string {
|
|
46
|
+
const normalizedPath = normalizeGitPath(path)
|
|
47
|
+
return normalizedPath.split('/').slice(0, -1).join('/')
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function isGitPathWithin(rootPath: string, candidatePath: string) {
|
|
51
|
+
const root = normalizeGitPath(rootPath)
|
|
52
|
+
const candidate = normalizeGitPath(candidatePath)
|
|
53
|
+
|
|
54
|
+
return root === '' || candidate === root || candidate.startsWith(`${root}/`)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function getGitRelativePath(path: string, rootPath: string): string {
|
|
58
|
+
const root = normalizeGitPath(rootPath)
|
|
59
|
+
const candidate = normalizeGitPath(path)
|
|
60
|
+
|
|
61
|
+
if (!isGitPathWithin(root, candidate)) {
|
|
62
|
+
throw new Error(`Git path "${candidate}" is outside root "${root}"`)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (root === '') return candidate
|
|
66
|
+
if (candidate === root) return ''
|
|
67
|
+
return candidate.slice(root.length + 1)
|
|
68
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export function isRecord(value: unknown): value is Record<string, unknown> {
|
|
2
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export type JsonPrimitive = string | number | boolean | null
|
|
6
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[]
|
|
7
|
+
export type JsonObject = { [key: string]: JsonValue }
|
|
8
|
+
export type ReadonlyJsonValue =
|
|
9
|
+
JsonPrimitive | ReadonlyJsonObject | readonly ReadonlyJsonValue[]
|
|
10
|
+
export type ReadonlyJsonObject = { readonly [key: string]: ReadonlyJsonValue }
|
|
11
|
+
|
|
12
|
+
export function freezeJson<T extends JsonValue>(value: T): T {
|
|
13
|
+
if (value && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
14
|
+
for (const child of Object.values(value)) freezeJson(child)
|
|
15
|
+
Object.freeze(value)
|
|
16
|
+
}
|
|
17
|
+
return value
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function toJsonValue(value: unknown): JsonValue {
|
|
21
|
+
return JSON.parse(JSON.stringify(value)) as JsonValue
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function toJsonObject(value: unknown): JsonObject {
|
|
25
|
+
const parsed: unknown = toJsonValue(value)
|
|
26
|
+
if (typeof parsed !== 'object' || parsed === null || Array.isArray(parsed)) {
|
|
27
|
+
throw new Error('Expected a JSON object')
|
|
28
|
+
}
|
|
29
|
+
return parsed as JsonObject
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class MediaNotFoundError extends Error {
|
|
2
|
+
constructor(path?: string) {
|
|
3
|
+
super(
|
|
4
|
+
path
|
|
5
|
+
? `Media object not found: ${path}`
|
|
6
|
+
: 'Media object missing from storage',
|
|
7
|
+
)
|
|
8
|
+
this.name = 'MediaNotFoundError'
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const MEDIA_COPY_CONFLICT =
|
|
13
|
+
'The original file changed during the copy. The original was kept, and the destination contains the earlier copy.'
|
|
14
|
+
|
|
15
|
+
export class MediaUploadConflict extends Error {
|
|
16
|
+
constructor(
|
|
17
|
+
readonly path: string,
|
|
18
|
+
readonly version: string | null,
|
|
19
|
+
) {
|
|
20
|
+
super(`Media file already exists at ${path}`)
|
|
21
|
+
this.name = 'MediaUploadConflict'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { RepositoryAccount } from '#/server/repository/repositories'
|
|
2
|
+
|
|
3
|
+
export function parseRepositorySearch(input: unknown): {
|
|
4
|
+
account: RepositoryAccount
|
|
5
|
+
keyword: string
|
|
6
|
+
} {
|
|
7
|
+
if (typeof input !== 'object' || input === null) {
|
|
8
|
+
throw new Error('Invalid repository search')
|
|
9
|
+
}
|
|
10
|
+
const value = input as Record<string, unknown>
|
|
11
|
+
const account = value.account
|
|
12
|
+
if (typeof account !== 'object' || account === null) {
|
|
13
|
+
throw new Error('Invalid project account')
|
|
14
|
+
}
|
|
15
|
+
const candidate = account as Record<string, unknown>
|
|
16
|
+
if (
|
|
17
|
+
typeof candidate.login !== 'string' ||
|
|
18
|
+
!/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$/.test(candidate.login) ||
|
|
19
|
+
(candidate.type !== 'user' && candidate.type !== 'org') ||
|
|
20
|
+
(candidate.repositorySelection !== 'all' &&
|
|
21
|
+
candidate.repositorySelection !== 'selected') ||
|
|
22
|
+
typeof candidate.installationId !== 'number' ||
|
|
23
|
+
!Number.isInteger(candidate.installationId) ||
|
|
24
|
+
candidate.installationId <= 0
|
|
25
|
+
) {
|
|
26
|
+
throw new Error('Invalid project account')
|
|
27
|
+
}
|
|
28
|
+
const keyword = typeof value.keyword === 'string' ? value.keyword.trim() : ''
|
|
29
|
+
if (keyword.length > 100) throw new Error('Repository search is too long')
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
account: {
|
|
33
|
+
login: candidate.login,
|
|
34
|
+
type: candidate.type,
|
|
35
|
+
repositorySelection: candidate.repositorySelection,
|
|
36
|
+
installationId: candidate.installationId,
|
|
37
|
+
...(candidate.collaboratorOnly === true
|
|
38
|
+
? { collaboratorOnly: true }
|
|
39
|
+
: {}),
|
|
40
|
+
},
|
|
41
|
+
keyword,
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const REPOSITORY_TEMPLATES = [
|
|
2
|
+
{
|
|
3
|
+
name: 'Next.js blog',
|
|
4
|
+
repository: 'pagescms/nextjs-blog-template',
|
|
5
|
+
suggestedName: 'nextjs-blog',
|
|
6
|
+
thumbnail: '/images/nextjs-blog-template.webp',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: 'Astro blog',
|
|
10
|
+
repository: 'pagescms/astro-blog-template',
|
|
11
|
+
suggestedName: 'astro-blog',
|
|
12
|
+
thumbnail: '/images/astro-blog-template.webp',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'Eleventy blog',
|
|
16
|
+
repository: 'pagescms/eleventy-blog-template',
|
|
17
|
+
suggestedName: 'eleventy-blog',
|
|
18
|
+
thumbnail: '/images/eleventy-blog-template.webp',
|
|
19
|
+
},
|
|
20
|
+
] as const
|
|
21
|
+
|
|
22
|
+
export type RepositoryTemplate = (typeof REPOSITORY_TEMPLATES)[number]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { parseProfileRequest } from '#/lib/profile'
|
|
2
|
+
|
|
3
|
+
export function parseProfileMutation(input: unknown) {
|
|
4
|
+
const profile = parseProfileRequest(input)
|
|
5
|
+
const { accountId } = input as Record<string, unknown>
|
|
6
|
+
if (typeof accountId !== 'string' || !accountId || accountId.length > 200)
|
|
7
|
+
throw new Error('The profile account is missing')
|
|
8
|
+
return { ...profile, accountId }
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function parseAccountDeletion(input: unknown) {
|
|
12
|
+
if (typeof input !== 'object' || input === null)
|
|
13
|
+
throw new Error('Invalid account deletion request.')
|
|
14
|
+
const { accountId, email } = input as Record<string, unknown>
|
|
15
|
+
if (typeof accountId !== 'string' || !accountId || accountId.length > 200)
|
|
16
|
+
throw new Error('The account is missing.')
|
|
17
|
+
if (typeof email !== 'string' || !email.trim() || email.length > 320)
|
|
18
|
+
throw new Error('Enter your email to confirm account deletion.')
|
|
19
|
+
return { accountId, email: email.trim().toLowerCase() }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function parseAccountId(input: unknown) {
|
|
23
|
+
if (!input || typeof input !== 'object' || Array.isArray(input))
|
|
24
|
+
throw new Error('The account is missing.')
|
|
25
|
+
const { accountId } = input as Record<string, unknown>
|
|
26
|
+
if (typeof accountId !== 'string' || !accountId || accountId.length > 200)
|
|
27
|
+
throw new Error('The account is missing.')
|
|
28
|
+
return { accountId }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function parseSharedProjectLeave(input: unknown) {
|
|
32
|
+
const { accountId } = parseAccountId(input)
|
|
33
|
+
const { id } = input as Record<string, unknown>
|
|
34
|
+
if (typeof id !== 'number' || !Number.isSafeInteger(id) || id <= 0)
|
|
35
|
+
throw new Error('Invalid collaborator ID')
|
|
36
|
+
return { accountId, id }
|
|
37
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { normalizeGitPath } from '#/shared/git-path'
|
|
2
|
+
import { repositoryRef } from '#/lib/repository'
|
|
3
|
+
|
|
4
|
+
export function actionCoordinates(input: unknown) {
|
|
5
|
+
if (typeof input !== 'object' || input === null)
|
|
6
|
+
throw new Error('Invalid action request')
|
|
7
|
+
const value = input as Record<string, unknown>
|
|
8
|
+
if (
|
|
9
|
+
typeof value.owner !== 'string' ||
|
|
10
|
+
typeof value.repo !== 'string' ||
|
|
11
|
+
typeof value.branch !== 'string' ||
|
|
12
|
+
!value.branch
|
|
13
|
+
) {
|
|
14
|
+
throw new Error('Invalid action request')
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
...repositoryRef({
|
|
18
|
+
owner: value.owner,
|
|
19
|
+
repo: value.repo,
|
|
20
|
+
repoId: value.repoId,
|
|
21
|
+
}),
|
|
22
|
+
branch: value.branch,
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
type ActionContextType =
|
|
27
|
+
'repository' | 'collection' | 'entry' | 'file' | 'media'
|
|
28
|
+
|
|
29
|
+
function isActionContextType(value: unknown): value is ActionContextType {
|
|
30
|
+
return (
|
|
31
|
+
value === 'repository' ||
|
|
32
|
+
value === 'collection' ||
|
|
33
|
+
value === 'entry' ||
|
|
34
|
+
value === 'file' ||
|
|
35
|
+
value === 'media'
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function actionHistoryRequest(input: unknown) {
|
|
40
|
+
const coordinates = actionCoordinates(input)
|
|
41
|
+
const value = input as Record<string, unknown>
|
|
42
|
+
const { actionName, type } = value
|
|
43
|
+
if (
|
|
44
|
+
typeof actionName !== 'string' ||
|
|
45
|
+
!actionName ||
|
|
46
|
+
!isActionContextType(type)
|
|
47
|
+
)
|
|
48
|
+
throw new Error('Invalid action history request')
|
|
49
|
+
if (type === 'repository') {
|
|
50
|
+
if (value.name !== undefined || value.path !== undefined)
|
|
51
|
+
throw new Error('Invalid repository action context')
|
|
52
|
+
return { ...coordinates, actionName, type, name: null, path: null }
|
|
53
|
+
}
|
|
54
|
+
if (
|
|
55
|
+
typeof value.name !== 'string' ||
|
|
56
|
+
!value.name ||
|
|
57
|
+
typeof value.path !== 'string'
|
|
58
|
+
)
|
|
59
|
+
throw new Error('Invalid action history context')
|
|
60
|
+
return {
|
|
61
|
+
...coordinates,
|
|
62
|
+
actionName,
|
|
63
|
+
type,
|
|
64
|
+
name: value.name,
|
|
65
|
+
path: normalizeGitPath(value.path),
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function dispatchRequest(input: unknown) {
|
|
70
|
+
const repository = actionCoordinates(input)
|
|
71
|
+
const value = input as Record<string, unknown>
|
|
72
|
+
if (
|
|
73
|
+
typeof value.actionName !== 'string' ||
|
|
74
|
+
!value.actionName ||
|
|
75
|
+
typeof value.inputs !== 'object' ||
|
|
76
|
+
value.inputs === null ||
|
|
77
|
+
Array.isArray(value.inputs)
|
|
78
|
+
) {
|
|
79
|
+
throw new Error('Invalid action dispatch')
|
|
80
|
+
}
|
|
81
|
+
const contextValue = value.context
|
|
82
|
+
let actionContext: {
|
|
83
|
+
type: ActionContextType
|
|
84
|
+
name: string | null
|
|
85
|
+
path: string | null
|
|
86
|
+
data: Record<string, unknown>
|
|
87
|
+
} = {
|
|
88
|
+
type: 'repository',
|
|
89
|
+
name: null,
|
|
90
|
+
path: null,
|
|
91
|
+
data: {},
|
|
92
|
+
}
|
|
93
|
+
if (contextValue !== undefined) {
|
|
94
|
+
if (
|
|
95
|
+
typeof contextValue !== 'object' ||
|
|
96
|
+
contextValue === null ||
|
|
97
|
+
Array.isArray(contextValue)
|
|
98
|
+
) {
|
|
99
|
+
throw new Error('Invalid action context')
|
|
100
|
+
}
|
|
101
|
+
const context = contextValue as Record<string, unknown>
|
|
102
|
+
if (
|
|
103
|
+
!isActionContextType(context.type) ||
|
|
104
|
+
(context.name !== null && typeof context.name !== 'string') ||
|
|
105
|
+
(context.path !== null && typeof context.path !== 'string') ||
|
|
106
|
+
typeof context.data !== 'object' ||
|
|
107
|
+
context.data === null ||
|
|
108
|
+
Array.isArray(context.data)
|
|
109
|
+
) {
|
|
110
|
+
throw new Error('Invalid action context')
|
|
111
|
+
}
|
|
112
|
+
actionContext = {
|
|
113
|
+
type: context.type,
|
|
114
|
+
name: context.name,
|
|
115
|
+
path: context.path,
|
|
116
|
+
data: context.data as Record<string, unknown>,
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
...repository,
|
|
121
|
+
actionName: value.actionName,
|
|
122
|
+
inputs: value.inputs as Record<string, unknown>,
|
|
123
|
+
context: actionContext,
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function managementRequest(input: unknown): ReturnType<
|
|
128
|
+
typeof actionCoordinates
|
|
129
|
+
> & {
|
|
130
|
+
runId: number
|
|
131
|
+
intent: 'cancel' | 'rerun'
|
|
132
|
+
} {
|
|
133
|
+
const repository = actionCoordinates(input)
|
|
134
|
+
const value = input as Record<string, unknown>
|
|
135
|
+
if (
|
|
136
|
+
typeof value.runId !== 'number' ||
|
|
137
|
+
!Number.isInteger(value.runId) ||
|
|
138
|
+
value.runId <= 0 ||
|
|
139
|
+
(value.intent !== 'cancel' && value.intent !== 'rerun')
|
|
140
|
+
) {
|
|
141
|
+
throw new Error('Invalid action management request')
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
...repository,
|
|
145
|
+
runId: value.runId,
|
|
146
|
+
intent: value.intent,
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function trackedActionsRequest(input: unknown) {
|
|
151
|
+
if (!Array.isArray(input) || !input.length || input.length > 20)
|
|
152
|
+
throw new Error('Invalid tracked actions')
|
|
153
|
+
let count = 0
|
|
154
|
+
return input.map((value: unknown) => {
|
|
155
|
+
const ref = actionCoordinates(value)
|
|
156
|
+
const ids = (value as Record<string, unknown>).runIds
|
|
157
|
+
if (
|
|
158
|
+
!Array.isArray(ids) ||
|
|
159
|
+
!ids.length ||
|
|
160
|
+
!ids.every(
|
|
161
|
+
(id) => typeof id === 'number' && Number.isInteger(id) && id > 0,
|
|
162
|
+
)
|
|
163
|
+
)
|
|
164
|
+
throw new Error('Invalid tracked actions')
|
|
165
|
+
count += ids.length
|
|
166
|
+
if (count > 200) throw new Error('Too many tracked actions')
|
|
167
|
+
return { ...ref, runIds: [...new Set(ids as number[])] }
|
|
168
|
+
})
|
|
169
|
+
}
|